@orbit-work/ui 0.1.1 → 0.1.2-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -13
- package/dist/index.d.cts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +13 -13
- package/dist/orbitwork.css +82 -18
- package/package.json +1 -1
- package/src/components/composite/ContextUsageIndicatorView/index.tsx +1 -1
- package/src/components/composite/Icons/index.tsx +10 -4
- package/src/components/composite/Markdown/MarkdownStyleSource.test.mjs +16 -1
- package/src/components/domain/desktop/DesktopLibraryAuthorizationDialog/DesktopLibraryAuthorizationDialogSource.test.mjs +22 -0
- package/src/components/domain/desktop/DesktopLibraryAuthorizationDialog/index.tsx +72 -57
- package/src/components/domain/desktop/DesktopLibraryPageView/DesktopLibraryPageView.stories.tsx +7 -0
- package/src/components/domain/desktop/DesktopLibraryPageView/index.tsx +14 -0
- package/src/components/domain/desktop/DesktopLoginView/DesktopLoginViewSource.test.mjs +8 -1
- package/src/components/domain/desktop/DesktopLoginView/index.tsx +28 -14
- package/src/components/domain/desktop/DesktopSidebarView/DesktopSidebarViewSource.test.mjs +4 -2
- package/src/components/domain/desktop/DesktopSidebarView/index.tsx +43 -7
- package/src/components/domain/desktop/DesktopSitesListView/index.tsx +2 -2
- package/src/components/primitives/Button/index.tsx +4 -1
- package/src/components/primitives/Menu/index.tsx +2 -1
- package/src/components/primitives/Select/index.tsx +103 -61
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {A,u,x,t,s,a as a$1,q,p,n}from'./chunk-3KT7IU4X.js';export{u as BUILTIN_ORBITWORK_SKINS,m as DS2_LOCKED_SLOT_SELECTORS,g as DS2_SKIN_DENIED_PROPERTIES,j as DS2_SKIN_DENIED_VALUE_PATTERNS,f as DS2_SKIN_DENYLIST,a as HEX_COLOR,b as MAX_ORBITWORK_SKIN_IMAGE_BYTES,e as ORBITWORK_SKIN_CSS_VARIABLES,A as THEME_OPTIONS,w as analyzeSkinCSS,x as applyOrbitworkSkin,x as applyScopedOrbitworkSkin,s as assertKnownKeys,o as ds2ContrastRatio,i as findDs2DeniedCssProperty,l as findDs2DeniedCssValue,y as getActiveSkinId,p as hasOrbitworkSkinChatBackground,z as hasSkinActive,h as isDs2SkinDeniedProperty,n as isDs2SkinDeniedToken,k as isDs2SkinDeniedValue,t as isRecord,d as orbitworkSkinChatBackgroundMaskColor,r as orbitworkSkinImageCssValue,q as parseOrbitworkSkin,c as resolveOrbitworkSkinChatBackgroundMask,v as sanitizeSkinCSSBasic}from'./chunk-3KT7IU4X.js';export{a as renderAboutWindowHtml}from'./chunk-VG7FQQ7K.js';import {b,a}from'./chunk-7YJY64LZ.js';export{b as BROWSER_ANNOTATION_POPUP_STYLES,a as BROWSER_ANNOTATION_PROPERTY_DEFS}from'./chunk-7YJY64LZ.js';import {cva}from'class-variance-authority';import {clsx}from'clsx';import {extendTailwindMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {forwardRef,useId,createContext,memo,useMemo,useRef,useState,useEffect,useCallback,useImperativeHandle,isValidElement,cloneElement,useLayoutEffect,useContext,Fragment as Fragment$1,Children}from'react';import {createPortal}from'react-dom';import {createHighlighter}from'shiki';import {createCssVariablesTheme}from'shiki/core';import {createJavaScriptRegexEngine}from'shiki/engine/javascript';import N6 from'rc-tree';var xu=extendTailwindMerge({extend:{classGroups:{"font-size":[{text:[e=>e.startsWith("ow-fs-")]}]}}});function g(...e){return xu(clsx(e))}var rw=cva("inline-flex items-center justify-center font-semibold tracking-wide shrink-0 overflow-hidden",{variants:{size:{sm:"w-6 h-6 text-ow-fs-mark-sm",md:"w-8 h-8 text-ow-fs-ui",lg:"w-10 h-10 text-ow-fs-subtitle",xl:"w-12 h-12 text-ow-fs-title-lg"},shape:{person:"rounded-full",agent:"[border-radius:var(--ow-radius-sm)]"}},defaultVariants:{size:"md",shape:"person"}}),aw={brand:"data-5",steel:"data-1",clay:"data-4",moss:"data-2",ink:"agent"},nw=6,iw=[[10,"--ow-fs-mark-sm"],[11,"--ow-fs-mark-md"],[12,"--ow-fs-caption"],[13,"--ow-fs-ui"],[14,"--ow-fs-body"],[16,"--ow-fs-subtitle"],[19,"--ow-fs-title-lg"],[22,"--ow-fs-title"]];function sw(e){let t=[13,"--ow-fs-ui"];for(let o of iw)Math.abs(o[0]-e)<Math.abs(t[0]-e)&&(t=o);return `var(${t[1]})`}function cn(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return `data-${(t>>>0)%nw+1}`}function lw(e,t){return e?aw[e]??e:t?cn(t):"data-1"}function pn({children:e,size:t="md",id:o,variant:r,className:n,style:a}){let i=lw(r,o),d=i==="agent",s=d?"var(--ow-avatar-agent-bg)":`var(--ow-${i})`,l=d?"var(--ow-avatar-agent-text)":"var(--ow-on-fill)",c=d?"agent":"person",p=typeof t=="number",m=p?{width:t,height:t,fontSize:sw(t*.4),background:s,color:l,lineHeight:1,...a}:{background:s,color:l,lineHeight:1,...a};return jsx("span",{"data-slot":"avatar","data-variant":i,"data-ow-part":"image",className:g(rw({size:p?null:t,shape:c}),n),style:m,children:e})}var He=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M4.25 11.9998H11.9981M19.75 11.9998L11.9981 11.9998M11.9981 11.9998V4.25M11.9981 11.9998L11.9981 19.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),ae=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M3.75 8.75L11.1161 16.1161C11.6043 16.6043 12.3957 16.6043 12.8839 16.1161L20.25 8.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),he=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M9.25 20.25L16.6161 12.8839C17.1043 12.3957 17.1043 11.6043 16.6161 11.1161L9.25 3.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Da=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("rect",{x:"3.5",y:"7.5",width:"17",height:"12.5",rx:"3"}),jsx("path",{d:"M12 4.6V7.5"})]}),jsx("circle",{className:"dot",cx:"12",cy:"3",r:"1.9",fill:"currentColor"}),jsx("circle",{cx:"9",cy:"13.5",r:"1.1",fill:"currentColor"}),jsx("circle",{cx:"15",cy:"13.5",r:"1.1",fill:"currentColor"})]}),oo=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M14 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8.5z"}),jsx("path",{d:"M14 3.5v5h5"})]}),jsx("circle",{cx:"9",cy:"15.5",r:"1",fill:"currentColor",opacity:".35"}),jsx("circle",{cx:"12",cy:"15.5",r:"1.35",fill:"currentColor",opacity:".6"}),jsx("circle",{className:"dot",cx:"15.2",cy:"15.5",r:"1.8",fill:"currentColor"})]}),hi=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M18 20C19.1046 20 20 19.1046 20 18C20 16.8954 19.1046 16 18 16C16.8954 16 16 16.8954 16 18C16 19.1046 16.8954 20 18 20Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),hd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"6.75",y:"3",width:"10.5",height:"12.5",rx:"5.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M11.9999 18.003V20.9995M11.9999 18.003C15.1304 18.003 17.8876 16.4046 19.5 13.9795M11.9999 18.003C8.8695 18.003 6.1124 16.4048 4.5 13.9798M11.9999 20.9995H7.75M11.9999 20.9995H16.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),un=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 19V5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M5 12L12 5L19 12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),be=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M3.50999 12.8601L7.57586 16.926C8.25928 17.6094 9.36731 17.6094 10.0507 16.926L20.4806 6.49615",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Ea=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 3L13.5 7.5L18 9L13.5 10.5L12 15L10.5 10.5L6 9L10.5 7.5L12 3Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M19 16L19.7 18L21.7 18.7L19.7 19.4L19 21.4L18.3 19.4L16.3 18.7L18.3 18L19 16Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),xd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M9 6.5h11M9 12h11M9 17.5h11",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("circle",{cx:"4.2",cy:"6.5",r:"1.1",fill:"currentColor",opacity:".35"}),jsx("circle",{cx:"4.2",cy:"12",r:"1.5",fill:"currentColor",opacity:".6"}),jsx("circle",{className:"dot",cx:"4.2",cy:"17.5",r:"2",fill:"currentColor"})]}),yd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M10.5 2.86603C11.4282 2.33013 12.5718 2.33013 13.5 2.86603L19.1603 6.13397C20.0885 6.66987 20.6603 7.66025 20.6603 8.73205V15.2679C20.6603 16.3397 20.0885 17.3301 19.1603 17.866L13.5 21.134C12.5718 21.6699 11.4282 21.6699 10.5 21.134L4.83975 17.866C3.91154 17.3301 3.33975 16.3397 3.33975 15.2679V8.73205C3.33975 7.66025 3.91154 6.66987 4.83975 6.13397L10.5 2.86603Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("circle",{cx:"12",cy:"12",r:"3.125",stroke:"currentColor",strokeWidth:"1.75"})]}),Ia=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"4.5",y:"4.5",width:"15",height:"15",rx:"3.5",stroke:"currentColor",strokeWidth:"1.75"}),jsx("rect",{x:"9.25",y:"9.25",width:"5.5",height:"5.5",rx:"1",fill:"currentColor"})]}),$t=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"11",cy:"11",r:"7.5",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M19.5 19.5L16.5 16.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),Ks=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"11",cy:"11",r:"7.5",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M19.5 19.5L16.5 16.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M11 7.75V14.25M7.75 11H14.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),js=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"11",cy:"11",r:"7.5",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M19.5 19.5L16.5 16.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M7.75 11H14.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),yu=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M20.5 12A8.5 8.5 0 1 1 18.01 5.99",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M20.5 4.5V10H15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),yt=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M13.0208 4.31965L4.48056 12.8596C4.01173 13.3284 3.74833 13.9642 3.7483 14.6272L3.74812 17.9983C3.74808 18.6887 4.3077 19.2483 4.99805 19.2484L8.36899 19.2485C9.03243 19.2486 9.66868 18.9849 10.1376 18.5156L18.6741 9.97206C19.3045 9.34121 19.5531 8.41545 19.1367 7.62682C18.8011 6.99119 18.2893 6.20609 17.5381 5.45486C16.7871 4.70386 16.0022 4.1921 15.3667 3.85652C14.5778 3.43994 13.6517 3.68882 13.0208 4.31965Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M14.0001 19.2551H20.5001",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),kd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 13.5C12.8284 13.5 13.5 12.8284 13.5 12C13.5 11.1716 12.8284 10.5 12 10.5C11.1716 10.5 10.5 11.1716 10.5 12C10.5 12.8284 11.1716 13.5 12 13.5Z",fill:"currentColor"}),jsx("path",{d:"M9.17154 14.8284C13.0768 18.7337 17.5089 20.6332 19.071 19.0711C20.6331 17.509 18.7336 13.0768 14.8284 9.17159C10.9231 5.26635 6.49099 3.36685 4.9289 4.92895C3.3668 6.49105 5.26629 10.9232 9.17154 14.8284Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M14.8284 14.8284C18.7336 10.9232 20.6331 6.491 19.071 4.92891C17.5089 3.36681 13.0768 5.2663 9.17153 9.17155C5.26629 13.0768 3.36679 17.5089 4.92889 19.071C6.49099 20.6331 10.9231 18.7336 14.8284 14.8284Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),xi=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M9 4C8.20435 4 7.44129 4.31607 6.87868 4.87868C6.31607 5.44129 6 6.20435 6 7V8C5.44093 8.04266 4.905 8.24114 4.45301 8.57293C4.00103 8.90472 3.65106 9.35654 3.44283 9.87713C3.23459 10.3977 3.17641 10.9663 3.2749 11.5182C3.37338 12.0702 3.62458 12.5835 4 13C3.62458 13.4165 3.37338 13.9298 3.2749 14.4818C3.17641 15.0337 3.23459 15.6023 3.44283 16.1229C3.65106 16.6435 4.00103 17.0953 4.45301 17.4271C4.905 17.7589 5.44093 17.9573 6 18V19C6 19.7956 6.31607 20.5587 6.87868 21.1213C7.44129 21.6839 8.20435 22 9 22",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M15 4C15.7956 4 16.5587 4.31607 17.1213 4.87868C17.6839 5.44129 18 6.20435 18 7V8C18.5591 8.04266 19.095 8.24114 19.547 8.57293C19.999 8.90472 20.3489 9.35654 20.5572 9.87713C20.7654 10.3977 20.8236 10.9663 20.7251 11.5182C20.6266 12.0702 20.3754 12.5835 20 13C20.3754 13.4165 20.6266 13.9298 20.7251 14.4818C20.8236 15.0337 20.7654 15.6023 20.5572 16.1229C20.3489 16.6435 19.999 17.0953 19.547 17.4271C19.095 17.7589 18.5591 17.9573 18 18V19C18 19.7956 17.6839 20.5587 17.1213 21.1213C16.5587 21.6839 15.7956 22 15 22",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M9 4V22M15 4V22",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Xr=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M4.5 5.69359V18.1519C4.5 19.613 5.64231 20.8186 7.10221 20.8779C8.60598 20.9391 10.4924 21.0005 12 21.0005C13.5076 21.0005 15.394 20.9391 16.8978 20.8779C18.3577 20.8186 19.5 19.613 19.5 18.1519V5.69359C19.5 4.29722 18.4513 3.14607 17.0561 3.08945C15.8692 3.04128 14.2113 3.00049 12 3.00049C9.78873 3.00049 8.13082 3.04128 6.94388 3.08945C5.54866 3.14607 4.5 4.29722 4.5 5.69359Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M14 15.0996C14.4971 15.0996 14.9004 15.5029 14.9004 16C14.9004 16.4971 14.4971 16.9004 14 16.9004H8C7.50294 16.9004 7.09961 16.4971 7.09961 16C7.09961 15.5029 7.50294 15.0996 8 15.0996H14ZM16 11.0996C16.4971 11.0996 16.9004 11.5029 16.9004 12C16.9004 12.4971 16.4971 12.9004 16 12.9004H8C7.50294 12.9004 7.09961 12.4971 7.09961 12C7.09961 11.5029 7.50294 11.0996 8 11.0996H16ZM16 7.09961C16.4971 7.09961 16.9004 7.50294 16.9004 8C16.9004 8.49706 16.4971 8.90039 16 8.90039H8C7.50294 8.90039 7.09961 8.49706 7.09961 8C7.09961 7.50294 7.50294 7.09961 8 7.09961H16Z",fill:"currentColor"})]}),Q=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M5.45914 18.5405L11.9984 12.0012M18.5406 5.45903L11.9984 12.0012M11.9984 12.0012L5.45785 5.46067M11.9984 12.0012L18.5393 18.5421",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Tt=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M14.25 3.25H7C5.48122 3.25 4.25 4.48122 4.25 6V16.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M17.5 5.75H9C7.75736 5.75 6.75 6.75736 6.75 8V19C6.75 20.2426 7.75736 21.25 9 21.25H17.5C18.7426 21.25 19.75 20.2426 19.75 19V8C19.75 6.75736 18.7426 5.75 17.5 5.75Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Cd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"6",cy:"6",r:"2.75",stroke:"currentColor",strokeWidth:"1.75"}),jsx("circle",{cx:"6",cy:"18",r:"2.75",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M8.0625 7.8125L20.25 20M8.0625 16.1875L20.25 4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),We=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M11.9999 3.5C16.6944 3.5 20.4999 7.30558 20.4999 12C20.4999 14.6801 19.2595 17.0706 17.3214 18.6285M11.9999 20.5C7.30552 20.5 3.49994 16.6944 3.49994 12C3.49994 9.31637 4.7436 6.92322 6.68602 5.36543",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M3 5.11963H6.5C6.77614 5.11963 7 5.34349 7 5.61963V9.11963",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M21 18.8799L17.5 18.8799C17.2239 18.8799 17 18.656 17 18.3799L17 14.8799",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),lo=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M8.3 10.8 15.7 6.9M8.3 13.2l7.4 3.9",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("circle",{className:"dot",cx:"6",cy:"12",r:"3.1",fill:"currentColor"}),jsx("circle",{cx:"18",cy:"5.6",r:"2.2",fill:"currentColor",opacity:".5"}),jsx("circle",{cx:"18",cy:"18.4",r:"2.2",fill:"currentColor",opacity:".5"})]}),mn=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M7.75 7.99994H5.50754C4.19528 7.99994 3.07149 8.92891 2.93583 10.2341C2.83553 11.1993 2.75 12.4145 2.75 13.7524C2.75 15.2133 2.85198 16.5784 2.96382 17.6362C3.096 18.8863 4.12618 19.8129 5.38194 19.8701C6.80307 19.935 8.80784 20.0024 11 20.0024C13.2622 20.0024 15.1814 19.9306 16.4758 19.8639C17.6066 19.8057 18.6487 19.2395 19.2035 18.2525C19.8036 17.185 20.5476 15.613 21 13.7524C21.4121 12.0576 21.6012 10.6598 21.6865 9.66661C21.7665 8.73535 21.0147 7.99994 20.08 7.99994H15.0977C15.0977 7.99994 15.6641 6.61946 15.8359 5.46738C15.9633 4.61391 15.9529 3.79886 15.5391 3.01438C14.6937 1.41165 13.268 1.61425 12.6722 2.31124C11.9655 3.13789 12.096 3.73416 11.3909 4.98305C10.8353 5.96724 10.3317 6.54216 9.70685 7.08997C8.97626 7.73052 8.3125 7.99994 7.75 7.99994ZM7.75 7.99994V19.8836",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"})}),Nd=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M20.3186 7.30272H15.7676C15.987 6.83046 16.2326 6.21379 16.3212 5.61942C16.3848 5.19335 16.3909 4.67148 16.3397 4.17473C16.2897 3.69004 16.1773 3.1481 15.9528 2.72256C15.4774 1.82138 14.8232 1.18851 14.036 1.03498C13.1987 0.871657 12.4778 1.29768 12.0464 1.95052C11.6856 2.49651 11.5449 2.952 11.4166 3.36742L11.4125 3.3806C11.2892 3.7797 11.1678 4.17175 10.8559 4.72428C10.3427 5.6333 9.92399 6.10477 9.36125 6.59814C9.06949 6.85394 8.76549 7.01487 8.5 7.10803V20.7775C9.28643 20.7944 10.1283 20.8051 11 20.8051C13.3441 20.8051 15.3225 20.7286 16.627 20.6598C17.9072 20.5923 19.1311 19.947 19.7997 18.7744C20.4316 17.6662 21.241 15.9885 21.7288 13.9823C22.1856 12.1035 22.3761 10.576 22.4535 9.53748C22.5487 8.25929 21.5102 7.30272 20.3186 7.30272ZM7 20.7367V7.30272H5.30231C3.75929 7.30272 2.38772 8.40358 2.21213 10.001C2.10046 11.0169 2 12.338 2 13.8051C2 15.3918 2.1175 16.8638 2.23926 17.9645C2.40726 19.4833 3.65916 20.5926 5.15251 20.6631C5.68428 20.6881 6.30812 20.7141 7 20.7367Z",fill:"currentColor"})}),Gs=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M7.75 15.7924H5.50754C4.19528 15.7924 3.07149 14.8634 2.93583 13.5582C2.83553 12.5931 2.75 11.3779 2.75 10.04C2.75 8.57905 2.85198 7.21396 2.96382 6.15611C3.096 4.90602 4.12618 3.97949 5.38194 3.92221C6.80307 3.85738 8.80784 3.78998 11 3.78998C13.2622 3.78998 15.1814 3.86176 16.4758 3.92842C17.6066 3.98664 18.6487 4.55282 19.2035 5.53982C19.8036 6.6074 20.5476 8.17936 21 10.04C21.4121 11.7348 21.6012 13.1326 21.6865 14.1258C21.7665 15.057 21.0147 15.7924 20.08 15.7924H15.0977C15.0977 15.7924 15.6641 17.1729 15.8359 18.325C15.9633 19.1785 15.9529 19.9935 15.5391 20.778C14.6937 22.3807 13.268 22.1781 12.6722 21.4811C11.9655 20.6545 12.096 20.0582 11.3909 18.8093C10.8353 17.8251 10.3317 17.2502 9.70685 16.7024C8.97626 16.0618 8.3125 15.7924 7.75 15.7924ZM7.75 15.7924V3.90875",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"})}),Sd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M3.01393 8.85524C3.12732 8.19519 3.71174 7.75 4.38146 7.75H6.19766C6.87887 7.75 7.5398 7.51816 8.07174 7.09261L12.313 3.69963C13.2951 2.91392 14.75 3.61359 14.75 4.87135C14.75 9.74016 14.75 14.2598 14.75 19.1287C14.75 20.3864 13.2951 21.0861 12.313 20.3004L8.07174 16.9074C7.5398 16.4818 6.87887 16.25 6.19766 16.25H4.38145C3.71174 16.25 3.12732 15.8048 3.01393 15.1448C2.88446 14.3912 2.74999 13.2964 2.75 12C2.75001 10.7036 2.88447 9.60884 3.01393 8.85524Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M19.9629 5.32216C20.3411 5.00001 20.909 5.04487 21.2315 5.42275C24.4558 9.20564 24.4556 14.7931 21.2315 18.5761C20.909 18.9543 20.3412 18.9999 19.9629 18.6776C19.5848 18.3552 19.5392 17.7873 19.8613 17.4091C22.5122 14.299 22.512 9.70189 19.8613 6.59169C19.539 6.21347 19.5848 5.64462 19.9629 5.32216ZM17.1543 8.1249C17.5511 7.82576 18.1158 7.90486 18.415 8.30165C20.0619 10.4857 20.0611 13.5142 18.4141 15.6981C18.1148 16.0946 17.551 16.1738 17.1543 15.8749C16.7575 15.5757 16.6785 15.011 16.9775 14.6142C18.1405 13.0718 18.1405 10.928 16.9775 9.38564C16.6783 8.98879 16.7575 8.42418 17.1543 8.1249Z",fill:"currentColor"})]}),yi=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M3.75 15.25L11.1161 7.88388C11.6043 7.39573 12.3957 7.39573 12.8839 7.88388L20.25 15.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),ki=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M11.6773 3.19182C13.5908 1.27833 16.6934 1.27836 18.607 3.19182C20.5205 5.10537 20.5205 8.20794 18.607 10.1215L12.5972 16.1313V16.1323L11.5367 17.1928C10.4041 18.3253 8.56665 18.3253 7.43413 17.1928C6.3019 16.0603 6.30184 14.2237 7.43413 13.0912L14.5054 6.01995C14.8569 5.66857 15.4274 5.66859 15.7789 6.01995C16.1303 6.37139 16.1303 6.94191 15.7789 7.29338L8.70756 14.3647C8.27822 14.7942 8.27828 15.4898 8.70756 15.9194C9.13714 16.3489 9.83365 16.3489 10.2632 15.9194L11.3228 14.8588L17.3335 8.84807C18.5441 7.63744 18.5441 5.67587 17.3335 4.46526C16.1229 3.25474 14.1613 3.25471 12.9507 4.46526L8.00053 9.41448L5.87944 11.5365C3.88791 13.5282 3.88782 16.7568 5.87944 18.7485C7.87108 20.7398 11.0998 20.7399 13.0914 18.7485L20.1626 11.6772C20.5141 11.3258 21.0846 11.3257 21.4361 11.6772C21.7872 12.0286 21.7874 12.5992 21.4361 12.9506L14.3648 20.0219C11.6702 22.7163 7.30059 22.7162 4.606 20.0219C1.91143 17.3273 1.91153 12.9577 4.606 10.2631L6.7271 8.14104L11.6773 3.19182Z",fill:"currentColor"})}),Pd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"8.5",cy:"9.5",r:"1.75",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M12 4.24756C9.45718 4.24756 7.23766 4.37688 5.67027 4.50398C4.23213 4.6206 3.10221 5.72782 2.97301 7.16489C2.85763 8.44834 2.75 10.1427 2.75 11.9976C2.75 13.8525 2.85763 15.5468 2.97301 16.8302C3.10221 18.2673 4.23213 19.3745 5.67027 19.4911C7.23766 19.6182 9.45718 19.7476 12 19.7476C14.5431 19.7476 16.7628 19.6182 18.3302 19.4911C19.7681 19.3745 20.8979 18.2676 21.0271 16.8307C21.1424 15.5478 21.25 13.8538 21.25 11.9976C21.25 10.1414 21.1424 8.44735 21.0271 7.1644C20.8979 5.72755 19.7681 4.62063 18.3302 4.50402C16.7628 4.3769 14.5431 4.24756 12 4.24756Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M5.75 16.7526L7.31102 15.1918C7.96841 14.5345 9.03424 14.5348 9.69124 15.1925C10.2753 15.7771 11.2227 15.7774 11.8071 15.193L13.9771 13.0229C14.6801 12.3199 15.8199 12.32 16.5228 13.023L18.25 14.7505",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Mt=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M3 12H21M12 3C14.1162 5.52153 15.2762 8.70813 15.2762 12C15.2762 15.2919 14.1162 18.4785 12 21C9.8838 18.4785 8.72381 15.2919 8.72381 12C8.72381 8.70813 9.8838 5.52153 12 3Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ko=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Le=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M19.25 8.34961C19.7471 8.34961 20.1504 8.75294 20.1504 9.25V17.4043C20.1504 19.4775 18.608 21.2658 16.4951 21.4424C15.186 21.5518 13.5724 21.6504 12 21.6504C10.4276 21.6504 8.81396 21.5518 7.50488 21.4424C5.392 21.2658 3.84961 19.4775 3.84961 17.4043V9.25C3.84961 8.75294 4.25294 8.34961 4.75 8.34961C5.24706 8.34961 5.65039 8.75294 5.65039 9.25V17.4043C5.65039 18.5889 6.5208 19.5536 7.6543 19.6484C8.93581 19.7556 10.4957 19.8496 12 19.8496C13.5043 19.8496 15.0642 19.7556 16.3457 19.6484C17.4792 19.5536 18.3496 18.5888 18.3496 17.4043V9.25C18.3496 8.75294 18.7529 8.34961 19.25 8.34961ZM9.5 10.3496C9.99706 10.3496 10.4004 10.7529 10.4004 11.25V14.75C10.4004 15.2471 9.99706 15.6504 9.5 15.6504C9.00294 15.6504 8.59961 15.2471 8.59961 14.75V11.25C8.59961 10.7529 9.00294 10.3496 9.5 10.3496ZM14.5 10.3496C14.9971 10.3496 15.4004 10.7529 15.4004 11.25V14.75C15.4004 15.2471 14.9971 15.6504 14.5 15.6504C14.0029 15.6504 13.5996 15.2471 13.5996 14.75V11.25C13.5996 10.7529 14.0029 10.3496 14.5 10.3496ZM14 2.34961C15.4636 2.34961 16.6504 3.53645 16.6504 5V5.34961H21.25C21.7471 5.34961 22.1504 5.75294 22.1504 6.25C22.1504 6.74706 21.7471 7.15039 21.25 7.15039H2.75C2.25294 7.15039 1.84961 6.74706 1.84961 6.25C1.84961 5.75294 2.25294 5.34961 2.75 5.34961H7.34961V5C7.34961 3.53645 8.53645 2.34961 10 2.34961H14ZM10 4.15039C9.53056 4.15039 9.15039 4.53056 9.15039 5V5.34961H14.8496V5C14.8496 4.53056 14.4694 4.15039 14 4.15039H10Z",fill:"currentColor"})}),Qr=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M12 7.25V12.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M12 15.75V16.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),fn=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M7.75513 12.4301L9.78806 14.463C10.1298 14.8047 10.6838 14.8047 11.0255 14.463L16.2404 9.24807",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),ur=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M10.268 4.25C11.0378 2.91666 12.9623 2.91667 13.7321 4.25L20.8768 16.625C21.6466 17.9583 20.6843 19.625 19.1447 19.625H4.85529C3.31569 19.625 2.35344 17.9583 3.12324 16.625L10.268 4.25Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M12 9V13",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M12 16.25V16.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),jo=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M15.1835 8.81633L12 11.9998M8.81648 15.1834L12 11.9998M15.1835 15.1834L12 11.9998M8.81648 8.81633L12 11.9998",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Kt=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M14.75 20.25L7.38388 12.8839C6.89573 12.3957 6.89573 11.6043 7.38388 11.1161L14.75 3.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),mr=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M12 2L4 6V12C4 17 7.5 19.5 12 21C16.5 19.5 20 17 20 12V6L12 2Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Rd=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Td=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2v-4"}),jsx("path",{d:"M9 3h6"}),jsx("path",{d:"M15 21h4a2 2 0 0 0 2-2v-4"}),jsx("path",{d:"M3 9V5a2 2 0 0 1 2-2h4"})]})}),cw=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"})}),pw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"3.2",fill:"currentColor"}),jsx("circle",{className:"dot",cx:"20",cy:"8",r:"3.4",fill:"currentColor"}),jsx("circle",{cx:"15.6",cy:"3.9",r:"1.6",fill:"currentColor",opacity:".45"}),jsx("circle",{cx:"9.8",cy:"3.3",r:"1.2",fill:"currentColor",opacity:".28"})]}),Md=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M12 20.3496C12.497 20.3496 12.9004 20.753 12.9004 21.25V22.75C12.9004 23.2471 12.4971 23.6504 12 23.6504C11.5029 23.6504 11.0996 23.2471 11.0996 22.75V21.25C11.0996 20.753 11.503 20.3496 12 20.3496ZM4.82227 17.9043C5.17373 17.5528 5.74423 17.5529 6.0957 17.9043C6.44718 18.2558 6.44718 18.8263 6.0957 19.1777L5.03516 20.2383C4.68367 20.5896 4.11315 20.5897 3.76172 20.2383C3.41032 19.8868 3.41037 19.3163 3.76172 18.9648L4.82227 17.9043ZM17.9043 17.9043C18.2558 17.5528 18.8263 17.5528 19.1777 17.9043L20.2383 18.9648C20.5896 19.3163 20.5897 19.8869 20.2383 20.2383C19.8869 20.5897 19.3163 20.5896 18.9648 20.2383L17.9043 19.1777C17.5528 18.8263 17.5528 18.2558 17.9043 17.9043ZM2.75 11.0996C3.24706 11.0996 3.65039 11.5029 3.65039 12C3.65039 12.4971 3.24706 12.9004 2.75 12.9004H1.25C0.752944 12.9004 0.349609 12.4971 0.349609 12C0.349609 11.5029 0.752944 11.0996 1.25 11.0996H2.75ZM22.75 11.0996C23.2471 11.0996 23.6504 11.5029 23.6504 12C23.6504 12.4971 23.2471 12.9004 22.75 12.9004H21.25C20.7529 12.9004 20.3496 12.4971 20.3496 12C20.3496 11.5029 20.7529 11.0996 21.25 11.0996H22.75ZM3.76172 3.76172C4.11313 3.41031 4.68367 3.41043 5.03516 3.76172L6.0957 4.82227C6.44718 5.17374 6.44718 5.74423 6.0957 6.0957C5.74423 6.44718 5.17374 6.44718 4.82227 6.0957L3.76172 5.03516C3.41043 4.68367 3.41031 4.11313 3.76172 3.76172ZM18.9648 3.76172C19.3163 3.41047 19.8869 3.41035 20.2383 3.76172C20.5897 4.11312 20.5895 4.68367 20.2383 5.03516L19.1777 6.0957C18.8263 6.44718 18.2558 6.44718 17.9043 6.0957C17.5529 5.74423 17.5528 5.17373 17.9043 4.82227L18.9648 3.76172ZM12 0.349609C12.497 0.349609 12.9004 0.752972 12.9004 1.25V2.75C12.9004 3.24706 12.4971 3.65039 12 3.65039C11.5029 3.65039 11.0996 3.24706 11.0996 2.75V1.25C11.0996 0.752972 11.503 0.349609 12 0.349609Z",fill:"currentColor"})]}),_d=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M11.471 3.71264L10.5946 3.5075L11.471 3.71264ZM20.2662 11.2159L20.6079 12.0485L20.2662 11.2159ZM20.9927 11.6337L20.0934 11.6697L20.9927 11.6337ZM20.2662 11.2159L19.9245 10.3833C19.2705 10.6516 18.5537 10.8 17.8 10.8V11.7V12.6C18.7921 12.6 19.7408 12.4043 20.6079 12.0485L20.2662 11.2159ZM17.8 11.7V10.8C14.7072 10.8 12.2 8.29284 12.2 5.20005H11.3H10.4C10.4 9.28695 13.7131 12.6 17.8 12.6V11.7ZM11.3 5.20005H12.2C12.2 4.75784 12.2511 4.32871 12.3473 3.91779L11.471 3.71264L10.5946 3.5075C10.4672 4.05194 10.4 4.61872 10.4 5.20005H11.3ZM3 12.0001H3.9C3.9 7.84877 7.02373 4.42573 11.0484 3.95532L10.9439 3.06141L10.8395 2.1675C5.9183 2.74268 2.1 6.92484 2.1 12.0001H3ZM12 21.0001V20.1001C7.52649 20.1001 3.9 16.4736 3.9 12.0001H3H2.1C2.1 17.4677 6.53238 21.9001 12 21.9001V21.0001ZM21 12.0001H20.1C20.1 16.4736 16.4735 20.1001 12 20.1001V21.0001V21.9001C17.4676 21.9001 21.9 17.4677 21.9 12.0001H21ZM20.9927 11.6337L20.0934 11.6697C20.0978 11.7792 20.1 11.8894 20.1 12.0001H21H21.9C21.9 11.8654 21.8973 11.7312 21.892 11.5977L20.9927 11.6337ZM11.471 3.71264L12.3473 3.91779C12.539 3.09866 11.939 2.03899 10.8395 2.1675L10.9439 3.06141L11.0484 3.95532C10.8786 3.97518 10.7345 3.89151 10.6611 3.79788C10.5948 3.71339 10.5711 3.60795 10.5946 3.5075L11.471 3.71264ZM20.2662 11.2159L20.6079 12.0485C20.5127 12.0875 20.4048 12.0811 20.3105 12.0288C20.2058 11.9707 20.1003 11.8409 20.0934 11.6697L20.9927 11.6337L21.892 11.5977C21.8475 10.4881 20.7028 10.0639 19.9245 10.3833L20.2662 11.2159Z",fill:"currentColor"})}),Ir=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsx("path",{d:"M14.5 4v16"})]}),jsx("circle",{className:"dot",cx:"17.75",cy:"8.2",r:"1.5",fill:"currentColor"})]}),uw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.8313 1.67432C14.747 1.71336 16.4932 1.88083 17.9045 2.06982C20.1001 2.36402 21.7902 4.0421 22.0911 6.23682C22.3074 7.81729 22.4954 9.81801 22.4954 12.0015L22.4866 12.811C22.4479 14.6777 22.2804 16.3815 22.0911 17.7642L22.0588 17.9683C21.6841 20.0623 20.0315 21.6462 17.9045 21.9312L17.2795 22.0103C15.7759 22.1912 13.9613 22.3354 12.0002 22.3354L11.1692 22.3267C9.52706 22.2931 8.00975 22.1652 6.72095 22.0103L6.09595 21.9312C3.96873 21.6462 2.31538 20.0624 1.94068 17.9683L1.90845 17.7642C1.71912 16.3815 1.55277 14.6777 1.51392 12.811L1.50513 12.0015C1.50513 9.81803 1.69203 7.81729 1.90845 6.23682C2.20934 4.04199 3.90019 2.36396 6.09595 2.06982C7.70896 1.85382 9.75909 1.66553 12.0002 1.66553L12.8313 1.67432ZM12.0002 3.26514C11.1522 3.26514 10.3316 3.2944 9.55298 3.34131C9 3.37462 8.43987 3.42015 7.95337 3.46729C7.36673 3.52412 6.81573 3.58789 6.30884 3.65576C4.82278 3.85477 3.69702 4.97612 3.49439 6.45459C3.28539 7.98098 3.10474 9.9068 3.10474 12.0015C3.1048 14.0957 3.28542 16.0201 3.49439 17.5464C3.69702 19.0249 4.82276 20.1462 6.30884 20.3452C6.8157 20.413 7.95337 20.5327 7.95337 20.5327C7.95337 20.5327 9.08598 20.6587 9.55298 20.6587C10.3316 20.7055 11.1521 20.7358 12.0002 20.7358C14.1545 20.7358 16.1315 20.5542 17.6917 20.3452C19.1778 20.1461 20.3033 19.0249 20.5061 17.5464C20.7149 16.0201 20.8948 14.0957 20.8948 12.0015C20.8948 9.90681 20.7151 7.98098 20.5061 6.45459C20.3033 4.97614 19.1778 3.85479 17.6917 3.65576C16.1315 3.44684 14.1545 3.26514 12.0002 3.26514Z",fill:"currentColor"}),jsx("path",{d:"M5.762 6.71881C5.794 6.3112 6.13465 6 6.54351 6C7.00472 6 7.36833 6.39248 7.33508 6.8525C7.24687 8.07291 7.09999 10.3523 7.09999 12C7.09999 13.6477 7.24687 15.9271 7.33508 17.1475C7.36833 17.6075 7.00472 18 6.54351 18C6.13465 18 5.794 17.6888 5.762 17.2812C5.66928 16.1002 5.5 13.7099 5.5 12C5.5 10.2901 5.66928 7.89979 5.762 6.71881Z",fill:"currentColor"})]}),Jr=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M8 5V19M16 5V19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Co=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M18 11.2505L12.5303 16.7197C12.2374 17.0126 11.7626 17.0126 11.4697 16.7197L6 11.2505",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M12 16.75L12 3.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M18.75 19.75L5.25 19.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ci=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 5V19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M19 12L12 19L5 12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ar=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M4.5 5.69359V18.1519C4.5 19.613 5.64231 20.8186 7.10221 20.8779C8.60598 20.9391 10.4924 21.0005 12 21.0005C13.5076 21.0005 15.394 20.9391 16.8978 20.8779C18.3577 20.8186 19.5 19.613 19.5 18.1519V5.69359C19.5 4.29722 18.4513 3.14607 17.0561 3.08945C15.8692 3.04128 14.2113 3.00049 12 3.00049C9.78873 3.00049 8.13082 3.04128 6.94388 3.08945C5.54866 3.14607 4.5 4.29722 4.5 5.69359Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M8 3.25L8.64095 5.01261C8.85651 5.6054 9.41988 6 10.0506 6H13.9494C14.5801 6 15.1435 5.6054 15.359 5.01261L16 3.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M14 15.0996C14.4971 15.0996 14.9004 15.5029 14.9004 16C14.9004 16.4971 14.4971 16.9004 14 16.9004H8C7.50294 16.9004 7.09961 16.4971 7.09961 16C7.09961 15.5029 7.50294 15.0996 8 15.0996H14ZM16 12.0996C16.4971 12.0996 16.9004 12.5029 16.9004 13C16.9004 13.4971 16.4971 13.9004 16 13.9004H8C7.50294 13.9004 7.09961 13.4971 7.09961 13C7.09961 12.5029 7.50294 12.0996 8 12.0996H16ZM16 9.09961C16.4971 9.09961 16.9004 9.50294 16.9004 10C16.9004 10.4971 16.4971 10.9004 16 10.9004H8C7.50294 10.9004 7.09961 10.4971 7.09961 10C7.09961 9.50294 7.50294 9.09961 8 9.09961H16Z",fill:"currentColor"})]}),mw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M17 4H7C5.34315 4 4 5.34315 4 7V17C4 18.6569 5.34315 20 7 20H17C18.6569 20 20 18.6569 20 17V7C20 5.34315 18.6569 4 17 4Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M10 4V20",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),fw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M20.4867 10.7184C20.4953 11.1347 20.5 11.5627 20.5 12.0002C20.5 14.1939 20.3812 16.1498 20.2594 17.5784C20.1367 19.0176 19.0174 20.137 17.5782 20.2597C16.1494 20.3814 14.1935 20.5002 12 20.5002C9.80648 20.5002 7.85056 20.3814 6.42181 20.2597C4.9826 20.137 3.86325 19.0176 3.74057 17.5784C3.61879 16.1498 3.5 14.1939 3.5 12.0002C3.5 9.80658 3.61879 7.85073 3.74057 6.42205C3.86325 4.98284 4.9826 3.86351 6.42181 3.74083C7.85056 3.61905 9.80648 3.50024 12 3.50024C12.4375 3.50024 12.8656 3.50497 13.2819 3.5135",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M16.4387 4.06176L9.94201 10.5582C9.66104 10.8392 9.50303 11.2202 9.50266 11.6175L9.50068 13.7491C9.50029 14.1636 9.83616 14.4998 10.2506 14.4998L12.3783 14.4999C12.7763 14.5 13.158 14.3418 13.4394 14.0602L19.9357 7.55968C20.5209 6.97408 20.521 6.02507 19.936 5.43932L18.5606 4.06239C17.9749 3.47603 17.0247 3.47575 16.4387 4.06176Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),Ld=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"m7.5 4.27 9 5.15"}),jsx("path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"}),jsx("path",{d:"m3.3 7 8.7 5 8.7-5"}),jsx("path",{d:"M12 22V12"})]})}),gw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M15.5 8.5L13.5 13.5L8.5 15.5L10.5 10.5L15.5 8.5Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),qe=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M8.23047 3.40271C9.29184 3.35039 10.3045 3.81034 10.9756 4.6156L12.0918 5.95447C12.301 6.20538 12.6104 6.34998 12.9365 6.34998H17.9336C19.9899 6.34998 21.7739 7.86888 21.959 9.9701C22.0613 11.1322 22.1504 12.5235 22.1504 13.8597C22.1504 15.0968 22.0741 16.2025 21.9805 17.0951C21.7899 18.9099 20.3274 20.2284 18.5645 20.3754C16.9713 20.5081 14.6609 20.6478 12 20.6478C9.42776 20.6478 7.18337 20.5176 5.59766 20.389C3.72835 20.2375 2.24531 18.79 2.07617 16.9115C1.95906 15.6088 1.84964 13.8864 1.84961 11.9984C1.84961 10.1452 1.95568 8.45138 2.07031 7.1576C2.24068 5.23493 3.77585 3.77456 5.65625 3.59119C6.48059 3.51081 7.23178 3.45195 8.23047 3.40271ZM8.31934 5.20056C7.35212 5.24825 6.62919 5.30526 5.83008 5.38318C4.77098 5.48669 3.95379 6.29651 3.86328 7.3158C3.75206 8.57106 3.65039 10.2107 3.65039 11.9984C3.65042 13.8196 3.75552 15.4865 3.86914 16.7504C3.95888 17.7455 4.73657 18.5125 5.74316 18.5941C7.29221 18.7197 9.48678 18.848 12 18.848C14.5999 18.848 16.8592 18.711 18.415 18.5814C19.3724 18.5015 20.0957 17.8076 20.1904 16.9076C20.2786 16.0667 20.3496 15.0242 20.3496 13.8597C20.3496 12.5958 20.2658 11.2617 20.166 10.1283C20.0674 9.00878 19.1105 8.15076 17.9336 8.15076H12.9365C12.0757 8.15076 11.2598 7.76769 10.709 7.10681L9.59277 5.76795C9.27433 5.38581 8.80174 5.17678 8.31934 5.20056ZM19.25 3.59998C19.7471 3.59998 20.1504 4.00331 20.1504 4.50037C20.1502 4.99731 19.747 5.40076 19.25 5.40076H14.25C13.753 5.40076 13.3498 4.99731 13.3496 4.50037C13.3496 4.00331 13.7529 3.59998 14.25 3.59998H19.25Z",fill:"currentColor"})}),Ni=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M5 10V19C5 19.2652 5.10536 19.5196 5.29289 19.7071C5.48043 19.8946 5.73478 20 6 20H18C18.2652 20 18.5196 19.8946 18.7071 19.7071C18.8946 19.5196 19 19.2652 19 19V10M10 14H14M3 7H21V10H3V7Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Dd=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M3.24984 4.34924C2.75296 4.34931 2.34964 4.75279 2.34945 5.24963V18.7496C2.34945 19.2466 2.75284 19.65 3.24984 19.65C3.74689 19.65 4.15023 19.2467 4.15023 18.7496V5.24963C4.15003 4.75275 3.74677 4.34924 3.24984 4.34924ZM14.2508 5.49182C13.8975 5.14266 13.3278 5.14562 12.9784 5.49866C12.629 5.85192 12.6322 6.42155 12.9852 6.77112L17.3602 11.0992H6.05062C5.55371 11.0992 5.15047 11.5028 5.15023 11.9996C5.15033 12.4966 5.55363 12.9 6.05062 12.9H17.3602L12.9852 17.2281C12.632 17.5776 12.6291 18.1473 12.9784 18.5006C13.3279 18.8538 13.8975 18.8569 14.2508 18.5074L19.7254 13.0914C20.3327 12.4902 20.3327 11.509 19.7254 10.9078L14.2508 5.49182Z",fill:"currentColor"})}),Ed=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("circle",{cx:"12.1",cy:"16.526",r:"0.9",fill:"currentColor"}),jsx("path",{d:"M10 9.75C10 8.64543 10.8954 7.75 12 7.75C13.1046 7.75 14 8.64543 14 9.75C14 10.8125 13.2656 11.2422 12.6328 11.875C12 12.5078 12 12.9609 12 13.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),vw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M6 9a6 6 0 1 1 12 0c0 5.25 2 7.5 2 7.5H4S6 14.25 6 9",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M10.35 20.4a1.9 1.9 0 0 0 3.3 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),No=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M9.5 2.8h5"}),jsx("circle",{cx:"12",cy:"14",r:"7.6"}),jsx("path",{d:"M12 14 14.9 11.1"})]}),jsx("circle",{className:"dot",cx:"15.4",cy:"10.6",r:"1.9",fill:"currentColor"})]}),Si=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M10.2803 4.56892C11.3682 4.05084 12.6318 4.05084 13.7197 4.56892L20.4144 7.75685C21.2505 8.15499 21.2505 9.345 20.4144 9.74315L13.7197 12.9311C12.6318 13.4492 11.3682 13.4492 10.2803 12.9311L3.58561 9.74315C2.74951 9.34501 2.74951 8.155 3.58561 7.75685L10.2803 4.56892Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M2.82568 13.1299L10.2803 16.6797C11.3683 17.1978 12.6318 17.1978 13.7198 16.6797L21.1744 13.1299",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M2.82568 16.63L10.2803 20.1798C11.3683 20.6979 12.6318 20.6979 13.7198 20.1798L21.1744 16.63",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),fr=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M20.2498 10.2677C21.5831 11.0375 21.5831 12.962 20.2498 13.7318L9.37512 20.0103C8.04179 20.7801 6.37512 19.8178 6.37512 18.2782L6.37512 5.72128C6.37512 4.18168 8.04179 3.21943 9.37512 3.98923L20.2498 10.2677Z",fill:"currentColor",stroke:"currentColor"})}),ea=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M20.25 18.0612V12.25C20.25 10.8693 19.1307 9.75 17.75 9.75H6.24998C4.86927 9.75 3.74998 10.8693 3.74998 12.25V18.0612C3.74998 19.3142 4.67813 20.3692 5.92643 20.4778C7.44332 20.6097 9.61644 20.75 12 20.75C14.3835 20.75 16.5566 20.6097 18.0735 20.4778C19.3218 20.3692 20.25 19.3142 20.25 18.0612Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M16.5 9.75V7.25C16.5 4.76472 14.4853 2.75 12 2.75C9.5147 2.75 7.49998 4.76472 7.49998 7.25V9.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Aa=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 4.25C9.45718 4.25 7.23766 4.37932 5.67027 4.50642C4.23213 4.62304 3.10221 5.73027 2.97301 7.16733C2.85763 8.45079 2.75 10.1451 2.75 12C2.75 13.8549 2.85763 15.5492 2.97301 16.8327C3.10221 18.2697 4.23213 19.377 5.67027 19.4936C7.23766 19.6207 9.45718 19.75 12 19.75C14.5431 19.75 16.7628 19.6207 18.3302 19.4935C19.7681 19.3769 20.8979 18.27 21.0271 16.8332C21.1424 15.5502 21.25 13.8562 21.25 12C21.25 10.1438 21.1424 8.44979 21.0271 7.16684C20.8979 5.72999 19.7681 4.62307 18.3302 4.50646C16.7628 4.37934 14.5431 4.25 12 4.25Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M18 9.75L12.832 13.1953C12.3282 13.5312 11.6718 13.5312 11.1679 13.1953L6 9.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),bw=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M9.25 17.0996C9.74706 17.0996 10.1504 17.5029 10.1504 18C10.1504 18.4971 9.74706 18.9004 9.25 18.9004H3.75C3.25294 18.9004 2.84961 18.4971 2.84961 18C2.84961 17.5029 3.25294 17.0996 3.75 17.0996H9.25ZM14.25 11.0996C14.7471 11.0996 15.1504 11.5029 15.1504 12C15.1504 12.4971 14.7471 12.9004 14.25 12.9004H3.75C3.25294 12.9004 2.84961 12.4971 2.84961 12C2.84961 11.5029 3.25294 11.0996 3.75 11.0996H14.25ZM20.25 5.09961C20.7471 5.09961 21.1504 5.50294 21.1504 6C21.1504 6.49706 20.7471 6.90039 20.25 6.90039H3.75C3.25294 6.90039 2.84961 6.49706 2.84961 6C2.84961 5.50294 3.25294 5.09961 3.75 5.09961H20.25Z",fill:"currentColor"})}),Id=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M17.75 8.09961C18.2471 8.09961 18.6504 8.50294 18.6504 9V16.793L20.6641 15.0664C21.0415 14.7429 21.6101 14.7867 21.9336 15.1641C22.2571 15.5415 22.2133 16.1101 21.8359 16.4336L18.748 19.0801L18.6045 19.1855C17.8632 19.651 16.8496 19.1273 16.8496 18.2061V9C16.8496 8.50294 17.2529 8.09961 17.75 8.09961ZM14.75 17.0996C15.2471 17.0996 15.6504 17.5029 15.6504 18C15.6504 18.4971 15.2471 18.9004 14.75 18.9004H3.75C3.25294 18.9004 2.84961 18.4971 2.84961 18C2.84961 17.5029 3.25294 17.0996 3.75 17.0996H14.75ZM14.75 11.0996C15.2471 11.0996 15.6504 11.5029 15.6504 12C15.6504 12.4971 15.2471 12.9004 14.75 12.9004H3.75C3.25294 12.9004 2.84961 12.4971 2.84961 12C2.84961 11.5029 3.25294 11.0996 3.75 11.0996H14.75ZM20.25 5.09961C20.7471 5.09961 21.1504 5.50294 21.1504 6C21.1504 6.49706 20.7471 6.90039 20.25 6.90039H3.75C3.25294 6.90039 2.84961 6.49706 2.84961 6C2.84961 5.50294 3.25294 5.09961 3.75 5.09961H20.25Z",fill:"currentColor"})}),ww=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M2.75 14.2501C2.75 13.2836 3.5335 12.5001 4.5 12.5001H5.5C6.4665 12.5001 7.25 13.2836 7.25 14.2501V17.7501C7.25 18.7166 6.4665 19.5001 5.5 19.5001H4.5C3.5335 19.5001 2.75 18.7166 2.75 17.7501V14.2501Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M9.75 5.75C9.75 4.7835 10.5335 4 11.5 4H12.5C13.4665 4 14.25 4.7835 14.25 5.75V17.75C14.25 18.7165 13.4665 19.5 12.5 19.5H11.5C10.5335 19.5 9.75 18.7165 9.75 17.75V5.75Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M16.75 11C16.75 10.0335 17.5335 9.25 18.5 9.25H19.5C20.4665 9.25 21.25 10.0335 21.25 11V17.75C21.25 18.7165 20.4665 19.5 19.5 19.5H18.5C17.5335 19.5 16.75 18.7165 16.75 17.75V11Z",stroke:"currentColor",strokeWidth:"1.75"})]}),hw=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M4 14C4 11.8783 4.84285 9.84344 6.34315 8.34315C7.84344 6.84285 9.87827 6 12 6C14.1217 6 16.1566 6.84285 17.6569 8.34315C19.1571 9.84344 20 11.8783 20 14M12 14L16 10",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),xw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"14.5",cy:"9.5",r:"6.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M9.75 14.25L5.78033 18.2197C5.48744 18.5126 5.48744 18.9874 5.78033 19.2803L7.25 20.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M7.25012 16.75L9.25012 18.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),gn=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M18 4H6C4.89543 4 4 4.89543 4 6V8C4 9.10457 4.89543 10 6 10H18C19.1046 10 20 9.10457 20 8V6C20 4.89543 19.1046 4 18 4Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M18 14H6C4.89543 14 4 14.8954 4 16V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V16C20 14.8954 19.1046 14 18 14Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M8 7H8.01M8 17H8.01",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),yw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M15 7H9C7.89543 7 7 7.89543 7 9V15C7 16.1046 7.89543 17 9 17H15C16.1046 17 17 16.1046 17 15V9C17 7.89543 16.1046 7 15 7Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M4 9H7M4 15H7M17 9H20M17 15H20M9 4V7M15 4V7M9 17V20M15 17V20",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),kw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M5.25 6.10177V17.6961C5.25 19.4153 6.58845 20.8378 8.30626 20.9082C9.51092 20.9576 10.8731 21 12 21C13.1269 21 14.4891 20.9576 15.6937 20.9082C17.4116 20.8378 18.75 19.4153 18.75 17.6961V6.10177C18.75 4.46723 17.5331 3.12133 15.8996 3.06269C14.901 3.02684 13.6144 3 12 3C10.3856 3 9.09896 3.02684 8.10043 3.06269C6.46694 3.12133 5.25 4.46723 5.25 6.10177Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M10.5 6H13.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("circle",{cx:"12.1502",cy:"17.9",r:"0.9",fill:"currentColor"})]}),ku=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M5.1 7.65h13.8M5.1 12h13.8M5.1 16.35h8.4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Cu=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"4.5",y:"4.5",width:"15",height:"15",rx:"3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("circle",{cx:"9.3",cy:"9.15",r:"1.5",fill:"currentColor"}),jsx("path",{d:"M6.3 17.1l3.9-4.65 3 3 2.1-2.4 2.4 4.05",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Nu=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"4.5",y:"6",width:"15",height:"12",rx:"3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M10.5 9.6v4.8L15 12l-4.5-2.4z",fill:"currentColor"})]}),Su=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12.6 6.3L8.4 9.6H5.85v4.8H8.4l4.2 3.3z",fill:"currentColor"}),jsx("path",{d:"M16.2 9.45a3.9 3.9 0 0 1 0 5.1",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ad=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 4.24756C9.45718 4.24756 7.23766 4.37688 5.67027 4.50398C4.23213 4.6206 3.10221 5.72782 2.97301 7.16489C2.85763 8.44834 2.75 10.1427 2.75 11.9976C2.75 13.8525 2.85763 15.5468 2.97301 16.8302C3.10221 18.2673 4.23213 19.3745 5.67027 19.4911C7.23766 19.6182 9.45718 19.7476 12 19.7476C14.5431 19.7476 16.7628 19.6182 18.3302 19.4911C19.7681 19.3745 20.8979 18.2676 21.0271 16.8307C21.1424 15.5478 21.25 13.8538 21.25 11.9976C21.25 10.1414 21.1424 8.44735 21.0271 7.1644C20.8979 5.72755 19.7681 4.62063 18.3302 4.50402C16.7628 4.3769 14.5431 4.24756 12 4.24756Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M6.75 10.8496C7.38513 10.8496 7.90039 11.3649 7.90039 12C7.90039 12.6351 7.38513 13.1504 6.75 13.1504C6.11487 13.1504 5.59961 12.6351 5.59961 12C5.59961 11.3649 6.11487 10.8496 6.75 10.8496ZM10.25 10.8496C10.8851 10.8496 11.4004 11.3649 11.4004 12C11.4004 12.6351 10.8851 13.1504 10.25 13.1504C9.61487 13.1504 9.09961 12.6351 9.09961 12C9.09961 11.3649 9.61487 10.8496 10.25 10.8496ZM13.75 10.8496C14.3851 10.8496 14.9004 11.3649 14.9004 12C14.9004 12.6351 14.3851 13.1504 13.75 13.1504C13.1149 13.1504 12.5996 12.6351 12.5996 12C12.5996 11.3649 13.1149 10.8496 13.75 10.8496ZM17.25 10.8496C17.8851 10.8496 18.4004 11.3649 18.4004 12C18.4004 12.6351 17.8851 13.1504 17.25 13.1504C16.6149 13.1504 16.0996 12.6351 16.0996 12C16.0996 11.3649 16.6149 10.8496 17.25 10.8496ZM6.75 7.34961C7.38513 7.34961 7.90039 7.86487 7.90039 8.5C7.90039 9.13513 7.38513 9.65039 6.75 9.65039C6.11487 9.65039 5.59961 9.13513 5.59961 8.5C5.59961 7.86487 6.11487 7.34961 6.75 7.34961ZM10.25 7.34961C10.8851 7.34961 11.4004 7.86487 11.4004 8.5C11.4004 9.13513 10.8851 9.65039 10.25 9.65039C9.61487 9.65039 9.09961 9.13513 9.09961 8.5C9.09961 7.86487 9.61487 7.34961 10.25 7.34961ZM13.75 7.34961C14.3851 7.34961 14.9004 7.86487 14.9004 8.5C14.9004 9.13513 14.3851 9.65039 13.75 9.65039C13.1149 9.65039 12.5996 9.13513 12.5996 8.5C12.5996 7.86487 13.1149 7.34961 13.75 7.34961ZM17.25 7.34961C17.8851 7.34961 18.4004 7.86487 18.4004 8.5C18.4004 9.13513 17.8851 9.65039 17.25 9.65039C16.6149 9.65039 16.0996 9.13513 16.0996 8.5C16.0996 7.86487 16.6149 7.34961 17.25 7.34961Z",fill:"currentColor"}),jsx("rect",{x:"6.25",y:"15.25",width:"11.5",height:"1.5",rx:"0.75",fill:"currentColor"})]}),Bd=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M8 11V6C8 5.46957 8.21071 4.96086 8.58579 4.58579C8.96086 4.21071 9.46957 4 10 4C10.5304 4 11.0391 4.21071 11.4142 4.58579C11.7893 4.96086 12 5.46957 12 6V10V5C12 4.46957 12.2107 3.96086 12.5858 3.58579C12.9609 3.21071 13.4696 3 14 3C14.5304 3 15.0391 3.21071 15.4142 3.58579C15.7893 3.96086 16 4.46957 16 5V12M16 12V8C16 7.46957 16.2107 6.96086 16.5858 6.58579C16.9609 6.21071 17.4696 6 18 6C18.5304 6 19.0391 6.21071 19.4142 6.58579C19.7893 6.96086 20 7.46957 20 8V14C20 15.8565 19.2625 17.637 17.9497 18.9497C16.637 20.2625 14.8565 21 13 21C11.1435 21 9.36301 20.2625 8.05025 18.9497C6.7375 17.637 6 15.8565 6 14V12C6 11.4696 6.21071 10.9609 6.58579 10.5858C6.96086 10.2107 7.46957 10 8 10L16 12Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),So=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M5.5 7.39185L2.06301 11.3781C1.73949 11.7534 1.7395 12.3089 2.06301 12.6841L5.5 16.6704",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M18.5 16.6704L21.937 12.6841C22.2605 12.3089 22.2605 11.7533 21.937 11.3781L18.5 7.39183",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M14.75 5L9.25 19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),Go=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M9 4H5C4.73478 4 4.48043 4.10536 4.29289 4.29289C4.10536 4.48043 4 4.73478 4 5V9M15 4H19C19.2652 4 19.5196 4.10536 19.7071 4.29289C19.8946 4.48043 20 4.73478 20 5V9M9 20H5C4.73478 20 4.48043 19.8946 4.29289 19.7071C4.10536 19.5196 4 19.2652 4 19V15M15 20H19C19.2652 20 19.5196 19.8946 19.7071 19.7071C19.8946 19.5196 20 19.2652 20 19V15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Po=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M6 15.4V4"}),jsx("path",{d:"M18 8.6a9 9 0 0 1-9 9"}),jsx("circle",{cx:"18",cy:"6",r:"2.4"})]}),jsx("circle",{className:"dot",cx:"6",cy:"18",r:"2.9",fill:"currentColor"})]}),Cw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M8.5 9.5L12 11.5M12 11.5V15.5M12 11.5L15.5 9.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M11.0382 3.02753C11.6373 2.69893 12.3627 2.69893 12.9618 3.02753L19.622 6.68056C20.2623 7.03172 20.6603 7.7039 20.6603 8.43412V15.5659C20.6603 16.2961 20.2623 16.9683 19.622 17.3194L12.9618 20.9725C12.3627 21.3011 11.6373 21.3011 11.0382 20.9725L4.37795 17.3194C3.73771 16.9683 3.33975 16.2961 3.33975 15.5659V8.43412C3.33975 7.7039 3.73771 7.03172 4.37795 6.68056L11.0382 3.02753Z",stroke:"currentColor",strokeWidth:"1.75"})]}),Nw=un,gr=Ea,Sw=Ea,Ba=fn,Pw=Xr,Rw=Qr,Tw=mn,Od=Gs,Vd=ur,Fd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"3",y:"4.5",width:"18",height:"15",rx:"3",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M9.5 4.5v15",stroke:"currentColor",strokeWidth:"1.75"})]}),Pi=e=>jsx("svg",{viewBox:"0 0 1024 1024",...e,children:jsx("path",{d:"M849.92 51.2H174.08c-67.8656 0-122.88 55.0144-122.88 122.88v675.84c0 67.8656 55.0144 122.88 122.88 122.88h675.84c67.8656 0 122.88-55.0144 122.88-122.88V174.08c0-67.8656-55.0144-122.88-122.88-122.88z m-97.17248 383.4112c-1.00352 4.61824-3.61472 10.84928-7.22944 19.18976l-0.50688 0.50176c-21.69856 46.01344-77.66016 136.13568-77.66016 136.13568l-0.50688-0.50176-16.57344 28.43136h79.17056L578.33472 819.2l34.16064-136.63744h-62.09024l21.69856-90.624c-17.58208 4.1216-38.28224 9.85088-62.592 18.08384 0 0-33.15712 19.18976-95.24736-37.26848 0 0-41.89696-37.2736-17.58208-46.01344 10.34752-4.1216 50.23232-8.84736 81.78176-12.95872 42.3936-5.72928 68.81792-8.84736 68.81792-8.84736s-130.90816 2.10944-161.95584-3.10784c-31.04256-4.62336-70.4256-56.97024-78.6688-102.48192 0 0-12.95872-24.81664 27.9296-12.95872 40.39168 11.8528 210.18112 46.01344 210.18112 46.01344S324.2496 365.2864 309.78048 348.70784c-14.46912-16.57856-42.99776-90.01984-39.38304-135.13216 0 0 1.50528-11.35104 12.95872-8.23808 0 0 162.55488 74.5472 273.77664 114.93376 111.8208 41.40032 208.57344 62.09536 195.61472 114.33984z",fill:"#3296FA"})}),Ri=e=>jsxs("svg",{viewBox:"0 0 1024 1024",...e,children:[jsx("path",{d:"M530.73502 543.764898l187.036735-129.776327c0-142.837551-112.222041-246.804898-112.222041-246.804898h-399.25551c224.653061 142.837551 324.440816 376.581224 324.440816 376.581225z",fill:"#00DAB8"}),jsx("path",{d:"M929.938286 387.970612s-37.407347 26.017959-87.35347 155.794286c-56.006531 145.763265-212.114286 233.848163-212.114285 233.848163s-194.35102-121.417143-274.912653-169.795918c68.649796 20.897959 143.046531-56.52898 187.559183-102.922449 37.511837-38.974694 74.919184-90.906122 162.272653-129.880816 87.24898-38.974694 224.548571 12.956735 224.548572 12.956734z m-574.380408 219.846531c-8.254694-2.507755-16.404898-6.478367-24.450613-12.016327-20.897959-14.524082-6.791837-6.791837 24.450613 12.016327z",fill:"#0C3AA0"}),jsx("path",{d:"M94.040816 362.025796v0.10449c533.942857 505.208163 702.066939 260.91102 710.844082 247.222857-7.105306 11.284898-116.506122 182.543673-249.208163 220.16C231.549388 921.464163 94.040816 751.563755 94.040816 751.563755z m710.844082 247.327347l0.313469-0.626939-0.313469 0.626939z",fill:"#296DFF"})]}),Ti=e=>jsxs("svg",{viewBox:"0 0 1024 1024",...e,children:[jsx("path",{d:"M558.72 692.266667a344.149333 344.149333 0 0 1-105.642667 16.426666 341.76 341.76 0 0 1-117.162666-20.309333 58.496 58.496 0 0 0-20.224-3.498667c-14.464 0-31.232 4.650667-52.522667 14.421334 0.512-29.653333-4.309333-50.602667-21.290667-64.896-58.538667-49.365333-90.794667-115.285333-90.794666-185.6 0-143.317333 135.466667-259.84 301.994666-259.84 166.485333 0 301.952 116.522667 301.952 259.84 0 2.816-0.085333 5.632-0.170666 8.448a84.48 84.48 0 0 1 89.813333 15.701333c0.597333-7.978667 0.938667-16.042667 0.938667-24.149333 0-193.578667-176.085333-351.061333-392.533334-351.061334-216.490667 0-392.533333 157.482667-392.533333 351.061334 0 91.733333 40.618667 180.48 112.042667 245.76 0.042667 14.506667-2.56 43.306667-8.106667 77.056-3.072 18.517333 5.034667 37.12 20.693333 47.445333a46.805333 46.805333 0 0 0 51.456 0c36.736-24.106667 64.810667-38.058667 76.8-42.026667 44.501333 15.146667 91.477333 22.826667 139.648 22.826667 61.269333 0 119.338667-12.629333 171.093334-35.114667a85.504 85.504 0 0 1-65.450667-72.533333",fill:"#2A8CF4"}),jsx("path",{d:"M939.306667 624.896c-25.088 0-46.037333 17.749333-50.986667 41.386667a120.32 120.32 0 0 1-50.218667 93.141333 13.354667 13.354667 0 0 0 19.2 18.474667c0.682667-1.024 1.408-1.962667 2.133334-2.901334v-0.085333a120.32 120.32 0 0 1 89.472-46.72 52.138667 52.138667 0 0 0-9.6-103.296",fill:"#31A8FF"}),jsx("path",{d:"M836.778667 521.6a52.138667 52.138667 0 1 0-61.952 60.586667 120.32 120.32 0 0 1 93.141333 50.218666 13.354667 13.354667 0 0 0 18.474667-19.2 240.469333 240.469333 0 0 1-2.986667-2.133333 120.32 120.32 0 0 1-46.677333-89.472",fill:"#53E000"}),jsx("path",{d:"M691.84 683.648a120.32 120.32 0 0 1 45.525333-78.421333l3.584-2.645334a13.354667 13.354667 0 0 0-19.2-18.474666l-2.090666 2.858666h-0.042667a120.32 120.32 0 0 1-89.472 46.762667 52.138667 52.138667 0 1 0 60.586667 61.952c0.170667-4.053333 0.512-8.106667 1.109333-12.032",fill:"#FCE117"}),jsx("path",{d:"M804.266667 779.776a120.32 120.32 0 0 1-93.141334-50.218667 13.354667 13.354667 0 0 0-18.602666 19.072l0.128 0.085334a232.32 232.32 0 0 1 2.901333 2.176 120.277333 120.277333 0 0 1 46.762667 89.429333 52.138667 52.138667 0 1 0 61.952-60.586667",fill:"#F96600"})]}),Mi=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 3C7.035 3 3 6.36 3 10.5c0 2.28 1.23 4.305 3.15 5.625L5.25 20.25l4.56-2.28C10.53 18 11.25 18 12 18c4.965 0 9-3.36 9-7.5S16.965 3 12 3z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M12 7.5v6M9 10.5h6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Mw={Plus:He,ChevDown:ae,ChevRight:he,Bolt:Da,Doc:oo,Grid:hi,Mic:hd,Arrow:un,Check:be,Copy:Tt,Cut:Cd,Refresh:We,Volume:Sd,Like:mn,LikeFill:Nd,Dislike:Gs,Share:lo,Sparkles:Ea,ThreadDot:xd,Settings:yd,Stop:Ia,Search:$t,Edit:yt,Atom:kd,Brain:xi,Memo:Xr,Close:Q,ChevUp:yi,Paperclip:ki,Image:Pd,Globe:Mt,More:Ko,Trash:Le,InfoCircle:Qr,SuccessCircle:fn,WarningTriangle:ur,ErrorCircle:jo,ChevLeft:Kt,Shield:mr,Zap:Rd,Quote:Td,Circle:cw,Loader:pw,Sun:Md,Moon:_d,PanelSidebar:Ir,PanelSidebarCollapse:uw,Pause:Jr,Download:Co,ArrowUp:Nw,ArrowDown:Ci,ClipboardList:Ar,SidebarIcon:mw,NewTask:fw,Compass:gw,Package:Ld,Folder:qe,Archive:Ni,Logout:Dd,Help:Ed,Bell:vw,Skill:gr,Sparkle:Sw,Clock:No,Layers:Si,Play:fr,CheckCircle:Ba,Lock:ea,Mail:Aa,Note:Pw,Filter:bw,Sort:Id,Usage:ww,Gauge:hw,Key:xw,Server:gn,Cpu:yw,Device:kw,Keyboard:Ad,Info:Rw,Hand:Bd,Terminal:So,Maximize:Go,ThumbsUp:Tw,ThumbsDown:Od,Branch:Po,Skills:Cw,AlertCircle:Vd,DingTalk:Pi,Feishu:Ri,WeCom:Ti,CommentPlus:Mi,PanelFold:Fd};function ta({name:e,size:t=20,label:o,style:r,ref:n,...a}){let i=Mw[e],d={width:t,height:t,flexShrink:0,...r};return i?jsx(i,{style:d,"aria-hidden":o?void 0:true,"aria-label":o,role:o?"img":void 0,...a}):(console.warn(`[Icon] Unknown icon name: ${e}`),jsx("span",{style:d,"aria-hidden":o?void 0:true,"aria-label":o,role:o?"img":void 0,...a}))}var _w={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"};function vr({size:e="md",className:t}){return jsx("svg",{"data-slot":"spinner","data-ow-part":"spinner",className:g("flex-shrink-0 motion-safe:animate-[ow-spin_var(--ow-dur-spin-fast)_linear_infinite]",_w[e],t),viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:jsx("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",pathLength:"100",strokeDasharray:"75 25"})})}var Ew=cva(["inline-flex items-center justify-center font-medium whitespace-nowrap","transition-[background-color,border-color,color,box-shadow] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring","disabled:pointer-events-none"].join(" "),{variants:{variant:{primary:["bg-[var(--ow-btn-primary-bg)]","text-[color:var(--ow-btn-primary-fg)]","hover:bg-[var(--ow-btn-primary-hover)]","active:bg-[var(--ow-btn-primary-press)]","disabled:bg-[var(--ow-btn-primary-disabled-bg)]","disabled:text-[color:var(--ow-btn-primary-disabled-fg)]"].join(" "),secondary:["bg-[var(--ow-btn-secondary-bg)]","text-[color:var(--ow-btn-secondary-fg)]","border border-[color:var(--ow-btn-secondary-border)]","hover:bg-[var(--ow-btn-secondary-hover)]","active:bg-[var(--ow-btn-secondary-press)]","disabled:bg-[var(--ow-disabled-bg)]","disabled:text-[color:var(--ow-disabled-text)]","disabled:border-[color:var(--ow-disabled-border)]"].join(" "),ghost:["bg-transparent","text-[color:var(--ow-btn-ghost-fg)]","hover:bg-[var(--ow-btn-ghost-hover)]","active:bg-[var(--ow-btn-ghost-press)]","disabled:bg-transparent","disabled:text-[color:var(--ow-disabled-text)]"].join(" "),text:["bg-transparent","text-[color:var(--ow-btn-text-fg)]","hover:text-[color:var(--ow-text-hover)]","active:text-[color:var(--ow-text-press)]","disabled:text-[color:var(--ow-disabled-text)]"].join(" "),danger:["bg-[var(--ow-btn-danger-bg)]","text-[color:var(--ow-btn-danger-fg)]","hover:bg-[var(--ow-btn-danger-hover)]","active:bg-[var(--ow-btn-danger-press)]","disabled:bg-[var(--ow-btn-danger-disabled-bg)]","disabled:text-[color:var(--ow-btn-danger-disabled-fg)]"].join(" "),unstyled:""},size:{sm:"h-7 gap-1 px-3 text-ow-fs-ui [border-radius:var(--ow-radius-action)]",md:"h-8 gap-1.5 px-4 text-ow-fs-ui [border-radius:var(--ow-radius-action)]",lg:"h-10 gap-1.5 px-6 text-ow-fs-body [border-radius:var(--ow-radius-action)]"},iconOnly:{true:"px-0",false:""},loading:{true:"",false:""}},compoundVariants:[{variant:"primary",loading:true,className:"disabled:bg-[var(--ow-btn-primary-bg)] disabled:text-[color:var(--ow-btn-primary-fg)]"},{variant:"secondary",loading:true,className:"disabled:bg-[var(--ow-btn-secondary-bg)] disabled:text-[color:var(--ow-btn-secondary-fg)] disabled:border-[color:var(--ow-btn-secondary-border)]"},{variant:"ghost",loading:true,className:"disabled:bg-transparent disabled:text-[color:var(--ow-btn-ghost-fg)]"},{variant:"text",loading:true,className:"disabled:text-[color:var(--ow-btn-text-fg)]"},{variant:"danger",loading:true,className:"disabled:bg-[var(--ow-btn-danger-bg)] disabled:text-[color:var(--ow-btn-danger-fg)]"},{size:"sm",iconOnly:true,className:"w-7"},{size:"md",iconOnly:true,className:"w-8"},{size:"lg",iconOnly:true,className:"w-10"}],defaultVariants:{variant:"secondary",size:"md",iconOnly:false,loading:false}}),Ru={sm:"w-4 h-4",md:"w-4 h-4",lg:"w-5 h-5"};function Iw({size:e}){return jsx(vr,{className:Ru[e]})}var f=forwardRef(function({variant:t="secondary",size:o="md",icon:r,children:n,className:a,loading:i=false,disabled:d,...s},l){return t==="unstyled"?jsx("button",{ref:l,type:"button",className:a,disabled:d,...s,children:n}):jsxs("button",{ref:l,type:"button","data-slot":"button","data-variant":t,"data-size":o,"data-loading":i||void 0,"data-ow-part":"action","data-ow-role":t==="primary"||t==="danger"?t:"secondary","aria-busy":i||void 0,disabled:d||i,className:g(Ew({variant:t,size:o,iconOnly:!!!!(r&&!n),loading:i&&!d}),a),...s,children:[i?jsx(Iw,{size:o}):r&&jsx("span",{"data-ow-part":"icon",className:g("inline-flex items-center justify-center flex-shrink-0",Ru[o]),children:r}),n&&jsx("span",{"data-ow-part":"label",className:"inline-flex items-center gap-[inherit] whitespace-nowrap",children:n})]})});var $d=["inline-flex items-center justify-center cursor-pointer select-none","bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)]","[box-shadow:var(--ow-shadow-pop)]","text-[color:var(--ow-text-2)]","transition-[background-color,color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover-pop)] hover:text-[color:var(--ow-text)]","active:bg-[var(--ow-press-pop)]","disabled:cursor-not-allowed disabled:bg-[var(--ow-disabled-bg)] disabled:text-[color:var(--ow-disabled-text)] disabled:border-[color:var(--ow-disabled-border)] disabled:[box-shadow:none]","ow-focus-ring"].join(" ");function Z9({threshold:e=200,target:t,alwaysVisible:o=false,disabled:r,className:n}){let[a,i]=useState(false);useEffect(()=>{let s=t||window,l=()=>{let c=t?t.scrollTop:window.scrollY||document.documentElement.scrollTop;i(c>e);};return l(),s.addEventListener("scroll",l,{passive:true}),()=>s.removeEventListener("scroll",l)},[t,e]);let d=useCallback(()=>{t?t.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"});},[t]);return !a&&!o?null:jsx(f,{"data-slot":"backtop","data-scoped":!!t,"data-ow-part":"action","data-ow-role":"navigation",variant:"unstyled",disabled:r,className:g($d,"h-8 w-8 p-0 [border-radius:var(--ow-radius-action)] z-[var(--ow-z-sticky)]",t?"sticky left-[calc(100%-64px)] bottom-6":"fixed right-6 bottom-10",n),onClick:d,"aria-label":"\u56DE\u5230\u9876\u90E8",children:jsx(un,{"aria-hidden":"true",style:{width:16,height:16}})})}var $w=cva("inline-flex items-center gap-1 whitespace-nowrap border font-medium text-ow-fs-caption leading-none px-1.5 py-0.5 [border-radius:var(--ow-radius-tag)]",{variants:{variant:{normal:"bg-ow-badge-normal-bg text-ow-badge-normal-fg border-ow-badge-normal-border",pending:"bg-ow-badge-pending-bg text-ow-badge-pending-fg border-ow-badge-pending-border",warning:"bg-ow-badge-warning-bg text-ow-badge-warning-fg border-ow-badge-warning-border",error:"bg-ow-badge-error-bg text-ow-badge-error-fg border-ow-badge-error-border",success:"bg-ow-badge-success-bg text-ow-badge-success-fg border-ow-badge-success-border"}},defaultVariants:{variant:"normal"}});function at({variant:e="normal",dot:t=false,count:o,children:r,className:n}){return jsxs("span",{"data-slot":"badge","data-variant":e,"data-ow-part":"label","data-ow-role":e==="normal"?"neutral":e,className:g($w({variant:e}),n),children:[t&&jsx("span",{"data-ow-part":"dot",className:"w-1.5 h-1.5 shrink-0 bg-current [border-radius:var(--ow-radius-pill)]","aria-hidden":"true"}),r,o!=null&&jsx("span",{"data-ow-part":"count",className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums",children:o})]})}function zt({title:e,actions:t,header:o,footer:r,padding:n="default",bodyClassName:a,interactive:i,onClick:d,disabled:s=false,variant:l,children:c,className:p,...m}){let u=!s&&(i===true||i!==false&&!!d),v=o!=null||e!=null||t!=null;return jsxs("div",{"data-slot":"card","data-variant":l,"data-ow-part":"surface","data-ow-state":s?"disabled":u?"clickable":void 0,role:u?"button":void 0,tabIndex:u?0:void 0,"aria-disabled":s||void 0,onClick:u?d:void 0,onKeyDown:u?b=>{!u||!d||b.key!=="Enter"&&b.key!==" "||b.target===b.currentTarget&&(b.preventDefault(),d(b));}:void 0,...m,className:g("flex flex-col min-w-0 overflow-hidden","bg-ow-surface border border-ow-border [border-radius:var(--ow-radius-card)]","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",u&&"cursor-pointer hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)] ow-focus-ring",s&&"cursor-not-allowed bg-[var(--ow-disabled-bg)] border-[color:var(--ow-disabled-border)] text-[color:var(--ow-disabled-text)]",p),children:[v&&jsx("div",{"data-ow-part":"head",className:"flex-shrink-0 px-3.5 py-2.5 border-b border-ow-border",children:o??jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{"data-ow-part":"title",className:"flex-1 min-w-0 font-semibold text-ow-fs-ui leading-tight font-[family-name:var(--ow-font-sans)] text-ow-text overflow-hidden text-ellipsis whitespace-nowrap",children:e}),t&&jsx("span",{"data-ow-part":"actions",className:"flex flex-shrink-0 items-center gap-0.5",children:t})]})}),jsx("div",{"data-ow-part":"body",className:g("min-w-0",n==="default"&&"px-3.5 py-3",a),children:c}),r&&jsx("div",{"data-ow-part":"foot",className:"flex flex-shrink-0 items-center gap-2 px-3.5 py-2.5 border-t border-ow-border",children:r})]})}function Ro({checked:e,defaultChecked:t=false,indeterminate:o=false,onChange:r,disabled:n,className:a="",id:i,"aria-label":d}){let[s,l]=useState(t),c=e??s,p=c||o,m=useCallback(()=>{if(n)return;let u=o?true:!c;l(u),r?.(u);},[c,o,n,r]);return jsx("button",{id:i,type:"button",role:"checkbox","aria-checked":o?"mixed":c,"aria-label":d,disabled:n,"data-slot":"checkbox","data-ow-part":"control","data-ow-role":o?"mixed":c?"on":"off",className:g("relative inline-flex items-center justify-center w-4 h-4 p-0 border","[border-radius:var(--ow-radius-2xs)]","after:content-[''] after:absolute after:-inset-1","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",p?"bg-[var(--ow-control-on)] border-[color:var(--ow-control-on)] text-[color:var(--ow-control-on-glyph)]":"bg-transparent border-[color:var(--ow-control-off)] text-transparent hover:border-[color:var(--ow-border-strong)] active:bg-[var(--ow-press)]",n?"cursor-not-allowed bg-[var(--ow-disabled-bg)] border-[color:var(--ow-disabled-border)] text-[color:var(--ow-disabled-text)] hover:border-[color:var(--ow-disabled-border)] active:bg-[var(--ow-disabled-bg)]":"cursor-pointer",a),onClick:m,children:o?jsx("span",{"aria-hidden":"true",className:"block w-2 h-0.5 [border-radius:var(--ow-radius-pill)] bg-current"}):c&&jsx(be,{className:"w-3 h-3",strokeWidth:2.5})})}var jw=cva("relative inline-flex"),Gw=cva("absolute z-[var(--ow-z-tooltip)] w-max px-2 py-[5px] box-border [border-radius:var(--ow-radius-sm)] bg-ow-tooltip-bg text-ow-tooltip-text [box-shadow:var(--ow-shadow-pop)] text-ow-fs-caption leading-[18px] font-normal text-left whitespace-normal pointer-events-none animate-[ow-tooltip-in_var(--ow-dur-1)_var(--ow-ease-beacon)]");function vn({content:e,children:t,side:o="top",align:r="center",open:n,defaultOpen:a=false,onOpenChange:i,delay:d=300,offset:s=8,showArrow:l=true,followCursor:c=false,disabled:p=false,maxWidth:m=320,className:u=""}){let v=useId(),w=useRef(null),[b,h]=useState(a),[x,k]=useState({x:0,y:0}),y=n??b,P=_=>{n===void 0&&h(_),i?.(_);},N=()=>{w.current&&clearTimeout(w.current),w.current=null;},S=()=>{p||(N(),w.current=setTimeout(()=>P(true),d));},R=()=>{p||(N(),P(true));},M=()=>{N(),P(false);};useEffect(()=>()=>N(),[]),useEffect(()=>{if(!y)return;let _=D=>{D.key==="Escape"&&M();};return document.addEventListener("keydown",_,true),()=>document.removeEventListener("keydown",_,true)},[y]);let T=_=>{c&&k({x:_.clientX,y:_.clientY});};return jsxs("span",{"data-slot":"tooltip-trigger",className:g(jw(),u),"aria-describedby":y?v:void 0,onPointerEnter:S,onPointerMove:T,onPointerLeave:M,onFocus:R,onBlur:M,children:[t,y&&!p&&jsxs("span",{id:v,role:"tooltip","data-slot":"tooltip",className:Gw(),style:{...Zw(o,r,s,c,x),maxWidth:m},children:[e,l&&!c&&jsx("span",{"aria-hidden":"true",className:"absolute w-2 h-2 rounded-none bg-ow-tooltip-bg",style:qw(o,r)})]})]})}function Zw(e,t,o,r,n){if(r)return {position:"fixed",left:n.x+12,top:n.y+14};let i=e==="top"||e==="bottom"?t==="start"?{left:0}:t==="end"?{right:0}:{left:"50%",transform:"translateX(-50%)"}:t==="start"?{top:0}:t==="end"?{bottom:0}:{top:"50%",transform:"translateY(-50%)"};return e==="top"?{bottom:`calc(100% + ${o}px)`,...i}:e==="bottom"?{top:`calc(100% + ${o}px)`,...i}:e==="left"?{right:`calc(100% + ${o}px)`,...i}:{left:`calc(100% + ${o}px)`,...i}}function qw(e,t){let o=t==="start"?12:t==="end"?void 0:"50%",r=t==="end"?12:void 0;return e==="top"?{bottom:-3,left:o,right:r,transform:t==="center"?"translateX(-50%) rotate(45deg)":"rotate(45deg)"}:e==="bottom"?{top:-3,left:o,right:r,transform:t==="center"?"translateX(-50%) rotate(45deg)":"rotate(45deg)"}:e==="left"?{right:-3,top:o,bottom:r,transform:t==="center"?"translateY(-50%) rotate(45deg)":"rotate(45deg)"}:{left:-3,top:o,bottom:r,transform:t==="center"?"translateY(-50%) rotate(45deg)":"rotate(45deg)"}}var Xw={neutral:"var(--ow-progress-fill)",success:"var(--ow-success-on-tint)",warning:"var(--ow-warning-on-tint)",error:"var(--ow-error-on-tint)",info:"var(--ow-info-on-tint)",pending:"var(--ow-pending)"},Au={neutral:{rest:"bg-ow-surface border-ow-border-strong text-ow-text",hover:"hover:bg-[var(--ow-hover)] focus-within:bg-[var(--ow-hover)]"},mention:{rest:["bg-[var(--ow-mention-bg)] border-[color:var(--ow-info-tint-border)] text-[color:var(--ow-mention-text)]","[&_[data-ow-part=icon]]:text-[color:var(--ow-mention-text)]","[&_[data-ow-part=remove]]:text-[color:var(--ow-mention-text)]"].join(" "),hover:"hover:bg-[var(--ow-info-tint-hover)] focus-within:bg-[var(--ow-info-tint-hover)]"}};function ro({icon:e,avatar:t,label:o,dot:r,count:n,shape:a,tone:i="neutral",selected:d,onRemove:s,removeMode:l="always",removeLabel:c="\u79FB\u9664",onClick:p,disabled:m=false,description:u,tooltip:v,className:w="",...b}){let h=!!p&&!m,x=h&&!s?"button":"span",k=r===true?"neutral":r||null,y=a??(k||n!=null?"pill":"square"),P=y==="pill"?"[border-radius:var(--ow-radius-chip)]":"[border-radius:var(--ow-radius-tag)]",N=d!==void 0,S=d?"bg-[var(--ow-current-bg)] border-[color:var(--ow-border)] text-ow-text font-medium":"bg-transparent border-[color:var(--ow-border)] text-ow-text font-normal",R=t||e,M=jsxs(Fragment,{children:[k&&jsx("span",{"data-ow-part":"dot","data-tone":k,className:"w-1.5 h-1.5 shrink-0 [border-radius:var(--ow-radius-pill)]",style:{background:m?"var(--ow-disabled-text)":Xw[k]},"aria-hidden":"true"}),R&&jsx("span",{"data-ow-part":"icon",className:"w-4 h-4 inline-flex items-center justify-center shrink-0 overflow-hidden text-ow-text-2","aria-hidden":"true",children:R}),jsx("span",{"data-ow-part":"label",className:"min-w-0 overflow-hidden text-ellipsis",children:o}),n!=null&&jsx("span",{"data-ow-part":"count",className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-text-2",children:n})]}),T=jsxs(x,{type:x==="button"?"button":void 0,"data-slot":"chip","data-ow-part":"surface","data-shape":y,"data-tone":i,"data-ow-role":N?d?"on":"off":void 0,"aria-disabled":m||void 0,...b,className:g("group inline-flex items-center gap-1.5 max-w-[220px] h-7 px-2.5 border",P,"font-medium text-ow-fs-caption leading-none whitespace-nowrap","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",m?"cursor-not-allowed bg-[var(--ow-disabled-bg)] border-[color:var(--ow-disabled-border)] text-[color:var(--ow-disabled-text)]":N?S:Au[i].rest,!m&&(h||s)&&(N?!d&&"hover:bg-[var(--ow-hover)]":Au[i].hover),h&&!s&&"cursor-pointer active:bg-[var(--ow-press)] ow-focus-ring",w),onClick:h&&!s?p:void 0,children:[h&&s?jsx("button",{type:"button","data-ow-part":"body-action",className:g("inline-flex items-center gap-1.5 min-w-0 cursor-pointer bg-transparent border-0 p-0 m-0 [font:inherit] text-inherit ow-focus-ring",P),onClick:p,children:M}):M,s&&jsx("button",{type:"button","data-ow-part":"remove",className:g("relative w-4 h-4 -mr-1 p-0 shrink-0 items-center justify-center",y==="pill"?"[border-radius:var(--ow-radius-pill)]":"[border-radius:var(--ow-radius-2xs)]","text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)] active:bg-[var(--ow-press)]","ow-focus-ring disabled:cursor-not-allowed disabled:text-[color:var(--ow-disabled-text)]","after:absolute after:content-[''] after:-inset-1",l==="hover"?"hidden group-hover:inline-flex group-focus-within:inline-flex":"inline-flex"),disabled:m,onClick:D=>{D.stopPropagation(),s();},"aria-label":c,title:c,children:jsx(Q,{className:"w-3 h-3","aria-hidden":"true"})})]}),_=v??u;return _?jsx(vn,{content:_,side:"top",delay:250,className:"ow-context-chip-tooltip",children:T}):T}var Jw=["font-medium","text-[length:var(--ow-fs-eyebrow-cjk)]","tracking-[var(--ow-ls-eyebrow-cjk)]","text-[color:var(--ow-eyebrow)]","leading-none whitespace-nowrap"].join(" ");function Hd({orientation:e="horizontal",children:t,className:o,...r}){return e==="vertical"?jsx("div",{"data-slot":"divider",role:"separator","aria-orientation":"vertical",className:g("w-px self-stretch bg-[var(--ow-border)]",o),...r}):t?jsxs("div",{"data-slot":"divider",role:"separator","aria-orientation":"horizontal",className:g("flex w-full items-center gap-3",o),...r,children:[jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-[var(--ow-border)]"}),jsx("span",{className:Jw,children:t}),jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-[var(--ow-border)]"})]}):jsx("div",{"data-slot":"divider",role:"separator","aria-orientation":"horizontal",className:g("h-px w-full bg-[var(--ow-border)]",o),...r})}var Ou={page:{mark:52,box:"gap-3.5 px-6 mt-14 mx-auto max-w-[488px]",button:"md",action:"primary"},md:{mark:40,box:"gap-3 px-4 py-8",button:"md",action:"secondary"},sm:{mark:28,box:"gap-2 px-3 py-4",button:"sm",action:"secondary"}},t1="13 11.7 73.4 45.3",o1=45.3/73.4;function r1({size:e=52}){return jsxs("svg",{width:e,height:Math.round(e*o1),viewBox:t1,"aria-hidden":"true",className:"ow-empty-icon block mb-4",style:{color:"var(--ow-empty-mark)"},children:[jsx("circle",{cx:"48",cy:"48",r:"8.2",fill:"currentColor"}),jsx("circle",{cx:"60.2",cy:"20.6",r:"6.7",fill:"currentColor",opacity:".6"}),jsx("circle",{cx:"41.76",cy:"18.66",r:"5.5",fill:"currentColor",opacity:".45"}),jsx("circle",{cx:"25.71",cy:"27.93",r:"4.3",fill:"currentColor",opacity:".3"}),jsx("circle",{cx:"18.16",cy:"44.86",r:"3.3",fill:"currentColor",opacity:".2"}),jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:"currentColor"})]})}function F({title:e,message:t,actionLabel:o,onAction:r,action:n,actionVariant:a,size:i="md",variant:d="default",markSize:s,className:l}){if(d==="card")return jsx("div",{"data-slot":"empty-state","data-ow-variant":"card",role:"status",className:g("px-4 py-7 text-center [text-wrap:pretty]","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-lg)] bg-[var(--ow-surface)]","text-ow-fs-body leading-normal text-[color:var(--ow-text-2)]",l),children:t});if(d==="text")return jsx("div",{"data-slot":"empty-state","data-ow-variant":"text",role:"status",className:g("px-2.5 py-4 text-ow-fs-ui leading-normal text-[color:var(--ow-text-2)]",l),children:t});let c=Ou[i]??Ou.md,p=i==="page";return jsxs("div",{"data-slot":"empty-state","data-ow-size":i,"data-ow-variant":"default",role:"status",className:g("flex flex-col items-center justify-center text-center",c.box,l),children:[jsx(r1,{size:s??c.mark}),e?jsx("p",{className:"m-0 text-ow-fs-subtitle font-medium leading-[1.4] text-[color:var(--ow-text)]",children:e}):null,jsx("p",{className:g("m-0 text-[color:var(--ow-text-2)]",p?"text-ow-fs-body leading-[1.75] [text-wrap:pretty]":"text-ow-fs-ui leading-normal"),children:t}),n??(o&&jsx(f,{variant:a??c.action,size:c.button,onClick:r,children:o}))]})}var i1=cva(["flex w-full min-w-0 box-border border","text-[color:var(--ow-input-text)]","transition-[border-color,background-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]"].join(" "),{variants:{tier:{base:"",pop:""},disabled:{true:"text-[color:var(--ow-input-disabled-text)] cursor-not-allowed",false:["[&:hover:not(:focus-within)]:border-[color:var(--ow-input-border-hover)]","focus-within:border-[color:var(--ow-input-border-focus)]"].join(" ")},error:{true:"",false:""},multiline:{true:"items-start [border-radius:var(--ow-radius-card)]",false:"items-center [border-radius:var(--ow-radius-control)]"},size:{md:"gap-1.5",lg:"gap-2"}},compoundVariants:[{disabled:true,className:"bg-[var(--ow-input-disabled-bg)] border-[color:var(--ow-disabled-border)]"},{disabled:false,tier:"base",className:"bg-[var(--ow-input-bg)] border-[color:var(--ow-input-border)]"},{disabled:false,tier:"pop",className:"bg-[var(--ow-input-bg-pop)] border-[color:var(--ow-input-border-pop)]"},{multiline:false,size:"md",className:"h-8 px-2.5"},{multiline:false,size:"lg",className:"h-10 px-3"},{multiline:true,size:"md",className:"py-2 px-2.5"},{multiline:true,size:"lg",className:"py-2.5 px-3"},{error:true,disabled:false,className:"border-[color:var(--ow-error)] [&:hover:not(:focus-within)]:border-[color:var(--ow-error)] focus-within:border-[color:var(--ow-error)]"}],defaultVariants:{tier:"base",disabled:false,error:false,multiline:false,size:"md"}}),qs=cva(["w-full min-w-0 flex-1 bg-transparent border-0 outline-none","font-normal text-ow-fs-ui text-[color:var(--ow-input-text)]","placeholder:text-[color:var(--ow-placeholder)]","disabled:cursor-not-allowed disabled:text-[color:var(--ow-input-disabled-text)]"].join(" "),{variants:{multiline:{true:"resize-y min-h-20 leading-normal",false:"h-full"}},defaultVariants:{multiline:false}}),Fu="inline-flex items-center justify-center shrink-0 [&_svg]:w-4 [&_svg]:h-4 text-[color:var(--ow-text-3)]",te=forwardRef(function({value:t,defaultValue:o,placeholder:r,disabled:n,onChange:a,multiline:i=false,standalone:d=true,type:s="text",size:l="md",tier:c="base",prefix:p,suffix:m,error:u,errorDetail:v,invalid:w,className:b,"aria-invalid":h,"aria-describedby":x,...k},y){let P=useId(),N=!!u,S=N||!!w||h===true||h==="true",M={value:t,defaultValue:o,placeholder:r,disabled:n,onChange:D=>{a?.(D.target.value);},"aria-invalid":h??(S||void 0),"aria-describedby":g(x,N?P:void 0)||void 0};if(!d&&!!!(p||m))return i?jsx("textarea",{ref:y,"data-slot":"field","data-variant":"textarea","data-ow-part":"control","data-ow-role":"input",className:g(qs({multiline:true}),b),...M,...k}):jsx("input",{ref:y,"data-slot":"field","data-variant":"text","data-ow-part":"control","data-ow-role":"input",type:s,className:g(qs({multiline:false}),b),...M,...k});let _=i?jsx("textarea",{ref:y,"data-slot":"field-control","data-variant":"textarea",className:qs({multiline:true}),...M,...k}):jsx("input",{ref:y,"data-slot":"field-control","data-variant":"text",type:s,className:qs({multiline:false}),...M,...k});return jsxs("div",{"data-slot":"field","data-ow-part":"control","data-ow-role":"input","data-ow-state":g(n&&"disabled",S&&"error")||void 0,className:g("flex flex-col gap-1 w-full min-w-0",b),children:[jsxs("div",{"data-ow-part":"shell","data-tier":c,className:i1({tier:c,disabled:!!n,error:S,multiline:i,size:l}),children:[p&&jsx("span",{className:g(Fu,i&&"mt-0.5"),"data-ow-part":"prefix",children:p}),_,m&&jsx("span",{className:g(Fu,i&&"mt-0.5"),"data-ow-part":"suffix",children:m})]}),N&&jsxs("div",{"data-ow-part":"error",id:P,className:"flex flex-col gap-0.5",children:[jsx("span",{className:"text-ow-fs-ui leading-[1.4] text-[color:var(--ow-error)]",children:u}),v&&jsx("span",{className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-fs-caption leading-[1.5] text-[color:var(--ow-text-3)] line-clamp-2 break-all",children:v})]})]})});var s1=["inline-flex items-center justify-center","h-[18px] min-w-[18px] px-[5px]","bg-[var(--ow-surface-2)] border border-[color:var(--ow-border)]","[border-radius:var(--ow-radius-key)]","font-medium text-ow-fs-mark-md leading-none text-[color:var(--ow-text-2)]","[font-family:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]","whitespace-nowrap select-none"].join(" ");function Br({children:e,className:t,...o}){return jsx("kbd",{"data-slot":"keycap","data-ow-part":"key",className:g(s1,t),...o,children:e})}function Ei({keys:e,className:t,"aria-label":o,...r}){return jsx("span",{"data-slot":"keycap-combo",className:g("inline-flex items-center gap-[3px]",t),"aria-label":o??e.join("+"),...r,children:e.map((n,a)=>jsxs("span",{className:"inline-flex items-center gap-[3px]",children:[a>0&&jsx("span",{"aria-hidden":"true",className:"text-ow-fs-mark-md leading-none text-[color:var(--ow-text-3)] [font-family:var(--ow-font-mono)]",children:"+"}),jsx(Br,{"aria-hidden":"true",children:n})]},`${n}-${a}`))})}var Va={type:"separator"},f1="---";function Ku(e){return "type"in e&&e.type==="separator"||!("type"in e)&&e.key===f1}function ju(e){return "type"in e&&e.type==="group"}function Hu(e){return !Ku(e)&&!ju(e)}function Wu(e){return e.searchText??(typeof e.label=="string"?e.label:"")}function g1(e){return (Array.isArray(e)?e:e.split("+")).map(t=>t.trim()).filter(Boolean)}var v1=["button","[href]","input","select","textarea",'[tabindex]:not([tabindex="-1"])'].join(", ");function Xs(e){return e?Array.from(e.querySelectorAll(v1)).filter(t=>!(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-hidden")==="true")):[]}var b1=cva(["flex items-center gap-2 w-full px-2 text-left text-ow-fs-ui font-normal","transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","[border-radius:var(--ow-radius-control)] ow-focus-ring"].join(" "),{variants:{danger:{true:"text-[color:var(--ow-error)]",false:"text-[color:var(--ow-text)]"},selected:{true:"bg-[var(--ow-selected-bg)]",false:""},hovered:{true:"",false:""},disabled:{true:"cursor-not-allowed text-[color:var(--ow-disabled-text)]",false:"cursor-pointer"},hasDescription:{true:"h-auto py-2 items-start",false:"h-8"}},compoundVariants:[{hovered:true,selected:false,disabled:false,danger:false,className:"bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]"},{hovered:true,selected:false,disabled:false,danger:true,className:"bg-[var(--ow-error-tint)] active:bg-[var(--ow-error-tint-hover)]"}],defaultVariants:{danger:false,selected:false,hovered:false,disabled:false,hasDescription:false}});function pt({items:e=[],children:t,contentKey:o,onSelect:r,activeKey:n,onItemHover:a,width:i=200,header:d,headerBare:s=false,banner:l,footer:c,searchable:p=false,searchPlaceholder:m="\u641C\u7D22",searchValue:u,onSearchChange:v,empty:w="\u6682\u65E0\u7ED3\u679C",portal:b=false,autoAdjust:h=false,align:x="start",role:k,autoFocus:y=false,onClose:P,ariaLabel:N,surfaceRef:S,className:R=""}){let[M,T]=useState(null),[_,D]=useState(""),I=useRef(null),H=useCallback(U=>{I.current=U,S&&(S.current=U);},[S]),$=useRef(new Map),E=useRef({buffer:"",at:0}),[V,pe]=useState(null),[W,ce]=useState({x:0,y:0}),Pe=useRef(W),Fe=useId(),ee=k??(t?"none":"menu"),q=u??_,A=useMemo(()=>{if(!p||!q.trim())return e;let U=q.trim().toLowerCase();return e.filter(ke=>!Hu(ke)||Wu(ke).toLowerCase().includes(U))},[e,q,p]),L=useMemo(()=>A.filter(U=>Hu(U)&&!U.disabled),[A]),Ee=useMemo(()=>L.some(U=>!!U.control),[L])||!!d&&s||!!l,Ge=useCallback(()=>{let U=I.current,ke=Ie=>U?.querySelector(`:scope > [data-ow-part="${Ie}"]`),j=[];s&&j.push(...Xs(ke("header"))),j.push(...Xs(ke("banner")));for(let Ie of L){let we=$.current.get(Ie.key);we&&(j.push(we),Ie.control&&j.push(...Xs(we.querySelector('[data-ow-part="item-control"]'))));}return j.push(...Xs(ke("footer"))),j},[L,s]),et=U=>{u===void 0&&D(U),v?.(U);},ht=useCallback((U,ke)=>{T(U),U&&ke&&$.current.get(U)?.focus();},[]);useEffect(()=>{if(!y)return;let U=requestAnimationFrame(()=>{if(y==="surface"){I.current?.focus();return}if(p){I.current?.querySelector("input")?.focus(),T(L[0]?.key??null);return}let ke=L[0]?.key;ke?ht(ke,true):I.current?.focus();});return ()=>cancelAnimationFrame(U)},[y]);let to=U=>{let ke=U.target,j=!!ke.closest?.('[data-ow-part="item-control"]'),Ie=ke.tagName==="INPUT"&&!j;if(U.key==="Escape"){U.stopPropagation(),P?.();return}if(U.key==="Tab"){if(!Ee){P?.();return}let le=Ge(),ve=typeof document>"u"?null:document.activeElement,X=ve?le.indexOf(ve):-1;if(X<0&&ve){for(let de=le.length-1;de>=0;de-=1)if(le[de]?.contains(ve)){X=de;break}}let Ce=X+(U.shiftKey?-1:1);if(X<0||Ce<0||Ce>=le.length){P?.();return}U.preventDefault(),le[Ce]?.focus();return}if(j&&U.isDefaultPrevented()||L.length===0)return;let we=L.findIndex(le=>le.key===M);if(U.key==="ArrowDown"||U.key==="ArrowUp"){U.preventDefault();let le=U.key==="ArrowDown"?1:-1,ve=we<0?le>0?0:L.length-1:(we+le+L.length)%L.length,X=L[ve];X&&ht(X.key,!Ie);return}if(U.key==="Home"||U.key==="End"){U.preventDefault();let le=L[U.key==="Home"?0:L.length-1];le&&ht(le.key,!Ie);return}if(U.key==="Enter"&&M&&!Ie&&!j){U.preventDefault(),r?.(M);return}if(U.key===" "&&M&&!Ie&&!j&&L.find(ve=>ve.key===M)?.control){U.preventDefault(),r?.(M);return}if(!Ie&&!j&&U.key.length===1&&!U.metaKey&&!U.ctrlKey&&!U.altKey){let le=Date.now();E.current={buffer:le-E.current.at>800?U.key:E.current.buffer+U.key,at:le};let ve=E.current.buffer.toLowerCase(),X=L.find(Ce=>Wu(Ce).toLowerCase().startsWith(ve));X&&(U.preventDefault(),ht(X.key,true));}};useLayoutEffect(()=>{if(!h||b){Pe.current={x:0,y:0},ce(we=>we.x||we.y?{x:0,y:0}:we);return}let U=I.current;if(!U)return;let ke=0,j=()=>{cancelAnimationFrame(ke),ke=requestAnimationFrame(()=>{let we=U.getBoundingClientRect(),le=Pe.current,ve={left:we.left-le.x,right:we.right-le.x,top:we.top-le.y,bottom:we.bottom-le.y},X=0,Ce=0;ve.right>window.innerWidth-8&&(X=window.innerWidth-8-ve.right),ve.left+X<8&&(X=8-ve.left),ve.bottom>window.innerHeight-8&&(Ce=window.innerHeight-8-ve.bottom),ve.top+Ce<8&&(Ce=8-ve.top),(X!==le.x||Ce!==le.y)&&(Pe.current={x:X,y:Ce},ce({x:X,y:Ce}));});};j();let Ie=typeof ResizeObserver>"u"?null:new ResizeObserver(j);return Ie?.observe(U),window.addEventListener("resize",j),window.addEventListener("scroll",j,true),()=>{cancelAnimationFrame(ke),Ie?.disconnect(),window.removeEventListener("resize",j),window.removeEventListener("scroll",j,true);}},[h,b]),useLayoutEffect(()=>{if(!b)return;let U=I.current;if(!U)return;let ke=()=>{let Ie=typeof b=="object"&&b.current?b.current:U.parentElement;if(!Ie)return;let we=Ie.getBoundingClientRect(),le=U.getBoundingClientRect(),ve=w1(U),X=ve?ve.getBoundingClientRect().left:0,Ce=ve?ve.getBoundingClientRect().top:0,de=we.bottom+4-Ce,Wo=(x==="end"?we.right-le.width:we.left)-X;we.bottom+4+le.height>window.innerHeight-8&&(de=we.top-le.height-4-Ce),de+Ce<8&&(de=8-Ce),Wo+X+le.width>window.innerWidth-8&&(Wo=window.innerWidth-le.width-8-X),Wo+X<8&&(Wo=8-X),pe(cr=>cr&&cr.top===de&&cr.left===Wo?cr:{top:de,left:Wo});},j=requestAnimationFrame(ke);return window.addEventListener("resize",ke),window.addEventListener("scroll",ke,true),()=>{cancelAnimationFrame(j),window.removeEventListener("resize",ke),window.removeEventListener("scroll",ke,true);}},[b,x,e.length,o]);let Ze=jsxs("div",{ref:H,"data-slot":"menu-surface","data-ow-part":"surface",tabIndex:-1,role:ee==="menu"?"menu":void 0,"aria-label":ee==="menu"?N:void 0,"aria-activedescendant":ee==="menu"&&M?`${Fe}-${M}`:void 0,onKeyDown:to,className:g("bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)] shadow-[var(--ow-shadow-pop)] p-1.5 box-border outline-none","[border-radius:var(--ow-radius-menu)]",R),style:{width:i,...b?{position:"fixed",zIndex:"var(--ow-z-dropdown)",top:V?.top??-9999,left:V?.left??-9999,visibility:V?"visible":"hidden"}:{transform:W.x||W.y?`translate(${W.x}px, ${W.y}px)`:void 0}},children:[d&&(s?jsx("div",{"data-ow-part":"header","data-ow-variant":"bare",role:"none",children:d}):jsx("div",{"data-ow-part":"header",className:"font-medium text-ow-fs-eyebrow leading-none text-[color:var(--ow-eyebrow)] px-2 pt-2 pb-1.5 uppercase tracking-[var(--ow-ls-eyebrow)]",children:d})),l&&jsx("div",{"data-ow-part":"banner",role:"none",children:l}),p&&jsx(te,{value:q,onChange:et,placeholder:m,"aria-label":m,tier:"pop",className:"mb-1.5"}),jsx("div",{"data-ow-part":"list",className:"min-h-0",children:t??(A.length===0?jsx("div",{"data-ow-part":"empty",children:jsx(F,{message:w,variant:"text"})}):A.map((U,ke)=>{if(Ku(U))return jsx("div",{"data-ow-part":"separator",role:ee==="menu"?"separator":void 0,className:"h-px bg-[var(--ow-border)] mx-1.5 my-1.5"},U.key??`separator-${ke}`);if(ju(U))return jsx("div",{"data-ow-part":"group",className:"font-medium text-ow-fs-eyebrow leading-none text-[color:var(--ow-eyebrow)] px-2 pt-2 pb-1.5 uppercase tracking-[var(--ow-ls-eyebrow)]",children:U.label},U.key??`group-${ke}`);let j=U,Ie=n===j.key,we=M===j.key&&!j.disabled,le=j.shortcut?g1(j.shortcut):null,ve={id:`${Fe}-${j.key}`,"data-ow-part":"item","data-ow-role":j.danger?"danger":j.selected||Ie?"selected":"default","data-ow-state":we?"highlighted":void 0,role:ee==="menu"?j.selected===void 0?"menuitem":"menuitemcheckbox":void 0,"aria-checked":ee==="menu"&&j.selected!==void 0?j.selected:void 0,className:b1({danger:j.danger,selected:j.selected||Ie,hovered:we,disabled:j.disabled,hasDescription:!!j.description}),onMouseEnter:()=>{T(j.key),j.disabled||a?.(j.key);},onMouseLeave:()=>T(null),onFocus:()=>T(j.key),onClick:()=>{j.disabled||r?.(j.key);}},X=jsxs(Fragment,{children:[j.icon&&jsx("span",{"data-ow-part":"item-icon",className:"w-4 h-4 shrink-0 inline-flex items-center justify-center text-[color:var(--ow-text-3)]",children:j.icon}),jsxs("span",{className:"flex-1 flex flex-col gap-0.5 min-w-0",children:[jsx("span",{className:"flex-1",children:j.label}),j.description&&jsx("span",{className:"text-ow-fs-eyebrow font-normal leading-snug text-[color:var(--ow-text-3)]",children:j.description})]}),le&&le.length>0?jsx(Ei,{"data-ow-part":"shortcut",className:"shrink-0",keys:le}):j.hint&&jsx("span",{"data-ow-part":"hint",className:g("text-ow-fs-eyebrow leading-snug font-normal text-[color:var(--ow-text-3)]",j.hintMono&&"font-[family-name:var(--ow-font-mono)] tabular-nums"),children:j.hint}),j.control&&jsx("span",{"data-ow-part":"item-control",className:"shrink-0 inline-flex items-center",onClick:Ce=>Ce.stopPropagation(),children:j.control}),j.selected&&jsx(be,{"data-ow-part":"check","aria-hidden":"true",className:"w-4 h-4 shrink-0 text-[color:var(--ow-text)]"})]});return j.control?jsx("div",{...ve,ref:Ce=>{Ce?$.current.set(j.key,Ce):$.current.delete(j.key);},tabIndex:-1,"aria-disabled":j.disabled||void 0,children:X},j.key):jsx(f,{...ve,ref:Ce=>{Ce?$.current.set(j.key,Ce):$.current.delete(j.key);},variant:"unstyled",disabled:j.disabled,children:X},j.key)}))}),c&&jsx("div",{"data-ow-part":"footer",className:"border-t border-[color:var(--ow-border)] mt-1 pt-1",children:c})]});return b&&typeof document<"u"?createPortal(Ze,document.body):Ze}function co({trigger:e,open:t,onOpenChange:o,closeOnSelect:r=true,triggerClassName:n="",onSelect:a,...i}){let[d,s]=useState(false),l=t??d,c=useRef(null),p=useRef(null),m=useCallback(k=>{t===void 0&&s(k),o?.(k);},[t,o]),u=useCallback(()=>{c.current?.querySelector("button, [href], [tabindex]:not([tabindex='-1'])")?.focus();},[]),v=useCallback(()=>m(false),[m]),w=useCallback(()=>{m(false),u();},[m,u]),b=useCallback(()=>m(!l),[l,m]);useEffect(()=>{if(!l)return;let k=y=>{let P=y.target;P&&(c.current?.contains(P)||p.current?.contains(P)||m(false));};return document.addEventListener("pointerdown",k,true),()=>document.removeEventListener("pointerdown",k,true)},[l,m]);let h=useRef(false),x={"aria-haspopup":"menu","aria-expanded":l,onClick:k=>{h.current=k.detail===0,b();},onKeyDown:k=>{(k.key==="ArrowDown"||k.key==="ArrowUp")&&(k.preventDefault(),h.current=true,m(true));}};return jsxs("span",{"data-slot":"menu",className:g("inline-flex",n),ref:c,children:[typeof e=="function"?e({open:l,toggle:b,close:v,triggerProps:x}):isValidElement(e)?cloneElement(e,{...x,onClick:k=>{e.props.onClick?.(k),k.defaultPrevented||(h.current=k.detail===0,b());},onKeyDown:k=>{e.props.onKeyDown?.(k),x.onKeyDown(k);}}):e,l&&jsx(pt,{...i,surfaceRef:p,portal:c,autoFocus:h.current?true:"surface",onClose:w,onSelect:k=>{r&&m(false),a?.(k);}})]})}function w1(e){let t=e.parentElement;for(;t&&t!==document.body&&t!==document.documentElement;){let o=getComputedStyle(t),r=o.transform||o.webkitTransform;if(r&&r!=="none"||o.filter&&o.filter!=="none"||o.perspective&&o.perspective!=="none"||o.willChange==="transform"||o.willChange==="filter"||o.willChange==="perspective")return t;t=t.parentElement;}return null}var j7=pt,G7={key:"---",label:""};var k1={info:jsx(Qr,{}),success:jsx(fn,{}),warning:jsx(ur,{}),error:jsx(jo,{})};function J({variant:e="info",tone:t="tint",title:o,children:r,icon:n,meta:a,detail:i,showDetailLabel:d="\u663E\u793A\u8BE6\u60C5",hideDetailLabel:s="\u9690\u85CF\u8BE6\u60C5",action:l,closable:c=false,onClose:p,className:m}){let[u,v]=useState(false),w=!!i?.trim(),b=w?C1(i):"",h=useCallback(()=>v(x=>!x),[]);return jsx("div",{"data-slot":"inline-message","data-variant":e,"data-tone":t,"data-ow-part":"surface","data-ow-role":e,role:e==="error"?"alert":"status",className:g(m),children:jsxs("div",{"data-ow-part":"row",children:[n!==null&&jsx("span",{"data-ow-part":"icon","aria-hidden":"true",children:n??k1[e]}),jsxs("div",{"data-ow-part":"body",children:[o&&jsx("div",{"data-ow-part":"title",children:o}),r&&jsx("div",{"data-ow-part":"text",children:r}),w&&jsxs("div",{"data-ow-part":"detail",children:[jsxs("button",{type:"button","data-ow-part":"detail-toggle","aria-expanded":u,onClick:h,children:[jsx(ae,{className:g("transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",u&&"rotate-180"),"aria-hidden":"true"}),jsx("span",{children:u?s:d})]}),u&&jsxs(Fragment,{children:[jsx("div",{"data-ow-part":"detail-rule"}),jsx("pre",{"data-ow-part":"detail-body",children:b})]})]}),l&&jsx("div",{"data-ow-part":"action",children:l})]}),a&&jsx("span",{"data-ow-part":"meta",children:a}),c&&jsx("button",{type:"button","data-ow-part":"close","aria-label":"\u5173\u95ED\u63D0\u793A",onClick:p,children:jsx(Q,{"aria-hidden":"true"})})]})})}function C1(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function oS({title:e="\u8BF7\u6C42\u9519\u8BEF",message:t="\u8BF7\u6C42\u88AB\u670D\u52A1\u7AEF\u62D2\u7EDD\u3002",retryLabel:o="\u91CD\u8BD5",onRetry:r,retryDisabled:n,detail:a,showDetailLabel:i="\u663E\u793A\u8BE6\u60C5",hideDetailLabel:d="\u9690\u85CF\u8BE6\u60C5",version:s,className:l}){return jsx(J,{variant:"error",title:e,meta:s,detail:a,showDetailLabel:i,hideDetailLabel:d,className:l,action:r?jsx(f,{type:"button",variant:"secondary",size:"sm",onClick:r,disabled:n,"data-ow-part":"retry",className:"bg-transparent border-[color:var(--ow-error-tint-border)] text-[color:var(--ow-error-on-tint)] hover:bg-[var(--ow-error-tint-hover)] hover:text-[color:var(--ow-error-on-tint)] active:bg-[var(--ow-error-tint-hover)]",children:o}):void 0,children:t})}var iS=te;function Zu(e,t){let o=Math.max(0,Math.trunc(e));if(o<=7)return Array.from({length:o},(n,a)=>a+1);let r=Math.min(Math.max(1,Math.trunc(t)),o);return r<=4?[1,2,3,4,5,"ellipsis-end",o]:r>=o-3?[1,"ellipsis-start",o-4,o-3,o-2,o-1,o]:[1,"ellipsis-start",r-1,r,r+1,"ellipsis-end",o]}function wn({current:e,total:t,pageSize:o=10,onChange:r,className:n}){let a=Math.ceil(t/o),i=useCallback(()=>{e>1&&r?.(e-1);},[e,r]),d=useCallback(()=>{e<a&&r?.(e+1);},[e,a,r]);if(a<=1)return null;let s=Zu(a,e);return jsxs("div",{"data-slot":"pagination","data-ow-part":"navigation",className:g("flex items-center gap-1",n),children:[jsx(f,{variant:"ghost",size:"sm",icon:jsx(Kt,{style:{width:14,height:14}}),className:"text-ow-text-2",disabled:e<=1,onClick:i,"aria-label":"\u4E0A\u4E00\u9875"}),s.map(l=>typeof l=="number"?jsx(f,{"data-ow-role":l===e?"active":"inactive",variant:"ghost",size:"sm",className:g("w-7 min-w-7 px-0 text-ow-text-2 font-normal tabular-nums font-[family-name:var(--ow-font-mono)]",l===e&&"bg-ow-surface-2 text-ow-text font-medium border border-[color:var(--ow-border-strong)]"),onClick:()=>r?.(l),"aria-current":l===e?"page":void 0,"aria-label":`\u7B2C ${l} \u9875`,children:l},l):jsx("span",{className:"w-7 text-center text-ow-text-3 text-ow-fs-ui font-normal","aria-hidden":"true",children:"\u2026"},l)),jsx(f,{variant:"ghost",size:"sm",icon:jsx(he,{style:{width:14,height:14}}),className:"text-ow-text-2",disabled:e>=a,onClick:d,"aria-label":"\u4E0B\u4E00\u9875"})]})}function na({value:e=0,size:t="md",tone:o="default",indeterminate:r=false,showValue:n=false,"aria-label":a,className:i,style:d}){let s=Math.min(100,Math.max(0,e));return jsxs("div",{"data-slot":"progress-bar","data-ow-size":t,"data-ow-tone":o,"data-ow-state":r?"indeterminate":"determinate",className:g("flex items-center gap-2 w-full",i),style:d,children:[jsx("div",{"data-ow-part":"track",role:"progressbar","aria-label":a,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r?void 0:Math.round(s),children:jsx("div",{"data-ow-part":"fill",style:r?void 0:{width:`${s}%`}})}),n&&!r&&jsxs("span",{"data-ow-part":"value",children:[Math.round(s),"%"]})]})}var Qu=createContext(null);function _1({checked:e,onChange:t,disabled:o,className:r="",value:n,id:a,"aria-label":i}){let d=useContext(Qu),s=d&&n!==void 0?d.value===n:e??false,l=o??d?.disabled??false,c=useCallback(()=>{l||s||(d&&n!==void 0&&d.onChange(n),t?.(true));},[d,n,s,l,t]);return jsx("button",{id:a,type:"button",role:"radio","aria-checked":s,"aria-label":i,disabled:l,"data-slot":"radio","data-ow-part":"control","data-ow-role":s?"on":"off","data-ow-value":n,className:g("relative inline-flex items-center justify-center w-4 h-4 rounded-full border-[1.5px] p-0 bg-transparent","after:content-[''] after:absolute after:-inset-1 after:rounded-full","transition-[border-color,background-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",s?"border-[color:var(--ow-control-on)]":"border-[color:var(--ow-control-off)] hover:border-[color:var(--ow-border-strong)] active:bg-[var(--ow-press)]",l?"cursor-not-allowed border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)] hover:border-[color:var(--ow-disabled-border)] active:bg-[var(--ow-disabled-bg)]":"cursor-pointer",r),onClick:c,children:s&&jsx("span",{className:g("w-2 h-2 rounded-full",l?"bg-[var(--ow-disabled-text)]":"bg-[var(--ow-control-on)]")})})}function L1({value:e,onChange:t,children:o,disabled:r=false,className:n="","aria-label":a}){let i=useRef(null),d=useCallback(()=>{let l=i.current;return l?Array.from(l.querySelectorAll('[role="radio"]:not(:disabled)')):[]},[]);useEffect(()=>{let l=d();if(l.length===0)return;let c=l.findIndex(p=>p.getAttribute("aria-checked")==="true");l.forEach((p,m)=>{p.tabIndex=m===(c>=0?c:0)?0:-1;});});let s=useCallback(l=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(l.key))return;let p=d();if(p.length===0)return;let m=p.indexOf(l.target),u;l.key==="Home"?u=0:l.key==="End"?u=p.length-1:l.key==="ArrowRight"||l.key==="ArrowDown"?u=m<0?0:(m+1)%p.length:u=m<0?0:(m-1+p.length)%p.length,l.preventDefault();let v=p[u];if(!v)return;v.focus();let w=v.getAttribute("data-ow-value");w!==null&&w!==e&&t(w);},[d,t,e]);return jsx(Qu.Provider,{value:{value:e,onChange:t,disabled:r},children:jsx("div",{ref:i,"data-slot":"radio-group",className:g("flex flex-col gap-2",n),role:"radiogroup","aria-label":a,onKeyDown:s,children:o})})}function Ht({options:e,value:t,defaultValue:o,onChange:r,size:n="md",variant:a="well",disabled:i=false,className:d,"aria-label":s}){let[l,c]=useState(o??e[0]?.value??""),p=t??l,m=useRef(null),u=useCallback(b=>{i||b===p||(c(b),r?.(b));},[i,p,r]),v=useCallback(()=>{let b=m.current;return b?Array.from(b.querySelectorAll('[role="radio"]:not(:disabled)')):[]},[]);useEffect(()=>{let b=v();if(b.length===0)return;let h=b.findIndex(x=>x.getAttribute("aria-checked")==="true");b.forEach((x,k)=>{x.tabIndex=k===(h>=0?h:0)?0:-1;});});let w=useCallback(b=>{if(!["ArrowRight","ArrowLeft","Home","End"].includes(b.key))return;let x=v();if(x.length===0)return;let k=x.indexOf(b.target),y;b.key==="Home"?y=0:b.key==="End"?y=x.length-1:b.key==="ArrowRight"?y=k<0?0:(k+1)%x.length:y=k<0?0:(k-1+x.length)%x.length,b.preventDefault();let P=x[y];if(!P)return;P.focus();let N=P.getAttribute("data-ow-value");N!==null&&u(N);},[v,u]);return jsx("div",{ref:m,role:"radiogroup","aria-label":s,"data-slot":"segmented-control","data-size":n,"data-variant":a,"data-ow-part":"control",onKeyDown:w,className:g("inline-flex items-stretch gap-0.5 p-0.5 [border-radius:var(--ow-radius-sm)]",a==="well"?"bg-[var(--ow-surface-2)]":"bg-transparent border border-[color:var(--ow-border)]",i&&"cursor-not-allowed",d),children:e.map(b=>{let h=p===b.value,x=i||b.disabled;return jsxs("button",{type:"button",role:"radio","aria-checked":h,disabled:x,"data-ow-part":"segment","data-ow-role":h?"on":"off","data-ow-value":b.value,onClick:()=>u(b.value),className:g("inline-flex items-center justify-center gap-1.5 px-2.5 border-none",n==="sm"?"h-6":"h-7",a==="well"?"[border-radius:var(--ow-radius-xs)]":"[border-radius:var(--ow-radius-2xs)]",a==="well"?"text-[length:var(--ow-fs-ui)]":"text-[length:var(--ow-fs-caption)]","leading-none whitespace-nowrap","transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring focus-visible:relative focus-visible:z-[1]",h?g("font-medium text-[color:var(--ow-text)]",a==="well"?"bg-[var(--ow-segment-on-bg)]":"bg-[var(--ow-current-bg)]"):"bg-transparent font-normal text-[color:var(--ow-text-2)] hover:text-[color:var(--ow-text)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",x?"cursor-not-allowed text-[color:var(--ow-disabled-text)] hover:text-[color:var(--ow-disabled-text)] hover:bg-transparent active:bg-transparent":"cursor-pointer"),children:[b.icon&&jsx("span",{className:"inline-flex items-center justify-center w-3.5 h-3.5 [&>svg]:w-full [&>svg]:h-full",children:b.icon}),b.label]},b.value)})})}var V1=cva(["w-full cursor-pointer flex items-center text-left font-normal relative","border bg-[var(--ow-input-bg)] text-[color:var(--ow-input-text)]","transition-[background-color,border-color,color,box-shadow] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring","disabled:cursor-not-allowed disabled:bg-[var(--ow-input-disabled-bg)] disabled:border-[color:var(--ow-disabled-border)] disabled:text-[color:var(--ow-input-disabled-text)]","[border-radius:var(--ow-radius-control)]"].join(" "),{variants:{open:{true:"border-[color:var(--ow-input-border-focus)]",false:"border-[color:var(--ow-input-border)] hover:border-[color:var(--ow-input-border-hover)]"},size:{sm:"h-7 pr-8 pl-3 text-ow-fs-ui",md:"h-8 pr-9 pl-3.5 text-ow-fs-ui",lg:"h-10 pr-10 pl-4 text-ow-fs-ui"}},defaultVariants:{open:false,size:"md"}}),F1=cva(["absolute left-0 right-0 z-[var(--ow-z-dropdown)] p-1.5 max-h-[264px] overflow-y-auto","bg-[var(--ow-popover-bg)] border border-ow-border","shadow-[var(--ow-shadow-pop)]","[border-radius:var(--ow-radius-menu)]"].join(" "),{variants:{position:{down:"top-[calc(100%+4px)]",up:"bottom-[calc(100%+4px)]"}},defaultVariants:{position:"down"}}),$1=cva(["w-full flex items-center gap-2 min-h-8 px-2 py-1.5 border-none bg-transparent cursor-pointer text-left text-ow-fs-ui font-normal leading-snug","text-[color:var(--ow-text)]","[border-radius:var(--ow-radius-control)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]"].join(" "),{variants:{active:{true:"bg-[var(--ow-hover-pop)]",false:""}},defaultVariants:{active:false}}),Yd=forwardRef(function({open:t=false,size:o="md",children:r,className:n,...a},i){return jsxs("button",{ref:i,type:"button","data-ow-part":"control","data-ow-role":t?"open":"closed",className:g(V1({open:t,size:o}),n),"aria-haspopup":"listbox","aria-expanded":t,...a,children:[jsx("span",{className:"flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:r}),jsx(ae,{className:g("absolute right-3 top-1/2 w-4 h-4 text-[color:var(--ow-text-3)] -translate-y-1/2 pointer-events-none","transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",t&&"rotate-180"),"aria-hidden":"true"})]})});function br({value:e,options:t,onChange:o,placeholder:r="\u8BF7\u9009\u62E9",disabled:n=false,size:a="md",footer:i,className:d}){let[s,l]=useState(false),[c,p]=useState(false),[m,u]=useState(-1),v=useRef(null),w=useRef(null),b=useRef(null),h=useId(),x=t.find(R=>R.value===e),k=R=>`${h}-opt-${R}`;useEffect(()=>{if(!s)return;let R=T=>{v.current&&!v.current.contains(T.target)&&l(false);},M=T=>{T.key==="Escape"&&(l(false),w.current?.focus());};return document.addEventListener("mousedown",R,true),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",R,true),document.removeEventListener("keydown",M);}},[s]),useEffect(()=>{!s||m<0||b.current?.querySelector(`[data-index="${m}"]`)?.scrollIntoView({block:"nearest"});},[s,m]);let y=()=>{if(n)return;if(w.current){let M=w.current.getBoundingClientRect();p(window.innerHeight-M.bottom<300);}let R=t.findIndex(M=>M.value===e);u(R>=0?R:0),l(true);},P=()=>{n||(s?l(false):y());},N=R=>{o(R),l(false),w.current?.focus();},S=R=>{if(!n){if(!s){(R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),y());return}switch(R.key){case "ArrowDown":R.preventDefault(),u(M=>Math.min(M+1,t.length-1));break;case "ArrowUp":R.preventDefault(),u(M=>Math.max((M<0?t.length:M)-1,0));break;case "Home":R.preventDefault(),u(0);break;case "End":R.preventDefault(),u(t.length-1);break;case "Enter":case " ":{R.preventDefault();let M=t[m];M?N(M.value):l(false);break}case "Tab":l(false);break}}};return jsxs("div",{"data-slot":"select","data-ow-part":"control",className:g("relative",s&&"z-[var(--ow-z-dropdown)]",d),ref:v,children:[jsx(Yd,{ref:w,open:s,size:a,disabled:n,onClick:P,onKeyDown:S,"aria-controls":s?h:void 0,"aria-activedescendant":s&&m>=0?k(m):void 0,children:x?x.label:n?r:jsx("span",{className:"text-[color:var(--ow-placeholder)]",children:r})}),s&&jsxs("div",{ref:b,id:h,"data-ow-part":"list",className:F1({position:c?"up":"down"}),role:"listbox",children:[t.map((R,M)=>jsxs("button",{id:k(M),type:"button",role:"option",tabIndex:-1,"aria-selected":R.value===e,"data-index":M,"data-ow-role":R.value===e?"selected":"option",className:$1({active:M===m}),onMouseDown:T=>T.preventDefault(),onMouseEnter:()=>u(M),onClick:()=>N(R.value),children:[jsxs("span",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{className:g("overflow-hidden text-ellipsis whitespace-nowrap",R.value===e&&"font-medium"),children:R.label}),R.sub&&jsx("span",{className:"text-ow-fs-eyebrow font-normal leading-snug text-[color:var(--ow-text-3)] overflow-hidden text-ellipsis whitespace-nowrap",children:R.sub})]}),R.value===e&&jsx(be,{className:"shrink-0 w-4 h-4 text-[color:var(--ow-text)]","aria-hidden":"true"})]},R.value)),i]})]})}function po({checked:e,defaultChecked:t=false,onChange:o,disabled:r,className:n="",id:a,"aria-label":i}){let[d,s]=useState(t),l=e??d,c=useCallback(()=>{if(r)return;let p=!l;s(p),o?.(p);},[l,r,o]);return jsx("button",{id:a,type:"button",role:"switch","aria-checked":l,"aria-label":i,disabled:r,"data-slot":"switch","data-ow-part":"control","data-ow-role":l?"on":"off",className:g("relative inline-flex items-center w-9 h-5 rounded-full border-none p-0","after:content-[''] after:absolute after:-inset-y-0.5 after:inset-x-0","transition-[background-color] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",l?"bg-[var(--ow-control-on)]":"bg-[var(--ow-control-off)] hover:bg-[var(--ow-border-strong)]",r?"cursor-not-allowed bg-[var(--ow-disabled-bg)] hover:bg-[var(--ow-disabled-bg)] border border-solid border-[color:var(--ow-disabled-border)]":"cursor-pointer",n),onClick:c,children:jsx("span",{className:g("block rounded-full","transition-[transform,background-color] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",r?"w-3.5 h-3.5 bg-[var(--ow-disabled-text)]":"w-4 h-4",!r&&(l?"bg-[var(--ow-control-on-glyph)]":"bg-[var(--ow-control-knob)]"),l?"translate-x-[18px]":"translate-x-0.5")})})}var K1=cva("flex items-end",{variants:{size:{sm:"gap-1",md:"gap-1",lg:"gap-4"}},defaultVariants:{size:"md"}}),j1=cva(["relative inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap","border-0 bg-transparent rounded-none cursor-pointer font-normal","transition-[color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring","after:pointer-events-none after:absolute after:inset-x-0 after:h-0.5 after:content-['']","after:transition-[background-color] after:duration-[var(--ow-dur-1)] after:ease-[var(--ow-ease-beacon)]","aria-selected:text-[color:var(--ow-text)] aria-selected:font-medium aria-selected:after:bg-[var(--ow-text)]","disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent disabled:after:bg-transparent","disabled:cursor-default disabled:pointer-events-none"].join(" "),{variants:{size:{sm:"h-7 px-2 text-ow-fs-ui text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text-2)] after:bottom-0",md:"h-8 px-2.5 text-ow-fs-ui text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text-2)] after:bottom-0",lg:"h-9 px-0.5 text-ow-fs-ui text-[color:var(--ow-text-2)] hover:text-[color:var(--ow-text)] after:-bottom-px after:rounded-full"}},defaultVariants:{size:"md"}}),G1=cva("inline-flex items-center justify-center",{variants:{size:{sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-3.5 h-3.5"}},defaultVariants:{size:"md"}});function uo({items:e,activeKey:t,defaultActiveKey:o,onChange:r,variant:n="default",size:a="md",className:i}){let[d,s]=useState(o||e[0]?.key||""),l=t??d,c=useCallback(p=>{s(p),r?.(p);},[r]);return jsx("div",{"data-slot":"tabs","data-variant":n,"data-size":a,"data-ow-part":"navigation",className:g(K1({size:a}),i),role:"tablist",children:e.map(p=>jsxs(f,{type:"button",role:"tab","data-ow-part":"tab","data-ow-role":l===p.key?"active":"inactive","aria-selected":l===p.key,disabled:p.disabled,title:p.title,variant:"unstyled",className:j1({size:a}),onClick:()=>c(p.key),children:[p.icon&&jsx("span",{className:g(G1({size:a}),"[&>svg]:w-full [&>svg]:h-full"),children:p.icon}),p.label]},p.key))})}var Y1={copy:jsx(Tt,{}),regenerate:jsx(We,{}),speak:jsx(Sd,{}),like:jsx(mn,{}),dislike:jsx(Gs,{}),share:jsx(lo,{}),branch:jsx(Po,{}),preview:jsx(oo,{}),quote:jsx(Td,{})},X1={copy:"\u590D\u5236",regenerate:"\u91CD\u65B0\u751F\u6210",speak:"\u6717\u8BFB",like:"\u8D5E",dislike:"\u8E29",share:"\u5206\u4EAB",branch:"\u65B0\u5EFA\u5206\u652F",preview:"\u67E5\u770B Markdown",quote:"\u5F15\u7528\u5230\u8F93\u5165\u6846"},Q1=["copy","regenerate","speak","like","dislike","share"];function hn({actions:e=Q1,items:t,onAction:o,visible:r=false,time:n,trailing:a,className:i=""}){let d=t??e.map(s=>({key:s,label:X1[s],icon:Y1[s],onSelect:()=>o?.(s)}));return jsxs("div",{"data-slot":"message-actions","data-visible":r?"true":"false",className:g("flex items-center gap-[var(--ow-space-05,2px)]",n!=null&&"w-full","transition-opacity duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",r?"opacity-100":["opacity-0 pointer-events-none","group-hover/turn:opacity-100 group-hover/turn:pointer-events-auto","group-focus-within/turn:opacity-100 group-focus-within/turn:pointer-events-auto","focus-within:opacity-100 focus-within:pointer-events-auto"].join(" "),i),children:[d.map(s=>jsx(J1,{item:s},s.key)),n!=null&&jsxs(Fragment,{children:[jsx("span",{"data-ow-part":"time-spacer","aria-hidden":"true",className:"flex-1"}),jsx("span",{"data-ow-part":"time",className:g("mr-[var(--ow-space-1,4px)] shrink-0 whitespace-nowrap","font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-fs-mark-md text-[color:var(--ow-text-3)]","transition-opacity duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",r?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 focus-within:opacity-100"),children:n})]}),a]})}function J1({item:e}){let t=useCallback(()=>e.onSelect?.(),[e]),o=e.done?e.doneLabel??e.label:e.label;return jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"action","data-state":e.done?"done":e.active?"active":"rest","aria-label":o,title:o,"aria-pressed":e.active,disabled:e.disabled,onClick:t,className:g("[&_svg]:w-4 [&_svg]:h-4",e.done?"text-[color:var(--ow-success)]":e.active?"text-[color:var(--ow-text)]":"text-[color:var(--ow-text-3)]"),icon:e.done?e.doneIcon??jsx(be,{}):e.icon})}var th=["copy","regenerate","speak","like","dislike","share"];function y8({actions:e=th,onAction:t,className:o=""}){return jsx(hn,{actions:e,onAction:r=>t?.(r),visible:true,className:`mt-1 ${o}`})}function S8({running:e=false,className:t="",children:o,...r}){return jsx("span",{"data-slot":"action-status","data-ow-state":e?"running":void 0,className:g("text-ow-text-3 font-normal font-[family-name:var(--ow-font-sans)]",t),...r,children:o})}function _8({prompt:e,status:t="pending",questionCount:o=1,recap:r=[],onAnswer:n,onSkip:a,answerLabel:i="\u53BB\u56DE\u7B54",skipLabel:d="\u8DF3\u8FC7"}){if(t==="skipped")return jsx("div",{className:"clarify clarify--done clarify--skipped",children:jsxs("div",{className:"clarify__head",children:[jsx("span",{className:"ic",children:jsx(Q,{})}),jsxs("div",{className:"hd-meta",children:[jsx("span",{className:"t",children:"\u5DF2\u8DF3\u8FC7\u63D0\u95EE"}),jsx("span",{className:"s",children:"\u4F60\u53EF\u4EE5\u5728\u4E0B\u65B9\u8F93\u5165\u6846\u76F4\u63A5\u63CF\u8FF0\u9700\u6C42"})]})]})});if(t==="submitted")return jsxs("div",{className:"clarify clarify--done",children:[jsxs("div",{className:"clarify__head",children:[jsx("span",{className:"ic",children:jsx(be,{})}),jsxs("div",{className:"hd-meta",children:[jsx("span",{className:"t",children:"\u5DF2\u786E\u8BA4\u9700\u6C42"}),jsx("span",{className:"s",children:"Orbitwork \u5C06\u636E\u6B64\u5236\u5B9A\u8BA1\u5212"})]})]}),r.length>0&&jsx("div",{className:"clarify__recap",children:r.map((l,c)=>jsxs("div",{className:"cr-row",children:[jsx("span",{className:"cq",children:l.q}),jsx("span",{className:"ca",children:l.a})]},c))})]});let s=n!=null||a!=null;return jsxs("div",{className:"io-leadin io-leadin--ask",children:[jsx("span",{className:"io-ic ask",children:jsx(Ar,{})}),jsxs("div",{className:"io-meta",children:[jsx("span",{className:"t",children:e}),jsx("span",{className:"s",children:o>1?jsxs(Fragment,{children:["\u8BF7\u5728\u4E0B\u65B9\u5BF9\u8BDD\u6846\u9010\u9898\u56DE\u7B54 \xB7 \u5171 ",jsx("span",{className:"ow-font-mono",children:o})," \u9898"]}):"\u8BF7\u5728\u4E0B\u65B9\u5BF9\u8BDD\u6846\u56DE\u7B54"})]}),s?jsxs("div",{className:"io-leadin__acts",children:[n&&jsx(f,{variant:"primary",size:"sm",onClick:n,children:i}),a&&jsx(f,{variant:"ghost",size:"sm",onClick:a,children:d})]}):jsx(Ci,{className:"io-arrow"})]})}var nh="flex items-center gap-3 min-w-0 max-sm:flex-col max-sm:items-start",Qd="assistant-card__icon shrink-0 w-6 h-6",ih="assistant-card__main flex-1 min-w-0 flex flex-col gap-1",sh="assistant-card__title-row flex items-center gap-2 min-w-0",lh="assistant-card__title min-w-0 truncate font-semibold text-ow-fs-title-sm leading-[1.4] text-ow-text font-[family-name:var(--ow-font-sans)]",dh="assistant-card__desc font-normal text-ow-fs-caption leading-[1.5] text-ow-text-3 font-[family-name:var(--ow-font-sans)]",ch="assistant-actions shrink-0 flex items-center justify-end gap-2 max-sm:w-full",ph={dingtalk:{title:"\u9489\u9489",description:"\u63A5\u6536\u9489\u9489\u79C1\u804A\u4E0E\u7FA4\u804A\u6D88\u606F\uFF0C\u5E76\u63A5\u5165 Orbitwork \u4F1A\u8BDD\u3002",icon:jsx(Pi,{className:Qd})},feishu:{title:"\u98DE\u4E66",description:"\u63A5\u6536\u98DE\u4E66\u79C1\u804A\u4E0E\u7FA4\u804A\u6D88\u606F\uFF0C\u5E76\u63A5\u5165 Orbitwork \u4F1A\u8BDD\u3002",icon:jsx(Ri,{className:Qd})},wecom:{title:"\u4F01\u4E1A\u5FAE\u4FE1",description:"\u63A5\u6536\u4F01\u4E1A\u5FAE\u4FE1\u79C1\u804A\u4E0E\u7FA4\u804A\u6D88\u606F\uFF0C\u5E76\u63A5\u5165 Orbitwork \u4F1A\u8BDD\u3002",icon:jsx(Ti,{className:Qd})}};function A8({platform:e,connected:t,enabled:o,loading:r=false,busy:n=false,onConfigure:a,onToggle:i}){let d=ph[e];return jsx(zt,{children:jsxs("div",{"data-ow-part":"head",className:`assistant-card__head ${nh}`,children:[d.icon,jsxs("div",{"data-ow-part":"labels",className:ih,children:[jsxs("div",{className:sh,children:[jsx("div",{className:lh,children:d.title}),t&&jsx(at,{variant:o?"success":"normal",dot:true,children:o?"\u5DF2\u8FDE\u63A5":"\u5DF2\u505C\u6B62"})]}),jsx("div",{className:dh,children:d.description})]}),jsxs("div",{"data-ow-part":"action",className:ch,children:[jsx(f,{variant:"secondary",onClick:a,loading:r,disabled:n,children:"\u914D\u7F6E"}),t&&i&&jsx(po,{checked:o,onChange:i,disabled:n})]})]})})}var mh=cva(["relative flex w-full box-border items-center text-left","border border-[color:transparent]","transition-[background-color,color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]"].join(" "),{variants:{density:{default:"min-h-10 gap-3 px-3 py-2",compact:"min-h-8 gap-2 px-2.5 py-1"},surface:{base:"[border-radius:0px]",pop:"[border-radius:var(--ow-radius-control)]"},divider:{true:"[[data-slot=list-row]+&]:border-t-[color:var(--ow-border)]",false:""},interactive:{true:"cursor-pointer",false:""},disabled:{true:"cursor-not-allowed",false:""},selected:{true:"bg-[var(--ow-selected-bg)] border-[color:var(--ow-border-strong)] [[data-slot=list-row]+&]:border-t-[color:var(--ow-border-strong)]",false:"bg-transparent"}},compoundVariants:[{interactive:true,disabled:false,surface:"base",className:"hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]"},{interactive:true,disabled:false,surface:"pop",className:"hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]"}],defaultVariants:{density:"default",surface:"base",divider:true,interactive:false,disabled:false,selected:false}}),fh=["switch","checkbox"];function dt({icon:e,title:t,description:o,control:r="none",action:n,checked:a,indeterminate:i,onCheckedChange:d,density:s="default",surface:l="base",divider:c,onClick:p,selected:m=false,disabled:u=false,controlAriaLabel:v,className:w}){let b=c??l==="base",h=n!=null,x=!h&&fh.includes(r),k=!!p&&!u,y=k&&!x&&!h,P=v??(typeof t=="string"?t:void 0),N=h?n:r==="switch"?jsx(po,{checked:a,onChange:d,disabled:u,"aria-label":P}):r==="checkbox"?jsx(Ro,{checked:a,indeterminate:i,onChange:d,disabled:u,"aria-label":P}):r==="chevron"?jsx(he,{className:g("w-4 h-4",u?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-3)]"),"aria-hidden":"true"}):null,S=jsxs(Fragment,{children:[e&&jsx("span",{"data-ow-part":"icon","aria-hidden":"true",className:g("shrink-0 inline-flex items-center justify-center w-4 h-4 [&>svg]:w-4 [&>svg]:h-4",u?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-3)]"),children:e}),jsxs("span",{"data-ow-part":"labels",className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"title",className:g("text-ow-fs-ui font-medium leading-[1.3] truncate",u?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text)]"),children:t}),o!=null&&o!==false&&jsx("span",{"data-ow-part":"description",className:g("text-ow-fs-body-sm font-normal leading-[1.4] min-w-0",u?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-2)]"),children:o})]}),(m||N!=null)&&jsxs("span",{"data-ow-part":"action",className:"shrink-0 inline-flex items-center gap-2",children:[m&&jsx("span",{"data-ow-part":"selected-check","aria-hidden":"true",className:"shrink-0 inline-flex items-center justify-center w-4 h-4 text-[color:var(--ow-control-on)] [&>svg]:w-4 [&>svg]:h-4",children:jsx(be,{})}),N]})]}),R=g(mh({density:s,surface:l,divider:b,interactive:k,disabled:u,selected:m}),y&&"ow-focus-ring",w),M={"data-slot":"list-row","data-density":s,"data-surface":l,"data-ow-part":"surface","data-ow-state":g(u&&"disabled",m&&"selected",k&&"interactive").trim()||void 0};return y?jsx("button",{type:"button",...M,className:R,disabled:u,"aria-current":m||void 0,onClick:p,children:S}):jsx("div",{...M,className:R,"aria-disabled":u||void 0,onClick:k?p:void 0,children:S})}function H8({label:e,children:t,className:o}){return jsx("div",{"data-slot":"list-row-group",role:e?"group":void 0,"aria-label":e,className:g("flex flex-col w-full min-w-0",o),children:t})}function j8({title:e,description:t,checked:o,onChange:r,disabled:n}){return jsx(dt,{title:e,description:t,control:"switch",checked:o,onCheckedChange:r,disabled:n,divider:false,className:"px-0"})}var bh={dockerfile:"DKR","docker-compose.yml":"DKR","docker-compose.yaml":"DKR",".dockerignore":"DKR",".gitignore":"GIT",".gitattributes":"GIT",".env":"ENV",".env.example":"ENV","package.json":"NPM","package-lock.json":"NPM","pnpm-lock.yaml":"PNPM",makefile:"MAKE","go.mod":"GO","go.sum":"GO","cargo.toml":"RS","cargo.lock":"RS"},wh={markdown:"MD",jpeg:"JPG",javascript:"JS",typescript:"TS",python:"PY",shell:"SH",config:"CFG",properties:"CFG"},hh={image:"IMG",video:"VID",audio:"AUD",pdf:"PDF",md:"MD",zip:"ZIP",doc:"DOC",xls:"XLS",ppt:"PPT",text:"TXT",code:"CODE"};function xh(e){return e.toUpperCase().slice(0,4)}function tc(e,t){let o=e.toLowerCase(),r=bh[o];if(r)return {label:r};let n=o.lastIndexOf(".");if(n>0){let a=o.slice(n+1),i=wh[a];if(i)return {label:i};if(a&&/^[a-z0-9]+$/.test(a))return {label:xh(a)}}if(t){let a=hh[t];if(a)return {label:a}}return null}function yh(e){return e<=2?"5.2":e===3?"4.4":"3.6"}function qo({name:e,kind:t,label:o,className:r="",width:n=15,height:a=15}){let i=o?.trim().toUpperCase().slice(0,4),d=i?{label:i}:tc(e,t);return jsxs("svg",{viewBox:"0 0 16 16",className:r,width:n,height:a,"aria-hidden":"true",children:[jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round",strokeLinecap:"round",children:[jsx("path",{d:"M8.4 1.6H4.6a1 1 0 0 0-1 1v10.8a1 1 0 0 0 1 1h6.8a1 1 0 0 0 1-1V5.6L8.4 1.6Z"}),jsx("path",{d:"M8.4 1.6v3a1 1 0 0 0 1 1h3"})]}),d?jsxs(Fragment,{children:[jsx("rect",{x:"5.4",y:"9.4",width:"10.2",height:"6",rx:"1.4",fill:"var(--ow-surface-2)"}),jsx("text",{x:"10.5",y:"13.75",textAnchor:"middle",fontSize:yh(d.label.length),fontWeight:"600",fontFamily:"var(--ow-font-mono, ui-monospace, monospace)",style:{fontVariantNumeric:"tabular-nums"},fill:"var(--ow-text-2)",children:d.label})]}):null]})}function ic(e){let t=(e.match(/\.([A-Za-z0-9]+)(?::\d+)?$/)?.[1]??"").toLowerCase();return t==="md"||t==="markdown"?{badge:"MD",label:"Markdown",tone:"markdown"}:["ppt","pptx"].includes(t)?{badge:"P",label:"\u6F14\u793A\u6587\u7A3F",tone:"presentation"}:["doc","docx"].includes(t)?{badge:"W",label:"\u6587\u6863",tone:"document"}:["xls","xlsx","csv"].includes(t)?{badge:"X",label:"\u8868\u683C",tone:"spreadsheet"}:["png","jpg","jpeg","gif","webp","bmp","svg","heic","heif","tif","tiff"].includes(t)?{badge:"IMG",label:"\u56FE\u7247",tone:"image"}:["mp4","mov","webm","avi","mkv"].includes(t)?{badge:"VID",label:"\u89C6\u9891",tone:"video"}:t==="pdf"?{badge:"PDF",label:"PDF",tone:"pdf"}:t==="html"||t==="htm"?{badge:"HTML",label:"\u7F51\u9875",tone:"web"}:["py","ts","tsx","js","jsx","go","rs","java","cpp","c","h","css","json","yaml","yml"].includes(t)?{badge:t.toUpperCase().slice(0,3),label:"\u4EE3\u7801",tone:"code"}:{badge:t?t.toUpperCase().slice(0,3):"FILE",label:"\u6587\u4EF6",tone:"file"}}function Nh(e){let t=ic(e.path||e.name);return {badge:(e.badge??t.badge).trim().toUpperCase().slice(0,4)||"FILE",label:e.typeLabel??t.label,tone:t.tone}}function sm(e){return e.kind!=="divider"&&e.kind!=="header"}function Sh(e){let t=e.filter(o=>o.kind==="app");return t.length===0||t.every(o=>!!(o.iconUrl||o.iconName||o.icon))}function lm(e,t){return `${e.id}::${sm(e)?e.path??"":t}`}function Ph(e){return e.iconUrl?jsx("img",{src:e.iconUrl,alt:"",className:"w-4 h-4 object-contain [border-radius:var(--ow-radius-2xs)]","aria-hidden":"true"}):e.iconName?jsx(ta,{name:e.iconName,size:15}):e.icon??null}function Rh(e){return e.map((t,o)=>{let r=lm(t,o);return t.kind==="divider"?{type:"separator",key:r}:t.kind==="header"?{type:"group",key:r,label:t.name}:{key:r,label:t.name,icon:Ph(t),disabled:t.disabled}})}function Th(e,t,o){let[r,n]=useState([]),[a,i]=useState(false),[d,s]=useState(false),l=useRef(t);l.current=t;let c=useRef(e);c.current=e;let p=useRef(null);useEffect(()=>{p.current=null,n([]),s(false),i(false);},[t,e]),useEffect(()=>{if(!o||!e)return;let u=false,v=()=>{if(u)return;let b=l.current,h;try{h=Promise.resolve(e());}catch{return}p.current={key:b,request:h},h.catch(()=>{p.current?.request===h&&(p.current=null);});};if(typeof window.requestIdleCallback=="function"){let b=window.requestIdleCallback(v,{timeout:800});return ()=>{u=true,window.cancelIdleCallback(b);}}let w=window.setTimeout(v,150);return ()=>{u=true,window.clearTimeout(w);}},[o,e,t]);let m=useCallback(async()=>{let u=c.current;if(!u||d)return;let v=l.current,w=k=>{if(l.current!==v)return true;n(k);let y=Sh(k);return s(y),y},b=()=>{let k;try{k=u();}catch{return}Promise.resolve(k).then(y=>{w(y);}).catch(()=>{});},h=p.current,x=h&&h.key===v?h.request:u();if(Array.isArray(x)){let k=w(x);p.current=null,k||b();return}i(true);try{let k=w(await x);p.current?.request===x&&(p.current=null),k||b();}finally{i(false);}},[d]);return {options:r,loading:a,load:m}}function Oi({label:e="\u6253\u5F00\u65B9\u5F0F",iconName:t,options:o,onRequestOptions:r,optionsKey:n,onSelect:a,onOpen:i,onNativeMenu:d,triggerVariant:s="secondary",triggerSize:l="sm",iconOnly:c=false,disabled:p=false,width:m=180,className:u}){let[v,w]=useState(false),b=Th(r,n,!!r&&!d),h=r?b.options:o??[],x=useMemo(()=>Rh(h),[h]),k=useMemo(()=>{let N=new Map;return h.forEach((S,R)=>{sm(S)&&N.set(lm(S,R),S);}),N},[h]),y=!r&&!d&&h.length===0,P=N=>jsxs(f,{variant:s,size:l,type:"button","data-slot":"open-with","data-ow-part":"action",disabled:p,className:g(c?"w-7 h-7 p-0":"gap-1 px-2",u),"aria-label":c?e:void 0,title:c?e:void 0,onClick:N,children:[t&&jsx(ta,{name:t,size:14}),c?jsx(ta,{name:"More",size:16,"aria-hidden":"true"}):jsx("span",{children:e}),!c&&!y&&jsx(ta,{name:"ChevDown",size:13,"aria-hidden":"true"})]});return y?P(i):d?P(d):jsx(co,{trigger:P(),triggerClassName:"inline-flex",open:v,onOpenChange:N=>{w(N),N&&b.load();},items:x,onSelect:N=>{let S=k.get(N);S&&a?.(S);},empty:b.loading?"\u52A0\u8F7D\u4E2D":"\u6682\u65E0\u6253\u5F00\u65B9\u5F0F",align:"end",width:m,ariaLabel:e,className:"max-h-[min(280px,calc(100vh-16px))] overflow-y-auto"})}var im="min-w-0 text-[length:var(--ow-fs-ui)] font-medium leading-snug text-[color:var(--ow-text)] overflow-hidden text-ellipsis",dm="font-[family-name:var(--ow-font-mono)] tabular-nums text-[length:var(--ow-fs-eyebrow)] leading-snug text-[color:var(--ow-text-3)]",ol=`min-w-0 truncate ${dm}`,Mh=`shrink-0 max-w-full truncate ${dm}`;function _h(e,t){let o=e.split("\xB7").map(i=>i.trim());if(o.length<2||o.some(i=>!i))return {head:"",reading:e};let r=o[o.length-1]??e,n=o.slice(0,-1),a=(n[0]??"").toUpperCase();return t!==null&&(a.startsWith(t)||t.startsWith(a))&&n.shift(),{head:n.join(" \xB7 "),reading:r}}function rc({onClick:e,disabled:t}){return jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"remove",className:"w-7 h-7 p-0 shrink-0","aria-label":"\u79FB\u9664\u9644\u4EF6",title:"\u79FB\u9664\u9644\u4EF6",disabled:t,onClick:o=>{o.stopPropagation(),e();},icon:jsx(ta,{name:"Close",size:14})})}function ac({onClick:e,disabled:t}){return jsx(f,{variant:"text",size:"sm",type:"button","data-ow-part":"retry",className:"shrink-0",disabled:t,onClick:o=>{o.stopPropagation(),e();},children:"\u91CD\u8BD5"})}function nc({name:e,progress:t}){return jsx(na,{value:t,size:"sm","aria-label":`${e} \u4E0A\u4F20\u8FDB\u5EA6`,className:"mt-1"})}function ia({name:e,path:t,variant:o="card",meta:r,kind:n,badge:a,thumbnail:i,caption:d,placeholder:s,status:l="done",progress:c=0,errorText:p="\u4E0A\u4F20\u5931\u8D25",disabled:m=false,onOpen:u,onRetry:v,onRemove:w,actions:b,onRequestActions:h,onAction:x,onNativeActionsMenu:k,actionsLabel:y="\u6253\u5F00\u65B9\u5F0F",className:P}){let N=Math.max(0,Math.min(100,Math.round(c))),S=Nh({name:e,path:t??e}),R=l==="uploading"?`\u4E0A\u4F20\u4E2D ${N}%`:r??S.label,M=l==="error"?p:R,T=!!u&&!m,D=!!(b?.length||h||k)?jsx(Oi,{label:y,options:b,onRequestOptions:h,optionsKey:t??e,onSelect:x,onNativeMenu:k,disabled:m,iconOnly:o!=="card",triggerVariant:o==="card"?"secondary":"ghost"}):null;if(o==="image"||o==="media"){let H=o==="media";return jsxs("div",{"data-slot":"attachment","data-ow-variant":o,"data-ow-state":l,title:t??e,className:g("group relative box-border overflow-hidden border [border-radius:var(--ow-radius-card)]","bg-[var(--ow-surface)]","transition-[border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",H?"w-full max-w-[420px]":"w-28 h-28 shrink-0",l==="error"?"border-[color:var(--ow-error)]":"border-[color:var(--ow-border)]",T&&"cursor-pointer ow-focus-ring",P),role:T?"button":void 0,tabIndex:T?0:void 0,"aria-label":T?`\u6253\u5F00 ${e}`:void 0,onClick:T?u:void 0,onKeyDown:T?$=>{$.target===$.currentTarget&&($.key==="Enter"||$.key===" ")&&($.preventDefault(),u?.());}:void 0,children:[jsx("div",{"data-ow-part":"media",className:g("w-full overflow-hidden",H?"h-[200px]":"h-full"),children:i?jsx("img",{src:i,alt:d||e,className:"w-full h-full object-cover"}):jsx("span",{"data-ow-part":"placeholder",className:"flex w-full h-full items-center justify-center bg-[var(--ow-surface-2)] px-2 text-center",children:jsx("span",{className:ol,children:s??e})})}),H&&d&&jsx("div",{"data-ow-part":"caption",className:"py-2.5 px-3.5 text-[length:var(--ow-fs-caption)] leading-snug text-[color:var(--ow-text-2)]",children:d}),l==="uploading"&&jsxs("div",{"data-ow-part":"upload",className:"absolute inset-x-0 bottom-0 px-2 pb-2",children:[jsxs("span",{className:g(ol,"block text-[color:var(--ow-on-fill)]"),children:["\u4E0A\u4F20\u4E2D ",N,"%"]}),jsx(nc,{name:e,progress:N})]}),(w||l==="error"&&v||D)&&jsx("span",{"data-ow-part":"overlay",className:g("pointer-events-none absolute inset-0 flex items-start justify-end p-1.5","bg-[var(--ow-scrim)] text-[color:var(--ow-on-fill)]","opacity-0 transition-opacity duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","group-hover:opacity-100 group-focus-within:opacity-100"),children:jsxs("span",{"data-ow-part":"actions",className:"pointer-events-auto flex items-center gap-1",onClick:$=>$.stopPropagation(),onKeyDown:$=>$.stopPropagation(),children:[l==="error"&&v&&jsx(ac,{onClick:v,disabled:m}),D,w&&jsx(rc,{onClick:w,disabled:m})]})}),l==="error"&&jsx("span",{"data-ow-part":"error",className:"absolute inset-x-0 bottom-0 truncate bg-[var(--ow-error-tint)] px-2 py-1 text-[length:var(--ow-fs-eyebrow)] leading-snug text-[color:var(--ow-error-on-tint)]",children:p})]})}if(o==="tile"){let H=a?.trim().toUpperCase().slice(0,4)||tc(e,n)?.label||null,$=_h(M,H);return jsxs("div",{"data-slot":"attachment","data-ow-variant":"tile","data-ow-state":l,title:t??e,className:g("group relative box-border flex w-28 h-28 shrink-0 flex-col justify-between gap-1 p-3.5","border [border-radius:var(--ow-radius-card)]","transition-[background-color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",l==="error"?"border-[color:var(--ow-error-tint-border)] bg-[var(--ow-error-tint)]":"border-[color:var(--ow-border)] bg-[var(--ow-surface)]",m&&"border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)]",P),children:[jsx("span",{"data-ow-part":"name",className:g(im,"[display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] [overflow-wrap:anywhere]",m&&"text-[color:var(--ow-disabled-text)]"),children:e}),jsxs("span",{"data-ow-part":"meta",className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[jsx(qo,{name:e,kind:n,label:a,className:"shrink-0 text-[color:var(--ow-text-2)]",width:15,height:15}),$.head&&jsxs("span",{className:g(ol,l==="error"&&"text-[color:var(--ow-error-on-tint)]",m&&"text-[color:var(--ow-disabled-text)]"),children:[$.head," \xB7"]}),jsx("span",{className:g(Mh,l==="error"&&"text-[color:var(--ow-error-on-tint)]",m&&"text-[color:var(--ow-disabled-text)]"),children:$.reading})]}),l==="uploading"&&jsx(nc,{name:e,progress:N}),(w||l==="error"&&v||D)&&jsxs("span",{"data-ow-part":"actions",className:g("absolute top-1 right-1 flex items-center gap-0.5","[border-radius:var(--ow-radius-2xs)]",l==="error"?"bg-[var(--ow-error-tint)]":m?"bg-[var(--ow-disabled-bg)]":"bg-[var(--ow-surface)]","opacity-0 transition-opacity duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","group-hover:opacity-100 group-focus-within:opacity-100"),children:[l==="error"&&v&&jsx(ac,{onClick:v,disabled:m}),D,w&&jsx(rc,{onClick:w,disabled:m})]})]})}let I=jsxs("span",{"data-ow-part":"content",className:"grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-3 text-left",children:[jsx(qo,{name:e,kind:n,label:a,className:g("shrink-0 text-[color:var(--ow-text-2)]",m&&"text-[color:var(--ow-disabled-text)]"),width:28,height:28}),jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"name",className:g(im,"whitespace-nowrap",m&&"text-[color:var(--ow-disabled-text)]"),children:e}),M&&jsx("span",{"data-ow-part":"meta",className:g(ol,l==="error"&&"text-[color:var(--ow-error-on-tint)]",m&&"text-[color:var(--ow-disabled-text)]"),children:M})]})]});return jsxs("div",{"data-slot":"attachment","data-ow-variant":"card","data-ow-state":l,title:t??e,className:g("box-border grid w-full min-h-[62px] grid-cols-[minmax(0,1fr)_auto] items-center gap-3 p-3.5","border [border-radius:var(--ow-radius-card)] text-[color:var(--ow-text)]","transition-[background-color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",l==="error"?"border-[color:var(--ow-error-tint-border)] bg-[var(--ow-error-tint)]":"border-[color:var(--ow-border)] bg-[var(--ow-surface)]",m&&"border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)]",P),children:[jsxs("span",{className:"grid min-w-0 gap-1",children:[T?jsx(f,{variant:"unstyled",type:"button","data-ow-part":"main",disabled:m,className:"ow-focus-ring grid min-w-0 cursor-pointer p-0 text-left [border-radius:var(--ow-radius-control)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",onClick:u,children:I}):I,l==="uploading"&&jsx(nc,{name:e,progress:N})]}),(D||w||l==="error"&&v)&&jsxs("span",{"data-ow-part":"actions",className:"inline-flex items-center gap-1.5",children:[l==="error"&&v&&jsx(ac,{onClick:v,disabled:m}),D,w&&jsx(rc,{onClick:w,disabled:m})]})]})}function xn({layout:e="strip",empty:t,children:o,className:r,"aria-label":n}){let a=o==null||Array.isArray(o)&&o.length===0;return a&&!t?null:jsx("div",{"data-slot":"attachment-list","data-ow-variant":e,"aria-label":n,className:g(e==="strip"?"flex gap-2 overflow-x-auto overflow-y-hidden":"flex w-full max-w-[520px] flex-col gap-2",r),children:a?jsx(F,{message:t,markSize:28}):o})}var Lh={uploading:"uploading",completed:"done",error:"error"};function lP({name:e,size:t,type:o="doc",thumbnail:r,status:n="completed",progress:a=0,onRemove:i,onRetry:d,onPreview:s,className:l=""}){let c=o.toUpperCase();return jsx(ia,{variant:r?"image":"tile",name:e,meta:t?`${c} \xB7 ${t}`:c,kind:o,thumbnail:r,status:Lh[n],progress:a,onOpen:s,onRetry:d,onRemove:i,className:l})}function dP({children:e,className:t=""}){return jsx(xn,{layout:"strip",className:t,children:e})}var Dh={sm:16,md:16,lg:20};function go({children:e,label:t="\u8FD4\u56DE",size:o="md",className:r,...n}){let a=Dh[o],i=e==null;return jsx(f,{variant:"ghost",size:o,"data-slot":"back-button","aria-label":i?t:void 0,title:t,className:g(r),icon:jsx(Kt,{width:a,height:a,"aria-hidden":"true"}),...n,children:e})}var Eh={info:jsx(Qr,{}),warning:jsx(ur,{}),error:jsx(jo,{})},Ih={info:"bg-[var(--ow-info-tint)] border-[color:var(--ow-info-tint-border)] text-[color:var(--ow-info-on-tint)]",warning:"bg-[var(--ow-warning-tint)] border-[color:var(--ow-warning-tint-border)] text-[color:var(--ow-warning-on-tint)]",error:"bg-[var(--ow-error-tint)] border-[color:var(--ow-error-tint-border)] text-[color:var(--ow-error-on-tint)]"},Ah={info:"hover:bg-[var(--ow-info-tint-hover)] active:bg-[var(--ow-info-tint-border)]",warning:"hover:bg-[var(--ow-warning-tint-hover)] active:bg-[var(--ow-warning-tint-border)]",error:"hover:bg-[var(--ow-error-tint-hover)] active:bg-[var(--ow-error-tint-border)]"};function Vi({variant:e="info",title:t,children:o,icon:r,action:n,closable:a=false,onClose:i,className:d}){return jsxs("div",{"data-slot":"banner","data-variant":e,"data-ow-part":"surface","data-ow-role":e,role:e==="error"?"alert":"status",className:g("flex w-full items-start gap-2.5 px-3.5 py-2.5 border [border-radius:var(--ow-radius-card)] text-ow-fs-ui leading-[1.4]",Ih[e],d),children:[r!==null&&jsx("span",{"data-ow-part":"icon",className:"inline-flex shrink-0 items-center justify-center w-4 h-4 mt-px [&>svg]:w-4 [&>svg]:h-4","aria-hidden":"true",children:r??Eh[e]}),jsxs("div",{"data-ow-part":"body",className:"flex-1 min-w-0",children:[t&&jsx("div",{"data-ow-part":"title",className:"font-medium",children:t}),o&&jsx("div",{"data-ow-part":"text",className:g(t&&"mt-0.5"),children:o})]}),n&&jsx("span",{"data-ow-part":"action",className:"shrink-0 self-center",children:n}),a&&jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"close","aria-label":"\u5173\u95ED\u6A2A\u5E45",onClick:i,className:g("shrink-0 self-center -mr-1 text-current",Ah[e]),icon:jsx(Q,{className:"w-3.5 h-3.5","aria-hidden":"true"})})]})}var mm={tasks:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M9 6.5h11M9 12h11M9 17.5h11"}),jsx("circle",{cx:"4.2",cy:"6.5",r:"1.1",fill:"currentColor",stroke:"none",opacity:".35"}),jsx("circle",{cx:"4.2",cy:"12",r:"1.5",fill:"currentColor",stroke:"none",opacity:".6"}),jsx("circle",{className:"dot",cx:"4.2",cy:"17.5",r:"2",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M9 6.5h11M9 12h11M9 17.5h11"}),jsx("circle",{cx:"4.2",cy:"6.5",r:"1.3",fill:"currentColor",stroke:"none",opacity:".35"}),jsx("circle",{cx:"4.2",cy:"12",r:"1.7",fill:"currentColor",stroke:"none",opacity:".6"}),jsx("circle",{className:"dot",cx:"4.2",cy:"17.5",r:"2.2",fill:"currentColor",stroke:"none"})]})},agent:{stroke:true,base:jsxs(Fragment,{children:[jsx("rect",{x:"3.5",y:"7.5",width:"17",height:"12.5",rx:"3"}),jsx("path",{d:"M12 4.6V7.5"}),jsx("circle",{className:"dot",cx:"12",cy:"3",r:"1.9",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"9",cy:"13.5",r:"1.1",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"15",cy:"13.5",r:"1.1",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("rect",{x:"3.5",y:"7.5",width:"17",height:"12.5",rx:"3"}),jsx("path",{d:"M12 4.8V7.5"}),jsx("circle",{className:"dot",cx:"12",cy:"3",r:"2.1",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"})]})},history:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M7.4 5.2A8.5 8.5 0 1 1 4 12.9"}),jsx("path",{d:"M12 7.5V12l3.2 1.9"}),jsx("circle",{className:"dot",cx:"3.3",cy:"9.6",r:"1.5",fill:"currentColor",stroke:"none",opacity:".62"}),jsx("circle",{cx:"5.6",cy:"5.7",r:"1.15",fill:"currentColor",stroke:"none",opacity:".38"}),jsx("circle",{cx:"9.2",cy:"3.1",r:".85",fill:"currentColor",stroke:"none",opacity:".22"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M7.4 5.2A8.5 8.5 0 1 1 4 12.9"}),jsx("path",{d:"M12 7.5V12l3.2 1.9"}),jsx("circle",{className:"dot",cx:"3.3",cy:"9.6",r:"1.7",fill:"currentColor",stroke:"none",opacity:".62"}),jsx("circle",{cx:"5.6",cy:"5.7",r:"1.3",fill:"currentColor",stroke:"none",opacity:".38"})]})},share:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M8.3 10.8 15.7 6.9M8.3 13.2l7.4 3.9"}),jsx("circle",{className:"dot",cx:"6",cy:"12",r:"3.1",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"18",cy:"5.6",r:"2.2",fill:"currentColor",stroke:"none",opacity:".5"}),jsx("circle",{cx:"18",cy:"18.4",r:"2.2",fill:"currentColor",stroke:"none",opacity:".5"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M8.3 10.8 15.7 6.9M8.3 13.2l7.4 3.9"}),jsx("circle",{className:"dot",cx:"6",cy:"12",r:"3.3",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"18",cy:"5.6",r:"2.4",fill:"currentColor",stroke:"none",opacity:".5"}),jsx("circle",{cx:"18",cy:"18.4",r:"2.4",fill:"currentColor",stroke:"none",opacity:".5"})]})},branch:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M6 15.4V4"}),jsx("path",{d:"M18 8.6a9 9 0 0 1-9 9"}),jsx("circle",{className:"dot",cx:"6",cy:"18",r:"2.9",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"18",cy:"6",r:"2.4"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M6 15.4V4"}),jsx("path",{d:"M18 8.6a9 9 0 0 1-9 9"}),jsx("circle",{className:"dot",cx:"6",cy:"18",r:"3.1",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"18",cy:"6",r:"2.5"})]})},schedule:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M9.5 2.8h5"}),jsx("circle",{cx:"12",cy:"14",r:"7.6"}),jsx("path",{d:"M12 14 14.9 11.1"}),jsx("circle",{className:"dot",cx:"15.4",cy:"10.6",r:"1.9",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M9.5 2.8h5"}),jsx("circle",{cx:"12",cy:"14",r:"7.6"}),jsx("path",{d:"M12 14 14.9 11.1"}),jsx("circle",{className:"dot",cx:"15.4",cy:"10.6",r:"2.1",fill:"currentColor",stroke:"none"})]})},artifact:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M14 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8.5z"}),jsx("path",{d:"M14 3.5v5h5"}),jsx("circle",{cx:"9",cy:"15.5",r:"1",fill:"currentColor",stroke:"none",opacity:".35"}),jsx("circle",{cx:"12",cy:"15.5",r:"1.35",fill:"currentColor",stroke:"none",opacity:".6"}),jsx("circle",{className:"dot",cx:"15.2",cy:"15.5",r:"1.8",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M14 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8.5z"}),jsx("path",{d:"M14 3.5v5h5"}),jsx("circle",{cx:"9",cy:"15.5",r:"1.2",fill:"currentColor",stroke:"none",opacity:".35"}),jsx("circle",{cx:"12",cy:"15.5",r:"1.5",fill:"currentColor",stroke:"none",opacity:".6"}),jsx("circle",{className:"dot",cx:"15.2",cy:"15.5",r:"2",fill:"currentColor",stroke:"none"})]})},workspace:{stroke:true,base:jsxs(Fragment,{children:[jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsx("path",{d:"M14.5 4v16"}),jsx("circle",{className:"dot",cx:"17.75",cy:"8.2",r:"1.5",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsx("path",{d:"M14.5 4v16"}),jsx("circle",{className:"dot",cx:"17.75",cy:"8.4",r:"1.8",fill:"currentColor",stroke:"none"})]})},loading:{stroke:false,base:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"3.2",fill:"currentColor"}),jsx("circle",{className:"dot",cx:"20",cy:"8",r:"3.4",fill:"currentColor"}),jsx("circle",{cx:"15.6",cy:"3.9",r:"1.6",fill:"currentColor",opacity:".45"}),jsx("circle",{cx:"9.8",cy:"3.3",r:"1.2",fill:"currentColor",opacity:".28"})]}),small:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"3.6",fill:"currentColor"}),jsx("circle",{className:"dot",cx:"20",cy:"8",r:"3.8",fill:"currentColor"})]})}},kP=Object.keys(mm);function fm({name:e,size:t=20,dot:o="off",label:r,className:n}){let a=mm[e],i=t===16,d=["ow-beacon-ic",o==="lit"?"ow-dot-lit":o==="pre"?"ow-dot-pre":"",n??""].filter(Boolean).join(" "),s=a.stroke?{fill:"none",stroke:"currentColor",strokeWidth:i?2.2:1.75,strokeLinecap:"round",strokeLinejoin:"round"}:void 0;return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",className:d,"aria-hidden":r?void 0:true,"aria-label":r,role:r?"img":void 0,...s,children:i?a.small:a.base})}function Vh(e){let[t,o]=useState(e?"spin":"rest");return useEffect(()=>{o(e?"spin":a=>a==="spin"?"finishing":a);},[e]),{phase:t,onAnimationIteration:()=>o(a=>a==="finishing"?"settle":a),onAnimationEnd:()=>o(a=>a==="settle"?"rest":a)}}function gm(e,t){if(e==="spin"||e==="finishing")return `ow-spin ${t} linear infinite`;if(e==="settle")return "ow-spin-settle var(--ow-dur-1, 120ms) var(--ow-ease-beacon)"}function gt({size:e=32,trail:t,satellite:o="var(--ow-beacon)",duration:r,spinning:n=true,"aria-label":a,className:i="",style:d}){let s=e>=20,l=r?`${r}s`:s?"var(--ow-dur-spin, 1.6s)":"var(--ow-dur-spin-fast, 0.9s)",{phase:c,onAnimationIteration:p,onAnimationEnd:m}=Vh(n),u={display:"inline-flex",alignItems:"center",justifyContent:"center",...d},v=a??(n?"\u52A0\u8F7D\u4E2D":"\u5DF2\u505C\u6B62");return jsx("div",{className:`ow-beacon-spinner ow-motion ${i}`,style:u,role:"status","aria-live":"polite",children:s?jsx(Fh,{size:e,trail:t??"var(--ow-text)",satellite:n?o:t??"var(--ow-text)",animation:gm(c,l),onAnimationIteration:p,onAnimationEnd:m,"aria-label":v}):jsx($h,{size:e,trail:t??"currentColor",animation:gm(c,l),onAnimationIteration:p,onAnimationEnd:m,"aria-label":v})})}function Fh({size:e,trail:t,satellite:o,animation:r,onAnimationIteration:n,onAnimationEnd:a,"aria-label":i}){return jsxs("svg",{width:e,height:e,viewBox:"0 0 96 96",role:"img","aria-label":i,style:{display:"block"},children:[jsx("circle",{cx:"48",cy:"48",r:"8.2",fill:t}),jsxs("g",{style:{transformOrigin:"48px 48px",transform:"rotate(24deg)",animation:r},onAnimationIteration:n,onAnimationEnd:a,children:[[[60.2,20.6,6.7,.6],[41.76,18.66,5.5,.45],[25.71,27.93,4.3,.3],[18.16,44.86,3.3,.2]].map(([s,l,c,p],m)=>jsx("circle",{cx:s,cy:l,r:c,fill:t,opacity:p},m)),jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:o})]})]})}function $h({size:e,trail:t,animation:o,onAnimationIteration:r,onAnimationEnd:n,"aria-label":a}){return jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",role:"img","aria-label":a,style:{display:"block"},children:jsx("circle",{cx:"8",cy:"8",r:"6.6",fill:"none",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:"31.1 10.4",style:{transformOrigin:"8px 8px",transform:"rotate(24deg)",animation:o},onAnimationIteration:r,onAnimationEnd:n})})}var zh=[[48,48,8.2,1],[60.2,20.6,6.7,.6],[41.76,18.66,5.5,.45],[25.71,27.93,4.3,.3],[18.16,44.86,3.3,.2]],bm={dark:["#F7F6F1","#FFD23E"],light:["#0F1B3D","#D8A300"],"mono-white":["#F7F6F1","#F7F6F1"],"mono-navy":["#0F1B3D","#0F1B3D"]},Hh="var(--ow-brand-ink, #0F1B3D)",Wh="var(--ow-brand-satellite, #D8A300)",Uh="13 11.7 73.4 45.3",Kh="0 0 96 96",wm=16,hm=new Set;function xm(e,t){typeof process<"u"&&process.env.NODE_ENV!=="production"&&Number.isFinite(t)&&t<wm&&!hm.has(`${e}:${t}`)&&(hm.add(`${e}:${t}`),console.warn(`[Orbitwork DS2] ${e}: \u6E32\u67D3\u5C3A\u5BF8 ${t}px \u4F4E\u4E8E\u54C1\u724C\u6700\u5C0F ${wm}px\uFF08\u89C1 ow/guidelines/brand-mark\uFF09\uFF0C\u8BF7\u589E\u5927 size \u6216\u6539\u7528\u5176\u4ED6\u5448\u73B0\u3002`));}function ym(...e){let t=e.filter(Boolean).join(" ");return t===""?void 0:t}function la({variant:e="dark",size:t=32,frame:o="optical",label:r="Orbitwork",className:n,style:a,...i}){let d=e==="auto",[s,l]=d?[Hh,Wh]:bm[e]??bm.dark,c=o!=="construction",p=c?Math.round(t*45.3/73.4*10)/10:t;return xm("OrbitworkMark",t),jsxs("svg",{width:t,height:p,viewBox:c?Uh:Kh,role:"img","aria-label":r,className:d?ym("ow-brand-auto",n):n,style:a,...i,children:[zh.map(([m,u,v,w],b)=>jsx("circle",{cx:m,cy:u,r:v,fill:s,opacity:w},b)),jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:l})]})}function sc({theme:e="light",size:t=22,bilingual:o=false,label:r="Orbitwork",className:n,style:a,...i}){let d=e==="auto",s=e==="dark",l=d?"var(--ow-brand-ink, #0F1B3D)":s?"#F7F6F1":"#0F1B3D",c=d?"var(--ow-brand-divider, #D8D5CC)":s?"#333B50":"#D8D5CC",p=d?"var(--ow-brand-cn, #3A3E46)":s?"#C9CBD1":"#3A3E46";return xm("OrbitworkLockup",Math.round(t*1.17)),jsxs("span",{role:"img","aria-label":r,className:d?ym("ow-brand-auto",n):n,style:{display:"inline-flex",alignItems:"center",gap:Math.round(t*.4),...a},...i,children:[jsx(la,{variant:d?"auto":s?"dark":"light",size:Math.round(t*1.17),style:{marginBottom:Math.round(t*.12)},"aria-hidden":"true",role:void 0,"aria-label":void 0}),jsx("span",{style:{fontFamily:"var(--ow-font-display, 'Space Grotesk', sans-serif)",fontWeight:500,fontSize:t,letterSpacing:"-0.01em",color:l,lineHeight:1,whiteSpace:"nowrap"},children:"orbitwork"}),o&&jsx("span",{"aria-hidden":"true",style:{width:1,alignSelf:"stretch",background:c}}),o&&jsx("span",{style:{fontFamily:"var(--ow-font-body, sans-serif)",fontWeight:500,fontSize:Math.round(t*.68),letterSpacing:"0.1em",color:p,whiteSpace:"nowrap"},children:"\u6CDB\u821F\u661F\u8F68"})]})}function km({size:e=24,label:t,...o}){let r=typeof e=="number"?e:Number.parseFloat(e),n=Number.isNaN(r)?22:r;return jsx(sc,{theme:"auto",size:n,label:t,"data-component":"orbitwork-logo",...o})}var Fi='a[href],area[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),iframe,[tabindex]:not([tabindex="-1"]),[contenteditable="true"]';function jh(e){return [...e.querySelectorAll(Fi)].filter(t=>t.tabIndex>=0&&t.offsetParent!==null||t===document.activeElement)}function al(e,t){let o=jh(t);if(o.length===0)return e.preventDefault(),t.focus(),true;let r=o.at(0),n=o.at(-1),a=document.activeElement;return !e.shiftKey&&(a===n||!t.contains(a))?(e.preventDefault(),r?.focus(),true):e.shiftKey&&(a===r||!t.contains(a))?(e.preventDefault(),n?.focus(),true):false}var qh={info:"bg-[var(--ow-info-tint)] text-[color:var(--ow-info-on-tint)]",warning:"bg-[var(--ow-warning-tint)] text-[color:var(--ow-warning-on-tint)]",error:"bg-[var(--ow-error-tint)] text-[color:var(--ow-error-on-tint)]"};function oe({open:e,variant:t="default",title:o,subtitle:r,icon:n,iconTone:a,children:i,actions:d,onConfirm:s,confirmLabel:l="\u786E\u8BA4",cancelLabel:c="\u53D6\u6D88",confirmDisabled:p=false,confirmLoading:m=false,onClose:u,closable:v=true,closeOnOverlayClick:w=true,closeOnEscape:b=true,width:h,padded:x=true,bare:k=false,onSubmit:y,ariaLabel:P,className:N="",overlayClassName:S="",portal:R=true,fitViewport:M=true}){let T=useRef(null),_=useRef(null),D=useCallback(Ge=>{T.current=Ge;},[]),I=useId(),H=`${I}-title`,$=`${I}-desc`,E=useCallback(()=>{u?.();},[u]);if(useEffect(()=>{if(!e)return;let Ge=et=>{if(et.key==="Escape"&&b){et.stopPropagation(),E();return}if(et.key!=="Tab")return;let ht=T.current;ht&&al(et,ht);};return document.addEventListener("keydown",Ge,true),()=>document.removeEventListener("keydown",Ge,true)},[e,b,E]),useEffect(()=>{if(!e)return;_.current=document.activeElement??null;let Ge=T.current;return Ge&&!Ge.contains(document.activeElement)&&(Ge.querySelector("[autofocus],[data-autofocus]")??Ge.querySelector(Fi)??Ge).focus(),()=>{_.current?.focus?.();}},[e]),!e||R&&typeof document>"u")return null;let V=!k&&(o!==void 0||v&&!!u),W=!k&&(!!d||!k&&!d&&!!s),ce=n??(t==="danger"?jsx(ur,{"aria-hidden":"true"}):null),Pe=a??(t==="danger"?"error":"plain"),Fe=g("relative box-border outline-none",M&&"max-w-[90vw] max-h-[85vh]",k?M&&"overflow-auto":"flex flex-col overflow-hidden","bg-[var(--ow-popover-bg)] [border-radius:var(--ow-radius-modal)]","border border-[color:var(--ow-border)] shadow-[var(--ow-shadow-modal)]","animate-[fade-in_var(--ow-dur-3)_var(--ow-ease-beacon)]",N),ee=h??(k?void 0:440),q={};ee!==void 0&&(q.width=ee),k||(q.padding=x?"var(--ow-space-6, 24px)":0);let A=jsxs(Fragment,{children:[V&&jsxs("div",{"data-slot":"dialog-header",className:"flex items-start justify-between gap-3 mb-4 flex-shrink-0",children:[jsxs("div",{className:"flex-1 min-w-0 flex items-start gap-3",children:[ce&&jsx("span",{"data-ow-part":"icon","data-ow-tone":Pe,className:g("flex-[0_0_auto] inline-flex items-center justify-center",Pe==="plain"?"w-5 h-5 text-[color:var(--ow-text-2)] [&>svg]:w-5 [&>svg]:h-5":g("w-8 h-8 [border-radius:var(--ow-radius-action)] [&>svg]:w-4 [&>svg]:h-4",qh[Pe])),children:ce}),jsxs("div",{className:"flex-1 min-w-0",children:[o!==void 0&&jsx("div",{id:H,"data-ow-part":"title",className:"text-[color:var(--ow-text)] font-semibold text-ow-fs-subtitle leading-[1.3] font-[family-name:var(--ow-font-sans)]",children:o}),r!==void 0&&jsx("div",{id:$,"data-ow-part":"subtitle",className:"mt-1 text-[color:var(--ow-text-3)] font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:r})]})]}),v&&u&&jsx(f,{variant:"ghost",size:"md",type:"button","data-ow-part":"close",icon:jsx(Q,{}),"aria-label":"\u5173\u95ED",onClick:E})]}),jsx("div",{"data-slot":"dialog-body",className:"flex-1 min-h-0 overflow-y-auto text-[color:var(--ow-text-2)] font-normal text-ow-fs-body leading-6 font-[family-name:var(--ow-font-sans)]",children:i}),W&&jsx("div",{"data-slot":"dialog-actions",className:"flex items-center justify-end gap-3 mt-5 flex-shrink-0",children:d??jsxs(Fragment,{children:[u&&jsx(f,{variant:"secondary",type:"button",onClick:E,children:c}),jsx(f,{variant:t==="danger"?"danger":"primary",type:"button",loading:m,disabled:p,onClick:s,children:l})]})})]}),L={"data-slot":"dialog","data-ow-part":"surface","data-ow-variant":t,role:"dialog","aria-modal":true,"aria-labelledby":o!==void 0?H:void 0,"aria-describedby":r!==void 0?$:void 0,"aria-label":o===void 0?P:void 0,tabIndex:-1,className:Fe,style:q},Y=k?i:A,Ee=jsx("div",{"data-slot":"dialog-overlay","data-ow-part":"overlay",className:g("ow-motion fixed inset-0 flex items-center justify-center p-4","z-[var(--ow-z-modal)] bg-[var(--ow-scrim)]","animate-[fade-in_var(--ow-dur-2)_var(--ow-ease-beacon)]",S),onMouseDown:Ge=>{w&&Ge.target===Ge.currentTarget&&E();},children:y?jsx("form",{...L,ref:D,onSubmit:y,children:Y}):jsx("div",{...L,ref:D,children:Y})});return R?createPortal(Ee,document.body):Ee}function Tm({open:e,onClose:t,children:o,className:r="",overlayClassName:n=""}){return jsx(oe,{bare:true,open:e,onClose:t,className:r,overlayClassName:n,children:o})}function re({variant:e="text",lines:t=3,width:o,height:r,radius:n,circle:a=false,className:i="",style:d}){return e==="line"?jsx("div",{className:`ow-skeleton ow-skeleton--line ${i}`,style:{...za,width:o??"100%",height:r??16,borderRadius:a?"50%":n??"var(--ow-radius-xs)",...d}}):e==="block"?jsx("div",{className:`ow-skeleton ow-skeleton--block ${i}`,style:{...za,width:o??"100%",height:r??80,borderRadius:n??"var(--ow-radius-card)",...d}}):e==="avatar"?jsxs("div",{className:`ow-skeleton ow-skeleton--avatar ${i}`,style:{...Qh,...d},children:[jsx("div",{style:Jh}),jsxs("div",{style:ex,children:[jsx("div",{style:{...za,width:"40%",height:12}}),jsx("div",{style:za})]})]}):e==="card"?jsx("div",{className:`ow-skeleton ow-skeleton--card ${i}`,style:{...za,height:r??120,borderRadius:n??"var(--ow-radius-card)",...d}}):jsx("div",{className:`ow-skeleton ow-skeleton--text ${i}`,style:{...Xh,...d},children:Array.from({length:t}).map((s,l)=>jsx("div",{style:{...za,width:l===1?"88%":l===2?"64%":"100%"}},l))})}var Xh={display:"flex",flexDirection:"column",gap:"var(--ow-space-3)",maxWidth:600},za={height:16,borderRadius:"var(--ow-radius-xs)",background:"var(--ow-hover)",animation:"ow-skeleton 1.6s var(--ow-ease-beacon) infinite"},Qh={display:"flex",gap:"var(--ow-space-3)",alignItems:"flex-start",maxWidth:600},Jh={...za,width:32,height:32,borderRadius:"50%",flexShrink:0},ex={flex:1,display:"flex",flexDirection:"column",gap:"var(--ow-space-2)"};function Lm({count:e=6}){return jsx(Fragment,{children:Array.from({length:e}).map((t,o)=>jsxs("div",{className:"skcard skcard--skeleton","aria-hidden":"true",children:[jsx(re,{variant:"block",width:40,height:40,radius:8,className:"gly"}),jsxs("div",{className:"body",children:[jsx(re,{variant:"line",width:"50%",height:13}),jsx(re,{variant:"line",width:"100%",height:12}),jsx(re,{variant:"line",width:"60%",height:12})]}),jsx(re,{variant:"block",width:72,height:28,radius:8,className:"inst"})]},o))})}function Dm({icon:e,title:t,hint:o,grid:r,size:n,action:a,onClearSearch:i}){let d=!!o?.trim(),s=n??(r&&!i?"page":"md"),l=a?jsx(f,{variant:"primary",size:"md",onClick:a.onClick,children:a.label}):i?jsx(f,{variant:"primary",size:"md",onClick:i,children:"\u6E05\u7A7A\u641C\u7D22"}):void 0;return jsx(F,{className:g(r?"plaza__empty":"connector-empty",s!=="page"&&"py-16"),size:s,title:d?t:void 0,message:d?o:t,action:l})}var lc=6;function dc(e){return `var(--ow-data-${(e%lc+lc)%lc+1})`}var ox="var(--ow-data-today)",Em="h-1.5 w-1.5 [border-radius:var(--ow-radius-pill)] bg-[var(--ow-data-today)]",zi="text-ow-fs-mark-md leading-none text-[color:var(--ow-text-3)] font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]";function Im(e){return Math.abs(e)>=1e4?`${(e/1e4).toFixed(1)}\u4E07`:e.toLocaleString("zh-CN")}function Am({count:e}){return e<=0?null:jsx("div",{"aria-hidden":"true",className:"absolute inset-0 flex flex-col justify-between pointer-events-none",children:Array.from({length:e+1},(t,o)=>jsx("div",{className:"h-px w-full bg-[var(--ow-border)]"},o))})}function JP({data:e,orientation:t="vertical",max:o,formatValue:r=Im,showValues:n=false,gridLines:a=4,height:i=160,todayIndex:d,loading:s=false,emptyMessage:l="\u8FD8\u6CA1\u6709\u6570\u636E",ariaLabel:c,className:p}){if(s)return jsx("div",{"data-slot":"bar-chart","data-ow-state":"loading",className:p,"aria-busy":"true",children:jsx(re,{variant:"block",height:i})});if(e.length===0)return jsx("div",{"data-slot":"bar-chart","data-ow-state":"empty",className:p,children:jsx(F,{message:l})});let m=o??(Math.max(...e.map(w=>w.value),0)||1),u=w=>Math.max(0,Math.min(1,w/m)),v=(w,b)=>dc(w.series??b);return t==="horizontal"?jsx("div",{"data-slot":"bar-chart","data-ow-orientation":"horizontal",role:"img","aria-label":c,className:g("flex flex-col gap-2.5 w-full",p),children:e.map((w,b)=>jsxs("div",{"data-ow-part":"bar-row",className:"flex flex-col gap-1",children:[jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[jsx("span",{className:"text-ow-fs-ui text-[color:var(--ow-text-2)] min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:w.label}),n&&jsx("span",{className:zi,children:r(w.value)})]}),jsx("div",{"data-ow-part":"track",className:"relative h-1.5 w-full overflow-hidden bg-[var(--ow-progress-track)] [border-radius:var(--ow-radius-pill)]",children:jsx("div",{"data-ow-part":"fill","data-ow-role":b===d?"today":void 0,className:"relative h-full [border-radius:var(--ow-radius-pill)] transition-[width] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",style:{width:`${u(w.value)*100}%`,background:v(w,b)},children:b===d&&jsx("span",{"aria-hidden":"true","data-ow-part":"today-marker",className:g(Em,"absolute right-0 top-0 h-full w-1.5")})})})]},w.label))}):jsxs("div",{"data-slot":"bar-chart","data-ow-orientation":"vertical",role:"img","aria-label":c,className:g("flex flex-col gap-2 w-full",p),children:[jsxs("div",{className:"relative w-full",style:{height:i},children:[jsx(Am,{count:a}),jsx("div",{className:"relative flex h-full w-full items-end gap-2",children:e.map((w,b)=>jsxs("div",{"data-ow-part":"bar-col",className:"flex flex-1 min-w-0 flex-col items-center gap-1 h-full justify-end",children:[n&&jsx("span",{className:zi,children:r(w.value)}),b===d&&jsx("span",{"aria-hidden":"true","data-ow-part":"today-marker",className:Em}),jsx("div",{"data-ow-part":"bar","data-ow-role":b===d?"today":void 0,className:"w-full max-w-10 [border-radius:var(--ow-radius-2xs)] transition-[height] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",style:{height:`${u(w.value)*100}%`,minHeight:w.value>0?2:0,background:v(w,b)}})]},w.label))})]}),jsx("div",{className:"flex w-full gap-2",children:e.map(w=>jsx("span",{className:g(zi,"flex-1 min-w-0 text-center overflow-hidden text-ellipsis whitespace-nowrap"),children:w.label},w.label))})]})}function eR({labels:e,series:t,area:o=false,height:r=160,gridLines:n=4,min:a,max:i,formatValue:d=Im,legend:s=false,todayIndex:l,loading:c=false,emptyMessage:p="\u8FD8\u6CA1\u6709\u6570\u636E",ariaLabel:m,className:u}){if(c)return jsx("div",{"data-slot":"series-chart","data-ow-state":"loading",className:u,"aria-busy":"true",children:jsx(re,{variant:"block",height:r})});if(!t.some(N=>N.points.length>0))return jsx("div",{"data-slot":"series-chart","data-ow-state":"empty",className:u,children:jsx(F,{message:p})});let w=t.flatMap(N=>N.points),b=a??Math.min(...w,0),x=(i??Math.max(...w,b+1))-b||1,k=Math.max(...t.map(N=>N.points.length)),y=N=>k<=1?50:N/(k-1)*100,P=N=>100-(N-b)/x*100;return jsxs("div",{"data-slot":"series-chart",role:"img","aria-label":m,className:g("flex flex-col gap-2 w-full",u),children:[jsxs("div",{className:"relative w-full",style:{height:r},children:[jsx(Am,{count:n}),jsxs("svg",{className:"relative block h-full w-full overflow-visible",viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",children:[jsx("desc",{children:"\u65F6\u5E8F\u6298\u7EBF\u56FE\uFF1A\u5404\u7CFB\u5217\u4E00\u6761\u6298\u7EBF\uFF0C\u7EB5\u8F74\u6309\u6700\u5C0F\u5230\u6700\u5927\u503C\u7B49\u6BD4\u6620\u5C04\u3002"}),t.map((N,S)=>{let R=dc(N.series??S),M=N.points.map((T,_)=>`${y(_)},${P(T)}`).join(" ");return jsxs("g",{children:[o&&N.points.length>1&&jsx("polygon",{points:`${y(0)},100 ${M} ${y(N.points.length-1)},100`,fill:R,opacity:"0.12"}),jsx("polyline",{points:M,fill:"none",stroke:R,strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]},N.name)})]}),l!==void 0&&t.map(N=>{let S=N.points[l];return S===void 0?null:jsx("span",{"data-ow-part":"today-marker","aria-hidden":"true",className:"absolute w-2 h-2 -translate-x-1/2 -translate-y-1/2 [border-radius:var(--ow-radius-pill)] [outline:1.5px_solid_var(--ow-data-today)] [outline-offset:2px]",style:{left:`${y(l)}%`,top:`${P(S)}%`,background:ox}},`today-${N.name}`)})]}),jsx("div",{className:"flex w-full gap-2",children:e.map(N=>jsx("span",{className:g(zi,"flex-1 min-w-0 text-center overflow-hidden text-ellipsis whitespace-nowrap"),children:N},N))}),s&&jsx("div",{"data-ow-part":"legend",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5",children:t.map((N,S)=>jsxs("span",{className:"inline-flex items-center gap-1.5 text-ow-fs-ui text-[color:var(--ow-text-2)]",children:[jsx("span",{"aria-hidden":"true",className:"w-2.5 h-0.5 shrink-0 [border-radius:var(--ow-radius-pill)]",style:{background:dc(N.series??S)}}),N.name,jsx("span",{className:zi,children:d(N.points[N.points.length-1]??0)})]},N.name))})]})}var Vm="orbitwork-ds2",ix=createCssVariablesTheme({name:Vm,variablePrefix:"--ow-shiki-",fontStyle:true}),Bm=new Map,sx=e=>{let t=Bm.get(e);if(t)return t;let o=createHighlighter({langs:[e],themes:[ix],engine:createJavaScriptRegexEngine()});return Bm.set(e,o),o},Om=new Map,lx=(e,t)=>{let o=e.slice(0,100),r=e.length>100?e.slice(-100):"";return `${t}:${e.length}:${o}:${r}`},yn=new Map,ca=e=>({bg:"transparent",fg:"inherit",tokens:e.split(`
|
|
2
|
-
`).map(t=>t===""?[]:[{color:"inherit",content:t}])}),
|
|
3
|
-
`:e.tokens.map(({token:r,key:n})=>jsx(
|
|
4
|
-
`),o=[],r=0,n=0;for(let a of t){if(a.startsWith("---")||a.startsWith("+++")||a.startsWith("diff ")||a.startsWith("index "))continue;let i=
|
|
1
|
+
import {A,u,x,t,s,a as a$1,q,p,n}from'./chunk-3KT7IU4X.js';export{u as BUILTIN_ORBITWORK_SKINS,m as DS2_LOCKED_SLOT_SELECTORS,g as DS2_SKIN_DENIED_PROPERTIES,j as DS2_SKIN_DENIED_VALUE_PATTERNS,f as DS2_SKIN_DENYLIST,a as HEX_COLOR,b as MAX_ORBITWORK_SKIN_IMAGE_BYTES,e as ORBITWORK_SKIN_CSS_VARIABLES,A as THEME_OPTIONS,w as analyzeSkinCSS,x as applyOrbitworkSkin,x as applyScopedOrbitworkSkin,s as assertKnownKeys,o as ds2ContrastRatio,i as findDs2DeniedCssProperty,l as findDs2DeniedCssValue,y as getActiveSkinId,p as hasOrbitworkSkinChatBackground,z as hasSkinActive,h as isDs2SkinDeniedProperty,n as isDs2SkinDeniedToken,k as isDs2SkinDeniedValue,t as isRecord,d as orbitworkSkinChatBackgroundMaskColor,r as orbitworkSkinImageCssValue,q as parseOrbitworkSkin,c as resolveOrbitworkSkinChatBackgroundMask,v as sanitizeSkinCSSBasic}from'./chunk-3KT7IU4X.js';export{a as renderAboutWindowHtml}from'./chunk-VG7FQQ7K.js';import {b,a}from'./chunk-7YJY64LZ.js';export{b as BROWSER_ANNOTATION_POPUP_STYLES,a as BROWSER_ANNOTATION_PROPERTY_DEFS}from'./chunk-7YJY64LZ.js';import {cva}from'class-variance-authority';import {clsx}from'clsx';import {extendTailwindMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {forwardRef,useId,createContext,memo,useMemo,useRef,useState,useEffect,useCallback,useImperativeHandle,isValidElement,cloneElement,useLayoutEffect,useContext,Fragment as Fragment$1,Children}from'react';import {createPortal}from'react-dom';import {createHighlighter}from'shiki';import {createCssVariablesTheme}from'shiki/core';import {createJavaScriptRegexEngine}from'shiki/engine/javascript';import M6 from'rc-tree';var ku=extendTailwindMerge({extend:{classGroups:{"font-size":[{text:[e=>e.startsWith("ow-fs-")]}]}}});function g(...e){return ku(clsx(e))}var sw=cva("inline-flex items-center justify-center font-semibold tracking-wide shrink-0 overflow-hidden",{variants:{size:{sm:"w-6 h-6 text-ow-fs-mark-sm",md:"w-8 h-8 text-ow-fs-ui",lg:"w-10 h-10 text-ow-fs-subtitle",xl:"w-12 h-12 text-ow-fs-title-lg"},shape:{person:"rounded-full",agent:"[border-radius:var(--ow-radius-sm)]"}},defaultVariants:{size:"md",shape:"person"}}),lw={brand:"data-5",steel:"data-1",clay:"data-4",moss:"data-2",ink:"agent"},dw=6,cw=[[10,"--ow-fs-mark-sm"],[11,"--ow-fs-mark-md"],[12,"--ow-fs-caption"],[13,"--ow-fs-ui"],[14,"--ow-fs-body"],[16,"--ow-fs-subtitle"],[19,"--ow-fs-title-lg"],[22,"--ow-fs-title"]];function pw(e){let t=[13,"--ow-fs-ui"];for(let o of cw)Math.abs(o[0]-e)<Math.abs(t[0]-e)&&(t=o);return `var(${t[1]})`}function pn(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return `data-${(t>>>0)%dw+1}`}function uw(e,t){return e?lw[e]??e:t?pn(t):"data-1"}function un({children:e,size:t="md",id:o,variant:r,className:n,style:a}){let i=uw(r,o),d=i==="agent",s=d?"var(--ow-avatar-agent-bg)":`var(--ow-${i})`,l=d?"var(--ow-avatar-agent-text)":"var(--ow-on-fill)",c=d?"agent":"person",p=typeof t=="number",m=p?{width:t,height:t,fontSize:pw(t*.4),background:s,color:l,lineHeight:1,...a}:{background:s,color:l,lineHeight:1,...a};return jsx("span",{"data-slot":"avatar","data-variant":i,"data-ow-part":"image",className:g(sw({size:p?null:t,shape:c}),n),style:m,children:e})}var We=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M4.25 11.9998H11.9981M19.75 11.9998L11.9981 11.9998M11.9981 11.9998V4.25M11.9981 11.9998L11.9981 19.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),ne=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M3.75 8.75L11.1161 16.1161C11.6043 16.6043 12.3957 16.6043 12.8839 16.1161L20.25 8.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),he=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M9.25 20.25L16.6161 12.8839C17.1043 12.3957 17.1043 11.6043 16.6161 11.1161L9.25 3.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Ia=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("rect",{x:"3.5",y:"7.5",width:"17",height:"12.5",rx:"3"}),jsx("path",{d:"M12 4.6V7.5"})]}),jsx("circle",{className:"dot",cx:"12",cy:"3",r:"1.9",fill:"currentColor"}),jsx("circle",{cx:"9",cy:"13.5",r:"1.1",fill:"currentColor"}),jsx("circle",{cx:"15",cy:"13.5",r:"1.1",fill:"currentColor"})]}),oo=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M14 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8.5z"}),jsx("path",{d:"M14 3.5v5h5"})]}),jsx("circle",{cx:"9",cy:"15.5",r:"1",fill:"currentColor",opacity:".35"}),jsx("circle",{cx:"12",cy:"15.5",r:"1.35",fill:"currentColor",opacity:".6"}),jsx("circle",{className:"dot",cx:"15.2",cy:"15.5",r:"1.8",fill:"currentColor"})]}),yi=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M18 20C19.1046 20 20 19.1046 20 18C20 16.8954 19.1046 16 18 16C16.8954 16 16 16.8954 16 18C16 19.1046 16.8954 20 18 20Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),hd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"6.75",y:"3",width:"10.5",height:"12.5",rx:"5.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M11.9999 18.003V20.9995M11.9999 18.003C15.1304 18.003 17.8876 16.4046 19.5 13.9795M11.9999 18.003C8.8695 18.003 6.1124 16.4048 4.5 13.9798M11.9999 20.9995H7.75M11.9999 20.9995H16.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),mn=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 19V5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M5 12L12 5L19 12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),be=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M3.50999 12.8601L7.57586 16.926C8.25928 17.6094 9.36731 17.6094 10.0507 16.926L20.4806 6.49615",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Aa=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 3L13.5 7.5L18 9L13.5 10.5L12 15L10.5 10.5L6 9L10.5 7.5L12 3Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M19 16L19.7 18L21.7 18.7L19.7 19.4L19 21.4L18.3 19.4L16.3 18.7L18.3 18L19 16Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),xd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M9 6.5h11M9 12h11M9 17.5h11",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("circle",{cx:"4.2",cy:"6.5",r:"1.1",fill:"currentColor",opacity:".35"}),jsx("circle",{cx:"4.2",cy:"12",r:"1.5",fill:"currentColor",opacity:".6"}),jsx("circle",{className:"dot",cx:"4.2",cy:"17.5",r:"2",fill:"currentColor"})]}),yd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M10.5 2.86603C11.4282 2.33013 12.5718 2.33013 13.5 2.86603L19.1603 6.13397C20.0885 6.66987 20.6603 7.66025 20.6603 8.73205V15.2679C20.6603 16.3397 20.0885 17.3301 19.1603 17.866L13.5 21.134C12.5718 21.6699 11.4282 21.6699 10.5 21.134L4.83975 17.866C3.91154 17.3301 3.33975 16.3397 3.33975 15.2679V8.73205C3.33975 7.66025 3.91154 6.66987 4.83975 6.13397L10.5 2.86603Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("circle",{cx:"12",cy:"12",r:"3.125",stroke:"currentColor",strokeWidth:"1.75"})]}),Ba=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"4.5",y:"4.5",width:"15",height:"15",rx:"3.5",stroke:"currentColor",strokeWidth:"1.75"}),jsx("rect",{x:"9.25",y:"9.25",width:"5.5",height:"5.5",rx:"1",fill:"currentColor"})]}),$t=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"11",cy:"11",r:"7.5",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M19.5 19.5L16.5 16.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),js=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"11",cy:"11",r:"7.5",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M19.5 19.5L16.5 16.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M11 7.75V14.25M7.75 11H14.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),Gs=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"11",cy:"11",r:"7.5",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M19.5 19.5L16.5 16.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M7.75 11H14.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),Cu=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M20.5 12A8.5 8.5 0 1 1 18.01 5.99",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M20.5 4.5V10H15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),yt=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M13.0208 4.31965L4.48056 12.8596C4.01173 13.3284 3.74833 13.9642 3.7483 14.6272L3.74812 17.9983C3.74808 18.6887 4.3077 19.2483 4.99805 19.2484L8.36899 19.2485C9.03243 19.2486 9.66868 18.9849 10.1376 18.5156L18.6741 9.97206C19.3045 9.34121 19.5531 8.41545 19.1367 7.62682C18.8011 6.99119 18.2893 6.20609 17.5381 5.45486C16.7871 4.70386 16.0022 4.1921 15.3667 3.85652C14.5778 3.43994 13.6517 3.68882 13.0208 4.31965Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M14.0001 19.2551H20.5001",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),kd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 13.5C12.8284 13.5 13.5 12.8284 13.5 12C13.5 11.1716 12.8284 10.5 12 10.5C11.1716 10.5 10.5 11.1716 10.5 12C10.5 12.8284 11.1716 13.5 12 13.5Z",fill:"currentColor"}),jsx("path",{d:"M9.17154 14.8284C13.0768 18.7337 17.5089 20.6332 19.071 19.0711C20.6331 17.509 18.7336 13.0768 14.8284 9.17159C10.9231 5.26635 6.49099 3.36685 4.9289 4.92895C3.3668 6.49105 5.26629 10.9232 9.17154 14.8284Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M14.8284 14.8284C18.7336 10.9232 20.6331 6.491 19.071 4.92891C17.5089 3.36681 13.0768 5.2663 9.17153 9.17155C5.26629 13.0768 3.36679 17.5089 4.92889 19.071C6.49099 20.6331 10.9231 18.7336 14.8284 14.8284Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),ki=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M9 4C8.20435 4 7.44129 4.31607 6.87868 4.87868C6.31607 5.44129 6 6.20435 6 7V8C5.44093 8.04266 4.905 8.24114 4.45301 8.57293C4.00103 8.90472 3.65106 9.35654 3.44283 9.87713C3.23459 10.3977 3.17641 10.9663 3.2749 11.5182C3.37338 12.0702 3.62458 12.5835 4 13C3.62458 13.4165 3.37338 13.9298 3.2749 14.4818C3.17641 15.0337 3.23459 15.6023 3.44283 16.1229C3.65106 16.6435 4.00103 17.0953 4.45301 17.4271C4.905 17.7589 5.44093 17.9573 6 18V19C6 19.7956 6.31607 20.5587 6.87868 21.1213C7.44129 21.6839 8.20435 22 9 22",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M15 4C15.7956 4 16.5587 4.31607 17.1213 4.87868C17.6839 5.44129 18 6.20435 18 7V8C18.5591 8.04266 19.095 8.24114 19.547 8.57293C19.999 8.90472 20.3489 9.35654 20.5572 9.87713C20.7654 10.3977 20.8236 10.9663 20.7251 11.5182C20.6266 12.0702 20.3754 12.5835 20 13C20.3754 13.4165 20.6266 13.9298 20.7251 14.4818C20.8236 15.0337 20.7654 15.6023 20.5572 16.1229C20.3489 16.6435 19.999 17.0953 19.547 17.4271C19.095 17.7589 18.5591 17.9573 18 18V19C18 19.7956 17.6839 20.5587 17.1213 21.1213C16.5587 21.6839 15.7956 22 15 22",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M9 4V22M15 4V22",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),mr=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M4.5 5.69359V18.1519C4.5 19.613 5.64231 20.8186 7.10221 20.8779C8.60598 20.9391 10.4924 21.0005 12 21.0005C13.5076 21.0005 15.394 20.9391 16.8978 20.8779C18.3577 20.8186 19.5 19.613 19.5 18.1519V5.69359C19.5 4.29722 18.4513 3.14607 17.0561 3.08945C15.8692 3.04128 14.2113 3.00049 12 3.00049C9.78873 3.00049 8.13082 3.04128 6.94388 3.08945C5.54866 3.14607 4.5 4.29722 4.5 5.69359Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M14 15.0996C14.4971 15.0996 14.9004 15.5029 14.9004 16C14.9004 16.4971 14.4971 16.9004 14 16.9004H8C7.50294 16.9004 7.09961 16.4971 7.09961 16C7.09961 15.5029 7.50294 15.0996 8 15.0996H14ZM16 11.0996C16.4971 11.0996 16.9004 11.5029 16.9004 12C16.9004 12.4971 16.4971 12.9004 16 12.9004H8C7.50294 12.9004 7.09961 12.4971 7.09961 12C7.09961 11.5029 7.50294 11.0996 8 11.0996H16ZM16 7.09961C16.4971 7.09961 16.9004 7.50294 16.9004 8C16.9004 8.49706 16.4971 8.90039 16 8.90039H8C7.50294 8.90039 7.09961 8.49706 7.09961 8C7.09961 7.50294 7.50294 7.09961 8 7.09961H16Z",fill:"currentColor"})]}),Q=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M5.45914 18.5405L11.9984 12.0012M18.5406 5.45903L11.9984 12.0012M11.9984 12.0012L5.45785 5.46067M11.9984 12.0012L18.5393 18.5421",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Tt=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M14.25 3.25H7C5.48122 3.25 4.25 4.48122 4.25 6V16.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M17.5 5.75H9C7.75736 5.75 6.75 6.75736 6.75 8V19C6.75 20.2426 7.75736 21.25 9 21.25H17.5C18.7426 21.25 19.75 20.2426 19.75 19V8C19.75 6.75736 18.7426 5.75 17.5 5.75Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Cd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"6",cy:"6",r:"2.75",stroke:"currentColor",strokeWidth:"1.75"}),jsx("circle",{cx:"6",cy:"18",r:"2.75",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M8.0625 7.8125L20.25 20M8.0625 16.1875L20.25 4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ue=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M11.9999 3.5C16.6944 3.5 20.4999 7.30558 20.4999 12C20.4999 14.6801 19.2595 17.0706 17.3214 18.6285M11.9999 20.5C7.30552 20.5 3.49994 16.6944 3.49994 12C3.49994 9.31637 4.7436 6.92322 6.68602 5.36543",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M3 5.11963H6.5C6.77614 5.11963 7 5.34349 7 5.61963V9.11963",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M21 18.8799L17.5 18.8799C17.2239 18.8799 17 18.656 17 18.3799L17 14.8799",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),lo=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M8.3 10.8 15.7 6.9M8.3 13.2l7.4 3.9",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("circle",{className:"dot",cx:"6",cy:"12",r:"3.1",fill:"currentColor"}),jsx("circle",{cx:"18",cy:"5.6",r:"2.2",fill:"currentColor",opacity:".5"}),jsx("circle",{cx:"18",cy:"18.4",r:"2.2",fill:"currentColor",opacity:".5"})]}),fn=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M7.75 7.99994H5.50754C4.19528 7.99994 3.07149 8.92891 2.93583 10.2341C2.83553 11.1993 2.75 12.4145 2.75 13.7524C2.75 15.2133 2.85198 16.5784 2.96382 17.6362C3.096 18.8863 4.12618 19.8129 5.38194 19.8701C6.80307 19.935 8.80784 20.0024 11 20.0024C13.2622 20.0024 15.1814 19.9306 16.4758 19.8639C17.6066 19.8057 18.6487 19.2395 19.2035 18.2525C19.8036 17.185 20.5476 15.613 21 13.7524C21.4121 12.0576 21.6012 10.6598 21.6865 9.66661C21.7665 8.73535 21.0147 7.99994 20.08 7.99994H15.0977C15.0977 7.99994 15.6641 6.61946 15.8359 5.46738C15.9633 4.61391 15.9529 3.79886 15.5391 3.01438C14.6937 1.41165 13.268 1.61425 12.6722 2.31124C11.9655 3.13789 12.096 3.73416 11.3909 4.98305C10.8353 5.96724 10.3317 6.54216 9.70685 7.08997C8.97626 7.73052 8.3125 7.99994 7.75 7.99994ZM7.75 7.99994V19.8836",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"})}),Nd=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M20.3186 7.30272H15.7676C15.987 6.83046 16.2326 6.21379 16.3212 5.61942C16.3848 5.19335 16.3909 4.67148 16.3397 4.17473C16.2897 3.69004 16.1773 3.1481 15.9528 2.72256C15.4774 1.82138 14.8232 1.18851 14.036 1.03498C13.1987 0.871657 12.4778 1.29768 12.0464 1.95052C11.6856 2.49651 11.5449 2.952 11.4166 3.36742L11.4125 3.3806C11.2892 3.7797 11.1678 4.17175 10.8559 4.72428C10.3427 5.6333 9.92399 6.10477 9.36125 6.59814C9.06949 6.85394 8.76549 7.01487 8.5 7.10803V20.7775C9.28643 20.7944 10.1283 20.8051 11 20.8051C13.3441 20.8051 15.3225 20.7286 16.627 20.6598C17.9072 20.5923 19.1311 19.947 19.7997 18.7744C20.4316 17.6662 21.241 15.9885 21.7288 13.9823C22.1856 12.1035 22.3761 10.576 22.4535 9.53748C22.5487 8.25929 21.5102 7.30272 20.3186 7.30272ZM7 20.7367V7.30272H5.30231C3.75929 7.30272 2.38772 8.40358 2.21213 10.001C2.10046 11.0169 2 12.338 2 13.8051C2 15.3918 2.1175 16.8638 2.23926 17.9645C2.40726 19.4833 3.65916 20.5926 5.15251 20.6631C5.68428 20.6881 6.30812 20.7141 7 20.7367Z",fill:"currentColor"})}),Zs=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M7.75 15.7924H5.50754C4.19528 15.7924 3.07149 14.8634 2.93583 13.5582C2.83553 12.5931 2.75 11.3779 2.75 10.04C2.75 8.57905 2.85198 7.21396 2.96382 6.15611C3.096 4.90602 4.12618 3.97949 5.38194 3.92221C6.80307 3.85738 8.80784 3.78998 11 3.78998C13.2622 3.78998 15.1814 3.86176 16.4758 3.92842C17.6066 3.98664 18.6487 4.55282 19.2035 5.53982C19.8036 6.6074 20.5476 8.17936 21 10.04C21.4121 11.7348 21.6012 13.1326 21.6865 14.1258C21.7665 15.057 21.0147 15.7924 20.08 15.7924H15.0977C15.0977 15.7924 15.6641 17.1729 15.8359 18.325C15.9633 19.1785 15.9529 19.9935 15.5391 20.778C14.6937 22.3807 13.268 22.1781 12.6722 21.4811C11.9655 20.6545 12.096 20.0582 11.3909 18.8093C10.8353 17.8251 10.3317 17.2502 9.70685 16.7024C8.97626 16.0618 8.3125 15.7924 7.75 15.7924ZM7.75 15.7924V3.90875",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"})}),Sd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M3.01393 8.85524C3.12732 8.19519 3.71174 7.75 4.38146 7.75H6.19766C6.87887 7.75 7.5398 7.51816 8.07174 7.09261L12.313 3.69963C13.2951 2.91392 14.75 3.61359 14.75 4.87135C14.75 9.74016 14.75 14.2598 14.75 19.1287C14.75 20.3864 13.2951 21.0861 12.313 20.3004L8.07174 16.9074C7.5398 16.4818 6.87887 16.25 6.19766 16.25H4.38145C3.71174 16.25 3.12732 15.8048 3.01393 15.1448C2.88446 14.3912 2.74999 13.2964 2.75 12C2.75001 10.7036 2.88447 9.60884 3.01393 8.85524Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M19.9629 5.32216C20.3411 5.00001 20.909 5.04487 21.2315 5.42275C24.4558 9.20564 24.4556 14.7931 21.2315 18.5761C20.909 18.9543 20.3412 18.9999 19.9629 18.6776C19.5848 18.3552 19.5392 17.7873 19.8613 17.4091C22.5122 14.299 22.512 9.70189 19.8613 6.59169C19.539 6.21347 19.5848 5.64462 19.9629 5.32216ZM17.1543 8.1249C17.5511 7.82576 18.1158 7.90486 18.415 8.30165C20.0619 10.4857 20.0611 13.5142 18.4141 15.6981C18.1148 16.0946 17.551 16.1738 17.1543 15.8749C16.7575 15.5757 16.6785 15.011 16.9775 14.6142C18.1405 13.0718 18.1405 10.928 16.9775 9.38564C16.6783 8.98879 16.7575 8.42418 17.1543 8.1249Z",fill:"currentColor"})]}),Ci=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M3.75 15.25L11.1161 7.88388C11.6043 7.39573 12.3957 7.39573 12.8839 7.88388L20.25 15.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Ni=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M11.6773 3.19182C13.5908 1.27833 16.6934 1.27836 18.607 3.19182C20.5205 5.10537 20.5205 8.20794 18.607 10.1215L12.5972 16.1313V16.1323L11.5367 17.1928C10.4041 18.3253 8.56665 18.3253 7.43413 17.1928C6.3019 16.0603 6.30184 14.2237 7.43413 13.0912L14.5054 6.01995C14.8569 5.66857 15.4274 5.66859 15.7789 6.01995C16.1303 6.37139 16.1303 6.94191 15.7789 7.29338L8.70756 14.3647C8.27822 14.7942 8.27828 15.4898 8.70756 15.9194C9.13714 16.3489 9.83365 16.3489 10.2632 15.9194L11.3228 14.8588L17.3335 8.84807C18.5441 7.63744 18.5441 5.67587 17.3335 4.46526C16.1229 3.25474 14.1613 3.25471 12.9507 4.46526L8.00053 9.41448L5.87944 11.5365C3.88791 13.5282 3.88782 16.7568 5.87944 18.7485C7.87108 20.7398 11.0998 20.7399 13.0914 18.7485L20.1626 11.6772C20.5141 11.3258 21.0846 11.3257 21.4361 11.6772C21.7872 12.0286 21.7874 12.5992 21.4361 12.9506L14.3648 20.0219C11.6702 22.7163 7.30059 22.7162 4.606 20.0219C1.91143 17.3273 1.91153 12.9577 4.606 10.2631L6.7271 8.14104L11.6773 3.19182Z",fill:"currentColor"})}),Pd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"8.5",cy:"9.5",r:"1.75",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M12 4.24756C9.45718 4.24756 7.23766 4.37688 5.67027 4.50398C4.23213 4.6206 3.10221 5.72782 2.97301 7.16489C2.85763 8.44834 2.75 10.1427 2.75 11.9976C2.75 13.8525 2.85763 15.5468 2.97301 16.8302C3.10221 18.2673 4.23213 19.3745 5.67027 19.4911C7.23766 19.6182 9.45718 19.7476 12 19.7476C14.5431 19.7476 16.7628 19.6182 18.3302 19.4911C19.7681 19.3745 20.8979 18.2676 21.0271 16.8307C21.1424 15.5478 21.25 13.8538 21.25 11.9976C21.25 10.1414 21.1424 8.44735 21.0271 7.1644C20.8979 5.72755 19.7681 4.62063 18.3302 4.50402C16.7628 4.3769 14.5431 4.24756 12 4.24756Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M5.75 16.7526L7.31102 15.1918C7.96841 14.5345 9.03424 14.5348 9.69124 15.1925C10.2753 15.7771 11.2227 15.7774 11.8071 15.193L13.9771 13.0229C14.6801 12.3199 15.8199 12.32 16.5228 13.023L18.25 14.7505",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Mt=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M3 12H21M12 3C14.1162 5.52153 15.2762 8.70813 15.2762 12C15.2762 15.2919 14.1162 18.4785 12 21C9.8838 18.4785 8.72381 15.2919 8.72381 12C8.72381 8.70813 9.8838 5.52153 12 3Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Go=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Le=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M19.25 8.34961C19.7471 8.34961 20.1504 8.75294 20.1504 9.25V17.4043C20.1504 19.4775 18.608 21.2658 16.4951 21.4424C15.186 21.5518 13.5724 21.6504 12 21.6504C10.4276 21.6504 8.81396 21.5518 7.50488 21.4424C5.392 21.2658 3.84961 19.4775 3.84961 17.4043V9.25C3.84961 8.75294 4.25294 8.34961 4.75 8.34961C5.24706 8.34961 5.65039 8.75294 5.65039 9.25V17.4043C5.65039 18.5889 6.5208 19.5536 7.6543 19.6484C8.93581 19.7556 10.4957 19.8496 12 19.8496C13.5043 19.8496 15.0642 19.7556 16.3457 19.6484C17.4792 19.5536 18.3496 18.5888 18.3496 17.4043V9.25C18.3496 8.75294 18.7529 8.34961 19.25 8.34961ZM9.5 10.3496C9.99706 10.3496 10.4004 10.7529 10.4004 11.25V14.75C10.4004 15.2471 9.99706 15.6504 9.5 15.6504C9.00294 15.6504 8.59961 15.2471 8.59961 14.75V11.25C8.59961 10.7529 9.00294 10.3496 9.5 10.3496ZM14.5 10.3496C14.9971 10.3496 15.4004 10.7529 15.4004 11.25V14.75C15.4004 15.2471 14.9971 15.6504 14.5 15.6504C14.0029 15.6504 13.5996 15.2471 13.5996 14.75V11.25C13.5996 10.7529 14.0029 10.3496 14.5 10.3496ZM14 2.34961C15.4636 2.34961 16.6504 3.53645 16.6504 5V5.34961H21.25C21.7471 5.34961 22.1504 5.75294 22.1504 6.25C22.1504 6.74706 21.7471 7.15039 21.25 7.15039H2.75C2.25294 7.15039 1.84961 6.74706 1.84961 6.25C1.84961 5.75294 2.25294 5.34961 2.75 5.34961H7.34961V5C7.34961 3.53645 8.53645 2.34961 10 2.34961H14ZM10 4.15039C9.53056 4.15039 9.15039 4.53056 9.15039 5V5.34961H14.8496V5C14.8496 4.53056 14.4694 4.15039 14 4.15039H10Z",fill:"currentColor"})}),ea=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M12 7.25V12.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M12 15.75V16.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),gn=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M7.75513 12.4301L9.78806 14.463C10.1298 14.8047 10.6838 14.8047 11.0255 14.463L16.2404 9.24807",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),fr=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M10.268 4.25C11.0378 2.91666 12.9623 2.91667 13.7321 4.25L20.8768 16.625C21.6466 17.9583 20.6843 19.625 19.1447 19.625H4.85529C3.31569 19.625 2.35344 17.9583 3.12324 16.625L10.268 4.25Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M12 9V13",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M12 16.25V16.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),Zo=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M15.1835 8.81633L12 11.9998M8.81648 15.1834L12 11.9998M15.1835 15.1834L12 11.9998M8.81648 8.81633L12 11.9998",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Kt=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M14.75 20.25L7.38388 12.8839C6.89573 12.3957 6.89573 11.6043 7.38388 11.1161L14.75 3.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),gr=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M12 2L4 6V12C4 17 7.5 19.5 12 21C16.5 19.5 20 17 20 12V6L12 2Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Rd=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Td=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2v-4"}),jsx("path",{d:"M9 3h6"}),jsx("path",{d:"M15 21h4a2 2 0 0 0 2-2v-4"}),jsx("path",{d:"M3 9V5a2 2 0 0 1 2-2h4"})]})}),fw=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"})}),gw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"3.2",fill:"currentColor"}),jsx("circle",{className:"dot",cx:"20",cy:"8",r:"3.4",fill:"currentColor"}),jsx("circle",{cx:"15.6",cy:"3.9",r:"1.6",fill:"currentColor",opacity:".45"}),jsx("circle",{cx:"9.8",cy:"3.3",r:"1.2",fill:"currentColor",opacity:".28"})]}),Md=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M12 20.3496C12.497 20.3496 12.9004 20.753 12.9004 21.25V22.75C12.9004 23.2471 12.4971 23.6504 12 23.6504C11.5029 23.6504 11.0996 23.2471 11.0996 22.75V21.25C11.0996 20.753 11.503 20.3496 12 20.3496ZM4.82227 17.9043C5.17373 17.5528 5.74423 17.5529 6.0957 17.9043C6.44718 18.2558 6.44718 18.8263 6.0957 19.1777L5.03516 20.2383C4.68367 20.5896 4.11315 20.5897 3.76172 20.2383C3.41032 19.8868 3.41037 19.3163 3.76172 18.9648L4.82227 17.9043ZM17.9043 17.9043C18.2558 17.5528 18.8263 17.5528 19.1777 17.9043L20.2383 18.9648C20.5896 19.3163 20.5897 19.8869 20.2383 20.2383C19.8869 20.5897 19.3163 20.5896 18.9648 20.2383L17.9043 19.1777C17.5528 18.8263 17.5528 18.2558 17.9043 17.9043ZM2.75 11.0996C3.24706 11.0996 3.65039 11.5029 3.65039 12C3.65039 12.4971 3.24706 12.9004 2.75 12.9004H1.25C0.752944 12.9004 0.349609 12.4971 0.349609 12C0.349609 11.5029 0.752944 11.0996 1.25 11.0996H2.75ZM22.75 11.0996C23.2471 11.0996 23.6504 11.5029 23.6504 12C23.6504 12.4971 23.2471 12.9004 22.75 12.9004H21.25C20.7529 12.9004 20.3496 12.4971 20.3496 12C20.3496 11.5029 20.7529 11.0996 21.25 11.0996H22.75ZM3.76172 3.76172C4.11313 3.41031 4.68367 3.41043 5.03516 3.76172L6.0957 4.82227C6.44718 5.17374 6.44718 5.74423 6.0957 6.0957C5.74423 6.44718 5.17374 6.44718 4.82227 6.0957L3.76172 5.03516C3.41043 4.68367 3.41031 4.11313 3.76172 3.76172ZM18.9648 3.76172C19.3163 3.41047 19.8869 3.41035 20.2383 3.76172C20.5897 4.11312 20.5895 4.68367 20.2383 5.03516L19.1777 6.0957C18.8263 6.44718 18.2558 6.44718 17.9043 6.0957C17.5529 5.74423 17.5528 5.17373 17.9043 4.82227L18.9648 3.76172ZM12 0.349609C12.497 0.349609 12.9004 0.752972 12.9004 1.25V2.75C12.9004 3.24706 12.4971 3.65039 12 3.65039C11.5029 3.65039 11.0996 3.24706 11.0996 2.75V1.25C11.0996 0.752972 11.503 0.349609 12 0.349609Z",fill:"currentColor"})]}),_d=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M11.471 3.71264L10.5946 3.5075L11.471 3.71264ZM20.2662 11.2159L20.6079 12.0485L20.2662 11.2159ZM20.9927 11.6337L20.0934 11.6697L20.9927 11.6337ZM20.2662 11.2159L19.9245 10.3833C19.2705 10.6516 18.5537 10.8 17.8 10.8V11.7V12.6C18.7921 12.6 19.7408 12.4043 20.6079 12.0485L20.2662 11.2159ZM17.8 11.7V10.8C14.7072 10.8 12.2 8.29284 12.2 5.20005H11.3H10.4C10.4 9.28695 13.7131 12.6 17.8 12.6V11.7ZM11.3 5.20005H12.2C12.2 4.75784 12.2511 4.32871 12.3473 3.91779L11.471 3.71264L10.5946 3.5075C10.4672 4.05194 10.4 4.61872 10.4 5.20005H11.3ZM3 12.0001H3.9C3.9 7.84877 7.02373 4.42573 11.0484 3.95532L10.9439 3.06141L10.8395 2.1675C5.9183 2.74268 2.1 6.92484 2.1 12.0001H3ZM12 21.0001V20.1001C7.52649 20.1001 3.9 16.4736 3.9 12.0001H3H2.1C2.1 17.4677 6.53238 21.9001 12 21.9001V21.0001ZM21 12.0001H20.1C20.1 16.4736 16.4735 20.1001 12 20.1001V21.0001V21.9001C17.4676 21.9001 21.9 17.4677 21.9 12.0001H21ZM20.9927 11.6337L20.0934 11.6697C20.0978 11.7792 20.1 11.8894 20.1 12.0001H21H21.9C21.9 11.8654 21.8973 11.7312 21.892 11.5977L20.9927 11.6337ZM11.471 3.71264L12.3473 3.91779C12.539 3.09866 11.939 2.03899 10.8395 2.1675L10.9439 3.06141L11.0484 3.95532C10.8786 3.97518 10.7345 3.89151 10.6611 3.79788C10.5948 3.71339 10.5711 3.60795 10.5946 3.5075L11.471 3.71264ZM20.2662 11.2159L20.6079 12.0485C20.5127 12.0875 20.4048 12.0811 20.3105 12.0288C20.2058 11.9707 20.1003 11.8409 20.0934 11.6697L20.9927 11.6337L21.892 11.5977C21.8475 10.4881 20.7028 10.0639 19.9245 10.3833L20.2662 11.2159Z",fill:"currentColor"})}),Br=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsx("path",{d:"M14.5 4v16"})]}),jsx("circle",{className:"dot",cx:"17.75",cy:"8.2",r:"1.5",fill:"currentColor"})]}),vw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.8313 1.67432C14.747 1.71336 16.4932 1.88083 17.9045 2.06982C20.1001 2.36402 21.7902 4.0421 22.0911 6.23682C22.3074 7.81729 22.4954 9.81801 22.4954 12.0015L22.4866 12.811C22.4479 14.6777 22.2804 16.3815 22.0911 17.7642L22.0588 17.9683C21.6841 20.0623 20.0315 21.6462 17.9045 21.9312L17.2795 22.0103C15.7759 22.1912 13.9613 22.3354 12.0002 22.3354L11.1692 22.3267C9.52706 22.2931 8.00975 22.1652 6.72095 22.0103L6.09595 21.9312C3.96873 21.6462 2.31538 20.0624 1.94068 17.9683L1.90845 17.7642C1.71912 16.3815 1.55277 14.6777 1.51392 12.811L1.50513 12.0015C1.50513 9.81803 1.69203 7.81729 1.90845 6.23682C2.20934 4.04199 3.90019 2.36396 6.09595 2.06982C7.70896 1.85382 9.75909 1.66553 12.0002 1.66553L12.8313 1.67432ZM12.0002 3.26514C11.1522 3.26514 10.3316 3.2944 9.55298 3.34131C9 3.37462 8.43987 3.42015 7.95337 3.46729C7.36673 3.52412 6.81573 3.58789 6.30884 3.65576C4.82278 3.85477 3.69702 4.97612 3.49439 6.45459C3.28539 7.98098 3.10474 9.9068 3.10474 12.0015C3.1048 14.0957 3.28542 16.0201 3.49439 17.5464C3.69702 19.0249 4.82276 20.1462 6.30884 20.3452C6.8157 20.413 7.95337 20.5327 7.95337 20.5327C7.95337 20.5327 9.08598 20.6587 9.55298 20.6587C10.3316 20.7055 11.1521 20.7358 12.0002 20.7358C14.1545 20.7358 16.1315 20.5542 17.6917 20.3452C19.1778 20.1461 20.3033 19.0249 20.5061 17.5464C20.7149 16.0201 20.8948 14.0957 20.8948 12.0015C20.8948 9.90681 20.7151 7.98098 20.5061 6.45459C20.3033 4.97614 19.1778 3.85479 17.6917 3.65576C16.1315 3.44684 14.1545 3.26514 12.0002 3.26514Z",fill:"currentColor"}),jsx("path",{d:"M5.762 6.71881C5.794 6.3112 6.13465 6 6.54351 6C7.00472 6 7.36833 6.39248 7.33508 6.8525C7.24687 8.07291 7.09999 10.3523 7.09999 12C7.09999 13.6477 7.24687 15.9271 7.33508 17.1475C7.36833 17.6075 7.00472 18 6.54351 18C6.13465 18 5.794 17.6888 5.762 17.2812C5.66928 16.1002 5.5 13.7099 5.5 12C5.5 10.2901 5.66928 7.89979 5.762 6.71881Z",fill:"currentColor"})]}),ta=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M8 5V19M16 5V19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Co=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M18 11.2505L12.5303 16.7197C12.2374 17.0126 11.7626 17.0126 11.4697 16.7197L6 11.2505",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M12 16.75L12 3.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M18.75 19.75L5.25 19.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Si=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 5V19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M19 12L12 19L5 12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Or=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M4.5 5.69359V18.1519C4.5 19.613 5.64231 20.8186 7.10221 20.8779C8.60598 20.9391 10.4924 21.0005 12 21.0005C13.5076 21.0005 15.394 20.9391 16.8978 20.8779C18.3577 20.8186 19.5 19.613 19.5 18.1519V5.69359C19.5 4.29722 18.4513 3.14607 17.0561 3.08945C15.8692 3.04128 14.2113 3.00049 12 3.00049C9.78873 3.00049 8.13082 3.04128 6.94388 3.08945C5.54866 3.14607 4.5 4.29722 4.5 5.69359Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M8 3.25L8.64095 5.01261C8.85651 5.6054 9.41988 6 10.0506 6H13.9494C14.5801 6 15.1435 5.6054 15.359 5.01261L16 3.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M14 15.0996C14.4971 15.0996 14.9004 15.5029 14.9004 16C14.9004 16.4971 14.4971 16.9004 14 16.9004H8C7.50294 16.9004 7.09961 16.4971 7.09961 16C7.09961 15.5029 7.50294 15.0996 8 15.0996H14ZM16 12.0996C16.4971 12.0996 16.9004 12.5029 16.9004 13C16.9004 13.4971 16.4971 13.9004 16 13.9004H8C7.50294 13.9004 7.09961 13.4971 7.09961 13C7.09961 12.5029 7.50294 12.0996 8 12.0996H16ZM16 9.09961C16.4971 9.09961 16.9004 9.50294 16.9004 10C16.9004 10.4971 16.4971 10.9004 16 10.9004H8C7.50294 10.9004 7.09961 10.4971 7.09961 10C7.09961 9.50294 7.50294 9.09961 8 9.09961H16Z",fill:"currentColor"})]}),bw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M17 4H7C5.34315 4 4 5.34315 4 7V17C4 18.6569 5.34315 20 7 20H17C18.6569 20 20 18.6569 20 17V7C20 5.34315 18.6569 4 17 4Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M10 4V20",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),ww=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M20.4867 10.7184C20.4953 11.1347 20.5 11.5627 20.5 12.0002C20.5 14.1939 20.3812 16.1498 20.2594 17.5784C20.1367 19.0176 19.0174 20.137 17.5782 20.2597C16.1494 20.3814 14.1935 20.5002 12 20.5002C9.80648 20.5002 7.85056 20.3814 6.42181 20.2597C4.9826 20.137 3.86325 19.0176 3.74057 17.5784C3.61879 16.1498 3.5 14.1939 3.5 12.0002C3.5 9.80658 3.61879 7.85073 3.74057 6.42205C3.86325 4.98284 4.9826 3.86351 6.42181 3.74083C7.85056 3.61905 9.80648 3.50024 12 3.50024C12.4375 3.50024 12.8656 3.50497 13.2819 3.5135",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M16.4387 4.06176L9.94201 10.5582C9.66104 10.8392 9.50303 11.2202 9.50266 11.6175L9.50068 13.7491C9.50029 14.1636 9.83616 14.4998 10.2506 14.4998L12.3783 14.4999C12.7763 14.5 13.158 14.3418 13.4394 14.0602L19.9357 7.55968C20.5209 6.97408 20.521 6.02507 19.936 5.43932L18.5606 4.06239C17.9749 3.47603 17.0247 3.47575 16.4387 4.06176Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),Ld=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"m7.5 4.27 9 5.15"}),jsx("path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"}),jsx("path",{d:"m3.3 7 8.7 5 8.7-5"}),jsx("path",{d:"M12 22V12"})]})}),hw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M15.5 8.5L13.5 13.5L8.5 15.5L10.5 10.5L15.5 8.5Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),qe=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M8.23047 3.40271C9.29184 3.35039 10.3045 3.81034 10.9756 4.6156L12.0918 5.95447C12.301 6.20538 12.6104 6.34998 12.9365 6.34998H17.9336C19.9899 6.34998 21.7739 7.86888 21.959 9.9701C22.0613 11.1322 22.1504 12.5235 22.1504 13.8597C22.1504 15.0968 22.0741 16.2025 21.9805 17.0951C21.7899 18.9099 20.3274 20.2284 18.5645 20.3754C16.9713 20.5081 14.6609 20.6478 12 20.6478C9.42776 20.6478 7.18337 20.5176 5.59766 20.389C3.72835 20.2375 2.24531 18.79 2.07617 16.9115C1.95906 15.6088 1.84964 13.8864 1.84961 11.9984C1.84961 10.1452 1.95568 8.45138 2.07031 7.1576C2.24068 5.23493 3.77585 3.77456 5.65625 3.59119C6.48059 3.51081 7.23178 3.45195 8.23047 3.40271ZM8.31934 5.20056C7.35212 5.24825 6.62919 5.30526 5.83008 5.38318C4.77098 5.48669 3.95379 6.29651 3.86328 7.3158C3.75206 8.57106 3.65039 10.2107 3.65039 11.9984C3.65042 13.8196 3.75552 15.4865 3.86914 16.7504C3.95888 17.7455 4.73657 18.5125 5.74316 18.5941C7.29221 18.7197 9.48678 18.848 12 18.848C14.5999 18.848 16.8592 18.711 18.415 18.5814C19.3724 18.5015 20.0957 17.8076 20.1904 16.9076C20.2786 16.0667 20.3496 15.0242 20.3496 13.8597C20.3496 12.5958 20.2658 11.2617 20.166 10.1283C20.0674 9.00878 19.1105 8.15076 17.9336 8.15076H12.9365C12.0757 8.15076 11.2598 7.76769 10.709 7.10681L9.59277 5.76795C9.27433 5.38581 8.80174 5.17678 8.31934 5.20056ZM19.25 3.59998C19.7471 3.59998 20.1504 4.00331 20.1504 4.50037C20.1502 4.99731 19.747 5.40076 19.25 5.40076H14.25C13.753 5.40076 13.3498 4.99731 13.3496 4.50037C13.3496 4.00331 13.7529 3.59998 14.25 3.59998H19.25Z",fill:"currentColor"})}),Pi=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M5 10V19C5 19.2652 5.10536 19.5196 5.29289 19.7071C5.48043 19.8946 5.73478 20 6 20H18C18.2652 20 18.5196 19.8946 18.7071 19.7071C18.8946 19.5196 19 19.2652 19 19V10M10 14H14M3 7H21V10H3V7Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Dd=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M3.24984 4.34924C2.75296 4.34931 2.34964 4.75279 2.34945 5.24963V18.7496C2.34945 19.2466 2.75284 19.65 3.24984 19.65C3.74689 19.65 4.15023 19.2467 4.15023 18.7496V5.24963C4.15003 4.75275 3.74677 4.34924 3.24984 4.34924ZM14.2508 5.49182C13.8975 5.14266 13.3278 5.14562 12.9784 5.49866C12.629 5.85192 12.6322 6.42155 12.9852 6.77112L17.3602 11.0992H6.05062C5.55371 11.0992 5.15047 11.5028 5.15023 11.9996C5.15033 12.4966 5.55363 12.9 6.05062 12.9H17.3602L12.9852 17.2281C12.632 17.5776 12.6291 18.1473 12.9784 18.5006C13.3279 18.8538 13.8975 18.8569 14.2508 18.5074L19.7254 13.0914C20.3327 12.4902 20.3327 11.509 19.7254 10.9078L14.2508 5.49182Z",fill:"currentColor"})}),Ed=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"12",cy:"12",r:"9.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("circle",{cx:"12.1",cy:"16.526",r:"0.9",fill:"currentColor"}),jsx("path",{d:"M10 9.75C10 8.64543 10.8954 7.75 12 7.75C13.1046 7.75 14 8.64543 14 9.75C14 10.8125 13.2656 11.2422 12.6328 11.875C12 12.5078 12 12.9609 12 13.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),xw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M6 9a6 6 0 1 1 12 0c0 5.25 2 7.5 2 7.5H4S6 14.25 6 9",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M10.35 20.4a1.9 1.9 0 0 0 3.3 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),No=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M9.5 2.8h5"}),jsx("circle",{cx:"12",cy:"14",r:"7.6"}),jsx("path",{d:"M12 14 14.9 11.1"})]}),jsx("circle",{className:"dot",cx:"15.4",cy:"10.6",r:"1.9",fill:"currentColor"})]}),Ri=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M10.2803 4.56892C11.3682 4.05084 12.6318 4.05084 13.7197 4.56892L20.4144 7.75685C21.2505 8.15499 21.2505 9.345 20.4144 9.74315L13.7197 12.9311C12.6318 13.4492 11.3682 13.4492 10.2803 12.9311L3.58561 9.74315C2.74951 9.34501 2.74951 8.155 3.58561 7.75685L10.2803 4.56892Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M2.82568 13.1299L10.2803 16.6797C11.3683 17.1978 12.6318 17.1978 13.7198 16.6797L21.1744 13.1299",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M2.82568 16.63L10.2803 20.1798C11.3683 20.6979 12.6318 20.6979 13.7198 20.1798L21.1744 16.63",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),vr=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M20.2498 10.2677C21.5831 11.0375 21.5831 12.962 20.2498 13.7318L9.37512 20.0103C8.04179 20.7801 6.37512 19.8178 6.37512 18.2782L6.37512 5.72128C6.37512 4.18168 8.04179 3.21943 9.37512 3.98923L20.2498 10.2677Z",fill:"currentColor",stroke:"currentColor"})}),oa=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M20.25 18.0612V12.25C20.25 10.8693 19.1307 9.75 17.75 9.75H6.24998C4.86927 9.75 3.74998 10.8693 3.74998 12.25V18.0612C3.74998 19.3142 4.67813 20.3692 5.92643 20.4778C7.44332 20.6097 9.61644 20.75 12 20.75C14.3835 20.75 16.5566 20.6097 18.0735 20.4778C19.3218 20.3692 20.25 19.3142 20.25 18.0612Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M16.5 9.75V7.25C16.5 4.76472 14.4853 2.75 12 2.75C9.5147 2.75 7.49998 4.76472 7.49998 7.25V9.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Oa=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 4.25C9.45718 4.25 7.23766 4.37932 5.67027 4.50642C4.23213 4.62304 3.10221 5.73027 2.97301 7.16733C2.85763 8.45079 2.75 10.1451 2.75 12C2.75 13.8549 2.85763 15.5492 2.97301 16.8327C3.10221 18.2697 4.23213 19.377 5.67027 19.4936C7.23766 19.6207 9.45718 19.75 12 19.75C14.5431 19.75 16.7628 19.6207 18.3302 19.4935C19.7681 19.3769 20.8979 18.27 21.0271 16.8332C21.1424 15.5502 21.25 13.8562 21.25 12C21.25 10.1438 21.1424 8.44979 21.0271 7.16684C20.8979 5.72999 19.7681 4.62307 18.3302 4.50646C16.7628 4.37934 14.5431 4.25 12 4.25Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M18 9.75L12.832 13.1953C12.3282 13.5312 11.6718 13.5312 11.1679 13.1953L6 9.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),yw=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M9.25 17.0996C9.74706 17.0996 10.1504 17.5029 10.1504 18C10.1504 18.4971 9.74706 18.9004 9.25 18.9004H3.75C3.25294 18.9004 2.84961 18.4971 2.84961 18C2.84961 17.5029 3.25294 17.0996 3.75 17.0996H9.25ZM14.25 11.0996C14.7471 11.0996 15.1504 11.5029 15.1504 12C15.1504 12.4971 14.7471 12.9004 14.25 12.9004H3.75C3.25294 12.9004 2.84961 12.4971 2.84961 12C2.84961 11.5029 3.25294 11.0996 3.75 11.0996H14.25ZM20.25 5.09961C20.7471 5.09961 21.1504 5.50294 21.1504 6C21.1504 6.49706 20.7471 6.90039 20.25 6.90039H3.75C3.25294 6.90039 2.84961 6.49706 2.84961 6C2.84961 5.50294 3.25294 5.09961 3.75 5.09961H20.25Z",fill:"currentColor"})}),Id=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M17.75 8.09961C18.2471 8.09961 18.6504 8.50294 18.6504 9V16.793L20.6641 15.0664C21.0415 14.7429 21.6101 14.7867 21.9336 15.1641C22.2571 15.5415 22.2133 16.1101 21.8359 16.4336L18.748 19.0801L18.6045 19.1855C17.8632 19.651 16.8496 19.1273 16.8496 18.2061V9C16.8496 8.50294 17.2529 8.09961 17.75 8.09961ZM14.75 17.0996C15.2471 17.0996 15.6504 17.5029 15.6504 18C15.6504 18.4971 15.2471 18.9004 14.75 18.9004H3.75C3.25294 18.9004 2.84961 18.4971 2.84961 18C2.84961 17.5029 3.25294 17.0996 3.75 17.0996H14.75ZM14.75 11.0996C15.2471 11.0996 15.6504 11.5029 15.6504 12C15.6504 12.4971 15.2471 12.9004 14.75 12.9004H3.75C3.25294 12.9004 2.84961 12.4971 2.84961 12C2.84961 11.5029 3.25294 11.0996 3.75 11.0996H14.75ZM20.25 5.09961C20.7471 5.09961 21.1504 5.50294 21.1504 6C21.1504 6.49706 20.7471 6.90039 20.25 6.90039H3.75C3.25294 6.90039 2.84961 6.49706 2.84961 6C2.84961 5.50294 3.25294 5.09961 3.75 5.09961H20.25Z",fill:"currentColor"})}),kw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M2.75 14.2501C2.75 13.2836 3.5335 12.5001 4.5 12.5001H5.5C6.4665 12.5001 7.25 13.2836 7.25 14.2501V17.7501C7.25 18.7166 6.4665 19.5001 5.5 19.5001H4.5C3.5335 19.5001 2.75 18.7166 2.75 17.7501V14.2501Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M9.75 5.75C9.75 4.7835 10.5335 4 11.5 4H12.5C13.4665 4 14.25 4.7835 14.25 5.75V17.75C14.25 18.7165 13.4665 19.5 12.5 19.5H11.5C10.5335 19.5 9.75 18.7165 9.75 17.75V5.75Z",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M16.75 11C16.75 10.0335 17.5335 9.25 18.5 9.25H19.5C20.4665 9.25 21.25 10.0335 21.25 11V17.75C21.25 18.7165 20.4665 19.5 19.5 19.5H18.5C17.5335 19.5 16.75 18.7165 16.75 17.75V11Z",stroke:"currentColor",strokeWidth:"1.75"})]}),Cw=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M4 14C4 11.8783 4.84285 9.84344 6.34315 8.34315C7.84344 6.84285 9.87827 6 12 6C14.1217 6 16.1566 6.84285 17.6569 8.34315C19.1571 9.84344 20 11.8783 20 14M12 14L16 10",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Nw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("circle",{cx:"14.5",cy:"9.5",r:"6.25",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M9.75 14.25L5.78033 18.2197C5.48744 18.5126 5.48744 18.9874 5.78033 19.2803L7.25 20.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M7.25012 16.75L9.25012 18.75",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),vn=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M18 4H6C4.89543 4 4 4.89543 4 6V8C4 9.10457 4.89543 10 6 10H18C19.1046 10 20 9.10457 20 8V6C20 4.89543 19.1046 4 18 4Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M18 14H6C4.89543 14 4 14.8954 4 16V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V16C20 14.8954 19.1046 14 18 14Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M8 7H8.01M8 17H8.01",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Sw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M15 7H9C7.89543 7 7 7.89543 7 9V15C7 16.1046 7.89543 17 9 17H15C16.1046 17 17 16.1046 17 15V9C17 7.89543 16.1046 7 15 7Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M4 9H7M4 15H7M17 9H20M17 15H20M9 4V7M15 4V7M9 17V20M15 17V20",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Pw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M5.25 6.10177V17.6961C5.25 19.4153 6.58845 20.8378 8.30626 20.9082C9.51092 20.9576 10.8731 21 12 21C13.1269 21 14.4891 20.9576 15.6937 20.9082C17.4116 20.8378 18.75 19.4153 18.75 17.6961V6.10177C18.75 4.46723 17.5331 3.12133 15.8996 3.06269C14.901 3.02684 13.6144 3 12 3C10.3856 3 9.09896 3.02684 8.10043 3.06269C6.46694 3.12133 5.25 4.46723 5.25 6.10177Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M10.5 6H13.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("circle",{cx:"12.1502",cy:"17.9",r:"0.9",fill:"currentColor"})]}),Nu=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M5.1 7.65h13.8M5.1 12h13.8M5.1 16.35h8.4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Su=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"4.5",y:"4.5",width:"15",height:"15",rx:"3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("circle",{cx:"9.3",cy:"9.15",r:"1.5",fill:"currentColor"}),jsx("path",{d:"M6.3 17.1l3.9-4.65 3 3 2.1-2.4 2.4 4.05",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Pu=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"4.5",y:"6",width:"15",height:"12",rx:"3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M10.5 9.6v4.8L15 12l-4.5-2.4z",fill:"currentColor"})]}),Ru=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12.6 6.3L8.4 9.6H5.85v4.8H8.4l4.2 3.3z",fill:"currentColor"}),jsx("path",{d:"M16.2 9.45a3.9 3.9 0 0 1 0 5.1",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ad=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 4.24756C9.45718 4.24756 7.23766 4.37688 5.67027 4.50398C4.23213 4.6206 3.10221 5.72782 2.97301 7.16489C2.85763 8.44834 2.75 10.1427 2.75 11.9976C2.75 13.8525 2.85763 15.5468 2.97301 16.8302C3.10221 18.2673 4.23213 19.3745 5.67027 19.4911C7.23766 19.6182 9.45718 19.7476 12 19.7476C14.5431 19.7476 16.7628 19.6182 18.3302 19.4911C19.7681 19.3745 20.8979 18.2676 21.0271 16.8307C21.1424 15.5478 21.25 13.8538 21.25 11.9976C21.25 10.1414 21.1424 8.44735 21.0271 7.1644C20.8979 5.72755 19.7681 4.62063 18.3302 4.50402C16.7628 4.3769 14.5431 4.24756 12 4.24756Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M6.75 10.8496C7.38513 10.8496 7.90039 11.3649 7.90039 12C7.90039 12.6351 7.38513 13.1504 6.75 13.1504C6.11487 13.1504 5.59961 12.6351 5.59961 12C5.59961 11.3649 6.11487 10.8496 6.75 10.8496ZM10.25 10.8496C10.8851 10.8496 11.4004 11.3649 11.4004 12C11.4004 12.6351 10.8851 13.1504 10.25 13.1504C9.61487 13.1504 9.09961 12.6351 9.09961 12C9.09961 11.3649 9.61487 10.8496 10.25 10.8496ZM13.75 10.8496C14.3851 10.8496 14.9004 11.3649 14.9004 12C14.9004 12.6351 14.3851 13.1504 13.75 13.1504C13.1149 13.1504 12.5996 12.6351 12.5996 12C12.5996 11.3649 13.1149 10.8496 13.75 10.8496ZM17.25 10.8496C17.8851 10.8496 18.4004 11.3649 18.4004 12C18.4004 12.6351 17.8851 13.1504 17.25 13.1504C16.6149 13.1504 16.0996 12.6351 16.0996 12C16.0996 11.3649 16.6149 10.8496 17.25 10.8496ZM6.75 7.34961C7.38513 7.34961 7.90039 7.86487 7.90039 8.5C7.90039 9.13513 7.38513 9.65039 6.75 9.65039C6.11487 9.65039 5.59961 9.13513 5.59961 8.5C5.59961 7.86487 6.11487 7.34961 6.75 7.34961ZM10.25 7.34961C10.8851 7.34961 11.4004 7.86487 11.4004 8.5C11.4004 9.13513 10.8851 9.65039 10.25 9.65039C9.61487 9.65039 9.09961 9.13513 9.09961 8.5C9.09961 7.86487 9.61487 7.34961 10.25 7.34961ZM13.75 7.34961C14.3851 7.34961 14.9004 7.86487 14.9004 8.5C14.9004 9.13513 14.3851 9.65039 13.75 9.65039C13.1149 9.65039 12.5996 9.13513 12.5996 8.5C12.5996 7.86487 13.1149 7.34961 13.75 7.34961ZM17.25 7.34961C17.8851 7.34961 18.4004 7.86487 18.4004 8.5C18.4004 9.13513 17.8851 9.65039 17.25 9.65039C16.6149 9.65039 16.0996 9.13513 16.0996 8.5C16.0996 7.86487 16.6149 7.34961 17.25 7.34961Z",fill:"currentColor"}),jsx("rect",{x:"6.25",y:"15.25",width:"11.5",height:"1.5",rx:"0.75",fill:"currentColor"})]}),Bd=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M8 11V6C8 5.46957 8.21071 4.96086 8.58579 4.58579C8.96086 4.21071 9.46957 4 10 4C10.5304 4 11.0391 4.21071 11.4142 4.58579C11.7893 4.96086 12 5.46957 12 6V10V5C12 4.46957 12.2107 3.96086 12.5858 3.58579C12.9609 3.21071 13.4696 3 14 3C14.5304 3 15.0391 3.21071 15.4142 3.58579C15.7893 3.96086 16 4.46957 16 5V12M16 12V8C16 7.46957 16.2107 6.96086 16.5858 6.58579C16.9609 6.21071 17.4696 6 18 6C18.5304 6 19.0391 6.21071 19.4142 6.58579C19.7893 6.96086 20 7.46957 20 8V14C20 15.8565 19.2625 17.637 17.9497 18.9497C16.637 20.2625 14.8565 21 13 21C11.1435 21 9.36301 20.2625 8.05025 18.9497C6.7375 17.637 6 15.8565 6 14V12C6 11.4696 6.21071 10.9609 6.58579 10.5858C6.96086 10.2107 7.46957 10 8 10L16 12Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),So=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M5.5 7.39185L2.06301 11.3781C1.73949 11.7534 1.7395 12.3089 2.06301 12.6841L5.5 16.6704",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M18.5 16.6704L21.937 12.6841C22.2605 12.3089 22.2605 11.7533 21.937 11.3781L18.5 7.39183",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M14.75 5L9.25 19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),qo=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M9 4H5C4.73478 4 4.48043 4.10536 4.29289 4.29289C4.10536 4.48043 4 4.73478 4 5V9M15 4H19C19.2652 4 19.5196 4.10536 19.7071 4.29289C19.8946 4.48043 20 4.73478 20 5V9M9 20H5C4.73478 20 4.48043 19.8946 4.29289 19.7071C4.10536 19.5196 4 19.2652 4 19V15M15 20H19C19.2652 20 19.5196 19.8946 19.7071 19.7071C19.8946 19.5196 20 19.2652 20 19V15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Po=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsxs("g",{stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M6 15.4V4"}),jsx("path",{d:"M18 8.6a9 9 0 0 1-9 9"}),jsx("circle",{cx:"18",cy:"6",r:"2.4"})]}),jsx("circle",{className:"dot",cx:"6",cy:"18",r:"2.9",fill:"currentColor"})]}),Rw=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M8.5 9.5L12 11.5M12 11.5V15.5M12 11.5L15.5 9.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),jsx("path",{d:"M11.0382 3.02753C11.6373 2.69893 12.3627 2.69893 12.9618 3.02753L19.622 6.68056C20.2623 7.03172 20.6603 7.7039 20.6603 8.43412V15.5659C20.6603 16.2961 20.2623 16.9683 19.622 17.3194L12.9618 20.9725C12.3627 21.3011 11.6373 21.3011 11.0382 20.9725L4.37795 17.3194C3.73771 16.9683 3.33975 16.2961 3.33975 15.5659V8.43412C3.33975 7.7039 3.73771 7.03172 4.37795 6.68056L11.0382 3.02753Z",stroke:"currentColor",strokeWidth:"1.75"})]}),Tw=mn,br=Aa,Mw=Aa,Va=gn,_w=mr,Lw=ea,Dw=fn,Od=Zs,Vd=fr,Fd=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"3",y:"4.5",width:"18",height:"15",rx:"3",stroke:"currentColor",strokeWidth:"1.75"}),jsx("path",{d:"M9.5 4.5v15",stroke:"currentColor",strokeWidth:"1.75"})]}),Tu="M849.92 51.2H174.08c-67.8656 0-122.88 55.0144-122.88 122.88v675.84c0 67.8656 55.0144 122.88 122.88 122.88h675.84c67.8656 0 122.88-55.0144 122.88-122.88V174.08c0-67.8656-55.0144-122.88-122.88-122.88z m-97.17248 383.4112c-1.00352 4.61824-3.61472 10.84928-7.22944 19.18976l-0.50688 0.50176c-21.69856 46.01344-77.66016 136.13568-77.66016 136.13568l-0.50688-0.50176-16.57344 28.43136h79.17056L578.33472 819.2l34.16064-136.63744h-62.09024l21.69856-90.624c-17.58208 4.1216-38.28224 9.85088-62.592 18.08384 0 0-33.15712 19.18976-95.24736-37.26848 0 0-41.89696-37.2736-17.58208-46.01344 10.34752-4.1216 50.23232-8.84736 81.78176-12.95872 42.3936-5.72928 68.81792-8.84736 68.81792-8.84736s-130.90816 2.10944-161.95584-3.10784c-31.04256-4.62336-70.4256-56.97024-78.6688-102.48192 0 0-12.95872-24.81664 27.9296-12.95872 40.39168 11.8528 210.18112 46.01344 210.18112 46.01344S324.2496 365.2864 309.78048 348.70784c-14.46912-16.57856-42.99776-90.01984-39.38304-135.13216 0 0 1.50528-11.35104 12.95872-8.23808 0 0 162.55488 74.5472 273.77664 114.93376 111.8208 41.40032 208.57344 62.09536 195.61472 114.33984z",Ti=e=>jsx("svg",{viewBox:"0 0 1024 1024",...e,children:jsx("path",{d:Tu,fill:"#3296FA"})}),$d=e=>jsx("svg",{viewBox:"0 0 1024 1024",...e,children:jsx("path",{d:Tu,fill:"#1677FF"})}),Mi=e=>jsxs("svg",{viewBox:"0 0 1024 1024",...e,children:[jsx("path",{d:"M530.73502 543.764898l187.036735-129.776327c0-142.837551-112.222041-246.804898-112.222041-246.804898h-399.25551c224.653061 142.837551 324.440816 376.581224 324.440816 376.581225z",fill:"#00DAB8"}),jsx("path",{d:"M929.938286 387.970612s-37.407347 26.017959-87.35347 155.794286c-56.006531 145.763265-212.114286 233.848163-212.114285 233.848163s-194.35102-121.417143-274.912653-169.795918c68.649796 20.897959 143.046531-56.52898 187.559183-102.922449 37.511837-38.974694 74.919184-90.906122 162.272653-129.880816 87.24898-38.974694 224.548571 12.956735 224.548572 12.956734z m-574.380408 219.846531c-8.254694-2.507755-16.404898-6.478367-24.450613-12.016327-20.897959-14.524082-6.791837-6.791837 24.450613 12.016327z",fill:"#0C3AA0"}),jsx("path",{d:"M94.040816 362.025796v0.10449c533.942857 505.208163 702.066939 260.91102 710.844082 247.222857-7.105306 11.284898-116.506122 182.543673-249.208163 220.16C231.549388 921.464163 94.040816 751.563755 94.040816 751.563755z m710.844082 247.327347l0.313469-0.626939-0.313469 0.626939z",fill:"#296DFF"})]}),_i=e=>jsxs("svg",{viewBox:"0 0 1024 1024",...e,children:[jsx("path",{d:"M558.72 692.266667a344.149333 344.149333 0 0 1-105.642667 16.426666 341.76 341.76 0 0 1-117.162666-20.309333 58.496 58.496 0 0 0-20.224-3.498667c-14.464 0-31.232 4.650667-52.522667 14.421334 0.512-29.653333-4.309333-50.602667-21.290667-64.896-58.538667-49.365333-90.794667-115.285333-90.794666-185.6 0-143.317333 135.466667-259.84 301.994666-259.84 166.485333 0 301.952 116.522667 301.952 259.84 0 2.816-0.085333 5.632-0.170666 8.448a84.48 84.48 0 0 1 89.813333 15.701333c0.597333-7.978667 0.938667-16.042667 0.938667-24.149333 0-193.578667-176.085333-351.061333-392.533334-351.061334-216.490667 0-392.533333 157.482667-392.533333 351.061334 0 91.733333 40.618667 180.48 112.042667 245.76 0.042667 14.506667-2.56 43.306667-8.106667 77.056-3.072 18.517333 5.034667 37.12 20.693333 47.445333a46.805333 46.805333 0 0 0 51.456 0c36.736-24.106667 64.810667-38.058667 76.8-42.026667 44.501333 15.146667 91.477333 22.826667 139.648 22.826667 61.269333 0 119.338667-12.629333 171.093334-35.114667a85.504 85.504 0 0 1-65.450667-72.533333",fill:"#2A8CF4"}),jsx("path",{d:"M939.306667 624.896c-25.088 0-46.037333 17.749333-50.986667 41.386667a120.32 120.32 0 0 1-50.218667 93.141333 13.354667 13.354667 0 0 0 19.2 18.474667c0.682667-1.024 1.408-1.962667 2.133334-2.901334v-0.085333a120.32 120.32 0 0 1 89.472-46.72 52.138667 52.138667 0 0 0-9.6-103.296",fill:"#31A8FF"}),jsx("path",{d:"M836.778667 521.6a52.138667 52.138667 0 1 0-61.952 60.586667 120.32 120.32 0 0 1 93.141333 50.218666 13.354667 13.354667 0 0 0 18.474667-19.2 240.469333 240.469333 0 0 1-2.986667-2.133333 120.32 120.32 0 0 1-46.677333-89.472",fill:"#53E000"}),jsx("path",{d:"M691.84 683.648a120.32 120.32 0 0 1 45.525333-78.421333l3.584-2.645334a13.354667 13.354667 0 0 0-19.2-18.474666l-2.090666 2.858666h-0.042667a120.32 120.32 0 0 1-89.472 46.762667 52.138667 52.138667 0 1 0 60.586667 61.952c0.170667-4.053333 0.512-8.106667 1.109333-12.032",fill:"#FCE117"}),jsx("path",{d:"M804.266667 779.776a120.32 120.32 0 0 1-93.141334-50.218667 13.354667 13.354667 0 0 0-18.602666 19.072l0.128 0.085334a232.32 232.32 0 0 1 2.901333 2.176 120.277333 120.277333 0 0 1 46.762667 89.429333 52.138667 52.138667 0 1 0 61.952-60.586667",fill:"#F96600"})]}),Li=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("path",{d:"M12 3C7.035 3 3 6.36 3 10.5c0 2.28 1.23 4.305 3.15 5.625L5.25 20.25l4.56-2.28C10.53 18 11.25 18 12 18c4.965 0 9-3.36 9-7.5S16.965 3 12 3z",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M12 7.5v6M9 10.5h6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ew={Plus:We,ChevDown:ne,ChevRight:he,Bolt:Ia,Doc:oo,Grid:yi,Mic:hd,Arrow:mn,Check:be,Copy:Tt,Cut:Cd,Refresh:Ue,Volume:Sd,Like:fn,LikeFill:Nd,Dislike:Zs,Share:lo,Sparkles:Aa,ThreadDot:xd,Settings:yd,Stop:Ba,Search:$t,Edit:yt,Atom:kd,Brain:ki,Memo:mr,Close:Q,ChevUp:Ci,Paperclip:Ni,Image:Pd,Globe:Mt,More:Go,Trash:Le,InfoCircle:ea,SuccessCircle:gn,WarningTriangle:fr,ErrorCircle:Zo,ChevLeft:Kt,Shield:gr,Zap:Rd,Quote:Td,Circle:fw,Loader:gw,Sun:Md,Moon:_d,PanelSidebar:Br,PanelSidebarCollapse:vw,Pause:ta,Download:Co,ArrowUp:Tw,ArrowDown:Si,ClipboardList:Or,SidebarIcon:bw,NewTask:ww,Compass:hw,Package:Ld,Folder:qe,Archive:Pi,Logout:Dd,Help:Ed,Bell:xw,Skill:br,Sparkle:Mw,Clock:No,Layers:Ri,Play:vr,CheckCircle:Va,Lock:oa,Mail:Oa,Note:_w,Filter:yw,Sort:Id,Usage:kw,Gauge:Cw,Key:Nw,Server:vn,Cpu:Sw,Device:Pw,Keyboard:Ad,Info:Lw,Hand:Bd,Terminal:So,Maximize:qo,ThumbsUp:Dw,ThumbsDown:Od,Branch:Po,Skills:Rw,AlertCircle:Vd,DingTalk:Ti,DingTalkAi:$d,Feishu:Mi,WeCom:_i,CommentPlus:Li,PanelFold:Fd};function ra({name:e,size:t=20,label:o,style:r,ref:n,...a}){let i=Ew[e],d={width:t,height:t,flexShrink:0,...r};return i?jsx(i,{style:d,"aria-hidden":o?void 0:true,"aria-label":o,role:o?"img":void 0,...a}):(console.warn(`[Icon] Unknown icon name: ${e}`),jsx("span",{style:d,"aria-hidden":o?void 0:true,"aria-label":o,role:o?"img":void 0,...a}))}var Iw={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"};function Ro({size:e="md",className:t}){return jsx("svg",{"data-slot":"spinner","data-ow-part":"spinner",className:g("flex-shrink-0 motion-safe:animate-[ow-spin_var(--ow-dur-spin-fast)_linear_infinite]",Iw[e],t),viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:jsx("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",pathLength:"100",strokeDasharray:"75 25"})})}var Ow=cva(["inline-flex items-center justify-center font-medium whitespace-nowrap","transition-[background-color,border-color,color,box-shadow] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring","disabled:pointer-events-none"].join(" "),{variants:{variant:{primary:["bg-[var(--ow-btn-primary-bg)]","text-[color:var(--ow-btn-primary-fg)]","hover:bg-[var(--ow-btn-primary-hover)]","active:bg-[var(--ow-btn-primary-press)]","disabled:bg-[var(--ow-btn-primary-disabled-bg)]","disabled:text-[color:var(--ow-btn-primary-disabled-fg)]"].join(" "),secondary:["bg-[var(--ow-btn-secondary-bg)]","text-[color:var(--ow-btn-secondary-fg)]","border border-[color:var(--ow-btn-secondary-border)]","hover:bg-[var(--ow-btn-secondary-hover)]","active:bg-[var(--ow-btn-secondary-press)]","disabled:bg-[var(--ow-disabled-bg)]","disabled:text-[color:var(--ow-disabled-text)]","disabled:border-[color:var(--ow-disabled-border)]"].join(" "),ghost:["bg-transparent","text-[color:var(--ow-btn-ghost-fg)]","hover:bg-[var(--ow-btn-ghost-hover)]","active:bg-[var(--ow-btn-ghost-press)]","disabled:bg-transparent","disabled:text-[color:var(--ow-disabled-text)]"].join(" "),text:["bg-transparent","text-[color:var(--ow-btn-text-fg)]","hover:text-[color:var(--ow-text-hover)]","active:text-[color:var(--ow-text-press)]","disabled:text-[color:var(--ow-disabled-text)]"].join(" "),danger:["bg-[var(--ow-btn-danger-bg)]","text-[color:var(--ow-btn-danger-fg)]","hover:bg-[var(--ow-btn-danger-hover)]","active:bg-[var(--ow-btn-danger-press)]","disabled:bg-[var(--ow-btn-danger-disabled-bg)]","disabled:text-[color:var(--ow-btn-danger-disabled-fg)]"].join(" "),unstyled:""},size:{sm:"h-7 gap-1 px-3 text-ow-fs-ui [border-radius:var(--ow-radius-action)]",md:"h-8 gap-1.5 px-4 text-ow-fs-ui [border-radius:var(--ow-radius-action)]",lg:"h-10 gap-1.5 px-6 text-ow-fs-body [border-radius:var(--ow-radius-action)]"},iconOnly:{true:"px-0",false:""},loading:{true:"",false:""}},compoundVariants:[{variant:"primary",loading:true,className:"disabled:bg-[var(--ow-btn-primary-bg)] disabled:text-[color:var(--ow-btn-primary-fg)]"},{variant:"secondary",loading:true,className:"disabled:bg-[var(--ow-btn-secondary-bg)] disabled:text-[color:var(--ow-btn-secondary-fg)] disabled:border-[color:var(--ow-btn-secondary-border)]"},{variant:"ghost",loading:true,className:"disabled:bg-transparent disabled:text-[color:var(--ow-btn-ghost-fg)]"},{variant:"text",loading:true,className:"disabled:text-[color:var(--ow-btn-text-fg)]"},{variant:"danger",loading:true,className:"disabled:bg-[var(--ow-btn-danger-bg)] disabled:text-[color:var(--ow-btn-danger-fg)]"},{size:"sm",iconOnly:true,className:"w-7"},{size:"md",iconOnly:true,className:"w-8"},{size:"lg",iconOnly:true,className:"w-10"}],defaultVariants:{variant:"secondary",size:"md",iconOnly:false,loading:false}}),_u={sm:"w-4 h-4",md:"w-4 h-4",lg:"w-5 h-5"};function Vw({size:e}){return jsx(Ro,{className:_u[e]})}var f=forwardRef(function({variant:t="secondary",size:o="md",icon:r,children:n,className:a,loading:i=false,disabled:d,...s},l){return t==="unstyled"?jsx("button",{ref:l,type:"button",className:a,disabled:d,...s,children:n}):jsxs("button",{ref:l,type:"button","data-slot":"button","data-variant":t,"data-size":o,"data-loading":i||void 0,"data-ow-part":"action","data-ow-role":t==="primary"||t==="danger"?t:"secondary","aria-busy":i||void 0,disabled:d||i,className:g(Ow({variant:t,size:o,iconOnly:!!!!(r&&!n),loading:i&&!d}),a),...s,children:[i?jsx(Vw,{size:o}):r&&jsx("span",{"data-ow-part":"icon",className:g("inline-flex items-center justify-center flex-shrink-0",_u[o]),children:r}),n&&jsx("span",{"data-ow-part":"label",className:"inline-flex min-w-0 items-center gap-[inherit] whitespace-nowrap",children:n})]})});var zd=["inline-flex items-center justify-center cursor-pointer select-none","bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)]","[box-shadow:var(--ow-shadow-pop)]","text-[color:var(--ow-text-2)]","transition-[background-color,color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover-pop)] hover:text-[color:var(--ow-text)]","active:bg-[var(--ow-press-pop)]","disabled:cursor-not-allowed disabled:bg-[var(--ow-disabled-bg)] disabled:text-[color:var(--ow-disabled-text)] disabled:border-[color:var(--ow-disabled-border)] disabled:[box-shadow:none]","ow-focus-ring"].join(" ");function J9({threshold:e=200,target:t,alwaysVisible:o=false,disabled:r,className:n}){let[a,i]=useState(false);useEffect(()=>{let s=t||window,l=()=>{let c=t?t.scrollTop:window.scrollY||document.documentElement.scrollTop;i(c>e);};return l(),s.addEventListener("scroll",l,{passive:true}),()=>s.removeEventListener("scroll",l)},[t,e]);let d=useCallback(()=>{t?t.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"});},[t]);return !a&&!o?null:jsx(f,{"data-slot":"backtop","data-scoped":!!t,"data-ow-part":"action","data-ow-role":"navigation",variant:"unstyled",disabled:r,className:g(zd,"h-8 w-8 p-0 [border-radius:var(--ow-radius-action)] z-[var(--ow-z-sticky)]",t?"sticky left-[calc(100%-64px)] bottom-6":"fixed right-6 bottom-10",n),onClick:d,"aria-label":"\u56DE\u5230\u9876\u90E8",children:jsx(mn,{"aria-hidden":"true",style:{width:16,height:16}})})}var Uw=cva("inline-flex items-center gap-1 whitespace-nowrap border font-medium text-ow-fs-caption leading-none px-1.5 py-0.5 [border-radius:var(--ow-radius-tag)]",{variants:{variant:{normal:"bg-ow-badge-normal-bg text-ow-badge-normal-fg border-ow-badge-normal-border",pending:"bg-ow-badge-pending-bg text-ow-badge-pending-fg border-ow-badge-pending-border",warning:"bg-ow-badge-warning-bg text-ow-badge-warning-fg border-ow-badge-warning-border",error:"bg-ow-badge-error-bg text-ow-badge-error-fg border-ow-badge-error-border",success:"bg-ow-badge-success-bg text-ow-badge-success-fg border-ow-badge-success-border"}},defaultVariants:{variant:"normal"}});function at({variant:e="normal",dot:t=false,count:o,children:r,className:n}){return jsxs("span",{"data-slot":"badge","data-variant":e,"data-ow-part":"label","data-ow-role":e==="normal"?"neutral":e,className:g(Uw({variant:e}),n),children:[t&&jsx("span",{"data-ow-part":"dot",className:"w-1.5 h-1.5 shrink-0 bg-current [border-radius:var(--ow-radius-pill)]","aria-hidden":"true"}),r,o!=null&&jsx("span",{"data-ow-part":"count",className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums",children:o})]})}function zt({title:e,actions:t,header:o,footer:r,padding:n="default",bodyClassName:a,interactive:i,onClick:d,disabled:s=false,variant:l,children:c,className:p,...m}){let u=!s&&(i===true||i!==false&&!!d),b=o!=null||e!=null||t!=null;return jsxs("div",{"data-slot":"card","data-variant":l,"data-ow-part":"surface","data-ow-state":s?"disabled":u?"clickable":void 0,role:u?"button":void 0,tabIndex:u?0:void 0,"aria-disabled":s||void 0,onClick:u?d:void 0,onKeyDown:u?v=>{!u||!d||v.key!=="Enter"&&v.key!==" "||v.target===v.currentTarget&&(v.preventDefault(),d(v));}:void 0,...m,className:g("flex flex-col min-w-0 overflow-hidden","bg-ow-surface border border-ow-border [border-radius:var(--ow-radius-card)]","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",u&&"cursor-pointer hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)] ow-focus-ring",s&&"cursor-not-allowed bg-[var(--ow-disabled-bg)] border-[color:var(--ow-disabled-border)] text-[color:var(--ow-disabled-text)]",p),children:[b&&jsx("div",{"data-ow-part":"head",className:"flex-shrink-0 px-3.5 py-2.5 border-b border-ow-border",children:o??jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{"data-ow-part":"title",className:"flex-1 min-w-0 font-semibold text-ow-fs-ui leading-tight font-[family-name:var(--ow-font-sans)] text-ow-text overflow-hidden text-ellipsis whitespace-nowrap",children:e}),t&&jsx("span",{"data-ow-part":"actions",className:"flex flex-shrink-0 items-center gap-0.5",children:t})]})}),jsx("div",{"data-ow-part":"body",className:g("min-w-0",n==="default"&&"px-3.5 py-3",a),children:c}),r&&jsx("div",{"data-ow-part":"foot",className:"flex flex-shrink-0 items-center gap-2 px-3.5 py-2.5 border-t border-ow-border",children:r})]})}function To({checked:e,defaultChecked:t=false,indeterminate:o=false,onChange:r,disabled:n,className:a="",id:i,"aria-label":d}){let[s,l]=useState(t),c=e??s,p=c||o,m=useCallback(()=>{if(n)return;let u=o?true:!c;l(u),r?.(u);},[c,o,n,r]);return jsx("button",{id:i,type:"button",role:"checkbox","aria-checked":o?"mixed":c,"aria-label":d,disabled:n,"data-slot":"checkbox","data-ow-part":"control","data-ow-role":o?"mixed":c?"on":"off",className:g("relative inline-flex items-center justify-center w-4 h-4 p-0 border","[border-radius:var(--ow-radius-2xs)]","after:content-[''] after:absolute after:-inset-1","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",p?"bg-[var(--ow-control-on)] border-[color:var(--ow-control-on)] text-[color:var(--ow-control-on-glyph)]":"bg-transparent border-[color:var(--ow-control-off)] text-transparent hover:border-[color:var(--ow-border-strong)] active:bg-[var(--ow-press)]",n?"cursor-not-allowed bg-[var(--ow-disabled-bg)] border-[color:var(--ow-disabled-border)] text-[color:var(--ow-disabled-text)] hover:border-[color:var(--ow-disabled-border)] active:bg-[var(--ow-disabled-bg)]":"cursor-pointer",a),onClick:m,children:o?jsx("span",{"aria-hidden":"true",className:"block w-2 h-0.5 [border-radius:var(--ow-radius-pill)] bg-current"}):c&&jsx(be,{className:"w-3 h-3",strokeWidth:2.5})})}var Yw=cva("relative inline-flex"),Xw=cva("absolute z-[var(--ow-z-tooltip)] w-max px-2 py-[5px] box-border [border-radius:var(--ow-radius-sm)] bg-ow-tooltip-bg text-ow-tooltip-text [box-shadow:var(--ow-shadow-pop)] text-ow-fs-caption leading-[18px] font-normal text-left whitespace-normal pointer-events-none animate-[ow-tooltip-in_var(--ow-dur-1)_var(--ow-ease-beacon)]");function aa({content:e,children:t,side:o="top",align:r="center",open:n,defaultOpen:a=false,onOpenChange:i,delay:d=300,offset:s=8,showArrow:l=true,followCursor:c=false,disabled:p=false,maxWidth:m=320,className:u=""}){let b=useId(),w=useRef(null),[v,h]=useState(a),[x,k]=useState({x:0,y:0}),y=n??v,P=_=>{n===void 0&&h(_),i?.(_);},N=()=>{w.current&&clearTimeout(w.current),w.current=null;},S=()=>{p||(N(),w.current=setTimeout(()=>P(true),d));},R=()=>{p||(N(),P(true));},M=()=>{N(),P(false);};useEffect(()=>()=>N(),[]),useEffect(()=>{if(!y)return;let _=L=>{L.key==="Escape"&&M();};return document.addEventListener("keydown",_,true),()=>document.removeEventListener("keydown",_,true)},[y]);let T=_=>{c&&k({x:_.clientX,y:_.clientY});};return jsxs("span",{"data-slot":"tooltip-trigger",className:g(Yw(),u),"aria-describedby":y?b:void 0,onPointerEnter:S,onPointerMove:T,onPointerLeave:M,onFocus:R,onBlur:M,children:[t,y&&!p&&jsxs("span",{id:b,role:"tooltip","data-slot":"tooltip",className:Xw(),style:{...Qw(o,r,s,c,x),maxWidth:m},children:[e,l&&!c&&jsx("span",{"aria-hidden":"true",className:"absolute w-2 h-2 rounded-none bg-ow-tooltip-bg",style:Jw(o,r)})]})]})}function Qw(e,t,o,r,n){if(r)return {position:"fixed",left:n.x+12,top:n.y+14};let i=e==="top"||e==="bottom"?t==="start"?{left:0}:t==="end"?{right:0}:{left:"50%",transform:"translateX(-50%)"}:t==="start"?{top:0}:t==="end"?{bottom:0}:{top:"50%",transform:"translateY(-50%)"};return e==="top"?{bottom:`calc(100% + ${o}px)`,...i}:e==="bottom"?{top:`calc(100% + ${o}px)`,...i}:e==="left"?{right:`calc(100% + ${o}px)`,...i}:{left:`calc(100% + ${o}px)`,...i}}function Jw(e,t){let o=t==="start"?12:t==="end"?void 0:"50%",r=t==="end"?12:void 0;return e==="top"?{bottom:-3,left:o,right:r,transform:t==="center"?"translateX(-50%) rotate(45deg)":"rotate(45deg)"}:e==="bottom"?{top:-3,left:o,right:r,transform:t==="center"?"translateX(-50%) rotate(45deg)":"rotate(45deg)"}:e==="left"?{right:-3,top:o,bottom:r,transform:t==="center"?"translateY(-50%) rotate(45deg)":"rotate(45deg)"}:{left:-3,top:o,bottom:r,transform:t==="center"?"translateY(-50%) rotate(45deg)":"rotate(45deg)"}}var t1={neutral:"var(--ow-progress-fill)",success:"var(--ow-success-on-tint)",warning:"var(--ow-warning-on-tint)",error:"var(--ow-error-on-tint)",info:"var(--ow-info-on-tint)",pending:"var(--ow-pending)"},Vu={neutral:{rest:"bg-ow-surface border-ow-border-strong text-ow-text",hover:"hover:bg-[var(--ow-hover)] focus-within:bg-[var(--ow-hover)]"},mention:{rest:["bg-[var(--ow-mention-bg)] border-[color:var(--ow-info-tint-border)] text-[color:var(--ow-mention-text)]","[&_[data-ow-part=icon]]:text-[color:var(--ow-mention-text)]","[&_[data-ow-part=remove]]:text-[color:var(--ow-mention-text)]"].join(" "),hover:"hover:bg-[var(--ow-info-tint-hover)] focus-within:bg-[var(--ow-info-tint-hover)]"}};function ro({icon:e,avatar:t,label:o,dot:r,count:n,shape:a,tone:i="neutral",selected:d,onRemove:s,removeMode:l="always",removeLabel:c="\u79FB\u9664",onClick:p,disabled:m=false,description:u,tooltip:b,className:w="",...v}){let h=!!p&&!m,x=h&&!s?"button":"span",k=r===true?"neutral":r||null,y=a??(k||n!=null?"pill":"square"),P=y==="pill"?"[border-radius:var(--ow-radius-chip)]":"[border-radius:var(--ow-radius-tag)]",N=d!==void 0,S=d?"bg-[var(--ow-current-bg)] border-[color:var(--ow-border)] text-ow-text font-medium":"bg-transparent border-[color:var(--ow-border)] text-ow-text font-normal",R=t||e,M=jsxs(Fragment,{children:[k&&jsx("span",{"data-ow-part":"dot","data-tone":k,className:"w-1.5 h-1.5 shrink-0 [border-radius:var(--ow-radius-pill)]",style:{background:m?"var(--ow-disabled-text)":t1[k]},"aria-hidden":"true"}),R&&jsx("span",{"data-ow-part":"icon",className:"w-4 h-4 inline-flex items-center justify-center shrink-0 overflow-hidden text-ow-text-2","aria-hidden":"true",children:R}),jsx("span",{"data-ow-part":"label",className:"min-w-0 overflow-hidden text-ellipsis",children:o}),n!=null&&jsx("span",{"data-ow-part":"count",className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-text-2",children:n})]}),T=jsxs(x,{type:x==="button"?"button":void 0,"data-slot":"chip","data-ow-part":"surface","data-shape":y,"data-tone":i,"data-ow-role":N?d?"on":"off":void 0,"aria-disabled":m||void 0,...v,className:g("group inline-flex items-center gap-1.5 max-w-[220px] h-7 px-2.5 border",P,"font-medium text-ow-fs-caption leading-none whitespace-nowrap","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",m?"cursor-not-allowed bg-[var(--ow-disabled-bg)] border-[color:var(--ow-disabled-border)] text-[color:var(--ow-disabled-text)]":N?S:Vu[i].rest,!m&&(h||s)&&(N?!d&&"hover:bg-[var(--ow-hover)]":Vu[i].hover),h&&!s&&"cursor-pointer active:bg-[var(--ow-press)] ow-focus-ring",w),onClick:h&&!s?p:void 0,children:[h&&s?jsx("button",{type:"button","data-ow-part":"body-action",className:g("inline-flex items-center gap-1.5 min-w-0 cursor-pointer bg-transparent border-0 p-0 m-0 [font:inherit] text-inherit ow-focus-ring",P),onClick:p,children:M}):M,s&&jsx("button",{type:"button","data-ow-part":"remove",className:g("relative w-4 h-4 -mr-1 p-0 shrink-0 items-center justify-center",y==="pill"?"[border-radius:var(--ow-radius-pill)]":"[border-radius:var(--ow-radius-2xs)]","text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)] active:bg-[var(--ow-press)]","ow-focus-ring disabled:cursor-not-allowed disabled:text-[color:var(--ow-disabled-text)]","after:absolute after:content-[''] after:-inset-1",l==="hover"?"hidden group-hover:inline-flex group-focus-within:inline-flex":"inline-flex"),disabled:m,onClick:L=>{L.stopPropagation(),s();},"aria-label":c,title:c,children:jsx(Q,{className:"w-3 h-3","aria-hidden":"true"})})]}),_=b??u;return _?jsx(aa,{content:_,side:"top",delay:250,className:"ow-context-chip-tooltip",children:T}):T}var r1=["font-medium","text-[length:var(--ow-fs-eyebrow-cjk)]","tracking-[var(--ow-ls-eyebrow-cjk)]","text-[color:var(--ow-eyebrow)]","leading-none whitespace-nowrap"].join(" ");function Wd({orientation:e="horizontal",children:t,className:o,...r}){return e==="vertical"?jsx("div",{"data-slot":"divider",role:"separator","aria-orientation":"vertical",className:g("w-px self-stretch bg-[var(--ow-border)]",o),...r}):t?jsxs("div",{"data-slot":"divider",role:"separator","aria-orientation":"horizontal",className:g("flex w-full items-center gap-3",o),...r,children:[jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-[var(--ow-border)]"}),jsx("span",{className:r1,children:t}),jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-[var(--ow-border)]"})]}):jsx("div",{"data-slot":"divider",role:"separator","aria-orientation":"horizontal",className:g("h-px w-full bg-[var(--ow-border)]",o),...r})}var $u={page:{mark:52,box:"gap-3.5 px-6 mt-14 mx-auto max-w-[488px]",button:"md",action:"primary"},md:{mark:40,box:"gap-3 px-4 py-8",button:"md",action:"secondary"},sm:{mark:28,box:"gap-2 px-3 py-4",button:"sm",action:"secondary"}},n1="13 11.7 73.4 45.3",i1=45.3/73.4;function s1({size:e=52}){return jsxs("svg",{width:e,height:Math.round(e*i1),viewBox:n1,"aria-hidden":"true",className:"ow-empty-icon block mb-4",style:{color:"var(--ow-empty-mark)"},children:[jsx("circle",{cx:"48",cy:"48",r:"8.2",fill:"currentColor"}),jsx("circle",{cx:"60.2",cy:"20.6",r:"6.7",fill:"currentColor",opacity:".6"}),jsx("circle",{cx:"41.76",cy:"18.66",r:"5.5",fill:"currentColor",opacity:".45"}),jsx("circle",{cx:"25.71",cy:"27.93",r:"4.3",fill:"currentColor",opacity:".3"}),jsx("circle",{cx:"18.16",cy:"44.86",r:"3.3",fill:"currentColor",opacity:".2"}),jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:"currentColor"})]})}function H({title:e,message:t,actionLabel:o,onAction:r,action:n,actionVariant:a,size:i="md",variant:d="default",markSize:s,className:l}){if(d==="card")return jsx("div",{"data-slot":"empty-state","data-ow-variant":"card",role:"status",className:g("px-4 py-7 text-center [text-wrap:pretty]","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-lg)] bg-[var(--ow-surface)]","text-ow-fs-body leading-normal text-[color:var(--ow-text-2)]",l),children:t});if(d==="text")return jsx("div",{"data-slot":"empty-state","data-ow-variant":"text",role:"status",className:g("px-2.5 py-4 text-ow-fs-ui leading-normal text-[color:var(--ow-text-2)]",l),children:t});let c=$u[i]??$u.md,p=i==="page";return jsxs("div",{"data-slot":"empty-state","data-ow-size":i,"data-ow-variant":"default",role:"status",className:g("flex flex-col items-center justify-center text-center",c.box,l),children:[jsx(s1,{size:s??c.mark}),e?jsx("p",{className:"m-0 text-ow-fs-subtitle font-medium leading-[1.4] text-[color:var(--ow-text)]",children:e}):null,jsx("p",{className:g("m-0 text-[color:var(--ow-text-2)]",p?"text-ow-fs-body leading-[1.75] [text-wrap:pretty]":"text-ow-fs-ui leading-normal"),children:t}),n??(o&&jsx(f,{variant:a??c.action,size:c.button,onClick:r,children:o}))]})}var c1=cva(["flex w-full min-w-0 box-border border","text-[color:var(--ow-input-text)]","transition-[border-color,background-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]"].join(" "),{variants:{tier:{base:"",pop:""},disabled:{true:"text-[color:var(--ow-input-disabled-text)] cursor-not-allowed",false:["[&:hover:not(:focus-within)]:border-[color:var(--ow-input-border-hover)]","focus-within:border-[color:var(--ow-input-border-focus)]"].join(" ")},error:{true:"",false:""},multiline:{true:"items-start [border-radius:var(--ow-radius-card)]",false:"items-center [border-radius:var(--ow-radius-control)]"},size:{md:"gap-1.5",lg:"gap-2"}},compoundVariants:[{disabled:true,className:"bg-[var(--ow-input-disabled-bg)] border-[color:var(--ow-disabled-border)]"},{disabled:false,tier:"base",className:"bg-[var(--ow-input-bg)] border-[color:var(--ow-input-border)]"},{disabled:false,tier:"pop",className:"bg-[var(--ow-input-bg-pop)] border-[color:var(--ow-input-border-pop)]"},{multiline:false,size:"md",className:"h-8 px-2.5"},{multiline:false,size:"lg",className:"h-10 px-3"},{multiline:true,size:"md",className:"py-2 px-2.5"},{multiline:true,size:"lg",className:"py-2.5 px-3"},{error:true,disabled:false,className:"border-[color:var(--ow-error)] [&:hover:not(:focus-within)]:border-[color:var(--ow-error)] focus-within:border-[color:var(--ow-error)]"}],defaultVariants:{tier:"base",disabled:false,error:false,multiline:false,size:"md"}}),Ys=cva(["w-full min-w-0 flex-1 bg-transparent border-0 outline-none","font-normal text-ow-fs-ui text-[color:var(--ow-input-text)]","placeholder:text-[color:var(--ow-placeholder)]","disabled:cursor-not-allowed disabled:text-[color:var(--ow-input-disabled-text)]"].join(" "),{variants:{multiline:{true:"resize-y min-h-20 leading-normal",false:"h-full"}},defaultVariants:{multiline:false}}),Hu="inline-flex items-center justify-center shrink-0 [&_svg]:w-4 [&_svg]:h-4 text-[color:var(--ow-text-3)]",te=forwardRef(function({value:t,defaultValue:o,placeholder:r,disabled:n,onChange:a,multiline:i=false,standalone:d=true,type:s="text",size:l="md",tier:c="base",prefix:p,suffix:m,error:u,errorDetail:b,invalid:w,className:v,"aria-invalid":h,"aria-describedby":x,...k},y){let P=useId(),N=!!u,S=N||!!w||h===true||h==="true",M={value:t,defaultValue:o,placeholder:r,disabled:n,onChange:L=>{a?.(L.target.value);},"aria-invalid":h??(S||void 0),"aria-describedby":g(x,N?P:void 0)||void 0};if(!d&&!!!(p||m))return i?jsx("textarea",{ref:y,"data-slot":"field","data-variant":"textarea","data-ow-part":"control","data-ow-role":"input",className:g(Ys({multiline:true}),v),...M,...k}):jsx("input",{ref:y,"data-slot":"field","data-variant":"text","data-ow-part":"control","data-ow-role":"input",type:s,className:g(Ys({multiline:false}),v),...M,...k});let _=i?jsx("textarea",{ref:y,"data-slot":"field-control","data-variant":"textarea",className:Ys({multiline:true}),...M,...k}):jsx("input",{ref:y,"data-slot":"field-control","data-variant":"text",type:s,className:Ys({multiline:false}),...M,...k});return jsxs("div",{"data-slot":"field","data-ow-part":"control","data-ow-role":"input","data-ow-state":g(n&&"disabled",S&&"error")||void 0,className:g("flex flex-col gap-1 w-full min-w-0",v),children:[jsxs("div",{"data-ow-part":"shell","data-tier":c,className:c1({tier:c,disabled:!!n,error:S,multiline:i,size:l}),children:[p&&jsx("span",{className:g(Hu,i&&"mt-0.5"),"data-ow-part":"prefix",children:p}),_,m&&jsx("span",{className:g(Hu,i&&"mt-0.5"),"data-ow-part":"suffix",children:m})]}),N&&jsxs("div",{"data-ow-part":"error",id:P,className:"flex flex-col gap-0.5",children:[jsx("span",{className:"text-ow-fs-ui leading-[1.4] text-[color:var(--ow-error)]",children:u}),b&&jsx("span",{className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-fs-caption leading-[1.5] text-[color:var(--ow-text-3)] line-clamp-2 break-all",children:b})]})]})});var p1=["inline-flex items-center justify-center","h-[18px] min-w-[18px] px-[5px]","bg-[var(--ow-surface-2)] border border-[color:var(--ow-border)]","[border-radius:var(--ow-radius-key)]","font-medium text-ow-fs-mark-md leading-none text-[color:var(--ow-text-2)]","[font-family:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]","whitespace-nowrap select-none"].join(" ");function Vr({children:e,className:t,...o}){return jsx("kbd",{"data-slot":"keycap","data-ow-part":"key",className:g(p1,t),...o,children:e})}function Ai({keys:e,className:t,"aria-label":o,...r}){return jsx("span",{"data-slot":"keycap-combo",className:g("inline-flex items-center gap-[3px]",t),"aria-label":o??e.join("+"),...r,children:e.map((n,a)=>jsxs("span",{className:"inline-flex items-center gap-[3px]",children:[a>0&&jsx("span",{"aria-hidden":"true",className:"text-ow-fs-mark-md leading-none text-[color:var(--ow-text-3)] [font-family:var(--ow-font-mono)]",children:"+"}),jsx(Vr,{"aria-hidden":"true",children:n})]},`${n}-${a}`))})}var $a={type:"separator"},w1="---";function Zu(e){return "type"in e&&e.type==="separator"||!("type"in e)&&e.key===w1}function qu(e){return "type"in e&&e.type==="group"}function Ku(e){return !Zu(e)&&!qu(e)}function ju(e){return e.searchText??(typeof e.label=="string"?e.label:"")}function h1(e){return (Array.isArray(e)?e:e.split("+")).map(t=>t.trim()).filter(Boolean)}var x1=["button","[href]","input","select","textarea",'[tabindex]:not([tabindex="-1"])'].join(", ");function Qs(e){return e?Array.from(e.querySelectorAll(x1)).filter(t=>!(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-hidden")==="true")):[]}var y1=cva(["flex items-center gap-2 w-full px-2 text-left text-ow-fs-ui font-normal","transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","[border-radius:var(--ow-radius-control)] ow-focus-ring"].join(" "),{variants:{danger:{true:"text-[color:var(--ow-error)]",false:"text-[color:var(--ow-text)]"},selected:{true:"bg-[var(--ow-selected-bg)]",false:""},hovered:{true:"",false:""},disabled:{true:"cursor-not-allowed text-[color:var(--ow-disabled-text)]",false:"cursor-pointer"},hasDescription:{true:"h-auto py-2 items-start",false:"h-8"}},compoundVariants:[{hovered:true,selected:false,disabled:false,danger:false,className:"bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]"},{hovered:true,selected:false,disabled:false,danger:true,className:"bg-[var(--ow-error-tint)] active:bg-[var(--ow-error-tint-hover)]"}],defaultVariants:{danger:false,selected:false,hovered:false,disabled:false,hasDescription:false}});function pt({items:e=[],children:t,contentKey:o,onSelect:r,activeKey:n,onItemHover:a,width:i=200,header:d,headerBare:s=false,banner:l,footer:c,searchable:p=false,searchPlaceholder:m="\u641C\u7D22",searchValue:u,onSearchChange:b,empty:w="\u6682\u65E0\u7ED3\u679C",portal:v=false,autoAdjust:h=false,align:x="start",role:k,autoFocus:y=false,onClose:P,ariaLabel:N,surfaceRef:S,className:R=""}){let[M,T]=useState(null),[_,L]=useState(""),I=useRef(null),$=useCallback(U=>{I.current=U,S&&(S.current=U);},[S]),F=useRef(new Map),E=useRef({buffer:"",at:0}),[O,ae]=useState(null),[z,pe]=useState({x:0,y:0}),Me=useRef(z),Oe=useId(),ee=k??(t?"none":"menu"),q=u??_,A=useMemo(()=>{if(!p||!q.trim())return e;let U=q.trim().toLowerCase();return e.filter(ke=>!Ku(ke)||ju(ke).toLowerCase().includes(U))},[e,q,p]),D=useMemo(()=>A.filter(U=>Ku(U)&&!U.disabled),[A]),Ee=useMemo(()=>D.some(U=>!!U.control),[D])||!!d&&s||!!l,Ge=useCallback(()=>{let U=I.current,ke=Ie=>U?.querySelector(`:scope > [data-ow-part="${Ie}"]`),j=[];s&&j.push(...Qs(ke("header"))),j.push(...Qs(ke("banner")));for(let Ie of D){let we=F.current.get(Ie.key);we&&(j.push(we),Ie.control&&j.push(...Qs(we.querySelector('[data-ow-part="item-control"]'))));}return j.push(...Qs(ke("footer"))),j},[D,s]),et=U=>{u===void 0&&L(U),b?.(U);},ht=useCallback((U,ke)=>{T(U),U&&ke&&F.current.get(U)?.focus();},[]);useEffect(()=>{if(!y)return;let U=requestAnimationFrame(()=>{if(y==="surface"){I.current?.focus();return}if(p){I.current?.querySelector("input")?.focus(),T(D[0]?.key??null);return}let ke=D[0]?.key;ke?ht(ke,true):I.current?.focus();});return ()=>cancelAnimationFrame(U)},[y]);let to=U=>{let ke=U.target,j=!!ke.closest?.('[data-ow-part="item-control"]'),Ie=ke.tagName==="INPUT"&&!j;if(U.key==="Escape"){U.stopPropagation(),P?.();return}if(U.key==="Tab"){if(!Ee){P?.();return}let de=Ge(),ve=typeof document>"u"?null:document.activeElement,X=ve?de.indexOf(ve):-1;if(X<0&&ve){for(let ce=de.length-1;ce>=0;ce-=1)if(de[ce]?.contains(ve)){X=ce;break}}let Ce=X+(U.shiftKey?-1:1);if(X<0||Ce<0||Ce>=de.length){P?.();return}U.preventDefault(),de[Ce]?.focus();return}if(j&&U.isDefaultPrevented()||D.length===0)return;let we=D.findIndex(de=>de.key===M);if(U.key==="ArrowDown"||U.key==="ArrowUp"){U.preventDefault();let de=U.key==="ArrowDown"?1:-1,ve=we<0?de>0?0:D.length-1:(we+de+D.length)%D.length,X=D[ve];X&&ht(X.key,!Ie);return}if(U.key==="Home"||U.key==="End"){U.preventDefault();let de=D[U.key==="Home"?0:D.length-1];de&&ht(de.key,!Ie);return}if(U.key==="Enter"&&M&&!Ie&&!j){U.preventDefault(),r?.(M);return}if(U.key===" "&&M&&!Ie&&!j&&D.find(ve=>ve.key===M)?.control){U.preventDefault(),r?.(M);return}if(!Ie&&!j&&U.key.length===1&&!U.metaKey&&!U.ctrlKey&&!U.altKey){let de=Date.now();E.current={buffer:de-E.current.at>800?U.key:E.current.buffer+U.key,at:de};let ve=E.current.buffer.toLowerCase(),X=D.find(Ce=>ju(Ce).toLowerCase().startsWith(ve));X&&(U.preventDefault(),ht(X.key,true));}};useLayoutEffect(()=>{if(!h||v){Me.current={x:0,y:0},pe(we=>we.x||we.y?{x:0,y:0}:we);return}let U=I.current;if(!U)return;let ke=0,j=()=>{cancelAnimationFrame(ke),ke=requestAnimationFrame(()=>{let we=U.getBoundingClientRect(),de=Me.current,ve={left:we.left-de.x,right:we.right-de.x,top:we.top-de.y,bottom:we.bottom-de.y},X=0,Ce=0;ve.right>window.innerWidth-8&&(X=window.innerWidth-8-ve.right),ve.left+X<8&&(X=8-ve.left),ve.bottom>window.innerHeight-8&&(Ce=window.innerHeight-8-ve.bottom),ve.top+Ce<8&&(Ce=8-ve.top),(X!==de.x||Ce!==de.y)&&(Me.current={x:X,y:Ce},pe({x:X,y:Ce}));});};j();let Ie=typeof ResizeObserver>"u"?null:new ResizeObserver(j);return Ie?.observe(U),window.addEventListener("resize",j),window.addEventListener("scroll",j,true),()=>{cancelAnimationFrame(ke),Ie?.disconnect(),window.removeEventListener("resize",j),window.removeEventListener("scroll",j,true);}},[h,v]),useLayoutEffect(()=>{if(!v)return;let U=I.current;if(!U)return;let ke=()=>{let Ie=typeof v=="object"&&v.current?v.current:U.parentElement;if(!Ie)return;let we=Ie.getBoundingClientRect(),de=U.getBoundingClientRect(),ve=jd(U),X=ve?ve.getBoundingClientRect().left:0,Ce=ve?ve.getBoundingClientRect().top:0,ce=we.bottom+4-Ce,Ko=(x==="end"?we.right-de.width:we.left)-X;we.bottom+4+de.height>window.innerHeight-8&&(ce=we.top-de.height-4-Ce),ce+Ce<8&&(ce=8-Ce),Ko+X+de.width>window.innerWidth-8&&(Ko=window.innerWidth-de.width-8-X),Ko+X<8&&(Ko=8-X),ae(pr=>pr&&pr.top===ce&&pr.left===Ko?pr:{top:ce,left:Ko});},j=requestAnimationFrame(ke);return window.addEventListener("resize",ke),window.addEventListener("scroll",ke,true),()=>{cancelAnimationFrame(j),window.removeEventListener("resize",ke),window.removeEventListener("scroll",ke,true);}},[v,x,e.length,o]);let Ze=jsxs("div",{ref:$,"data-slot":"menu-surface","data-ow-part":"surface",tabIndex:-1,role:ee==="menu"?"menu":void 0,"aria-label":ee==="menu"?N:void 0,"aria-activedescendant":ee==="menu"&&M?`${Oe}-${M}`:void 0,onKeyDown:to,className:g("bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)] shadow-[var(--ow-shadow-pop)] p-1.5 box-border outline-none","[border-radius:var(--ow-radius-menu)]",R),style:{width:i,...v?{position:"fixed",zIndex:"var(--ow-z-dropdown)",top:O?.top??-9999,left:O?.left??-9999,visibility:O?"visible":"hidden"}:{transform:z.x||z.y?`translate(${z.x}px, ${z.y}px)`:void 0}},children:[d&&(s?jsx("div",{"data-ow-part":"header","data-ow-variant":"bare",role:"none",children:d}):jsx("div",{"data-ow-part":"header",className:"font-medium text-ow-fs-eyebrow leading-none text-[color:var(--ow-eyebrow)] px-2 pt-2 pb-1.5 uppercase tracking-[var(--ow-ls-eyebrow)]",children:d})),l&&jsx("div",{"data-ow-part":"banner",role:"none",children:l}),p&&jsx(te,{value:q,onChange:et,placeholder:m,"aria-label":m,tier:"pop",className:"mb-1.5"}),jsx("div",{"data-ow-part":"list",className:"min-h-0",children:t??(A.length===0?jsx("div",{"data-ow-part":"empty",children:jsx(H,{message:w,variant:"text"})}):A.map((U,ke)=>{if(Zu(U))return jsx("div",{"data-ow-part":"separator",role:ee==="menu"?"separator":void 0,className:"h-px bg-[var(--ow-border)] mx-1.5 my-1.5"},U.key??`separator-${ke}`);if(qu(U))return jsx("div",{"data-ow-part":"group",className:"font-medium text-ow-fs-eyebrow leading-none text-[color:var(--ow-eyebrow)] px-2 pt-2 pb-1.5 uppercase tracking-[var(--ow-ls-eyebrow)]",children:U.label},U.key??`group-${ke}`);let j=U,Ie=n===j.key,we=M===j.key&&!j.disabled,de=j.shortcut?h1(j.shortcut):null,ve={id:`${Oe}-${j.key}`,"data-ow-part":"item","data-ow-role":j.danger?"danger":j.selected||Ie?"selected":"default","data-ow-state":we?"highlighted":void 0,role:ee==="menu"?j.selected===void 0?"menuitem":"menuitemcheckbox":void 0,"aria-checked":ee==="menu"&&j.selected!==void 0?j.selected:void 0,className:y1({danger:j.danger,selected:j.selected||Ie,hovered:we,disabled:j.disabled,hasDescription:!!j.description}),onMouseEnter:()=>{T(j.key),j.disabled||a?.(j.key);},onMouseLeave:()=>T(null),onFocus:()=>T(j.key),onClick:()=>{j.disabled||r?.(j.key);}},X=jsxs(Fragment,{children:[j.icon&&jsx("span",{"data-ow-part":"item-icon",className:"w-4 h-4 shrink-0 inline-flex items-center justify-center text-[color:var(--ow-text-3)]",children:j.icon}),jsxs("span",{className:"flex-1 flex flex-col gap-0.5 min-w-0",children:[jsx("span",{className:"flex-1",children:j.label}),j.description&&jsx("span",{className:"text-ow-fs-eyebrow font-normal leading-snug text-[color:var(--ow-text-3)]",children:j.description})]}),de&&de.length>0?jsx(Ai,{"data-ow-part":"shortcut",className:"shrink-0",keys:de}):j.hint&&jsx("span",{"data-ow-part":"hint",className:g("text-ow-fs-eyebrow leading-snug font-normal text-[color:var(--ow-text-3)]",j.hintMono&&"font-[family-name:var(--ow-font-mono)] tabular-nums"),children:j.hint}),j.control&&jsx("span",{"data-ow-part":"item-control",className:"shrink-0 inline-flex items-center",onClick:Ce=>Ce.stopPropagation(),children:j.control}),j.selected&&jsx(be,{"data-ow-part":"check","aria-hidden":"true",className:"w-4 h-4 shrink-0 text-[color:var(--ow-text)]"})]});return j.control?jsx("div",{...ve,ref:Ce=>{Ce?F.current.set(j.key,Ce):F.current.delete(j.key);},tabIndex:-1,"aria-disabled":j.disabled||void 0,children:X},j.key):jsx(f,{...ve,ref:Ce=>{Ce?F.current.set(j.key,Ce):F.current.delete(j.key);},variant:"unstyled",disabled:j.disabled,children:X},j.key)}))}),c&&jsx("div",{"data-ow-part":"footer",className:"border-t border-[color:var(--ow-border)] mt-1 pt-1",children:c})]});return v&&typeof document<"u"?createPortal(Ze,document.body):Ze}function co({trigger:e,open:t,onOpenChange:o,closeOnSelect:r=true,triggerClassName:n="",onSelect:a,...i}){let[d,s]=useState(false),l=t??d,c=useRef(null),p=useRef(null),m=useCallback(k=>{t===void 0&&s(k),o?.(k);},[t,o]),u=useCallback(()=>{c.current?.querySelector("button, [href], [tabindex]:not([tabindex='-1'])")?.focus();},[]),b=useCallback(()=>m(false),[m]),w=useCallback(()=>{m(false),u();},[m,u]),v=useCallback(()=>m(!l),[l,m]);useEffect(()=>{if(!l)return;let k=y=>{let P=y.target;P&&(c.current?.contains(P)||p.current?.contains(P)||m(false));};return document.addEventListener("pointerdown",k,true),()=>document.removeEventListener("pointerdown",k,true)},[l,m]);let h=useRef(false),x={"aria-haspopup":"menu","aria-expanded":l,onClick:k=>{h.current=k.detail===0,v();},onKeyDown:k=>{(k.key==="ArrowDown"||k.key==="ArrowUp")&&(k.preventDefault(),h.current=true,m(true));}};return jsxs("span",{"data-slot":"menu",className:g("inline-flex",n),ref:c,children:[typeof e=="function"?e({open:l,toggle:v,close:b,triggerProps:x}):isValidElement(e)?cloneElement(e,{...x,onClick:k=>{e.props.onClick?.(k),k.defaultPrevented||(h.current=k.detail===0,v());},onKeyDown:k=>{e.props.onKeyDown?.(k),x.onKeyDown(k);}}):e,l&&jsx(pt,{...i,surfaceRef:p,portal:c,autoFocus:h.current?true:"surface",onClose:w,onSelect:k=>{r&&m(false),a?.(k);}})]})}function jd(e){let t=e.parentElement;for(;t&&t!==document.body&&t!==document.documentElement;){let o=getComputedStyle(t),r=o.transform||o.webkitTransform;if(r&&r!=="none"||o.filter&&o.filter!=="none"||o.perspective&&o.perspective!=="none"||o.willChange==="transform"||o.willChange==="filter"||o.willChange==="perspective")return t;t=t.parentElement;}return null}var X7=pt,Q7={key:"---",label:""};var S1={info:jsx(ea,{}),success:jsx(gn,{}),warning:jsx(fr,{}),error:jsx(Zo,{})};function J({variant:e="info",tone:t="tint",title:o,children:r,icon:n,meta:a,detail:i,showDetailLabel:d="\u663E\u793A\u8BE6\u60C5",hideDetailLabel:s="\u9690\u85CF\u8BE6\u60C5",action:l,closable:c=false,onClose:p,className:m}){let[u,b]=useState(false),w=!!i?.trim(),v=w?P1(i):"",h=useCallback(()=>b(x=>!x),[]);return jsx("div",{"data-slot":"inline-message","data-variant":e,"data-tone":t,"data-ow-part":"surface","data-ow-role":e,role:e==="error"?"alert":"status",className:g(m),children:jsxs("div",{"data-ow-part":"row",children:[n!==null&&jsx("span",{"data-ow-part":"icon","aria-hidden":"true",children:n??S1[e]}),jsxs("div",{"data-ow-part":"body",children:[o&&jsx("div",{"data-ow-part":"title",children:o}),r&&jsx("div",{"data-ow-part":"text",children:r}),w&&jsxs("div",{"data-ow-part":"detail",children:[jsxs("button",{type:"button","data-ow-part":"detail-toggle","aria-expanded":u,onClick:h,children:[jsx(ne,{className:g("transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",u&&"rotate-180"),"aria-hidden":"true"}),jsx("span",{children:u?s:d})]}),u&&jsxs(Fragment,{children:[jsx("div",{"data-ow-part":"detail-rule"}),jsx("pre",{"data-ow-part":"detail-body",children:v})]})]}),l&&jsx("div",{"data-ow-part":"action",children:l})]}),a&&jsx("span",{"data-ow-part":"meta",children:a}),c&&jsx("button",{type:"button","data-ow-part":"close","aria-label":"\u5173\u95ED\u63D0\u793A",onClick:p,children:jsx(Q,{"aria-hidden":"true"})})]})})}function P1(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function sS({title:e="\u8BF7\u6C42\u9519\u8BEF",message:t="\u8BF7\u6C42\u88AB\u670D\u52A1\u7AEF\u62D2\u7EDD\u3002",retryLabel:o="\u91CD\u8BD5",onRetry:r,retryDisabled:n,detail:a,showDetailLabel:i="\u663E\u793A\u8BE6\u60C5",hideDetailLabel:d="\u9690\u85CF\u8BE6\u60C5",version:s,className:l}){return jsx(J,{variant:"error",title:e,meta:s,detail:a,showDetailLabel:i,hideDetailLabel:d,className:l,action:r?jsx(f,{type:"button",variant:"secondary",size:"sm",onClick:r,disabled:n,"data-ow-part":"retry",className:"bg-transparent border-[color:var(--ow-error-tint-border)] text-[color:var(--ow-error-on-tint)] hover:bg-[var(--ow-error-tint-hover)] hover:text-[color:var(--ow-error-on-tint)] active:bg-[var(--ow-error-tint-hover)]",children:o}):void 0,children:t})}var pS=te;function Xu(e,t){let o=Math.max(0,Math.trunc(e));if(o<=7)return Array.from({length:o},(n,a)=>a+1);let r=Math.min(Math.max(1,Math.trunc(t)),o);return r<=4?[1,2,3,4,5,"ellipsis-end",o]:r>=o-3?[1,"ellipsis-start",o-4,o-3,o-2,o-1,o]:[1,"ellipsis-start",r-1,r,r+1,"ellipsis-end",o]}function wn({current:e,total:t,pageSize:o=10,onChange:r,className:n}){let a=Math.ceil(t/o),i=useCallback(()=>{e>1&&r?.(e-1);},[e,r]),d=useCallback(()=>{e<a&&r?.(e+1);},[e,a,r]);if(a<=1)return null;let s=Xu(a,e);return jsxs("div",{"data-slot":"pagination","data-ow-part":"navigation",className:g("flex items-center gap-1",n),children:[jsx(f,{variant:"ghost",size:"sm",icon:jsx(Kt,{style:{width:14,height:14}}),className:"text-ow-text-2",disabled:e<=1,onClick:i,"aria-label":"\u4E0A\u4E00\u9875"}),s.map(l=>typeof l=="number"?jsx(f,{"data-ow-role":l===e?"active":"inactive",variant:"ghost",size:"sm",className:g("w-7 min-w-7 px-0 text-ow-text-2 font-normal tabular-nums font-[family-name:var(--ow-font-mono)]",l===e&&"bg-ow-surface-2 text-ow-text font-medium border border-[color:var(--ow-border-strong)]"),onClick:()=>r?.(l),"aria-current":l===e?"page":void 0,"aria-label":`\u7B2C ${l} \u9875`,children:l},l):jsx("span",{className:"w-7 text-center text-ow-text-3 text-ow-fs-ui font-normal","aria-hidden":"true",children:"\u2026"},l)),jsx(f,{variant:"ghost",size:"sm",icon:jsx(he,{style:{width:14,height:14}}),className:"text-ow-text-2",disabled:e>=a,onClick:d,"aria-label":"\u4E0B\u4E00\u9875"})]})}function la({value:e=0,size:t="md",tone:o="default",indeterminate:r=false,showValue:n=false,"aria-label":a,className:i,style:d}){let s=Math.min(100,Math.max(0,e));return jsxs("div",{"data-slot":"progress-bar","data-ow-size":t,"data-ow-tone":o,"data-ow-state":r?"indeterminate":"determinate",className:g("flex items-center gap-2 w-full",i),style:d,children:[jsx("div",{"data-ow-part":"track",role:"progressbar","aria-label":a,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r?void 0:Math.round(s),children:jsx("div",{"data-ow-part":"fill",style:r?void 0:{width:`${s}%`}})}),n&&!r&&jsxs("span",{"data-ow-part":"value",children:[Math.round(s),"%"]})]})}var tm=createContext(null);function E1({checked:e,onChange:t,disabled:o,className:r="",value:n,id:a,"aria-label":i}){let d=useContext(tm),s=d&&n!==void 0?d.value===n:e??false,l=o??d?.disabled??false,c=useCallback(()=>{l||s||(d&&n!==void 0&&d.onChange(n),t?.(true));},[d,n,s,l,t]);return jsx("button",{id:a,type:"button",role:"radio","aria-checked":s,"aria-label":i,disabled:l,"data-slot":"radio","data-ow-part":"control","data-ow-role":s?"on":"off","data-ow-value":n,className:g("relative inline-flex items-center justify-center w-4 h-4 rounded-full border-[1.5px] p-0 bg-transparent","after:content-[''] after:absolute after:-inset-1 after:rounded-full","transition-[border-color,background-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",s?"border-[color:var(--ow-control-on)]":"border-[color:var(--ow-control-off)] hover:border-[color:var(--ow-border-strong)] active:bg-[var(--ow-press)]",l?"cursor-not-allowed border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)] hover:border-[color:var(--ow-disabled-border)] active:bg-[var(--ow-disabled-bg)]":"cursor-pointer",r),onClick:c,children:s&&jsx("span",{className:g("w-2 h-2 rounded-full",l?"bg-[var(--ow-disabled-text)]":"bg-[var(--ow-control-on)]")})})}function I1({value:e,onChange:t,children:o,disabled:r=false,className:n="","aria-label":a}){let i=useRef(null),d=useCallback(()=>{let l=i.current;return l?Array.from(l.querySelectorAll('[role="radio"]:not(:disabled)')):[]},[]);useEffect(()=>{let l=d();if(l.length===0)return;let c=l.findIndex(p=>p.getAttribute("aria-checked")==="true");l.forEach((p,m)=>{p.tabIndex=m===(c>=0?c:0)?0:-1;});});let s=useCallback(l=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(l.key))return;let p=d();if(p.length===0)return;let m=p.indexOf(l.target),u;l.key==="Home"?u=0:l.key==="End"?u=p.length-1:l.key==="ArrowRight"||l.key==="ArrowDown"?u=m<0?0:(m+1)%p.length:u=m<0?0:(m-1+p.length)%p.length,l.preventDefault();let b=p[u];if(!b)return;b.focus();let w=b.getAttribute("data-ow-value");w!==null&&w!==e&&t(w);},[d,t,e]);return jsx(tm.Provider,{value:{value:e,onChange:t,disabled:r},children:jsx("div",{ref:i,"data-slot":"radio-group",className:g("flex flex-col gap-2",n),role:"radiogroup","aria-label":a,onKeyDown:s,children:o})})}function Ht({options:e,value:t,defaultValue:o,onChange:r,size:n="md",variant:a="well",disabled:i=false,className:d,"aria-label":s}){let[l,c]=useState(o??e[0]?.value??""),p=t??l,m=useRef(null),u=useCallback(v=>{i||v===p||(c(v),r?.(v));},[i,p,r]),b=useCallback(()=>{let v=m.current;return v?Array.from(v.querySelectorAll('[role="radio"]:not(:disabled)')):[]},[]);useEffect(()=>{let v=b();if(v.length===0)return;let h=v.findIndex(x=>x.getAttribute("aria-checked")==="true");v.forEach((x,k)=>{x.tabIndex=k===(h>=0?h:0)?0:-1;});});let w=useCallback(v=>{if(!["ArrowRight","ArrowLeft","Home","End"].includes(v.key))return;let x=b();if(x.length===0)return;let k=x.indexOf(v.target),y;v.key==="Home"?y=0:v.key==="End"?y=x.length-1:v.key==="ArrowRight"?y=k<0?0:(k+1)%x.length:y=k<0?0:(k-1+x.length)%x.length,v.preventDefault();let P=x[y];if(!P)return;P.focus();let N=P.getAttribute("data-ow-value");N!==null&&u(N);},[b,u]);return jsx("div",{ref:m,role:"radiogroup","aria-label":s,"data-slot":"segmented-control","data-size":n,"data-variant":a,"data-ow-part":"control",onKeyDown:w,className:g("inline-flex items-stretch gap-0.5 p-0.5 [border-radius:var(--ow-radius-sm)]",a==="well"?"bg-[var(--ow-surface-2)]":"bg-transparent border border-[color:var(--ow-border)]",i&&"cursor-not-allowed",d),children:e.map(v=>{let h=p===v.value,x=i||v.disabled;return jsxs("button",{type:"button",role:"radio","aria-checked":h,disabled:x,"data-ow-part":"segment","data-ow-role":h?"on":"off","data-ow-value":v.value,onClick:()=>u(v.value),className:g("inline-flex items-center justify-center gap-1.5 px-2.5 border-none",n==="sm"?"h-6":"h-7",a==="well"?"[border-radius:var(--ow-radius-xs)]":"[border-radius:var(--ow-radius-2xs)]",a==="well"?"text-[length:var(--ow-fs-ui)]":"text-[length:var(--ow-fs-caption)]","leading-none whitespace-nowrap","transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring focus-visible:relative focus-visible:z-[1]",h?g("font-medium text-[color:var(--ow-text)]",a==="well"?"bg-[var(--ow-segment-on-bg)]":"bg-[var(--ow-current-bg)]"):"bg-transparent font-normal text-[color:var(--ow-text-2)] hover:text-[color:var(--ow-text)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",x?"cursor-not-allowed text-[color:var(--ow-disabled-text)] hover:text-[color:var(--ow-disabled-text)] hover:bg-transparent active:bg-transparent":"cursor-pointer"),children:[v.icon&&jsx("span",{className:"inline-flex items-center justify-center w-3.5 h-3.5 [&>svg]:w-full [&>svg]:h-full",children:v.icon}),v.label]},v.value)})})}var W1=cva(["w-full cursor-pointer flex items-center text-left font-normal relative","border bg-[var(--ow-input-bg)] text-[color:var(--ow-input-text)]","transition-[background-color,border-color,color,box-shadow] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring","disabled:cursor-not-allowed disabled:bg-[var(--ow-input-disabled-bg)] disabled:border-[color:var(--ow-disabled-border)] disabled:text-[color:var(--ow-input-disabled-text)]","[border-radius:var(--ow-radius-control)]"].join(" "),{variants:{open:{true:"border-[color:var(--ow-input-border-focus)]",false:"border-[color:var(--ow-input-border)] hover:border-[color:var(--ow-input-border-hover)]"},size:{sm:"h-7 pr-8 pl-3 text-ow-fs-ui",md:"h-8 pr-9 pl-3.5 text-ow-fs-ui",lg:"h-10 pr-10 pl-4 text-ow-fs-ui"}},defaultVariants:{open:false,size:"md"}}),U1=cva(["p-1.5 max-h-[264px] overflow-y-auto","bg-[var(--ow-popover-bg)] border border-ow-border","shadow-[var(--ow-shadow-pop)]","[border-radius:var(--ow-radius-menu)]"].join(" ")),K1=cva(["w-full flex items-center gap-2 min-h-8 px-2 py-1.5 border-none bg-transparent cursor-pointer text-left text-ow-fs-ui font-normal leading-snug","text-[color:var(--ow-text)]","[border-radius:var(--ow-radius-control)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]"].join(" "),{variants:{active:{true:"bg-[var(--ow-hover-pop)]",false:""}},defaultVariants:{active:false}}),Qd=forwardRef(function({open:t=false,size:o="md",children:r,className:n,...a},i){return jsxs("button",{ref:i,type:"button","data-ow-part":"control","data-ow-role":t?"open":"closed",className:g(W1({open:t,size:o}),n),"aria-haspopup":"listbox","aria-expanded":t,...a,children:[jsx("span",{className:"flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:r}),jsx(ne,{className:g("absolute right-3 top-1/2 w-4 h-4 text-[color:var(--ow-text-3)] -translate-y-1/2 pointer-events-none","transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",t&&"rotate-180"),"aria-hidden":"true"})]})});function wr({value:e,options:t,onChange:o,placeholder:r="\u8BF7\u9009\u62E9",disabled:n=false,size:a="md",footer:i,className:d}){let[s,l]=useState(false),[c,p]=useState(-1),[m,u]=useState(null),b=useRef(null),w=useRef(null),v=useRef(null),h=useId(),x=t.find(R=>R.value===e),k=R=>`${h}-opt-${R}`;useEffect(()=>{if(!s)return;let R=T=>{let _=T.target;b.current&&!b.current.contains(_)&&!(v.current&&v.current.contains(_))&&l(false);},M=T=>{T.key==="Escape"&&(l(false),w.current?.focus());};return document.addEventListener("mousedown",R,true),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",R,true),document.removeEventListener("keydown",M);}},[s]),useEffect(()=>{!s||c<0||v.current?.querySelector(`[data-index="${c}"]`)?.scrollIntoView({block:"nearest"});},[s,c]),useLayoutEffect(()=>{if(!s)return;let R=v.current,M=w.current;if(!R||!M)return;let T=()=>{let L=M.getBoundingClientRect();R.style.width=`${L.width}px`;let I=R.getBoundingClientRect(),$=jd(R),F=$?$.getBoundingClientRect().left:0,E=$?$.getBoundingClientRect().top:0,O=L.bottom+4-E;L.bottom+4+I.height>window.innerHeight-8&&(O=L.top-I.height-4-E),O+E<8&&(O=8-E);let ae=L.left-F;ae+F+I.width>window.innerWidth-8&&(ae=window.innerWidth-I.width-8-F),ae+F<8&&(ae=8-F),u(z=>z&&z.top===O&&z.left===ae?z:{top:O,left:ae});},_=requestAnimationFrame(T);return window.addEventListener("resize",T),window.addEventListener("scroll",T,true),()=>{cancelAnimationFrame(_),window.removeEventListener("resize",T),window.removeEventListener("scroll",T,true);}},[s,t.length]);let y=()=>{if(n)return;let R=t.findIndex(M=>M.value===e);p(R>=0?R:0),l(true);},P=()=>{n||(s?l(false):y());},N=R=>{o(R),l(false),w.current?.focus();},S=R=>{if(!n){if(!s){(R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),y());return}switch(R.key){case "ArrowDown":R.preventDefault(),p(M=>Math.min(M+1,t.length-1));break;case "ArrowUp":R.preventDefault(),p(M=>Math.max((M<0?t.length:M)-1,0));break;case "Home":R.preventDefault(),p(0);break;case "End":R.preventDefault(),p(t.length-1);break;case "Enter":case " ":{R.preventDefault();let M=t[c];M?N(M.value):l(false);break}case "Tab":l(false);break}}};return jsxs("div",{"data-slot":"select","data-ow-part":"control",className:g("relative",s&&"z-[var(--ow-z-dropdown)]",d),ref:b,children:[jsx(Qd,{ref:w,open:s,size:a,disabled:n,onClick:P,onKeyDown:S,"aria-controls":s?h:void 0,"aria-activedescendant":s&&c>=0?k(c):void 0,children:x?x.label:n?r:jsx("span",{className:"text-[color:var(--ow-placeholder)]",children:r})}),s&&createPortal(jsxs("div",{ref:v,id:h,"data-ow-part":"list",className:g(U1(),"fixed z-[var(--ow-z-modal)]",!m&&"invisible"),style:{top:m?.top??0,left:m?.left??0},role:"listbox",children:[t.map((R,M)=>jsxs("button",{id:k(M),type:"button",role:"option",tabIndex:-1,"aria-selected":R.value===e,"data-index":M,"data-ow-role":R.value===e?"selected":"option",className:K1({active:M===c}),onMouseDown:T=>T.preventDefault(),onMouseEnter:()=>p(M),onClick:()=>N(R.value),children:[jsxs("span",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{className:g("overflow-hidden text-ellipsis whitespace-nowrap",R.value===e&&"font-medium"),children:R.label}),R.sub&&jsx("span",{className:"text-ow-fs-eyebrow font-normal leading-snug text-[color:var(--ow-text-3)] overflow-hidden text-ellipsis whitespace-nowrap",children:R.sub})]}),R.value===e&&jsx(be,{className:"shrink-0 w-4 h-4 text-[color:var(--ow-text)]","aria-hidden":"true"})]},R.value)),i]}),document.body)]})}function po({checked:e,defaultChecked:t=false,onChange:o,disabled:r,className:n="",id:a,"aria-label":i}){let[d,s]=useState(t),l=e??d,c=useCallback(()=>{if(r)return;let p=!l;s(p),o?.(p);},[l,r,o]);return jsx("button",{id:a,type:"button",role:"switch","aria-checked":l,"aria-label":i,disabled:r,"data-slot":"switch","data-ow-part":"control","data-ow-role":l?"on":"off",className:g("relative inline-flex items-center w-9 h-5 rounded-full border-none p-0","after:content-[''] after:absolute after:-inset-y-0.5 after:inset-x-0","transition-[background-color] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",l?"bg-[var(--ow-control-on)]":"bg-[var(--ow-control-off)] hover:bg-[var(--ow-border-strong)]",r?"cursor-not-allowed bg-[var(--ow-disabled-bg)] hover:bg-[var(--ow-disabled-bg)] border border-solid border-[color:var(--ow-disabled-border)]":"cursor-pointer",n),onClick:c,children:jsx("span",{className:g("block rounded-full","transition-[transform,background-color] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",r?"w-3.5 h-3.5 bg-[var(--ow-disabled-text)]":"w-4 h-4",!r&&(l?"bg-[var(--ow-control-on-glyph)]":"bg-[var(--ow-control-knob)]"),l?"translate-x-[18px]":"translate-x-0.5")})})}var Y1=cva("flex items-end",{variants:{size:{sm:"gap-1",md:"gap-1",lg:"gap-4"}},defaultVariants:{size:"md"}}),X1=cva(["relative inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap","border-0 bg-transparent rounded-none cursor-pointer font-normal","transition-[color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring","after:pointer-events-none after:absolute after:inset-x-0 after:h-0.5 after:content-['']","after:transition-[background-color] after:duration-[var(--ow-dur-1)] after:ease-[var(--ow-ease-beacon)]","aria-selected:text-[color:var(--ow-text)] aria-selected:font-medium aria-selected:after:bg-[var(--ow-text)]","disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent disabled:after:bg-transparent","disabled:cursor-default disabled:pointer-events-none"].join(" "),{variants:{size:{sm:"h-7 px-2 text-ow-fs-ui text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text-2)] after:bottom-0",md:"h-8 px-2.5 text-ow-fs-ui text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text-2)] after:bottom-0",lg:"h-9 px-0.5 text-ow-fs-ui text-[color:var(--ow-text-2)] hover:text-[color:var(--ow-text)] after:-bottom-px after:rounded-full"}},defaultVariants:{size:"md"}}),Q1=cva("inline-flex items-center justify-center",{variants:{size:{sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-3.5 h-3.5"}},defaultVariants:{size:"md"}});function uo({items:e,activeKey:t,defaultActiveKey:o,onChange:r,variant:n="default",size:a="md",className:i}){let[d,s]=useState(o||e[0]?.key||""),l=t??d,c=useCallback(p=>{s(p),r?.(p);},[r]);return jsx("div",{"data-slot":"tabs","data-variant":n,"data-size":a,"data-ow-part":"navigation",className:g(Y1({size:a}),i),role:"tablist",children:e.map(p=>jsxs(f,{type:"button",role:"tab","data-ow-part":"tab","data-ow-role":l===p.key?"active":"inactive","aria-selected":l===p.key,disabled:p.disabled,title:p.title,variant:"unstyled",className:X1({size:a}),onClick:()=>c(p.key),children:[p.icon&&jsx("span",{className:g(Q1({size:a}),"[&>svg]:w-full [&>svg]:h-full"),children:p.icon}),p.label]},p.key))})}var th={copy:jsx(Tt,{}),regenerate:jsx(Ue,{}),speak:jsx(Sd,{}),like:jsx(fn,{}),dislike:jsx(Zs,{}),share:jsx(lo,{}),branch:jsx(Po,{}),preview:jsx(oo,{}),quote:jsx(Td,{})},oh={copy:"\u590D\u5236",regenerate:"\u91CD\u65B0\u751F\u6210",speak:"\u6717\u8BFB",like:"\u8D5E",dislike:"\u8E29",share:"\u5206\u4EAB",branch:"\u65B0\u5EFA\u5206\u652F",preview:"\u67E5\u770B Markdown",quote:"\u5F15\u7528\u5230\u8F93\u5165\u6846"},rh=["copy","regenerate","speak","like","dislike","share"];function hn({actions:e=rh,items:t,onAction:o,visible:r=false,time:n,trailing:a,className:i=""}){let d=t??e.map(s=>({key:s,label:oh[s],icon:th[s],onSelect:()=>o?.(s)}));return jsxs("div",{"data-slot":"message-actions","data-visible":r?"true":"false",className:g("flex items-center gap-[var(--ow-space-05,2px)]",n!=null&&"w-full","transition-opacity duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",r?"opacity-100":["opacity-0 pointer-events-none","group-hover/turn:opacity-100 group-hover/turn:pointer-events-auto","group-focus-within/turn:opacity-100 group-focus-within/turn:pointer-events-auto","focus-within:opacity-100 focus-within:pointer-events-auto"].join(" "),i),children:[d.map(s=>jsx(ah,{item:s},s.key)),n!=null&&jsxs(Fragment,{children:[jsx("span",{"data-ow-part":"time-spacer","aria-hidden":"true",className:"flex-1"}),jsx("span",{"data-ow-part":"time",className:g("mr-[var(--ow-space-1,4px)] shrink-0 whitespace-nowrap","font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-fs-mark-md text-[color:var(--ow-text-3)]","transition-opacity duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",r?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 focus-within:opacity-100"),children:n})]}),a]})}function ah({item:e}){let t=useCallback(()=>e.onSelect?.(),[e]),o=e.done?e.doneLabel??e.label:e.label;return jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"action","data-state":e.done?"done":e.active?"active":"rest","aria-label":o,title:o,"aria-pressed":e.active,disabled:e.disabled,onClick:t,className:g("[&_svg]:w-4 [&_svg]:h-4",e.done?"text-[color:var(--ow-success)]":e.active?"text-[color:var(--ow-text)]":"text-[color:var(--ow-text-3)]"),icon:e.done?e.doneIcon??jsx(be,{}):e.icon})}var ih=["copy","regenerate","speak","like","dislike","share"];function T8({actions:e=ih,onAction:t,className:o=""}){return jsx(hn,{actions:e,onAction:r=>t?.(r),visible:true,className:`mt-1 ${o}`})}function D8({running:e=false,className:t="",children:o,...r}){return jsx("span",{"data-slot":"action-status","data-ow-state":e?"running":void 0,className:g("text-ow-text-3 font-normal font-[family-name:var(--ow-font-sans)]",t),...r,children:o})}function O8({prompt:e,status:t="pending",questionCount:o=1,recap:r=[],onAnswer:n,onSkip:a,answerLabel:i="\u53BB\u56DE\u7B54",skipLabel:d="\u8DF3\u8FC7"}){if(t==="skipped")return jsx("div",{className:"clarify clarify--done clarify--skipped",children:jsxs("div",{className:"clarify__head",children:[jsx("span",{className:"ic",children:jsx(Q,{})}),jsxs("div",{className:"hd-meta",children:[jsx("span",{className:"t",children:"\u5DF2\u8DF3\u8FC7\u63D0\u95EE"}),jsx("span",{className:"s",children:"\u4F60\u53EF\u4EE5\u5728\u4E0B\u65B9\u8F93\u5165\u6846\u76F4\u63A5\u63CF\u8FF0\u9700\u6C42"})]})]})});if(t==="submitted")return jsxs("div",{className:"clarify clarify--done",children:[jsxs("div",{className:"clarify__head",children:[jsx("span",{className:"ic",children:jsx(be,{})}),jsxs("div",{className:"hd-meta",children:[jsx("span",{className:"t",children:"\u5DF2\u786E\u8BA4\u9700\u6C42"}),jsx("span",{className:"s",children:"Orbitwork \u5C06\u636E\u6B64\u5236\u5B9A\u8BA1\u5212"})]})]}),r.length>0&&jsx("div",{className:"clarify__recap",children:r.map((l,c)=>jsxs("div",{className:"cr-row",children:[jsx("span",{className:"cq",children:l.q}),jsx("span",{className:"ca",children:l.a})]},c))})]});let s=n!=null||a!=null;return jsxs("div",{className:"io-leadin io-leadin--ask",children:[jsx("span",{className:"io-ic ask",children:jsx(Or,{})}),jsxs("div",{className:"io-meta",children:[jsx("span",{className:"t",children:e}),jsx("span",{className:"s",children:o>1?jsxs(Fragment,{children:["\u8BF7\u5728\u4E0B\u65B9\u5BF9\u8BDD\u6846\u9010\u9898\u56DE\u7B54 \xB7 \u5171 ",jsx("span",{className:"ow-font-mono",children:o})," \u9898"]}):"\u8BF7\u5728\u4E0B\u65B9\u5BF9\u8BDD\u6846\u56DE\u7B54"})]}),s?jsxs("div",{className:"io-leadin__acts",children:[n&&jsx(f,{variant:"primary",size:"sm",onClick:n,children:i}),a&&jsx(f,{variant:"ghost",size:"sm",onClick:a,children:d})]}):jsx(Si,{className:"io-arrow"})]})}var ch="flex items-center gap-3 min-w-0 max-sm:flex-col max-sm:items-start",ec="assistant-card__icon shrink-0 w-6 h-6",ph="assistant-card__main flex-1 min-w-0 flex flex-col gap-1",uh="assistant-card__title-row flex items-center gap-2 min-w-0",mh="assistant-card__title min-w-0 truncate font-semibold text-ow-fs-title-sm leading-[1.4] text-ow-text font-[family-name:var(--ow-font-sans)]",fh="assistant-card__desc font-normal text-ow-fs-caption leading-[1.5] text-ow-text-3 font-[family-name:var(--ow-font-sans)]",gh="assistant-actions shrink-0 flex items-center justify-end gap-2 max-sm:w-full",vh={dingtalk:{title:"\u9489\u9489",description:"\u63A5\u6536\u9489\u9489\u79C1\u804A\u4E0E\u7FA4\u804A\u6D88\u606F\uFF0C\u5E76\u63A5\u5165 Orbitwork \u4F1A\u8BDD\u3002",icon:jsx(Ti,{className:ec})},feishu:{title:"\u98DE\u4E66",description:"\u63A5\u6536\u98DE\u4E66\u79C1\u804A\u4E0E\u7FA4\u804A\u6D88\u606F\uFF0C\u5E76\u63A5\u5165 Orbitwork \u4F1A\u8BDD\u3002",icon:jsx(Mi,{className:ec})},wecom:{title:"\u4F01\u4E1A\u5FAE\u4FE1",description:"\u63A5\u6536\u4F01\u4E1A\u5FAE\u4FE1\u79C1\u804A\u4E0E\u7FA4\u804A\u6D88\u606F\uFF0C\u5E76\u63A5\u5165 Orbitwork \u4F1A\u8BDD\u3002",icon:jsx(_i,{className:ec})}};function H8({platform:e,connected:t,enabled:o,loading:r=false,busy:n=false,onConfigure:a,onToggle:i}){let d=vh[e];return jsx(zt,{children:jsxs("div",{"data-ow-part":"head",className:`assistant-card__head ${ch}`,children:[d.icon,jsxs("div",{"data-ow-part":"labels",className:ph,children:[jsxs("div",{className:uh,children:[jsx("div",{className:mh,children:d.title}),t&&jsx(at,{variant:o?"success":"normal",dot:true,children:o?"\u5DF2\u8FDE\u63A5":"\u5DF2\u505C\u6B62"})]}),jsx("div",{className:fh,children:d.description})]}),jsxs("div",{"data-ow-part":"action",className:gh,children:[jsx(f,{variant:"secondary",onClick:a,loading:r,disabled:n,children:"\u914D\u7F6E"}),t&&i&&jsx(po,{checked:o,onChange:i,disabled:n})]})]})})}var wh=cva(["relative flex w-full box-border items-center text-left","border border-[color:transparent]","transition-[background-color,color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]"].join(" "),{variants:{density:{default:"min-h-10 gap-3 px-3 py-2",compact:"min-h-8 gap-2 px-2.5 py-1"},surface:{base:"[border-radius:0px]",pop:"[border-radius:var(--ow-radius-control)]"},divider:{true:"[[data-slot=list-row]+&]:border-t-[color:var(--ow-border)]",false:""},interactive:{true:"cursor-pointer",false:""},disabled:{true:"cursor-not-allowed",false:""},selected:{true:"bg-[var(--ow-selected-bg)] border-[color:var(--ow-border-strong)] [[data-slot=list-row]+&]:border-t-[color:var(--ow-border-strong)]",false:"bg-transparent"}},compoundVariants:[{interactive:true,disabled:false,surface:"base",className:"hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]"},{interactive:true,disabled:false,surface:"pop",className:"hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]"}],defaultVariants:{density:"default",surface:"base",divider:true,interactive:false,disabled:false,selected:false}}),hh=["switch","checkbox"];function dt({icon:e,title:t,description:o,control:r="none",action:n,checked:a,indeterminate:i,onCheckedChange:d,density:s="default",surface:l="base",divider:c,onClick:p,selected:m=false,disabled:u=false,controlAriaLabel:b,className:w}){let v=c??l==="base",h=n!=null,x=!h&&hh.includes(r),k=!!p&&!u,y=k&&!x&&!h,P=b??(typeof t=="string"?t:void 0),N=h?n:r==="switch"?jsx(po,{checked:a,onChange:d,disabled:u,"aria-label":P}):r==="checkbox"?jsx(To,{checked:a,indeterminate:i,onChange:d,disabled:u,"aria-label":P}):r==="chevron"?jsx(he,{className:g("w-4 h-4",u?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-3)]"),"aria-hidden":"true"}):null,S=jsxs(Fragment,{children:[e&&jsx("span",{"data-ow-part":"icon","aria-hidden":"true",className:g("shrink-0 inline-flex items-center justify-center w-4 h-4 [&>svg]:w-4 [&>svg]:h-4",u?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-3)]"),children:e}),jsxs("span",{"data-ow-part":"labels",className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"title",className:g("text-ow-fs-ui font-medium leading-[1.3] truncate",u?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text)]"),children:t}),o!=null&&o!==false&&jsx("span",{"data-ow-part":"description",className:g("text-ow-fs-body-sm font-normal leading-[1.4] min-w-0",u?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-2)]"),children:o})]}),(m||N!=null)&&jsxs("span",{"data-ow-part":"action",className:"shrink-0 inline-flex items-center gap-2",children:[m&&jsx("span",{"data-ow-part":"selected-check","aria-hidden":"true",className:"shrink-0 inline-flex items-center justify-center w-4 h-4 text-[color:var(--ow-control-on)] [&>svg]:w-4 [&>svg]:h-4",children:jsx(be,{})}),N]})]}),R=g(wh({density:s,surface:l,divider:v,interactive:k,disabled:u,selected:m}),y&&"ow-focus-ring",w),M={"data-slot":"list-row","data-density":s,"data-surface":l,"data-ow-part":"surface","data-ow-state":g(u&&"disabled",m&&"selected",k&&"interactive").trim()||void 0};return y?jsx("button",{type:"button",...M,className:R,disabled:u,"aria-current":m||void 0,onClick:p,children:S}):jsx("div",{...M,className:R,"aria-disabled":u||void 0,onClick:k?p:void 0,children:S})}function q8({label:e,children:t,className:o}){return jsx("div",{"data-slot":"list-row-group",role:e?"group":void 0,"aria-label":e,className:g("flex flex-col w-full min-w-0",o),children:t})}function J8({title:e,description:t,checked:o,onChange:r,disabled:n}){return jsx(dt,{title:e,description:t,control:"switch",checked:o,onCheckedChange:r,disabled:n,divider:false,className:"px-0"})}var kh={dockerfile:"DKR","docker-compose.yml":"DKR","docker-compose.yaml":"DKR",".dockerignore":"DKR",".gitignore":"GIT",".gitattributes":"GIT",".env":"ENV",".env.example":"ENV","package.json":"NPM","package-lock.json":"NPM","pnpm-lock.yaml":"PNPM",makefile:"MAKE","go.mod":"GO","go.sum":"GO","cargo.toml":"RS","cargo.lock":"RS"},Ch={markdown:"MD",jpeg:"JPG",javascript:"JS",typescript:"TS",python:"PY",shell:"SH",config:"CFG",properties:"CFG"},Nh={image:"IMG",video:"VID",audio:"AUD",pdf:"PDF",md:"MD",zip:"ZIP",doc:"DOC",xls:"XLS",ppt:"PPT",text:"TXT",code:"CODE"};function Sh(e){return e.toUpperCase().slice(0,4)}function rc(e,t){let o=e.toLowerCase(),r=kh[o];if(r)return {label:r};let n=o.lastIndexOf(".");if(n>0){let a=o.slice(n+1),i=Ch[a];if(i)return {label:i};if(a&&/^[a-z0-9]+$/.test(a))return {label:Sh(a)}}if(t){let a=Nh[t];if(a)return {label:a}}return null}function Ph(e){return e<=2?"5.2":e===3?"4.4":"3.6"}function Xo({name:e,kind:t,label:o,className:r="",width:n=15,height:a=15}){let i=o?.trim().toUpperCase().slice(0,4),d=i?{label:i}:rc(e,t);return jsxs("svg",{viewBox:"0 0 16 16",className:r,width:n,height:a,"aria-hidden":"true",children:[jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round",strokeLinecap:"round",children:[jsx("path",{d:"M8.4 1.6H4.6a1 1 0 0 0-1 1v10.8a1 1 0 0 0 1 1h6.8a1 1 0 0 0 1-1V5.6L8.4 1.6Z"}),jsx("path",{d:"M8.4 1.6v3a1 1 0 0 0 1 1h3"})]}),d?jsxs(Fragment,{children:[jsx("rect",{x:"5.4",y:"9.4",width:"10.2",height:"6",rx:"1.4",fill:"var(--ow-surface-2)"}),jsx("text",{x:"10.5",y:"13.75",textAnchor:"middle",fontSize:Ph(d.label.length),fontWeight:"600",fontFamily:"var(--ow-font-mono, ui-monospace, monospace)",style:{fontVariantNumeric:"tabular-nums"},fill:"var(--ow-text-2)",children:d.label})]}):null]})}function lc(e){let t=(e.match(/\.([A-Za-z0-9]+)(?::\d+)?$/)?.[1]??"").toLowerCase();return t==="md"||t==="markdown"?{badge:"MD",label:"Markdown",tone:"markdown"}:["ppt","pptx"].includes(t)?{badge:"P",label:"\u6F14\u793A\u6587\u7A3F",tone:"presentation"}:["doc","docx"].includes(t)?{badge:"W",label:"\u6587\u6863",tone:"document"}:["xls","xlsx","csv"].includes(t)?{badge:"X",label:"\u8868\u683C",tone:"spreadsheet"}:["png","jpg","jpeg","gif","webp","bmp","svg","heic","heif","tif","tiff"].includes(t)?{badge:"IMG",label:"\u56FE\u7247",tone:"image"}:["mp4","mov","webm","avi","mkv"].includes(t)?{badge:"VID",label:"\u89C6\u9891",tone:"video"}:t==="pdf"?{badge:"PDF",label:"PDF",tone:"pdf"}:t==="html"||t==="htm"?{badge:"HTML",label:"\u7F51\u9875",tone:"web"}:["py","ts","tsx","js","jsx","go","rs","java","cpp","c","h","css","json","yaml","yml"].includes(t)?{badge:t.toUpperCase().slice(0,3),label:"\u4EE3\u7801",tone:"code"}:{badge:t?t.toUpperCase().slice(0,3):"FILE",label:"\u6587\u4EF6",tone:"file"}}function Mh(e){let t=lc(e.path||e.name);return {badge:(e.badge??t.badge).trim().toUpperCase().slice(0,4)||"FILE",label:e.typeLabel??t.label,tone:t.tone}}function cm(e){return e.kind!=="divider"&&e.kind!=="header"}function _h(e){let t=e.filter(o=>o.kind==="app");return t.length===0||t.every(o=>!!(o.iconUrl||o.iconName||o.icon))}function pm(e,t){return `${e.id}::${cm(e)?e.path??"":t}`}function Lh(e){return e.iconUrl?jsx("img",{src:e.iconUrl,alt:"",className:"w-4 h-4 object-contain [border-radius:var(--ow-radius-2xs)]","aria-hidden":"true"}):e.iconName?jsx(ra,{name:e.iconName,size:15}):e.icon??null}function Dh(e){return e.map((t,o)=>{let r=pm(t,o);return t.kind==="divider"?{type:"separator",key:r}:t.kind==="header"?{type:"group",key:r,label:t.name}:{key:r,label:t.name,icon:Lh(t),disabled:t.disabled}})}function Eh(e,t,o){let[r,n]=useState([]),[a,i]=useState(false),[d,s]=useState(false),l=useRef(t);l.current=t;let c=useRef(e);c.current=e;let p=useRef(null);useEffect(()=>{p.current=null,n([]),s(false),i(false);},[t,e]),useEffect(()=>{if(!o||!e)return;let u=false,b=()=>{if(u)return;let v=l.current,h;try{h=Promise.resolve(e());}catch{return}p.current={key:v,request:h},h.catch(()=>{p.current?.request===h&&(p.current=null);});};if(typeof window.requestIdleCallback=="function"){let v=window.requestIdleCallback(b,{timeout:800});return ()=>{u=true,window.cancelIdleCallback(v);}}let w=window.setTimeout(b,150);return ()=>{u=true,window.clearTimeout(w);}},[o,e,t]);let m=useCallback(async()=>{let u=c.current;if(!u||d)return;let b=l.current,w=k=>{if(l.current!==b)return true;n(k);let y=_h(k);return s(y),y},v=()=>{let k;try{k=u();}catch{return}Promise.resolve(k).then(y=>{w(y);}).catch(()=>{});},h=p.current,x=h&&h.key===b?h.request:u();if(Array.isArray(x)){let k=w(x);p.current=null,k||v();return}i(true);try{let k=w(await x);p.current?.request===x&&(p.current=null),k||v();}finally{i(false);}},[d]);return {options:r,loading:a,load:m}}function Fi({label:e="\u6253\u5F00\u65B9\u5F0F",iconName:t,options:o,onRequestOptions:r,optionsKey:n,onSelect:a,onOpen:i,onNativeMenu:d,triggerVariant:s="secondary",triggerSize:l="sm",iconOnly:c=false,disabled:p=false,width:m=180,className:u}){let[b,w]=useState(false),v=Eh(r,n,!!r&&!d),h=r?v.options:o??[],x=useMemo(()=>Dh(h),[h]),k=useMemo(()=>{let N=new Map;return h.forEach((S,R)=>{cm(S)&&N.set(pm(S,R),S);}),N},[h]),y=!r&&!d&&h.length===0,P=N=>jsxs(f,{variant:s,size:l,type:"button","data-slot":"open-with","data-ow-part":"action",disabled:p,className:g(c?"w-7 h-7 p-0":"gap-1 px-2",u),"aria-label":c?e:void 0,title:c?e:void 0,onClick:N,children:[t&&jsx(ra,{name:t,size:14}),c?jsx(ra,{name:"More",size:16,"aria-hidden":"true"}):jsx("span",{children:e}),!c&&!y&&jsx(ra,{name:"ChevDown",size:13,"aria-hidden":"true"})]});return y?P(i):d?P(d):jsx(co,{trigger:P(),triggerClassName:"inline-flex",open:b,onOpenChange:N=>{w(N),N&&v.load();},items:x,onSelect:N=>{let S=k.get(N);S&&a?.(S);},empty:v.loading?"\u52A0\u8F7D\u4E2D":"\u6682\u65E0\u6253\u5F00\u65B9\u5F0F",align:"end",width:m,ariaLabel:e,className:"max-h-[min(280px,calc(100vh-16px))] overflow-y-auto"})}var dm="min-w-0 text-[length:var(--ow-fs-ui)] font-medium leading-snug text-[color:var(--ow-text)] overflow-hidden text-ellipsis",um="font-[family-name:var(--ow-font-mono)] tabular-nums text-[length:var(--ow-fs-eyebrow)] leading-snug text-[color:var(--ow-text-3)]",rl=`min-w-0 truncate ${um}`,Ih=`shrink-0 max-w-full truncate ${um}`;function Ah(e,t){let o=e.split("\xB7").map(i=>i.trim());if(o.length<2||o.some(i=>!i))return {head:"",reading:e};let r=o[o.length-1]??e,n=o.slice(0,-1),a=(n[0]??"").toUpperCase();return t!==null&&(a.startsWith(t)||t.startsWith(a))&&n.shift(),{head:n.join(" \xB7 "),reading:r}}function nc({onClick:e,disabled:t}){return jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"remove",className:"w-7 h-7 p-0 shrink-0","aria-label":"\u79FB\u9664\u9644\u4EF6",title:"\u79FB\u9664\u9644\u4EF6",disabled:t,onClick:o=>{o.stopPropagation(),e();},icon:jsx(ra,{name:"Close",size:14})})}function ic({onClick:e,disabled:t}){return jsx(f,{variant:"text",size:"sm",type:"button","data-ow-part":"retry",className:"shrink-0",disabled:t,onClick:o=>{o.stopPropagation(),e();},children:"\u91CD\u8BD5"})}function sc({name:e,progress:t}){return jsx(la,{value:t,size:"sm","aria-label":`${e} \u4E0A\u4F20\u8FDB\u5EA6`,className:"mt-1"})}function da({name:e,path:t,variant:o="card",meta:r,kind:n,badge:a,thumbnail:i,caption:d,placeholder:s,status:l="done",progress:c=0,errorText:p="\u4E0A\u4F20\u5931\u8D25",disabled:m=false,onOpen:u,onRetry:b,onRemove:w,actions:v,onRequestActions:h,onAction:x,onNativeActionsMenu:k,actionsLabel:y="\u6253\u5F00\u65B9\u5F0F",className:P}){let N=Math.max(0,Math.min(100,Math.round(c))),S=Mh({name:e,path:t??e}),R=l==="uploading"?`\u4E0A\u4F20\u4E2D ${N}%`:r??S.label,M=l==="error"?p:R,T=!!u&&!m,L=!!(v?.length||h||k)?jsx(Fi,{label:y,options:v,onRequestOptions:h,optionsKey:t??e,onSelect:x,onNativeMenu:k,disabled:m,iconOnly:o!=="card",triggerVariant:o==="card"?"secondary":"ghost"}):null;if(o==="image"||o==="media"){let $=o==="media";return jsxs("div",{"data-slot":"attachment","data-ow-variant":o,"data-ow-state":l,title:t??e,className:g("group relative box-border overflow-hidden border [border-radius:var(--ow-radius-card)]","bg-[var(--ow-surface)]","transition-[border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",$?"w-full max-w-[420px]":"w-28 h-28 shrink-0",l==="error"?"border-[color:var(--ow-error)]":"border-[color:var(--ow-border)]",T&&"cursor-pointer ow-focus-ring",P),role:T?"button":void 0,tabIndex:T?0:void 0,"aria-label":T?`\u6253\u5F00 ${e}`:void 0,onClick:T?u:void 0,onKeyDown:T?F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),u?.());}:void 0,children:[jsx("div",{"data-ow-part":"media",className:g("w-full overflow-hidden",$?"h-[200px]":"h-full"),children:i?jsx("img",{src:i,alt:d||e,className:"w-full h-full object-cover"}):jsx("span",{"data-ow-part":"placeholder",className:"flex w-full h-full items-center justify-center bg-[var(--ow-surface-2)] px-2 text-center",children:jsx("span",{className:rl,children:s??e})})}),$&&d&&jsx("div",{"data-ow-part":"caption",className:"py-2.5 px-3.5 text-[length:var(--ow-fs-caption)] leading-snug text-[color:var(--ow-text-2)]",children:d}),l==="uploading"&&jsxs("div",{"data-ow-part":"upload",className:"absolute inset-x-0 bottom-0 px-2 pb-2",children:[jsxs("span",{className:g(rl,"block text-[color:var(--ow-on-fill)]"),children:["\u4E0A\u4F20\u4E2D ",N,"%"]}),jsx(sc,{name:e,progress:N})]}),(w||l==="error"&&b||L)&&jsx("span",{"data-ow-part":"overlay",className:g("pointer-events-none absolute inset-0 flex items-start justify-end p-1.5","bg-[var(--ow-scrim)] text-[color:var(--ow-on-fill)]","opacity-0 transition-opacity duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","group-hover:opacity-100 group-focus-within:opacity-100"),children:jsxs("span",{"data-ow-part":"actions",className:"pointer-events-auto flex items-center gap-1",onClick:F=>F.stopPropagation(),onKeyDown:F=>F.stopPropagation(),children:[l==="error"&&b&&jsx(ic,{onClick:b,disabled:m}),L,w&&jsx(nc,{onClick:w,disabled:m})]})}),l==="error"&&jsx("span",{"data-ow-part":"error",className:"absolute inset-x-0 bottom-0 truncate bg-[var(--ow-error-tint)] px-2 py-1 text-[length:var(--ow-fs-eyebrow)] leading-snug text-[color:var(--ow-error-on-tint)]",children:p})]})}if(o==="tile"){let $=a?.trim().toUpperCase().slice(0,4)||rc(e,n)?.label||null,F=Ah(M,$);return jsxs("div",{"data-slot":"attachment","data-ow-variant":"tile","data-ow-state":l,title:t??e,className:g("group relative box-border flex w-28 h-28 shrink-0 flex-col justify-between gap-1 p-3.5","border [border-radius:var(--ow-radius-card)]","transition-[background-color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",l==="error"?"border-[color:var(--ow-error-tint-border)] bg-[var(--ow-error-tint)]":"border-[color:var(--ow-border)] bg-[var(--ow-surface)]",m&&"border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)]",P),children:[jsx("span",{"data-ow-part":"name",className:g(dm,"[display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] [overflow-wrap:anywhere]",m&&"text-[color:var(--ow-disabled-text)]"),children:e}),jsxs("span",{"data-ow-part":"meta",className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[jsx(Xo,{name:e,kind:n,label:a,className:"shrink-0 text-[color:var(--ow-text-2)]",width:15,height:15}),F.head&&jsxs("span",{className:g(rl,l==="error"&&"text-[color:var(--ow-error-on-tint)]",m&&"text-[color:var(--ow-disabled-text)]"),children:[F.head," \xB7"]}),jsx("span",{className:g(Ih,l==="error"&&"text-[color:var(--ow-error-on-tint)]",m&&"text-[color:var(--ow-disabled-text)]"),children:F.reading})]}),l==="uploading"&&jsx(sc,{name:e,progress:N}),(w||l==="error"&&b||L)&&jsxs("span",{"data-ow-part":"actions",className:g("absolute top-1 right-1 flex items-center gap-0.5","[border-radius:var(--ow-radius-2xs)]",l==="error"?"bg-[var(--ow-error-tint)]":m?"bg-[var(--ow-disabled-bg)]":"bg-[var(--ow-surface)]","opacity-0 transition-opacity duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","group-hover:opacity-100 group-focus-within:opacity-100"),children:[l==="error"&&b&&jsx(ic,{onClick:b,disabled:m}),L,w&&jsx(nc,{onClick:w,disabled:m})]})]})}let I=jsxs("span",{"data-ow-part":"content",className:"grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-3 text-left",children:[jsx(Xo,{name:e,kind:n,label:a,className:g("shrink-0 text-[color:var(--ow-text-2)]",m&&"text-[color:var(--ow-disabled-text)]"),width:28,height:28}),jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"name",className:g(dm,"whitespace-nowrap",m&&"text-[color:var(--ow-disabled-text)]"),children:e}),M&&jsx("span",{"data-ow-part":"meta",className:g(rl,l==="error"&&"text-[color:var(--ow-error-on-tint)]",m&&"text-[color:var(--ow-disabled-text)]"),children:M})]})]});return jsxs("div",{"data-slot":"attachment","data-ow-variant":"card","data-ow-state":l,title:t??e,className:g("box-border grid w-full min-h-[62px] grid-cols-[minmax(0,1fr)_auto] items-center gap-3 p-3.5","border [border-radius:var(--ow-radius-card)] text-[color:var(--ow-text)]","transition-[background-color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",l==="error"?"border-[color:var(--ow-error-tint-border)] bg-[var(--ow-error-tint)]":"border-[color:var(--ow-border)] bg-[var(--ow-surface)]",m&&"border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)]",P),children:[jsxs("span",{className:"grid min-w-0 gap-1",children:[T?jsx(f,{variant:"unstyled",type:"button","data-ow-part":"main",disabled:m,className:"ow-focus-ring grid min-w-0 cursor-pointer p-0 text-left [border-radius:var(--ow-radius-control)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",onClick:u,children:I}):I,l==="uploading"&&jsx(sc,{name:e,progress:N})]}),(L||w||l==="error"&&b)&&jsxs("span",{"data-ow-part":"actions",className:"inline-flex items-center gap-1.5",children:[l==="error"&&b&&jsx(ic,{onClick:b,disabled:m}),L,w&&jsx(nc,{onClick:w,disabled:m})]})]})}function xn({layout:e="strip",empty:t,children:o,className:r,"aria-label":n}){let a=o==null||Array.isArray(o)&&o.length===0;return a&&!t?null:jsx("div",{"data-slot":"attachment-list","data-ow-variant":e,"aria-label":n,className:g(e==="strip"?"flex gap-2 overflow-x-auto overflow-y-hidden":"flex w-full max-w-[520px] flex-col gap-2",r),children:a?jsx(H,{message:t,markSize:28}):o})}var Bh={uploading:"uploading",completed:"done",error:"error"};function gP({name:e,size:t,type:o="doc",thumbnail:r,status:n="completed",progress:a=0,onRemove:i,onRetry:d,onPreview:s,className:l=""}){let c=o.toUpperCase();return jsx(da,{variant:r?"image":"tile",name:e,meta:t?`${c} \xB7 ${t}`:c,kind:o,thumbnail:r,status:Bh[n],progress:a,onOpen:s,onRetry:d,onRemove:i,className:l})}function vP({children:e,className:t=""}){return jsx(xn,{layout:"strip",className:t,children:e})}var Oh={sm:16,md:16,lg:20};function go({children:e,label:t="\u8FD4\u56DE",size:o="md",className:r,...n}){let a=Oh[o],i=e==null;return jsx(f,{variant:"ghost",size:o,"data-slot":"back-button","aria-label":i?t:void 0,title:t,className:g(r),icon:jsx(Kt,{width:a,height:a,"aria-hidden":"true"}),...n,children:e})}var Vh={info:jsx(ea,{}),warning:jsx(fr,{}),error:jsx(Zo,{})},Fh={info:"bg-[var(--ow-info-tint)] border-[color:var(--ow-info-tint-border)] text-[color:var(--ow-info-on-tint)]",warning:"bg-[var(--ow-warning-tint)] border-[color:var(--ow-warning-tint-border)] text-[color:var(--ow-warning-on-tint)]",error:"bg-[var(--ow-error-tint)] border-[color:var(--ow-error-tint-border)] text-[color:var(--ow-error-on-tint)]"},$h={info:"hover:bg-[var(--ow-info-tint-hover)] active:bg-[var(--ow-info-tint-border)]",warning:"hover:bg-[var(--ow-warning-tint-hover)] active:bg-[var(--ow-warning-tint-border)]",error:"hover:bg-[var(--ow-error-tint-hover)] active:bg-[var(--ow-error-tint-border)]"};function $i({variant:e="info",title:t,children:o,icon:r,action:n,closable:a=false,onClose:i,className:d}){return jsxs("div",{"data-slot":"banner","data-variant":e,"data-ow-part":"surface","data-ow-role":e,role:e==="error"?"alert":"status",className:g("flex w-full items-start gap-2.5 px-3.5 py-2.5 border [border-radius:var(--ow-radius-card)] text-ow-fs-ui leading-[1.4]",Fh[e],d),children:[r!==null&&jsx("span",{"data-ow-part":"icon",className:"inline-flex shrink-0 items-center justify-center w-4 h-4 mt-px [&>svg]:w-4 [&>svg]:h-4","aria-hidden":"true",children:r??Vh[e]}),jsxs("div",{"data-ow-part":"body",className:"flex-1 min-w-0",children:[t&&jsx("div",{"data-ow-part":"title",className:"font-medium",children:t}),o&&jsx("div",{"data-ow-part":"text",className:g(t&&"mt-0.5"),children:o})]}),n&&jsx("span",{"data-ow-part":"action",className:"shrink-0 self-center",children:n}),a&&jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"close","aria-label":"\u5173\u95ED\u6A2A\u5E45",onClick:i,className:g("shrink-0 self-center -mr-1 text-current",$h[e]),icon:jsx(Q,{className:"w-3.5 h-3.5","aria-hidden":"true"})})]})}var vm={tasks:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M9 6.5h11M9 12h11M9 17.5h11"}),jsx("circle",{cx:"4.2",cy:"6.5",r:"1.1",fill:"currentColor",stroke:"none",opacity:".35"}),jsx("circle",{cx:"4.2",cy:"12",r:"1.5",fill:"currentColor",stroke:"none",opacity:".6"}),jsx("circle",{className:"dot",cx:"4.2",cy:"17.5",r:"2",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M9 6.5h11M9 12h11M9 17.5h11"}),jsx("circle",{cx:"4.2",cy:"6.5",r:"1.3",fill:"currentColor",stroke:"none",opacity:".35"}),jsx("circle",{cx:"4.2",cy:"12",r:"1.7",fill:"currentColor",stroke:"none",opacity:".6"}),jsx("circle",{className:"dot",cx:"4.2",cy:"17.5",r:"2.2",fill:"currentColor",stroke:"none"})]})},agent:{stroke:true,base:jsxs(Fragment,{children:[jsx("rect",{x:"3.5",y:"7.5",width:"17",height:"12.5",rx:"3"}),jsx("path",{d:"M12 4.6V7.5"}),jsx("circle",{className:"dot",cx:"12",cy:"3",r:"1.9",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"9",cy:"13.5",r:"1.1",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"15",cy:"13.5",r:"1.1",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("rect",{x:"3.5",y:"7.5",width:"17",height:"12.5",rx:"3"}),jsx("path",{d:"M12 4.8V7.5"}),jsx("circle",{className:"dot",cx:"12",cy:"3",r:"2.1",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"})]})},history:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M7.4 5.2A8.5 8.5 0 1 1 4 12.9"}),jsx("path",{d:"M12 7.5V12l3.2 1.9"}),jsx("circle",{className:"dot",cx:"3.3",cy:"9.6",r:"1.5",fill:"currentColor",stroke:"none",opacity:".62"}),jsx("circle",{cx:"5.6",cy:"5.7",r:"1.15",fill:"currentColor",stroke:"none",opacity:".38"}),jsx("circle",{cx:"9.2",cy:"3.1",r:".85",fill:"currentColor",stroke:"none",opacity:".22"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M7.4 5.2A8.5 8.5 0 1 1 4 12.9"}),jsx("path",{d:"M12 7.5V12l3.2 1.9"}),jsx("circle",{className:"dot",cx:"3.3",cy:"9.6",r:"1.7",fill:"currentColor",stroke:"none",opacity:".62"}),jsx("circle",{cx:"5.6",cy:"5.7",r:"1.3",fill:"currentColor",stroke:"none",opacity:".38"})]})},share:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M8.3 10.8 15.7 6.9M8.3 13.2l7.4 3.9"}),jsx("circle",{className:"dot",cx:"6",cy:"12",r:"3.1",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"18",cy:"5.6",r:"2.2",fill:"currentColor",stroke:"none",opacity:".5"}),jsx("circle",{cx:"18",cy:"18.4",r:"2.2",fill:"currentColor",stroke:"none",opacity:".5"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M8.3 10.8 15.7 6.9M8.3 13.2l7.4 3.9"}),jsx("circle",{className:"dot",cx:"6",cy:"12",r:"3.3",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"18",cy:"5.6",r:"2.4",fill:"currentColor",stroke:"none",opacity:".5"}),jsx("circle",{cx:"18",cy:"18.4",r:"2.4",fill:"currentColor",stroke:"none",opacity:".5"})]})},branch:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M6 15.4V4"}),jsx("path",{d:"M18 8.6a9 9 0 0 1-9 9"}),jsx("circle",{className:"dot",cx:"6",cy:"18",r:"2.9",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"18",cy:"6",r:"2.4"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M6 15.4V4"}),jsx("path",{d:"M18 8.6a9 9 0 0 1-9 9"}),jsx("circle",{className:"dot",cx:"6",cy:"18",r:"3.1",fill:"currentColor",stroke:"none"}),jsx("circle",{cx:"18",cy:"6",r:"2.5"})]})},schedule:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M9.5 2.8h5"}),jsx("circle",{cx:"12",cy:"14",r:"7.6"}),jsx("path",{d:"M12 14 14.9 11.1"}),jsx("circle",{className:"dot",cx:"15.4",cy:"10.6",r:"1.9",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M9.5 2.8h5"}),jsx("circle",{cx:"12",cy:"14",r:"7.6"}),jsx("path",{d:"M12 14 14.9 11.1"}),jsx("circle",{className:"dot",cx:"15.4",cy:"10.6",r:"2.1",fill:"currentColor",stroke:"none"})]})},artifact:{stroke:true,base:jsxs(Fragment,{children:[jsx("path",{d:"M14 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8.5z"}),jsx("path",{d:"M14 3.5v5h5"}),jsx("circle",{cx:"9",cy:"15.5",r:"1",fill:"currentColor",stroke:"none",opacity:".35"}),jsx("circle",{cx:"12",cy:"15.5",r:"1.35",fill:"currentColor",stroke:"none",opacity:".6"}),jsx("circle",{className:"dot",cx:"15.2",cy:"15.5",r:"1.8",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("path",{d:"M14 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8.5z"}),jsx("path",{d:"M14 3.5v5h5"}),jsx("circle",{cx:"9",cy:"15.5",r:"1.2",fill:"currentColor",stroke:"none",opacity:".35"}),jsx("circle",{cx:"12",cy:"15.5",r:"1.5",fill:"currentColor",stroke:"none",opacity:".6"}),jsx("circle",{className:"dot",cx:"15.2",cy:"15.5",r:"2",fill:"currentColor",stroke:"none"})]})},workspace:{stroke:true,base:jsxs(Fragment,{children:[jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsx("path",{d:"M14.5 4v16"}),jsx("circle",{className:"dot",cx:"17.75",cy:"8.2",r:"1.5",fill:"currentColor",stroke:"none"})]}),small:jsxs(Fragment,{children:[jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsx("path",{d:"M14.5 4v16"}),jsx("circle",{className:"dot",cx:"17.75",cy:"8.4",r:"1.8",fill:"currentColor",stroke:"none"})]})},loading:{stroke:false,base:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"3.2",fill:"currentColor"}),jsx("circle",{className:"dot",cx:"20",cy:"8",r:"3.4",fill:"currentColor"}),jsx("circle",{cx:"15.6",cy:"3.9",r:"1.6",fill:"currentColor",opacity:".45"}),jsx("circle",{cx:"9.8",cy:"3.3",r:"1.2",fill:"currentColor",opacity:".28"})]}),small:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"3.6",fill:"currentColor"}),jsx("circle",{className:"dot",cx:"20",cy:"8",r:"3.8",fill:"currentColor"})]})}},MP=Object.keys(vm);function bm({name:e,size:t=20,dot:o="off",label:r,className:n}){let a=vm[e],i=t===16,d=["ow-beacon-ic",o==="lit"?"ow-dot-lit":o==="pre"?"ow-dot-pre":"",n??""].filter(Boolean).join(" "),s=a.stroke?{fill:"none",stroke:"currentColor",strokeWidth:i?2.2:1.75,strokeLinecap:"round",strokeLinejoin:"round"}:void 0;return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",className:d,"aria-hidden":r?void 0:true,"aria-label":r,role:r?"img":void 0,...s,children:i?a.small:a.base})}function Wh(e){let[t,o]=useState(e?"spin":"rest");return useEffect(()=>{o(e?"spin":a=>a==="spin"?"finishing":a);},[e]),{phase:t,onAnimationIteration:()=>o(a=>a==="finishing"?"settle":a),onAnimationEnd:()=>o(a=>a==="settle"?"rest":a)}}function wm(e,t){if(e==="spin"||e==="finishing")return `ow-spin ${t} linear infinite`;if(e==="settle")return "ow-spin-settle var(--ow-dur-1, 120ms) var(--ow-ease-beacon)"}function gt({size:e=32,trail:t,satellite:o="var(--ow-beacon)",duration:r,spinning:n=true,"aria-label":a,className:i="",style:d}){let s=e>=20,l=r?`${r}s`:s?"var(--ow-dur-spin, 1.6s)":"var(--ow-dur-spin-fast, 0.9s)",{phase:c,onAnimationIteration:p,onAnimationEnd:m}=Wh(n),u={display:"inline-flex",alignItems:"center",justifyContent:"center",...d},b=a??(n?"\u52A0\u8F7D\u4E2D":"\u5DF2\u505C\u6B62");return jsx("div",{className:`ow-beacon-spinner ow-motion ${i}`,style:u,role:"status","aria-live":"polite",children:s?jsx(Uh,{size:e,trail:t??"var(--ow-text)",satellite:n?o:t??"var(--ow-text)",animation:wm(c,l),onAnimationIteration:p,onAnimationEnd:m,"aria-label":b}):jsx(Kh,{size:e,trail:t??"currentColor",animation:wm(c,l),onAnimationIteration:p,onAnimationEnd:m,"aria-label":b})})}function Uh({size:e,trail:t,satellite:o,animation:r,onAnimationIteration:n,onAnimationEnd:a,"aria-label":i}){return jsxs("svg",{width:e,height:e,viewBox:"0 0 96 96",role:"img","aria-label":i,style:{display:"block"},children:[jsx("circle",{cx:"48",cy:"48",r:"8.2",fill:t}),jsxs("g",{style:{transformOrigin:"48px 48px",transform:"rotate(24deg)",animation:r},onAnimationIteration:n,onAnimationEnd:a,children:[[[60.2,20.6,6.7,.6],[41.76,18.66,5.5,.45],[25.71,27.93,4.3,.3],[18.16,44.86,3.3,.2]].map(([s,l,c,p],m)=>jsx("circle",{cx:s,cy:l,r:c,fill:t,opacity:p},m)),jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:o})]})]})}function Kh({size:e,trail:t,animation:o,onAnimationIteration:r,onAnimationEnd:n,"aria-label":a}){return jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",role:"img","aria-label":a,style:{display:"block"},children:jsx("circle",{cx:"8",cy:"8",r:"6.6",fill:"none",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:"31.1 10.4",style:{transformOrigin:"8px 8px",transform:"rotate(24deg)",animation:o},onAnimationIteration:r,onAnimationEnd:n})})}var jh=[[48,48,8.2,1],[60.2,20.6,6.7,.6],[41.76,18.66,5.5,.45],[25.71,27.93,4.3,.3],[18.16,44.86,3.3,.2]],xm={dark:["#F7F6F1","#FFD23E"],light:["#0F1B3D","#D8A300"],"mono-white":["#F7F6F1","#F7F6F1"],"mono-navy":["#0F1B3D","#0F1B3D"]},Gh="var(--ow-brand-ink, #0F1B3D)",Zh="var(--ow-brand-satellite, #D8A300)",qh="13 11.7 73.4 45.3",Yh="0 0 96 96",ym=16,km=new Set;function Cm(e,t){typeof process<"u"&&process.env.NODE_ENV!=="production"&&Number.isFinite(t)&&t<ym&&!km.has(`${e}:${t}`)&&(km.add(`${e}:${t}`),console.warn(`[Orbitwork DS2] ${e}: \u6E32\u67D3\u5C3A\u5BF8 ${t}px \u4F4E\u4E8E\u54C1\u724C\u6700\u5C0F ${ym}px\uFF08\u89C1 ow/guidelines/brand-mark\uFF09\uFF0C\u8BF7\u589E\u5927 size \u6216\u6539\u7528\u5176\u4ED6\u5448\u73B0\u3002`));}function Nm(...e){let t=e.filter(Boolean).join(" ");return t===""?void 0:t}function xr({variant:e="dark",size:t=32,frame:o="optical",label:r="Orbitwork",className:n,style:a,...i}){let d=e==="auto",[s,l]=d?[Gh,Zh]:xm[e]??xm.dark,c=o!=="construction",p=c?Math.round(t*45.3/73.4*10)/10:t;return Cm("OrbitworkMark",t),jsxs("svg",{width:t,height:p,viewBox:c?qh:Yh,role:"img","aria-label":r,className:d?Nm("ow-brand-auto",n):n,style:a,...i,children:[jh.map(([m,u,b,w],v)=>jsx("circle",{cx:m,cy:u,r:b,fill:s,opacity:w},v)),jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:l})]})}function dc({theme:e="light",size:t=22,bilingual:o=false,label:r="Orbitwork",className:n,style:a,...i}){let d=e==="auto",s=e==="dark",l=d?"var(--ow-brand-ink, #0F1B3D)":s?"#F7F6F1":"#0F1B3D",c=d?"var(--ow-brand-divider, #D8D5CC)":s?"#333B50":"#D8D5CC",p=d?"var(--ow-brand-cn, #3A3E46)":s?"#C9CBD1":"#3A3E46";return Cm("OrbitworkLockup",Math.round(t*1.17)),jsxs("span",{role:"img","aria-label":r,className:d?Nm("ow-brand-auto",n):n,style:{display:"inline-flex",alignItems:"center",gap:Math.round(t*.4),...a},...i,children:[jsx(xr,{variant:d?"auto":s?"dark":"light",size:Math.round(t*1.17),style:{marginBottom:Math.round(t*.12)},"aria-hidden":"true",role:void 0,"aria-label":void 0}),jsx("span",{style:{fontFamily:"var(--ow-font-display, 'Space Grotesk', sans-serif)",fontWeight:500,fontSize:t,letterSpacing:"-0.01em",color:l,lineHeight:1,whiteSpace:"nowrap"},children:"orbitwork"}),o&&jsx("span",{"aria-hidden":"true",style:{width:1,alignSelf:"stretch",background:c}}),o&&jsx("span",{style:{fontFamily:"var(--ow-font-body, sans-serif)",fontWeight:500,fontSize:Math.round(t*.68),letterSpacing:"0.1em",color:p,whiteSpace:"nowrap"},children:"\u6CDB\u821F\u661F\u8F68"})]})}function Sm({size:e=24,label:t,...o}){let r=typeof e=="number"?e:Number.parseFloat(e),n=Number.isNaN(r)?22:r;return jsx(dc,{theme:"auto",size:n,label:t,"data-component":"orbitwork-logo",...o})}var zi='a[href],area[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),iframe,[tabindex]:not([tabindex="-1"]),[contenteditable="true"]';function Xh(e){return [...e.querySelectorAll(zi)].filter(t=>t.tabIndex>=0&&t.offsetParent!==null||t===document.activeElement)}function nl(e,t){let o=Xh(t);if(o.length===0)return e.preventDefault(),t.focus(),true;let r=o.at(0),n=o.at(-1),a=document.activeElement;return !e.shiftKey&&(a===n||!t.contains(a))?(e.preventDefault(),r?.focus(),true):e.shiftKey&&(a===r||!t.contains(a))?(e.preventDefault(),n?.focus(),true):false}var ex={info:"bg-[var(--ow-info-tint)] text-[color:var(--ow-info-on-tint)]",warning:"bg-[var(--ow-warning-tint)] text-[color:var(--ow-warning-on-tint)]",error:"bg-[var(--ow-error-tint)] text-[color:var(--ow-error-on-tint)]"};function oe({open:e,variant:t="default",title:o,subtitle:r,icon:n,iconTone:a,children:i,actions:d,onConfirm:s,confirmLabel:l="\u786E\u8BA4",cancelLabel:c="\u53D6\u6D88",confirmDisabled:p=false,confirmLoading:m=false,onClose:u,closable:b=true,closeOnOverlayClick:w=true,closeOnEscape:v=true,width:h,padded:x=true,bare:k=false,onSubmit:y,ariaLabel:P,className:N="",overlayClassName:S="",portal:R=true,fitViewport:M=true}){let T=useRef(null),_=useRef(null),L=useCallback(Ge=>{T.current=Ge;},[]),I=useId(),$=`${I}-title`,F=`${I}-desc`,E=useCallback(()=>{u?.();},[u]);if(useEffect(()=>{if(!e)return;let Ge=et=>{if(et.key==="Escape"&&v){et.stopPropagation(),E();return}if(et.key!=="Tab")return;let ht=T.current;ht&&nl(et,ht);};return document.addEventListener("keydown",Ge,true),()=>document.removeEventListener("keydown",Ge,true)},[e,v,E]),useEffect(()=>{if(!e)return;_.current=document.activeElement??null;let Ge=T.current;return Ge&&!Ge.contains(document.activeElement)&&(Ge.querySelector("[autofocus],[data-autofocus]")??Ge.querySelector(zi)??Ge).focus(),()=>{_.current?.focus?.();}},[e]),!e||R&&typeof document>"u")return null;let O=!k&&(o!==void 0||b&&!!u),z=!k&&(!!d||!k&&!d&&!!s),pe=n??(t==="danger"?jsx(fr,{"aria-hidden":"true"}):null),Me=a??(t==="danger"?"error":"plain"),Oe=g("relative box-border outline-none",M&&"max-w-[90vw] max-h-[85vh]",k?M&&"overflow-auto":"flex flex-col overflow-hidden","bg-[var(--ow-popover-bg)] [border-radius:var(--ow-radius-modal)]","border border-[color:var(--ow-border)] shadow-[var(--ow-shadow-modal)]","animate-[fade-in_var(--ow-dur-3)_var(--ow-ease-beacon)]",N),ee=h??(k?void 0:440),q={};ee!==void 0&&(q.width=ee),k||(q.padding=x?"var(--ow-space-6, 24px)":0);let A=jsxs(Fragment,{children:[O&&jsxs("div",{"data-slot":"dialog-header",className:"flex items-start justify-between gap-3 mb-4 flex-shrink-0",children:[jsxs("div",{className:"flex-1 min-w-0 flex items-start gap-3",children:[pe&&jsx("span",{"data-ow-part":"icon","data-ow-tone":Me,className:g("flex-[0_0_auto] inline-flex items-center justify-center",Me==="plain"?"w-5 h-5 text-[color:var(--ow-text-2)] [&>svg]:w-5 [&>svg]:h-5":g("w-8 h-8 [border-radius:var(--ow-radius-action)] [&>svg]:w-4 [&>svg]:h-4",ex[Me])),children:pe}),jsxs("div",{className:"flex-1 min-w-0",children:[o!==void 0&&jsx("div",{id:$,"data-ow-part":"title",className:"text-[color:var(--ow-text)] font-semibold text-ow-fs-subtitle leading-[1.3] font-[family-name:var(--ow-font-sans)]",children:o}),r!==void 0&&jsx("div",{id:F,"data-ow-part":"subtitle",className:"mt-1 text-[color:var(--ow-text-3)] font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:r})]})]}),b&&u&&jsx(f,{variant:"ghost",size:"md",type:"button","data-ow-part":"close",icon:jsx(Q,{}),"aria-label":"\u5173\u95ED",onClick:E})]}),jsx("div",{"data-slot":"dialog-body",className:"flex-1 min-h-0 overflow-y-auto text-[color:var(--ow-text-2)] font-normal text-ow-fs-body leading-6 font-[family-name:var(--ow-font-sans)]",children:i}),z&&jsx("div",{"data-slot":"dialog-actions",className:"flex items-center justify-end gap-3 mt-5 flex-shrink-0",children:d??jsxs(Fragment,{children:[u&&jsx(f,{variant:"secondary",type:"button",onClick:E,children:c}),jsx(f,{variant:t==="danger"?"danger":"primary",type:"button",loading:m,disabled:p,onClick:s,children:l})]})})]}),D={"data-slot":"dialog","data-ow-part":"surface","data-ow-variant":t,role:"dialog","aria-modal":true,"aria-labelledby":o!==void 0?$:void 0,"aria-describedby":r!==void 0?F:void 0,"aria-label":o===void 0?P:void 0,tabIndex:-1,className:Oe,style:q},Y=k?i:A,Ee=jsx("div",{"data-slot":"dialog-overlay","data-ow-part":"overlay",className:g("ow-motion fixed inset-0 flex items-center justify-center p-4","z-[var(--ow-z-modal)] bg-[var(--ow-scrim)]","animate-[fade-in_var(--ow-dur-2)_var(--ow-ease-beacon)]",S),onMouseDown:Ge=>{w&&Ge.target===Ge.currentTarget&&E();},children:y?jsx("form",{...D,ref:L,onSubmit:y,children:Y}):jsx("div",{...D,ref:L,children:Y})});return R?createPortal(Ee,document.body):Ee}function Lm({open:e,onClose:t,children:o,className:r="",overlayClassName:n=""}){return jsx(oe,{bare:true,open:e,onClose:t,className:r,overlayClassName:n,children:o})}function re({variant:e="text",lines:t=3,width:o,height:r,radius:n,circle:a=false,className:i="",style:d}){return e==="line"?jsx("div",{className:`ow-skeleton ow-skeleton--line ${i}`,style:{...Wa,width:o??"100%",height:r??16,borderRadius:a?"50%":n??"var(--ow-radius-xs)",...d}}):e==="block"?jsx("div",{className:`ow-skeleton ow-skeleton--block ${i}`,style:{...Wa,width:o??"100%",height:r??80,borderRadius:n??"var(--ow-radius-card)",...d}}):e==="avatar"?jsxs("div",{className:`ow-skeleton ow-skeleton--avatar ${i}`,style:{...rx,...d},children:[jsx("div",{style:ax}),jsxs("div",{style:nx,children:[jsx("div",{style:{...Wa,width:"40%",height:12}}),jsx("div",{style:Wa})]})]}):e==="card"?jsx("div",{className:`ow-skeleton ow-skeleton--card ${i}`,style:{...Wa,height:r??120,borderRadius:n??"var(--ow-radius-card)",...d}}):jsx("div",{className:`ow-skeleton ow-skeleton--text ${i}`,style:{...ox,...d},children:Array.from({length:t}).map((s,l)=>jsx("div",{style:{...Wa,width:l===1?"88%":l===2?"64%":"100%"}},l))})}var ox={display:"flex",flexDirection:"column",gap:"var(--ow-space-3)",maxWidth:600},Wa={height:16,borderRadius:"var(--ow-radius-xs)",background:"var(--ow-hover)",animation:"ow-skeleton 1.6s var(--ow-ease-beacon) infinite"},rx={display:"flex",gap:"var(--ow-space-3)",alignItems:"flex-start",maxWidth:600},ax={...Wa,width:32,height:32,borderRadius:"50%",flexShrink:0},nx={flex:1,display:"flex",flexDirection:"column",gap:"var(--ow-space-2)"};function Im({count:e=6}){return jsx(Fragment,{children:Array.from({length:e}).map((t,o)=>jsxs("div",{className:"skcard skcard--skeleton","aria-hidden":"true",children:[jsx(re,{variant:"block",width:40,height:40,radius:8,className:"gly"}),jsxs("div",{className:"body",children:[jsx(re,{variant:"line",width:"50%",height:13}),jsx(re,{variant:"line",width:"100%",height:12}),jsx(re,{variant:"line",width:"60%",height:12})]}),jsx(re,{variant:"block",width:72,height:28,radius:8,className:"inst"})]},o))})}function Am({icon:e,title:t,hint:o,grid:r,size:n,action:a,onClearSearch:i}){let d=!!o?.trim(),s=n??(r&&!i?"page":"md"),l=a?jsx(f,{variant:"primary",size:"md",onClick:a.onClick,children:a.label}):i?jsx(f,{variant:"primary",size:"md",onClick:i,children:"\u6E05\u7A7A\u641C\u7D22"}):void 0;return jsx(H,{className:g(r?"plaza__empty":"connector-empty",s!=="page"&&"py-16"),size:s,title:d?t:void 0,message:d?o:t,action:l})}var cc=6;function pc(e){return `var(--ow-data-${(e%cc+cc)%cc+1})`}var sx="var(--ow-data-today)",Bm="h-1.5 w-1.5 [border-radius:var(--ow-radius-pill)] bg-[var(--ow-data-today)]",Wi="text-ow-fs-mark-md leading-none text-[color:var(--ow-text-3)] font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]";function Om(e){return Math.abs(e)>=1e4?`${(e/1e4).toFixed(1)}\u4E07`:e.toLocaleString("zh-CN")}function Vm({count:e}){return e<=0?null:jsx("div",{"aria-hidden":"true",className:"absolute inset-0 flex flex-col justify-between pointer-events-none",children:Array.from({length:e+1},(t,o)=>jsx("div",{className:"h-px w-full bg-[var(--ow-border)]"},o))})}function iR({data:e,orientation:t="vertical",max:o,formatValue:r=Om,showValues:n=false,gridLines:a=4,height:i=160,todayIndex:d,loading:s=false,emptyMessage:l="\u8FD8\u6CA1\u6709\u6570\u636E",ariaLabel:c,className:p}){if(s)return jsx("div",{"data-slot":"bar-chart","data-ow-state":"loading",className:p,"aria-busy":"true",children:jsx(re,{variant:"block",height:i})});if(e.length===0)return jsx("div",{"data-slot":"bar-chart","data-ow-state":"empty",className:p,children:jsx(H,{message:l})});let m=o??(Math.max(...e.map(w=>w.value),0)||1),u=w=>Math.max(0,Math.min(1,w/m)),b=(w,v)=>pc(w.series??v);return t==="horizontal"?jsx("div",{"data-slot":"bar-chart","data-ow-orientation":"horizontal",role:"img","aria-label":c,className:g("flex flex-col gap-2.5 w-full",p),children:e.map((w,v)=>jsxs("div",{"data-ow-part":"bar-row",className:"flex flex-col gap-1",children:[jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[jsx("span",{className:"text-ow-fs-ui text-[color:var(--ow-text-2)] min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:w.label}),n&&jsx("span",{className:Wi,children:r(w.value)})]}),jsx("div",{"data-ow-part":"track",className:"relative h-1.5 w-full overflow-hidden bg-[var(--ow-progress-track)] [border-radius:var(--ow-radius-pill)]",children:jsx("div",{"data-ow-part":"fill","data-ow-role":v===d?"today":void 0,className:"relative h-full [border-radius:var(--ow-radius-pill)] transition-[width] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",style:{width:`${u(w.value)*100}%`,background:b(w,v)},children:v===d&&jsx("span",{"aria-hidden":"true","data-ow-part":"today-marker",className:g(Bm,"absolute right-0 top-0 h-full w-1.5")})})})]},w.label))}):jsxs("div",{"data-slot":"bar-chart","data-ow-orientation":"vertical",role:"img","aria-label":c,className:g("flex flex-col gap-2 w-full",p),children:[jsxs("div",{className:"relative w-full",style:{height:i},children:[jsx(Vm,{count:a}),jsx("div",{className:"relative flex h-full w-full items-end gap-2",children:e.map((w,v)=>jsxs("div",{"data-ow-part":"bar-col",className:"flex flex-1 min-w-0 flex-col items-center gap-1 h-full justify-end",children:[n&&jsx("span",{className:Wi,children:r(w.value)}),v===d&&jsx("span",{"aria-hidden":"true","data-ow-part":"today-marker",className:Bm}),jsx("div",{"data-ow-part":"bar","data-ow-role":v===d?"today":void 0,className:"w-full max-w-10 [border-radius:var(--ow-radius-2xs)] transition-[height] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",style:{height:`${u(w.value)*100}%`,minHeight:w.value>0?2:0,background:b(w,v)}})]},w.label))})]}),jsx("div",{className:"flex w-full gap-2",children:e.map(w=>jsx("span",{className:g(Wi,"flex-1 min-w-0 text-center overflow-hidden text-ellipsis whitespace-nowrap"),children:w.label},w.label))})]})}function sR({labels:e,series:t,area:o=false,height:r=160,gridLines:n=4,min:a,max:i,formatValue:d=Om,legend:s=false,todayIndex:l,loading:c=false,emptyMessage:p="\u8FD8\u6CA1\u6709\u6570\u636E",ariaLabel:m,className:u}){if(c)return jsx("div",{"data-slot":"series-chart","data-ow-state":"loading",className:u,"aria-busy":"true",children:jsx(re,{variant:"block",height:r})});if(!t.some(N=>N.points.length>0))return jsx("div",{"data-slot":"series-chart","data-ow-state":"empty",className:u,children:jsx(H,{message:p})});let w=t.flatMap(N=>N.points),v=a??Math.min(...w,0),x=(i??Math.max(...w,v+1))-v||1,k=Math.max(...t.map(N=>N.points.length)),y=N=>k<=1?50:N/(k-1)*100,P=N=>100-(N-v)/x*100;return jsxs("div",{"data-slot":"series-chart",role:"img","aria-label":m,className:g("flex flex-col gap-2 w-full",u),children:[jsxs("div",{className:"relative w-full",style:{height:r},children:[jsx(Vm,{count:n}),jsxs("svg",{className:"relative block h-full w-full overflow-visible",viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",children:[jsx("desc",{children:"\u65F6\u5E8F\u6298\u7EBF\u56FE\uFF1A\u5404\u7CFB\u5217\u4E00\u6761\u6298\u7EBF\uFF0C\u7EB5\u8F74\u6309\u6700\u5C0F\u5230\u6700\u5927\u503C\u7B49\u6BD4\u6620\u5C04\u3002"}),t.map((N,S)=>{let R=pc(N.series??S),M=N.points.map((T,_)=>`${y(_)},${P(T)}`).join(" ");return jsxs("g",{children:[o&&N.points.length>1&&jsx("polygon",{points:`${y(0)},100 ${M} ${y(N.points.length-1)},100`,fill:R,opacity:"0.12"}),jsx("polyline",{points:M,fill:"none",stroke:R,strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]},N.name)})]}),l!==void 0&&t.map(N=>{let S=N.points[l];return S===void 0?null:jsx("span",{"data-ow-part":"today-marker","aria-hidden":"true",className:"absolute w-2 h-2 -translate-x-1/2 -translate-y-1/2 [border-radius:var(--ow-radius-pill)] [outline:1.5px_solid_var(--ow-data-today)] [outline-offset:2px]",style:{left:`${y(l)}%`,top:`${P(S)}%`,background:sx}},`today-${N.name}`)})]}),jsx("div",{className:"flex w-full gap-2",children:e.map(N=>jsx("span",{className:g(Wi,"flex-1 min-w-0 text-center overflow-hidden text-ellipsis whitespace-nowrap"),children:N},N))}),s&&jsx("div",{"data-ow-part":"legend",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5",children:t.map((N,S)=>jsxs("span",{className:"inline-flex items-center gap-1.5 text-ow-fs-ui text-[color:var(--ow-text-2)]",children:[jsx("span",{"aria-hidden":"true",className:"w-2.5 h-0.5 shrink-0 [border-radius:var(--ow-radius-pill)]",style:{background:pc(N.series??S)}}),N.name,jsx("span",{className:Wi,children:d(N.points[N.points.length-1]??0)})]},N.name))})]})}var zm="orbitwork-ds2",px=createCssVariablesTheme({name:zm,variablePrefix:"--ow-shiki-",fontStyle:true}),Fm=new Map,ux=e=>{let t=Fm.get(e);if(t)return t;let o=createHighlighter({langs:[e],themes:[px],engine:createJavaScriptRegexEngine()});return Fm.set(e,o),o},$m=new Map,mx=(e,t)=>{let o=e.slice(0,100),r=e.length>100?e.slice(-100):"";return `${t}:${e.length}:${o}:${r}`},yn=new Map,ua=e=>({bg:"transparent",fg:"inherit",tokens:e.split(`
|
|
2
|
+
`).map(t=>t===""?[]:[{color:"inherit",content:t}])}),ma=(e,t,o)=>{let r=mx(e,t),n=$m.get(r);return n||(o&&(yn.has(r)||yn.set(r,new Set),yn.get(r)?.add(o)),ux(t).then(a=>{let d=a.getLoadedLanguages().includes(t)?t:"text",s=a.codeToTokens(e,{lang:d,theme:zm}),l={bg:s.bg??"transparent",fg:s.fg??"inherit",tokens:s.tokens};$m.set(r,l);let c=yn.get(r);if(c){for(let p of c)p(l);yn.delete(r);}}).catch(a=>{console.error("Failed to highlight code:",a),yn.delete(r);}),null)};var bx=e=>e&&e&1,wx=e=>e&&e&2,hx=e=>e&&e&4,xx=e=>e.map((t,o)=>({key:`line-${o}`,tokens:t.map((r,n)=>({key:`line-${o}-${n}`,token:r}))})),Um=e=>{if(!e||e==="inherit"||e==="transparent")return {};let t={};for(let o of e.split(";")){let r=o.indexOf(":");if(r<=0)continue;let n=o.slice(0,r).trim(),a=o.slice(r+1).trim();n&&(t[n]=a);}return t},Km=e=>e==null?void 0:String(e),yx=({token:e})=>{let t=e.htmlStyle,o=Km(t?.color??e.color),r=Km(t?.["background-color"]),n={color:o,backgroundColor:e.bgColor??r,fontStyle:bx(e.fontStyle)?"italic":void 0,fontWeight:wx(e.fontStyle)?"bold":void 0,textDecoration:hx(e.fontStyle)?"underline":void 0};return jsx("span",{style:n,children:e.content})},kx={display:"inline-block",width:"2.5rem",marginRight:"1rem",textAlign:"right",color:"var(--ow-text-3)",fontVariantNumeric:"tabular-nums",userSelect:"none"},Cx=({keyedLine:e,showLineNumbers:t,lineNumber:o})=>jsxs("span",{style:{display:"block"},children:[t&&jsx("span",{style:kx,children:o}),e.tokens.length===0?`
|
|
3
|
+
`:e.tokens.map(({token:r,key:n})=>jsx(yx,{token:r},n))]}),jm=memo(({tokenized:e,showLineNumbers:t})=>{let o=useMemo(()=>{let n=Um(e.fg),a=Um(e.bg);return {margin:0,fontWeight:400,fontSize:"var(--ow-fs-code)",lineHeight:"var(--ow-lh-code)",fontFamily:"var(--ow-font-mono)",fontVariantNumeric:"tabular-nums",color:n.color??(e.fg==="inherit"?"var(--ow-text)":e.fg),backgroundColor:a["background-color"]??(e.bg==="transparent"?"transparent":e.bg),whiteSpace:"pre",overflowX:"auto"}},[e.bg,e.fg]),r=useMemo(()=>xx(e.tokens),[e.tokens]);return jsx("pre",{style:o,children:jsx("code",{style:{fontFamily:"inherit",fontSize:"inherit"},children:r.map((n,a)=>jsx(Cx,{keyedLine:n,showLineNumbers:t,lineNumber:a+1},n.key))})})},(e,t)=>e.tokenized===t.tokenized&&e.showLineNumbers===t.showLineNumbers);jm.displayName="CodeBlockBody";var Nx=({code:e,language:t,showLineNumbers:o=false})=>{let[r,n]=useState(()=>ua(e)),a=useRef({code:e,language:t});return useEffect(()=>{n(ua(e)),a.current={code:e,language:t};let i=false,d=ma(e,t);if(d){n(d);return}return ma(e,t,s=>{!i&&a.current.code===e&&a.current.language===t&&n(s);}),()=>{i=true;}},[e,t]),jsx(jm,{showLineNumbers:o,tokenized:r})};function il({language:e="text",children:t,onCopy:o,onRun:r,runLabel:n="\u8FD0\u884C",showLineNumbers:a=false,className:i="",...d}){let[s,l]=useState(false),[c,p]=useState(false),m=useCallback(()=>{o?o():typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(t).catch(b=>{console.error("Failed to copy code:",b);}),l(true),setTimeout(()=>l(false),2e3);},[t,o]),u=useCallback(()=>{r?.(),p(true),setTimeout(()=>p(false),2e3);},[r]);return jsxs("div",{...d,"data-slot":"code-block",className:g("bg-[color:var(--ow-code-bg)] border border-ow-border [border-radius:var(--ow-radius-sm)] px-4 py-3.5",i),children:[jsxs("div",{className:"flex justify-between items-center font-normal text-ow-fs-mark-md leading-none font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-text-3 mb-2.5",children:[jsx("span",{children:e}),jsxs("span",{className:"inline-flex items-center gap-3",children:[r&&jsxs(f,{variant:"text",size:"sm",type:"button",onClick:u,"aria-label":"\u8FD0\u884C\u4EE3\u7801",children:[c?jsx(be,{"aria-hidden":"true",width:16,height:16}):jsx(vr,{"aria-hidden":"true",width:16,height:16}),c?"\u5DF2\u8FD0\u884C":n]}),jsxs(f,{variant:"text",size:"sm",type:"button",onClick:m,"aria-label":"\u590D\u5236\u4EE3\u7801",children:[s&&jsx(be,{"aria-hidden":"true",width:16,height:16}),s?"\u5DF2\u590D\u5236":"\u590D\u5236"]})]})]}),jsx(Nx,{code:t,language:e,showLineNumbers:a})]})}var Tx=/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@(.*)$/;function Mx(e){let t=e.split(`
|
|
4
|
+
`),o=[],r=0,n=0;for(let a of t){if(a.startsWith("---")||a.startsWith("+++")||a.startsWith("diff ")||a.startsWith("index "))continue;let i=Tx.exec(a);if(i){r=Number.parseInt(i[1]??"0",10),n=Number.parseInt(i[2]??"0",10),o.push({type:"hunk",content:a,oldNum:null,newNum:null});continue}a.startsWith("+")?o.push({type:"add",content:a.slice(1),oldNum:null,newNum:n++}):a.startsWith("-")?o.push({type:"del",content:a.slice(1),oldNum:r++,newNum:null}):a.startsWith(" ")?o.push({type:"context",content:a.slice(1),oldNum:r++,newNum:n++}):a===""&&o.length>0&&o.push({type:"context",content:"",oldNum:r++,newNum:n++});}return o}var _x=e=>e&&e&1,Lx=e=>e&&e&2,Dx=e=>e&&e&4,Ex=e=>e==null?void 0:String(e),Ix=({token:e})=>{let t=e.htmlStyle,r={color:Ex(t?.color??e.color),fontStyle:_x(e.fontStyle)?"italic":void 0,fontWeight:Lx(e.fontStyle)?"bold":void 0,textDecoration:Dx(e.fontStyle)?"underline":void 0};return jsx("span",{style:r,children:e.content})};function Ax(e){let t=[],o=[],r=[],n=[];for(let a of e)a.type==="hunk"?(r.push(-1),n.push(-1)):a.type==="context"?(r.push(t.length),n.push(o.length),t.push(a.content),o.push(a.content)):a.type==="del"?(r.push(t.length),n.push(-1),t.push(a.content)):(r.push(-1),n.push(o.length),o.push(a.content));return {oldCode:t.join(`
|
|
5
5
|
`),newCode:o.join(`
|
|
6
|
-
`),oldLineIndices:r,newLineIndices:n}}var
|
|
7
|
-
`})]},`line-${d}`)})}));jm.displayName="DiffBody";function Gm({children:e,language:t="text",filename:o,showLineNumbers:r=true,className:n="",...a}){let i=useMemo(()=>Nx(e),[e]),{oldCode:d,newCode:s,oldLineIndices:l,newLineIndices:c}=useMemo(()=>_x(i),[i]),[p,m]=useState(()=>ca(d)),[u,v]=useState(()=>ca(s)),w=useRef({oldCode:d,newCode:s,language:t});return useEffect(()=>{m(ca(d)),v(ca(s)),w.current={oldCode:d,newCode:s,language:t};let b=false,h=pa(d,t);h?m(h):pa(d,t,k=>{!b&&w.current.oldCode===d&&m(k);});let x=pa(s,t);return x?v(x):pa(s,t,k=>{!b&&w.current.newCode===s&&v(k);}),()=>{b=true;}},[d,s,t]),jsxs("div",{...a,"data-slot":"code-diff","data-ow-part":"surface",className:g("bg-[color:var(--ow-code-bg)] border border-ow-border [border-radius:var(--ow-radius-sm)] my-2 overflow-hidden",n),children:[o&&jsx("div",{"data-ow-part":"header",className:"flex items-center gap-2 px-4 py-2.5 font-mono tabular-nums text-ow-fs-mark-md leading-none text-ow-text-2 border-b border-ow-border",children:jsx("span",{children:o})}),jsx("div",{"data-ow-part":"body",className:"overflow-x-auto",children:jsx(jm,{lines:i,oldTokens:p.tokens,newTokens:u.tokens,oldLineIndices:l,newLineIndices:c,showLineNumbers:r})})]})}var Zm="flex flex-col h-full min-w-0 overflow-hidden bg-[color:var(--ow-code-bg)] border border-ow-border [border-radius:var(--ow-radius-sm)]",Dx="flex-1 min-h-0 flex flex-col overflow-auto",Ex="flex-1 min-h-0 overflow-auto";function Wi({language:e="text",code:t,diff:o,showLineNumbers:r=true,className:n="",children:a}){return a?jsx("div",{"data-slot":"code-preview","data-ow-part":"surface",className:g(Zm,n),children:a}):jsxs("div",{"data-slot":"code-preview","data-ow-part":"surface",className:g(Zm,n),children:[t&&jsx("div",{"data-ow-part":"code-area",className:Dx,children:jsx(nl,{language:e,showLineNumbers:r,"data-ow-part":"code",children:t})}),o&&jsx("div",{"data-ow-part":"diff-area",className:Ex,children:jsx(Gm,{language:e,showLineNumbers:r,children:o})})]})}var Ui="bg-[var(--ow-hover-pop)] border-[color:var(--ow-border-strong)]",Bx=["font-medium leading-none","text-[length:var(--ow-fs-eyebrow-cjk,12px)]","tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]","text-[color:var(--ow-eyebrow)]"].join(" ");function Ox(e,t){let o=t.trim().toLowerCase();return o?[e.label,e.description??"",...e.keywords??[]].join(" ").toLowerCase().includes(o):true}function LR({open:e,onClose:t,groups:o,onSelect:r,query:n,onQueryChange:a,filter:i=true,placeholder:d="\u641C\u7D22\u547D\u4EE4\u2026",emptyMessage:s="\u6CA1\u6709\u5339\u914D\u7684\u547D\u4EE4\u3002\u6362\u4E2A\u8BCD\u8BD5\u8BD5\u3002",footer:l,width:c=560,className:p}){let[m,u]=useState(""),v=n??m,[w,b]=useState(0),h=useRef(null),x=useMemo(()=>i?o.map(T=>({...T,items:T.items.filter(_=>Ox(_,v))})).filter(T=>T.items.length>0):o,[o,v,i]),k=useMemo(()=>x.flatMap(T=>T.items),[x]),y=k.filter(T=>!T.disabled).length;useEffect(()=>{let T=k.findIndex(_=>!_.disabled);b(T<0?-1:T);},[k]),useEffect(()=>{e||n===void 0&&u("");},[e,n]),useEffect(()=>{w<0||h.current?.querySelector(`[data-index="${w}"]`)?.scrollIntoView({block:"nearest"});},[w]);let P=T=>{if(y===0)return;let _=w;for(let D=0;D<k.length&&(_=(_+T+k.length)%k.length,!!k[_]?.disabled);D++);b(_);},N=T=>{!T||T.disabled||r?.(T);},S=T=>{T.key==="ArrowDown"?(T.preventDefault(),P(1)):T.key==="ArrowUp"?(T.preventDefault(),P(-1)):T.key==="Enter"?(T.preventDefault(),N(k[w])):T.key==="Escape"&&(T.preventDefault(),t?.());},R=T=>{n===void 0&&u(T),a?.(T);},M=-1;return jsx(oe,{open:e,onClose:t,closable:false,padded:false,width:c,className:g("bg-[var(--ow-popover-bg)]",p),children:jsxs("div",{"data-slot":"command-palette","data-ow-part":"panel",onKeyDown:S,className:"flex min-h-0 flex-col",children:[jsxs("div",{"data-ow-part":"search",className:"flex items-center gap-2 border-b border-[color:var(--ow-border)] px-3 h-12 shrink-0",children:[jsx($t,{"aria-hidden":"true",style:{width:16,height:16},className:"shrink-0 text-[color:var(--ow-text-3)]"}),jsx(te,{standalone:false,value:v,onChange:R,placeholder:d,"aria-label":"\u641C\u7D22\u547D\u4EE4","aria-autocomplete":"list","aria-expanded":true,"aria-controls":"ow-command-palette-list","aria-activedescendant":w>=0?`ow-command-palette-opt-${w}`:void 0,role:"combobox",autoFocus:true,className:"h-8"})]}),jsx("div",{ref:h,id:"ow-command-palette-list",role:"listbox","aria-label":"\u547D\u4EE4","data-ow-part":"list",className:"min-h-0 max-h-[min(60vh,420px)] overflow-y-auto p-2",children:k.length===0?jsx(F,{message:s,variant:"text"}):x.map(T=>jsxs("div",{"data-ow-part":"group",className:"mb-1 last:mb-0",children:[T.title&&jsx("div",{"data-ow-part":"group-title",className:g(Bx,"px-2 pb-1.5 pt-2"),children:T.title}),T.items.map(_=>{M+=1;let D=M,I=D===w;return jsxs("div",{id:`ow-command-palette-opt-${D}`,"data-ow-part":"row","data-index":D,"data-ow-state":g(I&&"active",_.disabled&&"disabled")||void 0,role:"option","aria-selected":I,"aria-disabled":_.disabled||void 0,onMouseMove:()=>!_.disabled&&b(D),onClick:()=>N(_),className:g("flex w-full items-center gap-2.5 h-10 px-2 box-border text-left","[border-radius:var(--ow-radius-sm)] select-none","text-[length:var(--ow-fs-ui)]","transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",_.disabled?"cursor-not-allowed text-[color:var(--ow-disabled-text)]":g("cursor-pointer text-[color:var(--ow-text)]","hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]",I&&"bg-[var(--ow-hover-pop)]")),children:[_.icon&&jsx("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[color:var(--ow-text-2)] [&>svg]:h-4 [&>svg]:w-4",children:_.icon}),jsx("span",{className:"min-w-0 flex-1 truncate",children:_.label}),_.description&&jsx("span",{className:"min-w-0 max-w-[45%] shrink-0 truncate text-[color:var(--ow-text-3)]",children:_.description}),_.keys&&_.keys.length>0&&jsx("span",{className:"inline-flex shrink-0 items-center gap-[3px]",children:_.keys.map((H,$)=>jsx(Br,{className:Ui,children:H},`${_.id}-${H}-${$}`))})]},_.id)})]},T.id))}),jsxs("div",{"data-ow-part":"footer",className:"flex shrink-0 items-center gap-4 border-t border-[color:var(--ow-border)] px-3 h-8 text-[length:var(--ow-fs-ui)] text-[color:var(--ow-text-3)]",children:[jsxs("span",{className:"inline-flex items-center gap-1.5",children:[jsx(Br,{className:Ui,children:"\u2191"}),jsx(Br,{className:Ui,children:"\u2193"}),"\u9009\u62E9"]}),jsxs("span",{className:"inline-flex items-center gap-1.5",children:[jsx(Br,{className:Ui,children:"Enter"}),"\u6253\u5F00"]}),jsxs("span",{className:"inline-flex items-center gap-1.5",children:[jsx(Br,{className:Ui,children:"Esc"}),"\u5173\u95ED"]}),l&&jsx("span",{className:"ml-auto min-w-0 truncate",children:l})]})]})})}function VR({items:e,title:t="\u4F60\u53EF\u80FD\u8FD8\u60F3\u4E86\u89E3",onSelect:o,loading:r=false,loadingRows:n=3,error:a,errorDetail:i,emptyMessage:d="\u6682\u65F6\u6CA1\u6709\u53EF\u63A8\u8350\u7684\u5185\u5BB9",className:s=""}){return jsxs("section",{"data-slot":"content-recommendation",className:g("font-[family-name:var(--ow-font-sans)]",s),children:[t&&jsxs("div",{"data-ow-part":"heading",className:"mb-2 flex items-center gap-1.5 text-[length:var(--ow-fs-ui)] font-medium leading-5 text-ow-text-2",children:[jsx(Ea,{className:"h-4 w-4 text-ow-text-3"}),t]}),a?jsx(J,{variant:"error",detail:i,children:a}):r?jsx("div",{"data-ow-part":"loading",className:"grid gap-2",role:"status","aria-label":"\u6B63\u5728\u751F\u6210\u63A8\u8350",children:Array.from({length:n},(l,c)=>jsx(re,{variant:"block",height:44,radius:"var(--ow-radius-card)"},c))}):e.length===0?jsx(F,{message:d,size:"sm"}):jsx("div",{"data-ow-part":"list",className:"grid gap-2",children:e.map(l=>jsxs("button",{"data-ow-part":"row",type:"button",disabled:l.disabled,onClick:()=>o?.(l),className:g("ow-focus-ring box-border flex min-h-[var(--ow-h-lg)] w-full items-center gap-2.5 px-3 py-[9px] text-left","bg-ow-surface border border-ow-border [border-radius:var(--ow-radius-card)] text-ow-text","cursor-pointer transition-colors [transition-duration:var(--ow-dur-1)] [transition-timing-function:var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","disabled:cursor-not-allowed disabled:bg-[var(--ow-disabled-bg)] disabled:border-[color:var(--ow-disabled-border)]","disabled:text-[color:var(--ow-disabled-text)] disabled:hover:bg-[var(--ow-disabled-bg)]"),children:[l.icon&&jsx("span",{"data-ow-part":"icon",className:"inline-flex h-5 w-5 shrink-0 items-center justify-center text-ow-text-2",children:l.icon}),jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[jsx("span",{className:"text-[length:var(--ow-fs-body)] leading-5",children:l.title}),l.description&&jsx("span",{className:"text-[length:var(--ow-fs-caption)] leading-[18px] text-ow-text-3",children:l.description})]}),jsx(he,{className:"h-4 w-4 shrink-0 text-ow-text-3"})]},l.key))})]})}function HR(e){return jsx(ro,{"data-slot":"context-chip",removeMode:"hover",...e})}function Fx(e){return e>=.85?"var(--ow-error)":e>=.6?"var(--ow-warning)":"var(--ow-text-3)"}function Qm({value:e,size:t=18,showReadout:o=false,readout:r,className:n}){let a=Math.min(1,Math.max(0,e)),i=Fx(a),d=t<=24?4:3,s=t<=24?5.5:4.5,l=a*113.2,c=-24+a*360;return jsxs("span",{className:`ow-context-usage${n?` ${n}`:""}`,children:[jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48","aria-hidden":"true",children:[jsx("circle",{cx:"24",cy:"24",r:"18",fill:"none",stroke:"var(--ow-progress-track)",strokeWidth:d}),jsx("circle",{cx:"24",cy:"24",r:"18",fill:"none",stroke:i,strokeWidth:d,strokeDasharray:`${l} ${113.2}`,transform:"rotate(-24 24 24)"}),jsx("g",{transform:`rotate(${c} 24 24)`,children:jsx("circle",{cx:"42",cy:"24",r:s,fill:i})})]}),o&&jsx("span",{className:"ow-context-usage__readout",children:r??`${Math.round(a*100)}%`})]})}function QR(e){let t=useId(),o=e.percent!==void 0&&e.percent>=85?"danger":e.percent!==void 0&&e.percent>=60?"warning":"normal",r=e.loading?1:(e.percent??0)/100,n=e.percentLabel;return jsxs("div",{className:`context-usage-indicator context-usage-indicator--${o}${e.loading?" context-usage-indicator--loading":""}`,children:[jsx(f,{variant:"unstyled",type:"button",className:"context-usage-indicator__trigger","aria-label":e.ariaLabel,"aria-describedby":t,children:jsx(Qm,{value:r,size:18,showReadout:true,readout:n},e.sessionKey)}),jsx("div",{id:t,role:"tooltip",className:"context-usage-popover",children:jsxs(zt,{className:"context-usage-card",title:"\u4E0A\u4E0B\u6587\u8BE6\u60C5",actions:jsx(at,{className:"context-usage-card__badge",children:"TOKEN"}),children:[jsxs("div",{className:"context-usage-card__summary",children:[jsx("span",{children:"\u7A97\u53E3\u5360\u7528"}),jsx("strong",{children:e.percentLabel})]}),jsx("div",{className:"context-usage-card__progress",role:"progressbar","aria-label":"\u4E0A\u4E0B\u6587\u7A97\u53E3\u5360\u7528","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.loading||e.percent===void 0?void 0:Math.round(e.percent),children:jsx("span",{style:{width:`${e.loading?0:e.percent??0}%`}})}),jsxs("div",{className:"context-usage-card__cache-hit",children:[jsx("span",{children:"\u7F13\u5B58\u547D\u4E2D"}),e.usageLoading?jsx(at,{children:"\u52A0\u8F7D\u4E2D"}):e.cacheHitLabel?jsxs("span",{className:"context-usage-card__cache-hit-value",children:[jsx("strong",{children:e.cacheHitLabel}),e.cacheHitPercent&&jsxs(Fragment,{children:[jsx("span",{children:"\xB7"}),jsx("span",{children:e.cacheHitPercent})]})]}):jsx(at,{children:"\u672A\u547D\u4E2D"})]}),e.compactRecommended&&jsxs("div",{className:"context-usage-card__compact-advice",children:[jsx(at,{variant:"warning",className:"context-usage-card__compact-badge",children:"\u5EFA\u8BAE\u538B\u7F29"}),jsx("span",{children:"\u5DF2\u8D85\u8FC7\u63A8\u8350\u9608\u503C\uFF0C\u5EFA\u8BAE\u6267\u884C /compact \u538B\u7F29\u4E0A\u4E0B\u6587"})]}),jsx("div",{className:"context-usage-card__divider"}),jsx(uc,{tone:"used",label:"\u5DF2\u4F7F\u7528",value:e.usedLabel}),jsx(uc,{tone:"remaining",label:"\u5269\u4F59",value:e.remainingLabel}),jsx("div",{className:"context-usage-card__divider"}),jsx(uc,{label:"\u603B\u53EF\u7528",value:e.totalLabel,strong:true}),e.totalLabel==="\u2014"&&jsx("p",{className:"context-usage-card__unavailable",children:e.modelLoading?"\u6B63\u5728\u83B7\u53D6\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002":"Studio \u6682\u672A\u63D0\u4F9B\u6B64\u6A21\u578B\u7684\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002"})]})})]})}function uc({tone:e,label:t,value:o,strong:r=false}){return jsxs("div",{className:`context-usage-card__row context-usage-card__total${r?" is-strong":""}`,children:[e?jsx("span",{className:`context-usage-card__dot context-usage-card__dot--${e}`}):jsx("span",{className:"context-usage-card__dot-spacer"}),jsx("span",{className:"context-usage-card__label",children:t}),jsx("strong",{children:o})]})}var Hx=50;function Wx(e,t,o){if(e.key!=="Enter")return false;if(t||e.nativeEvent.isComposing||e.keyCode===229)return true;if(o===null)return false;let r=e.timeStamp-o;return r>=0&&r<=Hx}function Dt(){let e=useRef(false),t=useRef(null),o=useCallback(i=>{e.current=true,t.current=null;},[]),r=useCallback(i=>{e.current=false,t.current=i.timeStamp;},[]),n=useCallback(i=>Wx(i,e.current,t.current),[]);return {isComposing:useCallback(()=>e.current,[]),isImeEnter:n,onCompositionStart:o,onCompositionEnd:r}}function tf({onCancel:e,onSubmit:t}){let[o,r]=useState(""),[n,a]=useState(false),[i,d]=useState(null),{isImeEnter:s,onCompositionEnd:l,onCompositionStart:c}=Dt(),p=o.trim()!==""&&!n,m=()=>{p&&(a(true),d(null),t(o.trim()).catch(u=>d(u instanceof Error?u.message:"\u521B\u5EFA\u9879\u76EE\u5931\u8D25")).finally(()=>a(false)));};return jsx(oe,{open:true,title:"\u65B0\u5EFA\u9879\u76EE",width:448,onClose:e,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",onClick:e,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",loading:n,disabled:!p,onClick:m,children:n?"\u521B\u5EFA\u4E2D\u2026":"\u521B\u5EFA"})]}),children:jsxs("label",{"data-ow-part":"field",className:"flex flex-col gap-2",children:[jsx("span",{"data-ow-part":"field-label",className:"text-[color:var(--ow-text-2)] font-medium text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:"\u9879\u76EE\u540D\u79F0"}),jsx(te,{autoFocus:true,value:o,placeholder:"\u4F8B\u5982 \u7ADE\u54C1\u8C03\u7814",error:i??void 0,onChange:r,onCompositionStart:c,onCompositionEnd:l,onKeyDown:u=>{s(u)||u.key==="Enter"&&m();}})]})})}var fc="px-3";function jx({direction:e}){return jsxs("svg",{className:"shrink-0 w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true","data-ow-part":"sort-glyph","data-ow-state":e??"none",children:[jsx("desc",{children:"\u6392\u5E8F\u6307\u793A\uFF1A\u4E0A\u7BAD\u5934\u4E3A\u5347\u5E8F\u3001\u4E0B\u7BAD\u5934\u4E3A\u964D\u5E8F\uFF0C\u6FC0\u6D3B\u65B9\u5411\u7740\u91CD\u663E\u793A\u3002"}),jsx("path",{d:"M4 6 7 3l3 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e==="asc"?"text-[color:var(--ow-text)]":"text-[color:var(--ow-text-3)]"}),jsx("path",{d:"M4 8l3 3 3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e==="desc"?"text-[color:var(--ow-text)]":"text-[color:var(--ow-text-3)]"})]})}function Gx(e,t){return !e||e.key!==t?{key:t,direction:"asc"}:e.direction==="asc"?{key:t,direction:"desc"}:null}function of(e){return e.align??(e.numeric?"end":"start")}function dl({columns:e,rows:t,rowKey:o,density:r="default",sort:n=null,onSortChange:a,loading:i=false,loadingRows:d=5,emptyMessage:s="\u8FD8\u6CA1\u6709\u6570\u636E",emptyActionLabel:l,onEmptyAction:c,error:p,errorDetail:m,onRowClick:u,selectedRowKey:v,toolbar:w,caption:b,stickyHeader:h=false,className:x}){let k=useId(),y=r==="dense"?"var(--ow-row-h-dense)":"var(--ow-row-h)",P=!i&&!p&&t.length>0,N=!i&&!p&&t.length===0;return jsxs("div",{"data-slot":"data-table","data-ow-density":r,className:g("w-full overflow-hidden bg-[var(--ow-surface)]","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-card)]",x),children:[w,jsx("div",{className:"w-full overflow-x-auto",children:jsxs("table",{className:"w-full border-collapse text-ow-fs-ui text-[color:var(--ow-text)]","aria-describedby":b?k:void 0,children:[b&&jsx("caption",{id:k,className:"sr-only",children:b}),jsx("thead",{"data-ow-part":"head",className:g("bg-[var(--ow-surface-2)]",h&&"sticky top-0 z-[var(--ow-z-sticky)]"),children:jsx("tr",{children:e.map(S=>{let R=n?.key===S.key?n.direction:void 0,M=of(S);return jsx("th",{scope:"col","data-ow-part":"header-cell","aria-sort":S.sortable?R==="asc"?"ascending":R==="desc"?"descending":"none":void 0,style:{width:S.width,height:y},className:g(fc,"border-b border-[color:var(--ow-border)] font-medium","text-[color:var(--ow-text-2)] whitespace-nowrap",M==="end"?"text-right":"text-left"),children:S.sortable?jsxs("button",{type:"button","data-ow-part":"sort-button","data-ow-state":R??"none",disabled:!a,"aria-label":typeof S.header=="string"?void 0:S.headerLabel,onClick:()=>a?.(Gx(n,S.key)),className:g("inline-flex items-center gap-1.5 -mx-1 px-1 py-0.5 max-w-full","bg-transparent border-none font-medium text-inherit cursor-pointer","[border-radius:var(--ow-radius-2xs)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","focus-visible:outline-none focus-visible:[box-shadow:var(--ow-focus-shadow)]","disabled:cursor-not-allowed disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent",R&&"text-[color:var(--ow-text)]",M==="end"&&"flex-row-reverse"),children:[jsx("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:S.header}),jsx(jx,{direction:R})]}):S.header},S.key)})})}),P&&jsx("tbody",{"data-ow-part":"body",children:t.map((S,R)=>{let M=o(S,R),T=v!==void 0&&v===M;return jsx("tr",{"data-ow-part":"row","data-ow-role":T?"selected":void 0,tabIndex:u?0:void 0,"aria-selected":v!==void 0?T:void 0,onClick:u?()=>u(S,R):void 0,onKeyDown:u?_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),u(S,R));}:void 0,className:g("transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","border-b border-[color:var(--ow-border)] last:border-b-0","hover:bg-[var(--ow-hover)]",T&&"bg-[var(--ow-selected-bg)]",u&&"cursor-pointer active:bg-[var(--ow-press)] focus-visible:outline-none focus-visible:[box-shadow:var(--ow-focus-shadow)]"),children:e.map(_=>{let D=of(_);return jsx("td",{"data-ow-part":"cell",style:{height:y},className:g(fc,D==="end"?"text-right":"text-left",_.numeric&&"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]"),children:_.render?_.render(S,R):String(S[_.key]??"")},_.key)})},M)})}),i&&jsx("tbody",{"data-ow-part":"loading","aria-busy":"true",children:Array.from({length:d},(S,R)=>jsx("tr",{className:"border-b border-[color:var(--ow-border)] last:border-b-0",children:e.map(M=>jsx("td",{style:{height:y},className:fc,children:jsx(re,{variant:"line",height:12,width:M.numeric?"48%":"72%"})},M.key))},`skeleton-${R}`))})]})}),N&&jsx(F,{message:s,action:l?jsx(f,{variant:"secondary",size:"md",onClick:c,children:l}):void 0,className:"border-t border-[color:var(--ow-border)]"}),p&&jsxs("div",{"data-ow-part":"error",role:"alert",className:"flex flex-col items-center gap-1.5 border-t border-[color:var(--ow-border)] px-4 py-8 text-center",children:[jsx("p",{className:"m-0 text-ow-fs-ui text-[color:var(--ow-text)]",children:p}),m&&jsx("p",{className:"m-0 max-w-full overflow-hidden text-ow-fs-mark-md leading-snug text-[color:var(--ow-text-3)] font-[family-name:var(--ow-font-mono)] [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2]",children:m})]})]})}function rf({children:e,actions:t,className:o}){return jsxs("div",{"data-slot":"data-table-toolbar",className:g("flex items-center gap-2 flex-wrap px-3 py-2","bg-[var(--ow-surface)] border-b border-[color:var(--ow-border)]",o),children:[jsx("div",{className:"flex items-center gap-2 flex-wrap min-w-0 flex-1",children:e}),t&&jsx("div",{className:"flex items-center gap-2 shrink-0",children:t})]})}var Zx=["font-medium leading-none m-0","text-[length:var(--ow-fs-eyebrow-cjk,12px)]","tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]","text-[color:var(--ow-eyebrow)]"].join(" ");function af({title:e,items:t,onCopyLink:o,onRevoke:r}){return t.length===0?null:jsxs("section",{"data-ow-part":"group",className:"flex flex-col gap-0 min-w-0",children:[jsx("h3",{"data-ow-part":"group-title",className:g(Zx,"pb-1"),children:e}),t.map(n=>jsxs("div",{"data-ow-part":"row",className:"flex items-center gap-3 min-w-0 px-0 py-3 border-[color:var(--ow-border)] [[data-ow-part=row]+&]:border-t",children:[jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{className:"truncate text-ow-fs-ui font-medium leading-[1.3] text-[color:var(--ow-text)]",children:n.name}),jsxs("span",{className:"truncate text-[length:var(--ow-fs-caption,12px)] leading-[1.4] text-[color:var(--ow-text-2)] [font-family:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",children:[n.url," \xB7 ",n.access]})]}),jsx(f,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>o(n),children:"\u590D\u5236\u94FE\u63A5"}),jsx(f,{variant:"secondary",size:"sm",className:"shrink-0 text-[color:var(--ow-danger)] hover:text-[color:var(--ow-danger)]",onClick:()=>r(n),children:"\u505C\u6B62\u5206\u4EAB"})]},n.id))]})}function yT({sites:e,shares:t,onCopyLink:o,onRevoke:r,emptyMessage:n="\u8FD8\u6CA1\u6709\u53D1\u5E03\u51FA\u53BB\u7684\u7AD9\u70B9\u6216\u5206\u4EAB\u51FA\u53BB\u7684\u4F1A\u8BDD\u3002",className:a}){return e.length===0&&t.length===0?jsx(F,{message:n}):jsxs("div",{"data-slot":"data-management",className:g("flex flex-col gap-3.5 min-w-0",a),children:[jsx(af,{title:"\u5DF2\u53D1\u5E03\u7684\u7AD9\u70B9",items:e,onCopyLink:o,onRevoke:r}),jsx(af,{title:"\u5DF2\u5206\u4EAB\u7684\u4F1A\u8BDD",items:t,onCopyLink:o,onRevoke:r})]})}function cl({items:e,disabled:t,onSelect:o,label:r="\u66F4\u591A\u64CD\u4F5C"}){let n=e.map(a=>({key:a.key,label:a.label,icon:a.icon,danger:a.danger,disabled:a.disabled}));return jsx(co,{items:n,width:160,align:"end",onSelect:o,ariaLabel:r,trigger:jsx(f,{variant:"ghost",size:"sm","aria-label":r,title:r,disabled:t,icon:jsx(Ko,{width:16,height:16,"aria-hidden":"true"})})})}function nf({title:e,description:t,onCancel:o,onConfirm:r}){return jsx(oe,{open:true,variant:"danger",title:e,icon:jsx(Le,{"aria-hidden":"true"}),onClose:o,onConfirm:r,confirmLabel:"\u5378\u8F7D",cancelLabel:"\u53D6\u6D88",children:t})}function ET({title:e,icon:t,meta:o,defaultOpen:r=true,open:n,onOpenChange:a,disabled:i=false,maxBodyHeight:d,children:s,className:l=""}){let[c,p]=useState(r),m=n??c,u=useId(),v=useCallback(()=>{if(i)return;let w=!m;n===void 0&&p(w),a?.(w);},[i,m,n,a]);return jsxs("div",{"data-slot":"detail-panel","data-ow-state":m?"open":"closed",className:g("overflow-hidden bg-ow-surface border border-[color:var(--ow-border)] shadow-none","[border-radius:var(--ow-radius-card)]",l),children:[jsxs("button",{type:"button","data-slot":"detail-panel-header","aria-expanded":m,"aria-controls":u,disabled:i,onClick:v,className:g("flex items-center gap-2 w-full h-[var(--ow-row-h)] px-3","text-left text-ow-fs-ui font-medium text-[color:var(--ow-text)] bg-transparent","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent disabled:cursor-not-allowed","ow-focus-ring"),children:[t&&jsx("span",{"data-ow-part":"icon",className:"inline-flex items-center justify-center w-4 h-4 flex-shrink-0",children:t}),jsx("span",{className:"flex-1 min-w-0 truncate",children:e}),o&&jsx("span",{className:"flex-shrink-0 text-[color:var(--ow-text-3)]",children:o}),jsx(he,{"aria-hidden":"true",width:16,height:16,className:g("flex-shrink-0 text-[color:var(--ow-text-3)]","transition-transform duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",m?"rotate-90":"rotate-0")})]}),m&&jsx("div",{id:u,"data-slot":"detail-panel-body",className:"border-t border-[color:var(--ow-border)] px-3 py-3 overflow-auto text-ow-fs-ui text-[color:var(--ow-text-2)]",style:d?{maxHeight:d}:void 0,children:s})]})}var Qx="[-webkit-app-region:drag]",Nn="[-webkit-app-region:no-drag]",Jx=cva(["flex items-center w-full flex-shrink-0 select-none","gap-[var(--ow-titlebar-gap)] px-[var(--ow-titlebar-pad-x)]","h-[var(--ow-titlebar-h)] min-h-[var(--ow-titlebar-h)]","bg-ow-bg text-[color:var(--ow-text)]","shadow-none",Qx].join(" "),{variants:{platform:{mac:"",windows:"",linux:"",web:""},transparent:{true:"bg-transparent",false:""},divided:{true:"border-b border-[color:var(--ow-border)]",false:""}},defaultVariants:{platform:"web",transparent:false,divided:false}});function vc({title:e,subtitle:t,leading:o,actions:r,chrome:n,platform:a="web",fullscreen:i=false,collapsed:d=false,onToggle:s,transparent:l=false,divided:c=false,children:p,className:m}){let u=a==="mac"&&!i,v=s!=null||o!=null;return jsxs("header",{"data-slot":"title-bar","data-ow-platform":a,"data-ow-fullscreen":i?"":void 0,className:g(Jx({platform:a,transparent:l,divided:c}),m),children:[u&&jsx("div",{"aria-hidden":"true","data-slot":"title-bar-traffic-inset",className:"w-[var(--ow-traffic-inset)] h-full flex-shrink-0"}),v&&jsxs("div",{"data-slot":"title-bar-leading",className:g("flex items-center gap-[var(--ow-titlebar-gap)] flex-shrink-0",Nn),children:[s&&jsx(bc,{collapsed:d,onToggle:s}),o]}),jsx("div",{"data-slot":"title-bar-title",className:"flex items-baseline gap-2 min-w-0 flex-1",children:p??jsxs(Fragment,{children:[e!=null&&jsx("span",{className:"truncate text-ow-fs-ui font-medium text-[color:var(--ow-text)]",children:e}),t!=null&&jsx("span",{className:"truncate text-ow-fs-ui text-[color:var(--ow-text-3)]",children:t})]})}),r&&jsx("div",{"data-slot":"title-bar-actions",className:g("flex items-center gap-[var(--ow-titlebar-gap)] flex-shrink-0",Nn),children:r}),n&&jsx("div",{"data-slot":"title-bar-chrome",className:g("flex items-center flex-shrink-0 self-stretch",Nn),children:n})]})}var df=vc;function bc({collapsed:e=false,onToggle:t,className:o}){return jsx("button",{type:"button","data-slot":"sidebar-toggle","data-ow-collapsed":e?"":void 0,"aria-label":"\u6536\u8D77\u6216\u5C55\u5F00\u4FA7\u680F","aria-expanded":!e,title:"\u6536\u8D77 / \u5C55\u5F00\u4FA7\u680F",onClick:t,className:g("inline-grid place-items-center flex-shrink-0 w-7 h-7 p-0 border-0 cursor-pointer","[border-radius:var(--ow-radius-xs)] bg-transparent text-[color:var(--ow-text-2)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] hover:text-[color:var(--ow-text)]","active:bg-[var(--ow-press)]","ow-focus-ring",Nn,o),children:jsx(Ir,{width:18,height:18,"aria-hidden":"true"})})}var e0=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M5 12H19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),t0=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("rect",{x:"5",y:"5",width:"14",height:"14",rx:"2",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"})}),o0=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"4",y:"8",width:"12",height:"12",rx:"2",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),jsx("path",{d:"M8 4.75H17.25C18.3546 4.75 19.25 5.64543 19.25 6.75V16",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),gc=cva(["inline-flex items-center justify-center flex-shrink-0","w-[var(--ow-winctl-w)] h-full p-0 border-0 bg-transparent cursor-default","text-[color:var(--ow-text-3)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",Nn].join(" "),{variants:{danger:{true:"hover:bg-[var(--ow-error-fill)] hover:text-[color:var(--ow-on-fill)] active:bg-[var(--ow-error-hover)]",false:"hover:bg-[var(--ow-hover)] hover:text-[color:var(--ow-text)] active:bg-[var(--ow-press)]"}},defaultVariants:{danger:false}});function cf({onMinimize:e,onToggleMaximize:t,onClose:o,maximized:r=false,hideMinimize:n=false,hideMaximize:a=false,className:i}){return jsxs("div",{"data-slot":"window-chrome",className:g("flex items-stretch h-[var(--ow-titlebar-h)]",Nn,i),children:[!n&&jsx("button",{type:"button","data-slot":"window-chrome-control","data-ow-action":"minimize","aria-label":"\u6700\u5C0F\u5316",className:gc(),onClick:e,children:jsx(e0,{width:16,height:16,"aria-hidden":"true"})}),!a&&jsx("button",{type:"button","data-slot":"window-chrome-control","data-ow-action":"maximize","aria-label":r?"\u8FD8\u539F\u7A97\u53E3":"\u6700\u5927\u5316","aria-pressed":r,className:gc(),onClick:t,children:r?jsx(o0,{width:16,height:16,"aria-hidden":"true"}):jsx(t0,{width:16,height:16,"aria-hidden":"true"})}),jsx("button",{type:"button","data-slot":"window-chrome-control","data-ow-action":"close","aria-label":"\u5173\u95ED",className:gc({danger:true}),onClick:o,children:jsx(Q,{width:16,height:16,"aria-hidden":"true"})})]})}function UT({title:e,subtitle:t,onBack:o,backLabel:r="\u8FD4\u56DE",leading:n,actions:a,platform:i="web",aside:d,asideWidth:s=280,footer:l,flush:c=false,children:p,className:m,bodyClassName:u}){return jsxs("section",{"data-slot":"detail-scaffold",className:g("flex flex-col h-full min-h-0 w-full bg-ow-surface shadow-none",m),children:[jsx(vc,{transparent:true,divided:true,platform:i,title:e,subtitle:t,actions:a,leading:o||n?jsxs(Fragment,{children:[o&&jsx(go,{size:"sm",label:r,onClick:o}),n]}):void 0}),jsxs("div",{"data-slot":"detail-scaffold-body",className:"flex flex-1 min-h-0",children:[jsx("div",{"data-slot":"detail-scaffold-content",className:g("flex-1 min-w-0 min-h-0 overflow-auto",c?"p-0":"p-4",u),children:p}),d&&jsx("aside",{"data-slot":"detail-scaffold-aside",className:"flex-shrink-0 min-h-0 overflow-auto border-l border-[color:var(--ow-border)] shadow-none",style:{width:s,minWidth:s},children:d})]}),l&&jsx("div",{"data-slot":"detail-scaffold-footer",className:"flex-shrink-0 flex items-center justify-end gap-2 px-4 py-3 border-t border-[color:var(--ow-border)]",children:l})]})}function JT({onFiles:e,accept:t,multiple:o=true,disabled:r=false,message:n="\u628A\u6587\u4EF6\u62D6\u5230\u8FD9\u91CC",activeMessage:a="\u677E\u624B\u653E\u5230\u8FD9\u91CC",actionLabel:i="\u9009\u62E9\u6587\u4EF6",hint:d,error:s,errorDetail:l,loading:c=false,loadingLabel:p="\u6B63\u5728\u4E0A\u4F20",children:m,className:u}){let v=useRef(null),w=useRef(0),[b,h]=useState(false),x=r||c,k=useCallback(()=>{x||v.current?.click();},[x]),y=useCallback(M=>{!M||M.length===0||e?.(Array.from(M));},[e]),P=M=>{x||(M.preventDefault(),w.current+=1,h(true));},N=M=>{x||M.preventDefault();},S=M=>{x||(M.preventDefault(),w.current=Math.max(0,w.current-1),w.current===0&&h(false));},R=M=>{x||(M.preventDefault(),w.current=0,h(false),y(M.dataTransfer?.files??null));};return jsxs("div",{"data-slot":"dropzone-root",className:g("flex w-full flex-col gap-2",u),children:[jsxs("div",{"data-slot":"dropzone","data-ow-part":"surface","data-ow-state":g(r&&"disabled",c&&"loading",b&&"dragging")||void 0,"aria-busy":c||void 0,onDragEnter:P,onDragOver:N,onDragLeave:S,onDrop:R,onClick:k,className:g("flex w-full flex-col items-center justify-center gap-2 px-4 py-6 box-border","border-2 border-dashed [border-radius:var(--ow-radius-card)]","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",r?"cursor-not-allowed border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)] text-[color:var(--ow-disabled-text)]":c?"cursor-default border-[color:var(--ow-border-strong)] text-[color:var(--ow-text-2)]":b?"cursor-copy border-[color:var(--ow-drop-border)] bg-[var(--ow-drop-bg)] text-[color:var(--ow-text)]":s?"cursor-pointer border-[color:var(--ow-error)] text-[color:var(--ow-text)]":"cursor-pointer border-[color:var(--ow-border-strong)] text-[color:var(--ow-text)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]"),children:[m??(c?jsxs("span",{className:"inline-flex items-center gap-2 text-ow-fs-ui text-[color:var(--ow-text-2)]",children:[jsx(vr,{size:"md"}),p]}):jsx(F,{className:"gap-2 px-0 py-0",markSize:32,message:b?a:n,action:i===null?void 0:jsx(f,{variant:"primary",size:"md",disabled:x,onClick:M=>{M.stopPropagation(),k();},children:i})})),d&&!c&&jsx("p",{className:"m-0 text-ow-fs-ui text-[color:var(--ow-text-3)]",children:d}),jsx("input",{ref:v,"data-ow-part":"input",type:"file",accept:t,multiple:o,disabled:x,className:"hidden",onClick:M=>M.stopPropagation(),onChange:M=>{y(M.target.files),M.target.value="";}})]}),s&&jsx(J,{variant:"error",detail:l,children:s})]})}function aM({point:e,editMode:t=false,canCut:o=false,canPaste:r=false,canCopy:n=false,canSave:a=false,onSelect:i}){let d=t?[{key:"cut",label:"\u526A\u5207",icon:jsx(Cd,{}),disabled:!o},{key:"copy",label:"\u590D\u5236",icon:jsx(Tt,{}),disabled:!n},{key:"paste",label:"\u7C98\u8D34",icon:jsx(Ar,{}),disabled:!r}]:[...n?[{key:"copy",label:"\u590D\u5236",icon:jsx(Tt,{})}]:[],...a?[{key:"save",label:"\u4E0B\u8F7D",icon:jsx(Co,{})}]:[],{key:"feedback",label:"\u53CD\u9988",icon:jsx(Aa,{})}];return jsx("div",{className:"feedback-context-menu",style:{left:e.x,top:e.y},onClick:s=>s.stopPropagation(),children:jsx(pt,{width:140,autoAdjust:true,items:d,onSelect:s=>i(s)})})}var i0=[{value:"bug",label:"BUG"},{value:"feature_request",label:"\u65B0\u9700\u6C42"},{value:"model_quality",label:"\u6A21\u578B\u6548\u679C"},{value:"other",label:"\u5176\u4ED6"}];function cM(e){let t=e.submitting||e.description.trim().length===0;return jsx(oe,{open:true,width:512,title:"\u63D0\u4EA4\u53CD\u9988",icon:jsx(Aa,{"aria-hidden":"true"}),iconTone:"info",onClose:e.onClose,onSubmit:o=>{o.preventDefault(),e.onSubmit();},actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",type:"button",onClick:e.onClose,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",type:"submit",loading:e.submitting,disabled:t,children:e.submitting?"\u63D0\u4EA4\u4E2D\u2026":"\u63D0\u4EA4"})]}),children:jsxs("div",{className:"flex flex-col gap-5",children:[jsxs("div",{"data-ow-part":"field",className:"flex flex-col gap-2",children:[jsx("span",{"data-ow-part":"field-label",className:"text-[color:var(--ow-text-2)] font-medium text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:"\u95EE\u9898\u7C7B\u578B"}),jsx(Ht,{"aria-label":"\u95EE\u9898\u7C7B\u578B",value:e.category,options:i0.map(o=>({value:o.value,label:o.label})),onChange:o=>e.onCategoryChange(o)})]}),jsxs("label",{"data-ow-part":"field",className:"flex flex-col gap-2",children:[jsx("span",{"data-ow-part":"field-label",className:"text-[color:var(--ow-text-2)] font-medium text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:"\u95EE\u9898\u63CF\u8FF0"}),jsx(te,{multiline:true,value:e.description,onChange:e.onDescriptionChange,placeholder:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\u3001\u671F\u671B\u884C\u4E3A\u6216\u9700\u6C42\u573A\u666F",rows:6,autoFocus:true})]}),jsxs("div",{"data-ow-part":"logs-option",className:"flex items-start gap-2.5",children:[jsx(Ro,{checked:e.uploadLogs,onChange:e.onUploadLogsChange,"aria-label":"\u4E0A\u4F20\u8BCA\u65AD\u65E5\u5FD7"}),jsx("span",{className:"flex-1 text-[color:var(--ow-text-2)] font-normal text-ow-fs-ui leading-[1.5] font-[family-name:var(--ow-font-sans)]",children:"\u4E0A\u4F20\u8BCA\u65AD\u65E5\u5FD7\uFF0C\u5E2E\u52A9\u6211\u4EEC\u66F4\u5FEB\u5B9A\u4F4D\u95EE\u9898\u3002\u65E5\u5FD7\u4EC5\u5305\u542B\u8BBE\u5907\u4E0E\u8FD0\u884C\u4FE1\u606F\uFF0C\u4E0D\u542B\u5BF9\u8BDD\u5185\u5BB9\u3002"})]})]})})}var fM=ic;function l0({item:e,onOpen:t,onOpenWithMenu:o,onRequestOpenWithOptions:r,onOpenWith:n,className:a="",openWithLabel:i="\u6253\u5F00\u65B9\u5F0F"}){let s=!!t&&!e.typeLabel?"":e.typeLabel;return jsx(ia,{variant:"card",name:e.name,path:e.path,badge:e.badge,meta:s,className:a,actionsLabel:i,onOpen:t?()=>t(e):void 0,onNativeActionsMenu:o?()=>o(e):void 0,onRequestActions:r?()=>r(e):void 0,onAction:n?l=>n(e,l):void 0})}function gM({items:e,onOpen:t,onOpenWithMenu:o,onRequestOpenWithOptions:r,onOpenWith:n,className:a="","aria-label":i="\u6587\u4EF6\u5F15\u7528",openWithLabel:d}){return e.length===0?null:jsx(xn,{layout:"stack",className:a,"aria-label":i,children:e.map(s=>jsx(l0,{item:s,onOpen:t,onOpenWithMenu:o,onRequestOpenWithOptions:r,onOpenWith:n,openWithLabel:d},s.id??s.path))})}var c0={default:"var(--ow-progress-fill)",primary:"var(--ow-progress-fill)",success:"var(--ow-success-on-tint)",warning:"var(--ow-warning-on-tint)",error:"var(--ow-error-on-tint)",info:"var(--ow-info-on-tint)",violet:"var(--ow-info-on-tint)"},p0=cva("font-medium leading-none border inline-flex items-center gap-1 whitespace-nowrap transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",{variants:{variant:{default:"bg-ow-surface text-ow-text-2 border-ow-border-strong",primary:"bg-ow-surface-2 text-ow-text-2 border-ow-border",success:"bg-[var(--ow-success-tint)] text-[color:var(--ow-success-on-tint)] border-[color:var(--ow-success-tint-border)]",warning:"bg-[var(--ow-warning-tint)] text-[color:var(--ow-warning-on-tint)] border-[color:var(--ow-warning-tint-border)]",error:"bg-[var(--ow-error-tint)] text-[color:var(--ow-error-on-tint)] border-[color:var(--ow-error-tint-border)]",info:"bg-[var(--ow-info-tint)] text-[color:var(--ow-info-on-tint)] border-[color:var(--ow-info-tint-border)]",violet:"bg-[var(--ow-info-tint)] text-[color:var(--ow-info-on-tint)] border-[color:var(--ow-info-tint-border)]"},size:{sm:"text-ow-fs-mark-sm px-1.5 py-0.5",md:"text-ow-fs-body-sm px-2 py-1"},shape:{square:"[border-radius:var(--ow-radius-tag)]",pill:"[border-radius:var(--ow-radius-chip)]"},interactive:{true:"cursor-pointer",false:""},disabled:{true:"cursor-not-allowed text-[color:var(--ow-disabled-text)] border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)]",false:""}},compoundVariants:[{interactive:true,disabled:false,variant:["default","primary"],className:"hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]"},{interactive:true,disabled:false,variant:"success",className:"hover:bg-[var(--ow-success-tint-hover)] active:bg-[var(--ow-success-tint-hover)]"},{interactive:true,disabled:false,variant:"warning",className:"hover:bg-[var(--ow-warning-tint-hover)] active:bg-[var(--ow-warning-tint-hover)]"},{interactive:true,disabled:false,variant:"error",className:"hover:bg-[var(--ow-error-tint-hover)] active:bg-[var(--ow-error-tint-hover)]"},{interactive:true,disabled:false,variant:["info","violet"],className:"hover:bg-[var(--ow-info-tint-hover)] active:bg-[var(--ow-info-tint-hover)]"}],defaultVariants:{variant:"default",size:"md",shape:"square",interactive:false,disabled:false}});function Rn({variant:e="default",size:t="md",shape:o,dot:r=false,count:n,closable:a=false,closeAriaLabel:i="\u79FB\u9664",disabled:d=false,pressed:s,onClose:l,onClick:c,className:p="",children:m}){let u=!!c,v=u&&!a?"button":"span",w=o??(r||n!=null?"pill":"square"),b=jsxs(Fragment,{children:[r&&jsx("span",{"data-ow-part":"dot",className:"w-1.5 h-1.5 shrink-0 [border-radius:var(--ow-radius-pill)]",style:{background:d?"var(--ow-disabled-text)":c0[e]},"aria-hidden":"true"}),jsx("span",{"data-ow-part":"content",className:"inline-flex items-center",children:m}),n!=null&&jsx("span",{"data-ow-part":"count",className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums",children:n})]});return jsxs(v,{type:v==="button"?"button":void 0,"data-slot":"tag","data-variant":e,"data-size":t,"data-shape":w,"data-ow-part":"surface",className:g(p0({variant:e,size:t,shape:w,interactive:u,disabled:d}),v==="button"&&"ow-focus-ring",p),"aria-disabled":d||void 0,"aria-pressed":v==="button"&&s!==void 0?s:void 0,onClick:d||u&&a?void 0:c,children:[u&&a?jsx("button",{type:"button","data-ow-part":"body-action",className:"inline-flex items-center gap-[inherit] min-w-0 cursor-pointer bg-transparent border-0 p-0 m-0 [font:inherit] text-inherit [border-radius:inherit] ow-focus-ring",disabled:d,onClick:c,children:b}):b,a&&jsx("button",{type:"button","data-ow-part":"close",className:g("relative inline-flex w-3.5 h-3.5 -mr-0.5 p-0 shrink-0 items-center justify-center bg-transparent border-0 text-current","[border-radius:var(--ow-radius-key)] opacity-60 hover:opacity-100 hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","ow-focus-ring disabled:cursor-not-allowed disabled:text-[color:var(--ow-disabled-text)] disabled:pointer-events-none","after:absolute after:content-[''] after:-inset-[5px]"),disabled:d,onClick:h=>{h.stopPropagation(),l?.();},"aria-label":i,children:jsx(Q,{className:"w-2.5 h-2.5","aria-hidden":"true"})})]})}function ff({filters:e,onFilterToggle:t,search:o,sort:r,onReset:n,resetLabel:a="\u6E05\u7A7A\u7B5B\u9009",actions:i,children:d,collapsible:s=false,defaultExpanded:l=false,expanded:c,onExpandedChange:p,expandLabel:m="\u66F4\u591A\u7B5B\u9009",flush:u=false,className:v}){let[w,b]=useState(l),h=c??w,x=useId(),k=()=>{let y=!h;c===void 0&&b(y),p?.(y);};return jsxs("div",{"data-slot":"filter-bar","data-ow-expanded":s?String(h):void 0,className:g("w-full bg-[var(--ow-surface)]",!u&&"border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-card)]",v),children:[jsxs("div",{className:"flex items-center gap-2 flex-wrap px-3 py-2",children:[e&&e.length>0&&jsx("div",{"data-ow-part":"filters",className:"flex items-center gap-1.5 flex-wrap min-w-0",role:"group",children:e.map(y=>jsx(Rn,{shape:"square",size:"md",variant:"default",disabled:y.disabled,pressed:y.active??false,onClick:()=>t?.(y.key),className:y.active?"bg-[var(--ow-selected-bg)] font-medium text-[color:var(--ow-text)]":void 0,children:y.label},y.key))}),o&&jsx("div",{"data-ow-part":"search",style:{width:o.width??220},className:"min-w-0 shrink-0",children:jsx(te,{type:"search",value:o.value,onChange:o.onChange,placeholder:o.placeholder??"\u641C\u7D22",disabled:o.disabled,"aria-label":o.placeholder??"\u641C\u7D22",prefix:jsx($t,{className:"w-4 h-4","aria-hidden":"true"})})}),r&&jsx("div",{"data-ow-part":"sort",style:{width:r.width??160},className:"min-w-0 shrink-0","aria-label":r.label??"\u6392\u5E8F",children:jsx(br,{value:r.value,options:r.options,onChange:r.onChange,disabled:r.disabled,placeholder:r.label??"\u6392\u5E8F"})}),n&&jsx(f,{variant:"ghost",size:"sm",onClick:n,children:a}),jsx("div",{className:"flex-1"}),s&&d&&jsxs(f,{variant:"ghost",size:"sm",onClick:k,"aria-expanded":h,"aria-controls":x,"data-ow-part":"expand",children:[m,jsx(ae,{className:g("w-4 h-4 transition-transform duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",h&&"rotate-180"),"aria-hidden":"true"})]}),i&&jsx("div",{className:"flex items-center gap-2 shrink-0",children:i})]}),d&&(!s||h)&&jsx("div",{id:x,"data-ow-part":"panel",className:"flex items-center gap-2 flex-wrap border-t border-[color:var(--ow-border)] px-3 py-2",children:d})]})}function g0({label:e,hint:t,description:o,htmlFor:r,asGroup:n=false,required:a=false,error:i,errorDetail:d,disabled:s=false,children:l,className:c}){let p=useId(),m=useId(),u=!!i;return jsxs(r||n?"div":"label",{"data-slot":"form-field","data-ow-part":"surface","data-ow-state":g(s&&"disabled",u&&"error")||void 0,role:n?"group":void 0,"aria-labelledby":n?m:void 0,className:g("flex flex-col gap-2 w-full min-w-0",c),children:[jsxs("span",{"data-ow-part":"label",id:n?m:void 0,className:g("flex items-center gap-1.5 text-ow-fs-ui font-medium leading-[1.3]",s?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text)]"),children:[r?jsx("label",{htmlFor:r,children:e}):e,a&&jsx("span",{"aria-hidden":"true",className:"text-[color:var(--ow-error)]",children:"*"}),t!=null&&jsx("span",{"data-ow-part":"hint",className:"font-normal text-[color:var(--ow-text-3)]",children:t})]}),o!=null&&jsx("span",{"data-ow-part":"description",className:g("text-ow-fs-body-sm font-normal leading-[1.45]",s?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-2)]"),children:o}),jsx("span",{"data-ow-part":"control",className:"flex flex-col gap-1 w-full min-w-0",children:l}),u&&jsxs("span",{"data-ow-part":"error",id:p,role:"alert",className:"flex flex-col gap-0.5",children:[jsxs("span",{className:"flex items-start gap-1.5 text-ow-fs-ui leading-[1.4] text-[color:var(--ow-error)]",children:[jsx(jo,{className:"w-3.5 h-3.5 mt-0.5 shrink-0","aria-hidden":"true"}),jsx("span",{className:"min-w-0",children:i})]}),d&&jsx("span",{className:"font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-fs-body-sm leading-[1.5] text-[color:var(--ow-text-3)] line-clamp-2 break-all",children:d})]})]})}var vf="[&_input]:font-[family-name:var(--ow-font-mono)] [&_input]:tabular-nums";function BM({values:e,onChange:t,keyPlaceholder:o="KEY",valuePlaceholder:r="value",maskedPlaceholder:n="\u2022\u2022\u2022\u2022\u2022\u2022\uFF08\u8F93\u5165\u65B0\u503C\u53EF\u66FF\u6362\uFF09",addLabel:a="\u6DFB\u52A0\u4E00\u9879",removeAriaLabel:i="\u79FB\u9664\u8FD9\u4E00\u9879",disabled:d=false,...s}){let l=e.length?e:[{key:"",value:""}];return jsx(g0,{...s,asGroup:true,disabled:d,children:jsxs("div",{"data-ow-part":"rows",className:"flex flex-col gap-2 w-full min-w-0",children:[l.map((c,p)=>jsxs("div",{"data-ow-part":"row",className:"flex items-center gap-2 w-full min-w-0",children:[jsx(te,{className:g("basis-[38%] shrink-0",vf),value:c.key,disabled:d,placeholder:o,"aria-label":`${o} ${p+1}`,onChange:m=>t(l.map((u,v)=>v===p?{key:m,value:u.masked?"":u.value}:u))}),jsx("span",{"aria-hidden":"true",className:"font-[family-name:var(--ow-font-mono)] text-[color:var(--ow-text-3)]",children:"="}),jsx(te,{className:g("flex-1 min-w-0",vf),value:c.masked?"":c.value,disabled:d,placeholder:c.masked?n:r,"aria-label":`${r} ${p+1}`,onChange:m=>t(l.map((u,v)=>v===p?{...u,value:m,masked:false}:u))}),jsx(f,{variant:"ghost",size:"sm",icon:jsx(Q,{}),disabled:d,"aria-label":i,onClick:()=>t(l.filter((m,u)=>u!==p))})]},p)),jsx(f,{variant:"secondary",size:"sm",disabled:d,className:"self-start",icon:jsx(He,{}),onClick:()=>t([...l,{key:"",value:""}]),children:a})]})})}function $M({value:e,options:t,onChange:o,placeholder:r="\u8BF7\u9009\u62E9"}){return jsx(br,{value:e,options:t,onChange:o,placeholder:r,size:"lg"})}var b0=[[48,48,30],[48,48,8.2],[60.2,20.6,6.7],[41.76,18.66,5.5],[25.71,27.93,4.3],[18.16,44.86,3.3],[75.4,35.8,10.4]];function UM({className:e,...t}){return jsx("svg",{"data-slot":"home-backdrop",viewBox:"0 0 96 96","aria-hidden":"true",focusable:"false",className:g("absolute top-[-24%] right-[-20%] w-[74%] aspect-square pointer-events-none opacity-50",e),...t,children:jsx("g",{fill:"none",stroke:"var(--ow-border)",strokeWidth:"0.2",children:b0.map(([o,r,n])=>jsx("circle",{cx:o,cy:r,r:n},`${o}-${r}-${n}`))})})}function ZM({src:e,placeholder:t,caption:o,className:r=""}){return jsx(ia,{variant:"media",name:o||t||"image",thumbnail:e,placeholder:t??"image",caption:o,className:r})}var Mn="hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]";async function h0(e){let t=e.name||e.alt||"image";try{let r=await(await fetch(e.src)).blob(),n=URL.createObjectURL(r),a=document.createElement("a");a.href=n,a.download=t,a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(n);}catch{window.open(e.src,"_blank");}}function o_({open:e,images:t,index:o,onIndexChange:r,onClose:n,onDownload:a,onReveal:i,className:d=""}){let[s,l]=useState(o??0),[c,p]=useState(1),[m,u]=useState(0),[v,w]=useState({x:0,y:0}),[b,h]=useState(false),x=useRef(null),k=useRef(null),y=useRef(null),P=Math.min(Math.max(o??s,0),Math.max(t.length-1,0)),N=t[P],S=c>1,R=()=>{p(1),u(0),w({x:0,y:0});},M=E=>{if(!t.length)return;let V=(E+t.length)%t.length;o===void 0&&l(V),r?.(V),R();},T=E=>{!S||E.button!==0||(E.preventDefault(),x.current={x:E.clientX,y:E.clientY,offsetX:v.x,offsetY:v.y},h(true),E.currentTarget.setPointerCapture(E.pointerId));},_=E=>{let V=x.current;V&&w({x:V.offsetX+(E.clientX-V.x),y:V.offsetY+(E.clientY-V.y)});},D=E=>{x.current&&(x.current=null,h(false),E.currentTarget.hasPointerCapture(E.pointerId)&&E.currentTarget.releasePointerCapture(E.pointerId));},I=()=>p(E=>{let V=Math.max(.5,E-.2);return V<=1&&w({x:0,y:0}),V}),H=()=>p(E=>Math.min(3,E+.2)),$=()=>{N&&(a?a(N,P):h0(N));};return useEffect(()=>{if(!e)return;let E=pe=>{if(pe.key==="Escape"){n();return}(pe.key==="ArrowUp"||pe.key==="ArrowLeft")&&M(P-1),(pe.key==="ArrowDown"||pe.key==="ArrowRight")&&M(P+1),pe.key==="Tab"&&k.current&&al(pe,k.current);};document.addEventListener("keydown",E,true);let V=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",E,true),document.body.style.overflow=V;}},[e,P,t.length,n]),useEffect(()=>{if(!e)return;y.current=document.activeElement??null;let E=k.current;return E&&!E.contains(document.activeElement)&&(E.querySelector(Fi)??E).focus(),()=>{y.current?.focus?.();}},[e]),!e||!N?null:jsxs("div",{"data-theme":"dark","data-slot":"image-preview","data-ow-part":"overlay",ref:k,tabIndex:-1,className:g("fixed inset-0 flex items-center justify-center bg-[var(--ow-scrim)] outline-none",d),style:{zIndex:"var(--ow-z-modal)"},role:"dialog","aria-modal":"true","aria-label":"\u67E5\u770B\u56FE\u7247\u9644\u4EF6",onMouseDown:E=>E.target===E.currentTarget&&n(),children:[jsx("div",{"data-ow-part":"stage","data-ow-surface":"mat",className:"w-[min(62vw,760px)] h-[min(72vh,760px)] flex items-center justify-center overflow-hidden bg-[var(--ow-surface-2)] border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-modal)] [&_img]:max-w-full [&_img]:max-h-full [&_img]:object-contain [&_img]:transition-transform [&_img]:[transition-duration:var(--ow-dur-3)] [&_img]:[transition-timing-function:var(--ow-ease-beacon)]",style:{cursor:S?b?"grabbing":"grab":"default"},onPointerDown:T,onPointerMove:_,onPointerUp:D,onPointerCancel:D,children:jsx("img",{src:N.src,alt:N.alt??N.name??"",draggable:false,style:{transform:`translate(${v.x}px, ${v.y}px) scale(${c}) rotate(${m}deg)`,transition:b?"none":void 0}})}),t.length>1&&jsxs("aside",{"data-ow-part":"rail",className:"absolute right-7 top-1/2 -translate-y-1/2 flex flex-col items-center gap-2","aria-label":"\u56FE\u7247\u5217\u8868",children:[jsx(f,{type:"button",variant:"ghost",size:"sm",icon:jsx(yi,{}),onClick:()=>M(P-1),"aria-label":"\u4E0A\u4E00\u5F20"}),jsx("div",{className:"flex flex-col gap-2 max-h-[60vh] overflow-y-auto [&_button]:relative [&_button]:w-12 [&_button]:h-12 [&_button]:p-0 [&_button]:bg-transparent [&_button]:cursor-pointer [&_button]:overflow-hidden [&_button]:border-2 [&_button]:border-[color:var(--ow-border)] [&_button]:[border-radius:var(--ow-radius-card)] [&_button:hover]:border-[color:var(--ow-border-strong)] [&_button.is-active]:border-[color:var(--ow-control-on)] [&_img]:w-full [&_img]:h-full [&_img]:object-cover",children:t.map((E,V)=>jsxs(f,{type:"button",variant:"unstyled",className:V===P?"is-active":"","aria-current":V===P?"true":void 0,onClick:()=>M(V),"aria-label":`\u67E5\u770B\u7B2C ${V+1} \u5F20\u56FE\u7247`,children:[jsx("img",{src:E.src,alt:""}),jsx("span",{"data-ow-part":"thumb-index","aria-hidden":"true",className:g("absolute left-0 bottom-0 px-1 font-[family-name:var(--ow-font-mono)] text-ow-fs-eyebrow leading-none [font-variant-numeric:tabular-nums] bg-[var(--ow-scrim)] text-[color:var(--ow-text)]",V===P?"font-bold":"font-normal"),children:V+1})]},`${E.src}-${V}`))}),jsx(f,{type:"button",variant:"ghost",size:"sm",icon:jsx(ae,{}),onClick:()=>M(P+1),"aria-label":"\u4E0B\u4E00\u5F20"})]}),jsxs("div",{"data-ow-part":"toolbar",className:"absolute bottom-8 left-1/2 -translate-x-1/2 flex gap-0.5 p-1.5 [border-radius:var(--ow-radius-menu)] bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)] shadow-[var(--ow-shadow-pop)]",children:[jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(js,{}),onClick:I,"aria-label":"\u7F29\u5C0F"}),jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(Ks,{}),onClick:H,"aria-label":"\u653E\u5927"}),jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(yu,{}),onClick:()=>{u(E=>E+90),w({x:0,y:0});},"aria-label":"\u65CB\u8F6C"}),i&&jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(qe,{}),onClick:()=>i(N,P),"aria-label":"\u5B9A\u4F4D\u5230\u672C\u5730\u76EE\u5F55"}),jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(Co,{}),onClick:$,"aria-label":"\u4E0B\u8F7D"}),jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(Q,{}),onClick:n,"aria-label":"\u5173\u95ED"})]}),jsxs("div",{"data-ow-part":"counter",className:"absolute bottom-9 right-7 font-[family-name:var(--ow-font-mono)] text-ow-fs-ui font-medium leading-none [font-variant-numeric:tabular-nums] text-[color:var(--ow-text)]",children:[P+1," / ",t.length]})]})}var x0=/((?:[A-Za-z]:[\\/]|\/)[^\n\r]*?\.[A-Za-z0-9]{1,12})([),\]!?;:,。!?;:、]*)?(?=$|\s|[),\]!?;:,。!?;:、]|\.(?![A-Za-z0-9]))/g,y0="),].!?;:\uFF0C\u3002\uFF01\uFF1F\uFF1B\uFF1A\u3001";function wf(e){let t=[],o=0,r;for(;(r=x0.exec(e))!==null;){let n=r[1]??"";if(!n||!N0(n)||!k0(e,r.index))continue;r.index>o&&t.push({kind:"text",text:e.slice(o,r.index)});let a=r[2]||C0(e,r.index+n.length);t.push({kind:"path",path:n,trailing:a}),o=r.index+n.length+a.length;}return o<e.length&&t.push({kind:"text",text:e.slice(o)}),t.length>0?t:[{kind:"text",text:e}]}function k0(e,t){if(t===0)return true;let o=e[t-1]??"";return /\s/.test(o)||`([{<"'`.includes(o)}function C0(e,t){let o=t;for(;o<e.length&&y0.includes(e[o]??"");)o+=1;return e.slice(t,o)}function N0(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),o=t>=0?e.slice(t+1):e;return /^[^/\\\s].*\.[A-Za-z0-9]{1,12}$/.test(o.trim())}function ts(e){let t=e.trim();if(/^(\/|\.{1,2}\/|#|\?)/.test(t))return t;let o=t.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);if(!o)return t;let r=(o[1]??"").toLowerCase();return r==="http"||r==="https"||r==="mailto"?t:null}function Nc(e,t={}){let o=L0(R0(T0(e.trim())));return o?M0(o)?o:/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(o)?null:_0(o)?o:t.allowRelative?S0(o):null:null}function S0(e){return e.startsWith("//")||e.startsWith("#")||e.startsWith("?")||e.includes("?")||e.includes("#")?null:P0(e)?e:null}function P0(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),o=t>=0?e.slice(t+1):e;return /^[^\s].*\.[A-Za-z0-9]{1,12}$/.test(o.trim())}function R0(e){if(!/^file:\/\//i.test(e))return e;try{let t=new URL(e);return t.protocol!=="file:"||t.hostname?e:decodeURIComponent(t.pathname)}catch{return e}}function T0(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1).trim():e}function M0(e){return /^[A-Za-z]:[\\/]/.test(e)||e.startsWith("\\\\")}function _0(e){return e.startsWith("/")&&!e.startsWith("//")}function L0(e){return e.match(/^(.*\.[A-Za-z0-9]{1,12}):\d+$/)?.[1]??e}function D0(e){let t=e;for(let r=0;r<4;r+=1){let n=t.replace(/\*\*([^*]+)\*\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\*([^*]+)\*/g,"$1").replace(/_([^_]+)_/g,"$1");if(n===t)break;t=n;}let o=t.trim();return /^[*_`\s]*$/.test(o)?"":o}function pl(e,t){return D0(e)||E0(t)}function E0(e){return e.replace(/\\/g,"/").split("/").filter(Boolean).at(-1)||e}var hf=/(^|[^!])\[([^\]]+)\]\(([^)]+)\)/g;function xf(e,t,o,r={}){hf.lastIndex=0;let n;for(;(n=hf.exec(e))!==null;){let a=Nc(n[3]??"",r);if(a){if(t.has(a))continue;t.add(a),o.push({name:pl(n[2]??"",a),path:a});continue}let i=ts(n[3]??"");!i||!/^https?:\/\//i.test(i)||t.has(i)||(t.add(i),o.push({name:pl(n[2]??"",i),path:i,badge:"URL",typeLabel:"\u7F51\u7AD9"}));}}var ul=/^\s{0,3}>\s?/,B0=new Set(["bash","sh","zsh","shell","shellscript"]);function O0(e){return !!(e&&B0.has(e.toLowerCase()))}function Pf(e){let{onLocalFileOpen:t,onLocalPathClick:o}=e;if(t)return (r,n)=>t({name:pl(n??"",r),path:r});if(o)return r=>o(r)}function V0(e){return {allowRelative:!!e.localPathBaseDir}}function F0(e){let t=e.replace(/\r\n/g,`
|
|
6
|
+
`),oldLineIndices:r,newLineIndices:n}}var qm=memo(({lines:e,oldTokens:t,newTokens:o,oldLineIndices:r,newLineIndices:n,showLineNumbers:a})=>jsx("pre",{className:"m-0 font-mono text-ow-fs-code tabular-nums leading-[1.7] whitespace-pre-wrap break-words",children:e.map((i,d)=>{if(i.type==="hunk")return jsx("div",{"data-ow-part":"hunk",className:"flex min-h-[1.7em] pr-4 bg-ow-diff-hunk-bg text-ow-diff-hunk-fg italic py-0.5 px-4",children:i.content},`hunk-${d}`);let s=i.type==="add"?"+":i.type==="del"?"-":" ",l;if(i.type==="del"){let c=r[d];c!=null&&c>=0&&(l=t[c]);}else {let c=n[d];c!=null&&c>=0&&(l=o[c]);}return jsxs("div",{"data-ow-part":"line","data-line-type":i.type,className:g("flex min-h-[1.7em] pr-4",i.type==="add"&&"bg-ow-diff-add-bg",i.type==="del"&&"bg-ow-diff-del-bg"),children:[jsxs("span",{"data-ow-part":"gutter",className:"inline-flex gap-0 shrink-0 select-none text-ow-text-3",children:[a&&jsxs(Fragment,{children:[jsx("span",{className:"inline-block w-10 text-right pr-1",children:i.oldNum??""}),jsx("span",{className:"inline-block w-10 text-right pr-1",children:i.newNum??""})]}),jsx("span",{"data-ow-part":"sign",className:g("inline-block w-6 text-center font-medium",i.type==="add"&&"text-ow-diff-add-fg",i.type==="del"&&"text-ow-diff-del-fg"),children:s})]}),jsx("span",{"data-ow-part":"content",className:"flex-1 min-w-0",children:l&&l.length>0?l.map((c,p)=>jsx(Ix,{token:c},p)):i.content||`
|
|
7
|
+
`})]},`line-${d}`)})}));qm.displayName="DiffBody";function Ym({children:e,language:t="text",filename:o,showLineNumbers:r=true,className:n="",...a}){let i=useMemo(()=>Mx(e),[e]),{oldCode:d,newCode:s,oldLineIndices:l,newLineIndices:c}=useMemo(()=>Ax(i),[i]),[p,m]=useState(()=>ua(d)),[u,b]=useState(()=>ua(s)),w=useRef({oldCode:d,newCode:s,language:t});return useEffect(()=>{m(ua(d)),b(ua(s)),w.current={oldCode:d,newCode:s,language:t};let v=false,h=ma(d,t);h?m(h):ma(d,t,k=>{!v&&w.current.oldCode===d&&m(k);});let x=ma(s,t);return x?b(x):ma(s,t,k=>{!v&&w.current.newCode===s&&b(k);}),()=>{v=true;}},[d,s,t]),jsxs("div",{...a,"data-slot":"code-diff","data-ow-part":"surface",className:g("bg-[color:var(--ow-code-bg)] border border-ow-border [border-radius:var(--ow-radius-sm)] my-2 overflow-hidden",n),children:[o&&jsx("div",{"data-ow-part":"header",className:"flex items-center gap-2 px-4 py-2.5 font-mono tabular-nums text-ow-fs-mark-md leading-none text-ow-text-2 border-b border-ow-border",children:jsx("span",{children:o})}),jsx("div",{"data-ow-part":"body",className:"overflow-x-auto",children:jsx(qm,{lines:i,oldTokens:p.tokens,newTokens:u.tokens,oldLineIndices:l,newLineIndices:c,showLineNumbers:r})})]})}var Xm="flex flex-col h-full min-w-0 overflow-hidden bg-[color:var(--ow-code-bg)] border border-ow-border [border-radius:var(--ow-radius-sm)]",Ox="flex-1 min-h-0 flex flex-col overflow-auto",Vx="flex-1 min-h-0 overflow-auto";function Ki({language:e="text",code:t,diff:o,showLineNumbers:r=true,className:n="",children:a}){return a?jsx("div",{"data-slot":"code-preview","data-ow-part":"surface",className:g(Xm,n),children:a}):jsxs("div",{"data-slot":"code-preview","data-ow-part":"surface",className:g(Xm,n),children:[t&&jsx("div",{"data-ow-part":"code-area",className:Ox,children:jsx(il,{language:e,showLineNumbers:r,"data-ow-part":"code",children:t})}),o&&jsx("div",{"data-ow-part":"diff-area",className:Vx,children:jsx(Ym,{language:e,showLineNumbers:r,children:o})})]})}var ji="bg-[var(--ow-hover-pop)] border-[color:var(--ow-border-strong)]",zx=["font-medium leading-none","text-[length:var(--ow-fs-eyebrow-cjk,12px)]","tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]","text-[color:var(--ow-eyebrow)]"].join(" ");function Hx(e,t){let o=t.trim().toLowerCase();return o?[e.label,e.description??"",...e.keywords??[]].join(" ").toLowerCase().includes(o):true}function VR({open:e,onClose:t,groups:o,onSelect:r,query:n,onQueryChange:a,filter:i=true,placeholder:d="\u641C\u7D22\u547D\u4EE4\u2026",emptyMessage:s="\u6CA1\u6709\u5339\u914D\u7684\u547D\u4EE4\u3002\u6362\u4E2A\u8BCD\u8BD5\u8BD5\u3002",footer:l,width:c=560,className:p}){let[m,u]=useState(""),b=n??m,[w,v]=useState(0),h=useRef(null),x=useMemo(()=>i?o.map(T=>({...T,items:T.items.filter(_=>Hx(_,b))})).filter(T=>T.items.length>0):o,[o,b,i]),k=useMemo(()=>x.flatMap(T=>T.items),[x]),y=k.filter(T=>!T.disabled).length;useEffect(()=>{let T=k.findIndex(_=>!_.disabled);v(T<0?-1:T);},[k]),useEffect(()=>{e||n===void 0&&u("");},[e,n]),useEffect(()=>{w<0||h.current?.querySelector(`[data-index="${w}"]`)?.scrollIntoView({block:"nearest"});},[w]);let P=T=>{if(y===0)return;let _=w;for(let L=0;L<k.length&&(_=(_+T+k.length)%k.length,!!k[_]?.disabled);L++);v(_);},N=T=>{!T||T.disabled||r?.(T);},S=T=>{T.key==="ArrowDown"?(T.preventDefault(),P(1)):T.key==="ArrowUp"?(T.preventDefault(),P(-1)):T.key==="Enter"?(T.preventDefault(),N(k[w])):T.key==="Escape"&&(T.preventDefault(),t?.());},R=T=>{n===void 0&&u(T),a?.(T);},M=-1;return jsx(oe,{open:e,onClose:t,closable:false,padded:false,width:c,className:g("bg-[var(--ow-popover-bg)]",p),children:jsxs("div",{"data-slot":"command-palette","data-ow-part":"panel",onKeyDown:S,className:"flex min-h-0 flex-col",children:[jsxs("div",{"data-ow-part":"search",className:"flex items-center gap-2 border-b border-[color:var(--ow-border)] px-3 h-12 shrink-0",children:[jsx($t,{"aria-hidden":"true",style:{width:16,height:16},className:"shrink-0 text-[color:var(--ow-text-3)]"}),jsx(te,{standalone:false,value:b,onChange:R,placeholder:d,"aria-label":"\u641C\u7D22\u547D\u4EE4","aria-autocomplete":"list","aria-expanded":true,"aria-controls":"ow-command-palette-list","aria-activedescendant":w>=0?`ow-command-palette-opt-${w}`:void 0,role:"combobox",autoFocus:true,className:"h-8"})]}),jsx("div",{ref:h,id:"ow-command-palette-list",role:"listbox","aria-label":"\u547D\u4EE4","data-ow-part":"list",className:"min-h-0 max-h-[min(60vh,420px)] overflow-y-auto p-2",children:k.length===0?jsx(H,{message:s,variant:"text"}):x.map(T=>jsxs("div",{"data-ow-part":"group",className:"mb-1 last:mb-0",children:[T.title&&jsx("div",{"data-ow-part":"group-title",className:g(zx,"px-2 pb-1.5 pt-2"),children:T.title}),T.items.map(_=>{M+=1;let L=M,I=L===w;return jsxs("div",{id:`ow-command-palette-opt-${L}`,"data-ow-part":"row","data-index":L,"data-ow-state":g(I&&"active",_.disabled&&"disabled")||void 0,role:"option","aria-selected":I,"aria-disabled":_.disabled||void 0,onMouseMove:()=>!_.disabled&&v(L),onClick:()=>N(_),className:g("flex w-full items-center gap-2.5 h-10 px-2 box-border text-left","[border-radius:var(--ow-radius-sm)] select-none","text-[length:var(--ow-fs-ui)]","transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",_.disabled?"cursor-not-allowed text-[color:var(--ow-disabled-text)]":g("cursor-pointer text-[color:var(--ow-text)]","hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]",I&&"bg-[var(--ow-hover-pop)]")),children:[_.icon&&jsx("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[color:var(--ow-text-2)] [&>svg]:h-4 [&>svg]:w-4",children:_.icon}),jsx("span",{className:"min-w-0 flex-1 truncate",children:_.label}),_.description&&jsx("span",{className:"min-w-0 max-w-[45%] shrink-0 truncate text-[color:var(--ow-text-3)]",children:_.description}),_.keys&&_.keys.length>0&&jsx("span",{className:"inline-flex shrink-0 items-center gap-[3px]",children:_.keys.map(($,F)=>jsx(Vr,{className:ji,children:$},`${_.id}-${$}-${F}`))})]},_.id)})]},T.id))}),jsxs("div",{"data-ow-part":"footer",className:"flex shrink-0 items-center gap-4 border-t border-[color:var(--ow-border)] px-3 h-8 text-[length:var(--ow-fs-ui)] text-[color:var(--ow-text-3)]",children:[jsxs("span",{className:"inline-flex items-center gap-1.5",children:[jsx(Vr,{className:ji,children:"\u2191"}),jsx(Vr,{className:ji,children:"\u2193"}),"\u9009\u62E9"]}),jsxs("span",{className:"inline-flex items-center gap-1.5",children:[jsx(Vr,{className:ji,children:"Enter"}),"\u6253\u5F00"]}),jsxs("span",{className:"inline-flex items-center gap-1.5",children:[jsx(Vr,{className:ji,children:"Esc"}),"\u5173\u95ED"]}),l&&jsx("span",{className:"ml-auto min-w-0 truncate",children:l})]})]})})}function KR({items:e,title:t="\u4F60\u53EF\u80FD\u8FD8\u60F3\u4E86\u89E3",onSelect:o,loading:r=false,loadingRows:n=3,error:a,errorDetail:i,emptyMessage:d="\u6682\u65F6\u6CA1\u6709\u53EF\u63A8\u8350\u7684\u5185\u5BB9",className:s=""}){return jsxs("section",{"data-slot":"content-recommendation",className:g("font-[family-name:var(--ow-font-sans)]",s),children:[t&&jsxs("div",{"data-ow-part":"heading",className:"mb-2 flex items-center gap-1.5 text-[length:var(--ow-fs-ui)] font-medium leading-5 text-ow-text-2",children:[jsx(Aa,{className:"h-4 w-4 text-ow-text-3"}),t]}),a?jsx(J,{variant:"error",detail:i,children:a}):r?jsx("div",{"data-ow-part":"loading",className:"grid gap-2",role:"status","aria-label":"\u6B63\u5728\u751F\u6210\u63A8\u8350",children:Array.from({length:n},(l,c)=>jsx(re,{variant:"block",height:44,radius:"var(--ow-radius-card)"},c))}):e.length===0?jsx(H,{message:d,size:"sm"}):jsx("div",{"data-ow-part":"list",className:"grid gap-2",children:e.map(l=>jsxs("button",{"data-ow-part":"row",type:"button",disabled:l.disabled,onClick:()=>o?.(l),className:g("ow-focus-ring box-border flex min-h-[var(--ow-h-lg)] w-full items-center gap-2.5 px-3 py-[9px] text-left","bg-ow-surface border border-ow-border [border-radius:var(--ow-radius-card)] text-ow-text","cursor-pointer transition-colors [transition-duration:var(--ow-dur-1)] [transition-timing-function:var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","disabled:cursor-not-allowed disabled:bg-[var(--ow-disabled-bg)] disabled:border-[color:var(--ow-disabled-border)]","disabled:text-[color:var(--ow-disabled-text)] disabled:hover:bg-[var(--ow-disabled-bg)]"),children:[l.icon&&jsx("span",{"data-ow-part":"icon",className:"inline-flex h-5 w-5 shrink-0 items-center justify-center text-ow-text-2",children:l.icon}),jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[jsx("span",{className:"text-[length:var(--ow-fs-body)] leading-5",children:l.title}),l.description&&jsx("span",{className:"text-[length:var(--ow-fs-caption)] leading-[18px] text-ow-text-3",children:l.description})]}),jsx(he,{className:"h-4 w-4 shrink-0 text-ow-text-3"})]},l.key))})]})}function qR(e){return jsx(ro,{"data-slot":"context-chip",removeMode:"hover",...e})}function Ux(e){return e>=.85?"var(--ow-error)":e>=.6?"var(--ow-warning)":"var(--ow-text-3)"}function tf({value:e,size:t=18,showReadout:o=false,readout:r,className:n}){let a=Math.min(1,Math.max(0,e)),i=Ux(a),d=t<=24?4:3,s=t<=24?5.5:4.5,l=a*113.2,c=-24+a*360;return jsxs("span",{className:`ow-context-usage${n?` ${n}`:""}`,children:[jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48","aria-hidden":"true",children:[jsx("circle",{cx:"24",cy:"24",r:"18",fill:"none",stroke:"var(--ow-progress-track)",strokeWidth:d}),jsx("circle",{cx:"24",cy:"24",r:"18",fill:"none",stroke:i,strokeWidth:d,strokeDasharray:`${l} ${113.2}`,transform:"rotate(-24 24 24)"}),jsx("g",{transform:`rotate(${c} 24 24)`,children:jsx("circle",{cx:"42",cy:"24",r:s,fill:i})})]}),o&&jsx("span",{className:"ow-context-usage__readout",children:r??`${Math.round(a*100)}%`})]})}function nT(e){let t=useId(),o=e.percent!==void 0&&e.percent>=85?"danger":e.percent!==void 0&&e.percent>=60?"warning":"normal",r=e.loading?1:(e.percent??0)/100,n=e.percentLabel;return jsxs("div",{className:`context-usage-indicator context-usage-indicator--${o}${e.loading?" context-usage-indicator--loading":""}`,children:[jsx(f,{variant:"unstyled",type:"button",className:"context-usage-indicator__trigger","aria-label":e.ariaLabel,"aria-describedby":t,children:jsx(tf,{value:r,size:18,showReadout:true,readout:n},e.sessionKey)}),jsx("div",{id:t,role:"tooltip",className:"context-usage-popover",children:jsxs(zt,{className:"context-usage-card",title:"\u4E0A\u4E0B\u6587\u8BE6\u60C5",actions:jsx(at,{className:"context-usage-card__badge",children:"TOKEN"}),children:[jsxs("div",{className:"context-usage-card__summary",children:[jsx("span",{children:"\u7A97\u53E3\u5360\u7528"}),jsx("strong",{children:e.percentLabel})]}),jsx("div",{className:"context-usage-card__progress",role:"progressbar","aria-label":"\u4E0A\u4E0B\u6587\u7A97\u53E3\u5360\u7528","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.loading||e.percent===void 0?void 0:Math.round(e.percent),children:jsx("span",{style:{width:`${e.loading?0:e.percent??0}%`}})}),jsxs("div",{className:"context-usage-card__cache-hit",children:[jsx("span",{children:"\u7F13\u5B58\u547D\u4E2D"}),e.usageLoading?jsx(at,{children:"\u52A0\u8F7D\u4E2D"}):e.cacheHitLabel?jsxs("span",{className:"context-usage-card__cache-hit-value",children:[jsx("strong",{children:e.cacheHitLabel}),e.cacheHitPercent&&jsxs(Fragment,{children:[jsx("span",{children:"\xB7"}),jsx("span",{children:e.cacheHitPercent})]})]}):jsx(at,{children:"\u672A\u547D\u4E2D"})]}),e.compactRecommended&&jsxs("div",{className:"context-usage-card__compact-advice",children:[jsx(at,{variant:"warning",className:"context-usage-card__compact-badge",children:"\u5EFA\u8BAE\u538B\u7F29"}),jsx("span",{children:"\u5DF2\u8D85\u8FC7\u63A8\u8350\u9608\u503C\uFF0C\u5EFA\u8BAE\u6267\u884C /compact \u538B\u7F29\u4E0A\u4E0B\u6587"})]}),jsx("div",{className:"context-usage-card__divider"}),jsx(fc,{tone:"used",label:"\u5DF2\u4F7F\u7528",value:e.usedLabel}),jsx(fc,{tone:"remaining",label:"\u5269\u4F59",value:e.remainingLabel}),jsx("div",{className:"context-usage-card__divider"}),jsx(fc,{label:"\u603B\u53EF\u7528",value:e.totalLabel,strong:true}),e.totalLabel==="\u2014"&&jsx("p",{className:"context-usage-card__unavailable",children:e.modelLoading?"\u6B63\u5728\u83B7\u53D6\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002":"Platform \u6682\u672A\u63D0\u4F9B\u6B64\u6A21\u578B\u7684\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002"})]})})]})}function fc({tone:e,label:t,value:o,strong:r=false}){return jsxs("div",{className:`context-usage-card__row context-usage-card__total${r?" is-strong":""}`,children:[e?jsx("span",{className:`context-usage-card__dot context-usage-card__dot--${e}`}):jsx("span",{className:"context-usage-card__dot-spacer"}),jsx("span",{className:"context-usage-card__label",children:t}),jsx("strong",{children:o})]})}var Gx=50;function Zx(e,t,o){if(e.key!=="Enter")return false;if(t||e.nativeEvent.isComposing||e.keyCode===229)return true;if(o===null)return false;let r=e.timeStamp-o;return r>=0&&r<=Gx}function Dt(){let e=useRef(false),t=useRef(null),o=useCallback(i=>{e.current=true,t.current=null;},[]),r=useCallback(i=>{e.current=false,t.current=i.timeStamp;},[]),n=useCallback(i=>Zx(i,e.current,t.current),[]);return {isComposing:useCallback(()=>e.current,[]),isImeEnter:n,onCompositionStart:o,onCompositionEnd:r}}function af({onCancel:e,onSubmit:t}){let[o,r]=useState(""),[n,a]=useState(false),[i,d]=useState(null),{isImeEnter:s,onCompositionEnd:l,onCompositionStart:c}=Dt(),p=o.trim()!==""&&!n,m=()=>{p&&(a(true),d(null),t(o.trim()).catch(u=>d(u instanceof Error?u.message:"\u521B\u5EFA\u9879\u76EE\u5931\u8D25")).finally(()=>a(false)));};return jsx(oe,{open:true,title:"\u65B0\u5EFA\u9879\u76EE",width:448,onClose:e,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",onClick:e,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",loading:n,disabled:!p,onClick:m,children:n?"\u521B\u5EFA\u4E2D\u2026":"\u521B\u5EFA"})]}),children:jsxs("label",{"data-ow-part":"field",className:"flex flex-col gap-2",children:[jsx("span",{"data-ow-part":"field-label",className:"text-[color:var(--ow-text-2)] font-medium text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:"\u9879\u76EE\u540D\u79F0"}),jsx(te,{autoFocus:true,value:o,placeholder:"\u4F8B\u5982 \u7ADE\u54C1\u8C03\u7814",error:i??void 0,onChange:r,onCompositionStart:c,onCompositionEnd:l,onKeyDown:u=>{s(u)||u.key==="Enter"&&m();}})]})})}var vc="px-3";function Xx({direction:e}){return jsxs("svg",{className:"shrink-0 w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true","data-ow-part":"sort-glyph","data-ow-state":e??"none",children:[jsx("desc",{children:"\u6392\u5E8F\u6307\u793A\uFF1A\u4E0A\u7BAD\u5934\u4E3A\u5347\u5E8F\u3001\u4E0B\u7BAD\u5934\u4E3A\u964D\u5E8F\uFF0C\u6FC0\u6D3B\u65B9\u5411\u7740\u91CD\u663E\u793A\u3002"}),jsx("path",{d:"M4 6 7 3l3 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e==="asc"?"text-[color:var(--ow-text)]":"text-[color:var(--ow-text-3)]"}),jsx("path",{d:"M4 8l3 3 3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e==="desc"?"text-[color:var(--ow-text)]":"text-[color:var(--ow-text-3)]"})]})}function Qx(e,t){return !e||e.key!==t?{key:t,direction:"asc"}:e.direction==="asc"?{key:t,direction:"desc"}:null}function nf(e){return e.align??(e.numeric?"end":"start")}function cl({columns:e,rows:t,rowKey:o,density:r="default",sort:n=null,onSortChange:a,loading:i=false,loadingRows:d=5,emptyMessage:s="\u8FD8\u6CA1\u6709\u6570\u636E",emptyActionLabel:l,onEmptyAction:c,error:p,errorDetail:m,onRowClick:u,selectedRowKey:b,toolbar:w,caption:v,stickyHeader:h=false,className:x}){let k=useId(),y=r==="dense"?"var(--ow-row-h-dense)":"var(--ow-row-h)",P=!i&&!p&&t.length>0,N=!i&&!p&&t.length===0;return jsxs("div",{"data-slot":"data-table","data-ow-density":r,className:g("w-full overflow-hidden bg-[var(--ow-surface)]","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-card)]",x),children:[w,jsx("div",{className:"w-full overflow-x-auto",children:jsxs("table",{className:"w-full border-collapse text-ow-fs-ui text-[color:var(--ow-text)]","aria-describedby":v?k:void 0,children:[v&&jsx("caption",{id:k,className:"sr-only",children:v}),jsx("thead",{"data-ow-part":"head",className:g("bg-[var(--ow-surface-2)]",h&&"sticky top-0 z-[var(--ow-z-sticky)]"),children:jsx("tr",{children:e.map(S=>{let R=n?.key===S.key?n.direction:void 0,M=nf(S);return jsx("th",{scope:"col","data-ow-part":"header-cell","aria-sort":S.sortable?R==="asc"?"ascending":R==="desc"?"descending":"none":void 0,style:{width:S.width,height:y},className:g(vc,"border-b border-[color:var(--ow-border)] font-medium","text-[color:var(--ow-text-2)] whitespace-nowrap",M==="end"?"text-right":"text-left"),children:S.sortable?jsxs("button",{type:"button","data-ow-part":"sort-button","data-ow-state":R??"none",disabled:!a,"aria-label":typeof S.header=="string"?void 0:S.headerLabel,onClick:()=>a?.(Qx(n,S.key)),className:g("inline-flex items-center gap-1.5 -mx-1 px-1 py-0.5 max-w-full","bg-transparent border-none font-medium text-inherit cursor-pointer","[border-radius:var(--ow-radius-2xs)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","focus-visible:outline-none focus-visible:[box-shadow:var(--ow-focus-shadow)]","disabled:cursor-not-allowed disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent",R&&"text-[color:var(--ow-text)]",M==="end"&&"flex-row-reverse"),children:[jsx("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:S.header}),jsx(Xx,{direction:R})]}):S.header},S.key)})})}),P&&jsx("tbody",{"data-ow-part":"body",children:t.map((S,R)=>{let M=o(S,R),T=b!==void 0&&b===M;return jsx("tr",{"data-ow-part":"row","data-ow-role":T?"selected":void 0,tabIndex:u?0:void 0,"aria-selected":b!==void 0?T:void 0,onClick:u?()=>u(S,R):void 0,onKeyDown:u?_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),u(S,R));}:void 0,className:g("transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","border-b border-[color:var(--ow-border)] last:border-b-0","hover:bg-[var(--ow-hover)]",T&&"bg-[var(--ow-selected-bg)]",u&&"cursor-pointer active:bg-[var(--ow-press)] focus-visible:outline-none focus-visible:[box-shadow:var(--ow-focus-shadow)]"),children:e.map(_=>{let L=nf(_);return jsx("td",{"data-ow-part":"cell",style:{height:y},className:g(vc,L==="end"?"text-right":"text-left",_.numeric&&"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]"),children:_.render?_.render(S,R):String(S[_.key]??"")},_.key)})},M)})}),i&&jsx("tbody",{"data-ow-part":"loading","aria-busy":"true",children:Array.from({length:d},(S,R)=>jsx("tr",{className:"border-b border-[color:var(--ow-border)] last:border-b-0",children:e.map(M=>jsx("td",{style:{height:y},className:vc,children:jsx(re,{variant:"line",height:12,width:M.numeric?"48%":"72%"})},M.key))},`skeleton-${R}`))})]})}),N&&jsx(H,{message:s,action:l?jsx(f,{variant:"secondary",size:"md",onClick:c,children:l}):void 0,className:"border-t border-[color:var(--ow-border)]"}),p&&jsxs("div",{"data-ow-part":"error",role:"alert",className:"flex flex-col items-center gap-1.5 border-t border-[color:var(--ow-border)] px-4 py-8 text-center",children:[jsx("p",{className:"m-0 text-ow-fs-ui text-[color:var(--ow-text)]",children:p}),m&&jsx("p",{className:"m-0 max-w-full overflow-hidden text-ow-fs-mark-md leading-snug text-[color:var(--ow-text-3)] font-[family-name:var(--ow-font-mono)] [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2]",children:m})]})]})}function sf({children:e,actions:t,className:o}){return jsxs("div",{"data-slot":"data-table-toolbar",className:g("flex items-center gap-2 flex-wrap px-3 py-2","bg-[var(--ow-surface)] border-b border-[color:var(--ow-border)]",o),children:[jsx("div",{className:"flex items-center gap-2 flex-wrap min-w-0 flex-1",children:e}),t&&jsx("div",{className:"flex items-center gap-2 shrink-0",children:t})]})}var Jx=["font-medium leading-none m-0","text-[length:var(--ow-fs-eyebrow-cjk,12px)]","tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]","text-[color:var(--ow-eyebrow)]"].join(" ");function lf({title:e,items:t,onCopyLink:o,onRevoke:r}){return t.length===0?null:jsxs("section",{"data-ow-part":"group",className:"flex flex-col gap-0 min-w-0",children:[jsx("h3",{"data-ow-part":"group-title",className:g(Jx,"pb-1"),children:e}),t.map(n=>jsxs("div",{"data-ow-part":"row",className:"flex items-center gap-3 min-w-0 px-0 py-3 border-[color:var(--ow-border)] [[data-ow-part=row]+&]:border-t",children:[jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{className:"truncate text-ow-fs-ui font-medium leading-[1.3] text-[color:var(--ow-text)]",children:n.name}),jsxs("span",{className:"truncate text-[length:var(--ow-fs-caption,12px)] leading-[1.4] text-[color:var(--ow-text-2)] [font-family:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",children:[n.url," \xB7 ",n.access]})]}),jsx(f,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>o(n),children:"\u590D\u5236\u94FE\u63A5"}),jsx(f,{variant:"secondary",size:"sm",className:"shrink-0 text-[color:var(--ow-danger)] hover:text-[color:var(--ow-danger)]",onClick:()=>r(n),children:"\u505C\u6B62\u5206\u4EAB"})]},n.id))]})}function TT({sites:e,shares:t,onCopyLink:o,onRevoke:r,emptyMessage:n="\u8FD8\u6CA1\u6709\u53D1\u5E03\u51FA\u53BB\u7684\u7AD9\u70B9\u6216\u5206\u4EAB\u51FA\u53BB\u7684\u4F1A\u8BDD\u3002",className:a}){return e.length===0&&t.length===0?jsx(H,{message:n}):jsxs("div",{"data-slot":"data-management",className:g("flex flex-col gap-3.5 min-w-0",a),children:[jsx(lf,{title:"\u5DF2\u53D1\u5E03\u7684\u7AD9\u70B9",items:e,onCopyLink:o,onRevoke:r}),jsx(lf,{title:"\u5DF2\u5206\u4EAB\u7684\u4F1A\u8BDD",items:t,onCopyLink:o,onRevoke:r})]})}function pl({items:e,disabled:t,onSelect:o,label:r="\u66F4\u591A\u64CD\u4F5C"}){let n=e.map(a=>({key:a.key,label:a.label,icon:a.icon,danger:a.danger,disabled:a.disabled}));return jsx(co,{items:n,width:160,align:"end",onSelect:o,ariaLabel:r,trigger:jsx(f,{variant:"ghost",size:"sm","aria-label":r,title:r,disabled:t,icon:jsx(Go,{width:16,height:16,"aria-hidden":"true"})})})}function df({title:e,description:t,onCancel:o,onConfirm:r}){return jsx(oe,{open:true,variant:"danger",title:e,icon:jsx(Le,{"aria-hidden":"true"}),onClose:o,onConfirm:r,confirmLabel:"\u5378\u8F7D",cancelLabel:"\u53D6\u6D88",children:t})}function $T({title:e,icon:t,meta:o,defaultOpen:r=true,open:n,onOpenChange:a,disabled:i=false,maxBodyHeight:d,children:s,className:l=""}){let[c,p]=useState(r),m=n??c,u=useId(),b=useCallback(()=>{if(i)return;let w=!m;n===void 0&&p(w),a?.(w);},[i,m,n,a]);return jsxs("div",{"data-slot":"detail-panel","data-ow-state":m?"open":"closed",className:g("overflow-hidden bg-ow-surface border border-[color:var(--ow-border)] shadow-none","[border-radius:var(--ow-radius-card)]",l),children:[jsxs("button",{type:"button","data-slot":"detail-panel-header","aria-expanded":m,"aria-controls":u,disabled:i,onClick:b,className:g("flex items-center gap-2 w-full h-[var(--ow-row-h)] px-3","text-left text-ow-fs-ui font-medium text-[color:var(--ow-text)] bg-transparent","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent disabled:cursor-not-allowed","ow-focus-ring"),children:[t&&jsx("span",{"data-ow-part":"icon",className:"inline-flex items-center justify-center w-4 h-4 flex-shrink-0",children:t}),jsx("span",{className:"flex-1 min-w-0 truncate",children:e}),o&&jsx("span",{className:"flex-shrink-0 text-[color:var(--ow-text-3)]",children:o}),jsx(he,{"aria-hidden":"true",width:16,height:16,className:g("flex-shrink-0 text-[color:var(--ow-text-3)]","transition-transform duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",m?"rotate-90":"rotate-0")})]}),m&&jsx("div",{id:u,"data-slot":"detail-panel-body",className:"border-t border-[color:var(--ow-border)] px-3 py-3 overflow-auto text-ow-fs-ui text-[color:var(--ow-text-2)]",style:d?{maxHeight:d}:void 0,children:s})]})}var r0="[-webkit-app-region:drag]",Nn="[-webkit-app-region:no-drag]",a0=cva(["flex items-center w-full flex-shrink-0 select-none","gap-[var(--ow-titlebar-gap)] px-[var(--ow-titlebar-pad-x)]","h-[var(--ow-titlebar-h)] min-h-[var(--ow-titlebar-h)]","bg-ow-bg text-[color:var(--ow-text)]","shadow-none",r0].join(" "),{variants:{platform:{mac:"",windows:"",linux:"",web:""},transparent:{true:"bg-transparent",false:""},divided:{true:"border-b border-[color:var(--ow-border)]",false:""}},defaultVariants:{platform:"web",transparent:false,divided:false}});function wc({title:e,subtitle:t,leading:o,actions:r,chrome:n,platform:a="web",fullscreen:i=false,collapsed:d=false,onToggle:s,transparent:l=false,divided:c=false,children:p,className:m}){let u=a==="mac"&&!i,b=s!=null||o!=null;return jsxs("header",{"data-slot":"title-bar","data-ow-platform":a,"data-ow-fullscreen":i?"":void 0,className:g(a0({platform:a,transparent:l,divided:c}),m),children:[u&&jsx("div",{"aria-hidden":"true","data-slot":"title-bar-traffic-inset",className:"w-[var(--ow-traffic-inset)] h-full flex-shrink-0"}),b&&jsxs("div",{"data-slot":"title-bar-leading",className:g("flex items-center gap-[var(--ow-titlebar-gap)] flex-shrink-0",Nn),children:[s&&jsx(hc,{collapsed:d,onToggle:s}),o]}),jsx("div",{"data-slot":"title-bar-title",className:"flex items-baseline gap-2 min-w-0 flex-1",children:p??jsxs(Fragment,{children:[e!=null&&jsx("span",{className:"truncate text-ow-fs-ui font-medium text-[color:var(--ow-text)]",children:e}),t!=null&&jsx("span",{className:"truncate text-ow-fs-ui text-[color:var(--ow-text-3)]",children:t})]})}),r&&jsx("div",{"data-slot":"title-bar-actions",className:g("flex items-center gap-[var(--ow-titlebar-gap)] flex-shrink-0",Nn),children:r}),n&&jsx("div",{"data-slot":"title-bar-chrome",className:g("flex items-center flex-shrink-0 self-stretch",Nn),children:n})]})}var uf=wc;function hc({collapsed:e=false,onToggle:t,className:o}){return jsx("button",{type:"button","data-slot":"sidebar-toggle","data-ow-collapsed":e?"":void 0,"aria-label":"\u6536\u8D77\u6216\u5C55\u5F00\u4FA7\u680F","aria-expanded":!e,title:"\u6536\u8D77 / \u5C55\u5F00\u4FA7\u680F",onClick:t,className:g("inline-grid place-items-center flex-shrink-0 w-7 h-7 p-0 border-0 cursor-pointer","[border-radius:var(--ow-radius-xs)] bg-transparent text-[color:var(--ow-text-2)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] hover:text-[color:var(--ow-text)]","active:bg-[var(--ow-press)]","ow-focus-ring",Nn,o),children:jsx(Br,{width:18,height:18,"aria-hidden":"true"})})}var n0=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("path",{d:"M5 12H19",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),i0=e=>jsx("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:jsx("rect",{x:"5",y:"5",width:"14",height:"14",rx:"2",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"})}),s0=e=>jsxs("svg",{viewBox:"0 0 24 24",fill:"none",...e,children:[jsx("rect",{x:"4",y:"8",width:"12",height:"12",rx:"2",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),jsx("path",{d:"M8 4.75H17.25C18.3546 4.75 19.25 5.64543 19.25 6.75V16",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]}),bc=cva(["inline-flex items-center justify-center flex-shrink-0","w-[var(--ow-winctl-w)] h-full p-0 border-0 bg-transparent cursor-default","text-[color:var(--ow-text-3)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",Nn].join(" "),{variants:{danger:{true:"hover:bg-[var(--ow-error-fill)] hover:text-[color:var(--ow-on-fill)] active:bg-[var(--ow-error-hover)]",false:"hover:bg-[var(--ow-hover)] hover:text-[color:var(--ow-text)] active:bg-[var(--ow-press)]"}},defaultVariants:{danger:false}});function mf({onMinimize:e,onToggleMaximize:t,onClose:o,maximized:r=false,hideMinimize:n=false,hideMaximize:a=false,className:i}){return jsxs("div",{"data-slot":"window-chrome",className:g("flex items-stretch h-[var(--ow-titlebar-h)]",Nn,i),children:[!n&&jsx("button",{type:"button","data-slot":"window-chrome-control","data-ow-action":"minimize","aria-label":"\u6700\u5C0F\u5316",className:bc(),onClick:e,children:jsx(n0,{width:16,height:16,"aria-hidden":"true"})}),!a&&jsx("button",{type:"button","data-slot":"window-chrome-control","data-ow-action":"maximize","aria-label":r?"\u8FD8\u539F\u7A97\u53E3":"\u6700\u5927\u5316","aria-pressed":r,className:bc(),onClick:t,children:r?jsx(s0,{width:16,height:16,"aria-hidden":"true"}):jsx(i0,{width:16,height:16,"aria-hidden":"true"})}),jsx("button",{type:"button","data-slot":"window-chrome-control","data-ow-action":"close","aria-label":"\u5173\u95ED",className:bc({danger:true}),onClick:o,children:jsx(Q,{width:16,height:16,"aria-hidden":"true"})})]})}function XT({title:e,subtitle:t,onBack:o,backLabel:r="\u8FD4\u56DE",leading:n,actions:a,platform:i="web",aside:d,asideWidth:s=280,footer:l,flush:c=false,children:p,className:m,bodyClassName:u}){return jsxs("section",{"data-slot":"detail-scaffold",className:g("flex flex-col h-full min-h-0 w-full bg-ow-surface shadow-none",m),children:[jsx(wc,{transparent:true,divided:true,platform:i,title:e,subtitle:t,actions:a,leading:o||n?jsxs(Fragment,{children:[o&&jsx(go,{size:"sm",label:r,onClick:o}),n]}):void 0}),jsxs("div",{"data-slot":"detail-scaffold-body",className:"flex flex-1 min-h-0",children:[jsx("div",{"data-slot":"detail-scaffold-content",className:g("flex-1 min-w-0 min-h-0 overflow-auto",c?"p-0":"p-4",u),children:p}),d&&jsx("aside",{"data-slot":"detail-scaffold-aside",className:"flex-shrink-0 min-h-0 overflow-auto border-l border-[color:var(--ow-border)] shadow-none",style:{width:s,minWidth:s},children:d})]}),l&&jsx("div",{"data-slot":"detail-scaffold-footer",className:"flex-shrink-0 flex items-center justify-end gap-2 px-4 py-3 border-t border-[color:var(--ow-border)]",children:l})]})}function iM({onFiles:e,accept:t,multiple:o=true,disabled:r=false,message:n="\u628A\u6587\u4EF6\u62D6\u5230\u8FD9\u91CC",activeMessage:a="\u677E\u624B\u653E\u5230\u8FD9\u91CC",actionLabel:i="\u9009\u62E9\u6587\u4EF6",hint:d,error:s,errorDetail:l,loading:c=false,loadingLabel:p="\u6B63\u5728\u4E0A\u4F20",children:m,className:u}){let b=useRef(null),w=useRef(0),[v,h]=useState(false),x=r||c,k=useCallback(()=>{x||b.current?.click();},[x]),y=useCallback(M=>{!M||M.length===0||e?.(Array.from(M));},[e]),P=M=>{x||(M.preventDefault(),w.current+=1,h(true));},N=M=>{x||M.preventDefault();},S=M=>{x||(M.preventDefault(),w.current=Math.max(0,w.current-1),w.current===0&&h(false));},R=M=>{x||(M.preventDefault(),w.current=0,h(false),y(M.dataTransfer?.files??null));};return jsxs("div",{"data-slot":"dropzone-root",className:g("flex w-full flex-col gap-2",u),children:[jsxs("div",{"data-slot":"dropzone","data-ow-part":"surface","data-ow-state":g(r&&"disabled",c&&"loading",v&&"dragging")||void 0,"aria-busy":c||void 0,onDragEnter:P,onDragOver:N,onDragLeave:S,onDrop:R,onClick:k,className:g("flex w-full flex-col items-center justify-center gap-2 px-4 py-6 box-border","border-2 border-dashed [border-radius:var(--ow-radius-card)]","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",r?"cursor-not-allowed border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)] text-[color:var(--ow-disabled-text)]":c?"cursor-default border-[color:var(--ow-border-strong)] text-[color:var(--ow-text-2)]":v?"cursor-copy border-[color:var(--ow-drop-border)] bg-[var(--ow-drop-bg)] text-[color:var(--ow-text)]":s?"cursor-pointer border-[color:var(--ow-error)] text-[color:var(--ow-text)]":"cursor-pointer border-[color:var(--ow-border-strong)] text-[color:var(--ow-text)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]"),children:[m??(c?jsxs("span",{className:"inline-flex items-center gap-2 text-ow-fs-ui text-[color:var(--ow-text-2)]",children:[jsx(Ro,{size:"md"}),p]}):jsx(H,{className:"gap-2 px-0 py-0",markSize:32,message:v?a:n,action:i===null?void 0:jsx(f,{variant:"primary",size:"md",disabled:x,onClick:M=>{M.stopPropagation(),k();},children:i})})),d&&!c&&jsx("p",{className:"m-0 text-ow-fs-ui text-[color:var(--ow-text-3)]",children:d}),jsx("input",{ref:b,"data-ow-part":"input",type:"file",accept:t,multiple:o,disabled:x,className:"hidden",onClick:M=>M.stopPropagation(),onChange:M=>{y(M.target.files),M.target.value="";}})]}),s&&jsx(J,{variant:"error",detail:l,children:s})]})}function pM({point:e,editMode:t=false,canCut:o=false,canPaste:r=false,canCopy:n=false,canSave:a=false,onSelect:i}){let d=t?[{key:"cut",label:"\u526A\u5207",icon:jsx(Cd,{}),disabled:!o},{key:"copy",label:"\u590D\u5236",icon:jsx(Tt,{}),disabled:!n},{key:"paste",label:"\u7C98\u8D34",icon:jsx(Or,{}),disabled:!r}]:[...n?[{key:"copy",label:"\u590D\u5236",icon:jsx(Tt,{})}]:[],...a?[{key:"save",label:"\u4E0B\u8F7D",icon:jsx(Co,{})}]:[],{key:"feedback",label:"\u53CD\u9988",icon:jsx(Oa,{})}];return jsx("div",{className:"feedback-context-menu",style:{left:e.x,top:e.y},onClick:s=>s.stopPropagation(),children:jsx(pt,{width:140,autoAdjust:true,items:d,onSelect:s=>i(s)})})}var p0=[{value:"bug",label:"BUG"},{value:"feature_request",label:"\u65B0\u9700\u6C42"},{value:"model_quality",label:"\u6A21\u578B\u6548\u679C"},{value:"other",label:"\u5176\u4ED6"}];function bM(e){let t=e.submitting||e.description.trim().length===0;return jsx(oe,{open:true,width:512,title:"\u63D0\u4EA4\u53CD\u9988",icon:jsx(Oa,{"aria-hidden":"true"}),iconTone:"info",onClose:e.onClose,onSubmit:o=>{o.preventDefault(),e.onSubmit();},actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",type:"button",onClick:e.onClose,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",type:"submit",loading:e.submitting,disabled:t,children:e.submitting?"\u63D0\u4EA4\u4E2D\u2026":"\u63D0\u4EA4"})]}),children:jsxs("div",{className:"flex flex-col gap-5",children:[jsxs("div",{"data-ow-part":"field",className:"flex flex-col gap-2",children:[jsx("span",{"data-ow-part":"field-label",className:"text-[color:var(--ow-text-2)] font-medium text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:"\u95EE\u9898\u7C7B\u578B"}),jsx(Ht,{"aria-label":"\u95EE\u9898\u7C7B\u578B",value:e.category,options:p0.map(o=>({value:o.value,label:o.label})),onChange:o=>e.onCategoryChange(o)})]}),jsxs("label",{"data-ow-part":"field",className:"flex flex-col gap-2",children:[jsx("span",{"data-ow-part":"field-label",className:"text-[color:var(--ow-text-2)] font-medium text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:"\u95EE\u9898\u63CF\u8FF0"}),jsx(te,{multiline:true,value:e.description,onChange:e.onDescriptionChange,placeholder:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\u3001\u671F\u671B\u884C\u4E3A\u6216\u9700\u6C42\u573A\u666F",rows:6,autoFocus:true})]}),jsxs("div",{"data-ow-part":"logs-option",className:"flex items-start gap-2.5",children:[jsx(To,{checked:e.uploadLogs,onChange:e.onUploadLogsChange,"aria-label":"\u4E0A\u4F20\u8BCA\u65AD\u65E5\u5FD7"}),jsx("span",{className:"flex-1 text-[color:var(--ow-text-2)] font-normal text-ow-fs-ui leading-[1.5] font-[family-name:var(--ow-font-sans)]",children:"\u4E0A\u4F20\u8BCA\u65AD\u65E5\u5FD7\uFF0C\u5E2E\u52A9\u6211\u4EEC\u66F4\u5FEB\u5B9A\u4F4D\u95EE\u9898\u3002\u65E5\u5FD7\u4EC5\u5305\u542B\u8BBE\u5907\u4E0E\u8FD0\u884C\u4FE1\u606F\uFF0C\u4E0D\u542B\u5BF9\u8BDD\u5185\u5BB9\u3002"})]})]})})}var yM=lc;function m0({item:e,onOpen:t,onOpenWithMenu:o,onRequestOpenWithOptions:r,onOpenWith:n,className:a="",openWithLabel:i="\u6253\u5F00\u65B9\u5F0F"}){let s=!!t&&!e.typeLabel?"":e.typeLabel;return jsx(da,{variant:"card",name:e.name,path:e.path,badge:e.badge,meta:s,className:a,actionsLabel:i,onOpen:t?()=>t(e):void 0,onNativeActionsMenu:o?()=>o(e):void 0,onRequestActions:r?()=>r(e):void 0,onAction:n?l=>n(e,l):void 0})}function kM({items:e,onOpen:t,onOpenWithMenu:o,onRequestOpenWithOptions:r,onOpenWith:n,className:a="","aria-label":i="\u6587\u4EF6\u5F15\u7528",openWithLabel:d}){return e.length===0?null:jsx(xn,{layout:"stack",className:a,"aria-label":i,children:e.map(s=>jsx(m0,{item:s,onOpen:t,onOpenWithMenu:o,onRequestOpenWithOptions:r,onOpenWith:n,openWithLabel:d},s.id??s.path))})}var g0={default:"var(--ow-progress-fill)",primary:"var(--ow-progress-fill)",success:"var(--ow-success-on-tint)",warning:"var(--ow-warning-on-tint)",error:"var(--ow-error-on-tint)",info:"var(--ow-info-on-tint)",violet:"var(--ow-info-on-tint)"},v0=cva("font-medium leading-none border inline-flex items-center gap-1 whitespace-nowrap transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",{variants:{variant:{default:"bg-ow-surface text-ow-text-2 border-ow-border-strong",primary:"bg-ow-surface-2 text-ow-text-2 border-ow-border",success:"bg-[var(--ow-success-tint)] text-[color:var(--ow-success-on-tint)] border-[color:var(--ow-success-tint-border)]",warning:"bg-[var(--ow-warning-tint)] text-[color:var(--ow-warning-on-tint)] border-[color:var(--ow-warning-tint-border)]",error:"bg-[var(--ow-error-tint)] text-[color:var(--ow-error-on-tint)] border-[color:var(--ow-error-tint-border)]",info:"bg-[var(--ow-info-tint)] text-[color:var(--ow-info-on-tint)] border-[color:var(--ow-info-tint-border)]",violet:"bg-[var(--ow-info-tint)] text-[color:var(--ow-info-on-tint)] border-[color:var(--ow-info-tint-border)]"},size:{sm:"text-ow-fs-mark-sm px-1.5 py-0.5",md:"text-ow-fs-body-sm px-2 py-1"},shape:{square:"[border-radius:var(--ow-radius-tag)]",pill:"[border-radius:var(--ow-radius-chip)]"},interactive:{true:"cursor-pointer",false:""},disabled:{true:"cursor-not-allowed text-[color:var(--ow-disabled-text)] border-[color:var(--ow-disabled-border)] bg-[var(--ow-disabled-bg)]",false:""}},compoundVariants:[{interactive:true,disabled:false,variant:["default","primary"],className:"hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]"},{interactive:true,disabled:false,variant:"success",className:"hover:bg-[var(--ow-success-tint-hover)] active:bg-[var(--ow-success-tint-hover)]"},{interactive:true,disabled:false,variant:"warning",className:"hover:bg-[var(--ow-warning-tint-hover)] active:bg-[var(--ow-warning-tint-hover)]"},{interactive:true,disabled:false,variant:"error",className:"hover:bg-[var(--ow-error-tint-hover)] active:bg-[var(--ow-error-tint-hover)]"},{interactive:true,disabled:false,variant:["info","violet"],className:"hover:bg-[var(--ow-info-tint-hover)] active:bg-[var(--ow-info-tint-hover)]"}],defaultVariants:{variant:"default",size:"md",shape:"square",interactive:false,disabled:false}});function Rn({variant:e="default",size:t="md",shape:o,dot:r=false,count:n,closable:a=false,closeAriaLabel:i="\u79FB\u9664",disabled:d=false,pressed:s,onClose:l,onClick:c,className:p="",children:m}){let u=!!c,b=u&&!a?"button":"span",w=o??(r||n!=null?"pill":"square"),v=jsxs(Fragment,{children:[r&&jsx("span",{"data-ow-part":"dot",className:"w-1.5 h-1.5 shrink-0 [border-radius:var(--ow-radius-pill)]",style:{background:d?"var(--ow-disabled-text)":g0[e]},"aria-hidden":"true"}),jsx("span",{"data-ow-part":"content",className:"inline-flex items-center",children:m}),n!=null&&jsx("span",{"data-ow-part":"count",className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums",children:n})]});return jsxs(b,{type:b==="button"?"button":void 0,"data-slot":"tag","data-variant":e,"data-size":t,"data-shape":w,"data-ow-part":"surface",className:g(v0({variant:e,size:t,shape:w,interactive:u,disabled:d}),b==="button"&&"ow-focus-ring",p),"aria-disabled":d||void 0,"aria-pressed":b==="button"&&s!==void 0?s:void 0,onClick:d||u&&a?void 0:c,children:[u&&a?jsx("button",{type:"button","data-ow-part":"body-action",className:"inline-flex items-center gap-[inherit] min-w-0 cursor-pointer bg-transparent border-0 p-0 m-0 [font:inherit] text-inherit [border-radius:inherit] ow-focus-ring",disabled:d,onClick:c,children:v}):v,a&&jsx("button",{type:"button","data-ow-part":"close",className:g("relative inline-flex w-3.5 h-3.5 -mr-0.5 p-0 shrink-0 items-center justify-center bg-transparent border-0 text-current","[border-radius:var(--ow-radius-key)] opacity-60 hover:opacity-100 hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","ow-focus-ring disabled:cursor-not-allowed disabled:text-[color:var(--ow-disabled-text)] disabled:pointer-events-none","after:absolute after:content-[''] after:-inset-[5px]"),disabled:d,onClick:h=>{h.stopPropagation(),l?.();},"aria-label":i,children:jsx(Q,{className:"w-2.5 h-2.5","aria-hidden":"true"})})]})}function bf({filters:e,onFilterToggle:t,search:o,sort:r,onReset:n,resetLabel:a="\u6E05\u7A7A\u7B5B\u9009",actions:i,children:d,collapsible:s=false,defaultExpanded:l=false,expanded:c,onExpandedChange:p,expandLabel:m="\u66F4\u591A\u7B5B\u9009",flush:u=false,className:b}){let[w,v]=useState(l),h=c??w,x=useId(),k=()=>{let y=!h;c===void 0&&v(y),p?.(y);};return jsxs("div",{"data-slot":"filter-bar","data-ow-expanded":s?String(h):void 0,className:g("w-full bg-[var(--ow-surface)]",!u&&"border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-card)]",b),children:[jsxs("div",{className:"flex items-center gap-2 flex-wrap px-3 py-2",children:[e&&e.length>0&&jsx("div",{"data-ow-part":"filters",className:"flex items-center gap-1.5 flex-wrap min-w-0",role:"group",children:e.map(y=>jsx(Rn,{shape:"square",size:"md",variant:"default",disabled:y.disabled,pressed:y.active??false,onClick:()=>t?.(y.key),className:y.active?"bg-[var(--ow-selected-bg)] font-medium text-[color:var(--ow-text)]":void 0,children:y.label},y.key))}),o&&jsx("div",{"data-ow-part":"search",style:{width:o.width??220},className:"min-w-0 shrink-0",children:jsx(te,{type:"search",value:o.value,onChange:o.onChange,placeholder:o.placeholder??"\u641C\u7D22",disabled:o.disabled,"aria-label":o.placeholder??"\u641C\u7D22",prefix:jsx($t,{className:"w-4 h-4","aria-hidden":"true"})})}),r&&jsx("div",{"data-ow-part":"sort",style:{width:r.width??160},className:"min-w-0 shrink-0","aria-label":r.label??"\u6392\u5E8F",children:jsx(wr,{value:r.value,options:r.options,onChange:r.onChange,disabled:r.disabled,placeholder:r.label??"\u6392\u5E8F"})}),n&&jsx(f,{variant:"ghost",size:"sm",onClick:n,children:a}),jsx("div",{className:"flex-1"}),s&&d&&jsxs(f,{variant:"ghost",size:"sm",onClick:k,"aria-expanded":h,"aria-controls":x,"data-ow-part":"expand",children:[m,jsx(ne,{className:g("w-4 h-4 transition-transform duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]",h&&"rotate-180"),"aria-hidden":"true"})]}),i&&jsx("div",{className:"flex items-center gap-2 shrink-0",children:i})]}),d&&(!s||h)&&jsx("div",{id:x,"data-ow-part":"panel",className:"flex items-center gap-2 flex-wrap border-t border-[color:var(--ow-border)] px-3 py-2",children:d})]})}function x0({label:e,hint:t,description:o,htmlFor:r,asGroup:n=false,required:a=false,error:i,errorDetail:d,disabled:s=false,children:l,className:c}){let p=useId(),m=useId(),u=!!i;return jsxs(r||n?"div":"label",{"data-slot":"form-field","data-ow-part":"surface","data-ow-state":g(s&&"disabled",u&&"error")||void 0,role:n?"group":void 0,"aria-labelledby":n?m:void 0,className:g("flex flex-col gap-2 w-full min-w-0",c),children:[jsxs("span",{"data-ow-part":"label",id:n?m:void 0,className:g("flex items-center gap-1.5 text-ow-fs-ui font-medium leading-[1.3]",s?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text)]"),children:[r?jsx("label",{htmlFor:r,children:e}):e,a&&jsx("span",{"aria-hidden":"true",className:"text-[color:var(--ow-error)]",children:"*"}),t!=null&&jsx("span",{"data-ow-part":"hint",className:"font-normal text-[color:var(--ow-text-3)]",children:t})]}),o!=null&&jsx("span",{"data-ow-part":"description",className:g("text-ow-fs-body-sm font-normal leading-[1.45]",s?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-2)]"),children:o}),jsx("span",{"data-ow-part":"control",className:"flex flex-col gap-1 w-full min-w-0",children:l}),u&&jsxs("span",{"data-ow-part":"error",id:p,role:"alert",className:"flex flex-col gap-0.5",children:[jsxs("span",{className:"flex items-start gap-1.5 text-ow-fs-ui leading-[1.4] text-[color:var(--ow-error)]",children:[jsx(Zo,{className:"w-3.5 h-3.5 mt-0.5 shrink-0","aria-hidden":"true"}),jsx("span",{className:"min-w-0",children:i})]}),d&&jsx("span",{className:"font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-fs-body-sm leading-[1.5] text-[color:var(--ow-text-3)] line-clamp-2 break-all",children:d})]})]})}var hf="[&_input]:font-[family-name:var(--ow-font-mono)] [&_input]:tabular-nums";function WM({values:e,onChange:t,keyPlaceholder:o="KEY",valuePlaceholder:r="value",maskedPlaceholder:n="\u2022\u2022\u2022\u2022\u2022\u2022\uFF08\u8F93\u5165\u65B0\u503C\u53EF\u66FF\u6362\uFF09",addLabel:a="\u6DFB\u52A0\u4E00\u9879",removeAriaLabel:i="\u79FB\u9664\u8FD9\u4E00\u9879",disabled:d=false,...s}){let l=e.length?e:[{key:"",value:""}];return jsx(x0,{...s,asGroup:true,disabled:d,children:jsxs("div",{"data-ow-part":"rows",className:"flex flex-col gap-2 w-full min-w-0",children:[l.map((c,p)=>jsxs("div",{"data-ow-part":"row",className:"flex items-center gap-2 w-full min-w-0",children:[jsx(te,{className:g("basis-[38%] shrink-0",hf),value:c.key,disabled:d,placeholder:o,"aria-label":`${o} ${p+1}`,onChange:m=>t(l.map((u,b)=>b===p?{key:m,value:u.masked?"":u.value}:u))}),jsx("span",{"aria-hidden":"true",className:"font-[family-name:var(--ow-font-mono)] text-[color:var(--ow-text-3)]",children:"="}),jsx(te,{className:g("flex-1 min-w-0",hf),value:c.masked?"":c.value,disabled:d,placeholder:c.masked?n:r,"aria-label":`${r} ${p+1}`,onChange:m=>t(l.map((u,b)=>b===p?{...u,value:m,masked:false}:u))}),jsx(f,{variant:"ghost",size:"sm",icon:jsx(Q,{}),disabled:d,"aria-label":i,onClick:()=>t(l.filter((m,u)=>u!==p))})]},p)),jsx(f,{variant:"secondary",size:"sm",disabled:d,className:"self-start",icon:jsx(We,{}),onClick:()=>t([...l,{key:"",value:""}]),children:a})]})})}function GM({value:e,options:t,onChange:o,placeholder:r="\u8BF7\u9009\u62E9"}){return jsx(wr,{value:e,options:t,onChange:o,placeholder:r,size:"lg"})}var k0=[[48,48,30],[48,48,8.2],[60.2,20.6,6.7],[41.76,18.66,5.5],[25.71,27.93,4.3],[18.16,44.86,3.3],[75.4,35.8,10.4]];function XM({className:e,...t}){return jsx("svg",{"data-slot":"home-backdrop",viewBox:"0 0 96 96","aria-hidden":"true",focusable:"false",className:g("absolute top-[-24%] right-[-20%] w-[74%] aspect-square pointer-events-none opacity-50",e),...t,children:jsx("g",{fill:"none",stroke:"var(--ow-border)",strokeWidth:"0.2",children:k0.map(([o,r,n])=>jsx("circle",{cx:o,cy:r,r:n},`${o}-${r}-${n}`))})})}function t_({src:e,placeholder:t,caption:o,className:r=""}){return jsx(da,{variant:"media",name:o||t||"image",thumbnail:e,placeholder:t??"image",caption:o,className:r})}var Mn="hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]";async function N0(e){let t=e.name||e.alt||"image";try{let r=await(await fetch(e.src)).blob(),n=URL.createObjectURL(r),a=document.createElement("a");a.href=n,a.download=t,a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(n);}catch{window.open(e.src,"_blank");}}function d_({open:e,images:t,index:o,onIndexChange:r,onClose:n,onDownload:a,onReveal:i,className:d=""}){let[s,l]=useState(o??0),[c,p]=useState(1),[m,u]=useState(0),[b,w]=useState({x:0,y:0}),[v,h]=useState(false),x=useRef(null),k=useRef(null),y=useRef(null),P=Math.min(Math.max(o??s,0),Math.max(t.length-1,0)),N=t[P],S=c>1,R=()=>{p(1),u(0),w({x:0,y:0});},M=E=>{if(!t.length)return;let O=(E+t.length)%t.length;o===void 0&&l(O),r?.(O),R();},T=E=>{!S||E.button!==0||(E.preventDefault(),x.current={x:E.clientX,y:E.clientY,offsetX:b.x,offsetY:b.y},h(true),E.currentTarget.setPointerCapture(E.pointerId));},_=E=>{let O=x.current;O&&w({x:O.offsetX+(E.clientX-O.x),y:O.offsetY+(E.clientY-O.y)});},L=E=>{x.current&&(x.current=null,h(false),E.currentTarget.hasPointerCapture(E.pointerId)&&E.currentTarget.releasePointerCapture(E.pointerId));},I=()=>p(E=>{let O=Math.max(.5,E-.2);return O<=1&&w({x:0,y:0}),O}),$=()=>p(E=>Math.min(3,E+.2)),F=()=>{N&&(a?a(N,P):N0(N));};return useEffect(()=>{if(!e)return;let E=ae=>{if(ae.key==="Escape"){n();return}(ae.key==="ArrowUp"||ae.key==="ArrowLeft")&&M(P-1),(ae.key==="ArrowDown"||ae.key==="ArrowRight")&&M(P+1),ae.key==="Tab"&&k.current&&nl(ae,k.current);};document.addEventListener("keydown",E,true);let O=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",E,true),document.body.style.overflow=O;}},[e,P,t.length,n]),useEffect(()=>{if(!e)return;y.current=document.activeElement??null;let E=k.current;return E&&!E.contains(document.activeElement)&&(E.querySelector(zi)??E).focus(),()=>{y.current?.focus?.();}},[e]),!e||!N?null:jsxs("div",{"data-theme":"dark","data-slot":"image-preview","data-ow-part":"overlay",ref:k,tabIndex:-1,className:g("fixed inset-0 flex items-center justify-center bg-[var(--ow-scrim)] outline-none",d),style:{zIndex:"var(--ow-z-modal)"},role:"dialog","aria-modal":"true","aria-label":"\u67E5\u770B\u56FE\u7247\u9644\u4EF6",onMouseDown:E=>E.target===E.currentTarget&&n(),children:[jsx("div",{"data-ow-part":"stage","data-ow-surface":"mat",className:"w-[min(62vw,760px)] h-[min(72vh,760px)] flex items-center justify-center overflow-hidden bg-[var(--ow-surface-2)] border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-modal)] [&_img]:max-w-full [&_img]:max-h-full [&_img]:object-contain [&_img]:transition-transform [&_img]:[transition-duration:var(--ow-dur-3)] [&_img]:[transition-timing-function:var(--ow-ease-beacon)]",style:{cursor:S?v?"grabbing":"grab":"default"},onPointerDown:T,onPointerMove:_,onPointerUp:L,onPointerCancel:L,children:jsx("img",{src:N.src,alt:N.alt??N.name??"",draggable:false,style:{transform:`translate(${b.x}px, ${b.y}px) scale(${c}) rotate(${m}deg)`,transition:v?"none":void 0}})}),t.length>1&&jsxs("aside",{"data-ow-part":"rail",className:"absolute right-7 top-1/2 -translate-y-1/2 flex flex-col items-center gap-2","aria-label":"\u56FE\u7247\u5217\u8868",children:[jsx(f,{type:"button",variant:"ghost",size:"sm",icon:jsx(Ci,{}),onClick:()=>M(P-1),"aria-label":"\u4E0A\u4E00\u5F20"}),jsx("div",{className:"flex flex-col gap-2 max-h-[60vh] overflow-y-auto [&_button]:relative [&_button]:w-12 [&_button]:h-12 [&_button]:p-0 [&_button]:bg-transparent [&_button]:cursor-pointer [&_button]:overflow-hidden [&_button]:border-2 [&_button]:border-[color:var(--ow-border)] [&_button]:[border-radius:var(--ow-radius-card)] [&_button:hover]:border-[color:var(--ow-border-strong)] [&_button.is-active]:border-[color:var(--ow-control-on)] [&_img]:w-full [&_img]:h-full [&_img]:object-cover",children:t.map((E,O)=>jsxs(f,{type:"button",variant:"unstyled",className:O===P?"is-active":"","aria-current":O===P?"true":void 0,onClick:()=>M(O),"aria-label":`\u67E5\u770B\u7B2C ${O+1} \u5F20\u56FE\u7247`,children:[jsx("img",{src:E.src,alt:""}),jsx("span",{"data-ow-part":"thumb-index","aria-hidden":"true",className:g("absolute left-0 bottom-0 px-1 font-[family-name:var(--ow-font-mono)] text-ow-fs-eyebrow leading-none [font-variant-numeric:tabular-nums] bg-[var(--ow-scrim)] text-[color:var(--ow-text)]",O===P?"font-bold":"font-normal"),children:O+1})]},`${E.src}-${O}`))}),jsx(f,{type:"button",variant:"ghost",size:"sm",icon:jsx(ne,{}),onClick:()=>M(P+1),"aria-label":"\u4E0B\u4E00\u5F20"})]}),jsxs("div",{"data-ow-part":"toolbar",className:"absolute bottom-8 left-1/2 -translate-x-1/2 flex gap-0.5 p-1.5 [border-radius:var(--ow-radius-menu)] bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)] shadow-[var(--ow-shadow-pop)]",children:[jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(Gs,{}),onClick:I,"aria-label":"\u7F29\u5C0F"}),jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(js,{}),onClick:$,"aria-label":"\u653E\u5927"}),jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(Cu,{}),onClick:()=>{u(E=>E+90),w({x:0,y:0});},"aria-label":"\u65CB\u8F6C"}),i&&jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(qe,{}),onClick:()=>i(N,P),"aria-label":"\u5B9A\u4F4D\u5230\u672C\u5730\u76EE\u5F55"}),jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(Co,{}),onClick:F,"aria-label":"\u4E0B\u8F7D"}),jsx(f,{type:"button",variant:"ghost",size:"md",className:Mn,icon:jsx(Q,{}),onClick:n,"aria-label":"\u5173\u95ED"})]}),jsxs("div",{"data-ow-part":"counter",className:"absolute bottom-9 right-7 font-[family-name:var(--ow-font-mono)] text-ow-fs-ui font-medium leading-none [font-variant-numeric:tabular-nums] text-[color:var(--ow-text)]",children:[P+1," / ",t.length]})]})}var S0=/((?:[A-Za-z]:[\\/]|\/)[^\n\r]*?\.[A-Za-z0-9]{1,12})([),\]!?;:,。!?;:、]*)?(?=$|\s|[),\]!?;:,。!?;:、]|\.(?![A-Za-z0-9]))/g,P0="),].!?;:\uFF0C\u3002\uFF01\uFF1F\uFF1B\uFF1A\u3001";function yf(e){let t=[],o=0,r;for(;(r=S0.exec(e))!==null;){let n=r[1]??"";if(!n||!M0(n)||!R0(e,r.index))continue;r.index>o&&t.push({kind:"text",text:e.slice(o,r.index)});let a=r[2]||T0(e,r.index+n.length);t.push({kind:"path",path:n,trailing:a}),o=r.index+n.length+a.length;}return o<e.length&&t.push({kind:"text",text:e.slice(o)}),t.length>0?t:[{kind:"text",text:e}]}function R0(e,t){if(t===0)return true;let o=e[t-1]??"";return /\s/.test(o)||`([{<"'`.includes(o)}function T0(e,t){let o=t;for(;o<e.length&&P0.includes(e[o]??"");)o+=1;return e.slice(t,o)}function M0(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),o=t>=0?e.slice(t+1):e;return /^[^/\\\s].*\.[A-Za-z0-9]{1,12}$/.test(o.trim())}function rs(e){let t=e.trim();if(/^(\/|\.{1,2}\/|#|\?)/.test(t))return t;let o=t.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);if(!o)return t;let r=(o[1]??"").toLowerCase();return r==="http"||r==="https"||r==="mailto"?t:null}function Pc(e,t={}){let o=B0(D0(E0(e.trim())));return o?I0(o)?o:/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(o)?null:A0(o)?o:t.allowRelative?_0(o):null:null}function _0(e){return e.startsWith("//")||e.startsWith("#")||e.startsWith("?")||e.includes("?")||e.includes("#")?null:L0(e)?e:null}function L0(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),o=t>=0?e.slice(t+1):e;return /^[^\s].*\.[A-Za-z0-9]{1,12}$/.test(o.trim())}function D0(e){if(!/^file:\/\//i.test(e))return e;try{let t=new URL(e);return t.protocol!=="file:"||t.hostname?e:decodeURIComponent(t.pathname)}catch{return e}}function E0(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1).trim():e}function I0(e){return /^[A-Za-z]:[\\/]/.test(e)||e.startsWith("\\\\")}function A0(e){return e.startsWith("/")&&!e.startsWith("//")}function B0(e){return e.match(/^(.*\.[A-Za-z0-9]{1,12}):\d+$/)?.[1]??e}function O0(e){let t=e;for(let r=0;r<4;r+=1){let n=t.replace(/\*\*([^*]+)\*\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\*([^*]+)\*/g,"$1").replace(/_([^_]+)_/g,"$1");if(n===t)break;t=n;}let o=t.trim();return /^[*_`\s]*$/.test(o)?"":o}function ul(e,t){return O0(e)||V0(t)}function V0(e){return e.replace(/\\/g,"/").split("/").filter(Boolean).at(-1)||e}var kf=/(^|[^!])\[([^\]]+)\]\(([^)]+)\)/g;function Cf(e,t,o,r={}){kf.lastIndex=0;let n;for(;(n=kf.exec(e))!==null;){let a=Pc(n[3]??"",r);if(a){if(t.has(a))continue;t.add(a),o.push({name:ul(n[2]??"",a),path:a});continue}let i=rs(n[3]??"");!i||!/^https?:\/\//i.test(i)||t.has(i)||(t.add(i),o.push({name:ul(n[2]??"",i),path:i,badge:"URL",typeLabel:"\u7F51\u7AD9"}));}}var ml=/^\s{0,3}>\s?/,z0=new Set(["bash","sh","zsh","shell","shellscript"]);function H0(e){return !!(e&&z0.has(e.toLowerCase()))}function Mf(e){let{onLocalFileOpen:t,onLocalPathClick:o}=e;if(t)return (r,n)=>t({name:ul(n??"",r),path:r});if(o)return r=>o(r)}function W0(e){return {allowRelative:!!e.localPathBaseDir}}function U0(e){let t=e.replace(/\r\n/g,`
|
|
8
8
|
`).split(`
|
|
9
9
|
`),o=[],r=0;for(;r<t.length;){let n=t[r]??"";if(n.trimStart().startsWith("```")){let s=n.trimStart().slice(3).trim().split(/\s+/)[0]||void 0,l=[];for(r+=1;r<t.length&&!(t[r]??"").trimStart().startsWith("```");)l.push(t[r]??""),r+=1;r+=1,o.push({kind:"code",text:l.join(`
|
|
10
|
-
`),language:s});continue}if(n.trim()===""){r+=1;continue}let a=n.match(/^(#{1,6})\s+(.*)$/);if(a){o.push({kind:"heading",level:a[1]?.length??1,text:a[2]??""}),r+=1;continue}if(ul.test(n)){let s=[];for(;r<t.length&&ul.test(t[r]??"");)s.push((t[r]??"").replace(ul,"")),r+=1;let l=[],c=[];for(let p of s)p.trim()===""?(c.length>0&&l.push(c.join(" ")),c=[]):c.push(p);c.length>0&&l.push(c.join(" ")),o.push({kind:"quote",paragraphs:l});continue}if(Cf(t,r)){let s=rs(t[r]??""),l=W0(rs(t[r+1]??""),s.length),c=[];for(r+=2;r<t.length&&Sc(t[r]??"");)c.push(H0(rs(t[r]??""),s.length)),r+=1;o.push({kind:"table",headers:s,rows:c,aligns:l});continue}if(/^\s*([-*]|\d+\.)\s+/.test(n)){let s=/^\s*\d+\.\s+/.test(n),l=[];for(;r<t.length&&/^\s*([-*]|\d+\.)\s+/.test(t[r]??"");)l.push((t[r]??"").replace(/^\s*([-*]|\d+\.)\s+/,"")),r+=1;o.push({kind:"list",ordered:s,items:l});continue}let i=$0(t,r);if(i){o.push({kind:"imageGallery",images:i.images}),r=i.nextIndex;continue}let d=[];for(;r<t.length&&(t[r]??"").trim()!==""&&!(t[r]??"").trimStart().startsWith("```")&&!/^#{1,6}\s+/.test(t[r]??"")&&!Cf(t,r)&&!ul.test(t[r]??"")&&!/^\s*([-*]|\d+\.)\s+/.test(t[r]??"");)d.push(t[r]??""),r+=1;o.push({kind:"para",text:d.join(" ")});}return o}function $0(e,t){let o=[],r=t;for(;r<e.length;){let n=e[r]??"";if(n.trim()===""){let i=z0(e,r+1);if(o.length>0&&i>=0&&kf(e[i]??"")){r+=1;continue}break}let a=kf(n);if(!a)break;o.push(a),r+=1;}return o.length>0?{images:o,nextIndex:r}:null}function z0(e,t){for(let o=t;o<e.length;o+=1)if((e[o]??"").trim()!=="")return o;return -1}function kf(e){let t=e.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);return t?{alt:t[1]??"",target:t[2]??""}:null}function Cf(e,t){let o=e[t]??"",r=e[t+1]??"";if(!Sc(o)||!Sc(r))return false;let n=rs(o),a=rs(r);return n.length>0&&a.length>=n.length&&a.slice(0,n.length).every(i=>/^:?-{3,}:?$/.test(i.trim()))}function Sc(e){return e.includes("|")&&e.trim()!==""}function rs(e){return e.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(o=>o.trim())}function H0(e,t){return Array.from({length:t},(o,r)=>e[r]??"")}function W0(e,t){return Array.from({length:t},(o,r)=>{let n=e[r]?.trim()??"";return n.startsWith(":")&&n.endsWith(":")?"center":n.endsWith(":")?"right":"left"})}function _n(e,t={}){let o=[],r=Pf(t),n=/(\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*|_([^_]+)_|!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(https?:\/\/[^\s<>()]+))/g,a=0,i=0,d;for(;(d=n.exec(e))!==null;){if(d.index>a&&o.push(...Ln(e.slice(a,d.index),i++,r)),d[2]!==void 0)o.push(jsx("strong",{children:Ln(d[2],i++,r)},i++));else if(d[3]!==void 0)o.push(jsx("code",{children:d[3]},i++));else if(d[4]!==void 0)o.push(jsx("em",{children:Ln(d[4],i++,r)},i++));else if(d[5]!==void 0)o.push(jsx("em",{children:Ln(d[5],i++,r)},i++));else if(d[6]!==void 0&&d[7]!==void 0)o.push(jsx(Rf,{alt:d[6],target:d[7],openLocalPath:r,onLocalImagePreview:t.onLocalImagePreview,localPathBaseDir:t.localPathBaseDir},i++));else if(d[8]!==void 0&&d[9]!==void 0){let s=Nc(d[9],V0(t)),l=s?null:ts(d[9]),c=d[8];o.push(s&&r?jsx(f,{variant:"unstyled",type:"button",className:"md__local-path",title:s,onClick:()=>r(s,c),children:Dn(c,i++)},i++):l?jsx("a",{href:l,target:"_blank",rel:"noreferrer noopener",children:Dn(c,i++)},i++):jsx(Fragment$1,{children:Dn(c,i++)},i++));}else if(d[10]!==void 0){let{href:s,trailing:l}=q0(d[10]),c=ts(s);o.push(c?jsx("a",{href:c,target:"_blank",rel:"noreferrer noopener",children:s},i++):jsx(Fragment$1,{children:s},i++)),l&&o.push(...Ln(l,i++,r));}a=d.index+d[0].length;}return a<e.length&&o.push(...Ln(e.slice(a),i++,r)),o}function Dn(e,t){let o=[],r=/(\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*|_([^_]+)_)/g,n=0,a=t,i;for(;(i=r.exec(e))!==null;)i.index>n&&o.push(...as(e.slice(n,i.index),a++)),i[2]!==void 0?o.push(jsx("strong",{children:Dn(i[2],a++)},`lb-${a++}`)):i[3]!==void 0?o.push(jsx("code",{children:i[3]},`lb-${a++}`)):i[4]!==void 0?o.push(jsx("em",{children:Dn(i[4],a++)},`lb-${a++}`)):i[5]!==void 0&&o.push(jsx("em",{children:Dn(i[5],a++)},`lb-${a++}`)),n=i.index+i[0].length;return n<e.length&&o.push(...as(e.slice(n),a++)),o}function Rf({alt:e,target:t,openLocalPath:o,onLocalImagePreview:r,localPathBaseDir:n,variant:a="inline"}){let i=t.trim(),[d,s]=useState(null),l=Y0(i),c=!l&&Nf(i)&&!!r,p=a==="gallery"?"md__image md__image--gallery":"md__image",m=a==="gallery"?"md__image-button md__image-button--gallery":"md__image-button";if(useEffect(()=>{if(!c||!r){s(null);return}let v=false;return s(null),r(i).then(w=>{v||s(w?.kind==="image"?w:null);}).catch(()=>{v||s(null);}),()=>{v=true;}},[i,r,c]),l)return jsx("img",{className:p,src:l,alt:e});if(d)return jsx(f,{variant:"unstyled",type:"button",className:m,title:e||d.name,"data-md-image-target":i,"data-md-image-base-dir":n||void 0,"data-md-image-name":e||d.name,onClick:()=>o?.(i,e),children:jsx("img",{className:p,src:d.url,alt:e||d.name})});let u=e||i;return o&&Nf(i)?jsx(f,{variant:"unstyled",type:"button",className:"md__image-fallback",title:i,onClick:()=>o(i,e),children:u}):jsx("span",{className:"md__image-fallback",children:u})}function U0({images:e,options:t}){let o=Pf(t);return jsx("div",{className:`md__image-gallery md__image-gallery--${K0(e.length)}`,"data-image-count":e.length,children:e.map((r,n)=>jsx(Rf,{alt:r.alt,target:r.target,openLocalPath:o,onLocalImagePreview:t.onLocalImagePreview,localPathBaseDir:t.localPathBaseDir,variant:"gallery"},`${r.target}-${n}`))})}function K0(e){return e<=1?"count-1":e===2?"count-2":e===3?"count-3":"count-many"}function Ln(e,t,o){return o?j0(e,t,o):as(e,t)}function j0(e,t,o){let r=[],n=t;for(let a of wf(e)){if(a.kind==="text"){r.push(...as(a.text,n++));continue}r.push(jsx(f,{variant:"unstyled",type:"button",className:"md__local-path",title:a.path,onClick:()=>o(a.path),children:a.path},`path-${n++}`)),a.trailing&&r.push(...as(a.trailing,n++));}return r}function G0(e,t){let o=new Set,r=[],n=a=>xf(a,o,r,t);for(let a of e)a.kind==="code"||a.kind==="imageGallery"||((a.kind==="heading"||a.kind==="para")&&n(a.text),a.kind==="list"&&a.items.forEach(n),a.kind==="quote"&&a.paragraphs.forEach(n),a.kind==="table"&&(a.headers.forEach(n),a.rows.forEach(i=>i.forEach(n))));return r}function as(e,t){let o=[],r=/:([a-zA-Z0-9_+-]+):/g,n=0,a=t,i;for(;(i=r.exec(e))!==null;){i.index>n&&o.push(jsx(Fragment$1,{children:e.slice(n,i.index)},`t-${a++}`));let d=Z0[i[1]??""];o.push(jsx(Fragment$1,{children:d??i[0]},`t-${a++}`)),n=i.index+i[0].length;}return n<e.length&&o.push(jsx(Fragment$1,{children:e.slice(n)},`t-${a++}`)),o}var Z0={smile:"\u{1F604}",smiley:"\u{1F603}",grinning:"\u{1F600}",joy:"\u{1F602}",blush:"\u{1F60A}",wink:"\u{1F609}",thinking:"\u{1F914}",rocket:"\u{1F680}",tada:"\u{1F389}",sparkles:"\u2728",fire:"\u{1F525}",warning:"\u26A0\uFE0F",white_check_mark:"\u2705",check:"\u2705",x:"\u274C",cross_mark:"\u274C",memo:"\u{1F4DD}",bulb:"\u{1F4A1}",link:"\u{1F517}",book:"\u{1F4D6}",calendar:"\u{1F4C5}",clock:"\u{1F552}",robot:"\u{1F916}",eyes:"\u{1F440}",point_right:"\u{1F449}",point_left:"\u{1F448}",thumbsup:"\u{1F44D}",thumbsdown:"\u{1F44E}"};function q0(e){let t=e.match(/^(.*?)([.,!?;:,。!?;:、]+)?$/);return {href:t?.[1]||e,trailing:t?.[2]||""}}function Y0(e){let t=ts(e);return t&&/^https?:\/\//i.test(t)?t:null}function Nf(e){return /\.(png|jpe?g|gif|webp|bmp|svg|heic|heif|tiff?)(?:[?#].*)?$/i.test(e.trim())}function ns({source:e,className:t,onLocalPathClick:o,onLocalFileCardOpen:r,onRequestLocalFileOpenWithOptions:n,onLocalFileCardOpenWith:a,onLocalFileCardOpenWithMenu:i,onLocalImagePreview:d,localPathBaseDir:s,onRunCommand:l}){let c=useMemo(()=>F0(e),[e]),p={onLocalPathClick:o,onLocalFileOpen:r,onLocalImagePreview:d,localPathBaseDir:s},m=useMemo(()=>o?G0(c,{allowRelative:!!s}):[],[c,s,o]);return jsxs("div",{className:t?`md ${t}`:"md",children:[c.map((u,v)=>{if(u.kind==="heading"){let w=`h${Math.min(u.level,6)}`;return jsx(w,{children:_n(u.text,p)},v)}if(u.kind==="code"){let w=l&&O0(u.language);return jsx(nl,{language:u.language||"text",onRun:w?()=>l(u.text):void 0,children:u.text},v)}if(u.kind==="list"){let w=u.items.map((b,h)=>jsx("li",{children:_n(b,p)},h));return u.ordered?jsx("ol",{children:w},v):jsx("ul",{children:w},v)}return u.kind==="table"?jsx("div",{className:"md__table-wrap",children:jsxs("table",{children:[jsx("thead",{children:jsx("tr",{children:u.headers.map((w,b)=>jsx("th",{className:`al-${u.aligns[b]??"left"}`,children:_n(w,p)},b))})}),jsx("tbody",{children:u.rows.map((w,b)=>jsx("tr",{children:w.map((h,x)=>jsx("td",{className:`al-${u.aligns[x]??"left"}`,children:_n(h,p)},x))},b))})]})},v):u.kind==="quote"?jsx("blockquote",{children:u.paragraphs.map((w,b)=>jsx("p",{children:_n(w,p)},b))},v):u.kind==="imageGallery"?jsx(U0,{images:u.images,options:p},v):jsx("p",{children:_n(u.text,p)},v)}),o&&m.length>0&&jsx(xn,{layout:"stack",className:"md-file-cards","aria-label":"\u672C\u5730\u6587\u4EF6\u5F15\u7528",children:m.map(u=>jsx(ia,{variant:"card",name:u.name,path:u.path,meta:u.typeLabel??"",onOpen:()=>(r??(v=>o(v.path)))(u),onNativeActionsMenu:i?()=>i(u):void 0,onRequestActions:n?()=>n(u):void 0,onAction:a?v=>a(u,v):void 0},u.id??u.path))})]})}function Tf({className:e="",content:t="",html:o,fileName:r,loading:n,showLineNumbers:a=false,rawMode:i=false,onRawModeChange:d,bare:s=false,children:l,...c}){return jsxs("div",{"data-slot":"md-preview","data-ow-chrome":s?"bare":"card",className:g("flex flex-col w-full h-full overflow-hidden",s?"bg-transparent":"[border-radius:var(--ow-radius-card)] border border-[color:var(--ow-border)] bg-[var(--ow-bg)]",e),...c,children:[!s&&jsxs("div",{"data-ow-part":"header",className:"flex items-center justify-between py-2.5 px-3.5 border-b border-ow-border flex-shrink-0",children:[jsxs("div",{"data-ow-part":"filename",className:"flex items-center gap-2 font-medium text-ow-fs-ui leading-none text-ow-text",children:[jsx(qo,{name:r||"document.md",className:"text-ow-text-3 flex-shrink-0",width:16,height:16}),jsx("span",{children:r||"document.md"})]}),d&&jsx(uo,{className:"flex-shrink-0",size:"sm",items:[{key:"preview",label:"\u9884\u89C8"},{key:"raw",label:"\u6E90\u7801"}],activeKey:i?"raw":"preview",onChange:p=>d(p==="raw")})]}),jsxs("div",{"data-ow-part":"body",className:g("flex-1 min-h-0 overflow-y-auto",s?"p-0":"py-3 px-3.5"),children:[!t&&!o?jsx("div",{"data-ow-part":"empty",className:"flex items-center justify-center h-full",children:n||jsx(F,{message:"\u6682\u65E0\u5185\u5BB9"})}):i?jsx("pre",{"data-ow-part":"raw",className:"m-0 font-normal text-ow-fs-ui leading-[1.6] font-[family-name:var(--ow-font-mono)] text-ow-text whitespace-pre-wrap break-words",children:a?t.split(`
|
|
11
|
-
`).map((p,m)=>jsxs("div",{"data-ow-part":"line",className:"flex gap-3",children:[jsx("span",{"data-ow-part":"line-num",className:"flex-shrink-0 w-8 text-right tabular-nums text-ow-text-3 select-none",children:m+1}),jsx("code",{children:p})]},m)):jsx("code",{children:t})}):o?jsx("div",{"data-ow-part":"rendered",className:"ow-md-rendered",dangerouslySetInnerHTML:{__html:o}}):jsx("div",{"data-ow-part":"rendered",className:"ow-md-rendered",children:jsx("pre",{style:{whiteSpace:"pre-wrap",fontFamily:"var(--ow-font-sans)"},children:t})}),l]})]})}var Pc="shrink-0";function En({open:e,fileName:t,meta:o,monoTitle:r=true,surface:n="plain",children:a,loading:i=false,error:d,errorDetail:s,emptyMessage:l="\u8FD9\u4E2A\u6587\u4EF6\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u5185\u5BB9\u3002",onDownload:c,openWithOptions:p,onOpenWith:m,openWithLabel:u="\u6253\u5F00\u65B9\u5F0F",actions:v,onClose:w,width:b,contentHeight:h,className:x=""}){let k=useId(),y=!!p?.length,P=(p??[]).map(M=>M.kind==="divider"?{...Va,key:M.id}:M.kind==="header"?{type:"group",key:M.id,label:M.name}:{key:M.id,label:M.name,hint:M.isDefault?"\u9ED8\u8BA4":void 0,disabled:M.disabled}),N=a!=null&&a!==false,S;i?S=jsxs("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"flex flex-col gap-3 p-6",children:[jsx(re,{variant:"line",height:20,width:"42%"}),jsx(re,{variant:"line",height:14}),jsx(re,{variant:"line",height:14}),jsx(re,{variant:"line",height:14,width:"76%"}),jsx(re,{variant:"block",height:180})]}):d?S=jsx("div",{"data-ow-part":"error",className:"p-6",children:jsx(J,{variant:"error",detail:s,children:d})}):N?S=a:S=jsx("div",{"data-ow-part":"empty",className:"flex h-full items-center justify-center p-6",children:jsx(F,{message:l})});let R=i||d||!N?"plain":n;return jsxs(oe,{open:e,bare:true,onClose:w,ariaLabel:t,width:b??"min(920px, 90vw)",className:`flex flex-col overflow-hidden ${x}`,children:[jsxs("header",{"data-ow-part":"titlebar",className:"flex shrink-0 items-center gap-3 px-4",style:{height:"var(--ow-titlebar-h)"},children:[jsx("span",{id:k,"data-ow-part":"filename",title:t,className:`min-w-0 flex-1 truncate text-ow-fs-ui font-medium text-[color:var(--ow-text)] ${r?"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]":""}`,children:t}),o&&jsx("span",{"data-ow-part":"meta",className:"shrink-0 font-[family-name:var(--ow-font-mono)] text-ow-fs-eyebrow [font-variant-numeric:tabular-nums] text-[color:var(--ow-text-3)]",children:o}),jsxs("div",{"data-ow-part":"actions",className:"flex shrink-0 items-center gap-1",children:[v,c&&jsx(f,{type:"button",variant:"ghost",size:"sm",className:Pc,icon:jsx(Co,{"aria-hidden":"true"}),"aria-label":"\u4E0B\u8F7D",title:"\u4E0B\u8F7D",onClick:c}),y&&jsx(co,{items:P,width:220,ariaLabel:u,onSelect:M=>{let T=p?.find(_=>_.id===M);T&&m?.(T);},trigger:jsx(f,{type:"button",variant:"ghost",size:"sm",className:Pc,children:u})}),jsx(f,{type:"button",variant:"ghost",size:"sm",className:Pc,icon:jsx(Q,{"aria-hidden":"true"}),"aria-label":"\u5173\u95ED\u9884\u89C8",title:"\u5173\u95ED\u9884\u89C8",onClick:w})]})]}),jsx(Q0,{surface:R,height:h,children:S})]})}function Q0({surface:e="plain",height:t,children:o,className:r=""}){let n={height:t??"min(640px, 70vh)"};return e==="paper"?jsx("div",{"data-ow-part":"content","data-ow-surface":"paper",className:`min-h-0 flex-1 overflow-auto bg-[var(--ow-bg)] p-6 ${r}`,style:n,children:jsx("div",{"data-theme":"light","data-ow-part":"paper",className:"mx-auto w-full max-w-[760px] border border-[color:var(--ow-border)] bg-[var(--ow-paper)] text-[color:var(--ow-text)] [border-radius:var(--ow-radius-card)]",style:{padding:"var(--ow-space-8)"},children:o})}):e==="mat"?jsx("div",{"data-theme":"dark","data-ow-part":"content","data-ow-surface":"mat",className:`flex min-h-0 flex-1 items-center justify-center overflow-auto bg-[var(--ow-surface-2)] text-[color:var(--ow-text)] ${r}`,style:n,children:o}):jsx("div",{"data-ow-part":"content","data-ow-surface":"plain",className:`flex min-h-0 flex-1 flex-col overflow-auto bg-[var(--ow-bg)] ${r}`,style:n,children:o})}function Lf({source:e,preview:t,onClose:o,onCopy:r}){let[n,a]=useState("preview"),[i,d]=useState(false);return jsx(En,{open:true,fileName:"\u6D88\u606F\u5185\u5BB9",monoTitle:false,surface:n==="preview"?"paper":"plain",onClose:o,actions:jsxs(Fragment,{children:[jsx(Ht,{"aria-label":"\u9884\u89C8\u65B9\u5F0F",size:"sm",value:n,onChange:l=>a(l),options:[{value:"preview",label:"\u9884\u89C8"},{value:"markdown",label:"Markdown"}]}),jsxs(f,{variant:"ghost",size:"sm",type:"button",onClick:async()=>{try{r?await r(e):await navigator.clipboard.writeText(e),d(!0),window.setTimeout(()=>d(!1),2e3);}catch{}},children:[i?jsx(be,{"aria-hidden":"true"}):jsx(Tt,{"aria-hidden":"true"}),jsx("span",{children:i?"\u5DF2\u590D\u5236":"\u590D\u5236"})]})]}),children:n==="preview"?jsx("div",{"data-ow-part":"content",children:t}):jsx("pre",{"data-ow-part":"source",className:"m-0 overflow-auto whitespace-pre-wrap break-words p-4 font-[family-name:var(--ow-font-mono)] text-ow-fs-ui font-normal leading-[1.6] text-[color:var(--ow-text-2)]",children:jsx("code",{children:e})})})}var ey=[{code:"misunderstanding",label:"\u7406\u89E3\u9519\u8BEF"},{code:"wrong_context",label:"\u4E0A\u4E0B\u6587\u9519\u8BEF"},{code:"unclear",label:"\u56DE\u7B54\u4E0D\u6E05\u6670"},{code:"code_error",label:"\u4EE3\u7801\u9519\u8BEF"},{code:"unprofessional",label:"\u56DE\u7B54\u4E0D\u4E13\u4E1A"},{code:"code_format",label:"\u4EE3\u7801\u683C\u5F0F\u9519\u8BEF"},{code:"other",label:"\u5176\u4ED6"}];function If({onClose:e,onSubmit:t,productName:o="Orbitwork"}){let[r,n]=useState(new Set),[a,i]=useState(""),d=l=>{n(c=>{let p=new Set(c);return p.has(l)?p.delete(l):p.add(l),p});},s=()=>{r.size!==0&&t({reasons:[...r],detail:a.trim()});};return jsx(oe,{open:true,width:500,title:"\u8BF7\u9009\u62E9\u4E0D\u6EE1\u610F\u7684\u539F\u56E0",onClose:e,actions:jsx(f,{variant:"primary",size:"lg",className:"w-full",disabled:r.size===0,onClick:s,children:"\u63D0\u4EA4\u53CD\u9988"}),children:jsxs("div",{className:"flex flex-col gap-5",children:[jsx("div",{"data-ow-part":"reasons",className:"flex flex-wrap gap-2.5",role:"group","aria-label":"\u4E0D\u6EE1\u610F\u7684\u539F\u56E0",children:ey.map(({code:l,label:c})=>{let p=r.has(l);return jsx(f,{type:"button",variant:"secondary",size:"md","aria-pressed":p,"data-ow-state":p?"on":void 0,icon:p?jsx(be,{"aria-hidden":"true"}):void 0,className:g(p&&"bg-[var(--ow-control-on)] text-[color:var(--ow-control-on-glyph)] border-[color:var(--ow-control-on)] hover:bg-[var(--ow-control-on)] active:bg-[var(--ow-control-on)]"),onClick:()=>d(l),children:c},l)})}),jsx(te,{multiline:true,placeholder:"\u5206\u4EAB\u8BE6\u7EC6\u4FE1\u606F\uFF08\u53EF\u9009\uFF09",value:a,onChange:i,rows:3,maxLength:2e3}),jsxs("p",{className:"m-0 text-[color:var(--ow-text-3)] font-normal text-ow-fs-ui leading-[1.5] font-[family-name:var(--ow-font-sans)]",children:["\u4F60\u7684\u5BF9\u8BDD\u5185\u5BB9\u5C06\u4E0E\u53CD\u9988\u4E00\u540C\u63D0\u4EA4\uFF0C\u4EE5\u5E2E\u52A9\u6539\u8FDB ",o]})]})})}function Af({message:e,retrying:t=false,compact:o=false,onRetry:r}){let n=e?.trim()||void 0;return jsxs(J,{className:`model-catalog-error${o?" model-catalog-error--compact":""}`,variant:"error",title:"\u6A21\u578B\u5217\u8868\u52A0\u8F7D\u5931\u8D25",action:jsx(f,{variant:o?"text":"secondary",size:"sm",icon:jsx(We,{}),onClick:r,disabled:t,"aria-busy":t,children:t?"\u91CD\u8BD5\u4E2D\u2026":"\u91CD\u8BD5"}),children:[jsx("span",{className:"model-catalog-error__message",children:"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u540E\u91CD\u8BD5"}),n&&jsx("span",{className:"model-catalog-error__detail",title:n,children:n})]})}function Vf({inputModalities:e,outputModalities:t,className:o=""}){let r=Of(e),n=Of(t);return r.length===0&&n.length===0?null:jsxs("span",{"data-slot":"model-modalities",className:g("inline-flex items-center gap-0.5 align-middle",o),title:`\u8F93\u5165\uFF1A${r.map(Rc).join("\u3001")}\uFF1B\u8F93\u51FA\uFF1A${n.map(Rc).join("\u3001")}`,children:[jsx("span",{"data-ow-part":"group",className:"inline-flex items-center gap-0.5","aria-label":"\u8F93\u5165\u6A21\u6001",children:r.map(a=>jsx(Bf,{modality:a},`in-${a}`))}),jsx("span",{"data-ow-part":"arrow",className:"text-ow-text-3 font-medium text-ow-fs-body-sm leading-none px-px","aria-hidden":"true",children:"\u2192"}),jsx("span",{"data-ow-part":"group",className:"inline-flex items-center gap-0.5","aria-label":"\u8F93\u51FA\u6A21\u6001",children:n.map(a=>jsx(Bf,{modality:a},`out-${a}`))})]})}var oy="bg-[var(--ow-mention-bg)] text-[color:var(--ow-mention-text)]";function Bf({modality:e}){return jsx("span",{"data-slot":"model-modality","data-variant":e,className:g("w-[18px] h-[18px] rounded-[var(--ow-radius-tag)] inline-flex items-center justify-center leading-none","[&_svg]:w-3.5 [&_svg]:h-3.5",oy),"aria-label":Rc(e),children:ay(e)})}function Of(e){let t=[];for(let o of e??[]){let r=o.toLowerCase().replace(/^modality_/,"").replace(/^model_modality_/,"").replace(/^content_modality_/,"").replace(/^input_/,"").replace(/^output_/,"");ry(r)&&!t.includes(r)&&t.push(r);}return t}function ry(e){return e==="text"||e==="image"||e==="video"||e==="audio"}function ay(e){return e==="text"?jsx(ku,{"aria-hidden":"true"}):e==="image"?jsx(Cu,{"aria-hidden":"true"}):e==="video"?jsx(Nu,{"aria-hidden":"true"}):jsx(Su,{"aria-hidden":"true"})}function Rc(e){return {text:"\u6587\u672C",image:"\u56FE\u7247",video:"\u89C6\u9891",audio:"\u97F3\u9891"}[e]}function iy({message:e}){return jsx(F,{message:e,variant:"text"})}function Ff({options:e,value:t,onSelect:o,selectedOptionRef:r,empty:n,emptyMessage:a="\u6682\u65E0\u5339\u914D\u7684\u6A21\u578B",density:i="default",className:d=""}){return jsx("div",{"data-slot":"model-picker-list","data-density":i,className:["cpop__scroll","model-picker-list",i==="compact"&&"model-picker-list--compact",d].filter(Boolean).join(" "),children:e.length===0?n??jsx(iy,{message:a}):e.map(s=>{let l=!s.disabled&&s.id===t,c=sy(s.multiplier),p=[s.disabled&&"disabled",l&&"selected"].filter(Boolean).join(" ");return jsxs(f,{variant:"unstyled","data-slot":"model-option","data-ow-state":p||void 0,"aria-current":l||void 0,className:["modelopt",l&&"active",s.disabled&&"modelopt--locked"].filter(Boolean).join(" "),disabled:s.disabled,onClick:()=>o(s.id),children:[jsxs("span",{ref:l?r:void 0,className:"meta",children:[jsxs("span",{className:"n model-title",children:[jsx("span",{className:"model-title__name",children:s.name}),(s.recommended||s.inputModalities||s.outputModalities)&&jsxs("span",{className:"model-title__badges",children:[s.recommended&&jsx(at,{children:"\u63A8\u8350"}),jsx(Vf,{inputModalities:s.inputModalities,outputModalities:s.outputModalities})]})]}),s.secondaryText&&jsx("span",{className:"s",children:s.secondaryText})]}),(c||s.trailing||l)&&jsxs("span",{className:"modelopt__trailing",children:[c&&jsx("span",{className:"modelopt__multiplier",children:c}),s.trailing&&jsx("span",{className:"ck",children:s.trailing}),jsx("span",{className:"modelopt__check","data-ow-state":l?"on":"off","aria-hidden":"true",children:l?jsx(be,{}):null})]})]},s.id??"__clear__")})})}function sy(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?null:`\xD7${Number(e.toFixed(4))}`}function $f({open:e,selectedKey:t,query:o,itemCount:r}){let n=useRef(null),a=useCallback(i=>{n.current=i;},[]);return useEffect(()=>{if(!e||!t||o.trim())return;let i=requestAnimationFrame(()=>{n.current?.scrollIntoView({block:"center",inline:"nearest"});});return ()=>cancelAnimationFrame(i)},[r,e,o,t]),a}function An({value:e,options:t,onChange:o,placeholder:r="\u9009\u62E9\u6A21\u578B",allowClear:n=false,emptyLabel:a="\u6682\u65E0\u53EF\u7528\u6A21\u578B"}){let[i,d]=useState(false),[s,l]=useState(""),c=useRef(null),p=useRef(null),m=t.find(k=>k.id===e)??null,u=t.length===0,v=()=>{d(false),l("");};useEffect(()=>{if(!i)return;let k=P=>{let N=P.target;c.current?.contains(N)||p.current?.contains(N)||v();},y=P=>{P.key==="Escape"&&v();};return document.addEventListener("pointerdown",k,true),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",k,true),document.removeEventListener("keydown",y);}},[i]);let w=s.trim().toLowerCase(),b=w?t.filter(k=>`${k.name} ${k.id}`.toLowerCase().includes(w)):t,h=[...n&&(!w||"\u4E0D\u8BBE\u7F6E".includes(w))?[{id:null,name:"\u4E0D\u8BBE\u7F6E"}]:[],...b.map(({id:k,name:y,recommended:P,inputModalities:N,outputModalities:S,multiplier:R})=>({id:k,name:y,recommended:P,inputModalities:N,outputModalities:S,multiplier:R}))],x=$f({open:i,selectedKey:e,query:s,itemCount:h.length});return jsxs("div",{ref:c,style:{position:"relative"},children:[jsx(Yd,{open:i,size:"md",disabled:u,className:"min-w-[200px]",onClick:()=>{u||(d(k=>!k),l(""));},children:m?m.name:u?a:jsx("span",{className:"text-[color:var(--ow-placeholder)]",children:r})}),i&&jsx(pt,{className:"model-dropdown",surfaceRef:p,width:288,portal:c,searchable:t.length>6,searchValue:s,onSearchChange:l,searchPlaceholder:"\u641C\u7D22\u6A21\u578B",contentKey:h.length,children:jsx(Ff,{options:h,value:e,selectedOptionRef:x,onSelect:k=>{o(k),v();},emptyMessage:"\u6682\u65E0\u5339\u914D\u7684\u6A21\u578B"})})]})}function va({title:e,titleTier:t="default",eyebrow:o,description:r,actions:n,divider:a=true,children:i,className:d,...s}){let l=useId();return jsxs("section",{"data-slot":"section","data-ow-state":a?"divided":void 0,"aria-labelledby":l,...s,className:g("flex flex-col min-w-0",a&&"pb-5 border-b border-ow-border",d),children:[jsxs("div",{"data-ow-part":"head",className:"flex items-start gap-3 min-w-0",children:[jsxs("div",{className:"flex-1 min-w-0",children:[o&&jsx("div",{"data-ow-part":"eyebrow",className:"mb-1.5 font-medium text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)] leading-none text-[color:var(--ow-eyebrow)]",children:o}),jsx("h3",{id:l,"data-ow-part":"title","data-ow-tier":t,className:g("m-0 leading-tight font-[family-name:var(--ow-font-sans)]",t==="eyebrow"?"font-medium text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)] text-[color:var(--ow-eyebrow)]":"font-semibold text-ow-fs-ui text-ow-text"),children:e}),r&&jsx("p",{"data-ow-part":"description",className:"mt-1.5 mb-0 text-[length:var(--ow-fs-body-sm,12px)] leading-normal text-[color:var(--ow-text-2)]",children:r})]}),n&&jsx("div",{"data-ow-part":"actions",className:"flex flex-shrink-0 items-center gap-2",children:n})]}),i!=null&&jsx("div",{"data-ow-part":"body",className:"mt-3 min-w-0",children:i})]})}var fy=[{value:"standard",label:"\u6807\u51C6"},{value:"deep",label:"\u6DF1\u5EA6\u601D\u8003"},{value:"max",label:"\u6781\u9650\u601D\u8003"}];function SL(e){return e.loadFailed&&e.onRetry?jsx(Af,{message:e.loadError,retrying:e.retrying,onRetry:e.onRetry}):e.available?jsx(va,{title:"\u9ED8\u8BA4\u6A21\u578B",titleTier:"eyebrow",divider:false,children:jsxs("div",{className:"flex flex-col gap-0",children:[jsx(dt,{title:"\u9ED8\u8BA4\u6A21\u578B",description:"\u65E5\u5E38\u5BF9\u8BDD\u4E0E\u4EFB\u52A1\u4F7F\u7528\u7684\u6A21\u578B",className:"set-row",action:jsx(An,{value:e.defaultModel,options:e.defaultModelOptions,onChange:t=>{t&&e.onDefaultModelChange(t);}})}),jsx(dt,{title:"\u56FE\u7247\u6A21\u578B",description:"\u56FE\u50CF\u751F\u6210\u4E0E\u7F16\u8F91\u4F7F\u7528\u7684\u6A21\u578B",className:"set-row",action:jsx(An,{value:e.imageModel,options:e.imageModelOptions,onChange:e.onImageModelChange,allowClear:true,placeholder:"\u9009\u62E9\u56FE\u7247\u6A21\u578B",emptyLabel:"\u6682\u65E0\u53EF\u7528\u7684\u56FE\u7247\u6A21\u578B"})}),jsx(dt,{title:"\u89C6\u89C9\u6A21\u578B",description:"\u56FE\u7247\u5185\u5BB9\u7406\u89E3\u4F7F\u7528\u7684\u6A21\u578B",className:"set-row",action:jsx(An,{value:e.visionModel,options:e.visionModelOptions,onChange:e.onVisionModelChange,allowClear:true,placeholder:"\u9009\u62E9\u89C6\u89C9\u6A21\u578B",emptyLabel:"\u6682\u65E0\u53EF\u7528\u7684\u89C6\u89C9\u6A21\u578B"})}),e.onEffortChange&&jsx(dt,{title:"\u601D\u8003\u5F3A\u5EA6",description:"\u5F71\u54CD\u63A8\u7406\u94FE\u957F\u5EA6\u4E0E\u8017\u65F6",className:"set-row",action:jsx(Ht,{size:"sm",options:fy,value:e.effort??"standard",onChange:t=>e.onEffortChange?.(t),"aria-label":"\u601D\u8003\u5F3A\u5EA6"})})]})}):jsx(va,{title:"\u9ED8\u8BA4\u6A21\u578B",titleTier:"eyebrow",divider:false,children:jsx(F,{message:`\u6682\u65E0\u53EF\u7528\u6A21\u578B\u6743\u76CA\u3002${e.unavailableReason}`})})}var Cr=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("input",{ref:n,className:[!t&&"ow-input",o].filter(Boolean).join(" "),...r})}),Wf=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("textarea",{ref:n,className:[!t&&"ow-input ow-input--textarea",o].filter(Boolean).join(" "),...r})}),ML=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("select",{ref:n,className:[!t&&"ow-input ow-input--select",o].filter(Boolean).join(" "),...r})}),_L=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("input",{type:"checkbox",ref:n,className:[!t&&"ow-input ow-input--checkbox",o].filter(Boolean).join(" "),...r})}),LL=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("input",{type:"radio",ref:n,className:[!t&&"ow-input ow-input--radio",o].filter(Boolean).join(" "),...r})});var vy={type:"divider"};function BL({items:e,className:t="",size:o="md",collapsed:r=false,ariaLabel:n="\u83DC\u5355"}){return jsx("nav",{"data-slot":"nav-menu","data-ow-size":o,"data-ow-state":r?"collapsed":void 0,className:g("flex flex-col gap-0.5 data-[ow-state=collapsed]:w-10",t),"aria-label":n,children:e.map((a,i)=>"type"in a?jsx("div",{"data-ow-part":"divider",className:"h-px my-1.5 mx-2.5 bg-ow-border",role:"separator"},a.key??`divider-${i}`):jsxs(f,{type:"button","data-ow-part":"item","data-ow-state":[a.active&&"active",a.danger&&"danger"].filter(Boolean).join(" ")||void 0,variant:"unstyled",className:g("flex items-center [border-radius:var(--ow-radius-control)] border-0 font-normal text-ow-fs-ui leading-none font-[family-name:var(--ow-font-sans)] text-left w-full transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] ow-focus-ring","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","disabled:cursor-not-allowed disabled:text-[color:var(--ow-disabled-text)]","h-auto",o==="sm"?"min-h-8 gap-2 py-1":"min-h-10 gap-3 py-2",r?"px-0 justify-center":o==="sm"?"px-2.5":"px-3",a.active&&"bg-[var(--ow-current-bg)] text-[color:var(--ow-text)] font-medium",a.danger&&"text-[color:var(--ow-error)] hover:bg-[var(--ow-error-tint)] hover:text-[color:var(--ow-error-hover)]"),disabled:a.disabled,"aria-current":a.active?"page":void 0,"aria-label":r?a.label:void 0,title:r?a.label:void 0,onClick:a.onClick,children:[a.icon&&jsx("span",{className:"w-4 h-4 inline-flex flex-shrink-0",children:a.icon}),!r&&jsxs("span",{className:"flex flex-1 min-w-0 flex-col gap-1",children:[jsx("span",{children:a.label}),a.description&&jsx("span",{className:"font-normal text-ow-fs-eyebrow leading-snug font-[family-name:var(--ow-font-sans)] text-ow-text-3 overflow-hidden text-ellipsis whitespace-nowrap",children:a.description})]}),!r&&a.suffix&&jsx("span",{className:"ml-auto text-ow-text-3 font-normal text-ow-fs-body-sm leading-none font-[family-name:var(--ow-font-sans)] flex-shrink-0",children:a.suffix})]},a.key))})}var OL=vy;var Mc={stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round"};function vl({kind:e,className:t=""}){let o=["ow-plan-feature-icon",`ow-plan-feature-icon--${e}`,t].filter(Boolean).join(" ");return e==="exclude"?jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:jsx("path",{d:"M17.5 6.5L6.5 17.5M6.5 6.5L17.5 17.5",...Mc})}):e==="highlight"?jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:jsx("path",{d:"M12 4L13.75 10.25L20 12L13.75 13.75L12 20L10.25 13.75L4 12L10.25 10.25Z",...Mc})}):jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:jsx("path",{d:"M4.5 12.5L9.8 17.8L19.5 6.6",...Mc})})}var by=["openai","kimi","glm","minimax"];function GL({plans:e,applyingId:t,error:o,onBack:r,onApply:n,onSwitchProvider:a}){return jsxs("div",{className:"login-panel__inner login-noplan",children:[jsx("div",{className:"login-noplan__head",children:jsx(go,{onClick:r,children:"\u8FD4\u56DE"})}),jsxs("div",{className:"login-noplan__intro",children:[jsxs("div",{className:"login-noplan__mark","aria-hidden":"true",children:[jsx("span",{className:"ow-beacon-idle"}),jsx("span",{className:"m",children:"No Plan"})]}),jsx("div",{className:"t",children:"\u60A8\u8FD8\u672A\u5F00\u901A Orbitwork \u4E2A\u4EBA\u5957\u9910"}),jsxs("div",{className:"s",children:["Orbitwork \u4E2A\u4EBA\u5957\u9910\u8BA9\u4F60\u4E00\u952E\u8C03\u7528 Standard / Plus / Pro / Max \u56DB\u6863\u6A21\u578B\uFF1B",jsx("br",{}),"\u4E5F\u53EF\u4EE5\u76F4\u63A5\u7528 OpenAI\u3001Kimi\u3001GLM\u3001Minimax \u8D26\u6237\u767B\u5F55\uFF0C\u4F7F\u7528\u5404\u81EA\u7684\u989D\u5EA6\u3002"]})]}),o&&jsx(J,{variant:"error",children:o}),jsx("div",{className:"plan-cards",children:e.map(i=>jsxs("div",{className:"plan-card",children:[jsxs("div",{className:"ph",children:[jsx("span",{className:"n",children:i.name}),i.recommended?jsx(at,{children:"\u63A8\u8350"}):null]}),jsxs("div",{className:"price",children:[i.creditsLabel,jsx("span",{className:"price-unit",children:" \u989D\u5EA6/\u6708"})]}),jsx("div",{className:"tag",children:i.tagline}),jsx("ul",{className:"feat",children:i.features.map((d,s)=>jsxs("li",{className:`feat-${d.kind}`,children:[jsx(vl,{kind:d.kind}),jsx("span",{children:d.label})]},s))}),jsx(f,{variant:i.recommended?"primary":"secondary",className:"w-full",disabled:t!==null&&t!==i.id,loading:t===i.id,onClick:()=>n(i.id),children:t===i.id?"\u7533\u8BF7\u4E2D\u2026":i.recommended?"\u7ACB\u5373\u5F00\u901A":"\u9009\u62E9"})]},i.id))}),jsxs("div",{className:"login-noplan__alt",children:[jsx("span",{children:"\u6216\u4F7F\u7528\u5176\u4ED6\u5E73\u53F0\u8D26\u6237\uFF1A"}),by.map(i=>jsx(f,{variant:"unstyled",className:"link",onClick:()=>a(i),children:i},i))]})]})}function XL({label:e="\u6253\u5F00",iconName:t,onOpen:o,onRequestOptions:r,onSelect:n,className:a=""}){return jsx(Oi,{label:e,iconName:t,onOpen:o,onRequestOptions:r,onSelect:n,className:a})}function ba({eyebrow:e,title:t,description:o,meta:r,search:n,actions:a,tabs:i,activeTabKey:d,onTabChange:s,tabsExtra:l,className:c}){return jsxs("div",{"data-slot":"page-head",className:g("shrink-0 px-7 pt-8",c),children:[jsxs("div",{className:"flex items-start gap-4",children:[jsxs("div",{className:"min-w-0 flex-1",children:[jsx("div",{"data-slot":"page-head-eyebrow",className:"text-[length:var(--ow-fs-eyebrow-cjk)] font-medium tracking-[var(--ow-ls-eyebrow-cjk)] text-[color:var(--ow-eyebrow)]",children:e}),jsx("h1",{"data-slot":"page-head-title",className:"m-0 mt-0.5 ow-font-display text-ow-fs-headline font-medium leading-[var(--ow-lh-headline)] tracking-[0.01em] text-[color:var(--ow-text)]",children:t}),(o!=null||r!=null)&&jsxs("div",{"data-slot":"page-head-desc",className:"mt-1 text-ow-fs-body text-[color:var(--ow-text-2)]",children:[o,r!=null&&jsx("span",{"data-slot":"page-head-meta",className:g("ow-font-mono text-ow-fs-caption text-[color:var(--ow-text-3)] [font-variant-numeric:tabular-nums]",o!=null&&"ml-1"),children:r})]})]}),(n!=null||a!=null)&&jsxs("div",{"data-slot":"page-head-aside",className:"flex shrink-0 items-center gap-2 pt-1.5",children:[n!=null&&jsx("div",{className:"w-[216px] shrink-0",children:n}),a]})]}),i&&i.length>0&&jsxs("div",{"data-slot":"page-head-tabs",className:"mt-3.5 flex items-center border-b border-[color:var(--ow-border)]",children:[jsx(uo,{size:"lg",items:i,activeKey:d,onChange:s}),l!=null&&jsx("div",{"data-slot":"page-head-tabs-extra",className:"ml-auto flex shrink-0 items-center gap-2",children:l})]})]})}function uD({stats:e,plans:t,currentPlanName:o,usagePercent:r,loading:n=false,error:a=null,pendingId:i=null,resetting:d=false,resetDisabled:s=false,onChoose:l,onReset:c}){let[p,m]=useState(null),[u,v]=useState(false),w=t.find(S=>S.id===p)??null,b=o.trim().toLowerCase(),h=b!==""&&o!=="\u672A\u63D0\u4F9B",x=t.find(S=>S.name.trim().toLowerCase()===b)?.includedCredits,k=i!==null||d,y=r===null?null:Math.min(Math.max(r,0),100),P=async S=>{await l(S)&&m(null);},N=async()=>{await c()&&v(false);};return jsxs("div",{className:"plan-settings",children:[jsxs("div",{className:"usage-stat",children:[jsxs("div",{className:"b",children:[jsx("div",{className:"v",children:e.used}),jsx("div",{className:"k",children:"\u672C\u6708\u5DF2\u7528"})]}),jsxs("div",{className:"b",children:[jsx("div",{className:"v",children:e.limit}),jsx("div",{className:"k",children:"\u5957\u9910\u989D\u5EA6"})]}),jsxs("div",{className:"b",children:[jsx("div",{className:"v",children:e.currentPlan}),jsx("div",{className:"k",children:"\u5F53\u524D\u5957\u9910"})]})]}),jsxs("div",{className:"usage-bar",children:[y!==null&&jsxs(Fragment,{children:[jsx("div",{className:"usage-bar__track",children:jsx("div",{className:"usage-bar__fill","data-ow-state":y>=80?"warn":void 0,style:{width:`${y}%`}})}),jsxs("div",{className:"usage-bar__pct",children:[y.toFixed(1),"%"]})]}),jsx(f,{variant:"secondary",disabled:s||k,onClick:()=>v(true),children:"\u91CD\u7F6E\u7528\u91CF"}),s&&jsx("span",{className:"plan-reset__hint",children:"\u989D\u5EA6\u5DF2\u624B\u52A8\u8BBE\u5B9A\uFF0C\u65E0\u6CD5\u91CD\u7F6E"})]}),jsxs(va,{title:"\u5957\u9910\u7BA1\u7406",titleTier:"eyebrow",divider:false,className:"mt-6",children:[a&&jsx(J,{variant:"error",children:a}),n?jsx(F,{message:"\u5957\u9910\u52A0\u8F7D\u4E2D\u2026"}):t.length===0?jsx(F,{message:a??"\u5957\u9910\u670D\u52A1\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"}):jsx("div",{className:"plan-cards",children:t.map(S=>{let R=S.name.trim().toLowerCase()===b&&b!=="";return jsxs("div",{className:`plan-card${R?" current":""}`,children:[jsxs("div",{className:"ph",children:[jsx("span",{className:"n",children:S.name}),R?jsx(at,{variant:"success",children:"\u5F53\u524D"}):S.recommended?jsx(at,{children:"\u63A8\u8350"}):null]}),jsxs("div",{className:"price",children:[S.creditsLabel,jsx("span",{className:"price-unit",children:" \u989D\u5EA6/\u6708"})]}),jsx("div",{className:"tag",children:S.tagline}),jsx("ul",{className:"feat",children:S.features.map((M,T)=>jsxs("li",{className:`feat-${M.kind}`,children:[jsx(vl,{kind:M.kind}),jsx("span",{children:M.label})]},T))}),jsx(f,{variant:"secondary",className:"plan-card__action",disabled:k||R,onClick:()=>m(S.id),children:hy({isCurrent:R,pending:i===S.id,hasCurrentPlan:h,targetCredits:S.includedCredits,currentCredits:x})})]},S.id)})})]}),w&&jsxs(oe,{open:true,width:380,closable:false,closeOnOverlayClick:i===null,closeOnEscape:i===null,onClose:()=>m(null),title:`\u786E\u8BA4${xy({hasCurrentPlan:h,targetCredits:w.includedCredits,currentCredits:x})}\uFF1F`,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:i!==null,onClick:()=>m(null),children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",disabled:i!==null,onClick:()=>{P(w.id);},children:i===w.id?"\u63D0\u4EA4\u4E2D\u2026":"\u786E\u8BA4\u63D0\u4EA4"})]}),children:["\u5373\u5C06\u4E3A\u4F60",h?"\u5207\u6362\u5230":"\u5F00\u901A","\u300C",w.name,"\u300D\u5957\u9910\uFF0C\u64CD\u4F5C\u63D0\u4EA4\u540E\u9700\u7B49\u5F85\u5BA1\u6279\u901A\u8FC7\u3002"]}),u&&jsx(oe,{open:true,width:380,closable:false,closeOnOverlayClick:!d,closeOnEscape:!d,onClose:()=>v(false),title:"\u786E\u8BA4\u91CD\u7F6E\u7528\u91CF\uFF1F",actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:d,onClick:()=>v(false),children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",disabled:d,onClick:()=>{N();},children:d?"\u63D0\u4EA4\u4E2D\u2026":"\u786E\u8BA4\u63D0\u4EA4"})]}),children:"\u786E\u5B9A\u8981\u91CD\u7F6E\u5F53\u524D\u5957\u9910\u7684\u4F7F\u7528\u91CF\u5417\uFF1F\u64CD\u4F5C\u63D0\u4EA4\u540E\u9700\u7B49\u5F85\u5BA1\u6279\u901A\u8FC7\u3002"})]})}function hy(e){let{isCurrent:t,pending:o,hasCurrentPlan:r,targetCredits:n,currentCredits:a}=e;if(t)return "\u5F53\u524D\u5957\u9910";if(o)return "\u5904\u7406\u4E2D\u2026";if(!r)return "\u5F00\u901A";if(n!==void 0&&a!==void 0){if(n>a)return "\u5347\u7EA7\u5957\u9910";if(n<a)return "\u964D\u7EA7\u5957\u9910"}return "\u5207\u6362\u5230\u6B64\u5957\u9910"}function xy(e){let{hasCurrentPlan:t,targetCredits:o,currentCredits:r}=e;if(!t)return "\u5F00\u901A\u5957\u9910";if(o!==void 0&&r!==void 0){if(o>r)return "\u5347\u7EA7\u5957\u9910";if(o<r)return "\u964D\u7EA7\u5957\u9910"}return "\u5207\u6362\u5957\u9910"}var Ny={"bottom-start":"top-full left-0 mt-1.5","bottom-end":"top-full right-0 mt-1.5","top-start":"bottom-full left-0 mb-1.5","top-end":"bottom-full right-0 mb-1.5"},Sy={"bottom-start":"top-start","bottom-end":"top-end","top-start":"bottom-start","top-end":"bottom-end"};function bD({open:e,onOpenChange:t,trigger:o,children:r,placement:n="bottom-start",width:a,padded:i=true,autoFlip:d=true,estimatedHeight:s=240,closeOnOutsideClick:l=true,closeOnEscape:c=true,disabled:p=false,ariaLabel:m,className:u="",triggerClassName:v=""}){let w=useRef(null),b=useRef(null),[h,x]=useState(n),k=`${useId()}-popover`,y=useCallback(()=>t(false),[t]);return useEffect(()=>{if(!e)return;if(!d){x(n);return}let P=b.current?.getBoundingClientRect();if(!P){x(n);return}let N=window.innerHeight-P.bottom,S=P.top,R=n.startsWith("top"),M=R?S>=s:N>=s,T=R?N>=s:S>=s;x(!M&&T?Sy[n]:n);},[e,n,d,s]),useEffect(()=>{if(!e||!l)return;let P=N=>{w.current?.contains(N.target)||y();};return document.addEventListener("mousedown",P,true),()=>document.removeEventListener("mousedown",P,true)},[e,l,y]),useEffect(()=>{if(!e||!c)return;let P=N=>{N.key==="Escape"&&(N.stopPropagation(),y(),b.current?.querySelector("button,[tabindex]")?.focus());};return document.addEventListener("keydown",P,true),()=>document.removeEventListener("keydown",P,true)},[e,c,y]),jsxs("span",{ref:w,"data-slot":"popover","data-ow-state":e?"open":"closed","data-ow-disabled":p||void 0,className:g("relative inline-flex",u),children:[jsx("span",{ref:b,"data-ow-part":"trigger","aria-haspopup":"dialog","aria-expanded":e,"aria-disabled":p||void 0,"aria-controls":e?k:void 0,className:g("inline-flex",v),onClick:()=>{p||t(!e);},children:o}),e&&jsx("div",{id:k,"data-slot":"popover-panel","data-ow-part":"surface","data-ow-placement":h,role:"dialog","aria-label":m,style:a===void 0?void 0:{width:a},className:g("ow-motion absolute min-w-max max-w-[min(92vw,420px)]",Ny[h],"z-[var(--ow-z-popover)] bg-[var(--ow-popover-bg)]","[border-radius:var(--ow-radius-card)] border border-[color:var(--ow-border)] shadow-[var(--ow-shadow-pop)]","text-[color:var(--ow-text)] font-normal text-ow-fs-ui leading-[1.5] font-[family-name:var(--ow-font-sans)]","animate-[fade-in_var(--ow-dur-2)_var(--ow-ease-beacon)]",i&&"p-3"),children:r})]})}var Zf=memo(function({element:t}){let o=t.blob||"";return o?jsx("div",{className:"",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:jsx("audio",{controls:true,preload:"metadata",style:{width:"100%"},children:jsx("source",{src:o})})}):jsx("div",{className:"",style:Ty,children:jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ow-text-3)",strokeWidth:"1.5",children:[jsx("path",{d:"M9 18V5l12-2v13"}),jsx("circle",{cx:"6",cy:"18",r:"3"}),jsx("circle",{cx:"18",cy:"16",r:"3"})]})})}),Ty={width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--ow-surface-2)",borderRadius:"var(--ow-radius-2xs)"};var Xf=memo(function({element:t}){let o=useRef(null),r=useRef(null),[n,a]=useState(false);useEffect(()=>{let d=false;async function s(){if(o.current)try{let l=await import('echarts');if(d)return;let c=l.init(o.current);r.current=c;let p=Dy(t);c.setOption(p);}catch{d||a(true);}}return s(),()=>{d=true,r.current?.dispose(),r.current=null;}},[t]),useEffect(()=>{if(!o.current||!r.current)return;let d=new ResizeObserver(()=>{r.current?.resize();});return d.observe(o.current),()=>d.disconnect()},[n]);let i={width:"100%",height:"100%"};return n?jsx("div",{className:"",style:{...i,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--ow-surface)",borderRadius:"var(--ow-radius-2xs)"},children:jsx("span",{style:{color:"var(--ow-text-3)",fontSize:12},children:"\u56FE\u8868"})}):jsx("div",{ref:o,className:"",style:i})});function Dy(e){let{chartType:t,colors:o}=e;if(t==="scatterChart"||t==="bubbleChart")return Ey(e);let r=e,{data:n,barDir:a}=r;if(!n?.length)return {};let i=n[0]?.values?.map(l=>l.x)||[],d=n.map(l=>({name:l.key,data:l.values.map(c=>c.y),type:Iy(t),...t.includes("area")?{areaStyle:{}}:{}})),s={color:o?.length?o:void 0,legend:{show:n.length>1,bottom:0,textStyle:{fontSize:10}},grid:{left:40,right:20,top:20,bottom:n.length>1?30:10},tooltip:{trigger:"axis"},series:d};return t.includes("pie")||t==="doughnutChart"?(s.series=[{type:"pie",radius:t==="doughnutChart"?["40%","70%"]:"70%",data:n[0]?.values?.map(l=>({name:l.x,value:l.y}))||[]}],delete s.grid,delete s.tooltip):t.includes("radar")?(s.radar={indicator:i.map(l=>({name:l}))},s.series=[{type:"radar",data:n.map(l=>({name:l.key,value:l.values.map(c=>c.y)}))}],delete s.grid):a==="bar"?(s.yAxis={type:"category",data:i},s.xAxis={type:"value"}):(s.xAxis={type:"category",data:i},s.yAxis={type:"value"}),s}function Ey(e){return {color:e.colors?.length?e.colors:void 0,xAxis:{type:"value"},yAxis:{type:"value"},series:[{type:"scatter",data:e.data||[]}],grid:{left:40,right:20,top:20,bottom:20}}}function Iy(e){return e.includes("bar")||e.includes("Bar")?"bar":e.includes("line")||e.includes("Line")||e.includes("area")||e.includes("Area")?"line":e.includes("pie")||e.includes("Pie")?"pie":e.includes("radar")||e.includes("Radar")?"radar":"bar"}var Qf=memo(function({element:t}){return t.elements?.length?jsx("div",{className:"relative w-full h-full",style:{position:"relative",width:"100%",height:"100%"},children:t.elements.map((o,r)=>jsx(Ua,{element:o},`diagram-${r}`))}):t.textList?.length?jsx("div",{className:"",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",padding:8},children:t.textList.map((o,r)=>jsx("div",{style:{fontSize:12,marginBottom:4},children:o},r))}):null});var Nr=1.3333333333333333;function xe(e){return e*Nr}function wl(e,t,o){let r=[];return e&&r.push(`rotate(${e}deg)`),t&&r.push("scaleX(-1)"),o&&r.push("scaleY(-1)"),r.length?r.join(" "):void 0}function hl(e){if(!e)return {};switch(e.type){case "color":return {background:e.value};case "image":return e.value?.base64?{backgroundImage:`url(data:image/png;base64,${e.value.base64})`,backgroundSize:"cover",backgroundPosition:"center",opacity:e.value.opacity!=null?e.value.opacity:void 0}:{};case "gradient":return {background:By(e.value)};case "pattern":return {background:e.value?.backgroundColor||"var(--ow-paper)"};default:return {}}}function By(e){if(!e?.colors?.length)return "transparent";let t=e.colors.map(o=>`${o.color} ${o.pos}`).join(", ");return e.path==="line"?`linear-gradient(${(e.rot??0)+90}deg, ${t})`:`radial-gradient(circle, ${t})`}function Jf(e,t){if(!e)return {defs:"",fillAttr:"none"};switch(e.type){case "color":return {defs:"",fillAttr:e.value||"none"};case "gradient":{let{colors:o,rot:r,path:n}=e.value;if(!o?.length)return {defs:"",fillAttr:"none"};if(n==="line"){let d=(r??0)*Math.PI/180,s=50-50*Math.cos(d),l=50-50*Math.sin(d),c=50+50*Math.cos(d),p=50+50*Math.sin(d),m=o.map(v=>`<stop offset="${v.pos}" stop-color="${v.color}"/>`).join("");return {defs:`<linearGradient id="${t}" x1="${s}%" y1="${l}%" x2="${c}%" y2="${p}%">${m}</linearGradient>`,fillAttr:`url(#${t})`}}let a=o.map(d=>`<stop offset="${d.pos}" stop-color="${d.color}"/>`).join("");return {defs:`<radialGradient id="${t}" cx="50%" cy="50%" r="50%">${a}</radialGradient>`,fillAttr:`url(#${t})`}}case "image":return {defs:"",fillAttr:"transparent"};default:return {defs:"",fillAttr:"none"}}}function eg(e){if(!e)return {};let{h:t,v:o,blur:r,color:n}=e;return {filter:`drop-shadow(${xe(t)}px ${xe(o)}px ${xe(r)}px ${n})`}}function tg(e,t,o){if(!t||!e)return {};let r=o||"solid";return {border:`${xe(t)}px ${r} ${e}`}}function og(e){if(!e)return {};let t=[];return e.brightness!=null&&t.push(`brightness(${1+e.brightness/100})`),e.contrast!=null&&t.push(`contrast(${1+e.contrast/100})`),e.saturation!=null&&t.push(`saturate(${1+e.saturation/100})`),t.length?{filter:t.join(" ")}:{}}var ag=memo(function({element:t}){let o={position:"relative",width:"100%",height:"100%",transform:wl(t.rotate,t.isFlipH,t.isFlipV)};return jsx("div",{className:"",style:o,children:t.elements?.map((r,n)=>jsx(Ua,{element:r},`group-${n}`))})});var ig=memo(function({element:t}){let o=t.base64?t.base64.startsWith("data:")?t.base64:`data:image/png;base64,${t.base64}`:t.blob||"";if(!o)return null;let r={width:"100%",height:"100%",objectFit:"fill",display:"block",...og(t.filters)},n={width:"100%",height:"100%",overflow:"hidden",borderRadius:(t.borderWidth,void 0)};if(t.borderColor&&t.borderWidth&&(n.border=`${xe(t.borderWidth)}px ${t.borderType||"solid"} ${t.borderColor}`),t.rect){let{t:a=0,b:i=0,l:d=0,r:s=0}=t.rect;if(a||i||d||s){r.clipPath=`inset(${a*100}% ${s*100}% ${i*100}% ${d*100}%)`;let l=1/(1-d-s),c=1/(1-a-i);r.width=`${l*100}%`,r.height=`${c*100}%`,r.objectFit="cover",r.marginLeft=`${-d*l*100}%`,r.marginTop=`${-a*c*100}%`,r.clipPath=void 0;}}return jsx("div",{className:"",style:n,children:jsx("img",{src:o,alt:"",style:r,draggable:false})})});var sg=memo(function({element:t}){let o=t.picBase64?t.picBase64.startsWith("data:")?t.picBase64:`data:image/png;base64,${t.picBase64}`:t.picBlob||"";return o?jsx("div",{className:"",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:jsx("img",{src:o,alt:t.latex||"\u516C\u5F0F",style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"},draggable:false})}):jsx("div",{className:"",style:$y,children:jsx("span",{style:{fontFamily:"var(--ow-font-mono)",fontSize:12},children:t.latex||t.text||"\u516C\u5F0F"})})}),$y={width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--ow-surface-2)",borderRadius:"var(--ow-radius-2xs)"};var dg=memo(function({element:t}){let o=xe(t.width),r=xe(t.height),n=`shape-fill-${t.order}-${Math.random().toString(36).slice(2,8)}`,{defs:a,fillAttr:i}=useMemo(()=>Jf(t.strokeOnly?void 0:t.fill,n),[t.fill,t.strokeOnly,n]),d=t.borderColor||"none",s=t.borderWidth?xe(t.borderWidth):0,l=t.borderStrokeDasharray||void 0,c=useMemo(()=>{if(t.path&&t.pathViewBox){let v=t.pathViewBox;return jsxs("svg",{width:o,height:r,viewBox:`${v.x} ${v.y} ${v.width} ${v.height}`,preserveAspectRatio:"none",className:"absolute top-0 left-0 block",children:[a&&jsx("defs",{dangerouslySetInnerHTML:{__html:a}}),jsx("path",{d:t.path,fill:i,stroke:d,strokeWidth:s,strokeDasharray:l})]})}return jsxs("svg",{width:o,height:r,viewBox:`0 0 ${o} ${r}`,preserveAspectRatio:"none",className:"absolute top-0 left-0 block",children:[a&&jsx("defs",{dangerouslySetInnerHTML:{__html:a}}),Hy(t.shapType,o,r,i,d,s,l)]})},[t.path,t.pathViewBox,t.shapType,o,r,i,d,s,l,a]),p={position:"relative",width:"100%",height:"100%"},m=t.content&&t.content.replace(/<[^>]*>/g,"").trim(),u={position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",flexDirection:"column",overflow:"hidden",wordWrap:"break-word"};if(t.vAlign)switch(t.vAlign){case "mid":case "middle":case "ctr":u.justifyContent="center";break;case "bottom":case "b":u.justifyContent="flex-end";break;default:u.justifyContent="flex-start";}return t.textInset&&(u.paddingLeft=xe(t.textInset.l)+"px",u.paddingTop=xe(t.textInset.t)+"px",u.paddingRight=xe(t.textInset.r)+"px",u.paddingBottom=xe(t.textInset.b)+"px"),jsxs("div",{className:"pointer-events-none",style:p,children:[c,m&&jsx("div",{className:"pointer-events-auto font-medium text-[length:var(--ow-fs-caption)] leading-none text-ow-text-2 select-none",style:u,dangerouslySetInnerHTML:{__html:t.content}})]})});function Hy(e,t,o,r,n,a,i){let d={fill:r,stroke:n,strokeWidth:a,strokeDasharray:i};switch(e){case "ellipse":case "oval":return jsx("ellipse",{cx:t/2,cy:o/2,rx:t/2-a/2,ry:o/2-a/2,...d});case "roundRect":case "snipRoundRect":{let s=Math.min(t,o)*.1;return jsx("rect",{x:a/2,y:a/2,width:t-a,height:o-a,rx:s,ry:s,...d})}case "triangle":case "isoTriangle":{let s=`${t/2},${a/2} ${a/2},${o-a/2} ${t-a/2},${o-a/2}`;return jsx("polygon",{points:s,...d})}case "rtTriangle":{let s=`${a/2},${a/2} ${a/2},${o-a/2} ${t-a/2},${o-a/2}`;return jsx("polygon",{points:s,...d})}case "diamond":{let s=`${t/2},${a/2} ${t-a/2},${o/2} ${t/2},${o-a/2} ${a/2},${o/2}`;return jsx("polygon",{points:s,...d})}case "parallelogram":{let s=t*.2,l=`${s},${a/2} ${t-a/2},${a/2} ${t-s},${o-a/2} ${a/2},${o-a/2}`;return jsx("polygon",{points:l,...d})}case "trapezoid":{let s=t*.15,l=`${s},${a/2} ${t-s},${a/2} ${t-a/2},${o-a/2} ${a/2},${o-a/2}`;return jsx("polygon",{points:l,...d})}case "pentagon":{let s=t/2,l=o/2,c=Math.min(t,o)/2-a/2,p=Array.from({length:5},(m,u)=>{let v=(u*72-90)*Math.PI/180;return `${s+c*Math.cos(v)},${l+c*Math.sin(v)}`}).join(" ");return jsx("polygon",{points:p,...d})}case "hexagon":{let s=t/2,l=o/2,c=Math.min(t,o)/2-a/2,p=Array.from({length:6},(m,u)=>{let v=(u*60-90)*Math.PI/180;return `${s+c*Math.cos(v)},${l+c*Math.sin(v)}`}).join(" ");return jsx("polygon",{points:p,...d})}case "star4":case "star5":case "star6":case "star8":case "star10":case "star12":{let s=Number.parseInt(e.replace("star",""))||5;return Wy(t,o,s,a,d)}case "rightArrow":case "leftArrow":case "upArrow":case "downArrow":return Uy(e,t,o,a,d);case "line":case "straightConnector1":case "bentConnector3":case "curvedConnector3":return jsx("line",{x1:a/2,y1:o/2,x2:t-a/2,y2:o/2,stroke:n,strokeWidth:a||1,strokeDasharray:i});default:return jsx("rect",{x:a/2,y:a/2,width:t-a,height:o-a,...d})}}function Wy(e,t,o,r,n){let a=e/2,i=t/2,d=Math.min(e,t)/2-r/2,s=d*.4,l=[];for(let c=0;c<o*2;c++){let p=c%2===0?d:s,m=(c*180/o-90)*Math.PI/180;l.push(`${a+p*Math.cos(m)},${i+p*Math.sin(m)}`);}return jsx("polygon",{points:l.join(" "),...n})}function Uy(e,t,o,r,n){let a=r/2,i=.35,d=.4,s;switch(e){case "rightArrow":{let l=o*i,c=t*(1-d);s=`${a},${o/2-l} ${c},${o/2-l} ${c},${a} ${t-a},${o/2} ${c},${o-a} ${c},${o/2+l} ${a},${o/2+l}`;break}case "leftArrow":{let l=o*i,c=t*d;s=`${t-a},${o/2-l} ${c},${o/2-l} ${c},${a} ${a},${o/2} ${c},${o-a} ${c},${o/2+l} ${t-a},${o/2+l}`;break}case "upArrow":{let l=t*i,c=o*d;s=`${t/2-l},${o-a} ${t/2-l},${c} ${a},${c} ${t/2},${a} ${t-a},${c} ${t/2+l},${c} ${t/2+l},${o-a}`;break}case "downArrow":{let l=t*i,c=o*(1-d);s=`${t/2-l},${a} ${t/2-l},${c} ${a},${c} ${t/2},${o-a} ${t-a},${c} ${t/2+l},${c} ${t/2+l},${a}`;break}default:s=`0,0 ${t},0 ${t},${o} 0,${o}`;}return jsx("polygon",{points:s,...n})}var cg=memo(function({element:t}){return jsx("div",{className:"w-full h-full overflow-hidden pointer-events-auto",children:jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse",tableLayout:"fixed",fontSize:"12px"},children:[jsx("colgroup",{children:t.colWidths.map((r,n)=>jsx("col",{style:{width:xe(r)+"px"}},n))}),jsx("tbody",{children:t.data.map((r,n)=>jsx("tr",{style:{height:xe(t.rowHeights[n]??0)+"px"},children:r.map((a,i)=>{if(a.vMerge||a.hMerge)return null;let d={padding:"var(--ow-space-1, 4px) var(--ow-space-15, 6px)",overflow:"hidden",wordWrap:"break-word",verticalAlign:jy(a.vAlign)};return a.fillColor&&(d.backgroundColor=a.fillColor),a.fontColor&&(d.color=a.fontColor),a.fontBold&&(d.fontWeight="bold"),a.borders?.top&&(d.borderTop=`${xe(a.borders.top.borderWidth)}px ${a.borders.top.borderType} ${a.borders.top.borderColor}`),a.borders?.bottom&&(d.borderBottom=`${xe(a.borders.bottom.borderWidth)}px ${a.borders.bottom.borderType} ${a.borders.bottom.borderColor}`),a.borders?.left&&(d.borderLeft=`${xe(a.borders.left.borderWidth)}px ${a.borders.left.borderType} ${a.borders.left.borderColor}`),a.borders?.right&&(d.borderRight=`${xe(a.borders.right.borderWidth)}px ${a.borders.right.borderType} ${a.borders.right.borderColor}`),jsx("td",{style:d,colSpan:a.colSpan||void 0,rowSpan:a.rowSpan||void 0,dangerouslySetInnerHTML:{__html:a.text||""}},i)})},n))})]})})});function jy(e){switch(e){case "mid":case "middle":case "ctr":return "middle";case "bottom":case "b":return "bottom";default:return "top"}}var pg=memo(function({element:t}){let o={width:"100%",height:"100%",wordWrap:"break-word",...hl(t.fill)};if(t.vAlign)switch(o.display="flex",o.flexDirection="column",t.vAlign){case "mid":case "middle":case "ctr":o.justifyContent="center";break;case "bottom":case "b":o.justifyContent="flex-end";break;default:o.justifyContent="flex-start";}return t.isVertical&&(o.writingMode="vertical-rl"),t.textInset&&(o.paddingLeft=xe(t.textInset.l)+"px",o.paddingTop=xe(t.textInset.t)+"px",o.paddingRight=xe(t.textInset.r)+"px",o.paddingBottom=xe(t.textInset.b)+"px"),t.autoFit?.type==="text"&&t.autoFit.fontScale&&(o.fontSize=`${t.autoFit.fontScale*100}%`),jsx("div",{className:"pointer-events-auto",style:o,dangerouslySetInnerHTML:{__html:t.content||""}})});var ug=memo(function({element:t}){let o=t.blob||"";return o?jsx("video",{className:"",style:{width:"100%",height:"100%",objectFit:"contain",background:"var(--ow-graphite)"},controls:true,preload:"metadata",children:jsx("source",{src:o})}):jsx("div",{className:"",style:Xy,children:jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ow-text-3)",strokeWidth:"1.5",children:jsx("polygon",{points:"5 3 19 12 5 21 5 3"})})})}),Xy={width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--ow-graphite)",borderRadius:"var(--ow-radius-2xs)"};var Ua=memo(function({element:t}){let o={position:"absolute",left:xe(t.left),top:xe(t.top),width:xe(t.width),height:xe(t.height),zIndex:t.order??0,transform:wl("rotate"in t?t.rotate:void 0,"isFlipH"in t?t.isFlipH:void 0,"isFlipV"in t?t.isFlipV:void 0),..."shadow"in t?eg(t.shadow):{},..."borderWidth"in t&&t.type!=="shape"?tg(t.borderColor,t.borderWidth,t.borderType):{}};return jsx("div",{className:"pointer-events-none",style:o,children:Jy(t)})});function Jy(e){switch(e.type){case "text":return jsx(pg,{element:e});case "shape":return jsx(dg,{element:e});case "image":return jsx(ig,{element:e});case "table":return jsx(cg,{element:e});case "chart":return jsx(Xf,{element:e});case "video":return jsx(ug,{element:e});case "audio":return jsx(Zf,{element:e});case "diagram":return jsx(Qf,{element:e});case "math":return jsx(sg,{element:e});case "group":return jsx(ag,{element:e});default:return null}}var yl=memo(function({slide:t,slideWidth:o,slideHeight:r}){let n=xe(o),a=xe(r),i={position:"relative",width:n,height:a,overflow:"hidden",...hl(t.fill)};t.fill||(i.background="var(--ow-paper)");let d=[...t.layoutElements||[],...t.elements||[]];return jsx("div",{className:"text-ow-text",style:i,children:d.map((s,l)=>jsx(Ua,{element:s},`${s.type}-${l}`))})});function Cl({value:e,options:t,onChange:o,onCreate:r,placeholder:n="\u9009\u62E9\u9879\u76EE",disabled:a=false,size:i="md",className:d=""}){let[s,l]=useState(false),[c,p]=useState(""),[m,u]=useState(false),[v,w]=useState(null),{isImeEnter:b,onCompositionEnd:h,onCompositionStart:x}=Dt(),k=c.trim()!==""&&!m,y=useCallback(()=>{l(false),p(""),w(null);},[]),P=async()=>{let S=c.trim();if(!(!S||!r||m)){u(true),w(null);try{let R=await r(S);o(R),y();}catch(R){w(R instanceof Error?R.message:"\u521B\u5EFA\u9879\u76EE\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");}finally{u(false);}}},N=r&&jsx("div",{"data-ow-part":"footer",className:"flex-[0_0_auto] mt-1.5 pt-1.5 border-t border-[color:var(--ow-border)]",children:s?jsxs("div",{"data-ow-part":"create",className:"p-0.5",children:[jsxs("div",{"data-ow-part":"create-row",className:"flex items-center gap-1.5",children:[jsx(te,{autoFocus:true,value:c,placeholder:"\u8F93\u5165\u9879\u76EE\u540D\u79F0","aria-label":"\u9879\u76EE\u540D\u79F0",invalid:!!v,disabled:m,onChange:p,onCompositionStart:x,onCompositionEnd:h,onKeyDown:S=>{b(S)||S.key==="Enter"&&(S.preventDefault(),P());}}),jsx(f,{variant:"primary",size:"sm",type:"button",className:"flex-[0_0_auto] min-w-14",disabled:!k,onClick:()=>{P();},children:m?"\u521B\u5EFA\u4E2D\u2026":"\u521B\u5EFA"})]}),jsx("div",{"data-ow-part":v?"error":"hint",className:g("pt-1.5 px-0.5 pb-0.5 font-normal text-ow-fs-eyebrow leading-[1.25]",v?"text-[color:var(--ow-error)]":"text-[color:var(--ow-text-3)]"),role:v?"alert":void 0,children:v??"\u6309 Enter \u521B\u5EFA\uFF0CEsc \u53D6\u6D88"})]}):jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"add",icon:jsx(He,{className:"w-4 h-4"}),className:"w-full h-auto justify-start py-1.5 px-2 [white-space:normal]",onClick:()=>l(true),children:jsxs("span",{"data-ow-part":"add-meta",className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"add-name",className:"text-[color:var(--ow-text)] font-medium text-ow-fs-ui leading-[1.25] overflow-hidden text-ellipsis whitespace-nowrap",children:"\u65B0\u589E\u9879\u76EE"}),jsx("span",{"data-ow-part":"add-sub",className:"text-[color:var(--ow-text-3)] font-normal text-ow-fs-eyebrow leading-[1.25] overflow-hidden text-ellipsis whitespace-nowrap",children:"\u8F93\u5165\u540D\u79F0\u540E\u7ACB\u5373\u521B\u5EFA"})]})})});return jsx("div",{"data-slot":"project-select",className:g("relative",d),children:jsx(br,{value:e,options:t,onChange:o,placeholder:n,disabled:a||m,size:i,footer:N})})}function HE({options:e,value:t,onChange:o,"aria-label":r,className:n,variant:a="row"}){let i=useRef(null),d=useCallback(c=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(c.key))return;let m=i.current;if(!m)return;let u=Array.from(m.querySelectorAll('[role="radio"]:not(:disabled)'));if(u.length===0)return;let v=u.indexOf(c.target),w;c.key==="Home"?w=0:c.key==="End"?w=u.length-1:c.key==="ArrowRight"||c.key==="ArrowDown"?w=v<0?0:(v+1)%u.length:w=v<0?0:(v-1+u.length)%u.length,c.preventDefault();let b=u[w];if(!b)return;b.focus();let h=b.getAttribute("data-ow-value");h!==null&&o(h);},[o]),s=e.findIndex(c=>c.value===t&&!c.disabled),l=s>=0?s:e.findIndex(c=>!c.disabled);return jsx("div",{ref:i,role:"radiogroup","aria-label":r,"data-slot":"radio-card-group",onKeyDown:d,"data-ow-variant":a,className:g("flex flex-col min-w-0",a==="card"?"gap-2":"gap-0",n),children:e.map((c,p)=>{let m=c.value===t;return jsxs("button",{type:"button",role:"radio","aria-checked":m,disabled:c.disabled,tabIndex:p===l?0:-1,"data-slot":"radio-card","data-ow-part":"surface","data-ow-value":c.value,"data-ow-state":g(m&&"selected",c.disabled&&"disabled").trim()||void 0,onClick:()=>!c.disabled&&o(c.value),className:g("flex items-start gap-2.5 w-full min-w-0 text-left",a==="card"?"px-3.5 py-3 [border-radius:var(--ow-radius-lg)] border border-[color:var(--ow-border)] bg-[var(--ow-surface)]":"px-0 py-3 border-0 border-[color:var(--ow-border)] [[data-slot=radio-card]+&]:border-t bg-transparent","transition-[background-color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",c.disabled?g("cursor-not-allowed",a==="card"&&"border-[color:var(--ow-disabled-border)]"):"cursor-pointer hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]"),children:[jsx("span",{"aria-hidden":"true","data-ow-part":"dot",className:g("shrink-0 mt-px grid place-items-center w-4 h-4 rounded-full border-[1.5px]",c.disabled?"border-[color:var(--ow-disabled-border)]":m?"border-[color:var(--ow-control-on)]":"border-[color:var(--ow-control-off)]"),children:jsx("span",{className:g("block w-2 h-2 rounded-full",m?c.disabled?"bg-[var(--ow-disabled-text)]":"bg-[var(--ow-control-on)]":"bg-transparent")})}),jsxs("span",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"title",className:g("text-ow-fs-ui font-medium leading-[1.3]",c.disabled?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text)]"),children:c.label}),c.description!=null&&c.description!==false&&jsx("span",{"data-ow-part":"description",className:g("text-[length:var(--ow-fs-caption,12px)] font-normal leading-[1.4]",c.disabled?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-2)]"),children:c.description})]})]},c.value)})})}var i2=1600;function zn({items:e,disabled:t,width:o=160,ariaLabel:r="\u66F4\u591A\u64CD\u4F5C",onSelect:n}){let[a,i]=useState(null);useEffect(()=>{if(!a)return;let s=setTimeout(()=>i(null),i2);return ()=>clearTimeout(s)},[a]);let d=a?e.find(s=>s.key===a.key)??null:null;return jsx(co,{triggerClassName:"row-more",width:o,align:"end",ariaLabel:r,items:e.map(s=>({key:s.key,label:s.label,icon:s.icon,danger:s.danger})),onSelect:s=>{e.find(l=>l.key===s)?.confirmsInPlace&&i({key:s,tick:Date.now()}),n(s);},trigger:({open:s,triggerProps:l})=>jsx(f,{variant:"ghost",size:"sm",type:"button","data-state":d?"done":s?"active":"rest",className:`[&_svg]:w-4 [&_svg]:h-4 ${d?"text-[color:var(--ow-success)]":s?"text-[color:var(--ow-text)]":"text-[color:var(--ow-text-3)]"}`,"aria-label":r,title:d?`${d.label}\uFF1A\u5DF2\u5B8C\u6210`:r,disabled:t,icon:d?jsx(be,{}):jsx(Ko,{}),...l})})}function tI({prompt:e,onDecision:t}){let o=e.permissionType==="retry_unsandboxed"||e.permissionType==="run_unsandboxed"?"retry":e.permissionType==="dangerous_command"?"dangerous":e.permissionType==="untrusted_command"?"untrusted":"file",r=o!=="file",n=o==="dangerous",[a,i]=useState(false),d=l2(e.permissionType),s=o==="retry"?"\u8BE5\u547D\u4EE4\u88AB\u6C99\u7BB1\u963B\u6B62\uFF0C\u662F\u5426\u5728\u6C99\u7BB1\u5916\u91CD\u65B0\u6267\u884C\uFF1F":o==="dangerous"?"\u68C0\u6D4B\u5230\u9AD8\u98CE\u9669\u547D\u4EE4\uFF0C\u662F\u5426\u5141\u8BB8\u5728\u6C99\u7BB1\u5916\u6267\u884C\uFF1F":o==="untrusted"?"\u662F\u5426\u5141\u8BB8\u5728\u6C99\u7BB1\u5916\u6267\u884C\u8BE5\u547D\u4EE4\uFF1F":`\u662F\u5426\u540C\u610F\u6388\u4E88\u6C99\u7BB1\u5BF9\u4EE5\u4E0B\u6587\u4EF6\u6216\u76EE\u5F55\u7684${d}\u6743\u9650\uFF1F`,l=d2(e.prefixRule),c=r?l?`\u5141\u8BB8\u5E76\u8BB0\u4F4F\u6B64\u524D\u7F00\uFF1A${l}`:"\u81EA\u52A8\u540C\u610F\uFF08\u672C\u4F1A\u8BDD\u518D\u6B21\u6267\u884C\u8BE5\u547D\u4EE4\u65F6\u4E0D\u518D\u8BE2\u95EE\uFF09":"\u81EA\u52A8\u540C\u610F\uFF08\u672C\u6B21\u6267\u884C\u7684\u540E\u7EED\u6587\u4EF6/\u76EE\u5F55\u8BBF\u95EE\u4E0D\u518D\u8BE2\u95EE\uFF09",p=e.path.length>180||e.path.includes(`
|
|
12
|
-
`);return jsxs("div",{"data-slot":"sandbox-prompt",className:"relative bg-[var(--ow-warning-tint)] border border-[color:var(--ow-warning-tint-border)] text-[color:var(--ow-warning-on-tint)] [border-radius:var(--ow-radius-card)] p-3.5 flex flex-col gap-2",role:"alertdialog","aria-label":"\u6C99\u7BB1\u6743\u9650\u8BF7\u6C42",children:[jsx("div",{"data-ow-part":"title",className:"font-semibold text-ow-fs-ui leading-[1.5]",children:s}),e.path&&jsxs("div",{"data-ow-part":"path-wrap",className:"relative min-h-0 flex flex-col",children:[jsx("div",{"data-ow-part":"path","data-ow-state":a?"expanded":void 0,className:g("min-h-0 font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-[length:var(--ow-fs-body-sm)] leading-[1.55] text-ow-text-2 bg-ow-surface-2 [border-radius:var(--ow-radius-control)] py-2 pr-[42px] pl-2.5 overflow-hidden break-words","[display:-webkit-box] [-webkit-line-clamp:4] [-webkit-box-orient:vertical]",a&&"block min-h-[132px] max-h-[min(33vh,320px)] overflow-auto whitespace-pre-wrap [tab-size:2] border border-ow-border py-3 pr-11 pb-[34px] pl-3 [scrollbar-gutter:stable_both-edges]"),title:a?void 0:e.path,children:e.path}),p&&jsx(f,{variant:"unstyled",type:"button","data-ow-part":"toggle","data-ow-state":a?"expanded":void 0,className:g("absolute top-1.5 right-1.5 w-7 h-7 p-0 border-0 [border-radius:var(--ow-radius-action)] bg-transparent text-ow-text-3 inline-flex items-center justify-center cursor-pointer transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)] hover:text-ow-text","[&_svg]:w-4 [&_svg]:h-4 [&_svg]:fill-none [&_svg]:stroke-current [&_svg]:[stroke-width:1.75] [&_svg]:[stroke-linecap:round] [&_svg]:[stroke-linejoin:round]",a&&"top-2 right-2"),onClick:()=>i(m=>!m),"aria-expanded":a,"aria-label":a?"\u6536\u8D77\u547D\u4EE4\u5185\u5BB9":"\u5C55\u5F00\u547D\u4EE4\u5185\u5BB9",title:a?"\u6536\u8D77":"\u5C55\u5F00",children:a?jsx(
|
|
10
|
+
`),language:s});continue}if(n.trim()===""){r+=1;continue}let a=n.match(/^(#{1,6})\s+(.*)$/);if(a){o.push({kind:"heading",level:a[1]?.length??1,text:a[2]??""}),r+=1;continue}if(ml.test(n)){let s=[];for(;r<t.length&&ml.test(t[r]??"");)s.push((t[r]??"").replace(ml,"")),r+=1;let l=[],c=[];for(let p of s)p.trim()===""?(c.length>0&&l.push(c.join(" ")),c=[]):c.push(p);c.length>0&&l.push(c.join(" ")),o.push({kind:"quote",paragraphs:l});continue}if(Pf(t,r)){let s=ns(t[r]??""),l=Z0(ns(t[r+1]??""),s.length),c=[];for(r+=2;r<t.length&&Rc(t[r]??"");)c.push(G0(ns(t[r]??""),s.length)),r+=1;o.push({kind:"table",headers:s,rows:c,aligns:l});continue}if(/^\s*([-*]|\d+\.)\s+/.test(n)){let s=/^\s*\d+\.\s+/.test(n),l=[];for(;r<t.length&&/^\s*([-*]|\d+\.)\s+/.test(t[r]??"");)l.push((t[r]??"").replace(/^\s*([-*]|\d+\.)\s+/,"")),r+=1;o.push({kind:"list",ordered:s,items:l});continue}let i=K0(t,r);if(i){o.push({kind:"imageGallery",images:i.images}),r=i.nextIndex;continue}let d=[];for(;r<t.length&&(t[r]??"").trim()!==""&&!(t[r]??"").trimStart().startsWith("```")&&!/^#{1,6}\s+/.test(t[r]??"")&&!Pf(t,r)&&!ml.test(t[r]??"")&&!/^\s*([-*]|\d+\.)\s+/.test(t[r]??"");)d.push(t[r]??""),r+=1;o.push({kind:"para",text:d.join(" ")});}return o}function K0(e,t){let o=[],r=t;for(;r<e.length;){let n=e[r]??"";if(n.trim()===""){let i=j0(e,r+1);if(o.length>0&&i>=0&&Sf(e[i]??"")){r+=1;continue}break}let a=Sf(n);if(!a)break;o.push(a),r+=1;}return o.length>0?{images:o,nextIndex:r}:null}function j0(e,t){for(let o=t;o<e.length;o+=1)if((e[o]??"").trim()!=="")return o;return -1}function Sf(e){let t=e.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);return t?{alt:t[1]??"",target:t[2]??""}:null}function Pf(e,t){let o=e[t]??"",r=e[t+1]??"";if(!Rc(o)||!Rc(r))return false;let n=ns(o),a=ns(r);return n.length>0&&a.length>=n.length&&a.slice(0,n.length).every(i=>/^:?-{3,}:?$/.test(i.trim()))}function Rc(e){return e.includes("|")&&e.trim()!==""}function ns(e){return e.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(o=>o.trim())}function G0(e,t){return Array.from({length:t},(o,r)=>e[r]??"")}function Z0(e,t){return Array.from({length:t},(o,r)=>{let n=e[r]?.trim()??"";return n.startsWith(":")&&n.endsWith(":")?"center":n.endsWith(":")?"right":"left"})}function _n(e,t={}){let o=[],r=Mf(t),n=/(\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*|_([^_]+)_|!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(https?:\/\/[^\s<>()]+))/g,a=0,i=0,d;for(;(d=n.exec(e))!==null;){if(d.index>a&&o.push(...Ln(e.slice(a,d.index),i++,r)),d[2]!==void 0)o.push(jsx("strong",{children:Ln(d[2],i++,r)},i++));else if(d[3]!==void 0)o.push(jsx("code",{children:d[3]},i++));else if(d[4]!==void 0)o.push(jsx("em",{children:Ln(d[4],i++,r)},i++));else if(d[5]!==void 0)o.push(jsx("em",{children:Ln(d[5],i++,r)},i++));else if(d[6]!==void 0&&d[7]!==void 0)o.push(jsx(_f,{alt:d[6],target:d[7],openLocalPath:r,onLocalImagePreview:t.onLocalImagePreview,localPathBaseDir:t.localPathBaseDir},i++));else if(d[8]!==void 0&&d[9]!==void 0){let s=Pc(d[9],W0(t)),l=s?null:rs(d[9]),c=d[8];o.push(s&&r?jsx(f,{variant:"unstyled",type:"button",className:"md__local-path",title:s,onClick:()=>r(s,c),children:Dn(c,i++)},i++):l?jsx("a",{href:l,target:"_blank",rel:"noreferrer noopener",children:Dn(c,i++)},i++):jsx(Fragment$1,{children:Dn(c,i++)},i++));}else if(d[10]!==void 0){let{href:s,trailing:l}=ey(d[10]),c=rs(s);o.push(c?jsx("a",{href:c,target:"_blank",rel:"noreferrer noopener",children:s},i++):jsx(Fragment$1,{children:s},i++)),l&&o.push(...Ln(l,i++,r));}a=d.index+d[0].length;}return a<e.length&&o.push(...Ln(e.slice(a),i++,r)),o}function Dn(e,t){let o=[],r=/(\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*|_([^_]+)_)/g,n=0,a=t,i;for(;(i=r.exec(e))!==null;)i.index>n&&o.push(...is(e.slice(n,i.index),a++)),i[2]!==void 0?o.push(jsx("strong",{children:Dn(i[2],a++)},`lb-${a++}`)):i[3]!==void 0?o.push(jsx("code",{children:i[3]},`lb-${a++}`)):i[4]!==void 0?o.push(jsx("em",{children:Dn(i[4],a++)},`lb-${a++}`)):i[5]!==void 0&&o.push(jsx("em",{children:Dn(i[5],a++)},`lb-${a++}`)),n=i.index+i[0].length;return n<e.length&&o.push(...is(e.slice(n),a++)),o}function _f({alt:e,target:t,openLocalPath:o,onLocalImagePreview:r,localPathBaseDir:n,variant:a="inline"}){let i=t.trim(),[d,s]=useState(null),l=ty(i),c=!l&&Rf(i)&&!!r,p=a==="gallery"?"md__image md__image--gallery":"md__image",m=a==="gallery"?"md__image-button md__image-button--gallery":"md__image-button";if(useEffect(()=>{if(!c||!r){s(null);return}let b=false;return s(null),r(i).then(w=>{b||s(w?.kind==="image"?w:null);}).catch(()=>{b||s(null);}),()=>{b=true;}},[i,r,c]),l)return jsx("img",{className:p,src:l,alt:e});if(d)return jsx(f,{variant:"unstyled",type:"button",className:m,title:e||d.name,"data-md-image-target":i,"data-md-image-base-dir":n||void 0,"data-md-image-name":e||d.name,onClick:()=>o?.(i,e),children:jsx("img",{className:p,src:d.url,alt:e||d.name})});let u=e||i;return o&&Rf(i)?jsx(f,{variant:"unstyled",type:"button",className:"md__image-fallback",title:i,onClick:()=>o(i,e),children:u}):jsx("span",{className:"md__image-fallback",children:u})}function q0({images:e,options:t}){let o=Mf(t);return jsx("div",{className:`md__image-gallery md__image-gallery--${Y0(e.length)}`,"data-image-count":e.length,children:e.map((r,n)=>jsx(_f,{alt:r.alt,target:r.target,openLocalPath:o,onLocalImagePreview:t.onLocalImagePreview,localPathBaseDir:t.localPathBaseDir,variant:"gallery"},`${r.target}-${n}`))})}function Y0(e){return e<=1?"count-1":e===2?"count-2":e===3?"count-3":"count-many"}function Ln(e,t,o){return o?X0(e,t,o):is(e,t)}function X0(e,t,o){let r=[],n=t;for(let a of yf(e)){if(a.kind==="text"){r.push(...is(a.text,n++));continue}r.push(jsx(f,{variant:"unstyled",type:"button",className:"md__local-path",title:a.path,onClick:()=>o(a.path),children:a.path},`path-${n++}`)),a.trailing&&r.push(...is(a.trailing,n++));}return r}function Q0(e,t){let o=new Set,r=[],n=a=>Cf(a,o,r,t);for(let a of e)a.kind==="code"||a.kind==="imageGallery"||((a.kind==="heading"||a.kind==="para")&&n(a.text),a.kind==="list"&&a.items.forEach(n),a.kind==="quote"&&a.paragraphs.forEach(n),a.kind==="table"&&(a.headers.forEach(n),a.rows.forEach(i=>i.forEach(n))));return r}function is(e,t){let o=[],r=/:([a-zA-Z0-9_+-]+):/g,n=0,a=t,i;for(;(i=r.exec(e))!==null;){i.index>n&&o.push(jsx(Fragment$1,{children:e.slice(n,i.index)},`t-${a++}`));let d=J0[i[1]??""];o.push(jsx(Fragment$1,{children:d??i[0]},`t-${a++}`)),n=i.index+i[0].length;}return n<e.length&&o.push(jsx(Fragment$1,{children:e.slice(n)},`t-${a++}`)),o}var J0={smile:"\u{1F604}",smiley:"\u{1F603}",grinning:"\u{1F600}",joy:"\u{1F602}",blush:"\u{1F60A}",wink:"\u{1F609}",thinking:"\u{1F914}",rocket:"\u{1F680}",tada:"\u{1F389}",sparkles:"\u2728",fire:"\u{1F525}",warning:"\u26A0\uFE0F",white_check_mark:"\u2705",check:"\u2705",x:"\u274C",cross_mark:"\u274C",memo:"\u{1F4DD}",bulb:"\u{1F4A1}",link:"\u{1F517}",book:"\u{1F4D6}",calendar:"\u{1F4C5}",clock:"\u{1F552}",robot:"\u{1F916}",eyes:"\u{1F440}",point_right:"\u{1F449}",point_left:"\u{1F448}",thumbsup:"\u{1F44D}",thumbsdown:"\u{1F44E}"};function ey(e){let t=e.match(/^(.*?)([.,!?;:,。!?;:、]+)?$/);return {href:t?.[1]||e,trailing:t?.[2]||""}}function ty(e){let t=rs(e);return t&&/^https?:\/\//i.test(t)?t:null}function Rf(e){return /\.(png|jpe?g|gif|webp|bmp|svg|heic|heif|tiff?)(?:[?#].*)?$/i.test(e.trim())}function ss({source:e,className:t,onLocalPathClick:o,onLocalFileCardOpen:r,onRequestLocalFileOpenWithOptions:n,onLocalFileCardOpenWith:a,onLocalFileCardOpenWithMenu:i,onLocalImagePreview:d,localPathBaseDir:s,onRunCommand:l}){let c=useMemo(()=>U0(e),[e]),p={onLocalPathClick:o,onLocalFileOpen:r,onLocalImagePreview:d,localPathBaseDir:s},m=useMemo(()=>o?Q0(c,{allowRelative:!!s}):[],[c,s,o]);return jsxs("div",{className:t?`md ${t}`:"md",children:[c.map((u,b)=>{if(u.kind==="heading"){let w=`h${Math.min(u.level,6)}`;return jsx(w,{children:_n(u.text,p)},b)}if(u.kind==="code"){let w=l&&H0(u.language);return jsx(il,{language:u.language||"text",onRun:w?()=>l(u.text):void 0,children:u.text},b)}if(u.kind==="list"){let w=u.items.map((v,h)=>jsx("li",{children:_n(v,p)},h));return u.ordered?jsx("ol",{children:w},b):jsx("ul",{children:w},b)}return u.kind==="table"?jsx("div",{className:"md__table-wrap",children:jsxs("table",{children:[jsx("thead",{children:jsx("tr",{children:u.headers.map((w,v)=>jsx("th",{className:`al-${u.aligns[v]??"left"}`,children:_n(w,p)},v))})}),jsx("tbody",{children:u.rows.map((w,v)=>jsx("tr",{children:w.map((h,x)=>jsx("td",{className:`al-${u.aligns[x]??"left"}`,children:_n(h,p)},x))},v))})]})},b):u.kind==="quote"?jsx("blockquote",{children:u.paragraphs.map((w,v)=>jsx("p",{children:_n(w,p)},v))},b):u.kind==="imageGallery"?jsx(q0,{images:u.images,options:p},b):jsx("p",{children:_n(u.text,p)},b)}),o&&m.length>0&&jsx(xn,{layout:"stack",className:"md-file-cards","aria-label":"\u672C\u5730\u6587\u4EF6\u5F15\u7528",children:m.map(u=>jsx(da,{variant:"card",name:u.name,path:u.path,meta:u.typeLabel??"",onOpen:()=>(r??(b=>o(b.path)))(u),onNativeActionsMenu:i?()=>i(u):void 0,onRequestActions:n?()=>n(u):void 0,onAction:a?b=>a(u,b):void 0},u.id??u.path))})]})}function Lf({className:e="",content:t="",html:o,fileName:r,loading:n,showLineNumbers:a=false,rawMode:i=false,onRawModeChange:d,bare:s=false,children:l,...c}){return jsxs("div",{"data-slot":"md-preview","data-ow-chrome":s?"bare":"card",className:g("flex flex-col w-full h-full overflow-hidden",s?"bg-transparent":"[border-radius:var(--ow-radius-card)] border border-[color:var(--ow-border)] bg-[var(--ow-bg)]",e),...c,children:[!s&&jsxs("div",{"data-ow-part":"header",className:"flex items-center justify-between py-2.5 px-3.5 border-b border-ow-border flex-shrink-0",children:[jsxs("div",{"data-ow-part":"filename",className:"flex items-center gap-2 font-medium text-ow-fs-ui leading-none text-ow-text",children:[jsx(Xo,{name:r||"document.md",className:"text-ow-text-3 flex-shrink-0",width:16,height:16}),jsx("span",{children:r||"document.md"})]}),d&&jsx(uo,{className:"flex-shrink-0",size:"sm",items:[{key:"preview",label:"\u9884\u89C8"},{key:"raw",label:"\u6E90\u7801"}],activeKey:i?"raw":"preview",onChange:p=>d(p==="raw")})]}),jsxs("div",{"data-ow-part":"body",className:g("flex-1 min-h-0 overflow-y-auto",s?"p-0":"py-3 px-3.5"),children:[!t&&!o?jsx("div",{"data-ow-part":"empty",className:"flex items-center justify-center h-full",children:n||jsx(H,{message:"\u6682\u65E0\u5185\u5BB9"})}):i?jsx("pre",{"data-ow-part":"raw",className:"m-0 font-normal text-ow-fs-ui leading-[1.6] font-[family-name:var(--ow-font-mono)] text-ow-text whitespace-pre-wrap break-words",children:a?t.split(`
|
|
11
|
+
`).map((p,m)=>jsxs("div",{"data-ow-part":"line",className:"flex gap-3",children:[jsx("span",{"data-ow-part":"line-num",className:"flex-shrink-0 w-8 text-right tabular-nums text-ow-text-3 select-none",children:m+1}),jsx("code",{children:p})]},m)):jsx("code",{children:t})}):o?jsx("div",{"data-ow-part":"rendered",className:"ow-md-rendered",dangerouslySetInnerHTML:{__html:o}}):jsx("div",{"data-ow-part":"rendered",className:"ow-md-rendered",children:jsx("pre",{style:{whiteSpace:"pre-wrap",fontFamily:"var(--ow-font-sans)"},children:t})}),l]})]})}var Tc="shrink-0";function En({open:e,fileName:t,meta:o,monoTitle:r=true,surface:n="plain",children:a,loading:i=false,error:d,errorDetail:s,emptyMessage:l="\u8FD9\u4E2A\u6587\u4EF6\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u5185\u5BB9\u3002",onDownload:c,openWithOptions:p,onOpenWith:m,openWithLabel:u="\u6253\u5F00\u65B9\u5F0F",actions:b,onClose:w,width:v,contentHeight:h,className:x=""}){let k=useId(),y=!!p?.length,P=(p??[]).map(M=>M.kind==="divider"?{...$a,key:M.id}:M.kind==="header"?{type:"group",key:M.id,label:M.name}:{key:M.id,label:M.name,hint:M.isDefault?"\u9ED8\u8BA4":void 0,disabled:M.disabled}),N=a!=null&&a!==false,S;i?S=jsxs("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"flex flex-col gap-3 p-6",children:[jsx(re,{variant:"line",height:20,width:"42%"}),jsx(re,{variant:"line",height:14}),jsx(re,{variant:"line",height:14}),jsx(re,{variant:"line",height:14,width:"76%"}),jsx(re,{variant:"block",height:180})]}):d?S=jsx("div",{"data-ow-part":"error",className:"p-6",children:jsx(J,{variant:"error",detail:s,children:d})}):N?S=a:S=jsx("div",{"data-ow-part":"empty",className:"flex h-full items-center justify-center p-6",children:jsx(H,{message:l})});let R=i||d||!N?"plain":n;return jsxs(oe,{open:e,bare:true,onClose:w,ariaLabel:t,width:v??"min(920px, 90vw)",className:`flex flex-col overflow-hidden ${x}`,children:[jsxs("header",{"data-ow-part":"titlebar",className:"flex shrink-0 items-center gap-3 px-4",style:{height:"var(--ow-titlebar-h)"},children:[jsx("span",{id:k,"data-ow-part":"filename",title:t,className:`min-w-0 flex-1 truncate text-ow-fs-ui font-medium text-[color:var(--ow-text)] ${r?"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]":""}`,children:t}),o&&jsx("span",{"data-ow-part":"meta",className:"shrink-0 font-[family-name:var(--ow-font-mono)] text-ow-fs-eyebrow [font-variant-numeric:tabular-nums] text-[color:var(--ow-text-3)]",children:o}),jsxs("div",{"data-ow-part":"actions",className:"flex shrink-0 items-center gap-1",children:[b,c&&jsx(f,{type:"button",variant:"ghost",size:"sm",className:Tc,icon:jsx(Co,{"aria-hidden":"true"}),"aria-label":"\u4E0B\u8F7D",title:"\u4E0B\u8F7D",onClick:c}),y&&jsx(co,{items:P,width:220,ariaLabel:u,onSelect:M=>{let T=p?.find(_=>_.id===M);T&&m?.(T);},trigger:jsx(f,{type:"button",variant:"ghost",size:"sm",className:Tc,children:u})}),jsx(f,{type:"button",variant:"ghost",size:"sm",className:Tc,icon:jsx(Q,{"aria-hidden":"true"}),"aria-label":"\u5173\u95ED\u9884\u89C8",title:"\u5173\u95ED\u9884\u89C8",onClick:w})]})]}),jsx(ry,{surface:R,height:h,children:S})]})}function ry({surface:e="plain",height:t,children:o,className:r=""}){let n={height:t??"min(640px, 70vh)"};return e==="paper"?jsx("div",{"data-ow-part":"content","data-ow-surface":"paper",className:`min-h-0 flex-1 overflow-auto bg-[var(--ow-bg)] p-6 ${r}`,style:n,children:jsx("div",{"data-theme":"light","data-ow-part":"paper",className:"mx-auto w-full max-w-[760px] border border-[color:var(--ow-border)] bg-[var(--ow-paper)] text-[color:var(--ow-text)] [border-radius:var(--ow-radius-card)]",style:{padding:"var(--ow-space-8)"},children:o})}):e==="mat"?jsx("div",{"data-theme":"dark","data-ow-part":"content","data-ow-surface":"mat",className:`flex min-h-0 flex-1 items-center justify-center overflow-auto bg-[var(--ow-surface-2)] text-[color:var(--ow-text)] ${r}`,style:n,children:o}):jsx("div",{"data-ow-part":"content","data-ow-surface":"plain",className:`flex min-h-0 flex-1 flex-col overflow-auto bg-[var(--ow-bg)] ${r}`,style:n,children:o})}function If({source:e,preview:t,onClose:o,onCopy:r}){let[n,a]=useState("preview"),[i,d]=useState(false);return jsx(En,{open:true,fileName:"\u6D88\u606F\u5185\u5BB9",monoTitle:false,surface:n==="preview"?"paper":"plain",onClose:o,actions:jsxs(Fragment,{children:[jsx(Ht,{"aria-label":"\u9884\u89C8\u65B9\u5F0F",size:"sm",value:n,onChange:l=>a(l),options:[{value:"preview",label:"\u9884\u89C8"},{value:"markdown",label:"Markdown"}]}),jsxs(f,{variant:"ghost",size:"sm",type:"button",onClick:async()=>{try{r?await r(e):await navigator.clipboard.writeText(e),d(!0),window.setTimeout(()=>d(!1),2e3);}catch{}},children:[i?jsx(be,{"aria-hidden":"true"}):jsx(Tt,{"aria-hidden":"true"}),jsx("span",{children:i?"\u5DF2\u590D\u5236":"\u590D\u5236"})]})]}),children:n==="preview"?jsx("div",{"data-ow-part":"content",children:t}):jsx("pre",{"data-ow-part":"source",className:"m-0 overflow-auto whitespace-pre-wrap break-words p-4 font-[family-name:var(--ow-font-mono)] text-ow-fs-ui font-normal leading-[1.6] text-[color:var(--ow-text-2)]",children:jsx("code",{children:e})})})}var ny=[{code:"misunderstanding",label:"\u7406\u89E3\u9519\u8BEF"},{code:"wrong_context",label:"\u4E0A\u4E0B\u6587\u9519\u8BEF"},{code:"unclear",label:"\u56DE\u7B54\u4E0D\u6E05\u6670"},{code:"code_error",label:"\u4EE3\u7801\u9519\u8BEF"},{code:"unprofessional",label:"\u56DE\u7B54\u4E0D\u4E13\u4E1A"},{code:"code_format",label:"\u4EE3\u7801\u683C\u5F0F\u9519\u8BEF"},{code:"other",label:"\u5176\u4ED6"}];function Of({onClose:e,onSubmit:t,productName:o="Orbitwork"}){let[r,n]=useState(new Set),[a,i]=useState(""),d=l=>{n(c=>{let p=new Set(c);return p.has(l)?p.delete(l):p.add(l),p});},s=()=>{r.size!==0&&t({reasons:[...r],detail:a.trim()});};return jsx(oe,{open:true,width:500,title:"\u8BF7\u9009\u62E9\u4E0D\u6EE1\u610F\u7684\u539F\u56E0",onClose:e,actions:jsx(f,{variant:"primary",size:"lg",className:"w-full",disabled:r.size===0,onClick:s,children:"\u63D0\u4EA4\u53CD\u9988"}),children:jsxs("div",{className:"flex flex-col gap-5",children:[jsx("div",{"data-ow-part":"reasons",className:"flex flex-wrap gap-2.5",role:"group","aria-label":"\u4E0D\u6EE1\u610F\u7684\u539F\u56E0",children:ny.map(({code:l,label:c})=>{let p=r.has(l);return jsx(f,{type:"button",variant:"secondary",size:"md","aria-pressed":p,"data-ow-state":p?"on":void 0,icon:p?jsx(be,{"aria-hidden":"true"}):void 0,className:g(p&&"bg-[var(--ow-control-on)] text-[color:var(--ow-control-on-glyph)] border-[color:var(--ow-control-on)] hover:bg-[var(--ow-control-on)] active:bg-[var(--ow-control-on)]"),onClick:()=>d(l),children:c},l)})}),jsx(te,{multiline:true,placeholder:"\u5206\u4EAB\u8BE6\u7EC6\u4FE1\u606F\uFF08\u53EF\u9009\uFF09",value:a,onChange:i,rows:3,maxLength:2e3}),jsxs("p",{className:"m-0 text-[color:var(--ow-text-3)] font-normal text-ow-fs-ui leading-[1.5] font-[family-name:var(--ow-font-sans)]",children:["\u4F60\u7684\u5BF9\u8BDD\u5185\u5BB9\u5C06\u4E0E\u53CD\u9988\u4E00\u540C\u63D0\u4EA4\uFF0C\u4EE5\u5E2E\u52A9\u6539\u8FDB ",o]})]})})}function Vf({message:e,retrying:t=false,compact:o=false,onRetry:r}){let n=e?.trim()||void 0;return jsxs(J,{className:`model-catalog-error${o?" model-catalog-error--compact":""}`,variant:"error",title:"\u6A21\u578B\u5217\u8868\u52A0\u8F7D\u5931\u8D25",action:jsx(f,{variant:o?"text":"secondary",size:"sm",icon:jsx(Ue,{}),onClick:r,disabled:t,"aria-busy":t,children:t?"\u91CD\u8BD5\u4E2D\u2026":"\u91CD\u8BD5"}),children:[jsx("span",{className:"model-catalog-error__message",children:"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u540E\u91CD\u8BD5"}),n&&jsx("span",{className:"model-catalog-error__detail",title:n,children:n})]})}function zf({inputModalities:e,outputModalities:t,className:o=""}){let r=$f(e),n=$f(t);return r.length===0&&n.length===0?null:jsxs("span",{"data-slot":"model-modalities",className:g("inline-flex items-center gap-0.5 align-middle",o),title:`\u8F93\u5165\uFF1A${r.map(Mc).join("\u3001")}\uFF1B\u8F93\u51FA\uFF1A${n.map(Mc).join("\u3001")}`,children:[jsx("span",{"data-ow-part":"group",className:"inline-flex items-center gap-0.5","aria-label":"\u8F93\u5165\u6A21\u6001",children:r.map(a=>jsx(Ff,{modality:a},`in-${a}`))}),jsx("span",{"data-ow-part":"arrow",className:"text-ow-text-3 font-medium text-ow-fs-body-sm leading-none px-px","aria-hidden":"true",children:"\u2192"}),jsx("span",{"data-ow-part":"group",className:"inline-flex items-center gap-0.5","aria-label":"\u8F93\u51FA\u6A21\u6001",children:n.map(a=>jsx(Ff,{modality:a},`out-${a}`))})]})}var sy="bg-[var(--ow-mention-bg)] text-[color:var(--ow-mention-text)]";function Ff({modality:e}){return jsx("span",{"data-slot":"model-modality","data-variant":e,className:g("w-[18px] h-[18px] rounded-[var(--ow-radius-tag)] inline-flex items-center justify-center leading-none","[&_svg]:w-3.5 [&_svg]:h-3.5",sy),"aria-label":Mc(e),children:dy(e)})}function $f(e){let t=[];for(let o of e??[]){let r=o.toLowerCase().replace(/^modality_/,"").replace(/^model_modality_/,"").replace(/^content_modality_/,"").replace(/^input_/,"").replace(/^output_/,"");ly(r)&&!t.includes(r)&&t.push(r);}return t}function ly(e){return e==="text"||e==="image"||e==="video"||e==="audio"}function dy(e){return e==="text"?jsx(Nu,{"aria-hidden":"true"}):e==="image"?jsx(Su,{"aria-hidden":"true"}):e==="video"?jsx(Pu,{"aria-hidden":"true"}):jsx(Ru,{"aria-hidden":"true"})}function Mc(e){return {text:"\u6587\u672C",image:"\u56FE\u7247",video:"\u89C6\u9891",audio:"\u97F3\u9891"}[e]}function py({message:e}){return jsx(H,{message:e,variant:"text"})}function Hf({options:e,value:t,onSelect:o,selectedOptionRef:r,empty:n,emptyMessage:a="\u6682\u65E0\u5339\u914D\u7684\u6A21\u578B",density:i="default",className:d=""}){return jsx("div",{"data-slot":"model-picker-list","data-density":i,className:["cpop__scroll","model-picker-list",i==="compact"&&"model-picker-list--compact",d].filter(Boolean).join(" "),children:e.length===0?n??jsx(py,{message:a}):e.map(s=>{let l=!s.disabled&&s.id===t,c=uy(s.multiplier),p=[s.disabled&&"disabled",l&&"selected"].filter(Boolean).join(" ");return jsxs(f,{variant:"unstyled","data-slot":"model-option","data-ow-state":p||void 0,"aria-current":l||void 0,className:["modelopt",l&&"active",s.disabled&&"modelopt--locked"].filter(Boolean).join(" "),disabled:s.disabled,onClick:()=>o(s.id),children:[jsxs("span",{ref:l?r:void 0,className:"meta",children:[jsxs("span",{className:"n model-title",children:[jsx("span",{className:"model-title__name",children:s.name}),(s.recommended||s.inputModalities||s.outputModalities)&&jsxs("span",{className:"model-title__badges",children:[s.recommended&&jsx(at,{children:"\u63A8\u8350"}),jsx(zf,{inputModalities:s.inputModalities,outputModalities:s.outputModalities})]})]}),s.secondaryText&&jsx("span",{className:"s",children:s.secondaryText})]}),(c||s.trailing||l)&&jsxs("span",{className:"modelopt__trailing",children:[c&&jsx("span",{className:"modelopt__multiplier",children:c}),s.trailing&&jsx("span",{className:"ck",children:s.trailing}),jsx("span",{className:"modelopt__check","data-ow-state":l?"on":"off","aria-hidden":"true",children:l?jsx(be,{}):null})]})]},s.id??"__clear__")})})}function uy(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?null:`\xD7${Number(e.toFixed(4))}`}function Wf({open:e,selectedKey:t,query:o,itemCount:r}){let n=useRef(null),a=useCallback(i=>{n.current=i;},[]);return useEffect(()=>{if(!e||!t||o.trim())return;let i=requestAnimationFrame(()=>{n.current?.scrollIntoView({block:"center",inline:"nearest"});});return ()=>cancelAnimationFrame(i)},[r,e,o,t]),a}function An({value:e,options:t,onChange:o,placeholder:r="\u9009\u62E9\u6A21\u578B",allowClear:n=false,emptyLabel:a="\u6682\u65E0\u53EF\u7528\u6A21\u578B"}){let[i,d]=useState(false),[s,l]=useState(""),c=useRef(null),p=useRef(null),m=t.find(k=>k.id===e)??null,u=t.length===0,b=()=>{d(false),l("");};useEffect(()=>{if(!i)return;let k=P=>{let N=P.target;c.current?.contains(N)||p.current?.contains(N)||b();},y=P=>{P.key==="Escape"&&b();};return document.addEventListener("pointerdown",k,true),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",k,true),document.removeEventListener("keydown",y);}},[i]);let w=s.trim().toLowerCase(),v=w?t.filter(k=>`${k.name} ${k.id}`.toLowerCase().includes(w)):t,h=[...n&&(!w||"\u4E0D\u8BBE\u7F6E".includes(w))?[{id:null,name:"\u4E0D\u8BBE\u7F6E"}]:[],...v.map(({id:k,name:y,recommended:P,inputModalities:N,outputModalities:S,multiplier:R})=>({id:k,name:y,recommended:P,inputModalities:N,outputModalities:S,multiplier:R}))],x=Wf({open:i,selectedKey:e,query:s,itemCount:h.length});return jsxs("div",{ref:c,style:{position:"relative"},children:[jsx(Qd,{open:i,size:"md",disabled:u,className:"min-w-[200px]",onClick:()=>{u||(d(k=>!k),l(""));},children:m?m.name:u?a:jsx("span",{className:"text-[color:var(--ow-placeholder)]",children:r})}),i&&jsx(pt,{className:"model-dropdown",surfaceRef:p,width:288,portal:c,searchable:t.length>6,searchValue:s,onSearchChange:l,searchPlaceholder:"\u641C\u7D22\u6A21\u578B",contentKey:h.length,children:jsx(Hf,{options:h,value:e,selectedOptionRef:x,onSelect:k=>{o(k),b();},emptyMessage:"\u6682\u65E0\u5339\u914D\u7684\u6A21\u578B"})})]})}function wa({title:e,titleTier:t="default",eyebrow:o,description:r,actions:n,divider:a=true,children:i,className:d,...s}){let l=useId();return jsxs("section",{"data-slot":"section","data-ow-state":a?"divided":void 0,"aria-labelledby":l,...s,className:g("flex flex-col min-w-0",a&&"pb-5 border-b border-ow-border",d),children:[jsxs("div",{"data-ow-part":"head",className:"flex items-start gap-3 min-w-0",children:[jsxs("div",{className:"flex-1 min-w-0",children:[o&&jsx("div",{"data-ow-part":"eyebrow",className:"mb-1.5 font-medium text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)] leading-none text-[color:var(--ow-eyebrow)]",children:o}),jsx("h3",{id:l,"data-ow-part":"title","data-ow-tier":t,className:g("m-0 leading-tight font-[family-name:var(--ow-font-sans)]",t==="eyebrow"?"font-medium text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)] text-[color:var(--ow-eyebrow)]":"font-semibold text-ow-fs-ui text-ow-text"),children:e}),r&&jsx("p",{"data-ow-part":"description",className:"mt-1.5 mb-0 text-[length:var(--ow-fs-body-sm,12px)] leading-normal text-[color:var(--ow-text-2)]",children:r})]}),n&&jsx("div",{"data-ow-part":"actions",className:"flex flex-shrink-0 items-center gap-2",children:n})]}),i!=null&&jsx("div",{"data-ow-part":"body",className:"mt-3 min-w-0",children:i})]})}var hy=[{value:"standard",label:"\u6807\u51C6"},{value:"deep",label:"\u6DF1\u5EA6\u601D\u8003"},{value:"max",label:"\u6781\u9650\u601D\u8003"}];function DL(e){return e.loadFailed&&e.onRetry?jsx(Vf,{message:e.loadError,retrying:e.retrying,onRetry:e.onRetry}):e.available?jsx(wa,{title:"\u9ED8\u8BA4\u6A21\u578B",titleTier:"eyebrow",divider:false,children:jsxs("div",{className:"flex flex-col gap-0",children:[jsx(dt,{title:"\u9ED8\u8BA4\u6A21\u578B",description:"\u65E5\u5E38\u5BF9\u8BDD\u4E0E\u4EFB\u52A1\u4F7F\u7528\u7684\u6A21\u578B",className:"set-row",action:jsx(An,{value:e.defaultModel,options:e.defaultModelOptions,onChange:t=>{t&&e.onDefaultModelChange(t);}})}),jsx(dt,{title:"\u56FE\u7247\u6A21\u578B",description:"\u56FE\u50CF\u751F\u6210\u4E0E\u7F16\u8F91\u4F7F\u7528\u7684\u6A21\u578B",className:"set-row",action:jsx(An,{value:e.imageModel,options:e.imageModelOptions,onChange:e.onImageModelChange,allowClear:true,placeholder:"\u9009\u62E9\u56FE\u7247\u6A21\u578B",emptyLabel:"\u6682\u65E0\u53EF\u7528\u7684\u56FE\u7247\u6A21\u578B"})}),jsx(dt,{title:"\u89C6\u89C9\u6A21\u578B",description:"\u56FE\u7247\u5185\u5BB9\u7406\u89E3\u4F7F\u7528\u7684\u6A21\u578B",className:"set-row",action:jsx(An,{value:e.visionModel,options:e.visionModelOptions,onChange:e.onVisionModelChange,allowClear:true,placeholder:"\u9009\u62E9\u89C6\u89C9\u6A21\u578B",emptyLabel:"\u6682\u65E0\u53EF\u7528\u7684\u89C6\u89C9\u6A21\u578B"})}),e.onEffortChange&&jsx(dt,{title:"\u601D\u8003\u5F3A\u5EA6",description:"\u5F71\u54CD\u63A8\u7406\u94FE\u957F\u5EA6\u4E0E\u8017\u65F6",className:"set-row",action:jsx(Ht,{size:"sm",options:hy,value:e.effort??"standard",onChange:t=>e.onEffortChange?.(t),"aria-label":"\u601D\u8003\u5F3A\u5EA6"})})]})}):jsx(wa,{title:"\u9ED8\u8BA4\u6A21\u578B",titleTier:"eyebrow",divider:false,children:jsx(H,{message:`\u6682\u65E0\u53EF\u7528\u6A21\u578B\u6743\u76CA\u3002${e.unavailableReason}`})})}var Sr=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("input",{ref:n,className:[!t&&"ow-input",o].filter(Boolean).join(" "),...r})}),jf=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("textarea",{ref:n,className:[!t&&"ow-input ow-input--textarea",o].filter(Boolean).join(" "),...r})}),BL=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("select",{ref:n,className:[!t&&"ow-input ow-input--select",o].filter(Boolean).join(" "),...r})}),OL=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("input",{type:"checkbox",ref:n,className:[!t&&"ow-input ow-input--checkbox",o].filter(Boolean).join(" "),...r})}),VL=forwardRef(function({unstyled:t=false,className:o="",...r},n){return jsx("input",{type:"radio",ref:n,className:[!t&&"ow-input ow-input--radio",o].filter(Boolean).join(" "),...r})});var yy={type:"divider"};function WL({items:e,className:t="",size:o="md",collapsed:r=false,ariaLabel:n="\u83DC\u5355"}){return jsx("nav",{"data-slot":"nav-menu","data-ow-size":o,"data-ow-state":r?"collapsed":void 0,className:g("flex flex-col gap-0.5 data-[ow-state=collapsed]:w-10",t),"aria-label":n,children:e.map((a,i)=>"type"in a?jsx("div",{"data-ow-part":"divider",className:"h-px my-1.5 mx-2.5 bg-ow-border",role:"separator"},a.key??`divider-${i}`):jsxs(f,{type:"button","data-ow-part":"item","data-ow-state":[a.active&&"active",a.danger&&"danger"].filter(Boolean).join(" ")||void 0,variant:"unstyled",className:g("flex items-center [border-radius:var(--ow-radius-control)] border-0 font-normal text-ow-fs-ui leading-none font-[family-name:var(--ow-font-sans)] text-left w-full transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] ow-focus-ring","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","disabled:cursor-not-allowed disabled:text-[color:var(--ow-disabled-text)]","h-auto",o==="sm"?"min-h-8 gap-2 py-1":"min-h-10 gap-3 py-2",r?"px-0 justify-center":o==="sm"?"px-2.5":"px-3",a.active&&"bg-[var(--ow-current-bg)] text-[color:var(--ow-text)] font-medium",a.danger&&"text-[color:var(--ow-error)] hover:bg-[var(--ow-error-tint)] hover:text-[color:var(--ow-error-hover)]"),disabled:a.disabled,"aria-current":a.active?"page":void 0,"aria-label":r?a.label:void 0,title:r?a.label:void 0,onClick:a.onClick,children:[a.icon&&jsx("span",{className:"w-4 h-4 inline-flex flex-shrink-0",children:a.icon}),!r&&jsxs("span",{className:"flex flex-1 min-w-0 flex-col gap-1",children:[jsx("span",{children:a.label}),a.description&&jsx("span",{className:"font-normal text-ow-fs-eyebrow leading-snug font-[family-name:var(--ow-font-sans)] text-ow-text-3 overflow-hidden text-ellipsis whitespace-nowrap",children:a.description})]}),!r&&a.suffix&&jsx("span",{className:"ml-auto text-ow-text-3 font-normal text-ow-fs-body-sm leading-none font-[family-name:var(--ow-font-sans)] flex-shrink-0",children:a.suffix})]},a.key))})}var UL=yy;var Lc={stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round"};function bl({kind:e,className:t=""}){let o=["ow-plan-feature-icon",`ow-plan-feature-icon--${e}`,t].filter(Boolean).join(" ");return e==="exclude"?jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:jsx("path",{d:"M17.5 6.5L6.5 17.5M6.5 6.5L17.5 17.5",...Lc})}):e==="highlight"?jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:jsx("path",{d:"M12 4L13.75 10.25L20 12L13.75 13.75L12 20L10.25 13.75L4 12L10.25 10.25Z",...Lc})}):jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:jsx("path",{d:"M4.5 12.5L9.8 17.8L19.5 6.6",...Lc})})}var ky=["openai","kimi","glm","minimax"];function eD({plans:e,applyingId:t,error:o,onBack:r,onApply:n,onSwitchProvider:a}){return jsxs("div",{className:"login-panel__inner login-noplan",children:[jsx("div",{className:"login-noplan__head",children:jsx(go,{onClick:r,children:"\u8FD4\u56DE"})}),jsxs("div",{className:"login-noplan__intro",children:[jsxs("div",{className:"login-noplan__mark","aria-hidden":"true",children:[jsx("span",{className:"ow-beacon-idle"}),jsx("span",{className:"m",children:"No Plan"})]}),jsx("div",{className:"t",children:"\u60A8\u8FD8\u672A\u5F00\u901A Orbitwork \u4E2A\u4EBA\u5957\u9910"}),jsxs("div",{className:"s",children:["Orbitwork \u4E2A\u4EBA\u5957\u9910\u8BA9\u4F60\u4E00\u952E\u8C03\u7528 Standard / Plus / Pro / Max \u56DB\u6863\u6A21\u578B\uFF1B",jsx("br",{}),"\u4E5F\u53EF\u4EE5\u76F4\u63A5\u7528 OpenAI\u3001Kimi\u3001GLM\u3001Minimax \u8D26\u6237\u767B\u5F55\uFF0C\u4F7F\u7528\u5404\u81EA\u7684\u989D\u5EA6\u3002"]})]}),o&&jsx(J,{variant:"error",children:o}),jsx("div",{className:"plan-cards",children:e.map(i=>jsxs("div",{className:"plan-card",children:[jsxs("div",{className:"ph",children:[jsx("span",{className:"n",children:i.name}),i.recommended?jsx(at,{children:"\u63A8\u8350"}):null]}),jsxs("div",{className:"price",children:[i.creditsLabel,jsx("span",{className:"price-unit",children:" \u989D\u5EA6/\u6708"})]}),jsx("div",{className:"tag",children:i.tagline}),jsx("ul",{className:"feat",children:i.features.map((d,s)=>jsxs("li",{className:`feat-${d.kind}`,children:[jsx(bl,{kind:d.kind}),jsx("span",{children:d.label})]},s))}),jsx(f,{variant:i.recommended?"primary":"secondary",className:"w-full",disabled:t!==null&&t!==i.id,loading:t===i.id,onClick:()=>n(i.id),children:t===i.id?"\u7533\u8BF7\u4E2D\u2026":i.recommended?"\u7ACB\u5373\u5F00\u901A":"\u9009\u62E9"})]},i.id))}),jsxs("div",{className:"login-noplan__alt",children:[jsx("span",{children:"\u6216\u4F7F\u7528\u5176\u4ED6\u5E73\u53F0\u8D26\u6237\uFF1A"}),ky.map(i=>jsx(f,{variant:"unstyled",className:"link",onClick:()=>a(i),children:i},i))]})]})}function aD({label:e="\u6253\u5F00",iconName:t,onOpen:o,onRequestOptions:r,onSelect:n,className:a=""}){return jsx(Fi,{label:e,iconName:t,onOpen:o,onRequestOptions:r,onSelect:n,className:a})}function ha({eyebrow:e,title:t,description:o,meta:r,search:n,actions:a,tabs:i,activeTabKey:d,onTabChange:s,tabsExtra:l,className:c}){return jsxs("div",{"data-slot":"page-head",className:g("shrink-0 px-7 pt-8",c),children:[jsxs("div",{className:"flex items-start gap-4",children:[jsxs("div",{className:"min-w-0 flex-1",children:[jsx("div",{"data-slot":"page-head-eyebrow",className:"text-[length:var(--ow-fs-eyebrow-cjk)] font-medium tracking-[var(--ow-ls-eyebrow-cjk)] text-[color:var(--ow-eyebrow)]",children:e}),jsx("h1",{"data-slot":"page-head-title",className:"m-0 mt-0.5 ow-font-display text-ow-fs-headline font-medium leading-[var(--ow-lh-headline)] tracking-[0.01em] text-[color:var(--ow-text)]",children:t}),(o!=null||r!=null)&&jsxs("div",{"data-slot":"page-head-desc",className:"mt-1 text-ow-fs-body text-[color:var(--ow-text-2)]",children:[o,r!=null&&jsx("span",{"data-slot":"page-head-meta",className:g("ow-font-mono text-ow-fs-caption text-[color:var(--ow-text-3)] [font-variant-numeric:tabular-nums]",o!=null&&"ml-1"),children:r})]})]}),(n!=null||a!=null)&&jsxs("div",{"data-slot":"page-head-aside",className:"flex shrink-0 items-center gap-2 pt-1.5",children:[n!=null&&jsx("div",{className:"w-[216px] shrink-0",children:n}),a]})]}),i&&i.length>0&&jsxs("div",{"data-slot":"page-head-tabs",className:"mt-3.5 flex items-center border-b border-[color:var(--ow-border)]",children:[jsx(uo,{size:"lg",items:i,activeKey:d,onChange:s}),l!=null&&jsx("div",{"data-slot":"page-head-tabs-extra",className:"ml-auto flex shrink-0 items-center gap-2",children:l})]})]})}function hD({stats:e,plans:t,currentPlanName:o,usagePercent:r,loading:n=false,error:a=null,pendingId:i=null,resetting:d=false,resetDisabled:s=false,onChoose:l,onReset:c}){let[p,m]=useState(null),[u,b]=useState(false),w=t.find(S=>S.id===p)??null,v=o.trim().toLowerCase(),h=v!==""&&o!=="\u672A\u63D0\u4F9B",x=t.find(S=>S.name.trim().toLowerCase()===v)?.includedCredits,k=i!==null||d,y=r===null?null:Math.min(Math.max(r,0),100),P=async S=>{await l(S)&&m(null);},N=async()=>{await c()&&b(false);};return jsxs("div",{className:"plan-settings",children:[jsxs("div",{className:"usage-stat",children:[jsxs("div",{className:"b",children:[jsx("div",{className:"v",children:e.used}),jsx("div",{className:"k",children:"\u672C\u6708\u5DF2\u7528"})]}),jsxs("div",{className:"b",children:[jsx("div",{className:"v",children:e.limit}),jsx("div",{className:"k",children:"\u5957\u9910\u989D\u5EA6"})]}),jsxs("div",{className:"b",children:[jsx("div",{className:"v",children:e.currentPlan}),jsx("div",{className:"k",children:"\u5F53\u524D\u5957\u9910"})]})]}),jsxs("div",{className:"usage-bar",children:[y!==null&&jsxs(Fragment,{children:[jsx("div",{className:"usage-bar__track",children:jsx("div",{className:"usage-bar__fill","data-ow-state":y>=80?"warn":void 0,style:{width:`${y}%`}})}),jsxs("div",{className:"usage-bar__pct",children:[y.toFixed(1),"%"]})]}),jsx(f,{variant:"secondary",disabled:s||k,onClick:()=>b(true),children:"\u91CD\u7F6E\u7528\u91CF"}),s&&jsx("span",{className:"plan-reset__hint",children:"\u989D\u5EA6\u5DF2\u624B\u52A8\u8BBE\u5B9A\uFF0C\u65E0\u6CD5\u91CD\u7F6E"})]}),jsxs(wa,{title:"\u5957\u9910\u7BA1\u7406",titleTier:"eyebrow",divider:false,className:"mt-6",children:[a&&jsx(J,{variant:"error",children:a}),n?jsx(H,{message:"\u5957\u9910\u52A0\u8F7D\u4E2D\u2026"}):t.length===0?jsx(H,{message:a??"\u5957\u9910\u670D\u52A1\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"}):jsx("div",{className:"plan-cards",children:t.map(S=>{let R=S.name.trim().toLowerCase()===v&&v!=="";return jsxs("div",{className:`plan-card${R?" current":""}`,children:[jsxs("div",{className:"ph",children:[jsx("span",{className:"n",children:S.name}),R?jsx(at,{variant:"success",children:"\u5F53\u524D"}):S.recommended?jsx(at,{children:"\u63A8\u8350"}):null]}),jsxs("div",{className:"price",children:[S.creditsLabel,jsx("span",{className:"price-unit",children:" \u989D\u5EA6/\u6708"})]}),jsx("div",{className:"tag",children:S.tagline}),jsx("ul",{className:"feat",children:S.features.map((M,T)=>jsxs("li",{className:`feat-${M.kind}`,children:[jsx(bl,{kind:M.kind}),jsx("span",{children:M.label})]},T))}),jsx(f,{variant:"secondary",className:"plan-card__action",disabled:k||R,onClick:()=>m(S.id),children:Ny({isCurrent:R,pending:i===S.id,hasCurrentPlan:h,targetCredits:S.includedCredits,currentCredits:x})})]},S.id)})})]}),w&&jsxs(oe,{open:true,width:380,closable:false,closeOnOverlayClick:i===null,closeOnEscape:i===null,onClose:()=>m(null),title:`\u786E\u8BA4${Sy({hasCurrentPlan:h,targetCredits:w.includedCredits,currentCredits:x})}\uFF1F`,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:i!==null,onClick:()=>m(null),children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",disabled:i!==null,onClick:()=>{P(w.id);},children:i===w.id?"\u63D0\u4EA4\u4E2D\u2026":"\u786E\u8BA4\u63D0\u4EA4"})]}),children:["\u5373\u5C06\u4E3A\u4F60",h?"\u5207\u6362\u5230":"\u5F00\u901A","\u300C",w.name,"\u300D\u5957\u9910\uFF0C\u64CD\u4F5C\u63D0\u4EA4\u540E\u9700\u7B49\u5F85\u5BA1\u6279\u901A\u8FC7\u3002"]}),u&&jsx(oe,{open:true,width:380,closable:false,closeOnOverlayClick:!d,closeOnEscape:!d,onClose:()=>b(false),title:"\u786E\u8BA4\u91CD\u7F6E\u7528\u91CF\uFF1F",actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:d,onClick:()=>b(false),children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",disabled:d,onClick:()=>{N();},children:d?"\u63D0\u4EA4\u4E2D\u2026":"\u786E\u8BA4\u63D0\u4EA4"})]}),children:"\u786E\u5B9A\u8981\u91CD\u7F6E\u5F53\u524D\u5957\u9910\u7684\u4F7F\u7528\u91CF\u5417\uFF1F\u64CD\u4F5C\u63D0\u4EA4\u540E\u9700\u7B49\u5F85\u5BA1\u6279\u901A\u8FC7\u3002"})]})}function Ny(e){let{isCurrent:t,pending:o,hasCurrentPlan:r,targetCredits:n,currentCredits:a}=e;if(t)return "\u5F53\u524D\u5957\u9910";if(o)return "\u5904\u7406\u4E2D\u2026";if(!r)return "\u5F00\u901A";if(n!==void 0&&a!==void 0){if(n>a)return "\u5347\u7EA7\u5957\u9910";if(n<a)return "\u964D\u7EA7\u5957\u9910"}return "\u5207\u6362\u5230\u6B64\u5957\u9910"}function Sy(e){let{hasCurrentPlan:t,targetCredits:o,currentCredits:r}=e;if(!t)return "\u5F00\u901A\u5957\u9910";if(o!==void 0&&r!==void 0){if(o>r)return "\u5347\u7EA7\u5957\u9910";if(o<r)return "\u964D\u7EA7\u5957\u9910"}return "\u5207\u6362\u5957\u9910"}var My={"bottom-start":"top-full left-0 mt-1.5","bottom-end":"top-full right-0 mt-1.5","top-start":"bottom-full left-0 mb-1.5","top-end":"bottom-full right-0 mb-1.5"},_y={"bottom-start":"top-start","bottom-end":"top-end","top-start":"bottom-start","top-end":"bottom-end"};function ND({open:e,onOpenChange:t,trigger:o,children:r,placement:n="bottom-start",width:a,padded:i=true,autoFlip:d=true,estimatedHeight:s=240,closeOnOutsideClick:l=true,closeOnEscape:c=true,disabled:p=false,ariaLabel:m,className:u="",triggerClassName:b=""}){let w=useRef(null),v=useRef(null),[h,x]=useState(n),k=`${useId()}-popover`,y=useCallback(()=>t(false),[t]);return useEffect(()=>{if(!e)return;if(!d){x(n);return}let P=v.current?.getBoundingClientRect();if(!P){x(n);return}let N=window.innerHeight-P.bottom,S=P.top,R=n.startsWith("top"),M=R?S>=s:N>=s,T=R?N>=s:S>=s;x(!M&&T?_y[n]:n);},[e,n,d,s]),useEffect(()=>{if(!e||!l)return;let P=N=>{w.current?.contains(N.target)||y();};return document.addEventListener("mousedown",P,true),()=>document.removeEventListener("mousedown",P,true)},[e,l,y]),useEffect(()=>{if(!e||!c)return;let P=N=>{N.key==="Escape"&&(N.stopPropagation(),y(),v.current?.querySelector("button,[tabindex]")?.focus());};return document.addEventListener("keydown",P,true),()=>document.removeEventListener("keydown",P,true)},[e,c,y]),jsxs("span",{ref:w,"data-slot":"popover","data-ow-state":e?"open":"closed","data-ow-disabled":p||void 0,className:g("relative inline-flex",u),children:[jsx("span",{ref:v,"data-ow-part":"trigger","aria-haspopup":"dialog","aria-expanded":e,"aria-disabled":p||void 0,"aria-controls":e?k:void 0,className:g("inline-flex",b),onClick:()=>{p||t(!e);},children:o}),e&&jsx("div",{id:k,"data-slot":"popover-panel","data-ow-part":"surface","data-ow-placement":h,role:"dialog","aria-label":m,style:a===void 0?void 0:{width:a},className:g("ow-motion absolute min-w-max max-w-[min(92vw,420px)]",My[h],"z-[var(--ow-z-popover)] bg-[var(--ow-popover-bg)]","[border-radius:var(--ow-radius-card)] border border-[color:var(--ow-border)] shadow-[var(--ow-shadow-pop)]","text-[color:var(--ow-text)] font-normal text-ow-fs-ui leading-[1.5] font-[family-name:var(--ow-font-sans)]","animate-[fade-in_var(--ow-dur-2)_var(--ow-ease-beacon)]",i&&"p-3"),children:r})]})}var Xf=memo(function({element:t}){let o=t.blob||"";return o?jsx("div",{className:"",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:jsx("audio",{controls:true,preload:"metadata",style:{width:"100%"},children:jsx("source",{src:o})})}):jsx("div",{className:"",style:Ey,children:jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ow-text-3)",strokeWidth:"1.5",children:[jsx("path",{d:"M9 18V5l12-2v13"}),jsx("circle",{cx:"6",cy:"18",r:"3"}),jsx("circle",{cx:"18",cy:"16",r:"3"})]})})}),Ey={width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--ow-surface-2)",borderRadius:"var(--ow-radius-2xs)"};var eg=memo(function({element:t}){let o=useRef(null),r=useRef(null),[n,a]=useState(false);useEffect(()=>{let d=false;async function s(){if(o.current)try{let l=await import('echarts');if(d)return;let c=l.init(o.current);r.current=c;let p=Oy(t);c.setOption(p);}catch{d||a(true);}}return s(),()=>{d=true,r.current?.dispose(),r.current=null;}},[t]),useEffect(()=>{if(!o.current||!r.current)return;let d=new ResizeObserver(()=>{r.current?.resize();});return d.observe(o.current),()=>d.disconnect()},[n]);let i={width:"100%",height:"100%"};return n?jsx("div",{className:"",style:{...i,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--ow-surface)",borderRadius:"var(--ow-radius-2xs)"},children:jsx("span",{style:{color:"var(--ow-text-3)",fontSize:12},children:"\u56FE\u8868"})}):jsx("div",{ref:o,className:"",style:i})});function Oy(e){let{chartType:t,colors:o}=e;if(t==="scatterChart"||t==="bubbleChart")return Vy(e);let r=e,{data:n,barDir:a}=r;if(!n?.length)return {};let i=n[0]?.values?.map(l=>l.x)||[],d=n.map(l=>({name:l.key,data:l.values.map(c=>c.y),type:Fy(t),...t.includes("area")?{areaStyle:{}}:{}})),s={color:o?.length?o:void 0,legend:{show:n.length>1,bottom:0,textStyle:{fontSize:10}},grid:{left:40,right:20,top:20,bottom:n.length>1?30:10},tooltip:{trigger:"axis"},series:d};return t.includes("pie")||t==="doughnutChart"?(s.series=[{type:"pie",radius:t==="doughnutChart"?["40%","70%"]:"70%",data:n[0]?.values?.map(l=>({name:l.x,value:l.y}))||[]}],delete s.grid,delete s.tooltip):t.includes("radar")?(s.radar={indicator:i.map(l=>({name:l}))},s.series=[{type:"radar",data:n.map(l=>({name:l.key,value:l.values.map(c=>c.y)}))}],delete s.grid):a==="bar"?(s.yAxis={type:"category",data:i},s.xAxis={type:"value"}):(s.xAxis={type:"category",data:i},s.yAxis={type:"value"}),s}function Vy(e){return {color:e.colors?.length?e.colors:void 0,xAxis:{type:"value"},yAxis:{type:"value"},series:[{type:"scatter",data:e.data||[]}],grid:{left:40,right:20,top:20,bottom:20}}}function Fy(e){return e.includes("bar")||e.includes("Bar")?"bar":e.includes("line")||e.includes("Line")||e.includes("area")||e.includes("Area")?"line":e.includes("pie")||e.includes("Pie")?"pie":e.includes("radar")||e.includes("Radar")?"radar":"bar"}var tg=memo(function({element:t}){return t.elements?.length?jsx("div",{className:"relative w-full h-full",style:{position:"relative",width:"100%",height:"100%"},children:t.elements.map((o,r)=>jsx(ja,{element:o},`diagram-${r}`))}):t.textList?.length?jsx("div",{className:"",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",padding:8},children:t.textList.map((o,r)=>jsx("div",{style:{fontSize:12,marginBottom:4},children:o},r))}):null});var Pr=1.3333333333333333;function xe(e){return e*Pr}function hl(e,t,o){let r=[];return e&&r.push(`rotate(${e}deg)`),t&&r.push("scaleX(-1)"),o&&r.push("scaleY(-1)"),r.length?r.join(" "):void 0}function xl(e){if(!e)return {};switch(e.type){case "color":return {background:e.value};case "image":return e.value?.base64?{backgroundImage:`url(data:image/png;base64,${e.value.base64})`,backgroundSize:"cover",backgroundPosition:"center",opacity:e.value.opacity!=null?e.value.opacity:void 0}:{};case "gradient":return {background:zy(e.value)};case "pattern":return {background:e.value?.backgroundColor||"var(--ow-paper)"};default:return {}}}function zy(e){if(!e?.colors?.length)return "transparent";let t=e.colors.map(o=>`${o.color} ${o.pos}`).join(", ");return e.path==="line"?`linear-gradient(${(e.rot??0)+90}deg, ${t})`:`radial-gradient(circle, ${t})`}function og(e,t){if(!e)return {defs:"",fillAttr:"none"};switch(e.type){case "color":return {defs:"",fillAttr:e.value||"none"};case "gradient":{let{colors:o,rot:r,path:n}=e.value;if(!o?.length)return {defs:"",fillAttr:"none"};if(n==="line"){let d=(r??0)*Math.PI/180,s=50-50*Math.cos(d),l=50-50*Math.sin(d),c=50+50*Math.cos(d),p=50+50*Math.sin(d),m=o.map(b=>`<stop offset="${b.pos}" stop-color="${b.color}"/>`).join("");return {defs:`<linearGradient id="${t}" x1="${s}%" y1="${l}%" x2="${c}%" y2="${p}%">${m}</linearGradient>`,fillAttr:`url(#${t})`}}let a=o.map(d=>`<stop offset="${d.pos}" stop-color="${d.color}"/>`).join("");return {defs:`<radialGradient id="${t}" cx="50%" cy="50%" r="50%">${a}</radialGradient>`,fillAttr:`url(#${t})`}}case "image":return {defs:"",fillAttr:"transparent"};default:return {defs:"",fillAttr:"none"}}}function rg(e){if(!e)return {};let{h:t,v:o,blur:r,color:n}=e;return {filter:`drop-shadow(${xe(t)}px ${xe(o)}px ${xe(r)}px ${n})`}}function ag(e,t,o){if(!t||!e)return {};let r=o||"solid";return {border:`${xe(t)}px ${r} ${e}`}}function ng(e){if(!e)return {};let t=[];return e.brightness!=null&&t.push(`brightness(${1+e.brightness/100})`),e.contrast!=null&&t.push(`contrast(${1+e.contrast/100})`),e.saturation!=null&&t.push(`saturate(${1+e.saturation/100})`),t.length?{filter:t.join(" ")}:{}}var sg=memo(function({element:t}){let o={position:"relative",width:"100%",height:"100%",transform:hl(t.rotate,t.isFlipH,t.isFlipV)};return jsx("div",{className:"",style:o,children:t.elements?.map((r,n)=>jsx(ja,{element:r},`group-${n}`))})});var dg=memo(function({element:t}){let o=t.base64?t.base64.startsWith("data:")?t.base64:`data:image/png;base64,${t.base64}`:t.blob||"";if(!o)return null;let r={width:"100%",height:"100%",objectFit:"fill",display:"block",...ng(t.filters)},n={width:"100%",height:"100%",overflow:"hidden",borderRadius:(t.borderWidth,void 0)};if(t.borderColor&&t.borderWidth&&(n.border=`${xe(t.borderWidth)}px ${t.borderType||"solid"} ${t.borderColor}`),t.rect){let{t:a=0,b:i=0,l:d=0,r:s=0}=t.rect;if(a||i||d||s){r.clipPath=`inset(${a*100}% ${s*100}% ${i*100}% ${d*100}%)`;let l=1/(1-d-s),c=1/(1-a-i);r.width=`${l*100}%`,r.height=`${c*100}%`,r.objectFit="cover",r.marginLeft=`${-d*l*100}%`,r.marginTop=`${-a*c*100}%`,r.clipPath=void 0;}}return jsx("div",{className:"",style:n,children:jsx("img",{src:o,alt:"",style:r,draggable:false})})});var cg=memo(function({element:t}){let o=t.picBase64?t.picBase64.startsWith("data:")?t.picBase64:`data:image/png;base64,${t.picBase64}`:t.picBlob||"";return o?jsx("div",{className:"",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:jsx("img",{src:o,alt:t.latex||"\u516C\u5F0F",style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"},draggable:false})}):jsx("div",{className:"",style:Ky,children:jsx("span",{style:{fontFamily:"var(--ow-font-mono)",fontSize:12},children:t.latex||t.text||"\u516C\u5F0F"})})}),Ky={width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--ow-surface-2)",borderRadius:"var(--ow-radius-2xs)"};var ug=memo(function({element:t}){let o=xe(t.width),r=xe(t.height),n=`shape-fill-${t.order}-${Math.random().toString(36).slice(2,8)}`,{defs:a,fillAttr:i}=useMemo(()=>og(t.strokeOnly?void 0:t.fill,n),[t.fill,t.strokeOnly,n]),d=t.borderColor||"none",s=t.borderWidth?xe(t.borderWidth):0,l=t.borderStrokeDasharray||void 0,c=useMemo(()=>{if(t.path&&t.pathViewBox){let b=t.pathViewBox;return jsxs("svg",{width:o,height:r,viewBox:`${b.x} ${b.y} ${b.width} ${b.height}`,preserveAspectRatio:"none",className:"absolute top-0 left-0 block",children:[a&&jsx("defs",{dangerouslySetInnerHTML:{__html:a}}),jsx("path",{d:t.path,fill:i,stroke:d,strokeWidth:s,strokeDasharray:l})]})}return jsxs("svg",{width:o,height:r,viewBox:`0 0 ${o} ${r}`,preserveAspectRatio:"none",className:"absolute top-0 left-0 block",children:[a&&jsx("defs",{dangerouslySetInnerHTML:{__html:a}}),Gy(t.shapType,o,r,i,d,s,l)]})},[t.path,t.pathViewBox,t.shapType,o,r,i,d,s,l,a]),p={position:"relative",width:"100%",height:"100%"},m=t.content&&t.content.replace(/<[^>]*>/g,"").trim(),u={position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",flexDirection:"column",overflow:"hidden",wordWrap:"break-word"};if(t.vAlign)switch(t.vAlign){case "mid":case "middle":case "ctr":u.justifyContent="center";break;case "bottom":case "b":u.justifyContent="flex-end";break;default:u.justifyContent="flex-start";}return t.textInset&&(u.paddingLeft=xe(t.textInset.l)+"px",u.paddingTop=xe(t.textInset.t)+"px",u.paddingRight=xe(t.textInset.r)+"px",u.paddingBottom=xe(t.textInset.b)+"px"),jsxs("div",{className:"pointer-events-none",style:p,children:[c,m&&jsx("div",{className:"pointer-events-auto font-medium text-[length:var(--ow-fs-caption)] leading-none text-ow-text-2 select-none",style:u,dangerouslySetInnerHTML:{__html:t.content}})]})});function Gy(e,t,o,r,n,a,i){let d={fill:r,stroke:n,strokeWidth:a,strokeDasharray:i};switch(e){case "ellipse":case "oval":return jsx("ellipse",{cx:t/2,cy:o/2,rx:t/2-a/2,ry:o/2-a/2,...d});case "roundRect":case "snipRoundRect":{let s=Math.min(t,o)*.1;return jsx("rect",{x:a/2,y:a/2,width:t-a,height:o-a,rx:s,ry:s,...d})}case "triangle":case "isoTriangle":{let s=`${t/2},${a/2} ${a/2},${o-a/2} ${t-a/2},${o-a/2}`;return jsx("polygon",{points:s,...d})}case "rtTriangle":{let s=`${a/2},${a/2} ${a/2},${o-a/2} ${t-a/2},${o-a/2}`;return jsx("polygon",{points:s,...d})}case "diamond":{let s=`${t/2},${a/2} ${t-a/2},${o/2} ${t/2},${o-a/2} ${a/2},${o/2}`;return jsx("polygon",{points:s,...d})}case "parallelogram":{let s=t*.2,l=`${s},${a/2} ${t-a/2},${a/2} ${t-s},${o-a/2} ${a/2},${o-a/2}`;return jsx("polygon",{points:l,...d})}case "trapezoid":{let s=t*.15,l=`${s},${a/2} ${t-s},${a/2} ${t-a/2},${o-a/2} ${a/2},${o-a/2}`;return jsx("polygon",{points:l,...d})}case "pentagon":{let s=t/2,l=o/2,c=Math.min(t,o)/2-a/2,p=Array.from({length:5},(m,u)=>{let b=(u*72-90)*Math.PI/180;return `${s+c*Math.cos(b)},${l+c*Math.sin(b)}`}).join(" ");return jsx("polygon",{points:p,...d})}case "hexagon":{let s=t/2,l=o/2,c=Math.min(t,o)/2-a/2,p=Array.from({length:6},(m,u)=>{let b=(u*60-90)*Math.PI/180;return `${s+c*Math.cos(b)},${l+c*Math.sin(b)}`}).join(" ");return jsx("polygon",{points:p,...d})}case "star4":case "star5":case "star6":case "star8":case "star10":case "star12":{let s=Number.parseInt(e.replace("star",""))||5;return Zy(t,o,s,a,d)}case "rightArrow":case "leftArrow":case "upArrow":case "downArrow":return qy(e,t,o,a,d);case "line":case "straightConnector1":case "bentConnector3":case "curvedConnector3":return jsx("line",{x1:a/2,y1:o/2,x2:t-a/2,y2:o/2,stroke:n,strokeWidth:a||1,strokeDasharray:i});default:return jsx("rect",{x:a/2,y:a/2,width:t-a,height:o-a,...d})}}function Zy(e,t,o,r,n){let a=e/2,i=t/2,d=Math.min(e,t)/2-r/2,s=d*.4,l=[];for(let c=0;c<o*2;c++){let p=c%2===0?d:s,m=(c*180/o-90)*Math.PI/180;l.push(`${a+p*Math.cos(m)},${i+p*Math.sin(m)}`);}return jsx("polygon",{points:l.join(" "),...n})}function qy(e,t,o,r,n){let a=r/2,i=.35,d=.4,s;switch(e){case "rightArrow":{let l=o*i,c=t*(1-d);s=`${a},${o/2-l} ${c},${o/2-l} ${c},${a} ${t-a},${o/2} ${c},${o-a} ${c},${o/2+l} ${a},${o/2+l}`;break}case "leftArrow":{let l=o*i,c=t*d;s=`${t-a},${o/2-l} ${c},${o/2-l} ${c},${a} ${a},${o/2} ${c},${o-a} ${c},${o/2+l} ${t-a},${o/2+l}`;break}case "upArrow":{let l=t*i,c=o*d;s=`${t/2-l},${o-a} ${t/2-l},${c} ${a},${c} ${t/2},${a} ${t-a},${c} ${t/2+l},${c} ${t/2+l},${o-a}`;break}case "downArrow":{let l=t*i,c=o*(1-d);s=`${t/2-l},${a} ${t/2-l},${c} ${a},${c} ${t/2},${o-a} ${t-a},${c} ${t/2+l},${c} ${t/2+l},${a}`;break}default:s=`0,0 ${t},0 ${t},${o} 0,${o}`;}return jsx("polygon",{points:s,...n})}var mg=memo(function({element:t}){return jsx("div",{className:"w-full h-full overflow-hidden pointer-events-auto",children:jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse",tableLayout:"fixed",fontSize:"12px"},children:[jsx("colgroup",{children:t.colWidths.map((r,n)=>jsx("col",{style:{width:xe(r)+"px"}},n))}),jsx("tbody",{children:t.data.map((r,n)=>jsx("tr",{style:{height:xe(t.rowHeights[n]??0)+"px"},children:r.map((a,i)=>{if(a.vMerge||a.hMerge)return null;let d={padding:"var(--ow-space-1, 4px) var(--ow-space-15, 6px)",overflow:"hidden",wordWrap:"break-word",verticalAlign:Xy(a.vAlign)};return a.fillColor&&(d.backgroundColor=a.fillColor),a.fontColor&&(d.color=a.fontColor),a.fontBold&&(d.fontWeight="bold"),a.borders?.top&&(d.borderTop=`${xe(a.borders.top.borderWidth)}px ${a.borders.top.borderType} ${a.borders.top.borderColor}`),a.borders?.bottom&&(d.borderBottom=`${xe(a.borders.bottom.borderWidth)}px ${a.borders.bottom.borderType} ${a.borders.bottom.borderColor}`),a.borders?.left&&(d.borderLeft=`${xe(a.borders.left.borderWidth)}px ${a.borders.left.borderType} ${a.borders.left.borderColor}`),a.borders?.right&&(d.borderRight=`${xe(a.borders.right.borderWidth)}px ${a.borders.right.borderType} ${a.borders.right.borderColor}`),jsx("td",{style:d,colSpan:a.colSpan||void 0,rowSpan:a.rowSpan||void 0,dangerouslySetInnerHTML:{__html:a.text||""}},i)})},n))})]})})});function Xy(e){switch(e){case "mid":case "middle":case "ctr":return "middle";case "bottom":case "b":return "bottom";default:return "top"}}var fg=memo(function({element:t}){let o={width:"100%",height:"100%",wordWrap:"break-word",...xl(t.fill)};if(t.vAlign)switch(o.display="flex",o.flexDirection="column",t.vAlign){case "mid":case "middle":case "ctr":o.justifyContent="center";break;case "bottom":case "b":o.justifyContent="flex-end";break;default:o.justifyContent="flex-start";}return t.isVertical&&(o.writingMode="vertical-rl"),t.textInset&&(o.paddingLeft=xe(t.textInset.l)+"px",o.paddingTop=xe(t.textInset.t)+"px",o.paddingRight=xe(t.textInset.r)+"px",o.paddingBottom=xe(t.textInset.b)+"px"),t.autoFit?.type==="text"&&t.autoFit.fontScale&&(o.fontSize=`${t.autoFit.fontScale*100}%`),jsx("div",{className:"pointer-events-auto",style:o,dangerouslySetInnerHTML:{__html:t.content||""}})});var gg=memo(function({element:t}){let o=t.blob||"";return o?jsx("video",{className:"",style:{width:"100%",height:"100%",objectFit:"contain",background:"var(--ow-graphite)"},controls:true,preload:"metadata",children:jsx("source",{src:o})}):jsx("div",{className:"",style:o2,children:jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ow-text-3)",strokeWidth:"1.5",children:jsx("polygon",{points:"5 3 19 12 5 21 5 3"})})})}),o2={width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--ow-graphite)",borderRadius:"var(--ow-radius-2xs)"};var ja=memo(function({element:t}){let o={position:"absolute",left:xe(t.left),top:xe(t.top),width:xe(t.width),height:xe(t.height),zIndex:t.order??0,transform:hl("rotate"in t?t.rotate:void 0,"isFlipH"in t?t.isFlipH:void 0,"isFlipV"in t?t.isFlipV:void 0),..."shadow"in t?rg(t.shadow):{},..."borderWidth"in t&&t.type!=="shape"?ag(t.borderColor,t.borderWidth,t.borderType):{}};return jsx("div",{className:"pointer-events-none",style:o,children:a2(t)})});function a2(e){switch(e.type){case "text":return jsx(fg,{element:e});case "shape":return jsx(ug,{element:e});case "image":return jsx(dg,{element:e});case "table":return jsx(mg,{element:e});case "chart":return jsx(eg,{element:e});case "video":return jsx(gg,{element:e});case "audio":return jsx(Xf,{element:e});case "diagram":return jsx(tg,{element:e});case "math":return jsx(cg,{element:e});case "group":return jsx(sg,{element:e});default:return null}}var kl=memo(function({slide:t,slideWidth:o,slideHeight:r}){let n=xe(o),a=xe(r),i={position:"relative",width:n,height:a,overflow:"hidden",...xl(t.fill)};t.fill||(i.background="var(--ow-paper)");let d=[...t.layoutElements||[],...t.elements||[]];return jsx("div",{className:"text-ow-text",style:i,children:d.map((s,l)=>jsx(ja,{element:s},`${s.type}-${l}`))})});function Nl({value:e,options:t,onChange:o,onCreate:r,placeholder:n="\u9009\u62E9\u9879\u76EE",disabled:a=false,size:i="md",className:d=""}){let[s,l]=useState(false),[c,p]=useState(""),[m,u]=useState(false),[b,w]=useState(null),{isImeEnter:v,onCompositionEnd:h,onCompositionStart:x}=Dt(),k=c.trim()!==""&&!m,y=useCallback(()=>{l(false),p(""),w(null);},[]),P=async()=>{let S=c.trim();if(!(!S||!r||m)){u(true),w(null);try{let R=await r(S);o(R),y();}catch(R){w(R instanceof Error?R.message:"\u521B\u5EFA\u9879\u76EE\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");}finally{u(false);}}},N=r&&jsx("div",{"data-ow-part":"footer",className:"flex-[0_0_auto] mt-1.5 pt-1.5 border-t border-[color:var(--ow-border)]",children:s?jsxs("div",{"data-ow-part":"create",className:"p-0.5",children:[jsxs("div",{"data-ow-part":"create-row",className:"flex items-center gap-1.5",children:[jsx(te,{autoFocus:true,value:c,placeholder:"\u8F93\u5165\u9879\u76EE\u540D\u79F0","aria-label":"\u9879\u76EE\u540D\u79F0",invalid:!!b,disabled:m,onChange:p,onCompositionStart:x,onCompositionEnd:h,onKeyDown:S=>{v(S)||S.key==="Enter"&&(S.preventDefault(),P());}}),jsx(f,{variant:"primary",size:"sm",type:"button",className:"flex-[0_0_auto] min-w-14",disabled:!k,onClick:()=>{P();},children:m?"\u521B\u5EFA\u4E2D\u2026":"\u521B\u5EFA"})]}),jsx("div",{"data-ow-part":b?"error":"hint",className:g("pt-1.5 px-0.5 pb-0.5 font-normal text-ow-fs-eyebrow leading-[1.25]",b?"text-[color:var(--ow-error)]":"text-[color:var(--ow-text-3)]"),role:b?"alert":void 0,children:b??"\u6309 Enter \u521B\u5EFA\uFF0CEsc \u53D6\u6D88"})]}):jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"add",icon:jsx(We,{className:"w-4 h-4"}),className:"w-full h-auto justify-start py-1.5 px-2 [white-space:normal]",onClick:()=>l(true),children:jsxs("span",{"data-ow-part":"add-meta",className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"add-name",className:"text-[color:var(--ow-text)] font-medium text-ow-fs-ui leading-[1.25] overflow-hidden text-ellipsis whitespace-nowrap",children:"\u65B0\u589E\u9879\u76EE"}),jsx("span",{"data-ow-part":"add-sub",className:"text-[color:var(--ow-text-3)] font-normal text-ow-fs-eyebrow leading-[1.25] overflow-hidden text-ellipsis whitespace-nowrap",children:"\u8F93\u5165\u540D\u79F0\u540E\u7ACB\u5373\u521B\u5EFA"})]})})});return jsx("div",{"data-slot":"project-select",className:g("relative",d),children:jsx(wr,{value:e,options:t,onChange:o,placeholder:n,disabled:a||m,size:i,footer:N})})}function qE({options:e,value:t,onChange:o,"aria-label":r,className:n,variant:a="row"}){let i=useRef(null),d=useCallback(c=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(c.key))return;let m=i.current;if(!m)return;let u=Array.from(m.querySelectorAll('[role="radio"]:not(:disabled)'));if(u.length===0)return;let b=u.indexOf(c.target),w;c.key==="Home"?w=0:c.key==="End"?w=u.length-1:c.key==="ArrowRight"||c.key==="ArrowDown"?w=b<0?0:(b+1)%u.length:w=b<0?0:(b-1+u.length)%u.length,c.preventDefault();let v=u[w];if(!v)return;v.focus();let h=v.getAttribute("data-ow-value");h!==null&&o(h);},[o]),s=e.findIndex(c=>c.value===t&&!c.disabled),l=s>=0?s:e.findIndex(c=>!c.disabled);return jsx("div",{ref:i,role:"radiogroup","aria-label":r,"data-slot":"radio-card-group",onKeyDown:d,"data-ow-variant":a,className:g("flex flex-col min-w-0",a==="card"?"gap-2":"gap-0",n),children:e.map((c,p)=>{let m=c.value===t;return jsxs("button",{type:"button",role:"radio","aria-checked":m,disabled:c.disabled,tabIndex:p===l?0:-1,"data-slot":"radio-card","data-ow-part":"surface","data-ow-value":c.value,"data-ow-state":g(m&&"selected",c.disabled&&"disabled").trim()||void 0,onClick:()=>!c.disabled&&o(c.value),className:g("flex items-start gap-2.5 w-full min-w-0 text-left",a==="card"?"px-3.5 py-3 [border-radius:var(--ow-radius-lg)] border border-[color:var(--ow-border)] bg-[var(--ow-surface)]":"px-0 py-3 border-0 border-[color:var(--ow-border)] [[data-slot=radio-card]+&]:border-t bg-transparent","transition-[background-color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","ow-focus-ring",c.disabled?g("cursor-not-allowed",a==="card"&&"border-[color:var(--ow-disabled-border)]"):"cursor-pointer hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]"),children:[jsx("span",{"aria-hidden":"true","data-ow-part":"dot",className:g("shrink-0 mt-px grid place-items-center w-4 h-4 rounded-full border-[1.5px]",c.disabled?"border-[color:var(--ow-disabled-border)]":m?"border-[color:var(--ow-control-on)]":"border-[color:var(--ow-control-off)]"),children:jsx("span",{className:g("block w-2 h-2 rounded-full",m?c.disabled?"bg-[var(--ow-disabled-text)]":"bg-[var(--ow-control-on)]":"bg-transparent")})}),jsxs("span",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"title",className:g("text-ow-fs-ui font-medium leading-[1.3]",c.disabled?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text)]"),children:c.label}),c.description!=null&&c.description!==false&&jsx("span",{"data-ow-part":"description",className:g("text-[length:var(--ow-fs-caption,12px)] font-normal leading-[1.4]",c.disabled?"text-[color:var(--ow-disabled-text)]":"text-[color:var(--ow-text-2)]"),children:c.description})]})]},c.value)})})}var p2=1600;function zn({items:e,disabled:t,width:o=160,ariaLabel:r="\u66F4\u591A\u64CD\u4F5C",onSelect:n}){let[a,i]=useState(null);useEffect(()=>{if(!a)return;let s=setTimeout(()=>i(null),p2);return ()=>clearTimeout(s)},[a]);let d=a?e.find(s=>s.key===a.key)??null:null;return jsx(co,{triggerClassName:"row-more",width:o,align:"end",ariaLabel:r,items:e.map(s=>({key:s.key,label:s.label,icon:s.icon,danger:s.danger})),onSelect:s=>{e.find(l=>l.key===s)?.confirmsInPlace&&i({key:s,tick:Date.now()}),n(s);},trigger:({open:s,triggerProps:l})=>jsx(f,{variant:"ghost",size:"sm",type:"button","data-state":d?"done":s?"active":"rest",className:`[&_svg]:w-4 [&_svg]:h-4 ${d?"text-[color:var(--ow-success)]":s?"text-[color:var(--ow-text)]":"text-[color:var(--ow-text-3)]"}`,"aria-label":r,title:d?`${d.label}\uFF1A\u5DF2\u5B8C\u6210`:r,disabled:t,icon:d?jsx(be,{}):jsx(Go,{}),...l})})}function lI({prompt:e,onDecision:t}){let o=e.permissionType==="retry_unsandboxed"||e.permissionType==="run_unsandboxed"?"retry":e.permissionType==="dangerous_command"?"dangerous":e.permissionType==="untrusted_command"?"untrusted":"file",r=o!=="file",n=o==="dangerous",[a,i]=useState(false),d=m2(e.permissionType),s=o==="retry"?"\u8BE5\u547D\u4EE4\u88AB\u6C99\u7BB1\u963B\u6B62\uFF0C\u662F\u5426\u5728\u6C99\u7BB1\u5916\u91CD\u65B0\u6267\u884C\uFF1F":o==="dangerous"?"\u68C0\u6D4B\u5230\u9AD8\u98CE\u9669\u547D\u4EE4\uFF0C\u662F\u5426\u5141\u8BB8\u5728\u6C99\u7BB1\u5916\u6267\u884C\uFF1F":o==="untrusted"?"\u662F\u5426\u5141\u8BB8\u5728\u6C99\u7BB1\u5916\u6267\u884C\u8BE5\u547D\u4EE4\uFF1F":`\u662F\u5426\u540C\u610F\u6388\u4E88\u6C99\u7BB1\u5BF9\u4EE5\u4E0B\u6587\u4EF6\u6216\u76EE\u5F55\u7684${d}\u6743\u9650\uFF1F`,l=f2(e.prefixRule),c=r?l?`\u5141\u8BB8\u5E76\u8BB0\u4F4F\u6B64\u524D\u7F00\uFF1A${l}`:"\u81EA\u52A8\u540C\u610F\uFF08\u672C\u4F1A\u8BDD\u518D\u6B21\u6267\u884C\u8BE5\u547D\u4EE4\u65F6\u4E0D\u518D\u8BE2\u95EE\uFF09":"\u81EA\u52A8\u540C\u610F\uFF08\u672C\u6B21\u6267\u884C\u7684\u540E\u7EED\u6587\u4EF6/\u76EE\u5F55\u8BBF\u95EE\u4E0D\u518D\u8BE2\u95EE\uFF09",p=e.path.length>180||e.path.includes(`
|
|
12
|
+
`);return jsxs("div",{"data-slot":"sandbox-prompt",className:"relative bg-[var(--ow-warning-tint)] border border-[color:var(--ow-warning-tint-border)] text-[color:var(--ow-warning-on-tint)] [border-radius:var(--ow-radius-card)] p-3.5 flex flex-col gap-2",role:"alertdialog","aria-label":"\u6C99\u7BB1\u6743\u9650\u8BF7\u6C42",children:[jsx("div",{"data-ow-part":"title",className:"font-semibold text-ow-fs-ui leading-[1.5]",children:s}),e.path&&jsxs("div",{"data-ow-part":"path-wrap",className:"relative min-h-0 flex flex-col",children:[jsx("div",{"data-ow-part":"path","data-ow-state":a?"expanded":void 0,className:g("min-h-0 font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-[length:var(--ow-fs-body-sm)] leading-[1.55] text-ow-text-2 bg-ow-surface-2 [border-radius:var(--ow-radius-control)] py-2 pr-[42px] pl-2.5 overflow-hidden break-words","[display:-webkit-box] [-webkit-line-clamp:4] [-webkit-box-orient:vertical]",a&&"block min-h-[132px] max-h-[min(33vh,320px)] overflow-auto whitespace-pre-wrap [tab-size:2] border border-ow-border py-3 pr-11 pb-[34px] pl-3 [scrollbar-gutter:stable_both-edges]"),title:a?void 0:e.path,children:e.path}),p&&jsx(f,{variant:"unstyled",type:"button","data-ow-part":"toggle","data-ow-state":a?"expanded":void 0,className:g("absolute top-1.5 right-1.5 w-7 h-7 p-0 border-0 [border-radius:var(--ow-radius-action)] bg-transparent text-ow-text-3 inline-flex items-center justify-center cursor-pointer transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)] hover:text-ow-text","[&_svg]:w-4 [&_svg]:h-4 [&_svg]:fill-none [&_svg]:stroke-current [&_svg]:[stroke-width:1.75] [&_svg]:[stroke-linecap:round] [&_svg]:[stroke-linejoin:round]",a&&"top-2 right-2"),onClick:()=>i(m=>!m),"aria-expanded":a,"aria-label":a?"\u6536\u8D77\u547D\u4EE4\u5185\u5BB9":"\u5C55\u5F00\u547D\u4EE4\u5185\u5BB9",title:a?"\u6536\u8D77":"\u5C55\u5F00",children:a?jsx(v2,{}):jsx(qo,{})})]}),jsxs("div",{"data-ow-part":"acts",className:"flex flex-wrap items-center gap-2",children:[jsx(f,{variant:n?"danger":"primary",onClick:()=>t(true,false),children:n?"\u4ECD\u7136\u6267\u884C":"\u540C\u610F"}),jsx(f,{variant:"secondary",onClick:()=>t(true,true),title:c,children:c}),jsx(f,{variant:"ghost","data-ow-part":"deny",onClick:()=>t(false,false),children:"\u4E0D\u540C\u610F"})]})]})}function m2(e){let t=e.includes(":")?e.split(":")[1]??"":"",o=t.includes("r"),r=t.includes("w");return o&&r?"\u8BFB\u53D6\u548C\u5199\u5165":r?"\u5199\u5165":o?"\u8BFB\u53D6":"\u8BFB\u53D6\u548C\u5199\u5165"}function f2(e){return e.map(g2).join(" ")}function g2(e){return /^[A-Za-z0-9_@%+=:,./-]+$/.test(e)?e:`'${e.replaceAll("'",`'"'"'`)}'`}function v2(){return jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[jsx("path",{d:"M9 4v5H4"}),jsx("path",{d:"M15 4v5h5"}),jsx("path",{d:"M9 20v-5H4"}),jsx("path",{d:"M15 20v-5h5"})]})}function Hn({value:e,placeholder:t="\u641C\u7D22",onChange:o,onSearch:r,size:n="md",disabled:a,className:i=""}){let[d,s]=useState(""),{isImeEnter:l,onCompositionEnd:c,onCompositionStart:p}=Dt(),m=e??d,u=useCallback(v=>{s(v),o?.(v);},[o]),b=useCallback(v=>{l(v)||v.key==="Enter"&&r?.(m);},[m,l,r]),w=useCallback(()=>{s(""),o?.("");},[o]);return jsx(te,{type:"text",role:"searchbox",className:g("ow-search-input",i),size:n,value:m,placeholder:t,disabled:a,onChange:u,onCompositionStart:p,onCompositionEnd:c,onKeyDown:b,prefix:jsx($t,{style:{width:16,height:16},"aria-hidden":true}),suffix:m?jsx(f,{variant:"ghost",size:"sm",type:"button",className:"w-7 h-7 p-0 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)]",onClick:w,"aria-label":"\u6E05\u9664",icon:jsx(Q,{className:"w-3.5 h-3.5"})}):void 0})}function yI({title:e,items:t,loading:o=false,loadingRows:r=3,error:n,errorDetail:a,emptyMessage:i="\u6CA1\u6709\u627E\u5230\u76F8\u5173\u7ED3\u679C",onSelect:d,className:s=""}){return jsxs("div",{"data-slot":"search-result",className:g("my-1.5 max-w-[560px] bg-ow-surface border border-ow-border [border-radius:var(--ow-radius-card)] p-3.5",s),children:[e&&jsx("div",{"data-ow-part":"title",className:"mb-2 px-1 text-[length:var(--ow-fs-ui)] font-medium leading-[21px] text-ow-text",children:e}),n?jsx(J,{variant:"error",detail:a,children:n}):o?jsx("div",{"data-ow-part":"loading",className:"flex flex-col gap-1.5",role:"status","aria-label":"\u6B63\u5728\u68C0\u7D22",children:Array.from({length:r},(l,c)=>jsxs("div",{className:"flex flex-col gap-1.5 px-2 py-2",children:[jsx(re,{variant:"line",width:"62%",height:13}),jsx(re,{variant:"line",width:"88%",height:12})]},c))}):t.length===0?jsx(H,{message:i,size:"sm"}):jsx("div",{"data-ow-part":"list",className:"flex flex-col",children:t.map((l,c)=>jsx(w2,{item:l,onSelect:d?()=>d(l,c):void 0},c))})]})}function w2({item:e,onSelect:t}){let o=jsxs(Fragment,{children:[e.badge&&jsx("span",{"data-ow-part":"badge",className:"mt-[3px] min-w-[18px] shrink-0 [border-radius:var(--ow-radius-tag)] bg-ow-surface-2 px-1 py-0.5 text-center text-[length:var(--ow-fs-mark-sm)] font-medium leading-[14px] text-ow-text-3 font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",children:e.badge}),jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[jsx("span",{className:"text-ow-fs-body-sm font-medium leading-[18px] text-ow-text",children:e.title}),e.description&&jsx("span",{className:"text-ow-fs-body-sm leading-[18px] text-ow-text-2",children:e.description})]})]}),r="ow-focus-ring flex w-full items-start gap-2 [border-radius:var(--ow-radius-control)] px-2 py-2 text-left",n="cursor-pointer transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]";return e.href?jsx("a",{"data-ow-part":"row",className:g(r,n,"no-underline"),href:e.href,target:"_blank",rel:"noreferrer",onClick:t,children:o}):t?jsx("button",{"data-ow-part":"row",type:"button",className:g(r,n),onClick:t,children:o}):jsx("div",{"data-ow-part":"row",className:r,children:o})}function TI({count:e,noun:t="\u9879",actions:o,onClear:r,clearLabel:n="\u6E05\u7A7A\u9009\u62E9",alwaysVisible:a=false,disabled:i=false,className:d}){return e<=0&&!a?null:jsxs("div",{"data-slot":"selection-bulk-bar","data-ow-part":"bar","data-ow-role":"selection",role:"region","aria-live":"polite","aria-label":"\u6279\u91CF\u64CD\u4F5C",className:g("absolute bottom-4 left-1/2 -translate-x-1/2 z-[var(--ow-z-sticky)]","flex items-center gap-3 h-12 px-3 box-border","bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)]","[border-radius:var(--ow-radius-card)] [box-shadow:var(--ow-shadow-pop)]","text-[length:var(--ow-fs-ui)] text-[color:var(--ow-text)]",d),children:[jsxs("span",{"data-ow-part":"count",className:"inline-flex items-center gap-1 whitespace-nowrap pl-1",children:[jsx("span",{className:"text-[color:var(--ow-text-2)]",children:"\u5DF2\u9009"}),jsx("span",{className:"font-[family-name:var(--ow-font-mono)] tabular-nums font-medium",children:e}),jsx("span",{className:"text-[color:var(--ow-text-2)]",children:t})]}),o&&jsxs(Fragment,{children:[jsx(Wd,{orientation:"vertical",className:"my-2"}),jsx("div",{"data-ow-part":"actions",className:"flex items-center gap-2",children:o})]}),r&&jsxs(Fragment,{children:[jsx(Wd,{orientation:"vertical",className:"my-2"}),jsx(f,{"data-ow-part":"clear",variant:"ghost",size:"sm",disabled:i,onClick:r,"aria-label":n,icon:jsx(Q,{"aria-hidden":"true"})})]})]})}var x2=`
|
|
13
13
|
.ow-share-strip { container-type: inline-size; position: relative; flex: none; display: flex; align-items: center; height: 58px; padding: 0 18px; box-sizing: border-box; background: var(--ow-stage-bg); color: var(--ow-stage-text); border-top: 1px solid color-mix(in srgb, var(--ow-stage-muted) 30%, transparent); font-family: var(--ow-font-body); }
|
|
14
14
|
.ow-share-strip__lockup { display: flex; align-items: center; gap: 9px; }
|
|
15
15
|
.ow-share-strip__wordmark { font-family: var(--ow-font-display); font-weight: 500; font-size: 15px; letter-spacing: -0.01em; line-height: 1; color: var(--ow-stage-text); }
|
|
@@ -19,7 +19,7 @@ import {A,u,x,t,s,a as a$1,q,p,n}from'./chunk-3KT7IU4X.js';export{u as BUILTIN_O
|
|
|
19
19
|
.ow-share-strip__open:active { background: color-mix(in srgb, var(--ow-stage-text) 12%, transparent); }
|
|
20
20
|
.ow-share-strip__open:focus-visible { outline: 2px solid var(--ow-stage-text); outline-offset: 2px; }
|
|
21
21
|
@container (max-width: 719px) { .ow-share-strip__tagline { display: none; } }
|
|
22
|
-
`;function
|
|
22
|
+
`;function LI({onOpen:e,quiet:t=false,productName:o="Orbitwork",wordmark:r="orbitwork",slogan:n="\u4EA4\u7ED9 Orbitwork\uFF0C\u5DE5\u4F5C\u7EE7\u7EED\u3002"}){return jsxs("div",{className:"ow-share-strip",children:[jsx("style",{children:x2}),jsxs("div",{className:"ow-share-strip__lockup",children:[jsxs("svg",{width:"22",height:"22",viewBox:"2.3 -13.3 96 96","aria-hidden":"true",style:{display:"block"},children:[jsxs("g",{fill:"var(--ow-stage-text)",children:[jsx("circle",{cx:"48",cy:"48",r:"8.2"}),jsx("circle",{cx:"60.2",cy:"20.6",r:"6.7",opacity:".6"}),jsx("circle",{cx:"41.76",cy:"18.66",r:"5.5",opacity:".45"}),jsx("circle",{cx:"25.71",cy:"27.93",r:"4.3",opacity:".3"}),jsx("circle",{cx:"18.16",cy:"44.86",r:"3.3",opacity:".2"})]}),jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:t?"var(--ow-stage-text)":"var(--ow-stage-accent)"})]}),jsx("span",{className:"ow-share-strip__wordmark",children:r})]}),jsx("div",{className:"ow-share-strip__tagline",children:n}),jsxs("button",{type:"button",className:"ow-share-strip__open",onClick:e,children:["\u5728 ",o," \u4E2D\u6253\u5F00"]})]})}var hg=["font-medium leading-none","text-[length:var(--ow-fs-eyebrow-cjk,12px)]","tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]","text-[color:var(--ow-eyebrow)]"].join(" ");function FI({open:e,onClose:t,groups:o,title:r="\u952E\u76D8\u5FEB\u6377\u952E",subtitle:n,emptyMessage:a="\u8FD9\u91CC\u8FD8\u6CA1\u6709\u53EF\u7528\u7684\u5FEB\u6377\u952E\u3002",width:i=520,className:d}){let s=o.every(l=>l.items.length===0);return jsx(oe,{open:e,title:r,subtitle:n,onClose:t,width:i,className:g("[&_[data-slot=dialog-body]]:overflow-y-auto",d),children:jsx("div",{"data-slot":"shortcut-sheet","data-ow-part":"list",children:s?jsx(H,{message:a}):o.map((l,c)=>jsx(Fragment$1,{children:l.items.length>0&&jsxs("section",{"data-ow-part":"group",className:c>0?"mt-5":void 0,children:[jsx("h3",{"data-ow-part":"group-title",className:g(hg,"m-0 mb-2"),children:l.title}),jsx("ul",{className:"m-0 list-none p-0",children:l.items.map(p=>jsxs("li",{"data-ow-part":"row",className:"flex h-8 items-center justify-between gap-4 border-b border-[color:var(--ow-border)] last:border-b-0",children:[jsx("span",{className:"min-w-0 truncate text-[length:var(--ow-fs-ui)] text-[color:var(--ow-text)]",children:p.label}),jsx(Ai,{keys:p.keys,className:"shrink-0"})]},p.id))})]})},l.id))})})}function $I({groups:e,emptyMessage:t="\u8FD9\u91CC\u8FD8\u6CA1\u6709\u53EF\u7528\u7684\u5FEB\u6377\u952E\u3002",className:o}){return e.every(n=>n.items.length===0)?jsx(H,{message:t}):jsx("div",{"data-slot":"shortcut-group-table",className:g("flex flex-col gap-3.5 min-w-0",o),children:e.filter(n=>n.items.length>0).map(n=>jsxs("section",{"data-ow-part":"group",className:"flex flex-col gap-2 min-w-0",children:[jsx("h3",{"data-ow-part":"group-title",className:g(hg,"m-0"),children:n.title}),jsx("div",{className:"flex flex-col min-w-0 overflow-hidden border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-lg)] bg-[var(--ow-surface)]",children:n.items.map((a,i)=>jsxs("div",{"data-ow-part":"row",className:g("flex items-center justify-between gap-3 px-3.5 py-2.5 min-w-0",i>0&&"border-t border-[color:var(--ow-border)]"),children:[jsx("span",{className:"min-w-0 truncate text-[length:var(--ow-fs-ui)] text-[color:var(--ow-text)]",children:a.label}),jsx(Ai,{keys:a.keys,className:"shrink-0"})]},a.id))})]},n.id))})}var xg=[{size:6,opacity:1},{size:5,opacity:.68},{size:4,opacity:.45},{size:3,opacity:.25}];function Ur({generating:e=false,className:t="",style:o}){return jsx("span",{className:`ow-artifact-trail ${t}`,style:{...S2,...o},"aria-hidden":"true",children:xg.map((r,n)=>{let a=e&&n===xg.length-1;return jsx("i",{className:a?"ow-artifact-trail__dot--gen":void 0,style:{...P2,width:r.size,height:r.size,...a?{background:"var(--ow-beacon)",opacity:1}:{opacity:r.opacity}}},n)})})}var yg="__ow_open_with_other__";function GI({title:e,meta:t,generating:o=false,onOpen:r,openWithApps:n,onOpenWith:a,openWithLabel:i="\u6253\u5F00\u65B9\u5F0F",className:d=""}){let s=jsxs(Fragment,{children:[jsx("div",{style:N2,children:jsx(Ur,{generating:o})}),jsx("div",{"data-ow-part":"title",style:R2,children:e}),t&&jsx("div",{"data-ow-part":"meta",style:T2,children:t})]}),l=jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"open-with",className:g("shrink-0 whitespace-nowrap",n?.length&&"flex-row-reverse"),disabled:o,icon:n?.length?jsx(ne,{}):void 0,onClick:n?.length?void 0:()=>a?.(null),children:i}),c=n?.length?[...n.map(p=>({key:p.id,label:p.label,icon:p.icon,hint:p.hint})),$a,{key:yg,label:"\u5176\u4ED6\u5E94\u7528\u2026"}]:null;return jsxs("div",{"data-slot":"artifact-card","data-ow-state":g(o&&"generating",r&&"interactive")||void 0,className:`ow-artifact-card ${d}`,style:k2,children:[r?jsx("button",{type:"button","data-ow-part":"open",className:"ow-focus-ring",style:C2,disabled:o,"aria-label":`\u6253\u5F00 ${e}`,onClick:r,children:s}):jsx("div",{"data-ow-part":"body",style:Cg,children:s}),a&&(c?jsx(co,{trigger:l,items:c,ariaLabel:"\u6253\u5F00\u65B9\u5F0F",onSelect:p=>{if(p===yg)return a(null);let m=n?.find(u=>u.id===p);m&&a(m);}}):l)]})}var k2={display:"flex",alignItems:"center",gap:12,background:"var(--ow-surface)",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-lg)",padding:"12px 14px 11px",fontFamily:"var(--ow-font-body)",transition:"border-color var(--ow-dur-1) var(--ow-ease-beacon)"},Cg={flex:"1 1 auto",minWidth:0},C2={...Cg,display:"block",textAlign:"left",appearance:"none",border:0,padding:0,margin:0,background:"transparent",color:"inherit",font:"inherit",cursor:"pointer",borderRadius:"var(--ow-radius-xs)"},N2={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},S2={display:"flex",alignItems:"center",gap:3,height:8,flex:"none"},P2={display:"block",borderRadius:"50%",background:"var(--ow-text-3)"},R2={fontSize:13.5,fontWeight:600,color:"var(--ow-text)",lineHeight:1.4},T2={fontFamily:"var(--ow-font-mono)",fontVariantNumeric:"tabular-nums",fontSize:10,color:"var(--ow-text-2)",marginTop:5};function JI({state:e,title:t,eyebrow:o,url:r,accessLabel:n,meta:a=[],copied:i=false,errorDetail:d,onOpen:s,onCopy:l,onManageAccess:c,onViewReleases:p}){let m=e==="failed";return jsx("section",{className:`sites-result-card sites-result-card--${m?"error":"success"}`,"aria-label":o,children:jsxs("div",{className:"sites-result-card__content",children:[jsx(Ur,{className:"sites-result-card__trail",style:{marginBottom:8}}),jsxs("div",{className:"sites-result-card__heading",children:[jsxs("div",{className:"sites-result-card__status",children:[jsx("span",{className:"sites-result-card__status-dot","aria-hidden":"true"}),o]}),!m&&n&&jsxs("span",{className:"sites-result-card__access",children:[jsx(oa,{}),n]})]}),jsx("div",{className:"sites-result-card__title",children:t}),r&&jsx("div",{className:"sites-result-card__url",title:r,children:r}),(a.length>0||d)&&jsxs("div",{className:"sites-result-card__meta",children:[a.map((u,b)=>jsx("span",{children:u},b)),d&&jsx("span",{children:d})]}),!m&&(s||l||c||p)&&jsxs("div",{className:"sites-result-card__actions",children:[s&&jsx(f,{size:"sm",variant:"primary",icon:jsx(Mt,{}),onClick:s,children:"\u6253\u5F00\u7AD9\u70B9"}),l&&jsx(f,{size:"sm",variant:"secondary",icon:i?jsx(Va,{}):jsx(Tt,{}),onClick:l,children:i?"\u5DF2\u590D\u5236":"\u590D\u5236\u94FE\u63A5"}),c&&jsx(f,{size:"sm",variant:"secondary",icon:jsx(oa,{}),onClick:c,children:"\u8BBF\u95EE\u6743\u9650"}),p&&jsx(f,{size:"sm",variant:"secondary",icon:jsx(No,{}),onClick:p,children:"\u53D1\u5E03\u8BB0\u5F55"})]})]})})}var _2=[[60.2,20.6,6.7,.6],[41.76,18.66,5.5,.45],[25.71,27.93,4.3,.3],[18.16,44.86,3.3,.2]],Ng=1250,L2=1600,D2="cubic-bezier(0.22, 1, 0.36, 1)",E2=`
|
|
23
23
|
@keyframes ow-splash-fade { from { opacity: 0; } }
|
|
24
24
|
@keyframes ow-splash-sat-in { 0% { transform: rotate(-70deg); opacity: 0; } 55% { opacity: 1; } 78% { transform: rotate(16deg); } 100% { transform: rotate(0deg); } }
|
|
25
25
|
@keyframes ow-splash-rise { from { opacity: 0; transform: translateY(8px); } }
|
|
@@ -27,6 +27,6 @@ import {A,u,x,t,s,a as a$1,q,p,n}from'./chunk-3KT7IU4X.js';export{u as BUILTIN_O
|
|
|
27
27
|
@media (prefers-reduced-motion: reduce) {
|
|
28
28
|
.ow-splash, .ow-splash * { animation: none !important; }
|
|
29
29
|
}
|
|
30
|
-
`;function M2(){let[e,t]=useState(()=>typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);return useEffect(()=>{let o=window.matchMedia?.("(prefers-reduced-motion: reduce)");if(!o)return;let r=()=>t(o.matches);return o.addEventListener?.("change",r),()=>o.removeEventListener?.("change",r)},[]),e}function YI({onDone:e,loading:t=false,size:o=96,productName:r="Orbitwork",wordmark:n="orbitwork"}){let a=M2(),i=useRef(null),d=useRef(0),s=useRef(false),l=useRef(t),c=useRef(e);c.current=e;let[p,m]=useState(false);useEffect(()=>{if(d.current=typeof performance<"u"?performance.now():Date.now(),s.current)return;if(a){s.current=true,c.current?.();return}let b=setTimeout(()=>{s.current||(s.current=true,c.current?.());},yg);return ()=>clearTimeout(b)},[a]),useEffect(()=>{let b=l.current;if(l.current=t,t||!b)return;let h=i.current;if(!h)return;let x=typeof performance<"u"?performance.now():Date.now();if(a||x-d.current<yg){m(true);return}let k=0,y=getComputedStyle(h).transform,P=y&&y!=="none"?y.match(/matrix\(([^)]+)\)/):null;if(P?.[1]){let[S=1,R=0]=P[1].split(",").map(Number);k=Math.atan2(R,S)*180/Math.PI,k<0&&(k+=360);}let N=k<24?24:384;if(typeof h.animate=="function"){let S=h.animate([{transform:`rotate(${k}deg)`},{transform:`rotate(${N}deg)`}],{duration:Math.max((N-k)/360*P2,1),easing:R2,fill:"forwards"});S.onfinish=()=>{h.style.transform="rotate(24deg)";};}else h.style.transform="rotate(24deg)";m(true);},[t,a]);let u=t&&!p&&!a,v={position:"fixed",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"var(--ow-stage-bg)",color:"var(--ow-stage-text)"},w=(b,h="var(--ow-dur-2, 200ms)",x="ow-splash-fade")=>a?void 0:`${x} ${h} var(--ow-ease-beacon) ${b} backwards`;return jsxs("div",{className:"ow-splash ow-motion",style:v,role:"status","aria-live":"polite","aria-label":`${r} \u6B63\u5728\u542F\u52A8`,children:[jsx("style",{children:T2}),jsxs("svg",{width:o,height:o,viewBox:"2.3 0 96 96","aria-hidden":"true",style:{display:"block"},children:[jsx("circle",{cx:"48",cy:"48",r:"8.2",fill:"var(--ow-stage-text)",style:{animation:w("0ms")}}),S2.map(([b,h,x,k],y)=>jsx("circle",{cx:b,cy:h,r:x,fill:"var(--ow-stage-text)",opacity:k,style:{animation:w(`calc(var(--ow-stagger-beacon, 125ms) * ${y+1})`)}},y)),jsx("g",{ref:i,style:{transformOrigin:"48px 48px",animation:a?void 0:u?"ow-splash-sat-in var(--ow-dur-3, 320ms) var(--ow-ease-beacon) 625ms backwards, ow-splash-spin var(--ow-dur-spin, 1.6s) linear var(--ow-dur-splash, 1250ms) infinite":"ow-splash-sat-in var(--ow-dur-3, 320ms) var(--ow-ease-beacon) 625ms backwards"},children:jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:"var(--ow-stage-accent)"})})]}),jsx("div",{style:{marginTop:Math.round(o*(5/84)*10)/10,fontFamily:"var(--ow-font-display)",fontWeight:500,fontSize:Math.round(o*(15/84)*10)/10,lineHeight:1,letterSpacing:"-0.01em",color:"var(--ow-stage-text)",animation:w("700ms","var(--ow-dur-3, 320ms)","ow-splash-rise")},children:n})]})}var L2={installed:{label:"\u5DF2\u5B89\u88C5",tone:"ok"},update:{label:"\u6709\u66F4\u65B0",tone:"warn"},connected:{label:"\u5DF2\u8FDE\u63A5",tone:"ok"},needsAuth:{label:"\u5F85\u6388\u6743",tone:"warn"},installing:{label:"\u6B63\u5728\u5B89\u88C5",tone:"mute"},mine:{label:"\u6211\u7684",tone:"mine"},team:{label:"\u4E13\u5BB6\u56E2",tone:"mine"}},D2=cva("inline-flex shrink-0 items-center whitespace-nowrap h-5 px-[var(--ow-space-15)] font-medium text-ow-fs-mark-md leading-5 [border-radius:var(--ow-radius-xs)]",{variants:{tone:{ok:"bg-[var(--ow-success-tint)] text-[color:var(--ow-success-on-tint)]",warn:"bg-[var(--ow-warning-tint)] text-[color:var(--ow-warning-on-tint)]",mute:"bg-ow-surface-2 text-[color:var(--ow-status-tag-mute-text,var(--ow-text-2))]",mine:"bg-[var(--ow-mention-bg)] text-[color:var(--ow-mention-text)]"}},defaultVariants:{tone:"mute"}});function Nt({status:e,tone:t,children:o,className:r,title:n}){let a=e?L2[e]:void 0,i=o??a?.label;return i==null?null:jsx("span",{"data-slot":"status-tag",className:g(D2({tone:t??a?.tone??"mute"}),r),title:n,children:i})}function Pg({goal:e,steps:t,elapsed:o,className:r=""}){let n=t.length,a=t.filter(s=>s.state==="done").length,i=t.find(s=>s.state==="running"),d=jsxs("span",{style:B2,children:[a,"/",n]});return e?jsxs("div",{className:`ow-plan-card ow-plan-card--goal ${r}`,style:Sg,children:[jsxs("div",{style:I2,children:[jsx("div",{style:A2,children:e}),d]}),jsx("div",{style:O2,children:t.map((s,l)=>jsx(Ng,{state:s.state},l))}),i&&jsxs("div",{style:H2,children:[jsxs("span",{children:["\u6B63\u5728\u8DD1\uFF1A",i.label]}),o&&jsx("span",{style:W2,children:o})]})]}):jsxs("div",{className:`ow-plan-card ow-plan-card--list ${r}`,style:Sg,children:[jsxs("div",{style:U2,children:[jsx("span",{style:K2,children:"\u8BA1\u5212\u6E05\u5355"}),d]}),jsx("div",{style:j2,children:t.map((s,l)=>jsxs("div",{style:G2,children:[jsx(Ng,{state:s.state}),jsx("span",{style:s.state==="done"?{color:"var(--ow-text-3)"}:void 0,children:s.label})]},l))})]})}function Ng({state:e}){return e==="running"?jsx("span",{style:$2,children:jsx("i",{style:z2})}):jsx("span",{style:e==="done"?V2:F2})}var Sg={background:"var(--ow-surface)",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-card)",padding:12,display:"flex",flexDirection:"column",gap:10,fontFamily:"var(--ow-font-body)"},I2={display:"flex",alignItems:"flex-start",gap:8},A2={flex:1,fontSize:"var(--ow-fs-ui)",fontWeight:500,lineHeight:1.4},B2={fontSize:"var(--ow-fs-mark-md)",color:"var(--ow-text-2)",fontFamily:"var(--ow-font-mono)",fontVariantNumeric:"tabular-nums"},O2={display:"flex",alignItems:"center",gap:8,height:14},Rg={display:"block",width:8,height:8,borderRadius:"50%",flex:"none"},V2={...Rg,background:"var(--ow-success)"},F2={...Rg,border:"1.5px solid var(--ow-text-3)"},$2={width:13,height:13,flex:"none",border:"1.5px solid var(--ow-beacon)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},z2={display:"block",width:5,height:5,borderRadius:"50%",background:"var(--ow-beacon)"},H2={display:"flex",justifyContent:"space-between",alignItems:"baseline",fontSize:"var(--ow-fs-mark-md)",color:"var(--ow-text-2)"},W2={fontSize:"var(--ow-fs-mark-sm)",fontFamily:"var(--ow-font-mono)",fontVariantNumeric:"tabular-nums"},U2={display:"flex",justifyContent:"space-between",alignItems:"baseline"},K2={fontSize:"var(--ow-fs-eyebrow-cjk)",fontWeight:500,letterSpacing:"var(--ow-ls-eyebrow-cjk)",color:"var(--ow-text-2)"},j2={display:"flex",flexDirection:"column",gap:9},G2={display:"flex",alignItems:"center",gap:8,fontSize:"var(--ow-fs-caption)",lineHeight:1.4};function iA({steps:e,className:t=""}){let o=e.map(r=>({label:r.label,state:r.status}));return jsx(Pg,{steps:o,className:t})}function Tg(e=300){let[t,o]=useState(false),[r,n]=useState(false),[a,i]=useState(null),d=useRef(null),s=useRef(null),l=useRef(null),c=useCallback(v=>{d.current=v;},[]),p=useCallback(v=>{s.current=v;},[]),m=useCallback(v=>{l.current=v;},[]);return useEffect(()=>{if(!t)return;let v=w=>{let b=w.target;d.current?.contains(b)||l.current?.contains(b)||o(false);};return document.addEventListener("mousedown",v,true),()=>document.removeEventListener("mousedown",v,true)},[t]),{open:t,up:r,coords:a,wrapRef:c,btnRef:p,menuRef:m,toggle:()=>{if(!t&&s.current){let v=s.current.getBoundingClientRect();n(window.innerHeight-v.bottom<e),i({left:v.left,right:window.innerWidth-v.right,top:v.bottom,bottom:window.innerHeight-v.top});}o(v=>!v);},close:()=>o(false)}}var Y2=Array.from({length:24},(e,t)=>t),X2=Array.from({length:60},(e,t)=>t),Kn=e=>String(e).padStart(2,"0");function Q2(e){try{return new Intl.DateTimeFormat("en",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(new Date).find(o=>o.type==="timeZoneName")?.value?.replace("GMT+0","GMT")??e}catch{return e}}var $c="font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",Dg=["shrink-0 h-7 w-full border-none bg-transparent cursor-pointer","[border-radius:var(--ow-radius-2xs)]","text-ow-fs-ui text-[color:var(--ow-text-3)]",$c,"transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]","focus-visible:outline-none focus-visible:[box-shadow:var(--ow-focus-shadow)]"].join(" ");function vA({value:e,timezone:t,onChange:o,disabled:r=false,"aria-label":n,confirmLabel:a="\u786E\u5B9A",className:i}){let{open:d,up:s,wrapRef:l,btnRef:c,toggle:p,close:m}=Tg(340),u=useRef(null),v=useRef(null),[w,b]=e.split(":"),h=Number(w),x=Number(b),k=Number.isFinite(h)?h:9,y=Number.isFinite(x)?x:0,[P,N]=useState(k),[S,R]=useState(y);useEffect(()=>{d&&(N(k),R(y),requestAnimationFrame(()=>{u.current?.querySelector('[data-ow-role="selected"]')?.scrollIntoView({block:"center"}),v.current?.querySelector('[data-ow-role="selected"]')?.scrollIntoView({block:"center"});}));},[k,y,d]),useEffect(()=>{if(!d)return;let T=_=>{_.key==="Escape"&&m();};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[d,m]);let M=()=>{o(`${Kn(P)}:${Kn(S)}`),m();};return jsxs("div",{"data-slot":"time-picker",className:g("relative w-full",d&&"z-10",i),ref:l,children:[jsxs("button",{type:"button",ref:c,"data-ow-part":"control","data-ow-role":d?"open":"closed",disabled:r,"aria-haspopup":"dialog","aria-expanded":d,"aria-label":n,onClick:p,className:g("w-full h-10 px-3 flex items-center justify-between gap-1.5 cursor-pointer text-left","border bg-[var(--ow-input-bg)] text-[color:var(--ow-input-text)] text-ow-fs-ui font-normal","[border-radius:var(--ow-radius-control)]","transition-[border-color,box-shadow,background-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","focus-visible:outline-none focus-visible:[box-shadow:var(--ow-focus-shadow)]","disabled:cursor-not-allowed disabled:bg-[var(--ow-input-disabled-bg)] disabled:border-[color:var(--ow-disabled-border)] disabled:text-[color:var(--ow-input-disabled-text)]",d?"border-[color:var(--ow-input-border-focus)]":"border-[color:var(--ow-input-border)] hover:border-[color:var(--ow-input-border-hover)]"),children:[jsxs("span",{className:g("min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",$c),children:[Kn(k),":",Kn(y)," ",jsx("span",{className:g("text-ow-fs-mark-md text-[color:var(--ow-text-3)]",$c),children:Q2(t)})]}),jsx(No,{className:"w-3.5 h-3.5 shrink-0 text-[color:var(--ow-text-3)]","aria-hidden":"true"})]}),d&&jsxs("div",{role:"dialog","aria-label":n??"\u9009\u62E9\u65F6\u523B","data-ow-part":"popover",className:g("absolute right-0 w-44 overflow-hidden","z-[var(--ow-z-dropdown)]","bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)]","[border-radius:var(--ow-radius-menu)] [box-shadow:var(--ow-shadow-pop)]",s?"bottom-[calc(100%+4px)]":"top-[calc(100%+4px)]"),children:[jsxs("div",{className:"flex h-44",children:[jsx("div",{ref:u,role:"listbox","aria-label":"\u5C0F\u65F6",className:"flex-1 flex flex-col gap-px overflow-y-auto p-1.5 border-r border-[color:var(--ow-border)] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:Y2.map(T=>jsx("button",{type:"button",role:"option","aria-selected":T===P,"data-ow-role":T===P?"selected":"option",className:g(Dg,T===P&&"bg-[var(--ow-selected-bg)] text-[color:var(--ow-text)] font-medium"),onClick:()=>N(T),children:Kn(T)},T))}),jsx("div",{ref:v,role:"listbox","aria-label":"\u5206\u949F",className:"flex-1 flex flex-col gap-px overflow-y-auto p-1.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:X2.map(T=>jsx("button",{type:"button",role:"option","aria-selected":T===S,"data-ow-role":T===S?"selected":"option",className:g(Dg,T===S&&"bg-[var(--ow-selected-bg)] text-[color:var(--ow-text)] font-medium"),onClick:()=>R(T),children:Kn(T)},T))})]}),jsx("div",{className:"border-t border-[color:var(--ow-border)] p-1.5",children:jsx(f,{variant:"primary",size:"sm",className:"w-full",onClick:M,children:a})})]})]})}var ek={info:jsx(Qr,{}),success:jsx(fn,{}),warning:jsx(ur,{}),error:jsx(jo,{})},tk="relative flex items-center gap-2.5 w-full max-w-[420px] px-3.5 py-2.5 overflow-clip [border-radius:var(--ow-radius-card)] border border-ow-border bg-ow-popover-bg shadow-[var(--ow-shadow-pop)] font-normal text-ow-fs-ui leading-[1.4] text-ow-text pointer-events-auto animate-[toast-in_200ms_var(--ow-ease-beacon)]",ok={info:"bg-[var(--ow-info-tint)] text-[color:var(--ow-info-on-tint)]",success:"bg-[var(--ow-success-tint)] text-[color:var(--ow-success-on-tint)]",warning:"bg-[var(--ow-warning-tint)] text-[color:var(--ow-warning-on-tint)]",error:"bg-[var(--ow-error-tint)] text-[color:var(--ow-error-on-tint)]"};function CA({variant:e="info",icon:t,showIcon:o=true,children:r,action:n,duration:a=e==="error"?1e4:4e3,onDismiss:i,className:d}){return useEffect(()=>{if(!a||!i)return;let s=setTimeout(i,a);return ()=>clearTimeout(s)},[a,i]),jsxs("div",{"data-slot":"toast","data-variant":e,"data-ow-part":"surface","data-ow-role":e,className:g(tk,d),role:e==="error"?"alert":"status",children:[o&&jsx("span",{"data-ow-part":"icon",className:g("inline-flex shrink-0 items-center justify-center w-5 h-5 [border-radius:var(--ow-radius-xs)] [&>svg]:w-4 [&>svg]:h-4",ok[e]),"aria-hidden":"true",children:t??ek[e]}),jsx("span",{"data-ow-part":"message",className:"flex-1 min-w-0 break-words",children:r}),n&&jsx("span",{"data-ow-part":"action",className:"shrink-0",children:n}),i&&jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"close",className:"shrink-0 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)]",onClick:i,"aria-label":"\u5173\u95ED\u901A\u77E5",icon:jsx(Q,{className:"w-3.5 h-3.5","aria-hidden":"true"})})]})}function NA({children:e,className:t}){return jsx("div",{"data-slot":"toast-region",className:g("absolute top-4 right-4 z-[var(--ow-z-toast)] pointer-events-none flex flex-col items-end gap-2",t),children:e})}var jn="h-px flex-1 bg-[var(--ow-border)]";function DA({label:e,className:t,...o}){return jsxs("div",{"data-slot":"date-divider","data-ow-part":"divider",role:"separator","aria-orientation":"horizontal",className:g("flex w-full items-center gap-3 py-2",t),...o,children:[jsx("span",{"aria-hidden":"true",className:jn}),jsx("span",{"data-ow-part":"label",className:g("whitespace-nowrap leading-none","text-[length:var(--ow-fs-ui)] text-[color:var(--ow-text-3)]","font-[family-name:var(--ow-font-mono)] tabular-nums"),children:e}),jsx("span",{"aria-hidden":"true",className:jn})]})}function EA({count:e,label:t="\u672A\u8BFB\u6D88\u606F",className:o,...r}){return jsxs("div",{"data-slot":"unread-divider","data-ow-part":"divider","data-ow-state":"unread",role:"separator","aria-orientation":"horizontal","aria-label":e!=null?`${t} ${e}`:t,className:g("flex w-full items-center gap-3 py-2",o),...r,children:[jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-[var(--ow-unread)]"}),jsxs("span",{"data-ow-part":"label","aria-hidden":"true",className:g("inline-flex items-center gap-1.5 whitespace-nowrap leading-none","text-[length:var(--ow-fs-ui)] font-medium text-[color:var(--ow-unread)]"),children:[t,e!=null&&jsx("span",{"data-ow-part":"count",className:"font-[family-name:var(--ow-font-mono)] tabular-nums font-normal",children:e})]}),jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-[var(--ow-unread)]"})]})}function IA({onClick:e,count:t,label:o="\u8DF3\u5230\u6700\u65B0",hidden:r,disabled:n,className:a}){return r?null:jsxs(f,{"data-slot":"jump-to-latest","data-ow-part":"action","data-ow-role":"navigation",variant:"unstyled",disabled:n,onClick:e,className:g($d,"h-8 gap-1.5 px-3 [border-radius:var(--ow-radius-action)]","text-[length:var(--ow-fs-ui)] z-[var(--ow-z-sticky)]","absolute bottom-4 left-1/2 -translate-x-1/2",a),children:[jsx(Ci,{"aria-hidden":"true",style:{width:16,height:16}}),jsx("span",{children:o}),t!=null&&jsx("span",{"data-ow-part":"count",className:"font-[family-name:var(--ow-font-mono)] tabular-nums",children:t})]})}var Eg=["inline-flex min-w-0 max-w-[min(70%,420px)] items-center gap-1.5 whitespace-nowrap","text-[length:var(--ow-fs-ui)] leading-[1.5] text-[color:var(--ow-text-3)]"].join(" ");function Ig({label:e="\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29",children:t,expanded:o,defaultExpanded:r=false,onExpandedChange:n,icon:a,expandLabel:i="\u67E5\u770B",collapseLabel:d="\u6536\u8D77",detailsLabel:s="\u5DF2\u538B\u7F29\u5185\u5BB9",count:l,className:c,detailsClassName:p}){let m=useId(),[u,v]=useState(r),w=o??u,b=useCallback(()=>{let x=!w;o===void 0&&v(x),n?.(x);},[w,o,n]),h=w?`${d}${s}`:`${i}${s}`;return jsxs(Fragment,{children:[jsxs("div",{"data-slot":"compression-divider","data-ow-part":"divider","data-ow-state":w?"expanded":"collapsed",className:g("flex w-full items-center gap-2.5 py-2",c),children:[jsx("span",{"aria-hidden":"true",className:jn}),jsxs(f,{variant:"unstyled",type:"button","data-ow-part":"trigger",onClick:b,"aria-expanded":w,"aria-controls":t!=null?m:void 0,"aria-label":h,title:h,className:g(Eg,"cursor-pointer rounded-[var(--ow-radius-2xs)] px-1.5 py-[3px]","transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] hover:text-[color:var(--ow-text-2)] active:bg-[var(--ow-press)]","focus-visible:outline-none focus-visible:[outline:2px_solid_var(--ow-focus-ring)] focus-visible:[outline-offset:2px]"),children:[jsx("span",{"aria-hidden":"true",className:"inline-flex shrink-0 [&>svg]:h-4 [&>svg]:w-4",children:a??jsx(Xr,{"aria-hidden":"true"})}),jsx("span",{"data-ow-part":"label",className:"shrink-0",children:e}),l!=null&&jsx("span",{"data-ow-part":"count",className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums",children:l}),jsx("span",{"data-ow-part":"action",className:"ow-link shrink-0",children:w?d:i}),jsx(ae,{"aria-hidden":"true",className:g("shrink-0 text-[color:var(--ow-text-3)]","transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",w?"rotate-0":"-rotate-90"),style:{width:16,height:16}})]}),jsx("span",{"aria-hidden":"true",className:jn})]}),t!=null&&jsx("div",{id:m,"data-ow-part":"details",role:"region","aria-label":s,hidden:!w,className:p,children:t})]})}function Ag({sourceTitle:e,label:t="\u6B64\u4EFB\u52A1\u6E90\u81EA",onSourceClick:o,href:r,icon:n,className:a,...i}){let d=s=>{r||s.preventDefault(),o?.();};return jsxs("div",{"data-slot":"branch-divider","data-ow-part":"divider",role:"separator","aria-orientation":"horizontal",className:g("flex w-full items-center gap-2.5 py-2",a),...i,children:[jsx("span",{"aria-hidden":"true",className:jn}),jsxs("span",{className:Eg,children:[jsx("span",{"aria-hidden":"true",className:"inline-flex shrink-0 [&>svg]:h-4 [&>svg]:w-4",children:n??jsx(Po,{"aria-hidden":"true"})}),jsx("span",{"data-ow-part":"label",className:"shrink-0",children:t}),jsx("a",{"data-ow-part":"source",className:"ow-link min-w-0 truncate",href:r??"#",title:e,onClick:d,children:e})]}),jsx("span",{"aria-hidden":"true",className:jn})]})}function lk({actions:e,onAdd:t,onEdit:o,onClose:r}){return typeof e!="string"?jsx(Fragment,{children:e}):jsxs(Fragment,{children:[(e==="add"||e==="addClose")&&jsx(f,{variant:"ghost",size:"sm",type:"button",title:"Add",icon:jsx(He,{}),onClick:t}),e==="edit"&&jsx(f,{variant:"ghost",size:"sm",type:"button",title:"Edit",icon:jsx(yt,{}),onClick:o}),(e==="close"||e==="addClose")&&jsx(f,{variant:"ghost",size:"sm",type:"button",title:"Close",icon:jsx(Q,{}),onClick:r})]})}function zA({title:e,actions:t,children:o,className:r="",short:n,draggable:a,onDragStart:i,onDragOver:d,onDragEnd:s,onAdd:l,onEdit:c,onClose:p}){return jsx(zt,{"data-slot":"wcard","data-ow-state":n?"short":void 0,className:g("min-h-0 flex-shrink-0 data-[ow-state=short]:h-auto",r),padding:"none",bodyClassName:"flex-1 min-h-0 overflow-auto p-3.5",draggable:a,onDragStart:i,onDragOver:d,onDragEnd:s,header:jsxs("div",{className:"grid grid-cols-[auto_1fr_auto] items-center gap-2",children:[jsxs("div",{"data-ow-part":"drag",className:"flex gap-0.5","aria-hidden":"true",children:[jsx("span",{className:"w-0.5 h-0.5 [border-radius:var(--ow-radius-pill)] bg-ow-text-2"}),jsx("span",{className:"w-0.5 h-0.5 [border-radius:var(--ow-radius-pill)] bg-ow-text-2"}),jsx("span",{className:"w-0.5 h-0.5 [border-radius:var(--ow-radius-pill)] bg-ow-text-2"})]}),jsx("div",{"data-ow-part":"title",className:"font-semibold text-ow-fs-ui leading-none font-[family-name:var(--ow-font-sans)] text-ow-text text-center",children:e}),jsx("div",{"data-ow-part":"actions",className:"flex gap-0.5",children:jsx(lk,{actions:t,onAdd:l,onEdit:c,onClose:p})})]}),children:o})}var dk=["#FFFFFF","#000000","#BFBFBF","#323232","#4472C4","#ED7D31","#A5A5A5","#FFC000","#5B9BD5","#71AD47"],ck=["#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#800000","#008000","#000080","#808000","#800080","#008080","#C0C0C0","#808080","#9999FF","#993366","#FFFFCC","#CCFFFF","#660066","#FF8080","#0066CC","#CCCCFF","#000080","#FF00FF","#FFFF00","#00FFFF","#800080","#800000","#008080","#0000FF","#00CCFF","#CCFFFF","#CCFFCC","#FFFF99","#99CCFF","#FF99CC","#CC99FF","#FFCC99","#3366FF","#33CCCC","#99CC00","#FFCC00","#FF9900","#FF6600","#666699","#969696","#003366","#339966","#003300","#333300","#993300","#993366","#333399","#333333","#000000"];function Og(e){return (e.replace("#","").match(/../g)??[]).slice(0,3).map(r=>Number.parseInt(r,16))}function Uc(e,t,o){return `#${[e,t,o].map(r=>r.toString(16).padStart(2,"0")).join("")}`}function pk(e,t){let o=Og(e);return Uc(...o.map(r=>Math.floor(r*(1-t))))}function uk(e,t){let o=Og(e);return Uc(...o.map(r=>Math.floor((255-r)*t+r)))}function mk(e){if(typeof e=="object")return "#000000";if(typeof e!="string")return;if(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.test(e))return e.startsWith("#")?e:`#${e}`;let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e.trim().toLowerCase());if(t)return Uc(Number.parseInt(t[2],16),Number.parseInt(t[3],16),Number.parseInt(t[4],16))}function fk(e,t){let o=dk[e];return e>9||!o?"#C7C9CC":typeof t>"u"?o:t>0?uk(o,t):pk(o,Math.abs(t))}function Hc(e,t){return typeof e=="string"?e:e?e.argb?mk(e.argb)??t:Object.prototype.hasOwnProperty.call(e,"theme")?fk(e.theme,e.tint):e.indexed?ck[e.indexed]??t:t:t}var gk=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];function Ur(e){return String(e).padStart(2,"0")}function vk(e,t){let o=e instanceof Date?e:new Date(e);if(Number.isNaN(o.getTime()))return String(e??"");let r=o.getFullYear(),n=o.getMonth()+1,a=o.getDate();switch(t){case "mm-dd-yy":return `${r}/${Ur(n)}/${Ur(a)}`;case "[$-F800]dddd, mmmm dd, yyyy":return `${r}\u5E74${n}\u6708${a}\u65E5 \u5468${gk[o.getDay()]}`;case 'm"\u6708"d"\u65E5";@':return `${n}\u6708${a}\u65E5`;case "yyyy/m/d h:mm;@":case 'm/d/yy "h":mm':{let i=new Date(o.getTime()-288e5);return `${i.getFullYear()}/${i.getMonth()+1}/${Ur(i.getDate())} ${Ur(i.getHours())}:${Ur(i.getMinutes())}`}case "h:mm;@":return `${Ur(o.getHours())}:${Ur(o.getMinutes())}`;default:return `${r}-${Ur(n)}-${Ur(a)}`}}function bk(e,t){if(t.endsWith("%")){let a=t.match(/\.(\d+)%/)?.[1];return a?`${(e*100).toFixed(a.length)}%`:`${e*100}%`}if(!/0(\.0+)?/.test(t))return `${e}`;let o="";if(t.startsWith("$")?o="$":t.startsWith('"\xA5')&&(o="\xA5"),e===0&&t.startsWith("_"))return "-";let r=t.match(/0\.(0+)(_|;|$)/)?.[1],n=e.toFixed(r?r.length:0);if(t.includes("#,##")){let[a="",...i]=n.split("."),d=a.split("").reverse(),s=[];d.forEach((l,c)=>{s.push(l),(c+1)%3===0&&c<d.length-1&&d[c+1]!=="-"&&s.push(",");}),n=[s.reverse().join(""),...i].join(".");}return o+n}function wk(e){let{numFmt:t,value:o,type:r}=e;switch(r){case 2:try{return e.style?.numFmt?bk(o,e.style.numFmt):`${o}`}catch{return o}case 3:return o;case 4:return vk(o,t);case 5:return o?.text;case 6:return o?.result?.error??o?.result;case 8:return e.text;case 9:return e.text.toUpperCase();default:return o}}function hk(e){let t=structuredClone(e.style??{});if(t.fill?.fgColor&&(t.bgcolor=Hc(t.fill.fgColor,"#C7C9CC")),t.font?.color&&(t.color=Hc(t.font.color,"#000000")),t.alignment&&(t.alignment.horizontal&&(t.align=t.alignment.horizontal),t.alignment.vertical&&(t.valign=t.alignment.vertical),t.alignment.wrapText&&(t.textwrap=true)),t.border){let o={};Object.keys(t.border).forEach(r=>{let n=t.border[r];o[r]=[n.style||"thin",Hc(n.color,"#000000")];}),t.border2={...t.border},t.border=o;}return typeof t.font?.size=="number"&&(t.font.size=Math.round(t.font.size/1.333333)),t}function xk(e,t,o){let r=e.columns??[];for(let n=0;n<r.length;n++)t.cols[n.toString()]={},r[n]._hidden?t.cols[n.toString()].width=.1:r[n].width?t.cols[n.toString()].width=r[n].width*6+(o.widthOffset??0):t.cols[n.toString()].width=80+(o.widthOffset??0);t.cols.len=Math.max(Object.keys(t.cols).length,o.minColLength??0);}var Wc=null;async function yk(){return Wc??=import('x-data-spreadsheet/dist/xspreadsheet.js').then(()=>{let e=globalThis.x_spreadsheet;if(typeof e!="function")throw Wc=null,new Error("x-data-spreadsheet \u52A0\u8F7D\u5931\u8D25");return e}),Wc}async function Vg(e,t){return (await yk())(e,{mode:"read",showToolbar:false,showContextmenu:false,view:{width:()=>t().width||1200,height:()=>Math.max(t().height,200)},row:{height:24,len:100},col:{len:26,width:80,indexWidth:60,minWidth:60},autoFocus:false})}function Fg(e){e&&(e.querySelectorAll("input").forEach(t=>{t.readOnly||(t.readOnly=true);}),document.activeElement instanceof HTMLElement&&document.activeElement.blur());}function $g(e,t={}){let o=[];return e.eachSheet(r=>{let n={name:r.name,styles:[],rows:{},cols:{},merges:[]},a=[];for(let s in r._merges){let l=r._merges[s];n.merges.push(l.shortRange),a.push({startAddress:l.tl,yRange:l.model.bottom-l.model.top,xRange:l.model.right-l.model.left});}let i=0;(r._rows??[]).forEach((s,l)=>{n.rows[l]={cells:{}},s._hidden?(n.rows[l].height=.1,s._cells=[]):n.rows[l].height=(s.height||24)+(t.heightOffset??0),(s._cells??[]).forEach((c,p)=>{n.rows[l].cells[p]={},i=Math.max(i,p);let m=a.find(u=>u.startAddress===c._address);m&&c.master?.address!==m.startAddress||(m&&(n.rows[l].cells[p].merge=[m.yRange,m.xRange]),n.rows[l].cells[p].text=wk(c),n.styles.push(hk(c)),n.rows[l].cells[p].style=n.styles.length-1);});});let d=Object.keys(n.rows);n.rows.len=Math.max(Number(d[d.length-1]??-1)+1,t.minRowLength??100),r._columns&&r._columns.length>i+1&&(r._columns=r._columns.slice(0,i+1)),xk(r,n,t),o.push(n);}),o}var vs={word:"Word \u6587\u6863",excel:"Excel \u8868\u683C",powerpoint:"PowerPoint \u6F14\u793A",unknown:"Office \u6587\u6863"},Gn=class extends Error{human;detail;constructor(t,o=""){super(t),this.name="OfficeLoadError",this.human=t,this.detail=o;}};function Ck(e,t){let o=vs[t];return /network|failed to fetch|load failed|err_|dns/i.test(e)?`${o}\u6CA1\u53D6\u5230\uFF0C\u68C0\u67E5\u4E00\u4E0B\u6587\u4EF6\u5730\u5740\u8FD8\u5728\u4E0D\u5728\u3002`:/password|encrypt/i.test(e)?`${o}\u8BBE\u4E86\u5BC6\u7801\uFF0C\u5148\u89E3\u9664\u4FDD\u62A4\u518D\u9884\u89C8\u3002`:/corrupt|invalid|malformed|zip|central directory|unexpected end/i.test(e)?`${o}\u8BFB\u4E0D\u51FA\u6765\uFF0C\u6587\u4EF6\u53EF\u80FD\u5DF2\u7ECF\u635F\u574F\u3002`:`${o}\u6CA1\u89E3\u6790\u51FA\u6765\u3002`}function Zn({className:e="",src:t,fileType:o="unknown",loading:r,error:n,chrome:a=true,onOpen:i,onRequestOpenWithOptions:d,onOpenWith:s,children:l,...c}){let p=useRef(null),m=useRef(null),u=useRef(0),v=useRef(null),[w,b]=useState("idle"),[h,x]=useState(""),[k,y]=useState(""),P=useRef(null),[N,S]=useState(null),[R,M]=useState(0),[T,_]=useState(0),[D,I]=useState(1),[H,$]=useState(0),E=useRef(null),V=useRef(null);useEffect(()=>{let ee=p.current;if(!t||!ee){b("idle");return}let q=u.current+1;u.current=q;let A=()=>u.current!==q;return b("loading"),x(""),y(""),(async()=>{try{let L;if(v.current)L=v.current;else {let Y=await fetch(t);if(!Y.ok)throw new Gn(`${vs[o]}\u6CA1\u53D6\u5230\uFF0C\u68C0\u67E5\u4E00\u4E0B\u6587\u4EF6\u5730\u5740\u8FD8\u5728\u4E0D\u5728\u3002`,`HTTP ${Y.status} ${Y.statusText}`.trim());if(L=await Y.arrayBuffer(),A())return;v.current=L;}switch(ee.replaceChildren(),o){case "word":await Sk(L,ee);break;case "excel":{P.current?.();let Y=await Rk(L,ee,()=>({width:m.current?.clientWidth??0,height:m.current?.clientHeight??0}));if(P.current=Y,A())return;if(!Y){b("empty");return}break}case "powerpoint":{let{parse:Y}=await import('pptxtojson'),Ee=await Y(L,{imageMode:"base64",videoMode:"blob",audioMode:"blob"});if(A())return;S(Ee),M(Ee.slides.length),_(0);break}default:throw new Gn("\u8FD9\u79CD\u6587\u4EF6\u6682\u65F6\u6253\u4E0D\u5F00\u3002",`unsupported fileType: ${o}`)}if(A())return;b("ready");}catch(L){if(A())return;let Y=L instanceof Error?L.message:String(L??"");b("error"),x(L instanceof Gn?L.human:Ck(Y,o)),y(L instanceof Gn?L.detail:Y);}})(),()=>{u.current+=1;}},[t,o]),useEffect(()=>()=>{P.current?.(),P.current=null;},[]),useEffect(()=>{v.current=null,S(null),M(0),_(0);},[t]),useEffect(()=>{if(o!=="powerpoint"||!R)return;let ee=E.current,q=ee?.parentElement;if(!q||!ee)return;let A=V.current?.dataset.owState==="collapsed"?.9:1,L=A,Y=0,Ee=0,Ge=false,et=0,ht=0,to=0,Ze=0,U=()=>{ee.style.transform=`scale(${L}) translate(${Y}px, ${Ee}px)`,I(L),q.style.cursor=L>1.01?"grab":"";},ke=X=>{if(X.ctrlKey||X.metaKey){X.preventDefault();let Ce=-X.deltaY*.01;L=Math.min(5,Math.max(.25,L+Ce)),L<=1&&(Y=0,Ee=0),U();}else L>1.01&&(X.preventDefault(),Y-=X.deltaX/L,Ee-=X.deltaY/L,U());},j=X=>{L<=1.01||(X.preventDefault(),Ge=true,et=X.clientX,ht=X.clientY,to=Y,Ze=Ee,q.style.cursor="grabbing",q.setPointerCapture(X.pointerId));},Ie=X=>{Ge&&(Y=to+(X.clientX-et)/L,Ee=Ze+(X.clientY-ht)/L,U());},we=X=>{Ge&&(Ge=false,q.style.cursor=L>1.01?"grab":"",q.releasePointerCapture(X.pointerId));},le=()=>{L=A,Y=0,Ee=0,U();},ve=X=>{L=Math.min(5,Math.max(.25,X)),L<=1&&(Y=0,Ee=0),U();};return q.__pptxSetZoom=ve,q.addEventListener("wheel",ke,{passive:false}),q.addEventListener("pointerdown",j),q.addEventListener("pointermove",Ie),q.addEventListener("pointerup",we),q.addEventListener("dblclick",le),()=>{q.removeEventListener("wheel",ke),q.removeEventListener("pointerdown",j),q.removeEventListener("pointermove",Ie),q.removeEventListener("pointerup",we),q.removeEventListener("dblclick",le),delete q.__pptxSetZoom;}},[o,R,T]);let pe=ee=>{let q=E.current?.parentElement;q&&q.__pptxSetZoom&&q.__pptxSetZoom(ee);},W=useCallback(ee=>{if(ee.key!=="ArrowUp"&&ee.key!=="ArrowDown")return;let q=ee.target;if(q.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(q.tagName))return;ee.preventDefault();let A=ee.key==="ArrowUp"?-1:1;_(L=>Math.min(Math.max(L+A,0),R-1));},[R]),ce=useCallback(ee=>{ee.target.closest('button, a, input, textarea, select, [contenteditable="true"]')||ee.currentTarget.focus({preventScroll:true});},[]);useEffect(()=>{if(!R)return;V.current?.querySelector("[data-slot='pptx-thumb'][data-ow-state='active']")?.scrollIntoView({block:"nearest"});},[T,R]),useEffect(()=>{if(o!=="powerpoint"||!V.current)return;let ee=V.current,q=()=>{ee.clientWidth<750?ee.dataset.owState="collapsed":delete ee.dataset.owState;};q();let A=new ResizeObserver(q);return A.observe(ee),()=>A.disconnect()},[o,R]),useEffect(()=>{if(o!=="powerpoint"||!N||!R)return;let q=E.current?.parentElement;if(!q)return;let A=()=>{let Y=q.clientWidth,Ee=q.clientHeight;if(!Y||!Ee)return;let Ge=N.size.width*Nr,et=N.size.height*Nr,to=V.current?.dataset.owState==="collapsed"?.81:.9,Ze=Math.min(Y*to/Ge,Ee*to/et);$(Ze);};A();let L=new ResizeObserver(A);return L.observe(q),()=>L.disconnect()},[o,R,N]);let Pe=o==="powerpoint"&&w==="ready"&&R>0,Fe=!t&&r!=null;return jsx("div",{"data-slot":"office-preview","data-ow-chrome":a?void 0:"none",className:g("flex flex-col w-full h-full bg-ow-bg overflow-hidden",a&&"[border-radius:var(--ow-radius-card)] border border-ow-border-strong",e),...c,children:jsxs("div",{"data-ow-part":"body",className:"flex-1 min-h-0 relative flex flex-col items-center justify-center pl-0.5",ref:m,children:[w==="loading"||Fe?jsx("div",{"data-ow-part":"loading",role:"status","aria-live":"polite","aria-label":`\u6B63\u5728\u6253\u5F00${vs[o]}`,className:"flex w-full max-w-[560px] flex-col gap-3 p-8",children:r??jsxs(Fragment,{children:[jsx(re,{variant:"line",height:18,width:"46%"}),jsx(re,{variant:"line",height:13}),jsx(re,{variant:"line",height:13}),jsx(re,{variant:"line",height:13,width:"78%"}),jsx(re,{variant:"block",height:180})]})}):t?w==="empty"?jsx("div",{"data-ow-part":"empty",className:"flex w-full items-center justify-center p-8",children:jsx(F,{message:"\u8FD9\u4E2A\u8868\u683C\u91CC\u6CA1\u6709\u5DE5\u4F5C\u8868\u3002"})}):w==="error"?jsx("div",{"data-ow-part":"error",className:"flex w-full max-w-[560px] flex-col p-8",children:n??jsx(J,{variant:"error",detail:k,children:h||`${vs[o]}\u6CA1\u89E3\u6790\u51FA\u6765\u3002`})}):null:jsx("div",{"data-ow-part":"empty",className:"flex w-full items-center justify-center p-8",children:jsx(F,{message:`\u6682\u65E0 ${vs[o]}`})}),Pe&&N&&jsxs("div",{"data-ow-part":"pptx-panels",className:"flex flex-col w-full flex-1 min-h-0 overflow-hidden self-stretch",children:[jsxs("div",{"data-ow-part":"pptx-toolbar",className:"flex items-center gap-1 px-3 border-b border-ow-border flex-shrink-0 bg-ow-bg",style:{height:"var(--ow-h-lg)"},children:[jsx("span",{"data-ow-part":"spacer",className:"flex-1"}),jsx(f,{type:"button","data-ow-part":"toolbar-btn",variant:"ghost",size:"sm",className:"w-7 h-7 p-0 text-ow-text-2 hover:bg-ow-surface",onClick:()=>pe(D-.25),title:"\u7F29\u5C0F",children:jsx(js,{width:14,height:14})}),jsxs("span",{"data-ow-part":"toolbar-zoom",className:"min-w-10 text-center font-medium text-ow-fs-caption leading-none font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-text-2 select-none",children:[Math.round(D*100),"%"]}),jsx(f,{type:"button","data-ow-part":"toolbar-btn",variant:"ghost",size:"sm",className:"w-7 h-7 p-0 text-ow-text-2 hover:bg-ow-surface",onClick:()=>pe(D+.25),title:"\u653E\u5927",children:jsx(Ks,{width:14,height:14})}),(i||d)&&jsx(Oi,{label:"\u6253\u5F00\u65B9\u5F0F",onOpen:i,onRequestOptions:d,onSelect:s})]}),jsxs("div",{"data-ow-part":"pptx-body",className:"grid grid-cols-[200px_minmax(0,1fr)] grid-rows-[1fr] flex-1 min-h-0 overflow-hidden relative focus:outline-none focus-visible:[outline:var(--ow-focus-ring-w)_solid_var(--ow-focus-ring)] focus-visible:[outline-offset:calc(var(--ow-focus-ring-offset)*-1)]",ref:V,tabIndex:0,role:"region","aria-label":`PowerPoint \u9884\u89C8\uFF0C\u7B2C ${T+1} \u9875\uFF0C\u5171 ${R} \u9875`,onKeyDown:W,onPointerDown:ce,children:[jsx("div",{"data-ow-part":"pptx-thumbs",className:"flex flex-col gap-2 py-4 px-3 overflow-y-auto overflow-x-hidden min-h-0 border-r border-ow-border bg-ow-surface scrollbar-thin",children:N.slides.map((ee,q)=>jsx(Nk,{slide:ee,index:q,isActive:q===T,slideWidth:N.size.width,slideHeight:N.size.height,onClick:_},q))}),jsx("div",{"data-ow-part":"pptx-main",className:"relative overflow-hidden bg-ow-surface flex items-center justify-center min-h-0 h-full",children:jsx("div",{"data-ow-part":"pptx-slide",className:"relative overflow-hidden [border-radius:var(--ow-radius-md)] border border-ow-border origin-center flex-shrink-0",ref:E,style:{width:N.size.width*Nr*H,height:N.size.height*Nr*H},children:jsx("div",{style:{transform:`scale(${H})`,transformOrigin:"top left"},children:N.slides[T]&&jsx(yl,{slide:N.slides[T],slideWidth:N.size.width,slideHeight:N.size.height})})})})]})]}),jsx("div",{ref:p,"data-ow-part":"content",className:"w-full h-full overflow-auto box-border",style:{display:w==="ready"&&!Pe?void 0:"none"}}),l]})})}var Nk=memo(function({slide:t,index:o,isActive:r,slideWidth:n,slideHeight:a,onClick:i}){let d=n*Nr,s=a*Nr,l=useRef(null),[c,p]=useState(0);useEffect(()=>{let u=l.current;if(!u)return;let v=()=>{let b=u.clientWidth;b>0&&p(b/d);};v();let w=new ResizeObserver(v);return w.observe(u),()=>w.disconnect()},[d]);let m=useCallback(()=>i(o),[i,o]);return jsxs(f,{type:"button","data-slot":"pptx-thumb","data-ow-state":r?"active":void 0,variant:"unstyled",className:"group grid grid-cols-[32px_minmax(0,1fr)] items-center gap-2 p-2 border-0 [border-radius:var(--ow-radius-sm)] bg-transparent cursor-pointer text-left [transition:background-color_var(--ow-dur-1)_var(--ow-ease-beacon)] hover:bg-ow-hover active:bg-ow-press data-[ow-state=active]:bg-ow-selected-bg",onClick:m,children:[jsx("span",{"data-ow-part":"num",className:"font-medium text-ow-fs-body leading-none font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-text-3 text-center group-data-[ow-state=active]:text-ow-text",children:o+1}),jsx("span",{"data-ow-part":"slide",className:"block relative w-full [border-radius:var(--ow-radius-2xs)] border border-ow-border group-data-[ow-state=active]:border-ow-border-strong bg-ow-bg overflow-hidden pointer-events-none [transition:border-color_var(--ow-dur-1)_var(--ow-ease-beacon)]",ref:l,style:{aspectRatio:`${n} / ${a}`},children:c>0&&jsx("span",{style:{display:"block",transform:`scale(${c})`,transformOrigin:"top left",position:"absolute",top:0,left:0,width:d,height:s},children:jsx(yl,{slide:t,slideWidth:n,slideHeight:a})})})]})});async function Sk(e,t){let{renderAsync:o}=await import('docx-preview');await o(e,t,void 0,{className:"ow-docx-body",inWrapper:true}),t.querySelectorAll("style").forEach(r=>{r.textContent=(r.textContent||"").replace(/box-shadow:[^;]+;/g,"");}),t.querySelectorAll("section.ow-docx-body, section.docx").forEach(r=>{r.dataset.theme="light";});}async function Pk(e){let t=await import('exceljs'),o={ignoreNodes:["drawing","picture"]};try{let r=new t.Workbook;return await r.xlsx.load(e,o),r}catch{let n=await(await import('jszip')).default.loadAsync(e);for(let d of Object.keys(n.files))d.replace(/^\//,"").startsWith("xl/drawings/")&&n.remove(d);let a=await n.generateAsync({type:"arraybuffer"}),i=new t.Workbook;return await i.xlsx.load(a,o),i}}async function Rk(e,t,o){let r=await Pk(e);if(!r.worksheets.length)return null;let n=document.createElement("div");n.className="ow-excel-sheet",n.setAttribute("data-slot","excel-sheet"),t.appendChild(n);let a=await Vg(n,o);a.loadData($g(r,{minColLength:20})),Fg(n);let i=new ResizeObserver(()=>a.sheet.reload?.());return i.observe(t),()=>{i.disconnect(),n.remove();}}function Yn({className:e="",src:t,page:o,onPageChange:r,totalPages:n,loading:a,error:i,fileName:d,chrome:s=true,children:l,...c}){let[p,m]=useState(o??1),[u,v]=useState(false),w=i!=null||u,b=typeof i=="string"?jsx(J,{variant:"error",children:i}):i??null,h=o??p,x=k=>{k<1||n&&k>n||(m(k),r?.(k));};return jsxs("div",{"data-slot":"pdf-preview","data-ow-chrome":s?void 0:"none",className:g("flex flex-col w-full h-full bg-ow-bg overflow-hidden",s&&"[border-radius:var(--ow-radius-card)] border border-ow-border-strong",e),...c,children:[s&&jsxs("div",{"data-ow-part":"header",className:"flex items-center justify-between px-3.5 border-b border-ow-border flex-shrink-0",style:{height:"var(--ow-h-lg)"},children:[jsxs("div",{"data-ow-part":"filename",className:"flex items-center gap-2 font-medium text-ow-fs-ui leading-none text-ow-text",children:[jsx(Xr,{className:"text-ow-text-3 flex-shrink-0",width:16,height:16}),jsx("span",{className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",children:d||"Document.pdf"})]}),n?jsx(jc,{page:h,totalPages:n,onPageChange:x,showReadout:true}):null]}),jsxs("div",{"data-ow-part":"body",className:"flex-1 min-h-0 relative flex items-center justify-center",children:[w?jsx("div",{"data-ow-part":"error",className:"flex w-full max-w-[560px] flex-col p-8",children:b??jsx(J,{variant:"error",children:"\u8FD9\u4E2A PDF \u6CA1\u80FD\u6253\u5F00\uFF0C\u6587\u4EF6\u53EF\u80FD\u635F\u574F\u6216\u5DF2\u7ECF\u4E0D\u5728\u4E86\u3002"})}):a?jsx("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"flex w-full items-center justify-center p-8",children:a}):t?jsx("iframe",{"data-ow-part":"iframe",className:"w-full h-full border-0 block",src:`${t}#page=${h}`,title:d||"PDF Preview",onError:()=>v(true)}):jsx("div",{"data-ow-part":"empty",className:"flex w-full items-center justify-center p-8",children:jsx(F,{message:"\u6682\u65E0 PDF \u6587\u4EF6"})}),l]})]})}function jc({page:e,totalPages:t,onPageChange:o,showReadout:r=false}){let n="w-7 h-7 p-0 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)] disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent";return jsxs("div",{"data-ow-part":"pagination",className:"flex items-center gap-1",children:[jsx(f,{"data-ow-part":"page-btn",type:"button",variant:"ghost",size:"sm",className:n,icon:jsx(Kt,{width:14,height:14}),disabled:e<=1,onClick:()=>o(e-1),"aria-label":"\u4E0A\u4E00\u9875",title:"\u4E0A\u4E00\u9875"}),r&&jsxs("span",{"data-ow-part":"page-info",className:"font-normal text-ow-fs-caption leading-none font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-text-2 min-w-12 text-center",children:[e," / ",t]}),jsx(f,{"data-ow-part":"page-btn",type:"button",variant:"ghost",size:"sm",className:n,icon:jsx(he,{width:14,height:14}),disabled:e>=t,onClick:()=>o(e+1),"aria-label":"\u4E0B\u4E00\u9875",title:"\u4E0B\u4E00\u9875"})]})}var Lk={markdown:"Markdown",code:"\u4EE3\u7801",pdf:"PDF",web:"\u7F51\u9875",office:"Office"},Dk=[{key:"preview",label:"\u9884\u89C8"},{key:"raw",label:"\u6E90\u7801"}];function WO({preview:e,panelMode:t,onPanelModeChange:o,onClose:r,onOpenDefault:n,renderMarkdown:a}){let[i,d]=useState(false),s=t==="wide",l=e.kind==="markdown"&&!!a,c=useRef(null),p=useRef(false),m=useCallback(w=>{w.preventDefault(),p.current=true;let b=w.clientX,h=c.current?.offsetWidth??430,x=y=>{if(!p.current||!c.current)return;let P=c.current.parentElement?.offsetWidth??window.innerWidth,N=Math.min(Math.max(h+b-y.clientX,280),P-700);c.current.style.width=`${N}px`;},k=()=>{p.current=false,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",x),document.addEventListener("mouseup",k);},[]),u=(w,b)=>jsx("div",{className:"artifact-sidebar__empty",children:jsx(F,{message:w,actionLabel:b?.label,onAction:b?.onAction})}),v=null;return e.kind==="markdown"?e.content.trim()?i||!a?v=jsx(Tf,{bare:true,rawMode:true,className:"artifact-sidebar__preview",content:e.content,fileName:e.name}):v=jsx("div",{className:"artifact-sidebar__preview artifact-sidebar__markdown-body",children:jsx("div",{className:"artifact-sidebar__markdown",children:a(e.content)})}):v=u("\u8FD9\u4E2A\u6587\u4EF6\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u5185\u5BB9\u3002"):e.kind==="code"?v=e.content.trim()?jsx(Wi,{className:"artifact-sidebar__preview",language:e.language,code:e.content}):u("\u8FD9\u4E2A\u6587\u4EF6\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u5185\u5BB9\u3002"):e.kind==="pdf"?v=jsx(Yn,{className:"artifact-sidebar__preview",chrome:false,src:e.url,fileName:e.name}):e.kind==="office"?v=jsx(Zn,{className:"artifact-sidebar__preview",chrome:false,src:e.url,fileType:e.fileType}):v=u("\u7F51\u9875\u9884\u89C8\u8981\u5728\u7CFB\u7EDF\u6D4F\u89C8\u5668\u91CC\u6253\u5F00\u3002",{label:"\u7CFB\u7EDF\u6253\u5F00",onAction:()=>n(e.path)}),jsxs("aside",{ref:c,className:`artifact-sidebar artifact-sidebar--${t}`,"aria-label":"\u4EA7\u7269\u9884\u89C8",children:[!s&&jsx("div",{className:"artifact-sidebar__resize-handle",onMouseDown:m}),jsxs("header",{className:"artifact-sidebar__head",children:[jsxs("div",{className:"artifact-sidebar__title",children:[jsx("span",{className:"artifact-sidebar__icon",children:jsx(oo,{})}),jsxs("div",{className:"artifact-sidebar__title-text",children:[jsx("div",{className:"artifact-sidebar__name",title:e.name,children:e.name}),jsxs("div",{className:"artifact-sidebar__meta",children:[Lk[e.kind]," \u9884\u89C8"]})]})]}),jsx(f,{variant:"ghost",size:"sm",type:"button",className:"artifact-sidebar__action",title:"\u7CFB\u7EDF\u6253\u5F00","aria-label":"\u7CFB\u7EDF\u6253\u5F00",icon:jsx(lo,{"aria-hidden":"true"}),onClick:()=>n(e.path)}),jsx(f,{variant:"ghost",size:"sm",type:"button",className:"artifact-sidebar__action",title:s?"\u6062\u590D\u9762\u677F\u5BBD\u5EA6":"\u5C55\u5F00\u9762\u677F","aria-label":s?"\u6062\u590D\u9762\u677F\u5BBD\u5EA6":"\u5C55\u5F00\u9762\u677F","aria-pressed":s,icon:jsx(Go,{"aria-hidden":"true"}),onClick:()=>{c.current&&(c.current.style.width=""),o(s?"normal":"wide");}}),jsx(f,{variant:"ghost",size:"sm",type:"button",className:"artifact-sidebar__action",title:"\u5173\u95ED\u9884\u89C8","aria-label":"\u5173\u95ED\u9884\u89C8",icon:jsx(Q,{"aria-hidden":"true"}),onClick:r})]}),l&&jsx(uo,{className:"artifact-sidebar__tabs",size:"sm",items:Dk,activeKey:i?"raw":"preview",onChange:w=>d(w==="raw")}),jsx("div",{className:"artifact-sidebar__body",children:v})]})}var _l="shrink-0 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)] disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent";function Ak(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`:""}function rV({url:e="",onNavigate:t,canGoBack:o=false,canGoForward:r=false,onGoBack:n,onGoForward:a,loading:i=false,onReload:d,onStop:s,urlPrefix:l,urlSuffix:c,actions:p,subToolbar:m,children:u,error:v,errorDetail:w,retryLabel:b="\u91CD\u65B0\u52A0\u8F7D",onRetry:h,emptyMessage:x="\u8F93\u5165\u7F51\u5740\u5F00\u59CB\u9884\u89C8\u3002",footer:k,compact:y=false,onFind:P,chrome:N=true,className:S=""}){let[R,M]=useState(e),[T,_]=useState(false),{isImeEnter:D,onCompositionEnd:I,onCompositionStart:H}=Dt();useEffect(()=>{T||M(e);},[e,T]);let $=/^https:/i.test(e)?jsx("span",{className:"inline-flex text-[color:var(--ow-success)]",children:jsx(ea,{"aria-hidden":"true"})}):null,E=useCallback(()=>{let V=Ak(R);V&&(t?.(V),_(false));},[R,t]);return jsxs("div",{"data-slot":"web-preview-shell","data-ow-chrome":N?void 0:"none",className:g("web-preview-shell flex flex-col w-full h-full min-h-0 bg-[var(--ow-bg)] overflow-hidden",y&&"web-preview-shell--compact",N&&"[border-radius:var(--ow-radius-card)] border border-[color:var(--ow-border-strong)]",S),children:[jsxs("div",{"data-ow-part":"toolbar",className:"flex shrink-0 items-center gap-1 border-b border-[color:var(--ow-border)] px-2",style:y?void 0:{height:"var(--ow-h-lg)"},children:[jsxs("div",{"data-ow-part":"nav-group",className:"flex shrink-0 items-center gap-0.5",children:[jsx(f,{type:"button",variant:"ghost",size:"sm",className:_l,icon:jsx(Kt,{"aria-hidden":"true"}),disabled:!o,onClick:n,title:"\u540E\u9000","aria-label":"\u540E\u9000"}),!y&&jsx(f,{type:"button",variant:"ghost",size:"sm",className:_l,icon:jsx(he,{"aria-hidden":"true"}),disabled:!r,onClick:a,title:"\u524D\u8FDB","aria-label":"\u524D\u8FDB"}),jsx(f,{type:"button",variant:"ghost",size:"sm",className:_l,icon:i?jsx(Q,{"aria-hidden":"true"}):jsx(We,{"aria-hidden":"true"}),onClick:i?s:d,title:i?"\u505C\u6B62":"\u5237\u65B0","aria-label":i?"\u505C\u6B62":"\u5237\u65B0"})]}),jsx(te,{"data-ow-part":"url",className:"web-preview-shell__url min-w-0 flex-1 font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",value:T?R:e,onChange:V=>{_(true),M(V);},onFocus:V=>{let pe=V.currentTarget;_(true),M(e),window.requestAnimationFrame(()=>pe.select());},onBlur:()=>_(false),onCompositionStart:H,onCompositionEnd:I,onKeyDownCapture:V=>{V.stopPropagation(),!D(V)&&(V.key==="Enter"&&(V.preventDefault(),E()),V.key==="Escape"&&(V.preventDefault(),_(false),M(e)));},prefix:l??(y?$:jsx(Mt,{"aria-hidden":"true"})),suffix:y&&i?jsx("span",{className:"web-preview-shell__url-spin","aria-hidden":"true"}):c,placeholder:"\u8F93\u5165\u7F51\u5740","aria-label":"\u5730\u5740\u680F"}),P&&jsx(f,{type:"button",variant:"ghost",size:"sm",className:_l,"data-ow-part":"find",icon:jsx($t,{"aria-hidden":"true"}),onClick:P,title:"\u5728\u9875\u9762\u4E2D\u67E5\u627E","aria-label":"\u67E5\u627E"}),p&&jsx("div",{"data-ow-part":"actions",className:"flex shrink-0 items-center gap-0.5",children:p})]}),i&&!y&&jsx(na,{indeterminate:true,size:"sm","aria-label":"\u9875\u9762\u52A0\u8F7D\u4E2D",className:"shrink-0"}),m,jsx("div",{"data-ow-part":"body",className:"relative flex min-h-0 flex-1 flex-col",children:v?jsx("div",{"data-ow-part":"error",className:"flex min-h-0 flex-1 items-center justify-center p-8",children:jsx(J,{variant:"error",title:"\u8FD9\u4E2A\u9875\u9762\u6CA1\u52A0\u8F7D\u51FA\u6765",detail:w,action:h?jsx(f,{type:"button",variant:"secondary",size:"sm",onClick:h,children:b}):void 0,children:v})}):e?u:jsx("div",{"data-ow-part":"empty",className:"flex min-h-0 flex-1 items-center justify-center bg-[var(--ow-mat)] p-6",children:jsx(F,{message:x,markSize:48,className:"max-w-[360px] p-0"})})}),k]})}var Bk={Mod:"\u2318",Meta:"\u2318",Cmd:"\u2318",Command:"\u2318",Ctrl:"\u2303",Control:"\u2303",Alt:"\u2325",Option:"\u2325",Shift:"\u21E7",Enter:"\u21A9",Return:"\u21A9",Esc:"\u238B",Escape:"\u238B",Backspace:"\u232B",Delete:"\u2326",Tab:"\u21E5",Space:"\u2423",Up:"\u2191",Down:"\u2193",Left:"\u2190",Right:"\u2192"},Ok={Mod:"Ctrl",Meta:"Win",Cmd:"Ctrl",Command:"Ctrl",Ctrl:"Ctrl",Control:"Ctrl",Alt:"Alt",Option:"Alt",Shift:"Shift",Enter:"Enter",Return:"Enter",Esc:"Esc",Escape:"Esc",Backspace:"Backspace",Delete:"Del",Tab:"Tab",Space:"Space",Up:"\u2191",Down:"\u2193",Left:"\u2190",Right:"\u2192"};function Ug(e){return e==="mac"}function Vk(e,t="mac"){let o=Ug(t)?Bk:Ok;return e.map(r=>o[r]??r)}function Xn(e,t="mac"){let o=Vk(e,t);return Ug(t)?o.join(""):o.join("+")}var $k=["Mod","T"],zk=[{key:"browser",label:"\u6D4F\u89C8\u5668",icon:jsx(Ll,{kind:"web"})},{key:"terminal",label:"\u7EC8\u7AEF",icon:jsx(Ll,{kind:"terminal"})},{key:"files",label:"\u6587\u4EF6",icon:jsx(Ll,{kind:"files"})}];function Gg(e){let t=e.density==="panel",[o,r]=useState(false),[n,a]=useState(null),[i,d]=useState(null),[s,l]=useState(false),[c,p]=useState(()=>new Set),m=useRef(null),u=useRef(null);useLayoutEffect(()=>{let h=u.current;if(!h||t||e.tabs.length===0){l(false);return}let x=()=>{let P=h.querySelector(".browser-tab")?.getBoundingClientRect().width??180;l(N=>{let S=N?P<60:P<54;return N===S?N:S});};x();let k=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return k?.observe(h),()=>k?.disconnect()},[t,e.tabs.length]),useEffect(()=>{if(!o)return;let h=x=>{let k=x.target;m.current?.contains(k)||Array.from(document.querySelectorAll(".ow-dropdown")).pop()?.contains(k)||r(false);};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[o]);let v=h=>{r(false),h==="terminal"?e.onAddTerminal():h==="files"?e.onAddFiles():e.onAddBrowser();},w=h=>{let x=n?.tabId;a(null),x&&(h==="close-others"?e.onCloseOtherTabs(x):e.onCloseTab(x));},b=jsxs("div",{className:"browser-tabbar__add-wrap",children:[jsx(f,{ref:m,variant:"unstyled",type:"button",className:"browser-tabbar__add",onClick:t?e.onAddBrowser:()=>r(h=>!h),title:t?`\u65B0\u5EFA\u6D4F\u89C8\u5668\u6807\u7B7E ${Xn($k,e.platform??"mac")}`:"\u65B0\u5EFA\u6807\u7B7E","aria-label":"\u65B0\u5EFA\u6807\u7B7E","aria-expanded":t?void 0:o,children:jsx(He,{"aria-hidden":"true"})}),!t&&o&&jsx(pt,{items:zk,onSelect:v,width:140,portal:m})]});return jsxs("div",{className:`browser-tabbar${t?" browser-tabbar--panel":""}`,children:[jsxs("div",{ref:u,role:"tablist",className:`browser-tabbar__tabs${s?" is-icon-only":""}`,children:[e.tabs.map(h=>{let x=h.title||h.url||h.path||"\u65B0\u6807\u7B7E\u9875",k=h.kind==="web"&&!!h.favicon&&!c.has(h.id);return jsx("div",{className:`browser-tab${h.id===e.activeTabId?" is-active":""}${h.id===i?" is-hovered":""}`,onClick:()=>e.onSwitchTab(h.id),onMouseEnter:()=>d(h.id),onMouseLeave:()=>d(null),onContextMenu:y=>{y.preventDefault(),r(false),a({tabId:h.id,x:y.clientX,y:y.clientY});},role:"tab","aria-label":x,"aria-selected":h.id===e.activeTabId,children:jsxs(vn,{content:x,followCursor:true,delay:400,showArrow:false,className:"browser-tab__tooltip",children:[!t&&jsx("span",{className:`browser-tab__favicon${k?"":" browser-tab__favicon--placeholder"}`,children:k?jsx("img",{src:h.favicon,alt:"",width:16,height:16,onError:()=>p(y=>y.has(h.id)?y:new Set(y).add(h.id))}):jsx(Ll,{kind:h.kind})}),jsx("span",{className:"browser-tab__title",children:h.title||"\u65B0\u6807\u7B7E\u9875"}),jsx(f,{variant:"unstyled",className:"browser-tab__close",onClick:y=>{y.stopPropagation(),e.onCloseTab(h.id);},"aria-label":`\u5173\u95ED ${x}`,children:jsx(Q,{"aria-hidden":"true"})})]})},h.id)}),t&&b]}),jsxs("div",{className:"browser-tabbar__actions",children:[!t&&b,jsx(f,{variant:"unstyled",type:"button",className:"browser-tabbar__add",onClick:e.onToggleWide,title:t?"\u6700\u5927\u5316 / \u8FD8\u539F":e.isWide?"\u6062\u590D\u9762\u677F\u5BBD\u5EA6":"\u5C55\u5F00\u9762\u677F","aria-label":t?"\u6700\u5927\u5316 / \u8FD8\u539F":e.isWide?"\u6062\u590D\u9762\u677F\u5BBD\u5EA6":"\u5C55\u5F00\u9762\u677F","aria-pressed":e.isWide,children:jsx(Go,{width:t?16:14,height:t?16:14})}),jsx(f,{variant:"unstyled",type:"button",className:"browser-tabbar__add",onClick:e.onToggleCollapsed,title:t?"\u6536\u8D77\u53F3\u680F":"\u6298\u53E0\u9884\u89C8\u9762\u677F","aria-label":t?"\u6536\u8D77\u53F3\u680F":"\u6298\u53E0\u9884\u89C8\u9762\u677F",children:t?jsx(he,{width:16,height:16}):jsx(Ir,{width:14,height:14})})]}),n&&jsx(Hk,{point:n,canCloseOthers:e.tabs.length>1,onClose:()=>a(null),onSelect:w})]})}function Hk({point:e,canCloseOthers:t,onClose:o,onSelect:r}){let n=useRef(null),[a,i]=useState(null);return useLayoutEffect(()=>{let d=n.current;if(!d)return;let s=d.getBoundingClientRect();i({left:Math.max(8,Math.min(e.x,window.innerWidth-s.width-8)),top:Math.max(8,Math.min(e.y,window.innerHeight-s.height-8))});},[e.x,e.y]),useEffect(()=>{let d=l=>{n.current?.contains(l.target)||o();},s=l=>{l.key==="Escape"&&o();};return document.addEventListener("pointerdown",d,true),document.addEventListener("keydown",s),window.addEventListener("blur",o),window.addEventListener("scroll",o,true),()=>{document.removeEventListener("pointerdown",d,true),document.removeEventListener("keydown",s),window.removeEventListener("blur",o),window.removeEventListener("scroll",o,true);}},[o]),createPortal(jsxs("div",{ref:n,className:"cpop browser-tab-context-menu",style:{left:a?.left??-9999,top:a?.top??-9999,visibility:a?"visible":"hidden"},role:"menu","aria-label":"\u6807\u7B7E\u9875\u64CD\u4F5C",onContextMenu:d=>d.preventDefault(),children:[jsxs(f,{variant:"unstyled",className:"mi",role:"menuitem",onClick:()=>r("close"),children:[jsx(Q,{}),jsx("span",{children:"\u5173\u95ED"})]}),jsxs(f,{variant:"unstyled",className:"mi",role:"menuitem",disabled:!t,onClick:()=>r("close-others"),children:[jsx(Si,{}),jsx("span",{children:"\u5173\u95ED\u5176\u4ED6\u6807\u7B7E\u9875"})]})]}),document.body)}function Ll({kind:e}){return e==="terminal"?jsx(So,{"aria-hidden":"true"}):e==="web"?jsx(Mt,{"aria-hidden":"true"}):e==="subagent"?jsx(Po,{"aria-hidden":"true"}):e==="file"?jsx(oo,{"aria-hidden":"true"}):jsx(qe,{"aria-hidden":"true"})}var qc={log:"var(--ow-term-text)",info:"var(--ow-ansi-blue)",warn:"var(--ow-ansi-yellow)",error:"var(--ow-ansi-red)"},Yc={log:" ",info:"i ",warn:"! ",error:"x "},Xc={log:"\u65E5\u5FD7",info:"\u4FE1\u606F",warn:"\u8B66\u544A",error:"\u9519\u8BEF"};function Kk({logs:e=[],open:t,defaultOpen:o=false,onOpenChange:r,onClear:n,label:a="\u63A7\u5236\u53F0",maxHeight:i=192,emptyMessage:d="\u9875\u9762\u8FD8\u6CA1\u6709\u8F93\u51FA\u3002",className:s=""}){let[l,c]=useState(o),p=t??l,m=()=>{let v=!p;t===void 0&&c(v),r?.(v);},u=useMemo(()=>{let v=0,w=0;for(let b of e)b.level==="warn"?v+=1:b.level==="error"&&(w+=1);return {error:w,warn:v}},[e]);return jsxs("div",{"data-slot":"web-preview-console","data-ow-state":p?"open":"closed",className:g("shrink-0 border-t border-[color:var(--ow-border)] bg-[var(--ow-surface)]",s),children:[jsxs("div",{"data-ow-part":"header",className:"flex items-center gap-2 pr-2",children:[jsxs(f,{type:"button","data-ow-part":"toggle",variant:"ghost",size:"sm","aria-expanded":p,onClick:m,className:"h-8 min-w-0 flex-1 justify-start gap-2 rounded-none px-3 font-medium text-ow-fs-ui text-[color:var(--ow-text-2)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",children:[jsx(ae,{"aria-hidden":"true","data-ow-part":"chevron",className:g("w-3.5 h-3.5 [transition:transform_var(--ow-dur-2)_var(--ow-ease-beacon)] motion-reduce:transition-none",p?"rotate-0":"-rotate-90")}),jsx("span",{children:a}),jsx("span",{"data-ow-part":"count",className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-fs-eyebrow text-[color:var(--ow-text-3)]",children:e.length}),u.warn>0&&jsxs("span",{"data-ow-part":"count-warn",title:`${Xc.warn} ${u.warn} \u6761`,className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-fs-eyebrow",style:{color:qc.warn},children:[Yc.warn.trim(),u.warn]}),u.error>0&&jsxs("span",{"data-ow-part":"count-error",title:`${Xc.error} ${u.error} \u6761`,className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-fs-eyebrow",style:{color:qc.error},children:[Yc.error.trim(),u.error]})]}),n&&p&&jsx(f,{type:"button","data-ow-part":"clear",variant:"ghost",size:"sm",className:"h-7 w-7 shrink-0 p-0 [&_svg]:w-4 [&_svg]:h-4 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)]",title:"\u6E05\u7A7A\u63A7\u5236\u53F0","aria-label":"\u6E05\u7A7A\u63A7\u5236\u53F0",onClick:n,children:jsx(Le,{"aria-hidden":"true"})})]}),p&&jsx("div",{"data-ow-part":"log","data-theme":"dark",role:"log","aria-live":"polite","aria-label":a,className:"overflow-y-auto px-3 py-2 font-[family-name:var(--ow-font-mono)] text-ow-fs-code leading-[var(--ow-lh-code)] [font-variant-numeric:tabular-nums]",style:{background:"var(--ow-term-bg)",color:"var(--ow-term-text)",maxHeight:i},children:e.length===0?jsx("p",{"data-ow-part":"empty",className:"m-0",style:{color:"var(--ow-ansi-br-black)"},children:d}):e.map((v,w)=>jsxs("div",{"data-ow-part":"entry","data-ow-level":v.level,className:"flex gap-2 whitespace-pre-wrap break-words",style:{color:qc[v.level]},children:[jsx("span",{"data-ow-part":"time",className:"shrink-0",style:{color:"var(--ow-ansi-br-black)"},children:v.timestamp.toLocaleTimeString("zh-CN",{hour12:false})}),jsx("span",{"data-ow-part":"glyph",className:"shrink-0","aria-label":Xc[v.level],children:Yc[v.level]}),jsx("span",{"data-ow-part":"message",className:"min-w-0 flex-1",children:v.message}),v.source&&jsx("span",{"data-ow-part":"source",className:"shrink-0",style:{color:"var(--ow-ansi-br-black)"},children:v.source})]},`${v.timestamp.getTime()}-${v.level}-${w}`))})]})}function kV({text:e,children:t,cursor:o=true,label:r="\u7EC8\u7AEF",className:n=""}){return jsxs("div",{"data-slot":"terminal-pane","data-theme":"dark",role:"log","aria-live":"polite","aria-label":r,className:g("min-h-0 flex-1 overflow-auto px-3.5 py-3","font-[family-name:var(--ow-font-mono)] text-ow-fs-code leading-[var(--ow-lh-code)]","whitespace-pre-wrap [word-break:break-word]",n),style:{background:"var(--ow-term-bg)",color:"var(--ow-term-text)"},children:[t??e,o&&jsx("span",{"data-ow-part":"cursor","aria-hidden":"true",className:"inline-block w-2 h-[15px] align-[-3px]",style:{background:"var(--ow-term-cursor)"}})]})}function PV({title:e,status:t,turns:o,label:r="\u5B50\u4EFB\u52A1",className:n=""}){return jsxs("div",{"data-slot":"sub-agent-pane","aria-label":r,className:g("flex min-h-0 flex-1 flex-col",n),children:[jsxs("div",{"data-ow-part":"header",className:"flex shrink-0 items-center gap-2 border-b border-[color:var(--ow-border)] px-3.5 py-2.5",children:[jsx("span",{"data-ow-part":"title",className:"min-w-0 flex-1 truncate text-ow-fs-ui font-medium text-[color:var(--ow-text)]",children:e}),t!=null&&jsxs("span",{"data-ow-part":"status",className:"flex shrink-0 items-center gap-1.5 font-[family-name:var(--ow-font-mono)] text-ow-fs-caption [font-variant-numeric:tabular-nums] text-[color:var(--ow-text-2)]",children:[jsx("span",{"data-ow-part":"status-dot","aria-hidden":"true",className:"w-1.5 h-1.5 shrink-0 rounded-full bg-[var(--ow-progress-fill)]"}),jsx("span",{children:t})]})]}),jsx("div",{"data-ow-part":"body",className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-3.5 py-4",children:o.map((a,i)=>jsxs("div",{"data-ow-part":"turn","data-role":a.role,className:"flex gap-3",children:[jsxs("div",{"data-ow-part":"rail",className:"relative w-3 shrink-0",children:[jsx("span",{"data-ow-part":"line","aria-hidden":"true",className:"absolute left-[5px] top-0 bottom-0 w-[1.5px] bg-[var(--ow-timeline)]"}),a.role==="user"?jsx("span",{"data-ow-part":"dot","aria-hidden":"true",className:"absolute left-px top-1.5 w-2 h-2 rounded-full border-[1.5px] border-[color:var(--ow-text-3)] bg-[var(--ow-turn-ground,var(--ow-surface))]"}):jsx("span",{"data-ow-part":"dot","aria-hidden":"true",className:"absolute left-[1.5px] top-[7px] w-[7px] h-[7px] rounded-full bg-[var(--ow-text)]"})]}),jsx("div",{"data-ow-part":"text",className:"min-w-0 flex-1 text-ow-fs-ui leading-[1.7] text-[color:var(--ow-text)] [text-wrap:pretty]",children:a.text})]},a.id??i))})]})}function Xk({open:e,title:t,children:o,loading:r=false,onClose:n}){let[a,i]=useState(false),d=useId();useEffect(()=>{e||i(false);},[e]);let s=a?"\u8FD8\u539F\u7A97\u53E3":"\u653E\u5927\u7A97\u53E3";return jsx(Tm,{open:e,onClose:n,overlayClassName:"web-preview-dialog__overlay",className:`web-preview-dialog${a?" web-preview-dialog--maximized":""}`,children:jsxs("section",{role:"dialog","aria-modal":"true","aria-labelledby":d,className:"web-preview-dialog__surface",children:[jsxs("header",{className:"web-preview-dialog__header",children:[jsx("h2",{id:d,className:"web-preview-dialog__title",children:t}),jsxs("div",{className:"web-preview-dialog__actions",children:[jsx(f,{variant:"unstyled",type:"button",className:"web-preview-dialog__action",title:s,"aria-label":s,"aria-pressed":a,onClick:()=>i(l=>!l),children:jsx(Go,{})}),jsx(f,{variant:"unstyled",type:"button",className:"web-preview-dialog__action",title:"\u5173\u95ED\u9884\u89C8","aria-label":"\u5173\u95ED\u9884\u89C8",onClick:n,children:jsx(Q,{})})]})]}),jsxs("div",{className:"web-preview-dialog__content",children:[o,r&&jsxs("div",{className:"web-preview-dialog__loading",role:"status","aria-live":"polite",children:[jsx(gt,{size:18,className:"web-preview-dialog__loading-icon","aria-label":"\u52A0\u8F7D\u4E2D"}),jsx("span",{children:"\u52A0\u8F7D\u4E2D\u2026"})]})]})]})})}var IV=Xk;var Qk=jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:jsx("path",{d:"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6"})}),xs={textContent:"Desktop UI \u6536\u655B\u8BF4\u660E",color:"var(--ow-text)",backgroundColor:"var(--ow-bg)",opacity:"1",fontFamily:"PingFang SC",fontSize:"14",fontWeight:"400",borderRadius:"12",borderColor:"var(--ow-border-strong)",borderWidth:"1",width:"320",height:"120",padding:"16",margin:"0"};function $V({defaultExpanded:e=false,tagName:t="div",onCancel:o,onSubmit:r}){let[n,a$1]=useState(e),[i,d]=useState(""),s=l=>jsx("button",{type:"button","data-ow-part":"settings-btn",className:"__ow-popup__settings-btn","aria-label":l,onClick:()=>a$1(c=>!c),children:Qk});return jsxs(Fragment,{children:[jsx("style",{children:b}),jsxs("div",{className:g("__ow-popup","is-preview",n&&"is-expanded"),"data-slot":"annotation-popup","data-ow-variant":"preview","data-ow-state":n?"expanded":"collapsed",children:[jsxs("div",{className:"__ow-popup__collapsed","data-ow-part":"collapsed-view",children:[s("\u5C55\u5F00\u6837\u5F0F\u7F16\u8F91"),jsx("input",{className:"__ow-popup__input","data-ow-part":"input",value:i,onChange:l=>d(l.target.value),placeholder:"\u6DFB\u52A0\u8BC4\u8BBA...","aria-label":"\u6DFB\u52A0\u8BC4\u8BBA"}),jsx("button",{type:"button","data-ow-part":"submit-btn",className:g("__ow-popup__submit-btn",i.trim()&&"has-text"),"data-ow-state":i.trim()?"has-text":void 0,onClick:()=>r?.(i.trim()),"aria-label":"\u63D0\u4EA4\u8BC4\u8BBA",children:jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":"true",children:[jsx("path",{d:"M12 19V5"}),jsx("path",{d:"M5 12l7-7 7 7"})]})})]}),jsxs("div",{className:"__ow-popup__expanded","data-ow-part":"expanded-view",children:[jsxs("div",{className:"__ow-popup__top","data-ow-part":"top",children:[s("\u6536\u8D77\u6837\u5F0F\u7F16\u8F91"),jsx("input",{className:"__ow-popup__input","data-ow-part":"input",value:i,onChange:l=>d(l.target.value),placeholder:"\u63CF\u8FF0\u8FD9\u4E9B\u66F4\u6539...","aria-label":"\u63CF\u8FF0\u66F4\u6539"})]}),jsxs("div",{className:"__ow-popup__tag","data-ow-part":"tag",children:[jsx("span",{className:"__ow-popup__tag-name","data-ow-part":"tag-name",children:t}),jsx("span",{className:"__ow-popup__tag-drag","data-ow-part":"tag-drag",children:"\u205E\u205E"})]}),jsx("div",{className:"__ow-popup__props","data-ow-part":"props",children:a.map(l=>jsxs("div",{className:"__ow-popup__prop","data-ow-part":"prop",children:[jsx("span",{className:"__ow-popup__prop-label","data-ow-part":"prop-label",children:l.label}),jsxs("div",{className:"__ow-popup__prop-value","data-ow-part":"prop-value",children:[l.type==="color"&&jsx("span",{className:"__ow-popup__color-swatch","data-ow-part":"color-swatch",style:{background:xs[l.key]},children:jsx("input",{type:"color",defaultValue:xs[l.key],"aria-label":l.label})}),l.type==="select"?jsx("select",{className:"__ow-popup__prop-select","data-ow-part":"prop-select",defaultValue:xs[l.key],"aria-label":l.label,children:(l.key==="fontFamily"?["PingFang SC","Arial","Helvetica","sans-serif","serif","monospace"]:l.options??[]).map(c=>jsx("option",{children:c},c))}):l.type==="spacing"?jsx("div",{className:"__ow-popup__spacing","data-ow-part":"spacing",children:["\u4E0A","\u53F3","\u4E0B","\u5DE6"].map(c=>jsx("input",{type:"number",defaultValue:xs[l.key],"aria-label":`${l.label}${c}`},c))}):jsx("input",{className:"__ow-popup__prop-input","data-ow-part":"prop-input",type:l.type==="number"?"number":"text",defaultValue:xs[l.key],step:l.step,min:l.min,max:l.max,"aria-label":l.label}),l.unit&&jsx("span",{className:"__ow-popup__prop-unit","data-ow-part":"prop-unit",children:l.unit})]})]},l.key))}),jsxs("div",{className:"__ow-popup__actions","data-ow-part":"actions",children:[jsx("button",{type:"button","data-ow-part":"cancel",className:"__ow-popup__cancel",onClick:o,children:"\u53D6\u6D88"}),jsxs("button",{type:"button","data-ow-part":"confirm",className:"__ow-popup__confirm",onClick:()=>r?.(i.trim()),children:[jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round","aria-hidden":"true",children:jsx("path",{d:"M20 6L9 17l-5-5"})}),"\u786E\u8BA4"]})]})]})]})]})}function ZV({presets:e,initialPresetIndex:t=0,onApply:o,onDisable:r,onClose:n}){let[a,i]=useState(t),d=e[t]??e[0],[s,l]=useState(d?.width||375),[c,p]=useState(d?.height||812),[m,u]=useState(d?.scaleFactor||1),[v,w]=useState(false),b=useRef(null),h=e[a]??e[0];useEffect(()=>{d&&d.width>0&&o(d.width,d.height,d.scaleFactor);},[]);let x=useCallback(y=>{let P=e.findIndex(S=>S.label===y),N=e[P];N&&(i(P),w(false),N.width>0?(l(N.width),p(N.height),u(N.scaleFactor),o(N.width,N.height,N.scaleFactor)):(u(1),r()));},[o,r,e]),k=useMemo(()=>e.map(y=>({key:y.label,label:y.label,hint:y.width>0?`${y.width}\xD7${y.height}`:void 0,selected:y.label===h?.label})),[h?.label,e]);return jsxs("div",{className:"browser-device-toolbar",children:[jsx("span",{className:"browser-device-toolbar__label",children:"\u5C3A\u5BF8:"}),jsxs("div",{ref:b,className:"browser-device-toolbar__preset-wrap",children:[jsxs(f,{variant:"unstyled",className:"browser-device-toolbar__preset-btn",onClick:()=>w(y=>!y),children:[jsx("span",{children:h?.label??"\u54CD\u5E94\u5F0F"}),jsx(ae,{width:12,height:12})]}),v&&jsx(pt,{items:k,onSelect:x,width:240,portal:b})]}),jsx(Cr,{unstyled:true,className:"browser-device-toolbar__dim-input",type:"number",value:s||"",min:200,max:3840,"aria-label":"\u5BBD\u5EA6",onChange:y=>{let P=Number.parseInt(y.target.value,10)||0;l(P),P>0&&c>0&&(i(0),u(1),o(P,c,1));}}),jsx("span",{className:"browser-device-toolbar__dim-sep",children:"\xD7"}),jsx(Cr,{unstyled:true,className:"browser-device-toolbar__dim-input",type:"number",value:c||"",min:200,max:3840,"aria-label":"\u9AD8\u5EA6",onChange:y=>{let P=Number.parseInt(y.target.value,10)||0;p(P),s>0&&P>0&&(i(0),u(1),o(s,P,1));}}),jsx("span",{className:"browser-device-toolbar__zoom",children:`${Math.round(m*100)}%`}),jsx(f,{variant:"unstyled",className:"browser-device-toolbar__close",onClick:()=>{r(),n();},title:"\u5173\u95ED\u8BBE\u5907\u5DE5\u5177\u680F","aria-label":"\u5173\u95ED\u8BBE\u5907\u5DE5\u5177\u680F",children:jsx(Q,{width:14,height:14})})]})}function oF({onFind:e,onClear:t,onClose:o}){let[r,n]=useState(""),a=useRef(null),{isImeEnter:i,onCompositionEnd:d,onCompositionStart:s}=Dt();useEffect(()=>{a.current?.focus();},[]);let l=useCallback((p,m)=>{r?e(r,p,m):t();},[t,e,r]),c=useCallback(()=>{t(),o();},[t,o]);return jsxs("div",{className:"browser-findbar",children:[jsx(Cr,{unstyled:true,ref:a,className:"browser-findbar__input",type:"text",value:r,onChange:p=>{let m=p.target.value;n(m),m?e(m,true,false):t();},onCompositionStart:s,onCompositionEnd:d,onKeyDown:p=>{p.stopPropagation(),!i(p)&&(p.key==="Enter"?(p.preventDefault(),l(!p.shiftKey,true)):p.key==="Escape"&&(p.preventDefault(),c()));},placeholder:"\u67E5\u627E...","aria-label":"\u5728\u9875\u9762\u4E2D\u67E5\u627E"}),jsx(f,{variant:"unstyled",type:"button",className:"browser-findbar__btn",onClick:()=>l(false,true),disabled:!r,title:"\u4E0A\u4E00\u4E2A","aria-label":"\u4E0A\u4E00\u4E2A\u5339\u914D",children:jsx(yi,{width:14,height:14})}),jsx(f,{variant:"unstyled",type:"button",className:"browser-findbar__btn",onClick:()=>l(true,true),disabled:!r,title:"\u4E0B\u4E00\u4E2A","aria-label":"\u4E0B\u4E00\u4E2A\u5339\u914D",children:jsx(ae,{width:14,height:14})}),jsx(f,{variant:"unstyled",type:"button",className:"browser-findbar__btn",onClick:c,title:"\u5173\u95ED\u67E5\u627E","aria-label":"\u5173\u95ED\u67E5\u627E\u680F",children:jsx(Q,{width:14,height:14})})]})}function dF({profiles:e,loading:t=false,onClose:o,onImport:r}){let[n,a]=useState(0),[i,d]=useState(false),[s,l]=useState(true),[c,p]=useState(true),[m,u]=useState(false),v=e[n]??e[0],w=useCallback(async()=>{if(v){u(true);try{await r(v,{passwords:s,cookies:c}),o();}catch{}finally{u(false);}}},[c,s,o,r,v]);return jsxs(oe,{open:true,title:"\u4ECE\u6D4F\u89C8\u5668\u5BFC\u5165",subtitle:"\u9009\u62E9\u8981\u5BFC\u5165\u5230\u5185\u7F6E\u6D4F\u89C8\u5668\u7684\u6570\u636E",onClose:o,closable:true,width:420,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",size:"md",onClick:o,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",size:"md",onClick:()=>{w();},disabled:t||m||!v||!s&&!c,children:t?"\u6B63\u5728\u68C0\u6D4B...":m?"\u5BFC\u5165\u4E2D...":"\u5BFC\u5165"})]}),children:[jsxs("div",{className:"browser-import-dialog__source",children:[jsx("span",{className:"browser-import-dialog__source-label",children:"\u4ECE"}),jsxs("div",{className:"browser-import-dialog__source-select",children:[jsxs(f,{variant:"unstyled",className:"browser-import-dialog__source-btn",onClick:()=>d(b=>!b),disabled:!v,children:[jsx(Yg,{profile:v}),jsx("span",{children:v?`${v.browser} ${v.profile}`:"\u672A\u68C0\u6D4B\u5230\u6D4F\u89C8\u5668"}),jsx(ae,{width:14,height:14})]}),i&&jsx("div",{className:"browser-import-dialog__source-dropdown",children:e.map((b,h)=>jsxs(f,{variant:"unstyled",className:`browser-import-dialog__source-option${h===n?" is-active":""}`,onClick:()=>{a(h),d(false);},children:[jsx(Yg,{profile:b}),jsxs("span",{children:[b.browser," ",b.profile]})]},`${b.browser}:${b.profileFolder}`))})]})]}),v&&jsxs("p",{className:"browser-import-dialog__warning",children:["\u5BFC\u5165\u524D\uFF0C\u8BF7\u5B8C\u5168\u5173\u95ED ",v.browser]}),jsxs("div",{className:"browser-import-dialog__options",children:[jsxs("div",{className:"browser-import-dialog__option",children:[jsx("div",{className:"browser-import-dialog__option-icon",children:jsx(mr,{width:20,height:20})}),jsx("span",{className:"browser-import-dialog__option-label",children:"\u5BC6\u7801"}),jsx(po,{checked:s,onChange:l})]}),jsxs("div",{className:"browser-import-dialog__option",children:[jsx("div",{className:"browser-import-dialog__option-icon",children:jsx(Mt,{width:20,height:20})}),jsx("span",{className:"browser-import-dialog__option-label",children:"Cookie"}),jsx(po,{checked:c,onChange:p})]})]})]})}function Yg({profile:e}){return e?.browserIcon?jsx("span",{"aria-hidden":"true",className:"browser-import-dialog__source-glyph",children:e.browserIcon}):jsx(Mt,{width:18,height:18,"aria-hidden":"true"})}function mF({url:e,errorDescription:t,onReload:o}){return jsx("div",{className:"browser-load-error",children:jsxs(J,{className:"browser-load-error__content",variant:"error",title:"\u8FD9\u4E2A\u9875\u9762\u6CA1\u52A0\u8F7D\u51FA\u6765",detail:t,action:jsx(f,{type:"button",variant:"secondary",size:"sm",onClick:o,children:"\u91CD\u65B0\u52A0\u8F7D"}),children:["\u8BF7\u68C0\u67E5\u5730\u5740\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u5BF9\u5E94\u670D\u52A1\u5DF2\u542F\u52A8\u540E\u91CD\u8BD5\u3002",e&&jsx("span",{className:"browser-load-error__url",children:e})]})})}function xF(e){let[t,o]=useState(false),[r,n]=useState(0),[a,i]=useState(false),[d,s]=useState(true),[l,c]=useState(true),[p,m]=useState(false),[u,v]=useState(false),w=useRef(null),b=useCallback(()=>{o(false),i(false);},[]),h=useCallback(()=>{o(N=>(N||n(e.getZoomLevel()),!N)),i(false);},[e]),x=useCallback(N=>{n(N),e.onZoomChange(N);},[e]),k=[{key:"find",label:"\u5728\u9875\u9762\u4E2D\u67E5\u627E",icon:jsx($t,{width:16,height:16})},{key:"---",label:""},{key:"device",label:"\u663E\u793A\u8BBE\u5907\u5DE5\u5177\u680F",icon:jsx(m5,{})},{key:"screenshot",label:"\u622A\u53D6\u5C4F\u5E55\u622A\u56FE",icon:jsx(Pd,{width:16,height:16})},{key:"---",label:""},{key:"import",label:"\u5BFC\u5165 Cookie \u548C\u5BC6\u7801...",icon:jsx(Co,{width:16,height:16})},{key:"clear-data",label:"\u6E05\u9664\u6D4F\u89C8\u6570\u636E",icon:jsx(Le,{width:16,height:16})}],y=useCallback(N=>{if(N==="clear-data"){i(true);return}b(),N==="find"?e.onOpenFind():N==="device"?e.onOpenDeviceToolbar():N==="screenshot"?e.onScreenshot():N==="import"&&e.onOpenImport();},[b,e]),P=jsxs("div",{className:"browser-more-menu__zoom",children:[jsx("span",{className:"browser-more-menu__zoom-label",children:"\u7F29\u653E"}),jsxs("div",{className:"browser-more-menu__zoom-controls",children:[jsx(f,{variant:"unstyled",className:"browser-more-menu__zoom-btn",onClick:()=>x(r-1),"aria-label":"\u7F29\u5C0F",children:"\u2212"}),jsxs(f,{variant:"unstyled",className:"browser-more-menu__zoom-value",onClick:()=>x(0),title:"\u91CD\u7F6E\u7F29\u653E",children:[Math.round(Math.pow(1.2,r)*100),"%"]}),jsx(f,{variant:"unstyled",className:"browser-more-menu__zoom-btn",onClick:()=>x(r+1),"aria-label":"\u653E\u5927",children:"\uFF0B"}),jsx(f,{variant:"unstyled",className:"browser-more-menu__zoom-btn",onClick:()=>x(0),"aria-label":"\u91CD\u7F6E\u7F29\u653E",title:"\u91CD\u7F6E",children:jsx(We,{width:14,height:14})})]})]});return jsxs("div",{ref:w,className:"browser-more-menu",children:[jsx(f,{variant:"unstyled",type:"button",className:`browser-navbar__btn${t?" is-active":""}`,onClick:h,title:"\u66F4\u591A","aria-label":"\u66F4\u591A","aria-expanded":t,children:jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[jsx("circle",{cx:"8",cy:"3",r:"1.3"}),jsx("circle",{cx:"8",cy:"8",r:"1.3"}),jsx("circle",{cx:"8",cy:"13",r:"1.3"})]})}),t&&(a?jsx(pt,{role:"none",width:240,portal:w,align:"end",contentKey:"clear-data",onClose:b,footer:jsx(f,{variant:"unstyled",className:"browser-more-menu__clear-btn",disabled:u,onClick:()=>{v(true),e.onClearBrowsingData({cookies:d,cache:l,localStorage:p}).then(b).finally(()=>v(false));},children:u?"\u6E05\u9664\u4E2D\u2026":"\u6E05\u9664\u6570\u636E"}),children:jsx(u5,{cookies:d,cache:l,localStorage:p,setCookies:s,setCache:c,setLocalStorage:m,onBack:()=>i(false)})}):jsx(pt,{items:k,onSelect:y,footer:P,width:240,portal:w,align:"end",onClose:b}))]})}function u5({cookies:e,cache:t,localStorage:o,setCookies:r,setCache:n,setLocalStorage:a,onBack:i}){return jsxs("div",{className:"browser-more-menu__clear-panel",children:[jsxs(f,{variant:"unstyled",className:"browser-more-menu__back",onClick:i,children:[jsx(Kt,{width:14,height:14}),jsx("span",{children:"\u6E05\u9664\u6D4F\u89C8\u6570\u636E"})]}),jsx("div",{className:"browser-more-menu__divider",role:"separator"}),jsxs("label",{className:"browser-more-menu__check",children:[jsx(Ro,{checked:e,onChange:()=>r(!e)}),jsx("span",{children:"Cookie \u53CA\u7AD9\u70B9\u6570\u636E"})]}),jsxs("label",{className:"browser-more-menu__check",children:[jsx(Ro,{checked:t,onChange:()=>n(!t)}),jsx("span",{children:"\u7F13\u5B58\u7684\u56FE\u7247\u548C\u6587\u4EF6"})]}),jsxs("label",{className:"browser-more-menu__check",children:[jsx(Ro,{checked:o,onChange:()=>a(!o)}),jsx("span",{children:"\u672C\u5730\u5B58\u50A8\u6570\u636E"})]})]})}function m5(){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[jsx("rect",{x:"1",y:"3",width:"9",height:"7",rx:"1"}),jsx("rect",{x:"6",y:"6",width:"9",height:"7",rx:"1"})]})}function TF({currentUrl:e,canGoBack:t,canGoForward:o,isLoading:r,commentMode:n,moreMenu:a,onGoBack:i,onGoForward:d,onReload:s,onStop:l,onNavigate:c,onToggleCommentMode:p}){let[m,u]=useState(e),[v,w]=useState(false),{isImeEnter:b,onCompositionEnd:h,onCompositionStart:x}=Dt();useEffect(()=>{v||u(e);},[e,v]);let k=useCallback(()=>{let y=m.trim();y&&(/^[a-z][a-z0-9+.-]*:/i.test(y)||(y=`https://${y}`),c(y),w(false));},[c,m]);return jsxs("div",{className:"browser-navbar",children:[jsxs("div",{className:"browser-navbar__controls",children:[jsx(f,{variant:"unstyled",className:"browser-navbar__btn",disabled:!t,onClick:i,title:"\u540E\u9000","aria-label":"\u540E\u9000",children:jsx(Kt,{width:16,height:16})}),jsx(f,{variant:"unstyled",className:"browser-navbar__btn",disabled:!o,onClick:d,title:"\u524D\u8FDB","aria-label":"\u524D\u8FDB",children:jsx(he,{width:16,height:16})}),jsx(f,{variant:"unstyled",className:"browser-navbar__btn",onClick:r?l:s,title:r?"\u505C\u6B62":"\u5237\u65B0","aria-label":r?"\u505C\u6B62":"\u5237\u65B0",children:r?jsx(Ia,{width:16,height:16}):jsx(We,{width:16,height:16})})]}),jsx("div",{className:"browser-navbar__url-bar",children:jsx(Cr,{unstyled:true,className:"browser-navbar__url-input",value:v?m:e,onChange:y=>{w(true),u(y.target.value);},onFocus:y=>{let P=y.currentTarget;w(true),u(e),window.requestAnimationFrame(()=>P.select());},onBlur:()=>w(false),onCompositionStart:x,onCompositionEnd:h,onKeyDownCapture:y=>{y.stopPropagation(),!b(y)&&(y.key==="Enter"&&(y.preventDefault(),k()),y.key==="Escape"&&(y.preventDefault(),w(false),u(e)));},placeholder:"\u8F93\u5165\u7F51\u5740...","aria-label":"\u5730\u5740\u680F"})}),jsxs(f,{variant:"unstyled",className:`browser-navbar__btn${n?" browser-navbar__comment-active":""}`,onClick:p,title:n?"\u9000\u51FA\u6279\u6CE8\u6A21\u5F0F (Esc)":"\u6279\u6CE8\u9875\u9762","aria-label":n?"\u9000\u51FA\u6279\u6CE8\u6A21\u5F0F":"\u6279\u6CE8\u9875\u9762","aria-pressed":n,children:[jsx(Mi,{width:16,height:16}),n&&jsx("span",{className:"browser-navbar__comment-label",children:"\u6B63\u5728\u6CE8\u91CA"})]}),a]})}var Jg=createContext(null),x5=()=>{let e=useContext(Jg);if(!e)throw new Error("WebPreview components must be used within a WebPreview");return e};function AF({className:e="",children:t,defaultUrl:o="",onUrlChange:r,...n}){let[a,i]=useState(o),[d,s]=useState(false),l=useCallback(p=>{i(p),r?.(p);},[r]),c=useMemo(()=>({consoleOpen:d,setConsoleOpen:s,setUrl:l,url:a}),[d,l,a]);return jsx(Jg.Provider,{value:c,children:jsx("div",{"data-slot":"web-preview",className:g("flex flex-col w-full h-full [border-radius:var(--ow-radius-card)] border border-ow-border-strong bg-ow-bg overflow-hidden",e),...n,children:t})})}function BF({className:e="",loading:t,src:o,...r}){let{url:n}=x5();return jsxs("div",{"data-ow-part":"body",className:"flex-1 min-h-0 relative",children:[jsx("iframe",{"data-ow-part":"iframe",className:g("w-full h-full border-0 block",e),sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-presentation",src:(o??n)||void 0,title:"Preview",...r}),t]})}function o$({children:e,className:t=""}){return jsx("div",{className:`ow-agent-loop-segment ${t}`,"data-slot":"agent-loop-segment",style:k5,children:e})}var k5={display:"flex",flexDirection:"column",gap:10};var R5=()=>{},El=createContext({on:false,report:R5});function tv(){return useContext(El).on}function ov(e){let{on:t,report:o}=useContext(El),r=useId(),{spinning:n,toolRunning:a}=e;useEffect(()=>{if(t)return o(r,{spinning:n,toolRunning:a}),()=>o(r,null)},[t,o,r,n,a]);}var L5=["absolute left-[1.5px] top-[8px] w-[7px] h-[7px] shrink-0","[border-radius:var(--ow-radius-pill)] bg-[var(--ow-text)]"].join(" "),D5="absolute left-0 top-[3px] shrink-0";function Il({children:e,name:t="Orbitwork",meta:o,byline:r=false,node:n=true,anchor:a,execution:i,thinking:d,error:s,actions:l,disclaimer:c,trailing:p,streaming:m,selectable:u=false,checked:v=false,onToggle:w,selectLabel:b="\u9009\u5165\u5206\u4EAB",beacon:h=true,className:x=""}){let k=n&&!!h,y=typeof h=="object"?h:{},P=y.size??28,[N,S]=useState({}),R=useCallback(($,E)=>{S(V=>{if(E===null){if(!($ in V))return V;let{[$]:W,...ce}=V;return ce}let pe=V[$];return pe&&pe.spinning===E.spinning&&pe.toolRunning===E.toolRunning?V:{...V,[$]:E}});},[]),M=Object.values(N),T=y.spinning??M.some($=>$.spinning),_=y.toolRunning??M.some($=>$.toolRunning),D=useMemo(()=>({on:k,report:R}),[k,R]),I=(u?33.5:1.5)+3.5,H=8+3.5;return jsx(El.Provider,{value:D,children:jsxs("div",{"data-slot":"agent-turn","data-ow-part":"turn","data-role":"agent","data-chat-anchor":a,"data-selectable":u?"on":void 0,className:g("group/turn relative flex flex-col items-start gap-2",n&&"pl-[26px]",u&&"pl-[58px]",x),children:[u&&jsx(Ro,{className:D5,checked:v,onChange:w,"aria-label":b}),n&&k&&jsx("span",{"data-ow-part":"node-beacon","aria-hidden":"true",className:"absolute pointer-events-none",style:{left:I-P/2,top:H-P/2,width:P,height:P},children:jsx(gt,{size:P,spinning:T,trail:T?"var(--ow-text)":"var(--ow-text-3)",satellite:_?"var(--ow-text-2)":void 0,"aria-label":T?"\u6B63\u5728\u601D\u8003":"\u5DF2\u601D\u8003"})}),n&&jsx("span",{"data-ow-part":"dot","aria-hidden":"true",className:g(L5,u&&"left-[33.5px]")}),r&&jsxs("div",{"data-ow-part":"byline",className:"flex w-full min-w-0 items-baseline gap-2",children:[jsx("span",{"data-ow-part":"name",className:"text-ow-fs-ui font-medium text-[color:var(--ow-text)]",children:t}),o!=null&&jsx("span",{"data-ow-part":"byline-meta",className:"font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-fs-mark-md text-[color:var(--ow-text-2)]",children:o})]}),i,d,e!=null&&jsxs("div",{"data-ow-part":"body",className:"w-full min-w-0 text-ow-fs-ui leading-[1.7] text-[color:var(--ow-text)] [overflow-wrap:anywhere]",children:[e,m&&jsx("span",{"data-ow-part":"caret","aria-hidden":"true",className:g("ml-[7px] inline-block h-[7px] w-[7px] align-[0.08em]","[border-radius:var(--ow-radius-pill)] bg-[var(--ow-text-3)]","motion-safe:animate-[ow-skeleton_var(--ow-dur-spin)_var(--ow-ease-beacon)_infinite]")})]}),s&&jsx("div",{"data-ow-part":"error",className:"text-ow-fs-ui leading-[1.6] text-[color:var(--ow-error)]",children:s}),l,c&&jsx("div",{"data-ow-part":"disclaimer",className:"text-ow-fs-mark-md leading-[1.5] text-[color:var(--ow-text-3)]",children:c}),p]})})}function v$({source:e,scope:t,onAllowOnce:o,onDeny:r,className:n=""}){return jsxs("div",{className:`ow-authorization-card ${n}`,"data-slot":"authorization-card",style:E5,children:[jsxs("div",{style:I5,children:[jsx(mr,{width:16,height:16,"aria-hidden":"true",style:A5}),jsxs("span",{style:B5,children:[e," \u8BF7\u6C42\u6388\u6743"]})]}),jsx("div",{style:O5,children:t}),jsxs("div",{style:V5,children:[jsx(f,{variant:"primary",size:"sm",onClick:o,children:"\u5141\u8BB8\u4E00\u6B21"}),jsx(f,{variant:"ghost",size:"sm",onClick:r,className:"border border-[color:var(--ow-border-strong)] text-[color:var(--ow-error-on-tint)]",children:"\u62D2\u7EDD"})]})]})}var E5={display:"flex",flexDirection:"column",gap:10,padding:14,border:"1px solid var(--ow-warning-tint-border)",borderRadius:"var(--ow-radius-lg)",background:"var(--ow-warning-tint)",fontFamily:"var(--ow-font-body)"},I5={display:"flex",alignItems:"center",gap:8},A5={flex:"0 0 auto",color:"var(--ow-warning-on-tint)"},B5={fontSize:"var(--ow-fs-ui)",fontWeight:500,color:"var(--ow-warning-on-tint)"},O5={fontSize:"var(--ow-fs-ui)",lineHeight:1.6,color:"var(--ow-text)",textWrap:"pretty"},V5={display:"flex",alignItems:"center",gap:8};var rv=e=>({inert:e?"true":void 0}),F5={base:"var(--ow-bg)",surface:"var(--ow-surface)"};function Ol({header:e,children:t,empty:o,sender:r,pickBar:n,spine:a=true,surface:i="surface",gap:d=20,maxWidth:s=752,selectable:l=false,mode:c="compose",className:p=""}){let m=t!=null&&t!==false,u=c==="share";return jsxs("section",{"data-slot":"transcript","data-surface":i,className:g("mx-auto flex w-full flex-col","font-[family-name:var(--ow-font-sans)] text-[color:var(--ow-text)]",i==="surface"?"bg-[var(--ow-surface)]":"bg-[var(--ow-bg)]",p),style:{maxWidth:s,"--ow-turn-ground":F5[i]},children:[e&&jsx("header",{"data-ow-part":"header",className:"flex min-h-[var(--ow-titlebar-h)] flex-shrink-0 items-center border-b border-[color:var(--ow-border)]",children:e}),jsx("div",{"data-ow-part":"stream",className:g("-mx-4 flex min-h-0 flex-1 flex-col overflow-y-auto px-4 py-5",m?"justify-start":"justify-center"),children:m?jsx("div",{"data-ow-part":"turns","data-spine":a?"on":void 0,"data-selecting":l?"on":void 0,className:"ow-transcript-turns relative flex flex-col",style:{gap:d,"--ow-turn-gap":`${d}px`},children:t}):o}),(r||n)&&jsxs("footer",{"data-ow-part":"sender","data-mode":c,className:"flex-shrink-0 pb-1 pt-2",children:[n&&jsx("div",{"data-ow-part":"pick-bar","data-ow-state":u?"shown":"hidden",className:"ow-transcript-swap",...rv(!u),"aria-hidden":u?void 0:true,children:jsx("div",{"data-ow-part":"swap-inner",children:n})}),r&&jsx("div",{"data-ow-part":"composer","data-ow-state":u?"hidden":"shown",className:"ow-transcript-swap",...rv(u),"aria-hidden":u?true:void 0,children:jsx("div",{"data-ow-part":"swap-inner",children:r})})]})]})}function C$({header:e,children:t,empty:o,sender:r,className:n="",maxWidth:a=720}){return jsx(Ol,{header:e,empty:o,sender:r,maxWidth:a,className:n,children:t})}var z5=["absolute left-[1px] top-[7px] w-[8px] h-[8px] shrink-0","[border-radius:var(--ow-radius-pill)] border-[1.5px] border-[color:var(--ow-text-3)]","bg-[color:var(--ow-turn-ground,var(--ow-surface))]"].join(" "),H5="absolute left-0 top-[3px] shrink-0";function Vl({text:e,children:t,node:o=true,anchor:r,leading:n,attachments:a,contexts:i,actions:d,trailing:s,error:l,streaming:c,time:p,selectable:m=false,checked:u=false,onToggle:v,selectLabel:w="\u9009\u5165\u5206\u4EAB",className:b=""}){let h=t??(e||null);return jsxs("div",{"data-slot":"user-turn","data-ow-part":"turn","data-role":"user","data-chat-anchor":r,"data-selectable":m?"on":void 0,className:g("group/turn relative flex flex-col items-start gap-2",o&&"pl-[26px]",m&&"pl-[58px]",b),children:[m&&jsx(Ro,{className:H5,checked:u,onChange:v,"aria-label":w}),o&&jsx("span",{"data-ow-part":"dot","aria-hidden":"true",className:g(z5,m&&"left-[33px]")}),n,a,i,h!=null&&jsxs("div",{"data-ow-part":"quote-row",className:"flex w-full min-w-0 items-end gap-2",children:[l&&jsx("span",{"data-ow-part":"error-mark",title:typeof l=="string"?l:void 0,className:g("self-start mt-[3px] inline-flex h-[17px] w-[17px] shrink-0 items-center justify-center","[border-radius:var(--ow-radius-pill)] bg-[var(--ow-error)] text-[color:var(--ow-on-fill)]","[&_svg]:w-3 [&_svg]:h-3"),children:jsx(Vd,{"aria-hidden":"true"})}),jsxs("div",{"data-ow-part":"quote",className:g("min-w-0 shrink max-w-[78%] whitespace-pre-wrap [overflow-wrap:anywhere] [text-wrap:pretty]","text-ow-fs-ui leading-[1.7] text-[color:var(--ow-text)]"),children:[h,c&&jsx("span",{"data-ow-part":"caret","aria-hidden":"true",className:g("ml-[7px] inline-block h-[7px] w-[7px] align-[0.08em]","[border-radius:var(--ow-radius-pill)] bg-[var(--ow-text-3)]","motion-safe:animate-[ow-skeleton_var(--ow-dur-spin)_var(--ow-ease-beacon)_infinite]")})]}),p!=null&&jsx("span",{"data-ow-part":"time",className:g("shrink-0 pb-[4px] leading-none font-[family-name:var(--ow-font-mono)] tabular-nums","text-ow-fs-caption text-[color:var(--ow-text-3)]"),children:p})]}),l&&jsx("p",{"data-ow-part":"error",className:"text-ow-fs-mark-md leading-[1.5] text-[color:var(--ow-error)]",children:l}),d,s]})}function D$({children:e,className:t=""}){return jsx(Vl,{node:false,className:t,children:e})}function B$({children:e,disclaimer:t,className:o=""}){return jsx(Il,{node:false,byline:false,disclaimer:t,className:o,children:e})}function iv({variant:e="block",size:t=48,spinning:o=true,label:r,toolRunning:n=false,children:a,beacon:i,defaultExpanded:d=false,expanded:s,onExpandedChange:l,className:c=""}){let[p,m]=useState(d),u=useId(),v=tv(),w=i??!v,b=e==="inline"||v;if(ov({spinning:b&&o,toolRunning:b&&n}),b){let h=a!=null,x=h&&(s??p),k=()=>{if(!h)return;let N=!x;s===void 0&&m(N),l?.(N);},P=jsxs(Fragment,{children:[w&&jsx(gt,{size:np,spinning:o,trail:o?"var(--ow-text)":"var(--ow-text-3)",satellite:n?"var(--ow-text-2)":"var(--ow-beacon)","aria-label":o?"\u6B63\u5728\u601D\u8003":"\u5DF2\u601D\u8003",style:q5}),r&&jsx("span",{style:Y5,children:r}),h&&jsx("span",{"aria-hidden":"true","data-ow-part":"chevron",style:X5,children:x?jsx(ae,{}):jsx(he,{})})]});return jsxs("div",{className:`ow-thinking ow-thinking--inline ow-motion ${c}`,"data-slot":"thinking","data-ow-state":[o?"spinning":"still",x?"expanded":null,w?null:"no-beacon"].filter(Boolean).join(" "),style:G5,children:[h?jsx("button",{type:"button",className:"ow-focus-ring","data-ow-part":"trigger",style:{...nv,...Z5},onClick:k,"aria-expanded":x,"aria-controls":x?u:void 0,children:P}):jsx("div",{"data-ow-part":"row",style:nv,children:P}),x&&jsx("div",{id:u,"data-ow-part":"content",style:w?J5:Q5,children:a})]})}return jsxs("div",{className:`ow-thinking ow-motion ${c}`,style:{display:"inline-flex",alignItems:"center",gap:12},children:[jsx(gt,{size:t,spinning:o,trail:o?"var(--ow-text)":"var(--ow-text-3)",satellite:"var(--ow-beacon)","aria-label":o?"\u6B63\u5728\u601D\u8003":"\u5DF2\u601D\u8003"}),r&&jsx("span",{style:{font:"400 var(--ow-fs-caption, 12px)/1.5 var(--ow-font-sans)",color:"var(--ow-text-2)"},children:r})]})}var np=28,sv=10,G5={display:"flex",flexDirection:"column",alignItems:"stretch",gap:0},nv={display:"flex",alignItems:"center",gap:sv,minWidth:0},Z5={width:"100%",padding:0,border:0,background:"transparent",color:"inherit",font:"inherit",textAlign:"left",cursor:"pointer",borderRadius:"var(--ow-radius-2xs)"},q5={flex:"0 0 auto",display:"block"},Y5={flex:"0 1 auto",minWidth:0,fontSize:"var(--ow-fs-ui)",lineHeight:1.6,color:"var(--ow-text-2)",textWrap:"pretty"},X5={flex:"0 0 auto",width:14,height:14,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--ow-text-3)"},Q5={marginLeft:0,marginTop:4,padding:"2px 0 6px 12px",borderLeft:"1px solid var(--ow-border-strong)",fontSize:"var(--ow-fs-ui)",lineHeight:1.7,color:"var(--ow-text-3)",overflowWrap:"anywhere"},J5={marginLeft:np/2-1,marginTop:4,padding:`2px 0 6px ${np/2+sv+1}px`,borderLeft:"1px solid var(--ow-border-strong)",fontSize:"var(--ow-fs-ui)",lineHeight:1.7,color:"var(--ow-text-3)",overflowWrap:"anywhere"};function dv({title:e="\u601D\u8003\u8FC7\u7A0B",children:t,loading:o=false,defaultExpanded:r=false,loadingLabel:n,expanded:a,onExpandedChange:i,className:d=""}){let l=typeof e=="string"&&["\u601D\u8003\u8FC7\u7A0B","\u601D\u8003\u4E2D","\u6B63\u5728\u601D\u8003","\u6B63\u5728\u751F\u6210","\u6B63\u5728\u751F\u6210\u2026","\u6B63\u5728\u751F\u6210..."].includes(e)?o?"\u6B63\u5728\u601D\u8003":"\u5DF2\u601D\u8003":o?n??e:e;return jsx("div",{"data-slot":"chat-thinking",className:d,children:jsx(iv,{variant:"inline",spinning:o,label:typeof l=="string"?l:void 0,defaultExpanded:r,expanded:a,onExpandedChange:i,children:t})})}function cv({analyserRef:e,levels:t,className:o="","aria-label":r="\u8BED\u97F3\u8F93\u5165\u9891\u8C31"}){let n=useRef(null);return useEffect(()=>{let a=n.current,i=a?.getContext("2d");if(!a||!i)return;let d=window.devicePixelRatio||1,s=new Uint8Array(512),l=t?[...t]:[],c=0,p=0,m=()=>{let b=a.getBoundingClientRect();a.width=Math.max(1,Math.round(b.width*d)),a.height=Math.max(1,Math.round(b.height*d));};m();let u=typeof ResizeObserver>"u"?void 0:new ResizeObserver(m);u?.observe(a);let v=()=>{let b=e?.current;if(!b)return 0;b.getByteTimeDomainData(s);let h=0;for(let k of s){let y=(k-128)/128;h+=y*y;}let x=Math.sqrt(h/s.length);return x<.015?0:Math.min(1,(x-.015)/.18)**.7},w=()=>{c=requestAnimationFrame(w),p+=1,!t&&p%8===0&&l.push(v());let{width:b,height:h}=a;i.clearRect(0,0,b,h);let x=getComputedStyle(a),k=x.getPropertyValue("--ow-composer-spectrum-fill").trim()||x.color,y=3*d,P=3.5*d,N=y+P,S=Math.max(8,Math.floor((b+P)/N));for(;l.length<S;)l.unshift(0);for(;l.length>S;)l.shift();i.fillStyle=k;let R=h/2;for(let M=0;M<l.length;M+=1){let T=Math.max(0,Math.min(1,l[M]??0)),_=b-(l.length-M)*N;if(_+y<0)continue;let D=T<=0?2*d:Math.max(4*d,T*h);i.beginPath(),i.roundRect(_,R-D/2,y,D,Math.min(y,D)/2),i.fill();}};return w(),()=>{cancelAnimationFrame(c),u?.disconnect();}},[e,t]),jsx("canvas",{ref:n,"data-slot":"composer-audio-spectrum",className:g(o),role:"img","aria-label":r})}function rz({value:e,options:t,open:o,defaultOpen:r=false,onOpenChange:n,onChange:a,title:i="\u6388\u6743\u6A21\u5F0F",menuHeader:d="\u6388\u6743\u6A21\u5F0F",icon:s,disabled:l=false,className:c=""}){let[p,m]=useState(r),u=o??p,v=t.find(b=>b.value===e),w=useCallback(b=>{o===void 0&&m(b),n?.(b);},[n,o]);return jsx("div",{"data-slot":"composer-authorization",className:g("relative inline-flex flex-[0_0_auto] items-center overflow-visible",c),children:jsx(co,{open:u,onOpenChange:w,width:280,header:d,ariaLabel:i,items:t.map(b=>({key:b.value,label:b.label,description:b.description,icon:b.icon,disabled:b.disabled,selected:b.value===e})),onSelect:b=>a?.(b),trigger:jsxs(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"trigger","data-ow-state":u?"open":void 0,className:"max-w-full font-normal data-[ow-state=open]:text-[color:var(--ow-text)] hover:text-[color:var(--ow-text)]",title:i,disabled:l,children:[jsx("span",{"data-ow-part":"icon",className:"inline-flex items-center justify-center",children:s??v?.icon??jsx(mr,{})}),jsx("span",{"data-ow-part":"label",className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:v?.label??e}),jsx(ae,{className:"w-3 h-3 text-current"})]})})})}var sC={skill:jsx(gr,{}),command:jsx(So,{}),"agent-command":jsx(So,{}),mcp:jsx(gn,{}),connector:jsx(gn,{}),agent:jsx(Da,{}),file:jsx(oo,{}),folder:jsx(qe,{})};function lC(e){return sC[e.toLowerCase()]??jsx(ki,{})}function lz({mentions:e,onRemove:t}){return e.length===0?null:jsx("div",{"data-slot":"composer-mentions",className:"flex flex-wrap gap-2 py-2",children:e.map((o,r)=>jsx(ro,{"data-ow-part":"mention-chip","data-kind":o.kind,icon:lC(o.kind),tone:"mention",className:"font-[family-name:var(--ow-font-mono)] font-normal",title:`${o.kind} \xB7 ${o.name}`,label:jsxs("span",{"data-ow-part":"mention",className:"inline-flex items-center gap-1 min-w-0",children:[jsx("span",{"data-ow-part":"at",children:"@"}),jsx("span",{"data-ow-part":"kind",className:"font-medium",children:o.kind}),jsx("span",{"data-ow-part":"value",className:"overflow-hidden text-ellipsis",children:o.name})]}),removeLabel:`\u79FB\u9664 ${o.name}`,onRemove:t?()=>t(o,r):void 0},`${o.kind}-${o.id}`))})}var ip=["bg-[var(--ow-mention-bg)] border-[color:var(--ow-info-tint-border)] text-[color:var(--ow-mention-text)]","hover:bg-[var(--ow-info-tint-hover)] focus-within:bg-[var(--ow-info-tint-hover)]","[&_[data-ow-part=icon]]:text-[color:var(--ow-mention-text)]","[&_[data-ow-part=remove]]:text-[color:var(--ow-mention-text)]"].join(" ");var pv=createContext(null);function Fl({value:e,children:t}){return jsx(pv.Provider,{value:e,children:t})}function fz(e){return cn(e)}function gz(e,t){let o=(e??"").trim(),r=(t??o).trim();return {label:r.charAt(0).toUpperCase()||"?",id:o||r}}function uC(e){return e==="agent"?{background:"var(--ow-avatar-agent-bg)",color:"var(--ow-avatar-agent-text)"}:e==="neutral"?{background:"var(--ow-surface-2)",color:"var(--ow-text-2)"}:{background:`var(--ow-${e})`,color:"var(--ow-on-fill)"}}function uv({src:e,glyph:t,className:o,failed:r,onImageError:n}){let a=useContext(pv);if(e&&!r)return jsx("img",{className:o,src:e,alt:"",decoding:"async",style:{objectFit:"fill"},onError:n});let i=a??t.tone??cn(t.id||t.label||"");return jsx("span",{className:o,style:uC(i),children:t.label})}function mv({groups:e,activeId:t,emptyMessage:o,overlay:r=false,className:n="",listRef:a,onSelect:i,onGroupAction:d,renderLeading:s}){let l=c=>{let p=s?.(c);return p!==void 0?p:c.icon?jsx("span",{"data-ow-part":"icon",className:"flex-[0_0_auto] w-5 h-5 inline-flex items-center justify-center text-ow-text-2",children:c.icon}):c.avatar||c.glyph?jsx(uv,{src:c.avatar,glyph:c.glyph??{label:c.label.charAt(0),tone:"neutral"},className:"flex-[0_0_auto] w-5 h-5 inline-flex items-center justify-center overflow-hidden [border-radius:var(--ow-radius-2xs)] text-ow-fs-caption font-semibold","data-ow-part":"avatar"}):jsx("span",{"data-ow-part":"avatar",className:"flex-[0_0_auto] w-5 h-5 [border-radius:var(--ow-radius-2xs)] bg-ow-surface-2 inline-flex items-center justify-center text-ow-text-2 font-semibold text-ow-fs-caption leading-none font-[family-name:var(--ow-font-sans)] uppercase",children:c.label.charAt(0)})};return jsxs("div",{"data-slot":"composer-menu","data-ow-state":r?"overlay":void 0,className:g(n),role:"menu",ref:a,children:[e.map(c=>jsxs("section",{"data-ow-part":"group",children:[jsxs("div",{"data-ow-part":"group-header",className:"flex items-center justify-between py-1.5 px-3 text-ow-text-3 font-medium text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)] leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:[jsx("span",{children:c.label}),c.actions&&c.actions.length>0&&jsx("span",{"data-ow-part":"group-actions",className:"flex items-center gap-2",children:c.actions.map(p=>jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"group-action",className:"text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]",onMouseDown:m=>{m.preventDefault(),d?.(c.id,p.id);},children:p.label},p.id))})]}),c.items.length===0&&c.emptyLabel&&jsx("div",{"data-ow-part":"empty",children:jsx(F,{message:c.emptyLabel,variant:"text"})}),c.items.map(p=>{let m=p.id===t;return jsxs(f,{type:"button",role:"menuitem","data-ow-part":"item","data-ow-state":m?"active":void 0,variant:"unstyled",className:g("w-full appearance-none border-0 bg-transparent flex items-center gap-2.5 py-2 px-3 text-left font-[family-name:var(--ow-font-sans)] transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] ow-focus-ring","min-h-10 hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]",m&&"bg-[var(--ow-press-pop)] hover:bg-[var(--ow-press-pop)]",p.disabled&&"cursor-not-allowed text-[color:var(--ow-disabled-text)]"),"data-active":m,disabled:p.disabled,title:p.disabledReason,onMouseDown:u=>{u.preventDefault(),p.disabled||i?.(p);},children:[l(p),jsxs("span",{"data-ow-part":"meta",className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"name",className:"text-ow-text font-medium text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)] overflow-hidden text-ellipsis whitespace-nowrap",children:p.label}),p.disabledReason?jsx("span",{"data-ow-part":"disabled-reason",className:"text-ow-error font-normal text-ow-fs-eyebrow leading-[1.4] font-[family-name:var(--ow-font-sans)] overflow-hidden text-ellipsis whitespace-nowrap",children:p.disabledReason}):p.description&&jsx("span",{"data-ow-part":"description",className:"text-ow-text-3 font-normal text-ow-fs-eyebrow leading-[1.4] font-[family-name:var(--ow-font-sans)] overflow-hidden text-ellipsis whitespace-nowrap",children:p.description})]}),p.hint&&jsx("span",{"data-ow-part":"hint",className:"flex-[0_0_auto] text-ow-text-3 font-normal text-ow-fs-eyebrow leading-[1.4] font-[family-name:var(--ow-font-sans)] ml-auto",children:p.hint}),p.selected&&jsx("span",{"data-ow-part":"check",className:"flex-[0_0_auto] w-4 h-4 inline-flex items-center justify-center text-[color:var(--ow-text)]","aria-label":"\u5DF2\u9009\u4E2D",children:jsx(be,{})})]},p.id)})]},c.id)),e.every(c=>c.items.length===0)&&o&&jsx("div",{"data-ow-part":"empty",children:jsx(F,{message:o,variant:"text"})})]})}function Rz({open:e=true,groups:t,activeId:o,anchorRect:r,emptyMessage:n,onSelect:a,onClose:i,onGroupAction:d,renderLeading:s}){let[l,c]=useState(null),p=useRef(null);useLayoutEffect(()=>{if(!e||!r||typeof window>"u"){c(null);return}let u=Math.round(Math.min(r.width,640)),v=Math.max(8,Math.min(r.left,window.innerWidth-u-8));c({position:"fixed",top:r.top-8,left:v,width:u,bottom:"auto",right:"auto",transform:"translateY(-100%)",zIndex:"var(--ow-z-popover)"});},[r,e]),useLayoutEffect(()=>{p.current?.querySelector('[data-active="true"]')?.scrollIntoView({block:"nearest"});},[o]);let m=t.some(u=>u.items.length>0);return !e||!m&&!n||typeof document>"u"?null:createPortal(jsxs(Fragment,{children:[jsx("div",{className:"ow-composer-menu-backdrop",onMouseDown:i}),l&&jsx("div",{className:"ow-composer-menu-popover",style:l,onMouseDown:u=>u.preventDefault(),children:jsx(mv,{className:"ow-composer-menu--portal",groups:t,activeId:o,emptyMessage:n,listRef:p,onSelect:a,onGroupAction:d,renderLeading:s})})]}),document.body)}var wv=8;function Dz({children:e,className:t="",onClose:o,align:r="start",width:n=230,viewportPadding:a=8,style:i}){let d=useRef(null),s=useRef(null),[l,c]=useState(null),[p,m]=useState(null),u=useCallback(()=>{let b=d.current,h=s.current;if(!b||!h||typeof window>"u")return;let x=b.parentElement?.getBoundingClientRect()??b.getBoundingClientRect(),k=h.getBoundingClientRect(),y=r==="end"?x.right-k.width:x.left,P=kC(h,k),N=P&&y+P.leftOffset<a?"left":null,S=yC(h,k,P?.element);P&&(N==="left"?S.rightOffset=Math.max(S.rightOffset,P.rightOffset):S.leftOffset=Math.min(S.leftOffset,P.leftOffset)),m(D=>D===N?D:N);let R=a-S.leftOffset,M=window.innerWidth-a-S.rightOffset,T=R<=M?hv(y,R,M):hv(y,a,Math.max(a,window.innerWidth-a-k.width)),_={top:x.top-8,left:T};c(D=>D?.top===_.top&&D.left===_.left?D:_);},[r,a]);useLayoutEffect(()=>{u();},[e,u,i,n]),useEffect(()=>{let b=s.current;if(!b)return;let h=typeof ResizeObserver>"u"?null:new ResizeObserver(u);h?.observe(b);let x=typeof MutationObserver>"u"?null:new MutationObserver(k=>{k.some(y=>y.target!==b)&&u();});return x?.observe(b,{attributes:true,childList:true,characterData:true,subtree:true}),window.addEventListener("resize",u),window.addEventListener("scroll",u,true),()=>{h?.disconnect(),x?.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("scroll",u,true);}},[u]),useEffect(()=>{let b=h=>{let x=h.target;x&&s.current?.contains(x)||x&&d.current?.parentElement?.contains(x)||o();};return document.addEventListener("pointerdown",b,true),()=>document.removeEventListener("pointerdown",b,true)},[o]);let v=["cpop",...t.split(/\s+/).filter(b=>b&&b!=="cpop"&&b!=="cpop--portal"),"cpop--portal"].join(" "),w=jsx("div",{ref:s,className:v,"data-horizontal-overflow":p??void 0,style:{...i,position:"fixed",top:l?.top??-9999,left:l?.left??-9999,right:"auto",bottom:"auto",width:n==="content"?"max-content":n,maxWidth:i?.maxWidth??"calc(100vw - 16px)",transform:"translateY(-100%)",visibility:l?"visible":"hidden",zIndex:"var(--ow-z-popover)"},onMouseDown:b=>b.stopPropagation(),children:e});return jsxs(Fragment,{children:[jsx("span",{ref:d}),typeof document<"u"&&createPortal(jsxs(Fragment,{children:[jsx("div",{className:"cpop-backdrop",onClick:o}),w]}),document.body)]})}function yC(e,t,o){let r=t.left,n=t.right;for(let a of e.querySelectorAll("*")){if(o?.contains(a))continue;let i=a.getBoundingClientRect();i.width<=0||i.height<=0||(r=Math.min(r,i.left),n=Math.max(n,i.right));}return {leftOffset:r-t.left,rightOffset:n-t.left}}function kC(e,t){let o=e.querySelector(".cpop-sub"),r=o?.parentElement;if(!o||!r)return null;let n=Number.parseFloat(getComputedStyle(o).width);if(!Number.isFinite(n)||n<=0)return null;let a=r.getBoundingClientRect();return {element:o,leftOffset:a.left-t.left-wv-n,rightOffset:a.right-t.left+wv+n}}function hv(e,t,o){return Math.max(t,Math.min(o,e))}var kv="__composer-project-create__";function zz({value:e,options:t,onChange:o,onCreate:r,onOpen:n,selectTitle:a="\u9009\u62E9\u5F53\u524D\u4EFB\u52A1\u6240\u5C5E\u9879\u76EE",menuLabel:i="\u65B0\u4EFB\u52A1\u4FDD\u5B58\u5230",createLabel:d="\u65B0\u589E\u9879\u76EE",createDescription:s="\u8F93\u5165\u540D\u79F0\u540E\u7ACB\u5373\u521B\u5EFA"}){let[l,c]=useState(false),[p,m]=useState(false),[u,v]=useState(""),[w,b]=useState(false),[h,x]=useState(null),{isImeEnter:k,onCompositionEnd:y,onCompositionStart:P}=Dt(),N=t.find(I=>I.id===e)??t[0],S=u.trim()!==""&&!w;if(!N)return null;let R=()=>{c(false),m(false),v(""),x(null);},M=()=>{if(l&&w)return;let I=!l;I?c(true):R(),I&&n?.();},T=async I=>{await o(I),R();},_=async()=>{let I=u.trim();if(!(!I||w||!r)){b(true),x(null);try{await r(I),R();}catch(H){x(H instanceof Error?H.message:"\u521B\u5EFA\u9879\u76EE\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");}finally{b(false);}}},D=[...t.map(I=>({key:I.id,label:I.label,searchText:I.name,description:typeof I.description=="string"?I.description:void 0,icon:jsx(qe,{}),selected:I.id===N.id,disabled:w})),...r&&!p?[{key:kv,label:d,description:s,icon:jsx(He,{}),disabled:w}]:[]];return jsxs("div",{"data-slot":"composer-project",className:"relative inline-flex",children:[jsxs(f,{variant:"ghost",size:"sm","data-ow-part":"button","data-ow-state":l?"open":void 0,className:"max-w-full data-[ow-state=open]:bg-[var(--ow-btn-ghost-press)]",type:"button",onClick:M,title:a,"aria-haspopup":"menu","aria-expanded":l,icon:jsx(qe,{}),children:[jsx("span",{"data-ow-part":"name",className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:N.label}),jsx(ae,{"data-ow-part":"chevron",className:g("transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",l&&"rotate-180")})]}),l&&jsxs(Fragment,{children:[jsx(f,{variant:"unstyled","data-ow-part":"backdrop",className:"fixed inset-0 z-[calc(var(--ow-z-popover)-1)] bg-transparent cursor-default focus-visible:outline-none","aria-label":"\u5173\u95ED\u9879\u76EE\u9009\u62E9",onClick:()=>{w||R();}}),jsx("div",{"data-ow-part":"menu",className:"absolute bottom-[calc(100%+8px)] left-0 z-[var(--ow-z-popover)]",children:jsx(pt,{width:288,header:i,ariaLabel:"\u9009\u62E9\u65B0\u4EFB\u52A1\u9879\u76EE",autoAdjust:true,items:D,onSelect:I=>{if(I===kv){m(true);return}let H=t.find($=>$.id===I);H&&T(H);},footer:p?jsxs("div",{"data-ow-part":"create",className:"flex flex-col gap-2 p-1",role:"none",children:[jsxs("div",{"data-ow-part":"create-row",className:"flex items-center gap-2",children:[jsx(te,{autoFocus:true,"data-ow-part":"create-input",value:u,placeholder:"\u8F93\u5165\u9879\u76EE\u540D\u79F0","aria-label":"\u9879\u76EE\u540D\u79F0","aria-invalid":!!h,"aria-describedby":h?"composer-project-create-error":"composer-project-create-hint",disabled:w,onChange:v,onCompositionStart:P,onCompositionEnd:y,onKeyDown:I=>{k(I)||(I.key==="Enter"&&(I.preventDefault(),_()),I.key==="Escape"&&(I.stopPropagation(),m(false),v(""),x(null)));}}),jsx(f,{variant:"primary",size:"sm",type:"button","data-ow-part":"create-submit",loading:w,disabled:!S,onClick:()=>{_();},children:"\u521B\u5EFA"})]}),h?jsx("div",{id:"composer-project-create-error","data-ow-part":"create-error",className:"text-[color:var(--ow-error)] font-normal text-ow-fs-eyebrow leading-[1.4]",role:"alert",children:h}):jsx("div",{id:"composer-project-create-hint","data-ow-part":"create-hint",className:"text-[color:var(--ow-text-3)] font-normal text-ow-fs-eyebrow leading-[1.4]",children:"\u6309 Enter \u521B\u5EFA\uFF0CEsc \u53D6\u6D88"})]}):void 0})})]})]})}function jz({label:e="\u6392\u961F\u4E2D",count:t,icon:o=jsx(No,{}),notices:r=[],items:n=[],className:a="",...i}){let d=t??n.length;return d===0&&r.length===0&&n.length===0?null:jsxs("div",{"data-slot":"composer-queue",className:g("flex w-full min-w-0 box-border self-stretch flex-col gap-1.5 mb-2 p-2.5 border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-card)] bg-[var(--ow-surface-2)]",a),"aria-live":"polite",...i,children:[d>0&&jsxs("div",{"data-ow-part":"header",className:"inline-flex items-center gap-1.5 text-ow-text-3 font-medium text-ow-fs-mark-md leading-none [&_svg]:w-3.5 [&_svg]:h-3.5",children:[jsx("span",{className:"inline-flex flex-[0_0_auto] items-center justify-center",children:o}),jsxs("span",{children:[e," \xB7"," ",jsx("span",{"data-ow-part":"count",className:"font-[family-name:var(--ow-font-mono)] tabular-nums",children:d})]})]}),r.map((s,l)=>jsxs("div",{"data-ow-part":"notice","data-ow-state":s.tone,className:"flex w-full min-w-0 box-border items-center min-h-7 gap-2 px-2.5 py-1.5 border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-control)] bg-transparent text-[color:var(--ow-text-2)] font-normal text-ow-fs-body-sm leading-[1.25]",children:[jsx("span",{className:"min-w-0 flex-[1_1_auto] overflow-hidden text-ellipsis whitespace-nowrap",children:s.text}),s.action&&jsx("span",{className:"inline-flex min-w-0 flex-[0_0_auto] items-center gap-2 ml-auto",children:s.action})]},s.id??l)),n.length>0&&jsx("div",{"data-ow-part":"list",className:"flex w-full min-w-0 box-border max-h-32 flex-col gap-1.5 overflow-y-auto pr-px",children:n.map(s=>jsxs("div",{"data-ow-part":"item","data-ow-state":g(s.kind,s.status,s.dragging&&"dragging",s.dragOver&&"drag-over")||void 0,className:"flex w-full min-w-0 box-border items-center min-h-8 gap-2 py-1.5 px-2 pl-2.5 border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-control)] bg-transparent text-[color:var(--ow-text-2)] font-normal text-ow-fs-body-sm leading-[1.3] transition-[background-color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",onDragEnter:s.onDragEnter,onDragOver:s.onDragOver,onDragLeave:s.onDragLeave,onDrop:s.onDrop,children:[jsx("span",{"data-ow-part":"icon","data-ow-state":s.draggable?"draggable":void 0,className:"inline-flex flex-[0_0_auto] items-center justify-center w-4 h-4 text-ow-text-3 [&_svg]:w-3.5 [&_svg]:h-3.5",draggable:s.draggable,onDragStart:s.onDragStart,onDragEnd:s.onDragEnd,title:s.dragTitle,"aria-label":s.ariaLabel,children:s.icon??o}),jsx("span",{className:"min-w-0 flex-[1_1_auto] overflow-hidden text-ellipsis whitespace-nowrap",children:s.text}),(s.statusLabel||s.actions)&&jsxs("span",{className:"inline-flex min-w-0 flex-[0_0_auto] items-center gap-2 ml-auto",children:[s.statusLabel&&jsx("span",{"data-ow-part":"status",className:"flex-[0_0_auto] text-ow-text-3 whitespace-nowrap",children:s.statusLabel}),s.actions]})]},s.id))})]})}function Jz({active:e=false,listening:t=false,busy:o=false,analyserRef:r,levels:n,disabled:a=false,className:i="",onToggle:d}){let s=t?"\u505C\u6B62\u8BED\u97F3\u8F93\u5165":o?"\u8BED\u97F3\u8F93\u5165\u5904\u7406\u4E2D":"\u8BED\u97F3\u8F93\u5165";return jsxs("div",{"data-slot":"composer-voice","data-ow-state":e?"active":void 0,className:g("inline-flex items-center gap-1.5 flex-[0_0_auto] min-w-0 data-[ow-state=active]:flex-[1_1_180px]",i),children:[e&&jsx(cv,{analyserRef:r,levels:n}),jsx(f,{type:"button","data-ow-part":"toggle","data-ow-state":e?"recording":void 0,variant:"ghost",size:"sm","aria-label":s,"aria-pressed":e,title:s,loading:o,disabled:a,onClick:d,className:g("flex-[0_0_auto] text-[color:var(--ow-text-2)]","hover:text-[color:var(--ow-text)]",e&&"bg-[var(--ow-control-on)] text-[color:var(--ow-control-on-glyph)] hover:bg-[var(--ow-control-on)] hover:text-[color:var(--ow-control-on-glyph)]"),icon:t?jsx(Ia,{}):jsx(hd,{})})]})}var Nv=forwardRef(function({generating:t=false,value:o,defaultValue:r="",onChange:n,disabled:a=false,queue:i,status:d,attachments:s,mentions:l,context:c,input:p,overlay:m,toolbarStart:u,toolbarEnd:v,voice:w,project:b,footerStart:h,footerEnd:x,authorization:k,contextUsage:y,filled:P,submitState:N,submitDisabled:S,submitTitle:R,onSubmit:M,onSend:T,onStop:_,onAdd:D,onSkillsClick:I,mode:H,modes:$=[{value:"auto",label:"\u81EA\u52A8"},{value:"fast",label:"\u5FEB\u901F"},{value:"deep",label:"\u6DF1\u5EA6\u601D\u8003"}],onModeChange:E,maxHeight:V=241,placeholder:pe="\u5E2E\u6211\u641C\u4E0B\u6709\u6CA1\u6709\u672A\u5B8C\u6210\u7684\u5F85\u529E",className:W="",...ce},Pe){let[Fe,ee]=useState(r),[q,A]=useState(H??$[0]?.value??""),L=useRef(null),{isImeEnter:Y,onCompositionStart:Ee,onCompositionEnd:Ge}=Dt(),et=o??Fe,ht=P??et.trim().length>0,to=H??q,Ze=N??(t?"stop":"send"),U=l!==void 0||c!==void 0,ke=h!==void 0||x!==void 0;useEffect(()=>{let de=L.current;!de||!(de instanceof HTMLTextAreaElement)||(de.style.height="auto",de.style.height=`${Math.min(de.scrollHeight,V)}px`,de.style.overflowY=de.scrollHeight>V?"auto":"hidden");},[et,V]);let j=useCallback(de=>{o===void 0&&ee(de),n?.(de);},[o,n]),Ie=useCallback(()=>{if(!(a||S)){if(p!==void 0){M?.();return}ht&&T&&(T(et.trim()),o===void 0&&ee(""),n?.(""));}},[a,ht,p,n,T,M,S,et,o]),we=useCallback(()=>{Ze==="stop"?_?.():Ze!=="busy"&&Ie();},[Ie,_,Ze]),le=useCallback(de=>{if(!Y(de)&&de.key==="Enter"){if(de.ctrlKey){de.preventDefault();let Wo=de.currentTarget,cr=Wo.selectionStart,Ws=Wo.selectionEnd,mi=`${et.slice(0,cr)}
|
|
31
|
-
${et.slice(Ws)}`;o===void 0&&ee(mi),n?.(mi),requestAnimationFrame(()=>L.current?.setSelectionRange(cr+1,cr+1));return}de.shiftKey||(de.preventDefault(),Ie());}},[Ie,Y,n,et,o]),X=a||S||Ze==="busy"||Ze==="send"&&!ht,Ce=g(ht&&"filled",a&&"disabled");return jsxs("div",{ref:Pe,"data-slot":"composer","data-ow-state":Ce||void 0,className:g("flex flex-col gap-2",W),...ce,children:[jsxs("div",{"data-ow-part":"surface","data-ow-state":a?"disabled":void 0,className:g("relative min-h-20 px-2.5 pt-3 pb-2 flex flex-col gap-2.5","[border-radius:var(--ow-radius-card)]","border border-[color:var(--ow-composer-border,var(--ow-input-border))]","bg-[var(--ow-composer-bg,var(--ow-input-bg))]",a?"border-[color:var(--ow-disabled-border)] bg-[var(--ow-input-disabled-bg)]":["[&:hover:not(:focus-within)]:border-[color:var(--ow-input-border-hover)]","focus-within:border-[color:var(--ow-input-border-focus)]"].join(" ")),children:[i&&jsx("div",{"data-ow-part":"queue",className:"flex w-full min-w-0 box-border self-stretch flex-col gap-1.5",children:i}),d&&jsx("div",{"data-ow-part":"status",className:"flex w-full min-w-0 box-border self-stretch flex-col gap-1.5",children:d}),s&&jsx("div",{"data-ow-part":"attachments",className:"flex gap-2 overflow-x-auto overflow-y-hidden",children:s}),U&&jsxs("div",{"data-ow-part":"context",className:"flex min-w-0 items-center flex-wrap gap-1.5",children:[l,c]}),jsx("div",{"data-ow-part":"input",className:"min-w-0",children:p??jsx(te,{ref:L,multiline:true,standalone:false,"data-ow-part":"textarea",className:"w-full min-h-6 max-h-60 p-0 resize-none overflow-hidden bg-transparent text-[color:var(--ow-text)] font-normal text-ow-fs-ui leading-normal border-0 shadow-none focus-visible:ring-0",rows:1,placeholder:pe,value:et,disabled:a,onChange:j,onCompositionStart:Ee,onCompositionEnd:Ge,onKeyDown:le})}),m&&jsx("div",{"data-ow-part":"overlay",className:"relative z-30",children:m}),jsxs("div",{"data-ow-part":"bar",className:"flex items-center gap-1.5 min-h-7",children:[Ze!=="send"&&jsxs("span",{"data-ow-part":"state","data-ow-state":Ze==="stop"?"running":"busy",className:"inline-flex flex-[0_0_auto] items-center gap-1.5 pr-1 text-[color:var(--ow-text-3)] font-normal text-ow-fs-ui leading-none","aria-live":"polite",children:[jsx("span",{"data-ow-part":"state-dot","aria-hidden":"true",className:g("w-1.5 h-1.5 rounded-full flex-[0_0_auto]",Ze==="stop"?"bg-[var(--ow-progress-fill)]":"border border-[color:var(--ow-border-strong)]")}),Ze==="stop"?"\u751F\u6210\u4E2D":"\u5904\u7406\u4E2D"]}),jsxs("div",{"data-ow-part":"bar-start",className:"flex min-w-0 items-center gap-1.5 flex-[0_1_auto]",children:[u??jsxs(Fragment,{children:[jsx(f,{type:"button","data-ow-part":"tool",variant:"ghost",size:"sm","aria-label":"\u6DFB\u52A0\u9644\u4EF6",disabled:a,onClick:D,icon:jsx(He,{})}),jsx(f,{type:"button","data-ow-part":"tool",variant:"ghost",size:"sm",disabled:a,onClick:I,icon:jsx(Rd,{}),children:"\u6280\u80FD"})]}),k,b]}),jsx("span",{className:"flex-1"}),jsxs("div",{"data-ow-part":"bar-end",className:"flex min-w-0 items-center gap-1.5 flex-[0_1_auto]",children:[y,v??jsx(co,{width:128,ariaLabel:"\u56DE\u7B54\u6A21\u5F0F",items:$.map(de=>({key:de.value,label:de.label,selected:de.value===to})),onSelect:de=>{H===void 0&&A(de),E?.(de);},trigger:jsx(f,{type:"button","data-ow-part":"mode",variant:"ghost",size:"sm",disabled:a,icon:jsx(ae,{}),className:"flex-row-reverse",children:$.find(de=>de.value===to)?.label??to})}),w]}),jsx(f,{type:"button","data-ow-part":"submit","data-ow-state":g(Ze==="stop"&&"stop",Ze==="busy"&&"busy")||void 0,variant:Ze==="send"?"primary":"secondary",size:"md",loading:Ze==="busy",icon:Ze==="stop"?jsx("span",{className:"w-2.5 h-2.5 [border-radius:var(--ow-radius-2xs)] bg-[var(--ow-text)]"}):jsx(un,{}),"aria-label":Ze==="stop"?"\u505C\u6B62":Ze==="busy"?"\u5904\u7406\u4E2D":"\u53D1\u9001",title:R,onClick:we,disabled:X})]})]}),ke&&jsxs("div",{"data-ow-part":"footer",className:"relative flex min-w-0 min-h-6 items-center justify-between gap-4 mx-1.5 mt-px p-0 overflow-visible text-[color:var(--ow-text-3)] font-normal text-[length:var(--ow-fs-mark-md)] leading-[1.4]",children:[jsx("div",{"data-ow-part":"footer-start",className:"flex min-w-0 items-center gap-2 overflow-visible flex-[1_1_auto]",children:h}),jsx("div",{"data-ow-part":"footer-end",className:"flex min-w-0 items-center gap-2 overflow-visible flex-[0_0_auto] ml-auto",children:x})]})]})});var Mv=createContext(false);function mp(){return useContext(Mv)}function fp({input:e,output:t,artifacts:o,trailing:r,className:n=""}){return jsxs("div",{className:`ow-execution-detail ${n}`,"data-slot":"execution-detail",style:FC,children:[e!=null&&jsxs("section",{"data-ow-part":"section",children:[jsx("div",{"data-ow-part":"eyebrow",style:cp,children:"\u8F93\u5165"}),jsx("div",{"data-ow-part":"well",children:e})]}),t!=null&&jsxs("section",{"data-ow-part":"section",children:[jsx("div",{"data-ow-part":"eyebrow",style:cp,children:"\u8F93\u51FA"}),jsx("div",{"data-ow-part":"well",children:t})]}),o!=null&&jsxs("section",{"data-ow-part":"section",children:[jsx("div",{"data-ow-part":"eyebrow",style:cp,children:"\u4EA7\u7269"}),jsx("div",{"data-ow-part":"artifacts",children:o})]}),r!=null&&jsx("div",{"data-ow-part":"trailing",style:$C,children:r})]})}function gp({tool:e,className:t=""}){let o=mp(),[r,n]=useState(!!e.defaultDetailOpen),a=e.detailOpen??r,i=useId(),d=e.input!=null||e.output!=null||e.artifacts!=null,s=()=>{let p=!a;e.detailOpen===void 0&&n(p),e.onDetailOpenChange?.(p);},l=e.statusText??(e.state==="error"?"\u5931\u8D25":void 0),c=jsxs(Fragment,{children:[jsx("span",{style:WC,children:e.name}),jsx("span",{style:UC,children:e.args}),e.elapsed&&jsx("span",{style:pp,children:e.elapsed}),l&&jsx("span",{style:e.state==="error"?{...pp,color:"var(--ow-error)"}:pp,children:l}),d&&jsx("span",{"aria-hidden":"true","data-ow-part":"chevron",style:OC,children:a?jsx(ae,{}):jsx(he,{})})]});return jsxs("div",{className:`ow-execution-summary__row ${t}`,"data-slot":"execution-summary-row","data-ow-state":[e.state??"done",a?"expanded":null].filter(Boolean).join(" "),style:o?HC:Lv,children:[d?jsx("button",{type:"button",className:"ow-focus-ring","data-ow-part":"row-trigger",style:{...Pv,...VC},onClick:s,"aria-expanded":a,"aria-controls":a?i:void 0,children:c}):jsx("div",{style:Pv,children:c}),e.out&&jsx("div",{style:KC,children:e.out}),d&&a&&jsx("div",{id:i,children:jsx(fp,{input:e.input,output:e.output,artifacts:e.artifacts})})]})}function Hl({label:e,statusText:t,tone:o="neutral",metaTitle:r,steps:n,duration:a,meta:i,tools:d,children:s,defaultOpen:l=false,open:c,onOpenChange:p,className:m=""}){let[u,v]=useState(l),w=c!==void 0,b=w?c:u,h=useId(),x=d??[],k=x.length===0&&s!=null,y=x.length>0||k,P=x.filter(_=>_.state==="error").length,N=i??DC(n,a),S=P>0?LC(x.length,P):void 0,R=[N,S,t].filter(Boolean).join(" \xB7 ")||void 0,M=()=>{if(!y)return;let _=!b;w||v(_),p?.(_);},T=jsxs(Fragment,{children:[jsx(Hr,{}),jsx("span",{style:IC,children:e}),R&&jsxs("span",{style:AC,title:r,children:[N,N&&S?" \xB7 ":null,S&&jsx("span",{style:{color:"var(--ow-error)"},children:S}),t&&jsxs(Fragment,{children:[N||S?" \xB7 ":null,jsx("span",{style:o==="error"?{color:"var(--ow-error)"}:void 0,children:t})]})]}),y&&jsx("span",{"aria-hidden":"true","data-ow-part":"chevron",style:BC,children:b?jsx(ae,{}):jsx(he,{})})]});return jsxs("div",{className:`ow-execution-summary ${m}`,"data-slot":"execution-summary",style:EC,children:[y?jsx("button",{type:"button",className:"ow-focus-ring hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",style:Sv,onClick:M,"aria-expanded":b,"aria-controls":b?h:void 0,children:T}):jsx("div",{style:{...Sv,cursor:"default"},children:T}),y&&b&&jsxs("div",{id:h,"data-ow-part":"body",style:k?zC:_v,children:[k&&jsx(Mv.Provider,{value:true,children:s}),x.map((_,D)=>jsx(gp,{tool:_},`${_.name}-${D}`))]})]})}function LC(e,t){return `${e} \u9879\u4E2D ${t} \u9879\u5931\u8D25`}function DC(e,t){let o=[];return typeof e=="number"&&o.push(`${e} \u6B65`),t&&o.push(t),o.length?o.join(" \xB7 "):void 0}var EC={display:"flex",flexDirection:"column",maxWidth:"100%",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-lg)",background:"var(--ow-surface)",overflow:"hidden",fontFamily:"var(--ow-font-body)"},Sv={display:"flex",alignItems:"center",gap:10,width:"100%",padding:"10px 12px",border:0,background:"transparent",color:"var(--ow-text)",font:"inherit",textAlign:"left",cursor:"pointer"},IC={flex:"1 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--ow-fs-ui)",fontWeight:500},AC={flex:"0 0 auto",fontFamily:"var(--ow-font-mono)",fontSize:"var(--ow-fs-mark-md)",fontVariantNumeric:"tabular-nums",color:"var(--ow-text-2)"},BC={flex:"0 0 auto",width:14,height:14,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--ow-text-3)"},OC={flex:"0 0 auto",alignSelf:"center",width:12,height:12,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--ow-text-3)"},VC={width:"100%",padding:0,border:0,background:"transparent",color:"inherit",font:"inherit",textAlign:"left",cursor:"pointer",borderRadius:"var(--ow-radius-2xs)"},FC={display:"flex",flexDirection:"column",gap:8,marginTop:6,position:"relative"},cp={margin:"0 0 4px",font:"500 var(--ow-fs-eyebrow-cjk, 12px)/1 var(--ow-font-sans)",letterSpacing:"var(--ow-ls-eyebrow-cjk, 0.08em)",color:"var(--ow-eyebrow)"},$C={display:"flex",justifyContent:"flex-end"},_v={display:"flex",flexDirection:"column",borderTop:"1px solid var(--ow-border)",background:"var(--ow-surface)"},zC={..._v,gap:6,padding:"9px 12px"},Lv={display:"flex",flexDirection:"column",gap:3,padding:"9px 12px 9px 30px"},HC={...Lv,padding:"9px 0"},Pv={display:"flex",alignItems:"baseline",gap:8},Wl={fontFamily:"var(--ow-font-mono)",fontSize:"var(--ow-fs-mark-md)"},WC={...Wl,flex:"0 0 auto",fontWeight:500,color:"var(--ow-text)"},UC={...Wl,flex:"1 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--ow-text-3)"},pp={...Wl,flex:"0 0 auto",fontVariantNumeric:"tabular-nums",color:"var(--ow-text-3)"},KC={...Wl,lineHeight:1.6,color:"var(--ow-text-2)",whiteSpace:"pre-wrap",wordBreak:"break-word"};function PH({type:e="info",title:t,children:o,icon:r,closable:n=false,onClose:a,action:i,className:d=""}){return jsx(J,{variant:e,title:t,icon:r,closable:n,onClose:a,action:i,className:d,children:o})}var Dv=["box-border w-full border border-[color:var(--ow-border)] bg-[var(--ow-surface)]","[border-radius:var(--ow-radius-card)]"].join(" "),Ev=["text-left cursor-pointer","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","ow-focus-ring","disabled:cursor-not-allowed disabled:bg-[var(--ow-disabled-bg)] disabled:text-[color:var(--ow-disabled-text)]","disabled:border-[color:var(--ow-disabled-border)]"].join(" "),vp="font-[family-name:var(--ow-font-mono)] tabular-nums";function GC({href:e,children:t,external:o=true,onClick:r,className:n,title:a}){return jsxs("a",{"data-slot":"rich-link","data-ow-part":"link",href:e,title:a,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,onClick:r,className:g("ow-link inline-flex w-fit items-center gap-1.5 py-0.5","text-[length:var(--ow-fs-ui)] font-medium",n),children:[jsx("span",{className:"min-w-0 truncate",children:t??e}),o&&jsx(lo,{"aria-hidden":"true",style:{width:14,height:14,flexShrink:0}})]})}function ZC(e){if(e.variant==="resource"){let{items:i,className:d,"aria-label":s}=e;return jsx("ul",{"data-slot":"rich-list","data-ow-variant":"resource","aria-label":s,className:g("m-0 flex list-none flex-col gap-2.5 p-0",d),children:i.map((l,c)=>jsx("li",{className:"min-w-0",children:jsx(qC,{item:l})},c))})}let{items:t,ordered:o=false,className:r,"aria-label":n}=e;return jsx(o?"ol":"ul",{"data-slot":"rich-list","data-ow-variant":"text","aria-label":n,className:g("my-1.5 pl-5",o?"list-decimal":"list-disc","text-[length:var(--ow-fs-ui)] leading-[1.65] text-[color:var(--ow-text)]",r),children:t.map((i,d)=>jsx("li",{className:"my-[3px]",children:i},d))})}function qC({item:e}){let t=typeof e.title=="string"?e.title:void 0,o=jsxs(Fragment,{children:[jsx("span",{"data-ow-part":"glyph","aria-hidden":"true",className:"inline-flex shrink-0 items-center justify-center text-[color:var(--ow-text-3)]",children:jsx(qo,{name:e.name??t??"",kind:e.kind,width:20,height:20})}),jsxs("span",{className:"min-w-0 flex-1",children:[jsx("span",{"data-ow-part":"title",className:"block truncate text-[length:var(--ow-fs-ui)] font-medium leading-[1.3] text-[color:var(--ow-text)]",children:e.title}),e.meta!=null&&jsx("span",{"data-ow-part":"meta",className:g("mt-[3px] block truncate text-[length:var(--ow-fs-body-sm)] leading-[1.2]","text-[color:var(--ow-text-3)]",vp),children:e.meta})]}),e.href&&jsx(lo,{"aria-hidden":"true",className:"text-[color:var(--ow-text-3)]",style:{width:16,height:16,flexShrink:0}})]}),r=g("flex w-full items-center gap-3 p-3.5 no-underline","border border-[color:var(--ow-border)] bg-[var(--ow-surface)] [border-radius:var(--ow-radius-action)]",Ev);return e.href?jsx("a",{"data-slot":"rich-list-row",href:e.href,target:"_blank",rel:"noreferrer",onClick:e.onClick,className:r,children:o}):e.onClick?jsx("button",{"data-slot":"rich-list-row",type:"button",onClick:e.onClick,className:r,children:o}):jsx("span",{"data-slot":"rich-list-row",className:g(r,"cursor-default hover:bg-[var(--ow-surface)]"),children:o})}function bp({variant:e="note",title:t,meta:o,href:r,linkLabel:n="\u6253\u5F00",children:a,defaultOpen:i=false,progress:d,glyph:s="TSK",footnote:l,readout:c,onClick:p,disabled:m=false,className:u}){if(e==="detail")return jsxs("details",{"data-slot":"rich-card","data-ow-variant":"detail",open:i,className:g("group my-2 [&>summary]:list-none [&>summary::-webkit-details-marker]:hidden",u),children:[jsxs("summary",{"data-ow-part":"summary",className:g("inline-flex cursor-pointer items-center gap-[7px] [border-radius:var(--ow-radius-menu)] px-1 py-[5px]","text-[length:var(--ow-fs-ui)] leading-none text-[color:var(--ow-text-3)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] hover:text-[color:var(--ow-text-2)]","ow-focus-ring"),children:[jsx("span",{children:t}),jsx(ae,{"aria-hidden":"true",className:"transition-transform duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)] group-open:rotate-180",style:{width:14,height:14}})]}),jsx("div",{"data-ow-part":"body",className:g("mt-2 flex flex-col gap-1 pl-1","text-[length:var(--ow-fs-ui)] leading-[1.55] text-[color:var(--ow-text-2)]"),children:a})]});if(e==="task"){let v=d==null?void 0:Math.min(100,Math.max(0,d)),w=jsxs(Fragment,{children:[jsxs("span",{className:"flex items-center gap-2.5",children:[jsx("span",{"data-ow-part":"glyph","aria-hidden":"true",className:g("inline-flex h-7 w-7 shrink-0 items-center justify-center [border-radius:var(--ow-radius-tag)]","bg-[var(--ow-surface-2)] text-[color:var(--ow-text-2)]","text-[length:var(--ow-fs-ui)] font-semibold leading-none font-[family-name:var(--ow-font-sans)]"),children:s}),jsx("span",{"data-ow-part":"title",className:"min-w-0 flex-1 truncate text-[length:var(--ow-fs-ui)] font-semibold leading-[1.2] text-[color:var(--ow-text)]",children:t}),p&&jsx(he,{"aria-hidden":"true",className:"text-[color:var(--ow-text-3)]",style:{width:15,height:15,flexShrink:0}})]}),v!=null&&jsx(na,{className:"mt-3 mb-2",size:"sm",value:v,"aria-label":typeof t=="string"?`${t} \u8FDB\u5EA6`:"\u4EFB\u52A1\u8FDB\u5EA6"}),(l!=null||c!=null||o!=null)&&jsxs("span",{"data-ow-part":"footer",className:"flex items-center justify-between gap-2 text-[length:var(--ow-fs-ui)] leading-none text-[color:var(--ow-text-3)]",children:[jsx("span",{className:g("min-w-0 truncate",l!=null&&vp),children:l??o}),c!=null&&jsx("span",{"data-ow-part":"readout",className:g("shrink-0 text-[color:var(--ow-text-2)]",vp),children:c})]})]}),b=g(Dv,"my-2 block max-w-[460px] p-3.5",u);return p?jsx("button",{"data-slot":"rich-card","data-ow-variant":"task",type:"button",disabled:m,onClick:p,className:g(b,Ev),children:w}):jsx("div",{"data-slot":"rich-card","data-ow-variant":"task",className:b,children:w})}return jsxs("div",{"data-slot":"rich-card","data-ow-variant":"note",className:g(Dv,"my-2 max-w-[460px] p-3.5",u),children:[jsx("div",{"data-ow-part":"title",className:"text-[length:var(--ow-fs-ui)] font-semibold leading-[1.35] text-[color:var(--ow-text)]",children:t}),o!=null&&jsx("div",{"data-ow-part":"meta",className:"mt-1 text-[length:var(--ow-fs-body-sm)] leading-[1.45] text-[color:var(--ow-text-3)]",children:o}),a,r&&jsx(GC,{href:r,className:"mt-2",children:n})]})}function EH(e){return jsx(bp,{...e,variant:"detail"})}function IH(e){return jsx(bp,{...e,variant:"note"})}function AH(e){return jsx(bp,{...e,variant:"task"})}function BH({items:e,className:t,...o}){return jsx(ZC,{variant:"resource",items:e,className:t,...o})}function FH({processes:e,className:t=""}){return jsx("div",{"data-slot":"sub-agent-thread",className:t,style:XC,children:e.map((o,r)=>jsxs("div",{"data-ow-part":"row","data-status":o.status,style:r===0?Av:{...Av,borderTop:"1px solid var(--ow-border)"},children:[jsx("span",{"data-ow-part":"name",style:QC,children:o.name}),jsx("span",{"data-ow-part":"dot","aria-hidden":"true",style:JC[o.status]}),jsx("span",{"data-ow-part":"status",style:eN,children:YC[o.status]}),jsx("span",{"data-ow-part":"duration",style:tN,children:o.duration??"\u2014"})]},r))})}var YC={running:"\u8FD0\u884C\u4E2D",queued:"\u6392\u961F",done:"\u5DF2\u5B8C\u6210"},XC={background:"var(--ow-surface)",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-lg)",padding:"2px 14px",fontFamily:"var(--ow-font-body)"},Av={display:"flex",alignItems:"center",gap:8,height:31},QC={fontSize:12.5,color:"var(--ow-text)",flex:1},wp={width:7,height:7,borderRadius:"50%",flex:"none"},JC={running:{...wp,border:"1.5px solid var(--ow-beacon-idle)"},queued:{...wp,background:"var(--ow-pending)"},done:{...wp,background:"var(--ow-text-3)"}},eN={fontSize:10.5,color:"var(--ow-text-2)"},tN={fontFamily:"var(--ow-font-mono)",fontSize:10.5,color:"var(--ow-text-2)",width:46,textAlign:"right",fontVariantNumeric:"tabular-nums"};var rN={done:"var(--ow-success)",pending:"var(--ow-pending)",running:"var(--ow-beacon)",error:"var(--ow-error)"},Bv={done:"\u5B8C\u6210",pending:"\u7B49\u5F85\u6388\u6743",running:"\u8FD0\u884C\u4E2D",error:"\u5931\u8D25"};function hp({name:e,args:t,state:o="running",elapsed:r,statusText:n,className:a=""}){let i=n??(o==="done"?r??Bv.done:Bv[o]),d=o==="error"?"var(--ow-error)":Ov.color;return jsxs("div",{className:`ow-tool-call-row ${a}`,"data-slot":"tool-call-row","data-ow-state":o,style:aN,children:[jsx("span",{"aria-hidden":"true",style:{...nN,background:rN[o]}}),jsx("span",{style:iN,children:e}),jsx("span",{style:sN,children:t}),i&&jsx("span",{style:{...Ov,color:d},children:i})]})}var aN={display:"flex",alignItems:"baseline",gap:8,maxWidth:"100%",padding:"7px 12px",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-sm)",background:"var(--ow-surface)",fontFamily:"var(--ow-font-body)"},nN={flex:"0 0 auto",alignSelf:"center",width:6,height:6,borderRadius:"var(--ow-radius-pill)"},xp={fontFamily:"var(--ow-font-mono)",fontSize:"var(--ow-fs-mark-md)"},iN={...xp,flex:"0 0 auto",fontWeight:500,color:"var(--ow-text)"},sN={...xp,flex:"1 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--ow-text-3)"},Ov={...xp,flex:"0 0 auto",fontVariantNumeric:"tabular-nums",color:"var(--ow-text-2)"};function jH({turns:e,className:t=""}){let[o,r]=useState({});return jsxs("div",{"data-slot":"transcript-spine",className:t,style:cN,children:[jsx("span",{"data-ow-part":"line","aria-hidden":"true",style:pN}),e.map((n,a)=>{if(n.role==="user")return jsxs("div",{"data-ow-part":"turn","data-role":"user",style:Vv,children:[jsx("span",{"data-ow-part":"dot","aria-hidden":"true",style:uN}),jsx("div",{"data-ow-part":"user-text",style:fN,children:n.summary})]},a);let i=o[a]??!(n.collapsed??true),d=n.tools??[],s=n.steps!=null?n.steps-d.length:0,l=n.steps!=null&&n.duration?`${n.steps} \u6B65 \xB7 ${n.duration}`:n.steps!=null?`${n.steps} \u6B65`:n.duration??"";return jsxs("div",{"data-ow-part":"turn","data-role":"agent",style:Vv,children:[jsx("span",{"data-ow-part":"dot","aria-hidden":"true",style:mN}),jsxs(f,{type:"button",variant:"unstyled","data-ow-part":"loop",className:"ow-focus-ring","aria-expanded":i,onClick:()=>r(c=>({...c,[a]:!i})),style:gN,children:[jsx("span",{"data-ow-part":"loop-verb",style:vN,children:n.summary}),l&&jsx("span",{"data-ow-part":"loop-meta",style:bN,children:l}),jsx("span",{"data-ow-part":"chevron","aria-hidden":"true",style:wN,children:i?"\u25BE":"\u25B8"})]}),i&&d.length>0&&jsxs("div",{"data-ow-part":"tools",style:hN,children:[d.map((c,p)=>jsxs("div",{"data-ow-part":"tool",style:xN,children:[jsx("span",{"data-ow-part":"tool-name",style:yN,children:c.name}),c.target&&jsx("span",{"data-ow-part":"tool-target",style:kN,children:c.target}),c.duration&&jsx("span",{"data-ow-part":"tool-duration",style:CN,children:c.duration})]},p)),s>0&&jsxs("div",{"data-ow-part":"tool-more",style:NN,children:["\u2026 \u5176\u4F59 ",s," \u6B65\u5DF2\u6298\u53E0"]})]})]},a)})]})}var cN={position:"relative",display:"flex",flexDirection:"column",gap:14,fontFamily:"var(--ow-font-body)"},pN={position:"absolute",left:5,top:8,bottom:9,width:1.5,background:"var(--ow-timeline)"},Vv={position:"relative",paddingLeft:26},Fv={position:"absolute",left:0,top:5,width:11,height:11,borderRadius:"50%"},uN={...Fv,border:"1.5px solid var(--ow-text-3)",background:"var(--ow-turn-ground, var(--ow-surface))"},mN={...Fv,background:"var(--ow-text)"},fN={fontSize:13,lineHeight:1.6,color:"var(--ow-text)"},gN={display:"flex",alignItems:"baseline",gap:8,padding:0,border:"none",background:"transparent",fontFamily:"inherit",fontSize:13,lineHeight:1.55,textAlign:"left",cursor:"pointer"},vN={fontWeight:500,color:"var(--ow-text)"},bN={fontFamily:"var(--ow-font-mono)",fontSize:11,color:"var(--ow-text-2)",fontVariantNumeric:"tabular-nums"},wN={color:"var(--ow-text-3)",fontSize:10},hN={marginTop:8,display:"flex",flexDirection:"column",gap:5},xN={display:"flex",alignItems:"baseline",gap:8,fontFamily:"var(--ow-font-mono)",fontSize:10.5,color:"var(--ow-text-2)",fontVariantNumeric:"tabular-nums"},yN={fontWeight:500},kN={color:"var(--ow-text-3)"},CN={marginLeft:"auto",color:"var(--ow-text-3)"},NN={fontFamily:"var(--ow-font-mono)",fontSize:10,color:"var(--ow-text-3)",fontVariantNumeric:"tabular-nums"};var RN=280,TN=.8;function yp(e){let t=Math.round(Math.max(0,Math.min(100,e.percent??0)));return e.state==="downloading"?{long:`\u4E0B\u8F7D\u4E2D ${t}%`,title:`\u6B63\u5728\u4E0B\u8F7D Orbitwork ${e.version}\uFF1A${t}%`}:e.state==="ready"?{long:"\u91CD\u542F\u5B89\u88C5",title:`\u5B89\u88C5 Orbitwork ${e.version} \u5E76\u91CD\u542F`}:e.state==="error"?{long:"\u4E0B\u8F7D\u5931\u8D25\uFF0C\u91CD\u8BD5",title:`\u91CD\u65B0\u4E0B\u8F7D Orbitwork ${e.version}`}:{long:"\u6709\u65B0\u7248\u672C",title:`\u4E0B\u8F7D Orbitwork ${e.version}`}}function Kl(e){return Math.max(0,Math.round(e)).toLocaleString("en-US")}function $v({user:e,plan:t,credits:o,version:r,update:n,theme:a,onThemeChange:i,petVisible:d,onPetVisibleChange:s,onOpenSettings:l,onOpenMemory:c,onCopyUserId:p,onCheckUpdate:m,onFeedback:u,onLogout:v,onClose:w,autoFocus:b=true,className:h}){let[x,k]=useState(false);useEffect(()=>{if(!x)return;let T=window.setTimeout(()=>k(false),2e3);return ()=>window.clearTimeout(T)},[x]);let y=e.id??e.email??e.name,P=e.email??e.id,N=o&&o.limit>0?Math.min(1,Math.max(0,o.used/o.limit)):0,S=!!o&&N>=TN,R=n?yp(n):null,M=[{key:"settings",label:"\u8BBE\u7F6E",icon:jsx(yd,{})},{key:"memory",label:"\u8BB0\u5FC6",icon:jsx(xi,{})},...s?[{key:"pet",label:"\u684C\u9762\u5BA0\u7269",icon:jsx(Ea,{}),control:jsx(po,{checked:!!d,onChange:T=>s(T),"aria-label":"\u663E\u793A\u684C\u9762\u5BA0\u7269"})}]:[],...i?[{key:"theme",label:"\u5916\u89C2",icon:a==="dark"?jsx(_d,{}):jsx(Md,{}),control:jsx(Ht,{size:"sm",variant:"outline",options:A,value:a??"system",onChange:T=>i(T),"aria-label":"\u5916\u89C2"})}]:[],Va,{key:"feedback",label:"\u5E2E\u52A9\u4E0E\u53CD\u9988",icon:jsx(Ed,{})},{key:"update",label:"\u68C0\u67E5\u66F4\u65B0",icon:jsx(Co,{}),hint:R?jsxs("span",{className:"inline-flex items-center gap-1.5",children:[jsx("span",{"aria-hidden":"true",className:"w-1.5 h-1.5 [border-radius:var(--ow-radius-pill)] bg-[var(--ow-accent)]"}),R.long]}):jsx(vn,{content:r??"",side:"top",align:"end",disabled:!r,children:jsx("span",{className:"block max-w-[9rem] truncate",children:r})}),hintMono:!R,disabled:n?.state==="downloading"},Va,{key:"logout",label:"\u9000\u51FA\u767B\u5F55",icon:jsx(Dd,{}),danger:true}];return jsx(pt,{className:h,width:RN,autoFocus:b,ariaLabel:"\u8D26\u6237\u83DC\u5355",headerBare:true,onClose:w,header:jsxs("div",{className:"flex items-center gap-2.5 px-2 pt-1.5 pb-2.5",children:[jsx(pn,{size:32,id:y,children:e.avatarUrl?jsx("img",{src:e.avatarUrl,alt:"",className:"w-full h-full object-cover",onError:T=>T.currentTarget.remove()}):e.name.slice(-1)}),jsxs("span",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{className:"truncate font-semibold text-ow-fs-body leading-tight text-[color:var(--ow-text)]",children:e.name}),P&&jsx("span",{className:"truncate text-ow-fs-caption leading-tight text-[color:var(--ow-text-3)]",children:P})]}),e.id&&p&&jsx(f,{variant:"unstyled",className:"shrink-0 w-7 h-7 inline-flex items-center justify-center [border-radius:var(--ow-radius-xs)] text-[color:var(--ow-text-3)] hover:bg-[var(--ow-hover-pop)] hover:text-[color:var(--ow-text)] ow-focus-ring",title:x?"\u5DF2\u590D\u5236":"\u590D\u5236 ID","aria-label":x?"\u5DF2\u590D\u5236 ID":"\u590D\u5236 ID",onClick:()=>{p(e.id),k(true);},children:x?jsx(be,{className:"w-4 h-4"}):jsx(Tt,{className:"w-4 h-4"})})]}),banner:t||o?jsxs("div",{className:"mx-2 mb-1.5 px-3 py-2.5 bg-[var(--ow-surface-2)] border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-md)] flex flex-col gap-2",children:[t&&jsxs("div",{className:"flex items-center gap-2",children:[jsx(Si,{className:"w-4 h-4 shrink-0 text-[color:var(--ow-text-3)]","aria-hidden":"true"}),jsx("span",{className:"flex-1 min-w-0 truncate font-medium text-ow-fs-ui leading-none text-[color:var(--ow-text)]",children:t.name}),t.action&&jsx(f,{size:"sm",variant:"secondary",onClick:t.action.onClick,children:t.action.label})]}),o&&jsxs(Fragment,{children:[jsxs("div",{className:"flex items-baseline gap-2",children:[jsx("span",{className:"flex-1 min-w-0 truncate text-ow-fs-caption leading-none text-[color:var(--ow-text-2)]",children:o.label??"\u79EF\u5206\u4F59\u989D"}),jsxs("span",{className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-fs-caption leading-none text-[color:var(--ow-text)]",children:[Kl(o.used)," / ",Kl(o.limit)]})]}),jsx(na,{size:"md",tone:S?"warning":"default",value:N*100,"aria-label":`${o.label??"\u79EF\u5206\u4F59\u989D"} ${Kl(o.used)} / ${Kl(o.limit)}`})]})]}):void 0,items:M,onSelect:T=>{if(T==="pet")return s?.(!d);T!=="theme"&&(w?.(),T==="settings"&&l(),T==="memory"&&(c??l)(),T==="feedback"&&u(),T==="update"&&m?.(),T==="logout"&&v());}})}var _N=[{value:"sm",label:"\u5C0F"},{value:"md",label:"\u6807\u51C6"},{value:"lg",label:"\u5927"}];function LW({theme:e,fontScale:t,onFontScaleChange:o,unsupportedToggles:r=[],workRoot:n,onPickWorkRoot:a,onThemeChange:i}){return jsx("div",{className:"appearance-settings",children:jsxs("div",{className:"flex flex-col gap-0",children:[jsx(dt,{title:"\u4E3B\u9898",description:"\u9009\u62E9\u6D45\u8272\u3001\u6DF1\u8272\uFF0C\u6216\u8DDF\u968F\u7CFB\u7EDF\u81EA\u52A8\u5207\u6362",className:"set-row",action:jsx(Ht,{size:"sm",options:A,value:e,onChange:d=>i(d),"aria-label":"\u4E3B\u9898"})}),o&&jsx(dt,{title:"\u5B57\u4F53\u7F29\u653E",description:"\u8C03\u6574\u754C\u9762\u6587\u5B57\u548C\u5143\u7D20\u7684\u663E\u793A\u5927\u5C0F",className:"set-row",action:jsx(Ht,{size:"sm",options:_N,value:t??"md",onChange:d=>o(d),"aria-label":"\u5B57\u4F53\u7F29\u653E"})}),r.map(d=>jsx(dt,{title:d.title,description:d.description,className:"set-row",disabled:true,action:jsx(po,{checked:false,disabled:true,"aria-label":d.title})},d.id)),a&&jsx(dt,{title:"\u9ED8\u8BA4\u5DE5\u4F5C\u76EE\u5F55",description:jsx("span",{className:"block truncate [font-family:var(--ow-font-mono)]",children:n??"\u5C1A\u672A\u8BBE\u7F6E"}),className:"set-row",action:jsx(f,{variant:"secondary",size:"sm",onClick:a,children:"\u66F4\u6539"})})]})})}var EN={dingtalk:{name:"\u9489\u9489",id:"Client ID",secret:"Client Secret",scanVerb:"\u81EA\u52A8\u521B\u5EFA\u5E94\u7528\u5E76\u56DE\u586B\u51ED\u636E"},feishu:{name:"\u98DE\u4E66",id:"Client ID",secret:"Client Secret",scanVerb:"\u7ED1\u5B9A\u5E94\u7528\u5E76\u56DE\u586B\u51ED\u636E"},wecom:{name:"\u4F01\u4E1A\u5FAE\u4FE1",id:"Bot ID",secret:"Secret",scanVerb:"\u83B7\u53D6\u673A\u5668\u4EBA\u51ED\u636E"}};function WW({platform:e,value:t,projects:o,devices:r,models:n,editing:a=false,saving:i=false,error:d,qrCode:s,onRefreshQr:l,onCreateProject:c,onChange:p,onCancel:m,onSave:u}){let[v,w]=useState(false),b=EN[e],h=y=>p({...t,...y}),x=t.showReasoning||t.showToolProgress||!t.groupRequireMention,k=i||!t.projectId||!t.deviceId||!t.modelId||t.inputMethod==="manual"&&(!t.clientId.trim()||!a&&!t.clientSecret.trim());return jsxs("div",{className:"assistant-config-page",children:[jsxs("div",{className:"assistant-config-page__content",children:[jsxs("div",{className:"assistant-config-fields",children:[jsx(uo,{items:[{key:"scan",label:a?"\u626B\u7801\u66F4\u6362":e==="wecom"?"\u626B\u7801\u83B7\u53D6":"\u626B\u7801\u521B\u5EFA"},{key:"manual",label:"\u624B\u52A8\u586B\u5199"}],activeKey:t.inputMethod,onChange:y=>h({inputMethod:y})}),t.inputMethod==="scan"?jsxs("div",{className:"assistant-scan-create",children:[jsx("span",{className:"assistant-scan-create__hint",children:a?`\u7528${b.name}\u626B\u7801\u53EF\u66F4\u6362\u5F53\u524D\u7ED1\u5B9A\uFF1B\u4E0D\u626B\u7801\u5219\u4FDD\u6301\u73B0\u6709\u914D\u7F6E\u3002`:`\u7528${b.name}\u626B\u7801${b.scanVerb}\u3002`}),jsx("div",{className:"assistant-bind-card",children:s??jsxs("div",{className:"assistant-bind-card__qr assistant-bind-card__qr--placeholder",children:[b.name,jsx("br",{}),"\u626B\u7801\u4E8C\u7EF4\u7801"]})}),l&&jsx(f,{variant:"text",onClick:l,children:"\u5237\u65B0\u4E8C\u7EF4\u7801"})]}):jsxs(Fragment,{children:[jsxs("label",{className:"assistant-field",children:[jsx("span",{className:"assistant-field__required",children:b.id}),jsx(te,{value:t.clientId,onChange:y=>h({clientId:y}),placeholder:`\u8BF7\u8F93\u5165 ${b.id}`})]}),jsxs("label",{className:"assistant-field",children:[jsx("span",{className:a?void 0:"assistant-field__required",children:b.secret}),jsx(te,{type:"password",value:t.clientSecret,onChange:y=>h({clientSecret:y}),placeholder:a?"\u7559\u7A7A\u5219\u4FDD\u6301\u73B0\u6709\u5BC6\u94A5":`\u8BF7\u8F93\u5165 ${b.secret}`})]})]}),jsxs("div",{className:"assistant-field assistant-field--select",children:[jsx("span",{children:"\u9ED8\u8BA4\u9879\u76EE"}),jsx(Cl,{value:t.projectId,options:o,onChange:y=>h({projectId:y}),onCreate:c,placeholder:"\u9009\u62E9\u9879\u76EE"})]}),jsxs("div",{className:"assistant-field assistant-field--select",children:[jsx("span",{children:"\u76EE\u6807\u8BBE\u5907"}),jsx(br,{value:t.deviceId,options:r,onChange:y=>h({deviceId:y}),placeholder:"\u9009\u62E9\u8BBE\u5907",disabled:r.length===0})]}),jsxs("div",{className:"assistant-field assistant-field--model",children:[jsx("span",{className:"assistant-field__required",children:"\u6A21\u578B"}),jsx(An,{value:t.modelId,options:n,onChange:y=>h({modelId:y}),placeholder:"\u9009\u62E9\u6A21\u578B",emptyLabel:"\u6682\u65E0\u53EF\u7528\u6A21\u578B"})]})]}),jsxs("details",{className:"assistant-advanced",open:v,onToggle:y=>w(y.currentTarget.open),children:[jsxs("summary",{children:[jsx("b",{children:"\u9AD8\u7EA7\u9009\u9879"}),x&&jsx("span",{className:"assistant-advanced__active",children:"\u5DF2\u81EA\u5B9A\u4E49"}),jsx(ae,{})]}),jsxs("div",{className:"assistant-advanced__body",children:[jsx(dt,{title:"\u7FA4\u804A\u4EC5\u5728 @\u673A\u5668\u4EBA\u65F6\u56DE\u590D",description:"\u907F\u514D\u673A\u5668\u4EBA\u54CD\u5E94\u7FA4\u5185\u7684\u666E\u901A\u6D88\u606F\u3002",control:"switch",checked:t.groupRequireMention,onCheckedChange:y=>h({groupRequireMention:y}),divider:false,className:"px-0"}),jsx(dt,{title:"\u5C55\u793A\u601D\u8003\u8FC7\u7A0B",description:"\u5C06\u6A21\u578B\u7684\u63A8\u7406\u5185\u5BB9\u9644\u52A0\u5728\u6700\u7EC8\u56DE\u590D\u524D\u3002",control:"switch",checked:t.showReasoning,onCheckedChange:y=>h({showReasoning:y}),divider:false,className:"px-0"}),jsx(dt,{title:"\u5C55\u793A\u5DE5\u5177\u6267\u884C\u8FDB\u5EA6",description:"\u56DE\u590D\u751F\u6210\u8FC7\u7A0B\u4E2D\u5C55\u793A\u5DE5\u5177\u8C03\u7528\u53CA\u5176\u7ED3\u679C\u3002",control:"switch",checked:t.showToolProgress,onCheckedChange:y=>h({showToolProgress:y}),divider:false,className:"px-0"})]})]})]}),jsxs("div",{className:"assistant-config-page__actions",children:[jsx("span",{className:`assistant-config-page__footer-hint${d?" is-error":""}`,children:d??(i?"\u6B63\u5728\u4FDD\u5B58\u2026":`\u914D\u7F6E\u5C06\u5E94\u7528\u5230${b.name}\u6E20\u9053`)}),jsx(f,{variant:"secondary",onClick:m,disabled:i,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",onClick:u,disabled:k,children:a?"\u4FDD\u5B58":"\u521B\u5EFA\u5E76\u542F\u7528"})]})]})}function ON(e){if(!isValidElement(e))return e;let t=e.props.className??"";return t.split(/\s+/).includes("gly")?e:cloneElement(e,{className:t?`${t} gly`:"gly"})}function VN({version:e,metaItems:t,meta:o}){let r=[];e&&r.push({key:"__version",node:jsxs(Fragment,{children:["v",e]})});for(let n of t??[])r.push({key:n.key,node:jsxs(Fragment,{children:[n.count!=null&&jsxs(Fragment,{children:[n.count," "]}),n.label]})});return o&&!(t&&t.length>0)&&r.push({key:"__meta",node:o}),r.length===0?null:jsx(Fragment,{children:r.map((n,a)=>jsxs(Fragment$1,{children:[a>0&&jsx("span",{"aria-hidden":"true",children:" \xB7 "}),n.node]},n.key))})}function Zl({avatar:e,glyphTone:t="neutral",name:o,version:r,updateAvailable:n,status:a,description:i,metaItems:d,meta:s,error:l,badge:c,actionLabel:p="\u4F7F\u7528",actionState:m="default",actionVariant:u="secondary",actionDisabled:v,onAction:w,onOpen:b}){return jsxs("div",{className:"skcard",role:b?"button":void 0,tabIndex:b?0:void 0,onClick:b,onKeyDown:h=>{h.target===h.currentTarget&&b&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),b());},children:[jsxs("div",{className:"skcard__top",children:[jsx(Fl,{value:t,children:ON(e)}),jsxs("div",{className:"body",children:[jsxs("div",{className:"n",children:[jsx("span",{className:"nt",children:o}),c,n&&jsx(Nt,{status:"update"}),a&&jsx(Nt,{status:a})]}),jsx("div",{className:"d",children:i}),l&&jsx("div",{className:"skcard__error",children:l})]})]}),jsxs("div",{className:"skcard__foot",children:[jsx("div",{className:"ft",children:jsx(VN,{version:r,metaItems:d,meta:s})}),jsx(f,{variant:u,size:"sm",disabled:v,className:u==="unstyled"?`inst${m==="installed"?" installed":m==="update"?" update":""}`:void 0,onClick:h=>{h.stopPropagation(),w?.();},children:p})]})]})}function rU({categories:e,onCategoryToggle:t,search:o,sort:r,onReset:n,actions:a,className:i}){return jsx(ff,{flush:true,className:i??"plaza__toolbar",filters:e,onFilterToggle:t,search:o,sort:r,onReset:n,actions:a})}function zv({loading:e=false,loadingCount:t=6,error:o,errorDetail:r,onRetry:n,retryLabel:a="\u91CD\u8BD5",emptyMessage:i="\u8FD9\u91CC\u8FD8\u6CA1\u6709\u53EF\u7528\u6761\u76EE\u3002",emptyActionLabel:d,onEmptyAction:s,empty:l,children:c,className:p}){let m=Array.isArray(c)?c.flat().some(Boolean):!!c;return jsx("div",{className:p??"plaza__grid","data-ow-state":e?"loading":o?"error":void 0,children:e?jsx(Lm,{count:t}):o?jsx("div",{className:"plaza__state",children:jsx(J,{variant:"error",detail:r,action:n&&jsx(f,{variant:"secondary",size:"sm",onClick:n,children:a}),children:o})}):l??!m?jsx("div",{className:"plaza__state",children:jsx(F,{message:i,actionLabel:d,onAction:s})}):c})}function FN(e){let t=e.filter(o=>o!=null&&o!==false&&o!=="");return t.length===0?null:t.map((o,r)=>jsxs(Fragment$1,{children:[r>0?" \xB7 ":null,o]},r))}function Rs({avatar:e,name:t,status:o,summary:r,meta:n,author:a="Orbitwork \u5B98\u65B9",version:i,updatedAt:d,kind:s,badges:l,actions:c,backLabel:p,onBack:m,children:u}){let v=n??FN([s,i?`v${i}`:null,a,d]);return jsxs("div",{className:"page skdetail",children:[jsxs("div",{className:"skd__head",children:[jsx(go,{className:"fs-back",onClick:m,children:p}),jsxs("div",{className:"skd__hero",children:[e,jsxs("div",{className:"meta",children:[jsxs("div",{className:"n",children:[jsx("h1",{className:"skd__title",children:t}),o,l]}),r&&jsx("div",{className:"skd__desc",children:r}),v&&jsx("div",{className:"skd__meta-line",children:v})]}),c]})]}),jsx("div",{className:"skd__scroll",children:jsx("div",{className:"skd__body",children:u})})]})}function Xa({title:e,count:t,note:o,className:r,children:n}){return jsxs("section",{className:r?`skd__section ${r}`:"skd__section",children:[jsxs("div",{className:"lbl",children:[e,t!==void 0&&jsx("span",{className:"cnt",children:t}),o&&jsx("span",{className:"skd__lbl-note",children:o})]}),n]})}function aU({children:e}){return jsx("p",{className:"skd__text",children:e})}function nU({items:e}){return jsx("div",{className:"skd__list",children:e.map(t=>jsx("div",{className:"skd__list-item",children:jsx("span",{className:"skd__list-text",children:t.text})},t.id))})}function $N({items:e}){return jsx("div",{className:"skd__chips",children:e.map(t=>jsx("span",{className:t.mono?"skd__chip skd__chip--mono":"skd__chip",children:t.text},t.id))})}function zN({rows:e,nameMono:t}){return jsx("div",{className:"skd__rows",children:e.map(o=>jsxs("div",{className:"skd__row",children:[jsx("span",{className:t?"skd__row-name skd__row-name--mono":"skd__row-name",children:o.name}),o.role&&jsx(Nt,{tone:"mute",children:o.role}),o.description&&jsx("span",{className:"skd__row-desc",children:o.description})]},o.id))})}function iU({avatar:e,name:t,version:o,updateAvailable:r,team:n,mine:a,status:i,description:d,metaItems:s,meta:l,error:c,actionLabel:p="\u4F7F\u7528",actionState:m="default",actionVariant:u="unstyled",actionDisabled:v,onAction:w,onOpen:b}){return jsx(Zl,{avatar:e,glyphTone:"agent",name:t,version:o,updateAvailable:r,status:i,description:d,metaItems:s,meta:l,error:c,badge:n?jsx(Nt,{status:"team"}):a?jsx(Nt,{status:"mine"}):void 0,actionLabel:p,actionState:m,actionVariant:u,actionDisabled:v,onAction:w,onOpen:b})}function HN({items:e,links:t=[],onOpenLink:o}){return e.length===0&&t.length===0?null:jsxs("section",{className:"skd__section",children:[jsx("div",{className:"lbl",children:"\u57FA\u672C\u4FE1\u606F"}),jsxs("div",{className:"connector-kv",children:[e.map(r=>jsxs(Fragment$1,{children:[jsx("span",{children:r.label}),jsx("b",{children:r.value})]},r.id)),t.map(r=>jsxs(Fragment$1,{children:[jsx("span",{children:r.kind==="repository"?"\u6E90\u7801":"\u4E3B\u9875"}),jsx("b",{children:jsx(f,{variant:"unstyled",className:"connector-cred-summary__action",icon:r.kind==="repository"?jsx(So,{}):jsx(Mt,{}),disabled:!o,onClick:()=>o?.(r),children:r.label})})]},r.id))]})]})}function WN({agents:e}){return e.length===0?null:jsxs("section",{className:"skd__section agent-roster",children:[jsxs("div",{className:"lbl",children:["\u56E2\u961F\u6210\u5458 ",jsx("span",{className:"cnt",children:e.length})]}),jsx("div",{className:"agent-roster__grid",children:e.map(t=>jsxs("div",{className:`agent-roster__item${t.role==="leader"?" is-leader":""}`,children:[jsx("span",{className:"agent-roster__avatar",children:t.avatar??String(t.name).slice(0,1)}),jsxs("div",{className:"agent-roster__body",children:[jsxs("div",{className:"agent-roster__name",children:[t.name,jsx("span",{className:`agent-roster__role is-${t.role}`,children:t.role==="leader"?"\u8D1F\u8D23\u4EBA":"\u6210\u5458"})]}),t.description&&jsx("div",{className:"agent-roster__description",children:t.description})]})]},t.id))})]})}function kp({installed:e,outdated:t,installing:o}){if(o)return "installing";if(e)return t?"update":"installed"}function Cp({actions:e,leading:t,menuItems:o=[],disabled:r,onMenuSelect:n}){let[a,...i]=e,s=[...i.map(c=>({key:c.key,label:typeof c.label=="string"?c.label:c.key,icon:c.icon??jsx(Ko,{}),danger:c.variant==="danger",disabled:c.disabled})),...o],l=c=>{let p=i.find(m=>m.key===c);if(p){p.onAction?.();return}n?.(c);};return jsxs("div",{className:"acts",children:[t,a&&jsx(f,{variant:a.variant??"primary",icon:a.icon,disabled:r||a.disabled,onClick:a.onAction,children:a.label}),s.length>0&&jsx(cl,{disabled:r,items:s,onSelect:l})]})}function Np({installed:e,outdated:t,installing:o,disabled:r,primaryLabel:n,primaryIcon:a,primaryVisible:i=true,primaryDisabled:d,menuItems:s=[],onInstall:l,onUpdate:c,onPrimaryAction:p,onMenuSelect:m}){let u=o||r,v=[...!e&&l?[{key:"install",label:o?"\u5B89\u88C5\u4E2D\u2026":"\u5B89\u88C5",onAction:l}]:[],...e&&t&&c?[{key:"update",label:o?"\u66F4\u65B0\u4E2D\u2026":"\u66F4\u65B0",onAction:c}]:[],...e&&i?[{key:"primary",label:n,icon:a,variant:"primary",disabled:d,onAction:p}]:[]];return jsx(Cp,{actions:v,menuItems:e?s:[],disabled:u,onMenuSelect:m})}function sU({avatar:e,name:t,author:o="Orbitwork Labs",version:r,description:n,team:a,agents:i=[],skills:d=[],connectors:s=[],commands:l=[],starters:c=[],installed:p,outdated:m,installing:u,error:v,backLabel:w="\u8FD4\u56DE\u63D2\u4EF6 \xB7 \u4E13\u5BB6",connectorManagement:b,actionLabel:h="\u4F7F\u7528",actionIcon:x=jsx(Da,{}),actionDisabled:k,overflowItems:y=[],overviewItems:P=[],overviewLinks:N=[],onBack:S,onInstall:R,onUpdate:M,onUse:T,onOverflowSelect:_,onOpenOverviewLink:D,onUninstall:I}){let H=kp({installed:p,outdated:m,installing:u}),$=(E,V)=>E.length===0?jsx("div",{className:"skd__empty",children:"\u672A\u914D\u7F6E"}):E.some(W=>W.description)?jsx(zN,{nameMono:V,rows:E.map(W=>({id:W.id,name:W.name,description:W.description}))}):jsx($N,{items:E.map(W=>({id:W.id,text:W.name,mono:V}))});return jsxs(Rs,{avatar:e,name:t,author:o,version:r,status:H&&jsx(Nt,{status:H}),kind:a?"\u56E2\u961F":"\u4E13\u5BB6",summary:n,backLabel:w,onBack:S,actions:jsx(Np,{installed:!!p,outdated:m,installing:u,primaryLabel:h,primaryIcon:x,primaryDisabled:k,onInstall:R,onUpdate:M,onPrimaryAction:()=>T?.(),menuItems:[...y,...I?[{key:"uninstall",label:"\u5378\u8F7D",icon:jsx(Le,{}),danger:true}]:[]],onMenuSelect:E=>{_?.(E),E==="uninstall"&&I?.();}}),children:[v&&jsx("div",{className:"mcp-card__err",children:jsx("span",{children:v})}),jsx(HN,{items:P,links:N,onOpenLink:D}),a&&jsx(WN,{agents:i}),jsx(Xa,{title:"\u6280\u80FD",count:d.length,children:$(d)}),jsx(Xa,{title:"\u8FDE\u63A5\u5668",count:s.length,children:b??$(s)}),jsx(Xa,{title:"\u547D\u4EE4",count:l.length,children:$(l,true)}),c.length>0&&jsx(Xa,{title:"\u5EFA\u8BAE\u5F00\u573A",children:jsx("div",{className:"skd__meta-grid",children:c.map((E,V)=>jsx("div",{className:"skd__meta-item",children:jsx("span",{className:"n",children:E})},V))})})]})}function lU({logo:e,name:t,version:o,description:r,updateAvailable:n,status:a,mine:i,badge:d,metaItems:s,actionLabel:l="\u4F7F\u7528",actionState:c="default",actionVariant:p="secondary",actionDisabled:m,onAction:u,onOpen:v}){return jsx(Zl,{avatar:jsx("span",{className:"connector-logo",children:e}),name:t,version:o,description:r,updateAvailable:n,status:a,badge:d??(i?jsx(Nt,{status:"mine"}):void 0),metaItems:s,actionLabel:l,actionState:c,actionVariant:p,actionDisabled:m,onAction:u??v,onOpen:v})}function uU({sourceTitle:e,label:t="\u6B64\u4EFB\u52A1\u6E90\u81EA",onSourceClick:o}){return jsx(Ag,{className:"my-[var(--ow-space-5,20px)]",sourceTitle:e,label:t,onSourceClick:o})}var KN=[{selector:"[data-chat-container]",surface:"chat"},{selector:"[data-message-bubble]",part:"message-bubble"},{selector:"[data-message-avatar]",part:"avatar"},{selector:"[data-composer]",surface:"composer"},{selector:"[data-composer-input]",part:"input"},{selector:"[data-composer-toolbar]",part:"toolbar"},{selector:"[data-sidebar]",surface:"sidebar"},{selector:"[data-sidebar-item]",part:"sidebar-item"},{selector:"[data-file-icon]",part:"file-icon"},{selector:"[data-browser-preview]",surface:"browser"},{selector:"[data-workbench]",surface:"workbench"}];function Hv(){let e=()=>{for(let o of KN){let r=document.querySelectorAll(o.selector);for(let n of r)o.surface&&!n.hasAttribute("data-ow-surface")&&n.setAttribute("data-ow-surface",o.surface),o.part&&!n.hasAttribute("data-ow-part")&&n.setAttribute("data-ow-part",o.part),o.role&&!n.hasAttribute("data-ow-role")&&n.setAttribute("data-ow-role",o.role);}};e();let t=new MutationObserver(()=>{e();});return t.observe(document.body,{childList:true,subtree:true}),t}function gU(e){return e.hasAttribute("data-ow-surface")||e.hasAttribute("data-ow-part")||e.hasAttribute("data-ow-role")}function vU(e){return {surface:e.getAttribute("data-ow-surface")||void 0,part:e.getAttribute("data-ow-part")||void 0,role:e.getAttribute("data-ow-role")||void 0,state:e.getAttribute("data-ow-state")||void 0}}var Uv="ow-theme",Sp="ow-skin-id",Kv=createContext(null);function Wv(){return typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function qN(){try{let e=window.localStorage.getItem(Uv);if(e==="light"||e==="dark"||e==="system")return e}catch{}return "system"}function YN(){try{let e=window.localStorage.getItem(Sp);return u.find(t=>t.id===e)??null}catch{return null}}function XN({children:e,initialTheme:t,initialSkinId:o,initialCustomSkins:r=[]}){let[n,a]=useState(t??qN),[i,d]=useState(()=>n==="system"?Wv():n),[s,l]=useState(()=>o&&o!=="default"?u.find(S=>S.id===o)??r.find(S=>S.id===o)??null:YN()),[c,p]=useState(r),[m,u$1]=useState(null),v=m!==null,w=u,b=[...u,...c];useEffect(()=>{if(n!=="system"){d(n);return}let S=()=>d(Wv());S();let R=window.matchMedia("(prefers-color-scheme: dark)");return R.addEventListener("change",S),()=>R.removeEventListener("change",S)},[n]),useEffect(()=>{document.documentElement.setAttribute("data-theme",i);},[i]),useEffect(()=>{let S=m??s;x(document.documentElement,S,i);},[i,s,m]),useEffect(()=>{let S=Hv();return ()=>S.disconnect()},[]);let h=useCallback(S=>{a(S);try{window.localStorage.setItem(Uv,S);}catch{}},[]),x$1=useCallback(S=>{l(S),u$1(null);try{S?window.localStorage.setItem(Sp,S.id):window.localStorage.removeItem(Sp);}catch{}},[]),k=useCallback(S=>{u$1(S);},[]),y=useCallback(()=>{m&&x$1(m);},[m,x$1]),P=useCallback(()=>{u$1(null);},[]),N=useMemo(()=>({theme:n,resolvedTheme:i,setTheme:h,skin:s,skinId:s?.id??"default",setSkin:x$1,builtinSkins:w,customSkins:c,setCustomSkins:p,skins:b,tryOnSkin:m,tryOn:k,applySkin:y,cancelTryOn:P,isTryingOn:v}),[n,i,h,s,x$1,w,c,p,b,m,k,y,P,v]);return jsx(Kv.Provider,{value:N,children:e})}function Qa(){let e=useContext(Kv);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}var JN=new Set(["name","logo","favicon","colors","typography","branding"]),jv=new Set(["bg","surface","surface2","text","text2","text3","border","borderStrong"]),e4=new Set(["fontSans","fontMono"]),t4=new Set(["productName","companyName","claim","claimNote","slogan"]),oi={name:48,productName:48,companyName:64,claim:24,claimNote:32,slogan:48},Gv=400,o4=1048576,r4=/^(?:$|data:image\/(?:png|svg\+xml|webp|jpeg);|https?:\/\/)/i;function Zv(e,t,o){if(e===void 0){if(o)throw new Error(`${t} \u5FC5\u586B`);return}if(typeof e!="string")throw new Error(`${t} \u5FC5\u987B\u662F\u5B57\u7B26\u4E32`);if(e.length>o4)throw new Error(`${t} \u8D85\u51FA\u957F\u5EA6\u4E0A\u9650`);if(!r4.test(e))throw new Error(`${t} \u5FC5\u987B\u662F data:image URI \u6216 http(s) URL`);return e}function ri(e,t,o,r){if(e===void 0){if(r)throw new Error(`${t} \u5FC5\u586B`);return}if(typeof e!="string")throw new Error(`${t} \u5FC5\u987B\u662F\u5B57\u7B26\u4E32`);if(e.trim().length===0)throw new Error(`${t} \u4E0D\u80FD\u4E3A\u7A7A`);if(e.length>o)throw new Error(`${t} \u8D85\u51FA\u957F\u5EA6\u4E0A\u9650\uFF08${o}\uFF09`);return e}function a4(e){if(!t(e))throw new Error("branding \u5FC5\u987B\u662F\u5BF9\u8C61");s(e,t4,"branding");let t$1=ri(e.productName,"branding.productName",oi.productName,true),o=ri(e.companyName,"branding.companyName",oi.companyName,true),r={productName:t$1,companyName:o},n=ri(e.claim,"branding.claim",oi.claim,false),a=ri(e.claimNote,"branding.claimNote",oi.claimNote,false),i=ri(e.slogan,"branding.slogan",oi.slogan,false);return n!==void 0&&(r.claim=n),a!==void 0&&(r.claimNote=a),i!==void 0&&(r.slogan=i),r}function _s(e){try{if(!t(e))throw new Error("\u79DF\u6237\u4E3B\u9898\u5FC5\u987B\u662F JSON \u5BF9\u8C61");s(e,JN,"\u79DF\u6237\u4E3B\u9898");let t$1=ri(e.name,"name",oi.name,!0),o=Zv(e.logo,"logo",!0),r=Zv(e.favicon,"favicon",!1);if(!t(e.colors))throw new Error("colors \u5FC5\u987B\u662F\u5BF9\u8C61");s(e.colors,jv,"colors");let n={};for(let s of jv){let l=e.colors[s];if(typeof l!="string"||!a$1.test(l))throw new Error(`colors.${s} \u5FC5\u987B\u662F\u5341\u516D\u8FDB\u5236\u989C\u8272`);n[s]=l;}if(!t(e.typography))throw new Error("typography \u5FC5\u987B\u662F\u5BF9\u8C61");s(e.typography,e4,"typography");let a=e.typography.fontSans,i=e.typography.fontMono;if(typeof a!="string"||a.length>Gv)throw new Error("typography.fontSans \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");if(typeof i!="string"||i.length>Gv)throw new Error("typography.fontMono \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");let d=a4(e.branding);return {ok:!0,theme:{name:t$1,logo:o,...r!==void 0?{favicon:r}:{},colors:n,typography:{fontSans:a,fontMono:i},branding:d}}}catch(t){return {ok:false,error:t instanceof Error?t.message:String(t)}}}function n4(e){return {id:`tenant-${e.name}`,name:e.name,source:"tenant",branding:{...e.branding,logo:e.logo,favicon:e.favicon},colors:e.colors,typography:e.typography}}function i4(e){let t=e.modes?.light,o=e.modes?.dark;return {id:e.id,name:e.name,source:"user",colors:t?{bg:t.backgroundPrimary||"#F7F6F1",surface:t.backgroundSecondary||"#FDFDFC",surface2:t.backgroundTertiary||"#F1F0EA",text:t.foregroundPrimary||"#333B50",text2:t.foregroundSecondary||"#646B7A",text3:t.foregroundMuted||"#A2A5A9",border:t.borderSubtle||"#DCDCD7",borderStrong:t.borderStrong||"#C2C3C1"}:void 0,assets:t?.chatBackgroundImage?{chatBackground:{light:t.chatBackgroundImage,dark:o?.chatBackgroundImage}}:void 0}}function qv(e,t){let o=n4(e);if(!t)return o;let r=i4(t);return {...o,branding:o.branding,colors:r.colors||o.colors,radius:r.radius||o.radius,typography:o.typography,assets:r.assets,id:t.id,name:t.name,source:"user"}}function Rp(e="/api/v1/tenant/theme"){let t=Qa(),[o,r]=useState(null),[n,a]=useState(true),[i,d]=useState(null);useEffect(()=>{(async()=>{try{a(!0);let p=await fetch(e);if(!p.ok)throw new Error(`Failed to load tenant theme: ${p.status}`);let m=await p.json(),u=_s(m);if(!u.ok)throw new Error(`\u79DF\u6237\u4E3B\u9898\u5951\u7EA6\u975E\u6CD5\uFF1A${u.error}`);r(u.theme);}catch(p){d(p instanceof Error?p.message:"Failed to load tenant theme"),console.warn("[useUnifiedTheme]",p);}finally{a(false);}})();},[e]);let s=t.tryOnSkin||t.skin,l=useMemo(()=>o?qv(o,s):null,[o,s]);return {...t,tenantTheme:o,tenantLoading:n,tenantError:i,unifiedTheme:l}}var u4={branding:null,tenantLoading:false,tenantError:null},Yv=createContext(null);function m4({children:e,apiUrl:t}){let{unifiedTheme:o,tenantLoading:r,tenantError:n}=Rp(t),a=useMemo(()=>({branding:o?.branding??null,tenantLoading:r,tenantError:n}),[o,r,n]);return jsx(Yv.Provider,{value:a,children:e})}function f4(){return useContext(Yv)??u4}function v4(e,t,o){if(n(t)){console.warn(`[Orbitwork Theme] ${t} \u547D\u4E2D DS2 \u7981\u8986\u76D6\u6E05\u5355\uFF0C\u5DF2\u5FFD\u7565`);return}e.style.setProperty(t,o);}var Xv=[["--ow-bg",e=>e.colors.bg],["--ow-surface",e=>e.colors.surface],["--ow-surface-2",e=>e.colors.surface2],["--ow-text",e=>e.colors.text],["--ow-text-2",e=>e.colors.text2],["--ow-text-3",e=>e.colors.text3],["--ow-border",e=>e.colors.border],["--ow-border-strong",e=>e.colors.borderStrong],["--ow-font-sans",e=>e.typography.fontSans],["--ow-font-mono",e=>e.typography.fontMono]];function Yl(e){let t=document.documentElement;for(let[o,r]of Xv)v4(t,o,r(e));t.setAttribute("data-tenant-theme",e.name);}function Tp(){let e=document.documentElement;for(let[t]of Xv)e.style.removeProperty(t);e.removeAttribute("data-tenant-theme");}function b4(){return document.documentElement.getAttribute("data-tenant-theme")}function _p(e="/api/v1/tenant/theme"){let[t,o]=useState(null),[r,n]=useState(true),[a,i]=useState(null);return useEffect(()=>((async()=>{try{n(!0);let l=await fetch(e);if(!l.ok)throw new Error(`Failed to load theme: ${l.status}`);let c=await l.json(),p=_s(c);if(!p.ok)throw new Error(`\u79DF\u6237\u4E3B\u9898\u5951\u7EA6\u975E\u6CD5\uFF1A${p.error}`);o(p.theme),Yl(p.theme);}catch(l){i(l instanceof Error?l.message:"Failed to load theme"),console.warn("[useTenantTheme]",l);}finally{n(false);}})(),()=>{Tp();}),[e]),{theme:t,loading:r,error:a,switchTheme:s=>{o(s),Yl(s);}}}var h4={name:"default",logo:"",colors:{bg:"#F7F6F1",surface:"#FDFDFC",surface2:"#F1F0EA",text:"#333B50",text2:"#646B7A",text3:"#A2A5A9",border:"#DCDCD7",borderStrong:"#C2C3C1"},typography:{fontSans:"'HarmonyOS Sans SC', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif",fontMono:"'IBM Plex Mono', ui-monospace, 'SF Mono', monospace"},branding:{productName:"Orbitwork",companyName:"Orbitwork AI"}},x4={name:"enterprise",logo:"",colors:{bg:"#F4F1EC",surface:"#FCFAF7",surface2:"#EFEAE3",text:"#33302B",text2:"#6B655C",text3:"#A8A29A",border:"#DDD7CE",borderStrong:"#C4BDB2"},typography:{fontSans:"'IBM Plex Sans', 'HarmonyOS Sans SC', 'Noto Sans SC', sans-serif",fontMono:"'IBM Plex Mono', ui-monospace, monospace"},branding:{productName:"Enterprise Portal",companyName:"ACME Corporation",claim:"\u667A\u80FD\u5DE5\u4F5C\uFF0C\u4ECE\u767B\u5F55\u5F00\u59CB",claimNote:"\u8FDE\u63A5\u4F60\u7684\u56E2\u961F\u4E0E AI \u52A9\u624B",slogan:"\u4EA4\u7ED9\u56E2\u961F\uFF0C\u7EE7\u7EED\u521B\u9020\u3002"}};function y4(){let{theme:e,loading:t,error:o,switchTheme:r}=_p();return t?jsxs("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"flex h-screen items-center justify-center gap-2 text-ow-fs-ui text-ow-text-2",children:[jsx(gt,{size:16}),jsx("span",{children:"\u6B63\u5728\u52A0\u8F7D\u4E3B\u9898\u2026"})]}):o?jsx("div",{"data-ow-part":"error",className:"flex h-screen items-center justify-center p-8",children:jsx("div",{className:"w-full max-w-[560px]",children:jsx(J,{variant:"error",detail:o,children:"\u4E3B\u9898\u6CA1\u52A0\u8F7D\u51FA\u6765\u3002"})})}):jsx("div",{className:"min-h-screen bg-ow-surface p-8",children:jsxs("div",{className:"max-w-4xl mx-auto",children:[jsxs("div",{className:"mb-8",children:[jsxs("h1",{className:"text-ow-fs-title font-semibold text-ow-text mb-2",children:[e?.branding.productName||"Orbitwork"," \u4E3B\u9898\u6F14\u793A"]}),jsxs("p",{className:"text-ow-fs-body text-ow-text-3",children:["\u5F53\u524D\u4E3B\u9898: ",e?.name," | ",e?.branding.companyName]}),e?.branding.slogan?jsxs("p",{className:"text-ow-fs-body text-ow-text-3",children:["\u79DF\u6237\u53E3\u53F7: ",e.branding.slogan]}):null]}),jsx(zt,{title:"\u4E3B\u9898\u5207\u6362",className:"mb-6",children:jsxs("div",{className:"flex gap-3",children:[jsx(f,{variant:"primary",size:"md",onClick:()=>r(h4),children:"\u9ED8\u8BA4\u4E3B\u9898"}),jsx(f,{variant:"secondary",size:"md",onClick:()=>r(x4),children:"\u4F01\u4E1A\u4E3B\u9898"})]})}),jsx(zt,{title:"\u7EC4\u4EF6\u5C55\u793A",className:"mb-6",children:jsxs("div",{className:"space-y-6",children:[jsxs("div",{children:[jsx("h3",{className:"text-ow-fs-body font-semibold text-ow-text mb-3",children:"\u6309\u94AE"}),jsxs("div",{className:"flex gap-2 flex-wrap",children:[jsx(f,{variant:"primary",size:"sm",children:"\u4E3B\u6309\u94AE \xB7 \u5C0F"}),jsx(f,{variant:"primary",size:"md",children:"\u4E3B\u6309\u94AE \xB7 \u4E2D"}),jsx(f,{variant:"secondary",size:"md",children:"\u6B21\u6309\u94AE"}),jsx(f,{variant:"ghost",size:"md",children:"\u5E7D\u7075\u94AE"}),jsx(f,{variant:"danger",size:"md",children:"\u5371\u9669\u94AE"})]})]}),jsxs("div",{children:[jsx("h3",{className:"text-ow-fs-body font-semibold text-ow-text mb-3",children:"\u5FBD\u7AE0"}),jsxs("div",{className:"flex gap-2 flex-wrap",children:[jsx(at,{variant:"normal",dot:true,children:"\u5E38\u89C4"}),jsx(at,{variant:"success",dot:true,children:"\u6210\u529F"}),jsx(at,{variant:"warning",dot:true,children:"\u8B66\u544A"}),jsx(at,{variant:"error",dot:true,children:"\u9519\u8BEF"}),jsx(at,{variant:"pending",dot:true,children:"\u7B49\u5F85\u4E2D"})]})]}),jsxs("div",{children:[jsx("h3",{className:"text-ow-fs-body font-semibold text-ow-text mb-3",children:"\u8F93\u5165\u6846"}),jsx(te,{value:"",onChange:()=>{},placeholder:"\u8F93\u5165\u5185\u5BB9..."})]})]})}),jsx(zt,{title:"\u5F53\u524D\u989C\u8272\u914D\u7F6E",className:"mb-6",children:jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[jsx(ai,{label:"\u5730",token:"--ow-bg",color:e?.colors.bg}),jsx(ai,{label:"\u9762",token:"--ow-surface",color:e?.colors.surface}),jsx(ai,{label:"\u5D4C\u5957\u4E95",token:"--ow-surface-2",color:e?.colors.surface2}),jsx(ai,{label:"\u6B63\u6587\u5B57",token:"--ow-text",color:e?.colors.text}),jsx(ai,{label:"\u6B21\u7EA7\u5B57",token:"--ow-text-2",color:e?.colors.text2}),jsx(ai,{label:"\u9ED8\u8BA4\u8FB9",token:"--ow-border",color:e?.colors.border})]})})]})})}function ai({label:e,token:t,color:o}){return jsxs("div",{className:"flex items-center gap-2",children:[jsx("div",{className:"w-10 h-10 [border-radius:var(--ow-radius-control)] border border-ow-border-strong",style:{backgroundColor:o??`var(${t})`}}),jsxs("div",{children:[jsx("div",{className:"text-ow-fs-caption font-medium text-ow-text",children:e}),jsx("div",{className:"text-ow-fs-caption text-ow-text-3 font-mono tabular-nums",children:o??t})]})]})}function Lp(e){let t=JSON.stringify(e,null,2),o=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(o),n=document.createElement("a");n.href=r,n.download=`${e.id}.ow-skin.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r);}async function Dp(e){try{if(!e.name.endsWith(".ow-skin.json"))return {error:"\u6587\u4EF6\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u9009\u62E9 .ow-skin.json \u6587\u4EF6"};if(e.size>1024*1024)return {error:"\u6587\u4EF6\u8FC7\u5927\uFF0C\u76AE\u80A4\u6587\u4EF6\u4E0D\u5E94\u8D85\u8FC7 1MB"};let t=await e.text(),o;try{o=JSON.parse(t);}catch{return {error:"JSON \u683C\u5F0F\u9519\u8BEF\uFF0C\u65E0\u6CD5\u89E3\u6790"}}let r=q(o);return r.ok?{skin:r.skin}:{error:`\u76AE\u80A4\u9A8C\u8BC1\u5931\u8D25: ${r.error}`}}catch(t){return {error:t instanceof Error?t.message:"\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"}}}async function Ep(e){try{let t=await fetch(e);if(!t.ok)return {error:`\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25: ${t.status} ${t.statusText}`};let o=await t.json(),r=q(o);return r.ok?{skin:r.skin}:{error:`\u76AE\u80A4\u9A8C\u8BC1\u5931\u8D25: ${r.error}`}}catch(t){return {error:t instanceof Error?t.message:"\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 URL \u662F\u5426\u6B63\u786E"}}}function Ip(e){let t=JSON.stringify(e);return `orbitwork://skin/${btoa(encodeURIComponent(t))}`}function Ap(e){try{if(!e.startsWith("orbitwork://skin/"))return {error:"\u5206\u4EAB\u94FE\u63A5\u683C\u5F0F\u9519\u8BEF"};let t=e.replace("orbitwork://skin/",""),o=decodeURIComponent(atob(t)),r=JSON.parse(o),n=q(r);return n.ok?{skin:n.skin}:{error:`\u76AE\u80A4\u9A8C\u8BC1\u5931\u8D25: ${n.error}`}}catch(t){return {error:t instanceof Error?t.message:"\u5206\u4EAB\u94FE\u63A5\u89E3\u6790\u5931\u8D25"}}}function ni(e){try{let t=JSON.stringify(e);window.localStorage.setItem("ow-custom-skins",t);}catch(t){console.error("Failed to save custom skins:",t);}}function k4(){try{let e=window.localStorage.getItem("ow-custom-skins");if(!e)return [];let t=JSON.parse(e);return Array.isArray(t)?t.map(o=>q(o)).filter(o=>o.ok).map(o=>o.skin):[]}catch(e){return console.error("Failed to load custom skins:",e),[]}}function N4(){let{theme:e,setTheme:t,skin:o,setSkin:r,builtinSkins:n,customSkins:a,setCustomSkins:i,skins:d,tryOnSkin:s,tryOn:l,applySkin:c,cancelTryOn:p,isTryingOn:m}=Qa(),[u,v]=useState(""),[w,b]=useState(null),[h,x]=useState(null),[k,y]=useState(null),P=useRef(null),N=useCallback(async D=>{let I=D.target.files?.[0];if(!I)return;y(I.name),x(null);let H=await Dp(I);if(H.error)x(H.error);else if(H.skin){if(d.some(V=>V.id===H.skin.id)){x(`\u76AE\u80A4 ID "${H.skin.id}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u4FEE\u6539\u76AE\u80A4 ID \u540E\u91CD\u65B0\u5BFC\u5165`);return}let E=[...a,H.skin];i(E),ni(E),l(H.skin);}P.current&&(P.current.value="");},[a,i,d,l]),S=useCallback(async()=>{if(!u.trim()){x("\u8BF7\u8F93\u5165\u76AE\u80A4 URL");return}if(x(null),u.startsWith("orbitwork://")){let D=Ap(u);if(D.error)x(D.error);else if(D.skin){if(d.some($=>$.id===D.skin.id)){x(`\u76AE\u80A4 ID "${D.skin.id}" \u5DF2\u5B58\u5728`);return}let H=[...a,D.skin];i(H),ni(H),l(D.skin),v("");}}else {let D=await Ep(u);if(D.error)x(D.error);else if(D.skin){if(d.some($=>$.id===D.skin.id)){x(`\u76AE\u80A4 ID "${D.skin.id}" \u5DF2\u5B58\u5728`);return}let H=[...a,D.skin];i(H),ni(H),l(D.skin),v("");}}},[u,a,i,d,l]),R=useCallback(D=>{Lp(D);},[]),M=useCallback(D=>{let I=Ip(D);b(I);},[]),T=useCallback(D=>{if(!window.confirm(`\u786E\u5B9A\u5220\u9664\u76AE\u80A4 "${D.name}" \u5417\uFF1F`))return;let I=a.filter(H=>H.id!==D.id);i(I),ni(I),o?.id===D.id&&r(null);},[a,i,o,r]),_=s??o;return jsx("div",{className:"min-h-screen bg-ow-surface p-8",children:jsxs("div",{className:"max-w-6xl mx-auto",children:[jsxs("div",{className:"mb-8",children:[jsx("h1",{className:"text-ow-fs-title font-semibold text-ow-text mb-2",children:"\u76AE\u80A4\u7BA1\u7406"}),jsx("p",{className:"text-ow-fs-body text-ow-text-3",children:"\u5BFC\u5165\u3001\u8BD5\u7A7F\u3001\u5BFC\u51FA\u548C\u5206\u4EAB\u81EA\u5B9A\u4E49\u76AE\u80A4"})]}),jsx(zt,{title:"\u4E3B\u9898\u6A21\u5F0F",className:"mb-6",children:jsx(Ht,{"aria-label":"\u4E3B\u9898\u6A21\u5F0F",size:"sm",value:e,onChange:D=>t(D),options:[{value:"light",label:"\u6D45\u8272"},{value:"dark",label:"\u6DF1\u8272"},{value:"system",label:"\u8DDF\u968F\u7CFB\u7EDF"}]})}),m&&jsx(zt,{title:"\u8BD5\u7A7F\u9884\u89C8",className:"mb-6 border border-ow-border-strong",children:jsxs("div",{className:"space-y-3",children:[jsxs("p",{className:"text-ow-fs-body text-ow-text-2",children:["\u6B63\u5728\u8BD5\u7A7F: ",jsx("strong",{children:s?.name})]}),jsxs("div",{className:"flex gap-2",children:[jsx(f,{variant:"primary",size:"md",onClick:c,children:"\u5E94\u7528\u6B64\u76AE\u80A4"}),jsx(f,{variant:"secondary",size:"md",onClick:p,children:"\u53D6\u6D88\u8BD5\u7A7F"})]})]})}),jsx(zt,{title:"\u5BFC\u5165\u76AE\u80A4",className:"mb-6",children:jsxs("div",{className:"space-y-4",children:[jsxs("div",{children:[jsx("label",{className:"text-ow-fs-body font-medium text-ow-text mb-2 block",children:"\u4ECE\u6587\u4EF6\u5BFC\u5165"}),jsx("input",{ref:P,type:"file",accept:".ow-skin.json",onChange:N,className:"hidden"}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(f,{variant:"secondary",size:"md",onClick:()=>P.current?.click(),children:"\u9009\u62E9\u6587\u4EF6"}),jsx("span",{className:"text-ow-fs-caption text-ow-text-3",children:k??"\u5C1A\u672A\u9009\u62E9\u6587\u4EF6"})]})]}),jsxs("div",{children:[jsx("label",{className:"text-ow-fs-body font-medium text-ow-text mb-2 block",children:"\u4ECE URL \u5BFC\u5165"}),jsx("p",{className:"text-ow-fs-caption text-ow-text-3 mb-2",children:"\u652F\u6301 HTTP/HTTPS URL \u6216 orbitwork:// \u5206\u4EAB\u94FE\u63A5"}),jsxs("div",{className:"flex gap-2",children:[jsx(te,{value:u,onChange:v,placeholder:"https://example.com/skin.json \u6216 orbitwork://skin/...",className:"flex-1"}),jsx(f,{variant:"secondary",size:"md",onClick:S,children:"\u5BFC\u5165"})]})]}),h&&jsx(J,{variant:"error",children:h})]})}),w&&jsx(zt,{title:"\u5206\u4EAB\u94FE\u63A5",className:"mb-6",children:jsxs("div",{className:"space-y-3",children:[jsx("p",{className:"text-ow-fs-caption text-ow-text-3",children:'\u5C06\u6B64\u94FE\u63A5\u5206\u4EAB\u7ED9\u5176\u4ED6\u7528\u6237\uFF0C\u4ED6\u4EEC\u53EF\u4EE5\u901A\u8FC7"\u5BFC\u5165\u5206\u4EAB\u94FE\u63A5"\u6309\u94AE\u5BFC\u5165\u76AE\u80A4'}),jsx("div",{className:"p-3 bg-ow-surface-2 [border-radius:var(--ow-radius-control)] break-all font-mono text-ow-fs-caption text-ow-text-2",children:w}),jsxs("div",{className:"flex gap-2",children:[jsx(f,{variant:"secondary",size:"sm",onClick:()=>{navigator.clipboard.writeText(w);},children:"\u590D\u5236\u94FE\u63A5"}),jsx(f,{variant:"ghost",size:"sm",onClick:()=>b(null),children:"\u5173\u95ED"})]})]})}),jsx(zt,{title:"\u5185\u7F6E\u76AE\u80A4",className:"mb-6",children:jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map(D=>jsx(Qv,{skin:D,isActive:_?.id===D.id,onTryOn:()=>l(D),onApply:()=>r(D),onExport:()=>R(D),onShare:()=>M(D)},D.id))})}),a.length>0&&jsx(zt,{title:"\u81EA\u5B9A\u4E49\u76AE\u80A4",className:"mb-6",children:jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:a.map(D=>jsx(Qv,{skin:D,isActive:_?.id===D.id,onTryOn:()=>l(D),onApply:()=>r(D),onExport:()=>R(D),onShare:()=>M(D),onDelete:()=>T(D)},D.id))})})]})})}function Qv({skin:e,isActive:t,onTryOn:o,onApply:r,onExport:n,onShare:a,onDelete:i}){return jsxs("div",{className:`p-3.5 border border-ow-border [border-radius:var(--ow-radius-card)] ${t?"bg-[var(--ow-current-bg)]":"bg-ow-bg"}`,children:[jsxs("div",{className:"mb-3",children:[jsxs("div",{className:"flex items-center justify-between mb-1",children:[jsx("h3",{className:"text-ow-fs-body font-semibold text-ow-text",children:e.name}),t&&jsx(at,{variant:"success",dot:true,children:"\u5F53\u524D"})]}),e.description&&jsx("p",{className:"text-ow-fs-caption text-ow-text-3 line-clamp-2",children:e.description})]}),jsxs("div",{className:"flex flex-wrap gap-2",children:[!t&&jsx(f,{variant:"secondary",size:"sm",onClick:o,children:"\u8BD5\u7A7F"}),!t&&jsx(f,{variant:"ghost",size:"sm",onClick:r,children:"\u5E94\u7528"}),jsx(f,{variant:"ghost",size:"sm",onClick:n,children:"\u5BFC\u51FA"}),jsx(f,{variant:"ghost",size:"sm",onClick:a,children:"\u5206\u4EAB"}),i&&jsx(f,{variant:"danger",size:"sm",onClick:i,children:"\u5220\u9664"})]})]})}function xK({illustrationSrc:e,title:t="\u5728\u4E0B\u65B9\u8F93\u5165\u4F60\u7684\u95EE\u9898\u6216\u60F3\u6CD5\uFF0COrbitwork \u968F\u65F6\u5F85\u547D\u3002",status:o,composer:r,actionLabel:n,onAction:a,action:i}){let{resolvedTheme:d,skin:s}=Qa(),c=p(s,d);return jsxs("div",{className:g("chat-empty",c&&"chat-empty--has-background"),children:[jsx(F,{className:"chat-empty__state",message:t,actionLabel:n,onAction:a,action:i}),o,r&&jsx("div",{className:"empty-composer",children:r})]})}var P4={thinking:"\u601D\u8003\u4E2D",running:"\u8FD0\u884C\u4E2D",done:"\u5DF2\u5B8C\u6210"},R4=["Mod","T"];function PK({title:e,runState:t=null,runLabel:o,elapsedSeconds:r=null,shareActive:n=false,onShare:a,contextAction:i,onOpenContext:d,contextActive:s=false,onOpenPanel:l,panelOpen:c=false,platform:p="mac",className:m="",...u}){let v=o??(t?P4[t]:""),w=typeof r=="number"&&Number.isFinite(r)&&r>=1?` \xB7 ${Math.floor(r)}s`:"";return jsxs("div",{className:`chat__head${m?` ${m}`:""}`,...u,children:[jsx("div",{className:"chat__head-title",children:e}),jsx("span",{className:"chat__head-run",role:"status","aria-live":"polite","data-ow-state":t&&v?t:"idle",children:t&&v&&jsxs(Fragment,{children:[jsx("span",{className:"chat__head-run__dot","aria-hidden":"true"}),jsxs("span",{className:"chat__head-run__label",children:[v,jsx("span",{"aria-hidden":"true",children:w})]})]})}),jsxs("div",{className:"chat__head-actions",children:[a&&jsx(f,{variant:"unstyled",className:"session-ctx-btn",title:"\u5206\u4EAB\u8FD9\u6BB5\u4F1A\u8BDD","aria-label":"\u5206\u4EAB\u8FD9\u6BB5\u4F1A\u8BDD","aria-pressed":n,onClick:a,children:jsx(lo,{})}),i??(d&&jsx(f,{variant:"unstyled",className:"session-ctx-btn",title:"\u5B50\u4EFB\u52A1\u4E0E\u4EA7\u7269","aria-label":"\u5B50\u4EFB\u52A1\u4E0E\u4EA7\u7269","aria-pressed":s,onClick:d,children:jsx(Po,{})})),l&&jsx(f,{variant:"unstyled",className:"session-ctx-btn",title:`\u6253\u5F00\u53F3\u680F ${Xn(R4,p)}`,"aria-label":"\u6253\u5F00\u53F3\u680F","aria-pressed":c,onClick:l,children:jsx(Ir,{})})]})]})}function eb({source:e,content:t,streaming:o,latest:r,actions:n=true,error:a,retryLabel:i,onRetry:d,retryDisabled:s,time:l,feedback:c,onFeedbackChange:p,onCopy:m,onBranch:u,onShare:v,disclaimer:w,onLocalPathClick:b,onLocalFileCardOpen:h,onRequestLocalFileOpenWithOptions:x,onLocalFileCardOpenWith:k,onLocalFileCardOpenWithMenu:y,onLocalImagePreview:P,localPathBaseDir:N,onRunCommand:S}){let R=n&&!o&&!!e?.trim(),M={onLocalPathClick:b,onLocalFileCardOpen:h,onRequestLocalFileOpenWithOptions:x,onLocalFileCardOpenWith:k,onLocalFileCardOpenWithMenu:y,onLocalImagePreview:P,localPathBaseDir:N,onRunCommand:S};return jsxs("div",{className:`bubble-wrap${r?" bubble-wrap--latest":""}`,children:[jsxs("div",{className:`bubble${o?" streaming":""}`,children:[t??(e!==void 0?jsx(ns,{className:"stream-text",source:e,...M}):null),a&&jsxs("div",{className:"stream-text",children:[a,d&&jsxs(Fragment,{children:[" ","\xB7"," ",jsx(f,{variant:"unstyled",type:"button",className:"chat-retry-link",onClick:d,disabled:s,children:i??"\u91CD\u8BD5"})]})]})]}),R&&jsx(_4,{source:e??"",latest:r,time:l,feedback:c,onFeedbackChange:p,onCopy:m,onBranch:u,onShare:v,markdownProps:M}),!o&&w&&jsx("div",{className:"msg-disclaimer",children:w})]})}function _4({source:e,latest:t,time:o,feedback:r,onFeedbackChange:n,onCopy:a,onBranch:i,onShare:d,markdownProps:s}){let[l,c]=useState(false),[p,m]=useState(false),[u,v]=useState(false),w=r?.vote??null,b=useCallback(async()=>{try{a?await a(e):await navigator.clipboard.writeText(e),c(!0),window.setTimeout(()=>c(!1),2e3);}catch{}},[a,e]),h=x=>{n?.({vote:"down",reasons:x.reasons,...x.detail?{detail:x.detail}:{}}),v(false);};return jsx(hn,{className:`msg-actions${t?" msg-actions--latest":""}`,visible:!!t,time:o||void 0,items:[{key:"like",label:"\u8D5E",icon:w==="up"?jsx(Nd,{}):jsx(mn,{}),active:w==="up",onSelect:()=>n?.(w==="up"?null:{vote:"up"})},{key:"dislike",label:"\u8E29",icon:jsx(Od,{}),active:w==="down",onSelect:()=>w==="down"?n?.(null):v(true)},{key:"copy",label:"\u590D\u5236",icon:jsx(Tt,{}),done:l,onSelect:b},{key:"branch",label:"\u65B0\u5EFA\u5206\u652F",icon:jsx(Po,{}),onSelect:()=>i?.()},{key:"share",label:"\u5206\u4EAB",icon:jsx(lo,{}),onSelect:()=>d?.()},{key:"preview",label:"\u67E5\u770B Markdown",icon:jsx(oo,{}),onSelect:()=>m(true)}],trailing:jsxs(Fragment,{children:[p&&jsx(Lf,{source:e,preview:jsx(ns,{className:"stream-text",source:e,...s}),onClose:()=>m(false),onCopy:a}),u&&jsx(If,{onClose:()=>v(false),onSubmit:h})]})})}function D4({id:e,text:t="",sourceLabel:o,compressed:r,error:n,time:a,attachments:i=[],contexts:d=[],onAttachmentClick:s,onAttachmentDoubleClick:l,onAttachmentDragStart:c,onAttachmentKeyDown:p,onCopy:m,selectable:u,checked:v,onToggle:w,selectLabel:b,trailing:h}){return r?jsx(E4,{id:e,text:t,time:a,onCopy:m,trailing:h}):jsx(Vl,{className:"turn turn--user",anchor:e,selectable:u,checked:v,onToggle:w,selectLabel:b,text:t||void 0,error:n||void 0,trailing:h,time:a||void 0,actions:t?jsx(ob,{text:t,onCopy:m}):void 0,leading:o?jsxs("div",{className:"turn-source-chip",children:[jsx(Aa,{})," ",o]}):void 0,contexts:d.length>0?jsx("div",{className:"turn-context-chips",children:d.map(x=>jsxs("span",{className:`turn-context-chip turn-context-chip--${x.kind}`,"data-kind":x.kind,children:[x.kind==="skill"?jsx(gr,{}):jsx(gn,{}),jsx("span",{children:x.name})]},`${x.kind}:${x.id}`))}):void 0,attachments:i.length>0?jsx("div",{className:"atts",children:i.map((x,k)=>jsx(f,{variant:"unstyled",type:"button",className:`att${x.openable?" att--openable":""}${x.kind==="image"&&x.previewUrl?" att--image":""}`,title:x.title??x.name,draggable:x.draggable,onDragStart:y=>c?.(y,x,k),onClick:()=>s?.(x,k),onDoubleClick:()=>l?.(x,k),onKeyDown:y=>p?.(y,x,k),children:x.kind==="image"&&x.previewUrl?jsx("img",{className:"att__preview",src:x.previewUrl,alt:x.name}):jsxs(Fragment,{children:[jsx("span",{className:`gly ${x.kind==="directory"?"gly--directory":"gly--file"}`,children:x.kind==="directory"?jsx(qe,{"aria-hidden":"true"}):jsx(qo,{name:x.name,kind:x.kind,width:16,height:16})}),jsxs("div",{children:[jsx("div",{children:x.name}),x.meta&&jsx("div",{className:"m",children:x.meta})]})]})},x.id??`${x.name}-${k}`))}):void 0})}function E4({id:e,text:t,label:o="\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29",defaultExpanded:r=false,time:n,onCopy:a,onExpandedChange:i,trailing:d}){let[s,l]=useState(r),c=useCallback(p=>{l(p),i?.(p);},[i]);return jsxs("div",{className:`turn turn--compressed-group${s?" is-expanded":""}`,"data-chat-anchor":e,children:[jsxs(Ig,{className:s?"mt-5 mb-3":"mt-5 mb-6",label:o,expanded:s,onExpandedChange:c,detailsLabel:"\u5DF2\u538B\u7F29\u5185\u5BB9",detailsClassName:"compression-divider__details",children:[jsx("span",{className:"compression-divider__text",children:t}),t&&jsx(ob,{text:t,time:n,onCopy:a,visible:true})]}),d]})}function XK({id:e,detail:t="",errorTitle:o="Invalid Request",errorMessage:r,errorVersion:n,label:a="\u8FDE\u63A5\u54CD\u5E94\u5F02\u5E38\uFF0C\u6B63\u5728\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5",defaultExpanded:i=false,onExpandedChange:d}){let s=useId(),[l,c]=useState(i),p=useCallback(()=>{c(u=>{let v=!u;return d?.(v),v});},[d]),m=l?"\u6536\u8D77\u8FDE\u63A5\u9519\u8BEF\u8BE6\u60C5":"\u67E5\u770B\u8FDE\u63A5\u9519\u8BEF\u8BE6\u60C5";return jsxs("div",{className:`reconnect-status${l?" is-expanded":""}`,"data-chat-anchor":e,children:[jsxs("div",{className:"reconnect-divider",children:[jsx("span",{className:"reconnect-divider__line","aria-hidden":"true"}),jsxs(f,{variant:"unstyled",type:"button",className:"reconnect-divider__trigger",onClick:p,"aria-expanded":l,"aria-controls":s,"aria-label":m,title:m,children:[jsx(gt,{size:15,className:"reconnect-divider__spinner","aria-label":"\u6B63\u5728\u91CD\u8FDE"}),jsx("span",{className:"reconnect-divider__label",role:"status","aria-live":"polite",children:a}),jsx("span",{className:"reconnect-divider__action",children:l?"\u6536\u8D77":"\u67E5\u770B"}),jsx(ae,{className:"reconnect-divider__chevron","aria-hidden":"true"})]}),jsx("span",{className:"reconnect-divider__line","aria-hidden":"true"})]}),jsx("div",{id:s,className:"reconnect-divider__details",role:"region","aria-label":"\u8FDE\u63A5\u9519\u8BEF\u8BE6\u60C5",hidden:!l,children:jsx(J,{variant:"error",title:o,meta:n,detail:t.trim()||void 0,children:r?.trim()||t.trim()||"Backend chat stream returned an invalid response."})})]})}function ob({text:e,time:t,onCopy:o,visible:r}){let[n,a]=useState(false),i=useCallback(async()=>{try{o?await o(e):await navigator.clipboard.writeText(e),a(!0),window.setTimeout(()=>a(!1),1600);}catch{}},[o,e]);return jsx(hn,{className:"turn-user-meta",visible:r,time:t||void 0,items:[{key:"copy",label:"\u590D\u5236",icon:jsx(Tt,{}),done:n,onSelect:i}]})}function I4({children:e,questions:t,body:o,messages:r,thinking:n,thinkingLoading:a,thinkingDefaultExpanded:i,nodeBeacon:d,execution:s,actions:l=true,disclaimer:c,plain:p,agentName:m,agentMeta:u,selectable:v,checked:w,onToggle:b,selectLabel:h}){let x=r??(e!==void 0?[{id:"message",content:e}]:[]);return jsx(Il,{className:`turn ${p?"turn--plain-agent":"turn--agent"}`,node:true,selectable:v,checked:w,onToggle:b,selectLabel:h,beacon:d??true,byline:m!=null,name:m,meta:u,execution:s,thinking:n!==void 0?jsx(dv,{loading:a,defaultExpanded:i,children:n}):void 0,children:jsxs("div",{className:"body",children:[t,o,x.map((k,y)=>{let P=y===x.length-1;return jsx(eb,{...k,actions:k.actions??l,latest:P,disclaimer:P?c:void 0},k.id)})]})})}function QK({groups:e,spine:t=true,className:o}){return jsx(Ol,{spine:t,maxWidth:"100%",className:o,children:e.map(r=>jsxs("div",{"data-ow-part":"turn-group",children:[r.user&&jsx(D4,{...r.user}),r.agent&&jsx(I4,{...r.agent}),r.divider]},r.id))})}function sj({label:e,title:t,open:o,warning:r,onClick:n}){return jsx(f,{variant:"ghost",size:"sm",type:"button","data-slot":"desktop-composer-model","data-ow-state":g(o&&"open",r&&"warning")||void 0,className:g("min-w-0 max-w-[190px] whitespace-nowrap flex-row-reverse",r&&"text-[color:var(--ow-warning)]"),"aria-label":t??`\u9009\u62E9\u6A21\u578B\uFF1A${e}`,"aria-expanded":o,title:t??e,onClick:n,icon:jsx(ae,{}),children:jsx("span",{"data-ow-part":"label",className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})})}var lj=forwardRef(function({permissionPrompt:t,dialogs:o,addAction:r,agent:n,plan:a,modelControl:i,voiceControl:d,projectControl:s,notice:l=false,authorizationControl:c,contextUsage:p,...m},u){let v=(b,h)=>typeof b.label=="string"?b.label:h,w=t??jsx(Nv,{ref:u,...m,toolbarStart:r||n||a?jsxs(Fragment,{children:[r&&jsx("span",{"data-ow-part":"control",className:"relative inline-flex min-w-0",children:jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"tool","data-ow-state":r.open?"open":void 0,className:g(r.open&&"bg-[var(--ow-btn-ghost-press)]"),"aria-label":r.title??"\u6DFB\u52A0","aria-expanded":r.open,title:r.title??"\u6DFB\u52A0",disabled:r.disabled,onClick:r.onClick,icon:jsx(He,{})})}),n&&jsx(ro,{removeMode:"hover",avatar:n.avatar,icon:n.icon??(n.avatar?void 0:jsx(Da,{})),label:n.label,description:n.description,onRemove:n.onRemove,tooltip:v(n,"\u667A\u80FD\u4F53"),removeLabel:`\u79FB\u9664${typeof n.label=="string"?` ${n.label}`:"\u667A\u80FD\u4F53"}`,className:ip,"data-ow-variant":"agent"}),a&&jsx(ro,{removeMode:"hover",avatar:a.avatar,icon:a.icon??jsx(Ar,{}),label:a.label,description:a.description,onRemove:a.onRemove,tooltip:v(a,"\u8BA1\u5212"),removeLabel:`\u79FB\u9664${typeof a.label=="string"?` ${a.label}`:"\u8BA1\u5212"}`,className:ip,"data-ow-variant":"plan"})]}):void 0,toolbarEnd:i?jsx("span",{"data-ow-part":"control",className:"relative inline-flex min-w-0",children:i}):void 0,voice:d,project:s,footerStart:l!==false?jsx("span",{"data-ow-part":"notice",className:"flex-[0_0_auto] text-[color:var(--ow-text-3)] font-normal text-ow-fs-ui leading-none whitespace-nowrap",children:l}):void 0,authorization:c,contextUsage:p});return jsxs("div",{"data-slot":"desktop-composer",className:"composer-inner",children:[w,o]})});function F4({logo:e,name:t,author:o="Orbitwork \u5B98\u65B9",version:r,description:n,backLabel:a="\u8FD4\u56DE\u63D2\u4EF6 \xB7 \u8FDE\u63A5\u5668",runtime:i="stdio",status:d,statusTone:s="muted",command:l,enabled:c,error:p,tools:m,toolSummary:u,emptyToolsText:v="\u8FD9\u4E2A\u8FDE\u63A5\u5668\u6682\u672A\u63D0\u4F9B\u5DE5\u5177",toolAction:w,actions:b,metadata:h=[],authorization:x,detailContent:k,detailLoading:y,detailError:P,onBack:N,onToggle:S,onRefresh:R,onEdit:M,onRemove:T,onCopyDiagnostic:_}){let D=b??[...M?[{id:"edit",label:"\u7F16\u8F91\u914D\u7F6E",icon:jsx(yt,{}),variant:"primary",onAction:M}]:[],...R?[{id:"refresh",label:"\u5237\u65B0\u72B6\u6001",icon:jsx(We,{}),overflow:true,onAction:R}]:[],...T?[{id:"remove",label:"\u65AD\u5F00\u8FDE\u63A5",icon:jsx(Le,{}),variant:"danger",overflow:true,onAction:T}]:[]],I=D.filter(E=>!E.overflow),H=D.filter(E=>E.overflow);return jsxs(Rs,{avatar:jsx(Fl,{value:"neutral",children:jsx("span",{className:"g",children:e})}),name:t,author:o,version:r,status:jsx(ro,{dot:d?s==="ok"?"success":s==="warning"?"warning":s==="error"?"error":"neutral":c?"success":"neutral",label:d??i}),kind:"\u8FDE\u63A5\u5668",summary:n,actions:jsx(Cp,{leading:c!==void 0&&S?jsx(po,{checked:c,onChange:S}):void 0,actions:I.map(E=>({key:E.id,label:E.label,icon:E.icon,variant:E.variant,disabled:E.disabled,onAction:E.onAction})),menuItems:H.map(E=>({key:E.id,label:typeof E.label=="string"?E.label:E.id,icon:E.icon??jsx(yt,{}),danger:E.variant==="danger",disabled:E.disabled})),onMenuSelect:E=>H.find(V=>V.id===E)?.onAction?.()}),backLabel:a,onBack:N,children:[p&&jsx(Vi,{variant:"error",className:"mt-3",action:_&&jsx(f,{variant:"secondary",size:"sm",onClick:_,children:"\u590D\u5236\u8BCA\u65AD"}),children:p}),(h.length>0||l)&&jsxs("section",{className:"skd__section",children:[jsx("div",{className:"lbl",children:"\u57FA\u672C\u4FE1\u606F"}),jsxs("div",{className:"connector-kv",children:[l&&jsxs(Fragment,{children:[jsx("span",{children:"\u8FDE\u63A5\u547D\u4EE4"}),jsx("b",{className:"mono",children:l})]}),h.map(E=>jsxs(Fragment$1,{children:[jsx("span",{children:E.label}),jsx("b",{children:E.value})]},E.id))]})]}),x&&jsxs("section",{className:"skd__section",children:[jsx("div",{className:"lbl",children:"\u6388\u6743"}),x]}),(k||y||P)&&jsxs("section",{className:"skd__section",children:[jsx("div",{className:"lbl",children:"\u8BE6\u7EC6\u4ECB\u7ECD"}),y&&jsx("div",{className:"skd__empty",children:"\u8BE6\u7EC6\u4ECB\u7ECD\u52A0\u8F7D\u4E2D\u2026"}),P&&jsx(Vi,{variant:"error",children:P}),k&&jsx("div",{className:"skd__doc",children:k})]}),jsxs("section",{className:"skd__section",children:[jsxs("div",{className:"lbl",children:["\u5DE5\u5177"," ",u?jsx("span",{className:"skd__lbl-note",children:u}):jsx("span",{className:"cnt",children:m.length})]}),jsx("div",{className:"conn-tools",children:m.length===0?jsx(F,{className:"conn-tools__empty",size:"sm",message:v,action:w&&jsx(f,{size:"sm",variant:w.variant??"secondary",icon:w.icon,disabled:w.disabled,onClick:w.onAction,children:w.label})}):m.map(E=>jsxs("div",{className:"mcp-tool",children:[jsx("span",{className:"tg",children:jsx(So,{})}),jsxs("div",{className:"tmeta",children:[jsx("div",{className:"tn mono",children:E.name}),E.description&&jsx("div",{className:"td",children:E.description})]}),jsx("span",{className:"mcp-tool__state",children:E.state??"\u53EF\u7528"})]},E.id))})]})]})}var hj=F4;function Sj({title:e="\u4ECA\u5929\u4ECE\u54EA\u4EF6\u4E8B\u5F00\u59CB?",backdrop:t,capsules:o,mounts:r,onDismissMounts:n,children:a,className:i}){return jsxs(Fragment,{children:[t,jsxs("div",{"data-slot":"desktop-home",className:g("relative box-border m-auto w-full max-w-[800px] px-6","flex flex-col items-center gap-5",i),children:[jsxs("div",{"data-slot":"desktop-home-hero",className:"flex items-center gap-[14px]",children:[jsx(la,{variant:"auto",size:34}),jsx("h1",{"data-slot":"desktop-home-title",className:g("m-0 ow-font-display text-ow-fs-headline font-medium","leading-[var(--ow-lh-headline)] tracking-[0.01em] text-[color:var(--ow-text)]"),children:e})]}),o,r!=null&&jsxs("div",{"data-slot":"desktop-home-mounts",className:g("flex items-center gap-2 h-8 pl-[10px] pr-1 bg-transparent","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-sm)]"),children:[jsx("span",{className:g("flex-none font-medium text-[color:var(--ow-eyebrow)]","text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]"),children:"\u5DF2\u6302\u8F7D"}),jsx("span",{className:"text-ow-fs-ui text-[color:var(--ow-text-2)] whitespace-nowrap",children:r}),n&&jsx("button",{type:"button",title:"\u5378\u8F7D\u5168\u90E8","aria-label":"\u5378\u8F7D\u5168\u90E8",onClick:n,className:g("flex-none grid place-items-center w-6 h-6 border-0 cursor-pointer","[border-radius:var(--ow-radius-2xs)] bg-transparent text-[color:var(--ow-text-3)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] hover:text-[color:var(--ow-text)]","ow-focus-ring"),children:jsx(Q,{width:14,height:14,"aria-hidden":"true"})})]}),a]})]})}var H4="\u667A\u80FD\u5DE5\u4F5C\uFF0C\u4ECE\u767B\u5F55\u5F00\u59CB",W4="\u8FDE\u63A5\u4F60\u7684\u56E2\u961F\u4E0E AI \u52A9\u624B";function Fj({markSrc:e,stage:t,backgroundSrc:o,claim:r=H4,claimNote:n=W4,brandName:a="Orbitwork",expiresText:i="",error:d,appVersion:s="v0.1.0",onBack:l,onPasswordLogin:c,passwordSubmitting:p=false,providers:m=[],onQrLogin:u,qrRequesting:v=null,qr:w=null,onCompleteMfa:b,mfaSubmitting:h=false}){let[x,k]=useState(false),[y,P]=useState(""),[N,S]=useState(""),[R,M]=useState(""),T=!!o&&!x,_=t!=="welcome",D=t==="waiting-confirmation"?"scanned":t==="expired"?"error":t,I=t==="qr"||t==="expired"||t==="error"||t==="mfa",H=t==="expired"||t==="error",$=!!c,E=y.trim().length>0&&N.length>0&&!p,V=m.map(Fe=>({provider:Fe,Icon:U4(Fe.kind)})),pe=!!u&&V.length>0,W=()=>{E&&c?.(y.trim(),N);},ce=()=>{!b||R.trim().length===0||h||b(R.trim());},Pe=()=>{w&&u?.(w.providerId);};return jsxs("div",{className:`owshell login-v2 login-split${T?"":" fallback"}`,children:[jsxs("div",{className:"login-kv-board",children:[jsx("div",{className:"login-bg",children:o?jsx("img",{src:o,alt:"",onError:()=>k(true)}):null}),jsx("div",{className:"login-kv-scrim"}),jsxs("div",{className:"login-slogan",children:[jsx("div",{className:"slogan-line",children:r}),jsx("div",{className:"slogan-note",children:n})]})]}),jsxs("div",{className:"login-rail",children:[jsx("div",{className:"login-content",children:_?t==="mfa"?jsxs("form",{className:"login-pane login-mfa",onSubmit:Fe=>{Fe.preventDefault(),ce();},children:[jsxs("div",{className:"login-qr__head",children:[jsxs(f,{variant:"unstyled",className:"back",onClick:l,disabled:!I,children:[jsx(Kt,{}),"\u8FD4\u56DE"]}),jsx("div",{className:"t",children:"\u4E8C\u6B21\u9A8C\u8BC1"}),jsx("span",{style:{width:52}})]}),jsx("div",{className:"login-h1",children:"\u8F93\u5165\u9A8C\u8BC1\u7801"}),jsx("div",{className:"login-sub",children:"\u8BE5\u8D26\u53F7\u5F00\u542F\u4E86\u4E8C\u6B21\u9A8C\u8BC1\uFF0C\u8BF7\u8F93\u5165\u9A8C\u8BC1\u5668\u9A8C\u8BC1\u7801\u6216\u6062\u590D\u7801\u3002"}),d?jsx(J,{variant:"error",tone:"outline",className:"text-left",children:d}):null,jsx(te,{value:R,onChange:M,placeholder:"6 \u4F4D\u9A8C\u8BC1\u7801\u6216\u6062\u590D\u7801",autoComplete:"one-time-code"}),jsx(f,{variant:"primary",size:"lg",className:"mt-2 w-full",type:"submit",disabled:R.trim().length===0,loading:h,children:"\u9A8C\u8BC1\u5E76\u767B\u5F55"})]}):t==="success"?jsxs("div",{className:"login-pane login-welcome",children:[e?jsx("img",{src:e,alt:a,className:"login-mark"}):jsx(la,{variant:"auto",size:46,label:a,className:"login-mark"}),jsx("div",{className:"login-h1",children:"\u767B\u5F55\u6210\u529F"}),jsx("div",{className:"login-sub",children:"\u6B63\u5728\u4E3A\u4F60\u51C6\u5907\u5DE5\u4F5C\u533A\u2026"})]}):jsxs("div",{className:"login-pane login-qr",children:[jsxs("div",{className:"login-qr__head",children:[jsxs(f,{variant:"unstyled",className:"back",onClick:l,disabled:!I,children:[jsx(Kt,{}),"\u8FD4\u56DE"]}),jsx("div",{className:"t",children:w?`${w.providerName}\u626B\u7801\u767B\u5F55`:"\u626B\u7801\u767B\u5F55"}),jsx("span",{style:{width:52}})]}),jsxs("div",{className:`qr-box ${D}`,children:[w?jsx("img",{className:"qr-img",src:w.src,alt:`${w.providerName}\u767B\u5F55\u4E8C\u7EF4\u7801`}):null,t==="waiting-confirmation"&&jsxs("div",{className:"qr-veil",children:[jsx(gt,{size:26,"aria-label":"\u7B49\u5F85\u786E\u8BA4"}),jsx("div",{className:"msg",children:"\u7B49\u5F85\u786E\u8BA4"}),jsxs("div",{className:"sub",children:["\u8BF7\u5728\u624B\u673A\u4E0A\u5B8C\u6210\u786E\u8BA4\uFF0C\u5B8C\u6210\u540E\u5C06\u81EA\u52A8\u8FDB\u5165 ",a]})]}),H&&jsxs("div",{className:"qr-veil failed",role:"alert",children:[jsx("div",{className:"msg",children:t==="expired"?"\u4E8C\u7EF4\u7801\u8FC7\u671F":"\u767B\u5F55\u5931\u8D25"}),t==="error"&&d?jsx("div",{className:"sub",children:d}):null,jsx(f,{variant:"primary",size:"lg",className:"w-full",onClick:Pe,children:"\u91CD\u65B0\u767B\u5F55"})]})]}),jsxs("div",{className:"qr-hint",children:[t==="qr"&&jsxs(Fragment,{children:[jsxs("div",{className:"r",children:["\u8BF7\u4F7F\u7528 ",jsx("b",{children:w?.providerName??"\u624B\u673A\u5E94\u7528"})," \u626B\u7801\u767B\u5F55"]}),jsx("div",{className:"r sub",children:i?`\u4E8C\u7EF4\u7801\u6709\u6548\u671F\u81F3 ${i}`:"\u4E8C\u7EF4\u7801\u6709\u6548\u671F 3 \u5206\u949F"})]}),t==="waiting-confirmation"&&jsxs(Fragment,{children:[jsx("div",{className:"r",children:"\u7B49\u5F85\u767B\u5F55\u786E\u8BA4"}),jsx("div",{className:"r sub",children:"\u5B8C\u6210\u540E\u5C06\u81EA\u52A8\u8FDB\u5165\u534F\u4F5C\u4E2D\u5FC3"})]})]})]}):jsxs("div",{className:"login-pane login-welcome",children:[e?jsx("img",{src:e,alt:a,className:"login-mark"}):jsx(la,{variant:"auto",size:46,label:a,className:"login-mark"}),jsxs("div",{className:"login-h1",children:["\u6B22\u8FCE\u4F7F\u7528 ",a]}),$?jsxs("form",{className:"login-password",onSubmit:Fe=>{Fe.preventDefault(),W();},children:[d&&t==="welcome"?jsx(J,{variant:"error",tone:"outline",className:"text-left",children:d}):null,jsx(te,{value:y,onChange:P,placeholder:"\u7528\u6237\u540D / \u90AE\u7BB1 / \u624B\u673A\u53F7",autoComplete:"username"}),jsx(te,{type:"password",value:N,onChange:S,placeholder:"\u5BC6\u7801",autoComplete:"current-password"}),jsx(f,{variant:"primary",size:"lg",className:"w-full",type:"submit",disabled:!E,loading:p,children:"\u767B\u5F55"})]}):null,pe?jsxs("div",{className:"login-providers",children:[jsxs("div",{className:"login-divider",children:[jsx("span",{}),"\u5176\u4ED6\u767B\u5F55\u65B9\u5F0F",jsx("span",{})]}),jsx("div",{className:"login-provider-row",children:V.map(({provider:Fe,Icon:ee})=>{let q=v===Fe.id;return jsxs("button",{type:"button",className:`login-provider${ee===Mt?" login-provider--generic":""}`,disabled:q,"aria-label":`\u4F7F\u7528${Fe.displayName}\u626B\u7801\u767B\u5F55`,"aria-busy":q||void 0,onClick:()=>u?.(Fe.id),children:[q?jsx(vr,{className:"w-5 h-5"}):jsx(ee,{}),ee===Mt?jsx("span",{children:Fe.displayName}):null]},Fe.id)})})]}):null,jsxs("div",{className:"login-foot",children:["\u767B\u5F55\u5373\u4EE3\u8868\u540C\u610F"," ",jsx(f,{variant:"unstyled",className:"lk",children:"\u670D\u52A1\u6761\u6B3E"})," ","\u4E0E"," ",jsx(f,{variant:"unstyled",className:"lk",children:"\u9690\u79C1\u653F\u7B56"}),"\u3002"]})]})}),jsx("div",{className:"login-rail-foot",children:jsxs("div",{className:"login-tag",children:[a," \xB7 ",s]})})]})]})}function U4(e){switch(e){case "IDENTITY_PROVIDER_KIND_DINGTALK":return Pi;case "IDENTITY_PROVIDER_KIND_FEISHU":return Ri;case "IDENTITY_PROVIDER_KIND_WECOM":return Ti;default:return Mt}}function Gj({open:e,appName:t="\u8D44\u6599\u5E93",appIcon:o=null,appDescription:r="\u8D44\u6599\u5E93\u5C06\u4F7F\u7528\u4F60\u7684 Orbitwork \u8D26\u53F7\u8BBF\u95EE\u5185\u5BB9\u3002",scopes:n=[],loading:a=false,submitting:i=null,error:d=null,authorizationUrl:s=null,onApprove:l,onDeny:c,onClose:p}){let m=useRef(null),[u,v]=useState(false),w=o?.trim()&&!u?o.trim():null;return useEffect(()=>{v(false);},[o]),useEffect(()=>{let b=m.current;if(!b||!s)return;b.replaceChildren();let h=document.createElement("webview");return h.setAttribute("partition","persist:library-authorization"),h.setAttribute("webpreferences","contextIsolation=yes, nodeIntegration=no, sandbox=yes"),h.setAttribute("src",s),b.appendChild(h),()=>{h.remove();}},[s]),jsx(oe,{open:e,title:"\u6388\u6743\u8BBF\u95EE",subtitle:`${t} \xB7 Orbitwork \u5B89\u5168\u6388\u6743`,className:"desktop-library-authorization-dialog",width:520,padded:false,onClose:i==="deny"?void 0:p,closable:i!=="deny",children:jsxs("div",{className:"desktop-library-consent","aria-busy":a||i!==null,children:[jsxs("div",{className:"desktop-library-consent__flow","aria-hidden":"true",children:[jsx("span",{className:"desktop-library-consent__mark desktop-library-consent__mark--orbitwork",children:jsx(la,{size:40})}),jsx("span",{className:"desktop-library-consent__arrow",children:"\u2192"}),jsx("span",{className:`desktop-library-consent__mark desktop-library-consent__mark--accent${w?" desktop-library-consent__mark--image":""}`,children:w?jsx("img",{src:w,alt:"",onError:()=>v(true)}):G4(t)})]}),jsxs("h2",{children:[jsx("strong",{children:t})," \u8BF7\u6C42\u8BBF\u95EE\u4F60\u7684\u8D26\u53F7"]}),jsx("p",{className:"desktop-library-consent__description",children:r}),jsxs("div",{className:"desktop-library-consent__facts",children:[jsxs("span",{children:[jsx(ea,{"aria-hidden":"true"})," \u4F7F\u7528 Orbitwork \u8D26\u53F7\u51ED\u8BC1"]}),jsxs("span",{children:[jsx(mr,{"aria-hidden":"true"})," \u4EC5\u5728\u8D44\u6599\u5E93\u8BF7\u6C42\u4E2D\u751F\u6548"]})]}),jsxs("section",{className:"desktop-library-consent__scopes","aria-labelledby":"desktop-library-consent-scopes",children:[jsx("h3",{id:"desktop-library-consent-scopes",children:"\u5C06\u6388\u4E88\u4EE5\u4E0B\u6743\u9650"}),a?jsx("p",{className:"desktop-library-consent__loading",children:"\u6B63\u5728\u68C0\u67E5\u767B\u5F55\u72B6\u6001\u2026"}):n.length>0?jsx("ul",{children:n.map(b=>jsxs("li",{children:[jsx(Ba,{"aria-hidden":"true"}),jsxs("span",{children:[jsx("strong",{children:b.title}),b.owner&&jsx("small",{children:b.owner}),b.description&&jsx("em",{children:b.description})]}),b.required&&jsx("b",{children:"\u5FC5\u9700"})]},`${b.owner??""}:${b.title}`))}):jsx("p",{className:"desktop-library-consent__loading",children:"\u8BBF\u95EE\u8D44\u6599\u5E93\u5185\u5BB9"})]}),s&&jsx("div",{ref:m,className:"desktop-library-consent__webview","aria-hidden":"true"}),d&&jsx("p",{className:"desktop-library-consent__error",role:"alert",children:d}),jsxs("p",{className:"desktop-library-consent__foot",children:[jsx(mr,{"aria-hidden":"true"})," \u51ED\u8BC1\u4EC5\u4FDD\u5B58\u5728\u672C\u673A\uFF0C\u4EC5\u7528\u4E8E\u8BE5\u63D2\u4EF6\u3002"]}),jsxs("div",{className:"desktop-library-consent__actions",children:[jsx(f,{variant:"ghost",disabled:i==="deny",onClick:c,children:i==="deny"?"\u5904\u7406\u4E2D\u2026":"\u62D2\u7EDD"}),jsx(f,{variant:"primary",disabled:a||i!==null,onClick:l,children:i==="approve"?"\u6388\u6743\u4E2D\u2026":"\u540C\u610F\u6388\u6743"})]})]})})}function G4(e){let t=e.trim();return t?(Array.from(t)[0]??"\u8D44").toUpperCase():"\u8D44"}function Yj({loading:e=false,error:t=null,webviewHostRef:o}){return jsx("section",{className:"desktop-library-page","aria-label":"\u8D44\u6599\u5E93",children:jsx("div",{className:"desktop-library-page__content",children:t?jsxs("div",{className:"desktop-library-page__state",role:"alert",children:[jsx("strong",{children:"\u8D44\u6599\u5E93\u9875\u9762\u52A0\u8F7D\u5931\u8D25"}),jsx("span",{children:t})]}):o?jsx("div",{ref:o,className:"desktop-library-page__webview-host","aria-busy":e}):jsx("div",{className:"desktop-library-page__state",children:jsx("span",{children:"\u8D44\u6599\u5E93\u9875\u9762\u6B63\u5728\u542F\u52A8\u2026"})})})})}var td=296,od=210,io=16,rd=4;function oG({steps:e,index:t,anchorRect:o,onNext:r,onPrev:n,onSkip:a,onDone:i,position:d="fixed",className:s}){let l=useRef(null),[c,p]=useState(null);useLayoutEffect(()=>{let b=l.current;if(!b)return;let h=()=>{let k=b.getBoundingClientRect();p({width:k.width,height:k.height});};if(h(),typeof ResizeObserver>"u")return;let x=new ResizeObserver(h);return x.observe(b),()=>x.disconnect()},[]),useEffect(()=>{let b=h=>{h.key==="Escape"&&(h.preventDefault(),a());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[a]);let m=e[t];if(!m)return null;let u=t===0,v=t===e.length-1,w=J4(o??null,c);return jsxs("div",{ref:l,className:g("onboarding-tour",s),style:{position:d},role:"dialog","aria-modal":"true","aria-label":"\u65B0\u624B\u5F15\u5BFC",children:[o&&jsx("div",{"aria-hidden":"true",className:"onboarding-tour__ring",style:{position:"absolute",left:o.left-rd,top:o.top-rd,width:o.width+rd*2,height:o.height+rd*2}}),jsxs("div",{className:"onboarding-tour__card",style:{position:"absolute",left:w.left,top:w.top},children:[jsxs("div",{className:"onboarding-tour__head",children:[jsx("span",{className:"onboarding-tour__title",children:m.title}),jsxs("span",{className:"onboarding-tour__count",children:[t+1," / ",e.length]})]}),jsx("p",{className:"onboarding-tour__body",children:m.body}),jsxs("div",{className:"onboarding-tour__foot",children:[jsx(f,{variant:"ghost",size:"sm",onClick:a,children:"\u8DF3\u8FC7"}),jsx("span",{className:"onboarding-tour__spacer"}),!u&&jsx(f,{variant:"secondary",size:"sm",onClick:n,children:"\u4E0A\u4E00\u6B65"}),jsx(f,{variant:"primary",size:"sm",onClick:v?i??a:r,children:v?"\u5F00\u59CB\u4F7F\u7528":"\u4E0B\u4E00\u6B65"})]})]})]})}function J4(e,t){if(!t)return {left:io,top:io};let{width:o,height:r}=t;if(!e)return {left:Math.max(io,(o-td)/2),top:Math.max(io,(r-od)/2)};let n=e.left+e.width+io;n+td+io>o&&(n=e.left-td-io),n<io&&(n=Math.max(io,Math.min(o-td-io,e.left)));let a=e.top;return a+od+io>r&&(a=e.top-od-io),a<io&&(a=Math.max(io,Math.min(r-od-io,e.top))),{left:n,top:a}}var ad={width:192,height:208};function sb(e,t){return /^(?:[a-z][a-z\d+\-.]*:|\/)/i.test(t)?t:`${e}/${t}`}var o3=1.5,r3=8,$p=new Map;function a3(e,t){let o=`${e}:${t.columns}:${t.rows}:${t.cellWidth}:${t.cellHeight}`,r=$p.get(o);if(r)return r;let n=(async()=>{let a=await fetch(e);if(!a.ok)throw new Error(`Failed to load pet spritesheet: ${a.status}`);let i=await createImageBitmap(await a.blob()),d=document.createElement("canvas");d.width=t.cellWidth,d.height=t.cellHeight;let s=d.getContext("2d",{willReadFrequently:true});if(!s)throw new Error("Unable to inspect pet spritesheet");let l=t.cellWidth,c=t.cellHeight,p=-1,m=-1;try{for(let u=0;u<t.rows;u+=1)for(let v=0;v<t.columns;v+=1){s.clearRect(0,0,t.cellWidth,t.cellHeight),s.drawImage(i,v*t.cellWidth,u*t.cellHeight,t.cellWidth,t.cellHeight,0,0,t.cellWidth,t.cellHeight);let w=s.getImageData(0,0,t.cellWidth,t.cellHeight).data;for(let b=0;b<t.cellHeight;b+=1)for(let h=0;h<t.cellWidth;h+=1)w[(b*t.cellWidth+h)*4+3]<=r3||(l=Math.min(l,h),c=Math.min(c,b),p=Math.max(p,h),m=Math.max(m,b));}}finally{i.close();}return p>=l&&m>=c?{x:l,y:c,width:p-l+1,height:m-c+1}:{x:0,y:0,width:t.cellWidth,height:t.cellHeight}})().catch(a=>{throw $p.delete(o),a});return $p.set(o,n),n}var lb={idle:{row:0,frames:6,durationMs:1100},"running-right":{row:1,frames:8,durationMs:1060},"running-left":{row:2,frames:8,durationMs:1060},waving:{row:3,frames:4,durationMs:700},jumping:{row:4,frames:5,durationMs:840},failed:{row:5,frames:8,durationMs:1220},waiting:{row:6,frames:6,durationMs:1010},running:{row:7,frames:6,durationMs:820},review:{row:8,frames:6,durationMs:1030}};function n3(e){return typeof e=="object"?{left:e.x,top:e.y}:{[e.includes("bottom")?"bottom":"top"]:24,[e.includes("right")?"right":"left"]:24}}function i3(e){let t=typeof window>"u"?0:window.innerWidth,o=typeof window>"u"?0:window.innerHeight;return {horizontal:e.right!==void 0||typeof e.left=="number"&&e.left*2>t?"right":"left",vertical:e.bottom!==void 0||typeof e.top=="number"&&e.top*2>o?"bottom":"top"}}function s3({status:e}){let t={running:{label:"\u6267\u884C\u4E2D",icon:null},waiting:{label:"\u7B49\u5F85\u8F93\u5165",icon:No},review:{label:"\u5F85\u67E5\u770B",icon:Ar},completed:{label:"\u5DF2\u5B8C\u6210",icon:Ba},failed:{label:"\u5931\u8D25",icon:jo}}[e],o=t.icon;return jsx("span",{"data-ow-part":"session-status",title:t.label,role:"img","aria-label":t.label,children:o?jsx(o,{"aria-hidden":"true"}):null})}var lG=forwardRef(function({petBaseUrl:t="/uidocs/pets/ow-pet",manifest:o,animation:r="idle",position:n="bottom-right",scale:a=1,animationRate:i=1,draggable:d=true,trackPointer:s=true,toolbar:l=true,defaultBubble:c,persistKey:p,nativeWindow:m=false,nativeAnchor:u={horizontal:"right",vertical:"bottom"},onHideRequest:v,onContextMenuRequest:w,sessions:b=[],onSessionFeedback:h,onSessionStop:x,onContentSizeChange:k,onNativeDrag:y,className:P="",style:N,onReady:S,onError:R,onClick:M,onDoubleClick:T},_){let[D,I]=useState(o??null),[H,$]=useState(r),[E,V]=useState(0),[pe,W]=useState(null),[ce,Pe]=useState(c??""),[Fe,ee]=useState(false),q=useMemo(()=>n3(n),[n]),[A,L]=useState(()=>{if(!m&&typeof window<"u"&&p)try{let B=localStorage.getItem(p);if(B)return JSON.parse(B)}catch{}return q}),Y=useRef(null),Ee=useRef(null),[Ge,et]=useState(null),[ht,to]=useState(""),[Ze,U]=useState(null),[ke,j]=useState(false);useEffect(()=>{o||fetch(`${t}/pet.json`).then(B=>{if(!B.ok)throw new Error(`Failed to load pet manifest: ${B.status}`);return B.json()}).then(I).catch(B=>R?.(B instanceof Error?B:new Error(String(B))));},[o,t,R]),useEffect(()=>$(r),[r]),useEffect(()=>{if(U(null),j(false),!D)return;let B=D.spritesheetLayout??{columns:8,rows:11,cellWidth:ad.width,cellHeight:ad.height},ue=true;return a3(sb(t,D.spritesheetPath),B).then(rt=>{ue&&U(rt);}).catch(()=>{ue&&j(true);}),()=>{ue=false;}},[D,t]),useEffect(()=>{if(pe)return;let B=lb[H],ue=Number.isFinite(i)&&i>0?i:1,rt=setTimeout(()=>V(xt=>(xt+1)%B.frames),B.durationMs/B.frames/ue);return ()=>clearTimeout(rt)},[H,E,pe,i]);let Ie=useCallback((B,ue=3600)=>{Pe(B),Ee.current&&clearTimeout(Ee.current),ue>0&&(Ee.current=setTimeout(()=>Pe(""),ue));},[]),we=useCallback(B=>{if(B===null||!D?.lookDirections?.length)return W(null);let ue=(B%360+360)%360,rt=Uo=>Math.min(Math.abs(Uo-ue),360-Math.abs(Uo-ue)),xt=D.lookDirections.reduce((Uo,gi)=>rt(gi.degrees)<rt(Uo.degrees)?gi:Uo);W({row:xt.rowIndex,column:xt.columnIndex});},[D]),le=useCallback(()=>{L(q),p&&localStorage.removeItem(p);},[q,p]),ve=useMemo(()=>({playAnimation:B=>{W(null),V(0),$(B);},lookAt:we,say:Ie,hide:()=>{m?v?.():ee(true);},show:()=>ee(false),reset:le}),[we,Ie,le,m,v]);useImperativeHandle(_,()=>ve,[ve]),useEffect(()=>{D&&S?.(ve,D);},[D,ve,S]),useEffect(()=>{let B=Y.current;if(!B||!k)return;let ue=()=>{let xt=B.getBoundingClientRect();k({width:Math.ceil(xt.width),height:Math.ceil(xt.height)});};if(ue(),typeof ResizeObserver>"u")return;let rt=new ResizeObserver(ue);return rt.observe(B),()=>rt.disconnect()},[D,k]);let X=useRef(null),Ce=useRef(null),de=useRef(false),Wo=B=>{if(!d||B.button!==0)return;if(de.current=false,m){Ce.current={pointerId:B.pointerId,startX:B.screenX,startY:B.screenY,started:false},B.currentTarget.setPointerCapture(B.pointerId);return}let ue=Y.current,rt=ue?.getBoundingClientRect();if(!ue||!rt)return;let xt=ue.offsetParent,Uo=xt?.getBoundingClientRect(),gi=window.getComputedStyle(ue).position==="fixed";X.current={x:B.clientX,y:B.clientY,left:gi?rt.left:rt.left-(Uo?.left??0)-(xt?.clientLeft??0)+(xt?.scrollLeft??0),top:gi?rt.top:rt.top-(Uo?.top??0)-(xt?.clientTop??0)+(xt?.scrollTop??0)},B.currentTarget.setPointerCapture(B.pointerId);},cr=B=>{let ue=Ce.current;if(ue&&ue.pointerId===B.pointerId){!ue.started&&Math.hypot(B.screenX-ue.startX,B.screenY-ue.startY)>=4&&(ue.started=true,de.current=true,y?.({phase:"start",screenX:ue.startX,screenY:ue.startY})),ue.started&&y?.({phase:"move",screenX:B.screenX,screenY:B.screenY});return}if(X.current){L({left:Math.round(X.current.left+B.clientX-X.current.x),top:Math.round(X.current.top+B.clientY-X.current.y)});return}if(s&&Y.current){let rt=Y.current.getBoundingClientRect(),xt=B.clientX-(rt.left+rt.width/2),Uo=B.clientY-(rt.top+rt.height/2);Math.hypot(xt,Uo)>28?we((Math.atan2(xt,-Uo)*180/Math.PI+360)%360):we(null);}},Ws=B=>{let ue=Ce.current;if(ue&&ue.pointerId===B.pointerId){ue.started&&y?.({phase:"end",screenX:B.screenX,screenY:B.screenY}),Ce.current=null;return}X.current&&p&&localStorage.setItem(p,JSON.stringify(A)),X.current=null;},mi=B=>{de.current||B?.();},du=m?{}:A,cu=m?u:i3(A);if(!D)return jsx("div",{"data-slot":"desktop-pet","data-ow-state":"loading","data-ow-variant":m?"native":void 0,className:P,style:{...du,...N}});let pr=D.spritesheetLayout??{columns:8,rows:11,cellWidth:ad.width,cellHeight:ad.height},fi=Ze??{x:0,y:0,width:pr.cellWidth,height:pr.cellHeight},pu=pe??{row:lb[H].row,column:E},Yb=sb(t,D.spritesheetPath),Xb={position:"relative",width:Math.round(fi.width*a),height:Math.round(fi.height*a)},Qb=m?{width:Math.round(fi.width*o3)}:void 0,Jb={position:"absolute",left:-Math.round(fi.x*a),top:-Math.round(fi.y*a),width:pr.cellWidth,height:pr.cellHeight,backgroundImage:`url(${Yb})`,backgroundRepeat:"no-repeat",backgroundSize:`${pr.columns*pr.cellWidth}px ${pr.rows*pr.cellHeight}px`,backgroundPosition:`${-pu.column*pr.cellWidth}px ${-pu.row*pr.cellHeight}px`,transform:`scale(${a})`,transformOrigin:"top left"},uu=l===true?[{key:"wave",label:"\u6253\u62DB\u547C",icon:jsx(Bd,{"aria-hidden":"true"}),onClick:B=>B.playAnimation("waving")},{key:"work",label:"\u5DE5\u4F5C",icon:jsx(Ad,{"aria-hidden":"true"}),onClick:B=>B.playAnimation("running")},{key:"hide",label:"\u9690\u85CF",icon:jsx(Q,{"aria-hidden":"true"}),onClick:B=>B.hide()}]:Array.isArray(l)?l:[],mu=B=>{let ue=ht.trim();ue&&(h?.(B,ue),to(""),et(null));};return jsxs("div",{ref:Y,"data-slot":"desktop-pet","data-ow-variant":m?"native":void 0,className:P,"data-hidden":Fe,"data-anchor-horizontal":cu.horizontal,"data-anchor-vertical":cu.vertical,style:{...du,...N},onPointerMove:cr,onPointerUp:Ws,onPointerCancel:Ws,onPointerLeave:()=>!X.current&&we(null),children:[b.length>0&&jsx("div",{"data-ow-part":"sessions",style:Qb,"aria-label":"\u6B63\u5728\u6267\u884C\u7684\u4EFB\u52A1",children:b.map(B=>{let ue=B.status==="completed"||B.status==="failed",rt=Ge===B.sessionId;return jsxs("section",{"data-ow-part":"session","data-status":B.status,children:[jsxs("div",{"data-ow-part":"session-main",children:[jsxs("div",{"data-ow-part":"session-content",children:[jsxs("div",{"data-ow-part":"session-heading",children:[jsx(s3,{status:B.status}),jsx("strong",{title:B.title,children:B.title})]}),B.text&&jsx("p",{title:B.text,children:B.text})]}),!ue&&jsxs("div",{"data-ow-part":"session-actions",children:[B.canFeedback!==false&&jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"session-action",title:"\u53CD\u9988","aria-label":"\u53CD\u9988","aria-expanded":rt,icon:jsx(Mi,{"aria-hidden":"true"}),onClick:()=>{et(rt?null:B.sessionId),to("");}}),B.canStop!==false&&jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"session-action","data-ow-variant":"stop",title:"\u505C\u6B62","aria-label":"\u505C\u6B62",icon:jsx(Ia,{"aria-hidden":"true"}),onClick:()=>x?.(B.sessionId)})]})]}),rt&&jsxs("div",{"data-ow-part":"feedback",children:[jsx(te,{autoFocus:true,standalone:false,value:ht,maxLength:500,placeholder:"\u5411\u8BE5\u4EFB\u52A1\u53D1\u9001\u53CD\u9988","aria-label":`\u7ED9 ${B.title} \u7684\u53CD\u9988`,onChange:to,onKeyDown:xt=>{xt.key==="Enter"&&!xt.nativeEvent.isComposing&&mu(B.sessionId),xt.key==="Escape"&&et(null);}}),jsx(f,{variant:"primary",size:"sm",type:"button",disabled:!ht.trim(),onClick:()=>mu(B.sessionId),children:"\u53D1\u9001"})]})]},B.sessionId)})}),uu.length>0&&jsx("div",{"data-ow-part":"toolbar",children:uu.map(B=>jsx(f,{variant:"ghost",size:"sm",type:"button",title:B.label,icon:B.icon,onClick:()=>B.onClick(ve)},B.key))}),jsx("div",{"data-ow-part":"stage",style:Xb,onPointerDown:Wo,onContextMenu:B=>{B.preventDefault(),w?.();},onClick:()=>mi(M),onDoubleClick:()=>mi(T),role:"img","aria-label":D.displayName,children:ke?jsx("div",{"data-ow-part":"sprite-fallback",title:D.displayName,children:jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.45"}),jsx("circle",{cx:"12",cy:"4",r:"2.25",fill:"currentColor"}),jsx("circle",{cx:"17.6",cy:"7.2",r:"1.5",fill:"currentColor",opacity:"0.68"}),jsx("circle",{cx:"19.4",cy:"13",r:"1.1",fill:"currentColor",opacity:"0.45"}),jsx("circle",{cx:"15.8",cy:"17.8",r:"0.8",fill:"currentColor",opacity:"0.25"})]})}):jsx("div",{"data-ow-part":"sprite",style:Jb})}),jsx("div",{"data-ow-part":"bubble","data-visible":!!ce,children:ce})]})});function db({selected:e,title:t,description:o,leading:r,badge:n,actionLabel:a,actionAriaLabel:i,onSelect:d,onAction:s}){return jsxs("div",{className:`desktop-selection-card${e?" is-selected":""}`,children:[jsxs(f,{type:"button","data-ow-part":"card-select",variant:"unstyled",className:"desktop-selection-card__select ow-focus-ring",role:"radio","aria-checked":e,onClick:d,children:[r&&jsx("span",{className:"desktop-selection-card__leading","aria-hidden":"true",children:r}),jsxs("span",{className:"desktop-selection-card__copy",children:[jsx("span",{className:"desktop-selection-card__title",children:t}),o&&jsx("span",{className:"desktop-selection-card__description",children:o})]}),n&&jsx("span",{className:"desktop-selection-card__badge",children:n}),e&&jsx("span",{className:"desktop-selection-card__check","aria-hidden":"true",children:jsx(be,{})})]}),a&&s&&jsx(f,{type:"button","data-ow-part":"card-action",variant:"unstyled",className:"desktop-selection-card__action ow-focus-ring","aria-label":i??a,onClick:s,children:a})]})}var nd="px-0 py-3.5 gap-4";function xG(e){return jsxs("div",{className:"desktop-pet-settings",children:[jsx(dt,{title:"\u663E\u793A\u684C\u9762\u5BA0\u7269",description:"\u5728\u684C\u9762\u4E0A\u663E\u793A\u72EC\u7ACB\u7684 Orbitwork \u5BA0\u7269\u7A97\u53E3",control:"switch",checked:e.enabled,onCheckedChange:e.onEnabledChange,className:nd}),jsx(dt,{title:"\u59CB\u7EC8\u7F6E\u9876",description:"\u5207\u6362\u5230\u5176\u4ED6\u8F6F\u4EF6\u6216\u5168\u5C4F\u7A7A\u95F4\u65F6\uFF0C\u5BA0\u7269\u4ECD\u663E\u793A\u5728\u6700\u4E0A\u5C42",control:"switch",checked:e.alwaysOnTop,onCheckedChange:e.onAlwaysOnTopChange,className:nd}),jsx(dt,{title:"\u5BA0\u7269\u5927\u5C0F",description:"\u8C03\u6574\u5BA0\u7269\u5728\u684C\u9762\u4E0A\u7684\u663E\u793A\u5C3A\u5BF8",className:nd,action:jsxs("label",{className:"desktop-pet-settings__range",children:[jsx("input",{"aria-label":"\u5BA0\u7269\u5927\u5C0F",type:"range",min:"0.5",max:"1.5",step:"0.1",value:e.scale,onChange:t=>e.onScaleChange(Number(t.target.value))}),jsxs("span",{className:"ow-font-mono tabular-nums",children:[Math.round(e.scale*100),"%"]})]})}),jsx(dt,{title:"\u52A8\u753B\u901F\u7387",description:"\u8C03\u6574\u5BA0\u7269\u52A8\u4F5C\u7684\u64AD\u653E\u901F\u5EA6",className:nd,action:jsxs("label",{className:"desktop-pet-settings__range",children:[jsx("input",{"aria-label":"\u52A8\u753B\u901F\u7387",type:"range",min:"0.5",max:"2",step:"0.1",value:e.animationRate,onChange:t=>e.onAnimationRateChange(Number(t.target.value))}),jsxs("span",{className:"ow-font-mono tabular-nums",children:[e.animationRate.toFixed(1),"\xD7"]})]})}),jsx(va,{title:"\u9009\u62E9\u5BA0\u7269",children:jsx("div",{className:"desktop-selection-grid",role:"radiogroup","aria-label":"\u9009\u62E9\u5BA0\u7269",children:e.pets.map(t=>jsx(db,{selected:t.id===e.selectedPetId,title:t.displayName,description:t.description||(t.builtIn?"Orbitwork \u5185\u7F6E\u5BA0\u7269":"\u81EA\u5B9A\u4E49\u5BA0\u7269"),leading:jsx("span",{className:"desktop-pet-settings__avatar",children:jsx(fm,{name:"agent",size:20})}),badge:t.builtIn?"\u5185\u7F6E":void 0,onSelect:()=>e.onSelect(t.id)},t.id))})}),jsx(va,{className:"desktop-pet-settings__import",title:"\u5BFC\u5165\u81EA\u5B9A\u4E49\u5BA0\u7269",description:"\u652F\u6301 Orbitwork v2 \u4E0E Petdex v1/v2 \u5BA0\u7269\u3002\u5B89\u88C5 Petdex \u5BA0\u7269\u540E\uFF0C\u9009\u62E9\u5176 pet.json\uFF0C\u5E76\u786E\u4FDD\u56FE\u96C6\u6587\u4EF6\u4F4D\u4E8E\u540C\u4E00\u76EE\u5F55\u3002",divider:false,actions:jsx(f,{className:"desktop-pet-settings__import-button",variant:"secondary",size:"sm",disabled:e.importing,onClick:e.onImport,children:e.importing?"\u5BFC\u5165\u4E2D\u2026":"\u5BFC\u5165\u5BA0\u7269"})})]})}function CG({label:e,tone:t="running",className:o=""}){let r=`desktop-run-status desktop-run-status--${t}${o?` ${o}`:""}`;return jsxs("span",{className:r,role:"status",title:e,children:[jsx("span",{className:"desktop-run-status__dot","aria-hidden":"true"}),jsx("span",{className:"desktop-run-status__label",children:e})]})}var d3=["font-medium leading-none m-0","text-[length:var(--ow-fs-eyebrow-cjk,12px)]","tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]","text-[color:var(--ow-eyebrow)]"].join(" "),pb=["[font-family:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]","text-[length:var(--ow-fs-caption,12px)] leading-[1.4] text-[color:var(--ow-text-3)]"].join(" "),ub=["shrink-0 [border-radius:var(--ow-radius-xs)]","text-[color:var(--ow-text-2)] hover:text-[color:var(--ow-text)]"].join(" ");function IG({sections:e,query:t,onQueryChange:o,filter:r=true,editingId:n,onEdit:a,onCancelEdit:i,onSave:d,onDelete:s,emptyTitle:l="\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BB0\u5FC6",emptyMessage:c="\u5728\u5BF9\u8BDD\u91CC\u8BA9\u5B83\u8BB0\u4F4F\u91CD\u8981\u4FE1\u606F\uFF0C\u6216\u7531\u4EFB\u52A1\u81EA\u52A8\u6C89\u6DC0\u3002",saveErrorMessage:p="\u6CA1\u80FD\u4FDD\u5B58\u8FD9\u6761\u8BB0\u5FC6\uFF0C\u6539\u52A8\u8FD8\u7559\u5728\u6846\u91CC\uFF0C\u53EF\u4EE5\u76F4\u63A5\u91CD\u8BD5\u3002",className:m}){let[u,v]=useState(""),[w,b]=useState(null),[h,x]=useState({id:null,text:""}),[k,y]=useState(false),[P,N]=useState(null),S=t??u,R=n!==void 0?n:w,M=e.reduce((W,ce)=>W+ce.items.length,0),T=R?e.flatMap(W=>W.items).find(W=>W.id===R):void 0,_=h.id===R?h.text:T?.text??"",D=W=>{t===void 0&&v(W),o?.(W);},I=W=>{N(null),x({id:R??null,text:W});},H=W=>{N(null),x({id:W.id,text:W.text}),n===void 0&&b(W.id),a?.(W);},$=()=>{N(null),x({id:null,text:""}),n===void 0&&b(null),i?.();},E=async W=>{let ce=_.trim();if(!(!ce||k)){y(true),N(null);try{await d?.(W,ce),x({id:null,text:""}),n===void 0&&b(null);}catch(Pe){let Fe=Pe instanceof Error?Pe.message:typeof Pe=="string"?Pe:void 0;N({id:W.id,detail:Fe?.trim()||void 0});}finally{y(false);}}};if(M===0)return jsx("div",{"data-slot":"settings-memory",className:g("flex flex-col min-w-0",m),children:jsx(F,{size:"page",title:l,message:c})});let V=S.trim().toLowerCase(),pe=e.map(W=>({...W,items:r&&V?W.items.filter(ce=>ce.text.toLowerCase().includes(V)):W.items})).filter(W=>W.items.length>0);return jsxs("div",{"data-slot":"settings-memory",className:g("flex flex-col gap-3.5 min-w-0",m),children:[jsx(te,{type:"search",value:S,onChange:D,placeholder:"\u641C\u7D22\u8BB0\u5FC6","aria-label":"\u641C\u7D22\u8BB0\u5FC6",prefix:jsx($t,{})}),pe.length===0?jsx(F,{message:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6\uFF0C\u6362\u4E2A\u8BCD\u8BD5\u8BD5\u3002"}):pe.map(W=>jsxs("section",{"data-ow-part":"group",className:"flex flex-col gap-0 min-w-0",children:[jsxs("div",{"data-ow-part":"group-head",className:"flex items-baseline gap-2 min-w-0 pb-1",children:[jsx("h3",{"data-ow-part":"group-title",className:d3,children:W.title}),W.description&&jsx("span",{"data-ow-part":"group-desc",className:"truncate text-[length:var(--ow-fs-caption,12px)] leading-[1.4] text-[color:var(--ow-text-3)]",children:W.description}),jsx("span",{className:"flex-1"}),jsxs("span",{"data-ow-part":"group-count",className:g("shrink-0",pb),children:[W.items.length," \u6761"]})]}),W.items.map(ce=>{let Pe=ce.id===R;return jsxs("div",{"data-ow-part":"row","data-ow-state":Pe?"editing":void 0,className:"flex items-start gap-3 min-w-0 px-0 py-3 border-[color:var(--ow-border)] [[data-ow-part=row]+&]:border-t",children:[jsx("div",{className:"flex-1 min-w-0 flex flex-col gap-1",children:Pe?jsxs(Fragment,{children:[jsx(te,{multiline:true,rows:2,autoFocus:true,value:_,onChange:I,"aria-label":"\u7F16\u8F91\u8BB0\u5FC6",className:"[&_[data-ow-part=shell]]:[border-radius:var(--ow-radius-sm)] [&_textarea]:resize-none [&_textarea]:min-h-0 [&_textarea]:leading-[1.6]"}),P?.id===ce.id&&jsx("div",{"data-ow-part":"save-error",children:jsx(J,{variant:"error",detail:P.detail,children:p})}),jsxs("div",{className:"flex gap-2 pt-0.5",children:[jsx(f,{variant:"primary",size:"sm",disabled:!_.trim()||k,onClick:()=>{E(ce);},children:P?.id===ce.id?"\u91CD\u8BD5":"\u4FDD\u5B58"}),jsx(f,{variant:"secondary",size:"sm",disabled:k,onClick:$,children:"\u53D6\u6D88"})]})]}):jsxs(Fragment,{children:[jsx("div",{"data-ow-part":"text",className:"text-ow-fs-ui leading-[1.7] text-[color:var(--ow-text)] [text-wrap:pretty]",children:ce.text}),(ce.sourceLabel||ce.when)&&jsxs("div",{"data-ow-part":"meta",className:"flex items-center gap-2 min-w-0",children:[ce.sourceLabel&&jsx(Nt,{tone:"mute",children:ce.sourceLabel}),ce.when&&jsx("span",{className:pb,children:ce.when})]})]})}),!Pe&&jsxs(Fragment,{children:[jsx(f,{variant:"ghost",size:"sm",className:ub,icon:jsx(yt,{}),title:"\u7F16\u8F91","aria-label":"\u7F16\u8F91",onClick:()=>H(ce)}),jsx(f,{variant:"ghost",size:"sm",className:g(ub,"hover:text-[color:var(--ow-danger)]"),icon:jsx(Le,{}),title:"\u5220\u9664","aria-label":"\u5220\u9664",onClick:()=>s?.(ce)})]})]},ce.id)})]},W.id))]})}function zG({items:e,activeId:t,title:o,description:r,children:n,onChange:a,onClose:i,open:d=true,version:s,portal:l=true,className:c=""}){let p=e.find(u=>u.id===t),m=r??p?.description;return jsxs(oe,{bare:true,fitViewport:false,open:d,portal:l,onClose:i,ariaLabel:"\u8BBE\u7F6E",className:`settings-dialog ${c}`.trim(),children:[jsxs("div",{className:"settings__nav",children:[jsx("div",{className:"ttl",children:"\u8BBE\u7F6E"}),e.map(u=>jsx(f,{variant:"unstyled",type:"button",className:`snav${u.id===t?" active":""}`,"aria-current":u.id===t?"true":void 0,onClick:()=>a(u.id),children:jsx("span",{className:"snav__label",children:u.label})},u.id)),s&&jsx("div",{className:"settings__ver",children:s})]}),jsxs("div",{className:"settings__main",tabIndex:-1,"data-autofocus":"",children:[jsxs("div",{className:"settings__top",children:[jsxs("div",{className:"settings__heading",children:[jsx("h1",{className:"h",children:o??p?.label}),m&&jsx("div",{className:"settings__desc",children:m})]}),jsx(f,{variant:"unstyled",className:"x",onClick:i,title:"\u5173\u95ED\u8BBE\u7F6E","aria-label":"\u5173\u95ED\u8BBE\u7F6E",children:jsx(Q,{})})]}),jsx("div",{className:"settings__content",children:jsx("div",{className:"settings__col",children:n})})]})]})}function HG({title:e,description:t,disabled:o,children:r}){return jsx(dt,{title:e,description:t,action:r??null,disabled:o,className:"set-row"})}function WG({value:e,disabled:t=false}){return jsxs("div",{className:`sel${t?" disabled":""}`,children:[e,!t&&jsx(ae,{})]})}function GG({allSelected:e,selectedCount:t,onToggleAll:o,onCancel:r,onShare:n}){return jsxs("div",{className:"share-pick-bar",role:"toolbar","aria-label":"\u9009\u62E9\u8981\u5206\u4EAB\u7684\u6D88\u606F",children:[jsx(f,{variant:"secondary",size:"sm",className:"share-pick-bar__all","aria-pressed":e,onClick:o,children:"\u5168\u9009 / \u5168\u4E0D\u9009"}),jsxs("span",{className:"share-pick-bar__count","aria-live":"polite",children:["\u5DF2\u9009 ",jsx("span",{className:"share-pick-bar__count-value",children:t})," \u6BB5"]}),jsx(f,{variant:"secondary",size:"sm",onClick:r,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",size:"sm",onClick:n,children:"\u751F\u6210\u5206\u4EAB\u56FE"})]})}var m3=cva(["flex-shrink-0 relative bg-ow-bg shadow-none","transition-[width,min-width] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]"].join(" "),{variants:{dragging:{true:"transition-none",false:""},stacked:{true:"flex flex-col",false:""}},defaultVariants:{dragging:false,stacked:false}}),f3=cva("flex flex-col overflow-hidden",{variants:{fill:{true:"flex-1 min-h-0",false:"h-full"}},defaultVariants:{fill:false}}),g3=cva(["flex items-center flex-shrink-0 select-none","h-[var(--ow-titlebar-h)] min-h-[var(--ow-titlebar-h)]","gap-[var(--ow-titlebar-gap)] px-[var(--ow-titlebar-pad-x)]","bg-ow-bg","[-webkit-app-region:drag]"].join(" ")),v3=cva("flex-shrink-0 px-3 pt-2 pb-2"),b3=cva("flex-1 min-h-0 overflow-y-auto overflow-x-hidden pt-0 px-2 pb-3 flex flex-col"),w3=cva("flex-shrink-0 px-3 py-2 border-t border-[color:var(--ow-border)]"),gb=cva("absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-[var(--ow-border-strong)] transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]"),vb=240;function Os({collapsed:e=false,onCollapsedChange:t,width:o,onWidthChange:r,collapsedWidth:n,minWidth:a=200,maxWidth:i=480,resizable:d=true,platform:s,fullscreen:l=false,unstyled:c=false,header:p,footer:m,children:u,className:v=""}){let[w,b]=useState(false),h=useRef(0),x=useRef(o??vb),k=useCallback($=>{!d||e||($.preventDefault(),b(true),h.current=$.clientX,x.current=o??vb);},[d,e,o]);useEffect(()=>{if(!w)return;let $=V=>{let pe=V.clientX-h.current,W=Math.min(i,Math.max(a,x.current+pe));r?.(W);},E=()=>b(false);return document.addEventListener("mousemove",$),document.addEventListener("mouseup",E),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",E),document.body.style.cursor="",document.body.style.userSelect="";}},[w,i,a,r]);let y=o??"var(--ow-sidebar-w)",P=s!=null&&s!=="windows",N=s==="mac"&&!l,S=N?"var(--ow-sidebar-collapsed-w-mac)":P?"var(--ow-sidebar-collapsed-w)":0,R=e&&n!=null&&n>0,M=e&&n===0,T=e&&P&&!R&&!M,_=e&&!R&&!T,D=M?0:e?R?n:S:y,I=R?n:y,H=c?v:g(m3({dragging:w,stacked:P}),v);return jsx("aside",{"data-slot":"sidebar","data-ow-platform":s,"data-ow-collapsed":e?"":void 0,className:H,style:c?void 0:{width:D,minWidth:D},children:c?jsxs(Fragment,{children:[u,d&&!e&&jsx("div",{"data-slot":"sidebar-resize-handle",className:gb(),onMouseDown:k})]}):jsxs(Fragment,{children:[P&&jsxs("div",{"data-slot":"sidebar-toprow","data-ow-floating":_?"":void 0,className:_?"absolute top-0 left-0 w-max flex items-center flex-shrink-0 select-none h-[var(--ow-titlebar-h)] min-h-[var(--ow-titlebar-h)] gap-[var(--ow-titlebar-gap)] px-[var(--ow-titlebar-pad-x)] pointer-events-none [&_[data-slot=sidebar-toggle]]:pointer-events-auto":g3(),children:[N&&jsx("div",{"aria-hidden":"true","data-slot":"sidebar-traffic-inset",className:"w-[var(--ow-traffic-inset)] h-full flex-shrink-0"}),jsx(bc,{collapsed:e,onToggle:()=>t?.(!e)})]}),!_&&!T&&jsxs("div",{"data-slot":"sidebar-inner",className:f3({fill:P}),style:{width:I},children:[p&&jsx("div",{"data-slot":"sidebar-header",className:v3(),children:p}),jsx("div",{"data-slot":"sidebar-body",className:b3(),children:u}),m&&jsx("div",{"data-slot":"sidebar-footer",className:w3(),children:m})]}),d&&!e&&jsx("div",{"data-slot":"sidebar-resize-handle",className:gb(),onMouseDown:k})]})})}function gZ(e){let{projects:t}=e,{isImeEnter:o,onCompositionStart:r,onCompositionEnd:n}=Dt(),[a,i]=useState(false),[d,s]=useState(null),l=useRef(null),c=A=>{s(null),l.current?.focus();},[p,m]=useState(null),[u,v]=useState(null),[w,b]=useState(null),[h,x]=useState(null),[k,y]=useState(null),[P,N]=useState(null),[S,R]=useState(null),[M,T]=useState(null),[_,D]=useState(false),[I,H]=useState(null),[$,E]=useState(null),[V,pe]=useState(false),[W,ce]=useState(false);useEffect(()=>{if(!p&&!u&&!w)return;let A=()=>{m(null),v(null),b(null);},L=window.setTimeout(()=>window.addEventListener("click",A),0);return ()=>{window.clearTimeout(L),window.removeEventListener("click",A);}},[p,u,w]),useEffect(()=>{if(!d)return;let A=()=>s(null),L=Y=>{Y.key==="Escape"&&c();};return window.addEventListener("click",A),window.addEventListener("keydown",L),window.addEventListener("blur",A),()=>{window.removeEventListener("click",A),window.removeEventListener("keydown",L),window.removeEventListener("blur",A);}},[d]),useEffect(()=>{e.update?.state!=="ready"&&pe(false);},[e.update?.state]);let Pe=A=>t.flatMap(L=>L.threads).find(L=>L.id===A),Fe=()=>{H(null),E(null);},ee=async()=>{if(!h)return;let A=h,L=A.value.trim();if(x(null),!!L)try{await e.onRenameThread(A.id,L);}catch{x(A);}},q=async()=>{if(!k)return;let A=k,L=A.value.trim();if(y(null),!!L)try{await e.onRenameProject(A.id,L);}catch{y(A);}};return jsxs(Os,{collapsed:e.collapsed,onCollapsedChange:e.onCollapsedChange,width:e.width,onWidthChange:e.onWidthChange,minWidth:180,maxWidth:400,platform:e.platform,fullscreen:e.fullscreen,collapsedWidth:e.collapsedWidth,children:[jsx("div",{className:"owbrand",children:jsx(sc,{theme:"auto",size:20})}),jsxs("nav",{className:"ownav",children:[jsx(Vs,{id:"new",label:"\u65B0\u4EFB\u52A1",title:e.newTaskTitle,active:e.activeNav==="new",icon:jsx(xd,{}),onClick:()=>e.onNewTask()}),jsx(Vs,{id:"skills",label:"\u63D2\u4EF6",title:"\u63D2\u4EF6",active:e.activeNav==="skills",icon:jsx(Ld,{}),onClick:()=>e.onNavigate("skills")}),jsx(Vs,{id:"sites",label:"\u5DE5\u4F5C\u53F0",title:"\u5DE5\u4F5C\u53F0",active:e.activeNav==="sites",icon:jsx(Ir,{}),onClick:()=>e.onNavigate("sites")}),jsx(Vs,{id:"cron",label:"\u5B9A\u65F6\u4EFB\u52A1",title:"\u5B9A\u65F6\u4EFB\u52A1",active:e.activeNav==="cron",icon:jsx(No,{}),onClick:()=>e.onNavigate("cron")}),e.showWorkspaceNav&&jsx(Vs,{id:"files",label:"\u6211\u7684\u7A7A\u95F4",title:"\u6211\u7684\u7A7A\u95F4",active:e.activeNav==="files",icon:jsx(hi,{}),onClick:()=>e.onNavigate("files")})]}),jsxs("div",{className:"owrecent-head","data-tour-anchor":"projects",children:[jsx("div",{className:"t",children:"\u9879\u76EE"}),jsxs("div",{className:"owrecent-actions",children:[jsx(f,{variant:"unstyled",title:"\u66F4\u591A\u9879\u76EE\u64CD\u4F5C","aria-label":"\u66F4\u591A\u9879\u76EE\u64CD\u4F5C",onClick:A=>{A.stopPropagation();let L=A.currentTarget.getBoundingClientRect();b({left:L.right+6,top:L.top});},children:jsx(Ko,{})}),jsx(f,{variant:"unstyled",title:"\u65B0\u5EFA\u9879\u76EE","aria-label":"\u65B0\u5EFA\u9879\u76EE",onClick:()=>i(true),children:jsx(He,{})})]})]}),jsx("div",{className:"owprojects",children:t.map(A=>jsxs("div",{className:"owproject",children:[k?.id===A.id?jsxs("div",{className:"owproject__head renaming",children:[jsx(qe,{className:"project-icon"}),jsx(Cr,{unstyled:true,autoFocus:true,value:k.value,onChange:L=>y({id:A.id,value:L.target.value}),onBlur:()=>{q();},onCompositionStart:r,onCompositionEnd:n,onKeyDown:L=>{o(L)||(L.key==="Enter"&&q(),L.key==="Escape"&&y(null));}})]}):jsxs("div",{className:`owproject__head${A.open?"":" collapsed"}${$===A.id?" drop-target":""}`,onDragOver:L=>{I&&(L.preventDefault(),L.dataTransfer.dropEffect="move",E(A.id));},onDragLeave:L=>{let Y=L.relatedTarget;Y instanceof Node&&L.currentTarget.contains(Y)||E(Ee=>Ee===A.id?null:Ee);},onDrop:L=>{L.preventDefault();let Y=L.dataTransfer.getData("application/x-owthread-id")||I;Fe(),Y&&e.onMoveThread(Y,A.id).catch(()=>{});},children:[jsxs(f,{variant:"unstyled",className:"owproject__head-main",title:A.label,"aria-expanded":A.open,onClick:()=>e.onToggleProject(A.id),children:[A.open?jsx(ae,{className:"caret"}):jsx(he,{className:"caret"}),jsx(qe,{className:"project-icon"}),jsx("span",{className:"lbl",children:A.label})]}),jsx(f,{variant:"unstyled",className:"more",title:"\u9879\u76EE\u64CD\u4F5C","aria-label":`${A.label} \u7684\u9879\u76EE\u64CD\u4F5C`,"aria-haspopup":"menu",onClick:L=>{L.stopPropagation();let Y=L.currentTarget.getBoundingClientRect();m(null),v({id:A.id,label:A.label,isDefault:A.isDefault,left:Y.right+6,top:Y.top});},children:jsx(Ko,{})})]}),A.open&&jsxs("div",{className:"owthreads",children:[A.threads.map(L=>h?.id===L.id?jsx("div",{className:"owthread renaming",children:jsx(Cr,{unstyled:true,autoFocus:true,value:h.value,onChange:Y=>x({id:L.id,value:Y.target.value}),onBlur:()=>{ee();},onCompositionStart:r,onCompositionEnd:n,onKeyDown:Y=>{o(Y)||(Y.key==="Enter"&&ee(),Y.key==="Escape"&&x(null));}})},L.id):jsxs("div",{className:`owthread${L.active?" active":""}${I===L.id?" dragging":""}`,draggable:!L.running,onDragStart:Y=>{L.running||(H(L.id),Y.dataTransfer.effectAllowed="move",Y.dataTransfer.setData("application/x-owthread-id",L.id));},onDragEnd:Fe,children:[jsxs(f,{variant:"unstyled",className:"owthread__main",title:L.title,onClick:()=>e.onSelectThread(L.id),children:[L.unread&&jsx("span",{className:"dot",title:"\u672A\u8BFB","aria-label":"\u672A\u8BFB",role:"img"}),jsx("span",{className:"lbl",children:L.title}),L.running&&jsx("span",{className:"run-dot",title:"\u4EFB\u52A1\u6B63\u5728\u6267\u884C","aria-label":"\u4EFB\u52A1\u6B63\u5728\u6267\u884C",role:"img"}),L.running&&L.runningCount&&jsx("span",{className:"run-cnt",title:"\u4EFB\u52A1\u8FDB\u5EA6",children:L.runningCount})]}),jsxs("span",{className:`thread-trailing${L.sourceIcon||L.branched||L.archived?" has-marks":""}`,children:[jsxs("span",{className:"thread-status-marks",children:[L.sourceIcon&&jsx("span",{className:"thread-source-mark",title:L.sourceLabel?`${L.sourceLabel}\u4F1A\u8BDD`:"IM \u4F1A\u8BDD",children:jsx(ta,{name:L.sourceIcon,size:16})}),L.branched&&jsx("span",{className:"thread-branch-mark",title:"\u5206\u652F\u4F1A\u8BDD",children:jsx(Po,{})}),L.archived&&jsx("span",{className:"thread-archive-mark",title:"\u5DF2\u5F52\u6863",children:jsx(Ni,{})})]}),jsx(f,{variant:"unstyled",className:"more",title:"\u66F4\u591A","aria-label":`${L.title} \u7684\u66F4\u591A\u64CD\u4F5C`,"aria-haspopup":"menu",onClick:Y=>{Y.stopPropagation();let Ee=Y.currentTarget.getBoundingClientRect();v(null),m({id:L.id,left:Ee.right+6,top:Ee.top});},children:jsx(Ko,{})})]})]},L.id)),A.threads.length===0&&jsxs(f,{variant:"unstyled",className:"owthread-new",onClick:()=>e.onNewTask(A.id),children:[jsx(He,{})," \u65B0\u5EFA\u4EFB\u52A1"]}),A.canLoadMore&&jsxs(f,{variant:"unstyled",className:`owthread-more${A.loadError?" error":""}`,disabled:A.loadingMore,onClick:()=>e.onLoadMore(A.id),children:[jsx(ae,{className:"lead","aria-hidden":"true"}),A.loadingMore?"\u52A0\u8F7D\u4E2D\u2026":A.loadError?"\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5":"\u5C55\u5F00\u663E\u793A"]})]})]},A.id))}),w&&jsx(Up,{anchor:w,children:jsx(pt,{width:168,autoAdjust:true,items:[{key:"refresh",label:"\u5237\u65B0",icon:jsx(We,{})},{key:"archived",label:e.showArchived?"\u9690\u85CF\u5DF2\u5F52\u6863":"\u663E\u793A\u5DF2\u5F52\u6863",icon:jsx(Ni,{})}],onSelect:A=>{b(null),A==="refresh"&&e.onRefreshProjects(),A==="archived"&&e.onShowArchivedChange(!e.showArchived);}})}),p&&jsx(Up,{anchor:p,children:jsx(pt,{width:160,autoAdjust:true,items:[{key:"rename",label:"\u91CD\u547D\u540D",icon:jsx(yt,{}),disabled:!!Pe(p.id)?.archived},{key:"share",label:"\u5206\u4EAB",icon:jsx(lo,{})},{key:"move",label:"\u79FB\u52A8",icon:jsx(qe,{}),disabled:!!(Pe(p.id)?.running||Pe(p.id)?.archived)},...Pe(p.id)?.archived?[]:[{key:"archive",label:"\u5F52\u6863",icon:jsx(Ni,{}),disabled:Pe(p.id)?.canArchive===false}],{key:"delete",label:"\u5220\u9664",icon:jsx(Le,{}),danger:true}],onSelect:A=>{let L=Pe(p.id);m(null),L&&(A==="rename"&&x({id:L.id,value:L.title}),A==="share"&&e.onShareThread(L.id),A==="move"&&T(L),A==="archive"&&e.onArchiveThread(L.id).catch(()=>{}),A==="delete"&&N(L));}})}),u&&jsx(Up,{anchor:u,children:jsx(pt,{width:160,autoAdjust:true,items:y3(u.isDefault),onSelect:A=>{let L=t.find(Y=>Y.id===u.id);v(null),L&&(A==="new-task"&&e.onNewTask(L.id),A==="open-dir"&&e.onOpenProjectDirectory(L.id),A==="rename"&&y({id:L.id,value:L.label}),A==="delete"&&R(L));}})}),jsxs("div",{className:"owuser",children:[jsxs(f,{ref:l,variant:"unstyled",className:"owuser__main","aria-haspopup":"menu","aria-expanded":!!d,title:e.user.name,onClick:A=>{if(A.stopPropagation(),d)return s(null);let L=A.currentTarget.getBoundingClientRect();s({left:L.left,top:L.top,byKeyboard:A.detail===0});},children:[jsx(pn,{className:"av",size:26,id:e.user.id??e.user.name,children:e.user.avatarUrl?jsx("img",{src:e.user.avatarUrl,alt:"",className:"w-full h-full object-cover",onError:A=>A.currentTarget.remove()}):e.user.name.slice(-1)}),jsx("span",{className:"name",children:e.user.name}),!e.update&&jsx(he,{className:"chev"})]}),e.update&&jsx(x3,{update:e.update,onClick:()=>{e.update?.state==="ready"?pe(true):e.update?.state!=="downloading"&&e.onUpdateClick?.();}})]}),d&&createPortal(jsxs(Fragment,{children:[jsx("div",{className:"owusermenu-backdrop",onClick:A=>{A.stopPropagation(),s(null);}}),jsx("div",{className:"owusermenu",style:{position:"fixed",left:d.left,bottom:window.innerHeight-d.top+8},onClick:A=>A.stopPropagation(),children:jsx($v,{user:e.user,plan:e.plan,credits:e.credits,version:e.version,update:e.update,theme:e.theme,onThemeChange:e.onThemeChange,petVisible:e.petVisible,onPetVisibleChange:e.onPetVisibleChange,onOpenSettings:e.onOpenSettings,onOpenMemory:e.onOpenMemory,onCopyUserId:e.onCopyUserId,onCheckUpdate:()=>{let A=e.update?.state;if(A==="ready")return pe(true);if(A!=="downloading"){if(e.update)return e.onUpdateClick?.();(e.onCheckUpdate??e.onUpdateClick)?.();}},onFeedback:e.onFeedback,onLogout:e.onLogout,autoFocus:d.byKeyboard?true:"surface",onClose:()=>c()})})]}),document.body),P&&jsx(hb,{title:"\u5220\u9664\u4EFB\u52A1",description:`\u786E\u5B9A\u8981\u5220\u9664\u300C${P.title}\u300D\u5417\uFF1F\u8BE5\u4EFB\u52A1\u7684\u5BF9\u8BDD\u5C06\u88AB\u79FB\u9664\uFF0C\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002`,onCancel:()=>N(null),onConfirm:()=>{let A=P.id;e.onDeleteThread(A).then(()=>N(null)).catch(()=>{});}}),S&&jsx(hb,{title:"\u5220\u9664\u9879\u76EE",description:`\u786E\u5B9A\u8981\u5220\u9664\u9879\u76EE\u300C${S.label}\u300D\u5417\uFF1F\u9879\u76EE\u4E0B\u7684\u4EFB\u52A1\u5C06\u4E0D\u518D\u663E\u793A\uFF0C\u4F46\u672C\u5730\u5DE5\u4F5C\u76EE\u5F55\u4E2D\u7684\u6587\u4EF6\u4F1A\u4FDD\u7559\u3002`,pending:_,pendingLabel:"\u5220\u9664\u4E2D\u2026",onCancel:()=>R(null),onConfirm:()=>{D(true),e.onDeleteProject(S.id).then(()=>R(null)).catch(()=>{}).finally(()=>D(false));}}),V&&e.update?.state==="ready"&&jsx(k3,{version:e.update.version,pending:W,onCancel:()=>pe(false),onConfirm:()=>{ce(true),Promise.resolve().then(()=>e.onInstallUpdate?.()).catch(()=>ce(false));}}),a&&createPortal(jsx(tf,{onCancel:()=>i(false),onSubmit:A=>e.onCreateProject(A).then(()=>i(false))}),document.body),M&&jsx(C3,{thread:M,projects:t,onCreateProject:e.onCreateProjectForSelection,onCancel:()=>T(null),onSubmit:A=>e.onMoveThread(M.id,A).then(()=>T(null))})]})}function x3({update:e,onClick:t}){let o=Math.round(Math.max(0,Math.min(100,e.percent??0))),{title:r}=yp(e),n=e.state==="ready"?We:Co;return jsxs("button",{type:"button",className:`owuser-update ${e.state}`,title:r,"aria-label":r,disabled:e.state==="downloading",onClick:a=>{a.stopPropagation(),t();},children:[jsxs("span",{className:"owuser-update-ic",children:[jsx(n,{}),e.state!=="downloading"&&jsx("i",{className:"owuser-update-dot","aria-hidden":"true"})]}),e.state==="downloading"&&jsxs("em",{children:[o,"%"]})]})}function Vs({id:e,label:t,title:o,active:r,icon:n,onClick:a}){return jsxs(f,{variant:"unstyled",className:`ownavitem${r?" active":""}`,"aria-current":r?"page":void 0,"data-tour-anchor":e==="new"?"new-task":e==="skills"?"plugins":e==="sites"?"workbench":void 0,onClick:a,title:o,children:[n,jsx("span",{className:"lbl",children:t})]})}function Up({anchor:e,children:t}){return jsx("div",{style:{position:"fixed",left:e.left,top:e.top,zIndex:1e3},onClick:o=>o.stopPropagation(),children:t})}function y3(e){return [{key:"new-task",label:"\u65B0\u5EFA\u4EFB\u52A1",icon:jsx(He,{})},{key:"open-dir",label:"\u6253\u5F00\u9879\u76EE\u76EE\u5F55",icon:jsx(qe,{})},...e?[]:[{key:"rename",label:"\u91CD\u547D\u540D",icon:jsx(yt,{})},{key:"delete",label:"\u5220\u9664",icon:jsx(Le,{}),danger:true}]]}function hb({title:e,description:t,pending:o=false,pendingLabel:r="\u5220\u9664\u4E2D\u2026",onCancel:n,onConfirm:a}){return jsx(oe,{open:true,variant:"danger",icon:jsx(Le,{"aria-hidden":"true"}),title:e,closable:false,closeOnOverlayClick:!o,closeOnEscape:!o,onClose:n,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:o,onClick:n,children:"\u53D6\u6D88"}),jsx(f,{variant:"danger",disabled:o,onClick:a,children:o?r:"\u5220\u9664"})]}),children:t})}function k3({version:e,pending:t,onCancel:o,onConfirm:r}){return jsxs(oe,{open:true,icon:jsx(We,{"aria-hidden":"true"}),iconTone:"plain",title:"\u5B89\u88C5\u66F4\u65B0",closable:false,closeOnOverlayClick:!t,closeOnEscape:!t,onClose:o,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:t,onClick:o,children:"\u7A0D\u540E"}),jsx(f,{variant:"primary",disabled:t,onClick:r,children:t?"\u6B63\u5728\u91CD\u542F\u2026":"\u5B89\u88C5\u5E76\u91CD\u542F"})]}),children:["Orbitwork ",e," \u5DF2\u4E0B\u8F7D\u5B8C\u6210\u3002\u5B89\u88C5\u540E\u5E94\u7528\u5C06\u81EA\u52A8\u91CD\u542F\u3002"]})}function C3({thread:e,projects:t,onCreateProject:o,onCancel:r,onSubmit:n}){let[a,i]=useState(""),[d,s]=useState(false),[l,c]=useState(null),p=()=>{!a||d||(s(true),c(null),n(a).catch(m=>c(m instanceof Error?m.message:"\u79FB\u52A8\u5931\u8D25")).finally(()=>s(false)));};return jsxs(oe,{open:true,title:`\u79FB\u52A8\u4EFB\u52A1\u300C${e.title}\u300D`,width:480,closable:false,onClose:r,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:d,onClick:r,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",disabled:!a||d,onClick:p,children:d?"\u79FB\u52A8\u4E2D\u2026":"\u786E\u8BA4"})]}),children:[jsx(Cl,{value:a,options:t.filter(m=>m.id!==e.projectId).map(m=>({value:m.id,label:m.label})),onChange:i,onCreate:o,placeholder:"\u9009\u62E9\u76EE\u6807\u9879\u76EE",disabled:d}),l&&jsx("div",{"data-ow-part":"error",className:"mt-2 text-ow-error font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:l})]})}function MZ({tab:e,onTab:t,children:o,navigationKey:r=e,filters:n,scrollTop:a,onScrollTopChange:i}){let d=useRef(null),s=useRef(new Map),l=useRef(a),c=useRef(i);return l.current=a,c.current=i,useLayoutEffect(()=>{let p=d.current;if(!p)return;let m=c.current;return p.scrollTop=l.current??s.current.get(r)??0,()=>{s.current.set(r,p.scrollTop),m?.(p.scrollTop);}},[r]),jsxs("section",{className:"shares-workbench",children:[n&&jsx(ba,{eyebrow:jsx(go,{onClick:()=>t("sites"),children:"\u8FD4\u56DE\u5DE5\u4F5C\u53F0"}),title:"\u6211\u7684\u5206\u4EAB",description:"\u7BA1\u7406\u4F60\u5206\u4EAB\u7684\u5185\u5BB9\u4E0E\u8BBF\u95EE\u6743\u9650\u3002",search:jsx(Hn,{value:n.query,onChange:n.onQuery,placeholder:"\u641C\u7D22\u5206\u4EAB\u540D\u79F0"}),tabs:[{key:"shared-sites",label:"\u7AD9\u70B9"},{key:"conversations",label:"\u4F1A\u8BDD"}],activeTabKey:e,onTabChange:p=>t(p),tabsExtra:jsx("div",{className:"shares-status-filter",role:"group","aria-label":"\u5206\u4EAB\u72B6\u6001",children:jsx(br,{size:"sm",value:n.status,onChange:n.onStatus,options:[{value:"",label:"\u5168\u90E8\u72B6\u6001"},{value:"active",label:e==="conversations"?"\u53EF\u8BBF\u95EE":"\u5DF2\u4E0A\u7EBF"},{value:"disabled",label:"\u5DF2\u505C\u7528"},...e==="shared-sites"?[{value:"draft",label:"\u8349\u7A3F"}]:[]]})})}),jsx("div",{ref:d,className:"shares-scroll",children:o})]})}function xb({error:e,onRetry:t,loading:o}){return jsxs("div",{className:"shares-error",role:"alert",children:[jsxs("div",{children:[jsx("strong",{children:e.title}),jsx("p",{children:e.message})]}),jsx(f,{variant:"secondary",disabled:o,onClick:t,children:"\u91CD\u8BD5"}),e.details&&jsxs("details",{children:[jsx("summary",{children:"\u9519\u8BEF\u8BE6\u60C5"}),jsx("p",{children:e.details})]})]})}function _Z(e){let t=!!(e.query||e.status);return jsxs("section",{className:"shares-list","aria-label":e.title,"aria-busy":e.loading,children:[e.error&&jsx(xb,{error:e.error,onRetry:e.onRetry,loading:e.loading}),e.loading&&!e.rows.length&&!e.error&&jsx("div",{"aria-label":"\u6B63\u5728\u52A0\u8F7D\u5206\u4EAB",className:"shares-skeletons",children:[0,1,2,3,4].map(o=>jsx(re,{className:"h-16 w-full"},o))}),!e.loading&&!e.error&&!e.rows.length&&jsx(F,{size:"page",title:t?"\u6CA1\u6709\u5339\u914D\u7684\u5206\u4EAB":`\u8FD8\u6CA1\u6709${e.title}`,message:t?"\u6362\u4E2A\u540D\u79F0\u641C\u7D22\uFF0C\u6216\u6E05\u9664\u7B5B\u9009\u540E\u67E5\u770B\u3002":e.title==="\u4F1A\u8BDD\u5206\u4EAB"?"\u5728\u4F1A\u8BDD\u4E2D\u9009\u62E9\u5185\u5BB9\uFF0C\u5373\u53EF\u521B\u5EFA\u5206\u4EAB\u3002":"\u5728\u7AD9\u70B9\u8BE6\u60C5\u4E2D\u8BBE\u7F6E\u8BBF\u95EE\u8303\u56F4\u6216\u6DFB\u52A0\u6307\u5B9A\u6210\u5458\u3002",actionLabel:t?"\u6E05\u9664\u7B5B\u9009":"\u8FD4\u56DE\u5DE5\u4F5C\u53F0",actionVariant:"secondary",onAction:t?e.onClear:e.onBack}),e.rows.length>0&&jsxs("table",{className:"shares-table",children:[jsxs("colgroup",{children:[jsx("col",{className:"shares-name-col"}),jsx("col",{className:"shares-access-col"}),jsx("col",{className:"shares-state-col"}),jsx("col",{className:"shares-actions-col"})]}),jsx("thead",{children:jsxs("tr",{children:[jsx("th",{scope:"col",children:"\u5185\u5BB9"}),jsx("th",{scope:"col",children:"\u8BBF\u95EE\u8303\u56F4"}),jsx("th",{scope:"col",children:"\u72B6\u6001"}),jsx("th",{scope:"col",className:"shares-actions-heading",children:"\u64CD\u4F5C"})]})}),jsx("tbody",{children:e.rows.map(o=>jsxs("tr",{children:[jsxs("th",{scope:"row",className:"shares-name-cell",children:[jsx(f,{variant:"unstyled",className:"shares-name",title:o.name,onClick:()=>e.onDetail(o.id),children:o.name}),jsx("span",{className:"shares-meta",children:o.detail})]}),jsxs("td",{className:"shares-access-cell",children:[jsx("span",{children:o.access}),o.accessDetail&&jsx("span",{className:"shares-meta",children:o.accessDetail})]}),jsx("td",{className:"shares-state-cell",children:jsx(Nt,{tone:o.statusTone??(o.available?"ok":"mute"),children:o.status})}),jsx("td",{className:"shares-actions-cell",children:jsxs("div",{className:"shares-row-actions",children:[o.available&&jsx(f,{size:"sm",variant:"ghost",onClick:()=>e.onOpen(o.id),children:"\u67E5\u770B"}),jsx(f,{size:"sm",variant:"secondary",onClick:()=>e.onManage(o.id),children:e.manageLabel??"\u5206\u4EAB\u8BBE\u7F6E"}),e.onAction&&jsx(zn,{ariaLabel:`${o.name}\u7684\u66F4\u591A\u64CD\u4F5C`,items:[{key:"rename",label:"\u91CD\u547D\u540D",icon:jsx(yt,{})},{key:"toggle",label:o.disabled?"\u6062\u590D\u8BBF\u95EE":"\u505C\u7528",icon:o.disabled?jsx(fr,{}):jsx(Jr,{})},{key:"delete",label:"\u5220\u9664",danger:true,icon:jsx(Le,{})}],onSelect:r=>e.onAction?.(o.id,r)})]})})]},o.id))})]}),e.more&&jsx("div",{className:"shares-pagination",children:jsx(f,{variant:"secondary",disabled:e.loading,onClick:e.onMore,children:e.loading?"\u6B63\u5728\u52A0\u8F7D\u2026":"\u52A0\u8F7D\u66F4\u591A"})})]})}function LZ(e){let[t,o]=useState(e.name),r=e.action==="rename"?"\u91CD\u547D\u540D":e.action==="delete"?"\u5220\u9664\u6B64\u5185\u5BB9\uFF1F":e.disabled?"\u6062\u590D\u8BBF\u95EE\uFF1F":"\u505C\u7528\u6B64\u5185\u5BB9\uFF1F";return jsx(oe,{open:true,title:r,variant:e.action==="delete"?"danger":"default",onClose:()=>{e.busy||e.onClose();},actions:jsxs(Fragment,{children:[jsx(f,{variant:"ghost",disabled:e.busy,onClick:e.onClose,children:"\u53D6\u6D88"}),jsx(f,{variant:e.action==="delete"?"danger":"primary",disabled:e.busy||e.action==="rename"&&(!t.trim()||t.trim()===e.name),onClick:()=>{e.onSubmit(t.trim()).catch(()=>{});},children:e.action==="rename"?"\u4FDD\u5B58":"\u786E\u8BA4"})]}),children:jsxs("div",{className:"resource-section",children:[e.action==="rename"?jsx(te,{value:t,onChange:o,"aria-label":"\u5206\u4EAB\u540D\u79F0"}):jsx("p",{children:e.action==="delete"?`\u201C${e.name}\u201D\u5C06\u65E0\u6CD5\u8BBF\u95EE\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002`:e.disabled?`\u6062\u590D\u201C${e.name}\u201D\u540E\uFF0C\u5F53\u524D\u6743\u9650\u548C\u6709\u6548\u94FE\u63A5\u5C06\u91CD\u65B0\u751F\u6548\u3002`:`\u505C\u7528\u201C${e.name}\u201D\u540E\uFF0C\u6240\u6709\u5165\u53E3\u6682\u505C\u8BBF\u95EE\uFF0C\u6743\u9650\u548C\u94FE\u63A5\u8BBE\u7F6E\u4F1A\u4FDD\u7559\u3002`}),e.error&&jsx(xb,{error:{title:"\u64CD\u4F5C\u672A\u5B8C\u6210",message:e.error},loading:e.busy,onRetry:e.onRetry})]})})}function di({children:e,error:t=false,onRetry:o}){return e?jsxs("div",{className:"resource-notice",role:t?"alert":"status",children:[e,o&&jsx(f,{variant:"secondary",onClick:o,children:"\u91CD\u8BD5"})]}):null}function OZ(e){return jsxs("section",{className:"resource-section",children:[jsxs("div",{className:"resource-toolbar",children:[jsx(f,{variant:"ghost",onClick:e.onBack,children:e.backLabel??"\u8FD4\u56DE\u5217\u8868"}),e.actions]}),jsx("h2",{children:e.name}),jsxs("p",{children:[e.status," \xB7 ",e.access]}),jsx("nav",{className:"resource-actions","aria-label":"\u8D44\u6E90\u8BE6\u60C5",children:e.tabs.map(t=>jsx(f,{variant:e.tab===t.value?"secondary":"ghost",onClick:()=>e.onTab(t.value),"aria-current":e.tab===t.value?"page":void 0,children:t.label},t.value))}),e.children]})}function VZ(e){let[t,o]=useState(e.name),[r,n]=useState(null);return jsxs("div",{className:"resource-section",children:[jsx("p",{className:"resource-address",children:e.address}),jsxs("div",{className:"resource-actions",children:[jsx(f,{onClick:e.onOpen,disabled:!e.available,children:"\u6253\u5F00"}),jsx(f,{onClick:e.onCopy,variant:"secondary",disabled:!e.available,children:"\u590D\u5236\u5730\u5740"}),e.onSource&&jsx(f,{variant:"ghost",onClick:e.onSource,children:"\u7EE7\u7EED\u5236\u4F5C"})]}),e.details.map(a=>jsx("p",{children:a},a)),jsxs("div",{className:"resource-toolbar",children:[jsx(te,{value:t,onChange:o,"aria-label":"\u663E\u793A\u540D\u79F0"}),jsx(f,{disabled:e.busy||!t.trim()||t===e.name,onClick:()=>{e.onRename(t).catch(()=>{});},children:"\u4FDD\u5B58\u540D\u79F0"})]}),jsxs("div",{className:"resource-actions",children:[jsx(f,{disabled:e.busy,variant:"secondary",onClick:()=>n("toggle"),children:e.disabled?"\u6062\u590D\u8BBF\u95EE":"\u505C\u7528"}),jsx(f,{disabled:e.busy,variant:"ghost",onClick:()=>n("delete"),children:"\u5220\u9664"})]}),r&&jsx(pd,{title:r==="delete"?"\u5220\u9664\u6B64\u5185\u5BB9\uFF1F":e.disabled?"\u6062\u590D\u8BBF\u95EE\uFF1F":"\u505C\u7528\u8BBF\u95EE\uFF1F",description:r==="delete"?"\u5185\u5BB9\u5C06\u65E0\u6CD5\u8BBF\u95EE\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002":e.disabled?"\u539F\u6709\u5206\u4EAB\u8BBE\u7F6E\u5C06\u91CD\u65B0\u751F\u6548\u3002":"\u6240\u6709\u8BBF\u95EE\u5165\u53E3\u5C06\u6682\u505C\uFF0C\u5206\u4EAB\u8BBE\u7F6E\u4F1A\u4FDD\u7559\u3002",busy:e.busy,onCancel:()=>n(null),onConfirm:async()=>{await(r==="delete"?e.onDelete():e.onToggle()),n(null);}})]})}function pd({title:e,description:t,busy:o,onConfirm:r,onCancel:n}){let[a,i]=useState("");return jsxs(oe,{open:true,title:e,onClose:n,width:460,actions:jsxs(Fragment,{children:[jsx(f,{autoFocus:true,variant:"secondary",disabled:o,onClick:n,children:"\u53D6\u6D88"}),jsx(f,{disabled:o,onClick:()=>{r().catch(d=>i(d instanceof Error?d.message:"\u64CD\u4F5C\u5931\u8D25"));},children:"\u786E\u8BA4"})]}),children:[jsx("p",{children:t}),jsx(di,{error:true,children:a})]})}function FZ(e){let[t,o]=useState(null);return jsxs("section",{className:"resource-section",children:[jsx(di,{error:true,children:e.error}),e.error&&jsx(f,{onClick:e.onRetry,children:"\u91CD\u8BD5"}),e.releases.map(r=>jsxs("article",{className:"resource-row",children:[jsxs("div",{children:[jsxs("strong",{children:["v",r.version," \xB7 ",r.status]}),jsxs("span",{children:[r.detail," \xB7 ",r.time]}),r.failure&&jsx(di,{error:true,children:r.failure})]}),r.rollback&&jsx(f,{disabled:e.busy,variant:"secondary",onClick:()=>o(r),children:"\u56DE\u6EDA\u81F3\u6B64\u5185\u5BB9"})]},r.id)),e.more&&jsx(f,{disabled:e.busy,onClick:e.onMore,children:"\u52A0\u8F7D\u66F4\u591A\u53D1\u5E03\u8BB0\u5F55"}),t&&jsx(pd,{title:`\u56DE\u6EDA\u81F3 v${t.version} \u7684\u5185\u5BB9\uFF1F`,description:"\u5C06\u628A\u8FD9\u4E2A\u7248\u672C\u7684\u5185\u5BB9\u53D1\u5E03\u4E3A\u4E00\u4E2A\u65B0\u7248\u672C\uFF0C\u5F53\u524D\u5206\u4EAB\u8BBE\u7F6E\u4FDD\u6301\u4E0D\u53D8\u3002",busy:e.busy,onCancel:()=>o(null),onConfirm:async()=>{await e.onRollback(t.id),o(null);}})]})}var ud=5;function M3(e){return e==="SITE_RELEASE_STATUS_PUBLISHED"?{label:"\u5DF2\u53D1\u5E03",variant:"success"}:e==="SITE_RELEASE_STATUS_PENDING_UPLOAD"?{label:"\u7B49\u5F85\u4E0A\u4F20",variant:"pending"}:e==="SITE_RELEASE_STATUS_PUBLISHING"?{label:"\u53D1\u5E03\u4E2D",variant:"pending"}:e==="SITE_RELEASE_STATUS_FAILED"?{label:"\u53D1\u5E03\u5931\u8D25",variant:"error"}:e==="SITE_RELEASE_STATUS_CANCELED"?{label:"\u5DF2\u53D6\u6D88",variant:"normal"}:{label:"\u672A\u77E5",variant:"normal"}}function _3(e){return e==="SITE_STATUS_ACTIVE"?{label:"\u5DF2\u4E0A\u7EBF",tone:"ok"}:e==="SITE_STATUS_DRAFT"?{label:"\u8349\u7A3F",tone:"mute"}:e==="SITE_STATUS_DISABLED"?{label:"\u5DF2\u505C\u7528",tone:"warn"}:{label:"\u672A\u77E5",tone:"mute"}}function kb(e){if(!Number.isFinite(e)||e<=0)return "0 B";let t=["B","KB","MB","GB"],o=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1),r=e/1024**o;return `${r>=10||o===0?r.toFixed(0):r.toFixed(1)} ${t[o]}`}function Cb(e){if(!e)return "\u65F6\u95F4\u672A\u77E5";let t=new Date(e);return Number.isNaN(t.getTime())?"\u65F6\u95F4\u672A\u77E5":new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}var yb=[{key:"version",header:"\u7248\u672C",numeric:true,align:"start",width:"12%",render:e=>`v${e.version}`},{key:"publishedAt",header:"\u53D1\u5E03\u65F6\u95F4",numeric:true,align:"start",width:"24%",render:e=>Cb(e.publishedAt||e.createdAt)},{key:"status",header:"\u72B6\u6001",width:"10%",render:e=>{let t=M3(e.status);return jsx(at,{variant:t.variant,dot:true,children:t.label})}},{key:"fileCount",header:"\u6587\u4EF6\u6570",numeric:true,width:"10%",render:e=>e.fileCount},{key:"totalSizeBytes",header:"\u4F53\u79EF",numeric:true,width:"10%",render:e=>kb(e.totalSizeBytes)},{key:"note",header:"\u5907\u6CE8",width:"24%",render:e=>e.failureReason?jsxs("span",{className:"site-releases__note site-releases__note--failure",children:["\u5931\u8D25\u539F\u56E0\uFF1A",e.failureReason]}):e.sourceReleaseId?jsx("span",{className:"site-releases__note site-releases__note--rollback",children:"\u7531\u5386\u53F2\u7248\u672C\u56DE\u6EDA\u751F\u6210"}):jsx("span",{className:"site-releases__note",children:"\u2014"})}];function JZ({site:e,releases:t,loading:o,error:r,onBack:n,onEdit:a,onManage:i,onPreviewSite:d,onRetry:s,menuItems:l=[],onMenuSelect:c,onCopySite:p,onRollback:m,hasMore:u=false,onLoadMore:v,busy:w=false,backLabel:b="\u8FD4\u56DE\u5DE5\u4F5C\u53F0 \xB7 \u7AD9\u70B9",feedback:h}){let[x,k]=useState(1),[y,P]=useState(false),[N,S]=useState(null),R=useRef(null),M=_3(e.status),T=Math.max(1,Math.ceil(t.length/ud)),_=Math.min(x,T),D=t.slice((_-1)*ud,_*ud),I=t.find(W=>W.version===e.version),H=e.status==="SITE_STATUS_ACTIVE"&&!!e.baseUrl,$=m?[...yb,{key:"actions",header:"\u64CD\u4F5C",render:W=>W.version===e.version?"\u5F53\u524D\u7248\u672C":W.status==="SITE_RELEASE_STATUS_PUBLISHED"&&jsx(f,{size:"sm",variant:"ghost",disabled:w||e.status==="SITE_STATUS_DISABLED",onClick:()=>S(W),children:"\u56DE\u6EDA"})}]:yb;useEffect(()=>{k(1);},[e.id]),useEffect(()=>{x>T&&k(T);},[x,T]),useEffect(()=>()=>{R.current&&clearTimeout(R.current);},[]);let E=()=>{if(!H)return;let W=p?p():navigator.clipboard?.writeText(e.baseUrl);W&&W.then(()=>{P(true),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>P(false),1600);}).catch(()=>{});},V=[{key:"refresh",label:"\u5237\u65B0\u53D1\u5E03\u8BB0\u5F55",icon:jsx(We,{})},...l],pe=W=>{if(W==="refresh"){s();return}c?.(W);};return jsxs("div",{className:"page site-releases",children:[jsxs("header",{className:"site-releases__head",children:[jsx(go,{onClick:n,children:b}),jsxs("div",{className:"site-releases__head-row",children:[jsxs("div",{className:"site-releases__heading",children:[jsxs("div",{className:"site-releases__title-row",children:[jsx("h1",{className:"site-releases__title",children:e.name}),jsx(Nt,{tone:M.tone,children:M.label})]}),jsxs("div",{className:"site-releases__addr",children:[jsxs("span",{className:"site-releases__addr-ver",children:["v",e.version]}),jsx("span",{className:"site-releases__addr-sep","aria-hidden":"true",children:"\xB7"}),e.baseUrl?jsxs("button",{type:"button","data-ow-part":"release-url-copy",className:"site-releases__addr-copy",title:y?"\u5DF2\u590D\u5236":"\u590D\u5236\u7AD9\u70B9\u5730\u5740\uFF0C\u63A5\u6536\u8005\u4ECD\u9700\u5177\u6709\u8BBF\u95EE\u6743\u9650","aria-label":`\u590D\u5236\u7AD9\u70B9 ${e.name} \u7684\u94FE\u63A5`,disabled:!H,onClick:E,children:[jsx("span",{children:e.baseUrl}),y?jsx(be,{"aria-hidden":"true"}):jsx(Tt,{"aria-hidden":"true"})]}):jsx("span",{className:"site-releases__addr-none",children:"\u8FD8\u6CA1\u53D1\u5E03 \xB7 \u6CA1\u6709\u94FE\u63A5"})]})]}),jsxs("div",{className:"site-releases__head-actions",children:[jsx(f,{variant:"secondary",onClick:d,disabled:!H,children:"\u9884\u89C8"}),jsx(f,{variant:"secondary",onClick:i,children:"\u5206\u4EAB\u8BBE\u7F6E"}),jsx(f,{variant:"secondary",onClick:a,disabled:!e.sessionId,children:"\u7F16\u8F91"}),jsx(cl,{items:V,onSelect:pe})]})]})]}),jsxs("main",{className:"site-releases__scroll",children:[h,jsxs("div",{className:"site-releases__facts",children:[jsx(Gp,{label:"\u6700\u8FD1\u53D1\u5E03\u65F6\u95F4",value:Cb(e.publishedAt)}),jsx(Gp,{label:"\u5F53\u524D\u7248\u672C\u6587\u4EF6\u6570",value:I?`${I.fileCount} \u4E2A\u6587\u4EF6`:"\u2014"}),jsx(Gp,{label:"\u5F53\u524D\u7248\u672C\u4F53\u79EF",value:I?kb(I.totalSizeBytes):"\u2014"})]}),jsxs("section",{className:"site-releases__section",children:[jsxs("div",{className:"site-releases__section-label",children:["\u53D1\u5E03\u8BB0\u5F55",jsx("span",{className:"site-releases__section-hint",children:o?"\u6B63\u5728\u52A0\u8F7D\u2026":jsxs(Fragment,{children:[u?"\u5DF2\u52A0\u8F7D":"\u5171"," ",jsx("span",{className:"mono",children:t.length})," \u6B21\u53D1\u5E03"]})}),r&&jsx(f,{size:"sm",variant:"secondary",icon:jsx(We,{}),onClick:s,children:"\u91CD\u8BD5"})]}),jsx(dl,{className:"site-releases__table",columns:$,rows:D,rowKey:W=>W.id,caption:`${e.name} \u7684\u53D1\u5E03\u8BB0\u5F55`,loading:o,loadingRows:3,error:r?"\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\u53D1\u5E03\u8BB0\u5F55":void 0,errorDetail:r??void 0,emptyMessage:"\u8BE5\u7AD9\u70B9\u5B8C\u6210\u9996\u6B21\u53D1\u5E03\u540E\uFF0C\u7248\u672C\u8BB0\u5F55\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002"}),!o&&!r&&t.length>0&&jsxs("div",{className:"site-releases__pagination",children:[jsxs("span",{children:["\u7B2C ",jsx("span",{className:"mono",children:_})," / ",jsx("span",{className:"mono",children:T})," \u9875"]}),jsx(wn,{current:_,total:t.length,pageSize:ud,onChange:k})]}),u&&jsx(f,{disabled:o||w,onClick:v,children:"\u52A0\u8F7D\u66F4\u591A\u53D1\u5E03\u8BB0\u5F55"})]})]}),N&&m&&jsx(pd,{title:`\u56DE\u6EDA\u5230 v${N.version}\uFF1F`,description:"\u5C06\u4F7F\u7528\u6B64\u7248\u672C\u7684\u5185\u5BB9\u53D1\u5E03\u4E00\u4E2A\u65B0\u7248\u672C\uFF0C\u8BBF\u95EE\u6743\u9650\u548C\u5206\u4EAB\u94FE\u63A5\u4FDD\u6301\u5F53\u524D\u8BBE\u7F6E\u3002",busy:w,onCancel:()=>S(null),onConfirm:async()=>{await m(N.id),S(null);}})]})}function Gp({label:e,value:t}){return jsxs("div",{className:"site-releases__fact",children:[jsx("div",{className:"k",children:e}),jsx("div",{className:"v mono",children:t})]})}var I3=[{key:"sites",label:"\u7AD9\u70B9"},{key:"media",label:"\u5A92\u4F53\u5E93",disabled:true,title:"\u8FD8\u6CA1\u5F00\u653E"},{key:"archive",label:"\u6863\u6848\u9986",disabled:true,title:"\u8FD8\u6CA1\u5F00\u653E"}];function A3(e){return e==="SITE_STATUS_ACTIVE"?{label:"\u5DF2\u4E0A\u7EBF",tone:"ok"}:e==="SITE_STATUS_DRAFT"?{label:"\u8349\u7A3F",tone:"mute"}:e==="SITE_STATUS_DISABLED"?{label:"\u5DF2\u505C\u7528",tone:"warn"}:{label:"\u672A\u77E5",tone:"mute"}}function B3(e){if(!Number.isFinite(e)||e<=0)return "0 B";let t=["B","KB","MB","GB"],o=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1),r=e/1024**o;return `${r>=10||o===0?r.toFixed(0):r.toFixed(1)} ${t[o]}`}function O3(e){let t=[];if(typeof e.fileCount=="number"&&t.push(`${e.fileCount} \u4E2A\u6587\u4EF6`),typeof e.totalSizeBytes=="number"&&t.push(B3(e.totalSizeBytes)),t.length<2){t.push(`v${e.version}`);let o=V3(e.publishedAt||e.createdAt);o&&t.push(o);}return t.join(" \xB7 ")}function V3(e){if(!e)return "";try{let t=new Date(e),r=new Date().getTime()-t.getTime();return r<6e4?"\u521A\u521A":r<36e5?`${Math.floor(r/6e4)} \u5206\u949F\u524D`:r<864e5?`${Math.floor(r/36e5)} \u5C0F\u65F6\u524D`:r<6048e5?`${Math.floor(r/864e5)} \u5929\u524D`:t.toLocaleDateString("zh-CN")}catch{return ""}}function F3(e){return e.status==="SITE_STATUS_ACTIVE"}function pq({sites:e,loading:t,error:o,onCreateSite:r,onViewDetails:n,onPreviewSite:a,onRetry:i,dense:d,onDenseChange:s,query:l,onQueryChange:c,onOpenShares:p,hasMore:m=false,onLoadMore:u,scrollTop:v=0,onScrollTopChange:w}){let[b,h]=useState(""),x=l??b,k=I=>{l===void 0&&h(I),c?.(I);},y=useRef(null);useLayoutEffect(()=>{y.current&&(y.current.scrollTop=v);},[v]);let[P,N]=useState(false),S=d??P,R=S?"sites-grid sites-grid--dense":"sites-grid",M=()=>{let I=!S;d===void 0&&N(I),s?.(I);},T=x.trim().toLowerCase(),_=e;T&&l===void 0&&(_=_.filter(I=>[I.name,I.description,I.baseUrl].some(H=>H?.toLowerCase().includes(T))));let D=jsx(ba,{eyebrow:"\u4EA7\u7269",title:"\u5DE5\u4F5C\u53F0",description:"\u4F1A\u8BDD\u91CC\u4EA7\u51FA\u7684\u7AD9\u70B9\u3001\u56FE\u7247\u4E0E\u6587\u6863\u90FD\u5728\u8FD9\u91CC\u53D1\u5E03\u4E0E\u7BA1\u7406\u3002",search:jsx(Hn,{value:x,onChange:k,placeholder:"\u641C\u7D22\u4EA7\u7269"}),actions:jsxs(Fragment,{children:[p&&jsx(f,{variant:"ghost",onClick:p,children:"\u6211\u7684\u5206\u4EAB"}),jsx(f,{variant:"primary",icon:jsx(He,{}),onClick:r,children:"\u65B0\u5EFA\u7AD9\u70B9"})]}),tabs:I3,activeTabKey:"sites",tabsExtra:jsx(Fragment,{children:jsx(f,{type:"button",size:"sm",variant:"secondary",className:"sites-space__dense",icon:jsx(hi,{}),"aria-pressed":S,title:S?"\u56DE\u5230\u6807\u51C6\u89C6\u56FE":"\u66F4\u5BC6\u7684\u6392\u5E03\uFF1A\u4E00\u5C4F\u591A\u770B\u4E00\u5217\uFF0C\u6536\u8D77\u8BF4\u660E\u4E0E\u52A8\u4F5C",onClick:M,children:"\u5BC6\u96C6"})})});return t&&e.length===0?jsxs("div",{className:"page sites-space",children:[D,jsx("div",{className:R,children:jsx($3,{})})]}):o&&e.length===0?jsxs("div",{className:"page sites-space",children:[D,jsx(J,{variant:"error",title:"\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D",detail:o,className:"published-sites__error",action:jsx(f,{size:"sm",variant:"secondary",icon:jsx(We,{}),onClick:i,children:"\u91CD\u8BD5"}),children:"\u7AD9\u70B9\u5217\u8868\u8FD9\u6B21\u6CA1\u53D6\u56DE\u6765\uFF0C\u7A0D\u540E\u91CD\u8BD5\u6216\u68C0\u67E5\u7F51\u7EDC\u3002"})]}):jsxs("div",{className:"page sites-space",children:[D,_.length===0?jsx(Dm,{grid:true,size:T?"md":"page",title:T?"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u7AD9\u70B9":"\u8FD8\u6CA1\u6709\u7AD9\u70B9",hint:T?"\u6362\u4E2A\u5173\u952E\u8BCD\u8BD5\u8BD5\uFF0C\u6216\u6E05\u7A7A\u641C\u7D22\u67E5\u770B\u5168\u90E8\u7AD9\u70B9\u3002":"\u5728\u5BF9\u8BDD\u91CC\u8BA9\u4E13\u5BB6\u4EA7\u51FA\u9875\u9762\uFF0C\u53D1\u5E03\u6210\u7AD9\u70B9\u540E\u5C31\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002",action:T?void 0:{label:"\u65B0\u5EFA\u7AD9\u70B9",onClick:r},onClearSearch:T?()=>k(""):void 0}):jsxs("div",{ref:y,className:R,onScroll:I=>w?.(I.currentTarget.scrollTop),children:[_.map(I=>{let H=A3(I.status),$=F3(I)&&!!I.baseUrl;return jsxs("article",{className:"site-card",children:[jsxs(f,{type:"button","data-ow-part":"site-open",variant:"unstyled",className:"site-card__open ow-focus-ring","aria-label":`\u67E5\u770B\u7AD9\u70B9 ${I.name} \u7684\u8BE6\u60C5`,onClick:()=>n(I),children:[jsxs("div",{className:"site-card__cover",children:[I.coverUrl?jsx("img",{className:"site-card__cover-image",src:I.coverUrl,alt:""}):jsx(z3,{}),jsx(Nt,{className:"site-card__status",tone:H.tone,children:H.label})]}),jsxs("div",{className:"site-card__body",children:[jsx("div",{className:"site-card__name",children:I.name}),jsx("div",{className:"site-card__desc",children:I.description})]})]}),jsxs("div",{className:"site-card__footer",children:[jsx("span",{className:"site-card__meta",title:I.baseUrl||void 0,children:O3(I)}),jsx(f,{type:"button","data-ow-part":"site-act",size:"sm",variant:"secondary",className:"site-card__act",disabled:!$,title:$?I.baseUrl:"\u5C1A\u672A\u53D1\u5E03\uFF0C\u8FD8\u6CA1\u6709\u53EF\u6253\u5F00\u7684\u94FE\u63A5","aria-label":$?`\u5728\u5E94\u7528\u5185\u9884\u89C8\u7AD9\u70B9 ${I.name}`:void 0,onClick:()=>a(I),children:$?"\u6253\u5F00\u94FE\u63A5":"\u9884\u89C8"})]})]},I.id)}),(m||o)&&jsxs("div",{className:"sites-grid__more",children:[o&&jsx(J,{variant:"error",title:"\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\u66F4\u591A\u7AD9\u70B9",detail:o}),jsx(f,{disabled:t,onClick:o?i:u,children:t?"\u6B63\u5728\u52A0\u8F7D\u2026":o?"\u91CD\u8BD5":"\u52A0\u8F7D\u66F4\u591A"})]})]})]})}function $3({count:e=4}){return jsx(Fragment,{children:Array.from({length:e}).map((t,o)=>jsxs("article",{className:"site-card","aria-hidden":"true",children:[jsx("div",{className:"site-card__cover",children:jsx(re,{variant:"block",width:"100%",height:"100%",radius:0})}),jsxs("div",{className:"site-card__body",children:[jsx(re,{variant:"line",width:"55%",height:18}),jsxs("span",{className:"site-card__skel-desc",children:[jsx(re,{variant:"line",width:"90%",height:12}),jsx(re,{variant:"line",width:"64%",height:12})]})]}),jsxs("div",{className:"site-card__footer",children:[jsx("span",{className:"site-card__meta",children:jsx(re,{variant:"line",width:"60%",height:12})}),jsx(re,{className:"site-card__act",variant:"block",width:76,height:28,radius:"var(--ow-radius-action)"})]})]},o))})}function z3(){return jsxs("div",{className:"site-card__thumb","aria-hidden":"true",children:[jsx("span",{className:"site-card__thumb-bar site-card__thumb-bar--title"}),jsx("span",{className:"site-card__thumb-bar site-card__thumb-bar--wide"}),jsx("span",{className:"site-card__thumb-bar site-card__thumb-bar--mid"})]})}function Sb({member:e}){let t=e.name.trim().charAt(0)||"?";return jsxs(pn,{size:24,id:e.id,className:"share-settings__avatar",children:[jsx("span",{"aria-hidden":"true",children:t}),e.avatarUrl&&jsx("img",{src:e.avatarUrl,alt:"",referrerPolicy:"no-referrer",onError:o=>{o.currentTarget.hidden=true;}},e.avatarUrl)]})}function H3({scope:e,members:t,search:o,busy:r=false,loading:n=false,error:a,onScope:i,onAddMember:d,onRemoveMember:s}){let l=o.keyword.trim();return jsxs(Fragment,{children:[jsx("div",{className:"cseg",role:"radiogroup","aria-label":"\u5206\u4EAB\u8303\u56F4",children:[["all","\u5168\u5458\u8BBF\u95EE"],["selected","\u6307\u5B9A\u6210\u5458"]].map(([c,p])=>jsx("button",{type:"button",role:"radio","aria-checked":e===c,className:`cseg__opt${e===c?" on":""}`,disabled:r||n,onClick:()=>i(c),children:p},c))}),jsx("div",{className:"session-share__body share-settings__body",children:n?jsx("div",{className:"session-share__hint",role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u5206\u4EAB\u8BBE\u7F6E\u2026"}):a?jsx("div",{className:"share-settings__error",role:"alert",children:a}):e==="all"?jsx("div",{className:"session-share__hint",children:"\u6240\u6709\u5DF2\u767B\u5F55\u6210\u5458\u5747\u53EF\u8BBF\u95EE\uFF0C\u672A\u767B\u5F55\u8BBF\u5BA2\u65E0\u6CD5\u6253\u5F00\u3002"}):jsxs(Fragment,{children:[jsx("div",{className:"session-share__search",children:jsx(te,{value:o.keyword,placeholder:"\u641C\u7D22\u59D3\u540D\u6216\u8D26\u53F7","aria-label":"\u641C\u7D22\u6210\u5458",prefix:jsx($t,{}),disabled:r,onChange:o.onKeyword})}),o.error&&jsx("div",{className:"share-settings__error",role:"alert",children:o.error}),l&&jsx("div",{className:"published-site__member-results","aria-label":"\u6210\u5458\u641C\u7D22\u7ED3\u679C",children:o.searching?jsx("div",{className:"published-site__empty",children:"\u6B63\u5728\u641C\u7D22\u2026"}):o.results.length===0?jsx("div",{className:"published-site__empty",children:"\u6CA1\u6709\u5339\u914D\u7684\u6210\u5458\u3002"}):o.results.map(c=>{let p=t.some(m=>m.id===c.id);return jsxs(f,{size:"sm",variant:"ghost",className:"published-site__member-result share-settings__result",icon:jsx(Sb,{member:c}),disabled:r||p,onClick:()=>d(c),children:[jsx("span",{children:c.name}),jsx("small",{children:c.account}),!p&&jsx(He,{"aria-hidden":"true"})]},c.id)})}),jsx("div",{className:"published-site__member-list","aria-label":"\u6307\u5B9A\u6210\u5458",children:t.length===0?jsx("div",{className:"session-share__hint",children:"\u5C1A\u672A\u6DFB\u52A0\u6210\u5458\uFF0C\u5F53\u524D\u53EA\u6709\u4F60\u53EF\u4EE5\u8BBF\u95EE\u3002"}):t.map(c=>jsxs(Rn,{className:"published-site__member share-settings__member",size:"md",closable:true,closeAriaLabel:`\u79FB\u9664 ${c.name}`,disabled:r,onClose:()=>s(c.id),children:[jsx(Sb,{member:c}),jsx("span",{children:c.name})]},c.id))}),jsx("div",{className:"session-share__hint",children:"\u4F60\u4F5C\u4E3A\u6240\u6709\u8005\u59CB\u7EC8\u53EF\u4EE5\u8BBF\u95EE\u3002"})]})})]})}function wq(e){return jsx(oe,{bare:true,open:true,fitViewport:false,ariaLabel:e.title,onClose:e.onClose,className:"session-share-modal share-settings-modal",children:jsxs("div",{className:"session-share",children:[jsxs("div",{className:"session-share__head",children:[jsxs("div",{className:"session-share__head-text",children:[jsx("strong",{children:e.title}),jsx("span",{children:e.subtitle})]}),jsx(f,{variant:"unstyled",className:"session-share__close","aria-label":"\u5173\u95ED",disabled:e.busy,onClick:e.onClose,children:jsx(Q,{})})]}),jsx(H3,{...e}),e.notice&&jsx("div",{className:"share-settings__notice",role:"status",children:e.notice}),jsxs("div",{className:"session-share__footer",children:[jsx(f,{variant:"secondary",onClick:e.onClose,disabled:e.busy,children:"\u53D6\u6D88"}),e.extraActions,jsx(f,{variant:"primary",onClick:e.onSave,disabled:e.busy||e.loading||e.saveDisabled,children:e.saveLabel??(e.busy?"\u4FDD\u5B58\u4E2D\u2026":"\u4FDD\u5B58")})]})]})})}var W3=[{key:"agents",label:"\u4E13\u5BB6"},{key:"market",label:"\u6280\u80FD"},{key:"connectors",label:"\u8FDE\u63A5\u5668"}],U3=[{value:"all",label:"\u5E02\u573A"},{value:"mine",label:"\u6211\u7684"}];function Mq({section:e,onSectionChange:t,query:o,onQueryChange:r,searchPlaceholder:n,actionLabel:a,onAction:i,categories:d,activeCategoryId:s,onCategoryChange:l,installedOnly:c=false,onInstalledOnlyChange:p,currentPage:m,totalItems:u,pageSize:v=24,onPageChange:w,notice:b,loading:h=false,loadingCount:x=6,error:k,errorDetail:y,onRetry:P,emptyState:N,children:S,overlay:R}){let M=c?"mine":"all",T=k?"error":h?"loading":N?"empty":null;return jsxs("div",{className:"page",children:[jsx(ba,{eyebrow:"\u5DE5\u5177",title:"\u63D2\u4EF6",description:"\u4E13\u5BB6\u3001\u6280\u80FD\u4E0E\u8FDE\u63A5\u5668\u90FD\u5728\u8FD9\u91CC\u5B89\u88C5\u4E0E\u7BA1\u7406\uFF1B\u4E5F\u53EF\u4EE5\u6DFB\u52A0\u81EA\u5DF1\u7684\u3002",search:jsx(Hn,{value:o,onChange:r,placeholder:n}),actions:a&&i?jsx(f,{variant:"primary",icon:jsx(He,{}),onClick:i,children:a}):void 0,tabs:W3,activeTabKey:e,onTabChange:_=>t(_)}),jsx("div",{className:"plaza__filters",children:jsxs("div",{className:"plaza__cats",children:[jsx("div",{className:"plaza__cats-main",children:d.map(_=>jsx(ro,{shape:"square",label:_.label,selected:s===_.id,"aria-pressed":s===_.id,onClick:()=>l(_.id)},_.id??"__all__"))}),jsx("div",{className:"plaza__cats-scope",children:p&&jsx(Ht,{variant:"outline",size:"sm","aria-label":"\u6309\u5F52\u5C5E\u7B5B\u9009",options:U3,value:M,onChange:_=>p(_==="mine")})})]})}),b&&jsx(Vi,{className:"plaza__notice",variant:"warning",children:b}),T==="empty"?jsx("div",{className:"plaza__grid",children:N}):T?jsx(zv,{loading:h,loadingCount:x,error:k,errorDetail:y,onRetry:P,empty:false}):S,jsx(wn,{className:"plaza__pagination",current:m,total:u,pageSize:v,onChange:w}),R]})}var K3="\u8BE5\u529F\u80FD\u5DF2\u7531\u5185\u7F6E\u6D4F\u89C8\u5668\u4E0E\u6587\u4EF6\u9884\u89C8\u66FF\u4EE3";function Eq(e){return jsx(F,{message:K3})}function Iq(){return null}function Aq(){return null}var Z3={running:"\u8FD0\u884C\u4E2D",error:"\u5931\u8D25",success:"\u5B8C\u6210"},q3={running:"neutral",error:"error",success:"success"};function Tb({icon:e,label:t,preview:o,status:r,input:n,output:a,artifacts:i=[],onClose:d}){let s=n!=null,l=a!=null||i.length>0,[c,p]=useState(s?"input":"output");return jsx(oe,{open:true,width:"min(760px, 92vw)",padded:false,closable:false,onClose:d,ariaLabel:`\u5DE5\u5177\u8BE6\u60C5 ${t}`,children:jsxs("div",{className:"tool-modal",children:[jsxs("div",{className:"tool-modal__head",children:[jsx("span",{className:"tool-modal__icon",children:e}),jsxs("div",{className:"tool-modal__title",children:[jsx("div",{className:"tool-modal__name",children:t}),o&&jsx("div",{className:"tool-modal__preview",children:o})]}),jsx(ro,{className:"tool-modal__status",dot:q3[r],icon:r==="running"?jsx(vr,{size:"sm"}):void 0,label:Z3[r]}),jsx(f,{variant:"ghost",size:"sm",className:"tool-modal__x",onClick:d,"aria-label":"\u5173\u95ED",icon:jsx(Q,{})})]}),jsx(uo,{items:[{key:"input",label:"\u8F93\u5165",disabled:!s},{key:"output",label:"\u8F93\u51FA",disabled:!l}],activeKey:c,onChange:m=>p(m),size:"sm"}),jsxs("div",{className:"tool-modal__body",children:[c==="input"&&(n??jsx(F,{size:"sm",message:"\u65E0\u8F93\u5165\u53C2\u6570"})),c==="output"&&(l?jsxs(Fragment,{children:[a,jsx(Y3,{artifacts:i})]}):jsx(F,{size:"sm",message:"\u65E0\u8F93\u51FA\u5185\u5BB9"}))]})]})})}function Y3({artifacts:e}){return e.length===0?null:jsx("div",{className:"tool-artifacts",children:e.map(t=>jsxs("a",{className:`artifact artifact--${t.type}`,href:t.url,target:"_blank",rel:"noreferrer",children:[jsx(Hr,{}),t.type==="image"?jsx("img",{className:"artifact__img",src:t.url,alt:""}):jsx("div",{className:"artifact__img artifact__img--empty"}),jsxs("div",{className:"artifact__cap",children:[jsx("span",{className:"gly",children:t.type==="image"?"IMG":"VID"}),jsx("span",{className:"nm",children:t.name||t.ref}),jsx("span",{className:"by",children:t.mimeType}),jsx("span",{className:"open",children:"\u6253\u5F00"})]})]},t.id))})}var qp={command:{running:"\u6B63\u5728\u8FD0\u884C",completed:"\u5DF2\u8FD0\u884C",groupUnit:"\u9879\u547D\u4EE4"},browser:{running:"\u6B63\u5728\u6D4F\u89C8",completed:"\u5DF2\u6D4F\u89C8",groupUnit:"\u9879\u7F51\u9875"},"read-file":{running:"\u6B63\u5728\u8BFB\u53D6",completed:"\u5DF2\u8BFB\u53D6",groupUnit:"\u9879\u6587\u4EF6"},"write-file":{running:"\u6B63\u5728\u5199\u5165",completed:"\u5DF2\u5199\u5165",groupUnit:"\u9879\u6587\u4EF6"},tool:{running:"\u6B63\u5728\u6267\u884C",completed:"\u5DF2\u5B8C\u6210",groupUnit:"\u9879\u64CD\u4F5C"}};function _b(e,t,o){if(t==="error")return o;let r=qp[e];if(e!=="tool")return r[t];if(t==="running")return `\u6B63\u5728${o}`;let a=[["\u521B\u5EFA","\u5DF2\u521B\u5EFA"],["\u66F4\u65B0","\u5DF2\u66F4\u65B0"],["\u5220\u9664","\u5DF2\u5220\u9664"],["\u67E5\u8BE2","\u5DF2\u67E5\u8BE2"],["\u641C\u7D22","\u5DF2\u641C\u7D22"],["\u5217\u51FA","\u5DF2\u5217\u51FA"],["\u6574\u7406","\u5DF2\u6574\u7406"],["\u7F16\u8F91","\u5DF2\u7F16\u8F91"],["\u5199\u5165","\u5DF2\u5199\u5165"],["\u8BFB\u53D6","\u5DF2\u8BFB\u53D6"],["\u6D4F\u89C8","\u5DF2\u6D4F\u89C8"],["\u6267\u884C","\u5DF2\u6267\u884C"],["\u8FD0\u884C","\u5DF2\u8FD0\u884C"]].find(([i])=>o.startsWith(i));return a?`${a[1]}${o.slice(a[0].length)}`:`\u5DF2\u5B8C\u6210 ${o}`}function J3(e,t,o){let n=_b(e,t?"running":"completed",typeof o=="string"?o:"\u6267\u884C\u64CD\u4F5C"),a=typeof o=="string"?o.match(/等 (\d+) 项操作$/)?.[1]:void 0;return a?`${qp[e][t?"running":"completed"]}${a}${qp[e].groupUnit}`:n}function tY({running:e=false,label:t,children:o,tools:r,meta:n,kind:a="tool",defaultOpen:i=false,onOpenChange:d}){let s=J3(a,e,t),l=r??[];return e&&l.length>0?jsx(Hl,{label:typeof s=="string"?s:"\u6B63\u5728\u6267\u884C",meta:n,defaultOpen:true,onOpenChange:d,children:l.map((p,m)=>jsx(hp,{name:p.name,args:p.args,state:p.state??"running",elapsed:p.elapsed,statusText:p.statusText},`${p.name}-${m}`))}):jsx(Hl,{label:typeof s=="string"?s:"\u5DF2\u5B8C\u6210",meta:n,tools:l.length>0?l.map(e6):void 0,defaultOpen:i,onOpenChange:d,children:l.length===0?o:void 0})}function e6(e){return {name:e.name,args:e.args,elapsed:e.elapsed,out:e.out,state:e.state==="error"?"error":"done",statusText:e.statusText}}function t6(e,t){let o=[];return typeof e=="number"&&Number.isFinite(e)&&e>=0&&o.push(e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`),typeof t=="number"&&Number.isFinite(t)&&t>=0&&o.push(t>=1e4?`${(t/1e4).toFixed(1)}\u4E07\u884C`:`${t} \u884C`),o.length>0?o.join(" \xB7 "):null}function o6(e,t){let o=[];return typeof e=="number"&&Number.isFinite(e)&&o.push(`\u8017\u65F6 ${Math.round(e)}ms`),typeof t=="number"&&Number.isFinite(t)&&o.push(`${t} \u884C`),o.length>0?o.join(" \xB7 "):void 0}function oY({icon:e,label:t,preview:o,status:r,kind:n="tool",durationMs:a,lineCount:i,presentation:d="card",inlineStatusMode:s="icon",input:l,output:c,artifacts:p=[],defaultOpen:m=false,onOpenChange:u}){let[v,w]=useState(false),b=mp(),h=_b(n,r,t),x=l!=null||c!=null||p.length>0,k=r==="running"?null:t6(a,i),y=p.length>0?jsx(a6,{artifacts:p}):void 0;if(r==="running")return jsx(hp,{name:h,args:o??void 0,state:"running",statusText:s==="hidden"?"":"\u8FD0\u884C\u4E2D"});if(b)return jsx(gp,{tool:{name:h,args:o??void 0,elapsed:k??void 0,state:r==="error"?"error":"done",input:l,output:c,artifacts:y,defaultDetailOpen:m,onDetailOpenChange:u}});let P=jsxs(Fragment,{children:[h,o&&jsx("span",{style:r6,children:o})]}),N=x?jsx(fp,{input:l,output:c,artifacts:y,trailing:jsx(f,{variant:"ghost",size:"sm",icon:jsx(Go,{}),onClick:()=>w(true),title:"\u653E\u5927\u67E5\u770B\u6267\u884C\u8BE6\u60C5",children:"\u653E\u5927\u67E5\u770B"})}):void 0;return jsxs(Fragment,{children:[jsx(Hl,{label:P,meta:k??void 0,metaTitle:k?o6(a,i):void 0,statusText:r==="error"?"\u5931\u8D25":void 0,tone:r==="error"?"error":"neutral",defaultOpen:m,onOpenChange:u,children:N}),v&&jsx(Tb,{icon:e,label:t,preview:o,status:r==="completed"?"success":r,input:l,output:c,artifacts:p,onClose:()=>w(false)})]})}var r6={color:"var(--ow-text-3)",fontWeight:400,marginLeft:6};function a6({artifacts:e}){return jsx("div",{className:"tool-artifacts",children:e.map(t=>jsxs("a",{className:`artifact artifact--${t.type}`,href:t.url,target:"_blank",rel:"noreferrer",title:t.name||t.ref,children:[jsx(Hr,{}),t.type==="image"?jsx("img",{className:"artifact__img",src:t.url,alt:""}):jsx("div",{className:"artifact__img artifact__img--empty",children:jsx(oo,{})}),jsxs("div",{className:"artifact__cap",children:[jsx("span",{className:"gly",children:t.type==="image"?"IMG":"VID"}),jsx("span",{className:"nm",children:t.name||t.ref}),jsx("span",{className:"by",children:t.mimeType}),jsx("span",{className:"open",children:"\u6253\u5F00"})]})]},t.id))})}var n6=cva("flex flex-col w-full",{variants:{contained:{true:"h-full",false:"h-screen"}},defaultVariants:{contained:false}}),i6=cva("flex-shrink-0"),s6=cva("flex flex-1 min-h-0 overflow-hidden"),l6=cva("flex-1 min-w-0 overflow-auto flex flex-col p-3"),d6=cva("flex-shrink-0"),c6=cva("flex-shrink-0 min-h-0 overflow-auto border-l border-[color:var(--ow-border)] shadow-none",{variants:{hideBelow:{none:"",sm:"max-sm:hidden",md:"max-md:hidden",lg:"max-lg:hidden"}},defaultVariants:{hideBelow:"lg"}});function Yp({header:e,footer:t,sidebar:o,aside:r,asideWidth:n=320,hideAsideBelow:a="lg",children:i,contained:d=false,className:s=""}){return jsxs("div",{"data-slot":"app-layout",className:g(n6({contained:d}),s),children:[e&&jsx("div",{"data-slot":"app-layout-header",className:i6(),children:e}),jsxs("div",{"data-slot":"app-layout-body",className:s6(),children:[o,jsx("main",{"data-slot":"app-layout-main",className:l6(),children:i}),r&&jsx("aside",{"data-slot":"app-layout-aside",className:c6({hideBelow:a}),style:{width:n,minWidth:n},children:r})]}),t&&jsx("div",{"data-slot":"app-layout-footer",className:d6(),children:t})]})}var p6=Os;var f6=["chat","skills","sites","scheduled-tasks","workspace","library"];function wY({view:e,sidebar:t,chat:o,skills:r,sites:n,scheduledTasks:a,workspace:i,library:d,header:s,footer:l,platform:c="web",fullscreen:p=false,sidebarCollapsed:m=false,onToggleSidebar:u,windowControls:v,sidePanel:w,settings:b,taskDetail:h,overlays:x,contained:k=false,className:y=""}){let[P,N]=useState(()=>new Set([e]));useEffect(()=>{N(_=>{if(_.has(e))return _;let D=new Set(_);return D.add(e),D});},[e]);let S=c==="windows"?jsx(cf,{...v}):void 0,M=s===void 0?k||c!=="windows"?null:jsx(df,{platform:c,fullscreen:p,collapsed:m,onToggle:u,chrome:S}):s,T={chat:o,skills:r,sites:n??null,"scheduled-tasks":a,workspace:i,library:d??null};return jsxs(Fragment,{children:[jsx(Yp,{header:M,footer:l,sidebar:t,contained:k,className:y,children:jsxs("div",{className:"desktop-workbench-row","data-side-panel":w?"on":"off",children:[jsx("div",{className:"owcenter","data-view":e,children:f6.map(_=>{if(_!==e&&!P.has(_))return null;let D=_===e;return jsx("div",{className:"desktop-workbench-page",hidden:!D,"aria-hidden":!D,children:T[_]},_)})}),w]})}),h,b,x]})}var b6=[{key:"projects",label:"\u9879\u76EE"},{key:"memory",label:"\u8BB0\u5FC6"}],w6={projects:"\u8FD8\u6CA1\u6709\u9879\u76EE\u3002\u6DFB\u52A0\u4E00\u4E2A\u672C\u5730\u76EE\u5F55\uFF0C\u5C31\u80FD\u4ECE\u8FD9\u91CC\u8FDB\u51FA\u3002",memory:"\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BB0\u5FC6\u3002"};function PY({tab:e,onTabChange:t,showMemorySearchAction:o=false,memorySearchOpen:r=false,onToggleMemorySearch:n,memorySearch:a,sortAsc:i=false,onSort:d,children:s,overlays:l,empty:c}){let p=i?"\u964D\u5E8F\u6392\u5217":"\u5347\u5E8F\u6392\u5217",m=Children.count(s)===0;return jsxs("div",{className:"page filespace ws-page",children:[jsxs("div",{className:"files__head ws-page__head",children:[jsx(uo,{className:"ws-page__tabs",items:b6,activeKey:e,variant:"underline",size:"md",onChange:u=>t(u)}),jsxs("div",{className:"ws-page__tools",children:[e==="memory"&&o&&n&&jsx(f,{variant:r?"secondary":"ghost",size:"md",icon:jsx($t,{}),title:"\u641C\u7D22\u8BB0\u5FC6","aria-label":"\u641C\u7D22\u8BB0\u5FC6","aria-pressed":r,onClick:n}),jsx(f,{variant:"ghost",size:"md",icon:jsx(Id,{}),title:p,"aria-label":p,onClick:d})]})]}),e==="memory"&&r&&a&&jsx("div",{className:"ws-page__search",children:a}),jsx("div",{className:"fs-list ws-page__list",children:m?c??jsx(F,{className:"ws-page__empty",message:w6[e]}):s}),l]})}var Eb={user:jsx(Xr,{"aria-hidden":"true"}),remember:jsx(yt,{"aria-hidden":"true"}),extractor:jsx(xi,{"aria-hidden":"true"})};function Ab({title:e,description:t,action:o}){let r=!!t?.trim();return jsx(F,{className:"mem-empty",action:o,title:r?e:void 0,message:r?t:e})}function Bb({rows:e=5}){return jsx("div",{className:"fs-skeleton","aria-busy":"true","aria-label":"\u6B63\u5728\u52A0\u8F7D",children:Array.from({length:e},(t,o)=>jsx(re,{variant:"block",height:54},o))})}function VY({name:e,path:t,onEnter:o,onOpenDirectory:r}){return jsxs("div",{className:"fs-row project",role:o?"button":void 0,tabIndex:o?0:void 0,onClick:o,onKeyDown:n=>{n.target===n.currentTarget&&o&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),o());},children:[jsx("span",{className:"folder-ic",children:jsx(qe,{})}),jsxs("span",{className:"meta",children:[jsx("span",{className:"n",children:e}),jsx("span",{className:"sub",children:t})]}),jsx(f,{variant:"unstyled",className:"open hover-only",onClick:n=>{n.stopPropagation(),r?.();},children:"\u6253\u5F00\u76EE\u5F55"})]})}function Ib({entry:e,onEnter:t,onOpen:o}){let r=e.kind==="folder"?jsx("span",{className:"folder-ic",children:jsx(qe,{})}):e.kind==="image"&&e.preview?e.preview:jsx("span",{className:"g fg-doc",children:jsx(oo,{})});return jsxs("div",{className:"fs-row",role:"button",tabIndex:0,onClick:()=>t?.(e),onKeyDown:n=>{n.target===n.currentTarget&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t?.(e));},children:[r,jsx("span",{className:"n",children:jsx("span",{children:e.name})}),jsx("span",{className:"col size",children:e.size??"\u2014"}),jsx("span",{className:"col date",children:e.modified}),jsx(f,{variant:"unstyled",className:"open hover-only",onClick:n=>{n.stopPropagation(),o?.(e);},children:"\u6253\u5F00"})]})}function FY({name:e,breadcrumbs:t=[],entries:o,loading:r,error:n,errorDetail:a,onRetry:i,onBack:d,onBreadcrumb:s,onEnter:l,onOpen:c}){let p=o.filter(u=>u.kind==="folder"),m=o.filter(u=>u.kind!=="folder");return jsxs("div",{className:"page filespace",children:[jsx("div",{className:"skd__head",children:jsx(go,{className:"fs-back",label:"\u8FD4\u56DE\u9879\u76EE",onClick:d,children:"\u9879\u76EE"})}),jsxs("div",{className:"folder-detail",children:[jsxs("div",{className:"fd-crumb",children:[jsxs(f,{variant:"unstyled",className:"root",onClick:()=>s?.(-1),children:[jsx(kd,{}),jsx("span",{className:"nm",children:e})]}),t.map((u,v)=>jsxs("span",{className:"seg-wrap",children:[jsx(he,{className:"sep"}),jsx(f,{variant:"unstyled",className:"seg",onClick:()=>s?.(v),children:u})]},v))]}),jsx("div",{className:"fs-list inner",children:r?jsx(Bb,{}):n?jsx(J,{variant:"error",title:n,detail:a,className:"fs-list__error",action:i?jsx(f,{size:"sm",variant:"secondary",icon:jsx(We,{}),onClick:i,children:"\u91CD\u8BD5"}):void 0}):o.length===0?jsx(Ab,{title:"\u8FD9\u4E2A\u6587\u4EF6\u5939\u662F\u7A7A\u7684",description:"\u9879\u76EE\u4E2D\u7684\u6587\u4EF6\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002"}):jsxs(Fragment,{children:[p.length>0&&jsxs("div",{className:"fs-group",children:[jsxs("div",{className:"fs-group__lbl",children:["\u6587\u4EF6\u5939 ",jsx("span",{className:"ct",children:p.length})]}),p.map(u=>jsx(Ib,{entry:u,onEnter:l,onOpen:c},u.id))]}),m.length>0&&jsxs("div",{className:"fs-group",children:[jsxs("div",{className:"fs-group__lbl",children:["\u6587\u4EF6 ",jsx("span",{className:"ct",children:m.length})]}),m.map(u=>jsx(Ib,{entry:u,onEnter:l,onOpen:c},u.id))]})]})})]})]})}function $Y({sections:e,onOpenItem:t,loading:o=false,error:r,errorDetail:n,onRetry:a}){let i=e.reduce((d,s)=>d+s.items.length,0);return o&&i===0?jsx(Bb,{rows:4}):r?jsx(J,{variant:"error",title:r,detail:n,className:"fs-list__error",action:a?jsx(f,{size:"sm",variant:"secondary",icon:jsx(We,{}),onClick:a,children:"\u91CD\u8BD5"}):void 0}):i===0?jsx(Ab,{title:"\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BB0\u5FC6",description:"\u5728\u804A\u5929\u4E2D\u8BA9 Orbitwork \u8BB0\u4F4F\u91CD\u8981\u4FE1\u606F\uFF0C\u6216\u7531\u4EFB\u52A1\u81EA\u52A8\u63D0\u53D6\u540E\uFF0C\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002"}):jsx("div",{className:"mem",children:e.map(d=>jsxs("section",{className:"mem-sec",children:[jsxs("div",{className:"mem-sec__lbl",children:[d.title,d.hint&&jsx("span",{className:"hint",children:d.hint})]}),jsx("div",{className:"mem-day",children:jsx("div",{className:"mem-day__list",children:d.items.map(s=>{let l=s.source??"extractor";return jsxs("div",{className:"mem-note",role:"button",tabIndex:0,onClick:()=>t?.(s),onKeyDown:c=>{c.target===c.currentTarget&&(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),t?.(s));},children:[jsx("span",{className:`tick src-${l}`}),jsxs("div",{className:"body",children:[s.subject!==void 0&&jsx("div",{className:"subject",children:s.subject}),s.subject===void 0?s.text:jsx("div",{className:"text",children:s.text}),jsxs("div",{className:"tags",children:[jsxs("span",{className:`src-pill src-${l}`,children:[Eb[l]??Eb.extractor,s.sourceLabel??(l==="user"?"\u7528\u6237":l==="remember"?"\u624B\u52A8\u8BB0\u4F4F":"\u81EA\u52A8\u63D0\u53D6")]}),s.tags?.map((c,p)=>jsx("span",{className:"mtag",children:c},p))]})]}),s.when&&jsx("span",{className:"when",children:s.when})]},s.id)})})})]},d.id))})}function zY({title:e,content:t,preview:o,meta:r,onClose:n,onDelete:a,onSave:i}){let[d,s]=useState(false),[l,c]=useState(t),[p,m]=useState(false),u=async()=>{let v=l.trim();if(!(!v||p)){m(true);try{await i?.(v),s(!1);}catch{}finally{m(false);}}};return jsx(oe,{open:true,bare:true,ariaLabel:"\u8BB0\u5FC6\u8BE6\u60C5",className:"mem-modal ow-form",overlayClassName:"mem-modal-host",onClose:n,children:jsxs(Fragment,{children:[jsxs("div",{className:"cf__head",children:[jsx("div",{className:"cf__t t",children:d?jsxs(Fragment,{children:["\u7F16\u8F91",e]}):e}),jsx(f,{variant:"unstyled",className:"x","aria-label":"\u5173\u95ED",onClick:n,children:jsx(Q,{})})]}),d?jsx("div",{className:"cf__body cf__body--scroll",children:jsxs("div",{className:"frow frow--grow",children:[jsx("label",{children:"\u5185\u5BB9"}),jsx(Wf,{unstyled:true,className:"ftext ftext--fill",autoFocus:true,value:l,onChange:v=>c(v.target.value),placeholder:"\u652F\u6301 Markdown"}),jsx("div",{className:"fhint",children:"\u652F\u6301 Markdown\uFF1A\u6807\u9898\u3001\u5217\u8868\u3001\u4EE3\u7801\u3001\u8868\u683C\u7B49\u3002"})]})}):jsx("div",{className:"cf__body cf__body--scroll",children:jsx("div",{className:"mem-detail__md",children:o??t})}),jsxs("div",{className:"cf__foot",children:[jsx("div",{className:"mem-detail__meta",children:r}),d?jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:p,onClick:()=>{c(t),s(false);},children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",disabled:!l.trim()||p,onClick:()=>{u();},children:p?"\u4FDD\u5B58\u4E2D\u2026":"\u4FDD\u5B58"})]}):jsxs(Fragment,{children:[a&&jsx(f,{variant:"danger",icon:jsx(Le,{}),onClick:()=>{a();},children:"\u5220\u9664"}),jsx(f,{variant:"primary",icon:jsx(yt,{}),onClick:()=>s(true),children:"\u7F16\u8F91"})]})]})]})})}var h6=[{id:"web",label:"\u65B0\u5EFA\u6D4F\u89C8\u5668\u6807\u7B7E",keys:["Mod","T"]},{id:"terminal",label:"\u6253\u5F00\u7EC8\u7AEF",keys:["Mod","B"]},{id:"files",label:"\u6253\u5F00\u6587\u4EF6\u7BA1\u7406",keys:["Mod","P"]}];function GY({actions:e=h6,onSelect:t,label:o="\u65B0\u5EFA\u9875\u7B7E",platform:r="mac",className:n}){return jsx("div",{"data-slot":"side-panel-empty",className:g("side-panel-empty",n),children:jsx("div",{role:"group","aria-label":o,className:"flex w-full max-w-[280px] flex-col gap-1.5",children:e.map(a=>{let i=a.kbd??(a.keys?Xn(a.keys,r):void 0);return jsxs("button",{type:"button","data-slot":"side-panel-empty-action",onClick:()=>a.onSelect?a.onSelect():t?.(a),className:g("flex h-9 w-full cursor-pointer items-center gap-2.5 px-3 text-left","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-sm)] bg-[var(--ow-surface)]","text-ow-fs-ui text-[color:var(--ow-text)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","ow-focus-ring"),children:[jsx("span",{className:"min-w-0 flex-1 truncate",children:a.label}),i?jsx(Br,{"aria-hidden":"true",children:i}):null]},a.id)})})})}var y6=[{id:"daily-brief",label:"\u6BCF\u65E5\u7B80\u62A5"},{id:"code-review",label:"\u4EE3\u7801\u8BC4\u5BA1"},{id:"doc-writing",label:"\u6587\u6863\u64B0\u5199"},{id:"site-publish",label:"\u5EFA\u7AD9\u53D1\u5E03"},{id:"custom",label:"\u81EA\u5B9A\u4E49"}];function XY({options:e=y6,value:t=null,onSelect:o,label:r="\u8D77\u624B\u793A\u4F8B",className:n}){return jsx("div",{"data-slot":"starter-capsules",role:"group","aria-label":r,className:g("flex flex-wrap justify-center gap-2",n),children:e.map(a=>{let i=t===a.id;return jsx("button",{type:"button","data-slot":"starter-capsule","aria-pressed":i,onClick:()=>o?.(a),className:g("inline-flex items-center justify-center h-8 px-[14px] cursor-pointer whitespace-nowrap","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-sm)]","text-ow-fs-body text-[color:var(--ow-text)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","ow-focus-ring",i?"bg-[var(--ow-current-bg)] font-medium":"bg-transparent font-normal"),children:a.label},a.id)})})}var Vb={normal:"38%",max:"68%"};function tX({open:e=true,maximized:t=false,label:o="\u53F3\u680F",children:r,className:n=""}){if(!e)return null;let a=t?Vb.max:Vb.normal;return jsx("aside",{className:g("workbench-side-panel",n),"data-maximized":t?"on":"off",style:{width:a},"aria-label":o,children:r})}function C6({messages:e,title:t}){return jsxs("div",{className:"snapshot-content",children:[t&&jsx("h2",{children:t}),e.map(o=>jsxs("article",{children:[jsx("h3",{children:o.role==="user"?"\u7528\u6237":"\u52A9\u624B"}),o.blocks.map((r,n)=>"text"in r?jsx(ns,{source:r.text,className:"snapshot-markdown"},n):r.asset.src?jsxs("figure",{children:[jsx("img",{src:r.asset.src,alt:r.asset.name,width:640,height:480}),jsx("figcaption",{children:r.asset.name})]},n):jsxs("p",{children:["\u9644\u4EF6\uFF1A",r.asset.name]},n))]},o.id))]})}function dX(e){return jsx(oe,{bare:true,open:true,ariaLabel:"\u5206\u4EAB\u56FE\u7247\u9884\u89C8",onClose:e.onClose,className:"share-image-modal",children:jsxs("div",{className:"share-image-preview",children:[jsx("div",{className:"share-image-preview__head",children:"\u5206\u4EAB\u56FE\u7247\u9884\u89C8"}),jsx(di,{error:true,children:e.error}),jsx(di,{children:e.notice}),jsx("div",{className:"share-image-preview__body",children:jsxs("div",{ref:e.cardRef,className:"share-image-card",children:[jsx("div",{className:"share-image-card__content",children:jsx(C6,{title:e.title,messages:e.messages})}),jsxs("div",{className:"share-image-card__footer",children:[jsx(km,{size:20}),e.includeQR&&e.qr?jsxs("div",{className:"share-image-card__qr",children:[jsx("img",{src:e.qr,alt:"",width:48,height:48}),jsx("span",{children:e.qrRequiresLogin?"\u626B\u7801\u67E5\u770B \xB7 \u767B\u5F55\u8BBF\u95EE":"\u626B\u7801\u67E5\u770B"})]}):null]})]})}),jsxs("div",{className:"share-image-preview__actions",children:[jsx(f,{variant:"secondary",onClick:e.onClose,disabled:e.busy,children:"\u53D6\u6D88"}),jsx(f,{variant:"secondary",onClick:e.onCopy,disabled:!e.ready||e.busy,children:"\u590D\u5236\u56FE\u7247"}),jsx(f,{variant:"primary",onClick:e.onDownload,disabled:!e.ready||e.busy,children:"\u4E0B\u8F7D\u56FE\u7247"})]})]})})}function fX({projectCount:e,busy:t,onDismiss:o,onCancel:r,onMigrate:n,sourcePath:a,targetPath:i,open:d=true}){return jsxs(oe,{open:d,variant:"danger",title:"\u8FC1\u79FB\u5DF2\u6709\u9879\u76EE\u5230\u65B0\u76EE\u5F55\uFF1F",subtitle:"\u539F\u76EE\u5F55\u4E2D\u7684\u9879\u76EE\u4F1A\u4FDD\u7559\uFF0C\u65B0\u76EE\u5F55\u4E2D\u5DF2\u5B58\u5728\u7684\u540C\u540D\u9879\u76EE\u4F1A\u81EA\u52A8\u8DF3\u8FC7\u3002",width:440,closable:!t,closeOnOverlayClick:!t,closeOnEscape:!t,onClose:o,className:"workspace-migrate",actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:t,onClick:r,children:"\u53D6\u6D88"}),jsx(f,{variant:"danger",loading:t,onClick:n,children:t?"\u8FC1\u79FB\u4E2D\u2026":"\u8FC1\u79FB"})]}),children:[jsxs("p",{className:"workspace-migrate__body",children:["\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\u4E0B\u6709 ",jsx("span",{className:"workspace-migrate__count",children:e})," \u4E2A\u9879\u76EE\uFF0C\u5C06\u590D\u5236\u5230\u65B0\u76EE\u5F55\u3002"]}),(a||i)&&jsxs("dl",{className:"workspace-migrate__paths",children:[a&&jsxs(Fragment,{children:[jsx("dt",{children:"\u539F\u76EE\u5F55"}),jsx("dd",{className:"workspace-migrate__path",title:a,children:a})]}),i&&jsxs(Fragment,{children:[jsx("dt",{children:"\u65B0\u76EE\u5F55"}),jsx("dd",{className:"workspace-migrate__path",title:i,children:i})]})]})]})}function Fb({treeData:e,expandedKeys:t,onExpand:o,selectedKey:r,onSelect:n,loadData:a,emptyText:i="\u7A7A\u76EE\u5F55",className:d=""}){let s=useMemo(()=>e,[e]);return e.length===0?jsx("div",{"data-slot":"file-tree","data-ow-part":"empty",className:g("flex flex-col flex-1 min-h-0 overflow-y-auto items-center justify-center font-normal text-ow-fs-caption leading-[1.6] text-ow-text",d),children:jsx(F,{message:i,markSize:32,className:"px-3 py-6"})}):jsx("div",{"data-slot":"file-tree",className:g("flex flex-col flex-1 min-h-0 overflow-y-auto font-normal text-ow-fs-caption leading-[1.6] text-ow-text",d),children:jsx(N6,{prefixCls:"ow-file-tree",treeData:s,fieldNames:{key:"key",title:"title",children:"children"},expandedKeys:t,onExpand:l=>o?.(l),selectedKeys:r?[r]:[],onSelect:(l,c)=>{l.length>0&&n?.(c.node);},loadData:a?async l=>{await a(l);}:void 0,switcherIcon:l=>jsx(he,{className:g("w-3.5 h-3.5 transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",l.expanded&&"rotate-90")}),titleRender:l=>{let c=l;return jsxs("span",{className:"inline-flex items-center gap-1.5 min-w-0",children:[c.isLeaf?jsx(qo,{name:c.title,kind:c.kind,className:"w-4 h-4 shrink-0 text-ow-text-3"}):jsx(qe,{className:"w-4 h-4 shrink-0 text-ow-text-3"}),jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:c.title})]})},showIcon:false})})}var T6=4;function $b(){return jsx("span",{"aria-hidden":true,className:"shrink-0 px-0.5 text-ow-fs-caption [font-family:var(--ow-font-mono)] text-ow-text-3",children:"/"})}function vQ({breadcrumb:e,onBreadcrumbClick:t,actions:o,preview:r,treeData:n,expandedKeys:a,onExpand:i,selectedKey:d,onSelectFile:s,loadData:l,filterText:c,onFilterChange:p,filterPlaceholder:m="\u8FC7\u6EE4\u6587\u4EF6",treeCollapsed:u=false,onToggleTree:v,layout:w="tree-left",className:b=""}){let h=w==="tree-left",x=e??[],k=x.length>T6,y=k?x.slice(1,x.length-2):[],P=k?[x[0],...x.slice(x.length-2)]:x,N=u?null:jsx("div",{"data-ow-part":"tree",className:g("flex flex-col min-h-0 shrink-0 overflow-y-auto px-1 py-1.5",h?"w-[44%] min-w-0 border-r border-ow-border":"w-60"),children:jsx(Fb,{treeData:n,expandedKeys:a,onExpand:i,selectedKey:d,onSelect:R=>{if(R.isLeaf){s?.(R);return}if(!i)return;let M=a??[];i(M.includes(R.key)?M.filter(T=>T!==R.key):[...M,R.key]);},loadData:l})}),S=jsxs("div",{"data-ow-part":"preview",className:g("flex flex-col flex-1 min-w-0 min-h-0 overflow-hidden",!h&&!u&&"border-r border-ow-border"),children:[e&&e.length>0&&jsx("div",{"data-ow-part":"breadcrumb",className:"flex items-center shrink-0 min-w-0 overflow-hidden px-3 py-2 border-b border-ow-border",children:P.map((R,M)=>{let T=M===P.length-1;return jsxs(Fragment$1,{children:[M>0&&jsx($b,{}),y.length>0&&M===1&&jsxs(Fragment,{children:[jsx("span",{className:"shrink-0 px-1 text-ow-fs-caption [font-family:var(--ow-font-mono)] text-ow-text-3",title:y.map(_=>_.label).join(" / "),children:"\u2026"}),jsx($b,{})]}),jsx("span",{className:g("inline-flex items-center",T?"shrink-0 min-w-0":"min-w-[4ch]"),children:jsx(f,{variant:"unstyled",className:g("ow-focus-ring border-0 bg-transparent px-1 py-0 [border-radius:var(--ow-radius-xs)] font-normal text-ow-fs-caption leading-[1.4] [font-family:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-text-3 cursor-pointer whitespace-nowrap overflow-hidden text-ellipsis hover:bg-[var(--ow-hover)] hover:text-ow-text active:bg-[var(--ow-press)]",T&&"text-ow-text"),onClick:()=>t?.(R.key),children:R.label})})]},R.key)})}),jsx("div",{"data-ow-part":"preview-body",className:"flex flex-col flex-1 min-h-0 overflow-hidden bg-[var(--ow-code-bg)] [&>*]:flex-1 [&>*]:min-h-0",children:r})]});return jsxs("div",{"data-slot":"file-browser","data-ow-layout":w,className:g("flex flex-col flex-1 min-h-0 overflow-hidden bg-ow-bg",b),children:[jsxs("div",{"data-ow-part":"header",className:"flex items-center gap-2 h-10 px-2 border-b border-ow-border shrink-0",children:[jsx(te,{"data-ow-part":"filter",type:"text",value:c??"",placeholder:m,onChange:R=>p?.(R),className:"flex-1 min-w-0 [&_[data-slot=field-control]]:[font-size:var(--ow-fs-caption)]","aria-label":"\u8FC7\u6EE4\u6587\u4EF6"}),o,jsx(f,{variant:"unstyled","data-ow-part":"toggle",className:g("ow-focus-ring inline-flex items-center justify-center w-7 h-7 shrink-0 border-0 bg-transparent [border-radius:var(--ow-radius-sm)] cursor-pointer text-ow-text-2 hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",u&&"text-ow-text-3"),onClick:v,title:u?"\u5C55\u5F00\u76EE\u5F55":"\u6536\u8D77\u76EE\u5F55","aria-label":u?"\u5C55\u5F00\u76EE\u5F55":"\u6536\u8D77\u76EE\u5F55","aria-pressed":!u,children:jsx(Fd,{width:15,height:15})})]}),jsx("div",{"data-ow-part":"body",className:"flex flex-1 min-h-0",children:h?jsxs(Fragment,{children:[N,S]}):jsxs(Fragment,{children:[S,N]})})]})}function Hb({content:e,fileName:t,loading:o=false,error:r,errorDetail:n,defaultMode:a="table",className:i=""}){let[d,s]=useState(a),{headers:l,rows:c}=useMemo(()=>_6(e),[e]),p=useMemo(()=>[{key:"__i",header:"#",headerLabel:"\u884C\u53F7",numeric:true,width:56,render:v=>v.__i+1},...l.map((v,w)=>({key:`c${w}`,header:v,numeric:true,align:"start",render:b=>b.cells[w]??""}))],[l]),m=useMemo(()=>c.map((v,w)=>({__i:w,cells:v})),[c]),u=jsxs(rf,{actions:jsx(Ht,{"aria-label":"\u9884\u89C8\u65B9\u5F0F",size:"sm",value:d,onChange:v=>s(v),options:[{value:"table",label:"\u8868\u683C"},{value:"raw",label:"\u6E90\u7801"}]}),children:[t&&jsx("span",{"data-ow-part":"filename",className:"truncate font-[family-name:var(--ow-font-mono)] text-ow-fs-ui font-medium [font-variant-numeric:tabular-nums] text-[color:var(--ow-text)]",children:t}),jsxs("span",{"data-ow-part":"meta",className:"font-[family-name:var(--ow-font-mono)] text-ow-fs-eyebrow [font-variant-numeric:tabular-nums] text-[color:var(--ow-text-3)]",children:[c.length," \u884C \xD7 ",l.length," \u5217"]})]});return d==="raw"?jsxs("div",{"data-slot":"csv-preview",className:g("flex min-h-0 flex-1 flex-col overflow-hidden",i),children:[u,o?jsxs("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"flex min-h-0 flex-1 flex-col gap-2 overflow-hidden p-3.5",children:[jsx(re,{variant:"line",height:14,width:"72%"}),jsx(re,{variant:"line",height:14}),jsx(re,{variant:"line",height:14,width:"88%"}),jsx(re,{variant:"line",height:14,width:"64%"})]}):r?jsx("div",{"data-ow-part":"error",className:"min-h-0 flex-1 overflow-auto p-3.5",children:jsx(J,{variant:"error",detail:n,children:r})}):jsx("div",{"data-ow-part":"raw",className:"min-h-0 flex-1 overflow-auto p-3.5",children:jsx("pre",{className:"m-0 whitespace-pre-wrap break-words font-[family-name:var(--ow-font-mono)] text-ow-fs-ui font-normal leading-[1.6] [font-variant-numeric:tabular-nums] text-[color:var(--ow-text-2)]",children:jsx("code",{children:e})})})]}):jsx("div",{"data-slot":"csv-preview",className:g("flex min-h-0 flex-1 flex-col overflow-hidden",i),children:jsx(dl,{className:"min-h-0 flex-1 [&_table]:w-auto [&_table]:min-w-full [&_td]:whitespace-nowrap [&_th]:whitespace-nowrap",toolbar:u,caption:t?`${t} \u7684\u8868\u683C\u9884\u89C8`:"\u8868\u683C\u9884\u89C8",columns:p,rows:m,rowKey:v=>String(v.__i),density:"dense",stickyHeader:true,loading:o,error:r,errorDetail:n,emptyMessage:"\u6587\u4EF6\u662F\u7A7A\u7684\uFF0C\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6570\u636E\u3002"})})}function _6(e){let t=e.trim().split(/\r?\n/);if(t.length===0)return {headers:[],rows:[]};let o=L6(t[0]??""),r=zb(t[0]??"",o),n=t.slice(1).filter(a=>a.trim()).map(a=>zb(a,o));return {headers:r,rows:n}}function L6(e){let t=(e.match(/,/g)??[]).length,o=(e.match(/\t/g)??[]).length,r=(e.match(/;/g)??[]).length;return o>t&&o>=r?" ":r>t?";":","}function zb(e,t){let o=[],r="",n=false;for(let a=0;a<e.length;a++){let i=e[a];n?i==='"'?e[a+1]==='"'?(r+='"',a+=1):n=false:r+=i:i==='"'?n=true:i===t?(o.push(r),r=""):r+=i;}return o.push(r),o}function EQ(e){let[t,o]=useState(e.defaultRawMarkdown??false),r=e.rawMarkdown??t,n=p=>{e.rawMarkdown===void 0&&o(p),e.onRawMarkdownChange?.(p);},{name:a,fileKind:i,content:d="",language:s="",url:l="",fileType:c="word"}=e;return i==="markdown"?jsxs("div",{className:"browser-file-preview__markdown",children:[jsxs("div",{className:"browser-file-preview__markdown-header",children:[jsx("span",{className:"browser-file-preview__markdown-name",children:a}),jsx(uo,{className:"browser-file-preview__markdown-tabs",size:"sm",items:[{key:"preview",label:"\u9884\u89C8"},{key:"raw",label:"\u6E90\u7801"}],activeKey:r?"raw":"preview",onChange:p=>n(p==="raw")})]}),jsx("div",{className:"browser-file-preview__markdown-body",children:r?jsx(Wi,{className:"browser-file-preview__content",language:"markdown",code:d}):e.renderMarkdown?.(d)})]}):i==="code"?jsx(Wi,{className:"browser-file-preview__content",language:s,code:d}):i==="csv"?jsx(Hb,{className:"browser-file-preview__content",content:d,fileName:a}):i==="pdf"?jsx(Yn,{className:"browser-file-preview__content",src:l,fileName:a}):i==="web"?jsx("iframe",{className:"browser-file-preview__content browser-file-preview__web-iframe",src:l,title:a,sandbox:"allow-scripts allow-same-origin"}):i==="office"?jsx(Zn,{className:"browser-file-preview__content",src:l,fileType:c,onOpen:e.onOpenDefault,onRequestOpenWithOptions:e.onRequestOpenWithOptions,onOpenWith:e.onOpenWith}):jsx("div",{className:"browser-file-preview__unsupported",children:jsx(F,{message:jsxs(Fragment,{children:[jsx("span",{className:"browser-file-preview__unsupported-line",children:"\u65E0\u6CD5\u9884\u89C8\u8FD9\u4E2A\u6587\u4EF6"}),jsx("span",{className:"browser-file-preview__unsupported-name",children:a}),e.unsupportedReason&&jsx("span",{className:"browser-file-preview__unsupported-reason",children:e.unsupportedReason})]}),action:jsxs("div",{className:"browser-file-preview__unsupported-actions",children:[jsx(f,{variant:"primary",type:"button",onClick:e.onOpenDefault,children:"\u4F7F\u7528\u9ED8\u8BA4\u5E94\u7528\u6253\u5F00"}),e.onClose&&jsx(f,{variant:"ghost",type:"button",onClick:e.onClose,children:"\u5173\u95ED"})]})})})}function UQ({src:e,fileType:t,onOpen:o,onRequestOpenWithOptions:r,onOpenWith:n,...a}){return jsx(En,{...a,surface:"plain",children:jsx(Zn,{chrome:false,src:e,fileType:t,onOpen:o,onRequestOpenWithOptions:r,onOpenWith:n})})}function YQ({src:e,page:t,onPageChange:o,totalPages:r,meta:n,actions:a,...i}){let[d,s]=useState(t??1),l=t??d,p=r?jsx(jc,{page:l,totalPages:r,onPageChange:m=>{m<1||r&&m>r||(s(m),o?.(m));}}):null;return jsx(En,{...i,meta:n??(r?`${l} / ${r}`:void 0),actions:p||a?jsxs(Fragment,{children:[p,a]}):void 0,surface:"plain",children:jsx(Yn,{chrome:false,src:e,page:l,fileName:i.fileName})})}var wd=8;function mJ({servers:e,page:t,onPageChange:o,loading:r,onRefresh:n,onCopy:a,onRemove:i}){if(r&&e.length===0)return jsx("div",{className:"mcp-server-list","aria-busy":"true","aria-label":"\u6B63\u5728\u8BFB\u53D6 MCP \u914D\u7F6E",children:[0,1,2].map(l=>jsxs("div",{className:"mcp-server-row",children:[jsx("span",{}),jsx(re,{variant:"block",width:38,height:38,radius:"var(--ow-radius-md)"}),jsxs("div",{className:"mcp-server-row__body",children:[jsx(re,{variant:"line",width:"42%",height:13}),jsx(re,{variant:"line",width:"66%",height:11})]}),jsx("span",{})]},l))});if(e.length===0)return jsx(F,{className:"connector-empty",size:"page",title:"\u8FD8\u6CA1\u6709\u81EA\u5B9A\u4E49 MCP",message:"\u628A\u672C\u673A\u8DD1\u7740\u7684 MCP \u670D\u52A1\u63A5\u8FDB\u6765\uFF0CAI \u5C31\u80FD\u7528\u4E0A\u5B83\u5E26\u7684\u90A3\u4E9B\u5DE5\u5177\u3002"});let d=Math.max(1,Math.ceil(e.length/wd)),s=Math.min(t,d);return jsxs("div",{className:"mcp-server-list",children:[e.slice((s-1)*wd,s*wd).map(l=>jsx(O6,{server:l,onRefresh:n,onCopy:a,onRemove:i},l.id)),d>1&&jsx(wn,{current:s,total:e.length,pageSize:wd,onChange:o})]})}function O6({server:e,onRefresh:t,onCopy:o,onRemove:r}){let[n,a]=useState(false),[i,d]=useState(false),[s,l]=useState(false),c=e.status!=="available",p=!!(e.errorSummary||c),m=i||s,u=i?"reconnecting":V6(e.status),v=i?"\u91CD\u8FDE\u4E2D":$6(e),w=async()=>{d(true);try{await t(e);}finally{d(false);}},b=async()=>{l(true);try{await r(e);}finally{l(false);}};return jsxs("div",{className:`mcp-server-row${n?" is-expanded":""}${m?" is-busy":""}`,children:[jsx(f,{variant:"ghost",size:"sm",className:"mcp-server-row__expand",disabled:!p,"aria-label":n?"\u6536\u8D77 MCP \u8BE6\u60C5":"\u5C55\u5F00 MCP \u8BE6\u60C5","aria-expanded":p?n:void 0,onClick:()=>a(h=>!h),children:jsx(he,{})}),jsx("span",{className:`mcp-server-row__icon t-${e.type}`,children:e.type==="stdio"?jsx(So,{}):jsx(Mt,{})}),jsxs("div",{className:"mcp-server-row__body",children:[jsxs("div",{className:"mcp-server-row__title",children:[jsx("b",{children:e.displayName||e.id}),jsx(Rn,{size:"sm",variant:"primary",shape:"square",children:e.type==="stdio"?"STDIO":"HTTP"}),jsx(ro,{dot:F6(u),label:v,description:e.statusText})]}),p&&n&&jsxs("div",{className:"mcp-server-row__details",children:[jsx("div",{className:"mcp-server-row__summary",children:e.summary||"-"}),e.toolNames.length>0&&jsx("div",{className:"mcp-server-row__tools",children:e.toolNames.slice(0,5).join(" \xB7 ")}),jsx("b",{children:"\u5904\u7406\u5EFA\u8BAE"}),jsx("p",{children:e.errorSummary??"\u5F53\u524D MCP \u6682\u672A\u8FD4\u56DE\u5DE5\u5177\uFF0C\u8BF7\u5237\u65B0\u72B6\u6001\u6216\u5728\u9996\u6B21\u4F7F\u7528\u65F6\u518D\u68C0\u67E5\u3002"})]})]}),jsx("div",{className:"mcp-server-row__actions",children:jsx(zn,{disabled:m,ariaLabel:`\u300C${e.displayName||e.id}\u300D\u7684\u66F4\u591A\u64CD\u4F5C`,items:[{key:"reconnect",label:i?"\u91CD\u8FDE\u4E2D\u2026":"\u91CD\u8FDE",icon:jsx(We,{})},...p?[{key:"copy",label:"\u590D\u5236\u9519\u8BEF\u6458\u8981",icon:jsx(So,{}),confirmsInPlace:true}]:[],{key:"remove",label:s?"\u5220\u9664\u4E2D\u2026":"\u5220\u9664",icon:jsx(Le,{}),danger:true}],onSelect:h=>{h==="reconnect"?w():h==="copy"?o(e):h==="remove"&&b();}})})]})}function V6(e){return e==="available"?"success":e==="auto_disabled"||e==="starting"||e==="restarting"||e==="unknown"?"unavailable":e==="degraded"?"warning":"error"}function F6(e){return e==="success"?"success":e==="error"?"error":e==="warning"||e==="reconnecting"?"warning":"neutral"}function $6(e){return {available:"\u5DF2\u8FDE\u63A5",configured:"\u6682\u65E0\u53EF\u7528\u5DE5\u5177",auto_disabled:"\u5DF2\u81EA\u52A8\u9694\u79BB",starting:"\u8FDE\u63A5\u4E2D",restarting:"\u91CD\u8FDE\u4E2D",degraded:"\u90E8\u5206\u5F02\u5E38",error:"\u8FDE\u63A5\u5F02\u5E38",missing:"\u8FDE\u63A5\u5F02\u5E38",sidecar_error:"\u72B6\u6001\u5237\u65B0\u5931\u8D25",unknown:"\u72B6\u6001\u672A\u77E5"}[e.status]||e.statusText||"\u4E0D\u53EF\u7528"}function wJ({name:e,desc:t,avatar:o,version:r,outdated:n,installed:a,installing:i=false,showVersion:d=false,actionLabel:s,actionVariant:l="secondary",actionDisabled:c,mine:p,metaItems:m,onOpen:u,onAction:v}){return jsx(Zl,{avatar:o,name:e,version:d?r:void 0,status:i?"installing":a?n?"update":"installed":void 0,badge:p?jsx(Nt,{status:"mine"}):void 0,description:t,metaItems:m,actionLabel:s??(i?n?"\u66F4\u65B0\u4E2D\u2026":"\u5B89\u88C5\u4E2D\u2026":n?"\u66F4\u65B0":a?"\u4F7F\u7528":"\u5B89\u88C5"),actionVariant:l,actionState:n?"update":a?"installed":"default",actionDisabled:i||c,onOpen:u,onAction:v})}function jb({avatar:e,name:t,author:o,version:r,updatedAt:n,status:a,badge:i,brief:d,authorization:s,docContent:l,loading:c,loadingText:p="\u6B63\u5728\u8BFB\u53D6\u8BF4\u660E\u2026",error:m,errorDetail:u,onRetry:v,emptyText:w="\u6682\u65E0\u8BE6\u7EC6\u8BF4\u660E",backLabel:b,onBack:h,actions:x}){return jsxs(Rs,{avatar:e,name:t,author:o,version:r,updatedAt:n,kind:"\u6280\u80FD",status:a,badges:i,summary:d,actions:x,backLabel:b,onBack:h,children:[s&&jsx(Xa,{title:"\u6388\u6743",children:s}),jsx(Xa,{title:"\u8BE6\u7EC6\u8BF4\u660E",children:c?jsxs("div",{className:"skd__loading",role:"status",children:[jsx(vr,{size:"md"}),jsx("span",{children:p})]}):m?jsx(J,{variant:"error",detail:u,action:v&&jsx(f,{variant:"secondary",size:"sm",onClick:v,children:"\u91CD\u8BD5"}),children:m}):l?jsx("div",{className:"skd__doc",children:l}):jsx(F,{className:"skd__empty-state",message:w})})]})}function IJ(e){let[t,o]=useState(false),r=kp({installed:e.installed,outdated:e.outdated,installing:e.installing}),n=jsx(Np,{installed:e.installed,outdated:e.outdated,installing:e.installing,primaryLabel:e.actionLabel??"\u4F7F\u7528\u6280\u80FD",primaryIcon:e.actionIcon??jsx(gr,{}),primaryVisible:!!e.onUse,primaryDisabled:e.actionDisabled,onInstall:e.onInstall,onUpdate:e.onUpdate,onPrimaryAction:()=>e.onUse?.(),menuItems:[...e.menuItems??[],...e.onOpenDir?[{key:"openDir",label:"\u6253\u5F00\u76EE\u5F55",icon:jsx(qe,{})}]:[],...e.onUninstall?[{key:"uninstall",label:"\u5378\u8F7D",icon:jsx(Le,{}),danger:true,disabled:e.installing}]:[]],onMenuSelect:a=>{e.onMenuSelect?.(a),a==="openDir"&&e.onOpenDir?.(),a==="uninstall"&&o(true);}});return jsxs(Fragment,{children:[jsx(jb,{avatar:e.avatar,name:e.name,author:e.author,version:e.version,updatedAt:e.updatedAt,status:r&&jsx(Nt,{status:r}),badge:e.badge,brief:e.brief,authorization:e.authorization,docContent:e.docContent,loading:e.loading,loadingText:e.loadingText,error:e.error,errorDetail:e.errorDetail,onRetry:e.onRetry,emptyText:e.emptyText,backLabel:e.backLabel,onBack:e.onBack,actions:n}),t&&e.onUninstall&&jsx(nf,{title:"\u5378\u8F7D\u6280\u80FD",description:`\u5C06\u4ECE\u672C\u5730\u79FB\u9664\u300C${e.name}\u300D\u3002`,onCancel:()=>o(false),onConfirm:()=>{o(false),e.onUninstall?.();}})]})}function au({value:e}){return jsx("span",{className:"font-[family-name:var(--ow-font-mono)] tabular-nums text-[color:var(--ow-text-2)]",children:e})}function HJ(e){return jsx(oe,{open:true,width:520,icon:jsx(gr,{}),iconTone:"info",title:"\u5BFC\u5165\u6280\u80FD",subtitle:"\u652F\u6301 .zip\u3001.tar.gz \u548C .tgz \u6280\u80FD\u5305\uFF0C\u6216\u6279\u91CF\u626B\u63CF\u672C\u5730\u6587\u4EF6\u5939\u3002",onClose:e.onClose,actions:null,children:jsx(F,{markSize:36,message:"\u6280\u80FD\u6839\u76EE\u5F55\u5FC5\u987B\u5305\u542B SKILL.md\uFF1B\u9009\u62E9\u6587\u4EF6\u5939\u65F6\u4F1A\u6279\u91CF\u5BFC\u5165\u5176\u4E2D\u7684\u6280\u80FD\u3002",action:jsxs("div",{className:"flex items-center gap-3",children:[jsx(f,{variant:"secondary",icon:jsx(ki,{}),onClick:e.onInstallArchive,children:"\u9009\u62E9\u538B\u7F29\u5305"}),jsx(f,{variant:"secondary",icon:jsx(qe,{}),onClick:e.onInstallDirectory,children:"\u9009\u62E9\u6587\u4EF6\u5939"})]})})})}function WJ(e){return jsx(oe,{open:true,width:520,icon:jsx(gr,{}),iconTone:"info",title:"\u5BFC\u5165\u7ED3\u679C",subtitle:jsxs(Fragment,{children:["\u6210\u529F ",jsx(au,{value:e.summary.success})," \u4E2A\uFF0C\u5931\u8D25 ",jsx(au,{value:e.summary.failed})," \u4E2A\uFF0C\u8DF3\u8FC7"," ",jsx(au,{value:e.summary.skipped})," \u4E2A"]}),onClose:e.onClose,actions:jsx(f,{variant:"primary",onClick:e.onClose,children:"\u5B8C\u6210"}),children:jsx("div",{"data-ow-part":"result-list",className:"max-h-96 overflow-y-auto flex flex-col gap-2 [border-radius:var(--ow-radius-card)]",children:e.items.map((t,o)=>jsxs("div",{"data-ow-part":"result-item","data-ow-state":t.status,className:"flex flex-col gap-1 p-3 bg-ow-surface-2 [border-radius:var(--ow-radius-control)]",children:[jsx("span",{"data-ow-part":"status",className:g("text-ow-fs-caption font-semibold leading-[1.3] font-[family-name:var(--ow-font-sans)]",t.status==="success"&&"text-[color:var(--ow-success-on-tint)]",t.status==="failed"&&"text-[color:var(--ow-error-on-tint)]",t.status==="skipped"&&"text-ow-text-3"),children:U6(t.status)}),jsx("span",{"data-ow-part":"name",className:"text-ow-text font-medium text-ow-fs-body leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:t.name??t.sourceName}),t.reason&&jsx("span",{"data-ow-part":"reason",className:"text-ow-text-3 font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-mono)] break-all line-clamp-2",children:t.reason})]},`${t.sourceName}-${o}`))})})}function U6(e){return e==="success"?"\u6210\u529F":e==="failed"?"\u5931\u8D25":"\u8DF3\u8FC7"}var G6={running:"\u8FD0\u884C\u4E2D",done:"\u4E0A\u6B21\u6210\u529F",failed:"\u4E0A\u6B21\u5931\u8D25",paused:"\u5DF2\u6682\u505C",none:"\u4ECE\u672A\u8FD0\u884C"};function ree({task:e,onOpen:t,onEdit:o,onToggle:r,onDelete:n}){let a=e.status.label||G6[e.status.key]||"";return jsxs("div",{className:`cronjob-card${e.paused?" paused":""}`,onClick:t,children:[jsxs("div",{className:"cjc-top",children:[jsxs("span",{className:`cjc-dot ${e.status.key}`,children:[e.status.key==="running"&&jsx(gt,{size:16}),e.status.key==="done"&&jsx(be,{}),e.status.key==="paused"&&jsx(Jr,{}),e.status.key==="failed"&&jsx(Q,{})]}),jsx("span",{className:"cjc-name",children:e.name||"\u672A\u547D\u540D\u4EFB\u52A1"}),jsx("span",{className:"cjc-freq",children:e.scheduleLabel})]}),jsx("div",{className:"cjc-prompt",children:e.prompt||"\u2014"}),jsxs("div",{className:"cjc-foot",children:[jsxs("span",{className:"cjc-next",children:[jsx(No,{})," ",e.nextLabel]}),a&&jsxs(Fragment,{children:[jsx("span",{className:"cjc-sep",children:"\xB7"}),jsx("span",{className:`cjc-stat ${e.status.key}`,children:a})]}),jsx("span",{className:"cjc-spacer"}),jsx(Z6,{paused:e.paused,onEdit:o,onToggle:r,onDelete:n})]})]})}function Z6({paused:e,onEdit:t,onToggle:o,onDelete:r}){let[n,a]=useState(false);return jsx("span",{className:"cjc-menu",onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),children:jsx(zn,{width:180,disabled:n,ariaLabel:"\u66F4\u591A\u64CD\u4F5C",items:[{key:"edit",label:"\u7F16\u8F91\u914D\u7F6E",icon:jsx(yt,{})},{key:"toggle",label:n?"\u66F4\u65B0\u4E2D\u2026":e?"\u6062\u590D\u8BA1\u5212":"\u6682\u505C\u8BA1\u5212",icon:e?jsx(fr,{}):jsx(Jr,{})},{key:"delete",label:"\u5220\u9664\u4EFB\u52A1",icon:jsx(Le,{}),danger:true}],onSelect:d=>{d==="edit"?t():d==="delete"?r():d==="toggle"&&!n&&(a(true),o().finally(()=>a(false)));}})})}function cee({taskName:e,deleting:t=false,error:o,onCancel:r,onConfirm:n}){return jsxs(oe,{open:true,variant:"danger",icon:jsx(Le,{}),title:"\u5220\u9664\u5B9A\u65F6\u4EFB\u52A1",closable:false,closeOnOverlayClick:!t,closeOnEscape:!t,onClose:r,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",type:"button",disabled:t,onClick:r,children:"\u53D6\u6D88"}),jsx(f,{variant:"danger",type:"button",loading:t,disabled:t,onClick:n,children:t?"\u5220\u9664\u4E2D\u2026":"\u5220\u9664"})]}),children:[jsxs("p",{className:"m-0",children:["\u786E\u5B9A\u8981\u5220\u9664\u300C",e||"\u672A\u547D\u540D\u4EFB\u52A1","\u300D\u5417\uFF1F\u8BE5\u4EFB\u52A1\u7684\u6392\u7A0B\u4E0E\u8FD0\u884C\u8BB0\u5F55\u5C06\u88AB\u79FB\u9664\uFF0C\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002"]}),o&&jsx("div",{"data-ow-part":"error",className:"mt-3",children:jsx(J,{variant:"error",children:o})})]})}function bee({task:e,runs:t,runningNow:o=false,hasMoreRuns:r=false,loadingMoreRuns:n=false,runPageError:a,onBack:i,onRunNow:d,onEdit:s,onToggle:l,onDelete:c,onLoadMoreRuns:p,onOpenSession:m}){return jsxs("div",{className:"page cron-space",children:[jsxs("div",{className:"files__head cron-detail__head",children:[jsxs("div",{className:"cron-head__title",children:[jsx(go,{label:"\u8FD4\u56DE\u5B9A\u65F6\u4EFB\u52A1",onClick:i}),jsxs("div",{children:[jsx("div",{className:"ch-t",children:e.name}),jsxs("div",{className:"ch-s",children:[jsx("span",{className:"mono",children:e.scheduleLabel})," \xB7 ",e.statusLabel," \xB7 \u4E0B\u6B21 ",jsx("span",{className:"mono",children:e.nextRunLabel})]})]})]}),jsxs("div",{className:"cron-head__actions",children:[jsx(f,{variant:"primary",icon:o?void 0:jsx(fr,{}),onClick:d,disabled:o,children:o?"\u6267\u884C\u4E2D\u2026":"\u7ACB\u5373\u6267\u884C"}),jsx(f,{variant:"secondary",icon:jsx(yt,{}),onClick:s,children:"\u7F16\u8F91"}),jsx(f,{variant:"secondary",icon:e.paused?jsx(fr,{}):jsx(Jr,{}),onClick:l,children:e.paused?"\u542F\u7528":"\u6682\u505C"}),jsx(f,{variant:"danger",icon:jsx(Le,{}),onClick:c,children:"\u5220\u9664"})]})]}),jsxs("div",{className:"cron-scroll",children:[jsxs("div",{className:"cd-summary",children:[jsxs("div",{className:"cd-grid",children:[jsx(Hs,{label:"\u91CD\u590D\u9891\u7387",value:e.scheduleLabel,mono:true}),jsx(Hs,{label:"\u4E0B\u6B21\u6267\u884C",value:e.nextRunLabel,mono:true}),jsxs("div",{className:"cd-field",children:[jsx("div",{className:"k",children:"\u72B6\u6001"}),jsx("div",{className:"v",children:jsxs("span",{className:`cd-stat ${e.statusKey}`,children:[e.statusKey==="running"&&jsx(gt,{size:12}),e.statusLabel]})})]}),jsx(Hs,{label:"\u6267\u884C\u6A21\u578B",value:e.modelName}),jsx(Hs,{label:"\u6240\u5C5E\u9879\u76EE",value:e.projectName}),e.notifyTargetLabel&&jsx(Hs,{label:"\u5B8C\u6210\u540E\u901A\u77E5",value:e.notifyTargetLabel})]}),e.promptPreview&&jsxs("div",{className:"cd-prompt",children:[jsx("div",{className:"k",children:"\u4EFB\u52A1\u6307\u4EE4"}),e.promptPreview]})]}),jsxs("div",{className:"cd-section",children:[jsxs("div",{className:"cd-section__lbl",children:["\u8FD0\u884C\u8BB0\u5F55",jsx("span",{className:"cd-hint",children:"\u70B9\u51FB\u67D0\u6B21\u8FD0\u884C\u53EF\u8DF3\u8F6C\u5230\u5BF9\u5E94\u4F1A\u8BDD"})]}),t.length===0?jsx(F,{variant:"card",message:"\u8FD8\u6CA1\u8DD1\u8FC7\u3002\u6062\u590D\u4E4B\u540E\u5230\u70B9\u4F1A\u81EA\u5DF1\u5F00\u4E00\u6BB5\u4F1A\u8BDD\u3002"}):jsxs("div",{className:"run-list",children:[t.map(u=>jsxs(f,{variant:"unstyled",className:`run-row run-row--btn${u.statusKey==="running"?" running":""}`,onClick:()=>u.sessionId&&m(u.sessionId),children:[jsxs("div",{className:"run-turn",children:[jsxs("span",{className:"ix",children:["#",u.turnLabel]}),jsx("span",{className:`rdot ${u.statusKey}`,children:u.statusKey==="running"?jsx(gt,{size:13}):u.statusKey==="done"?jsx(be,{}):u.statusKey==="failed"?jsx(Q,{}):null})]}),jsxs("div",{className:"run-meta",children:[jsxs("div",{className:"rwhen",children:[u.when,jsx("span",{className:`rstat ${u.statusKey}`,children:u.statusLabel})]}),jsx("div",{className:"rsum",children:u.summary})]}),jsx("div",{className:"run-right",children:jsx(he,{className:"rgo"})})]},u.id)),(r||a)&&jsxs("div",{className:"run-list__footer",children:[a&&jsxs("div",{"data-ow-part":"error",className:"text-ow-error font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",role:"alert",children:["\u52A0\u8F7D\u8FD0\u884C\u8BB0\u5F55\u5931\u8D25\uFF1A",a]}),r&&jsx(f,{variant:"ghost",size:"sm",disabled:n,onClick:p,children:n?jsxs(Fragment,{children:[jsx(gt,{size:13})," \u52A0\u8F7D\u4E2D\u2026"]}):jsxs(Fragment,{children:[jsx(ae,{})," \u52A0\u8F7D\u66F4\u591A"]})})]})]})]})]})]})}function Hs({label:e,value:t,mono:o=false}){return jsxs("div",{className:"cd-field",children:[jsx("div",{className:"k",children:e}),jsx("div",{className:`v${o?" mono":""}`,children:t})]})}function Pee({totalCount:e,loading:t,error:o,hasTasks:r,taskCards:n,dialogs:a,onCreate:i,onRetry:d}){return jsxs("div",{className:"page cron-space",children:[jsx(ba,{eyebrow:"\u81EA\u52A8\u5316",title:"\u5B9A\u65F6\u4EFB\u52A1",description:"\u6309\u8BA1\u5212\u81EA\u5DF1\u8DD1\u8D77\u6765\u7684\u4EFB\u52A1\uFF1B\u6BCF\u6B21\u8FD0\u884C\u90FD\u4F1A\u5F00\u4E00\u6BB5\u65B0\u4F1A\u8BDD\u3002",meta:`${e} \u4E2A\u4EFB\u52A1`,actions:jsx(f,{variant:"primary",icon:jsx(He,{}),onClick:i,children:"\u65B0\u5EFA\u4EFB\u52A1"})}),jsxs("div",{className:"cron-scroll",children:[o&&r&&jsx("div",{"data-ow-part":"error",children:jsx(J,{variant:"error",detail:o,action:jsx(f,{variant:"secondary",size:"sm",onClick:d,children:"\u91CD\u8BD5"}),children:"\u5B9A\u65F6\u4EFB\u52A1\u5217\u8868\u6CA1\u5237\u65B0\u6210\u529F\u3002"})}),t&&!r?jsxs("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"cron-loading",children:[jsx(gt,{size:16}),jsx("span",{children:"\u6B63\u5728\u52A0\u8F7D\u5B9A\u65F6\u4EFB\u52A1\u2026"})]}):o&&!r?jsx("div",{"data-ow-part":"error",className:"cron-error",children:jsx(J,{variant:"error",detail:o,action:jsx(f,{variant:"secondary",onClick:d,children:"\u91CD\u8BD5"}),children:"\u5B9A\u65F6\u4EFB\u52A1\u6CA1\u52A0\u8F7D\u51FA\u6765\u3002"})}):r?jsx("div",{className:"cron-grid",children:n}):jsx(F,{className:"cron-empty",size:"page",title:"\u8FD8\u6CA1\u6709\u5B9A\u65F6\u4EFB\u52A1",message:"\u628A\u6BCF\u5929\u90FD\u8981\u505A\u7684\u4E8B\u4EA4\u51FA\u53BB\uFF1A\u5230\u70B9\u5B83\u81EA\u5DF1\u5F00\u4E00\u6BB5\u4F1A\u8BDD\uFF0C\u8DD1\u5B8C\u901A\u77E5\u4F60\u3002",actionLabel:"\u65B0\u5EFA\u4EFB\u52A1",actionVariant:"primary",onAction:i})]}),a]})}function qee(e,t=true){let o=useRef(null);return useEffect(()=>{if(!t)return;function r(n){o.current&&!o.current.contains(n.target)&&e();}return document.addEventListener("pointerdown",r),()=>document.removeEventListener("pointerdown",r)},[e,t]),o}function Qee(e,t){let[o,r]=useState(null),n=useRef(null),a=useCallback(s=>{r(s);},[]),i=useCallback(s=>{n.current=s;},[]),d=useCallback(()=>{if(o!==null&&n.current!==null&&o!==n.current){let s=[...e],[l]=s.splice(o,1);s.splice(n.current,0,l),t(s);}r(null),n.current=null;},[o,e,t]);return {dragIdx:o,onDragStart:a,onDragOver:i,onDragEnd:d}}function tte(e,t,o=true){useEffect(()=>{if(!o)return;function r(n){n.key===e&&t(n);}return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t,o]);}function ate({width:e,onWidthChange:t,minWidth:o=160,maxWidth:r=480,enabled:n=true}){let[a,i]=useState(false),[d,s]=useState(false),l=useRef(0),c=useRef(e),p=useCallback(m=>{n&&(m.preventDefault(),i(true),l.current=m.clientX,c.current=e);},[n,e]);return useEffect(()=>{if(!a)return;let m=v=>{let w=v.clientX-l.current,b=Math.min(r,Math.max(o,c.current+w));t(b);},u=()=>i(false);return document.addEventListener("mousemove",m),document.addEventListener("mouseup",u),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",u),document.body.style.cursor="",document.body.style.userSelect="";}},[a,r,o,t]),{handleProps:{onMouseDown:p,onMouseEnter:()=>s(true),onMouseLeave:()=>!a&&s(false)},active:d||a,dragging:a}}var a9=6,Nte=Array.from({length:a9},(e,t)=>({bg:`var(--ow-data-${t+1})`,fg:"var(--ow-on-fill)"}));function n9(e){return {bg:`var(--ow-${cn((e??"").trim())})`,fg:"var(--ow-on-fill)"}}function Ste(e){let{bg:t,fg:o}=n9(e);return {background:t,color:o}}
|
|
32
|
-
export{TN as ACCOUNT_CREDITS_WARN_RATIO,y8 as ActionBar,S8 as ActionStatus,o$ as AgentLoopSegment,Il as AgentTurn,Vd as AlertCircle,Yp as AppLayout,Ni as Archive,un as Arrow,Ci as ArrowDown,Nw as ArrowUp,$I as ArtifactCard,WO as ArtifactPreviewSidebarView,Hr as ArtifactTrail,_8 as AskQuestionCardView,A8 as AssistantChannelCard,j8 as AssistantToggleRow,kd as Atom,ia as Attachment,lP as AttachmentCard,xn as AttachmentList,dP as Attachments,v$ as AuthorizationCard,pn as Avatar,kP as BEACON_ICON_NAMES,go as BackButton,Z9 as BackTop,at as Badge,Vi as Banner,JP as BarChart,fm as BeaconIcon,gt as BeaconSpinner,vw as Bell,Da as Bolt,xi as Brain,Po as Branch,Ag as BranchDivider,m4 as BrandingProvider,$V as BrowserAnnotationPopupView,ZV as BrowserDeviceToolbarView,oF as BrowserFindBarView,dF as BrowserImportDialogView,mF as BrowserLoadErrorView,xF as BrowserMoreMenuView,TF as BrowserNavBarView,Gg as BrowserTabBarView,f as Button,zt as Card,Lm as CardGridSkeleton,Dm as CatalogEmptyState,D$ as ChatBubble,B$ as ChatMessage,dv as ChatThinking,C$ as Chatbot,be as Check,Ba as CheckCircle,Ro as Checkbox,ae as ChevDown,Kt as ChevLeft,he as ChevRight,yi as ChevUp,ro as Chip,cw as Circle,Ar as ClipboardList,No as Clock,Q as Close,nl as CodeBlock,Gm as CodeDiff,Wi as CodePreview,LR as CommandPalette,Mi as CommentPlus,gw as Compass,Nv as Composer,cv as ComposerAudioSpectrum,rz as ComposerAuthorization,lz as ComposerMentions,mv as ComposerMenu,Rz as ComposerMenuPopover,Dz as ComposerPopover,zz as ComposerProjectPicker,jz as ComposerQueue,Jz as ComposerVoiceInput,Ig as CompressionDivider,VR as ContentRecommendation,HR as ContextChip,Qm as ContextUsage,QR as ContextUsageIndicatorView,Tt as Copy,yw as Cpu,tf as CreateProjectDialog,Hb as CsvPreview,Cd as Cut,RN as DESKTOP_ACCOUNT_MENU_WIDTH,H4 as DESKTOP_LOGIN_CLAIM,W4 as DESKTOP_LOGIN_CLAIM_NOTE,G7 as DROPDOWN_DIVIDER,Vm as DS2_SHIKI_THEME_NAME,yT as DataManagementSectionView,dl as DataTable,rf as DataTableToolbar,DA as DateDivider,$v as DesktopAccountMenuView,iU as DesktopAgentCardView,Np as DesktopAgentDetailActions,sU as DesktopAgentDetailView,HN as DesktopAgentOverviewView,WN as DesktopAgentRosterView,LW as DesktopAppearanceSettings,WW as DesktopAssistantConfigView,Zl as DesktopCatalogCardView,Cp as DesktopCatalogDetailActions,Rs as DesktopCatalogDetailShell,zv as DesktopCatalogGridView,rU as DesktopCatalogToolbarView,I4 as DesktopChatAgentTurnView,uU as DesktopChatBranchDivider,E4 as DesktopChatCompressionDivider,xK as DesktopChatEmptyStateView,PK as DesktopChatHeaderView,eb as DesktopChatMessageView,XK as DesktopChatReconnectDivider,D4 as DesktopChatUserTurnView,lj as DesktopComposer,sj as DesktopComposerModelButton,lU as DesktopConnectorCardView,F4 as DesktopConnectorDetailView,QK as DesktopConversationView,$N as DesktopDetailChips,nU as DesktopDetailList,zN as DesktopDetailRows,Xa as DesktopDetailSection,aU as DesktopDetailText,Sj as DesktopHomeView,Gj as DesktopLibraryAuthorizationDialog,Yj as DesktopLibraryPageView,Fj as DesktopLoginView,oG as DesktopOnboardingTourView,lG as DesktopPet,xG as DesktopPetSettings,CG as DesktopRunStatusView,db as DesktopSelectionCard,HG as DesktopSettingRow,WG as DesktopSettingSelect,IG as DesktopSettingsMemorySection,zG as DesktopSettingsView,GG as DesktopShareSelectionBarView,gZ as DesktopSidebarView,JZ as DesktopSiteReleasesView,pq as DesktopSitesListView,Mq as DesktopSkillsPageView,Eq as DesktopTaskDetailView,tY as DesktopToolCallListView,oY as DesktopToolCallView,wY as DesktopWorkbenchShell,hj as DesktopWorkspaceConnectorDetailView,Ab as DesktopWorkspaceEmptyState,Ib as DesktopWorkspaceEntryRowView,zY as DesktopWorkspaceMemoryDetailDialog,$Y as DesktopWorkspaceMemoryView,PY as DesktopWorkspacePageView,FY as DesktopWorkspaceProjectDetailView,VY as DesktopWorkspaceProjectRowView,cl as DetailOverflowMenu,ET as DetailPanel,UT as DetailScaffold,kw as Device,oe as Dialog,Pi as DingTalk,Gs as Dislike,Hd as Divider,oo as Doc,Co as Download,JT as DropZone,j7 as Dropdown,yt as Edit,Ua as ElementDispatcher,F as EmptyState,oS as ErrorCard,jo as ErrorCircle,fp as ExecutionDetail,Hl as ExecutionSummary,Mv as ExecutionSummaryBodyContext,gp as ExecutionSummaryRow,$M as FSelect,aM as FeedbackContextMenuView,cM as FeedbackDialogView,Ri as Feishu,te as Field,vQ as FileBrowser,qo as FileIcon,EQ as FilePreviewContentView,En as FilePreviewDialog,l0 as FileReferenceCard,gM as FileReferenceCards,Fb as FileTree,bw as Filter,ff as FilterBar,qe as Folder,g0 as FormField,Nte as GLYPH_COLORS,hw as Gauge,Mt as Globe,Fl as GlyphToneProvider,hi as Grid,y6 as HOME_STARTER_CAPSULES,Bd as Hand,Ed as Help,UM as HomeBackdrop,Hx as IME_COMMIT_GUARD_MS,ta as Icon,Mw as Icons,Pd as Image,ZM as ImageCard,o_ as ImagePreview,Rw as Info,Qr as InfoCircle,J as InlineMessage,iS as Input,IA as JumpToLatest,xw as Key,BM as KeyValueField,Ad as Keyboard,Br as Keycap,Ei as KeycapCombo,Si as Layers,mn as Like,Nd as LikeFill,dt as ListRow,H8 as ListRowGroup,pw as Loader,ea as Lock,Dd as Logout,OL as MENU_DIVIDER,Va as MENU_SEPARATOR,ip as MOUNT_CHIP_CLASS,Aa as Mail,ns as Markdown,Tf as MarkdownPreview,Lf as MarkdownPreviewModalView,Go as Maximize,mJ as McpServerListView,Xr as Memo,co as Menu,pt as MenuSurface,PH as Message,hn as MessageActions,If as MessageFeedbackDialog,hd as Mic,Su as ModalityAudio,Cu as ModalityImage,ku as ModalityText,Nu as ModalityVideo,Af as ModelCatalogErrorState,Vf as ModelModalityFlow,Ff as ModelPickerList,An as ModelSelect,SL as ModelsSettingsSectionView,_d as Moon,Ko as More,vy as NAV_MENU_DIVIDER,_L as NativeCheckbox,LL as NativeRadio,ML as NativeSelect,BL as NavMenu,fw as NewTask,GL as NoPlanPanelView,Pw as Note,IH as NoteCard,Zn as OfficePreview,UQ as OfficePreviewDialog,XL as OpenWithButton,Oi as OpenWithMenu,Aq as OrbitworkDesktopTaskDetailData,Iq as OrbitworkDesktopTaskDetailDocument,sc as OrbitworkLockup,km as OrbitworkLogo,la as OrbitworkMark,Tm as OrbitworkModal,Nr as PT_TO_PX,Ld as Package,ba as PageHead,wn as Pagination,Fd as PanelFold,Ir as PanelSidebar,uw as PanelSidebarCollapse,ki as Paperclip,Jr as Pause,jc as PdfPageNav,Yn as PdfPreview,YQ as PdfPreviewDialog,Pg as PlanCard,vl as PlanFeatureIcon,uD as PlanSettingsSectionView,fr as Play,He as Plus,bD as Popover,yl as PptxSlide,Xk as PreviewDialog,Q0 as PreviewSurfaceArea,BH as ProductList,na as ProgressBar,Cl as ProjectSelect,Td as Quote,_1 as Radio,HE as RadioCardGroup,L1 as RadioGroup,We as Refresh,pd as ResourceConfirmation,OZ as ResourceDetailView,_Z as ResourceListView,di as ResourceNotice,VZ as ResourceOverviewView,FZ as ResourceReleasesView,LZ as ResourceRowActionDialog,MZ as ResourceWorkbenchView,bp as RichCard,EH as RichDetail,GC as RichLink,ZC as RichList,yu as Rotate,zn as RowOverflowMenu,h6 as SIDE_PANEL_EMPTY_ACTIONS,L2 as STATUS_TAG_PRESETS,tI as SandboxPermissionPrompt,ree as ScheduledTaskCardView,cee as ScheduledTaskDeleteDialog,bee as ScheduledTaskDetailView,Pee as ScheduledTasksSpaceView,$t as Search,Hn as SearchInput,fI as SearchResult,va as Section,Ht as SegmentedControl,br as Select,Yd as SelectTrigger,yI as SelectionBulkBar,eR as SeriesChart,gn as Server,yd as Settings,lo as Share,wq as ShareSettingsDialogView,H3 as ShareSettingsEditorView,NI as ShareStrip,mr as Shield,EI as ShortcutGroupTable,DI as ShortcutSheet,GY as SidePanelEmpty,p6 as Sidebar,mw as SidebarIcon,Os as SidebarShell,bc as SidebarToggle,jI as SitesArtifactCardView,re as Skeleton,gr as Skill,uv as SkillAvatarView,wJ as SkillCardView,jb as SkillDetailPanelView,IJ as SkillDetailView,HJ as SkillImportDialogView,WJ as SkillImportResultDialogView,Cw as Skills,N4 as SkinManager,C6 as SnapshotContentView,dX as SnapshotImageExportView,Id as Sort,Sw as Sparkle,Ea as Sparkles,vr as Spinner,YI as Splash,XY as StarterCapsules,Nt as StatusTag,iA as StepList,Ia as Stop,PV as SubAgentPane,FH as SubAgentThread,fn as SuccessCircle,Md as Sun,po as Switch,uo as Tabs,Rn as Tag,AH as TaskRef,So as Terminal,kV as TerminalPane,Cr as TextField,Wf as Textarea,y4 as ThemeDemo,XN as ThemeProvider,iv as Thinking,xd as ThreadDot,Od as ThumbsDown,Tw as ThumbsUp,vA as TimePicker,vc as TitleBar,CA as Toast,NA as ToastRegion,hp as ToolCallRow,Tb as ToolDetailModalView,vn as Tooltip,Ng as TraceDot,Ol as Transcript,jH as TranscriptSpine,Le as Trash,nf as UninstallConfirmDialog,EA as UnreadDivider,ww as Usage,Vl as UserTurn,Sd as Volume,zA as WCardShell,Vb as WORKBENCH_SIDE_PANEL_WIDTH,ur as WarningTriangle,Ti as WeCom,AF as WebPreview,BF as WebPreviewBody,Kk as WebPreviewConsole,IV as WebPreviewDialog,Gg as WebPreviewNav,rV as WebPreviewShell,df as WindowBand,cf as WindowChrome,tX as WorkbenchSidePanel,fX as WorkspaceMigrateConfirm,Rd as Zap,Ks as ZoomIn,js as ZoomOut,Yl as applyTenantTheme,E0 as basenameFromLocalPath,kp as catalogInstallStatus,pl as cleanFileLabel,g as cn,xf as collectMarkdownFileRefs,ca as createRawTokens,Hv as createSemanticAdapter,Vg as createSpreadsheet,dc as dataSeriesColor,_b as desktopToolStatusLabel,Lp as exportSkin,LC as formatExecutionFailure,DC as formatExecutionMeta,Xn as formatShortcut,Vk as formatShortcutKeys,t6 as formatToolMetrics,b4 as getCurrentThemeName,sx as getHighlighter,vU as getSemanticAttributes,lx as getTokensCacheKey,n9 as glyphColor,Ste as glyphStyle,gU as hasSemanticAttributes,cn as hashToDataColor,pa as highlightCode,Dp as importSkin,Ap as importSkinFromShareUrl,Ep as importSkinFromUrl,ic as inferAttachmentMeta,fM as inferFileReferenceMeta,Wx as isImeCommitEnter,Ug as isMacShortcutPlatform,k4 as loadCustomSkins,Nc as localMarkdownLinkTarget,Ak as normalizePreviewUrl,$d as owFloatingActionClass,_s as parseTenantTheme,xe as ptToPx,Fg as readOnlyInput,Tp as removeTenantTheme,tc as resolveFileIcon,ts as safeHref,ni as saveCustomSkins,Ip as shareSkin,fz as skillAvatarTone,gz as skillGlyph,D0 as stripInlineMarkdown,$g as transferExcelToSpreadSheet,yp as updateRowText,f4 as useBranding,qee as useClickOutside,Qee as useDragReorder,Dt as useImeAwareEnter,mp as useInExecutionSummaryBody,tte as useKeyboard,Tg as usePopover,$f as useSelectedOptionLocator,ate as useSidebarResize,_p as useTenantTheme,Qa as useTheme,Rp as useUnifiedTheme};
|
|
30
|
+
`;function I2(){let[e,t]=useState(()=>typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);return useEffect(()=>{let o=window.matchMedia?.("(prefers-reduced-motion: reduce)");if(!o)return;let r=()=>t(o.matches);return o.addEventListener?.("change",r),()=>o.removeEventListener?.("change",r)},[]),e}function rA({onDone:e,loading:t=false,size:o=96,productName:r="Orbitwork",wordmark:n="orbitwork"}){let a=I2(),i=useRef(null),d=useRef(0),s=useRef(false),l=useRef(t),c=useRef(e);c.current=e;let[p,m]=useState(false);useEffect(()=>{if(d.current=typeof performance<"u"?performance.now():Date.now(),s.current)return;if(a){s.current=true,c.current?.();return}let v=setTimeout(()=>{s.current||(s.current=true,c.current?.());},Ng);return ()=>clearTimeout(v)},[a]),useEffect(()=>{let v=l.current;if(l.current=t,t||!v)return;let h=i.current;if(!h)return;let x=typeof performance<"u"?performance.now():Date.now();if(a||x-d.current<Ng){m(true);return}let k=0,y=getComputedStyle(h).transform,P=y&&y!=="none"?y.match(/matrix\(([^)]+)\)/):null;if(P?.[1]){let[S=1,R=0]=P[1].split(",").map(Number);k=Math.atan2(R,S)*180/Math.PI,k<0&&(k+=360);}let N=k<24?24:384;if(typeof h.animate=="function"){let S=h.animate([{transform:`rotate(${k}deg)`},{transform:`rotate(${N}deg)`}],{duration:Math.max((N-k)/360*L2,1),easing:D2,fill:"forwards"});S.onfinish=()=>{h.style.transform="rotate(24deg)";};}else h.style.transform="rotate(24deg)";m(true);},[t,a]);let u=t&&!p&&!a,b={position:"fixed",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"var(--ow-stage-bg)",color:"var(--ow-stage-text)"},w=(v,h="var(--ow-dur-2, 200ms)",x="ow-splash-fade")=>a?void 0:`${x} ${h} var(--ow-ease-beacon) ${v} backwards`;return jsxs("div",{className:"ow-splash ow-motion",style:b,role:"status","aria-live":"polite","aria-label":`${r} \u6B63\u5728\u542F\u52A8`,children:[jsx("style",{children:E2}),jsxs("svg",{width:o,height:o,viewBox:"2.3 0 96 96","aria-hidden":"true",style:{display:"block"},children:[jsx("circle",{cx:"48",cy:"48",r:"8.2",fill:"var(--ow-stage-text)",style:{animation:w("0ms")}}),_2.map(([v,h,x,k],y)=>jsx("circle",{cx:v,cy:h,r:x,fill:"var(--ow-stage-text)",opacity:k,style:{animation:w(`calc(var(--ow-stagger-beacon, 125ms) * ${y+1})`)}},y)),jsx("g",{ref:i,style:{transformOrigin:"48px 48px",animation:a?void 0:u?"ow-splash-sat-in var(--ow-dur-3, 320ms) var(--ow-ease-beacon) 625ms backwards, ow-splash-spin var(--ow-dur-spin, 1.6s) linear var(--ow-dur-splash, 1250ms) infinite":"ow-splash-sat-in var(--ow-dur-3, 320ms) var(--ow-ease-beacon) 625ms backwards"},children:jsx("circle",{cx:"75.4",cy:"35.8",r:"10.4",fill:"var(--ow-stage-accent)"})})]}),jsx("div",{style:{marginTop:Math.round(o*(5/84)*10)/10,fontFamily:"var(--ow-font-display)",fontWeight:500,fontSize:Math.round(o*(15/84)*10)/10,lineHeight:1,letterSpacing:"-0.01em",color:"var(--ow-stage-text)",animation:w("700ms","var(--ow-dur-3, 320ms)","ow-splash-rise")},children:n})]})}var B2={installed:{label:"\u5DF2\u5B89\u88C5",tone:"ok"},update:{label:"\u6709\u66F4\u65B0",tone:"warn"},connected:{label:"\u5DF2\u8FDE\u63A5",tone:"ok"},needsAuth:{label:"\u5F85\u6388\u6743",tone:"warn"},installing:{label:"\u6B63\u5728\u5B89\u88C5",tone:"mute"},mine:{label:"\u6211\u7684",tone:"mine"},team:{label:"\u4E13\u5BB6\u56E2",tone:"mine"}},O2=cva("inline-flex shrink-0 items-center whitespace-nowrap h-5 px-[var(--ow-space-15)] font-medium text-ow-fs-mark-md leading-5 [border-radius:var(--ow-radius-xs)]",{variants:{tone:{ok:"bg-[var(--ow-success-tint)] text-[color:var(--ow-success-on-tint)]",warn:"bg-[var(--ow-warning-tint)] text-[color:var(--ow-warning-on-tint)]",mute:"bg-ow-surface-2 text-[color:var(--ow-status-tag-mute-text,var(--ow-text-2))]",mine:"bg-[var(--ow-mention-bg)] text-[color:var(--ow-mention-text)]"}},defaultVariants:{tone:"mute"}});function Nt({status:e,tone:t,children:o,className:r,title:n}){let a=e?B2[e]:void 0,i=o??a?.label;return i==null?null:jsx("span",{"data-slot":"status-tag",className:g(O2({tone:t??a?.tone??"mute"}),r),title:n,children:i})}function Mg({goal:e,steps:t,elapsed:o,className:r=""}){let n=t.length,a=t.filter(s=>s.state==="done").length,i=t.find(s=>s.state==="running"),d=jsxs("span",{style:z2,children:[a,"/",n]});return e?jsxs("div",{className:`ow-plan-card ow-plan-card--goal ${r}`,style:Tg,children:[jsxs("div",{style:F2,children:[jsx("div",{style:$2,children:e}),d]}),jsx("div",{style:H2,children:t.map((s,l)=>jsx(Rg,{state:s.state},l))}),i&&jsxs("div",{style:G2,children:[jsxs("span",{children:["\u6B63\u5728\u8DD1\uFF1A",i.label]}),o&&jsx("span",{style:Z2,children:o})]})]}):jsxs("div",{className:`ow-plan-card ow-plan-card--list ${r}`,style:Tg,children:[jsxs("div",{style:q2,children:[jsx("span",{style:Y2,children:"\u8BA1\u5212\u6E05\u5355"}),d]}),jsx("div",{style:X2,children:t.map((s,l)=>jsxs("div",{style:Q2,children:[jsx(Rg,{state:s.state}),jsx("span",{style:s.state==="done"?{color:"var(--ow-text-3)"}:void 0,children:s.label})]},l))})]})}function Rg({state:e}){return e==="running"?jsx("span",{style:K2,children:jsx("i",{style:j2})}):jsx("span",{style:e==="done"?W2:U2})}var Tg={background:"var(--ow-surface)",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-card)",padding:12,display:"flex",flexDirection:"column",gap:10,fontFamily:"var(--ow-font-body)"},F2={display:"flex",alignItems:"flex-start",gap:8},$2={flex:1,fontSize:"var(--ow-fs-ui)",fontWeight:500,lineHeight:1.4},z2={fontSize:"var(--ow-fs-mark-md)",color:"var(--ow-text-2)",fontFamily:"var(--ow-font-mono)",fontVariantNumeric:"tabular-nums"},H2={display:"flex",alignItems:"center",gap:8,height:14},_g={display:"block",width:8,height:8,borderRadius:"50%",flex:"none"},W2={..._g,background:"var(--ow-success)"},U2={..._g,border:"1.5px solid var(--ow-text-3)"},K2={width:13,height:13,flex:"none",border:"1.5px solid var(--ow-beacon)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},j2={display:"block",width:5,height:5,borderRadius:"50%",background:"var(--ow-beacon)"},G2={display:"flex",justifyContent:"space-between",alignItems:"baseline",fontSize:"var(--ow-fs-mark-md)",color:"var(--ow-text-2)"},Z2={fontSize:"var(--ow-fs-mark-sm)",fontFamily:"var(--ow-font-mono)",fontVariantNumeric:"tabular-nums"},q2={display:"flex",justifyContent:"space-between",alignItems:"baseline"},Y2={fontSize:"var(--ow-fs-eyebrow-cjk)",fontWeight:500,letterSpacing:"var(--ow-ls-eyebrow-cjk)",color:"var(--ow-text-2)"},X2={display:"flex",flexDirection:"column",gap:9},Q2={display:"flex",alignItems:"center",gap:8,fontSize:"var(--ow-fs-caption)",lineHeight:1.4};function mA({steps:e,className:t=""}){let o=e.map(r=>({label:r.label,state:r.status}));return jsx(Mg,{steps:o,className:t})}function Lg(e=300){let[t,o]=useState(false),[r,n]=useState(false),[a,i]=useState(null),d=useRef(null),s=useRef(null),l=useRef(null),c=useCallback(b=>{d.current=b;},[]),p=useCallback(b=>{s.current=b;},[]),m=useCallback(b=>{l.current=b;},[]);return useEffect(()=>{if(!t)return;let b=w=>{let v=w.target;d.current?.contains(v)||l.current?.contains(v)||o(false);};return document.addEventListener("mousedown",b,true),()=>document.removeEventListener("mousedown",b,true)},[t]),{open:t,up:r,coords:a,wrapRef:c,btnRef:p,menuRef:m,toggle:()=>{if(!t&&s.current){let b=s.current.getBoundingClientRect();n(window.innerHeight-b.bottom<e),i({left:b.left,right:window.innerWidth-b.right,top:b.bottom,bottom:window.innerHeight-b.top});}o(b=>!b);},close:()=>o(false)}}var tk=Array.from({length:24},(e,t)=>t),ok=Array.from({length:60},(e,t)=>t),Kn=e=>String(e).padStart(2,"0");function rk(e){try{return new Intl.DateTimeFormat("en",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(new Date).find(o=>o.type==="timeZoneName")?.value?.replace("GMT+0","GMT")??e}catch{return e}}var Hc="font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",Ag=["shrink-0 h-7 w-full border-none bg-transparent cursor-pointer","[border-radius:var(--ow-radius-2xs)]","text-ow-fs-ui text-[color:var(--ow-text-3)]",Hc,"transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]","focus-visible:outline-none focus-visible:[box-shadow:var(--ow-focus-shadow)]"].join(" ");function CA({value:e,timezone:t,onChange:o,disabled:r=false,"aria-label":n,confirmLabel:a="\u786E\u5B9A",className:i}){let{open:d,up:s,wrapRef:l,btnRef:c,toggle:p,close:m}=Lg(340),u=useRef(null),b=useRef(null),[w,v]=e.split(":"),h=Number(w),x=Number(v),k=Number.isFinite(h)?h:9,y=Number.isFinite(x)?x:0,[P,N]=useState(k),[S,R]=useState(y);useEffect(()=>{d&&(N(k),R(y),requestAnimationFrame(()=>{u.current?.querySelector('[data-ow-role="selected"]')?.scrollIntoView({block:"center"}),b.current?.querySelector('[data-ow-role="selected"]')?.scrollIntoView({block:"center"});}));},[k,y,d]),useEffect(()=>{if(!d)return;let T=_=>{_.key==="Escape"&&m();};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[d,m]);let M=()=>{o(`${Kn(P)}:${Kn(S)}`),m();};return jsxs("div",{"data-slot":"time-picker",className:g("relative w-full",d&&"z-10",i),ref:l,children:[jsxs("button",{type:"button",ref:c,"data-ow-part":"control","data-ow-role":d?"open":"closed",disabled:r,"aria-haspopup":"dialog","aria-expanded":d,"aria-label":n,onClick:p,className:g("w-full h-10 px-3 flex items-center justify-between gap-1.5 cursor-pointer text-left","border bg-[var(--ow-input-bg)] text-[color:var(--ow-input-text)] text-ow-fs-ui font-normal","[border-radius:var(--ow-radius-control)]","transition-[border-color,box-shadow,background-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","focus-visible:outline-none focus-visible:[box-shadow:var(--ow-focus-shadow)]","disabled:cursor-not-allowed disabled:bg-[var(--ow-input-disabled-bg)] disabled:border-[color:var(--ow-disabled-border)] disabled:text-[color:var(--ow-input-disabled-text)]",d?"border-[color:var(--ow-input-border-focus)]":"border-[color:var(--ow-input-border)] hover:border-[color:var(--ow-input-border-hover)]"),children:[jsxs("span",{className:g("min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",Hc),children:[Kn(k),":",Kn(y)," ",jsx("span",{className:g("text-ow-fs-mark-md text-[color:var(--ow-text-3)]",Hc),children:rk(t)})]}),jsx(No,{className:"w-3.5 h-3.5 shrink-0 text-[color:var(--ow-text-3)]","aria-hidden":"true"})]}),d&&jsxs("div",{role:"dialog","aria-label":n??"\u9009\u62E9\u65F6\u523B","data-ow-part":"popover",className:g("absolute right-0 w-44 overflow-hidden","z-[var(--ow-z-dropdown)]","bg-[var(--ow-popover-bg)] border border-[color:var(--ow-border)]","[border-radius:var(--ow-radius-menu)] [box-shadow:var(--ow-shadow-pop)]",s?"bottom-[calc(100%+4px)]":"top-[calc(100%+4px)]"),children:[jsxs("div",{className:"flex h-44",children:[jsx("div",{ref:u,role:"listbox","aria-label":"\u5C0F\u65F6",className:"flex-1 flex flex-col gap-px overflow-y-auto p-1.5 border-r border-[color:var(--ow-border)] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:tk.map(T=>jsx("button",{type:"button",role:"option","aria-selected":T===P,"data-ow-role":T===P?"selected":"option",className:g(Ag,T===P&&"bg-[var(--ow-selected-bg)] text-[color:var(--ow-text)] font-medium"),onClick:()=>N(T),children:Kn(T)},T))}),jsx("div",{ref:b,role:"listbox","aria-label":"\u5206\u949F",className:"flex-1 flex flex-col gap-px overflow-y-auto p-1.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:ok.map(T=>jsx("button",{type:"button",role:"option","aria-selected":T===S,"data-ow-role":T===S?"selected":"option",className:g(Ag,T===S&&"bg-[var(--ow-selected-bg)] text-[color:var(--ow-text)] font-medium"),onClick:()=>R(T),children:Kn(T)},T))})]}),jsx("div",{className:"border-t border-[color:var(--ow-border)] p-1.5",children:jsx(f,{variant:"primary",size:"sm",className:"w-full",onClick:M,children:a})})]})]})}var nk={info:jsx(ea,{}),success:jsx(gn,{}),warning:jsx(fr,{}),error:jsx(Zo,{})},ik="relative flex items-center gap-2.5 w-full max-w-[420px] px-3.5 py-2.5 overflow-clip [border-radius:var(--ow-radius-card)] border border-ow-border bg-ow-popover-bg shadow-[var(--ow-shadow-pop)] font-normal text-ow-fs-ui leading-[1.4] text-ow-text pointer-events-auto animate-[toast-in_200ms_var(--ow-ease-beacon)]",sk={info:"bg-[var(--ow-info-tint)] text-[color:var(--ow-info-on-tint)]",success:"bg-[var(--ow-success-tint)] text-[color:var(--ow-success-on-tint)]",warning:"bg-[var(--ow-warning-tint)] text-[color:var(--ow-warning-on-tint)]",error:"bg-[var(--ow-error-tint)] text-[color:var(--ow-error-on-tint)]"};function _A({variant:e="info",icon:t,showIcon:o=true,children:r,action:n,duration:a=e==="error"?1e4:4e3,onDismiss:i,className:d}){return useEffect(()=>{if(!a||!i)return;let s=setTimeout(i,a);return ()=>clearTimeout(s)},[a,i]),jsxs("div",{"data-slot":"toast","data-variant":e,"data-ow-part":"surface","data-ow-role":e,className:g(ik,d),role:e==="error"?"alert":"status",children:[o&&jsx("span",{"data-ow-part":"icon",className:g("inline-flex shrink-0 items-center justify-center w-5 h-5 [border-radius:var(--ow-radius-xs)] [&>svg]:w-4 [&>svg]:h-4",sk[e]),"aria-hidden":"true",children:t??nk[e]}),jsx("span",{"data-ow-part":"message",className:"flex-1 min-w-0 break-words",children:r}),n&&jsx("span",{"data-ow-part":"action",className:"shrink-0",children:n}),i&&jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"close",className:"shrink-0 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)]",onClick:i,"aria-label":"\u5173\u95ED\u901A\u77E5",icon:jsx(Q,{className:"w-3.5 h-3.5","aria-hidden":"true"})})]})}function LA({children:e,className:t}){return jsx("div",{"data-slot":"toast-region",className:g("absolute top-4 right-4 z-[var(--ow-z-toast)] pointer-events-none flex flex-col items-end gap-2",t),children:e})}var jn="h-px flex-1 bg-[var(--ow-border)]";function FA({label:e,className:t,...o}){return jsxs("div",{"data-slot":"date-divider","data-ow-part":"divider",role:"separator","aria-orientation":"horizontal",className:g("flex w-full items-center gap-3 py-2",t),...o,children:[jsx("span",{"aria-hidden":"true",className:jn}),jsx("span",{"data-ow-part":"label",className:g("whitespace-nowrap leading-none","text-[length:var(--ow-fs-ui)] text-[color:var(--ow-text-3)]","font-[family-name:var(--ow-font-mono)] tabular-nums"),children:e}),jsx("span",{"aria-hidden":"true",className:jn})]})}function $A({count:e,label:t="\u672A\u8BFB\u6D88\u606F",className:o,...r}){return jsxs("div",{"data-slot":"unread-divider","data-ow-part":"divider","data-ow-state":"unread",role:"separator","aria-orientation":"horizontal","aria-label":e!=null?`${t} ${e}`:t,className:g("flex w-full items-center gap-3 py-2",o),...r,children:[jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-[var(--ow-unread)]"}),jsxs("span",{"data-ow-part":"label","aria-hidden":"true",className:g("inline-flex items-center gap-1.5 whitespace-nowrap leading-none","text-[length:var(--ow-fs-ui)] font-medium text-[color:var(--ow-unread)]"),children:[t,e!=null&&jsx("span",{"data-ow-part":"count",className:"font-[family-name:var(--ow-font-mono)] tabular-nums font-normal",children:e})]}),jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-[var(--ow-unread)]"})]})}function zA({onClick:e,count:t,label:o="\u8DF3\u5230\u6700\u65B0",hidden:r,disabled:n,className:a}){return r?null:jsxs(f,{"data-slot":"jump-to-latest","data-ow-part":"action","data-ow-role":"navigation",variant:"unstyled",disabled:n,onClick:e,className:g(zd,"h-8 gap-1.5 px-3 [border-radius:var(--ow-radius-action)]","text-[length:var(--ow-fs-ui)] z-[var(--ow-z-sticky)]","absolute bottom-4 left-1/2 -translate-x-1/2",a),children:[jsx(Si,{"aria-hidden":"true",style:{width:16,height:16}}),jsx("span",{children:o}),t!=null&&jsx("span",{"data-ow-part":"count",className:"font-[family-name:var(--ow-font-mono)] tabular-nums",children:t})]})}var Bg=["inline-flex min-w-0 max-w-[min(70%,420px)] items-center gap-1.5 whitespace-nowrap","text-[length:var(--ow-fs-ui)] leading-[1.5] text-[color:var(--ow-text-3)]"].join(" ");function Og({label:e="\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29",children:t,expanded:o,defaultExpanded:r=false,onExpandedChange:n,icon:a,expandLabel:i="\u67E5\u770B",collapseLabel:d="\u6536\u8D77",detailsLabel:s="\u5DF2\u538B\u7F29\u5185\u5BB9",count:l,className:c,detailsClassName:p}){let m=useId(),[u,b]=useState(r),w=o??u,v=useCallback(()=>{let x=!w;o===void 0&&b(x),n?.(x);},[w,o,n]),h=w?`${d}${s}`:`${i}${s}`;return jsxs(Fragment,{children:[jsxs("div",{"data-slot":"compression-divider","data-ow-part":"divider","data-ow-state":w?"expanded":"collapsed",className:g("flex w-full items-center gap-2.5 py-2",c),children:[jsx("span",{"aria-hidden":"true",className:jn}),jsxs(f,{variant:"unstyled",type:"button","data-ow-part":"trigger",onClick:v,"aria-expanded":w,"aria-controls":t!=null?m:void 0,"aria-label":h,title:h,className:g(Bg,"cursor-pointer rounded-[var(--ow-radius-2xs)] px-1.5 py-[3px]","transition-[background-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] hover:text-[color:var(--ow-text-2)] active:bg-[var(--ow-press)]","focus-visible:outline-none focus-visible:[outline:2px_solid_var(--ow-focus-ring)] focus-visible:[outline-offset:2px]"),children:[jsx("span",{"aria-hidden":"true",className:"inline-flex shrink-0 [&>svg]:h-4 [&>svg]:w-4",children:a??jsx(mr,{"aria-hidden":"true"})}),jsx("span",{"data-ow-part":"label",className:"shrink-0",children:e}),l!=null&&jsx("span",{"data-ow-part":"count",className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums",children:l}),jsx("span",{"data-ow-part":"action",className:"ow-link shrink-0",children:w?d:i}),jsx(ne,{"aria-hidden":"true",className:g("shrink-0 text-[color:var(--ow-text-3)]","transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",w?"rotate-0":"-rotate-90"),style:{width:16,height:16}})]}),jsx("span",{"aria-hidden":"true",className:jn})]}),t!=null&&jsx("div",{id:m,"data-ow-part":"details",role:"region","aria-label":s,hidden:!w,className:p,children:t})]})}function Vg({sourceTitle:e,label:t="\u6B64\u4EFB\u52A1\u6E90\u81EA",onSourceClick:o,href:r,icon:n,className:a,...i}){let d=s=>{r||s.preventDefault(),o?.();};return jsxs("div",{"data-slot":"branch-divider","data-ow-part":"divider",role:"separator","aria-orientation":"horizontal",className:g("flex w-full items-center gap-2.5 py-2",a),...i,children:[jsx("span",{"aria-hidden":"true",className:jn}),jsxs("span",{className:Bg,children:[jsx("span",{"aria-hidden":"true",className:"inline-flex shrink-0 [&>svg]:h-4 [&>svg]:w-4",children:n??jsx(Po,{"aria-hidden":"true"})}),jsx("span",{"data-ow-part":"label",className:"shrink-0",children:t}),jsx("a",{"data-ow-part":"source",className:"ow-link min-w-0 truncate",href:r??"#",title:e,onClick:d,children:e})]}),jsx("span",{"aria-hidden":"true",className:jn})]})}function mk({actions:e,onAdd:t,onEdit:o,onClose:r}){return typeof e!="string"?jsx(Fragment,{children:e}):jsxs(Fragment,{children:[(e==="add"||e==="addClose")&&jsx(f,{variant:"ghost",size:"sm",type:"button",title:"Add",icon:jsx(We,{}),onClick:t}),e==="edit"&&jsx(f,{variant:"ghost",size:"sm",type:"button",title:"Edit",icon:jsx(yt,{}),onClick:o}),(e==="close"||e==="addClose")&&jsx(f,{variant:"ghost",size:"sm",type:"button",title:"Close",icon:jsx(Q,{}),onClick:r})]})}function ZA({title:e,actions:t,children:o,className:r="",short:n,draggable:a,onDragStart:i,onDragOver:d,onDragEnd:s,onAdd:l,onEdit:c,onClose:p}){return jsx(zt,{"data-slot":"wcard","data-ow-state":n?"short":void 0,className:g("min-h-0 flex-shrink-0 data-[ow-state=short]:h-auto",r),padding:"none",bodyClassName:"flex-1 min-h-0 overflow-auto p-3.5",draggable:a,onDragStart:i,onDragOver:d,onDragEnd:s,header:jsxs("div",{className:"grid grid-cols-[auto_1fr_auto] items-center gap-2",children:[jsxs("div",{"data-ow-part":"drag",className:"flex gap-0.5","aria-hidden":"true",children:[jsx("span",{className:"w-0.5 h-0.5 [border-radius:var(--ow-radius-pill)] bg-ow-text-2"}),jsx("span",{className:"w-0.5 h-0.5 [border-radius:var(--ow-radius-pill)] bg-ow-text-2"}),jsx("span",{className:"w-0.5 h-0.5 [border-radius:var(--ow-radius-pill)] bg-ow-text-2"})]}),jsx("div",{"data-ow-part":"title",className:"font-semibold text-ow-fs-ui leading-none font-[family-name:var(--ow-font-sans)] text-ow-text text-center",children:e}),jsx("div",{"data-ow-part":"actions",className:"flex gap-0.5",children:jsx(mk,{actions:t,onAdd:l,onEdit:c,onClose:p})})]}),children:o})}var fk=["#FFFFFF","#000000","#BFBFBF","#323232","#4472C4","#ED7D31","#A5A5A5","#FFC000","#5B9BD5","#71AD47"],gk=["#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#800000","#008000","#000080","#808000","#800080","#008080","#C0C0C0","#808080","#9999FF","#993366","#FFFFCC","#CCFFFF","#660066","#FF8080","#0066CC","#CCCCFF","#000080","#FF00FF","#FFFF00","#00FFFF","#800080","#800000","#008080","#0000FF","#00CCFF","#CCFFFF","#CCFFCC","#FFFF99","#99CCFF","#FF99CC","#CC99FF","#FFCC99","#3366FF","#33CCCC","#99CC00","#FFCC00","#FF9900","#FF6600","#666699","#969696","#003366","#339966","#003300","#333300","#993300","#993366","#333399","#333333","#000000"];function $g(e){return (e.replace("#","").match(/../g)??[]).slice(0,3).map(r=>Number.parseInt(r,16))}function jc(e,t,o){return `#${[e,t,o].map(r=>r.toString(16).padStart(2,"0")).join("")}`}function vk(e,t){let o=$g(e);return jc(...o.map(r=>Math.floor(r*(1-t))))}function bk(e,t){let o=$g(e);return jc(...o.map(r=>Math.floor((255-r)*t+r)))}function wk(e){if(typeof e=="object")return "#000000";if(typeof e!="string")return;if(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.test(e))return e.startsWith("#")?e:`#${e}`;let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e.trim().toLowerCase());if(t)return jc(Number.parseInt(t[2],16),Number.parseInt(t[3],16),Number.parseInt(t[4],16))}function hk(e,t){let o=fk[e];return e>9||!o?"#C7C9CC":typeof t>"u"?o:t>0?bk(o,t):vk(o,Math.abs(t))}function Uc(e,t){return typeof e=="string"?e:e?e.argb?wk(e.argb)??t:Object.prototype.hasOwnProperty.call(e,"theme")?hk(e.theme,e.tint):e.indexed?gk[e.indexed]??t:t:t}var xk=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];function jr(e){return String(e).padStart(2,"0")}function yk(e,t){let o=e instanceof Date?e:new Date(e);if(Number.isNaN(o.getTime()))return String(e??"");let r=o.getFullYear(),n=o.getMonth()+1,a=o.getDate();switch(t){case "mm-dd-yy":return `${r}/${jr(n)}/${jr(a)}`;case "[$-F800]dddd, mmmm dd, yyyy":return `${r}\u5E74${n}\u6708${a}\u65E5 \u5468${xk[o.getDay()]}`;case 'm"\u6708"d"\u65E5";@':return `${n}\u6708${a}\u65E5`;case "yyyy/m/d h:mm;@":case 'm/d/yy "h":mm':{let i=new Date(o.getTime()-288e5);return `${i.getFullYear()}/${i.getMonth()+1}/${jr(i.getDate())} ${jr(i.getHours())}:${jr(i.getMinutes())}`}case "h:mm;@":return `${jr(o.getHours())}:${jr(o.getMinutes())}`;default:return `${r}-${jr(n)}-${jr(a)}`}}function kk(e,t){if(t.endsWith("%")){let a=t.match(/\.(\d+)%/)?.[1];return a?`${(e*100).toFixed(a.length)}%`:`${e*100}%`}if(!/0(\.0+)?/.test(t))return `${e}`;let o="";if(t.startsWith("$")?o="$":t.startsWith('"\xA5')&&(o="\xA5"),e===0&&t.startsWith("_"))return "-";let r=t.match(/0\.(0+)(_|;|$)/)?.[1],n=e.toFixed(r?r.length:0);if(t.includes("#,##")){let[a="",...i]=n.split("."),d=a.split("").reverse(),s=[];d.forEach((l,c)=>{s.push(l),(c+1)%3===0&&c<d.length-1&&d[c+1]!=="-"&&s.push(",");}),n=[s.reverse().join(""),...i].join(".");}return o+n}function Ck(e){let{numFmt:t,value:o,type:r}=e;switch(r){case 2:try{return e.style?.numFmt?kk(o,e.style.numFmt):`${o}`}catch{return o}case 3:return o;case 4:return yk(o,t);case 5:return o?.text;case 6:return o?.result?.error??o?.result;case 8:return e.text;case 9:return e.text.toUpperCase();default:return o}}function Nk(e){let t=structuredClone(e.style??{});if(t.fill?.fgColor&&(t.bgcolor=Uc(t.fill.fgColor,"#C7C9CC")),t.font?.color&&(t.color=Uc(t.font.color,"#000000")),t.alignment&&(t.alignment.horizontal&&(t.align=t.alignment.horizontal),t.alignment.vertical&&(t.valign=t.alignment.vertical),t.alignment.wrapText&&(t.textwrap=true)),t.border){let o={};Object.keys(t.border).forEach(r=>{let n=t.border[r];o[r]=[n.style||"thin",Uc(n.color,"#000000")];}),t.border2={...t.border},t.border=o;}return typeof t.font?.size=="number"&&(t.font.size=Math.round(t.font.size/1.333333)),t}function Sk(e,t,o){let r=e.columns??[];for(let n=0;n<r.length;n++)t.cols[n.toString()]={},r[n]._hidden?t.cols[n.toString()].width=.1:r[n].width?t.cols[n.toString()].width=r[n].width*6+(o.widthOffset??0):t.cols[n.toString()].width=80+(o.widthOffset??0);t.cols.len=Math.max(Object.keys(t.cols).length,o.minColLength??0);}var Kc=null;async function Pk(){return Kc??=import('x-data-spreadsheet/dist/xspreadsheet.js').then(()=>{let e=globalThis.x_spreadsheet;if(typeof e!="function")throw Kc=null,new Error("x-data-spreadsheet \u52A0\u8F7D\u5931\u8D25");return e}),Kc}async function zg(e,t){return (await Pk())(e,{mode:"read",showToolbar:false,showContextmenu:false,view:{width:()=>t().width||1200,height:()=>Math.max(t().height,200)},row:{height:24,len:100},col:{len:26,width:80,indexWidth:60,minWidth:60},autoFocus:false})}function Hg(e){e&&(e.querySelectorAll("input").forEach(t=>{t.readOnly||(t.readOnly=true);}),document.activeElement instanceof HTMLElement&&document.activeElement.blur());}function Wg(e,t={}){let o=[];return e.eachSheet(r=>{let n={name:r.name,styles:[],rows:{},cols:{},merges:[]},a=[];for(let s in r._merges){let l=r._merges[s];n.merges.push(l.shortRange),a.push({startAddress:l.tl,yRange:l.model.bottom-l.model.top,xRange:l.model.right-l.model.left});}let i=0;(r._rows??[]).forEach((s,l)=>{n.rows[l]={cells:{}},s._hidden?(n.rows[l].height=.1,s._cells=[]):n.rows[l].height=(s.height||24)+(t.heightOffset??0),(s._cells??[]).forEach((c,p)=>{n.rows[l].cells[p]={},i=Math.max(i,p);let m=a.find(u=>u.startAddress===c._address);m&&c.master?.address!==m.startAddress||(m&&(n.rows[l].cells[p].merge=[m.yRange,m.xRange]),n.rows[l].cells[p].text=Ck(c),n.styles.push(Nk(c)),n.rows[l].cells[p].style=n.styles.length-1);});});let d=Object.keys(n.rows);n.rows.len=Math.max(Number(d[d.length-1]??-1)+1,t.minRowLength??100),r._columns&&r._columns.length>i+1&&(r._columns=r._columns.slice(0,i+1)),Sk(r,n,t),o.push(n);}),o}var ws={word:"Word \u6587\u6863",excel:"Excel \u8868\u683C",powerpoint:"PowerPoint \u6F14\u793A",unknown:"Office \u6587\u6863"},Gn=class extends Error{human;detail;constructor(t,o=""){super(t),this.name="OfficeLoadError",this.human=t,this.detail=o;}};function Tk(e,t){let o=ws[t];return /network|failed to fetch|load failed|err_|dns/i.test(e)?`${o}\u6CA1\u53D6\u5230\uFF0C\u68C0\u67E5\u4E00\u4E0B\u6587\u4EF6\u5730\u5740\u8FD8\u5728\u4E0D\u5728\u3002`:/password|encrypt/i.test(e)?`${o}\u8BBE\u4E86\u5BC6\u7801\uFF0C\u5148\u89E3\u9664\u4FDD\u62A4\u518D\u9884\u89C8\u3002`:/corrupt|invalid|malformed|zip|central directory|unexpected end/i.test(e)?`${o}\u8BFB\u4E0D\u51FA\u6765\uFF0C\u6587\u4EF6\u53EF\u80FD\u5DF2\u7ECF\u635F\u574F\u3002`:`${o}\u6CA1\u89E3\u6790\u51FA\u6765\u3002`}function Zn({className:e="",src:t,fileType:o="unknown",loading:r,error:n,chrome:a=true,onOpen:i,onRequestOpenWithOptions:d,onOpenWith:s,children:l,...c}){let p=useRef(null),m=useRef(null),u=useRef(0),b=useRef(null),[w,v]=useState("idle"),[h,x]=useState(""),[k,y]=useState(""),P=useRef(null),[N,S]=useState(null),[R,M]=useState(0),[T,_]=useState(0),[L,I]=useState(1),[$,F]=useState(0),E=useRef(null),O=useRef(null);useEffect(()=>{let ee=p.current;if(!t||!ee){v("idle");return}let q=u.current+1;u.current=q;let A=()=>u.current!==q;return v("loading"),x(""),y(""),(async()=>{try{let D;if(b.current)D=b.current;else {let Y=await fetch(t);if(!Y.ok)throw new Gn(`${ws[o]}\u6CA1\u53D6\u5230\uFF0C\u68C0\u67E5\u4E00\u4E0B\u6587\u4EF6\u5730\u5740\u8FD8\u5728\u4E0D\u5728\u3002`,`HTTP ${Y.status} ${Y.statusText}`.trim());if(D=await Y.arrayBuffer(),A())return;b.current=D;}switch(ee.replaceChildren(),o){case "word":await _k(D,ee);break;case "excel":{P.current?.();let Y=await Dk(D,ee,()=>({width:m.current?.clientWidth??0,height:m.current?.clientHeight??0}));if(P.current=Y,A())return;if(!Y){v("empty");return}break}case "powerpoint":{let{parse:Y}=await import('pptxtojson'),Ee=await Y(D,{imageMode:"base64",videoMode:"blob",audioMode:"blob"});if(A())return;S(Ee),M(Ee.slides.length),_(0);break}default:throw new Gn("\u8FD9\u79CD\u6587\u4EF6\u6682\u65F6\u6253\u4E0D\u5F00\u3002",`unsupported fileType: ${o}`)}if(A())return;v("ready");}catch(D){if(A())return;let Y=D instanceof Error?D.message:String(D??"");v("error"),x(D instanceof Gn?D.human:Tk(Y,o)),y(D instanceof Gn?D.detail:Y);}})(),()=>{u.current+=1;}},[t,o]),useEffect(()=>()=>{P.current?.(),P.current=null;},[]),useEffect(()=>{b.current=null,S(null),M(0),_(0);},[t]),useEffect(()=>{if(o!=="powerpoint"||!R)return;let ee=E.current,q=ee?.parentElement;if(!q||!ee)return;let A=O.current?.dataset.owState==="collapsed"?.9:1,D=A,Y=0,Ee=0,Ge=false,et=0,ht=0,to=0,Ze=0,U=()=>{ee.style.transform=`scale(${D}) translate(${Y}px, ${Ee}px)`,I(D),q.style.cursor=D>1.01?"grab":"";},ke=X=>{if(X.ctrlKey||X.metaKey){X.preventDefault();let Ce=-X.deltaY*.01;D=Math.min(5,Math.max(.25,D+Ce)),D<=1&&(Y=0,Ee=0),U();}else D>1.01&&(X.preventDefault(),Y-=X.deltaX/D,Ee-=X.deltaY/D,U());},j=X=>{D<=1.01||(X.preventDefault(),Ge=true,et=X.clientX,ht=X.clientY,to=Y,Ze=Ee,q.style.cursor="grabbing",q.setPointerCapture(X.pointerId));},Ie=X=>{Ge&&(Y=to+(X.clientX-et)/D,Ee=Ze+(X.clientY-ht)/D,U());},we=X=>{Ge&&(Ge=false,q.style.cursor=D>1.01?"grab":"",q.releasePointerCapture(X.pointerId));},de=()=>{D=A,Y=0,Ee=0,U();},ve=X=>{D=Math.min(5,Math.max(.25,X)),D<=1&&(Y=0,Ee=0),U();};return q.__pptxSetZoom=ve,q.addEventListener("wheel",ke,{passive:false}),q.addEventListener("pointerdown",j),q.addEventListener("pointermove",Ie),q.addEventListener("pointerup",we),q.addEventListener("dblclick",de),()=>{q.removeEventListener("wheel",ke),q.removeEventListener("pointerdown",j),q.removeEventListener("pointermove",Ie),q.removeEventListener("pointerup",we),q.removeEventListener("dblclick",de),delete q.__pptxSetZoom;}},[o,R,T]);let ae=ee=>{let q=E.current?.parentElement;q&&q.__pptxSetZoom&&q.__pptxSetZoom(ee);},z=useCallback(ee=>{if(ee.key!=="ArrowUp"&&ee.key!=="ArrowDown")return;let q=ee.target;if(q.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(q.tagName))return;ee.preventDefault();let A=ee.key==="ArrowUp"?-1:1;_(D=>Math.min(Math.max(D+A,0),R-1));},[R]),pe=useCallback(ee=>{ee.target.closest('button, a, input, textarea, select, [contenteditable="true"]')||ee.currentTarget.focus({preventScroll:true});},[]);useEffect(()=>{if(!R)return;O.current?.querySelector("[data-slot='pptx-thumb'][data-ow-state='active']")?.scrollIntoView({block:"nearest"});},[T,R]),useEffect(()=>{if(o!=="powerpoint"||!O.current)return;let ee=O.current,q=()=>{ee.clientWidth<750?ee.dataset.owState="collapsed":delete ee.dataset.owState;};q();let A=new ResizeObserver(q);return A.observe(ee),()=>A.disconnect()},[o,R]),useEffect(()=>{if(o!=="powerpoint"||!N||!R)return;let q=E.current?.parentElement;if(!q)return;let A=()=>{let Y=q.clientWidth,Ee=q.clientHeight;if(!Y||!Ee)return;let Ge=N.size.width*Pr,et=N.size.height*Pr,to=O.current?.dataset.owState==="collapsed"?.81:.9,Ze=Math.min(Y*to/Ge,Ee*to/et);F(Ze);};A();let D=new ResizeObserver(A);return D.observe(q),()=>D.disconnect()},[o,R,N]);let Me=o==="powerpoint"&&w==="ready"&&R>0,Oe=!t&&r!=null;return jsx("div",{"data-slot":"office-preview","data-ow-chrome":a?void 0:"none",className:g("flex flex-col w-full h-full bg-ow-bg overflow-hidden",a&&"[border-radius:var(--ow-radius-card)] border border-ow-border-strong",e),...c,children:jsxs("div",{"data-ow-part":"body",className:"flex-1 min-h-0 relative flex flex-col items-center justify-center pl-0.5",ref:m,children:[w==="loading"||Oe?jsx("div",{"data-ow-part":"loading",role:"status","aria-live":"polite","aria-label":`\u6B63\u5728\u6253\u5F00${ws[o]}`,className:"flex w-full max-w-[560px] flex-col gap-3 p-8",children:r??jsxs(Fragment,{children:[jsx(re,{variant:"line",height:18,width:"46%"}),jsx(re,{variant:"line",height:13}),jsx(re,{variant:"line",height:13}),jsx(re,{variant:"line",height:13,width:"78%"}),jsx(re,{variant:"block",height:180})]})}):t?w==="empty"?jsx("div",{"data-ow-part":"empty",className:"flex w-full items-center justify-center p-8",children:jsx(H,{message:"\u8FD9\u4E2A\u8868\u683C\u91CC\u6CA1\u6709\u5DE5\u4F5C\u8868\u3002"})}):w==="error"?jsx("div",{"data-ow-part":"error",className:"flex w-full max-w-[560px] flex-col p-8",children:n??jsx(J,{variant:"error",detail:k,children:h||`${ws[o]}\u6CA1\u89E3\u6790\u51FA\u6765\u3002`})}):null:jsx("div",{"data-ow-part":"empty",className:"flex w-full items-center justify-center p-8",children:jsx(H,{message:`\u6682\u65E0 ${ws[o]}`})}),Me&&N&&jsxs("div",{"data-ow-part":"pptx-panels",className:"flex flex-col w-full flex-1 min-h-0 overflow-hidden self-stretch",children:[jsxs("div",{"data-ow-part":"pptx-toolbar",className:"flex items-center gap-1 px-3 border-b border-ow-border flex-shrink-0 bg-ow-bg",style:{height:"var(--ow-h-lg)"},children:[jsx("span",{"data-ow-part":"spacer",className:"flex-1"}),jsx(f,{type:"button","data-ow-part":"toolbar-btn",variant:"ghost",size:"sm",className:"w-7 h-7 p-0 text-ow-text-2 hover:bg-ow-surface",onClick:()=>ae(L-.25),title:"\u7F29\u5C0F",children:jsx(Gs,{width:14,height:14})}),jsxs("span",{"data-ow-part":"toolbar-zoom",className:"min-w-10 text-center font-medium text-ow-fs-caption leading-none font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-text-2 select-none",children:[Math.round(L*100),"%"]}),jsx(f,{type:"button","data-ow-part":"toolbar-btn",variant:"ghost",size:"sm",className:"w-7 h-7 p-0 text-ow-text-2 hover:bg-ow-surface",onClick:()=>ae(L+.25),title:"\u653E\u5927",children:jsx(js,{width:14,height:14})}),(i||d)&&jsx(Fi,{label:"\u6253\u5F00\u65B9\u5F0F",onOpen:i,onRequestOptions:d,onSelect:s})]}),jsxs("div",{"data-ow-part":"pptx-body",className:"grid grid-cols-[200px_minmax(0,1fr)] grid-rows-[1fr] flex-1 min-h-0 overflow-hidden relative focus:outline-none focus-visible:[outline:var(--ow-focus-ring-w)_solid_var(--ow-focus-ring)] focus-visible:[outline-offset:calc(var(--ow-focus-ring-offset)*-1)]",ref:O,tabIndex:0,role:"region","aria-label":`PowerPoint \u9884\u89C8\uFF0C\u7B2C ${T+1} \u9875\uFF0C\u5171 ${R} \u9875`,onKeyDown:z,onPointerDown:pe,children:[jsx("div",{"data-ow-part":"pptx-thumbs",className:"flex flex-col gap-2 py-4 px-3 overflow-y-auto overflow-x-hidden min-h-0 border-r border-ow-border bg-ow-surface scrollbar-thin",children:N.slides.map((ee,q)=>jsx(Mk,{slide:ee,index:q,isActive:q===T,slideWidth:N.size.width,slideHeight:N.size.height,onClick:_},q))}),jsx("div",{"data-ow-part":"pptx-main",className:"relative overflow-hidden bg-ow-surface flex items-center justify-center min-h-0 h-full",children:jsx("div",{"data-ow-part":"pptx-slide",className:"relative overflow-hidden [border-radius:var(--ow-radius-md)] border border-ow-border origin-center flex-shrink-0",ref:E,style:{width:N.size.width*Pr*$,height:N.size.height*Pr*$},children:jsx("div",{style:{transform:`scale(${$})`,transformOrigin:"top left"},children:N.slides[T]&&jsx(kl,{slide:N.slides[T],slideWidth:N.size.width,slideHeight:N.size.height})})})})]})]}),jsx("div",{ref:p,"data-ow-part":"content",className:"w-full h-full overflow-auto box-border",style:{display:w==="ready"&&!Me?void 0:"none"}}),l]})})}var Mk=memo(function({slide:t,index:o,isActive:r,slideWidth:n,slideHeight:a,onClick:i}){let d=n*Pr,s=a*Pr,l=useRef(null),[c,p]=useState(0);useEffect(()=>{let u=l.current;if(!u)return;let b=()=>{let v=u.clientWidth;v>0&&p(v/d);};b();let w=new ResizeObserver(b);return w.observe(u),()=>w.disconnect()},[d]);let m=useCallback(()=>i(o),[i,o]);return jsxs(f,{type:"button","data-slot":"pptx-thumb","data-ow-state":r?"active":void 0,variant:"unstyled",className:"group grid grid-cols-[32px_minmax(0,1fr)] items-center gap-2 p-2 border-0 [border-radius:var(--ow-radius-sm)] bg-transparent cursor-pointer text-left [transition:background-color_var(--ow-dur-1)_var(--ow-ease-beacon)] hover:bg-ow-hover active:bg-ow-press data-[ow-state=active]:bg-ow-selected-bg",onClick:m,children:[jsx("span",{"data-ow-part":"num",className:"font-medium text-ow-fs-body leading-none font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-text-3 text-center group-data-[ow-state=active]:text-ow-text",children:o+1}),jsx("span",{"data-ow-part":"slide",className:"block relative w-full [border-radius:var(--ow-radius-2xs)] border border-ow-border group-data-[ow-state=active]:border-ow-border-strong bg-ow-bg overflow-hidden pointer-events-none [transition:border-color_var(--ow-dur-1)_var(--ow-ease-beacon)]",ref:l,style:{aspectRatio:`${n} / ${a}`},children:c>0&&jsx("span",{style:{display:"block",transform:`scale(${c})`,transformOrigin:"top left",position:"absolute",top:0,left:0,width:d,height:s},children:jsx(kl,{slide:t,slideWidth:n,slideHeight:a})})})]})});async function _k(e,t){let{renderAsync:o}=await import('docx-preview');await o(e,t,void 0,{className:"ow-docx-body",inWrapper:true}),t.querySelectorAll("style").forEach(r=>{r.textContent=(r.textContent||"").replace(/box-shadow:[^;]+;/g,"");}),t.querySelectorAll("section.ow-docx-body, section.docx").forEach(r=>{r.dataset.theme="light";});}async function Lk(e){let t=await import('exceljs'),o={ignoreNodes:["drawing","picture"]};try{let r=new t.Workbook;return await r.xlsx.load(e,o),r}catch{let n=await(await import('jszip')).default.loadAsync(e);for(let d of Object.keys(n.files))d.replace(/^\//,"").startsWith("xl/drawings/")&&n.remove(d);let a=await n.generateAsync({type:"arraybuffer"}),i=new t.Workbook;return await i.xlsx.load(a,o),i}}async function Dk(e,t,o){let r=await Lk(e);if(!r.worksheets.length)return null;let n=document.createElement("div");n.className="ow-excel-sheet",n.setAttribute("data-slot","excel-sheet"),t.appendChild(n);let a=await zg(n,o);a.loadData(Wg(r,{minColLength:20})),Hg(n);let i=new ResizeObserver(()=>a.sheet.reload?.());return i.observe(t),()=>{i.disconnect(),n.remove();}}function Yn({className:e="",src:t,page:o,onPageChange:r,totalPages:n,loading:a,error:i,fileName:d,chrome:s=true,children:l,...c}){let[p,m]=useState(o??1),[u,b]=useState(false),w=i!=null||u,v=typeof i=="string"?jsx(J,{variant:"error",children:i}):i??null,h=o??p,x=k=>{k<1||n&&k>n||(m(k),r?.(k));};return jsxs("div",{"data-slot":"pdf-preview","data-ow-chrome":s?void 0:"none",className:g("flex flex-col w-full h-full bg-ow-bg overflow-hidden",s&&"[border-radius:var(--ow-radius-card)] border border-ow-border-strong",e),...c,children:[s&&jsxs("div",{"data-ow-part":"header",className:"flex items-center justify-between px-3.5 border-b border-ow-border flex-shrink-0",style:{height:"var(--ow-h-lg)"},children:[jsxs("div",{"data-ow-part":"filename",className:"flex items-center gap-2 font-medium text-ow-fs-ui leading-none text-ow-text",children:[jsx(mr,{className:"text-ow-text-3 flex-shrink-0",width:16,height:16}),jsx("span",{className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",children:d||"Document.pdf"})]}),n?jsx(Zc,{page:h,totalPages:n,onPageChange:x,showReadout:true}):null]}),jsxs("div",{"data-ow-part":"body",className:"flex-1 min-h-0 relative flex items-center justify-center",children:[w?jsx("div",{"data-ow-part":"error",className:"flex w-full max-w-[560px] flex-col p-8",children:v??jsx(J,{variant:"error",children:"\u8FD9\u4E2A PDF \u6CA1\u80FD\u6253\u5F00\uFF0C\u6587\u4EF6\u53EF\u80FD\u635F\u574F\u6216\u5DF2\u7ECF\u4E0D\u5728\u4E86\u3002"})}):a?jsx("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"flex w-full items-center justify-center p-8",children:a}):t?jsx("iframe",{"data-ow-part":"iframe",className:"w-full h-full border-0 block",src:`${t}#page=${h}`,title:d||"PDF Preview",onError:()=>b(true)}):jsx("div",{"data-ow-part":"empty",className:"flex w-full items-center justify-center p-8",children:jsx(H,{message:"\u6682\u65E0 PDF \u6587\u4EF6"})}),l]})]})}function Zc({page:e,totalPages:t,onPageChange:o,showReadout:r=false}){let n="w-7 h-7 p-0 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)] disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent";return jsxs("div",{"data-ow-part":"pagination",className:"flex items-center gap-1",children:[jsx(f,{"data-ow-part":"page-btn",type:"button",variant:"ghost",size:"sm",className:n,icon:jsx(Kt,{width:14,height:14}),disabled:e<=1,onClick:()=>o(e-1),"aria-label":"\u4E0A\u4E00\u9875",title:"\u4E0A\u4E00\u9875"}),r&&jsxs("span",{"data-ow-part":"page-info",className:"font-normal text-ow-fs-caption leading-none font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-text-2 min-w-12 text-center",children:[e," / ",t]}),jsx(f,{"data-ow-part":"page-btn",type:"button",variant:"ghost",size:"sm",className:n,icon:jsx(he,{width:14,height:14}),disabled:e>=t,onClick:()=>o(e+1),"aria-label":"\u4E0B\u4E00\u9875",title:"\u4E0B\u4E00\u9875"})]})}var Bk={markdown:"Markdown",code:"\u4EE3\u7801",pdf:"PDF",web:"\u7F51\u9875",office:"Office"},Ok=[{key:"preview",label:"\u9884\u89C8"},{key:"raw",label:"\u6E90\u7801"}];function YO({preview:e,panelMode:t,onPanelModeChange:o,onClose:r,onOpenDefault:n,renderMarkdown:a}){let[i,d]=useState(false),s=t==="wide",l=e.kind==="markdown"&&!!a,c=useRef(null),p=useRef(false),m=useCallback(w=>{w.preventDefault(),p.current=true;let v=w.clientX,h=c.current?.offsetWidth??430,x=y=>{if(!p.current||!c.current)return;let P=c.current.parentElement?.offsetWidth??window.innerWidth,N=Math.min(Math.max(h+v-y.clientX,280),P-700);c.current.style.width=`${N}px`;},k=()=>{p.current=false,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",x),document.addEventListener("mouseup",k);},[]),u=(w,v)=>jsx("div",{className:"artifact-sidebar__empty",children:jsx(H,{message:w,actionLabel:v?.label,onAction:v?.onAction})}),b=null;return e.kind==="markdown"?e.content.trim()?i||!a?b=jsx(Lf,{bare:true,rawMode:true,className:"artifact-sidebar__preview",content:e.content,fileName:e.name}):b=jsx("div",{className:"artifact-sidebar__preview artifact-sidebar__markdown-body",children:jsx("div",{className:"artifact-sidebar__markdown",children:a(e.content)})}):b=u("\u8FD9\u4E2A\u6587\u4EF6\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u5185\u5BB9\u3002"):e.kind==="code"?b=e.content.trim()?jsx(Ki,{className:"artifact-sidebar__preview",language:e.language,code:e.content}):u("\u8FD9\u4E2A\u6587\u4EF6\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u5185\u5BB9\u3002"):e.kind==="pdf"?b=jsx(Yn,{className:"artifact-sidebar__preview",chrome:false,src:e.url,fileName:e.name}):e.kind==="office"?b=jsx(Zn,{className:"artifact-sidebar__preview",chrome:false,src:e.url,fileType:e.fileType}):b=u("\u7F51\u9875\u9884\u89C8\u8981\u5728\u7CFB\u7EDF\u6D4F\u89C8\u5668\u91CC\u6253\u5F00\u3002",{label:"\u7CFB\u7EDF\u6253\u5F00",onAction:()=>n(e.path)}),jsxs("aside",{ref:c,className:`artifact-sidebar artifact-sidebar--${t}`,"aria-label":"\u4EA7\u7269\u9884\u89C8",children:[!s&&jsx("div",{className:"artifact-sidebar__resize-handle",onMouseDown:m}),jsxs("header",{className:"artifact-sidebar__head",children:[jsxs("div",{className:"artifact-sidebar__title",children:[jsx("span",{className:"artifact-sidebar__icon",children:jsx(oo,{})}),jsxs("div",{className:"artifact-sidebar__title-text",children:[jsx("div",{className:"artifact-sidebar__name",title:e.name,children:e.name}),jsxs("div",{className:"artifact-sidebar__meta",children:[Bk[e.kind]," \u9884\u89C8"]})]})]}),jsx(f,{variant:"ghost",size:"sm",type:"button",className:"artifact-sidebar__action",title:"\u7CFB\u7EDF\u6253\u5F00","aria-label":"\u7CFB\u7EDF\u6253\u5F00",icon:jsx(lo,{"aria-hidden":"true"}),onClick:()=>n(e.path)}),jsx(f,{variant:"ghost",size:"sm",type:"button",className:"artifact-sidebar__action",title:s?"\u6062\u590D\u9762\u677F\u5BBD\u5EA6":"\u5C55\u5F00\u9762\u677F","aria-label":s?"\u6062\u590D\u9762\u677F\u5BBD\u5EA6":"\u5C55\u5F00\u9762\u677F","aria-pressed":s,icon:jsx(qo,{"aria-hidden":"true"}),onClick:()=>{c.current&&(c.current.style.width=""),o(s?"normal":"wide");}}),jsx(f,{variant:"ghost",size:"sm",type:"button",className:"artifact-sidebar__action",title:"\u5173\u95ED\u9884\u89C8","aria-label":"\u5173\u95ED\u9884\u89C8",icon:jsx(Q,{"aria-hidden":"true"}),onClick:r})]}),l&&jsx(uo,{className:"artifact-sidebar__tabs",size:"sm",items:Ok,activeKey:i?"raw":"preview",onChange:w=>d(w==="raw")}),jsx("div",{className:"artifact-sidebar__body",children:b})]})}var Ll="shrink-0 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)] disabled:text-[color:var(--ow-disabled-text)] disabled:bg-transparent";function $k(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`:""}function cV({url:e="",onNavigate:t,canGoBack:o=false,canGoForward:r=false,onGoBack:n,onGoForward:a,loading:i=false,onReload:d,onStop:s,urlPrefix:l,urlSuffix:c,actions:p,subToolbar:m,children:u,error:b,errorDetail:w,retryLabel:v="\u91CD\u65B0\u52A0\u8F7D",onRetry:h,emptyMessage:x="\u8F93\u5165\u7F51\u5740\u5F00\u59CB\u9884\u89C8\u3002",footer:k,compact:y=false,onFind:P,chrome:N=true,className:S=""}){let[R,M]=useState(e),[T,_]=useState(false),{isImeEnter:L,onCompositionEnd:I,onCompositionStart:$}=Dt();useEffect(()=>{T||M(e);},[e,T]);let F=/^https:/i.test(e)?jsx("span",{className:"inline-flex text-[color:var(--ow-success)]",children:jsx(oa,{"aria-hidden":"true"})}):null,E=useCallback(()=>{let O=$k(R);O&&(t?.(O),_(false));},[R,t]);return jsxs("div",{"data-slot":"web-preview-shell","data-ow-chrome":N?void 0:"none",className:g("web-preview-shell flex flex-col w-full h-full min-h-0 bg-[var(--ow-bg)] overflow-hidden",y&&"web-preview-shell--compact",N&&"[border-radius:var(--ow-radius-card)] border border-[color:var(--ow-border-strong)]",S),children:[jsxs("div",{"data-ow-part":"toolbar",className:"flex shrink-0 items-center gap-1 border-b border-[color:var(--ow-border)] px-2",style:y?void 0:{height:"var(--ow-h-lg)"},children:[jsxs("div",{"data-ow-part":"nav-group",className:"flex shrink-0 items-center gap-0.5",children:[jsx(f,{type:"button",variant:"ghost",size:"sm",className:Ll,icon:jsx(Kt,{"aria-hidden":"true"}),disabled:!o,onClick:n,title:"\u540E\u9000","aria-label":"\u540E\u9000"}),!y&&jsx(f,{type:"button",variant:"ghost",size:"sm",className:Ll,icon:jsx(he,{"aria-hidden":"true"}),disabled:!r,onClick:a,title:"\u524D\u8FDB","aria-label":"\u524D\u8FDB"}),jsx(f,{type:"button",variant:"ghost",size:"sm",className:Ll,icon:i?jsx(Q,{"aria-hidden":"true"}):jsx(Ue,{"aria-hidden":"true"}),onClick:i?s:d,title:i?"\u505C\u6B62":"\u5237\u65B0","aria-label":i?"\u505C\u6B62":"\u5237\u65B0"})]}),jsx(te,{"data-ow-part":"url",className:"web-preview-shell__url min-w-0 flex-1 font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]",value:T?R:e,onChange:O=>{_(true),M(O);},onFocus:O=>{let ae=O.currentTarget;_(true),M(e),window.requestAnimationFrame(()=>ae.select());},onBlur:()=>_(false),onCompositionStart:$,onCompositionEnd:I,onKeyDownCapture:O=>{O.stopPropagation(),!L(O)&&(O.key==="Enter"&&(O.preventDefault(),E()),O.key==="Escape"&&(O.preventDefault(),_(false),M(e)));},prefix:l??(y?F:jsx(Mt,{"aria-hidden":"true"})),suffix:y&&i?jsx("span",{className:"web-preview-shell__url-spin","aria-hidden":"true"}):c,placeholder:"\u8F93\u5165\u7F51\u5740","aria-label":"\u5730\u5740\u680F"}),P&&jsx(f,{type:"button",variant:"ghost",size:"sm",className:Ll,"data-ow-part":"find",icon:jsx($t,{"aria-hidden":"true"}),onClick:P,title:"\u5728\u9875\u9762\u4E2D\u67E5\u627E","aria-label":"\u67E5\u627E"}),p&&jsx("div",{"data-ow-part":"actions",className:"flex shrink-0 items-center gap-0.5",children:p})]}),i&&!y&&jsx(la,{indeterminate:true,size:"sm","aria-label":"\u9875\u9762\u52A0\u8F7D\u4E2D",className:"shrink-0"}),m,jsx("div",{"data-ow-part":"body",className:"relative flex min-h-0 flex-1 flex-col",children:b?jsx("div",{"data-ow-part":"error",className:"flex min-h-0 flex-1 items-center justify-center p-8",children:jsx(J,{variant:"error",title:"\u8FD9\u4E2A\u9875\u9762\u6CA1\u52A0\u8F7D\u51FA\u6765",detail:w,action:h?jsx(f,{type:"button",variant:"secondary",size:"sm",onClick:h,children:v}):void 0,children:b})}):e?u:jsx("div",{"data-ow-part":"empty",className:"flex min-h-0 flex-1 items-center justify-center bg-[var(--ow-mat)] p-6",children:jsx(H,{message:x,markSize:48,className:"max-w-[360px] p-0"})})}),k]})}var zk={Mod:"\u2318",Meta:"\u2318",Cmd:"\u2318",Command:"\u2318",Ctrl:"\u2303",Control:"\u2303",Alt:"\u2325",Option:"\u2325",Shift:"\u21E7",Enter:"\u21A9",Return:"\u21A9",Esc:"\u238B",Escape:"\u238B",Backspace:"\u232B",Delete:"\u2326",Tab:"\u21E5",Space:"\u2423",Up:"\u2191",Down:"\u2193",Left:"\u2190",Right:"\u2192"},Hk={Mod:"Ctrl",Meta:"Win",Cmd:"Ctrl",Command:"Ctrl",Ctrl:"Ctrl",Control:"Ctrl",Alt:"Alt",Option:"Alt",Shift:"Shift",Enter:"Enter",Return:"Enter",Esc:"Esc",Escape:"Esc",Backspace:"Backspace",Delete:"Del",Tab:"Tab",Space:"Space",Up:"\u2191",Down:"\u2193",Left:"\u2190",Right:"\u2192"};function Gg(e){return e==="mac"}function Wk(e,t="mac"){let o=Gg(t)?zk:Hk;return e.map(r=>o[r]??r)}function Xn(e,t="mac"){let o=Wk(e,t);return Gg(t)?o.join(""):o.join("+")}var Kk=["Mod","T"],jk=[{key:"browser",label:"\u6D4F\u89C8\u5668",icon:jsx(Dl,{kind:"web"})},{key:"terminal",label:"\u7EC8\u7AEF",icon:jsx(Dl,{kind:"terminal"})},{key:"files",label:"\u6587\u4EF6",icon:jsx(Dl,{kind:"files"})}];function Yg(e){let t=e.density==="panel",[o,r]=useState(false),[n,a]=useState(null),[i,d]=useState(null),[s,l]=useState(false),[c,p]=useState(()=>new Set),m=useRef(null),u=useRef(null);useLayoutEffect(()=>{let h=u.current;if(!h||t||e.tabs.length===0){l(false);return}let x=()=>{let P=h.querySelector(".browser-tab")?.getBoundingClientRect().width??180;l(N=>{let S=N?P<60:P<54;return N===S?N:S});};x();let k=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return k?.observe(h),()=>k?.disconnect()},[t,e.tabs.length]),useEffect(()=>{if(!o)return;let h=x=>{let k=x.target;m.current?.contains(k)||Array.from(document.querySelectorAll(".ow-dropdown")).pop()?.contains(k)||r(false);};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[o]);let b=h=>{r(false),h==="terminal"?e.onAddTerminal():h==="files"?e.onAddFiles():e.onAddBrowser();},w=h=>{let x=n?.tabId;a(null),x&&(h==="close-others"?e.onCloseOtherTabs(x):e.onCloseTab(x));},v=jsxs("div",{className:"browser-tabbar__add-wrap",children:[jsx(f,{ref:m,variant:"unstyled",type:"button",className:"browser-tabbar__add",onClick:t?e.onAddBrowser:()=>r(h=>!h),title:t?`\u65B0\u5EFA\u6D4F\u89C8\u5668\u6807\u7B7E ${Xn(Kk,e.platform??"mac")}`:"\u65B0\u5EFA\u6807\u7B7E","aria-label":"\u65B0\u5EFA\u6807\u7B7E","aria-expanded":t?void 0:o,children:jsx(We,{"aria-hidden":"true"})}),!t&&o&&jsx(pt,{items:jk,onSelect:b,width:140,portal:m})]});return jsxs("div",{className:`browser-tabbar${t?" browser-tabbar--panel":""}`,children:[jsxs("div",{ref:u,role:"tablist",className:`browser-tabbar__tabs${s?" is-icon-only":""}`,children:[e.tabs.map(h=>{let x=h.title||h.url||h.path||"\u65B0\u6807\u7B7E\u9875",k=h.kind==="web"&&!!h.favicon&&!c.has(h.id);return jsx("div",{className:`browser-tab${h.id===e.activeTabId?" is-active":""}${h.id===i?" is-hovered":""}`,onClick:()=>e.onSwitchTab(h.id),onMouseEnter:()=>d(h.id),onMouseLeave:()=>d(null),onContextMenu:y=>{y.preventDefault(),r(false),a({tabId:h.id,x:y.clientX,y:y.clientY});},role:"tab","aria-label":x,"aria-selected":h.id===e.activeTabId,children:jsxs(aa,{content:x,followCursor:true,delay:400,showArrow:false,className:"browser-tab__tooltip",children:[!t&&jsx("span",{className:`browser-tab__favicon${k?"":" browser-tab__favicon--placeholder"}`,children:k?jsx("img",{src:h.favicon,alt:"",width:16,height:16,onError:()=>p(y=>y.has(h.id)?y:new Set(y).add(h.id))}):jsx(Dl,{kind:h.kind})}),jsx("span",{className:"browser-tab__title",children:h.title||"\u65B0\u6807\u7B7E\u9875"}),jsx(f,{variant:"unstyled",className:"browser-tab__close",onClick:y=>{y.stopPropagation(),e.onCloseTab(h.id);},"aria-label":`\u5173\u95ED ${x}`,children:jsx(Q,{"aria-hidden":"true"})})]})},h.id)}),t&&v]}),jsxs("div",{className:"browser-tabbar__actions",children:[!t&&v,jsx(f,{variant:"unstyled",type:"button",className:"browser-tabbar__add",onClick:e.onToggleWide,title:t?"\u6700\u5927\u5316 / \u8FD8\u539F":e.isWide?"\u6062\u590D\u9762\u677F\u5BBD\u5EA6":"\u5C55\u5F00\u9762\u677F","aria-label":t?"\u6700\u5927\u5316 / \u8FD8\u539F":e.isWide?"\u6062\u590D\u9762\u677F\u5BBD\u5EA6":"\u5C55\u5F00\u9762\u677F","aria-pressed":e.isWide,children:jsx(qo,{width:t?16:14,height:t?16:14})}),jsx(f,{variant:"unstyled",type:"button",className:"browser-tabbar__add",onClick:e.onToggleCollapsed,title:t?"\u6536\u8D77\u53F3\u680F":"\u6298\u53E0\u9884\u89C8\u9762\u677F","aria-label":t?"\u6536\u8D77\u53F3\u680F":"\u6298\u53E0\u9884\u89C8\u9762\u677F",children:t?jsx(he,{width:16,height:16}):jsx(Br,{width:14,height:14})})]}),n&&jsx(Gk,{point:n,canCloseOthers:e.tabs.length>1,onClose:()=>a(null),onSelect:w})]})}function Gk({point:e,canCloseOthers:t,onClose:o,onSelect:r}){let n=useRef(null),[a,i]=useState(null);return useLayoutEffect(()=>{let d=n.current;if(!d)return;let s=d.getBoundingClientRect();i({left:Math.max(8,Math.min(e.x,window.innerWidth-s.width-8)),top:Math.max(8,Math.min(e.y,window.innerHeight-s.height-8))});},[e.x,e.y]),useEffect(()=>{let d=l=>{n.current?.contains(l.target)||o();},s=l=>{l.key==="Escape"&&o();};return document.addEventListener("pointerdown",d,true),document.addEventListener("keydown",s),window.addEventListener("blur",o),window.addEventListener("scroll",o,true),()=>{document.removeEventListener("pointerdown",d,true),document.removeEventListener("keydown",s),window.removeEventListener("blur",o),window.removeEventListener("scroll",o,true);}},[o]),createPortal(jsxs("div",{ref:n,className:"cpop browser-tab-context-menu",style:{left:a?.left??-9999,top:a?.top??-9999,visibility:a?"visible":"hidden"},role:"menu","aria-label":"\u6807\u7B7E\u9875\u64CD\u4F5C",onContextMenu:d=>d.preventDefault(),children:[jsxs(f,{variant:"unstyled",className:"mi",role:"menuitem",onClick:()=>r("close"),children:[jsx(Q,{}),jsx("span",{children:"\u5173\u95ED"})]}),jsxs(f,{variant:"unstyled",className:"mi",role:"menuitem",disabled:!t,onClick:()=>r("close-others"),children:[jsx(Ri,{}),jsx("span",{children:"\u5173\u95ED\u5176\u4ED6\u6807\u7B7E\u9875"})]})]}),document.body)}function Dl({kind:e}){return e==="terminal"?jsx(So,{"aria-hidden":"true"}):e==="web"?jsx(Mt,{"aria-hidden":"true"}):e==="subagent"?jsx(Po,{"aria-hidden":"true"}):e==="file"?jsx(oo,{"aria-hidden":"true"}):jsx(qe,{"aria-hidden":"true"})}var Xc={log:"var(--ow-term-text)",info:"var(--ow-ansi-blue)",warn:"var(--ow-ansi-yellow)",error:"var(--ow-ansi-red)"},Qc={log:" ",info:"i ",warn:"! ",error:"x "},Jc={log:"\u65E5\u5FD7",info:"\u4FE1\u606F",warn:"\u8B66\u544A",error:"\u9519\u8BEF"};function Yk({logs:e=[],open:t,defaultOpen:o=false,onOpenChange:r,onClear:n,label:a="\u63A7\u5236\u53F0",maxHeight:i=192,emptyMessage:d="\u9875\u9762\u8FD8\u6CA1\u6709\u8F93\u51FA\u3002",className:s=""}){let[l,c]=useState(o),p=t??l,m=()=>{let b=!p;t===void 0&&c(b),r?.(b);},u=useMemo(()=>{let b=0,w=0;for(let v of e)v.level==="warn"?b+=1:v.level==="error"&&(w+=1);return {error:w,warn:b}},[e]);return jsxs("div",{"data-slot":"web-preview-console","data-ow-state":p?"open":"closed",className:g("shrink-0 border-t border-[color:var(--ow-border)] bg-[var(--ow-surface)]",s),children:[jsxs("div",{"data-ow-part":"header",className:"flex items-center gap-2 pr-2",children:[jsxs(f,{type:"button","data-ow-part":"toggle",variant:"ghost",size:"sm","aria-expanded":p,onClick:m,className:"h-8 min-w-0 flex-1 justify-start gap-2 rounded-none px-3 font-medium text-ow-fs-ui text-[color:var(--ow-text-2)] hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",children:[jsx(ne,{"aria-hidden":"true","data-ow-part":"chevron",className:g("w-3.5 h-3.5 [transition:transform_var(--ow-dur-2)_var(--ow-ease-beacon)] motion-reduce:transition-none",p?"rotate-0":"-rotate-90")}),jsx("span",{children:a}),jsx("span",{"data-ow-part":"count",className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-fs-eyebrow text-[color:var(--ow-text-3)]",children:e.length}),u.warn>0&&jsxs("span",{"data-ow-part":"count-warn",title:`${Jc.warn} ${u.warn} \u6761`,className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-fs-eyebrow",style:{color:Xc.warn},children:[Qc.warn.trim(),u.warn]}),u.error>0&&jsxs("span",{"data-ow-part":"count-error",title:`${Jc.error} ${u.error} \u6761`,className:"font-[family-name:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-fs-eyebrow",style:{color:Xc.error},children:[Qc.error.trim(),u.error]})]}),n&&p&&jsx(f,{type:"button","data-ow-part":"clear",variant:"ghost",size:"sm",className:"h-7 w-7 shrink-0 p-0 [&_svg]:w-4 [&_svg]:h-4 text-[color:var(--ow-text-3)] hover:text-[color:var(--ow-text)]",title:"\u6E05\u7A7A\u63A7\u5236\u53F0","aria-label":"\u6E05\u7A7A\u63A7\u5236\u53F0",onClick:n,children:jsx(Le,{"aria-hidden":"true"})})]}),p&&jsx("div",{"data-ow-part":"log","data-theme":"dark",role:"log","aria-live":"polite","aria-label":a,className:"overflow-y-auto px-3 py-2 font-[family-name:var(--ow-font-mono)] text-ow-fs-code leading-[var(--ow-lh-code)] [font-variant-numeric:tabular-nums]",style:{background:"var(--ow-term-bg)",color:"var(--ow-term-text)",maxHeight:i},children:e.length===0?jsx("p",{"data-ow-part":"empty",className:"m-0",style:{color:"var(--ow-ansi-br-black)"},children:d}):e.map((b,w)=>jsxs("div",{"data-ow-part":"entry","data-ow-level":b.level,className:"flex gap-2 whitespace-pre-wrap break-words",style:{color:Xc[b.level]},children:[jsx("span",{"data-ow-part":"time",className:"shrink-0",style:{color:"var(--ow-ansi-br-black)"},children:b.timestamp.toLocaleTimeString("zh-CN",{hour12:false})}),jsx("span",{"data-ow-part":"glyph",className:"shrink-0","aria-label":Jc[b.level],children:Qc[b.level]}),jsx("span",{"data-ow-part":"message",className:"min-w-0 flex-1",children:b.message}),b.source&&jsx("span",{"data-ow-part":"source",className:"shrink-0",style:{color:"var(--ow-ansi-br-black)"},children:b.source})]},`${b.timestamp.getTime()}-${b.level}-${w}`))})]})}function MV({text:e,children:t,cursor:o=true,label:r="\u7EC8\u7AEF",className:n=""}){return jsxs("div",{"data-slot":"terminal-pane","data-theme":"dark",role:"log","aria-live":"polite","aria-label":r,className:g("min-h-0 flex-1 overflow-auto px-3.5 py-3","font-[family-name:var(--ow-font-mono)] text-ow-fs-code leading-[var(--ow-lh-code)]","whitespace-pre-wrap [word-break:break-word]",n),style:{background:"var(--ow-term-bg)",color:"var(--ow-term-text)"},children:[t??e,o&&jsx("span",{"data-ow-part":"cursor","aria-hidden":"true",className:"inline-block w-2 h-[15px] align-[-3px]",style:{background:"var(--ow-term-cursor)"}})]})}function EV({title:e,status:t,turns:o,label:r="\u5B50\u4EFB\u52A1",className:n=""}){return jsxs("div",{"data-slot":"sub-agent-pane","aria-label":r,className:g("flex min-h-0 flex-1 flex-col",n),children:[jsxs("div",{"data-ow-part":"header",className:"flex shrink-0 items-center gap-2 border-b border-[color:var(--ow-border)] px-3.5 py-2.5",children:[jsx("span",{"data-ow-part":"title",className:"min-w-0 flex-1 truncate text-ow-fs-ui font-medium text-[color:var(--ow-text)]",children:e}),t!=null&&jsxs("span",{"data-ow-part":"status",className:"flex shrink-0 items-center gap-1.5 font-[family-name:var(--ow-font-mono)] text-ow-fs-caption [font-variant-numeric:tabular-nums] text-[color:var(--ow-text-2)]",children:[jsx("span",{"data-ow-part":"status-dot","aria-hidden":"true",className:"w-1.5 h-1.5 shrink-0 rounded-full bg-[var(--ow-progress-fill)]"}),jsx("span",{children:t})]})]}),jsx("div",{"data-ow-part":"body",className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-3.5 py-4",children:o.map((a,i)=>jsxs("div",{"data-ow-part":"turn","data-role":a.role,className:"flex gap-3",children:[jsxs("div",{"data-ow-part":"rail",className:"relative w-3 shrink-0",children:[jsx("span",{"data-ow-part":"line","aria-hidden":"true",className:"absolute left-[5px] top-0 bottom-0 w-[1.5px] bg-[var(--ow-timeline)]"}),a.role==="user"?jsx("span",{"data-ow-part":"dot","aria-hidden":"true",className:"absolute left-px top-1.5 w-2 h-2 rounded-full border-[1.5px] border-[color:var(--ow-text-3)] bg-[var(--ow-turn-ground,var(--ow-surface))]"}):jsx("span",{"data-ow-part":"dot","aria-hidden":"true",className:"absolute left-[1.5px] top-[7px] w-[7px] h-[7px] rounded-full bg-[var(--ow-text)]"})]}),jsx("div",{"data-ow-part":"text",className:"min-w-0 flex-1 text-ow-fs-ui leading-[1.7] text-[color:var(--ow-text)] [text-wrap:pretty]",children:a.text})]},a.id??i))})]})}function o5({open:e,title:t,children:o,loading:r=false,onClose:n}){let[a,i]=useState(false),d=useId();useEffect(()=>{e||i(false);},[e]);let s=a?"\u8FD8\u539F\u7A97\u53E3":"\u653E\u5927\u7A97\u53E3";return jsx(Lm,{open:e,onClose:n,overlayClassName:"web-preview-dialog__overlay",className:`web-preview-dialog${a?" web-preview-dialog--maximized":""}`,children:jsxs("section",{role:"dialog","aria-modal":"true","aria-labelledby":d,className:"web-preview-dialog__surface",children:[jsxs("header",{className:"web-preview-dialog__header",children:[jsx("h2",{id:d,className:"web-preview-dialog__title",children:t}),jsxs("div",{className:"web-preview-dialog__actions",children:[jsx(f,{variant:"unstyled",type:"button",className:"web-preview-dialog__action",title:s,"aria-label":s,"aria-pressed":a,onClick:()=>i(l=>!l),children:jsx(qo,{})}),jsx(f,{variant:"unstyled",type:"button",className:"web-preview-dialog__action",title:"\u5173\u95ED\u9884\u89C8","aria-label":"\u5173\u95ED\u9884\u89C8",onClick:n,children:jsx(Q,{})})]})]}),jsxs("div",{className:"web-preview-dialog__content",children:[o,r&&jsxs("div",{className:"web-preview-dialog__loading",role:"status","aria-live":"polite",children:[jsx(gt,{size:18,className:"web-preview-dialog__loading-icon","aria-label":"\u52A0\u8F7D\u4E2D"}),jsx("span",{children:"\u52A0\u8F7D\u4E2D\u2026"})]})]})]})})}var zV=o5;var r5=jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:jsx("path",{d:"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6"})}),ks={textContent:"Desktop UI \u6536\u655B\u8BF4\u660E",color:"var(--ow-text)",backgroundColor:"var(--ow-bg)",opacity:"1",fontFamily:"PingFang SC",fontSize:"14",fontWeight:"400",borderRadius:"12",borderColor:"var(--ow-border-strong)",borderWidth:"1",width:"320",height:"120",padding:"16",margin:"0"};function GV({defaultExpanded:e=false,tagName:t="div",onCancel:o,onSubmit:r}){let[n,a$1]=useState(e),[i,d]=useState(""),s=l=>jsx("button",{type:"button","data-ow-part":"settings-btn",className:"__ow-popup__settings-btn","aria-label":l,onClick:()=>a$1(c=>!c),children:r5});return jsxs(Fragment,{children:[jsx("style",{children:b}),jsxs("div",{className:g("__ow-popup","is-preview",n&&"is-expanded"),"data-slot":"annotation-popup","data-ow-variant":"preview","data-ow-state":n?"expanded":"collapsed",children:[jsxs("div",{className:"__ow-popup__collapsed","data-ow-part":"collapsed-view",children:[s("\u5C55\u5F00\u6837\u5F0F\u7F16\u8F91"),jsx("input",{className:"__ow-popup__input","data-ow-part":"input",value:i,onChange:l=>d(l.target.value),placeholder:"\u6DFB\u52A0\u8BC4\u8BBA...","aria-label":"\u6DFB\u52A0\u8BC4\u8BBA"}),jsx("button",{type:"button","data-ow-part":"submit-btn",className:g("__ow-popup__submit-btn",i.trim()&&"has-text"),"data-ow-state":i.trim()?"has-text":void 0,onClick:()=>r?.(i.trim()),"aria-label":"\u63D0\u4EA4\u8BC4\u8BBA",children:jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":"true",children:[jsx("path",{d:"M12 19V5"}),jsx("path",{d:"M5 12l7-7 7 7"})]})})]}),jsxs("div",{className:"__ow-popup__expanded","data-ow-part":"expanded-view",children:[jsxs("div",{className:"__ow-popup__top","data-ow-part":"top",children:[s("\u6536\u8D77\u6837\u5F0F\u7F16\u8F91"),jsx("input",{className:"__ow-popup__input","data-ow-part":"input",value:i,onChange:l=>d(l.target.value),placeholder:"\u63CF\u8FF0\u8FD9\u4E9B\u66F4\u6539...","aria-label":"\u63CF\u8FF0\u66F4\u6539"})]}),jsxs("div",{className:"__ow-popup__tag","data-ow-part":"tag",children:[jsx("span",{className:"__ow-popup__tag-name","data-ow-part":"tag-name",children:t}),jsx("span",{className:"__ow-popup__tag-drag","data-ow-part":"tag-drag",children:"\u205E\u205E"})]}),jsx("div",{className:"__ow-popup__props","data-ow-part":"props",children:a.map(l=>jsxs("div",{className:"__ow-popup__prop","data-ow-part":"prop",children:[jsx("span",{className:"__ow-popup__prop-label","data-ow-part":"prop-label",children:l.label}),jsxs("div",{className:"__ow-popup__prop-value","data-ow-part":"prop-value",children:[l.type==="color"&&jsx("span",{className:"__ow-popup__color-swatch","data-ow-part":"color-swatch",style:{background:ks[l.key]},children:jsx("input",{type:"color",defaultValue:ks[l.key],"aria-label":l.label})}),l.type==="select"?jsx("select",{className:"__ow-popup__prop-select","data-ow-part":"prop-select",defaultValue:ks[l.key],"aria-label":l.label,children:(l.key==="fontFamily"?["PingFang SC","Arial","Helvetica","sans-serif","serif","monospace"]:l.options??[]).map(c=>jsx("option",{children:c},c))}):l.type==="spacing"?jsx("div",{className:"__ow-popup__spacing","data-ow-part":"spacing",children:["\u4E0A","\u53F3","\u4E0B","\u5DE6"].map(c=>jsx("input",{type:"number",defaultValue:ks[l.key],"aria-label":`${l.label}${c}`},c))}):jsx("input",{className:"__ow-popup__prop-input","data-ow-part":"prop-input",type:l.type==="number"?"number":"text",defaultValue:ks[l.key],step:l.step,min:l.min,max:l.max,"aria-label":l.label}),l.unit&&jsx("span",{className:"__ow-popup__prop-unit","data-ow-part":"prop-unit",children:l.unit})]})]},l.key))}),jsxs("div",{className:"__ow-popup__actions","data-ow-part":"actions",children:[jsx("button",{type:"button","data-ow-part":"cancel",className:"__ow-popup__cancel",onClick:o,children:"\u53D6\u6D88"}),jsxs("button",{type:"button","data-ow-part":"confirm",className:"__ow-popup__confirm",onClick:()=>r?.(i.trim()),children:[jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round","aria-hidden":"true",children:jsx("path",{d:"M20 6L9 17l-5-5"})}),"\u786E\u8BA4"]})]})]})]})]})}function tF({presets:e,initialPresetIndex:t=0,onApply:o,onDisable:r,onClose:n}){let[a,i]=useState(t),d=e[t]??e[0],[s,l]=useState(d?.width||375),[c,p]=useState(d?.height||812),[m,u]=useState(d?.scaleFactor||1),[b,w]=useState(false),v=useRef(null),h=e[a]??e[0];useEffect(()=>{d&&d.width>0&&o(d.width,d.height,d.scaleFactor);},[]);let x=useCallback(y=>{let P=e.findIndex(S=>S.label===y),N=e[P];N&&(i(P),w(false),N.width>0?(l(N.width),p(N.height),u(N.scaleFactor),o(N.width,N.height,N.scaleFactor)):(u(1),r()));},[o,r,e]),k=useMemo(()=>e.map(y=>({key:y.label,label:y.label,hint:y.width>0?`${y.width}\xD7${y.height}`:void 0,selected:y.label===h?.label})),[h?.label,e]);return jsxs("div",{className:"browser-device-toolbar",children:[jsx("span",{className:"browser-device-toolbar__label",children:"\u5C3A\u5BF8:"}),jsxs("div",{ref:v,className:"browser-device-toolbar__preset-wrap",children:[jsxs(f,{variant:"unstyled",className:"browser-device-toolbar__preset-btn",onClick:()=>w(y=>!y),children:[jsx("span",{children:h?.label??"\u54CD\u5E94\u5F0F"}),jsx(ne,{width:12,height:12})]}),b&&jsx(pt,{items:k,onSelect:x,width:240,portal:v})]}),jsx(Sr,{unstyled:true,className:"browser-device-toolbar__dim-input",type:"number",value:s||"",min:200,max:3840,"aria-label":"\u5BBD\u5EA6",onChange:y=>{let P=Number.parseInt(y.target.value,10)||0;l(P),P>0&&c>0&&(i(0),u(1),o(P,c,1));}}),jsx("span",{className:"browser-device-toolbar__dim-sep",children:"\xD7"}),jsx(Sr,{unstyled:true,className:"browser-device-toolbar__dim-input",type:"number",value:c||"",min:200,max:3840,"aria-label":"\u9AD8\u5EA6",onChange:y=>{let P=Number.parseInt(y.target.value,10)||0;p(P),s>0&&P>0&&(i(0),u(1),o(s,P,1));}}),jsx("span",{className:"browser-device-toolbar__zoom",children:`${Math.round(m*100)}%`}),jsx(f,{variant:"unstyled",className:"browser-device-toolbar__close",onClick:()=>{r(),n();},title:"\u5173\u95ED\u8BBE\u5907\u5DE5\u5177\u680F","aria-label":"\u5173\u95ED\u8BBE\u5907\u5DE5\u5177\u680F",children:jsx(Q,{width:14,height:14})})]})}function dF({onFind:e,onClear:t,onClose:o}){let[r,n]=useState(""),a=useRef(null),{isImeEnter:i,onCompositionEnd:d,onCompositionStart:s}=Dt();useEffect(()=>{a.current?.focus();},[]);let l=useCallback((p,m)=>{r?e(r,p,m):t();},[t,e,r]),c=useCallback(()=>{t(),o();},[t,o]);return jsxs("div",{className:"browser-findbar",children:[jsx(Sr,{unstyled:true,ref:a,className:"browser-findbar__input",type:"text",value:r,onChange:p=>{let m=p.target.value;n(m),m?e(m,true,false):t();},onCompositionStart:s,onCompositionEnd:d,onKeyDown:p=>{p.stopPropagation(),!i(p)&&(p.key==="Enter"?(p.preventDefault(),l(!p.shiftKey,true)):p.key==="Escape"&&(p.preventDefault(),c()));},placeholder:"\u67E5\u627E...","aria-label":"\u5728\u9875\u9762\u4E2D\u67E5\u627E"}),jsx(f,{variant:"unstyled",type:"button",className:"browser-findbar__btn",onClick:()=>l(false,true),disabled:!r,title:"\u4E0A\u4E00\u4E2A","aria-label":"\u4E0A\u4E00\u4E2A\u5339\u914D",children:jsx(Ci,{width:14,height:14})}),jsx(f,{variant:"unstyled",type:"button",className:"browser-findbar__btn",onClick:()=>l(true,true),disabled:!r,title:"\u4E0B\u4E00\u4E2A","aria-label":"\u4E0B\u4E00\u4E2A\u5339\u914D",children:jsx(ne,{width:14,height:14})}),jsx(f,{variant:"unstyled",type:"button",className:"browser-findbar__btn",onClick:c,title:"\u5173\u95ED\u67E5\u627E","aria-label":"\u5173\u95ED\u67E5\u627E\u680F",children:jsx(Q,{width:14,height:14})})]})}function vF({profiles:e,loading:t=false,onClose:o,onImport:r}){let[n,a]=useState(0),[i,d]=useState(false),[s,l]=useState(true),[c,p]=useState(true),[m,u]=useState(false),b=e[n]??e[0],w=useCallback(async()=>{if(b){u(true);try{await r(b,{passwords:s,cookies:c}),o();}catch{}finally{u(false);}}},[c,s,o,r,b]);return jsxs(oe,{open:true,title:"\u4ECE\u6D4F\u89C8\u5668\u5BFC\u5165",subtitle:"\u9009\u62E9\u8981\u5BFC\u5165\u5230\u5185\u7F6E\u6D4F\u89C8\u5668\u7684\u6570\u636E",onClose:o,closable:true,width:420,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",size:"md",onClick:o,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",size:"md",onClick:()=>{w();},disabled:t||m||!b||!s&&!c,children:t?"\u6B63\u5728\u68C0\u6D4B...":m?"\u5BFC\u5165\u4E2D...":"\u5BFC\u5165"})]}),children:[jsxs("div",{className:"browser-import-dialog__source",children:[jsx("span",{className:"browser-import-dialog__source-label",children:"\u4ECE"}),jsxs("div",{className:"browser-import-dialog__source-select",children:[jsxs(f,{variant:"unstyled",className:"browser-import-dialog__source-btn",onClick:()=>d(v=>!v),disabled:!b,children:[jsx(Jg,{profile:b}),jsx("span",{children:b?`${b.browser} ${b.profile}`:"\u672A\u68C0\u6D4B\u5230\u6D4F\u89C8\u5668"}),jsx(ne,{width:14,height:14})]}),i&&jsx("div",{className:"browser-import-dialog__source-dropdown",children:e.map((v,h)=>jsxs(f,{variant:"unstyled",className:`browser-import-dialog__source-option${h===n?" is-active":""}`,onClick:()=>{a(h),d(false);},children:[jsx(Jg,{profile:v}),jsxs("span",{children:[v.browser," ",v.profile]})]},`${v.browser}:${v.profileFolder}`))})]})]}),b&&jsxs("p",{className:"browser-import-dialog__warning",children:["\u5BFC\u5165\u524D\uFF0C\u8BF7\u5B8C\u5168\u5173\u95ED ",b.browser]}),jsxs("div",{className:"browser-import-dialog__options",children:[jsxs("div",{className:"browser-import-dialog__option",children:[jsx("div",{className:"browser-import-dialog__option-icon",children:jsx(gr,{width:20,height:20})}),jsx("span",{className:"browser-import-dialog__option-label",children:"\u5BC6\u7801"}),jsx(po,{checked:s,onChange:l})]}),jsxs("div",{className:"browser-import-dialog__option",children:[jsx("div",{className:"browser-import-dialog__option-icon",children:jsx(Mt,{width:20,height:20})}),jsx("span",{className:"browser-import-dialog__option-label",children:"Cookie"}),jsx(po,{checked:c,onChange:p})]})]})]})}function Jg({profile:e}){return e?.browserIcon?jsx("span",{"aria-hidden":"true",className:"browser-import-dialog__source-glyph",children:e.browserIcon}):jsx(Mt,{width:18,height:18,"aria-hidden":"true"})}function xF({url:e,errorDescription:t,onReload:o}){return jsx("div",{className:"browser-load-error",children:jsxs(J,{className:"browser-load-error__content",variant:"error",title:"\u8FD9\u4E2A\u9875\u9762\u6CA1\u52A0\u8F7D\u51FA\u6765",detail:t,action:jsx(f,{type:"button",variant:"secondary",size:"sm",onClick:o,children:"\u91CD\u65B0\u52A0\u8F7D"}),children:["\u8BF7\u68C0\u67E5\u5730\u5740\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u5BF9\u5E94\u670D\u52A1\u5DF2\u542F\u52A8\u540E\u91CD\u8BD5\u3002",e&&jsx("span",{className:"browser-load-error__url",children:e})]})})}function RF(e){let[t,o]=useState(false),[r,n]=useState(0),[a,i]=useState(false),[d,s]=useState(true),[l,c]=useState(true),[p,m]=useState(false),[u,b]=useState(false),w=useRef(null),v=useCallback(()=>{o(false),i(false);},[]),h=useCallback(()=>{o(N=>(N||n(e.getZoomLevel()),!N)),i(false);},[e]),x=useCallback(N=>{n(N),e.onZoomChange(N);},[e]),k=[{key:"find",label:"\u5728\u9875\u9762\u4E2D\u67E5\u627E",icon:jsx($t,{width:16,height:16})},{key:"---",label:""},{key:"device",label:"\u663E\u793A\u8BBE\u5907\u5DE5\u5177\u680F",icon:jsx(w5,{})},{key:"screenshot",label:"\u622A\u53D6\u5C4F\u5E55\u622A\u56FE",icon:jsx(Pd,{width:16,height:16})},{key:"---",label:""},{key:"import",label:"\u5BFC\u5165 Cookie \u548C\u5BC6\u7801...",icon:jsx(Co,{width:16,height:16})},{key:"clear-data",label:"\u6E05\u9664\u6D4F\u89C8\u6570\u636E",icon:jsx(Le,{width:16,height:16})}],y=useCallback(N=>{if(N==="clear-data"){i(true);return}v(),N==="find"?e.onOpenFind():N==="device"?e.onOpenDeviceToolbar():N==="screenshot"?e.onScreenshot():N==="import"&&e.onOpenImport();},[v,e]),P=jsxs("div",{className:"browser-more-menu__zoom",children:[jsx("span",{className:"browser-more-menu__zoom-label",children:"\u7F29\u653E"}),jsxs("div",{className:"browser-more-menu__zoom-controls",children:[jsx(f,{variant:"unstyled",className:"browser-more-menu__zoom-btn",onClick:()=>x(r-1),"aria-label":"\u7F29\u5C0F",children:"\u2212"}),jsxs(f,{variant:"unstyled",className:"browser-more-menu__zoom-value",onClick:()=>x(0),title:"\u91CD\u7F6E\u7F29\u653E",children:[Math.round(Math.pow(1.2,r)*100),"%"]}),jsx(f,{variant:"unstyled",className:"browser-more-menu__zoom-btn",onClick:()=>x(r+1),"aria-label":"\u653E\u5927",children:"\uFF0B"}),jsx(f,{variant:"unstyled",className:"browser-more-menu__zoom-btn",onClick:()=>x(0),"aria-label":"\u91CD\u7F6E\u7F29\u653E",title:"\u91CD\u7F6E",children:jsx(Ue,{width:14,height:14})})]})]});return jsxs("div",{ref:w,className:"browser-more-menu",children:[jsx(f,{variant:"unstyled",type:"button",className:`browser-navbar__btn${t?" is-active":""}`,onClick:h,title:"\u66F4\u591A","aria-label":"\u66F4\u591A","aria-expanded":t,children:jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[jsx("circle",{cx:"8",cy:"3",r:"1.3"}),jsx("circle",{cx:"8",cy:"8",r:"1.3"}),jsx("circle",{cx:"8",cy:"13",r:"1.3"})]})}),t&&(a?jsx(pt,{role:"none",width:240,portal:w,align:"end",contentKey:"clear-data",onClose:v,footer:jsx(f,{variant:"unstyled",className:"browser-more-menu__clear-btn",disabled:u,onClick:()=>{b(true),e.onClearBrowsingData({cookies:d,cache:l,localStorage:p}).then(v).finally(()=>b(false));},children:u?"\u6E05\u9664\u4E2D\u2026":"\u6E05\u9664\u6570\u636E"}),children:jsx(b5,{cookies:d,cache:l,localStorage:p,setCookies:s,setCache:c,setLocalStorage:m,onBack:()=>i(false)})}):jsx(pt,{items:k,onSelect:y,footer:P,width:240,portal:w,align:"end",onClose:v}))]})}function b5({cookies:e,cache:t,localStorage:o,setCookies:r,setCache:n,setLocalStorage:a,onBack:i}){return jsxs("div",{className:"browser-more-menu__clear-panel",children:[jsxs(f,{variant:"unstyled",className:"browser-more-menu__back",onClick:i,children:[jsx(Kt,{width:14,height:14}),jsx("span",{children:"\u6E05\u9664\u6D4F\u89C8\u6570\u636E"})]}),jsx("div",{className:"browser-more-menu__divider",role:"separator"}),jsxs("label",{className:"browser-more-menu__check",children:[jsx(To,{checked:e,onChange:()=>r(!e)}),jsx("span",{children:"Cookie \u53CA\u7AD9\u70B9\u6570\u636E"})]}),jsxs("label",{className:"browser-more-menu__check",children:[jsx(To,{checked:t,onChange:()=>n(!t)}),jsx("span",{children:"\u7F13\u5B58\u7684\u56FE\u7247\u548C\u6587\u4EF6"})]}),jsxs("label",{className:"browser-more-menu__check",children:[jsx(To,{checked:o,onChange:()=>a(!o)}),jsx("span",{children:"\u672C\u5730\u5B58\u50A8\u6570\u636E"})]})]})}function w5(){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[jsx("rect",{x:"1",y:"3",width:"9",height:"7",rx:"1"}),jsx("rect",{x:"6",y:"6",width:"9",height:"7",rx:"1"})]})}function AF({currentUrl:e,canGoBack:t,canGoForward:o,isLoading:r,commentMode:n,moreMenu:a,onGoBack:i,onGoForward:d,onReload:s,onStop:l,onNavigate:c,onToggleCommentMode:p}){let[m,u]=useState(e),[b,w]=useState(false),{isImeEnter:v,onCompositionEnd:h,onCompositionStart:x}=Dt();useEffect(()=>{b||u(e);},[e,b]);let k=useCallback(()=>{let y=m.trim();y&&(/^[a-z][a-z0-9+.-]*:/i.test(y)||(y=`https://${y}`),c(y),w(false));},[c,m]);return jsxs("div",{className:"browser-navbar",children:[jsxs("div",{className:"browser-navbar__controls",children:[jsx(f,{variant:"unstyled",className:"browser-navbar__btn",disabled:!t,onClick:i,title:"\u540E\u9000","aria-label":"\u540E\u9000",children:jsx(Kt,{width:16,height:16})}),jsx(f,{variant:"unstyled",className:"browser-navbar__btn",disabled:!o,onClick:d,title:"\u524D\u8FDB","aria-label":"\u524D\u8FDB",children:jsx(he,{width:16,height:16})}),jsx(f,{variant:"unstyled",className:"browser-navbar__btn",onClick:r?l:s,title:r?"\u505C\u6B62":"\u5237\u65B0","aria-label":r?"\u505C\u6B62":"\u5237\u65B0",children:r?jsx(Ba,{width:16,height:16}):jsx(Ue,{width:16,height:16})})]}),jsx("div",{className:"browser-navbar__url-bar",children:jsx(Sr,{unstyled:true,className:"browser-navbar__url-input",value:b?m:e,onChange:y=>{w(true),u(y.target.value);},onFocus:y=>{let P=y.currentTarget;w(true),u(e),window.requestAnimationFrame(()=>P.select());},onBlur:()=>w(false),onCompositionStart:x,onCompositionEnd:h,onKeyDownCapture:y=>{y.stopPropagation(),!v(y)&&(y.key==="Enter"&&(y.preventDefault(),k()),y.key==="Escape"&&(y.preventDefault(),w(false),u(e)));},placeholder:"\u8F93\u5165\u7F51\u5740...","aria-label":"\u5730\u5740\u680F"})}),jsxs(f,{variant:"unstyled",className:`browser-navbar__btn${n?" browser-navbar__comment-active":""}`,onClick:p,title:n?"\u9000\u51FA\u6279\u6CE8\u6A21\u5F0F (Esc)":"\u6279\u6CE8\u9875\u9762","aria-label":n?"\u9000\u51FA\u6279\u6CE8\u6A21\u5F0F":"\u6279\u6CE8\u9875\u9762","aria-pressed":n,children:[jsx(Li,{width:16,height:16}),n&&jsx("span",{className:"browser-navbar__comment-label",children:"\u6B63\u5728\u6CE8\u91CA"})]}),a]})}var ov=createContext(null),S5=()=>{let e=useContext(ov);if(!e)throw new Error("WebPreview components must be used within a WebPreview");return e};function HF({className:e="",children:t,defaultUrl:o="",onUrlChange:r,...n}){let[a,i]=useState(o),[d,s]=useState(false),l=useCallback(p=>{i(p),r?.(p);},[r]),c=useMemo(()=>({consoleOpen:d,setConsoleOpen:s,setUrl:l,url:a}),[d,l,a]);return jsx(ov.Provider,{value:c,children:jsx("div",{"data-slot":"web-preview",className:g("flex flex-col w-full h-full [border-radius:var(--ow-radius-card)] border border-ow-border-strong bg-ow-bg overflow-hidden",e),...n,children:t})})}function WF({className:e="",loading:t,src:o,...r}){let{url:n}=S5();return jsxs("div",{"data-ow-part":"body",className:"flex-1 min-h-0 relative",children:[jsx("iframe",{"data-ow-part":"iframe",className:g("w-full h-full border-0 block",e),sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-presentation",src:(o??n)||void 0,title:"Preview",...r}),t]})}function d$({children:e,className:t=""}){return jsx("div",{className:`ow-agent-loop-segment ${t}`,"data-slot":"agent-loop-segment",style:R5,children:e})}var R5={display:"flex",flexDirection:"column",gap:10};var D5=()=>{},Il=createContext({on:false,report:D5});function av(){return useContext(Il).on}function nv(e){let{on:t,report:o}=useContext(Il),r=useId(),{spinning:n,toolRunning:a}=e;useEffect(()=>{if(t)return o(r,{spinning:n,toolRunning:a}),()=>o(r,null)},[t,o,r,n,a]);}var B5=["absolute left-[1.5px] top-[8px] w-[7px] h-[7px] shrink-0","[border-radius:var(--ow-radius-pill)] bg-[var(--ow-text)]"].join(" "),O5="absolute left-0 top-[3px] shrink-0";function Al({children:e,name:t="Orbitwork",meta:o,byline:r=false,node:n=true,anchor:a,execution:i,thinking:d,error:s,actions:l,disclaimer:c,trailing:p,streaming:m,selectable:u=false,checked:b=false,onToggle:w,selectLabel:v="\u9009\u5165\u5206\u4EAB",beacon:h=true,className:x=""}){let k=n&&!!h,y=typeof h=="object"?h:{},P=y.size??28,[N,S]=useState({}),R=useCallback((F,E)=>{S(O=>{if(E===null){if(!(F in O))return O;let{[F]:z,...pe}=O;return pe}let ae=O[F];return ae&&ae.spinning===E.spinning&&ae.toolRunning===E.toolRunning?O:{...O,[F]:E}});},[]),M=Object.values(N),T=y.spinning??M.some(F=>F.spinning),_=y.toolRunning??M.some(F=>F.toolRunning),L=useMemo(()=>({on:k,report:R}),[k,R]),I=(u?33.5:1.5)+3.5,$=8+3.5;return jsx(Il.Provider,{value:L,children:jsxs("div",{"data-slot":"agent-turn","data-ow-part":"turn","data-role":"agent","data-chat-anchor":a,"data-selectable":u?"on":void 0,className:g("group/turn relative flex flex-col items-start gap-2",n&&"pl-[26px]",u&&"pl-[58px]",x),children:[u&&jsx(To,{className:O5,checked:b,onChange:w,"aria-label":v}),n&&k&&jsx("span",{"data-ow-part":"node-beacon","aria-hidden":"true",className:"absolute pointer-events-none",style:{left:I-P/2,top:$-P/2,width:P,height:P},children:jsx(gt,{size:P,spinning:T,trail:T?"var(--ow-text)":"var(--ow-text-3)",satellite:_?"var(--ow-text-2)":void 0,"aria-label":T?"\u6B63\u5728\u601D\u8003":"\u5DF2\u601D\u8003"})}),n&&jsx("span",{"data-ow-part":"dot","aria-hidden":"true",className:g(B5,u&&"left-[33.5px]")}),r&&jsxs("div",{"data-ow-part":"byline",className:"flex w-full min-w-0 items-baseline gap-2",children:[jsx("span",{"data-ow-part":"name",className:"text-ow-fs-ui font-medium text-[color:var(--ow-text)]",children:t}),o!=null&&jsx("span",{"data-ow-part":"byline-meta",className:"font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-fs-mark-md text-[color:var(--ow-text-2)]",children:o})]}),i,d,e!=null&&jsxs("div",{"data-ow-part":"body",className:"w-full min-w-0 text-ow-fs-ui leading-[1.7] text-[color:var(--ow-text)] [overflow-wrap:anywhere]",children:[e,m&&jsx("span",{"data-ow-part":"caret","aria-hidden":"true",className:g("ml-[7px] inline-block h-[7px] w-[7px] align-[0.08em]","[border-radius:var(--ow-radius-pill)] bg-[var(--ow-text-3)]","motion-safe:animate-[ow-skeleton_var(--ow-dur-spin)_var(--ow-ease-beacon)_infinite]")})]}),s&&jsx("div",{"data-ow-part":"error",className:"text-ow-fs-ui leading-[1.6] text-[color:var(--ow-error)]",children:s}),l,c&&jsx("div",{"data-ow-part":"disclaimer",className:"text-ow-fs-mark-md leading-[1.5] text-[color:var(--ow-text-3)]",children:c}),p]})})}function C$({source:e,scope:t,onAllowOnce:o,onDeny:r,className:n=""}){return jsxs("div",{className:`ow-authorization-card ${n}`,"data-slot":"authorization-card",style:V5,children:[jsxs("div",{style:F5,children:[jsx(gr,{width:16,height:16,"aria-hidden":"true",style:$5}),jsxs("span",{style:z5,children:[e," \u8BF7\u6C42\u6388\u6743"]})]}),jsx("div",{style:H5,children:t}),jsxs("div",{style:W5,children:[jsx(f,{variant:"primary",size:"sm",onClick:o,children:"\u5141\u8BB8\u4E00\u6B21"}),jsx(f,{variant:"ghost",size:"sm",onClick:r,className:"border border-[color:var(--ow-border-strong)] text-[color:var(--ow-error-on-tint)]",children:"\u62D2\u7EDD"})]})]})}var V5={display:"flex",flexDirection:"column",gap:10,padding:14,border:"1px solid var(--ow-warning-tint-border)",borderRadius:"var(--ow-radius-lg)",background:"var(--ow-warning-tint)",fontFamily:"var(--ow-font-body)"},F5={display:"flex",alignItems:"center",gap:8},$5={flex:"0 0 auto",color:"var(--ow-warning-on-tint)"},z5={fontSize:"var(--ow-fs-ui)",fontWeight:500,color:"var(--ow-warning-on-tint)"},H5={fontSize:"var(--ow-fs-ui)",lineHeight:1.6,color:"var(--ow-text)",textWrap:"pretty"},W5={display:"flex",alignItems:"center",gap:8};var iv=e=>({inert:e?"true":void 0}),U5={base:"var(--ow-bg)",surface:"var(--ow-surface)"};function Vl({header:e,children:t,empty:o,sender:r,pickBar:n,spine:a=true,surface:i="surface",gap:d=20,maxWidth:s=752,selectable:l=false,mode:c="compose",className:p=""}){let m=t!=null&&t!==false,u=c==="share";return jsxs("section",{"data-slot":"transcript","data-surface":i,className:g("mx-auto flex w-full flex-col","font-[family-name:var(--ow-font-sans)] text-[color:var(--ow-text)]",i==="surface"?"bg-[var(--ow-surface)]":"bg-[var(--ow-bg)]",p),style:{maxWidth:s,"--ow-turn-ground":U5[i]},children:[e&&jsx("header",{"data-ow-part":"header",className:"flex min-h-[var(--ow-titlebar-h)] flex-shrink-0 items-center border-b border-[color:var(--ow-border)]",children:e}),jsx("div",{"data-ow-part":"stream",className:g("-mx-4 flex min-h-0 flex-1 flex-col overflow-y-auto px-4 py-5",m?"justify-start":"justify-center"),children:m?jsx("div",{"data-ow-part":"turns","data-spine":a?"on":void 0,"data-selecting":l?"on":void 0,className:"ow-transcript-turns relative flex flex-col",style:{gap:d,"--ow-turn-gap":`${d}px`},children:t}):o}),(r||n)&&jsxs("footer",{"data-ow-part":"sender","data-mode":c,className:"flex-shrink-0 pb-1 pt-2",children:[n&&jsx("div",{"data-ow-part":"pick-bar","data-ow-state":u?"shown":"hidden",className:"ow-transcript-swap",...iv(!u),"aria-hidden":u?void 0:true,children:jsx("div",{"data-ow-part":"swap-inner",children:n})}),r&&jsx("div",{"data-ow-part":"composer","data-ow-state":u?"hidden":"shown",className:"ow-transcript-swap",...iv(u),"aria-hidden":u?true:void 0,children:jsx("div",{"data-ow-part":"swap-inner",children:r})})]})]})}function _$({header:e,children:t,empty:o,sender:r,className:n="",maxWidth:a=720}){return jsx(Vl,{header:e,empty:o,sender:r,maxWidth:a,className:n,children:t})}var j5=["absolute left-[1px] top-[7px] w-[8px] h-[8px] shrink-0","[border-radius:var(--ow-radius-pill)] border-[1.5px] border-[color:var(--ow-text-3)]","bg-[color:var(--ow-turn-ground,var(--ow-surface))]"].join(" "),G5="absolute left-0 top-[3px] shrink-0";function Fl({text:e,children:t,node:o=true,anchor:r,leading:n,attachments:a,contexts:i,actions:d,trailing:s,error:l,streaming:c,time:p,selectable:m=false,checked:u=false,onToggle:b,selectLabel:w="\u9009\u5165\u5206\u4EAB",className:v=""}){let h=t??(e||null);return jsxs("div",{"data-slot":"user-turn","data-ow-part":"turn","data-role":"user","data-chat-anchor":r,"data-selectable":m?"on":void 0,className:g("group/turn relative flex flex-col items-start gap-2",o&&"pl-[26px]",m&&"pl-[58px]",v),children:[m&&jsx(To,{className:G5,checked:u,onChange:b,"aria-label":w}),o&&jsx("span",{"data-ow-part":"dot","aria-hidden":"true",className:g(j5,m&&"left-[33px]")}),n,a,i,h!=null&&jsxs("div",{"data-ow-part":"quote-row",className:"flex w-full min-w-0 items-end gap-2",children:[l&&jsx("span",{"data-ow-part":"error-mark",title:typeof l=="string"?l:void 0,className:g("self-start mt-[3px] inline-flex h-[17px] w-[17px] shrink-0 items-center justify-center","[border-radius:var(--ow-radius-pill)] bg-[var(--ow-error)] text-[color:var(--ow-on-fill)]","[&_svg]:w-3 [&_svg]:h-3"),children:jsx(Vd,{"aria-hidden":"true"})}),jsxs("div",{"data-ow-part":"quote",className:g("min-w-0 shrink max-w-[78%] whitespace-pre-wrap [overflow-wrap:anywhere] [text-wrap:pretty]","text-ow-fs-ui leading-[1.7] text-[color:var(--ow-text)]"),children:[h,c&&jsx("span",{"data-ow-part":"caret","aria-hidden":"true",className:g("ml-[7px] inline-block h-[7px] w-[7px] align-[0.08em]","[border-radius:var(--ow-radius-pill)] bg-[var(--ow-text-3)]","motion-safe:animate-[ow-skeleton_var(--ow-dur-spin)_var(--ow-ease-beacon)_infinite]")})]}),p!=null&&jsx("span",{"data-ow-part":"time",className:g("shrink-0 pb-[4px] leading-none font-[family-name:var(--ow-font-mono)] tabular-nums","text-ow-fs-caption text-[color:var(--ow-text-3)]"),children:p})]}),l&&jsx("p",{"data-ow-part":"error",className:"text-ow-fs-mark-md leading-[1.5] text-[color:var(--ow-error)]",children:l}),d,s]})}function F$({children:e,className:t=""}){return jsx(Fl,{node:false,className:t,children:e})}function W$({children:e,disclaimer:t,className:o=""}){return jsx(Al,{node:false,byline:false,disclaimer:t,className:o,children:e})}function dv({variant:e="block",size:t=48,spinning:o=true,label:r,toolRunning:n=false,children:a,beacon:i,defaultExpanded:d=false,expanded:s,onExpandedChange:l,className:c=""}){let[p,m]=useState(d),u=useId(),b=av(),w=i??!b,v=e==="inline"||b;if(nv({spinning:v&&o,toolRunning:v&&n}),v){let h=a!=null,x=h&&(s??p),k=()=>{if(!h)return;let N=!x;s===void 0&&m(N),l?.(N);},P=jsxs(Fragment,{children:[w&&jsx(gt,{size:sp,spinning:o,trail:o?"var(--ow-text)":"var(--ow-text-3)",satellite:n?"var(--ow-text-2)":"var(--ow-beacon)","aria-label":o?"\u6B63\u5728\u601D\u8003":"\u5DF2\u601D\u8003",style:eC}),r&&jsx("span",{style:tC,children:r}),h&&jsx("span",{"aria-hidden":"true","data-ow-part":"chevron",style:oC,children:x?jsx(ne,{}):jsx(he,{})})]});return jsxs("div",{className:`ow-thinking ow-thinking--inline ow-motion ${c}`,"data-slot":"thinking","data-ow-state":[o?"spinning":"still",x?"expanded":null,w?null:"no-beacon"].filter(Boolean).join(" "),style:Q5,children:[h?jsx("button",{type:"button",className:"ow-focus-ring","data-ow-part":"trigger",style:{...lv,...J5},onClick:k,"aria-expanded":x,"aria-controls":x?u:void 0,children:P}):jsx("div",{"data-ow-part":"row",style:lv,children:P}),x&&jsx("div",{id:u,"data-ow-part":"content",style:w?aC:rC,children:a})]})}return jsxs("div",{className:`ow-thinking ow-motion ${c}`,style:{display:"inline-flex",alignItems:"center",gap:12},children:[jsx(gt,{size:t,spinning:o,trail:o?"var(--ow-text)":"var(--ow-text-3)",satellite:"var(--ow-beacon)","aria-label":o?"\u6B63\u5728\u601D\u8003":"\u5DF2\u601D\u8003"}),r&&jsx("span",{style:{font:"400 var(--ow-fs-caption, 12px)/1.5 var(--ow-font-sans)",color:"var(--ow-text-2)"},children:r})]})}var sp=28,cv=10,Q5={display:"flex",flexDirection:"column",alignItems:"stretch",gap:0},lv={display:"flex",alignItems:"center",gap:cv,minWidth:0},J5={width:"100%",padding:0,border:0,background:"transparent",color:"inherit",font:"inherit",textAlign:"left",cursor:"pointer",borderRadius:"var(--ow-radius-2xs)"},eC={flex:"0 0 auto",display:"block"},tC={flex:"0 1 auto",minWidth:0,fontSize:"var(--ow-fs-ui)",lineHeight:1.6,color:"var(--ow-text-2)",textWrap:"pretty"},oC={flex:"0 0 auto",width:14,height:14,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--ow-text-3)"},rC={marginLeft:0,marginTop:4,padding:"2px 0 6px 12px",borderLeft:"1px solid var(--ow-border-strong)",fontSize:"var(--ow-fs-ui)",lineHeight:1.7,color:"var(--ow-text-3)",overflowWrap:"anywhere"},aC={marginLeft:sp/2-1,marginTop:4,padding:`2px 0 6px ${sp/2+cv+1}px`,borderLeft:"1px solid var(--ow-border-strong)",fontSize:"var(--ow-fs-ui)",lineHeight:1.7,color:"var(--ow-text-3)",overflowWrap:"anywhere"};function uv({title:e="\u601D\u8003\u8FC7\u7A0B",children:t,loading:o=false,defaultExpanded:r=false,loadingLabel:n,expanded:a,onExpandedChange:i,className:d=""}){let l=typeof e=="string"&&["\u601D\u8003\u8FC7\u7A0B","\u601D\u8003\u4E2D","\u6B63\u5728\u601D\u8003","\u6B63\u5728\u751F\u6210","\u6B63\u5728\u751F\u6210\u2026","\u6B63\u5728\u751F\u6210..."].includes(e)?o?"\u6B63\u5728\u601D\u8003":"\u5DF2\u601D\u8003":o?n??e:e;return jsx("div",{"data-slot":"chat-thinking",className:d,children:jsx(dv,{variant:"inline",spinning:o,label:typeof l=="string"?l:void 0,defaultExpanded:r,expanded:a,onExpandedChange:i,children:t})})}function mv({analyserRef:e,levels:t,className:o="","aria-label":r="\u8BED\u97F3\u8F93\u5165\u9891\u8C31"}){let n=useRef(null);return useEffect(()=>{let a=n.current,i=a?.getContext("2d");if(!a||!i)return;let d=window.devicePixelRatio||1,s=new Uint8Array(512),l=t?[...t]:[],c=0,p=0,m=()=>{let v=a.getBoundingClientRect();a.width=Math.max(1,Math.round(v.width*d)),a.height=Math.max(1,Math.round(v.height*d));};m();let u=typeof ResizeObserver>"u"?void 0:new ResizeObserver(m);u?.observe(a);let b=()=>{let v=e?.current;if(!v)return 0;v.getByteTimeDomainData(s);let h=0;for(let k of s){let y=(k-128)/128;h+=y*y;}let x=Math.sqrt(h/s.length);return x<.015?0:Math.min(1,(x-.015)/.18)**.7},w=()=>{c=requestAnimationFrame(w),p+=1,!t&&p%8===0&&l.push(b());let{width:v,height:h}=a;i.clearRect(0,0,v,h);let x=getComputedStyle(a),k=x.getPropertyValue("--ow-composer-spectrum-fill").trim()||x.color,y=3*d,P=3.5*d,N=y+P,S=Math.max(8,Math.floor((v+P)/N));for(;l.length<S;)l.unshift(0);for(;l.length>S;)l.shift();i.fillStyle=k;let R=h/2;for(let M=0;M<l.length;M+=1){let T=Math.max(0,Math.min(1,l[M]??0)),_=v-(l.length-M)*N;if(_+y<0)continue;let L=T<=0?2*d:Math.max(4*d,T*h);i.beginPath(),i.roundRect(_,R-L/2,y,L,Math.min(y,L)/2),i.fill();}};return w(),()=>{cancelAnimationFrame(c),u?.disconnect();}},[e,t]),jsx("canvas",{ref:n,"data-slot":"composer-audio-spectrum",className:g(o),role:"img","aria-label":r})}function cz({value:e,options:t,open:o,defaultOpen:r=false,onOpenChange:n,onChange:a,title:i="\u6388\u6743\u6A21\u5F0F",menuHeader:d="\u6388\u6743\u6A21\u5F0F",icon:s,disabled:l=false,className:c=""}){let[p,m]=useState(r),u=o??p,b=t.find(v=>v.value===e),w=useCallback(v=>{o===void 0&&m(v),n?.(v);},[n,o]);return jsx("div",{"data-slot":"composer-authorization",className:g("relative inline-flex flex-[0_0_auto] items-center overflow-visible",c),children:jsx(co,{open:u,onOpenChange:w,width:280,header:d,ariaLabel:i,items:t.map(v=>({key:v.value,label:v.label,description:v.description,icon:v.icon,disabled:v.disabled,selected:v.value===e})),onSelect:v=>a?.(v),trigger:jsxs(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"trigger","data-ow-state":u?"open":void 0,className:"max-w-full font-normal data-[ow-state=open]:text-[color:var(--ow-text)] hover:text-[color:var(--ow-text)]",title:i,disabled:l,children:[jsx("span",{"data-ow-part":"icon",className:"inline-flex items-center justify-center",children:s??b?.icon??jsx(gr,{})}),jsx("span",{"data-ow-part":"label",className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:b?.label??e}),jsx(ne,{className:"w-3 h-3 text-current"})]})})})}var uC={skill:jsx(br,{}),command:jsx(So,{}),"agent-command":jsx(So,{}),mcp:jsx(vn,{}),connector:jsx(vn,{}),agent:jsx(Ia,{}),file:jsx(oo,{}),folder:jsx(qe,{})};function mC(e){return uC[e.toLowerCase()]??jsx(Ni,{})}function gz({mentions:e,onRemove:t}){return e.length===0?null:jsx("div",{"data-slot":"composer-mentions",className:"flex flex-wrap gap-2 py-2",children:e.map((o,r)=>jsx(ro,{"data-ow-part":"mention-chip","data-kind":o.kind,icon:mC(o.kind),tone:"mention",className:"font-[family-name:var(--ow-font-mono)] font-normal",title:`${o.kind} \xB7 ${o.name}`,label:jsxs("span",{"data-ow-part":"mention",className:"inline-flex items-center gap-1 min-w-0",children:[jsx("span",{"data-ow-part":"at",children:"@"}),jsx("span",{"data-ow-part":"kind",className:"font-medium",children:o.kind}),jsx("span",{"data-ow-part":"value",className:"overflow-hidden text-ellipsis",children:o.name})]}),removeLabel:`\u79FB\u9664 ${o.name}`,onRemove:t?()=>t(o,r):void 0},`${o.kind}-${o.id}`))})}var lp=["bg-[var(--ow-mention-bg)] border-[color:var(--ow-info-tint-border)] text-[color:var(--ow-mention-text)]","hover:bg-[var(--ow-info-tint-hover)] focus-within:bg-[var(--ow-info-tint-hover)]","[&_[data-ow-part=icon]]:text-[color:var(--ow-mention-text)]","[&_[data-ow-part=remove]]:text-[color:var(--ow-mention-text)]"].join(" ");var fv=createContext(null);function $l({value:e,children:t}){return jsx(fv.Provider,{value:e,children:t})}function yz(e){return pn(e)}function kz(e,t){let o=(e??"").trim(),r=(t??o).trim();return {label:r.charAt(0).toUpperCase()||"?",id:o||r}}function bC(e){return e==="agent"?{background:"var(--ow-avatar-agent-bg)",color:"var(--ow-avatar-agent-text)"}:e==="neutral"?{background:"var(--ow-surface-2)",color:"var(--ow-text-2)"}:{background:`var(--ow-${e})`,color:"var(--ow-on-fill)"}}function gv({src:e,glyph:t,className:o,failed:r,onImageError:n}){let a=useContext(fv);if(e&&!r)return jsx("img",{className:o,src:e,alt:"",decoding:"async",style:{objectFit:"fill"},onError:n});let i=a??t.tone??pn(t.id||t.label||"");return jsx("span",{className:o,style:bC(i),children:t.label})}function vv({groups:e,activeId:t,emptyMessage:o,overlay:r=false,className:n="",listRef:a,onSelect:i,onGroupAction:d,renderLeading:s}){let l=c=>{let p=s?.(c);return p!==void 0?p:c.icon?jsx("span",{"data-ow-part":"icon",className:"flex-[0_0_auto] w-5 h-5 inline-flex items-center justify-center text-ow-text-2",children:c.icon}):c.avatar||c.glyph?jsx(gv,{src:c.avatar,glyph:c.glyph??{label:c.label.charAt(0),tone:"neutral"},className:"flex-[0_0_auto] w-5 h-5 inline-flex items-center justify-center overflow-hidden [border-radius:var(--ow-radius-2xs)] text-ow-fs-caption font-semibold","data-ow-part":"avatar"}):jsx("span",{"data-ow-part":"avatar",className:"flex-[0_0_auto] w-5 h-5 [border-radius:var(--ow-radius-2xs)] bg-ow-surface-2 inline-flex items-center justify-center text-ow-text-2 font-semibold text-ow-fs-caption leading-none font-[family-name:var(--ow-font-sans)] uppercase",children:c.label.charAt(0)})};return jsxs("div",{"data-slot":"composer-menu","data-ow-state":r?"overlay":void 0,className:g(n),role:"menu",ref:a,children:[e.map(c=>jsxs("section",{"data-ow-part":"group",children:[jsxs("div",{"data-ow-part":"group-header",className:"flex items-center justify-between py-1.5 px-3 text-ow-text-3 font-medium text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)] leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:[jsx("span",{children:c.label}),c.actions&&c.actions.length>0&&jsx("span",{"data-ow-part":"group-actions",className:"flex items-center gap-2",children:c.actions.map(p=>jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"group-action",className:"text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]",onMouseDown:m=>{m.preventDefault(),d?.(c.id,p.id);},children:p.label},p.id))})]}),c.items.length===0&&c.emptyLabel&&jsx("div",{"data-ow-part":"empty",children:jsx(H,{message:c.emptyLabel,variant:"text"})}),c.items.map(p=>{let m=p.id===t;return jsxs(f,{type:"button",role:"menuitem","data-ow-part":"item","data-ow-state":m?"active":void 0,variant:"unstyled",className:g("w-full appearance-none border-0 bg-transparent flex items-center gap-2.5 py-2 px-3 text-left font-[family-name:var(--ow-font-sans)] transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] ow-focus-ring","min-h-10 hover:bg-[var(--ow-hover-pop)] active:bg-[var(--ow-press-pop)]",m&&"bg-[var(--ow-press-pop)] hover:bg-[var(--ow-press-pop)]",p.disabled&&"cursor-not-allowed text-[color:var(--ow-disabled-text)]"),"data-active":m,disabled:p.disabled,title:p.disabledReason,onMouseDown:u=>{u.preventDefault(),p.disabled||i?.(p);},children:[l(p),jsxs("span",{"data-ow-part":"meta",className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{"data-ow-part":"name",className:"text-ow-text font-medium text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)] overflow-hidden text-ellipsis whitespace-nowrap",children:p.label}),p.disabledReason?jsx("span",{"data-ow-part":"disabled-reason",className:"text-ow-error font-normal text-ow-fs-eyebrow leading-[1.4] font-[family-name:var(--ow-font-sans)] overflow-hidden text-ellipsis whitespace-nowrap",children:p.disabledReason}):p.description&&jsx("span",{"data-ow-part":"description",className:"text-ow-text-3 font-normal text-ow-fs-eyebrow leading-[1.4] font-[family-name:var(--ow-font-sans)] overflow-hidden text-ellipsis whitespace-nowrap",children:p.description})]}),p.hint&&jsx("span",{"data-ow-part":"hint",className:"flex-[0_0_auto] text-ow-text-3 font-normal text-ow-fs-eyebrow leading-[1.4] font-[family-name:var(--ow-font-sans)] ml-auto",children:p.hint}),p.selected&&jsx("span",{"data-ow-part":"check",className:"flex-[0_0_auto] w-4 h-4 inline-flex items-center justify-center text-[color:var(--ow-text)]","aria-label":"\u5DF2\u9009\u4E2D",children:jsx(be,{})})]},p.id)})]},c.id)),e.every(c=>c.items.length===0)&&o&&jsx("div",{"data-ow-part":"empty",children:jsx(H,{message:o,variant:"text"})})]})}function Iz({open:e=true,groups:t,activeId:o,anchorRect:r,emptyMessage:n,onSelect:a,onClose:i,onGroupAction:d,renderLeading:s}){let[l,c]=useState(null),p=useRef(null);useLayoutEffect(()=>{if(!e||!r||typeof window>"u"){c(null);return}let u=Math.round(Math.min(r.width,640)),b=Math.max(8,Math.min(r.left,window.innerWidth-u-8));c({position:"fixed",top:r.top-8,left:b,width:u,bottom:"auto",right:"auto",transform:"translateY(-100%)",zIndex:"var(--ow-z-popover)"});},[r,e]),useLayoutEffect(()=>{p.current?.querySelector('[data-active="true"]')?.scrollIntoView({block:"nearest"});},[o]);let m=t.some(u=>u.items.length>0);return !e||!m&&!n||typeof document>"u"?null:createPortal(jsxs(Fragment,{children:[jsx("div",{className:"ow-composer-menu-backdrop",onMouseDown:i}),l&&jsx("div",{className:"ow-composer-menu-popover",style:l,onMouseDown:u=>u.preventDefault(),children:jsx(vv,{className:"ow-composer-menu--portal",groups:t,activeId:o,emptyMessage:n,listRef:p,onSelect:a,onGroupAction:d,renderLeading:s})})]}),document.body)}var yv=8;function Fz({children:e,className:t="",onClose:o,align:r="start",width:n=230,viewportPadding:a=8,style:i}){let d=useRef(null),s=useRef(null),[l,c]=useState(null),[p,m]=useState(null),u=useCallback(()=>{let v=d.current,h=s.current;if(!v||!h||typeof window>"u")return;let x=v.parentElement?.getBoundingClientRect()??v.getBoundingClientRect(),k=h.getBoundingClientRect(),y=r==="end"?x.right-k.width:x.left,P=RC(h,k),N=P&&y+P.leftOffset<a?"left":null,S=PC(h,k,P?.element);P&&(N==="left"?S.rightOffset=Math.max(S.rightOffset,P.rightOffset):S.leftOffset=Math.min(S.leftOffset,P.leftOffset)),m(L=>L===N?L:N);let R=a-S.leftOffset,M=window.innerWidth-a-S.rightOffset,T=R<=M?kv(y,R,M):kv(y,a,Math.max(a,window.innerWidth-a-k.width)),_={top:x.top-8,left:T};c(L=>L?.top===_.top&&L.left===_.left?L:_);},[r,a]);useLayoutEffect(()=>{u();},[e,u,i,n]),useEffect(()=>{let v=s.current;if(!v)return;let h=typeof ResizeObserver>"u"?null:new ResizeObserver(u);h?.observe(v);let x=typeof MutationObserver>"u"?null:new MutationObserver(k=>{k.some(y=>y.target!==v)&&u();});return x?.observe(v,{attributes:true,childList:true,characterData:true,subtree:true}),window.addEventListener("resize",u),window.addEventListener("scroll",u,true),()=>{h?.disconnect(),x?.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("scroll",u,true);}},[u]),useEffect(()=>{let v=h=>{let x=h.target;x&&s.current?.contains(x)||x&&d.current?.parentElement?.contains(x)||o();};return document.addEventListener("pointerdown",v,true),()=>document.removeEventListener("pointerdown",v,true)},[o]);let b=["cpop",...t.split(/\s+/).filter(v=>v&&v!=="cpop"&&v!=="cpop--portal"),"cpop--portal"].join(" "),w=jsx("div",{ref:s,className:b,"data-horizontal-overflow":p??void 0,style:{...i,position:"fixed",top:l?.top??-9999,left:l?.left??-9999,right:"auto",bottom:"auto",width:n==="content"?"max-content":n,maxWidth:i?.maxWidth??"calc(100vw - 16px)",transform:"translateY(-100%)",visibility:l?"visible":"hidden",zIndex:"var(--ow-z-popover)"},onMouseDown:v=>v.stopPropagation(),children:e});return jsxs(Fragment,{children:[jsx("span",{ref:d}),typeof document<"u"&&createPortal(jsxs(Fragment,{children:[jsx("div",{className:"cpop-backdrop",onClick:o}),w]}),document.body)]})}function PC(e,t,o){let r=t.left,n=t.right;for(let a of e.querySelectorAll("*")){if(o?.contains(a))continue;let i=a.getBoundingClientRect();i.width<=0||i.height<=0||(r=Math.min(r,i.left),n=Math.max(n,i.right));}return {leftOffset:r-t.left,rightOffset:n-t.left}}function RC(e,t){let o=e.querySelector(".cpop-sub"),r=o?.parentElement;if(!o||!r)return null;let n=Number.parseFloat(getComputedStyle(o).width);if(!Number.isFinite(n)||n<=0)return null;let a=r.getBoundingClientRect();return {element:o,leftOffset:a.left-t.left-yv-n,rightOffset:a.right-t.left+yv+n}}function kv(e,t,o){return Math.max(t,Math.min(o,e))}var Sv="__composer-project-create__";function Zz({value:e,options:t,onChange:o,onCreate:r,onOpen:n,selectTitle:a="\u9009\u62E9\u5F53\u524D\u4EFB\u52A1\u6240\u5C5E\u9879\u76EE",menuLabel:i="\u65B0\u4EFB\u52A1\u4FDD\u5B58\u5230",createLabel:d="\u65B0\u589E\u9879\u76EE",createDescription:s="\u8F93\u5165\u540D\u79F0\u540E\u7ACB\u5373\u521B\u5EFA"}){let[l,c]=useState(false),[p,m]=useState(false),[u,b]=useState(""),[w,v]=useState(false),[h,x]=useState(null),{isImeEnter:k,onCompositionEnd:y,onCompositionStart:P}=Dt(),N=t.find(I=>I.id===e)??t[0],S=u.trim()!==""&&!w;if(!N)return null;let R=()=>{c(false),m(false),b(""),x(null);},M=()=>{if(l&&w)return;let I=!l;I?c(true):R(),I&&n?.();},T=async I=>{await o(I),R();},_=async()=>{let I=u.trim();if(!(!I||w||!r)){v(true),x(null);try{await r(I),R();}catch($){x($ instanceof Error?$.message:"\u521B\u5EFA\u9879\u76EE\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");}finally{v(false);}}},L=[...t.map(I=>({key:I.id,label:I.label,searchText:I.name,description:typeof I.description=="string"?I.description:void 0,icon:jsx(qe,{}),selected:I.id===N.id,disabled:w})),...r&&!p?[{key:Sv,label:d,description:s,icon:jsx(We,{}),disabled:w}]:[]];return jsxs("div",{"data-slot":"composer-project",className:"relative inline-flex",children:[jsxs(f,{variant:"ghost",size:"sm","data-ow-part":"button","data-ow-state":l?"open":void 0,className:"max-w-full data-[ow-state=open]:bg-[var(--ow-btn-ghost-press)]",type:"button",onClick:M,title:a,"aria-haspopup":"menu","aria-expanded":l,icon:jsx(qe,{}),children:[jsx("span",{"data-ow-part":"name",className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:N.label}),jsx(ne,{"data-ow-part":"chevron",className:g("transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",l&&"rotate-180")})]}),l&&jsxs(Fragment,{children:[jsx(f,{variant:"unstyled","data-ow-part":"backdrop",className:"fixed inset-0 z-[calc(var(--ow-z-popover)-1)] bg-transparent cursor-default focus-visible:outline-none","aria-label":"\u5173\u95ED\u9879\u76EE\u9009\u62E9",onClick:()=>{w||R();}}),jsx("div",{"data-ow-part":"menu",className:"absolute bottom-[calc(100%+8px)] left-0 z-[var(--ow-z-popover)]",children:jsx(pt,{width:288,header:i,ariaLabel:"\u9009\u62E9\u65B0\u4EFB\u52A1\u9879\u76EE",autoAdjust:true,items:L,onSelect:I=>{if(I===Sv){m(true);return}let $=t.find(F=>F.id===I);$&&T($);},footer:p?jsxs("div",{"data-ow-part":"create",className:"flex flex-col gap-2 p-1",role:"none",children:[jsxs("div",{"data-ow-part":"create-row",className:"flex items-center gap-2",children:[jsx(te,{autoFocus:true,"data-ow-part":"create-input",value:u,placeholder:"\u8F93\u5165\u9879\u76EE\u540D\u79F0","aria-label":"\u9879\u76EE\u540D\u79F0","aria-invalid":!!h,"aria-describedby":h?"composer-project-create-error":"composer-project-create-hint",disabled:w,onChange:b,onCompositionStart:P,onCompositionEnd:y,onKeyDown:I=>{k(I)||(I.key==="Enter"&&(I.preventDefault(),_()),I.key==="Escape"&&(I.stopPropagation(),m(false),b(""),x(null)));}}),jsx(f,{variant:"primary",size:"sm",type:"button","data-ow-part":"create-submit",loading:w,disabled:!S,onClick:()=>{_();},children:"\u521B\u5EFA"})]}),h?jsx("div",{id:"composer-project-create-error","data-ow-part":"create-error",className:"text-[color:var(--ow-error)] font-normal text-ow-fs-eyebrow leading-[1.4]",role:"alert",children:h}):jsx("div",{id:"composer-project-create-hint","data-ow-part":"create-hint",className:"text-[color:var(--ow-text-3)] font-normal text-ow-fs-eyebrow leading-[1.4]",children:"\u6309 Enter \u521B\u5EFA\uFF0CEsc \u53D6\u6D88"})]}):void 0})})]})]})}function Jz({label:e="\u6392\u961F\u4E2D",count:t,icon:o=jsx(No,{}),notices:r=[],items:n=[],className:a="",...i}){let d=t??n.length;return d===0&&r.length===0&&n.length===0?null:jsxs("div",{"data-slot":"composer-queue",className:g("flex w-full min-w-0 box-border self-stretch flex-col gap-1.5 mb-2 p-2.5 border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-card)] bg-[var(--ow-surface-2)]",a),"aria-live":"polite",...i,children:[d>0&&jsxs("div",{"data-ow-part":"header",className:"inline-flex items-center gap-1.5 text-ow-text-3 font-medium text-ow-fs-mark-md leading-none [&_svg]:w-3.5 [&_svg]:h-3.5",children:[jsx("span",{className:"inline-flex flex-[0_0_auto] items-center justify-center",children:o}),jsxs("span",{children:[e," \xB7"," ",jsx("span",{"data-ow-part":"count",className:"font-[family-name:var(--ow-font-mono)] tabular-nums",children:d})]})]}),r.map((s,l)=>jsxs("div",{"data-ow-part":"notice","data-ow-state":s.tone,className:"flex w-full min-w-0 box-border items-center min-h-7 gap-2 px-2.5 py-1.5 border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-control)] bg-transparent text-[color:var(--ow-text-2)] font-normal text-ow-fs-body-sm leading-[1.25]",children:[jsx("span",{className:"min-w-0 flex-[1_1_auto] overflow-hidden text-ellipsis whitespace-nowrap",children:s.text}),s.action&&jsx("span",{className:"inline-flex min-w-0 flex-[0_0_auto] items-center gap-2 ml-auto",children:s.action})]},s.id??l)),n.length>0&&jsx("div",{"data-ow-part":"list",className:"flex w-full min-w-0 box-border max-h-32 flex-col gap-1.5 overflow-y-auto pr-px",children:n.map(s=>jsxs("div",{"data-ow-part":"item","data-ow-state":g(s.kind,s.status,s.dragging&&"dragging",s.dragOver&&"drag-over")||void 0,className:"flex w-full min-w-0 box-border items-center min-h-8 gap-2 py-1.5 px-2 pl-2.5 border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-control)] bg-transparent text-[color:var(--ow-text-2)] font-normal text-ow-fs-body-sm leading-[1.3] transition-[background-color,border-color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",onDragEnter:s.onDragEnter,onDragOver:s.onDragOver,onDragLeave:s.onDragLeave,onDrop:s.onDrop,children:[jsx("span",{"data-ow-part":"icon","data-ow-state":s.draggable?"draggable":void 0,className:"inline-flex flex-[0_0_auto] items-center justify-center w-4 h-4 text-ow-text-3 [&_svg]:w-3.5 [&_svg]:h-3.5",draggable:s.draggable,onDragStart:s.onDragStart,onDragEnd:s.onDragEnd,title:s.dragTitle,"aria-label":s.ariaLabel,children:s.icon??o}),jsx("span",{className:"min-w-0 flex-[1_1_auto] overflow-hidden text-ellipsis whitespace-nowrap",children:s.text}),(s.statusLabel||s.actions)&&jsxs("span",{className:"inline-flex min-w-0 flex-[0_0_auto] items-center gap-2 ml-auto",children:[s.statusLabel&&jsx("span",{"data-ow-part":"status",className:"flex-[0_0_auto] text-ow-text-3 whitespace-nowrap",children:s.statusLabel}),s.actions]})]},s.id))})]})}function iH({active:e=false,listening:t=false,busy:o=false,analyserRef:r,levels:n,disabled:a=false,className:i="",onToggle:d}){let s=t?"\u505C\u6B62\u8BED\u97F3\u8F93\u5165":o?"\u8BED\u97F3\u8F93\u5165\u5904\u7406\u4E2D":"\u8BED\u97F3\u8F93\u5165";return jsxs("div",{"data-slot":"composer-voice","data-ow-state":e?"active":void 0,className:g("inline-flex items-center gap-1.5 flex-[0_0_auto] min-w-0 data-[ow-state=active]:flex-[1_1_180px]",i),children:[e&&jsx(mv,{analyserRef:r,levels:n}),jsx(f,{type:"button","data-ow-part":"toggle","data-ow-state":e?"recording":void 0,variant:"ghost",size:"sm","aria-label":s,"aria-pressed":e,title:s,loading:o,disabled:a,onClick:d,className:g("flex-[0_0_auto] text-[color:var(--ow-text-2)]","hover:text-[color:var(--ow-text)]",e&&"bg-[var(--ow-control-on)] text-[color:var(--ow-control-on-glyph)] hover:bg-[var(--ow-control-on)] hover:text-[color:var(--ow-control-on-glyph)]"),icon:t?jsx(Ba,{}):jsx(hd,{})})]})}var Rv=forwardRef(function({generating:t=false,value:o,defaultValue:r="",onChange:n,disabled:a=false,queue:i,status:d,attachments:s,mentions:l,context:c,input:p,overlay:m,toolbarStart:u,toolbarEnd:b,voice:w,project:v,footerStart:h,footerEnd:x,authorization:k,contextUsage:y,filled:P,submitState:N,submitDisabled:S,submitTitle:R,onSubmit:M,onSend:T,onStop:_,onAdd:L,onSkillsClick:I,mode:$,modes:F=[{value:"auto",label:"\u81EA\u52A8"},{value:"fast",label:"\u5FEB\u901F"},{value:"deep",label:"\u6DF1\u5EA6\u601D\u8003"}],onModeChange:E,maxHeight:O=241,placeholder:ae="\u5E2E\u6211\u641C\u4E0B\u6709\u6CA1\u6709\u672A\u5B8C\u6210\u7684\u5F85\u529E",className:z="",...pe},Me){let[Oe,ee]=useState(r),[q,A]=useState($??F[0]?.value??""),D=useRef(null),{isImeEnter:Y,onCompositionStart:Ee,onCompositionEnd:Ge}=Dt(),et=o??Oe,ht=P??et.trim().length>0,to=$??q,Ze=N??(t?"stop":"send"),U=l!==void 0||c!==void 0,ke=h!==void 0||x!==void 0;useEffect(()=>{let ce=D.current;!ce||!(ce instanceof HTMLTextAreaElement)||(ce.style.height="auto",ce.style.height=`${Math.min(ce.scrollHeight,O)}px`,ce.style.overflowY=ce.scrollHeight>O?"auto":"hidden");},[et,O]);let j=useCallback(ce=>{o===void 0&&ee(ce),n?.(ce);},[o,n]),Ie=useCallback(()=>{if(!(a||S)){if(p!==void 0){M?.();return}ht&&T&&(T(et.trim()),o===void 0&&ee(""),n?.(""));}},[a,ht,p,n,T,M,S,et,o]),we=useCallback(()=>{Ze==="stop"?_?.():Ze!=="busy"&&Ie();},[Ie,_,Ze]),de=useCallback(ce=>{if(!Y(ce)&&ce.key==="Enter"){if(ce.ctrlKey){ce.preventDefault();let Ko=ce.currentTarget,pr=Ko.selectionStart,Us=Ko.selectionEnd,gi=`${et.slice(0,pr)}
|
|
31
|
+
${et.slice(Us)}`;o===void 0&&ee(gi),n?.(gi),requestAnimationFrame(()=>D.current?.setSelectionRange(pr+1,pr+1));return}ce.shiftKey||(ce.preventDefault(),Ie());}},[Ie,Y,n,et,o]),X=a||S||Ze==="busy"||Ze==="send"&&!ht,Ce=g(ht&&"filled",a&&"disabled");return jsxs("div",{ref:Me,"data-slot":"composer","data-ow-state":Ce||void 0,className:g("flex flex-col gap-2",z),...pe,children:[jsxs("div",{"data-ow-part":"surface","data-ow-state":a?"disabled":void 0,className:g("relative min-h-20 px-2.5 pt-3 pb-2 flex flex-col gap-2.5","[border-radius:var(--ow-radius-card)]","border border-[color:var(--ow-composer-border,var(--ow-input-border))]","bg-[var(--ow-composer-bg,var(--ow-input-bg))]",a?"border-[color:var(--ow-disabled-border)] bg-[var(--ow-input-disabled-bg)]":["[&:hover:not(:focus-within)]:border-[color:var(--ow-input-border-hover)]","focus-within:border-[color:var(--ow-input-border-focus)]"].join(" ")),children:[i&&jsx("div",{"data-ow-part":"queue",className:"flex w-full min-w-0 box-border self-stretch flex-col gap-1.5",children:i}),d&&jsx("div",{"data-ow-part":"status",className:"flex w-full min-w-0 box-border self-stretch flex-col gap-1.5",children:d}),s&&jsx("div",{"data-ow-part":"attachments",className:"flex gap-2 overflow-x-auto overflow-y-hidden",children:s}),U&&jsxs("div",{"data-ow-part":"context",className:"flex min-w-0 items-center flex-wrap gap-1.5",children:[l,c]}),jsx("div",{"data-ow-part":"input",className:"min-w-0",children:p??jsx(te,{ref:D,multiline:true,standalone:false,"data-ow-part":"textarea",className:"w-full min-h-6 max-h-60 p-0 resize-none overflow-hidden bg-transparent text-[color:var(--ow-text)] font-normal text-ow-fs-ui leading-normal border-0 shadow-none focus-visible:ring-0",rows:1,placeholder:ae,value:et,disabled:a,onChange:j,onCompositionStart:Ee,onCompositionEnd:Ge,onKeyDown:de})}),m&&jsx("div",{"data-ow-part":"overlay",className:"relative z-30",children:m}),jsxs("div",{"data-ow-part":"bar",className:"flex items-center gap-1.5 min-h-7",children:[Ze!=="send"&&jsxs("span",{"data-ow-part":"state","data-ow-state":Ze==="stop"?"running":"busy",className:"inline-flex flex-[0_0_auto] items-center gap-1.5 pr-1 text-[color:var(--ow-text-3)] font-normal text-ow-fs-ui leading-none","aria-live":"polite",children:[jsx("span",{"data-ow-part":"state-dot","aria-hidden":"true",className:g("w-1.5 h-1.5 rounded-full flex-[0_0_auto]",Ze==="stop"?"bg-[var(--ow-progress-fill)]":"border border-[color:var(--ow-border-strong)]")}),Ze==="stop"?"\u751F\u6210\u4E2D":"\u5904\u7406\u4E2D"]}),jsxs("div",{"data-ow-part":"bar-start",className:"flex min-w-0 items-center gap-1.5 flex-[0_1_auto]",children:[u??jsxs(Fragment,{children:[jsx(f,{type:"button","data-ow-part":"tool",variant:"ghost",size:"sm","aria-label":"\u6DFB\u52A0\u9644\u4EF6",disabled:a,onClick:L,icon:jsx(We,{})}),jsx(f,{type:"button","data-ow-part":"tool",variant:"ghost",size:"sm",disabled:a,onClick:I,icon:jsx(Rd,{}),children:"\u6280\u80FD"})]}),k,v]}),jsx("span",{className:"flex-1"}),jsxs("div",{"data-ow-part":"bar-end",className:"flex min-w-0 items-center gap-1.5 flex-[0_1_auto]",children:[y,b??jsx(co,{width:128,ariaLabel:"\u56DE\u7B54\u6A21\u5F0F",items:F.map(ce=>({key:ce.value,label:ce.label,selected:ce.value===to})),onSelect:ce=>{$===void 0&&A(ce),E?.(ce);},trigger:jsx(f,{type:"button","data-ow-part":"mode",variant:"ghost",size:"sm",disabled:a,icon:jsx(ne,{}),className:"flex-row-reverse",children:F.find(ce=>ce.value===to)?.label??to})}),w]}),jsx(f,{type:"button","data-ow-part":"submit","data-ow-state":g(Ze==="stop"&&"stop",Ze==="busy"&&"busy")||void 0,variant:Ze==="send"?"primary":"secondary",size:"md",loading:Ze==="busy",icon:Ze==="stop"?jsx("span",{className:"w-2.5 h-2.5 [border-radius:var(--ow-radius-2xs)] bg-[var(--ow-text)]"}):jsx(mn,{}),"aria-label":Ze==="stop"?"\u505C\u6B62":Ze==="busy"?"\u5904\u7406\u4E2D":"\u53D1\u9001",title:R,onClick:we,disabled:X})]})]}),ke&&jsxs("div",{"data-ow-part":"footer",className:"relative flex min-w-0 min-h-6 items-center justify-between gap-4 mx-1.5 mt-px p-0 overflow-visible text-[color:var(--ow-text-3)] font-normal text-[length:var(--ow-fs-mark-md)] leading-[1.4]",children:[jsx("div",{"data-ow-part":"footer-start",className:"flex min-w-0 items-center gap-2 overflow-visible flex-[1_1_auto]",children:h}),jsx("div",{"data-ow-part":"footer-end",className:"flex min-w-0 items-center gap-2 overflow-visible flex-[0_0_auto] ml-auto",children:x})]})]})});var Dv=createContext(false);function gp(){return useContext(Dv)}function vp({input:e,output:t,artifacts:o,trailing:r,className:n=""}){return jsxs("div",{className:`ow-execution-detail ${n}`,"data-slot":"execution-detail",style:UC,children:[e!=null&&jsxs("section",{"data-ow-part":"section",children:[jsx("div",{"data-ow-part":"eyebrow",style:up,children:"\u8F93\u5165"}),jsx("div",{"data-ow-part":"well",children:e})]}),t!=null&&jsxs("section",{"data-ow-part":"section",children:[jsx("div",{"data-ow-part":"eyebrow",style:up,children:"\u8F93\u51FA"}),jsx("div",{"data-ow-part":"well",children:t})]}),o!=null&&jsxs("section",{"data-ow-part":"section",children:[jsx("div",{"data-ow-part":"eyebrow",style:up,children:"\u4EA7\u7269"}),jsx("div",{"data-ow-part":"artifacts",children:o})]}),r!=null&&jsx("div",{"data-ow-part":"trailing",style:KC,children:r})]})}function bp({tool:e,className:t=""}){let o=gp(),[r,n]=useState(!!e.defaultDetailOpen),a=e.detailOpen??r,i=useId(),d=e.input!=null||e.output!=null||e.artifacts!=null,s=()=>{let p=!a;e.detailOpen===void 0&&n(p),e.onDetailOpenChange?.(p);},l=e.statusText??(e.state==="error"?"\u5931\u8D25":void 0),c=jsxs(Fragment,{children:[jsx("span",{style:ZC,children:e.name}),jsx("span",{style:qC,children:e.args}),e.elapsed&&jsx("span",{style:mp,children:e.elapsed}),l&&jsx("span",{style:e.state==="error"?{...mp,color:"var(--ow-error)"}:mp,children:l}),d&&jsx("span",{"aria-hidden":"true","data-ow-part":"chevron",style:HC,children:a?jsx(ne,{}):jsx(he,{})})]});return jsxs("div",{className:`ow-execution-summary__row ${t}`,"data-slot":"execution-summary-row","data-ow-state":[e.state??"done",a?"expanded":null].filter(Boolean).join(" "),style:o?GC:Iv,children:[d?jsx("button",{type:"button",className:"ow-focus-ring","data-ow-part":"row-trigger",style:{...Mv,...WC},onClick:s,"aria-expanded":a,"aria-controls":a?i:void 0,children:c}):jsx("div",{style:Mv,children:c}),e.out&&jsx("div",{style:YC,children:e.out}),d&&a&&jsx("div",{id:i,children:jsx(vp,{input:e.input,output:e.output,artifacts:e.artifacts})})]})}function Wl({label:e,statusText:t,tone:o="neutral",metaTitle:r,steps:n,duration:a,meta:i,tools:d,children:s,defaultOpen:l=false,open:c,onOpenChange:p,className:m=""}){let[u,b]=useState(l),w=c!==void 0,v=w?c:u,h=useId(),x=d??[],k=x.length===0&&s!=null,y=x.length>0||k,P=x.filter(_=>_.state==="error").length,N=i??OC(n,a),S=P>0?BC(x.length,P):void 0,R=[N,S,t].filter(Boolean).join(" \xB7 ")||void 0,M=()=>{if(!y)return;let _=!v;w||b(_),p?.(_);},T=jsxs(Fragment,{children:[jsx(Ur,{}),jsx("span",{style:FC,children:e}),R&&jsxs("span",{style:$C,title:r,children:[N,N&&S?" \xB7 ":null,S&&jsx("span",{style:{color:"var(--ow-error)"},children:S}),t&&jsxs(Fragment,{children:[N||S?" \xB7 ":null,jsx("span",{style:o==="error"?{color:"var(--ow-error)"}:void 0,children:t})]})]}),y&&jsx("span",{"aria-hidden":"true","data-ow-part":"chevron",style:zC,children:v?jsx(ne,{}):jsx(he,{})})]});return jsxs("div",{className:`ow-execution-summary ${m}`,"data-slot":"execution-summary",style:VC,children:[y?jsx("button",{type:"button",className:"ow-focus-ring hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",style:Tv,onClick:M,"aria-expanded":v,"aria-controls":v?h:void 0,children:T}):jsx("div",{style:{...Tv,cursor:"default"},children:T}),y&&v&&jsxs("div",{id:h,"data-ow-part":"body",style:k?jC:Ev,children:[k&&jsx(Dv.Provider,{value:true,children:s}),x.map((_,L)=>jsx(bp,{tool:_},`${_.name}-${L}`))]})]})}function BC(e,t){return `${e} \u9879\u4E2D ${t} \u9879\u5931\u8D25`}function OC(e,t){let o=[];return typeof e=="number"&&o.push(`${e} \u6B65`),t&&o.push(t),o.length?o.join(" \xB7 "):void 0}var VC={display:"flex",flexDirection:"column",maxWidth:"100%",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-lg)",background:"var(--ow-surface)",overflow:"hidden",fontFamily:"var(--ow-font-body)"},Tv={display:"flex",alignItems:"center",gap:10,width:"100%",padding:"10px 12px",border:0,background:"transparent",color:"var(--ow-text)",font:"inherit",textAlign:"left",cursor:"pointer"},FC={flex:"1 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--ow-fs-ui)",fontWeight:500},$C={flex:"0 0 auto",fontFamily:"var(--ow-font-mono)",fontSize:"var(--ow-fs-mark-md)",fontVariantNumeric:"tabular-nums",color:"var(--ow-text-2)"},zC={flex:"0 0 auto",width:14,height:14,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--ow-text-3)"},HC={flex:"0 0 auto",alignSelf:"center",width:12,height:12,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--ow-text-3)"},WC={width:"100%",padding:0,border:0,background:"transparent",color:"inherit",font:"inherit",textAlign:"left",cursor:"pointer",borderRadius:"var(--ow-radius-2xs)"},UC={display:"flex",flexDirection:"column",gap:8,marginTop:6,position:"relative"},up={margin:"0 0 4px",font:"500 var(--ow-fs-eyebrow-cjk, 12px)/1 var(--ow-font-sans)",letterSpacing:"var(--ow-ls-eyebrow-cjk, 0.08em)",color:"var(--ow-eyebrow)"},KC={display:"flex",justifyContent:"flex-end"},Ev={display:"flex",flexDirection:"column",borderTop:"1px solid var(--ow-border)",background:"var(--ow-surface)"},jC={...Ev,gap:6,padding:"9px 12px"},Iv={display:"flex",flexDirection:"column",gap:3,padding:"9px 12px 9px 30px"},GC={...Iv,padding:"9px 0"},Mv={display:"flex",alignItems:"baseline",gap:8},Ul={fontFamily:"var(--ow-font-mono)",fontSize:"var(--ow-fs-mark-md)"},ZC={...Ul,flex:"0 0 auto",fontWeight:500,color:"var(--ow-text)"},qC={...Ul,flex:"1 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--ow-text-3)"},mp={...Ul,flex:"0 0 auto",fontVariantNumeric:"tabular-nums",color:"var(--ow-text-3)"},YC={...Ul,lineHeight:1.6,color:"var(--ow-text-2)",whiteSpace:"pre-wrap",wordBreak:"break-word"};function EH({type:e="info",title:t,children:o,icon:r,closable:n=false,onClose:a,action:i,className:d=""}){return jsx(J,{variant:e,title:t,icon:r,closable:n,onClose:a,action:i,className:d,children:o})}var Av=["box-border w-full border border-[color:var(--ow-border)] bg-[var(--ow-surface)]","[border-radius:var(--ow-radius-card)]"].join(" "),Bv=["text-left cursor-pointer","transition-[background-color,border-color,color] duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","ow-focus-ring","disabled:cursor-not-allowed disabled:bg-[var(--ow-disabled-bg)] disabled:text-[color:var(--ow-disabled-text)]","disabled:border-[color:var(--ow-disabled-border)]"].join(" "),wp="font-[family-name:var(--ow-font-mono)] tabular-nums";function QC({href:e,children:t,external:o=true,onClick:r,className:n,title:a}){return jsxs("a",{"data-slot":"rich-link","data-ow-part":"link",href:e,title:a,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,onClick:r,className:g("ow-link inline-flex w-fit items-center gap-1.5 py-0.5","text-[length:var(--ow-fs-ui)] font-medium",n),children:[jsx("span",{className:"min-w-0 truncate",children:t??e}),o&&jsx(lo,{"aria-hidden":"true",style:{width:14,height:14,flexShrink:0}})]})}function JC(e){if(e.variant==="resource"){let{items:i,className:d,"aria-label":s}=e;return jsx("ul",{"data-slot":"rich-list","data-ow-variant":"resource","aria-label":s,className:g("m-0 flex list-none flex-col gap-2.5 p-0",d),children:i.map((l,c)=>jsx("li",{className:"min-w-0",children:jsx(eN,{item:l})},c))})}let{items:t,ordered:o=false,className:r,"aria-label":n}=e;return jsx(o?"ol":"ul",{"data-slot":"rich-list","data-ow-variant":"text","aria-label":n,className:g("my-1.5 pl-5",o?"list-decimal":"list-disc","text-[length:var(--ow-fs-ui)] leading-[1.65] text-[color:var(--ow-text)]",r),children:t.map((i,d)=>jsx("li",{className:"my-[3px]",children:i},d))})}function eN({item:e}){let t=typeof e.title=="string"?e.title:void 0,o=jsxs(Fragment,{children:[jsx("span",{"data-ow-part":"glyph","aria-hidden":"true",className:"inline-flex shrink-0 items-center justify-center text-[color:var(--ow-text-3)]",children:jsx(Xo,{name:e.name??t??"",kind:e.kind,width:20,height:20})}),jsxs("span",{className:"min-w-0 flex-1",children:[jsx("span",{"data-ow-part":"title",className:"block truncate text-[length:var(--ow-fs-ui)] font-medium leading-[1.3] text-[color:var(--ow-text)]",children:e.title}),e.meta!=null&&jsx("span",{"data-ow-part":"meta",className:g("mt-[3px] block truncate text-[length:var(--ow-fs-body-sm)] leading-[1.2]","text-[color:var(--ow-text-3)]",wp),children:e.meta})]}),e.href&&jsx(lo,{"aria-hidden":"true",className:"text-[color:var(--ow-text-3)]",style:{width:16,height:16,flexShrink:0}})]}),r=g("flex w-full items-center gap-3 p-3.5 no-underline","border border-[color:var(--ow-border)] bg-[var(--ow-surface)] [border-radius:var(--ow-radius-action)]",Bv);return e.href?jsx("a",{"data-slot":"rich-list-row",href:e.href,target:"_blank",rel:"noreferrer",onClick:e.onClick,className:r,children:o}):e.onClick?jsx("button",{"data-slot":"rich-list-row",type:"button",onClick:e.onClick,className:r,children:o}):jsx("span",{"data-slot":"rich-list-row",className:g(r,"cursor-default hover:bg-[var(--ow-surface)]"),children:o})}function hp({variant:e="note",title:t,meta:o,href:r,linkLabel:n="\u6253\u5F00",children:a,defaultOpen:i=false,progress:d,glyph:s="TSK",footnote:l,readout:c,onClick:p,disabled:m=false,className:u}){if(e==="detail")return jsxs("details",{"data-slot":"rich-card","data-ow-variant":"detail",open:i,className:g("group my-2 [&>summary]:list-none [&>summary::-webkit-details-marker]:hidden",u),children:[jsxs("summary",{"data-ow-part":"summary",className:g("inline-flex cursor-pointer items-center gap-[7px] [border-radius:var(--ow-radius-menu)] px-1 py-[5px]","text-[length:var(--ow-fs-ui)] leading-none text-[color:var(--ow-text-3)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)] hover:text-[color:var(--ow-text-2)]","ow-focus-ring"),children:[jsx("span",{children:t}),jsx(ne,{"aria-hidden":"true",className:"transition-transform duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)] group-open:rotate-180",style:{width:14,height:14}})]}),jsx("div",{"data-ow-part":"body",className:g("mt-2 flex flex-col gap-1 pl-1","text-[length:var(--ow-fs-ui)] leading-[1.55] text-[color:var(--ow-text-2)]"),children:a})]});if(e==="task"){let b=d==null?void 0:Math.min(100,Math.max(0,d)),w=jsxs(Fragment,{children:[jsxs("span",{className:"flex items-center gap-2.5",children:[jsx("span",{"data-ow-part":"glyph","aria-hidden":"true",className:g("inline-flex h-7 w-7 shrink-0 items-center justify-center [border-radius:var(--ow-radius-tag)]","bg-[var(--ow-surface-2)] text-[color:var(--ow-text-2)]","text-[length:var(--ow-fs-ui)] font-semibold leading-none font-[family-name:var(--ow-font-sans)]"),children:s}),jsx("span",{"data-ow-part":"title",className:"min-w-0 flex-1 truncate text-[length:var(--ow-fs-ui)] font-semibold leading-[1.2] text-[color:var(--ow-text)]",children:t}),p&&jsx(he,{"aria-hidden":"true",className:"text-[color:var(--ow-text-3)]",style:{width:15,height:15,flexShrink:0}})]}),b!=null&&jsx(la,{className:"mt-3 mb-2",size:"sm",value:b,"aria-label":typeof t=="string"?`${t} \u8FDB\u5EA6`:"\u4EFB\u52A1\u8FDB\u5EA6"}),(l!=null||c!=null||o!=null)&&jsxs("span",{"data-ow-part":"footer",className:"flex items-center justify-between gap-2 text-[length:var(--ow-fs-ui)] leading-none text-[color:var(--ow-text-3)]",children:[jsx("span",{className:g("min-w-0 truncate",l!=null&&wp),children:l??o}),c!=null&&jsx("span",{"data-ow-part":"readout",className:g("shrink-0 text-[color:var(--ow-text-2)]",wp),children:c})]})]}),v=g(Av,"my-2 block max-w-[460px] p-3.5",u);return p?jsx("button",{"data-slot":"rich-card","data-ow-variant":"task",type:"button",disabled:m,onClick:p,className:g(v,Bv),children:w}):jsx("div",{"data-slot":"rich-card","data-ow-variant":"task",className:v,children:w})}return jsxs("div",{"data-slot":"rich-card","data-ow-variant":"note",className:g(Av,"my-2 max-w-[460px] p-3.5",u),children:[jsx("div",{"data-ow-part":"title",className:"text-[length:var(--ow-fs-ui)] font-semibold leading-[1.35] text-[color:var(--ow-text)]",children:t}),o!=null&&jsx("div",{"data-ow-part":"meta",className:"mt-1 text-[length:var(--ow-fs-body-sm)] leading-[1.45] text-[color:var(--ow-text-3)]",children:o}),a,r&&jsx(QC,{href:r,className:"mt-2",children:n})]})}function $H(e){return jsx(hp,{...e,variant:"detail"})}function zH(e){return jsx(hp,{...e,variant:"note"})}function HH(e){return jsx(hp,{...e,variant:"task"})}function WH({items:e,className:t,...o}){return jsx(JC,{variant:"resource",items:e,className:t,...o})}function jH({processes:e,className:t=""}){return jsx("div",{"data-slot":"sub-agent-thread",className:t,style:oN,children:e.map((o,r)=>jsxs("div",{"data-ow-part":"row","data-status":o.status,style:r===0?Vv:{...Vv,borderTop:"1px solid var(--ow-border)"},children:[jsx("span",{"data-ow-part":"name",style:rN,children:o.name}),jsx("span",{"data-ow-part":"dot","aria-hidden":"true",style:aN[o.status]}),jsx("span",{"data-ow-part":"status",style:nN,children:tN[o.status]}),jsx("span",{"data-ow-part":"duration",style:iN,children:o.duration??"\u2014"})]},r))})}var tN={running:"\u8FD0\u884C\u4E2D",queued:"\u6392\u961F",done:"\u5DF2\u5B8C\u6210"},oN={background:"var(--ow-surface)",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-lg)",padding:"2px 14px",fontFamily:"var(--ow-font-body)"},Vv={display:"flex",alignItems:"center",gap:8,height:31},rN={fontSize:12.5,color:"var(--ow-text)",flex:1},xp={width:7,height:7,borderRadius:"50%",flex:"none"},aN={running:{...xp,border:"1.5px solid var(--ow-beacon-idle)"},queued:{...xp,background:"var(--ow-pending)"},done:{...xp,background:"var(--ow-text-3)"}},nN={fontSize:10.5,color:"var(--ow-text-2)"},iN={fontFamily:"var(--ow-font-mono)",fontSize:10.5,color:"var(--ow-text-2)",width:46,textAlign:"right",fontVariantNumeric:"tabular-nums"};var lN={done:"var(--ow-success)",pending:"var(--ow-pending)",running:"var(--ow-beacon)",error:"var(--ow-error)"},Fv={done:"\u5B8C\u6210",pending:"\u7B49\u5F85\u6388\u6743",running:"\u8FD0\u884C\u4E2D",error:"\u5931\u8D25"};function yp({name:e,args:t,state:o="running",elapsed:r,statusText:n,className:a=""}){let i=n??(o==="done"?r??Fv.done:Fv[o]),d=o==="error"?"var(--ow-error)":$v.color;return jsxs("div",{className:`ow-tool-call-row ${a}`,"data-slot":"tool-call-row","data-ow-state":o,style:dN,children:[jsx("span",{"aria-hidden":"true",style:{...cN,background:lN[o]}}),jsx("span",{style:pN,children:e}),jsx("span",{style:uN,children:t}),i&&jsx("span",{style:{...$v,color:d},children:i})]})}var dN={display:"flex",alignItems:"baseline",gap:8,maxWidth:"100%",padding:"7px 12px",border:"1px solid var(--ow-border)",borderRadius:"var(--ow-radius-sm)",background:"var(--ow-surface)",fontFamily:"var(--ow-font-body)"},cN={flex:"0 0 auto",alignSelf:"center",width:6,height:6,borderRadius:"var(--ow-radius-pill)"},kp={fontFamily:"var(--ow-font-mono)",fontSize:"var(--ow-fs-mark-md)"},pN={...kp,flex:"0 0 auto",fontWeight:500,color:"var(--ow-text)"},uN={...kp,flex:"1 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--ow-text-3)"},$v={...kp,flex:"0 0 auto",fontVariantNumeric:"tabular-nums",color:"var(--ow-text-2)"};function JH({turns:e,className:t=""}){let[o,r]=useState({});return jsxs("div",{"data-slot":"transcript-spine",className:t,style:gN,children:[jsx("span",{"data-ow-part":"line","aria-hidden":"true",style:vN}),e.map((n,a)=>{if(n.role==="user")return jsxs("div",{"data-ow-part":"turn","data-role":"user",style:zv,children:[jsx("span",{"data-ow-part":"dot","aria-hidden":"true",style:bN}),jsx("div",{"data-ow-part":"user-text",style:hN,children:n.summary})]},a);let i=o[a]??!(n.collapsed??true),d=n.tools??[],s=n.steps!=null?n.steps-d.length:0,l=n.steps!=null&&n.duration?`${n.steps} \u6B65 \xB7 ${n.duration}`:n.steps!=null?`${n.steps} \u6B65`:n.duration??"";return jsxs("div",{"data-ow-part":"turn","data-role":"agent",style:zv,children:[jsx("span",{"data-ow-part":"dot","aria-hidden":"true",style:wN}),jsxs(f,{type:"button",variant:"unstyled","data-ow-part":"loop",className:"ow-focus-ring","aria-expanded":i,onClick:()=>r(c=>({...c,[a]:!i})),style:xN,children:[jsx("span",{"data-ow-part":"loop-verb",style:yN,children:n.summary}),l&&jsx("span",{"data-ow-part":"loop-meta",style:kN,children:l}),jsx("span",{"data-ow-part":"chevron","aria-hidden":"true",style:CN,children:i?"\u25BE":"\u25B8"})]}),i&&d.length>0&&jsxs("div",{"data-ow-part":"tools",style:NN,children:[d.map((c,p)=>jsxs("div",{"data-ow-part":"tool",style:SN,children:[jsx("span",{"data-ow-part":"tool-name",style:PN,children:c.name}),c.target&&jsx("span",{"data-ow-part":"tool-target",style:RN,children:c.target}),c.duration&&jsx("span",{"data-ow-part":"tool-duration",style:TN,children:c.duration})]},p)),s>0&&jsxs("div",{"data-ow-part":"tool-more",style:MN,children:["\u2026 \u5176\u4F59 ",s," \u6B65\u5DF2\u6298\u53E0"]})]})]},a)})]})}var gN={position:"relative",display:"flex",flexDirection:"column",gap:14,fontFamily:"var(--ow-font-body)"},vN={position:"absolute",left:5,top:8,bottom:9,width:1.5,background:"var(--ow-timeline)"},zv={position:"relative",paddingLeft:26},Hv={position:"absolute",left:0,top:5,width:11,height:11,borderRadius:"50%"},bN={...Hv,border:"1.5px solid var(--ow-text-3)",background:"var(--ow-turn-ground, var(--ow-surface))"},wN={...Hv,background:"var(--ow-text)"},hN={fontSize:13,lineHeight:1.6,color:"var(--ow-text)"},xN={display:"flex",alignItems:"baseline",gap:8,padding:0,border:"none",background:"transparent",fontFamily:"inherit",fontSize:13,lineHeight:1.55,textAlign:"left",cursor:"pointer"},yN={fontWeight:500,color:"var(--ow-text)"},kN={fontFamily:"var(--ow-font-mono)",fontSize:11,color:"var(--ow-text-2)",fontVariantNumeric:"tabular-nums"},CN={color:"var(--ow-text-3)",fontSize:10},NN={marginTop:8,display:"flex",flexDirection:"column",gap:5},SN={display:"flex",alignItems:"baseline",gap:8,fontFamily:"var(--ow-font-mono)",fontSize:10.5,color:"var(--ow-text-2)",fontVariantNumeric:"tabular-nums"},PN={fontWeight:500},RN={color:"var(--ow-text-3)"},TN={marginLeft:"auto",color:"var(--ow-text-3)"},MN={fontFamily:"var(--ow-font-mono)",fontSize:10,color:"var(--ow-text-3)",fontVariantNumeric:"tabular-nums"};var DN=280,EN=.8;function Cp(e){let t=Math.round(Math.max(0,Math.min(100,e.percent??0)));return e.state==="downloading"?{long:`\u4E0B\u8F7D\u4E2D ${t}%`,title:`\u6B63\u5728\u4E0B\u8F7D Orbitwork ${e.version}\uFF1A${t}%`}:e.state==="ready"?{long:"\u91CD\u542F\u5B89\u88C5",title:`\u5B89\u88C5 Orbitwork ${e.version} \u5E76\u91CD\u542F`}:e.state==="error"?{long:"\u4E0B\u8F7D\u5931\u8D25\uFF0C\u91CD\u8BD5",title:`\u91CD\u65B0\u4E0B\u8F7D Orbitwork ${e.version}`}:{long:"\u6709\u65B0\u7248\u672C",title:`\u4E0B\u8F7D Orbitwork ${e.version}`}}function jl(e){return Math.max(0,Math.round(e)).toLocaleString("en-US")}function Wv({user:e,plan:t,credits:o,version:r,update:n,theme:a,onThemeChange:i,petVisible:d,onPetVisibleChange:s,onOpenSettings:l,onOpenMemory:c,onCopyUserId:p,onCheckUpdate:m,onFeedback:u,onLogout:b,onClose:w,autoFocus:v=true,className:h}){let[x,k]=useState(false);useEffect(()=>{if(!x)return;let T=window.setTimeout(()=>k(false),2e3);return ()=>window.clearTimeout(T)},[x]);let y=e.id??e.email??e.name,P=e.email??e.id,N=o&&o.limit>0?Math.min(1,Math.max(0,o.used/o.limit)):0,S=!!o&&N>=EN,R=n?Cp(n):null,M=[{key:"settings",label:"\u8BBE\u7F6E",icon:jsx(yd,{})},{key:"memory",label:"\u8BB0\u5FC6",icon:jsx(ki,{})},...s?[{key:"pet",label:"\u684C\u9762\u5BA0\u7269",icon:jsx(Aa,{}),control:jsx(po,{checked:!!d,onChange:T=>s(T),"aria-label":"\u663E\u793A\u684C\u9762\u5BA0\u7269"})}]:[],...i?[{key:"theme",label:"\u5916\u89C2",icon:a==="dark"?jsx(_d,{}):jsx(Md,{}),control:jsx(Ht,{size:"sm",variant:"outline",options:A,value:a??"system",onChange:T=>i(T),"aria-label":"\u5916\u89C2"})}]:[],$a,{key:"feedback",label:"\u5E2E\u52A9\u4E0E\u53CD\u9988",icon:jsx(Ed,{})},{key:"update",label:"\u68C0\u67E5\u66F4\u65B0",icon:jsx(Co,{}),hint:R?jsxs("span",{className:"inline-flex items-center gap-1.5",children:[jsx("span",{"aria-hidden":"true",className:"w-1.5 h-1.5 [border-radius:var(--ow-radius-pill)] bg-[var(--ow-accent)]"}),R.long]}):jsx(aa,{content:r??"",side:"top",align:"end",disabled:!r,children:jsx("span",{className:"block max-w-[9rem] truncate",children:r})}),hintMono:!R,disabled:n?.state==="downloading"},$a,{key:"logout",label:"\u9000\u51FA\u767B\u5F55",icon:jsx(Dd,{}),danger:true}];return jsx(pt,{className:h,width:DN,autoFocus:v,ariaLabel:"\u8D26\u6237\u83DC\u5355",headerBare:true,onClose:w,header:jsxs("div",{className:"flex items-center gap-2.5 px-2 pt-1.5 pb-2.5",children:[jsx(un,{size:32,id:y,children:e.avatarUrl?jsx("img",{src:e.avatarUrl,alt:"",className:"w-full h-full object-cover",onError:T=>T.currentTarget.remove()}):e.name.slice(-1)}),jsxs("span",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[jsx("span",{className:"truncate font-semibold text-ow-fs-body leading-tight text-[color:var(--ow-text)]",children:e.name}),P&&jsx("span",{className:"truncate text-ow-fs-caption leading-tight text-[color:var(--ow-text-3)]",children:P})]}),e.id&&p&&jsx(f,{variant:"unstyled",className:"shrink-0 w-7 h-7 inline-flex items-center justify-center [border-radius:var(--ow-radius-xs)] text-[color:var(--ow-text-3)] hover:bg-[var(--ow-hover-pop)] hover:text-[color:var(--ow-text)] ow-focus-ring",title:x?"\u5DF2\u590D\u5236":"\u590D\u5236 ID","aria-label":x?"\u5DF2\u590D\u5236 ID":"\u590D\u5236 ID",onClick:()=>{p(e.id),k(true);},children:x?jsx(be,{className:"w-4 h-4"}):jsx(Tt,{className:"w-4 h-4"})})]}),banner:t||o?jsxs("div",{className:"mx-2 mb-1.5 px-3 py-2.5 bg-[var(--ow-surface-2)] border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-md)] flex flex-col gap-2",children:[t&&jsxs("div",{className:"flex items-center gap-2",children:[jsx(Ri,{className:"w-4 h-4 shrink-0 text-[color:var(--ow-text-3)]","aria-hidden":"true"}),jsx("span",{className:"flex-1 min-w-0 truncate font-medium text-ow-fs-ui leading-none text-[color:var(--ow-text)]",children:t.name}),t.action&&jsx(f,{size:"sm",variant:"secondary",onClick:t.action.onClick,children:t.action.label})]}),o&&jsxs(Fragment,{children:[jsxs("div",{className:"flex items-baseline gap-2",children:[jsx("span",{className:"flex-1 min-w-0 truncate text-ow-fs-caption leading-none text-[color:var(--ow-text-2)]",children:o.label??"\u79EF\u5206\u4F59\u989D"}),jsxs("span",{className:"shrink-0 font-[family-name:var(--ow-font-mono)] tabular-nums text-ow-fs-caption leading-none text-[color:var(--ow-text)]",children:[jl(o.used)," / ",jl(o.limit)]})]}),jsx(la,{size:"md",tone:S?"warning":"default",value:N*100,"aria-label":`${o.label??"\u79EF\u5206\u4F59\u989D"} ${jl(o.used)} / ${jl(o.limit)}`})]})]}):void 0,items:M,onSelect:T=>{if(T==="pet")return s?.(!d);T!=="theme"&&(w?.(),T==="settings"&&l(),T==="memory"&&(c??l)(),T==="feedback"&&u(),T==="update"&&m?.(),T==="logout"&&b());}})}var AN=[{value:"sm",label:"\u5C0F"},{value:"md",label:"\u6807\u51C6"},{value:"lg",label:"\u5927"}];function VW({theme:e,fontScale:t,onFontScaleChange:o,unsupportedToggles:r=[],workRoot:n,onPickWorkRoot:a,onThemeChange:i}){return jsx("div",{className:"appearance-settings",children:jsxs("div",{className:"flex flex-col gap-0",children:[jsx(dt,{title:"\u4E3B\u9898",description:"\u9009\u62E9\u6D45\u8272\u3001\u6DF1\u8272\uFF0C\u6216\u8DDF\u968F\u7CFB\u7EDF\u81EA\u52A8\u5207\u6362",className:"set-row",action:jsx(Ht,{size:"sm",options:A,value:e,onChange:d=>i(d),"aria-label":"\u4E3B\u9898"})}),o&&jsx(dt,{title:"\u5B57\u4F53\u7F29\u653E",description:"\u8C03\u6574\u754C\u9762\u6587\u5B57\u548C\u5143\u7D20\u7684\u663E\u793A\u5927\u5C0F",className:"set-row",action:jsx(Ht,{size:"sm",options:AN,value:t??"md",onChange:d=>o(d),"aria-label":"\u5B57\u4F53\u7F29\u653E"})}),r.map(d=>jsx(dt,{title:d.title,description:d.description,className:"set-row",disabled:true,action:jsx(po,{checked:false,disabled:true,"aria-label":d.title})},d.id)),a&&jsx(dt,{title:"\u9ED8\u8BA4\u5DE5\u4F5C\u76EE\u5F55",description:jsx("span",{className:"block truncate [font-family:var(--ow-font-mono)]",children:n??"\u5C1A\u672A\u8BBE\u7F6E"}),className:"set-row",action:jsx(f,{variant:"secondary",size:"sm",onClick:a,children:"\u66F4\u6539"})})]})})}var VN={dingtalk:{name:"\u9489\u9489",id:"Client ID",secret:"Client Secret",scanVerb:"\u81EA\u52A8\u521B\u5EFA\u5E94\u7528\u5E76\u56DE\u586B\u51ED\u636E"},feishu:{name:"\u98DE\u4E66",id:"Client ID",secret:"Client Secret",scanVerb:"\u7ED1\u5B9A\u5E94\u7528\u5E76\u56DE\u586B\u51ED\u636E"},wecom:{name:"\u4F01\u4E1A\u5FAE\u4FE1",id:"Bot ID",secret:"Secret",scanVerb:"\u83B7\u53D6\u673A\u5668\u4EBA\u51ED\u636E"}};function YW({platform:e,value:t,projects:o,devices:r,models:n,editing:a=false,saving:i=false,error:d,qrCode:s,onRefreshQr:l,onCreateProject:c,onChange:p,onCancel:m,onSave:u}){let[b,w]=useState(false),v=VN[e],h=y=>p({...t,...y}),x=t.showReasoning||t.showToolProgress||!t.groupRequireMention,k=i||!t.projectId||!t.deviceId||!t.modelId||t.inputMethod==="manual"&&(!t.clientId.trim()||!a&&!t.clientSecret.trim());return jsxs("div",{className:"assistant-config-page",children:[jsxs("div",{className:"assistant-config-page__content",children:[jsxs("div",{className:"assistant-config-fields",children:[jsx(uo,{items:[{key:"scan",label:a?"\u626B\u7801\u66F4\u6362":e==="wecom"?"\u626B\u7801\u83B7\u53D6":"\u626B\u7801\u521B\u5EFA"},{key:"manual",label:"\u624B\u52A8\u586B\u5199"}],activeKey:t.inputMethod,onChange:y=>h({inputMethod:y})}),t.inputMethod==="scan"?jsxs("div",{className:"assistant-scan-create",children:[jsx("span",{className:"assistant-scan-create__hint",children:a?`\u7528${v.name}\u626B\u7801\u53EF\u66F4\u6362\u5F53\u524D\u7ED1\u5B9A\uFF1B\u4E0D\u626B\u7801\u5219\u4FDD\u6301\u73B0\u6709\u914D\u7F6E\u3002`:`\u7528${v.name}\u626B\u7801${v.scanVerb}\u3002`}),jsx("div",{className:"assistant-bind-card",children:s??jsxs("div",{className:"assistant-bind-card__qr assistant-bind-card__qr--placeholder",children:[v.name,jsx("br",{}),"\u626B\u7801\u4E8C\u7EF4\u7801"]})}),l&&jsx(f,{variant:"text",onClick:l,children:"\u5237\u65B0\u4E8C\u7EF4\u7801"})]}):jsxs(Fragment,{children:[jsxs("label",{className:"assistant-field",children:[jsx("span",{className:"assistant-field__required",children:v.id}),jsx(te,{value:t.clientId,onChange:y=>h({clientId:y}),placeholder:`\u8BF7\u8F93\u5165 ${v.id}`})]}),jsxs("label",{className:"assistant-field",children:[jsx("span",{className:a?void 0:"assistant-field__required",children:v.secret}),jsx(te,{type:"password",value:t.clientSecret,onChange:y=>h({clientSecret:y}),placeholder:a?"\u7559\u7A7A\u5219\u4FDD\u6301\u73B0\u6709\u5BC6\u94A5":`\u8BF7\u8F93\u5165 ${v.secret}`})]})]}),jsxs("div",{className:"assistant-field assistant-field--select",children:[jsx("span",{children:"\u9ED8\u8BA4\u9879\u76EE"}),jsx(Nl,{value:t.projectId,options:o,onChange:y=>h({projectId:y}),onCreate:c,placeholder:"\u9009\u62E9\u9879\u76EE"})]}),jsxs("div",{className:"assistant-field assistant-field--select",children:[jsx("span",{children:"\u76EE\u6807\u8BBE\u5907"}),jsx(wr,{value:t.deviceId,options:r,onChange:y=>h({deviceId:y}),placeholder:"\u9009\u62E9\u8BBE\u5907",disabled:r.length===0})]}),jsxs("div",{className:"assistant-field assistant-field--model",children:[jsx("span",{className:"assistant-field__required",children:"\u6A21\u578B"}),jsx(An,{value:t.modelId,options:n,onChange:y=>h({modelId:y}),placeholder:"\u9009\u62E9\u6A21\u578B",emptyLabel:"\u6682\u65E0\u53EF\u7528\u6A21\u578B"})]})]}),jsxs("details",{className:"assistant-advanced",open:b,onToggle:y=>w(y.currentTarget.open),children:[jsxs("summary",{children:[jsx("b",{children:"\u9AD8\u7EA7\u9009\u9879"}),x&&jsx("span",{className:"assistant-advanced__active",children:"\u5DF2\u81EA\u5B9A\u4E49"}),jsx(ne,{})]}),jsxs("div",{className:"assistant-advanced__body",children:[jsx(dt,{title:"\u7FA4\u804A\u4EC5\u5728 @\u673A\u5668\u4EBA\u65F6\u56DE\u590D",description:"\u907F\u514D\u673A\u5668\u4EBA\u54CD\u5E94\u7FA4\u5185\u7684\u666E\u901A\u6D88\u606F\u3002",control:"switch",checked:t.groupRequireMention,onCheckedChange:y=>h({groupRequireMention:y}),divider:false,className:"px-0"}),jsx(dt,{title:"\u5C55\u793A\u601D\u8003\u8FC7\u7A0B",description:"\u5C06\u6A21\u578B\u7684\u63A8\u7406\u5185\u5BB9\u9644\u52A0\u5728\u6700\u7EC8\u56DE\u590D\u524D\u3002",control:"switch",checked:t.showReasoning,onCheckedChange:y=>h({showReasoning:y}),divider:false,className:"px-0"}),jsx(dt,{title:"\u5C55\u793A\u5DE5\u5177\u6267\u884C\u8FDB\u5EA6",description:"\u56DE\u590D\u751F\u6210\u8FC7\u7A0B\u4E2D\u5C55\u793A\u5DE5\u5177\u8C03\u7528\u53CA\u5176\u7ED3\u679C\u3002",control:"switch",checked:t.showToolProgress,onCheckedChange:y=>h({showToolProgress:y}),divider:false,className:"px-0"})]})]})]}),jsxs("div",{className:"assistant-config-page__actions",children:[jsx("span",{className:`assistant-config-page__footer-hint${d?" is-error":""}`,children:d??(i?"\u6B63\u5728\u4FDD\u5B58\u2026":`\u914D\u7F6E\u5C06\u5E94\u7528\u5230${v.name}\u6E20\u9053`)}),jsx(f,{variant:"secondary",onClick:m,disabled:i,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",onClick:u,disabled:k,children:a?"\u4FDD\u5B58":"\u521B\u5EFA\u5E76\u542F\u7528"})]})]})}function HN(e){if(!isValidElement(e))return e;let t=e.props.className??"";return t.split(/\s+/).includes("gly")?e:cloneElement(e,{className:t?`${t} gly`:"gly"})}function WN({version:e,metaItems:t,meta:o}){let r=[];e&&r.push({key:"__version",node:jsxs(Fragment,{children:["v",e]})});for(let n of t??[])r.push({key:n.key,node:jsxs(Fragment,{children:[n.count!=null&&jsxs(Fragment,{children:[n.count," "]}),n.label]})});return o&&!(t&&t.length>0)&&r.push({key:"__meta",node:o}),r.length===0?null:jsx(Fragment,{children:r.map((n,a)=>jsxs(Fragment$1,{children:[a>0&&jsx("span",{"aria-hidden":"true",children:" \xB7 "}),n.node]},n.key))})}function ql({avatar:e,glyphTone:t="neutral",name:o,version:r,updateAvailable:n,status:a,description:i,metaItems:d,meta:s,error:l,badge:c,actionLabel:p="\u4F7F\u7528",actionState:m="default",actionVariant:u="secondary",actionDisabled:b,onAction:w,onOpen:v}){return jsxs("div",{className:"skcard",role:v?"button":void 0,tabIndex:v?0:void 0,onClick:v,onKeyDown:h=>{h.target===h.currentTarget&&v&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),v());},children:[jsxs("div",{className:"skcard__top",children:[jsx($l,{value:t,children:HN(e)}),jsxs("div",{className:"body",children:[jsxs("div",{className:"n",children:[jsx("span",{className:"nt",children:o}),c,n&&jsx(Nt,{status:"update"}),a&&jsx(Nt,{status:a})]}),jsx("div",{className:"d",children:i}),l&&jsx("div",{className:"skcard__error",children:l})]})]}),jsxs("div",{className:"skcard__foot",children:[jsx("div",{className:"ft",children:jsx(WN,{version:r,metaItems:d,meta:s})}),jsx(f,{variant:u,size:"sm",disabled:b,className:u==="unstyled"?`inst${m==="installed"?" installed":m==="update"?" update":""}`:void 0,onClick:h=>{h.stopPropagation(),w?.();},children:p})]})]})}function cU({categories:e,onCategoryToggle:t,search:o,sort:r,onReset:n,actions:a,className:i}){return jsx(bf,{flush:true,className:i??"plaza__toolbar",filters:e,onFilterToggle:t,search:o,sort:r,onReset:n,actions:a})}function Uv({loading:e=false,loadingCount:t=6,error:o,errorDetail:r,onRetry:n,retryLabel:a="\u91CD\u8BD5",emptyMessage:i="\u8FD9\u91CC\u8FD8\u6CA1\u6709\u53EF\u7528\u6761\u76EE\u3002",emptyActionLabel:d,onEmptyAction:s,empty:l,children:c,className:p}){let m=Array.isArray(c)?c.flat().some(Boolean):!!c;return jsx("div",{className:p??"plaza__grid","data-ow-state":e?"loading":o?"error":void 0,children:e?jsx(Im,{count:t}):o?jsx("div",{className:"plaza__state",children:jsx(J,{variant:"error",detail:r,action:n&&jsx(f,{variant:"secondary",size:"sm",onClick:n,children:a}),children:o})}):l??!m?jsx("div",{className:"plaza__state",children:jsx(H,{message:i,actionLabel:d,onAction:s})}):c})}function UN(e){let t=e.filter(o=>o!=null&&o!==false&&o!=="");return t.length===0?null:t.map((o,r)=>jsxs(Fragment$1,{children:[r>0?" \xB7 ":null,o]},r))}function Ms({avatar:e,name:t,status:o,summary:r,meta:n,author:a="Orbitwork \u5B98\u65B9",version:i,updatedAt:d,kind:s,badges:l,actions:c,backLabel:p,onBack:m,children:u}){let b=n??UN([s,i?`v${i}`:null,a,d]);return jsxs("div",{className:"page skdetail",children:[jsxs("div",{className:"skd__head",children:[jsx(go,{className:"fs-back",onClick:m,children:p}),jsxs("div",{className:"skd__hero",children:[e,jsxs("div",{className:"meta",children:[jsxs("div",{className:"n",children:[jsx("h1",{className:"skd__title",children:t}),o,l]}),r&&jsx("div",{className:"skd__desc",children:r}),b&&jsx("div",{className:"skd__meta-line",children:b})]}),c]})]}),jsx("div",{className:"skd__scroll",children:jsx("div",{className:"skd__body",children:u})})]})}function Ja({title:e,count:t,note:o,className:r,children:n}){return jsxs("section",{className:r?`skd__section ${r}`:"skd__section",children:[jsxs("div",{className:"lbl",children:[e,t!==void 0&&jsx("span",{className:"cnt",children:t}),o&&jsx("span",{className:"skd__lbl-note",children:o})]}),n]})}function pU({children:e}){return jsx("p",{className:"skd__text",children:e})}function uU({items:e}){return jsx("div",{className:"skd__list",children:e.map(t=>jsx("div",{className:"skd__list-item",children:jsx("span",{className:"skd__list-text",children:t.text})},t.id))})}function KN({items:e}){return jsx("div",{className:"skd__chips",children:e.map(t=>jsx("span",{className:t.mono?"skd__chip skd__chip--mono":"skd__chip",children:t.text},t.id))})}function jN({rows:e,nameMono:t}){return jsx("div",{className:"skd__rows",children:e.map(o=>jsxs("div",{className:"skd__row",children:[jsx("span",{className:t?"skd__row-name skd__row-name--mono":"skd__row-name",children:o.name}),o.role&&jsx(Nt,{tone:"mute",children:o.role}),o.description&&jsx("span",{className:"skd__row-desc",children:o.description})]},o.id))})}function mU({avatar:e,name:t,version:o,updateAvailable:r,team:n,mine:a,status:i,description:d,metaItems:s,meta:l,error:c,actionLabel:p="\u4F7F\u7528",actionState:m="default",actionVariant:u="unstyled",actionDisabled:b,onAction:w,onOpen:v}){return jsx(ql,{avatar:e,glyphTone:"agent",name:t,version:o,updateAvailable:r,status:i,description:d,metaItems:s,meta:l,error:c,badge:n?jsx(Nt,{status:"team"}):a?jsx(Nt,{status:"mine"}):void 0,actionLabel:p,actionState:m,actionVariant:u,actionDisabled:b,onAction:w,onOpen:v})}function GN({items:e,links:t=[],onOpenLink:o}){return e.length===0&&t.length===0?null:jsxs("section",{className:"skd__section",children:[jsx("div",{className:"lbl",children:"\u57FA\u672C\u4FE1\u606F"}),jsxs("div",{className:"connector-kv",children:[e.map(r=>jsxs(Fragment$1,{children:[jsx("span",{children:r.label}),jsx("b",{children:r.value})]},r.id)),t.map(r=>jsxs(Fragment$1,{children:[jsx("span",{children:r.kind==="repository"?"\u6E90\u7801":"\u4E3B\u9875"}),jsx("b",{children:jsx(f,{variant:"unstyled",className:"connector-cred-summary__action",icon:r.kind==="repository"?jsx(So,{}):jsx(Mt,{}),disabled:!o,onClick:()=>o?.(r),children:r.label})})]},r.id))]})]})}function ZN({agents:e}){return e.length===0?null:jsxs("section",{className:"skd__section agent-roster",children:[jsxs("div",{className:"lbl",children:["\u56E2\u961F\u6210\u5458 ",jsx("span",{className:"cnt",children:e.length})]}),jsx("div",{className:"agent-roster__grid",children:e.map(t=>jsxs("div",{className:`agent-roster__item${t.role==="leader"?" is-leader":""}`,children:[jsx("span",{className:"agent-roster__avatar",children:t.avatar??String(t.name).slice(0,1)}),jsxs("div",{className:"agent-roster__body",children:[jsxs("div",{className:"agent-roster__name",children:[t.name,jsx("span",{className:`agent-roster__role is-${t.role}`,children:t.role==="leader"?"\u8D1F\u8D23\u4EBA":"\u6210\u5458"})]}),t.description&&jsx("div",{className:"agent-roster__description",children:t.description})]})]},t.id))})]})}function Np({installed:e,outdated:t,installing:o}){if(o)return "installing";if(e)return t?"update":"installed"}function Sp({actions:e,leading:t,menuItems:o=[],disabled:r,onMenuSelect:n}){let[a,...i]=e,s=[...i.map(c=>({key:c.key,label:typeof c.label=="string"?c.label:c.key,icon:c.icon??jsx(Go,{}),danger:c.variant==="danger",disabled:c.disabled})),...o],l=c=>{let p=i.find(m=>m.key===c);if(p){p.onAction?.();return}n?.(c);};return jsxs("div",{className:"acts",children:[t,a&&jsx(f,{variant:a.variant??"primary",icon:a.icon,disabled:r||a.disabled,onClick:a.onAction,children:a.label}),s.length>0&&jsx(pl,{disabled:r,items:s,onSelect:l})]})}function Pp({installed:e,outdated:t,installing:o,disabled:r,primaryLabel:n,primaryIcon:a,primaryVisible:i=true,primaryDisabled:d,menuItems:s=[],onInstall:l,onUpdate:c,onPrimaryAction:p,onMenuSelect:m}){let u=o||r,b=[...!e&&l?[{key:"install",label:o?"\u5B89\u88C5\u4E2D\u2026":"\u5B89\u88C5",onAction:l}]:[],...e&&t&&c?[{key:"update",label:o?"\u66F4\u65B0\u4E2D\u2026":"\u66F4\u65B0",onAction:c}]:[],...e&&i?[{key:"primary",label:n,icon:a,variant:"primary",disabled:d,onAction:p}]:[]];return jsx(Sp,{actions:b,menuItems:e?s:[],disabled:u,onMenuSelect:m})}function fU({avatar:e,name:t,author:o="Orbitwork Labs",version:r,description:n,team:a,agents:i=[],skills:d=[],connectors:s=[],commands:l=[],starters:c=[],installed:p,outdated:m,installing:u,error:b,backLabel:w="\u8FD4\u56DE\u63D2\u4EF6 \xB7 \u4E13\u5BB6",connectorManagement:v,actionLabel:h="\u4F7F\u7528",actionIcon:x=jsx(Ia,{}),actionDisabled:k,overflowItems:y=[],overviewItems:P=[],overviewLinks:N=[],onBack:S,onInstall:R,onUpdate:M,onUse:T,onOverflowSelect:_,onOpenOverviewLink:L,onUninstall:I}){let $=Np({installed:p,outdated:m,installing:u}),F=(E,O)=>E.length===0?jsx("div",{className:"skd__empty",children:"\u672A\u914D\u7F6E"}):E.some(z=>z.description)?jsx(jN,{nameMono:O,rows:E.map(z=>({id:z.id,name:z.name,description:z.description}))}):jsx(KN,{items:E.map(z=>({id:z.id,text:z.name,mono:O}))});return jsxs(Ms,{avatar:e,name:t,author:o,version:r,status:$&&jsx(Nt,{status:$}),kind:a?"\u56E2\u961F":"\u4E13\u5BB6",summary:n,backLabel:w,onBack:S,actions:jsx(Pp,{installed:!!p,outdated:m,installing:u,primaryLabel:h,primaryIcon:x,primaryDisabled:k,onInstall:R,onUpdate:M,onPrimaryAction:()=>T?.(),menuItems:[...y,...I?[{key:"uninstall",label:"\u5378\u8F7D",icon:jsx(Le,{}),danger:true}]:[]],onMenuSelect:E=>{_?.(E),E==="uninstall"&&I?.();}}),children:[b&&jsx("div",{className:"mcp-card__err",children:jsx("span",{children:b})}),jsx(GN,{items:P,links:N,onOpenLink:L}),a&&jsx(ZN,{agents:i}),jsx(Ja,{title:"\u6280\u80FD",count:d.length,children:F(d)}),jsx(Ja,{title:"\u8FDE\u63A5\u5668",count:s.length,children:v??F(s)}),jsx(Ja,{title:"\u547D\u4EE4",count:l.length,children:F(l,true)}),c.length>0&&jsx(Ja,{title:"\u5EFA\u8BAE\u5F00\u573A",children:jsx("div",{className:"skd__meta-grid",children:c.map((E,O)=>jsx("div",{className:"skd__meta-item",children:jsx("span",{className:"n",children:E})},O))})})]})}function gU({logo:e,name:t,version:o,description:r,updateAvailable:n,status:a,mine:i,badge:d,metaItems:s,actionLabel:l="\u4F7F\u7528",actionState:c="default",actionVariant:p="secondary",actionDisabled:m,onAction:u,onOpen:b}){return jsx(ql,{avatar:jsx("span",{className:"connector-logo",children:e}),name:t,version:o,description:r,updateAvailable:n,status:a,badge:d??(i?jsx(Nt,{status:"mine"}):void 0),metaItems:s,actionLabel:l,actionState:c,actionVariant:p,actionDisabled:m,onAction:u??b,onOpen:b})}function hU({sourceTitle:e,label:t="\u6B64\u4EFB\u52A1\u6E90\u81EA",onSourceClick:o}){return jsx(Vg,{className:"my-[var(--ow-space-5,20px)]",sourceTitle:e,label:t,onSourceClick:o})}var YN=[{selector:"[data-chat-container]",surface:"chat"},{selector:"[data-message-bubble]",part:"message-bubble"},{selector:"[data-message-avatar]",part:"avatar"},{selector:"[data-composer]",surface:"composer"},{selector:"[data-composer-input]",part:"input"},{selector:"[data-composer-toolbar]",part:"toolbar"},{selector:"[data-sidebar]",surface:"sidebar"},{selector:"[data-sidebar-item]",part:"sidebar-item"},{selector:"[data-file-icon]",part:"file-icon"},{selector:"[data-browser-preview]",surface:"browser"},{selector:"[data-workbench]",surface:"workbench"}];function Kv(){let e=()=>{for(let o of YN){let r=document.querySelectorAll(o.selector);for(let n of r)o.surface&&!n.hasAttribute("data-ow-surface")&&n.setAttribute("data-ow-surface",o.surface),o.part&&!n.hasAttribute("data-ow-part")&&n.setAttribute("data-ow-part",o.part),o.role&&!n.hasAttribute("data-ow-role")&&n.setAttribute("data-ow-role",o.role);}};e();let t=new MutationObserver(()=>{e();});return t.observe(document.body,{childList:true,subtree:true}),t}function kU(e){return e.hasAttribute("data-ow-surface")||e.hasAttribute("data-ow-part")||e.hasAttribute("data-ow-role")}function CU(e){return {surface:e.getAttribute("data-ow-surface")||void 0,part:e.getAttribute("data-ow-part")||void 0,role:e.getAttribute("data-ow-role")||void 0,state:e.getAttribute("data-ow-state")||void 0}}var Gv="ow-theme",Rp="ow-skin-id",Zv=createContext(null);function jv(){return typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function e4(){try{let e=window.localStorage.getItem(Gv);if(e==="light"||e==="dark"||e==="system")return e}catch{}return "system"}function t4(){try{let e=window.localStorage.getItem(Rp);return u.find(t=>t.id===e)??null}catch{return null}}function o4({children:e,initialTheme:t,initialSkinId:o,initialCustomSkins:r=[]}){let[n,a]=useState(t??e4),[i,d]=useState(()=>n==="system"?jv():n),[s,l]=useState(()=>o&&o!=="default"?u.find(S=>S.id===o)??r.find(S=>S.id===o)??null:t4()),[c,p]=useState(r),[m,u$1]=useState(null),b=m!==null,w=u,v=[...u,...c];useEffect(()=>{if(n!=="system"){d(n);return}let S=()=>d(jv());S();let R=window.matchMedia("(prefers-color-scheme: dark)");return R.addEventListener("change",S),()=>R.removeEventListener("change",S)},[n]),useEffect(()=>{document.documentElement.setAttribute("data-theme",i);},[i]),useEffect(()=>{let S=m??s;x(document.documentElement,S,i);},[i,s,m]),useEffect(()=>{let S=Kv();return ()=>S.disconnect()},[]);let h=useCallback(S=>{a(S);try{window.localStorage.setItem(Gv,S);}catch{}},[]),x$1=useCallback(S=>{l(S),u$1(null);try{S?window.localStorage.setItem(Rp,S.id):window.localStorage.removeItem(Rp);}catch{}},[]),k=useCallback(S=>{u$1(S);},[]),y=useCallback(()=>{m&&x$1(m);},[m,x$1]),P=useCallback(()=>{u$1(null);},[]),N=useMemo(()=>({theme:n,resolvedTheme:i,setTheme:h,skin:s,skinId:s?.id??"default",setSkin:x$1,builtinSkins:w,customSkins:c,setCustomSkins:p,skins:v,tryOnSkin:m,tryOn:k,applySkin:y,cancelTryOn:P,isTryingOn:b}),[n,i,h,s,x$1,w,c,p,v,m,k,y,P,b]);return jsx(Zv.Provider,{value:N,children:e})}function en(){let e=useContext(Zv);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}var a4=new Set(["name","logo","favicon","colors","typography","branding"]),qv=new Set(["bg","surface","surface2","text","text2","text3","border","borderStrong"]),n4=new Set(["fontSans","fontMono"]),i4=new Set(["productName","companyName","claim","claimNote","slogan"]),oi={name:48,productName:48,companyName:64,claim:24,claimNote:32,slogan:48},Yv=400,s4=1048576,l4=/^(?:$|data:image\/(?:png|svg\+xml|webp|jpeg);|https?:\/\/)/i;function Xv(e,t,o){if(e===void 0){if(o)throw new Error(`${t} \u5FC5\u586B`);return}if(typeof e!="string")throw new Error(`${t} \u5FC5\u987B\u662F\u5B57\u7B26\u4E32`);if(e.length>s4)throw new Error(`${t} \u8D85\u51FA\u957F\u5EA6\u4E0A\u9650`);if(!l4.test(e))throw new Error(`${t} \u5FC5\u987B\u662F data:image URI \u6216 http(s) URL`);return e}function ri(e,t,o,r){if(e===void 0){if(r)throw new Error(`${t} \u5FC5\u586B`);return}if(typeof e!="string")throw new Error(`${t} \u5FC5\u987B\u662F\u5B57\u7B26\u4E32`);if(e.trim().length===0)throw new Error(`${t} \u4E0D\u80FD\u4E3A\u7A7A`);if(e.length>o)throw new Error(`${t} \u8D85\u51FA\u957F\u5EA6\u4E0A\u9650\uFF08${o}\uFF09`);return e}function d4(e){if(!t(e))throw new Error("branding \u5FC5\u987B\u662F\u5BF9\u8C61");s(e,i4,"branding");let t$1=ri(e.productName,"branding.productName",oi.productName,true),o=ri(e.companyName,"branding.companyName",oi.companyName,true),r={productName:t$1,companyName:o},n=ri(e.claim,"branding.claim",oi.claim,false),a=ri(e.claimNote,"branding.claimNote",oi.claimNote,false),i=ri(e.slogan,"branding.slogan",oi.slogan,false);return n!==void 0&&(r.claim=n),a!==void 0&&(r.claimNote=a),i!==void 0&&(r.slogan=i),r}function Ds(e){try{if(!t(e))throw new Error("\u79DF\u6237\u4E3B\u9898\u5FC5\u987B\u662F JSON \u5BF9\u8C61");s(e,a4,"\u79DF\u6237\u4E3B\u9898");let t$1=ri(e.name,"name",oi.name,!0),o=Xv(e.logo,"logo",!0),r=Xv(e.favicon,"favicon",!1);if(!t(e.colors))throw new Error("colors \u5FC5\u987B\u662F\u5BF9\u8C61");s(e.colors,qv,"colors");let n={};for(let s of qv){let l=e.colors[s];if(typeof l!="string"||!a$1.test(l))throw new Error(`colors.${s} \u5FC5\u987B\u662F\u5341\u516D\u8FDB\u5236\u989C\u8272`);n[s]=l;}if(!t(e.typography))throw new Error("typography \u5FC5\u987B\u662F\u5BF9\u8C61");s(e.typography,n4,"typography");let a=e.typography.fontSans,i=e.typography.fontMono;if(typeof a!="string"||a.length>Yv)throw new Error("typography.fontSans \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");if(typeof i!="string"||i.length>Yv)throw new Error("typography.fontMono \u5FC5\u987B\u662F\u5B57\u7B26\u4E32");let d=d4(e.branding);return {ok:!0,theme:{name:t$1,logo:o,...r!==void 0?{favicon:r}:{},colors:n,typography:{fontSans:a,fontMono:i},branding:d}}}catch(t){return {ok:false,error:t instanceof Error?t.message:String(t)}}}function c4(e){return {id:`tenant-${e.name}`,name:e.name,source:"tenant",branding:{...e.branding,logo:e.logo,favicon:e.favicon},colors:e.colors,typography:e.typography}}function p4(e){let t=e.modes?.light,o=e.modes?.dark;return {id:e.id,name:e.name,source:"user",colors:t?{bg:t.backgroundPrimary||"#F7F6F1",surface:t.backgroundSecondary||"#FDFDFC",surface2:t.backgroundTertiary||"#F1F0EA",text:t.foregroundPrimary||"#333B50",text2:t.foregroundSecondary||"#646B7A",text3:t.foregroundMuted||"#A2A5A9",border:t.borderSubtle||"#DCDCD7",borderStrong:t.borderStrong||"#C2C3C1"}:void 0,assets:t?.chatBackgroundImage?{chatBackground:{light:t.chatBackgroundImage,dark:o?.chatBackgroundImage}}:void 0}}function Qv(e,t){let o=c4(e);if(!t)return o;let r=p4(t);return {...o,branding:o.branding,colors:r.colors||o.colors,radius:r.radius||o.radius,typography:o.typography,assets:r.assets,id:t.id,name:t.name,source:"user"}}function Mp(e="/api/v1/tenant/theme"){let t=en(),[o,r]=useState(null),[n,a]=useState(true),[i,d]=useState(null);useEffect(()=>{(async()=>{try{a(!0);let p=await fetch(e);if(!p.ok)throw new Error(`Failed to load tenant theme: ${p.status}`);let m=await p.json(),u=Ds(m);if(!u.ok)throw new Error(`\u79DF\u6237\u4E3B\u9898\u5951\u7EA6\u975E\u6CD5\uFF1A${u.error}`);r(u.theme);}catch(p){d(p instanceof Error?p.message:"Failed to load tenant theme"),console.warn("[useUnifiedTheme]",p);}finally{a(false);}})();},[e]);let s=t.tryOnSkin||t.skin,l=useMemo(()=>o?Qv(o,s):null,[o,s]);return {...t,tenantTheme:o,tenantLoading:n,tenantError:i,unifiedTheme:l}}var b4={branding:null,tenantLoading:false,tenantError:null},Jv=createContext(null);function w4({children:e,apiUrl:t}){let{unifiedTheme:o,tenantLoading:r,tenantError:n}=Mp(t),a=useMemo(()=>({branding:o?.branding??null,tenantLoading:r,tenantError:n}),[o,r,n]);return jsx(Jv.Provider,{value:a,children:e})}function h4(){return useContext(Jv)??b4}function y4(e,t,o){if(n(t)){console.warn(`[Orbitwork Theme] ${t} \u547D\u4E2D DS2 \u7981\u8986\u76D6\u6E05\u5355\uFF0C\u5DF2\u5FFD\u7565`);return}e.style.setProperty(t,o);}var eb=[["--ow-bg",e=>e.colors.bg],["--ow-surface",e=>e.colors.surface],["--ow-surface-2",e=>e.colors.surface2],["--ow-text",e=>e.colors.text],["--ow-text-2",e=>e.colors.text2],["--ow-text-3",e=>e.colors.text3],["--ow-border",e=>e.colors.border],["--ow-border-strong",e=>e.colors.borderStrong],["--ow-font-sans",e=>e.typography.fontSans],["--ow-font-mono",e=>e.typography.fontMono]];function Xl(e){let t=document.documentElement;for(let[o,r]of eb)y4(t,o,r(e));t.setAttribute("data-tenant-theme",e.name);}function _p(){let e=document.documentElement;for(let[t]of eb)e.style.removeProperty(t);e.removeAttribute("data-tenant-theme");}function k4(){return document.documentElement.getAttribute("data-tenant-theme")}function Dp(e="/api/v1/tenant/theme"){let[t,o]=useState(null),[r,n]=useState(true),[a,i]=useState(null);return useEffect(()=>((async()=>{try{n(!0);let l=await fetch(e);if(!l.ok)throw new Error(`Failed to load theme: ${l.status}`);let c=await l.json(),p=Ds(c);if(!p.ok)throw new Error(`\u79DF\u6237\u4E3B\u9898\u5951\u7EA6\u975E\u6CD5\uFF1A${p.error}`);o(p.theme),Xl(p.theme);}catch(l){i(l instanceof Error?l.message:"Failed to load theme"),console.warn("[useTenantTheme]",l);}finally{n(false);}})(),()=>{_p();}),[e]),{theme:t,loading:r,error:a,switchTheme:s=>{o(s),Xl(s);}}}var N4={name:"default",logo:"",colors:{bg:"#F7F6F1",surface:"#FDFDFC",surface2:"#F1F0EA",text:"#333B50",text2:"#646B7A",text3:"#A2A5A9",border:"#DCDCD7",borderStrong:"#C2C3C1"},typography:{fontSans:"'HarmonyOS Sans SC', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif",fontMono:"'IBM Plex Mono', ui-monospace, 'SF Mono', monospace"},branding:{productName:"Orbitwork",companyName:"Orbitwork AI"}},S4={name:"enterprise",logo:"",colors:{bg:"#F4F1EC",surface:"#FCFAF7",surface2:"#EFEAE3",text:"#33302B",text2:"#6B655C",text3:"#A8A29A",border:"#DDD7CE",borderStrong:"#C4BDB2"},typography:{fontSans:"'IBM Plex Sans', 'HarmonyOS Sans SC', 'Noto Sans SC', sans-serif",fontMono:"'IBM Plex Mono', ui-monospace, monospace"},branding:{productName:"Enterprise Portal",companyName:"ACME Corporation",claim:"\u667A\u80FD\u5DE5\u4F5C\uFF0C\u4ECE\u767B\u5F55\u5F00\u59CB",claimNote:"\u8FDE\u63A5\u4F60\u7684\u56E2\u961F\u4E0E AI \u52A9\u624B",slogan:"\u4EA4\u7ED9\u56E2\u961F\uFF0C\u7EE7\u7EED\u521B\u9020\u3002"}};function P4(){let{theme:e,loading:t,error:o,switchTheme:r}=Dp();return t?jsxs("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"flex h-screen items-center justify-center gap-2 text-ow-fs-ui text-ow-text-2",children:[jsx(gt,{size:16}),jsx("span",{children:"\u6B63\u5728\u52A0\u8F7D\u4E3B\u9898\u2026"})]}):o?jsx("div",{"data-ow-part":"error",className:"flex h-screen items-center justify-center p-8",children:jsx("div",{className:"w-full max-w-[560px]",children:jsx(J,{variant:"error",detail:o,children:"\u4E3B\u9898\u6CA1\u52A0\u8F7D\u51FA\u6765\u3002"})})}):jsx("div",{className:"min-h-screen bg-ow-surface p-8",children:jsxs("div",{className:"max-w-4xl mx-auto",children:[jsxs("div",{className:"mb-8",children:[jsxs("h1",{className:"text-ow-fs-title font-semibold text-ow-text mb-2",children:[e?.branding.productName||"Orbitwork"," \u4E3B\u9898\u6F14\u793A"]}),jsxs("p",{className:"text-ow-fs-body text-ow-text-3",children:["\u5F53\u524D\u4E3B\u9898: ",e?.name," | ",e?.branding.companyName]}),e?.branding.slogan?jsxs("p",{className:"text-ow-fs-body text-ow-text-3",children:["\u79DF\u6237\u53E3\u53F7: ",e.branding.slogan]}):null]}),jsx(zt,{title:"\u4E3B\u9898\u5207\u6362",className:"mb-6",children:jsxs("div",{className:"flex gap-3",children:[jsx(f,{variant:"primary",size:"md",onClick:()=>r(N4),children:"\u9ED8\u8BA4\u4E3B\u9898"}),jsx(f,{variant:"secondary",size:"md",onClick:()=>r(S4),children:"\u4F01\u4E1A\u4E3B\u9898"})]})}),jsx(zt,{title:"\u7EC4\u4EF6\u5C55\u793A",className:"mb-6",children:jsxs("div",{className:"space-y-6",children:[jsxs("div",{children:[jsx("h3",{className:"text-ow-fs-body font-semibold text-ow-text mb-3",children:"\u6309\u94AE"}),jsxs("div",{className:"flex gap-2 flex-wrap",children:[jsx(f,{variant:"primary",size:"sm",children:"\u4E3B\u6309\u94AE \xB7 \u5C0F"}),jsx(f,{variant:"primary",size:"md",children:"\u4E3B\u6309\u94AE \xB7 \u4E2D"}),jsx(f,{variant:"secondary",size:"md",children:"\u6B21\u6309\u94AE"}),jsx(f,{variant:"ghost",size:"md",children:"\u5E7D\u7075\u94AE"}),jsx(f,{variant:"danger",size:"md",children:"\u5371\u9669\u94AE"})]})]}),jsxs("div",{children:[jsx("h3",{className:"text-ow-fs-body font-semibold text-ow-text mb-3",children:"\u5FBD\u7AE0"}),jsxs("div",{className:"flex gap-2 flex-wrap",children:[jsx(at,{variant:"normal",dot:true,children:"\u5E38\u89C4"}),jsx(at,{variant:"success",dot:true,children:"\u6210\u529F"}),jsx(at,{variant:"warning",dot:true,children:"\u8B66\u544A"}),jsx(at,{variant:"error",dot:true,children:"\u9519\u8BEF"}),jsx(at,{variant:"pending",dot:true,children:"\u7B49\u5F85\u4E2D"})]})]}),jsxs("div",{children:[jsx("h3",{className:"text-ow-fs-body font-semibold text-ow-text mb-3",children:"\u8F93\u5165\u6846"}),jsx(te,{value:"",onChange:()=>{},placeholder:"\u8F93\u5165\u5185\u5BB9..."})]})]})}),jsx(zt,{title:"\u5F53\u524D\u989C\u8272\u914D\u7F6E",className:"mb-6",children:jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[jsx(ai,{label:"\u5730",token:"--ow-bg",color:e?.colors.bg}),jsx(ai,{label:"\u9762",token:"--ow-surface",color:e?.colors.surface}),jsx(ai,{label:"\u5D4C\u5957\u4E95",token:"--ow-surface-2",color:e?.colors.surface2}),jsx(ai,{label:"\u6B63\u6587\u5B57",token:"--ow-text",color:e?.colors.text}),jsx(ai,{label:"\u6B21\u7EA7\u5B57",token:"--ow-text-2",color:e?.colors.text2}),jsx(ai,{label:"\u9ED8\u8BA4\u8FB9",token:"--ow-border",color:e?.colors.border})]})})]})})}function ai({label:e,token:t,color:o}){return jsxs("div",{className:"flex items-center gap-2",children:[jsx("div",{className:"w-10 h-10 [border-radius:var(--ow-radius-control)] border border-ow-border-strong",style:{backgroundColor:o??`var(${t})`}}),jsxs("div",{children:[jsx("div",{className:"text-ow-fs-caption font-medium text-ow-text",children:e}),jsx("div",{className:"text-ow-fs-caption text-ow-text-3 font-mono tabular-nums",children:o??t})]})]})}function Ep(e){let t=JSON.stringify(e,null,2),o=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(o),n=document.createElement("a");n.href=r,n.download=`${e.id}.ow-skin.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r);}async function Ip(e){try{if(!e.name.endsWith(".ow-skin.json"))return {error:"\u6587\u4EF6\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u9009\u62E9 .ow-skin.json \u6587\u4EF6"};if(e.size>1024*1024)return {error:"\u6587\u4EF6\u8FC7\u5927\uFF0C\u76AE\u80A4\u6587\u4EF6\u4E0D\u5E94\u8D85\u8FC7 1MB"};let t=await e.text(),o;try{o=JSON.parse(t);}catch{return {error:"JSON \u683C\u5F0F\u9519\u8BEF\uFF0C\u65E0\u6CD5\u89E3\u6790"}}let r=q(o);return r.ok?{skin:r.skin}:{error:`\u76AE\u80A4\u9A8C\u8BC1\u5931\u8D25: ${r.error}`}}catch(t){return {error:t instanceof Error?t.message:"\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"}}}async function Ap(e){try{let t=await fetch(e);if(!t.ok)return {error:`\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25: ${t.status} ${t.statusText}`};let o=await t.json(),r=q(o);return r.ok?{skin:r.skin}:{error:`\u76AE\u80A4\u9A8C\u8BC1\u5931\u8D25: ${r.error}`}}catch(t){return {error:t instanceof Error?t.message:"\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 URL \u662F\u5426\u6B63\u786E"}}}function Bp(e){let t=JSON.stringify(e);return `orbitwork://skin/${btoa(encodeURIComponent(t))}`}function Op(e){try{if(!e.startsWith("orbitwork://skin/"))return {error:"\u5206\u4EAB\u94FE\u63A5\u683C\u5F0F\u9519\u8BEF"};let t=e.replace("orbitwork://skin/",""),o=decodeURIComponent(atob(t)),r=JSON.parse(o),n=q(r);return n.ok?{skin:n.skin}:{error:`\u76AE\u80A4\u9A8C\u8BC1\u5931\u8D25: ${n.error}`}}catch(t){return {error:t instanceof Error?t.message:"\u5206\u4EAB\u94FE\u63A5\u89E3\u6790\u5931\u8D25"}}}function ni(e){try{let t=JSON.stringify(e);window.localStorage.setItem("ow-custom-skins",t);}catch(t){console.error("Failed to save custom skins:",t);}}function R4(){try{let e=window.localStorage.getItem("ow-custom-skins");if(!e)return [];let t=JSON.parse(e);return Array.isArray(t)?t.map(o=>q(o)).filter(o=>o.ok).map(o=>o.skin):[]}catch(e){return console.error("Failed to load custom skins:",e),[]}}function M4(){let{theme:e,setTheme:t,skin:o,setSkin:r,builtinSkins:n,customSkins:a,setCustomSkins:i,skins:d,tryOnSkin:s,tryOn:l,applySkin:c,cancelTryOn:p,isTryingOn:m}=en(),[u,b]=useState(""),[w,v]=useState(null),[h,x]=useState(null),[k,y]=useState(null),P=useRef(null),N=useCallback(async L=>{let I=L.target.files?.[0];if(!I)return;y(I.name),x(null);let $=await Ip(I);if($.error)x($.error);else if($.skin){if(d.some(O=>O.id===$.skin.id)){x(`\u76AE\u80A4 ID "${$.skin.id}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u4FEE\u6539\u76AE\u80A4 ID \u540E\u91CD\u65B0\u5BFC\u5165`);return}let E=[...a,$.skin];i(E),ni(E),l($.skin);}P.current&&(P.current.value="");},[a,i,d,l]),S=useCallback(async()=>{if(!u.trim()){x("\u8BF7\u8F93\u5165\u76AE\u80A4 URL");return}if(x(null),u.startsWith("orbitwork://")){let L=Op(u);if(L.error)x(L.error);else if(L.skin){if(d.some(F=>F.id===L.skin.id)){x(`\u76AE\u80A4 ID "${L.skin.id}" \u5DF2\u5B58\u5728`);return}let $=[...a,L.skin];i($),ni($),l(L.skin),b("");}}else {let L=await Ap(u);if(L.error)x(L.error);else if(L.skin){if(d.some(F=>F.id===L.skin.id)){x(`\u76AE\u80A4 ID "${L.skin.id}" \u5DF2\u5B58\u5728`);return}let $=[...a,L.skin];i($),ni($),l(L.skin),b("");}}},[u,a,i,d,l]),R=useCallback(L=>{Ep(L);},[]),M=useCallback(L=>{let I=Bp(L);v(I);},[]),T=useCallback(L=>{if(!window.confirm(`\u786E\u5B9A\u5220\u9664\u76AE\u80A4 "${L.name}" \u5417\uFF1F`))return;let I=a.filter($=>$.id!==L.id);i(I),ni(I),o?.id===L.id&&r(null);},[a,i,o,r]),_=s??o;return jsx("div",{className:"min-h-screen bg-ow-surface p-8",children:jsxs("div",{className:"max-w-6xl mx-auto",children:[jsxs("div",{className:"mb-8",children:[jsx("h1",{className:"text-ow-fs-title font-semibold text-ow-text mb-2",children:"\u76AE\u80A4\u7BA1\u7406"}),jsx("p",{className:"text-ow-fs-body text-ow-text-3",children:"\u5BFC\u5165\u3001\u8BD5\u7A7F\u3001\u5BFC\u51FA\u548C\u5206\u4EAB\u81EA\u5B9A\u4E49\u76AE\u80A4"})]}),jsx(zt,{title:"\u4E3B\u9898\u6A21\u5F0F",className:"mb-6",children:jsx(Ht,{"aria-label":"\u4E3B\u9898\u6A21\u5F0F",size:"sm",value:e,onChange:L=>t(L),options:[{value:"light",label:"\u6D45\u8272"},{value:"dark",label:"\u6DF1\u8272"},{value:"system",label:"\u8DDF\u968F\u7CFB\u7EDF"}]})}),m&&jsx(zt,{title:"\u8BD5\u7A7F\u9884\u89C8",className:"mb-6 border border-ow-border-strong",children:jsxs("div",{className:"space-y-3",children:[jsxs("p",{className:"text-ow-fs-body text-ow-text-2",children:["\u6B63\u5728\u8BD5\u7A7F: ",jsx("strong",{children:s?.name})]}),jsxs("div",{className:"flex gap-2",children:[jsx(f,{variant:"primary",size:"md",onClick:c,children:"\u5E94\u7528\u6B64\u76AE\u80A4"}),jsx(f,{variant:"secondary",size:"md",onClick:p,children:"\u53D6\u6D88\u8BD5\u7A7F"})]})]})}),jsx(zt,{title:"\u5BFC\u5165\u76AE\u80A4",className:"mb-6",children:jsxs("div",{className:"space-y-4",children:[jsxs("div",{children:[jsx("label",{className:"text-ow-fs-body font-medium text-ow-text mb-2 block",children:"\u4ECE\u6587\u4EF6\u5BFC\u5165"}),jsx("input",{ref:P,type:"file",accept:".ow-skin.json",onChange:N,className:"hidden"}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(f,{variant:"secondary",size:"md",onClick:()=>P.current?.click(),children:"\u9009\u62E9\u6587\u4EF6"}),jsx("span",{className:"text-ow-fs-caption text-ow-text-3",children:k??"\u5C1A\u672A\u9009\u62E9\u6587\u4EF6"})]})]}),jsxs("div",{children:[jsx("label",{className:"text-ow-fs-body font-medium text-ow-text mb-2 block",children:"\u4ECE URL \u5BFC\u5165"}),jsx("p",{className:"text-ow-fs-caption text-ow-text-3 mb-2",children:"\u652F\u6301 HTTP/HTTPS URL \u6216 orbitwork:// \u5206\u4EAB\u94FE\u63A5"}),jsxs("div",{className:"flex gap-2",children:[jsx(te,{value:u,onChange:b,placeholder:"https://example.com/skin.json \u6216 orbitwork://skin/...",className:"flex-1"}),jsx(f,{variant:"secondary",size:"md",onClick:S,children:"\u5BFC\u5165"})]})]}),h&&jsx(J,{variant:"error",children:h})]})}),w&&jsx(zt,{title:"\u5206\u4EAB\u94FE\u63A5",className:"mb-6",children:jsxs("div",{className:"space-y-3",children:[jsx("p",{className:"text-ow-fs-caption text-ow-text-3",children:'\u5C06\u6B64\u94FE\u63A5\u5206\u4EAB\u7ED9\u5176\u4ED6\u7528\u6237\uFF0C\u4ED6\u4EEC\u53EF\u4EE5\u901A\u8FC7"\u5BFC\u5165\u5206\u4EAB\u94FE\u63A5"\u6309\u94AE\u5BFC\u5165\u76AE\u80A4'}),jsx("div",{className:"p-3 bg-ow-surface-2 [border-radius:var(--ow-radius-control)] break-all font-mono text-ow-fs-caption text-ow-text-2",children:w}),jsxs("div",{className:"flex gap-2",children:[jsx(f,{variant:"secondary",size:"sm",onClick:()=>{navigator.clipboard.writeText(w);},children:"\u590D\u5236\u94FE\u63A5"}),jsx(f,{variant:"ghost",size:"sm",onClick:()=>v(null),children:"\u5173\u95ED"})]})]})}),jsx(zt,{title:"\u5185\u7F6E\u76AE\u80A4",className:"mb-6",children:jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map(L=>jsx(tb,{skin:L,isActive:_?.id===L.id,onTryOn:()=>l(L),onApply:()=>r(L),onExport:()=>R(L),onShare:()=>M(L)},L.id))})}),a.length>0&&jsx(zt,{title:"\u81EA\u5B9A\u4E49\u76AE\u80A4",className:"mb-6",children:jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:a.map(L=>jsx(tb,{skin:L,isActive:_?.id===L.id,onTryOn:()=>l(L),onApply:()=>r(L),onExport:()=>R(L),onShare:()=>M(L),onDelete:()=>T(L)},L.id))})})]})})}function tb({skin:e,isActive:t,onTryOn:o,onApply:r,onExport:n,onShare:a,onDelete:i}){return jsxs("div",{className:`p-3.5 border border-ow-border [border-radius:var(--ow-radius-card)] ${t?"bg-[var(--ow-current-bg)]":"bg-ow-bg"}`,children:[jsxs("div",{className:"mb-3",children:[jsxs("div",{className:"flex items-center justify-between mb-1",children:[jsx("h3",{className:"text-ow-fs-body font-semibold text-ow-text",children:e.name}),t&&jsx(at,{variant:"success",dot:true,children:"\u5F53\u524D"})]}),e.description&&jsx("p",{className:"text-ow-fs-caption text-ow-text-3 line-clamp-2",children:e.description})]}),jsxs("div",{className:"flex flex-wrap gap-2",children:[!t&&jsx(f,{variant:"secondary",size:"sm",onClick:o,children:"\u8BD5\u7A7F"}),!t&&jsx(f,{variant:"ghost",size:"sm",onClick:r,children:"\u5E94\u7528"}),jsx(f,{variant:"ghost",size:"sm",onClick:n,children:"\u5BFC\u51FA"}),jsx(f,{variant:"ghost",size:"sm",onClick:a,children:"\u5206\u4EAB"}),i&&jsx(f,{variant:"danger",size:"sm",onClick:i,children:"\u5220\u9664"})]})]})}function RK({illustrationSrc:e,title:t="\u5728\u4E0B\u65B9\u8F93\u5165\u4F60\u7684\u95EE\u9898\u6216\u60F3\u6CD5\uFF0COrbitwork \u968F\u65F6\u5F85\u547D\u3002",status:o,composer:r,actionLabel:n,onAction:a,action:i}){let{resolvedTheme:d,skin:s}=en(),c=p(s,d);return jsxs("div",{className:g("chat-empty",c&&"chat-empty--has-background"),children:[jsx(H,{className:"chat-empty__state",message:t,actionLabel:n,onAction:a,action:i}),o,r&&jsx("div",{className:"empty-composer",children:r})]})}var L4={thinking:"\u601D\u8003\u4E2D",running:"\u8FD0\u884C\u4E2D",done:"\u5DF2\u5B8C\u6210"},D4=["Mod","T"];function EK({title:e,runState:t=null,runLabel:o,elapsedSeconds:r=null,shareActive:n=false,onShare:a,contextAction:i,onOpenContext:d,contextActive:s=false,onOpenPanel:l,panelOpen:c=false,platform:p="mac",className:m="",...u}){let b=o??(t?L4[t]:""),w=typeof r=="number"&&Number.isFinite(r)&&r>=1?` \xB7 ${Math.floor(r)}s`:"";return jsxs("div",{className:`chat__head${m?` ${m}`:""}`,...u,children:[jsx("div",{className:"chat__head-title",children:e}),jsx("span",{className:"chat__head-run",role:"status","aria-live":"polite","data-ow-state":t&&b?t:"idle",children:t&&b&&jsxs(Fragment,{children:[jsx("span",{className:"chat__head-run__dot","aria-hidden":"true"}),jsxs("span",{className:"chat__head-run__label",children:[b,jsx("span",{"aria-hidden":"true",children:w})]})]})}),jsxs("div",{className:"chat__head-actions",children:[a&&jsx(f,{variant:"unstyled",className:"session-ctx-btn",title:"\u5206\u4EAB\u8FD9\u6BB5\u4F1A\u8BDD","aria-label":"\u5206\u4EAB\u8FD9\u6BB5\u4F1A\u8BDD","aria-pressed":n,onClick:a,children:jsx(lo,{})}),i??(d&&jsx(f,{variant:"unstyled",className:"session-ctx-btn",title:"\u5B50\u4EFB\u52A1\u4E0E\u4EA7\u7269","aria-label":"\u5B50\u4EFB\u52A1\u4E0E\u4EA7\u7269","aria-pressed":s,onClick:d,children:jsx(Po,{})})),l&&jsx(f,{variant:"unstyled",className:"session-ctx-btn",title:`\u6253\u5F00\u53F3\u680F ${Xn(D4,p)}`,"aria-label":"\u6253\u5F00\u53F3\u680F","aria-pressed":c,onClick:l,children:jsx(Br,{})})]})]})}function rb({source:e,content:t,streaming:o,latest:r,actions:n=true,error:a,retryLabel:i,onRetry:d,retryDisabled:s,time:l,feedback:c,onFeedbackChange:p,onCopy:m,onBranch:u,onShare:b,disclaimer:w,onLocalPathClick:v,onLocalFileCardOpen:h,onRequestLocalFileOpenWithOptions:x,onLocalFileCardOpenWith:k,onLocalFileCardOpenWithMenu:y,onLocalImagePreview:P,localPathBaseDir:N,onRunCommand:S}){let R=n&&!o&&!!e?.trim(),M={onLocalPathClick:v,onLocalFileCardOpen:h,onRequestLocalFileOpenWithOptions:x,onLocalFileCardOpenWith:k,onLocalFileCardOpenWithMenu:y,onLocalImagePreview:P,localPathBaseDir:N,onRunCommand:S};return jsxs("div",{className:`bubble-wrap${r?" bubble-wrap--latest":""}`,children:[jsxs("div",{className:`bubble${o?" streaming":""}`,children:[t??(e!==void 0?jsx(ss,{className:"stream-text",source:e,...M}):null),a&&jsxs("div",{className:"stream-text",children:[a,d&&jsxs(Fragment,{children:[" ","\xB7"," ",jsx(f,{variant:"unstyled",type:"button",className:"chat-retry-link",onClick:d,disabled:s,children:i??"\u91CD\u8BD5"})]})]})]}),R&&jsx(A4,{source:e??"",latest:r,time:l,feedback:c,onFeedbackChange:p,onCopy:m,onBranch:u,onShare:b,markdownProps:M}),!o&&w&&jsx("div",{className:"msg-disclaimer",children:w})]})}function A4({source:e,latest:t,time:o,feedback:r,onFeedbackChange:n,onCopy:a,onBranch:i,onShare:d,markdownProps:s}){let[l,c]=useState(false),[p,m]=useState(false),[u,b]=useState(false),w=r?.vote??null,v=useCallback(async()=>{try{a?await a(e):await navigator.clipboard.writeText(e),c(!0),window.setTimeout(()=>c(!1),2e3);}catch{}},[a,e]),h=x=>{n?.({vote:"down",reasons:x.reasons,...x.detail?{detail:x.detail}:{}}),b(false);};return jsx(hn,{className:`msg-actions${t?" msg-actions--latest":""}`,visible:!!t,time:o||void 0,items:[{key:"like",label:"\u8D5E",icon:w==="up"?jsx(Nd,{}):jsx(fn,{}),active:w==="up",onSelect:()=>n?.(w==="up"?null:{vote:"up"})},{key:"dislike",label:"\u8E29",icon:jsx(Od,{}),active:w==="down",onSelect:()=>w==="down"?n?.(null):b(true)},{key:"copy",label:"\u590D\u5236",icon:jsx(Tt,{}),done:l,onSelect:v},{key:"branch",label:"\u65B0\u5EFA\u5206\u652F",icon:jsx(Po,{}),onSelect:()=>i?.()},{key:"share",label:"\u5206\u4EAB",icon:jsx(lo,{}),onSelect:()=>d?.()},{key:"preview",label:"\u67E5\u770B Markdown",icon:jsx(oo,{}),onSelect:()=>m(true)}],trailing:jsxs(Fragment,{children:[p&&jsx(If,{source:e,preview:jsx(ss,{className:"stream-text",source:e,...s}),onClose:()=>m(false),onCopy:a}),u&&jsx(Of,{onClose:()=>b(false),onSubmit:h})]})})}function O4({id:e,text:t="",sourceLabel:o,compressed:r,error:n,time:a,attachments:i=[],contexts:d=[],onAttachmentClick:s,onAttachmentDoubleClick:l,onAttachmentDragStart:c,onAttachmentKeyDown:p,onCopy:m,selectable:u,checked:b,onToggle:w,selectLabel:v,trailing:h}){return r?jsx(V4,{id:e,text:t,time:a,onCopy:m,trailing:h}):jsx(Fl,{className:"turn turn--user",anchor:e,selectable:u,checked:b,onToggle:w,selectLabel:v,text:t||void 0,error:n||void 0,trailing:h,time:a||void 0,actions:t?jsx(nb,{text:t,onCopy:m}):void 0,leading:o?jsxs("div",{className:"turn-source-chip",children:[jsx(Oa,{})," ",o]}):void 0,contexts:d.length>0?jsx("div",{className:"turn-context-chips",children:d.map(x=>jsxs("span",{className:`turn-context-chip turn-context-chip--${x.kind}`,"data-kind":x.kind,children:[x.kind==="skill"?jsx(br,{}):jsx(vn,{}),jsx("span",{children:x.name})]},`${x.kind}:${x.id}`))}):void 0,attachments:i.length>0?jsx("div",{className:"atts",children:i.map((x,k)=>jsx(f,{variant:"unstyled",type:"button",className:`att${x.openable?" att--openable":""}${x.kind==="image"&&x.previewUrl?" att--image":""}`,title:x.title??x.name,draggable:x.draggable,onDragStart:y=>c?.(y,x,k),onClick:()=>s?.(x,k),onDoubleClick:()=>l?.(x,k),onKeyDown:y=>p?.(y,x,k),children:x.kind==="image"&&x.previewUrl?jsx("img",{className:"att__preview",src:x.previewUrl,alt:x.name}):jsxs(Fragment,{children:[jsx("span",{className:`gly ${x.kind==="directory"?"gly--directory":"gly--file"}`,children:x.kind==="directory"?jsx(qe,{"aria-hidden":"true"}):jsx(Xo,{name:x.name,kind:x.kind,width:16,height:16})}),jsxs("div",{children:[jsx("div",{children:x.name}),x.meta&&jsx("div",{className:"m",children:x.meta})]})]})},x.id??`${x.name}-${k}`))}):void 0})}function V4({id:e,text:t,label:o="\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29",defaultExpanded:r=false,time:n,onCopy:a,onExpandedChange:i,trailing:d}){let[s,l]=useState(r),c=useCallback(p=>{l(p),i?.(p);},[i]);return jsxs("div",{className:`turn turn--compressed-group${s?" is-expanded":""}`,"data-chat-anchor":e,children:[jsxs(Og,{className:s?"mt-5 mb-3":"mt-5 mb-6",label:o,expanded:s,onExpandedChange:c,detailsLabel:"\u5DF2\u538B\u7F29\u5185\u5BB9",detailsClassName:"compression-divider__details",children:[jsx("span",{className:"compression-divider__text",children:t}),t&&jsx(nb,{text:t,time:n,onCopy:a,visible:true})]}),d]})}function aj({id:e,detail:t="",errorTitle:o="Invalid Request",errorMessage:r,errorVersion:n,label:a="\u8FDE\u63A5\u54CD\u5E94\u5F02\u5E38\uFF0C\u6B63\u5728\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5",defaultExpanded:i=false,onExpandedChange:d}){let s=useId(),[l,c]=useState(i),p=useCallback(()=>{c(u=>{let b=!u;return d?.(b),b});},[d]),m=l?"\u6536\u8D77\u8FDE\u63A5\u9519\u8BEF\u8BE6\u60C5":"\u67E5\u770B\u8FDE\u63A5\u9519\u8BEF\u8BE6\u60C5";return jsxs("div",{className:`reconnect-status${l?" is-expanded":""}`,"data-chat-anchor":e,children:[jsxs("div",{className:"reconnect-divider",children:[jsx("span",{className:"reconnect-divider__line","aria-hidden":"true"}),jsxs(f,{variant:"unstyled",type:"button",className:"reconnect-divider__trigger",onClick:p,"aria-expanded":l,"aria-controls":s,"aria-label":m,title:m,children:[jsx(gt,{size:15,className:"reconnect-divider__spinner","aria-label":"\u6B63\u5728\u91CD\u8FDE"}),jsx("span",{className:"reconnect-divider__label",role:"status","aria-live":"polite",children:a}),jsx("span",{className:"reconnect-divider__action",children:l?"\u6536\u8D77":"\u67E5\u770B"}),jsx(ne,{className:"reconnect-divider__chevron","aria-hidden":"true"})]}),jsx("span",{className:"reconnect-divider__line","aria-hidden":"true"})]}),jsx("div",{id:s,className:"reconnect-divider__details",role:"region","aria-label":"\u8FDE\u63A5\u9519\u8BEF\u8BE6\u60C5",hidden:!l,children:jsx(J,{variant:"error",title:o,meta:n,detail:t.trim()||void 0,children:r?.trim()||t.trim()||"Backend chat stream returned an invalid response."})})]})}function nb({text:e,time:t,onCopy:o,visible:r}){let[n,a]=useState(false),i=useCallback(async()=>{try{o?await o(e):await navigator.clipboard.writeText(e),a(!0),window.setTimeout(()=>a(!1),1600);}catch{}},[o,e]);return jsx(hn,{className:"turn-user-meta",visible:r,time:t||void 0,items:[{key:"copy",label:"\u590D\u5236",icon:jsx(Tt,{}),done:n,onSelect:i}]})}function F4({children:e,questions:t,body:o,messages:r,thinking:n,thinkingLoading:a,thinkingDefaultExpanded:i,nodeBeacon:d,execution:s,actions:l=true,disclaimer:c,plain:p,agentName:m,agentMeta:u,selectable:b,checked:w,onToggle:v,selectLabel:h}){let x=r??(e!==void 0?[{id:"message",content:e}]:[]);return jsx(Al,{className:`turn ${p?"turn--plain-agent":"turn--agent"}`,node:true,selectable:b,checked:w,onToggle:v,selectLabel:h,beacon:d??true,byline:m!=null,name:m,meta:u,execution:s,thinking:n!==void 0?jsx(uv,{loading:a,defaultExpanded:i,children:n}):void 0,children:jsxs("div",{className:"body",children:[t,o,x.map((k,y)=>{let P=y===x.length-1;return jsx(rb,{...k,actions:k.actions??l,latest:P,disclaimer:P?c:void 0},k.id)})]})})}function nj({groups:e,spine:t=true,className:o}){return jsx(Vl,{spine:t,maxWidth:"100%",className:o,children:e.map(r=>jsxs("div",{"data-ow-part":"turn-group",children:[r.user&&jsx(O4,{...r.user}),r.agent&&jsx(F4,{...r.agent}),r.divider]},r.id))})}function fj({label:e,title:t,open:o,warning:r,onClick:n}){return jsx(f,{variant:"ghost",size:"sm",type:"button","data-slot":"desktop-composer-model","data-ow-state":g(o&&"open",r&&"warning")||void 0,className:g("min-w-0 max-w-[190px] whitespace-nowrap flex-row-reverse",r&&"text-[color:var(--ow-warning)]"),"aria-label":t??`\u9009\u62E9\u6A21\u578B\uFF1A${e}`,"aria-expanded":o,title:t??e,onClick:n,icon:jsx(ne,{}),children:jsx("span",{"data-ow-part":"label",className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})})}var gj=forwardRef(function({permissionPrompt:t,dialogs:o,addAction:r,agent:n,plan:a,modelControl:i,voiceControl:d,projectControl:s,notice:l=false,authorizationControl:c,contextUsage:p,...m},u){let b=(v,h)=>typeof v.label=="string"?v.label:h,w=t??jsx(Rv,{ref:u,...m,toolbarStart:r||n||a?jsxs(Fragment,{children:[r&&jsx("span",{"data-ow-part":"control",className:"relative inline-flex min-w-0",children:jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"tool","data-ow-state":r.open?"open":void 0,className:g(r.open&&"bg-[var(--ow-btn-ghost-press)]"),"aria-label":r.title??"\u6DFB\u52A0","aria-expanded":r.open,title:r.title??"\u6DFB\u52A0",disabled:r.disabled,onClick:r.onClick,icon:jsx(We,{})})}),n&&jsx(ro,{removeMode:"hover",avatar:n.avatar,icon:n.icon??(n.avatar?void 0:jsx(Ia,{})),label:n.label,description:n.description,onRemove:n.onRemove,tooltip:b(n,"\u667A\u80FD\u4F53"),removeLabel:`\u79FB\u9664${typeof n.label=="string"?` ${n.label}`:"\u667A\u80FD\u4F53"}`,className:lp,"data-ow-variant":"agent"}),a&&jsx(ro,{removeMode:"hover",avatar:a.avatar,icon:a.icon??jsx(Or,{}),label:a.label,description:a.description,onRemove:a.onRemove,tooltip:b(a,"\u8BA1\u5212"),removeLabel:`\u79FB\u9664${typeof a.label=="string"?` ${a.label}`:"\u8BA1\u5212"}`,className:lp,"data-ow-variant":"plan"})]}):void 0,toolbarEnd:i?jsx("span",{"data-ow-part":"control",className:"relative inline-flex min-w-0",children:i}):void 0,voice:d,project:s,footerStart:l!==false?jsx("span",{"data-ow-part":"notice",className:"flex-[0_0_auto] text-[color:var(--ow-text-3)] font-normal text-ow-fs-ui leading-none whitespace-nowrap",children:l}):void 0,authorization:c,contextUsage:p});return jsxs("div",{"data-slot":"desktop-composer",className:"composer-inner",children:[w,o]})});function U4({logo:e,name:t,author:o="Orbitwork \u5B98\u65B9",version:r,description:n,backLabel:a="\u8FD4\u56DE\u63D2\u4EF6 \xB7 \u8FDE\u63A5\u5668",runtime:i="stdio",status:d,statusTone:s="muted",command:l,enabled:c,error:p,tools:m,toolSummary:u,emptyToolsText:b="\u8FD9\u4E2A\u8FDE\u63A5\u5668\u6682\u672A\u63D0\u4F9B\u5DE5\u5177",toolAction:w,actions:v,metadata:h=[],authorization:x,detailContent:k,detailLoading:y,detailError:P,onBack:N,onToggle:S,onRefresh:R,onEdit:M,onRemove:T,onCopyDiagnostic:_}){let L=v??[...M?[{id:"edit",label:"\u7F16\u8F91\u914D\u7F6E",icon:jsx(yt,{}),variant:"primary",onAction:M}]:[],...R?[{id:"refresh",label:"\u5237\u65B0\u72B6\u6001",icon:jsx(Ue,{}),overflow:true,onAction:R}]:[],...T?[{id:"remove",label:"\u65AD\u5F00\u8FDE\u63A5",icon:jsx(Le,{}),variant:"danger",overflow:true,onAction:T}]:[]],I=L.filter(E=>!E.overflow),$=L.filter(E=>E.overflow);return jsxs(Ms,{avatar:jsx($l,{value:"neutral",children:jsx("span",{className:"g",children:e})}),name:t,author:o,version:r,status:jsx(ro,{dot:d?s==="ok"?"success":s==="warning"?"warning":s==="error"?"error":"neutral":c?"success":"neutral",label:d??i}),kind:"\u8FDE\u63A5\u5668",summary:n,actions:jsx(Sp,{leading:c!==void 0&&S?jsx(po,{checked:c,onChange:S}):void 0,actions:I.map(E=>({key:E.id,label:E.label,icon:E.icon,variant:E.variant,disabled:E.disabled,onAction:E.onAction})),menuItems:$.map(E=>({key:E.id,label:typeof E.label=="string"?E.label:E.id,icon:E.icon??jsx(yt,{}),danger:E.variant==="danger",disabled:E.disabled})),onMenuSelect:E=>$.find(O=>O.id===E)?.onAction?.()}),backLabel:a,onBack:N,children:[p&&jsx($i,{variant:"error",className:"mt-3",action:_&&jsx(f,{variant:"secondary",size:"sm",onClick:_,children:"\u590D\u5236\u8BCA\u65AD"}),children:p}),(h.length>0||l)&&jsxs("section",{className:"skd__section",children:[jsx("div",{className:"lbl",children:"\u57FA\u672C\u4FE1\u606F"}),jsxs("div",{className:"connector-kv",children:[l&&jsxs(Fragment,{children:[jsx("span",{children:"\u8FDE\u63A5\u547D\u4EE4"}),jsx("b",{className:"mono",children:l})]}),h.map(E=>jsxs(Fragment$1,{children:[jsx("span",{children:E.label}),jsx("b",{children:E.value})]},E.id))]})]}),x&&jsxs("section",{className:"skd__section",children:[jsx("div",{className:"lbl",children:"\u6388\u6743"}),x]}),(k||y||P)&&jsxs("section",{className:"skd__section",children:[jsx("div",{className:"lbl",children:"\u8BE6\u7EC6\u4ECB\u7ECD"}),y&&jsx("div",{className:"skd__empty",children:"\u8BE6\u7EC6\u4ECB\u7ECD\u52A0\u8F7D\u4E2D\u2026"}),P&&jsx($i,{variant:"error",children:P}),k&&jsx("div",{className:"skd__doc",children:k})]}),jsxs("section",{className:"skd__section",children:[jsxs("div",{className:"lbl",children:["\u5DE5\u5177"," ",u?jsx("span",{className:"skd__lbl-note",children:u}):jsx("span",{className:"cnt",children:m.length})]}),jsx("div",{className:"conn-tools",children:m.length===0?jsx(H,{className:"conn-tools__empty",size:"sm",message:b,action:w&&jsx(f,{size:"sm",variant:w.variant??"secondary",icon:w.icon,disabled:w.disabled,onClick:w.onAction,children:w.label})}):m.map(E=>jsxs("div",{className:"mcp-tool",children:[jsx("span",{className:"tg",children:jsx(So,{})}),jsxs("div",{className:"tmeta",children:[jsx("div",{className:"tn mono",children:E.name}),E.description&&jsx("div",{className:"td",children:E.description})]}),jsx("span",{className:"mcp-tool__state",children:E.state??"\u53EF\u7528"})]},E.id))})]})]})}var Pj=U4;function Dj({title:e="\u4ECA\u5929\u4ECE\u54EA\u4EF6\u4E8B\u5F00\u59CB?",backdrop:t,capsules:o,mounts:r,onDismissMounts:n,children:a,className:i}){return jsxs(Fragment,{children:[t,jsxs("div",{"data-slot":"desktop-home",className:g("relative box-border m-auto w-full max-w-[800px] px-6","flex flex-col items-center gap-5",i),children:[jsxs("div",{"data-slot":"desktop-home-hero",className:"flex items-center gap-[14px]",children:[jsx(xr,{variant:"auto",size:34}),jsx("h1",{"data-slot":"desktop-home-title",className:g("m-0 ow-font-display text-ow-fs-headline font-medium","leading-[var(--ow-lh-headline)] tracking-[0.01em] text-[color:var(--ow-text)]"),children:e})]}),o,r!=null&&jsxs("div",{"data-slot":"desktop-home-mounts",className:g("flex items-center gap-2 h-8 pl-[10px] pr-1 bg-transparent","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-sm)]"),children:[jsx("span",{className:g("flex-none font-medium text-[color:var(--ow-eyebrow)]","text-[length:var(--ow-fs-eyebrow-cjk,12px)] tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]"),children:"\u5DF2\u6302\u8F7D"}),jsx("span",{className:"text-ow-fs-ui text-[color:var(--ow-text-2)] whitespace-nowrap",children:r}),n&&jsx("button",{type:"button",title:"\u5378\u8F7D\u5168\u90E8","aria-label":"\u5378\u8F7D\u5168\u90E8",onClick:n,className:g("flex-none grid place-items-center w-6 h-6 border-0 cursor-pointer","[border-radius:var(--ow-radius-2xs)] bg-transparent text-[color:var(--ow-text-3)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] hover:text-[color:var(--ow-text)]","ow-focus-ring"),children:jsx(Q,{width:14,height:14,"aria-hidden":"true"})})]}),a]})]})}var G4="\u667A\u80FD\u5DE5\u4F5C\uFF0C\u4ECE\u767B\u5F55\u5F00\u59CB",Z4="\u8FDE\u63A5\u4F60\u7684\u56E2\u961F\u4E0E AI \u52A9\u624B";function Gj({markSrc:e,stage:t,backgroundSrc:o,claim:r=G4,claimNote:n=Z4,brandName:a="Orbitwork",expiresText:i="",error:d,appVersion:s="v0.1.0",onBack:l,onPasswordLogin:c,passwordSubmitting:p=false,providers:m=[],onQrLogin:u,qrRequesting:b=null,qr:w=null,onCompleteMfa:v,mfaSubmitting:h=false}){let[x,k]=useState(false),[y,P]=useState(""),[N,S]=useState(""),[R,M]=useState(""),T=!!o&&!x,_=t!=="welcome",L=t==="waiting-confirmation"?"scanned":t==="expired"?"error":t,I=t==="qr"||t==="expired"||t==="error"||t==="mfa",$=t==="expired"||t==="error",F=!!c,E=y.trim().length>0&&N.length>0&&!p,O=m.map(Oe=>({provider:Oe,Icon:q4(Oe)})),ae=!!u&&O.length>0,z=()=>{E&&c?.(y.trim(),N);},pe=()=>{!v||R.trim().length===0||h||v(R.trim());},Me=()=>{w&&u?.(w.providerId);};return jsxs("div",{className:`owshell login-v2 login-split${T?"":" fallback"}`,children:[jsxs("div",{className:"login-kv-board",children:[jsx("div",{className:"login-bg",children:o?jsx("img",{src:o,alt:"",onError:()=>k(true)}):null}),jsx("div",{className:"login-kv-scrim"}),jsxs("div",{className:"login-slogan",children:[jsx("div",{className:"slogan-line",children:r}),jsx("div",{className:"slogan-note",children:n})]})]}),jsxs("div",{className:"login-rail",children:[jsx("div",{className:"login-content",children:_?t==="mfa"?jsxs("form",{className:"login-pane login-mfa",onSubmit:Oe=>{Oe.preventDefault(),pe();},children:[jsxs("div",{className:"login-qr__head",children:[jsxs(f,{variant:"unstyled",className:"back",onClick:l,disabled:!I,children:[jsx(Kt,{}),"\u8FD4\u56DE"]}),jsx("div",{className:"t",children:"\u4E8C\u6B21\u9A8C\u8BC1"}),jsx("span",{style:{width:52}})]}),jsx("div",{className:"login-h1",children:"\u8F93\u5165\u9A8C\u8BC1\u7801"}),jsx("div",{className:"login-sub",children:"\u8BE5\u8D26\u53F7\u5F00\u542F\u4E86\u4E8C\u6B21\u9A8C\u8BC1\uFF0C\u8BF7\u8F93\u5165\u9A8C\u8BC1\u5668\u9A8C\u8BC1\u7801\u6216\u6062\u590D\u7801\u3002"}),d?jsx(J,{variant:"error",tone:"outline",className:"text-left",children:d}):null,jsx(te,{value:R,onChange:M,placeholder:"6 \u4F4D\u9A8C\u8BC1\u7801\u6216\u6062\u590D\u7801",autoComplete:"one-time-code"}),jsx(f,{variant:"primary",size:"lg",className:"mt-2 w-full",type:"submit",disabled:R.trim().length===0,loading:h,children:"\u9A8C\u8BC1\u5E76\u767B\u5F55"})]}):t==="success"?jsxs("div",{className:"login-pane login-welcome",children:[e?jsx("img",{src:e,alt:a,className:"login-mark"}):jsx(xr,{variant:"auto",size:46,label:a,className:"login-mark"}),jsx("div",{className:"login-h1",children:"\u767B\u5F55\u6210\u529F"}),jsx("div",{className:"login-sub",children:"\u6B63\u5728\u4E3A\u4F60\u51C6\u5907\u5DE5\u4F5C\u533A\u2026"})]}):jsxs("div",{className:"login-pane login-qr",children:[jsxs("div",{className:"login-qr__head",children:[jsxs(f,{variant:"unstyled",className:"back",onClick:l,disabled:!I,children:[jsx(Kt,{}),"\u8FD4\u56DE"]}),jsx("div",{className:"t",children:w?`${w.providerName}\u626B\u7801\u767B\u5F55`:"\u626B\u7801\u767B\u5F55"}),jsx("span",{style:{width:52}})]}),jsxs("div",{className:`qr-box ${L}`,children:[w?jsx("img",{className:"qr-img",src:w.src,alt:`${w.providerName}\u767B\u5F55\u4E8C\u7EF4\u7801`}):null,t==="waiting-confirmation"&&jsxs("div",{className:"qr-veil",children:[jsx(gt,{size:26,"aria-label":"\u7B49\u5F85\u786E\u8BA4"}),jsx("div",{className:"msg",children:"\u7B49\u5F85\u786E\u8BA4"}),jsxs("div",{className:"sub",children:["\u8BF7\u5728\u624B\u673A\u4E0A\u5B8C\u6210\u786E\u8BA4\uFF0C\u5B8C\u6210\u540E\u5C06\u81EA\u52A8\u8FDB\u5165 ",a]})]}),$&&jsxs("div",{className:"qr-veil failed",role:"alert",children:[jsx("div",{className:"msg",children:t==="expired"?"\u4E8C\u7EF4\u7801\u8FC7\u671F":"\u767B\u5F55\u5931\u8D25"}),t==="error"&&d?jsx("div",{className:"sub",children:d}):null,jsx(f,{variant:"primary",size:"lg",className:"w-full",onClick:Me,children:"\u91CD\u65B0\u767B\u5F55"})]})]}),jsxs("div",{className:"qr-hint",children:[t==="qr"&&jsxs(Fragment,{children:[jsxs("div",{className:"r",children:["\u8BF7\u4F7F\u7528 ",jsx("b",{children:w?.providerName??"\u624B\u673A\u5E94\u7528"})," \u626B\u7801\u767B\u5F55"]}),jsx("div",{className:"r sub",children:i?`\u4E8C\u7EF4\u7801\u6709\u6548\u671F\u81F3 ${i}`:"\u4E8C\u7EF4\u7801\u6709\u6548\u671F 3 \u5206\u949F"})]}),t==="waiting-confirmation"&&jsxs(Fragment,{children:[jsx("div",{className:"r",children:"\u7B49\u5F85\u767B\u5F55\u786E\u8BA4"}),jsx("div",{className:"r sub",children:"\u5B8C\u6210\u540E\u5C06\u81EA\u52A8\u8FDB\u5165\u534F\u4F5C\u4E2D\u5FC3"})]})]})]}):jsxs("div",{className:"login-pane login-welcome",children:[e?jsx("img",{src:e,alt:a,className:"login-mark"}):jsx(xr,{variant:"auto",size:46,label:a,className:"login-mark"}),jsxs("div",{className:"login-h1",children:["\u6B22\u8FCE\u4F7F\u7528 ",a]}),F?jsxs("form",{className:"login-password",onSubmit:Oe=>{Oe.preventDefault(),z();},children:[d&&t==="welcome"?jsx(J,{variant:"error",tone:"outline",className:"text-left",children:d}):null,jsx(te,{value:y,onChange:P,placeholder:"\u7528\u6237\u540D / \u90AE\u7BB1 / \u624B\u673A\u53F7",autoComplete:"username"}),jsx(te,{type:"password",value:N,onChange:S,placeholder:"\u5BC6\u7801",autoComplete:"current-password"}),jsx(f,{variant:"primary",size:"lg",className:"w-full",type:"submit",disabled:!E,loading:p,children:"\u767B\u5F55"})]}):null,ae?jsxs("div",{className:"login-providers",children:[jsxs("div",{className:"login-divider",children:[jsx("span",{}),"\u5176\u4ED6\u767B\u5F55\u65B9\u5F0F",jsx("span",{})]}),jsx("div",{className:"login-provider-row",children:O.map(({provider:Oe,Icon:ee})=>{let q=b===Oe.id;return jsx(aa,{content:`\u4F7F\u7528${Oe.displayName}\u626B\u7801\u767B\u5F55`,side:"top",disabled:q,children:jsxs("button",{type:"button",className:`login-provider${ee===Mt?" login-provider--generic":""}`,disabled:q,"aria-label":`\u4F7F\u7528${Oe.displayName}\u626B\u7801\u767B\u5F55`,"aria-busy":q||void 0,onClick:()=>u?.(Oe.id),children:[q?jsx(Ro,{className:"w-5 h-5"}):jsx(ee,{}),ee===Mt?jsx("span",{children:Oe.displayName}):null]})},Oe.id)})})]}):null,jsxs("div",{className:"login-foot",children:["\u767B\u5F55\u5373\u4EE3\u8868\u540C\u610F"," ",jsx(f,{variant:"unstyled",className:"lk",children:"\u670D\u52A1\u6761\u6B3E"})," ","\u4E0E"," ",jsx(f,{variant:"unstyled",className:"lk",children:"\u9690\u79C1\u653F\u7B56"}),"\u3002"]})]})}),jsx("div",{className:"login-rail-foot",children:jsxs("div",{className:"login-tag",children:[a," \xB7 ",s]})})]})]})}function q4(e){if(e.kind==="IDENTITY_PROVIDER_KIND_DINGTALK"&&e.displayName==="\u9489\u9489\uFF08AI\u4F19\u4F34\uFF09")return $d;switch(e.kind){case "IDENTITY_PROVIDER_KIND_DINGTALK":return Ti;case "IDENTITY_PROVIDER_KIND_FEISHU":return Mi;case "IDENTITY_PROVIDER_KIND_WECOM":return _i;default:return Mt}}function tG({open:e,appName:t="\u8D44\u6599\u5E93",appIcon:o=null,appDescription:r="\u8D44\u6599\u5E93\u5C06\u4F7F\u7528\u4F60\u7684 Orbitwork \u8D26\u53F7\u8BBF\u95EE\u5185\u5BB9\u3002",scopes:n=[],loading:a=false,submitting:i=null,error:d=null,authorizationUrl:s=null,onApprove:l,onDeny:c,onClose:p}){let m=useRef(null),[u,b]=useState(false),w=o?.trim()&&!u?o.trim():null;return useEffect(()=>{b(false);},[o]),useEffect(()=>{let v=m.current;if(!v||!s)return;v.replaceChildren();let h=document.createElement("webview");return h.setAttribute("aria-label",`${t} \u6388\u6743\u9875\u9762`),h.setAttribute("partition","persist:library-authorization"),h.setAttribute("webpreferences","contextIsolation=yes, nodeIntegration=no, sandbox=yes"),h.setAttribute("src",s),v.appendChild(h),()=>{h.remove();}},[t,s]),jsx(oe,{open:e,title:"\u6388\u6743\u8BBF\u95EE",subtitle:`${t} \xB7 Orbitwork \u5B89\u5168\u6388\u6743`,className:"desktop-library-authorization-dialog",width:s?920:520,padded:false,onClose:i==="deny"?void 0:p,closable:i!=="deny",children:jsxs("div",{className:`desktop-library-consent${s?" desktop-library-consent--authorizing":""}`,"aria-busy":a||i!==null,children:[!s&&jsxs(Fragment,{children:[jsxs("div",{className:"desktop-library-consent__flow","aria-hidden":"true",children:[jsx("span",{className:"desktop-library-consent__mark desktop-library-consent__mark--orbitwork",children:jsx(xr,{size:40})}),jsx("span",{className:"desktop-library-consent__arrow",children:"\u2192"}),jsx("span",{className:`desktop-library-consent__mark desktop-library-consent__mark--accent${w?" desktop-library-consent__mark--image":""}`,children:w?jsx("img",{src:w,alt:"",onError:()=>b(true)}):Q4(t)})]}),jsxs("h2",{children:[jsx("strong",{children:t})," \u8BF7\u6C42\u8BBF\u95EE\u4F60\u7684\u8D26\u53F7"]}),jsx("p",{className:"desktop-library-consent__description",children:r}),jsxs("div",{className:"desktop-library-consent__facts",children:[jsxs("span",{children:[jsx(oa,{"aria-hidden":"true"})," \u4F7F\u7528 Orbitwork \u8D26\u53F7\u51ED\u8BC1"]}),jsxs("span",{children:[jsx(gr,{"aria-hidden":"true"})," \u4EC5\u5728\u8D44\u6599\u5E93\u8BF7\u6C42\u4E2D\u751F\u6548"]})]}),jsxs("section",{className:"desktop-library-consent__scopes","aria-labelledby":"desktop-library-consent-scopes",children:[jsx("h3",{id:"desktop-library-consent-scopes",children:"\u5C06\u6388\u4E88\u4EE5\u4E0B\u6743\u9650"}),a?jsx("p",{className:"desktop-library-consent__loading",children:"\u6B63\u5728\u68C0\u67E5\u767B\u5F55\u72B6\u6001\u2026"}):n.length>0?jsx("ul",{children:n.map(v=>jsxs("li",{children:[jsx(Va,{"aria-hidden":"true"}),jsxs("span",{children:[jsx("strong",{children:v.title}),v.owner&&jsx("small",{children:v.owner}),v.description&&jsx("em",{children:v.description})]}),v.required&&jsx("b",{children:"\u5FC5\u9700"})]},`${v.owner??""}:${v.title}`))}):jsx("p",{className:"desktop-library-consent__loading",children:"\u8BBF\u95EE\u8D44\u6599\u5E93\u5185\u5BB9"})]})]}),s&&jsx("div",{ref:m,className:"desktop-library-consent__webview",role:"region","aria-label":`${t} \u6388\u6743\u9875\u9762`}),d&&jsx("p",{className:"desktop-library-consent__error",role:"alert",children:d}),jsxs("p",{className:"desktop-library-consent__foot",children:[jsx(gr,{"aria-hidden":"true"})," \u51ED\u8BC1\u4EC5\u4FDD\u5B58\u5728\u672C\u673A\uFF0C\u4EC5\u7528\u4E8E\u8BE5\u63D2\u4EF6\u3002"]}),jsxs("div",{className:"desktop-library-consent__actions",children:[jsx(f,{variant:"ghost",disabled:i==="deny",onClick:c,children:i==="deny"?"\u5904\u7406\u4E2D\u2026":s?"\u53D6\u6D88\u6388\u6743":"\u62D2\u7EDD"}),!s&&jsx(f,{variant:"primary",disabled:a||i!==null,onClick:l,children:i==="approve"?"\u6388\u6743\u4E2D\u2026":"\u540C\u610F\u6388\u6743"})]})]})})}function Q4(e){let t=e.trim();return t?(Array.from(t)[0]??"\u8D44").toUpperCase():"\u8D44"}function nG({loading:e=false,error:t=null,authorizationRequired:o=false,onRequestAuthorization:r,webviewHostRef:n}){return jsx("section",{className:"desktop-library-page","aria-label":"\u8D44\u6599\u5E93",children:jsx("div",{className:"desktop-library-page__content",children:t?jsxs("div",{className:"desktop-library-page__state",role:"alert",children:[jsx("strong",{children:"\u8D44\u6599\u5E93\u9875\u9762\u52A0\u8F7D\u5931\u8D25"}),jsx("span",{children:t})]}):o?jsxs("div",{className:"desktop-library-page__state",role:"status",children:[jsx("span",{children:"\u9700\u8981\u6388\u6743\u540E\u624D\u80FD\u8BBF\u95EE\u8D44\u6599\u5E93\u3002"}),r&&jsx(f,{variant:"primary",onClick:r,children:"\u7ACB\u5373\u6388\u6743"})]}):n?jsx("div",{ref:n,className:"desktop-library-page__webview-host","aria-busy":e}):jsx("div",{className:"desktop-library-page__state",children:jsx("span",{children:"\u8D44\u6599\u5E93\u9875\u9762\u6B63\u5728\u542F\u52A8\u2026"})})})})}var od=296,rd=210,io=16,ad=4;function pG({steps:e,index:t,anchorRect:o,onNext:r,onPrev:n,onSkip:a,onDone:i,position:d="fixed",className:s}){let l=useRef(null),[c,p]=useState(null);useLayoutEffect(()=>{let v=l.current;if(!v)return;let h=()=>{let k=v.getBoundingClientRect();p({width:k.width,height:k.height});};if(h(),typeof ResizeObserver>"u")return;let x=new ResizeObserver(h);return x.observe(v),()=>x.disconnect()},[]),useEffect(()=>{let v=h=>{h.key==="Escape"&&(h.preventDefault(),a());};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[a]);let m=e[t];if(!m)return null;let u=t===0,b=t===e.length-1,w=a3(o??null,c);return jsxs("div",{ref:l,className:g("onboarding-tour",s),style:{position:d},role:"dialog","aria-modal":"true","aria-label":"\u65B0\u624B\u5F15\u5BFC",children:[o&&jsx("div",{"aria-hidden":"true",className:"onboarding-tour__ring",style:{position:"absolute",left:o.left-ad,top:o.top-ad,width:o.width+ad*2,height:o.height+ad*2}}),jsxs("div",{className:"onboarding-tour__card",style:{position:"absolute",left:w.left,top:w.top},children:[jsxs("div",{className:"onboarding-tour__head",children:[jsx("span",{className:"onboarding-tour__title",children:m.title}),jsxs("span",{className:"onboarding-tour__count",children:[t+1," / ",e.length]})]}),jsx("p",{className:"onboarding-tour__body",children:m.body}),jsxs("div",{className:"onboarding-tour__foot",children:[jsx(f,{variant:"ghost",size:"sm",onClick:a,children:"\u8DF3\u8FC7"}),jsx("span",{className:"onboarding-tour__spacer"}),!u&&jsx(f,{variant:"secondary",size:"sm",onClick:n,children:"\u4E0A\u4E00\u6B65"}),jsx(f,{variant:"primary",size:"sm",onClick:b?i??a:r,children:b?"\u5F00\u59CB\u4F7F\u7528":"\u4E0B\u4E00\u6B65"})]})]})]})}function a3(e,t){if(!t)return {left:io,top:io};let{width:o,height:r}=t;if(!e)return {left:Math.max(io,(o-od)/2),top:Math.max(io,(r-rd)/2)};let n=e.left+e.width+io;n+od+io>o&&(n=e.left-od-io),n<io&&(n=Math.max(io,Math.min(o-od-io,e.left)));let a=e.top;return a+rd+io>r&&(a=e.top-rd-io),a<io&&(a=Math.max(io,Math.min(r-rd-io,e.top))),{left:n,top:a}}var nd={width:192,height:208};function pb(e,t){return /^(?:[a-z][a-z\d+\-.]*:|\/)/i.test(t)?t:`${e}/${t}`}var s3=1.5,l3=8,Hp=new Map;function d3(e,t){let o=`${e}:${t.columns}:${t.rows}:${t.cellWidth}:${t.cellHeight}`,r=Hp.get(o);if(r)return r;let n=(async()=>{let a=await fetch(e);if(!a.ok)throw new Error(`Failed to load pet spritesheet: ${a.status}`);let i=await createImageBitmap(await a.blob()),d=document.createElement("canvas");d.width=t.cellWidth,d.height=t.cellHeight;let s=d.getContext("2d",{willReadFrequently:true});if(!s)throw new Error("Unable to inspect pet spritesheet");let l=t.cellWidth,c=t.cellHeight,p=-1,m=-1;try{for(let u=0;u<t.rows;u+=1)for(let b=0;b<t.columns;b+=1){s.clearRect(0,0,t.cellWidth,t.cellHeight),s.drawImage(i,b*t.cellWidth,u*t.cellHeight,t.cellWidth,t.cellHeight,0,0,t.cellWidth,t.cellHeight);let w=s.getImageData(0,0,t.cellWidth,t.cellHeight).data;for(let v=0;v<t.cellHeight;v+=1)for(let h=0;h<t.cellWidth;h+=1)w[(v*t.cellWidth+h)*4+3]<=l3||(l=Math.min(l,h),c=Math.min(c,v),p=Math.max(p,h),m=Math.max(m,v));}}finally{i.close();}return p>=l&&m>=c?{x:l,y:c,width:p-l+1,height:m-c+1}:{x:0,y:0,width:t.cellWidth,height:t.cellHeight}})().catch(a=>{throw Hp.delete(o),a});return Hp.set(o,n),n}var ub={idle:{row:0,frames:6,durationMs:1100},"running-right":{row:1,frames:8,durationMs:1060},"running-left":{row:2,frames:8,durationMs:1060},waving:{row:3,frames:4,durationMs:700},jumping:{row:4,frames:5,durationMs:840},failed:{row:5,frames:8,durationMs:1220},waiting:{row:6,frames:6,durationMs:1010},running:{row:7,frames:6,durationMs:820},review:{row:8,frames:6,durationMs:1030}};function c3(e){return typeof e=="object"?{left:e.x,top:e.y}:{[e.includes("bottom")?"bottom":"top"]:24,[e.includes("right")?"right":"left"]:24}}function p3(e){let t=typeof window>"u"?0:window.innerWidth,o=typeof window>"u"?0:window.innerHeight;return {horizontal:e.right!==void 0||typeof e.left=="number"&&e.left*2>t?"right":"left",vertical:e.bottom!==void 0||typeof e.top=="number"&&e.top*2>o?"bottom":"top"}}function u3({status:e}){let t={running:{label:"\u6267\u884C\u4E2D",icon:null},waiting:{label:"\u7B49\u5F85\u8F93\u5165",icon:No},review:{label:"\u5F85\u67E5\u770B",icon:Or},completed:{label:"\u5DF2\u5B8C\u6210",icon:Va},failed:{label:"\u5931\u8D25",icon:Zo}}[e],o=t.icon;return jsx("span",{"data-ow-part":"session-status",title:t.label,role:"img","aria-label":t.label,children:o?jsx(o,{"aria-hidden":"true"}):null})}var bG=forwardRef(function({petBaseUrl:t="/uidocs/pets/ow-pet",manifest:o,animation:r="idle",position:n="bottom-right",scale:a=1,animationRate:i=1,draggable:d=true,trackPointer:s=true,toolbar:l=true,defaultBubble:c,persistKey:p,nativeWindow:m=false,nativeAnchor:u={horizontal:"right",vertical:"bottom"},onHideRequest:b,onContextMenuRequest:w,sessions:v=[],onSessionFeedback:h,onSessionStop:x,onContentSizeChange:k,onNativeDrag:y,className:P="",style:N,onReady:S,onError:R,onClick:M,onDoubleClick:T},_){let[L,I]=useState(o??null),[$,F]=useState(r),[E,O]=useState(0),[ae,z]=useState(null),[pe,Me]=useState(c??""),[Oe,ee]=useState(false),q=useMemo(()=>c3(n),[n]),[A,D]=useState(()=>{if(!m&&typeof window<"u"&&p)try{let V=localStorage.getItem(p);if(V)return JSON.parse(V)}catch{}return q}),Y=useRef(null),Ee=useRef(null),[Ge,et]=useState(null),[ht,to]=useState(""),[Ze,U]=useState(null),[ke,j]=useState(false);useEffect(()=>{o||fetch(`${t}/pet.json`).then(V=>{if(!V.ok)throw new Error(`Failed to load pet manifest: ${V.status}`);return V.json()}).then(I).catch(V=>R?.(V instanceof Error?V:new Error(String(V))));},[o,t,R]),useEffect(()=>F(r),[r]),useEffect(()=>{if(U(null),j(false),!L)return;let V=L.spritesheetLayout??{columns:8,rows:11,cellWidth:nd.width,cellHeight:nd.height},ue=true;return d3(pb(t,L.spritesheetPath),V).then(rt=>{ue&&U(rt);}).catch(()=>{ue&&j(true);}),()=>{ue=false;}},[L,t]),useEffect(()=>{if(ae)return;let V=ub[$],ue=Number.isFinite(i)&&i>0?i:1,rt=setTimeout(()=>O(xt=>(xt+1)%V.frames),V.durationMs/V.frames/ue);return ()=>clearTimeout(rt)},[$,E,ae,i]);let Ie=useCallback((V,ue=3600)=>{Me(V),Ee.current&&clearTimeout(Ee.current),ue>0&&(Ee.current=setTimeout(()=>Me(""),ue));},[]),we=useCallback(V=>{if(V===null||!L?.lookDirections?.length)return z(null);let ue=(V%360+360)%360,rt=jo=>Math.min(Math.abs(jo-ue),360-Math.abs(jo-ue)),xt=L.lookDirections.reduce((jo,bi)=>rt(bi.degrees)<rt(jo.degrees)?bi:jo);z({row:xt.rowIndex,column:xt.columnIndex});},[L]),de=useCallback(()=>{D(q),p&&localStorage.removeItem(p);},[q,p]),ve=useMemo(()=>({playAnimation:V=>{z(null),O(0),F(V);},lookAt:we,say:Ie,hide:()=>{m?b?.():ee(true);},show:()=>ee(false),reset:de}),[we,Ie,de,m,b]);useImperativeHandle(_,()=>ve,[ve]),useEffect(()=>{L&&S?.(ve,L);},[L,ve,S]),useEffect(()=>{let V=Y.current;if(!V||!k)return;let ue=()=>{let xt=V.getBoundingClientRect();k({width:Math.ceil(xt.width),height:Math.ceil(xt.height)});};if(ue(),typeof ResizeObserver>"u")return;let rt=new ResizeObserver(ue);return rt.observe(V),()=>rt.disconnect()},[L,k]);let X=useRef(null),Ce=useRef(null),ce=useRef(false),Ko=V=>{if(!d||V.button!==0)return;if(ce.current=false,m){Ce.current={pointerId:V.pointerId,startX:V.screenX,startY:V.screenY,started:false},V.currentTarget.setPointerCapture(V.pointerId);return}let ue=Y.current,rt=ue?.getBoundingClientRect();if(!ue||!rt)return;let xt=ue.offsetParent,jo=xt?.getBoundingClientRect(),bi=window.getComputedStyle(ue).position==="fixed";X.current={x:V.clientX,y:V.clientY,left:bi?rt.left:rt.left-(jo?.left??0)-(xt?.clientLeft??0)+(xt?.scrollLeft??0),top:bi?rt.top:rt.top-(jo?.top??0)-(xt?.clientTop??0)+(xt?.scrollTop??0)},V.currentTarget.setPointerCapture(V.pointerId);},pr=V=>{let ue=Ce.current;if(ue&&ue.pointerId===V.pointerId){!ue.started&&Math.hypot(V.screenX-ue.startX,V.screenY-ue.startY)>=4&&(ue.started=true,ce.current=true,y?.({phase:"start",screenX:ue.startX,screenY:ue.startY})),ue.started&&y?.({phase:"move",screenX:V.screenX,screenY:V.screenY});return}if(X.current){D({left:Math.round(X.current.left+V.clientX-X.current.x),top:Math.round(X.current.top+V.clientY-X.current.y)});return}if(s&&Y.current){let rt=Y.current.getBoundingClientRect(),xt=V.clientX-(rt.left+rt.width/2),jo=V.clientY-(rt.top+rt.height/2);Math.hypot(xt,jo)>28?we((Math.atan2(xt,-jo)*180/Math.PI+360)%360):we(null);}},Us=V=>{let ue=Ce.current;if(ue&&ue.pointerId===V.pointerId){ue.started&&y?.({phase:"end",screenX:V.screenX,screenY:V.screenY}),Ce.current=null;return}X.current&&p&&localStorage.setItem(p,JSON.stringify(A)),X.current=null;},gi=V=>{ce.current||V?.();},pu=m?{}:A,uu=m?u:p3(A);if(!L)return jsx("div",{"data-slot":"desktop-pet","data-ow-state":"loading","data-ow-variant":m?"native":void 0,className:P,style:{...pu,...N}});let ur=L.spritesheetLayout??{columns:8,rows:11,cellWidth:nd.width,cellHeight:nd.height},vi=Ze??{x:0,y:0,width:ur.cellWidth,height:ur.cellHeight},mu=ae??{row:ub[$].row,column:E},ew=pb(t,L.spritesheetPath),tw={position:"relative",width:Math.round(vi.width*a),height:Math.round(vi.height*a)},ow=m?{width:Math.round(vi.width*s3)}:void 0,rw={position:"absolute",left:-Math.round(vi.x*a),top:-Math.round(vi.y*a),width:ur.cellWidth,height:ur.cellHeight,backgroundImage:`url(${ew})`,backgroundRepeat:"no-repeat",backgroundSize:`${ur.columns*ur.cellWidth}px ${ur.rows*ur.cellHeight}px`,backgroundPosition:`${-mu.column*ur.cellWidth}px ${-mu.row*ur.cellHeight}px`,transform:`scale(${a})`,transformOrigin:"top left"},fu=l===true?[{key:"wave",label:"\u6253\u62DB\u547C",icon:jsx(Bd,{"aria-hidden":"true"}),onClick:V=>V.playAnimation("waving")},{key:"work",label:"\u5DE5\u4F5C",icon:jsx(Ad,{"aria-hidden":"true"}),onClick:V=>V.playAnimation("running")},{key:"hide",label:"\u9690\u85CF",icon:jsx(Q,{"aria-hidden":"true"}),onClick:V=>V.hide()}]:Array.isArray(l)?l:[],gu=V=>{let ue=ht.trim();ue&&(h?.(V,ue),to(""),et(null));};return jsxs("div",{ref:Y,"data-slot":"desktop-pet","data-ow-variant":m?"native":void 0,className:P,"data-hidden":Oe,"data-anchor-horizontal":uu.horizontal,"data-anchor-vertical":uu.vertical,style:{...pu,...N},onPointerMove:pr,onPointerUp:Us,onPointerCancel:Us,onPointerLeave:()=>!X.current&&we(null),children:[v.length>0&&jsx("div",{"data-ow-part":"sessions",style:ow,"aria-label":"\u6B63\u5728\u6267\u884C\u7684\u4EFB\u52A1",children:v.map(V=>{let ue=V.status==="completed"||V.status==="failed",rt=Ge===V.sessionId;return jsxs("section",{"data-ow-part":"session","data-status":V.status,children:[jsxs("div",{"data-ow-part":"session-main",children:[jsxs("div",{"data-ow-part":"session-content",children:[jsxs("div",{"data-ow-part":"session-heading",children:[jsx(u3,{status:V.status}),jsx("strong",{title:V.title,children:V.title})]}),V.text&&jsx("p",{title:V.text,children:V.text})]}),!ue&&jsxs("div",{"data-ow-part":"session-actions",children:[V.canFeedback!==false&&jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"session-action",title:"\u53CD\u9988","aria-label":"\u53CD\u9988","aria-expanded":rt,icon:jsx(Li,{"aria-hidden":"true"}),onClick:()=>{et(rt?null:V.sessionId),to("");}}),V.canStop!==false&&jsx(f,{variant:"ghost",size:"sm",type:"button","data-ow-part":"session-action","data-ow-variant":"stop",title:"\u505C\u6B62","aria-label":"\u505C\u6B62",icon:jsx(Ba,{"aria-hidden":"true"}),onClick:()=>x?.(V.sessionId)})]})]}),rt&&jsxs("div",{"data-ow-part":"feedback",children:[jsx(te,{autoFocus:true,standalone:false,value:ht,maxLength:500,placeholder:"\u5411\u8BE5\u4EFB\u52A1\u53D1\u9001\u53CD\u9988","aria-label":`\u7ED9 ${V.title} \u7684\u53CD\u9988`,onChange:to,onKeyDown:xt=>{xt.key==="Enter"&&!xt.nativeEvent.isComposing&&gu(V.sessionId),xt.key==="Escape"&&et(null);}}),jsx(f,{variant:"primary",size:"sm",type:"button",disabled:!ht.trim(),onClick:()=>gu(V.sessionId),children:"\u53D1\u9001"})]})]},V.sessionId)})}),fu.length>0&&jsx("div",{"data-ow-part":"toolbar",children:fu.map(V=>jsx(f,{variant:"ghost",size:"sm",type:"button",title:V.label,icon:V.icon,onClick:()=>V.onClick(ve)},V.key))}),jsx("div",{"data-ow-part":"stage",style:tw,onPointerDown:Ko,onContextMenu:V=>{V.preventDefault(),w?.();},onClick:()=>gi(M),onDoubleClick:()=>gi(T),role:"img","aria-label":L.displayName,children:ke?jsx("div",{"data-ow-part":"sprite-fallback",title:L.displayName,children:jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.45"}),jsx("circle",{cx:"12",cy:"4",r:"2.25",fill:"currentColor"}),jsx("circle",{cx:"17.6",cy:"7.2",r:"1.5",fill:"currentColor",opacity:"0.68"}),jsx("circle",{cx:"19.4",cy:"13",r:"1.1",fill:"currentColor",opacity:"0.45"}),jsx("circle",{cx:"15.8",cy:"17.8",r:"0.8",fill:"currentColor",opacity:"0.25"})]})}):jsx("div",{"data-ow-part":"sprite",style:rw})}),jsx("div",{"data-ow-part":"bubble","data-visible":!!pe,children:pe})]})});function mb({selected:e,title:t,description:o,leading:r,badge:n,actionLabel:a,actionAriaLabel:i,onSelect:d,onAction:s}){return jsxs("div",{className:`desktop-selection-card${e?" is-selected":""}`,children:[jsxs(f,{type:"button","data-ow-part":"card-select",variant:"unstyled",className:"desktop-selection-card__select ow-focus-ring",role:"radio","aria-checked":e,onClick:d,children:[r&&jsx("span",{className:"desktop-selection-card__leading","aria-hidden":"true",children:r}),jsxs("span",{className:"desktop-selection-card__copy",children:[jsx("span",{className:"desktop-selection-card__title",children:t}),o&&jsx("span",{className:"desktop-selection-card__description",children:o})]}),n&&jsx("span",{className:"desktop-selection-card__badge",children:n}),e&&jsx("span",{className:"desktop-selection-card__check","aria-hidden":"true",children:jsx(be,{})})]}),a&&s&&jsx(f,{type:"button","data-ow-part":"card-action",variant:"unstyled",className:"desktop-selection-card__action ow-focus-ring","aria-label":i??a,onClick:s,children:a})]})}var id="px-0 py-3.5 gap-4";function MG(e){return jsxs("div",{className:"desktop-pet-settings",children:[jsx(dt,{title:"\u663E\u793A\u684C\u9762\u5BA0\u7269",description:"\u5728\u684C\u9762\u4E0A\u663E\u793A\u72EC\u7ACB\u7684 Orbitwork \u5BA0\u7269\u7A97\u53E3",control:"switch",checked:e.enabled,onCheckedChange:e.onEnabledChange,className:id}),jsx(dt,{title:"\u59CB\u7EC8\u7F6E\u9876",description:"\u5207\u6362\u5230\u5176\u4ED6\u8F6F\u4EF6\u6216\u5168\u5C4F\u7A7A\u95F4\u65F6\uFF0C\u5BA0\u7269\u4ECD\u663E\u793A\u5728\u6700\u4E0A\u5C42",control:"switch",checked:e.alwaysOnTop,onCheckedChange:e.onAlwaysOnTopChange,className:id}),jsx(dt,{title:"\u5BA0\u7269\u5927\u5C0F",description:"\u8C03\u6574\u5BA0\u7269\u5728\u684C\u9762\u4E0A\u7684\u663E\u793A\u5C3A\u5BF8",className:id,action:jsxs("label",{className:"desktop-pet-settings__range",children:[jsx("input",{"aria-label":"\u5BA0\u7269\u5927\u5C0F",type:"range",min:"0.5",max:"1.5",step:"0.1",value:e.scale,onChange:t=>e.onScaleChange(Number(t.target.value))}),jsxs("span",{className:"ow-font-mono tabular-nums",children:[Math.round(e.scale*100),"%"]})]})}),jsx(dt,{title:"\u52A8\u753B\u901F\u7387",description:"\u8C03\u6574\u5BA0\u7269\u52A8\u4F5C\u7684\u64AD\u653E\u901F\u5EA6",className:id,action:jsxs("label",{className:"desktop-pet-settings__range",children:[jsx("input",{"aria-label":"\u52A8\u753B\u901F\u7387",type:"range",min:"0.5",max:"2",step:"0.1",value:e.animationRate,onChange:t=>e.onAnimationRateChange(Number(t.target.value))}),jsxs("span",{className:"ow-font-mono tabular-nums",children:[e.animationRate.toFixed(1),"\xD7"]})]})}),jsx(wa,{title:"\u9009\u62E9\u5BA0\u7269",children:jsx("div",{className:"desktop-selection-grid",role:"radiogroup","aria-label":"\u9009\u62E9\u5BA0\u7269",children:e.pets.map(t=>jsx(mb,{selected:t.id===e.selectedPetId,title:t.displayName,description:t.description||(t.builtIn?"Orbitwork \u5185\u7F6E\u5BA0\u7269":"\u81EA\u5B9A\u4E49\u5BA0\u7269"),leading:jsx("span",{className:"desktop-pet-settings__avatar",children:jsx(bm,{name:"agent",size:20})}),badge:t.builtIn?"\u5185\u7F6E":void 0,onSelect:()=>e.onSelect(t.id)},t.id))})}),jsx(wa,{className:"desktop-pet-settings__import",title:"\u5BFC\u5165\u81EA\u5B9A\u4E49\u5BA0\u7269",description:"\u652F\u6301 Orbitwork v2 \u4E0E Petdex v1/v2 \u5BA0\u7269\u3002\u5B89\u88C5 Petdex \u5BA0\u7269\u540E\uFF0C\u9009\u62E9\u5176 pet.json\uFF0C\u5E76\u786E\u4FDD\u56FE\u96C6\u6587\u4EF6\u4F4D\u4E8E\u540C\u4E00\u76EE\u5F55\u3002",divider:false,actions:jsx(f,{className:"desktop-pet-settings__import-button",variant:"secondary",size:"sm",disabled:e.importing,onClick:e.onImport,children:e.importing?"\u5BFC\u5165\u4E2D\u2026":"\u5BFC\u5165\u5BA0\u7269"})})]})}function DG({label:e,tone:t="running",className:o=""}){let r=`desktop-run-status desktop-run-status--${t}${o?` ${o}`:""}`;return jsxs("span",{className:r,role:"status",title:e,children:[jsx("span",{className:"desktop-run-status__dot","aria-hidden":"true"}),jsx("span",{className:"desktop-run-status__label",children:e})]})}var f3=["font-medium leading-none m-0","text-[length:var(--ow-fs-eyebrow-cjk,12px)]","tracking-[var(--ow-ls-eyebrow-cjk,0.08em)]","text-[color:var(--ow-eyebrow)]"].join(" "),gb=["[font-family:var(--ow-font-mono)] [font-variant-numeric:tabular-nums]","text-[length:var(--ow-fs-caption,12px)] leading-[1.4] text-[color:var(--ow-text-3)]"].join(" "),vb=["shrink-0 [border-radius:var(--ow-radius-xs)]","text-[color:var(--ow-text-2)] hover:text-[color:var(--ow-text)]"].join(" ");function WG({sections:e,query:t,onQueryChange:o,filter:r=true,editingId:n,onEdit:a,onCancelEdit:i,onSave:d,onDelete:s,emptyTitle:l="\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BB0\u5FC6",emptyMessage:c="\u5728\u5BF9\u8BDD\u91CC\u8BA9\u5B83\u8BB0\u4F4F\u91CD\u8981\u4FE1\u606F\uFF0C\u6216\u7531\u4EFB\u52A1\u81EA\u52A8\u6C89\u6DC0\u3002",saveErrorMessage:p="\u6CA1\u80FD\u4FDD\u5B58\u8FD9\u6761\u8BB0\u5FC6\uFF0C\u6539\u52A8\u8FD8\u7559\u5728\u6846\u91CC\uFF0C\u53EF\u4EE5\u76F4\u63A5\u91CD\u8BD5\u3002",className:m}){let[u,b]=useState(""),[w,v]=useState(null),[h,x]=useState({id:null,text:""}),[k,y]=useState(false),[P,N]=useState(null),S=t??u,R=n!==void 0?n:w,M=e.reduce((z,pe)=>z+pe.items.length,0),T=R?e.flatMap(z=>z.items).find(z=>z.id===R):void 0,_=h.id===R?h.text:T?.text??"",L=z=>{t===void 0&&b(z),o?.(z);},I=z=>{N(null),x({id:R??null,text:z});},$=z=>{N(null),x({id:z.id,text:z.text}),n===void 0&&v(z.id),a?.(z);},F=()=>{N(null),x({id:null,text:""}),n===void 0&&v(null),i?.();},E=async z=>{let pe=_.trim();if(!(!pe||k)){y(true),N(null);try{await d?.(z,pe),x({id:null,text:""}),n===void 0&&v(null);}catch(Me){let Oe=Me instanceof Error?Me.message:typeof Me=="string"?Me:void 0;N({id:z.id,detail:Oe?.trim()||void 0});}finally{y(false);}}};if(M===0)return jsx("div",{"data-slot":"settings-memory",className:g("flex flex-col min-w-0",m),children:jsx(H,{size:"page",title:l,message:c})});let O=S.trim().toLowerCase(),ae=e.map(z=>({...z,items:r&&O?z.items.filter(pe=>pe.text.toLowerCase().includes(O)):z.items})).filter(z=>z.items.length>0);return jsxs("div",{"data-slot":"settings-memory",className:g("flex flex-col gap-3.5 min-w-0",m),children:[jsx(te,{type:"search",value:S,onChange:L,placeholder:"\u641C\u7D22\u8BB0\u5FC6","aria-label":"\u641C\u7D22\u8BB0\u5FC6",prefix:jsx($t,{})}),ae.length===0?jsx(H,{message:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6\uFF0C\u6362\u4E2A\u8BCD\u8BD5\u8BD5\u3002"}):ae.map(z=>jsxs("section",{"data-ow-part":"group",className:"flex flex-col gap-0 min-w-0",children:[jsxs("div",{"data-ow-part":"group-head",className:"flex items-baseline gap-2 min-w-0 pb-1",children:[jsx("h3",{"data-ow-part":"group-title",className:f3,children:z.title}),z.description&&jsx("span",{"data-ow-part":"group-desc",className:"truncate text-[length:var(--ow-fs-caption,12px)] leading-[1.4] text-[color:var(--ow-text-3)]",children:z.description}),jsx("span",{className:"flex-1"}),jsxs("span",{"data-ow-part":"group-count",className:g("shrink-0",gb),children:[z.items.length," \u6761"]})]}),z.items.map(pe=>{let Me=pe.id===R;return jsxs("div",{"data-ow-part":"row","data-ow-state":Me?"editing":void 0,className:"flex items-start gap-3 min-w-0 px-0 py-3 border-[color:var(--ow-border)] [[data-ow-part=row]+&]:border-t",children:[jsx("div",{className:"flex-1 min-w-0 flex flex-col gap-1",children:Me?jsxs(Fragment,{children:[jsx(te,{multiline:true,rows:2,autoFocus:true,value:_,onChange:I,"aria-label":"\u7F16\u8F91\u8BB0\u5FC6",className:"[&_[data-ow-part=shell]]:[border-radius:var(--ow-radius-sm)] [&_textarea]:resize-none [&_textarea]:min-h-0 [&_textarea]:leading-[1.6]"}),P?.id===pe.id&&jsx("div",{"data-ow-part":"save-error",children:jsx(J,{variant:"error",detail:P.detail,children:p})}),jsxs("div",{className:"flex gap-2 pt-0.5",children:[jsx(f,{variant:"primary",size:"sm",disabled:!_.trim()||k,onClick:()=>{E(pe);},children:P?.id===pe.id?"\u91CD\u8BD5":"\u4FDD\u5B58"}),jsx(f,{variant:"secondary",size:"sm",disabled:k,onClick:F,children:"\u53D6\u6D88"})]})]}):jsxs(Fragment,{children:[jsx("div",{"data-ow-part":"text",className:"text-ow-fs-ui leading-[1.7] text-[color:var(--ow-text)] [text-wrap:pretty]",children:pe.text}),(pe.sourceLabel||pe.when)&&jsxs("div",{"data-ow-part":"meta",className:"flex items-center gap-2 min-w-0",children:[pe.sourceLabel&&jsx(Nt,{tone:"mute",children:pe.sourceLabel}),pe.when&&jsx("span",{className:gb,children:pe.when})]})]})}),!Me&&jsxs(Fragment,{children:[jsx(f,{variant:"ghost",size:"sm",className:vb,icon:jsx(yt,{}),title:"\u7F16\u8F91","aria-label":"\u7F16\u8F91",onClick:()=>$(pe)}),jsx(f,{variant:"ghost",size:"sm",className:g(vb,"hover:text-[color:var(--ow-danger)]"),icon:jsx(Le,{}),title:"\u5220\u9664","aria-label":"\u5220\u9664",onClick:()=>s?.(pe)})]})]},pe.id)})]},z.id))]})}function YG({items:e,activeId:t,title:o,description:r,children:n,onChange:a,onClose:i,open:d=true,version:s,portal:l=true,className:c=""}){let p=e.find(u=>u.id===t),m=r??p?.description;return jsxs(oe,{bare:true,fitViewport:false,open:d,portal:l,onClose:i,ariaLabel:"\u8BBE\u7F6E",className:`settings-dialog ${c}`.trim(),children:[jsxs("div",{className:"settings__nav",children:[jsx("div",{className:"ttl",children:"\u8BBE\u7F6E"}),e.map(u=>jsx(f,{variant:"unstyled",type:"button",className:`snav${u.id===t?" active":""}`,"aria-current":u.id===t?"true":void 0,onClick:()=>a(u.id),children:jsx("span",{className:"snav__label",children:u.label})},u.id)),s&&jsx("div",{className:"settings__ver",children:s})]}),jsxs("div",{className:"settings__main",tabIndex:-1,"data-autofocus":"",children:[jsxs("div",{className:"settings__top",children:[jsxs("div",{className:"settings__heading",children:[jsx("h1",{className:"h",children:o??p?.label}),m&&jsx("div",{className:"settings__desc",children:m})]}),jsx(f,{variant:"unstyled",className:"x",onClick:i,title:"\u5173\u95ED\u8BBE\u7F6E","aria-label":"\u5173\u95ED\u8BBE\u7F6E",children:jsx(Q,{})})]}),jsx("div",{className:"settings__content",children:jsx("div",{className:"settings__col",children:n})})]})]})}function XG({title:e,description:t,disabled:o,children:r}){return jsx(dt,{title:e,description:t,action:r??null,disabled:o,className:"set-row"})}function QG({value:e,disabled:t=false}){return jsxs("div",{className:`sel${t?" disabled":""}`,children:[e,!t&&jsx(ne,{})]})}function oZ({allSelected:e,selectedCount:t,onToggleAll:o,onCancel:r,onShare:n}){return jsxs("div",{className:"share-pick-bar",role:"toolbar","aria-label":"\u9009\u62E9\u8981\u5206\u4EAB\u7684\u6D88\u606F",children:[jsx(f,{variant:"secondary",size:"sm",className:"share-pick-bar__all","aria-pressed":e,onClick:o,children:"\u5168\u9009 / \u5168\u4E0D\u9009"}),jsxs("span",{className:"share-pick-bar__count","aria-live":"polite",children:["\u5DF2\u9009 ",jsx("span",{className:"share-pick-bar__count-value",children:t})," \u6BB5"]}),jsx(f,{variant:"secondary",size:"sm",onClick:r,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",size:"sm",onClick:n,children:"\u751F\u6210\u5206\u4EAB\u56FE"})]})}var w3=cva(["flex-shrink-0 relative bg-ow-bg shadow-none","transition-[width,min-width] duration-[var(--ow-dur-2)] ease-[var(--ow-ease-beacon)]"].join(" "),{variants:{dragging:{true:"transition-none",false:""},stacked:{true:"flex flex-col",false:""}},defaultVariants:{dragging:false,stacked:false}}),h3=cva("flex flex-col overflow-hidden",{variants:{fill:{true:"flex-1 min-h-0",false:"h-full"}},defaultVariants:{fill:false}}),x3=cva(["flex items-center flex-shrink-0 select-none","h-[var(--ow-titlebar-h)] min-h-[var(--ow-titlebar-h)]","gap-[var(--ow-titlebar-gap)] px-[var(--ow-titlebar-pad-x)]","bg-ow-bg","[-webkit-app-region:drag]"].join(" ")),y3=cva("flex-shrink-0 px-3 pt-2 pb-2"),k3=cva("flex-1 min-h-0 overflow-y-auto overflow-x-hidden pt-0 px-2 pb-3 flex flex-col"),C3=cva("flex-shrink-0 px-3 py-2 border-t border-[color:var(--ow-border)]"),hb=cva("absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-[var(--ow-border-strong)] transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]"),xb=240;function Fs({collapsed:e=false,onCollapsedChange:t,width:o,onWidthChange:r,collapsedWidth:n,minWidth:a=200,maxWidth:i=480,resizable:d=true,platform:s,fullscreen:l=false,unstyled:c=false,header:p,footer:m,children:u,className:b=""}){let[w,v]=useState(false),h=useRef(0),x=useRef(o??xb),k=useCallback(F=>{!d||e||(F.preventDefault(),v(true),h.current=F.clientX,x.current=o??xb);},[d,e,o]);useEffect(()=>{if(!w)return;let F=O=>{let ae=O.clientX-h.current,z=Math.min(i,Math.max(a,x.current+ae));r?.(z);},E=()=>v(false);return document.addEventListener("mousemove",F),document.addEventListener("mouseup",E),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",E),document.body.style.cursor="",document.body.style.userSelect="";}},[w,i,a,r]);let y=o??"var(--ow-sidebar-w)",P=s!=null&&s!=="windows",N=s==="mac"&&!l,S=N?"var(--ow-sidebar-collapsed-w-mac)":P?"var(--ow-sidebar-collapsed-w)":0,R=e&&n!=null&&n>0,M=e&&n===0,T=e&&P&&!R&&!M,_=e&&!R&&!T,L=M?0:e?R?n:S:y,I=R?n:y,$=c?b:g(w3({dragging:w,stacked:P}),b);return jsx("aside",{"data-slot":"sidebar","data-ow-platform":s,"data-ow-collapsed":e?"":void 0,className:$,style:c?void 0:{width:L,minWidth:L},children:c?jsxs(Fragment,{children:[u,d&&!e&&jsx("div",{"data-slot":"sidebar-resize-handle",className:hb(),onMouseDown:k})]}):jsxs(Fragment,{children:[P&&jsxs("div",{"data-slot":"sidebar-toprow","data-ow-floating":_?"":void 0,className:_?"absolute top-0 left-0 w-max flex items-center flex-shrink-0 select-none h-[var(--ow-titlebar-h)] min-h-[var(--ow-titlebar-h)] gap-[var(--ow-titlebar-gap)] px-[var(--ow-titlebar-pad-x)] pointer-events-none [&_[data-slot=sidebar-toggle]]:pointer-events-auto":x3(),children:[N&&jsx("div",{"aria-hidden":"true","data-slot":"sidebar-traffic-inset",className:"w-[var(--ow-traffic-inset)] h-full flex-shrink-0"}),jsx(hc,{collapsed:e,onToggle:()=>t?.(!e)})]}),!_&&!T&&jsxs("div",{"data-slot":"sidebar-inner",className:h3({fill:P}),style:{width:I},children:[p&&jsx("div",{"data-slot":"sidebar-header",className:y3(),children:p}),jsx("div",{"data-slot":"sidebar-body",className:k3(),children:u}),m&&jsx("div",{"data-slot":"sidebar-footer",className:C3(),children:m})]}),d&&!e&&jsx("div",{"data-slot":"sidebar-resize-handle",className:hb(),onMouseDown:k})]})})}function SZ(e){let{projects:t}=e,{isImeEnter:o,onCompositionStart:r,onCompositionEnd:n}=Dt(),[a,i]=useState(false),[d,s]=useState(null),l=useRef(null),c=A=>{s(null),l.current?.focus();},[p,m]=useState(null),[u,b]=useState(null),[w,v]=useState(null),[h,x]=useState(null),[k,y]=useState(null),[P,N]=useState(null),[S,R]=useState(null),[M,T]=useState(null),[_,L]=useState(false),[I,$]=useState(null),[F,E]=useState(null),[O,ae]=useState(false),[z,pe]=useState(false);useEffect(()=>{if(!p&&!u&&!w)return;let A=()=>{m(null),b(null),v(null);},D=window.setTimeout(()=>window.addEventListener("click",A),0);return ()=>{window.clearTimeout(D),window.removeEventListener("click",A);}},[p,u,w]),useEffect(()=>{if(!d)return;let A=()=>s(null),D=Y=>{Y.key==="Escape"&&c();};return window.addEventListener("click",A),window.addEventListener("keydown",D),window.addEventListener("blur",A),()=>{window.removeEventListener("click",A),window.removeEventListener("keydown",D),window.removeEventListener("blur",A);}},[d]),useEffect(()=>{e.update?.state!=="ready"&&ae(false);},[e.update?.state]);let Me=A=>t.flatMap(D=>D.threads).find(D=>D.id===A),Oe=()=>{$(null),E(null);},ee=async()=>{if(!h)return;let A=h,D=A.value.trim();if(x(null),!!D)try{await e.onRenameThread(A.id,D);}catch{x(A);}},q=async()=>{if(!k)return;let A=k,D=A.value.trim();if(y(null),!!D)try{await e.onRenameProject(A.id,D);}catch{y(A);}};return jsxs(Fs,{collapsed:e.collapsed,onCollapsedChange:e.onCollapsedChange,width:e.width,onWidthChange:e.onWidthChange,minWidth:180,maxWidth:400,platform:e.platform,fullscreen:e.fullscreen,collapsedWidth:e.collapsedWidth,children:[jsx("div",{className:"owbrand",children:jsx(dc,{theme:"auto",size:20})}),jsxs("nav",{className:"ownav",children:[jsx(di,{id:"new",label:"\u65B0\u4EFB\u52A1",title:e.newTaskTitle,active:e.activeNav==="new",icon:jsx(xd,{}),onClick:()=>e.onNewTask()}),jsx(di,{id:"skills",label:"\u63D2\u4EF6",title:"\u63D2\u4EF6",active:e.activeNav==="skills",icon:jsx(Ld,{}),onClick:()=>e.onNavigate("skills")}),jsx(di,{id:"sites",label:"\u5DE5\u4F5C\u53F0",title:"\u5DE5\u4F5C\u53F0",active:e.activeNav==="sites",icon:jsx(Br,{}),onClick:()=>e.onNavigate("sites")}),jsx(di,{id:"cron",label:"\u5B9A\u65F6\u4EFB\u52A1",title:"\u5B9A\u65F6\u4EFB\u52A1",active:e.activeNav==="cron",icon:jsx(No,{}),onClick:()=>e.onNavigate("cron")}),e.showWorkspaceNav&&jsx(di,{id:"files",label:"\u6211\u7684\u7A7A\u95F4",title:"\u6211\u7684\u7A7A\u95F4",active:e.activeNav==="files",icon:jsx(yi,{}),onClick:()=>e.onNavigate("files")}),jsx(di,{id:"library",label:"\u8D44\u6599\u5E93",title:"\u8D44\u6599\u5E93",active:e.activeNav==="library",icon:jsx(mr,{}),onClick:()=>e.onNavigate("library")})]}),jsxs("div",{className:"owrecent-head","data-tour-anchor":"projects",children:[jsx("div",{className:"t",children:"\u9879\u76EE"}),jsxs("div",{className:"owrecent-actions",children:[jsx(f,{variant:"unstyled",title:"\u66F4\u591A\u9879\u76EE\u64CD\u4F5C","aria-label":"\u66F4\u591A\u9879\u76EE\u64CD\u4F5C",onClick:A=>{A.stopPropagation();let D=A.currentTarget.getBoundingClientRect();v({left:D.right+6,top:D.top});},children:jsx(Go,{})}),jsx(f,{variant:"unstyled",title:"\u65B0\u5EFA\u9879\u76EE","aria-label":"\u65B0\u5EFA\u9879\u76EE",onClick:()=>i(true),children:jsx(We,{})})]})]}),jsx("div",{className:"owprojects",children:e.sessionsLoading&&t.every(A=>A.threads.length===0)?jsxs("div",{className:"owprojects-boot",role:"status","aria-live":"polite",children:[jsx(xr,{variant:"auto",size:40}),jsx(Ro,{size:"md"})]}):t.map(A=>jsxs("div",{className:"owproject",children:[k?.id===A.id?jsxs("div",{className:"owproject__head renaming",children:[jsx(qe,{className:"project-icon"}),jsx(Sr,{unstyled:true,autoFocus:true,value:k.value,onChange:D=>y({id:A.id,value:D.target.value}),onBlur:()=>{q();},onCompositionStart:r,onCompositionEnd:n,onKeyDown:D=>{o(D)||(D.key==="Enter"&&q(),D.key==="Escape"&&y(null));}})]}):jsxs("div",{className:`owproject__head${A.open?"":" collapsed"}${F===A.id?" drop-target":""}`,onDragOver:D=>{I&&(D.preventDefault(),D.dataTransfer.dropEffect="move",E(A.id));},onDragLeave:D=>{let Y=D.relatedTarget;Y instanceof Node&&D.currentTarget.contains(Y)||E(Ee=>Ee===A.id?null:Ee);},onDrop:D=>{D.preventDefault();let Y=D.dataTransfer.getData("application/x-owthread-id")||I;Oe(),Y&&e.onMoveThread(Y,A.id).catch(()=>{});},children:[jsxs(f,{variant:"unstyled",className:"owproject__head-main",title:A.label,"aria-expanded":A.open,onClick:()=>e.onToggleProject(A.id),children:[A.open?jsx(ne,{className:"caret"}):jsx(he,{className:"caret"}),jsx(qe,{className:"project-icon"}),jsx("span",{className:"lbl",children:A.label})]}),jsx(f,{variant:"unstyled",className:"more",title:"\u9879\u76EE\u64CD\u4F5C","aria-label":`${A.label} \u7684\u9879\u76EE\u64CD\u4F5C`,"aria-haspopup":"menu",onClick:D=>{D.stopPropagation();let Y=D.currentTarget.getBoundingClientRect();m(null),b({id:A.id,label:A.label,isDefault:A.isDefault,left:Y.right+6,top:Y.top});},children:jsx(Go,{})})]}),A.open&&jsxs("div",{className:"owthreads",children:[A.threads.map(D=>h?.id===D.id?jsx("div",{className:"owthread renaming",children:jsx(Sr,{unstyled:true,autoFocus:true,value:h.value,onChange:Y=>x({id:D.id,value:Y.target.value}),onBlur:()=>{ee();},onCompositionStart:r,onCompositionEnd:n,onKeyDown:Y=>{o(Y)||(Y.key==="Enter"&&ee(),Y.key==="Escape"&&x(null));}})},D.id):jsxs("div",{className:`owthread${D.active?" active":""}${I===D.id?" dragging":""}`,draggable:!D.running,onDragStart:Y=>{D.running||($(D.id),Y.dataTransfer.effectAllowed="move",Y.dataTransfer.setData("application/x-owthread-id",D.id));},onDragEnd:Oe,children:[jsxs(f,{variant:"unstyled",className:"owthread__main",title:D.title,onClick:()=>e.onSelectThread(D.id),children:[D.unread&&jsx("span",{className:"dot",title:"\u672A\u8BFB","aria-label":"\u672A\u8BFB",role:"img"}),jsx("span",{className:"lbl",children:D.title}),D.running&&jsx("span",{className:"run-dot",title:"\u4EFB\u52A1\u6B63\u5728\u6267\u884C","aria-label":"\u4EFB\u52A1\u6B63\u5728\u6267\u884C",role:"img"}),D.running&&D.runningCount&&jsx("span",{className:"run-cnt",title:"\u4EFB\u52A1\u8FDB\u5EA6",children:D.runningCount})]}),jsxs("span",{className:`thread-trailing${D.sourceIcon||D.branched||D.archived?" has-marks":""}`,children:[jsxs("span",{className:"thread-status-marks",children:[D.sourceIcon&&jsx("span",{className:"thread-source-mark",title:D.sourceLabel?`${D.sourceLabel}\u4F1A\u8BDD`:"IM \u4F1A\u8BDD",children:jsx(ra,{name:D.sourceIcon,size:16})}),D.branched&&jsx("span",{className:"thread-branch-mark",title:"\u5206\u652F\u4F1A\u8BDD",children:jsx(Po,{})}),D.archived&&jsx("span",{className:"thread-archive-mark",title:"\u5DF2\u5F52\u6863",children:jsx(Pi,{})})]}),jsx(f,{variant:"unstyled",className:"more",title:"\u66F4\u591A","aria-label":`${D.title} \u7684\u66F4\u591A\u64CD\u4F5C`,"aria-haspopup":"menu",onClick:Y=>{Y.stopPropagation();let Ee=Y.currentTarget.getBoundingClientRect();b(null),m({id:D.id,left:Ee.right+6,top:Ee.top});},children:jsx(Go,{})})]})]},D.id)),A.threads.length===0&&jsxs(f,{variant:"unstyled",className:"owthread-new",onClick:()=>e.onNewTask(A.id),children:[jsx(We,{})," \u65B0\u5EFA\u4EFB\u52A1"]}),A.canLoadMore&&jsx(f,{variant:"unstyled",className:`owthread-more${A.loadError?" error":""}`,disabled:A.loadingMore,onClick:()=>e.onLoadMore(A.id),children:A.loadingMore?jsxs(Fragment,{children:[jsx(Ro,{size:"sm"}),"\u52A0\u8F7D\u4E2D\u2026"]}):jsxs(Fragment,{children:[jsx(ne,{className:"lead","aria-hidden":"true"}),A.loadError?"\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5":"\u5C55\u5F00\u663E\u793A"]})})]})]},A.id))}),w&&jsx(jp,{anchor:w,children:jsx(pt,{width:168,autoAdjust:true,items:[{key:"refresh",label:"\u5237\u65B0",icon:jsx(Ue,{})},{key:"archived",label:e.showArchived?"\u9690\u85CF\u5DF2\u5F52\u6863":"\u663E\u793A\u5DF2\u5F52\u6863",icon:jsx(Pi,{})}],onSelect:A=>{v(null),A==="refresh"&&e.onRefreshProjects(),A==="archived"&&e.onShowArchivedChange(!e.showArchived);}})}),p&&jsx(jp,{anchor:p,children:jsx(pt,{width:160,autoAdjust:true,items:[{key:"rename",label:"\u91CD\u547D\u540D",icon:jsx(yt,{}),disabled:!!Me(p.id)?.archived},{key:"share",label:"\u5206\u4EAB",icon:jsx(lo,{})},{key:"move",label:"\u79FB\u52A8",icon:jsx(qe,{}),disabled:!!Me(p.id)?.running},...Me(p.id)?.archived?[]:[{key:"archive",label:"\u5F52\u6863",icon:jsx(Pi,{}),disabled:Me(p.id)?.canArchive===false}],{key:"delete",label:"\u5220\u9664",icon:jsx(Le,{}),danger:true}],onSelect:A=>{let D=Me(p.id);m(null),D&&(A==="rename"&&x({id:D.id,value:D.title}),A==="share"&&e.onShareThread(D.id),A==="move"&&T(D),A==="archive"&&e.onArchiveThread(D.id).catch(()=>{}),A==="delete"&&N(D));}})}),u&&jsx(jp,{anchor:u,children:jsx(pt,{width:160,autoAdjust:true,items:P3(u.isDefault),onSelect:A=>{let D=t.find(Y=>Y.id===u.id);b(null),D&&(A==="new-task"&&e.onNewTask(D.id),A==="open-dir"&&e.onOpenProjectDirectory(D.id),A==="rename"&&y({id:D.id,value:D.label}),A==="delete"&&R(D));}})}),jsxs("div",{className:"owuser",children:[jsxs(f,{ref:l,variant:"unstyled",className:"owuser__main","aria-haspopup":"menu","aria-expanded":!!d,title:e.user.name,onClick:A=>{if(A.stopPropagation(),d)return s(null);let D=A.currentTarget.getBoundingClientRect();s({left:D.left,top:D.top,byKeyboard:A.detail===0});},children:[jsx(un,{className:"av",size:26,id:e.user.id??e.user.name,children:e.user.avatarUrl?jsx("img",{src:e.user.avatarUrl,alt:"",className:"w-full h-full object-cover",onError:A=>A.currentTarget.remove()}):e.user.name.slice(-1)}),jsx("span",{className:"name",children:e.user.name}),!e.update&&jsx(he,{className:"chev"})]}),e.update&&jsx(S3,{update:e.update,onClick:()=>{e.update?.state==="ready"?ae(true):e.update?.state!=="downloading"&&e.onUpdateClick?.();}})]}),d&&createPortal(jsxs(Fragment,{children:[jsx("div",{className:"owusermenu-backdrop",onClick:A=>{A.stopPropagation(),s(null);}}),jsx("div",{className:"owusermenu",style:{position:"fixed",left:d.left,bottom:window.innerHeight-d.top+8},onClick:A=>A.stopPropagation(),children:jsx(Wv,{user:e.user,plan:e.plan,credits:e.credits,version:e.version,update:e.update,theme:e.theme,onThemeChange:e.onThemeChange,petVisible:e.petVisible,onPetVisibleChange:e.onPetVisibleChange,onOpenSettings:e.onOpenSettings,onOpenMemory:e.onOpenMemory,onCopyUserId:e.onCopyUserId,onCheckUpdate:()=>{let A=e.update?.state;if(A==="ready")return ae(true);if(A!=="downloading"){if(e.update)return e.onUpdateClick?.();(e.onCheckUpdate??e.onUpdateClick)?.();}},onFeedback:e.onFeedback,onLogout:e.onLogout,autoFocus:d.byKeyboard?true:"surface",onClose:()=>c()})})]}),document.body),P&&jsx(Cb,{title:"\u5220\u9664\u4EFB\u52A1",description:`\u786E\u5B9A\u8981\u5220\u9664\u300C${P.title}\u300D\u5417\uFF1F\u8BE5\u4EFB\u52A1\u7684\u5BF9\u8BDD\u5C06\u88AB\u79FB\u9664\uFF0C\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002`,onCancel:()=>N(null),onConfirm:()=>{let A=P.id;e.onDeleteThread(A).then(()=>N(null)).catch(()=>{});}}),S&&jsx(Cb,{title:"\u5220\u9664\u9879\u76EE",description:`\u786E\u5B9A\u8981\u5220\u9664\u9879\u76EE\u300C${S.label}\u300D\u5417\uFF1F\u9879\u76EE\u4E0B\u7684\u4EFB\u52A1\u5C06\u4E0D\u518D\u663E\u793A\uFF0C\u4F46\u672C\u5730\u5DE5\u4F5C\u76EE\u5F55\u4E2D\u7684\u6587\u4EF6\u4F1A\u4FDD\u7559\u3002`,pending:_,pendingLabel:"\u5220\u9664\u4E2D\u2026",onCancel:()=>R(null),onConfirm:()=>{L(true),e.onDeleteProject(S.id).then(()=>R(null)).catch(()=>{}).finally(()=>L(false));}}),O&&e.update?.state==="ready"&&jsx(R3,{version:e.update.version,pending:z,onCancel:()=>ae(false),onConfirm:()=>{pe(true),Promise.resolve().then(()=>e.onInstallUpdate?.()).catch(()=>pe(false));}}),a&&createPortal(jsx(af,{onCancel:()=>i(false),onSubmit:A=>e.onCreateProject(A).then(()=>i(false))}),document.body),M&&jsx(T3,{thread:M,projects:t,onCreateProject:e.onCreateProjectForSelection,onCancel:()=>T(null),onSubmit:A=>e.onMoveThread(M.id,A).then(()=>T(null))})]})}function S3({update:e,onClick:t}){let o=Math.round(Math.max(0,Math.min(100,e.percent??0))),{title:r}=Cp(e),n=e.state==="ready"?Ue:Co;return jsxs("button",{type:"button",className:`owuser-update ${e.state}`,title:r,"aria-label":r,disabled:e.state==="downloading",onClick:a=>{a.stopPropagation(),t();},children:[jsxs("span",{className:"owuser-update-ic",children:[jsx(n,{}),e.state!=="downloading"&&jsx("i",{className:"owuser-update-dot","aria-hidden":"true"})]}),e.state==="downloading"&&jsxs("em",{children:[o,"%"]})]})}function di({id:e,label:t,title:o,active:r,icon:n,onClick:a}){return jsxs(f,{variant:"unstyled",className:`ownavitem${r?" active":""}`,"aria-current":r?"page":void 0,"data-tour-anchor":e==="new"?"new-task":e==="skills"?"plugins":e==="sites"?"workbench":void 0,onClick:a,title:o,children:[n,jsx("span",{className:"lbl",children:t})]})}function jp({anchor:e,children:t}){return jsx("div",{style:{position:"fixed",left:e.left,top:e.top,zIndex:1e3},onClick:o=>o.stopPropagation(),children:t})}function P3(e){return [{key:"new-task",label:"\u65B0\u5EFA\u4EFB\u52A1",icon:jsx(We,{})},{key:"open-dir",label:"\u6253\u5F00\u9879\u76EE\u76EE\u5F55",icon:jsx(qe,{})},...e?[]:[{key:"rename",label:"\u91CD\u547D\u540D",icon:jsx(yt,{})},{key:"delete",label:"\u5220\u9664",icon:jsx(Le,{}),danger:true}]]}function Cb({title:e,description:t,pending:o=false,pendingLabel:r="\u5220\u9664\u4E2D\u2026",onCancel:n,onConfirm:a}){return jsx(oe,{open:true,variant:"danger",icon:jsx(Le,{"aria-hidden":"true"}),title:e,closable:false,closeOnOverlayClick:!o,closeOnEscape:!o,onClose:n,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:o,onClick:n,children:"\u53D6\u6D88"}),jsx(f,{variant:"danger",disabled:o,onClick:a,children:o?r:"\u5220\u9664"})]}),children:t})}function R3({version:e,pending:t,onCancel:o,onConfirm:r}){return jsxs(oe,{open:true,icon:jsx(Ue,{"aria-hidden":"true"}),iconTone:"plain",title:"\u5B89\u88C5\u66F4\u65B0",closable:false,closeOnOverlayClick:!t,closeOnEscape:!t,onClose:o,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:t,onClick:o,children:"\u7A0D\u540E"}),jsx(f,{variant:"primary",disabled:t,onClick:r,children:t?"\u6B63\u5728\u91CD\u542F\u2026":"\u5B89\u88C5\u5E76\u91CD\u542F"})]}),children:["Orbitwork ",e," \u5DF2\u4E0B\u8F7D\u5B8C\u6210\u3002\u5B89\u88C5\u540E\u5E94\u7528\u5C06\u81EA\u52A8\u91CD\u542F\u3002"]})}function T3({thread:e,projects:t,onCreateProject:o,onCancel:r,onSubmit:n}){let[a,i]=useState(""),[d,s]=useState(false),[l,c]=useState(null),p=()=>{!a||d||(s(true),c(null),n(a).catch(m=>c(m instanceof Error?m.message:"\u79FB\u52A8\u5931\u8D25")).finally(()=>s(false)));};return jsxs(oe,{open:true,title:`\u79FB\u52A8\u4EFB\u52A1\u300C${e.title}\u300D`,width:480,closable:false,onClose:r,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:d,onClick:r,children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",disabled:!a||d,onClick:p,children:d?"\u79FB\u52A8\u4E2D\u2026":"\u786E\u8BA4"})]}),children:[jsx(Nl,{value:a,options:t.filter(m=>m.id!==e.projectId).map(m=>({value:m.id,label:m.label})),onChange:i,onCreate:o,placeholder:"\u9009\u62E9\u76EE\u6807\u9879\u76EE",disabled:d}),l&&jsx("div",{"data-ow-part":"error",className:"mt-2 text-ow-error font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:l})]})}function FZ({tab:e,onTab:t,children:o,navigationKey:r=e,filters:n,scrollTop:a,onScrollTopChange:i}){let d=useRef(null),s=useRef(new Map),l=useRef(a),c=useRef(i);return l.current=a,c.current=i,useLayoutEffect(()=>{let p=d.current;if(!p)return;let m=c.current;return p.scrollTop=l.current??s.current.get(r)??0,()=>{s.current.set(r,p.scrollTop),m?.(p.scrollTop);}},[r]),jsxs("section",{className:"shares-workbench",children:[n&&jsx(ha,{eyebrow:jsx(go,{onClick:()=>t("sites"),children:"\u8FD4\u56DE\u5DE5\u4F5C\u53F0"}),title:"\u6211\u7684\u5206\u4EAB",description:"\u7BA1\u7406\u4F60\u5206\u4EAB\u7684\u5185\u5BB9\u4E0E\u8BBF\u95EE\u6743\u9650\u3002",search:jsx(Hn,{value:n.query,onChange:n.onQuery,placeholder:"\u641C\u7D22\u5206\u4EAB\u540D\u79F0"}),tabs:[{key:"shared-sites",label:"\u7AD9\u70B9"},{key:"conversations",label:"\u4F1A\u8BDD"}],activeTabKey:e,onTabChange:p=>t(p),tabsExtra:jsx("div",{className:"shares-status-filter",role:"group","aria-label":"\u5206\u4EAB\u72B6\u6001",children:jsx(wr,{size:"sm",value:n.status,onChange:n.onStatus,options:[{value:"",label:"\u5168\u90E8\u72B6\u6001"},{value:"active",label:e==="conversations"?"\u53EF\u8BBF\u95EE":"\u5DF2\u4E0A\u7EBF"},{value:"disabled",label:"\u5DF2\u505C\u7528"},...e==="shared-sites"?[{value:"draft",label:"\u8349\u7A3F"}]:[]]})})}),jsx("div",{ref:d,className:"shares-scroll",children:o})]})}function Nb({error:e,onRetry:t,loading:o}){return jsxs("div",{className:"shares-error",role:"alert",children:[jsxs("div",{children:[jsx("strong",{children:e.title}),jsx("p",{children:e.message})]}),jsx(f,{variant:"secondary",disabled:o,onClick:t,children:"\u91CD\u8BD5"}),e.details&&jsxs("details",{children:[jsx("summary",{children:"\u9519\u8BEF\u8BE6\u60C5"}),jsx("p",{children:e.details})]})]})}function $Z(e){let t=!!(e.query||e.status);return jsxs("section",{className:"shares-list","aria-label":e.title,"aria-busy":e.loading,children:[e.error&&jsx(Nb,{error:e.error,onRetry:e.onRetry,loading:e.loading}),e.loading&&!e.rows.length&&!e.error&&jsx("div",{"aria-label":"\u6B63\u5728\u52A0\u8F7D\u5206\u4EAB",className:"shares-skeletons",children:[0,1,2,3,4].map(o=>jsx(re,{className:"h-16 w-full"},o))}),!e.loading&&!e.error&&!e.rows.length&&jsx(H,{size:"page",title:t?"\u6CA1\u6709\u5339\u914D\u7684\u5206\u4EAB":`\u8FD8\u6CA1\u6709${e.title}`,message:t?"\u6362\u4E2A\u540D\u79F0\u641C\u7D22\uFF0C\u6216\u6E05\u9664\u7B5B\u9009\u540E\u67E5\u770B\u3002":e.title==="\u4F1A\u8BDD\u5206\u4EAB"?"\u5728\u4F1A\u8BDD\u4E2D\u9009\u62E9\u5185\u5BB9\uFF0C\u5373\u53EF\u521B\u5EFA\u5206\u4EAB\u3002":"\u5728\u7AD9\u70B9\u8BE6\u60C5\u4E2D\u8BBE\u7F6E\u8BBF\u95EE\u8303\u56F4\u6216\u6DFB\u52A0\u6307\u5B9A\u6210\u5458\u3002",actionLabel:t?"\u6E05\u9664\u7B5B\u9009":"\u8FD4\u56DE\u5DE5\u4F5C\u53F0",actionVariant:"secondary",onAction:t?e.onClear:e.onBack}),e.rows.length>0&&jsxs("table",{className:"shares-table",children:[jsxs("colgroup",{children:[jsx("col",{className:"shares-name-col"}),jsx("col",{className:"shares-access-col"}),jsx("col",{className:"shares-state-col"}),jsx("col",{className:"shares-actions-col"})]}),jsx("thead",{children:jsxs("tr",{children:[jsx("th",{scope:"col",children:"\u5185\u5BB9"}),jsx("th",{scope:"col",children:"\u8BBF\u95EE\u8303\u56F4"}),jsx("th",{scope:"col",children:"\u72B6\u6001"}),jsx("th",{scope:"col",className:"shares-actions-heading",children:"\u64CD\u4F5C"})]})}),jsx("tbody",{children:e.rows.map(o=>jsxs("tr",{children:[jsxs("th",{scope:"row",className:"shares-name-cell",children:[jsx(f,{variant:"unstyled",className:"shares-name",title:o.name,onClick:()=>e.onDetail(o.id),children:o.name}),jsx("span",{className:"shares-meta",children:o.detail})]}),jsxs("td",{className:"shares-access-cell",children:[jsx("span",{children:o.access}),o.accessDetail&&jsx("span",{className:"shares-meta",children:o.accessDetail})]}),jsx("td",{className:"shares-state-cell",children:jsx(Nt,{tone:o.statusTone??(o.available?"ok":"mute"),children:o.status})}),jsx("td",{className:"shares-actions-cell",children:jsxs("div",{className:"shares-row-actions",children:[o.available&&jsx(f,{size:"sm",variant:"ghost",onClick:()=>e.onOpen(o.id),children:"\u67E5\u770B"}),jsx(f,{size:"sm",variant:"secondary",onClick:()=>e.onManage(o.id),children:e.manageLabel??"\u5206\u4EAB\u8BBE\u7F6E"}),e.onAction&&jsx(zn,{ariaLabel:`${o.name}\u7684\u66F4\u591A\u64CD\u4F5C`,items:[{key:"rename",label:"\u91CD\u547D\u540D",icon:jsx(yt,{})},{key:"toggle",label:o.disabled?"\u6062\u590D\u8BBF\u95EE":"\u505C\u7528",icon:o.disabled?jsx(vr,{}):jsx(ta,{})},{key:"delete",label:"\u5220\u9664",danger:true,icon:jsx(Le,{})}],onSelect:r=>e.onAction?.(o.id,r)})]})})]},o.id))})]}),e.more&&jsx("div",{className:"shares-pagination",children:jsx(f,{variant:"secondary",disabled:e.loading,onClick:e.onMore,children:e.loading?"\u6B63\u5728\u52A0\u8F7D\u2026":"\u52A0\u8F7D\u66F4\u591A"})})]})}function zZ(e){let[t,o]=useState(e.name),r=e.action==="rename"?"\u91CD\u547D\u540D":e.action==="delete"?"\u5220\u9664\u6B64\u5185\u5BB9\uFF1F":e.disabled?"\u6062\u590D\u8BBF\u95EE\uFF1F":"\u505C\u7528\u6B64\u5185\u5BB9\uFF1F";return jsx(oe,{open:true,title:r,variant:e.action==="delete"?"danger":"default",onClose:()=>{e.busy||e.onClose();},actions:jsxs(Fragment,{children:[jsx(f,{variant:"ghost",disabled:e.busy,onClick:e.onClose,children:"\u53D6\u6D88"}),jsx(f,{variant:e.action==="delete"?"danger":"primary",disabled:e.busy||e.action==="rename"&&(!t.trim()||t.trim()===e.name),onClick:()=>{e.onSubmit(t.trim()).catch(()=>{});},children:e.action==="rename"?"\u4FDD\u5B58":"\u786E\u8BA4"})]}),children:jsxs("div",{className:"resource-section",children:[e.action==="rename"?jsx(te,{value:t,onChange:o,"aria-label":"\u5206\u4EAB\u540D\u79F0"}):jsx("p",{children:e.action==="delete"?`\u201C${e.name}\u201D\u5C06\u65E0\u6CD5\u8BBF\u95EE\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002`:e.disabled?`\u6062\u590D\u201C${e.name}\u201D\u540E\uFF0C\u5F53\u524D\u6743\u9650\u548C\u6709\u6548\u94FE\u63A5\u5C06\u91CD\u65B0\u751F\u6548\u3002`:`\u505C\u7528\u201C${e.name}\u201D\u540E\uFF0C\u6240\u6709\u5165\u53E3\u6682\u505C\u8BBF\u95EE\uFF0C\u6743\u9650\u548C\u94FE\u63A5\u8BBE\u7F6E\u4F1A\u4FDD\u7559\u3002`}),e.error&&jsx(Nb,{error:{title:"\u64CD\u4F5C\u672A\u5B8C\u6210",message:e.error},loading:e.busy,onRetry:e.onRetry})]})})}function pi({children:e,error:t=false,onRetry:o}){return e?jsxs("div",{className:"resource-notice",role:t?"alert":"status",children:[e,o&&jsx(f,{variant:"secondary",onClick:o,children:"\u91CD\u8BD5"})]}):null}function GZ(e){return jsxs("section",{className:"resource-section",children:[jsxs("div",{className:"resource-toolbar",children:[jsx(f,{variant:"ghost",onClick:e.onBack,children:e.backLabel??"\u8FD4\u56DE\u5217\u8868"}),e.actions]}),jsx("h2",{children:e.name}),jsxs("p",{children:[e.status," \xB7 ",e.access]}),jsx("nav",{className:"resource-actions","aria-label":"\u8D44\u6E90\u8BE6\u60C5",children:e.tabs.map(t=>jsx(f,{variant:e.tab===t.value?"secondary":"ghost",onClick:()=>e.onTab(t.value),"aria-current":e.tab===t.value?"page":void 0,children:t.label},t.value))}),e.children]})}function ZZ(e){let[t,o]=useState(e.name),[r,n]=useState(null);return jsxs("div",{className:"resource-section",children:[jsx("p",{className:"resource-address",children:e.address}),jsxs("div",{className:"resource-actions",children:[jsx(f,{onClick:e.onOpen,disabled:!e.available,children:"\u6253\u5F00"}),jsx(f,{onClick:e.onCopy,variant:"secondary",disabled:!e.available,children:"\u590D\u5236\u5730\u5740"}),e.onSource&&jsx(f,{variant:"ghost",onClick:e.onSource,children:"\u7EE7\u7EED\u5236\u4F5C"})]}),e.details.map(a=>jsx("p",{children:a},a)),jsxs("div",{className:"resource-toolbar",children:[jsx(te,{value:t,onChange:o,"aria-label":"\u663E\u793A\u540D\u79F0"}),jsx(f,{disabled:e.busy||!t.trim()||t===e.name,onClick:()=>{e.onRename(t).catch(()=>{});},children:"\u4FDD\u5B58\u540D\u79F0"})]}),jsxs("div",{className:"resource-actions",children:[jsx(f,{disabled:e.busy,variant:"secondary",onClick:()=>n("toggle"),children:e.disabled?"\u6062\u590D\u8BBF\u95EE":"\u505C\u7528"}),jsx(f,{disabled:e.busy,variant:"ghost",onClick:()=>n("delete"),children:"\u5220\u9664"})]}),r&&jsx(pd,{title:r==="delete"?"\u5220\u9664\u6B64\u5185\u5BB9\uFF1F":e.disabled?"\u6062\u590D\u8BBF\u95EE\uFF1F":"\u505C\u7528\u8BBF\u95EE\uFF1F",description:r==="delete"?"\u5185\u5BB9\u5C06\u65E0\u6CD5\u8BBF\u95EE\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002":e.disabled?"\u539F\u6709\u5206\u4EAB\u8BBE\u7F6E\u5C06\u91CD\u65B0\u751F\u6548\u3002":"\u6240\u6709\u8BBF\u95EE\u5165\u53E3\u5C06\u6682\u505C\uFF0C\u5206\u4EAB\u8BBE\u7F6E\u4F1A\u4FDD\u7559\u3002",busy:e.busy,onCancel:()=>n(null),onConfirm:async()=>{await(r==="delete"?e.onDelete():e.onToggle()),n(null);}})]})}function pd({title:e,description:t,busy:o,onConfirm:r,onCancel:n}){let[a,i]=useState("");return jsxs(oe,{open:true,title:e,onClose:n,width:460,actions:jsxs(Fragment,{children:[jsx(f,{autoFocus:true,variant:"secondary",disabled:o,onClick:n,children:"\u53D6\u6D88"}),jsx(f,{disabled:o,onClick:()=>{r().catch(d=>i(d instanceof Error?d.message:"\u64CD\u4F5C\u5931\u8D25"));},children:"\u786E\u8BA4"})]}),children:[jsx("p",{children:t}),jsx(pi,{error:true,children:a})]})}function qZ(e){let[t,o]=useState(null);return jsxs("section",{className:"resource-section",children:[jsx(pi,{error:true,children:e.error}),e.error&&jsx(f,{onClick:e.onRetry,children:"\u91CD\u8BD5"}),e.releases.map(r=>jsxs("article",{className:"resource-row",children:[jsxs("div",{children:[jsxs("strong",{children:["v",r.version," \xB7 ",r.status]}),jsxs("span",{children:[r.detail," \xB7 ",r.time]}),r.failure&&jsx(pi,{error:true,children:r.failure})]}),r.rollback&&jsx(f,{disabled:e.busy,variant:"secondary",onClick:()=>o(r),children:"\u56DE\u6EDA\u81F3\u6B64\u5185\u5BB9"})]},r.id)),e.more&&jsx(f,{disabled:e.busy,onClick:e.onMore,children:"\u52A0\u8F7D\u66F4\u591A\u53D1\u5E03\u8BB0\u5F55"}),t&&jsx(pd,{title:`\u56DE\u6EDA\u81F3 v${t.version} \u7684\u5185\u5BB9\uFF1F`,description:"\u5C06\u628A\u8FD9\u4E2A\u7248\u672C\u7684\u5185\u5BB9\u53D1\u5E03\u4E3A\u4E00\u4E2A\u65B0\u7248\u672C\uFF0C\u5F53\u524D\u5206\u4EAB\u8BBE\u7F6E\u4FDD\u6301\u4E0D\u53D8\u3002",busy:e.busy,onCancel:()=>o(null),onConfirm:async()=>{await e.onRollback(t.id),o(null);}})]})}var ud=5;function I3(e){return e==="SITE_RELEASE_STATUS_PUBLISHED"?{label:"\u5DF2\u53D1\u5E03",variant:"success"}:e==="SITE_RELEASE_STATUS_PENDING_UPLOAD"?{label:"\u7B49\u5F85\u4E0A\u4F20",variant:"pending"}:e==="SITE_RELEASE_STATUS_PUBLISHING"?{label:"\u53D1\u5E03\u4E2D",variant:"pending"}:e==="SITE_RELEASE_STATUS_FAILED"?{label:"\u53D1\u5E03\u5931\u8D25",variant:"error"}:e==="SITE_RELEASE_STATUS_CANCELED"?{label:"\u5DF2\u53D6\u6D88",variant:"normal"}:{label:"\u672A\u77E5",variant:"normal"}}function A3(e){return e==="SITE_STATUS_ACTIVE"?{label:"\u5DF2\u4E0A\u7EBF",tone:"ok"}:e==="SITE_STATUS_DRAFT"?{label:"\u8349\u7A3F",tone:"mute"}:e==="SITE_STATUS_DISABLED"?{label:"\u5DF2\u505C\u7528",tone:"warn"}:{label:"\u672A\u77E5",tone:"mute"}}function Pb(e){if(!Number.isFinite(e)||e<=0)return "0 B";let t=["B","KB","MB","GB"],o=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1),r=e/1024**o;return `${r>=10||o===0?r.toFixed(0):r.toFixed(1)} ${t[o]}`}function Rb(e){if(!e)return "\u65F6\u95F4\u672A\u77E5";let t=new Date(e);return Number.isNaN(t.getTime())?"\u65F6\u95F4\u672A\u77E5":new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}var Sb=[{key:"version",header:"\u7248\u672C",numeric:true,align:"start",width:"12%",render:e=>`v${e.version}`},{key:"publishedAt",header:"\u53D1\u5E03\u65F6\u95F4",numeric:true,align:"start",width:"24%",render:e=>Rb(e.publishedAt||e.createdAt)},{key:"status",header:"\u72B6\u6001",width:"10%",render:e=>{let t=I3(e.status);return jsx(at,{variant:t.variant,dot:true,children:t.label})}},{key:"fileCount",header:"\u6587\u4EF6\u6570",numeric:true,width:"10%",render:e=>e.fileCount},{key:"totalSizeBytes",header:"\u4F53\u79EF",numeric:true,width:"10%",render:e=>Pb(e.totalSizeBytes)},{key:"note",header:"\u5907\u6CE8",width:"24%",render:e=>e.failureReason?jsxs("span",{className:"site-releases__note site-releases__note--failure",children:["\u5931\u8D25\u539F\u56E0\uFF1A",e.failureReason]}):e.sourceReleaseId?jsx("span",{className:"site-releases__note site-releases__note--rollback",children:"\u7531\u5386\u53F2\u7248\u672C\u56DE\u6EDA\u751F\u6210"}):jsx("span",{className:"site-releases__note",children:"\u2014"})}];function dq({site:e,releases:t,loading:o,error:r,onBack:n,onEdit:a,onManage:i,onPreviewSite:d,onRetry:s,menuItems:l=[],onMenuSelect:c,onCopySite:p,onRollback:m,hasMore:u=false,onLoadMore:b,busy:w=false,backLabel:v="\u8FD4\u56DE\u5DE5\u4F5C\u53F0 \xB7 \u7AD9\u70B9",feedback:h}){let[x,k]=useState(1),[y,P]=useState(false),[N,S]=useState(null),R=useRef(null),M=A3(e.status),T=Math.max(1,Math.ceil(t.length/ud)),_=Math.min(x,T),L=t.slice((_-1)*ud,_*ud),I=t.find(z=>z.version===e.version),$=e.status==="SITE_STATUS_ACTIVE"&&!!e.baseUrl,F=m?[...Sb,{key:"actions",header:"\u64CD\u4F5C",render:z=>z.version===e.version?"\u5F53\u524D\u7248\u672C":z.status==="SITE_RELEASE_STATUS_PUBLISHED"&&jsx(f,{size:"sm",variant:"ghost",disabled:w||e.status==="SITE_STATUS_DISABLED",onClick:()=>S(z),children:"\u56DE\u6EDA"})}]:Sb;useEffect(()=>{k(1);},[e.id]),useEffect(()=>{x>T&&k(T);},[x,T]),useEffect(()=>()=>{R.current&&clearTimeout(R.current);},[]);let E=()=>{if(!$)return;let z=p?p():navigator.clipboard?.writeText(e.baseUrl);z&&z.then(()=>{P(true),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>P(false),1600);}).catch(()=>{});},O=[{key:"refresh",label:"\u5237\u65B0\u53D1\u5E03\u8BB0\u5F55",icon:jsx(Ue,{})},...l],ae=z=>{if(z==="refresh"){s();return}c?.(z);};return jsxs("div",{className:"page site-releases",children:[jsxs("header",{className:"site-releases__head",children:[jsx(go,{onClick:n,children:v}),jsxs("div",{className:"site-releases__head-row",children:[jsxs("div",{className:"site-releases__heading",children:[jsxs("div",{className:"site-releases__title-row",children:[jsx("h1",{className:"site-releases__title",children:e.name}),jsx(Nt,{tone:M.tone,children:M.label})]}),jsxs("div",{className:"site-releases__addr",children:[jsxs("span",{className:"site-releases__addr-ver",children:["v",e.version]}),jsx("span",{className:"site-releases__addr-sep","aria-hidden":"true",children:"\xB7"}),e.baseUrl?jsxs("button",{type:"button","data-ow-part":"release-url-copy",className:"site-releases__addr-copy",title:y?"\u5DF2\u590D\u5236":"\u590D\u5236\u7AD9\u70B9\u5730\u5740\uFF0C\u63A5\u6536\u8005\u4ECD\u9700\u5177\u6709\u8BBF\u95EE\u6743\u9650","aria-label":`\u590D\u5236\u7AD9\u70B9 ${e.name} \u7684\u94FE\u63A5`,disabled:!$,onClick:E,children:[jsx("span",{children:e.baseUrl}),y?jsx(be,{"aria-hidden":"true"}):jsx(Tt,{"aria-hidden":"true"})]}):jsx("span",{className:"site-releases__addr-none",children:"\u8FD8\u6CA1\u53D1\u5E03 \xB7 \u6CA1\u6709\u94FE\u63A5"})]})]}),jsxs("div",{className:"site-releases__head-actions",children:[jsx(f,{variant:"secondary",onClick:d,disabled:!$,children:"\u9884\u89C8"}),jsx(f,{variant:"secondary",onClick:i,children:"\u5206\u4EAB\u8BBE\u7F6E"}),jsx(f,{variant:"secondary",onClick:a,disabled:!e.sessionId,children:"\u7F16\u8F91"}),jsx(pl,{items:O,onSelect:ae})]})]})]}),jsxs("main",{className:"site-releases__scroll",children:[h,jsxs("div",{className:"site-releases__facts",children:[jsx(qp,{label:"\u6700\u8FD1\u53D1\u5E03\u65F6\u95F4",value:Rb(e.publishedAt)}),jsx(qp,{label:"\u5F53\u524D\u7248\u672C\u6587\u4EF6\u6570",value:I?`${I.fileCount} \u4E2A\u6587\u4EF6`:"\u2014"}),jsx(qp,{label:"\u5F53\u524D\u7248\u672C\u4F53\u79EF",value:I?Pb(I.totalSizeBytes):"\u2014"})]}),jsxs("section",{className:"site-releases__section",children:[jsxs("div",{className:"site-releases__section-label",children:["\u53D1\u5E03\u8BB0\u5F55",jsx("span",{className:"site-releases__section-hint",children:o?"\u6B63\u5728\u52A0\u8F7D\u2026":jsxs(Fragment,{children:[u?"\u5DF2\u52A0\u8F7D":"\u5171"," ",jsx("span",{className:"mono",children:t.length})," \u6B21\u53D1\u5E03"]})}),r&&jsx(f,{size:"sm",variant:"secondary",icon:jsx(Ue,{}),onClick:s,children:"\u91CD\u8BD5"})]}),jsx(cl,{className:"site-releases__table",columns:F,rows:L,rowKey:z=>z.id,caption:`${e.name} \u7684\u53D1\u5E03\u8BB0\u5F55`,loading:o,loadingRows:3,error:r?"\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\u53D1\u5E03\u8BB0\u5F55":void 0,errorDetail:r??void 0,emptyMessage:"\u8BE5\u7AD9\u70B9\u5B8C\u6210\u9996\u6B21\u53D1\u5E03\u540E\uFF0C\u7248\u672C\u8BB0\u5F55\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002"}),!o&&!r&&t.length>0&&jsxs("div",{className:"site-releases__pagination",children:[jsxs("span",{children:["\u7B2C ",jsx("span",{className:"mono",children:_})," / ",jsx("span",{className:"mono",children:T})," \u9875"]}),jsx(wn,{current:_,total:t.length,pageSize:ud,onChange:k})]}),u&&jsx(f,{disabled:o||w,onClick:b,children:"\u52A0\u8F7D\u66F4\u591A\u53D1\u5E03\u8BB0\u5F55"})]})]}),N&&m&&jsx(pd,{title:`\u56DE\u6EDA\u5230 v${N.version}\uFF1F`,description:"\u5C06\u4F7F\u7528\u6B64\u7248\u672C\u7684\u5185\u5BB9\u53D1\u5E03\u4E00\u4E2A\u65B0\u7248\u672C\uFF0C\u8BBF\u95EE\u6743\u9650\u548C\u5206\u4EAB\u94FE\u63A5\u4FDD\u6301\u5F53\u524D\u8BBE\u7F6E\u3002",busy:w,onCancel:()=>S(null),onConfirm:async()=>{await m(N.id),S(null);}})]})}function qp({label:e,value:t}){return jsxs("div",{className:"site-releases__fact",children:[jsx("div",{className:"k",children:e}),jsx("div",{className:"v mono",children:t})]})}var F3=[{key:"sites",label:"\u7AD9\u70B9"},{key:"media",label:"\u5A92\u4F53\u5E93",disabled:true,title:"\u8FD8\u6CA1\u5F00\u653E"},{key:"archive",label:"\u6863\u6848\u9986",disabled:true,title:"\u8FD8\u6CA1\u5F00\u653E"}];function $3(e){return e==="SITE_STATUS_ACTIVE"?{label:"\u5DF2\u4E0A\u7EBF",tone:"ok"}:e==="SITE_STATUS_DRAFT"?{label:"\u8349\u7A3F",tone:"mute"}:e==="SITE_STATUS_DISABLED"?{label:"\u5DF2\u505C\u7528",tone:"warn"}:{label:"\u672A\u77E5",tone:"mute"}}function z3(e){if(!Number.isFinite(e)||e<=0)return "0 B";let t=["B","KB","MB","GB"],o=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1),r=e/1024**o;return `${r>=10||o===0?r.toFixed(0):r.toFixed(1)} ${t[o]}`}function H3(e){let t=[];if(typeof e.fileCount=="number"&&t.push(`${e.fileCount} \u4E2A\u6587\u4EF6`),typeof e.totalSizeBytes=="number"&&t.push(z3(e.totalSizeBytes)),t.length<2){t.push(`v${e.version}`);let o=W3(e.publishedAt||e.createdAt);o&&t.push(o);}return t.join(" \xB7 ")}function W3(e){if(!e)return "";try{let t=new Date(e),r=new Date().getTime()-t.getTime();return r<6e4?"\u521A\u521A":r<36e5?`${Math.floor(r/6e4)} \u5206\u949F\u524D`:r<864e5?`${Math.floor(r/36e5)} \u5C0F\u65F6\u524D`:r<6048e5?`${Math.floor(r/864e5)} \u5929\u524D`:t.toLocaleDateString("zh-CN")}catch{return ""}}function U3(e){return e.status==="SITE_STATUS_ACTIVE"}function yq({sites:e,loading:t,error:o,onCreateSite:r,onViewDetails:n,onPreviewSite:a,onRetry:i,dense:d,onDenseChange:s,query:l,onQueryChange:c,onOpenShares:p,hasMore:m=false,onLoadMore:u,scrollTop:b=0,onScrollTopChange:w}){let[v,h]=useState(""),x=l??v,k=I=>{l===void 0&&h(I),c?.(I);},y=useRef(null);useLayoutEffect(()=>{y.current&&(y.current.scrollTop=b);},[b]);let[P,N]=useState(false),S=d??P,R=S?"sites-grid sites-grid--dense":"sites-grid",M=()=>{let I=!S;d===void 0&&N(I),s?.(I);},T=x.trim().toLowerCase(),_=e;T&&l===void 0&&(_=_.filter(I=>[I.name,I.description,I.baseUrl].some($=>$?.toLowerCase().includes(T))));let L=jsx(ha,{eyebrow:"\u4EA7\u7269",title:"\u5DE5\u4F5C\u53F0",description:"\u4F1A\u8BDD\u91CC\u4EA7\u51FA\u7684\u7AD9\u70B9\u3001\u56FE\u7247\u4E0E\u6587\u6863\u90FD\u5728\u8FD9\u91CC\u53D1\u5E03\u4E0E\u7BA1\u7406\u3002",search:jsx(Hn,{value:x,onChange:k,placeholder:"\u641C\u7D22\u4EA7\u7269"}),actions:jsxs(Fragment,{children:[p&&jsx(f,{variant:"ghost",onClick:p,children:"\u6211\u7684\u5206\u4EAB"}),jsx(f,{variant:"primary",icon:jsx(We,{}),onClick:r,children:"\u65B0\u5EFA\u7AD9\u70B9"})]}),tabs:F3,activeTabKey:"sites",tabsExtra:jsx(Fragment,{children:jsx(f,{type:"button",size:"sm",variant:"secondary",className:"sites-space__dense",icon:jsx(yi,{}),"aria-pressed":S,title:S?"\u56DE\u5230\u6807\u51C6\u89C6\u56FE":"\u66F4\u5BC6\u7684\u6392\u5E03\uFF1A\u4E00\u5C4F\u591A\u770B\u4E00\u5217\uFF0C\u6536\u8D77\u8BF4\u660E\u4E0E\u52A8\u4F5C",onClick:M,children:"\u5BC6\u96C6"})})});return t&&e.length===0?jsxs("div",{className:"page sites-space",children:[L,jsx("div",{className:R,children:jsx(K3,{})})]}):o&&e.length===0?jsxs("div",{className:"page sites-space",children:[L,jsx(J,{variant:"error",title:"\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D",detail:o,className:"published-sites__error",action:jsx(f,{size:"sm",variant:"secondary",icon:jsx(Ue,{}),onClick:i,children:"\u91CD\u8BD5"}),children:"\u7AD9\u70B9\u5217\u8868\u8FD9\u6B21\u6CA1\u53D6\u56DE\u6765\uFF0C\u7A0D\u540E\u91CD\u8BD5\u6216\u68C0\u67E5\u7F51\u7EDC\u3002"})]}):jsxs("div",{className:"page sites-space",children:[L,_.length===0?jsx(Am,{grid:true,size:T?"md":"page",title:T?"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u7AD9\u70B9":"\u8FD8\u6CA1\u6709\u7AD9\u70B9",hint:T?"\u6362\u4E2A\u5173\u952E\u8BCD\u8BD5\u8BD5\uFF0C\u6216\u6E05\u7A7A\u641C\u7D22\u67E5\u770B\u5168\u90E8\u7AD9\u70B9\u3002":"\u5728\u5BF9\u8BDD\u91CC\u8BA9\u4E13\u5BB6\u4EA7\u51FA\u9875\u9762\uFF0C\u53D1\u5E03\u6210\u7AD9\u70B9\u540E\u5C31\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002",action:T?void 0:{label:"\u65B0\u5EFA\u7AD9\u70B9",onClick:r},onClearSearch:T?()=>k(""):void 0}):jsxs("div",{ref:y,className:R,onScroll:I=>w?.(I.currentTarget.scrollTop),children:[_.map(I=>{let $=$3(I.status),F=U3(I)&&!!I.baseUrl;return jsxs("article",{className:"site-card",children:[jsxs(f,{type:"button","data-ow-part":"site-open",variant:"unstyled",className:"site-card__open ow-focus-ring","aria-label":`\u67E5\u770B\u7AD9\u70B9 ${I.name} \u7684\u8BE6\u60C5`,onClick:()=>n(I),children:[jsxs("div",{className:"site-card__cover",children:[I.coverUrl?jsx("img",{className:"site-card__cover-image",src:I.coverUrl,alt:""}):jsx(j3,{}),jsx(Nt,{className:"site-card__status",tone:$.tone,children:$.label})]}),jsxs("div",{className:"site-card__body",children:[jsx("div",{className:"site-card__name",children:I.name}),jsx("div",{className:"site-card__desc",children:I.description})]})]}),jsxs("div",{className:"site-card__footer",children:[jsx("span",{className:"site-card__meta",title:I.baseUrl||void 0,children:H3(I)}),jsx(f,{type:"button","data-ow-part":"site-act",size:"sm",variant:"secondary",className:"site-card__act",disabled:!F,title:F?I.baseUrl:"\u5C1A\u672A\u53D1\u5E03\uFF0C\u8FD8\u6CA1\u6709\u53EF\u6253\u5F00\u7684\u94FE\u63A5","aria-label":F?`\u5728\u5E94\u7528\u5185\u9884\u89C8\u7AD9\u70B9 ${I.name}`:void 0,onClick:()=>a(I),children:F?"\u6253\u5F00\u94FE\u63A5":"\u9884\u89C8"})]})]},I.id)}),(m||o)&&jsxs("div",{className:"sites-grid__more",children:[o&&jsx(J,{variant:"error",title:"\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\u66F4\u591A\u7AD9\u70B9",detail:o}),jsx(f,{loading:t,onClick:o?i:u,children:o?"\u91CD\u8BD5":"\u52A0\u8F7D\u66F4\u591A"})]})]})]})}function K3({count:e=4}){return jsx(Fragment,{children:Array.from({length:e}).map((t,o)=>jsxs("article",{className:"site-card","aria-hidden":"true",children:[jsx("div",{className:"site-card__cover",children:jsx(re,{variant:"block",width:"100%",height:"100%",radius:0})}),jsxs("div",{className:"site-card__body",children:[jsx(re,{variant:"line",width:"55%",height:18}),jsxs("span",{className:"site-card__skel-desc",children:[jsx(re,{variant:"line",width:"90%",height:12}),jsx(re,{variant:"line",width:"64%",height:12})]})]}),jsxs("div",{className:"site-card__footer",children:[jsx("span",{className:"site-card__meta",children:jsx(re,{variant:"line",width:"60%",height:12})}),jsx(re,{className:"site-card__act",variant:"block",width:76,height:28,radius:"var(--ow-radius-action)"})]})]},o))})}function j3(){return jsxs("div",{className:"site-card__thumb","aria-hidden":"true",children:[jsx("span",{className:"site-card__thumb-bar site-card__thumb-bar--title"}),jsx("span",{className:"site-card__thumb-bar site-card__thumb-bar--wide"}),jsx("span",{className:"site-card__thumb-bar site-card__thumb-bar--mid"})]})}function Mb({member:e}){let t=e.name.trim().charAt(0)||"?";return jsxs(un,{size:24,id:e.id,className:"share-settings__avatar",children:[jsx("span",{"aria-hidden":"true",children:t}),e.avatarUrl&&jsx("img",{src:e.avatarUrl,alt:"",referrerPolicy:"no-referrer",onError:o=>{o.currentTarget.hidden=true;}},e.avatarUrl)]})}function G3({scope:e,members:t,search:o,busy:r=false,loading:n=false,error:a,onScope:i,onAddMember:d,onRemoveMember:s}){let l=o.keyword.trim();return jsxs(Fragment,{children:[jsx("div",{className:"cseg",role:"radiogroup","aria-label":"\u5206\u4EAB\u8303\u56F4",children:[["all","\u5168\u5458\u8BBF\u95EE"],["selected","\u6307\u5B9A\u6210\u5458"]].map(([c,p])=>jsx("button",{type:"button",role:"radio","aria-checked":e===c,className:`cseg__opt${e===c?" on":""}`,disabled:r||n,onClick:()=>i(c),children:p},c))}),jsx("div",{className:"session-share__body share-settings__body",children:n?jsx("div",{className:"session-share__hint",role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u5206\u4EAB\u8BBE\u7F6E\u2026"}):a?jsx("div",{className:"share-settings__error",role:"alert",children:a}):e==="all"?jsx("div",{className:"session-share__hint",children:"\u6240\u6709\u5DF2\u767B\u5F55\u6210\u5458\u5747\u53EF\u8BBF\u95EE\uFF0C\u672A\u767B\u5F55\u8BBF\u5BA2\u65E0\u6CD5\u6253\u5F00\u3002"}):jsxs(Fragment,{children:[jsx("div",{className:"session-share__search",children:jsx(te,{value:o.keyword,placeholder:"\u641C\u7D22\u59D3\u540D\u6216\u8D26\u53F7","aria-label":"\u641C\u7D22\u6210\u5458",prefix:jsx($t,{}),disabled:r,onChange:o.onKeyword})}),o.error&&jsx("div",{className:"share-settings__error",role:"alert",children:o.error}),l&&jsx("div",{className:"published-site__member-results","aria-label":"\u6210\u5458\u641C\u7D22\u7ED3\u679C",children:o.searching?jsx("div",{className:"published-site__empty",children:"\u6B63\u5728\u641C\u7D22\u2026"}):o.results.length===0?jsx("div",{className:"published-site__empty",children:"\u6CA1\u6709\u5339\u914D\u7684\u6210\u5458\u3002"}):o.results.map(c=>{let p=t.some(m=>m.id===c.id);return jsxs(f,{size:"sm",variant:"ghost",className:"published-site__member-result share-settings__result",icon:jsx(Mb,{member:c}),disabled:r||p,onClick:()=>d(c),children:[jsx("span",{children:c.name}),jsx("small",{children:c.account}),!p&&jsx(We,{"aria-hidden":"true"})]},c.id)})}),jsx("div",{className:"published-site__member-list","aria-label":"\u6307\u5B9A\u6210\u5458",children:t.length===0?jsx("div",{className:"session-share__hint",children:"\u5C1A\u672A\u6DFB\u52A0\u6210\u5458\uFF0C\u5F53\u524D\u53EA\u6709\u4F60\u53EF\u4EE5\u8BBF\u95EE\u3002"}):t.map(c=>jsxs(Rn,{className:"published-site__member share-settings__member",size:"md",closable:true,closeAriaLabel:`\u79FB\u9664 ${c.name}`,disabled:r,onClose:()=>s(c.id),children:[jsx(Mb,{member:c}),jsx("span",{children:c.name})]},c.id))}),jsx("div",{className:"session-share__hint",children:"\u4F60\u4F5C\u4E3A\u6240\u6709\u8005\u59CB\u7EC8\u53EF\u4EE5\u8BBF\u95EE\u3002"})]})})]})}function Tq(e){return jsx(oe,{bare:true,open:true,fitViewport:false,ariaLabel:e.title,onClose:e.onClose,className:"session-share-modal share-settings-modal",children:jsxs("div",{className:"session-share",children:[jsxs("div",{className:"session-share__head",children:[jsxs("div",{className:"session-share__head-text",children:[jsx("strong",{children:e.title}),jsx("span",{children:e.subtitle})]}),jsx(f,{variant:"unstyled",className:"session-share__close","aria-label":"\u5173\u95ED",disabled:e.busy,onClick:e.onClose,children:jsx(Q,{})})]}),jsx(G3,{...e}),e.notice&&jsx("div",{className:"share-settings__notice",role:"status",children:e.notice}),jsxs("div",{className:"session-share__footer",children:[jsx(f,{variant:"secondary",onClick:e.onClose,disabled:e.busy,children:"\u53D6\u6D88"}),e.extraActions,jsx(f,{variant:"primary",onClick:e.onSave,disabled:e.busy||e.loading||e.saveDisabled,children:e.saveLabel??(e.busy?"\u4FDD\u5B58\u4E2D\u2026":"\u4FDD\u5B58")})]})]})})}var Z3=[{key:"agents",label:"\u4E13\u5BB6"},{key:"market",label:"\u6280\u80FD"},{key:"connectors",label:"\u8FDE\u63A5\u5668"}],q3=[{value:"all",label:"\u5E02\u573A"},{value:"mine",label:"\u6211\u7684"}];function Fq({section:e,onSectionChange:t,query:o,onQueryChange:r,searchPlaceholder:n,actionLabel:a,onAction:i,categories:d,activeCategoryId:s,onCategoryChange:l,installedOnly:c=false,onInstalledOnlyChange:p,currentPage:m,totalItems:u,pageSize:b=24,onPageChange:w,notice:v,loading:h=false,loadingCount:x=6,error:k,errorDetail:y,onRetry:P,emptyState:N,children:S,overlay:R}){let M=c?"mine":"all",T=k?"error":h?"loading":N?"empty":null;return jsxs("div",{className:"page",children:[jsx(ha,{eyebrow:"\u5DE5\u5177",title:"\u63D2\u4EF6",description:"\u4E13\u5BB6\u3001\u6280\u80FD\u4E0E\u8FDE\u63A5\u5668\u90FD\u5728\u8FD9\u91CC\u5B89\u88C5\u4E0E\u7BA1\u7406\uFF1B\u4E5F\u53EF\u4EE5\u6DFB\u52A0\u81EA\u5DF1\u7684\u3002",search:jsx(Hn,{value:o,onChange:r,placeholder:n}),actions:a&&i?jsx(f,{variant:"primary",icon:jsx(We,{}),onClick:i,children:a}):void 0,tabs:Z3,activeTabKey:e,onTabChange:_=>t(_)}),jsx("div",{className:"plaza__filters",children:jsxs("div",{className:"plaza__cats",children:[jsx("div",{className:"plaza__cats-main",children:d.map(_=>jsx(ro,{shape:"square",label:_.label,selected:s===_.id,"aria-pressed":s===_.id,onClick:()=>l(_.id)},_.id??"__all__"))}),jsx("div",{className:"plaza__cats-scope",children:p&&jsx(Ht,{variant:"outline",size:"sm","aria-label":"\u6309\u5F52\u5C5E\u7B5B\u9009",options:q3,value:M,onChange:_=>p(_==="mine")})})]})}),v&&jsx($i,{className:"plaza__notice",variant:"warning",children:v}),T==="empty"?jsx("div",{className:"plaza__grid",children:N}):T?jsx(Uv,{loading:h,loadingCount:x,error:k,errorDetail:y,onRetry:P,empty:false}):S,jsx(wn,{className:"plaza__pagination",current:m,total:u,pageSize:b,onChange:w}),R]})}var Y3="\u8BE5\u529F\u80FD\u5DF2\u7531\u5185\u7F6E\u6D4F\u89C8\u5668\u4E0E\u6587\u4EF6\u9884\u89C8\u66FF\u4EE3";function Wq(e){return jsx(H,{message:Y3})}function Uq(){return null}function Kq(){return null}var J3={running:"\u8FD0\u884C\u4E2D",error:"\u5931\u8D25",success:"\u5B8C\u6210"},e6={running:"neutral",error:"error",success:"success"};function Db({icon:e,label:t,preview:o,status:r,input:n,output:a,artifacts:i=[],onClose:d}){let s=n!=null,l=a!=null||i.length>0,[c,p]=useState(s?"input":"output");return jsx(oe,{open:true,width:"min(760px, 92vw)",padded:false,closable:false,onClose:d,ariaLabel:`\u5DE5\u5177\u8BE6\u60C5 ${t}`,children:jsxs("div",{className:"tool-modal",children:[jsxs("div",{className:"tool-modal__head",children:[jsx("span",{className:"tool-modal__icon",children:e}),jsxs("div",{className:"tool-modal__title",children:[jsx("div",{className:"tool-modal__name",children:t}),o&&jsx("div",{className:"tool-modal__preview",children:o})]}),jsx(ro,{className:"tool-modal__status",dot:e6[r],icon:r==="running"?jsx(Ro,{size:"sm"}):void 0,label:J3[r]}),jsx(f,{variant:"ghost",size:"sm",className:"tool-modal__x",onClick:d,"aria-label":"\u5173\u95ED",icon:jsx(Q,{})})]}),jsx(uo,{items:[{key:"input",label:"\u8F93\u5165",disabled:!s},{key:"output",label:"\u8F93\u51FA",disabled:!l}],activeKey:c,onChange:m=>p(m),size:"sm"}),jsxs("div",{className:"tool-modal__body",children:[c==="input"&&(n??jsx(H,{size:"sm",message:"\u65E0\u8F93\u5165\u53C2\u6570"})),c==="output"&&(l?jsxs(Fragment,{children:[a,jsx(t6,{artifacts:i})]}):jsx(H,{size:"sm",message:"\u65E0\u8F93\u51FA\u5185\u5BB9"}))]})]})})}function t6({artifacts:e}){return e.length===0?null:jsx("div",{className:"tool-artifacts",children:e.map(t=>jsxs("a",{className:`artifact artifact--${t.type}`,href:t.url,target:"_blank",rel:"noreferrer",children:[jsx(Ur,{}),t.type==="image"?jsx("img",{className:"artifact__img",src:t.url,alt:""}):jsx("div",{className:"artifact__img artifact__img--empty"}),jsxs("div",{className:"artifact__cap",children:[jsx("span",{className:"gly",children:t.type==="image"?"IMG":"VID"}),jsx("span",{className:"nm",children:t.name||t.ref}),jsx("span",{className:"by",children:t.mimeType}),jsx("span",{className:"open",children:"\u6253\u5F00"})]})]},t.id))})}var Xp={command:{running:"\u6B63\u5728\u8FD0\u884C",completed:"\u5DF2\u8FD0\u884C",groupUnit:"\u9879\u547D\u4EE4"},browser:{running:"\u6B63\u5728\u6D4F\u89C8",completed:"\u5DF2\u6D4F\u89C8",groupUnit:"\u9879\u7F51\u9875"},"read-file":{running:"\u6B63\u5728\u8BFB\u53D6",completed:"\u5DF2\u8BFB\u53D6",groupUnit:"\u9879\u6587\u4EF6"},"write-file":{running:"\u6B63\u5728\u5199\u5165",completed:"\u5DF2\u5199\u5165",groupUnit:"\u9879\u6587\u4EF6"},tool:{running:"\u6B63\u5728\u6267\u884C",completed:"\u5DF2\u5B8C\u6210",groupUnit:"\u9879\u64CD\u4F5C"}};function Ib(e,t,o){if(t==="error")return o;let r=Xp[e];if(e!=="tool")return r[t];if(t==="running")return `\u6B63\u5728${o}`;let a=[["\u521B\u5EFA","\u5DF2\u521B\u5EFA"],["\u66F4\u65B0","\u5DF2\u66F4\u65B0"],["\u5220\u9664","\u5DF2\u5220\u9664"],["\u67E5\u8BE2","\u5DF2\u67E5\u8BE2"],["\u641C\u7D22","\u5DF2\u641C\u7D22"],["\u5217\u51FA","\u5DF2\u5217\u51FA"],["\u6574\u7406","\u5DF2\u6574\u7406"],["\u7F16\u8F91","\u5DF2\u7F16\u8F91"],["\u5199\u5165","\u5DF2\u5199\u5165"],["\u8BFB\u53D6","\u5DF2\u8BFB\u53D6"],["\u6D4F\u89C8","\u5DF2\u6D4F\u89C8"],["\u6267\u884C","\u5DF2\u6267\u884C"],["\u8FD0\u884C","\u5DF2\u8FD0\u884C"]].find(([i])=>o.startsWith(i));return a?`${a[1]}${o.slice(a[0].length)}`:`\u5DF2\u5B8C\u6210 ${o}`}function a6(e,t,o){let n=Ib(e,t?"running":"completed",typeof o=="string"?o:"\u6267\u884C\u64CD\u4F5C"),a=typeof o=="string"?o.match(/等 (\d+) 项操作$/)?.[1]:void 0;return a?`${Xp[e][t?"running":"completed"]}${a}${Xp[e].groupUnit}`:n}function pY({running:e=false,label:t,children:o,tools:r,meta:n,kind:a="tool",defaultOpen:i=false,onOpenChange:d}){let s=a6(a,e,t),l=r??[];return e&&l.length>0?jsx(Wl,{label:typeof s=="string"?s:"\u6B63\u5728\u6267\u884C",meta:n,defaultOpen:true,onOpenChange:d,children:l.map((p,m)=>jsx(yp,{name:p.name,args:p.args,state:p.state??"running",elapsed:p.elapsed,statusText:p.statusText},`${p.name}-${m}`))}):jsx(Wl,{label:typeof s=="string"?s:"\u5DF2\u5B8C\u6210",meta:n,tools:l.length>0?l.map(n6):void 0,defaultOpen:i,onOpenChange:d,children:l.length===0?o:void 0})}function n6(e){return {name:e.name,args:e.args,elapsed:e.elapsed,out:e.out,state:e.state==="error"?"error":"done",statusText:e.statusText}}function i6(e,t){let o=[];return typeof e=="number"&&Number.isFinite(e)&&e>=0&&o.push(e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`),typeof t=="number"&&Number.isFinite(t)&&t>=0&&o.push(t>=1e4?`${(t/1e4).toFixed(1)}\u4E07\u884C`:`${t} \u884C`),o.length>0?o.join(" \xB7 "):null}function s6(e,t){let o=[];return typeof e=="number"&&Number.isFinite(e)&&o.push(`\u8017\u65F6 ${Math.round(e)}ms`),typeof t=="number"&&Number.isFinite(t)&&o.push(`${t} \u884C`),o.length>0?o.join(" \xB7 "):void 0}function uY({icon:e,label:t,preview:o,status:r,kind:n="tool",durationMs:a,lineCount:i,presentation:d="card",inlineStatusMode:s="icon",input:l,output:c,artifacts:p=[],defaultOpen:m=false,onOpenChange:u}){let[b,w]=useState(false),v=gp(),h=Ib(n,r,t),x=l!=null||c!=null||p.length>0,k=r==="running"?null:i6(a,i),y=p.length>0?jsx(d6,{artifacts:p}):void 0;if(r==="running")return jsx(yp,{name:h,args:o??void 0,state:"running",statusText:s==="hidden"?"":"\u8FD0\u884C\u4E2D"});if(v)return jsx(bp,{tool:{name:h,args:o??void 0,elapsed:k??void 0,state:r==="error"?"error":"done",input:l,output:c,artifacts:y,defaultDetailOpen:m,onDetailOpenChange:u}});let P=jsxs(Fragment,{children:[h,o&&jsx("span",{style:l6,children:o})]}),N=x?jsx(vp,{input:l,output:c,artifacts:y,trailing:jsx(f,{variant:"ghost",size:"sm",icon:jsx(qo,{}),onClick:()=>w(true),title:"\u653E\u5927\u67E5\u770B\u6267\u884C\u8BE6\u60C5",children:"\u653E\u5927\u67E5\u770B"})}):void 0;return jsxs(Fragment,{children:[jsx(Wl,{label:P,meta:k??void 0,metaTitle:k?s6(a,i):void 0,statusText:r==="error"?"\u5931\u8D25":void 0,tone:r==="error"?"error":"neutral",defaultOpen:m,onOpenChange:u,children:N}),b&&jsx(Db,{icon:e,label:t,preview:o,status:r==="completed"?"success":r,input:l,output:c,artifacts:p,onClose:()=>w(false)})]})}var l6={color:"var(--ow-text-3)",fontWeight:400,marginLeft:6};function d6({artifacts:e}){return jsx("div",{className:"tool-artifacts",children:e.map(t=>jsxs("a",{className:`artifact artifact--${t.type}`,href:t.url,target:"_blank",rel:"noreferrer",title:t.name||t.ref,children:[jsx(Ur,{}),t.type==="image"?jsx("img",{className:"artifact__img",src:t.url,alt:""}):jsx("div",{className:"artifact__img artifact__img--empty",children:jsx(oo,{})}),jsxs("div",{className:"artifact__cap",children:[jsx("span",{className:"gly",children:t.type==="image"?"IMG":"VID"}),jsx("span",{className:"nm",children:t.name||t.ref}),jsx("span",{className:"by",children:t.mimeType}),jsx("span",{className:"open",children:"\u6253\u5F00"})]})]},t.id))})}var c6=cva("flex flex-col w-full",{variants:{contained:{true:"h-full",false:"h-screen"}},defaultVariants:{contained:false}}),p6=cva("flex-shrink-0"),u6=cva("flex flex-1 min-h-0 overflow-hidden"),m6=cva("flex-1 min-w-0 overflow-auto flex flex-col p-3"),f6=cva("flex-shrink-0"),g6=cva("flex-shrink-0 min-h-0 overflow-auto border-l border-[color:var(--ow-border)] shadow-none",{variants:{hideBelow:{none:"",sm:"max-sm:hidden",md:"max-md:hidden",lg:"max-lg:hidden"}},defaultVariants:{hideBelow:"lg"}});function Qp({header:e,footer:t,sidebar:o,aside:r,asideWidth:n=320,hideAsideBelow:a="lg",children:i,contained:d=false,className:s=""}){return jsxs("div",{"data-slot":"app-layout",className:g(c6({contained:d}),s),children:[e&&jsx("div",{"data-slot":"app-layout-header",className:p6(),children:e}),jsxs("div",{"data-slot":"app-layout-body",className:u6(),children:[o,jsx("main",{"data-slot":"app-layout-main",className:m6(),children:i}),r&&jsx("aside",{"data-slot":"app-layout-aside",className:g6({hideBelow:a}),style:{width:n,minWidth:n},children:r})]}),t&&jsx("div",{"data-slot":"app-layout-footer",className:f6(),children:t})]})}var v6=Fs;var h6=["chat","skills","sites","scheduled-tasks","workspace","library"];function TY({view:e,sidebar:t,chat:o,skills:r,sites:n,scheduledTasks:a,workspace:i,library:d,header:s,footer:l,platform:c="web",fullscreen:p=false,sidebarCollapsed:m=false,onToggleSidebar:u,windowControls:b,sidePanel:w,settings:v,taskDetail:h,overlays:x,contained:k=false,className:y=""}){let[P,N]=useState(()=>new Set([e]));useEffect(()=>{N(_=>{if(_.has(e))return _;let L=new Set(_);return L.add(e),L});},[e]);let S=c==="windows"?jsx(mf,{...b}):void 0,M=s===void 0?k||c!=="windows"?null:jsx(uf,{platform:c,fullscreen:p,collapsed:m,onToggle:u,chrome:S}):s,T={chat:o,skills:r,sites:n??null,"scheduled-tasks":a,workspace:i,library:d??null};return jsxs(Fragment,{children:[jsx(Qp,{header:M,footer:l,sidebar:t,contained:k,className:y,children:jsxs("div",{className:"desktop-workbench-row","data-side-panel":w?"on":"off",children:[jsx("div",{className:"owcenter","data-view":e,children:h6.map(_=>{if(_!==e&&!P.has(_))return null;let L=_===e;return jsx("div",{className:"desktop-workbench-page",hidden:!L,"aria-hidden":!L,children:T[_]},_)})}),w]})}),h,v,x]})}var k6=[{key:"projects",label:"\u9879\u76EE"},{key:"memory",label:"\u8BB0\u5FC6"}],C6={projects:"\u8FD8\u6CA1\u6709\u9879\u76EE\u3002\u6DFB\u52A0\u4E00\u4E2A\u672C\u5730\u76EE\u5F55\uFF0C\u5C31\u80FD\u4ECE\u8FD9\u91CC\u8FDB\u51FA\u3002",memory:"\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BB0\u5FC6\u3002"};function BY({tab:e,onTabChange:t,showMemorySearchAction:o=false,memorySearchOpen:r=false,onToggleMemorySearch:n,memorySearch:a,sortAsc:i=false,onSort:d,children:s,overlays:l,empty:c}){let p=i?"\u964D\u5E8F\u6392\u5217":"\u5347\u5E8F\u6392\u5217",m=Children.count(s)===0;return jsxs("div",{className:"page filespace ws-page",children:[jsxs("div",{className:"files__head ws-page__head",children:[jsx(uo,{className:"ws-page__tabs",items:k6,activeKey:e,variant:"underline",size:"md",onChange:u=>t(u)}),jsxs("div",{className:"ws-page__tools",children:[e==="memory"&&o&&n&&jsx(f,{variant:r?"secondary":"ghost",size:"md",icon:jsx($t,{}),title:"\u641C\u7D22\u8BB0\u5FC6","aria-label":"\u641C\u7D22\u8BB0\u5FC6","aria-pressed":r,onClick:n}),jsx(f,{variant:"ghost",size:"md",icon:jsx(Id,{}),title:p,"aria-label":p,onClick:d})]})]}),e==="memory"&&r&&a&&jsx("div",{className:"ws-page__search",children:a}),jsx("div",{className:"fs-list ws-page__list",children:m?c??jsx(H,{className:"ws-page__empty",message:C6[e]}):s}),l]})}var Ob={user:jsx(mr,{"aria-hidden":"true"}),remember:jsx(yt,{"aria-hidden":"true"}),extractor:jsx(ki,{"aria-hidden":"true"})};function Fb({title:e,description:t,action:o}){let r=!!t?.trim();return jsx(H,{className:"mem-empty",action:o,title:r?e:void 0,message:r?t:e})}function $b({rows:e=5}){return jsx("div",{className:"fs-skeleton","aria-busy":"true","aria-label":"\u6B63\u5728\u52A0\u8F7D",children:Array.from({length:e},(t,o)=>jsx(re,{variant:"block",height:54},o))})}function ZY({name:e,path:t,onEnter:o,onOpenDirectory:r}){return jsxs("div",{className:"fs-row project",role:o?"button":void 0,tabIndex:o?0:void 0,onClick:o,onKeyDown:n=>{n.target===n.currentTarget&&o&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),o());},children:[jsx("span",{className:"folder-ic",children:jsx(qe,{})}),jsxs("span",{className:"meta",children:[jsx("span",{className:"n",children:e}),jsx("span",{className:"sub",children:t})]}),jsx(f,{variant:"unstyled",className:"open hover-only",onClick:n=>{n.stopPropagation(),r?.();},children:"\u6253\u5F00\u76EE\u5F55"})]})}function Vb({entry:e,onEnter:t,onOpen:o}){let r=e.kind==="folder"?jsx("span",{className:"folder-ic",children:jsx(qe,{})}):e.kind==="image"&&e.preview?e.preview:jsx("span",{className:"g fg-doc",children:jsx(oo,{})});return jsxs("div",{className:"fs-row",role:"button",tabIndex:0,onClick:()=>t?.(e),onKeyDown:n=>{n.target===n.currentTarget&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t?.(e));},children:[r,jsx("span",{className:"n",children:jsx("span",{children:e.name})}),jsx("span",{className:"col size",children:e.size??"\u2014"}),jsx("span",{className:"col date",children:e.modified}),jsx(f,{variant:"unstyled",className:"open hover-only",onClick:n=>{n.stopPropagation(),o?.(e);},children:"\u6253\u5F00"})]})}function qY({name:e,breadcrumbs:t=[],entries:o,loading:r,error:n,errorDetail:a,onRetry:i,onBack:d,onBreadcrumb:s,onEnter:l,onOpen:c}){let p=o.filter(u=>u.kind==="folder"),m=o.filter(u=>u.kind!=="folder");return jsxs("div",{className:"page filespace",children:[jsx("div",{className:"skd__head",children:jsx(go,{className:"fs-back",label:"\u8FD4\u56DE\u9879\u76EE",onClick:d,children:"\u9879\u76EE"})}),jsxs("div",{className:"folder-detail",children:[jsxs("div",{className:"fd-crumb",children:[jsxs(f,{variant:"unstyled",className:"root",onClick:()=>s?.(-1),children:[jsx(kd,{}),jsx("span",{className:"nm",children:e})]}),t.map((u,b)=>jsxs("span",{className:"seg-wrap",children:[jsx(he,{className:"sep"}),jsx(f,{variant:"unstyled",className:"seg",onClick:()=>s?.(b),children:u})]},b))]}),jsx("div",{className:"fs-list inner",children:r?jsx($b,{}):n?jsx(J,{variant:"error",title:n,detail:a,className:"fs-list__error",action:i?jsx(f,{size:"sm",variant:"secondary",icon:jsx(Ue,{}),onClick:i,children:"\u91CD\u8BD5"}):void 0}):o.length===0?jsx(Fb,{title:"\u8FD9\u4E2A\u6587\u4EF6\u5939\u662F\u7A7A\u7684",description:"\u9879\u76EE\u4E2D\u7684\u6587\u4EF6\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002"}):jsxs(Fragment,{children:[p.length>0&&jsxs("div",{className:"fs-group",children:[jsxs("div",{className:"fs-group__lbl",children:["\u6587\u4EF6\u5939 ",jsx("span",{className:"ct",children:p.length})]}),p.map(u=>jsx(Vb,{entry:u,onEnter:l,onOpen:c},u.id))]}),m.length>0&&jsxs("div",{className:"fs-group",children:[jsxs("div",{className:"fs-group__lbl",children:["\u6587\u4EF6 ",jsx("span",{className:"ct",children:m.length})]}),m.map(u=>jsx(Vb,{entry:u,onEnter:l,onOpen:c},u.id))]})]})})]})]})}function YY({sections:e,onOpenItem:t,loading:o=false,error:r,errorDetail:n,onRetry:a}){let i=e.reduce((d,s)=>d+s.items.length,0);return o&&i===0?jsx($b,{rows:4}):r?jsx(J,{variant:"error",title:r,detail:n,className:"fs-list__error",action:a?jsx(f,{size:"sm",variant:"secondary",icon:jsx(Ue,{}),onClick:a,children:"\u91CD\u8BD5"}):void 0}):i===0?jsx(Fb,{title:"\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BB0\u5FC6",description:"\u5728\u804A\u5929\u4E2D\u8BA9 Orbitwork \u8BB0\u4F4F\u91CD\u8981\u4FE1\u606F\uFF0C\u6216\u7531\u4EFB\u52A1\u81EA\u52A8\u63D0\u53D6\u540E\uFF0C\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002"}):jsx("div",{className:"mem",children:e.map(d=>jsxs("section",{className:"mem-sec",children:[jsxs("div",{className:"mem-sec__lbl",children:[d.title,d.hint&&jsx("span",{className:"hint",children:d.hint})]}),jsx("div",{className:"mem-day",children:jsx("div",{className:"mem-day__list",children:d.items.map(s=>{let l=s.source??"extractor";return jsxs("div",{className:"mem-note",role:"button",tabIndex:0,onClick:()=>t?.(s),onKeyDown:c=>{c.target===c.currentTarget&&(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),t?.(s));},children:[jsx("span",{className:`tick src-${l}`}),jsxs("div",{className:"body",children:[s.subject!==void 0&&jsx("div",{className:"subject",children:s.subject}),s.subject===void 0?s.text:jsx("div",{className:"text",children:s.text}),jsxs("div",{className:"tags",children:[jsxs("span",{className:`src-pill src-${l}`,children:[Ob[l]??Ob.extractor,s.sourceLabel??(l==="user"?"\u7528\u6237":l==="remember"?"\u624B\u52A8\u8BB0\u4F4F":"\u81EA\u52A8\u63D0\u53D6")]}),s.tags?.map((c,p)=>jsx("span",{className:"mtag",children:c},p))]})]}),s.when&&jsx("span",{className:"when",children:s.when})]},s.id)})})})]},d.id))})}function XY({title:e,content:t,preview:o,meta:r,onClose:n,onDelete:a,onSave:i}){let[d,s]=useState(false),[l,c]=useState(t),[p,m]=useState(false),u=async()=>{let b=l.trim();if(!(!b||p)){m(true);try{await i?.(b),s(!1);}catch{}finally{m(false);}}};return jsx(oe,{open:true,bare:true,ariaLabel:"\u8BB0\u5FC6\u8BE6\u60C5",className:"mem-modal ow-form",overlayClassName:"mem-modal-host",onClose:n,children:jsxs(Fragment,{children:[jsxs("div",{className:"cf__head",children:[jsx("div",{className:"cf__t t",children:d?jsxs(Fragment,{children:["\u7F16\u8F91",e]}):e}),jsx(f,{variant:"unstyled",className:"x","aria-label":"\u5173\u95ED",onClick:n,children:jsx(Q,{})})]}),d?jsx("div",{className:"cf__body cf__body--scroll",children:jsxs("div",{className:"frow frow--grow",children:[jsx("label",{children:"\u5185\u5BB9"}),jsx(jf,{unstyled:true,className:"ftext ftext--fill",autoFocus:true,value:l,onChange:b=>c(b.target.value),placeholder:"\u652F\u6301 Markdown"}),jsx("div",{className:"fhint",children:"\u652F\u6301 Markdown\uFF1A\u6807\u9898\u3001\u5217\u8868\u3001\u4EE3\u7801\u3001\u8868\u683C\u7B49\u3002"})]})}):jsx("div",{className:"cf__body cf__body--scroll",children:jsx("div",{className:"mem-detail__md",children:o??t})}),jsxs("div",{className:"cf__foot",children:[jsx("div",{className:"mem-detail__meta",children:r}),d?jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:p,onClick:()=>{c(t),s(false);},children:"\u53D6\u6D88"}),jsx(f,{variant:"primary",disabled:!l.trim()||p,onClick:()=>{u();},children:p?"\u4FDD\u5B58\u4E2D\u2026":"\u4FDD\u5B58"})]}):jsxs(Fragment,{children:[a&&jsx(f,{variant:"danger",icon:jsx(Le,{}),onClick:()=>{a();},children:"\u5220\u9664"}),jsx(f,{variant:"primary",icon:jsx(yt,{}),onClick:()=>s(true),children:"\u7F16\u8F91"})]})]})]})})}var N6=[{id:"web",label:"\u65B0\u5EFA\u6D4F\u89C8\u5668\u6807\u7B7E",keys:["Mod","T"]},{id:"terminal",label:"\u6253\u5F00\u7EC8\u7AEF",keys:["Mod","B"]},{id:"files",label:"\u6253\u5F00\u6587\u4EF6\u7BA1\u7406",keys:["Mod","P"]}];function rX({actions:e=N6,onSelect:t,label:o="\u65B0\u5EFA\u9875\u7B7E",platform:r="mac",className:n}){return jsx("div",{"data-slot":"side-panel-empty",className:g("side-panel-empty",n),children:jsx("div",{role:"group","aria-label":o,className:"flex w-full max-w-[280px] flex-col gap-1.5",children:e.map(a=>{let i=a.kbd??(a.keys?Xn(a.keys,r):void 0);return jsxs("button",{type:"button","data-slot":"side-panel-empty-action",onClick:()=>a.onSelect?a.onSelect():t?.(a),className:g("flex h-9 w-full cursor-pointer items-center gap-2.5 px-3 text-left","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-sm)] bg-[var(--ow-surface)]","text-ow-fs-ui text-[color:var(--ow-text)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","ow-focus-ring"),children:[jsx("span",{className:"min-w-0 flex-1 truncate",children:a.label}),i?jsx(Vr,{"aria-hidden":"true",children:i}):null]},a.id)})})})}var P6=[{id:"daily-brief",label:"\u6BCF\u65E5\u7B80\u62A5"},{id:"code-review",label:"\u4EE3\u7801\u8BC4\u5BA1"},{id:"doc-writing",label:"\u6587\u6863\u64B0\u5199"},{id:"site-publish",label:"\u5EFA\u7AD9\u53D1\u5E03"},{id:"custom",label:"\u81EA\u5B9A\u4E49"}];function sX({options:e=P6,value:t=null,onSelect:o,label:r="\u8D77\u624B\u793A\u4F8B",className:n}){return jsx("div",{"data-slot":"starter-capsules",role:"group","aria-label":r,className:g("flex flex-wrap justify-center gap-2",n),children:e.map(a=>{let i=t===a.id;return jsx("button",{type:"button","data-slot":"starter-capsule","aria-pressed":i,onClick:()=>o?.(a),className:g("inline-flex items-center justify-center h-8 px-[14px] cursor-pointer whitespace-nowrap","border border-[color:var(--ow-border)] [border-radius:var(--ow-radius-sm)]","text-ow-fs-body text-[color:var(--ow-text)]","transition-colors duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]","hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]","ow-focus-ring",i?"bg-[var(--ow-current-bg)] font-medium":"bg-transparent font-normal"),children:a.label},a.id)})})}var Hb={normal:"38%",max:"68%"};function pX({open:e=true,maximized:t=false,label:o="\u53F3\u680F",children:r,className:n=""}){if(!e)return null;let a=t?Hb.max:Hb.normal;return jsx("aside",{className:g("workbench-side-panel",n),"data-maximized":t?"on":"off",style:{width:a},"aria-label":o,children:r})}function T6({messages:e,title:t}){return jsxs("div",{className:"snapshot-content",children:[t&&jsx("h2",{children:t}),e.map(o=>jsxs("article",{children:[jsx("h3",{children:o.role==="user"?"\u7528\u6237":"\u52A9\u624B"}),o.blocks.map((r,n)=>"text"in r?jsx(ss,{source:r.text,className:"snapshot-markdown"},n):r.asset.src?jsxs("figure",{children:[jsx("img",{src:r.asset.src,alt:r.asset.name,width:640,height:480}),jsx("figcaption",{children:r.asset.name})]},n):jsxs("p",{children:["\u9644\u4EF6\uFF1A",r.asset.name]},n))]},o.id))]})}function hX(e){return jsx(oe,{bare:true,open:true,ariaLabel:"\u5206\u4EAB\u56FE\u7247\u9884\u89C8",onClose:e.onClose,className:"share-image-modal",children:jsxs("div",{className:"share-image-preview",children:[jsx("div",{className:"share-image-preview__head",children:"\u5206\u4EAB\u56FE\u7247\u9884\u89C8"}),jsx(pi,{error:true,children:e.error}),jsx(pi,{children:e.notice}),jsx("div",{className:"share-image-preview__body",children:jsxs("div",{ref:e.cardRef,className:"share-image-card",children:[jsx("div",{className:"share-image-card__content",children:jsx(T6,{title:e.title,messages:e.messages})}),jsxs("div",{className:"share-image-card__footer",children:[jsx(Sm,{size:20}),e.includeQR&&e.qr?jsxs("div",{className:"share-image-card__qr",children:[jsx("img",{src:e.qr,alt:"",width:48,height:48}),jsx("span",{children:e.qrRequiresLogin?"\u626B\u7801\u67E5\u770B \xB7 \u767B\u5F55\u8BBF\u95EE":"\u626B\u7801\u67E5\u770B"})]}):null]})]})}),jsxs("div",{className:"share-image-preview__actions",children:[jsx(f,{variant:"secondary",onClick:e.onClose,disabled:e.busy,children:"\u53D6\u6D88"}),jsx(f,{variant:"secondary",onClick:e.onCopy,disabled:!e.ready||e.busy,children:"\u590D\u5236\u56FE\u7247"}),jsx(f,{variant:"primary",onClick:e.onDownload,disabled:!e.ready||e.busy,children:"\u4E0B\u8F7D\u56FE\u7247"})]})]})})}function NX({projectCount:e,busy:t,onDismiss:o,onCancel:r,onMigrate:n,sourcePath:a,targetPath:i,open:d=true}){return jsxs(oe,{open:d,variant:"danger",title:"\u8FC1\u79FB\u5DF2\u6709\u9879\u76EE\u5230\u65B0\u76EE\u5F55\uFF1F",subtitle:"\u539F\u76EE\u5F55\u4E2D\u7684\u9879\u76EE\u4F1A\u4FDD\u7559\uFF0C\u65B0\u76EE\u5F55\u4E2D\u5DF2\u5B58\u5728\u7684\u540C\u540D\u9879\u76EE\u4F1A\u81EA\u52A8\u8DF3\u8FC7\u3002",width:440,closable:!t,closeOnOverlayClick:!t,closeOnEscape:!t,onClose:o,className:"workspace-migrate",actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",disabled:t,onClick:r,children:"\u53D6\u6D88"}),jsx(f,{variant:"danger",loading:t,onClick:n,children:t?"\u8FC1\u79FB\u4E2D\u2026":"\u8FC1\u79FB"})]}),children:[jsxs("p",{className:"workspace-migrate__body",children:["\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\u4E0B\u6709 ",jsx("span",{className:"workspace-migrate__count",children:e})," \u4E2A\u9879\u76EE\uFF0C\u5C06\u590D\u5236\u5230\u65B0\u76EE\u5F55\u3002"]}),(a||i)&&jsxs("dl",{className:"workspace-migrate__paths",children:[a&&jsxs(Fragment,{children:[jsx("dt",{children:"\u539F\u76EE\u5F55"}),jsx("dd",{className:"workspace-migrate__path",title:a,children:a})]}),i&&jsxs(Fragment,{children:[jsx("dt",{children:"\u65B0\u76EE\u5F55"}),jsx("dd",{className:"workspace-migrate__path",title:i,children:i})]})]})]})}function Wb({treeData:e,expandedKeys:t,onExpand:o,selectedKey:r,onSelect:n,loadData:a,emptyText:i="\u7A7A\u76EE\u5F55",className:d=""}){let s=useMemo(()=>e,[e]);return e.length===0?jsx("div",{"data-slot":"file-tree","data-ow-part":"empty",className:g("flex flex-col flex-1 min-h-0 overflow-y-auto items-center justify-center font-normal text-ow-fs-caption leading-[1.6] text-ow-text",d),children:jsx(H,{message:i,markSize:32,className:"px-3 py-6"})}):jsx("div",{"data-slot":"file-tree",className:g("flex flex-col flex-1 min-h-0 overflow-y-auto font-normal text-ow-fs-caption leading-[1.6] text-ow-text",d),children:jsx(M6,{prefixCls:"ow-file-tree",treeData:s,fieldNames:{key:"key",title:"title",children:"children"},expandedKeys:t,onExpand:l=>o?.(l),selectedKeys:r?[r]:[],onSelect:(l,c)=>{l.length>0&&n?.(c.node);},loadData:a?async l=>{await a(l);}:void 0,switcherIcon:l=>jsx(he,{className:g("w-3.5 h-3.5 transition-transform duration-[var(--ow-dur-1)] ease-[var(--ow-ease-beacon)]",l.expanded&&"rotate-90")}),titleRender:l=>{let c=l;return jsxs("span",{className:"inline-flex items-center gap-1.5 min-w-0",children:[c.isLeaf?jsx(Xo,{name:c.title,kind:c.kind,className:"w-4 h-4 shrink-0 text-ow-text-3"}):jsx(qe,{className:"w-4 h-4 shrink-0 text-ow-text-3"}),jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:c.title})]})},showIcon:false})})}var E6=4;function Ub(){return jsx("span",{"aria-hidden":true,className:"shrink-0 px-0.5 text-ow-fs-caption [font-family:var(--ow-font-mono)] text-ow-text-3",children:"/"})}function PQ({breadcrumb:e,onBreadcrumbClick:t,actions:o,preview:r,treeData:n,expandedKeys:a,onExpand:i,selectedKey:d,onSelectFile:s,loadData:l,filterText:c,onFilterChange:p,filterPlaceholder:m="\u8FC7\u6EE4\u6587\u4EF6",treeCollapsed:u=false,onToggleTree:b,layout:w="tree-left",className:v=""}){let h=w==="tree-left",x=e??[],k=x.length>E6,y=k?x.slice(1,x.length-2):[],P=k?[x[0],...x.slice(x.length-2)]:x,N=u?null:jsx("div",{"data-ow-part":"tree",className:g("flex flex-col min-h-0 shrink-0 overflow-y-auto px-1 py-1.5",h?"w-[44%] min-w-0 border-r border-ow-border":"w-60"),children:jsx(Wb,{treeData:n,expandedKeys:a,onExpand:i,selectedKey:d,onSelect:R=>{if(R.isLeaf){s?.(R);return}if(!i)return;let M=a??[];i(M.includes(R.key)?M.filter(T=>T!==R.key):[...M,R.key]);},loadData:l})}),S=jsxs("div",{"data-ow-part":"preview",className:g("flex flex-col flex-1 min-w-0 min-h-0 overflow-hidden",!h&&!u&&"border-r border-ow-border"),children:[e&&e.length>0&&jsx("div",{"data-ow-part":"breadcrumb",className:"flex items-center shrink-0 min-w-0 overflow-hidden px-3 py-2 border-b border-ow-border",children:P.map((R,M)=>{let T=M===P.length-1;return jsxs(Fragment$1,{children:[M>0&&jsx(Ub,{}),y.length>0&&M===1&&jsxs(Fragment,{children:[jsx("span",{className:"shrink-0 px-1 text-ow-fs-caption [font-family:var(--ow-font-mono)] text-ow-text-3",title:y.map(_=>_.label).join(" / "),children:"\u2026"}),jsx(Ub,{})]}),jsx("span",{className:g("inline-flex items-center",T?"shrink-0 min-w-0":"min-w-[4ch]"),children:jsx(f,{variant:"unstyled",className:g("ow-focus-ring border-0 bg-transparent px-1 py-0 [border-radius:var(--ow-radius-xs)] font-normal text-ow-fs-caption leading-[1.4] [font-family:var(--ow-font-mono)] [font-variant-numeric:tabular-nums] text-ow-text-3 cursor-pointer whitespace-nowrap overflow-hidden text-ellipsis hover:bg-[var(--ow-hover)] hover:text-ow-text active:bg-[var(--ow-press)]",T&&"text-ow-text"),onClick:()=>t?.(R.key),children:R.label})})]},R.key)})}),jsx("div",{"data-ow-part":"preview-body",className:"flex flex-col flex-1 min-h-0 overflow-hidden bg-[var(--ow-code-bg)] [&>*]:flex-1 [&>*]:min-h-0",children:r})]});return jsxs("div",{"data-slot":"file-browser","data-ow-layout":w,className:g("flex flex-col flex-1 min-h-0 overflow-hidden bg-ow-bg",v),children:[jsxs("div",{"data-ow-part":"header",className:"flex items-center gap-2 h-10 px-2 border-b border-ow-border shrink-0",children:[jsx(te,{"data-ow-part":"filter",type:"text",value:c??"",placeholder:m,onChange:R=>p?.(R),className:"flex-1 min-w-0 [&_[data-slot=field-control]]:[font-size:var(--ow-fs-caption)]","aria-label":"\u8FC7\u6EE4\u6587\u4EF6"}),o,jsx(f,{variant:"unstyled","data-ow-part":"toggle",className:g("ow-focus-ring inline-flex items-center justify-center w-7 h-7 shrink-0 border-0 bg-transparent [border-radius:var(--ow-radius-sm)] cursor-pointer text-ow-text-2 hover:bg-[var(--ow-hover)] active:bg-[var(--ow-press)]",u&&"text-ow-text-3"),onClick:b,title:u?"\u5C55\u5F00\u76EE\u5F55":"\u6536\u8D77\u76EE\u5F55","aria-label":u?"\u5C55\u5F00\u76EE\u5F55":"\u6536\u8D77\u76EE\u5F55","aria-pressed":!u,children:jsx(Fd,{width:15,height:15})})]}),jsx("div",{"data-ow-part":"body",className:"flex flex-1 min-h-0",children:h?jsxs(Fragment,{children:[N,S]}):jsxs(Fragment,{children:[S,N]})})]})}function jb({content:e,fileName:t,loading:o=false,error:r,errorDetail:n,defaultMode:a="table",className:i=""}){let[d,s]=useState(a),{headers:l,rows:c}=useMemo(()=>A6(e),[e]),p=useMemo(()=>[{key:"__i",header:"#",headerLabel:"\u884C\u53F7",numeric:true,width:56,render:b=>b.__i+1},...l.map((b,w)=>({key:`c${w}`,header:b,numeric:true,align:"start",render:v=>v.cells[w]??""}))],[l]),m=useMemo(()=>c.map((b,w)=>({__i:w,cells:b})),[c]),u=jsxs(sf,{actions:jsx(Ht,{"aria-label":"\u9884\u89C8\u65B9\u5F0F",size:"sm",value:d,onChange:b=>s(b),options:[{value:"table",label:"\u8868\u683C"},{value:"raw",label:"\u6E90\u7801"}]}),children:[t&&jsx("span",{"data-ow-part":"filename",className:"truncate font-[family-name:var(--ow-font-mono)] text-ow-fs-ui font-medium [font-variant-numeric:tabular-nums] text-[color:var(--ow-text)]",children:t}),jsxs("span",{"data-ow-part":"meta",className:"font-[family-name:var(--ow-font-mono)] text-ow-fs-eyebrow [font-variant-numeric:tabular-nums] text-[color:var(--ow-text-3)]",children:[c.length," \u884C \xD7 ",l.length," \u5217"]})]});return d==="raw"?jsxs("div",{"data-slot":"csv-preview",className:g("flex min-h-0 flex-1 flex-col overflow-hidden",i),children:[u,o?jsxs("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"flex min-h-0 flex-1 flex-col gap-2 overflow-hidden p-3.5",children:[jsx(re,{variant:"line",height:14,width:"72%"}),jsx(re,{variant:"line",height:14}),jsx(re,{variant:"line",height:14,width:"88%"}),jsx(re,{variant:"line",height:14,width:"64%"})]}):r?jsx("div",{"data-ow-part":"error",className:"min-h-0 flex-1 overflow-auto p-3.5",children:jsx(J,{variant:"error",detail:n,children:r})}):jsx("div",{"data-ow-part":"raw",className:"min-h-0 flex-1 overflow-auto p-3.5",children:jsx("pre",{className:"m-0 whitespace-pre-wrap break-words font-[family-name:var(--ow-font-mono)] text-ow-fs-ui font-normal leading-[1.6] [font-variant-numeric:tabular-nums] text-[color:var(--ow-text-2)]",children:jsx("code",{children:e})})})]}):jsx("div",{"data-slot":"csv-preview",className:g("flex min-h-0 flex-1 flex-col overflow-hidden",i),children:jsx(cl,{className:"min-h-0 flex-1 [&_table]:w-auto [&_table]:min-w-full [&_td]:whitespace-nowrap [&_th]:whitespace-nowrap",toolbar:u,caption:t?`${t} \u7684\u8868\u683C\u9884\u89C8`:"\u8868\u683C\u9884\u89C8",columns:p,rows:m,rowKey:b=>String(b.__i),density:"dense",stickyHeader:true,loading:o,error:r,errorDetail:n,emptyMessage:"\u6587\u4EF6\u662F\u7A7A\u7684\uFF0C\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6570\u636E\u3002"})})}function A6(e){let t=e.trim().split(/\r?\n/);if(t.length===0)return {headers:[],rows:[]};let o=B6(t[0]??""),r=Kb(t[0]??"",o),n=t.slice(1).filter(a=>a.trim()).map(a=>Kb(a,o));return {headers:r,rows:n}}function B6(e){let t=(e.match(/,/g)??[]).length,o=(e.match(/\t/g)??[]).length,r=(e.match(/;/g)??[]).length;return o>t&&o>=r?" ":r>t?";":","}function Kb(e,t){let o=[],r="",n=false;for(let a=0;a<e.length;a++){let i=e[a];n?i==='"'?e[a+1]==='"'?(r+='"',a+=1):n=false:r+=i:i==='"'?n=true:i===t?(o.push(r),r=""):r+=i;}return o.push(r),o}function WQ(e){let[t,o]=useState(e.defaultRawMarkdown??false),r=e.rawMarkdown??t,n=p=>{e.rawMarkdown===void 0&&o(p),e.onRawMarkdownChange?.(p);},{name:a,fileKind:i,content:d="",language:s="",url:l="",fileType:c="word"}=e;return i==="markdown"?jsxs("div",{className:"browser-file-preview__markdown",children:[jsxs("div",{className:"browser-file-preview__markdown-header",children:[jsx("span",{className:"browser-file-preview__markdown-name",children:a}),jsx(uo,{className:"browser-file-preview__markdown-tabs",size:"sm",items:[{key:"preview",label:"\u9884\u89C8"},{key:"raw",label:"\u6E90\u7801"}],activeKey:r?"raw":"preview",onChange:p=>n(p==="raw")})]}),jsx("div",{className:"browser-file-preview__markdown-body",children:r?jsx(Ki,{className:"browser-file-preview__content",language:"markdown",code:d}):e.renderMarkdown?.(d)})]}):i==="code"?jsx(Ki,{className:"browser-file-preview__content",language:s,code:d}):i==="csv"?jsx(jb,{className:"browser-file-preview__content",content:d,fileName:a}):i==="pdf"?jsx(Yn,{className:"browser-file-preview__content",src:l,fileName:a}):i==="web"?jsx("iframe",{className:"browser-file-preview__content browser-file-preview__web-iframe",src:l,title:a,sandbox:"allow-scripts allow-same-origin"}):i==="office"?jsx(Zn,{className:"browser-file-preview__content",src:l,fileType:c,onOpen:e.onOpenDefault,onRequestOpenWithOptions:e.onRequestOpenWithOptions,onOpenWith:e.onOpenWith}):jsx("div",{className:"browser-file-preview__unsupported",children:jsx(H,{message:jsxs(Fragment,{children:[jsx("span",{className:"browser-file-preview__unsupported-line",children:"\u65E0\u6CD5\u9884\u89C8\u8FD9\u4E2A\u6587\u4EF6"}),jsx("span",{className:"browser-file-preview__unsupported-name",children:a}),e.unsupportedReason&&jsx("span",{className:"browser-file-preview__unsupported-reason",children:e.unsupportedReason})]}),action:jsxs("div",{className:"browser-file-preview__unsupported-actions",children:[jsx(f,{variant:"primary",type:"button",onClick:e.onOpenDefault,children:"\u4F7F\u7528\u9ED8\u8BA4\u5E94\u7528\u6253\u5F00"}),e.onClose&&jsx(f,{variant:"ghost",type:"button",onClick:e.onClose,children:"\u5173\u95ED"})]})})})}function eJ({src:e,fileType:t,onOpen:o,onRequestOpenWithOptions:r,onOpenWith:n,...a}){return jsx(En,{...a,surface:"plain",children:jsx(Zn,{chrome:false,src:e,fileType:t,onOpen:o,onRequestOpenWithOptions:r,onOpenWith:n})})}function iJ({src:e,page:t,onPageChange:o,totalPages:r,meta:n,actions:a,...i}){let[d,s]=useState(t??1),l=t??d,p=r?jsx(Zc,{page:l,totalPages:r,onPageChange:m=>{m<1||r&&m>r||(s(m),o?.(m));}}):null;return jsx(En,{...i,meta:n??(r?`${l} / ${r}`:void 0),actions:p||a?jsxs(Fragment,{children:[p,a]}):void 0,surface:"plain",children:jsx(Yn,{chrome:false,src:e,page:l,fileName:i.fileName})})}var wd=8;function CJ({servers:e,page:t,onPageChange:o,loading:r,onRefresh:n,onCopy:a,onRemove:i}){if(r&&e.length===0)return jsx("div",{className:"mcp-server-list","aria-busy":"true","aria-label":"\u6B63\u5728\u8BFB\u53D6 MCP \u914D\u7F6E",children:[0,1,2].map(l=>jsxs("div",{className:"mcp-server-row",children:[jsx("span",{}),jsx(re,{variant:"block",width:38,height:38,radius:"var(--ow-radius-md)"}),jsxs("div",{className:"mcp-server-row__body",children:[jsx(re,{variant:"line",width:"42%",height:13}),jsx(re,{variant:"line",width:"66%",height:11})]}),jsx("span",{})]},l))});if(e.length===0)return jsx(H,{className:"connector-empty",size:"page",title:"\u8FD8\u6CA1\u6709\u81EA\u5B9A\u4E49 MCP",message:"\u628A\u672C\u673A\u8DD1\u7740\u7684 MCP \u670D\u52A1\u63A5\u8FDB\u6765\uFF0CAI \u5C31\u80FD\u7528\u4E0A\u5B83\u5E26\u7684\u90A3\u4E9B\u5DE5\u5177\u3002"});let d=Math.max(1,Math.ceil(e.length/wd)),s=Math.min(t,d);return jsxs("div",{className:"mcp-server-list",children:[e.slice((s-1)*wd,s*wd).map(l=>jsx(H6,{server:l,onRefresh:n,onCopy:a,onRemove:i},l.id)),d>1&&jsx(wn,{current:s,total:e.length,pageSize:wd,onChange:o})]})}function H6({server:e,onRefresh:t,onCopy:o,onRemove:r}){let[n,a]=useState(false),[i,d]=useState(false),[s,l]=useState(false),c=e.status!=="available",p=!!(e.errorSummary||c),m=i||s,u=i?"reconnecting":W6(e.status),b=i?"\u91CD\u8FDE\u4E2D":K6(e),w=async()=>{d(true);try{await t(e);}finally{d(false);}},v=async()=>{l(true);try{await r(e);}finally{l(false);}};return jsxs("div",{className:`mcp-server-row${n?" is-expanded":""}${m?" is-busy":""}`,children:[jsx(f,{variant:"ghost",size:"sm",className:"mcp-server-row__expand",disabled:!p,"aria-label":n?"\u6536\u8D77 MCP \u8BE6\u60C5":"\u5C55\u5F00 MCP \u8BE6\u60C5","aria-expanded":p?n:void 0,onClick:()=>a(h=>!h),children:jsx(he,{})}),jsx("span",{className:`mcp-server-row__icon t-${e.type}`,children:e.type==="stdio"?jsx(So,{}):jsx(Mt,{})}),jsxs("div",{className:"mcp-server-row__body",children:[jsxs("div",{className:"mcp-server-row__title",children:[jsx("b",{children:e.displayName||e.id}),jsx(Rn,{size:"sm",variant:"primary",shape:"square",children:e.type==="stdio"?"STDIO":"HTTP"}),jsx(ro,{dot:U6(u),label:b,description:e.statusText})]}),p&&n&&jsxs("div",{className:"mcp-server-row__details",children:[jsx("div",{className:"mcp-server-row__summary",children:e.summary||"-"}),e.toolNames.length>0&&jsx("div",{className:"mcp-server-row__tools",children:e.toolNames.slice(0,5).join(" \xB7 ")}),jsx("b",{children:"\u5904\u7406\u5EFA\u8BAE"}),jsx("p",{children:e.errorSummary??"\u5F53\u524D MCP \u6682\u672A\u8FD4\u56DE\u5DE5\u5177\uFF0C\u8BF7\u5237\u65B0\u72B6\u6001\u6216\u5728\u9996\u6B21\u4F7F\u7528\u65F6\u518D\u68C0\u67E5\u3002"})]})]}),jsx("div",{className:"mcp-server-row__actions",children:jsx(zn,{disabled:m,ariaLabel:`\u300C${e.displayName||e.id}\u300D\u7684\u66F4\u591A\u64CD\u4F5C`,items:[{key:"reconnect",label:i?"\u91CD\u8FDE\u4E2D\u2026":"\u91CD\u8FDE",icon:jsx(Ue,{})},...p?[{key:"copy",label:"\u590D\u5236\u9519\u8BEF\u6458\u8981",icon:jsx(So,{}),confirmsInPlace:true}]:[],{key:"remove",label:s?"\u5220\u9664\u4E2D\u2026":"\u5220\u9664",icon:jsx(Le,{}),danger:true}],onSelect:h=>{h==="reconnect"?w():h==="copy"?o(e):h==="remove"&&v();}})})]})}function W6(e){return e==="available"?"success":e==="auto_disabled"||e==="starting"||e==="restarting"||e==="unknown"?"unavailable":e==="degraded"?"warning":"error"}function U6(e){return e==="success"?"success":e==="error"?"error":e==="warning"||e==="reconnecting"?"warning":"neutral"}function K6(e){return {available:"\u5DF2\u8FDE\u63A5",configured:"\u6682\u65E0\u53EF\u7528\u5DE5\u5177",auto_disabled:"\u5DF2\u81EA\u52A8\u9694\u79BB",starting:"\u8FDE\u63A5\u4E2D",restarting:"\u91CD\u8FDE\u4E2D",degraded:"\u90E8\u5206\u5F02\u5E38",error:"\u8FDE\u63A5\u5F02\u5E38",missing:"\u8FDE\u63A5\u5F02\u5E38",sidecar_error:"\u72B6\u6001\u5237\u65B0\u5931\u8D25",unknown:"\u72B6\u6001\u672A\u77E5"}[e.status]||e.statusText||"\u4E0D\u53EF\u7528"}function TJ({name:e,desc:t,avatar:o,version:r,outdated:n,installed:a,installing:i=false,showVersion:d=false,actionLabel:s,actionVariant:l="secondary",actionDisabled:c,mine:p,metaItems:m,onOpen:u,onAction:b}){return jsx(ql,{avatar:o,name:e,version:d?r:void 0,status:i?"installing":a?n?"update":"installed":void 0,badge:p?jsx(Nt,{status:"mine"}):void 0,description:t,metaItems:m,actionLabel:s??(i?n?"\u66F4\u65B0\u4E2D\u2026":"\u5B89\u88C5\u4E2D\u2026":n?"\u66F4\u65B0":a?"\u4F7F\u7528":"\u5B89\u88C5"),actionVariant:l,actionState:n?"update":a?"installed":"default",actionDisabled:i||c,onOpen:u,onAction:b})}function Yb({avatar:e,name:t,author:o,version:r,updatedAt:n,status:a,badge:i,brief:d,authorization:s,docContent:l,loading:c,loadingText:p="\u6B63\u5728\u8BFB\u53D6\u8BF4\u660E\u2026",error:m,errorDetail:u,onRetry:b,emptyText:w="\u6682\u65E0\u8BE6\u7EC6\u8BF4\u660E",backLabel:v,onBack:h,actions:x}){return jsxs(Ms,{avatar:e,name:t,author:o,version:r,updatedAt:n,kind:"\u6280\u80FD",status:a,badges:i,summary:d,actions:x,backLabel:v,onBack:h,children:[s&&jsx(Ja,{title:"\u6388\u6743",children:s}),jsx(Ja,{title:"\u8BE6\u7EC6\u8BF4\u660E",children:c?jsxs("div",{className:"skd__loading",role:"status",children:[jsx(Ro,{size:"md"}),jsx("span",{children:p})]}):m?jsx(J,{variant:"error",detail:u,action:b&&jsx(f,{variant:"secondary",size:"sm",onClick:b,children:"\u91CD\u8BD5"}),children:m}):l?jsx("div",{className:"skd__doc",children:l}):jsx(H,{className:"skd__empty-state",message:w})})]})}function UJ(e){let[t,o]=useState(false),r=Np({installed:e.installed,outdated:e.outdated,installing:e.installing}),n=jsx(Pp,{installed:e.installed,outdated:e.outdated,installing:e.installing,primaryLabel:e.actionLabel??"\u4F7F\u7528\u6280\u80FD",primaryIcon:e.actionIcon??jsx(br,{}),primaryVisible:!!e.onUse,primaryDisabled:e.actionDisabled,onInstall:e.onInstall,onUpdate:e.onUpdate,onPrimaryAction:()=>e.onUse?.(),menuItems:[...e.menuItems??[],...e.onOpenDir?[{key:"openDir",label:"\u6253\u5F00\u76EE\u5F55",icon:jsx(qe,{})}]:[],...e.onUninstall?[{key:"uninstall",label:"\u5378\u8F7D",icon:jsx(Le,{}),danger:true,disabled:e.installing}]:[]],onMenuSelect:a=>{e.onMenuSelect?.(a),a==="openDir"&&e.onOpenDir?.(),a==="uninstall"&&o(true);}});return jsxs(Fragment,{children:[jsx(Yb,{avatar:e.avatar,name:e.name,author:e.author,version:e.version,updatedAt:e.updatedAt,status:r&&jsx(Nt,{status:r}),badge:e.badge,brief:e.brief,authorization:e.authorization,docContent:e.docContent,loading:e.loading,loadingText:e.loadingText,error:e.error,errorDetail:e.errorDetail,onRetry:e.onRetry,emptyText:e.emptyText,backLabel:e.backLabel,onBack:e.onBack,actions:n}),t&&e.onUninstall&&jsx(df,{title:"\u5378\u8F7D\u6280\u80FD",description:`\u5C06\u4ECE\u672C\u5730\u79FB\u9664\u300C${e.name}\u300D\u3002`,onCancel:()=>o(false),onConfirm:()=>{o(false),e.onUninstall?.();}})]})}function iu({value:e}){return jsx("span",{className:"font-[family-name:var(--ow-font-mono)] tabular-nums text-[color:var(--ow-text-2)]",children:e})}function QJ(e){return jsx(oe,{open:true,width:520,icon:jsx(br,{}),iconTone:"info",title:"\u5BFC\u5165\u6280\u80FD",subtitle:"\u652F\u6301 .zip\u3001.tar.gz \u548C .tgz \u6280\u80FD\u5305\uFF0C\u6216\u6279\u91CF\u626B\u63CF\u672C\u5730\u6587\u4EF6\u5939\u3002",onClose:e.onClose,actions:null,children:jsx(H,{markSize:36,message:"\u6280\u80FD\u6839\u76EE\u5F55\u5FC5\u987B\u5305\u542B SKILL.md\uFF1B\u9009\u62E9\u6587\u4EF6\u5939\u65F6\u4F1A\u6279\u91CF\u5BFC\u5165\u5176\u4E2D\u7684\u6280\u80FD\u3002",action:jsxs("div",{className:"flex items-center gap-3",children:[jsx(f,{variant:"secondary",icon:jsx(Ni,{}),onClick:e.onInstallArchive,children:"\u9009\u62E9\u538B\u7F29\u5305"}),jsx(f,{variant:"secondary",icon:jsx(qe,{}),onClick:e.onInstallDirectory,children:"\u9009\u62E9\u6587\u4EF6\u5939"})]})})})}function JJ(e){return jsx(oe,{open:true,width:520,icon:jsx(br,{}),iconTone:"info",title:"\u5BFC\u5165\u7ED3\u679C",subtitle:jsxs(Fragment,{children:["\u6210\u529F ",jsx(iu,{value:e.summary.success})," \u4E2A\uFF0C\u5931\u8D25 ",jsx(iu,{value:e.summary.failed})," \u4E2A\uFF0C\u8DF3\u8FC7"," ",jsx(iu,{value:e.summary.skipped})," \u4E2A"]}),onClose:e.onClose,actions:jsx(f,{variant:"primary",onClick:e.onClose,children:"\u5B8C\u6210"}),children:jsx("div",{"data-ow-part":"result-list",className:"max-h-96 overflow-y-auto flex flex-col gap-2 [border-radius:var(--ow-radius-card)]",children:e.items.map((t,o)=>jsxs("div",{"data-ow-part":"result-item","data-ow-state":t.status,className:"flex flex-col gap-1 p-3 bg-ow-surface-2 [border-radius:var(--ow-radius-control)]",children:[jsx("span",{"data-ow-part":"status",className:g("text-ow-fs-caption font-semibold leading-[1.3] font-[family-name:var(--ow-font-sans)]",t.status==="success"&&"text-[color:var(--ow-success-on-tint)]",t.status==="failed"&&"text-[color:var(--ow-error-on-tint)]",t.status==="skipped"&&"text-ow-text-3"),children:q6(t.status)}),jsx("span",{"data-ow-part":"name",className:"text-ow-text font-medium text-ow-fs-body leading-[1.4] font-[family-name:var(--ow-font-sans)]",children:t.name??t.sourceName}),t.reason&&jsx("span",{"data-ow-part":"reason",className:"text-ow-text-3 font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-mono)] break-all line-clamp-2",children:t.reason})]},`${t.sourceName}-${o}`))})})}function q6(e){return e==="success"?"\u6210\u529F":e==="failed"?"\u5931\u8D25":"\u8DF3\u8FC7"}var Q6={running:"\u8FD0\u884C\u4E2D",done:"\u4E0A\u6B21\u6210\u529F",failed:"\u4E0A\u6B21\u5931\u8D25",paused:"\u5DF2\u6682\u505C",none:"\u4ECE\u672A\u8FD0\u884C"};function mee({task:e,onOpen:t,onEdit:o,onToggle:r,onDelete:n}){let a=e.status.label||Q6[e.status.key]||"";return jsxs("div",{className:`cronjob-card${e.paused?" paused":""}`,onClick:t,children:[jsxs("div",{className:"cjc-top",children:[jsxs("span",{className:`cjc-dot ${e.status.key}`,children:[e.status.key==="running"&&jsx(gt,{size:16}),e.status.key==="done"&&jsx(be,{}),e.status.key==="paused"&&jsx(ta,{}),e.status.key==="failed"&&jsx(Q,{})]}),jsx("span",{className:"cjc-name",children:e.name||"\u672A\u547D\u540D\u4EFB\u52A1"}),jsx("span",{className:"cjc-freq",children:e.scheduleLabel})]}),jsx("div",{className:"cjc-prompt",children:e.prompt||"\u2014"}),jsxs("div",{className:"cjc-foot",children:[jsxs("span",{className:"cjc-next",children:[jsx(No,{})," ",e.nextLabel]}),a&&jsxs(Fragment,{children:[jsx("span",{className:"cjc-sep",children:"\xB7"}),jsx("span",{className:`cjc-stat ${e.status.key}`,children:a})]}),jsx("span",{className:"cjc-spacer"}),jsx(J6,{paused:e.paused,onEdit:o,onToggle:r,onDelete:n})]})]})}function J6({paused:e,onEdit:t,onToggle:o,onDelete:r}){let[n,a]=useState(false);return jsx("span",{className:"cjc-menu",onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),children:jsx(zn,{width:180,disabled:n,ariaLabel:"\u66F4\u591A\u64CD\u4F5C",items:[{key:"edit",label:"\u7F16\u8F91\u914D\u7F6E",icon:jsx(yt,{})},{key:"toggle",label:n?"\u66F4\u65B0\u4E2D\u2026":e?"\u6062\u590D\u8BA1\u5212":"\u6682\u505C\u8BA1\u5212",icon:e?jsx(vr,{}):jsx(ta,{})},{key:"delete",label:"\u5220\u9664\u4EFB\u52A1",icon:jsx(Le,{}),danger:true}],onSelect:d=>{d==="edit"?t():d==="delete"?r():d==="toggle"&&!n&&(a(true),o().finally(()=>a(false)));}})})}function xee({taskName:e,deleting:t=false,error:o,onCancel:r,onConfirm:n}){return jsxs(oe,{open:true,variant:"danger",icon:jsx(Le,{}),title:"\u5220\u9664\u5B9A\u65F6\u4EFB\u52A1",closable:false,closeOnOverlayClick:!t,closeOnEscape:!t,onClose:r,actions:jsxs(Fragment,{children:[jsx(f,{variant:"secondary",type:"button",disabled:t,onClick:r,children:"\u53D6\u6D88"}),jsx(f,{variant:"danger",type:"button",loading:t,disabled:t,onClick:n,children:t?"\u5220\u9664\u4E2D\u2026":"\u5220\u9664"})]}),children:[jsxs("p",{className:"m-0",children:["\u786E\u5B9A\u8981\u5220\u9664\u300C",e||"\u672A\u547D\u540D\u4EFB\u52A1","\u300D\u5417\uFF1F\u8BE5\u4EFB\u52A1\u7684\u6392\u7A0B\u4E0E\u8FD0\u884C\u8BB0\u5F55\u5C06\u88AB\u79FB\u9664\uFF0C\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002"]}),o&&jsx("div",{"data-ow-part":"error",className:"mt-3",children:jsx(J,{variant:"error",children:o})})]})}function Ree({task:e,runs:t,runningNow:o=false,hasMoreRuns:r=false,loadingMoreRuns:n=false,runPageError:a,onBack:i,onRunNow:d,onEdit:s,onToggle:l,onDelete:c,onLoadMoreRuns:p,onOpenSession:m}){return jsxs("div",{className:"page cron-space",children:[jsxs("div",{className:"files__head cron-detail__head",children:[jsxs("div",{className:"cron-head__title",children:[jsx(go,{label:"\u8FD4\u56DE\u5B9A\u65F6\u4EFB\u52A1",onClick:i}),jsxs("div",{children:[jsx("div",{className:"ch-t",children:e.name}),jsxs("div",{className:"ch-s",children:[jsx("span",{className:"mono",children:e.scheduleLabel})," \xB7 ",e.statusLabel," \xB7 \u4E0B\u6B21 ",jsx("span",{className:"mono",children:e.nextRunLabel})]})]})]}),jsxs("div",{className:"cron-head__actions",children:[jsx(f,{variant:"primary",icon:o?void 0:jsx(vr,{}),onClick:d,disabled:o,children:o?"\u6267\u884C\u4E2D\u2026":"\u7ACB\u5373\u6267\u884C"}),jsx(f,{variant:"secondary",icon:jsx(yt,{}),onClick:s,children:"\u7F16\u8F91"}),jsx(f,{variant:"secondary",icon:e.paused?jsx(vr,{}):jsx(ta,{}),onClick:l,children:e.paused?"\u542F\u7528":"\u6682\u505C"}),jsx(f,{variant:"danger",icon:jsx(Le,{}),onClick:c,children:"\u5220\u9664"})]})]}),jsxs("div",{className:"cron-scroll",children:[jsxs("div",{className:"cd-summary",children:[jsxs("div",{className:"cd-grid",children:[jsx(Ws,{label:"\u91CD\u590D\u9891\u7387",value:e.scheduleLabel,mono:true}),jsx(Ws,{label:"\u4E0B\u6B21\u6267\u884C",value:e.nextRunLabel,mono:true}),jsxs("div",{className:"cd-field",children:[jsx("div",{className:"k",children:"\u72B6\u6001"}),jsx("div",{className:"v",children:jsxs("span",{className:`cd-stat ${e.statusKey}`,children:[e.statusKey==="running"&&jsx(gt,{size:12}),e.statusLabel]})})]}),jsx(Ws,{label:"\u6267\u884C\u6A21\u578B",value:e.modelName}),jsx(Ws,{label:"\u6240\u5C5E\u9879\u76EE",value:e.projectName}),e.notifyTargetLabel&&jsx(Ws,{label:"\u5B8C\u6210\u540E\u901A\u77E5",value:e.notifyTargetLabel})]}),e.promptPreview&&jsxs("div",{className:"cd-prompt",children:[jsx("div",{className:"k",children:"\u4EFB\u52A1\u6307\u4EE4"}),e.promptPreview]})]}),jsxs("div",{className:"cd-section",children:[jsxs("div",{className:"cd-section__lbl",children:["\u8FD0\u884C\u8BB0\u5F55",jsx("span",{className:"cd-hint",children:"\u70B9\u51FB\u67D0\u6B21\u8FD0\u884C\u53EF\u8DF3\u8F6C\u5230\u5BF9\u5E94\u4F1A\u8BDD"})]}),t.length===0?jsx(H,{variant:"card",message:"\u8FD8\u6CA1\u8DD1\u8FC7\u3002\u6062\u590D\u4E4B\u540E\u5230\u70B9\u4F1A\u81EA\u5DF1\u5F00\u4E00\u6BB5\u4F1A\u8BDD\u3002"}):jsxs("div",{className:"run-list",children:[t.map(u=>jsxs(f,{variant:"unstyled",className:`run-row run-row--btn${u.statusKey==="running"?" running":""}`,onClick:()=>u.sessionId&&m(u.sessionId),children:[jsxs("div",{className:"run-turn",children:[jsxs("span",{className:"ix",children:["#",u.turnLabel]}),jsx("span",{className:`rdot ${u.statusKey}`,children:u.statusKey==="running"?jsx(gt,{size:13}):u.statusKey==="done"?jsx(be,{}):u.statusKey==="failed"?jsx(Q,{}):null})]}),jsxs("div",{className:"run-meta",children:[jsxs("div",{className:"rwhen",children:[u.when,jsx("span",{className:`rstat ${u.statusKey}`,children:u.statusLabel})]}),jsx("div",{className:"rsum",children:u.summary})]}),jsx("div",{className:"run-right",children:jsx(he,{className:"rgo"})})]},u.id)),(r||a)&&jsxs("div",{className:"run-list__footer",children:[a&&jsxs("div",{"data-ow-part":"error",className:"text-ow-error font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]",role:"alert",children:["\u52A0\u8F7D\u8FD0\u884C\u8BB0\u5F55\u5931\u8D25\uFF1A",a]}),r&&jsx(f,{variant:"ghost",size:"sm",disabled:n,onClick:p,children:n?jsxs(Fragment,{children:[jsx(gt,{size:13})," \u52A0\u8F7D\u4E2D\u2026"]}):jsxs(Fragment,{children:[jsx(ne,{})," \u52A0\u8F7D\u66F4\u591A"]})})]})]})]})]})]})}function Ws({label:e,value:t,mono:o=false}){return jsxs("div",{className:"cd-field",children:[jsx("div",{className:"k",children:e}),jsx("div",{className:`v${o?" mono":""}`,children:t})]})}function Bee({totalCount:e,loading:t,error:o,hasTasks:r,taskCards:n,dialogs:a,onCreate:i,onRetry:d}){return jsxs("div",{className:"page cron-space",children:[jsx(ha,{eyebrow:"\u81EA\u52A8\u5316",title:"\u5B9A\u65F6\u4EFB\u52A1",description:"\u6309\u8BA1\u5212\u81EA\u5DF1\u8DD1\u8D77\u6765\u7684\u4EFB\u52A1\uFF1B\u6BCF\u6B21\u8FD0\u884C\u90FD\u4F1A\u5F00\u4E00\u6BB5\u65B0\u4F1A\u8BDD\u3002",meta:`${e} \u4E2A\u4EFB\u52A1`,actions:jsx(f,{variant:"primary",icon:jsx(We,{}),onClick:i,children:"\u65B0\u5EFA\u4EFB\u52A1"})}),jsxs("div",{className:"cron-scroll",children:[o&&r&&jsx("div",{"data-ow-part":"error",children:jsx(J,{variant:"error",detail:o,action:jsx(f,{variant:"secondary",size:"sm",onClick:d,children:"\u91CD\u8BD5"}),children:"\u5B9A\u65F6\u4EFB\u52A1\u5217\u8868\u6CA1\u5237\u65B0\u6210\u529F\u3002"})}),t&&!r?jsxs("div",{"data-ow-part":"loading",role:"status","aria-live":"polite",className:"cron-loading",children:[jsx(gt,{size:16}),jsx("span",{children:"\u6B63\u5728\u52A0\u8F7D\u5B9A\u65F6\u4EFB\u52A1\u2026"})]}):o&&!r?jsx("div",{"data-ow-part":"error",className:"cron-error",children:jsx(J,{variant:"error",detail:o,action:jsx(f,{variant:"secondary",onClick:d,children:"\u91CD\u8BD5"}),children:"\u5B9A\u65F6\u4EFB\u52A1\u6CA1\u52A0\u8F7D\u51FA\u6765\u3002"})}):r?jsx("div",{className:"cron-grid",children:n}):jsx(H,{className:"cron-empty",size:"page",title:"\u8FD8\u6CA1\u6709\u5B9A\u65F6\u4EFB\u52A1",message:"\u628A\u6BCF\u5929\u90FD\u8981\u505A\u7684\u4E8B\u4EA4\u51FA\u53BB\uFF1A\u5230\u70B9\u5B83\u81EA\u5DF1\u5F00\u4E00\u6BB5\u4F1A\u8BDD\uFF0C\u8DD1\u5B8C\u901A\u77E5\u4F60\u3002",actionLabel:"\u65B0\u5EFA\u4EFB\u52A1",actionVariant:"primary",onAction:i})]}),a]})}function nte(e,t=true){let o=useRef(null);return useEffect(()=>{if(!t)return;function r(n){o.current&&!o.current.contains(n.target)&&e();}return document.addEventListener("pointerdown",r),()=>document.removeEventListener("pointerdown",r)},[e,t]),o}function lte(e,t){let[o,r]=useState(null),n=useRef(null),a=useCallback(s=>{r(s);},[]),i=useCallback(s=>{n.current=s;},[]),d=useCallback(()=>{if(o!==null&&n.current!==null&&o!==n.current){let s=[...e],[l]=s.splice(o,1);s.splice(n.current,0,l),t(s);}r(null),n.current=null;},[o,e,t]);return {dragIdx:o,onDragStart:a,onDragOver:i,onDragEnd:d}}function pte(e,t,o=true){useEffect(()=>{if(!o)return;function r(n){n.key===e&&t(n);}return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t,o]);}function fte({width:e,onWidthChange:t,minWidth:o=160,maxWidth:r=480,enabled:n=true}){let[a,i]=useState(false),[d,s]=useState(false),l=useRef(0),c=useRef(e),p=useCallback(m=>{n&&(m.preventDefault(),i(true),l.current=m.clientX,c.current=e);},[n,e]);return useEffect(()=>{if(!a)return;let m=b=>{let w=b.clientX-l.current,v=Math.min(r,Math.max(o,c.current+w));t(v);},u=()=>i(false);return document.addEventListener("mousemove",m),document.addEventListener("mouseup",u),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",u),document.body.style.cursor="",document.body.style.userSelect="";}},[a,r,o,t]),{handleProps:{onMouseDown:p,onMouseEnter:()=>s(true),onMouseLeave:()=>!a&&s(false)},active:d||a,dragging:a}}var d9=6,Ite=Array.from({length:d9},(e,t)=>({bg:`var(--ow-data-${t+1})`,fg:"var(--ow-on-fill)"}));function c9(e){return {bg:`var(--ow-${pn((e??"").trim())})`,fg:"var(--ow-on-fill)"}}function Ate(e){let{bg:t,fg:o}=c9(e);return {background:t,color:o}}
|
|
32
|
+
export{EN as ACCOUNT_CREDITS_WARN_RATIO,T8 as ActionBar,D8 as ActionStatus,d$ as AgentLoopSegment,Al as AgentTurn,Vd as AlertCircle,Qp as AppLayout,Pi as Archive,mn as Arrow,Si as ArrowDown,Tw as ArrowUp,GI as ArtifactCard,YO as ArtifactPreviewSidebarView,Ur as ArtifactTrail,O8 as AskQuestionCardView,H8 as AssistantChannelCard,J8 as AssistantToggleRow,kd as Atom,da as Attachment,gP as AttachmentCard,xn as AttachmentList,vP as Attachments,C$ as AuthorizationCard,un as Avatar,MP as BEACON_ICON_NAMES,go as BackButton,J9 as BackTop,at as Badge,$i as Banner,iR as BarChart,bm as BeaconIcon,gt as BeaconSpinner,xw as Bell,Ia as Bolt,ki as Brain,Po as Branch,Vg as BranchDivider,w4 as BrandingProvider,GV as BrowserAnnotationPopupView,tF as BrowserDeviceToolbarView,dF as BrowserFindBarView,vF as BrowserImportDialogView,xF as BrowserLoadErrorView,RF as BrowserMoreMenuView,AF as BrowserNavBarView,Yg as BrowserTabBarView,f as Button,zt as Card,Im as CardGridSkeleton,Am as CatalogEmptyState,F$ as ChatBubble,W$ as ChatMessage,uv as ChatThinking,_$ as Chatbot,be as Check,Va as CheckCircle,To as Checkbox,ne as ChevDown,Kt as ChevLeft,he as ChevRight,Ci as ChevUp,ro as Chip,fw as Circle,Or as ClipboardList,No as Clock,Q as Close,il as CodeBlock,Ym as CodeDiff,Ki as CodePreview,VR as CommandPalette,Li as CommentPlus,hw as Compass,Rv as Composer,mv as ComposerAudioSpectrum,cz as ComposerAuthorization,gz as ComposerMentions,vv as ComposerMenu,Iz as ComposerMenuPopover,Fz as ComposerPopover,Zz as ComposerProjectPicker,Jz as ComposerQueue,iH as ComposerVoiceInput,Og as CompressionDivider,KR as ContentRecommendation,qR as ContextChip,tf as ContextUsage,nT as ContextUsageIndicatorView,Tt as Copy,Sw as Cpu,af as CreateProjectDialog,jb as CsvPreview,Cd as Cut,DN as DESKTOP_ACCOUNT_MENU_WIDTH,G4 as DESKTOP_LOGIN_CLAIM,Z4 as DESKTOP_LOGIN_CLAIM_NOTE,Q7 as DROPDOWN_DIVIDER,zm as DS2_SHIKI_THEME_NAME,TT as DataManagementSectionView,cl as DataTable,sf as DataTableToolbar,FA as DateDivider,Wv as DesktopAccountMenuView,mU as DesktopAgentCardView,Pp as DesktopAgentDetailActions,fU as DesktopAgentDetailView,GN as DesktopAgentOverviewView,ZN as DesktopAgentRosterView,VW as DesktopAppearanceSettings,YW as DesktopAssistantConfigView,ql as DesktopCatalogCardView,Sp as DesktopCatalogDetailActions,Ms as DesktopCatalogDetailShell,Uv as DesktopCatalogGridView,cU as DesktopCatalogToolbarView,F4 as DesktopChatAgentTurnView,hU as DesktopChatBranchDivider,V4 as DesktopChatCompressionDivider,RK as DesktopChatEmptyStateView,EK as DesktopChatHeaderView,rb as DesktopChatMessageView,aj as DesktopChatReconnectDivider,O4 as DesktopChatUserTurnView,gj as DesktopComposer,fj as DesktopComposerModelButton,gU as DesktopConnectorCardView,U4 as DesktopConnectorDetailView,nj as DesktopConversationView,KN as DesktopDetailChips,uU as DesktopDetailList,jN as DesktopDetailRows,Ja as DesktopDetailSection,pU as DesktopDetailText,Dj as DesktopHomeView,tG as DesktopLibraryAuthorizationDialog,nG as DesktopLibraryPageView,Gj as DesktopLoginView,pG as DesktopOnboardingTourView,bG as DesktopPet,MG as DesktopPetSettings,DG as DesktopRunStatusView,mb as DesktopSelectionCard,XG as DesktopSettingRow,QG as DesktopSettingSelect,WG as DesktopSettingsMemorySection,YG as DesktopSettingsView,oZ as DesktopShareSelectionBarView,SZ as DesktopSidebarView,dq as DesktopSiteReleasesView,yq as DesktopSitesListView,Fq as DesktopSkillsPageView,Wq as DesktopTaskDetailView,pY as DesktopToolCallListView,uY as DesktopToolCallView,TY as DesktopWorkbenchShell,Pj as DesktopWorkspaceConnectorDetailView,Fb as DesktopWorkspaceEmptyState,Vb as DesktopWorkspaceEntryRowView,XY as DesktopWorkspaceMemoryDetailDialog,YY as DesktopWorkspaceMemoryView,BY as DesktopWorkspacePageView,qY as DesktopWorkspaceProjectDetailView,ZY as DesktopWorkspaceProjectRowView,pl as DetailOverflowMenu,$T as DetailPanel,XT as DetailScaffold,Pw as Device,oe as Dialog,Ti as DingTalk,$d as DingTalkAi,Zs as Dislike,Wd as Divider,oo as Doc,Co as Download,iM as DropZone,X7 as Dropdown,yt as Edit,ja as ElementDispatcher,H as EmptyState,sS as ErrorCard,Zo as ErrorCircle,vp as ExecutionDetail,Wl as ExecutionSummary,Dv as ExecutionSummaryBodyContext,bp as ExecutionSummaryRow,GM as FSelect,pM as FeedbackContextMenuView,bM as FeedbackDialogView,Mi as Feishu,te as Field,PQ as FileBrowser,Xo as FileIcon,WQ as FilePreviewContentView,En as FilePreviewDialog,m0 as FileReferenceCard,kM as FileReferenceCards,Wb as FileTree,yw as Filter,bf as FilterBar,qe as Folder,x0 as FormField,Ite as GLYPH_COLORS,Cw as Gauge,Mt as Globe,$l as GlyphToneProvider,yi as Grid,P6 as HOME_STARTER_CAPSULES,Bd as Hand,Ed as Help,XM as HomeBackdrop,Gx as IME_COMMIT_GUARD_MS,ra as Icon,Ew as Icons,Pd as Image,t_ as ImageCard,d_ as ImagePreview,Lw as Info,ea as InfoCircle,J as InlineMessage,pS as Input,zA as JumpToLatest,Nw as Key,WM as KeyValueField,Ad as Keyboard,Vr as Keycap,Ai as KeycapCombo,Ri as Layers,fn as Like,Nd as LikeFill,dt as ListRow,q8 as ListRowGroup,gw as Loader,oa as Lock,Dd as Logout,UL as MENU_DIVIDER,$a as MENU_SEPARATOR,lp as MOUNT_CHIP_CLASS,Oa as Mail,ss as Markdown,Lf as MarkdownPreview,If as MarkdownPreviewModalView,qo as Maximize,CJ as McpServerListView,mr as Memo,co as Menu,pt as MenuSurface,EH as Message,hn as MessageActions,Of as MessageFeedbackDialog,hd as Mic,Ru as ModalityAudio,Su as ModalityImage,Nu as ModalityText,Pu as ModalityVideo,Vf as ModelCatalogErrorState,zf as ModelModalityFlow,Hf as ModelPickerList,An as ModelSelect,DL as ModelsSettingsSectionView,_d as Moon,Go as More,yy as NAV_MENU_DIVIDER,OL as NativeCheckbox,VL as NativeRadio,BL as NativeSelect,WL as NavMenu,ww as NewTask,eD as NoPlanPanelView,_w as Note,zH as NoteCard,Zn as OfficePreview,eJ as OfficePreviewDialog,aD as OpenWithButton,Fi as OpenWithMenu,Kq as OrbitworkDesktopTaskDetailData,Uq as OrbitworkDesktopTaskDetailDocument,dc as OrbitworkLockup,Sm as OrbitworkLogo,xr as OrbitworkMark,Lm as OrbitworkModal,Pr as PT_TO_PX,Ld as Package,ha as PageHead,wn as Pagination,Fd as PanelFold,Br as PanelSidebar,vw as PanelSidebarCollapse,Ni as Paperclip,ta as Pause,Zc as PdfPageNav,Yn as PdfPreview,iJ as PdfPreviewDialog,Mg as PlanCard,bl as PlanFeatureIcon,hD as PlanSettingsSectionView,vr as Play,We as Plus,ND as Popover,kl as PptxSlide,o5 as PreviewDialog,ry as PreviewSurfaceArea,WH as ProductList,la as ProgressBar,Nl as ProjectSelect,Td as Quote,E1 as Radio,qE as RadioCardGroup,I1 as RadioGroup,Ue as Refresh,pd as ResourceConfirmation,GZ as ResourceDetailView,$Z as ResourceListView,pi as ResourceNotice,ZZ as ResourceOverviewView,qZ as ResourceReleasesView,zZ as ResourceRowActionDialog,FZ as ResourceWorkbenchView,hp as RichCard,$H as RichDetail,QC as RichLink,JC as RichList,Cu as Rotate,zn as RowOverflowMenu,N6 as SIDE_PANEL_EMPTY_ACTIONS,B2 as STATUS_TAG_PRESETS,lI as SandboxPermissionPrompt,mee as ScheduledTaskCardView,xee as ScheduledTaskDeleteDialog,Ree as ScheduledTaskDetailView,Bee as ScheduledTasksSpaceView,$t as Search,Hn as SearchInput,yI as SearchResult,wa as Section,Ht as SegmentedControl,wr as Select,Qd as SelectTrigger,TI as SelectionBulkBar,sR as SeriesChart,vn as Server,yd as Settings,lo as Share,Tq as ShareSettingsDialogView,G3 as ShareSettingsEditorView,LI as ShareStrip,gr as Shield,$I as ShortcutGroupTable,FI as ShortcutSheet,rX as SidePanelEmpty,v6 as Sidebar,bw as SidebarIcon,Fs as SidebarShell,hc as SidebarToggle,JI as SitesArtifactCardView,re as Skeleton,br as Skill,gv as SkillAvatarView,TJ as SkillCardView,Yb as SkillDetailPanelView,UJ as SkillDetailView,QJ as SkillImportDialogView,JJ as SkillImportResultDialogView,Rw as Skills,M4 as SkinManager,T6 as SnapshotContentView,hX as SnapshotImageExportView,Id as Sort,Mw as Sparkle,Aa as Sparkles,Ro as Spinner,rA as Splash,sX as StarterCapsules,Nt as StatusTag,mA as StepList,Ba as Stop,EV as SubAgentPane,jH as SubAgentThread,gn as SuccessCircle,Md as Sun,po as Switch,uo as Tabs,Rn as Tag,HH as TaskRef,So as Terminal,MV as TerminalPane,Sr as TextField,jf as Textarea,P4 as ThemeDemo,o4 as ThemeProvider,dv as Thinking,xd as ThreadDot,Od as ThumbsDown,Dw as ThumbsUp,CA as TimePicker,wc as TitleBar,_A as Toast,LA as ToastRegion,yp as ToolCallRow,Db as ToolDetailModalView,aa as Tooltip,Rg as TraceDot,Vl as Transcript,JH as TranscriptSpine,Le as Trash,df as UninstallConfirmDialog,$A as UnreadDivider,kw as Usage,Fl as UserTurn,Sd as Volume,ZA as WCardShell,Hb as WORKBENCH_SIDE_PANEL_WIDTH,fr as WarningTriangle,_i as WeCom,HF as WebPreview,WF as WebPreviewBody,Yk as WebPreviewConsole,zV as WebPreviewDialog,Yg as WebPreviewNav,cV as WebPreviewShell,uf as WindowBand,mf as WindowChrome,pX as WorkbenchSidePanel,NX as WorkspaceMigrateConfirm,Rd as Zap,js as ZoomIn,Gs as ZoomOut,Xl as applyTenantTheme,V0 as basenameFromLocalPath,Np as catalogInstallStatus,ul as cleanFileLabel,g as cn,Cf as collectMarkdownFileRefs,ua as createRawTokens,Kv as createSemanticAdapter,zg as createSpreadsheet,pc as dataSeriesColor,Ib as desktopToolStatusLabel,Ep as exportSkin,jd as findFixedOffsetAncestor,BC as formatExecutionFailure,OC as formatExecutionMeta,Xn as formatShortcut,Wk as formatShortcutKeys,i6 as formatToolMetrics,k4 as getCurrentThemeName,ux as getHighlighter,CU as getSemanticAttributes,mx as getTokensCacheKey,c9 as glyphColor,Ate as glyphStyle,kU as hasSemanticAttributes,pn as hashToDataColor,ma as highlightCode,Ip as importSkin,Op as importSkinFromShareUrl,Ap as importSkinFromUrl,lc as inferAttachmentMeta,yM as inferFileReferenceMeta,Zx as isImeCommitEnter,Gg as isMacShortcutPlatform,R4 as loadCustomSkins,Pc as localMarkdownLinkTarget,$k as normalizePreviewUrl,zd as owFloatingActionClass,Ds as parseTenantTheme,xe as ptToPx,Hg as readOnlyInput,_p as removeTenantTheme,rc as resolveFileIcon,rs as safeHref,ni as saveCustomSkins,Bp as shareSkin,yz as skillAvatarTone,kz as skillGlyph,O0 as stripInlineMarkdown,Wg as transferExcelToSpreadSheet,Cp as updateRowText,h4 as useBranding,nte as useClickOutside,lte as useDragReorder,Dt as useImeAwareEnter,gp as useInExecutionSummaryBody,pte as useKeyboard,Lg as usePopover,Wf as useSelectedOptionLocator,fte as useSidebarResize,Dp as useTenantTheme,en as useTheme,Mp as useUnifiedTheme};
|