coding-tool-x 3.8.7 → 3.8.9
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/README.md +2 -2
- package/dist/web/assets/{AgentsDrawer-C7ePByZx.js → AgentsDrawer-Cj5CJ4d9.js} +1 -1
- package/dist/web/assets/Analytics-1doS-8uC.js +1 -0
- package/dist/web/assets/AssetPathField-C9TOPl7o.js +1 -0
- package/dist/web/assets/{ChatHistoryDrawer-Ccl4rhdz.js → ChatHistoryDrawer-BTmQ1aQr.js} +1 -1
- package/dist/web/assets/{CollapseItem-MxG_UD4o.js → CollapseItem-CwqJk3bE.js} +1 -1
- package/dist/web/assets/{CommandsDrawer-DWbaxHRZ.js → CommandsDrawer-CaZWDI_G.js} +1 -1
- package/dist/web/assets/ConfigExportDrawer-C3vSZEsS.js +1 -0
- package/dist/web/assets/{ConfigTemplates-AiRPv2cd.js → ConfigTemplates-gyERg9iC.js} +1 -1
- package/dist/web/assets/{ConfigTemplatesDrawer-CKMFsfEF.js → ConfigTemplatesDrawer-B17RqFi4.js} +1 -1
- package/dist/web/assets/{ConfigTemplatesPanel-Cvbnkvpt.js → ConfigTemplatesPanel-DKIC_FqG.js} +1 -1
- package/dist/web/assets/{Divider-D28g1gwj.js → Divider-DsdbkHrG.js} +1 -1
- package/dist/web/assets/{FavoritesDrawer-DA-dR_vP.js → FavoritesDrawer-DaziQmBp.js} +1 -1
- package/dist/web/assets/Forward-DLCL7aMY.js +1 -0
- package/dist/web/assets/{GatewayConvertDrawer-402_raGb.js → GatewayConvertDrawer-OMgWUUSc.js} +1 -1
- package/dist/web/assets/Home-DOSUTfrE.js +1 -0
- package/dist/web/assets/{MarkdownEditor-BvkDECwH.js → MarkdownEditor-9TTwTS-U.js} +1 -1
- package/dist/web/assets/McpDrawer-I8rl8lGH.js +1 -0
- package/dist/web/assets/{McpFormDrawer-DPMnyt5L.js → McpFormDrawer-DEP3C7ut.js} +1 -1
- package/dist/web/assets/{PluginManager-FKVeugr4.js → PluginManager-BuRcWuBj.js} +1 -1
- package/dist/web/assets/{PluginsDrawer-MvM1R55d.js → PluginsDrawer-_zZENaQn.js} +1 -1
- package/dist/web/assets/PluginsPanel-Bs5qZ-TK.js +1 -0
- package/dist/web/assets/PluginsPanel-CzGMK-Ap.css +1 -0
- package/dist/web/assets/ProjectList-BSxuL2td.js +1 -0
- package/dist/web/assets/{ProjectList-677RLZ8O.css → ProjectList-VbIYSHbH.css} +1 -1
- package/dist/web/assets/PromptsDrawer-CoZ-ZtsY.js +1 -0
- package/dist/web/assets/RecentSessionsDrawer-B_17aJBG.js +1 -0
- package/dist/web/assets/RecentSessionsDrawer-yrAD4p1A.css +1 -0
- package/dist/web/assets/SessionCard-BL_x0d3t.js +1 -0
- package/dist/web/assets/SessionList-DhRYZ6vl.js +1 -0
- package/dist/web/assets/SessionList-qG_XpPBJ.css +1 -0
- package/dist/web/assets/{SettingsDrawer-lMjttbkD.js → SettingsDrawer-fYb0DU7X.js} +1 -1
- package/dist/web/assets/SkillManager-S698Hns8.js +1 -0
- package/dist/web/assets/{SkillsDrawer-DF6JsSyj.js → SkillsDrawer-Ms4lPCow.js} +1 -1
- package/dist/web/assets/{SkillsPanel-B3Nm5j32.css → SkillsPanel-C4ke56nF.css} +1 -1
- package/dist/web/assets/SkillsPanel-rqnqAOGL.js +1 -0
- package/dist/web/assets/{SpeedTestDrawer-BaZkZqPP.js → SpeedTestDrawer-Bbn38SfV.js} +1 -1
- package/dist/web/assets/Upload-CdyVHxCI.js +1 -0
- package/dist/web/assets/{WorkspaceDrawer-BFSwZ5yU.js → WorkspaceDrawer-L7HJRc6u.js} +1 -1
- package/dist/web/assets/{WorkspaceManager-BHL1uYct.js → WorkspaceManager-DsoNg2z8.js} +1 -1
- package/dist/web/assets/{WorkspacePanel-B5PooBtg.js → WorkspacePanel-Be8PVZah.js} +1 -1
- package/dist/web/assets/{headers-cf-QapUq.js → headers-B5JWGn3v.js} +1 -1
- package/dist/web/assets/{icons-B2Vg-IOC.js → icons-DmFe4b5j.js} +1 -1
- package/dist/web/assets/{index-BohDDAy_.css → index-3Lp6z8TQ.css} +1 -1
- package/dist/web/assets/index-BKlAWTH-.js +2 -0
- package/dist/web/assets/{light-Cp0t7v32.js → light-0eavxNvt.js} +1 -1
- package/dist/web/assets/platforms-BmzzwnSw.js +1 -0
- package/dist/web/assets/platforms-DWXgmy2w.js +1 -0
- package/dist/web/assets/session-visibility-BAmxh3cK.js +1 -0
- package/dist/web/assets/sessions-CC0j-KH_.js +1 -0
- package/dist/web/assets/sessions-D4yQtfKb.js +1 -0
- package/dist/web/assets/use-message-DqCwefG6.js +1 -0
- package/dist/web/assets/{useResponsiveDrawer-D-DDpbnI.js → useResponsiveDrawer-V_onl9NV.js} +1 -1
- package/dist/web/index.html +7 -7
- package/package.json +1 -1
- package/src/commands/daemon.js +27 -4
- package/src/commands/search.js +17 -2
- package/src/config/paths.js +2 -0
- package/src/platforms/channel-auth-registry.js +36 -6
- package/src/platforms/channel-auth-service.js +12 -2
- package/src/platforms/driver-registry.js +9 -1
- package/src/platforms/drivers/claude/session-history-adapter.js +72 -1
- package/src/platforms/drivers/claude/sessions-implementation.js +49 -7
- package/src/platforms/drivers/claude/sessions.js +30 -6
- package/src/platforms/drivers/codex/parser.js +57 -1
- package/src/platforms/drivers/codex/session-history-adapter.js +8 -2
- package/src/platforms/drivers/codex/sessions-implementation.js +25 -3
- package/src/platforms/drivers/codex/sessions.js +18 -1
- package/src/platforms/drivers/dsh/api-operations.js +396 -0
- package/src/platforms/drivers/dsh/channels-implementation.js +458 -0
- package/src/platforms/drivers/dsh/channels.js +191 -0
- package/src/platforms/drivers/dsh/common.js +571 -0
- package/src/platforms/drivers/dsh/native-config.js +93 -0
- package/src/platforms/drivers/dsh/native-logs.js +116 -0
- package/src/platforms/drivers/dsh/plugin-manager.js +117 -0
- package/src/platforms/drivers/dsh/projects.js +23 -0
- package/src/platforms/drivers/dsh/proxy-implementation.js +260 -0
- package/src/platforms/drivers/dsh/proxy.js +23 -0
- package/src/platforms/drivers/dsh/resources.js +346 -0
- package/src/platforms/drivers/dsh/sessions.js +587 -0
- package/src/platforms/drivers/dsh/statistics-implementation.js +238 -0
- package/src/platforms/drivers/dsh/statistics.js +24 -0
- package/src/platforms/drivers/gemini/session-history-adapter.js +49 -1
- package/src/platforms/drivers/gemini/sessions-implementation.js +46 -1
- package/src/platforms/drivers/gemini/sessions.js +2 -1
- package/src/platforms/drivers/omp/prompts.js +58 -2
- package/src/platforms/drivers/omp/proxy-implementation.js +25 -1
- package/src/platforms/drivers/omp/session-history-adapter.js +42 -1
- package/src/platforms/drivers/omp/sessions-implementation.js +51 -3
- package/src/platforms/drivers/omp/sessions.js +33 -2
- package/src/platforms/drivers/opencode/channels-implementation.js +25 -22
- package/src/platforms/drivers/opencode/channels.js +6 -1
- package/src/platforms/drivers/opencode/sessions-implementation.js +89 -9
- package/src/platforms/drivers/opencode/sessions.js +37 -1
- package/src/platforms/manifest-schema.js +43 -3
- package/src/platforms/manifests/dsh.json +542 -0
- package/src/platforms/manifests/omp.json +2 -1
- package/src/platforms/manifests/opencode.json +28 -0
- package/src/platforms/native-oauth-adapters.js +318 -18
- package/src/platforms/oauth-credentials-service.js +344 -13
- package/src/platforms/path-resolver.js +2 -0
- package/src/platforms/platform-path-context.js +12 -2
- package/src/platforms/registry.js +16 -1
- package/src/platforms/runtime.js +5 -0
- package/src/platforms/session-history-adapters.js +1 -0
- package/src/server/api/platform-api-config.js +23 -2
- package/src/server/api/platform-route-factory.js +9 -2
- package/src/server/api/platforms.js +19 -1
- package/src/server/api/plugins.js +108 -13
- package/src/server/index.js +35 -1
- package/src/server/services/config-registry-service.js +10 -1
- package/src/server/services/config-templates-service.js +1 -0
- package/src/server/services/plugins-service.js +474 -103
- package/src/server/services/session-history-index.js +900 -140
- package/src/server/services/session-history-worker.js +3 -1
- package/src/server/services/skill-service.js +214 -7
- package/src/server/services/usage-log-utils.js +1 -0
- package/src/server/services/workspace-service.js +39 -10
- package/src/shared/driver-factories/api.js +22 -6
- package/src/shared/driver-factories/projects.js +8 -0
- package/dist/web/assets/Analytics-BVG6ehFv.js +0 -1
- package/dist/web/assets/AssetPathField-BZI9NvEr.js +0 -1
- package/dist/web/assets/ConfigExportDrawer-DrawKwxE.js +0 -1
- package/dist/web/assets/Home-CTF8ZWKW.js +0 -1
- package/dist/web/assets/McpDrawer-DZGHkuDm.js +0 -1
- package/dist/web/assets/PluginsPanel-CKuBs38B.js +0 -1
- package/dist/web/assets/PluginsPanel-D6ZqITcR.css +0 -1
- package/dist/web/assets/ProjectList-tsjwjXV1.js +0 -1
- package/dist/web/assets/PromptsDrawer-B-X9ci8n.js +0 -1
- package/dist/web/assets/RecentSessionsDrawer-CKFsOYDM.css +0 -1
- package/dist/web/assets/RecentSessionsDrawer-wLktMF_c.js +0 -1
- package/dist/web/assets/SessionCard-DkJPy0TY.js +0 -1
- package/dist/web/assets/SessionList-BpYRz1cX.css +0 -1
- package/dist/web/assets/SessionList-Gzhh4FOZ.js +0 -1
- package/dist/web/assets/SkillManager-CzFxWxx-.js +0 -1
- package/dist/web/assets/SkillsPanel--lLEts9y.js +0 -1
- package/dist/web/assets/Upload-BEQ-3Kqq.js +0 -1
- package/dist/web/assets/index-BFInlZGI.js +0 -2
- package/dist/web/assets/platforms-CBkB45JP.js +0 -1
- package/dist/web/assets/platforms-FTpjxAT6.js +0 -1
- package/dist/web/assets/sessions-Cmy31slD.js +0 -1
- package/dist/web/assets/sessions-yC_oVVh8.js +0 -1
- package/dist/web/assets/use-message-DoLM8C1C.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,Cn as o,Ct as n,D as t,Dt as r,Gt as i,I as l,It as a,Kt as s,M as d,N as c,Nt as u,Ot as g,Rt as h,Sn as p,Tt as f,Ut as v,Wt as b,Yt as m,Zt as C,an as x,dn as S,gn as k,gt as w,hn as y,ht as z,j as F,k as L,kt as B,l as P,mn as M,nn as $,pn as O,qt as T,s as R,tn as H,vn as j,w as E,x as D,xn as I,xt as A,y as W,yn as _,yt as N,zt as q}from"./_plugin-vue_export-helper-BeLZJZij.js";import{A as Z,F as V,G as U,H as Y,I as X,M as G,N as K,R as J,Z as Q,b as ee,dt as oe,f as ne,ht as te,l as re,ot as ie,st as le,tt as ae,y as se,z as de}from"./vue-vendor-BqZbbXHA.js";import{b as ce,f as ue,g as ge,h as he,v as pe,x as fe}from"./use-message-DoLM8C1C.js";import{n as ve,t as be}from"./use-lock-html-scroll-DXIqmUW4.js";var me=le(null);function Ce(e){if(e.clientX>0||e.clientY>0)me.value={x:e.clientX,y:e.clientY};else{const{target:o}=e;if(o instanceof Element){const{left:e,top:n,width:t,height:r}=o.getBoundingClientRect();me.value=e>0||n>0?{x:e+t/2,y:n+r/2}:{x:0,y:0}}else me.value=null}}var xe=0,Se=!0;function ke(){if(!fe)return ie(le(null));0===xe&&$("click",document,Ce,!0);const e=()=>{xe+=1};return Se&&(Se=ce())?(J(e),de(()=>{0===(xe-=1)&&H("click",document,Ce,!0)})):e(),ie(me)}var we=le(void 0),ye=0;function ze(){we.value=Date.now()}var Fe=!0;function Le(e){if(!fe)return ie(le(!1));const o=le(!1);let n=null;function t(){null!==n&&window.clearTimeout(n)}function r(){t(),o.value=!0,n=window.setTimeout(()=>{o.value=!1},e)}0===ye&&$("click",window,ze,!0);const i=()=>{ye+=1,$("click",window,r,!0)};return Fe&&(Fe=ce())?(J(i),de(()=>{0===(ye-=1)&&H("click",window,ze,!0),H("click",window,r,!0),t()})):i(),ie(o)}function Be(e){return Object.keys(e)}var Pe=L("error",()=>G("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},G("g",{"fill-rule":"nonzero"},G("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),Me=L("info",()=>G("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},G("g",{"fill-rule":"nonzero"},G("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),$e=L("success",()=>G("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},G("g",{"fill-rule":"nonzero"},G("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),Oe=L("warning",()=>G("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},G("g",{"fill-rule":"nonzero"},G("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),Te={paddingSmall:"12px 16px 12px",paddingMedium:"19px 24px 20px",paddingLarge:"23px 32px 24px",paddingHuge:"27px 40px 28px",titleFontSizeSmall:"16px",titleFontSizeMedium:"18px",titleFontSizeLarge:"18px",titleFontSizeHuge:"18px",closeIconSize:"18px",closeSize:"22px"};function Re(e){const{primaryColor:o,borderRadius:n,lineHeight:t,fontSize:r,cardColor:i,textColor2:l,textColor1:a,dividerColor:s,fontWeightStrong:d,closeIconColor:c,closeIconColorHover:u,closeIconColorPressed:g,closeColorHover:h,closeColorPressed:p,modalColor:f,boxShadow1:v,popoverColor:b,actionColor:m}=e;return Object.assign(Object.assign({},Te),{lineHeight:t,color:i,colorModal:f,colorPopover:b,colorTarget:o,colorEmbedded:m,colorEmbeddedModal:m,colorEmbeddedPopover:m,textColor:l,titleTextColor:a,borderColor:s,actionColor:m,titleFontWeight:d,closeColorHover:h,closeColorPressed:p,closeBorderRadius:n,closeIconColor:c,closeIconColorHover:u,closeIconColorPressed:g,fontSizeSmall:r,fontSizeMedium:r,fontSizeLarge:r,fontSizeHuge:r,boxShadow:v,borderRadius:n})}var He={name:"Card",common:e,self:Re},je=y([k("card","\n font-size: var(--n-font-size);\n line-height: var(--n-line-height);\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n border-radius: var(--n-border-radius);\n background-color: var(--n-color);\n color: var(--n-text-color);\n word-break: break-word;\n transition: \n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n ",[M({background:"var(--n-color-modal)"}),_("hoverable",[y("&:hover","box-shadow: var(--n-box-shadow);")]),_("content-segmented",[y(">",[j("content",{paddingTop:"var(--n-padding-bottom)"})])]),_("content-soft-segmented",[y(">",[j("content","\n margin: 0 var(--n-padding-left);\n padding: var(--n-padding-bottom) 0;\n ")])]),_("footer-segmented",[y(">",[j("footer",{paddingTop:"var(--n-padding-bottom)"})])]),_("footer-soft-segmented",[y(">",[j("footer","\n padding: var(--n-padding-bottom) 0;\n margin: 0 var(--n-padding-left);\n ")])]),y(">",[k("card-header","\n box-sizing: border-box;\n display: flex;\n align-items: center;\n font-size: var(--n-title-font-size);\n padding:\n var(--n-padding-top)\n var(--n-padding-left)\n var(--n-padding-bottom)\n var(--n-padding-left);\n ",[j("main","\n font-weight: var(--n-title-font-weight);\n transition: color .3s var(--n-bezier);\n flex: 1;\n min-width: 0;\n color: var(--n-title-text-color);\n "),j("extra","\n display: flex;\n align-items: center;\n font-size: var(--n-font-size);\n font-weight: 400;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),j("close","\n margin: 0 0 0 8px;\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n ")]),j("action","\n box-sizing: border-box;\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n background-clip: padding-box;\n background-color: var(--n-action-color);\n "),j("content","flex: 1; min-width: 0;"),j("content, footer","\n box-sizing: border-box;\n padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);\n font-size: var(--n-font-size);\n ",[y("&:first-child",{paddingTop:"var(--n-padding-bottom)"})]),j("action","\n background-color: var(--n-action-color);\n padding: var(--n-padding-bottom) var(--n-padding-left);\n border-bottom-left-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n ")]),k("card-cover","\n overflow: hidden;\n width: 100%;\n border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;\n ",[y("img","\n display: block;\n width: 100%;\n ")]),_("bordered","\n border: 1px solid var(--n-border-color);\n ",[y("&:target","border-color: var(--n-color-target);")]),_("action-segmented",[y(">",[j("action",[y("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),_("content-segmented, content-soft-segmented",[y(">",[j("content",{transition:"border-color 0.3s var(--n-bezier)"},[y("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),_("footer-segmented, footer-soft-segmented",[y(">",[j("footer",{transition:"border-color 0.3s var(--n-bezier)"},[y("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),_("embedded","\n background-color: var(--n-color-embedded);\n ")]),p(k("card","\n background: var(--n-color-modal);\n ",[_("embedded","\n background-color: var(--n-color-embedded-modal);\n ")])),o(k("card","\n background: var(--n-color-popover);\n ",[_("embedded","\n background-color: var(--n-color-embedded-popover);\n ")]))]),Ee={title:[String,Function],contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],headerExtraClass:String,headerExtraStyle:[Object,String],footerClass:String,footerStyle:[Object,String],embedded:Boolean,segmented:{type:[Boolean,Object],default:!1},size:{type:String,default:"medium"},bordered:{type:Boolean,default:!0},closable:Boolean,hoverable:Boolean,role:String,onClose:[Function,Array],tag:{type:String,default:"div"},cover:Function,content:[String,Function],footer:Function,action:Function,headerExtra:Function,closeFocusable:Boolean},De=Be(Ee),Ie=Z({name:"Card",props:Object.assign(Object.assign({},c.props),Ee),slots:Object,setup(e){const{inlineThemeDisabled:o,mergedClsPrefixRef:n,mergedRtlRef:t}=w(e),r=c("Card","-card",je,He,e,n),i=l("Card",t,n),a=ee(()=>{const{size:o}=e,{self:{color:n,colorModal:t,colorTarget:i,textColor:l,titleTextColor:a,titleFontWeight:s,borderColor:d,actionColor:c,borderRadius:u,lineHeight:g,closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:f,closeColorHover:v,closeColorPressed:b,closeBorderRadius:m,closeIconSize:C,closeSize:x,boxShadow:k,colorPopover:w,colorEmbedded:y,colorEmbeddedModal:z,colorEmbeddedPopover:F,[I("padding",o)]:L,[I("fontSize",o)]:B,[I("titleFontSize",o)]:P},common:{cubicBezierEaseInOut:M}}=r.value,{top:$,left:O,bottom:T}=S(L);return{"--n-bezier":M,"--n-border-radius":u,"--n-color":n,"--n-color-modal":t,"--n-color-popover":w,"--n-color-embedded":y,"--n-color-embedded-modal":z,"--n-color-embedded-popover":F,"--n-color-target":i,"--n-text-color":l,"--n-line-height":g,"--n-action-color":c,"--n-title-text-color":a,"--n-title-font-weight":s,"--n-close-icon-color":h,"--n-close-icon-color-hover":p,"--n-close-icon-color-pressed":f,"--n-close-color-hover":v,"--n-close-color-pressed":b,"--n-border-color":d,"--n-box-shadow":k,"--n-padding-top":$,"--n-padding-bottom":T,"--n-padding-left":O,"--n-font-size":B,"--n-title-font-size":P,"--n-close-size":x,"--n-close-icon-size":C,"--n-close-border-radius":m}}),s=o?z("card",ee(()=>e.size[0]),a,e):void 0;return{rtlEnabled:i,mergedClsPrefix:n,mergedTheme:r,handleCloseClick:()=>{const{onClose:o}=e;o&&f(o)},cssVars:o?void 0:a,themeClass:null==s?void 0:s.themeClass,onRender:null==s?void 0:s.onRender}},render(){const{segmented:e,bordered:o,hoverable:r,mergedClsPrefix:i,rtlEnabled:l,onRender:a,embedded:s,tag:d,$slots:c}=this;return null==a||a(),G(d,{class:[`${i}-card`,this.themeClass,s&&`${i}-card--embedded`,{[`${i}-card--rtl`]:l,[`${i}-card--content${"boolean"!=typeof e&&"soft"===e.content?"-soft":""}-segmented`]:!0===e||!1!==e&&e.content,[`${i}-card--footer${"boolean"!=typeof e&&"soft"===e.footer?"-soft":""}-segmented`]:!0===e||!1!==e&&e.footer,[`${i}-card--action-segmented`]:!0===e||!1!==e&&e.action,[`${i}-card--bordered`]:o,[`${i}-card--hoverable`]:r}],style:this.cssVars,role:this.role},n(c.cover,e=>{const o=this.cover?N([this.cover()]):e;return o&&G("div",{class:`${i}-card-cover`,role:"none"},o)}),n(c.header,e=>{const{title:o}=this,r=o?N("function"==typeof o?[o()]:[o]):e;return r||this.closable?G("div",{class:[`${i}-card-header`,this.headerClass],style:this.headerStyle,role:"heading"},G("div",{class:`${i}-card-header__main`,role:"heading"},r),n(c["header-extra"],e=>{const o=this.headerExtra?N([this.headerExtra()]):e;return o&&G("div",{class:[`${i}-card-header__extra`,this.headerExtraClass],style:this.headerExtraStyle},o)}),this.closable&&G(t,{clsPrefix:i,class:`${i}-card-header__close`,onClick:this.handleCloseClick,focusable:this.closeFocusable,absolute:!0})):null}),n(c.default,e=>{const{content:o}=this,n=o?N("function"==typeof o?[o()]:[o]):e;return n&&G("div",{class:[`${i}-card__content`,this.contentClass],style:this.contentStyle,role:"none"},n)}),n(c.footer,e=>{const o=this.footer?N([this.footer()]):e;return o&&G("div",{class:[`${i}-card__footer`,this.footerClass],style:this.footerStyle,role:"none"},o)}),n(c.action,e=>{const o=this.action?N([this.action()]):e;return o&&G("div",{class:`${i}-card__action`,role:"none"},o)}))}}),Ae={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"};function We(e){const{baseColor:o,inputColorDisabled:n,cardColor:t,modalColor:r,popoverColor:i,textColorDisabled:l,borderColor:a,primaryColor:s,textColor2:d,fontSizeSmall:c,fontSizeMedium:u,fontSizeLarge:g,borderRadiusSmall:h,lineHeight:p}=e;return Object.assign(Object.assign({},Ae),{labelLineHeight:p,fontSizeSmall:c,fontSizeMedium:u,fontSizeLarge:g,borderRadius:h,color:o,colorChecked:s,colorDisabled:n,colorDisabledChecked:n,colorTableHeader:t,colorTableHeaderModal:r,colorTableHeaderPopover:i,checkMarkColor:o,checkMarkColorDisabled:l,checkMarkColorDisabledChecked:l,border:`1px solid ${a}`,borderDisabled:`1px solid ${a}`,borderDisabledChecked:`1px solid ${a}`,borderChecked:`1px solid ${s}`,borderFocus:`1px solid ${s}`,boxShadowFocus:`0 0 0 2px ${x(s,{alpha:.3})}`,textColor:d,textColorDisabled:l})}var _e={name:"Checkbox",common:e,self:We},Ne=m("n-dialog-provider"),qe=m("n-dialog-api"),Ze=m("n-dialog-reactive-list");function Ve(){const e=K(qe,null);return null===e&&r("use-dialog","No outer <n-dialog-provider /> founded."),e}var Ue={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"22px",closeIconSize:"18px",closeMargin:"20px 26px 0 0",closeMarginIconTop:"10px 16px 0 0"};function Ye(e){const{textColor1:o,textColor2:n,modalColor:t,closeIconColor:r,closeIconColorHover:i,closeIconColorPressed:l,closeColorHover:a,closeColorPressed:s,infoColor:d,successColor:c,warningColor:u,errorColor:g,primaryColor:h,dividerColor:p,borderRadius:f,fontWeightStrong:v,lineHeight:b,fontSize:m}=e;return Object.assign(Object.assign({},Ue),{fontSize:m,lineHeight:b,border:`1px solid ${p}`,titleTextColor:o,textColor:n,color:t,closeColorHover:a,closeColorPressed:s,closeIconColor:r,closeIconColorHover:i,closeIconColorPressed:l,closeBorderRadius:f,iconColor:h,iconColorInfo:d,iconColorSuccess:c,iconColorWarning:u,iconColorError:g,borderRadius:f,titleFontWeight:v})}var Xe=d({name:"Dialog",common:e,peers:{Button:P},self:Ye}),Ge={icon:Function,type:{type:String,default:"default"},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function,closeFocusable:Boolean},Ke=Be(Ge),Je=y([k("dialog","\n --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left);\n word-break: break-word;\n line-height: var(--n-line-height);\n position: relative;\n background: var(--n-color);\n color: var(--n-text-color);\n box-sizing: border-box;\n margin: auto;\n border-radius: var(--n-border-radius);\n padding: var(--n-padding);\n transition: \n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n ",[j("icon","\n color: var(--n-icon-color);\n "),_("bordered","\n border: var(--n-border);\n "),_("icon-top",[j("close","\n margin: var(--n-close-margin);\n "),j("icon","\n margin: var(--n-icon-margin);\n "),j("content","\n text-align: center;\n "),j("title","\n justify-content: center;\n "),j("action","\n justify-content: center;\n ")]),_("icon-left",[j("icon","\n margin: var(--n-icon-margin);\n "),_("closable",[j("title","\n padding-right: calc(var(--n-close-size) + 6px);\n ")])]),j("close","\n position: absolute;\n right: 0;\n top: 0;\n margin: var(--n-close-margin);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n z-index: 1;\n "),j("content","\n font-size: var(--n-font-size);\n margin: var(--n-content-margin);\n position: relative;\n word-break: break-word;\n ",[_("last","margin-bottom: 0;")]),j("action","\n display: flex;\n justify-content: flex-end;\n ",[y("> *:not(:last-child)","\n margin-right: var(--n-action-space);\n ")]),j("icon","\n font-size: var(--n-icon-size);\n transition: color .3s var(--n-bezier);\n "),j("title","\n transition: color .3s var(--n-bezier);\n display: flex;\n align-items: center;\n font-size: var(--n-title-font-size);\n font-weight: var(--n-title-font-weight);\n color: var(--n-title-text-color);\n "),k("dialog-icon-container","\n display: flex;\n justify-content: center;\n ")]),p(k("dialog","\n width: 446px;\n max-width: calc(100vw - 32px);\n ")),k("dialog",[M("\n width: 446px;\n max-width: calc(100vw - 32px);\n ")])]),Qe={default:()=>G(Me,null),info:()=>G(Me,null),success:()=>G($e,null),warning:()=>G(Oe,null),error:()=>G(Pe,null)},eo=Z({name:"Dialog",alias:["NimbusConfirmCard","Confirm"],props:Object.assign(Object.assign({},c.props),Ge),slots:Object,setup(e){const{mergedComponentPropsRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:t,mergedRtlRef:r}=w(e),i=l("Dialog",r,n),a=ee(()=>{var n,t;const{iconPlacement:r}=e;return r||(null===(t=null===(n=null==o?void 0:o.value)||void 0===n?void 0:n.Dialog)||void 0===t?void 0:t.iconPlacement)||"left"});const s=c("Dialog","-dialog",Je,Xe,e,n),d=ee(()=>{const{type:o}=e,n=a.value,{common:{cubicBezierEaseInOut:t},self:{fontSize:r,lineHeight:i,border:l,titleTextColor:d,textColor:c,color:u,closeBorderRadius:g,closeColorHover:h,closeColorPressed:p,closeIconColor:f,closeIconColorHover:v,closeIconColorPressed:b,closeIconSize:m,borderRadius:C,titleFontWeight:x,titleFontSize:k,padding:w,iconSize:y,actionSpace:z,contentMargin:F,closeSize:L,["top"===n?"iconMarginIconTop":"iconMargin"]:B,["top"===n?"closeMarginIconTop":"closeMargin"]:P,[I("iconColor",o)]:M}}=s.value,$=S(B);return{"--n-font-size":r,"--n-icon-color":M,"--n-bezier":t,"--n-close-margin":P,"--n-icon-margin-top":$.top,"--n-icon-margin-right":$.right,"--n-icon-margin-bottom":$.bottom,"--n-icon-margin-left":$.left,"--n-icon-size":y,"--n-close-size":L,"--n-close-icon-size":m,"--n-close-border-radius":g,"--n-close-color-hover":h,"--n-close-color-pressed":p,"--n-close-icon-color":f,"--n-close-icon-color-hover":v,"--n-close-icon-color-pressed":b,"--n-color":u,"--n-text-color":c,"--n-border-radius":C,"--n-padding":w,"--n-line-height":i,"--n-border":l,"--n-content-margin":F,"--n-title-font-size":k,"--n-title-font-weight":x,"--n-title-text-color":d,"--n-action-space":z}}),u=t?z("dialog",ee(()=>`${e.type[0]}${a.value[0]}`),d,e):void 0;return{mergedClsPrefix:n,rtlEnabled:i,mergedIconPlacement:a,mergedTheme:s,handlePositiveClick:function(o){const{onPositiveClick:n}=e;n&&n(o)},handleNegativeClick:function(o){const{onNegativeClick:n}=e;n&&n(o)},handleCloseClick:function(){const{onClose:o}=e;o&&o()},cssVars:t?void 0:d,themeClass:null==u?void 0:u.themeClass,onRender:null==u?void 0:u.onRender}},render(){var e;const{bordered:o,mergedIconPlacement:r,cssVars:i,closable:l,showIcon:a,title:s,content:d,action:c,negativeText:u,positiveText:g,positiveButtonProps:h,negativeButtonProps:p,handlePositiveClick:f,handleNegativeClick:v,mergedTheme:b,loading:m,type:C,mergedClsPrefix:x}=this;null===(e=this.onRender)||void 0===e||e.call(this);const S=a?G(F,{clsPrefix:x,class:`${x}-dialog__icon`},{default:()=>n(this.$slots.icon,e=>e||(this.icon?he(this.icon):Qe[this.type]()))}):null,k=n(this.$slots.action,e=>e||g||u||c?G("div",{class:[`${x}-dialog__action`,this.actionClass],style:this.actionStyle},e||(c?[he(c)]:[this.negativeText&&G(R,Object.assign({theme:b.peers.Button,themeOverrides:b.peerOverrides.Button,ghost:!0,size:"small",onClick:v},p),{default:()=>he(this.negativeText)}),this.positiveText&&G(R,Object.assign({theme:b.peers.Button,themeOverrides:b.peerOverrides.Button,size:"small",type:"default"===C?"primary":C,disabled:m,loading:m,onClick:f},h),{default:()=>he(this.positiveText)})])):null);return G("div",{class:[`${x}-dialog`,this.themeClass,this.closable&&`${x}-dialog--closable`,`${x}-dialog--icon-${r}`,o&&`${x}-dialog--bordered`,this.rtlEnabled&&`${x}-dialog--rtl`],style:i,role:"dialog"},l?n(this.$slots.close,e=>{const o=[`${x}-dialog__close`,this.rtlEnabled&&`${x}-dialog--rtl`];return e?G("div",{class:o},e):G(t,{focusable:this.closeFocusable,clsPrefix:x,class:o,onClick:this.handleCloseClick})}):null,a&&"top"===r?G("div",{class:`${x}-dialog-icon-container`},S):null,G("div",{class:[`${x}-dialog__title`,this.titleClass],style:this.titleStyle},a&&"left"===r?S:null,A(this.$slots.header,()=>[he(s)])),G("div",{class:[`${x}-dialog__content`,k?"":`${x}-dialog__content--last`,this.contentClass],style:this.contentStyle},A(this.$slots.default,()=>[he(d)])),k)}});function oo(e){const{modalColor:o,textColor2:n,boxShadow3:t}=e;return{color:o,textColor:n,boxShadow:t}}var no=d({name:"Modal",common:e,peers:{Scrollbar:D,Dialog:Xe,Card:He},self:oo}),to=m("n-modal-provider"),ro=m("n-modal-api"),io=m("n-modal-reactive-list");function lo(){const e=K(ro,null);return null===e&&r("use-modal","No outer <n-modal-provider /> founded."),e}var ao="n-draggable";var so=Object.assign(Object.assign({},Ee),Ge),co=Be(so),uo=Z({name:"ModalBody",inheritAttrs:!1,slots:Object,props:Object.assign(Object.assign({show:{type:Boolean,required:!0},preset:String,displayDirective:{type:String,required:!0},trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},blockScroll:Boolean,draggable:{type:[Boolean,Object],default:!1},maskHidden:Boolean},so),{renderMask:Function,onClickoutside:Function,onBeforeLeave:{type:Function,required:!0},onAfterLeave:{type:Function,required:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0},onClose:{type:Function,required:!0},onAfterEnter:Function,onEsc:Function}),setup(e){const o=le(null),n=le(null),t=le(e.show),r=le(null),l=le(null),a=K(i);let s=null;Q(oe(e,"show"),e=>{e&&(s=a.getMousePosition())},{immediate:!0});const{stopDrag:d,startDrag:c,draggableRef:u,draggableClassRef:g}=function(e,o){let n;const t=ee(()=>!1!==e.value),r=ee(()=>t.value?ao:""),i=ee(()=>{const o=e.value;return!0===o||!1===o||!o||"none"!==o.bounds});function l(){n&&(n(),n=void 0)}return Y(l),{stopDrag:l,startDrag:function(e){const t=e.querySelector(`.${ao}`);if(!t||!r.value)return;let l,a=0,s=0,d=0,c=0,u=0,g=0;function h(o){o.preventDefault(),l=o;const{x:n,y:t,right:r,bottom:i}=e.getBoundingClientRect();s=n,c=t,a=window.innerWidth-r,d=window.innerHeight-i;const{left:h,top:p}=e.style;u=+p.slice(0,-2),g=+h.slice(0,-2)}function p(o){if(!l)return;const{clientX:n,clientY:t}=l;let r=o.clientX-n,h=o.clientY-t;i.value&&(r>a?r=a:-r>s&&(r=-s),h>d?h=d:-h>c&&(h=-c));const p=r+g,f=h+u;e.style.top=`${f}px`,e.style.left=`${p}px`}function f(){l=void 0,o.onEnd(e)}$("mousedown",t,h),$("mousemove",window,p),$("mouseup",window,f),n=()=>{H("mousedown",t,h),$("mousemove",window,p),$("mouseup",window,f)}},draggableRef:t,draggableClassRef:r}}(oe(e,"draggable"),{onEnd:e=>{m(e)}}),h=ee(()=>te([e.titleClass,g.value])),p=ee(()=>te([e.headerClass,g.value]));function f(){if("center"===a.transformOriginRef.value)return"";const{value:e}=r,{value:o}=l;return null===e||null===o?"":n.value?`${e}px ${o+n.value.containerScrollTop}px`:""}function m(e){if("center"===a.transformOriginRef.value)return;if(!s)return;if(!n.value)return;const o=n.value.containerScrollTop,{offsetLeft:t,offsetTop:i}=e,d=s.y,c=s.x;r.value=-(t-c),l.value=-(i-d-o),e.style.transformOrigin=f()}Q(oe(e,"show"),e=>{e&&(t.value=!0)}),be(ee(()=>e.blockScroll&&t.value));const C=le(null);return Q(C,e=>{e&&X(()=>{const n=e.el;n&&o.value!==n&&(o.value=n)})}),U(b,o),U(T,null),U(v,null),{mergedTheme:a.mergedThemeRef,appear:a.appearRef,isMounted:a.isMountedRef,mergedClsPrefix:a.mergedClsPrefixRef,bodyRef:o,scrollbarRef:n,draggableClass:g,displayed:t,childNodeRef:C,cardHeaderClass:p,dialogTitleClass:h,handlePositiveClick:function(){e.onPositiveClick()},handleNegativeClick:function(){e.onNegativeClick()},handleCloseClick:function(){const{onClose:o}=e;o&&o()},handleAfterEnter:function(o){const n=o;u.value&&c(n),e.onAfterEnter&&e.onAfterEnter(n)},handleAfterLeave:function(){t.value=!1,r.value=null,l.value=null,d(),e.onAfterLeave()},handleBeforeLeave:function(o){o.style.transformOrigin=f(),e.onBeforeLeave()},handleEnter:function(e){X(()=>{m(e)})}}},render(){const{$slots:e,$attrs:o,handleEnter:n,handleAfterEnter:t,handleAfterLeave:r,handleBeforeLeave:i,preset:l,mergedClsPrefix:a}=this;let s=null;if(!l){if(s=pe("default",e.default,{draggableClass:this.draggableClass}),!s)return void g("modal","default slot is empty");s=se(s),s.props=V({class:`${a}-modal`},o,s.props||{})}return"show"===this.displayDirective||this.displayed||this.show?ae(G("div",{role:"none",class:[`${a}-modal-body-wrapper`,this.maskHidden&&`${a}-modal-body-wrapper--mask-hidden`]},G(W,{ref:"scrollbarRef",theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,contentClass:`${a}-modal-scroll-content`},{default:()=>{var o;return[null===(o=this.renderMask)||void 0===o?void 0:o.call(this),G(u,{disabled:!this.trapFocus||this.maskHidden,active:this.show,onEsc:this.onEsc,autoFocus:this.autoFocus},{default:()=>{var o;return G(re,{name:"fade-in-scale-up-transition",appear:null!==(o=this.appear)&&void 0!==o?o:this.isMounted,onEnter:n,onAfterEnter:t,onAfterLeave:r,onBeforeLeave:i},{default:()=>{const o=[[ne,this.show]],{onClickoutside:n}=this;return n&&o.push([q,this.onClickoutside,void 0,{capture:!0}]),ae("confirm"===this.preset||"dialog"===this.preset?G(eo,Object.assign({},this.$attrs,{class:[`${a}-modal`,this.$attrs.class],ref:"bodyRef",theme:this.mergedTheme.peers.Dialog,themeOverrides:this.mergedTheme.peerOverrides.Dialog},ge(this.$props,Ke),{titleClass:this.dialogTitleClass,"aria-modal":"true"}),e):"card"===this.preset?G(Ie,Object.assign({},this.$attrs,{ref:"bodyRef",class:[`${a}-modal`,this.$attrs.class],theme:this.mergedTheme.peers.Card,themeOverrides:this.mergedTheme.peerOverrides.Card},ge(this.$props,De),{headerClass:this.cardHeaderClass,"aria-modal":"true",role:"dialog"}),e):this.childNodeRef=s,o)}})}})]}})),[[ne,"if"===this.displayDirective||this.displayed||this.show]]):null}}),go=y([k("modal-container","\n position: fixed;\n left: 0;\n top: 0;\n height: 0;\n width: 0;\n display: flex;\n "),k("modal-mask","\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, .4);\n ",[E({enterDuration:".25s",leaveDuration:".25s",enterCubicBezier:"var(--n-bezier-ease-out)",leaveCubicBezier:"var(--n-bezier-ease-out)"})]),k("modal-body-wrapper","\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow: visible;\n ",[k("modal-scroll-content","\n min-height: 100%;\n display: flex;\n position: relative;\n "),_("mask-hidden","pointer-events: none;",[k("modal-scroll-content",[y("> *","\n pointer-events: all;\n ")])])]),k("modal","\n position: relative;\n align-self: center;\n color: var(--n-text-color);\n margin: auto;\n box-shadow: var(--n-box-shadow);\n ",[ue({duration:".25s",enterScale:".5"}),y(`.${ao}`,"\n cursor: move;\n user-select: none;\n ")])]),ho=Object.assign(Object.assign(Object.assign(Object.assign({},c.props),{show:Boolean,showMask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},preset:String,to:[String,Object],displayDirective:{type:String,default:"if"},transformOrigin:{type:String,default:"mouse"},zIndex:Number,autoFocus:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0}}),so),{draggable:[Boolean,Object],onEsc:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onBeforeLeave:Function,onAfterLeave:Function,onClose:Function,onPositiveClick:Function,onNegativeClick:Function,onMaskClick:Function,internalDialog:Boolean,internalModal:Boolean,internalAppear:{type:Boolean,default:void 0},overlayStyle:[String,Object],onBeforeHide:Function,onAfterHide:Function,onHide:Function,unstableShowMask:{type:Boolean,default:void 0}}),po=Z({name:"Modal",inheritAttrs:!1,props:ho,slots:Object,setup(e){const o=le(null),{mergedClsPrefixRef:n,namespaceRef:t,inlineThemeDisabled:r}=w(e),l=c("Modal","-modal",go,no,e,n),a=Le(64),d=ke(),u=C(),g=e.internalDialog?K(Ne,null):null,h=e.internalModal?K(s,null):null,p=ve();function v(o){const{onUpdateShow:n,"onUpdate:show":t,onHide:r}=e;n&&f(n,o),t&&f(t,o),r&&!o&&r(o)}U(i,{getMousePosition:()=>{const e=g||h;if(e){const{clickedRef:o,clickedPositionRef:n}=e;if(o.value&&n.value)return n.value}return a.value?d.value:null},mergedClsPrefixRef:n,mergedThemeRef:l,isMountedRef:u,appearRef:oe(e,"internalAppear"),transformOriginRef:oe(e,"transformOrigin")});const b=ee(()=>{const{common:{cubicBezierEaseOut:e},self:{boxShadow:o,color:n,textColor:t}}=l.value;return{"--n-bezier-ease-out":e,"--n-box-shadow":o,"--n-color":n,"--n-text-color":t}}),m=r?z("theme-class",void 0,b,e):void 0;return{mergedClsPrefix:n,namespace:t,isMounted:u,containerRef:o,presetProps:ee(()=>ge(e,co)),handleEsc:function(o){var n;null===(n=e.onEsc)||void 0===n||n.call(e),e.show&&e.closeOnEsc&&B(o)&&(p.value||v(!1))},handleAfterLeave:function(){const{onAfterLeave:o,onAfterHide:n}=e;o&&f(o),n&&n()},handleClickoutside:function(n){var t;const{onMaskClick:r}=e;r&&r(n),e.maskClosable&&(null===(t=o.value)||void 0===t?void 0:t.contains(O(n)))&&v(!1)},handleBeforeLeave:function(){const{onBeforeLeave:o,onBeforeHide:n}=e;o&&f(o),n&&n()},doUpdateShow:v,handleNegativeClick:function(){const{onNegativeClick:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&v(!1)}):v(!1)},handlePositiveClick:function(){const{onPositiveClick:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&v(!1)}):v(!1)},handleCloseClick:function(){const{onClose:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&v(!1)}):v(!1)},cssVars:r?void 0:b,themeClass:null==m?void 0:m.themeClass,onRender:null==m?void 0:m.onRender}},render(){const{mergedClsPrefix:e}=this;return G(a,{to:this.to,show:this.show},{default:()=>{var o;null===(o=this.onRender)||void 0===o||o.call(this);const{showMask:n}=this;return ae(G("div",{role:"none",ref:"containerRef",class:[`${e}-modal-container`,this.themeClass,this.namespace],style:this.cssVars},G(uo,Object.assign({style:this.overlayStyle},this.$attrs,{ref:"bodyWrapper",displayDirective:this.displayDirective,show:this.show,preset:this.preset,autoFocus:this.autoFocus,trapFocus:this.trapFocus,draggable:this.draggable,blockScroll:this.blockScroll,maskHidden:!n},this.presetProps,{onEsc:this.handleEsc,onClose:this.handleCloseClick,onNegativeClick:this.handleNegativeClick,onPositiveClick:this.handlePositiveClick,onBeforeLeave:this.handleBeforeLeave,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave,onClickoutside:n?void 0:this.handleClickoutside,renderMask:n?()=>{var o;return G(re,{name:"fade-in-transition",key:"mask",appear:null!==(o=this.internalAppear)&&void 0!==o?o:this.isMounted},{default:()=>this.show?G("div",{"aria-hidden":!0,ref:"containerRef",class:`${e}-modal-mask`,onClick:this.handleClickoutside}):null})}:void 0}),this.$slots)),[[h,{zIndex:this.zIndex,enabled:this.show}]])}})}});function fo(e){const{textColor1:o,dividerColor:n,fontWeightStrong:t}=e;return{textColor:o,color:n,fontWeight:t}}var vo={name:"Divider",common:e,self:fo},bo={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"};var mo={name:"Space",self:function(){return bo}},Co={feedbackPadding:"4px 0 0 2px",feedbackHeightSmall:"24px",feedbackHeightMedium:"24px",feedbackHeightLarge:"26px",feedbackFontSizeSmall:"13px",feedbackFontSizeMedium:"14px",feedbackFontSizeLarge:"14px",labelFontSizeLeftSmall:"14px",labelFontSizeLeftMedium:"14px",labelFontSizeLeftLarge:"15px",labelFontSizeTopSmall:"13px",labelFontSizeTopMedium:"14px",labelFontSizeTopLarge:"14px",labelHeightSmall:"24px",labelHeightMedium:"26px",labelHeightLarge:"28px",labelPaddingVertical:"0 0 6px 2px",labelPaddingHorizontal:"0 12px 0 0",labelTextAlignVertical:"left",labelTextAlignHorizontal:"right",labelFontWeight:"400"};function xo(e){const{heightSmall:o,heightMedium:n,heightLarge:t,textColor1:r,errorColor:i,warningColor:l,lineHeight:a,textColor3:s}=e;return Object.assign(Object.assign({},Co),{blankHeightSmall:o,blankHeightMedium:n,blankHeightLarge:t,lineHeight:a,labelTextColor:r,asteriskColor:i,feedbackTextColorError:i,feedbackTextColorWarning:l,feedbackTextColor:s})}var So={name:"Form",common:e,self:xo},ko={headerFontSize1:"30px",headerFontSize2:"22px",headerFontSize3:"18px",headerFontSize4:"16px",headerFontSize5:"16px",headerFontSize6:"16px",headerMargin1:"28px 0 20px 0",headerMargin2:"28px 0 20px 0",headerMargin3:"28px 0 20px 0",headerMargin4:"28px 0 18px 0",headerMargin5:"28px 0 18px 0",headerMargin6:"28px 0 18px 0",headerPrefixWidth1:"16px",headerPrefixWidth2:"16px",headerPrefixWidth3:"12px",headerPrefixWidth4:"12px",headerPrefixWidth5:"12px",headerPrefixWidth6:"12px",headerBarWidth1:"4px",headerBarWidth2:"4px",headerBarWidth3:"3px",headerBarWidth4:"3px",headerBarWidth5:"3px",headerBarWidth6:"3px",pMargin:"16px 0 16px 0",liMargin:".25em 0 0 0",olPadding:"0 0 0 2em",ulPadding:"0 0 0 2em"};function wo(e){const{primaryColor:o,textColor2:n,borderColor:t,lineHeight:r,fontSize:i,borderRadiusSmall:l,dividerColor:a,fontWeightStrong:s,textColor1:d,textColor3:c,infoColor:u,warningColor:g,errorColor:h,successColor:p,codeColor:f}=e;return Object.assign(Object.assign({},ko),{aTextColor:o,blockquoteTextColor:n,blockquotePrefixColor:t,blockquoteLineHeight:r,blockquoteFontSize:i,codeBorderRadius:l,liTextColor:n,liLineHeight:r,liFontSize:i,hrColor:a,headerFontWeight:s,headerTextColor:d,pTextColor:n,pTextColor1Depth:d,pTextColor2Depth:n,pTextColor3Depth:c,pLineHeight:r,pFontSize:i,headerBarColor:o,headerBarColorPrimary:o,headerBarColorInfo:u,headerBarColorError:h,headerBarColorWarning:g,headerBarColorSuccess:p,textColor:n,textColor1Depth:d,textColor2Depth:n,textColor3Depth:c,textColorPrimary:o,textColorInfo:u,textColorSuccess:p,textColorWarning:g,textColorError:h,codeTextColor:n,codeColor:f,codeBorder:"1px solid #0000"})}var yo={name:"Typography",common:e,self:wo};export{Re as A,qe as C,We as D,_e as E,Be as F,Le as I,ke as L,$e as M,Me as N,Ie as O,Pe as P,Ve as S,Ze as T,eo as _,mo as a,Xe as b,fo as c,lo as d,ro as f,oo as g,no as h,xo as i,Oe as j,He as k,po as l,io as m,yo as n,bo as o,to as p,So as r,vo as s,wo as t,ho as u,Ke as v,Ne as w,Ye as x,Ge as y};
|
|
1
|
+
import{C as e,Cn as o,Ct as n,D as t,Dt as r,Gt as i,I as l,It as a,Kt as s,M as d,N as c,Nt as u,Ot as g,Rt as h,Sn as p,Tt as f,Ut as v,Wt as b,Yt as m,Zt as C,an as x,dn as S,gn as k,gt as y,hn as w,ht as z,j as F,k as L,kt as B,l as P,mn as M,nn as $,pn as O,qt as T,s as R,tn as H,vn as j,w as E,x as D,xn as I,xt as A,y as W,yn as _,yt as N,zt as q}from"./_plugin-vue_export-helper-BeLZJZij.js";import{A as Z,F as V,G as U,H as Y,I as X,M as G,N as K,R as J,Z as Q,b as ee,dt as oe,f as ne,ht as te,l as re,ot as ie,st as le,tt as ae,y as se,z as de}from"./vue-vendor-BqZbbXHA.js";import{M as ce,N as ue,b as ge,h as he,x as pe,y as fe}from"./use-message-DqCwefG6.js";import{n as ve,t as be}from"./use-lock-html-scroll-DXIqmUW4.js";var me=le(null);function Ce(e){if(e.clientX>0||e.clientY>0)me.value={x:e.clientX,y:e.clientY};else{const{target:o}=e;if(o instanceof Element){const{left:e,top:n,width:t,height:r}=o.getBoundingClientRect();me.value=e>0||n>0?{x:e+t/2,y:n+r/2}:{x:0,y:0}}else me.value=null}}var xe=0,Se=!0;function ke(){if(!ue)return ie(le(null));0===xe&&$("click",document,Ce,!0);const e=()=>{xe+=1};return Se&&(Se=ce())?(J(e),de(()=>{0===(xe-=1)&&H("click",document,Ce,!0)})):e(),ie(me)}var ye=le(void 0),we=0;function ze(){ye.value=Date.now()}var Fe=!0;function Le(e){if(!ue)return ie(le(!1));const o=le(!1);let n=null;function t(){null!==n&&window.clearTimeout(n)}function r(){t(),o.value=!0,n=window.setTimeout(()=>{o.value=!1},e)}0===we&&$("click",window,ze,!0);const i=()=>{we+=1,$("click",window,r,!0)};return Fe&&(Fe=ce())?(J(i),de(()=>{0===(we-=1)&&H("click",window,ze,!0),H("click",window,r,!0),t()})):i(),ie(o)}function Be(e){return Object.keys(e)}var Pe=L("error",()=>G("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},G("g",{"fill-rule":"nonzero"},G("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),Me=L("info",()=>G("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},G("g",{"fill-rule":"nonzero"},G("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),$e=L("success",()=>G("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},G("g",{"fill-rule":"nonzero"},G("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),Oe=L("warning",()=>G("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},G("g",{"fill-rule":"nonzero"},G("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),Te={paddingSmall:"12px 16px 12px",paddingMedium:"19px 24px 20px",paddingLarge:"23px 32px 24px",paddingHuge:"27px 40px 28px",titleFontSizeSmall:"16px",titleFontSizeMedium:"18px",titleFontSizeLarge:"18px",titleFontSizeHuge:"18px",closeIconSize:"18px",closeSize:"22px"};function Re(e){const{primaryColor:o,borderRadius:n,lineHeight:t,fontSize:r,cardColor:i,textColor2:l,textColor1:a,dividerColor:s,fontWeightStrong:d,closeIconColor:c,closeIconColorHover:u,closeIconColorPressed:g,closeColorHover:h,closeColorPressed:p,modalColor:f,boxShadow1:v,popoverColor:b,actionColor:m}=e;return Object.assign(Object.assign({},Te),{lineHeight:t,color:i,colorModal:f,colorPopover:b,colorTarget:o,colorEmbedded:m,colorEmbeddedModal:m,colorEmbeddedPopover:m,textColor:l,titleTextColor:a,borderColor:s,actionColor:m,titleFontWeight:d,closeColorHover:h,closeColorPressed:p,closeBorderRadius:n,closeIconColor:c,closeIconColorHover:u,closeIconColorPressed:g,fontSizeSmall:r,fontSizeMedium:r,fontSizeLarge:r,fontSizeHuge:r,boxShadow:v,borderRadius:n})}var He={name:"Card",common:e,self:Re},je=w([k("card","\n font-size: var(--n-font-size);\n line-height: var(--n-line-height);\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n border-radius: var(--n-border-radius);\n background-color: var(--n-color);\n color: var(--n-text-color);\n word-break: break-word;\n transition: \n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n ",[M({background:"var(--n-color-modal)"}),_("hoverable",[w("&:hover","box-shadow: var(--n-box-shadow);")]),_("content-segmented",[w(">",[j("content",{paddingTop:"var(--n-padding-bottom)"})])]),_("content-soft-segmented",[w(">",[j("content","\n margin: 0 var(--n-padding-left);\n padding: var(--n-padding-bottom) 0;\n ")])]),_("footer-segmented",[w(">",[j("footer",{paddingTop:"var(--n-padding-bottom)"})])]),_("footer-soft-segmented",[w(">",[j("footer","\n padding: var(--n-padding-bottom) 0;\n margin: 0 var(--n-padding-left);\n ")])]),w(">",[k("card-header","\n box-sizing: border-box;\n display: flex;\n align-items: center;\n font-size: var(--n-title-font-size);\n padding:\n var(--n-padding-top)\n var(--n-padding-left)\n var(--n-padding-bottom)\n var(--n-padding-left);\n ",[j("main","\n font-weight: var(--n-title-font-weight);\n transition: color .3s var(--n-bezier);\n flex: 1;\n min-width: 0;\n color: var(--n-title-text-color);\n "),j("extra","\n display: flex;\n align-items: center;\n font-size: var(--n-font-size);\n font-weight: 400;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),j("close","\n margin: 0 0 0 8px;\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n ")]),j("action","\n box-sizing: border-box;\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n background-clip: padding-box;\n background-color: var(--n-action-color);\n "),j("content","flex: 1; min-width: 0;"),j("content, footer","\n box-sizing: border-box;\n padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);\n font-size: var(--n-font-size);\n ",[w("&:first-child",{paddingTop:"var(--n-padding-bottom)"})]),j("action","\n background-color: var(--n-action-color);\n padding: var(--n-padding-bottom) var(--n-padding-left);\n border-bottom-left-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n ")]),k("card-cover","\n overflow: hidden;\n width: 100%;\n border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;\n ",[w("img","\n display: block;\n width: 100%;\n ")]),_("bordered","\n border: 1px solid var(--n-border-color);\n ",[w("&:target","border-color: var(--n-color-target);")]),_("action-segmented",[w(">",[j("action",[w("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),_("content-segmented, content-soft-segmented",[w(">",[j("content",{transition:"border-color 0.3s var(--n-bezier)"},[w("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),_("footer-segmented, footer-soft-segmented",[w(">",[j("footer",{transition:"border-color 0.3s var(--n-bezier)"},[w("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),_("embedded","\n background-color: var(--n-color-embedded);\n ")]),p(k("card","\n background: var(--n-color-modal);\n ",[_("embedded","\n background-color: var(--n-color-embedded-modal);\n ")])),o(k("card","\n background: var(--n-color-popover);\n ",[_("embedded","\n background-color: var(--n-color-embedded-popover);\n ")]))]),Ee={title:[String,Function],contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],headerExtraClass:String,headerExtraStyle:[Object,String],footerClass:String,footerStyle:[Object,String],embedded:Boolean,segmented:{type:[Boolean,Object],default:!1},size:{type:String,default:"medium"},bordered:{type:Boolean,default:!0},closable:Boolean,hoverable:Boolean,role:String,onClose:[Function,Array],tag:{type:String,default:"div"},cover:Function,content:[String,Function],footer:Function,action:Function,headerExtra:Function,closeFocusable:Boolean},De=Be(Ee),Ie=Z({name:"Card",props:Object.assign(Object.assign({},c.props),Ee),slots:Object,setup(e){const{inlineThemeDisabled:o,mergedClsPrefixRef:n,mergedRtlRef:t}=y(e),r=c("Card","-card",je,He,e,n),i=l("Card",t,n),a=ee(()=>{const{size:o}=e,{self:{color:n,colorModal:t,colorTarget:i,textColor:l,titleTextColor:a,titleFontWeight:s,borderColor:d,actionColor:c,borderRadius:u,lineHeight:g,closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:f,closeColorHover:v,closeColorPressed:b,closeBorderRadius:m,closeIconSize:C,closeSize:x,boxShadow:k,colorPopover:y,colorEmbedded:w,colorEmbeddedModal:z,colorEmbeddedPopover:F,[I("padding",o)]:L,[I("fontSize",o)]:B,[I("titleFontSize",o)]:P},common:{cubicBezierEaseInOut:M}}=r.value,{top:$,left:O,bottom:T}=S(L);return{"--n-bezier":M,"--n-border-radius":u,"--n-color":n,"--n-color-modal":t,"--n-color-popover":y,"--n-color-embedded":w,"--n-color-embedded-modal":z,"--n-color-embedded-popover":F,"--n-color-target":i,"--n-text-color":l,"--n-line-height":g,"--n-action-color":c,"--n-title-text-color":a,"--n-title-font-weight":s,"--n-close-icon-color":h,"--n-close-icon-color-hover":p,"--n-close-icon-color-pressed":f,"--n-close-color-hover":v,"--n-close-color-pressed":b,"--n-border-color":d,"--n-box-shadow":k,"--n-padding-top":$,"--n-padding-bottom":T,"--n-padding-left":O,"--n-font-size":B,"--n-title-font-size":P,"--n-close-size":x,"--n-close-icon-size":C,"--n-close-border-radius":m}}),s=o?z("card",ee(()=>e.size[0]),a,e):void 0;return{rtlEnabled:i,mergedClsPrefix:n,mergedTheme:r,handleCloseClick:()=>{const{onClose:o}=e;o&&f(o)},cssVars:o?void 0:a,themeClass:null==s?void 0:s.themeClass,onRender:null==s?void 0:s.onRender}},render(){const{segmented:e,bordered:o,hoverable:r,mergedClsPrefix:i,rtlEnabled:l,onRender:a,embedded:s,tag:d,$slots:c}=this;return null==a||a(),G(d,{class:[`${i}-card`,this.themeClass,s&&`${i}-card--embedded`,{[`${i}-card--rtl`]:l,[`${i}-card--content${"boolean"!=typeof e&&"soft"===e.content?"-soft":""}-segmented`]:!0===e||!1!==e&&e.content,[`${i}-card--footer${"boolean"!=typeof e&&"soft"===e.footer?"-soft":""}-segmented`]:!0===e||!1!==e&&e.footer,[`${i}-card--action-segmented`]:!0===e||!1!==e&&e.action,[`${i}-card--bordered`]:o,[`${i}-card--hoverable`]:r}],style:this.cssVars,role:this.role},n(c.cover,e=>{const o=this.cover?N([this.cover()]):e;return o&&G("div",{class:`${i}-card-cover`,role:"none"},o)}),n(c.header,e=>{const{title:o}=this,r=o?N("function"==typeof o?[o()]:[o]):e;return r||this.closable?G("div",{class:[`${i}-card-header`,this.headerClass],style:this.headerStyle,role:"heading"},G("div",{class:`${i}-card-header__main`,role:"heading"},r),n(c["header-extra"],e=>{const o=this.headerExtra?N([this.headerExtra()]):e;return o&&G("div",{class:[`${i}-card-header__extra`,this.headerExtraClass],style:this.headerExtraStyle},o)}),this.closable&&G(t,{clsPrefix:i,class:`${i}-card-header__close`,onClick:this.handleCloseClick,focusable:this.closeFocusable,absolute:!0})):null}),n(c.default,e=>{const{content:o}=this,n=o?N("function"==typeof o?[o()]:[o]):e;return n&&G("div",{class:[`${i}-card__content`,this.contentClass],style:this.contentStyle,role:"none"},n)}),n(c.footer,e=>{const o=this.footer?N([this.footer()]):e;return o&&G("div",{class:[`${i}-card__footer`,this.footerClass],style:this.footerStyle,role:"none"},o)}),n(c.action,e=>{const o=this.action?N([this.action()]):e;return o&&G("div",{class:`${i}-card__action`,role:"none"},o)}))}}),Ae={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"};function We(e){const{baseColor:o,inputColorDisabled:n,cardColor:t,modalColor:r,popoverColor:i,textColorDisabled:l,borderColor:a,primaryColor:s,textColor2:d,fontSizeSmall:c,fontSizeMedium:u,fontSizeLarge:g,borderRadiusSmall:h,lineHeight:p}=e;return Object.assign(Object.assign({},Ae),{labelLineHeight:p,fontSizeSmall:c,fontSizeMedium:u,fontSizeLarge:g,borderRadius:h,color:o,colorChecked:s,colorDisabled:n,colorDisabledChecked:n,colorTableHeader:t,colorTableHeaderModal:r,colorTableHeaderPopover:i,checkMarkColor:o,checkMarkColorDisabled:l,checkMarkColorDisabledChecked:l,border:`1px solid ${a}`,borderDisabled:`1px solid ${a}`,borderDisabledChecked:`1px solid ${a}`,borderChecked:`1px solid ${s}`,borderFocus:`1px solid ${s}`,boxShadowFocus:`0 0 0 2px ${x(s,{alpha:.3})}`,textColor:d,textColorDisabled:l})}var _e={name:"Checkbox",common:e,self:We},Ne=m("n-dialog-provider"),qe=m("n-dialog-api"),Ze=m("n-dialog-reactive-list");function Ve(){const e=K(qe,null);return null===e&&r("use-dialog","No outer <n-dialog-provider /> founded."),e}var Ue={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"22px",closeIconSize:"18px",closeMargin:"20px 26px 0 0",closeMarginIconTop:"10px 16px 0 0"};function Ye(e){const{textColor1:o,textColor2:n,modalColor:t,closeIconColor:r,closeIconColorHover:i,closeIconColorPressed:l,closeColorHover:a,closeColorPressed:s,infoColor:d,successColor:c,warningColor:u,errorColor:g,primaryColor:h,dividerColor:p,borderRadius:f,fontWeightStrong:v,lineHeight:b,fontSize:m}=e;return Object.assign(Object.assign({},Ue),{fontSize:m,lineHeight:b,border:`1px solid ${p}`,titleTextColor:o,textColor:n,color:t,closeColorHover:a,closeColorPressed:s,closeIconColor:r,closeIconColorHover:i,closeIconColorPressed:l,closeBorderRadius:f,iconColor:h,iconColorInfo:d,iconColorSuccess:c,iconColorWarning:u,iconColorError:g,borderRadius:f,titleFontWeight:v})}var Xe=d({name:"Dialog",common:e,peers:{Button:P},self:Ye}),Ge={icon:Function,type:{type:String,default:"default"},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function,closeFocusable:Boolean},Ke=Be(Ge),Je=w([k("dialog","\n --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left);\n word-break: break-word;\n line-height: var(--n-line-height);\n position: relative;\n background: var(--n-color);\n color: var(--n-text-color);\n box-sizing: border-box;\n margin: auto;\n border-radius: var(--n-border-radius);\n padding: var(--n-padding);\n transition: \n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n ",[j("icon","\n color: var(--n-icon-color);\n "),_("bordered","\n border: var(--n-border);\n "),_("icon-top",[j("close","\n margin: var(--n-close-margin);\n "),j("icon","\n margin: var(--n-icon-margin);\n "),j("content","\n text-align: center;\n "),j("title","\n justify-content: center;\n "),j("action","\n justify-content: center;\n ")]),_("icon-left",[j("icon","\n margin: var(--n-icon-margin);\n "),_("closable",[j("title","\n padding-right: calc(var(--n-close-size) + 6px);\n ")])]),j("close","\n position: absolute;\n right: 0;\n top: 0;\n margin: var(--n-close-margin);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n z-index: 1;\n "),j("content","\n font-size: var(--n-font-size);\n margin: var(--n-content-margin);\n position: relative;\n word-break: break-word;\n ",[_("last","margin-bottom: 0;")]),j("action","\n display: flex;\n justify-content: flex-end;\n ",[w("> *:not(:last-child)","\n margin-right: var(--n-action-space);\n ")]),j("icon","\n font-size: var(--n-icon-size);\n transition: color .3s var(--n-bezier);\n "),j("title","\n transition: color .3s var(--n-bezier);\n display: flex;\n align-items: center;\n font-size: var(--n-title-font-size);\n font-weight: var(--n-title-font-weight);\n color: var(--n-title-text-color);\n "),k("dialog-icon-container","\n display: flex;\n justify-content: center;\n ")]),p(k("dialog","\n width: 446px;\n max-width: calc(100vw - 32px);\n ")),k("dialog",[M("\n width: 446px;\n max-width: calc(100vw - 32px);\n ")])]),Qe={default:()=>G(Me,null),info:()=>G(Me,null),success:()=>G($e,null),warning:()=>G(Oe,null),error:()=>G(Pe,null)},eo=Z({name:"Dialog",alias:["NimbusConfirmCard","Confirm"],props:Object.assign(Object.assign({},c.props),Ge),slots:Object,setup(e){const{mergedComponentPropsRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:t,mergedRtlRef:r}=y(e),i=l("Dialog",r,n),a=ee(()=>{var n,t;const{iconPlacement:r}=e;return r||(null===(t=null===(n=null==o?void 0:o.value)||void 0===n?void 0:n.Dialog)||void 0===t?void 0:t.iconPlacement)||"left"});const s=c("Dialog","-dialog",Je,Xe,e,n),d=ee(()=>{const{type:o}=e,n=a.value,{common:{cubicBezierEaseInOut:t},self:{fontSize:r,lineHeight:i,border:l,titleTextColor:d,textColor:c,color:u,closeBorderRadius:g,closeColorHover:h,closeColorPressed:p,closeIconColor:f,closeIconColorHover:v,closeIconColorPressed:b,closeIconSize:m,borderRadius:C,titleFontWeight:x,titleFontSize:k,padding:y,iconSize:w,actionSpace:z,contentMargin:F,closeSize:L,["top"===n?"iconMarginIconTop":"iconMargin"]:B,["top"===n?"closeMarginIconTop":"closeMargin"]:P,[I("iconColor",o)]:M}}=s.value,$=S(B);return{"--n-font-size":r,"--n-icon-color":M,"--n-bezier":t,"--n-close-margin":P,"--n-icon-margin-top":$.top,"--n-icon-margin-right":$.right,"--n-icon-margin-bottom":$.bottom,"--n-icon-margin-left":$.left,"--n-icon-size":w,"--n-close-size":L,"--n-close-icon-size":m,"--n-close-border-radius":g,"--n-close-color-hover":h,"--n-close-color-pressed":p,"--n-close-icon-color":f,"--n-close-icon-color-hover":v,"--n-close-icon-color-pressed":b,"--n-color":u,"--n-text-color":c,"--n-border-radius":C,"--n-padding":y,"--n-line-height":i,"--n-border":l,"--n-content-margin":F,"--n-title-font-size":k,"--n-title-font-weight":x,"--n-title-text-color":d,"--n-action-space":z}}),u=t?z("dialog",ee(()=>`${e.type[0]}${a.value[0]}`),d,e):void 0;return{mergedClsPrefix:n,rtlEnabled:i,mergedIconPlacement:a,mergedTheme:s,handlePositiveClick:function(o){const{onPositiveClick:n}=e;n&&n(o)},handleNegativeClick:function(o){const{onNegativeClick:n}=e;n&&n(o)},handleCloseClick:function(){const{onClose:o}=e;o&&o()},cssVars:t?void 0:d,themeClass:null==u?void 0:u.themeClass,onRender:null==u?void 0:u.onRender}},render(){var e;const{bordered:o,mergedIconPlacement:r,cssVars:i,closable:l,showIcon:a,title:s,content:d,action:c,negativeText:u,positiveText:g,positiveButtonProps:h,negativeButtonProps:p,handlePositiveClick:f,handleNegativeClick:v,mergedTheme:b,loading:m,type:C,mergedClsPrefix:x}=this;null===(e=this.onRender)||void 0===e||e.call(this);const S=a?G(F,{clsPrefix:x,class:`${x}-dialog__icon`},{default:()=>n(this.$slots.icon,e=>e||(this.icon?fe(this.icon):Qe[this.type]()))}):null,k=n(this.$slots.action,e=>e||g||u||c?G("div",{class:[`${x}-dialog__action`,this.actionClass],style:this.actionStyle},e||(c?[fe(c)]:[this.negativeText&&G(R,Object.assign({theme:b.peers.Button,themeOverrides:b.peerOverrides.Button,ghost:!0,size:"small",onClick:v},p),{default:()=>fe(this.negativeText)}),this.positiveText&&G(R,Object.assign({theme:b.peers.Button,themeOverrides:b.peerOverrides.Button,size:"small",type:"default"===C?"primary":C,disabled:m,loading:m,onClick:f},h),{default:()=>fe(this.positiveText)})])):null);return G("div",{class:[`${x}-dialog`,this.themeClass,this.closable&&`${x}-dialog--closable`,`${x}-dialog--icon-${r}`,o&&`${x}-dialog--bordered`,this.rtlEnabled&&`${x}-dialog--rtl`],style:i,role:"dialog"},l?n(this.$slots.close,e=>{const o=[`${x}-dialog__close`,this.rtlEnabled&&`${x}-dialog--rtl`];return e?G("div",{class:o},e):G(t,{focusable:this.closeFocusable,clsPrefix:x,class:o,onClick:this.handleCloseClick})}):null,a&&"top"===r?G("div",{class:`${x}-dialog-icon-container`},S):null,G("div",{class:[`${x}-dialog__title`,this.titleClass],style:this.titleStyle},a&&"left"===r?S:null,A(this.$slots.header,()=>[fe(s)])),G("div",{class:[`${x}-dialog__content`,k?"":`${x}-dialog__content--last`,this.contentClass],style:this.contentStyle},A(this.$slots.default,()=>[fe(d)])),k)}});function oo(e){const{modalColor:o,textColor2:n,boxShadow3:t}=e;return{color:o,textColor:n,boxShadow:t}}var no=d({name:"Modal",common:e,peers:{Scrollbar:D,Dialog:Xe,Card:He},self:oo}),to=m("n-modal-provider"),ro=m("n-modal-api"),io=m("n-modal-reactive-list");function lo(){const e=K(ro,null);return null===e&&r("use-modal","No outer <n-modal-provider /> founded."),e}var ao="n-draggable";var so=Object.assign(Object.assign({},Ee),Ge),co=Be(so),uo=Z({name:"ModalBody",inheritAttrs:!1,slots:Object,props:Object.assign(Object.assign({show:{type:Boolean,required:!0},preset:String,displayDirective:{type:String,required:!0},trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},blockScroll:Boolean,draggable:{type:[Boolean,Object],default:!1},maskHidden:Boolean},so),{renderMask:Function,onClickoutside:Function,onBeforeLeave:{type:Function,required:!0},onAfterLeave:{type:Function,required:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0},onClose:{type:Function,required:!0},onAfterEnter:Function,onEsc:Function}),setup(e){const o=le(null),n=le(null),t=le(e.show),r=le(null),l=le(null),a=K(i);let s=null;Q(oe(e,"show"),e=>{e&&(s=a.getMousePosition())},{immediate:!0});const{stopDrag:d,startDrag:c,draggableRef:u,draggableClassRef:g}=function(e,o){let n;const t=ee(()=>!1!==e.value),r=ee(()=>t.value?ao:""),i=ee(()=>{const o=e.value;return!0===o||!1===o||!o||"none"!==o.bounds});function l(){n&&(n(),n=void 0)}return Y(l),{stopDrag:l,startDrag:function(e){const t=e.querySelector(`.${ao}`);if(!t||!r.value)return;let l,a=0,s=0,d=0,c=0,u=0,g=0;function h(o){o.preventDefault(),l=o;const{x:n,y:t,right:r,bottom:i}=e.getBoundingClientRect();s=n,c=t,a=window.innerWidth-r,d=window.innerHeight-i;const{left:h,top:p}=e.style;u=+p.slice(0,-2),g=+h.slice(0,-2)}function p(o){if(!l)return;const{clientX:n,clientY:t}=l;let r=o.clientX-n,h=o.clientY-t;i.value&&(r>a?r=a:-r>s&&(r=-s),h>d?h=d:-h>c&&(h=-c));const p=r+g,f=h+u;e.style.top=`${f}px`,e.style.left=`${p}px`}function f(){l=void 0,o.onEnd(e)}$("mousedown",t,h),$("mousemove",window,p),$("mouseup",window,f),n=()=>{H("mousedown",t,h),$("mousemove",window,p),$("mouseup",window,f)}},draggableRef:t,draggableClassRef:r}}(oe(e,"draggable"),{onEnd:e=>{m(e)}}),h=ee(()=>te([e.titleClass,g.value])),p=ee(()=>te([e.headerClass,g.value]));function f(){if("center"===a.transformOriginRef.value)return"";const{value:e}=r,{value:o}=l;return null===e||null===o?"":n.value?`${e}px ${o+n.value.containerScrollTop}px`:""}function m(e){if("center"===a.transformOriginRef.value)return;if(!s)return;if(!n.value)return;const o=n.value.containerScrollTop,{offsetLeft:t,offsetTop:i}=e,d=s.y,c=s.x;r.value=-(t-c),l.value=-(i-d-o),e.style.transformOrigin=f()}Q(oe(e,"show"),e=>{e&&(t.value=!0)}),be(ee(()=>e.blockScroll&&t.value));const C=le(null);return Q(C,e=>{e&&X(()=>{const n=e.el;n&&o.value!==n&&(o.value=n)})}),U(b,o),U(T,null),U(v,null),{mergedTheme:a.mergedThemeRef,appear:a.appearRef,isMounted:a.isMountedRef,mergedClsPrefix:a.mergedClsPrefixRef,bodyRef:o,scrollbarRef:n,draggableClass:g,displayed:t,childNodeRef:C,cardHeaderClass:p,dialogTitleClass:h,handlePositiveClick:function(){e.onPositiveClick()},handleNegativeClick:function(){e.onNegativeClick()},handleCloseClick:function(){const{onClose:o}=e;o&&o()},handleAfterEnter:function(o){const n=o;u.value&&c(n),e.onAfterEnter&&e.onAfterEnter(n)},handleAfterLeave:function(){t.value=!1,r.value=null,l.value=null,d(),e.onAfterLeave()},handleBeforeLeave:function(o){o.style.transformOrigin=f(),e.onBeforeLeave()},handleEnter:function(e){X(()=>{m(e)})}}},render(){const{$slots:e,$attrs:o,handleEnter:n,handleAfterEnter:t,handleAfterLeave:r,handleBeforeLeave:i,preset:l,mergedClsPrefix:a}=this;let s=null;if(!l){if(s=pe("default",e.default,{draggableClass:this.draggableClass}),!s)return void g("modal","default slot is empty");s=se(s),s.props=V({class:`${a}-modal`},o,s.props||{})}return"show"===this.displayDirective||this.displayed||this.show?ae(G("div",{role:"none",class:[`${a}-modal-body-wrapper`,this.maskHidden&&`${a}-modal-body-wrapper--mask-hidden`]},G(W,{ref:"scrollbarRef",theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,contentClass:`${a}-modal-scroll-content`},{default:()=>{var o;return[null===(o=this.renderMask)||void 0===o?void 0:o.call(this),G(u,{disabled:!this.trapFocus||this.maskHidden,active:this.show,onEsc:this.onEsc,autoFocus:this.autoFocus},{default:()=>{var o;return G(re,{name:"fade-in-scale-up-transition",appear:null!==(o=this.appear)&&void 0!==o?o:this.isMounted,onEnter:n,onAfterEnter:t,onAfterLeave:r,onBeforeLeave:i},{default:()=>{const o=[[ne,this.show]],{onClickoutside:n}=this;return n&&o.push([q,this.onClickoutside,void 0,{capture:!0}]),ae("confirm"===this.preset||"dialog"===this.preset?G(eo,Object.assign({},this.$attrs,{class:[`${a}-modal`,this.$attrs.class],ref:"bodyRef",theme:this.mergedTheme.peers.Dialog,themeOverrides:this.mergedTheme.peerOverrides.Dialog},ge(this.$props,Ke),{titleClass:this.dialogTitleClass,"aria-modal":"true"}),e):"card"===this.preset?G(Ie,Object.assign({},this.$attrs,{ref:"bodyRef",class:[`${a}-modal`,this.$attrs.class],theme:this.mergedTheme.peers.Card,themeOverrides:this.mergedTheme.peerOverrides.Card},ge(this.$props,De),{headerClass:this.cardHeaderClass,"aria-modal":"true",role:"dialog"}),e):this.childNodeRef=s,o)}})}})]}})),[[ne,"if"===this.displayDirective||this.displayed||this.show]]):null}}),go=w([k("modal-container","\n position: fixed;\n left: 0;\n top: 0;\n height: 0;\n width: 0;\n display: flex;\n "),k("modal-mask","\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, .4);\n ",[E({enterDuration:".25s",leaveDuration:".25s",enterCubicBezier:"var(--n-bezier-ease-out)",leaveCubicBezier:"var(--n-bezier-ease-out)"})]),k("modal-body-wrapper","\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow: visible;\n ",[k("modal-scroll-content","\n min-height: 100%;\n display: flex;\n position: relative;\n "),_("mask-hidden","pointer-events: none;",[k("modal-scroll-content",[w("> *","\n pointer-events: all;\n ")])])]),k("modal","\n position: relative;\n align-self: center;\n color: var(--n-text-color);\n margin: auto;\n box-shadow: var(--n-box-shadow);\n ",[he({duration:".25s",enterScale:".5"}),w(`.${ao}`,"\n cursor: move;\n user-select: none;\n ")])]),ho=Object.assign(Object.assign(Object.assign(Object.assign({},c.props),{show:Boolean,showMask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},preset:String,to:[String,Object],displayDirective:{type:String,default:"if"},transformOrigin:{type:String,default:"mouse"},zIndex:Number,autoFocus:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0}}),so),{draggable:[Boolean,Object],onEsc:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onBeforeLeave:Function,onAfterLeave:Function,onClose:Function,onPositiveClick:Function,onNegativeClick:Function,onMaskClick:Function,internalDialog:Boolean,internalModal:Boolean,internalAppear:{type:Boolean,default:void 0},overlayStyle:[String,Object],onBeforeHide:Function,onAfterHide:Function,onHide:Function,unstableShowMask:{type:Boolean,default:void 0}}),po=Z({name:"Modal",inheritAttrs:!1,props:ho,slots:Object,setup(e){const o=le(null),{mergedClsPrefixRef:n,namespaceRef:t,inlineThemeDisabled:r}=y(e),l=c("Modal","-modal",go,no,e,n),a=Le(64),d=ke(),u=C(),g=e.internalDialog?K(Ne,null):null,h=e.internalModal?K(s,null):null,p=ve();function v(o){const{onUpdateShow:n,"onUpdate:show":t,onHide:r}=e;n&&f(n,o),t&&f(t,o),r&&!o&&r(o)}U(i,{getMousePosition:()=>{const e=g||h;if(e){const{clickedRef:o,clickedPositionRef:n}=e;if(o.value&&n.value)return n.value}return a.value?d.value:null},mergedClsPrefixRef:n,mergedThemeRef:l,isMountedRef:u,appearRef:oe(e,"internalAppear"),transformOriginRef:oe(e,"transformOrigin")});const b=ee(()=>{const{common:{cubicBezierEaseOut:e},self:{boxShadow:o,color:n,textColor:t}}=l.value;return{"--n-bezier-ease-out":e,"--n-box-shadow":o,"--n-color":n,"--n-text-color":t}}),m=r?z("theme-class",void 0,b,e):void 0;return{mergedClsPrefix:n,namespace:t,isMounted:u,containerRef:o,presetProps:ee(()=>ge(e,co)),handleEsc:function(o){var n;null===(n=e.onEsc)||void 0===n||n.call(e),e.show&&e.closeOnEsc&&B(o)&&(p.value||v(!1))},handleAfterLeave:function(){const{onAfterLeave:o,onAfterHide:n}=e;o&&f(o),n&&n()},handleClickoutside:function(n){var t;const{onMaskClick:r}=e;r&&r(n),e.maskClosable&&(null===(t=o.value)||void 0===t?void 0:t.contains(O(n)))&&v(!1)},handleBeforeLeave:function(){const{onBeforeLeave:o,onBeforeHide:n}=e;o&&f(o),n&&n()},doUpdateShow:v,handleNegativeClick:function(){const{onNegativeClick:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&v(!1)}):v(!1)},handlePositiveClick:function(){const{onPositiveClick:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&v(!1)}):v(!1)},handleCloseClick:function(){const{onClose:o}=e;o?Promise.resolve(o()).then(e=>{!1!==e&&v(!1)}):v(!1)},cssVars:r?void 0:b,themeClass:null==m?void 0:m.themeClass,onRender:null==m?void 0:m.onRender}},render(){const{mergedClsPrefix:e}=this;return G(a,{to:this.to,show:this.show},{default:()=>{var o;null===(o=this.onRender)||void 0===o||o.call(this);const{showMask:n}=this;return ae(G("div",{role:"none",ref:"containerRef",class:[`${e}-modal-container`,this.themeClass,this.namespace],style:this.cssVars},G(uo,Object.assign({style:this.overlayStyle},this.$attrs,{ref:"bodyWrapper",displayDirective:this.displayDirective,show:this.show,preset:this.preset,autoFocus:this.autoFocus,trapFocus:this.trapFocus,draggable:this.draggable,blockScroll:this.blockScroll,maskHidden:!n},this.presetProps,{onEsc:this.handleEsc,onClose:this.handleCloseClick,onNegativeClick:this.handleNegativeClick,onPositiveClick:this.handlePositiveClick,onBeforeLeave:this.handleBeforeLeave,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave,onClickoutside:n?void 0:this.handleClickoutside,renderMask:n?()=>{var o;return G(re,{name:"fade-in-transition",key:"mask",appear:null!==(o=this.internalAppear)&&void 0!==o?o:this.isMounted},{default:()=>this.show?G("div",{"aria-hidden":!0,ref:"containerRef",class:`${e}-modal-mask`,onClick:this.handleClickoutside}):null})}:void 0}),this.$slots)),[[h,{zIndex:this.zIndex,enabled:this.show}]])}})}});function fo(e){const{textColor1:o,dividerColor:n,fontWeightStrong:t}=e;return{textColor:o,color:n,fontWeight:t}}var vo={name:"Divider",common:e,self:fo},bo={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"};var mo={name:"Space",self:function(){return bo}},Co={feedbackPadding:"4px 0 0 2px",feedbackHeightSmall:"24px",feedbackHeightMedium:"24px",feedbackHeightLarge:"26px",feedbackFontSizeSmall:"13px",feedbackFontSizeMedium:"14px",feedbackFontSizeLarge:"14px",labelFontSizeLeftSmall:"14px",labelFontSizeLeftMedium:"14px",labelFontSizeLeftLarge:"15px",labelFontSizeTopSmall:"13px",labelFontSizeTopMedium:"14px",labelFontSizeTopLarge:"14px",labelHeightSmall:"24px",labelHeightMedium:"26px",labelHeightLarge:"28px",labelPaddingVertical:"0 0 6px 2px",labelPaddingHorizontal:"0 12px 0 0",labelTextAlignVertical:"left",labelTextAlignHorizontal:"right",labelFontWeight:"400"};function xo(e){const{heightSmall:o,heightMedium:n,heightLarge:t,textColor1:r,errorColor:i,warningColor:l,lineHeight:a,textColor3:s}=e;return Object.assign(Object.assign({},Co),{blankHeightSmall:o,blankHeightMedium:n,blankHeightLarge:t,lineHeight:a,labelTextColor:r,asteriskColor:i,feedbackTextColorError:i,feedbackTextColorWarning:l,feedbackTextColor:s})}var So={name:"Form",common:e,self:xo},ko={headerFontSize1:"30px",headerFontSize2:"22px",headerFontSize3:"18px",headerFontSize4:"16px",headerFontSize5:"16px",headerFontSize6:"16px",headerMargin1:"28px 0 20px 0",headerMargin2:"28px 0 20px 0",headerMargin3:"28px 0 20px 0",headerMargin4:"28px 0 18px 0",headerMargin5:"28px 0 18px 0",headerMargin6:"28px 0 18px 0",headerPrefixWidth1:"16px",headerPrefixWidth2:"16px",headerPrefixWidth3:"12px",headerPrefixWidth4:"12px",headerPrefixWidth5:"12px",headerPrefixWidth6:"12px",headerBarWidth1:"4px",headerBarWidth2:"4px",headerBarWidth3:"3px",headerBarWidth4:"3px",headerBarWidth5:"3px",headerBarWidth6:"3px",pMargin:"16px 0 16px 0",liMargin:".25em 0 0 0",olPadding:"0 0 0 2em",ulPadding:"0 0 0 2em"};function yo(e){const{primaryColor:o,textColor2:n,borderColor:t,lineHeight:r,fontSize:i,borderRadiusSmall:l,dividerColor:a,fontWeightStrong:s,textColor1:d,textColor3:c,infoColor:u,warningColor:g,errorColor:h,successColor:p,codeColor:f}=e;return Object.assign(Object.assign({},ko),{aTextColor:o,blockquoteTextColor:n,blockquotePrefixColor:t,blockquoteLineHeight:r,blockquoteFontSize:i,codeBorderRadius:l,liTextColor:n,liLineHeight:r,liFontSize:i,hrColor:a,headerFontWeight:s,headerTextColor:d,pTextColor:n,pTextColor1Depth:d,pTextColor2Depth:n,pTextColor3Depth:c,pLineHeight:r,pFontSize:i,headerBarColor:o,headerBarColorPrimary:o,headerBarColorInfo:u,headerBarColorError:h,headerBarColorWarning:g,headerBarColorSuccess:p,textColor:n,textColor1Depth:d,textColor2Depth:n,textColor3Depth:c,textColorPrimary:o,textColorInfo:u,textColorSuccess:p,textColorWarning:g,textColorError:h,codeTextColor:n,codeColor:f,codeBorder:"1px solid #0000"})}var wo={name:"Typography",common:e,self:yo};export{Re as A,qe as C,We as D,_e as E,Be as F,Le as I,ke as L,$e as M,Me as N,Ie as O,Pe as P,Ve as S,Ze as T,eo as _,mo as a,Xe as b,fo as c,lo as d,ro as f,oo as g,no as h,xo as i,Oe as j,He as k,po as l,io as m,wo as n,bo as o,to as p,So as r,vo as s,yo as t,ho as u,Ke as v,Ne as w,Ye as x,Ge as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as a,o as t,s}from"./client-UDwXBP9i.js";async function r(){const t=await a.get("/platforms");return Array.isArray(t.data?.platforms)?t.data.platforms:[]}async function n(s,r={}){const n={};return null!=r.page&&(n.page=r.page),null!=r.limit&&(n.limit=r.limit),(r.q||r.search)&&(n.q=r.q||r.search),r.fresh&&(n.fresh="1"),(await a.get(`${t(s)}/projects`,{params:n})).data}async function e(s,r,n={}){const e={};return null!=n.page&&(e.page=n.page),null!=n.limit&&(e.limit=n.limit),(n.q||n.search)&&(e.q=n.q||n.search),n.fresh&&(e.fresh="1"),(await a.get(`${t(s)}/sessions/${encodeURIComponent(r)}`,{params:e})).data}function i(a){return s(a)}export{i,e as n,r,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,j as t,o as s,s as o,st as r}from"./vue-vendor-BqZbbXHA.js";import{n,r as a}from"./client-UDwXBP9i.js";import{Et as i,O as l,X as c,a as p,ct as u,f}from"./icons-DmFe4b5j.js";import{r as m}from"./platforms-BmzzwnSw.js";async function d(){return(await n.get("/ui-config")).data}async function y(e){return(await n.post("/ui-config",{config:e})).data}async function g(e,t){return(await n.put(`/ui-config/${e}`,{value:t})).data}async function b(e,t,s){return(await n.put(`/ui-config/${e}/${t}`,{value:s})).data}var h=Object.freeze({claude:i,code:u,codex:u,gemini:f,opencode:c,omp:l,terminal:p});function k(e){return h[String(e||"").trim().toLowerCase()]||p}var C=["claude","codex","opencode","omp"],j=[{key:"claude",label:"Claude Code",capabilities:{channels:!0,projects:!0,sessions:!0,proxy:!0,statistics:!0,resourceSync:!0,skills:!0,commands:!0,agents:!0,nativeConfig:!0}},{key:"codex",label:"Codex",capabilities:{channels:!0,projects:!0,sessions:!0,proxy:!0,statistics:!0,resourceSync:!0,skills:!0,commands:!0,agents:!0,nativeConfig:!0}},{key:"gemini",label:"Gemini",capabilities:{channels:!0,projects:!0,sessions:!0,proxy:!0,statistics:!0,resourceSync:!0,skills:!0,commands:!0,agents:!0,nativeConfig:!0}},{key:"opencode",label:"OpenCode",capabilities:{channels:!0,projects:!0,sessions:!0,proxy:!0,statistics:!0,resourceSync:!0,skills:!0,commands:!0,agents:!0,nativeConfig:!0}},{key:"omp",label:"OMP",capabilities:{channels:!0,projects:!0,sessions:!0,proxy:!0,statistics:!0,resourceSync:!0,skills:!0,commands:!0,plugins:!0,agents:!1,nativeConfig:!0}},{key:"dsh",label:"DSH",title:"DeepSeek Harness",command:"dsh",iconToken:"terminal",color:"#2563eb",defaultVisible:!0,capabilities:{channels:!0,projects:!0,sessions:!0,proxy:!0,statistics:!0,nativeLogs:!0,nativeConfig:!0,api:!0,mcp:!0,prompts:!0},resourceTypes:{skills:!0,commands:!1,agents:!1,plugins:!0,mcp:!0,prompts:!0},resourceActions:{skills:{create:!1,repositories:!0,import:!1,refresh:!0},plugins:{repositories:!0,market:!1,install:!1,uninstall:!1,import:!1,syncRepos:!1}}}];function v(e={}){if(!e||"object"!=typeof e||Array.isArray(e))return null;const t=String(e?.key||"").trim().toLowerCase(),s=function(e={}){return e?.capabilities&&"object"==typeof e.capabilities&&!Array.isArray(e.capabilities)?{...e.capabilities}:Object.fromEntries(Object.entries({proxy:"supportsProxy",projects:"supportsProjects",sessions:"supportsSessions",skills:"supportsSkills",commands:"supportsCommands",plugins:"supportsPlugins",agents:"supportsAgents"}).map(([t,s])=>[t,!1!==e?.[s]]))}(e),o=String(e?.iconToken||e?.icon||"terminal").trim();return{key:t,label:String(e?.label||e?.name||e?.title||t).trim(),title:String(e?.title||e?.label||e?.name||t).trim(),command:String(e?.command||t).trim(),iconToken:o,icon:k(o),color:String(e?.color||"#64748b").trim(),defaultVisible:!1!==e?.defaultVisible,defaultEnabled:void 0===e?.defaultEnabled?void 0:!1!==e.defaultEnabled,sortOrder:Number.isFinite(e?.sortOrder)?e.sortOrder:0,portKey:"string"==typeof e?.portKey?e.portKey:"",defaultPort:Number.isFinite(e?.defaultPort)?e.defaultPort:null,portLabel:"string"==typeof e?.portLabel?e.portLabel:"",apiPrefix:"string"==typeof e?.apiPrefix?e.apiPrefix:"",modelCatalogKey:"string"==typeof e?.modelCatalogKey?e.modelCatalogKey:t,enabled:!1!==e?.enabled,custom:!0===e?.custom,capabilities:s,resourceTypes:(n=e.resourceTypes,!n||"object"!=typeof n||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).filter(([,e])=>"boolean"==typeof e))),resourceActions:(r=e.resourceActions,!r||"object"!=typeof r||Array.isArray(r)?{}:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,t&&"object"==typeof t&&!Array.isArray(t)?Object.fromEntries(Object.entries(t).filter(([,e])=>"boolean"==typeof e)):{}]))),promptLabel:"string"==typeof e?.promptLabel?e.promptLabel.trim():"",supportsProxy:!0===s.proxy,supportsProjects:!0===s.projects,supportsSessions:!0===s.sessions,supportsSkills:!0===s.skills,supportsCommands:!0===s.commands,supportsPlugins:!0===s.plugins,supportsAgents:!0===s.agents};var r,n}function P(e=[]){const t=new Set;return Array.isArray(e)?e.map(v).filter(e=>!(!e||!e.key||t.has(e.key))&&(t.add(e.key),!0)):[]}function S(e,t=[]){const s=String(e||"").trim().toLowerCase();return P(t).find(e=>e.key===s)||v({key:s,capabilities:{}})}var w=r({theme:"light",panelVisibility:{showChannels:!0,showLogs:!0},channelBalance:{showRemaining:!1},channelLocks:{claude:!1,codex:!1,gemini:!1,opencode:!1,omp:!1},channelCollapse:{claude:[],codex:[],gemini:[],opencode:[],omp:[]},channelOrder:{claude:[],codex:[],gemini:[],opencode:[],omp:[]},enabledCliPlatforms:[...C]}),x=!1,O=!1,A=null;async function L({force:e=!1}={}){return e||!x&&!O?A||(A=(async()=>{try{const e=await d();e.success&&e.config&&(w.value=e.config,x=!0),O=!0}catch(e){O=!0}finally{A=null}return w.value})()):w.value}function E(){return x||L(),{uiConfig:w,loadUIConfig:L,saveConfig:async function(e){try{const t=await y(e);return!!t.success&&(w.value=t.config,!0)}catch(t){return!1}},updateConfig:async function(e,t){try{const s=await g(e,t);return!!s.success&&(w.value=s.config,!0)}catch(s){return!1}},updateNestedConfig:async function(e,t,s){try{const o=await b(e,t,s);return!!o.success&&(w.value=o.config,!0)}catch(o){return!1}}}}function T(e){if(Array.isArray(e))return P(e);const t=P(e);if(t.length>0)return t;const s=new Map(P(j).map(e=>[e.key,e]));return C.map(e=>s.get(e)).filter(Boolean)}function K(e){return String(e??"").trim().toLowerCase()}function $({catalog:e,enabledCliPlatforms:t}={}){const s=T(e),o=new Set(s.map(e=>e.key)),r=s.some(e=>void 0!==e.defaultEnabled),n=Array.isArray(t)?t:r?s.filter(e=>!1!==e.defaultEnabled).sort((e,t)=>(e.sortOrder||0)-(t.sortOrder||0)).map(e=>e.key):C,a=new Set,i=[];for(const l of n){const e=K(l);e&&!a.has(e)&&o.has(e)&&(a.add(e),i.push(e))}return i}function V(e){return T(e).map(e=>{const t=K(e.iconToken),s=Object.prototype.hasOwnProperty.call(h,t)?t:"terminal";return{key:e.key,label:e.label||e.title||e.key,title:e.title||e.label||e.key,iconToken:s,icon:k(s),color:e.color||"#64748b",capabilities:e.capabilities}})}function B(e){return K(e?.params?.platform||e?.meta?.channel)}var M=new Set(C),N=j.filter(e=>M.has(e.key));a(N);var D=s("platforms",{state:()=>({platforms:P(N),loaded:!1,loading:!1,error:null,loadPromise:null}),getters:{all:e=>e.platforms,enabled:e=>{const{uiConfig:t}=E(),s=$({catalog:e.platforms,enabledCliPlatforms:t.value.enabledCliPlatforms}),o=new Map(e.platforms.map(e=>[e.key,e]));return s.map(e=>o.get(e)).filter(Boolean)}},actions:{fetchPlatforms:async()=>m(),async load({force:e=!1}={}){return!e&&this.loaded?this.platforms:(this.loadPromise||(this.loading=!0,this.error=null,this.loadPromise=this.fetchPlatforms().then(e=>{const t=P(e);return t.length>0&&(this.platforms=t),a(this.platforms),this.loaded=!0,this.platforms}).catch(e=>(this.error=e,this.loaded=!0,this.platforms)).finally(()=>{this.loading=!1,this.loadPromise=null})),this.loadPromise)},get(e){const t=String(e||"").trim().toLowerCase();return this.platforms.find(e=>e.key===t)||null},hasCapability(e,t){const s=this.get(e);return!0===s?.capabilities?.[t]||!0===s?.resourceTypes?.[t]}}}),F=null;function H(s){const r=s||function(){const e=t();if(!e)return o();const s=e.appContext?.provides||{};for(const t of Object.getOwnPropertySymbols(s)){const e=s[t];if(e&&e._s&&"function"==typeof e.install)return e}return null}()||(F||=e());return D(r)}H.$id=D.$id;export{E as a,d as c,g as d,$ as i,y as l,V as n,C as o,B as r,S as s,H as t,b as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=new Set(["unknown","unknow","n/a","na","none","null","undefined","未知","未知项目"]);function t(n){return"string"==typeof n?n.trim():""}function e(e){const r=t(e);return!r||n.has(r.toLowerCase())}function r(n){return!(!n||"object"!=typeof n)&&[n.name,n.displayName,n.fullPath,n.path].some(n=>!e(n))}function o(n){return Array.isArray(n)?n.filter(r):[]}function u(n,r=null){return Array.isArray(n)?n.filter(n=>function(n,r=null){if(!n||"object"!=typeof n)return!1;if(e(n.sessionId))return!1;const o=[n.projectName,n.projectDisplayName,n.projectFullPath,n.projectPath],u=o.some(n=>t(n)),a=o.some(n=>!e(n));return u?a:!e(r)}(n,r)):[]}export{u as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e,o as a,st as l}from"./vue-vendor-BqZbbXHA.js";import{a as t,n}from"./client-UDwXBP9i.js";import{i as s,t as r}from"./platforms-BmzzwnSw.js";import{a as u,d as o,i,m as v,n as c,r as f,u as m}from"./sessions-D4yQtfKb.js";import{n as h,t as p}from"./session-visibility-BAmxh3cK.js";async function g(e="claude",a={}){if(!s(e))return r(e,a);const l=t(e),u={};return null!=a.page&&(u.page=a.page),null!=a.limit&&(u.limit=a.limit),(a.q||a.search)&&(u.q=a.q||a.search),a.fresh&&(u.fresh="1"),(await n.get(`${l}/projects`,{params:u})).data}var d=new Map,y=new Map,j=new Map,w=new Map,$=[1500,3500,7e3,12e3],M=[2500,5e3,1e4,15e3],S=new Map,A=new Map,I=20;function P(e,a){return`${e}:${a}`}function k({page:e=1,limit:a=20,query:l=""}={}){return`:page=${e}:limit=${a}:query=${l||""}`}function B(e,a={}){const l=`${e}${k(a)}`,t=d.get(l);return t?Date.now()-t.timestamp>2e4?(d.delete(l),null):t.payload:null}function q(e,a,l={}){d.set(`${e}${k(l)}`,{timestamp:Date.now(),payload:a})}function b(e,a,l={}){const t=`${P(e,a)}${k(l)}`,n=y.get(t);return n?Date.now()-n.timestamp>2e4?(y.delete(t),null):n.payload:null}function E(e,a,l,t={}){y.set(`${P(e,a)}${k(t)}`,{timestamp:Date.now(),payload:l})}function z(e,a){a?Array.from(y.keys()).filter(l=>l.startsWith(`${P(e,a)}:`)).forEach(e=>y.delete(e)):Array.from(y.keys()).filter(a=>a.startsWith(`${e}:`)).forEach(e=>y.delete(e))}function W(e,a){const l=e.get(a);l&&(clearTimeout(l),e.delete(a))}function D(e,a,l){W(e,l),a.delete(l)}function O(e,a,l,t,n,s,r){W(e,l);const u=a.get(l)||Date.now();a.set(l,u);const o=185e3-(Date.now()-u);if(o<=0)return a.delete(l),void r?.();const i=Math.min(t[Math.min(n,t.length-1)],o),v=setTimeout(()=>{e.delete(l),s()},i);e.set(l,v)}var R=a("sessions",()=>{const a=l([]),s=l(null),r=l(null),y=l(null),W=l(null),R=l({page:1,limit:I,total:0,hasMore:!1}),C=l({page:1,limit:I,total:0,hasMore:!1}),F=l([]),T=l({}),U=l(0),x=l(!1),G=l(null),H=l("claude"),J=new Map,K=new Map;let L=0;const N=e(()=>F.value.map(e=>({...e,alias:T.value[e.sessionId]||null}))),Q=e(()=>Boolean(y.value?.refreshing)),V=e(()=>Boolean(W.value?.refreshing)),X=e(()=>Boolean(y.value?.fallback||y.value?.stale)),Y=e(()=>Boolean(W.value?.fallback||W.value?.stale)),Z=e(()=>Boolean(y.value?.refreshing&&0===a.value.length)),_=e(()=>Boolean(W.value?.refreshing&&0===F.value.length));function ee(){s.value&&E(H.value,s.value,{sessions:F.value,aliases:T.value,totalSize:U.value,projectInfo:r.value,meta:W.value,pagination:C.value},C.value)}function ae(e){D(j,S,e)}function le(e){if(!e)return;const a=`${e}:`;Array.from(J.keys()).filter(e=>e.startsWith(a)).forEach(e=>J.delete(e)),Array.from(K.keys()).filter(e=>e.startsWith(a)).forEach(e=>K.delete(e))}function te(e=H.value){ae(e),le(e)}function ne(e,a){D(w,A,P(e,a))}async function se({page:e=1,limit:l=20,query:t="",force:n=!1,silent:r=!1,pollAttempt:u=0,fresh:o=!1}={}){r||(x.value=!0),G.value=null;try{const i=H.value,v={page:e,limit:l,query:t},c=!n&&!o,f=`${i}${k(v)}`;if(!n&&!o){const t=B(i,v);if(t&&!t.meta?.refreshing)return K.set(f,++L),J.delete(f),a.value=p(t.projects),s.value=a.value.some(e=>e.name===t.currentProject)?t.currentProject:a.value[0]?.name||null,y.value=t.meta||null,R.value=t.pagination||{page:e,limit:l,total:a.value.length,hasMore:!1},void(r||(x.value=!1))}let m,h=J.get(f),d=h?K.get(f):null;if(!c||!h||!d){d=++L,K.set(f,d);const a={fresh:n||o};1!==e&&(a.page=e),l!==I&&(a.limit=l),t&&(a.q=t),h=g(i,a),J.set(f,h)}try{m=await h}finally{J.get(f)===h&&J.delete(f)}if(H.value!==i||K.get(f)!==d)return;const w=p(m.projects),M=0===w.length&&a.value.length>0&&1===e&&!t&&(!0===m.meta?.refreshing||!0===m.meta?.stale||!0===m.meta?.fallback||Boolean(m.meta?.error)),A=w.length>0||0===a.value.length||!M;y.value=m.meta||null,m.meta?.error&&(G.value=m.meta.error),A&&(R.value=m.pagination||{page:e,limit:l,total:w.length,hasMore:!1},a.value=w,s.value=w.some(e=>e.name===m.currentProject)?m.currentProject:w[0]?.name||null,!0!==m.meta?.fallback&&(z(i),q(i,{projects:w,currentProject:s.value,meta:m.meta||null,pagination:R.value},v))),m.meta?.refreshing?function(e,a=0){O(j,S,e,$,a,()=>{H.value===e&&se({force:!0,silent:!0,pollAttempt:a+1}).catch(()=>{})},()=>{H.value===e&&(y.value={...y.value||{},refreshing:!1,stale:!0,error:y.value?.error||"项目列表生成超时,请重试"},G.value=y.value.error)})}(i,u):ae(i)}catch(i){G.value=i.message}finally{r||(x.value=!1)}}async function re(e,{page:a=1,limit:l=20,query:t="",force:n=!1,silent:u=!1,pollAttempt:o=0,fresh:i=!1}={}){u||(x.value=!0),G.value=null;try{const v=H.value,c={page:a,limit:l,query:t};if(s.value===e||b(v,e,c)||(F.value=[],T.value={},U.value=0,r.value=null,W.value=null),!n){const t=b(v,e,c);if(t)return F.value=h(t.sessions,e),T.value=t.aliases||{},U.value=t.totalSize||0,s.value=e,r.value=t.projectInfo||null,W.value=t.meta||null,C.value=t.pagination||{page:a,limit:l,total:F.value.length,hasMore:!1},void(u||(x.value=!1))}s.value=e;const f={fresh:i};1!==a&&(f.page=a),l!==I&&(f.limit=l),t&&(f.q=t);const p=await m(e,v,f);if(H.value!==v||s.value!==e)return;const g=h(p.sessions,e),d=g.length>0||0===F.value.length||!0!==p.meta?.refreshing;W.value=p.meta||null,C.value=p.pagination||{page:a,limit:l,total:g.length,hasMore:!1},p.meta?.error&&(G.value=p.meta.error),s.value=e,d&&(F.value=g,T.value=p.aliases||{},U.value=p.totalSize||0,r.value=p.projectInfo||null,!0!==p.meta?.fallback&&E(v,e,{sessions:g,aliases:p.aliases||{},totalSize:p.totalSize||0,projectInfo:p.projectInfo||null,meta:p.meta||null,pagination:C.value},c)),p.meta?.refreshing?function(e,a,l=0){const t=P(e,a);O(w,A,t,M,l,()=>{H.value===e&&s.value===a&&re(a,{force:!0,silent:!0,pollAttempt:l+1}).catch(()=>{})},()=>{H.value===e&&s.value===a&&(W.value={...W.value||{},refreshing:!1,stale:!0,error:W.value?.error||"会话列表生成超时,请重试"},G.value=W.value.error)})}(v,e,o):ne(v,e)}catch(v){G.value=v.message}finally{u||(x.value=!1)}}return{projects:a,currentProject:s,currentProjectInfo:r,projectsMeta:y,sessionsMeta:W,projectsPagination:R,sessionsPagination:C,sessions:F,aliases:T,totalSize:U,loading:x,error:G,currentChannel:H,sessionsWithAlias:N,projectsRefreshing:Q,sessionsRefreshing:V,projectsUsingFallback:X,sessionsUsingFallback:Y,projectsPending:Z,sessionsPending:_,setChannel:function(e){if(!e||H.value===e)return;const l=H.value;te(l),Array.from(w.keys()).filter(e=>e.startsWith(`${l}:`)).forEach(e=>D(w,A,e)),le(e),H.value=e,a.value=[],s.value=null,y.value=null,R.value={page:1,limit:I,total:0,hasMore:!1},F.value=[],T.value={},U.value=0,r.value=null,W.value=null,C.value={page:1,limit:I,total:0,hasMore:!1},G.value=null;const t=B(e);t&&(a.value=p(t.projects),s.value=a.value.some(e=>e.name===t.currentProject)?t.currentProject:a.value[0]?.name||null,y.value=t.meta||null,R.value=t.pagination||R.value)},fetchProjects:se,fetchSessions:re,retryProjects:async function(){return ae(H.value),se({force:!0,fresh:Boolean(y.value?.error)})},retrySessions:async function(e=s.value){if(e)return ne(H.value,e),re(e,{page:C.value.page,limit:C.value.limit,force:!0,fresh:Boolean(W.value?.error)})},pauseProjectRefresh:te,setAlias:async function(e,a){try{await v(e,a),T.value[e]=a}catch(l){throw G.value=l.message,l}},deleteAlias:async function(e){try{await c(e),delete T.value[e]}catch(a){throw G.value=a.message,a}},deleteSession:async function(e){try{await f(s.value,e,H.value),F.value=F.value.filter(a=>a.sessionId!==e),T.value[e]&&delete T.value[e],ee()}catch(a){throw G.value=a.message,a}},deleteSessions:async function(e=[]){const a=Array.from(new Set((e||[]).filter(Boolean)));if(0===a.length)return{deletedSessionIds:[],failed:[]};let l=[],t=[];try{const e=await i(s.value,a,H.value);l=Array.isArray(e?.deletedSessionIds)?e.deletedSessionIds:[],t=Array.isArray(e?.failed)?e.failed.map(e=>({sessionId:e.sessionId,error:new Error(e.error||"删除失败")})):[]}catch(n){throw G.value=n.message,n}if(l.length>0){const e=new Set(l);F.value=F.value.filter(a=>!e.has(a.sessionId)),Object.keys(T.value).forEach(a=>{e.has(a)&&delete T.value[a]}),ee()}return t.length>0&&0===l.length&&(G.value=t[0].error.message),{deletedSessionIds:l,failed:t}},forkSession:async function(e,a={}){try{const l=await u(s.value,e,H.value,a);return await re(s.value,{page:C.value.page,limit:C.value.limit,force:!0,fresh:!0}),l.newSessionId}catch(l){throw G.value=l.message,l}},saveProjectOrder:async function(e){try{await async function(e,a="claude"){const l=t(a);return(await n.post(`${l}/projects/order`,{order:e})).data}(e,H.value);const l=e.map(e=>a.value.find(a=>a.name===e)).filter(Boolean),r=a.value.filter(a=>!e.includes(a.name));a.value=[...l,...r],q(H.value,{projects:a.value,currentProject:s.value,meta:y.value,pagination:R.value},R.value)}catch(l){throw G.value=l.message,l}},saveSessionOrder:async function(e){try{await o(s.value,e,H.value);const a=e.map(e=>F.value.find(a=>a.sessionId===e)).filter(Boolean),l=F.value.filter(a=>!e.includes(a.sessionId));F.value=[...a,...l],E(H.value,s.value,{sessions:F.value,aliases:T.value,totalSize:U.value,projectInfo:r.value,meta:W.value,pagination:C.value},C.value)}catch(a){throw G.value=a.message,a}},deleteProject:async function(e){try{await async function(e,a="claude"){const l=t(a);return(await n.delete(`${l}/projects/${e}`)).data}(e,H.value),a.value=a.value.filter(a=>a.name!==e),s.value===e&&(s.value=null),l=H.value,Array.from(d.keys()).filter(e=>e.startsWith(`${l}:`)).forEach(e=>d.delete(e)),z(H.value,e)}catch(r){throw G.value=r.message,r}var l}}});export{g as n,R as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,n as t}from"./client-UDwXBP9i.js";import{i as s,n}from"./platforms-BmzzwnSw.js";import{t as e}from"./clipboard-B46yyoz_.js";async function i(e,i="claude",o={}){if(!s(i))return n(i,e,o);const c=a(i),r={};return null!=o.page&&(r.page=o.page),null!=o.limit&&(r.limit=o.limit),(o.q||o.search)&&(r.q=o.q||o.search),o.fresh&&(r.fresh="1"),(await t.get(`${c}/sessions/${e}`,{params:r})).data}async function o(a,s){return(await t.post("/aliases",{sessionId:a,alias:s})).data}async function c(a){return(await t.delete(`/aliases/${a}`)).data}async function r(s,n,e="claude"){const i=a(e);return(await t.delete(`${i}/sessions/${s}/${n}`)).data}async function u(s,n,e="claude"){const i=a(e);return(await t.post(`${i}/sessions/${s}/batch-delete`,{sessionIds:n})).data}async function d(s,n,e="claude",i={}){const o=a(e);return(await t.post(`${o}/sessions/${s}/${n}/fork`,i)).data}async function l(s,n,e="claude"){const i=a(e);return(await t.post(`${i}/sessions/${s}/order`,{order:n})).data}async function m(s,n,e=15,i="claude",o={}){const c=a(i),r={keyword:n,context:e};return null!=o.limit&&(r.limit=o.limit),(await t.get(`${c}/sessions/${encodeURIComponent(s)}/search`,{params:r})).data}async function f(s,n=35,e="claude",i={}){const o=a(e),c={keyword:s,context:n};return null!=i.limit&&(c.limit=i.limit),i.projectName&&(c.projectName=i.projectName),(await t.get(`${o}/sessions/search/global`,{params:c})).data}function p(a){if(!a||"object"!=typeof a)return"";if("string"==typeof a.copyCommand&&a.copyCommand.trim())return a.copyCommand;const t="string"==typeof a.command?a.command.trim():"";if(!t)return"";const s="string"==typeof a.cwd?a.cwd.trim():"";return s?`cd ${n=s,`"${String(n).replace(/"/g,'\\"')}"`} && ${t}`:t;var n}async function $(s,n,i="claude"){const o=await async function(s,n,e="claude"){const i=a(e);return(await t.post(`${i}/sessions/${s}/${n}/launch`)).data}(s,n,i),c=p(o);if(!c)throw new Error("未获取到可复制的启动命令");return{text:c,data:o,copyResult:await e(c)}}async function y(s,n,e=1,i=20,o="desc",c="claude"){const r=a(c);return(await t.get(`${r}/sessions/${s}/${n}/messages`,{params:{page:e,limit:i,order:o}})).data}async function w(s,n,e="claude"){const i=a(e);return(await t.get(`${i}/sessions/${s}/${n}/outline`)).data}async function g(s,n,e="claude"){const i=a(e);return(await t.get(`${i}/sessions/${s}/${n}/status`)).data}async function h(s=5,n="claude"){const e=a(n);return(await t.get(`${e}/sessions/recent/list?limit=${s}`)).data}export{d as a,w as c,l as d,m as f,u as i,g as l,o as m,c as n,h as o,f as p,r,y as s,$ as t,i as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,$t as t,B as o,Bt as r,C as n,Ct as a,Dt as l,F as i,G as s,H as d,I as u,It as c,J as p,K as f,Lt as h,M as v,N as g,Nt as b,Ot as m,Q as w,Qt as y,Rt as x,Tt as $,U as S,Ut as C,V as M,Vt as z,W as O,Wt as j,X as T,Xt as E,Y as B,Yt as A,Z as _,Zt as P,_ as W,_n as H,an as R,at as F,b as k,bn as D,bt as I,ct as L,dt as N,et as X,gn as Y,gt as V,hn as U,ht as q,it as K,jt as Q,lt as Z,nn as G,nt as J,ot as ee,pn as te,q as oe,qt as re,rt as ne,st as ae,tn as le,tt as ie,ut as se,vn as de,wn as ue,x as ce,yn as pe,z as fe,zt as he}from"./_plugin-vue_export-helper-BeLZJZij.js";import{A as ve,D as ge,F as be,G as me,I as we,M as ye,N as xe,Q as $e,V as Se,Z as Ce,b as Me,dt as ze,f as Oe,g as je,h as Te,j as Ee,l as Be,st as Ae,tt as _e,v as Pe,y as We,z as He}from"./vue-vendor-BqZbbXHA.js";var Re=[],Fe=new WeakMap;function ke(){Re.forEach(e=>e(...Fe.get(e))),Re=[]}function De(e,...t){Fe.set(e,t),Re.includes(e)||1===Re.push(e)&&requestAnimationFrame(ke)}function Ie(){return null!==Ee()}var Le,Ne,Xe,Ye,Ve="undefined"!=typeof window;function Ue(e){if(Ne)return;let t=!1;Se(()=>{Ne||null==Le||Le.then(()=>{t||e()})}),He(()=>{t=!0})}Le=Ve?null===(Ye=null===(Xe=document)||void 0===Xe?void 0:Xe.fonts)||void 0===Ye?void 0:Ye.ready:void 0,Ne=!1,void 0!==Le?Le.then(()=>{Ne=!0}):Ne=!0;var qe=A("n-internal-select-menu"),Ke=A("n-internal-select-menu-body"),Qe="__disabled__";function Ze(e){const o=xe(j,null),r=xe(re,null),n=xe(C,null),a=xe(Ke,null),l=Ae();if("undefined"!=typeof document){l.value=document.fullscreenElement;const e=()=>{l.value=document.fullscreenElement};Se(()=>{G("fullscreenchange",document,e)}),He(()=>{le("fullscreenchange",document,e)})}return t(()=>{var t;const{to:i}=e;return void 0!==i?!1===i?Qe:!0===i?l.value||"body":i:(null==o?void 0:o.value)?null!==(t=o.value.$el)&&void 0!==t?t:o.value:(null==r?void 0:r.value)?r.value:(null==n?void 0:n.value)?n.value:(null==a?void 0:a.value)?a.value:null!=i?i:l.value||"body"})}Ze.tdkey=Qe,Ze.propTo={type:[String,Object,Boolean],default:void 0};var Ge=null;function Je(){if(null===Ge&&null===(Ge=document.getElementById("v-binder-view-measurer"))){(Ge=document.createElement("div")).id="v-binder-view-measurer";const{style:e}=Ge;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Ge)}return Ge.getBoundingClientRect()}function et(e){const t=e.getBoundingClientRect(),o=Je();return{left:t.left-o.left,top:t.top-o.top,bottom:o.height+o.top-t.bottom,right:o.width+o.left-t.right,width:t.width,height:t.height}}function tt(e){if(null===e)return null;const t=function(e){return 9===e.nodeType?null:e.parentNode}(e);if(null===t)return null;if(9===t.nodeType)return document;if(1===t.nodeType){const{overflow:e,overflowX:o,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+o))return t}return tt(t)}var ot=ve({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;me("VBinder",null===(t=Ee())||void 0===t?void 0:t.proxy);const o=xe("VBinder",null),r=Ae(null);let n=[];const a=()=>{for(const e of n)le("scroll",e,i,!0);n=[]},l=new Set,i=()=>{De(s)},s=()=>{l.forEach(e=>e())},d=new Set,u=()=>{d.forEach(e=>e())};return He(()=>{le("resize",window,u),a()}),{targetRef:r,setTargetRef:t=>{r.value=t,o&&e.syncTargetWithParent&&o.setTargetRef(t)},addScrollListener:e=>{0===l.size&&(()=>{let e=r.value;for(;e=tt(e),null!==e;)n.push(e);for(const t of n)G("scroll",t,i,!0)})(),l.has(e)||l.add(e)},removeScrollListener:e=>{l.has(e)&&l.delete(e),0===l.size&&a()},addResizeListener:e=>{0===d.size&&G("resize",window,u),d.has(e)||d.add(e)},removeResizeListener:e=>{d.has(e)&&d.delete(e),0===d.size&&le("resize",window,u)}}},render(){return z("binder",this.$slots)}}),rt=ve({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=xe("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?_e(r("follower",this.$slots),[[t]]):r("follower",this.$slots)}}),nt="@@mmoContext",at={mounted(e,{value:t}){e[nt]={handler:void 0},"function"==typeof t&&(e[nt].handler=t,G("mousemoveoutside",e,t))},updated(e,{value:t}){const o=e[nt];"function"==typeof t?o.handler?o.handler!==t&&(le("mousemoveoutside",e,o.handler),o.handler=t,G("mousemoveoutside",e,t)):(e[nt].handler=t,G("mousemoveoutside",e,t)):o.handler&&(le("mousemoveoutside",e,o.handler),o.handler=void 0)},unmounted(e){const{handler:t}=e[nt];t&&le("mousemoveoutside",e,t),e[nt].handler=void 0}},{c:lt}=ue(),it="vueuc-style",st={top:"bottom",bottom:"top",left:"right",right:"left"},dt={start:"end",center:"center",end:"start"},ut={top:"height",bottom:"height",left:"width",right:"width"},ct={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},pt={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},ft={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},ht={top:!0,bottom:!1,left:!0,right:!1},vt={top:"end",bottom:"start",left:"end",right:"start"};var gt,bt=lt([lt(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),lt(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[lt("> *",{pointerEvents:"all"})])]),mt=ve({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const o=xe("VBinder"),r=t(()=>void 0!==e.enabled?e.enabled:e.show),n=Ae(null),a=Ae(null),l=()=>{const{syncTrigger:t}=e;t.includes("scroll")&&o.addScrollListener(d),t.includes("resize")&&o.addResizeListener(d)},i=()=>{o.removeScrollListener(d),o.removeResizeListener(d)};Se(()=>{r.value&&(d(),l())});const s=h();bt.mount({id:"vueuc/binder",head:!0,anchorMetaName:it,ssr:s}),He(()=>{i()}),Ue(()=>{r.value&&d()});const d=()=>{if(!r.value)return;const t=n.value;if(null===t)return;const l=o.targetRef,{x:i,y:s,overlap:d}=e,u=void 0!==i&&void 0!==s?function(e,t){const o=Je();return{top:t,left:e,height:0,width:0,right:o.width-e,bottom:o.height-t}}(i,s):et(l);t.style.setProperty("--v-target-width",`${Math.round(u.width)}px`),t.style.setProperty("--v-target-height",`${Math.round(u.height)}px`);const{width:c,minWidth:p,placement:f,internalShift:h,flip:v}=e;t.setAttribute("v-placement",f),d?t.setAttribute("v-overlap",""):t.removeAttribute("v-overlap");const{style:g}=t;g.width="target"===c?`${u.width}px`:void 0!==c?c:"",g.minWidth="target"===p?`${u.width}px`:void 0!==p?p:"";const b=et(t),m=et(a.value),{left:w,top:y,placement:x}=function(e,t,o,r,n,a){if(!n||a)return{placement:e,top:0,left:0};const[l,i]=e.split("-");let s=null!=i?i:"center",d={top:0,left:0};const u=(e,n,a)=>{let l=0,i=0;const s=o[e]-t[n]-t[e];return s>0&&r&&(a?i=ht[n]?s:-s:l=ht[n]?s:-s),{left:l,top:i}},c="left"===l||"right"===l;if("center"!==s){const r=ft[e],n=st[r],a=ut[r];if(o[a]>t[a]){if(t[r]+t[a]<o[a]){const e=(o[a]-t[a])/2;t[r]<e||t[n]<e?t[r]<t[n]?(s=dt[i],d=u(a,n,c)):d=u(a,r,c):s="center"}}else o[a]<t[a]&&t[n]<0&&t[r]>t[n]&&(s=dt[i])}else{const e="bottom"===l||"top"===l?"left":"top",r=st[e],n=ut[e],a=(o[n]-t[n])/2;(t[e]<a||t[r]<a)&&(t[e]>t[r]?(s=vt[e],d=u(n,e,c)):(s=vt[r],d=u(n,r,c)))}let p=l;return t[l]<o[ut[l]]&&t[l]<t[st[l]]&&(p=st[l]),{placement:"center"!==s?`${p}-${s}`:p,left:d.left,top:d.top}}(f,u,b,h,v,d),$=function(e,t){return t?pt[e]:ct[e]}(x,d),{left:S,top:C,transform:M}=function(e,t,o,r,n,a){if(a)switch(e){case"bottom-start":case"left-end":return{top:`${Math.round(o.top-t.top+o.height)}px`,left:`${Math.round(o.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":case"right-end":return{top:`${Math.round(o.top-t.top+o.height)}px`,left:`${Math.round(o.left-t.left+o.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":case"left-start":return{top:`${Math.round(o.top-t.top)}px`,left:`${Math.round(o.left-t.left)}px`,transform:""};case"top-end":case"right-start":return{top:`${Math.round(o.top-t.top)}px`,left:`${Math.round(o.left-t.left+o.width)}px`,transform:"translateX(-100%)"};case"top":return{top:`${Math.round(o.top-t.top)}px`,left:`${Math.round(o.left-t.left+o.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(o.top-t.top+o.height/2)}px`,left:`${Math.round(o.left-t.left+o.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(o.top-t.top+o.height/2)}px`,left:`${Math.round(o.left-t.left)}px`,transform:"translateY(-50%)"};default:return{top:`${Math.round(o.top-t.top+o.height)}px`,left:`${Math.round(o.left-t.left+o.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(o.top-t.top+o.height+r)}px`,left:`${Math.round(o.left-t.left+n)}px`,transform:""};case"bottom-end":return{top:`${Math.round(o.top-t.top+o.height+r)}px`,left:`${Math.round(o.left-t.left+o.width+n)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(o.top-t.top+r)}px`,left:`${Math.round(o.left-t.left+n)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(o.top-t.top+r)}px`,left:`${Math.round(o.left-t.left+o.width+n)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(o.top-t.top+r)}px`,left:`${Math.round(o.left-t.left+o.width+n)}px`,transform:""};case"right-end":return{top:`${Math.round(o.top-t.top+o.height+r)}px`,left:`${Math.round(o.left-t.left+o.width+n)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(o.top-t.top+r)}px`,left:`${Math.round(o.left-t.left+n)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(o.top-t.top+o.height+r)}px`,left:`${Math.round(o.left-t.left+n)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(o.top-t.top+r)}px`,left:`${Math.round(o.left-t.left+o.width/2+n)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(o.top-t.top+o.height/2+r)}px`,left:`${Math.round(o.left-t.left+o.width+n)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(o.top-t.top+o.height/2+r)}px`,left:`${Math.round(o.left-t.left+n)}px`,transform:"translateY(-50%) translateX(-100%)"};default:return{top:`${Math.round(o.top-t.top+o.height+r)}px`,left:`${Math.round(o.left-t.left+o.width/2+n)}px`,transform:"translateX(-50%)"}}}(x,m,u,y,w,d);t.setAttribute("v-placement",x),t.style.setProperty("--v-offset-left",`${Math.round(w)}px`),t.style.setProperty("--v-offset-top",`${Math.round(y)}px`),t.style.transform=`translateX(${S}) translateY(${C}) ${M}`,t.style.setProperty("--v-transform-origin",$),t.style.transformOrigin=$};Ce(r,e=>{e?(l(),u()):i()});const u=()=>{we().then(d).catch(e=>{})};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(t=>{Ce(ze(e,t),d)}),["teleportDisabled"].forEach(t=>{Ce(ze(e,t),u)}),Ce(ze(e,"syncTrigger"),e=>{e.includes("resize")?o.addResizeListener(d):o.removeResizeListener(d),e.includes("scroll")?o.addScrollListener(d):o.removeScrollListener(d)});const c=P();return{VBinder:o,mergedEnabled:r,offsetContainerRef:a,followerRef:n,mergedTo:t(()=>{const{to:t}=e;if(void 0!==t)return t;c.value}),syncPosition:d}},render(){return ye(c,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const o=ye("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[ye("div",{class:"v-binder-follower-content",ref:"followerRef"},null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))]);return this.zindexable?_e(o,[[x,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):o}})}});function wt(e,t=!0,o=[]){return e.forEach(e=>{if(null!==e)if("object"==typeof e)if(Array.isArray(e))wt(e,t,o);else if(e.type===je){if(null===e.children)return;Array.isArray(e.children)&&wt(e.children,t,o)}else{if(e.type===Te&&t)return;o.push(e)}else"string"!=typeof e&&"number"!=typeof e||o.push(ge(String(e)))}),o}function yt(e,t,o){if(!t)return null;const r=wt(t(o));return 1===r.length?r[0]:(m("getFirstSlotVNode",`slot[${e}] should have exactly one child`),null)}function xt(e,t=[],o){const r={};return t.forEach(t=>{r[t]=e[t]}),Object.assign(r,o)}function $t(e,...t){return"function"==typeof e?e(...t):"string"==typeof e?ge(e):"number"==typeof e?ge(String(e)):null}var St=ie(N,"WeakMap"),Ct=s(Object.keys,Object),Mt=Object.prototype.hasOwnProperty;function zt(e){return _(e)?f(e):function(e){if(!T(e))return Ct(e);var t=[];for(var o in Object(e))Mt.call(e,o)&&"constructor"!=o&&t.push(o);return t}(e)}var Ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jt=/^\w*$/;function Tt(e,t){if(F(e))return!1;var o=typeof e;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=e&&!ae(e))||(jt.test(e)||!Ot.test(e)||null!=t&&e in Object(t))}function Et(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var o=function(){var r=arguments,n=t?t.apply(this,r):r[0],a=o.cache;if(a.has(n))return a.get(n);var l=e.apply(this,r);return o.cache=a.set(n,l)||a,l};return o.cache=new(Et.Cache||S),o}Et.Cache=S;var Bt,At,_t,Pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wt=/\\(\\)?/g,Ht=(Bt=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Pt,function(e,o,r,n){t.push(r?n.replace(Wt,"$1"):o||e)}),t},At=Et(Bt,function(e){return 500===_t.size&&_t.clear(),e}),_t=At.cache,At);function Rt(e,t){return F(e)?e:Tt(e,t)?[e]:Ht(d(e))}function Ft(e){if("string"==typeof e||ae(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function kt(e,t){for(var o=0,r=(t=Rt(t,e)).length;null!=e&&o<r;)e=e[Ft(t[o++])];return o&&o==r?e:void 0}function Dt(e,t,o){var r=null==e?void 0:kt(e,t);return void 0===r?o:r}var It=Object.prototype.propertyIsEnumerable,Lt=Object.getOwnPropertySymbols,Nt=Lt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var o=-1,r=null==e?0:e.length,n=0,a=[];++o<r;){var l=e[o];t(l,o,e)&&(a[n++]=l)}return a}(Lt(e),function(t){return It.call(e,t)}))}:function(){return[]};function Xt(e){return function(e,t,o){var r=t(e);return F(e)?r:function(e,t){for(var o=-1,r=t.length,n=e.length;++o<r;)e[n+o]=t[o];return e}(r,o(e))}(e,zt,Nt)}var Yt=ie(N,"DataView"),Vt=ie(N,"Promise"),Ut=ie(N,"Set"),qt="[object Map]",Kt="[object Promise]",Qt="[object Set]",Zt="[object WeakMap]",Gt="[object DataView]",Jt=J(Yt),eo=J(O),to=J(Vt),oo=J(Ut),ro=J(St),no=Z;(Yt&&no(new Yt(new ArrayBuffer(1)))!=Gt||O&&no(new O)!=qt||Vt&&no(Vt.resolve())!=Kt||Ut&&no(new Ut)!=Qt||St&&no(new St)!=Zt)&&(no=function(e){var t=Z(e),o="[object Object]"==t?e.constructor:void 0,r=o?J(o):"";if(r)switch(r){case Jt:return Gt;case eo:return qt;case to:return Kt;case oo:return Qt;case ro:return Zt}return t});var ao=no;function lo(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new S;++t<o;)this.add(e[t])}function io(e,t){for(var o=-1,r=null==e?0:e.length;++o<r;)if(t(e[o],o,e))return!0;return!1}function so(e,t){return e.has(t)}lo.prototype.add=lo.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},lo.prototype.has=function(e){return this.__data__.has(e)};function uo(e,t,o,r,n,a){var l=1&o,i=e.length,s=t.length;if(i!=s&&!(l&&s>i))return!1;var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var c=-1,p=!0,f=2&o?new lo:void 0;for(a.set(e,t),a.set(t,e);++c<i;){var h=e[c],v=t[c];if(r)var g=l?r(v,h,c,t,e,a):r(h,v,c,e,t,a);if(void 0!==g){if(g)continue;p=!1;break}if(f){if(!io(t,function(e,t){if(!so(f,t)&&(h===e||n(h,e,o,r,a)))return f.push(t)})){p=!1;break}}else if(h!==v&&!n(h,v,o,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function co(e){var t=-1,o=Array(e.size);return e.forEach(function(e,r){o[++t]=[r,e]}),o}function po(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=e}),o}var fo=se?se.prototype:void 0,ho=fo?fo.valueOf:void 0;var vo=Object.prototype.hasOwnProperty;var go="[object Arguments]",bo="[object Array]",mo="[object Object]",wo=Object.prototype.hasOwnProperty;function yo(t,r,n,a,l,i){var s=F(t),d=F(r),u=s?bo:ao(t),c=d?bo:ao(r),f=(u=u==go?mo:u)==mo,h=(c=c==go?mo:c)==mo,v=u==c;if(v&&p(t)){if(!p(r))return!1;s=!0,f=!1}if(v&&!f)return i||(i=new M),s||oe(t)?uo(t,r,n,a,l,i):function(t,r,n,a,l,i,s){switch(n){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!i(new o(t),new o(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return e(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var d=co;case"[object Set]":var u=1&a;if(d||(d=po),t.size!=r.size&&!u)return!1;var c=s.get(t);if(c)return c==r;a|=2,s.set(t,r);var p=uo(d(t),d(r),a,l,i,s);return s.delete(t),p;case"[object Symbol]":if(ho)return ho.call(t)==ho.call(r)}return!1}(t,r,u,n,a,l,i);if(!(1&n)){var g=f&&wo.call(t,"__wrapped__"),b=h&&wo.call(r,"__wrapped__");if(g||b){var m=g?t.value():t,w=b?r.value():r;return i||(i=new M),l(m,w,n,a,i)}}return!!v&&(i||(i=new M),function(e,t,o,r,n,a){var l=1&o,i=Xt(e),s=i.length;if(s!=Xt(t).length&&!l)return!1;for(var d=s;d--;){var u=i[d];if(!(l?u in t:vo.call(t,u)))return!1}var c=a.get(e),p=a.get(t);if(c&&p)return c==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var h=l;++d<s;){var v=e[u=i[d]],g=t[u];if(r)var b=l?r(g,v,u,t,e,a):r(v,g,u,e,t,a);if(!(void 0===b?v===g||n(v,g,o,r,a):b)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var m=e.constructor,w=t.constructor;m==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof w&&w instanceof w||(f=!1)}return a.delete(e),a.delete(t),f}(t,r,n,a,l,i))}function xo(e,t,o,r,n){return e===t||(null==e||null==t||!L(e)&&!L(t)?e!=e&&t!=t:yo(e,t,o,r,xo,n))}function $o(e){return e==e&&!K(e)}function So(e,t){return function(o){return null!=o&&(o[e]===t&&(void 0!==t||e in Object(o)))}}function Co(e){var t=function(e){for(var t=zt(e),o=t.length;o--;){var r=t[o],n=e[r];t[o]=[r,n,$o(n)]}return t}(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(o){return o===e||function(e,t,o,r){var n=o.length,a=n,l=!r;if(null==e)return!a;for(e=Object(e);n--;){var i=o[n];if(l&&i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++n<a;){var s=(i=o[n])[0],d=e[s],u=i[1];if(l&&i[2]){if(void 0===d&&!(s in e))return!1}else{var c=new M;if(r)var p=r(d,u,s,e,t,c);if(!(void 0===p?xo(u,d,3,r,c):p))return!1}}return!0}(o,e,t)}}function Mo(e,t){return null!=e&&t in Object(e)}function zo(e,t){return null!=e&&function(e,t,o){for(var r=-1,n=(t=Rt(t,e)).length,a=!1;++r<n;){var l=Ft(t[r]);if(!(a=null!=e&&o(e,l)))break;e=e[l]}return a||++r!=n?a:!!(n=null==e?0:e.length)&&w(n)&&X(l,n)&&(F(e)||B(e))}(e,t,Mo)}function Oo(e){return Tt(e)?(t=Ft(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return kt(t,e)}}(e);var t}function jo(e){return"function"==typeof e?e:null==e?ne:"object"==typeof e?F(e)?(t=e[0],o=e[1],Tt(t)&&$o(o)?So(Ft(t),o):function(e){var r=Dt(e,t);return void 0===r&&r===o?zo(e,t):xo(o,r,3)}):Co(e):Oo(e);var t,o}var To,Eo,Bo=(To=function(e,t){return e&&fe(e,t,zt)},function(e,t){if(null==e)return e;if(!_(e))return To(e,t);for(var o=e.length,r=Eo?o:-1,n=Object(e);(Eo?r--:++r<o)&&!1!==t(n[r],r,n););return e});function Ao(e,t){var o=-1,r=_(e)?Array(e.length):[];return Bo(e,function(e,n,a){r[++o]=t(e,n,a)}),r}var _o={height:"calc(var(--n-option-height) * 7.6)",paddingTiny:"4px 0",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingTiny:"0 12px",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function Po(e){const{borderRadius:t,popoverColor:o,textColor3:r,dividerColor:n,textColor2:a,primaryColorPressed:l,textColorDisabled:i,primaryColor:s,opacityDisabled:d,hoverColor:u,fontSizeTiny:c,fontSizeSmall:p,fontSizeMedium:f,fontSizeLarge:h,fontSizeHuge:v,heightTiny:g,heightSmall:b,heightMedium:m,heightLarge:w,heightHuge:y}=e;return Object.assign(Object.assign({},_o),{optionFontSizeTiny:c,optionFontSizeSmall:p,optionFontSizeMedium:f,optionFontSizeLarge:h,optionFontSizeHuge:v,optionHeightTiny:g,optionHeightSmall:b,optionHeightMedium:m,optionHeightLarge:w,optionHeightHuge:y,borderRadius:t,color:o,groupHeaderTextColor:r,actionDividerColor:n,optionTextColor:a,optionTextColorPressed:l,optionTextColorDisabled:i,optionTextColorActive:s,optionOpacityDisabled:d,optionCheckColor:s,optionColorPending:u,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:u,actionTextColor:a,loadingColor:s})}var Wo=v({name:"InternalSelectMenu",common:n,peers:{Scrollbar:ce,Empty:W},self:Po}),{cubicBezierEaseIn:Ho,cubicBezierEaseOut:Ro}=i;function Fo({transformOrigin:e="inherit",duration:t=".2s",enterScale:o=".9",originalTransform:r="",originalTransition:n=""}={}){return[U("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${Ho}, transform ${t} ${Ho} ${n&&`,${n}`}`}),U("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${Ro}, transform ${t} ${Ro} ${n&&`,${n}`}`}),U("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${o})`}),U("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}var ko={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};function Do(e){const{boxShadow2:t,popoverColor:o,textColor2:r,borderRadius:n,fontSize:a,dividerColor:l}=e;return Object.assign(Object.assign({},ko),{fontSize:a,borderRadius:n,color:o,dividerColor:l,textColor:r,boxShadow:t})}var Io,Lo,No=v({name:"Popover",common:n,peers:{Scrollbar:ce},self:Do}),Xo={top:"bottom",bottom:"top",left:"right",right:"left"},Yo="var(--n-arrow-height) * 1.414",Vo=U([Y("popover","\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n position: relative;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n box-shadow: var(--n-box-shadow);\n word-break: break-word;\n ",[U(">",[Y("scrollbar","\n height: inherit;\n max-height: inherit;\n ")]),D("raw","\n background-color: var(--n-color);\n border-radius: var(--n-border-radius);\n ",[D("scrollable",[D("show-header-or-footer","padding: var(--n-padding);")])]),de("header","\n padding: var(--n-padding);\n border-bottom: 1px solid var(--n-divider-color);\n transition: border-color .3s var(--n-bezier);\n "),de("footer","\n padding: var(--n-padding);\n border-top: 1px solid var(--n-divider-color);\n transition: border-color .3s var(--n-bezier);\n "),pe("scrollable, show-header-or-footer",[de("content","\n padding: var(--n-padding);\n ")])]),Y("popover-shared","\n transform-origin: inherit;\n ",[Y("popover-arrow-wrapper","\n position: absolute;\n overflow: hidden;\n pointer-events: none;\n ",[Y("popover-arrow",`\n transition: background-color .3s var(--n-bezier);\n position: absolute;\n display: block;\n width: calc(${Yo});\n height: calc(${Yo});\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);\n transform: rotate(45deg);\n background-color: var(--n-color);\n pointer-events: all;\n `)]),U("&.popover-transition-enter-from, &.popover-transition-leave-to","\n opacity: 0;\n transform: scale(.85);\n "),U("&.popover-transition-enter-to, &.popover-transition-leave-from","\n transform: scale(1);\n opacity: 1;\n "),U("&.popover-transition-enter-active","\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .15s var(--n-bezier-ease-out),\n transform .15s var(--n-bezier-ease-out);\n "),U("&.popover-transition-leave-active","\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .15s var(--n-bezier-ease-in),\n transform .15s var(--n-bezier-ease-in);\n ")]),qo("top-start",`\n top: calc(${Yo} / -2);\n left: calc(${Uo("top-start")} - var(--v-offset-left));\n `),qo("top",`\n top: calc(${Yo} / -2);\n transform: translateX(calc(${Yo} / -2)) rotate(45deg);\n left: 50%;\n `),qo("top-end",`\n top: calc(${Yo} / -2);\n right: calc(${Uo("top-end")} + var(--v-offset-left));\n `),qo("bottom-start",`\n bottom: calc(${Yo} / -2);\n left: calc(${Uo("bottom-start")} - var(--v-offset-left));\n `),qo("bottom",`\n bottom: calc(${Yo} / -2);\n transform: translateX(calc(${Yo} / -2)) rotate(45deg);\n left: 50%;\n `),qo("bottom-end",`\n bottom: calc(${Yo} / -2);\n right: calc(${Uo("bottom-end")} + var(--v-offset-left));\n `),qo("left-start",`\n left: calc(${Yo} / -2);\n top: calc(${Uo("left-start")} - var(--v-offset-top));\n `),qo("left",`\n left: calc(${Yo} / -2);\n transform: translateY(calc(${Yo} / -2)) rotate(45deg);\n top: 50%;\n `),qo("left-end",`\n left: calc(${Yo} / -2);\n bottom: calc(${Uo("left-end")} + var(--v-offset-top));\n `),qo("right-start",`\n right: calc(${Yo} / -2);\n top: calc(${Uo("right-start")} - var(--v-offset-top));\n `),qo("right",`\n right: calc(${Yo} / -2);\n transform: translateY(calc(${Yo} / -2)) rotate(45deg);\n top: 50%;\n `),qo("right-end",`\n right: calc(${Yo} / -2);\n bottom: calc(${Uo("right-end")} + var(--v-offset-top));\n `),...(Io={top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},Lo=(e,t)=>{const o=["right","left"].includes(t),r=o?"width":"height";return e.map(e=>{const n="end"===e.split("-")[1],a=`calc((var(--v-target-${r}, 0px) - ${Yo}) / 2)`,l=Uo(e);return U(`[v-placement="${e}"] >`,[Y("popover-shared",[pe("center-arrow",[Y("popover-arrow",`${t}: calc(max(${a}, ${l}) ${n?"+":"-"} var(--v-offset-${o?"left":"top"}));`)])])])})},(F(Io)?ee:Ao)(Io,jo(Lo)))]);function Uo(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function qo(e,t){const o=e.split("-")[0],r=["top","bottom"].includes(o)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return U(`[v-placement="${e}"] >`,[Y("popover-shared",`\n margin-${Xo[o]}: var(--n-space);\n `,[pe("show-arrow",`\n margin-${Xo[o]}: var(--n-space-arrow);\n `),pe("overlap","\n margin: 0;\n "),H("popover-arrow-wrapper",`\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n ${o}: 100%;\n ${Xo[o]}: auto;\n ${r}\n `,[Y("popover-arrow",t)])])])}var Ko=Object.assign(Object.assign({},g.props),{to:Ze.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function Qo({arrowClass:e,arrowStyle:t,arrowWrapperClass:o,arrowWrapperStyle:r,clsPrefix:n}){return ye("div",{key:"__popover-arrow__",style:r,class:[`${n}-popover-arrow-wrapper`,o]},ye("div",{class:[`${n}-popover-arrow`,e],style:t}))}var Zo=ve({name:"PopoverBody",inheritAttrs:!1,props:Ko,setup(e,{slots:t,attrs:o}){const{namespaceRef:r,mergedClsPrefixRef:n,inlineThemeDisabled:l,mergedRtlRef:i}=V(e),s=g("Popover","-popover",Vo,No,e,n),d=u("Popover",i,n),c=Ae(null),p=xe("NPopover"),f=Ae(null),h=Ae(e.show),v=Ae(!1);$e(()=>{const{show:t}=e;!t||(void 0===gt&&(gt=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),gt)||e.internalDeactivateImmediately||(v.value=!0)});const m=Me(()=>{const{trigger:t,onClickoutside:o}=e,r=[],{positionManuallyRef:{value:n}}=p;return n||("click"!==t||o||r.push([he,z,void 0,{capture:!0}]),"hover"===t&&r.push([at,M])),o&&r.push([he,z,void 0,{capture:!0}]),("show"===e.displayDirective||e.animated&&v.value)&&r.push([Oe,e.show]),r}),w=Me(()=>{const{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:o},self:{space:r,spaceArrow:n,padding:a,fontSize:l,textColor:i,dividerColor:d,color:u,boxShadow:c,borderRadius:p,arrowHeight:f,arrowOffset:h,arrowOffsetVertical:v}}=s.value;return{"--n-box-shadow":c,"--n-bezier":e,"--n-bezier-ease-in":t,"--n-bezier-ease-out":o,"--n-font-size":l,"--n-text-color":i,"--n-color":u,"--n-divider-color":d,"--n-border-radius":p,"--n-arrow-height":f,"--n-arrow-offset":h,"--n-arrow-offset-vertical":v,"--n-padding":a,"--n-space":r,"--n-space-arrow":n}}),y=Me(()=>{const t="trigger"===e.width?void 0:Q(e.width),o=[];t&&o.push({width:t});const{maxWidth:r,minWidth:n}=e;return r&&o.push({maxWidth:Q(r)}),n&&o.push({maxWidth:Q(n)}),l||o.push(w.value),o}),x=l?q("popover",void 0,w,e):void 0;function $(t){"hover"===e.trigger&&e.keepAliveOnHover&&e.show&&p.handleMouseEnter(t)}function S(t){"hover"===e.trigger&&e.keepAliveOnHover&&p.handleMouseLeave(t)}function M(t){"hover"!==e.trigger||O().contains(te(t))||p.handleMouseMoveOutside(t)}function z(t){("click"===e.trigger&&!O().contains(te(t))||e.onClickoutside)&&p.handleClickOutside(t)}function O(){return p.getTriggerElement()}return p.setBodyInstance({syncPosition:function(){var e;null===(e=c.value)||void 0===e||e.syncPosition()}}),He(()=>{p.setBodyInstance(null)}),Ce(ze(e,"show"),t=>{e.animated||(h.value=!!t)}),me(C,f),me(re,null),me(j,null),{displayed:v,namespace:r,isMounted:p.isMountedRef,zIndex:p.zIndexRef,followerRef:c,adjustedTo:Ze(e),followerEnabled:h,renderContentNode:function(){if(null==x||x.onRender(),!("show"===e.displayDirective||e.show||e.animated&&v.value))return null;let r;const l=p.internalRenderBodyRef.value,{value:i}=n;if(l)r=l([`${i}-popover-shared`,(null==d?void 0:d.value)&&`${i}-popover--rtl`,null==x?void 0:x.themeClass.value,e.overlap&&`${i}-popover-shared--overlap`,e.showArrow&&`${i}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${i}-popover-shared--center-arrow`],f,y.value,$,S);else{const{value:n}=p.extraClassRef,{internalTrapFocus:l}=e,u=!I(t.header)||!I(t.footer),c=()=>{var o,r;const n=u?ye(je,null,a(t.header,t=>t?ye("div",{class:[`${i}-popover__header`,e.headerClass],style:e.headerStyle},t):null),a(t.default,o=>o?ye("div",{class:[`${i}-popover__content`,e.contentClass],style:e.contentStyle},t):null),a(t.footer,t=>t?ye("div",{class:[`${i}-popover__footer`,e.footerClass],style:e.footerStyle},t):null)):e.scrollable?null===(o=t.default)||void 0===o?void 0:o.call(t):ye("div",{class:[`${i}-popover__content`,e.contentClass],style:e.contentStyle},t);return[e.scrollable?ye(k,{themeOverrides:s.value.peerOverrides.Scrollbar,theme:s.value.peers.Scrollbar,contentClass:u?void 0:`${i}-popover__content ${null!==(r=e.contentClass)&&void 0!==r?r:""}`,contentStyle:u?void 0:e.contentStyle},{default:()=>n}):n,e.showArrow?Qo({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:i}):null]};r=ye("div",be({class:[`${i}-popover`,`${i}-popover-shared`,(null==d?void 0:d.value)&&`${i}-popover--rtl`,null==x?void 0:x.themeClass.value,n.map(e=>`${i}-${e}`),{[`${i}-popover--scrollable`]:e.scrollable,[`${i}-popover--show-header-or-footer`]:u,[`${i}-popover--raw`]:e.raw,[`${i}-popover-shared--overlap`]:e.overlap,[`${i}-popover-shared--show-arrow`]:e.showArrow,[`${i}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:f,style:y.value,onKeydown:p.handleKeydown,onMouseenter:$,onMouseleave:S},o),l?ye(b,{active:e.show,autoFocus:!0},{default:c}):c())}return _e(r,m.value)}}},render(){return ye(mt,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:"trigger"===this.width?"target":void 0,teleportDisabled:this.adjustedTo===Ze.tdkey},{default:()=>this.animated?ye(Be,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;null===(e=this.internalOnAfterLeave)||void 0===e||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),Go=Object.keys(Ko),Jo={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};var er={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:Ze.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},tr=ve({name:"Popover",inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},g.props),er),{internalOnAfterLeave:Function,internalRenderBody:Function}),slots:Object,__popover__:!0,setup(e){const o=P(),r=Ae(null),n=Me(()=>e.show),a=Ae(e.defaultShow),l=y(n,a),i=t(()=>!e.disabled&&l.value),s=()=>{if(e.disabled)return!0;const{getDisabled:t}=e;return!!(null==t?void 0:t())},d=()=>!s()&&l.value,u=E(e,["arrow","showArrow"]),c=Me(()=>!e.overlap&&u.value);let p=null;const f=Ae(null),h=Ae(null),v=t(()=>void 0!==e.x&&void 0!==e.y);function g(t){const{"onUpdate:show":o,onUpdateShow:r,onShow:n,onHide:l}=e;a.value=t,o&&$(o,t),r&&$(r,t),t&&n&&$(n,!0),t&&l&&$(l,!1)}function b(){const{value:e}=f;e&&(window.clearTimeout(e),f.value=null)}function m(){const{value:e}=h;e&&(window.clearTimeout(e),h.value=null)}function w(){const t=s();if("hover"===e.trigger&&!t){if(m(),null!==f.value)return;if(d())return;const t=()=>{g(!0),f.value=null},{delay:o}=e;0===o?t():f.value=window.setTimeout(t,o)}}function x(){const t=s();if("hover"===e.trigger&&!t){if(b(),null!==h.value)return;if(!d())return;const t=()=>{g(!1),h.value=null},{duration:o}=e;0===o?t():h.value=window.setTimeout(t,o)}}return me("NPopover",{getTriggerElement:function(){var e;return null===(e=r.value)||void 0===e?void 0:e.targetRef},handleKeydown:function(t){e.internalTrapFocus&&"Escape"===t.key&&(b(),m(),g(!1))},handleMouseEnter:w,handleMouseLeave:x,handleClickOutside:function(t){var o;d()&&("click"===e.trigger&&(b(),m(),g(!1)),null===(o=e.onClickoutside)||void 0===o||o.call(e,t))},handleMouseMoveOutside:function(){x()},setBodyInstance:function(e){p=e},positionManuallyRef:v,isMountedRef:o,zIndexRef:ze(e,"zIndex"),extraClassRef:ze(e,"internalExtraClass"),internalRenderBodyRef:ze(e,"internalRenderBody")}),$e(()=>{l.value&&s()&&g(!1)}),{binderInstRef:r,positionManually:v,mergedShowConsideringDisabledProp:i,uncontrolledShow:a,mergedShowArrow:c,getMergedShow:d,setShow:function(e){a.value=e},handleClick:function(){"click"!==e.trigger||s()||(b(),m(),g(!d()))},handleMouseEnter:w,handleMouseLeave:x,handleFocus:function(){const t=s();if("focus"===e.trigger&&!t){if(d())return;g(!0)}},handleBlur:function(){const t=s();if("focus"===e.trigger&&!t){if(!d())return;g(!1)}},syncPosition:function(){p&&p.syncPosition()}}},render(){var e;const{positionManually:t,$slots:o}=this;let r,n=!1;if(!t&&(r=function(e,t="default",o){const r=e[t];if(!r)return m("getFirstSlotVNode",`slot[${t}] is empty`),null;const n=wt(r(o));return 1===n.length?n[0]:(m("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}(o,"trigger"),r)){r=We(r),r=r.type===Pe?ye("span",[r]):r;const o={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(null===(e=r.type)||void 0===e?void 0:e.__popover__)n=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[o,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[o];else{const{internalInheritedEventHandlers:e}=this,n=[o,...e];a=r,l=e?"nested":t?"manual":this.trigger,i={onBlur:e=>{n.forEach(t=>{t.onBlur(e)})},onFocus:e=>{n.forEach(t=>{t.onFocus(e)})},onClick:e=>{n.forEach(t=>{t.onClick(e)})},onMouseenter:e=>{n.forEach(t=>{t.onMouseenter(e)})},onMouseleave:e=>{n.forEach(t=>{t.onMouseleave(e)})}},Jo[l].forEach(e=>{a.props?a.props=Object.assign({},a.props):a.props={};const t=a.props[e],o=i[e];a.props[e]=t?(...e)=>{t(...e),o(...e)}:o})}}var a,l,i;return ye(ot,{ref:"binderInstRef",syncTarget:!n,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const e=this.getMergedShow();return[this.internalTrapFocus&&e?_e(ye("div",{style:{position:"fixed",top:0,right:0,bottom:0,left:0}}),[[x,{enabled:e,zIndex:this.zIndex}]]):null,t?null:ye(rt,null,{default:()=>r}),ye(Zo,xt(this.$props,Go,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:e})),{default:()=>{var e,t;return null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)},header:()=>{var e,t;return null===(t=(e=this.$slots).header)||void 0===t?void 0:t.call(e)},footer:()=>{var e,t;return null===(t=(e=this.$slots).footer)||void 0===t?void 0:t.call(e)}})]}})}}),or={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"};var rr=v({name:"InternalSelection",common:n,peers:{Popover:No},self:function(e){const{borderRadius:t,textColor2:o,textColorDisabled:r,inputColor:n,inputColorDisabled:a,primaryColor:l,primaryColorHover:i,warningColor:s,warningColorHover:d,errorColor:u,errorColorHover:c,borderColor:p,iconColor:f,iconColorDisabled:h,clearColor:v,clearColorHover:g,clearColorPressed:b,placeholderColor:m,placeholderColorDisabled:w,fontSizeTiny:y,fontSizeSmall:x,fontSizeMedium:$,fontSizeLarge:S,heightTiny:C,heightSmall:M,heightMedium:z,heightLarge:O,fontWeight:j}=e;return Object.assign(Object.assign({},or),{fontSizeTiny:y,fontSizeSmall:x,fontSizeMedium:$,fontSizeLarge:S,heightTiny:C,heightSmall:M,heightMedium:z,heightLarge:O,borderRadius:t,fontWeight:j,textColor:o,textColorDisabled:r,placeholderColor:m,placeholderColorDisabled:w,color:n,colorDisabled:a,colorActive:n,border:`1px solid ${p}`,borderHover:`1px solid ${i}`,borderActive:`1px solid ${l}`,borderFocus:`1px solid ${i}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${R(l,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${R(l,{alpha:.2})}`,caretColor:l,arrowColor:f,arrowColorDisabled:h,loadingColor:l,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${d}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${d}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${R(s,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${R(s,{alpha:.2})}`,colorActiveWarning:n,caretColorWarning:s,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${c}`,borderActiveError:`1px solid ${u}`,borderFocusError:`1px solid ${c}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${R(u,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${R(u,{alpha:.2})}`,colorActiveError:n,caretColorError:u,clearColor:v,clearColorHover:g,clearColorPressed:b})}}),nr={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};var ar=v({name:"Input",common:n,peers:{Scrollbar:ce},self:function(e){const{textColor2:t,textColor3:o,textColorDisabled:r,primaryColor:n,primaryColorHover:a,inputColor:l,inputColorDisabled:i,borderColor:s,warningColor:d,warningColorHover:u,errorColor:c,errorColorHover:p,borderRadius:f,lineHeight:h,fontSizeTiny:v,fontSizeSmall:g,fontSizeMedium:b,fontSizeLarge:m,heightTiny:w,heightSmall:y,heightMedium:x,heightLarge:$,actionColor:S,clearColor:C,clearColorHover:M,clearColorPressed:z,placeholderColor:O,placeholderColorDisabled:j,iconColor:T,iconColorDisabled:E,iconColorHover:B,iconColorPressed:A,fontWeight:_}=e;return Object.assign(Object.assign({},nr),{fontWeight:_,countTextColorDisabled:r,countTextColor:o,heightTiny:w,heightSmall:y,heightMedium:x,heightLarge:$,fontSizeTiny:v,fontSizeSmall:g,fontSizeMedium:b,fontSizeLarge:m,lineHeight:h,lineHeightTextarea:h,borderRadius:f,iconSize:"16px",groupLabelColor:S,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:n,placeholderColor:O,placeholderColorDisabled:j,color:l,colorDisabled:i,colorFocus:l,groupLabelBorder:`1px solid ${s}`,border:`1px solid ${s}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${s}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${R(n,{alpha:.2})}`,loadingColor:n,loadingColorWarning:d,borderWarning:`1px solid ${d}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:l,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${R(d,{alpha:.2})}`,caretColorWarning:d,loadingColorError:c,borderError:`1px solid ${c}`,borderHoverError:`1px solid ${p}`,colorFocusError:l,borderFocusError:`1px solid ${p}`,boxShadowFocusError:`0 0 0 2px ${R(c,{alpha:.2})}`,caretColorError:c,clearColor:C,clearColorHover:M,clearColorPressed:z,iconColor:T,iconColorDisabled:E,iconColorHover:B,iconColorPressed:A,suffixTextColor:t})}});function lr(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}var ir=v({name:"Select",common:n,peers:{InternalSelection:rr,InternalSelectMenu:Wo},self:lr}),sr=A("n-message-api"),dr=A("n-message-provider");function ur(){const e=xe(sr,null);return null===e&&l("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}export{qe as A,mt as C,ot as D,rt as E,Ie as M,Ve as N,Ze as O,De as P,wt as S,it as T,Po as _,lr as a,xt as b,rr as c,er as d,Qo as f,Wo as g,Fo as h,ir as i,Ue as j,Ke as k,or as l,Do as m,sr as n,ar as o,No as p,dr as r,nr as s,ur as t,tr as u,Dt as v,lt as w,yt as x,$t as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,I as t,It as n,Jt as r,N as o,Nt as i,Qt as a,Rt as s,Tt as l,Ut as d,Wt as c,Zt as u,gn as h,gt as m,hn as v,ht as b,jt as f,kt as p,qt as g,vn as w,w as y,y as z,yn as $,zt as x}from"./_plugin-vue_export-helper-BeLZJZij.js";import{A as S,F as k,G as C,H as E,M as B,N as F,Q as M,V as R,Z as H,b as O,dt as A,f as T,l as W,st as D,tt as N,z as P}from"./vue-vendor-BqZbbXHA.js";import{n as U,t as j}from"./use-lock-html-scroll-DXIqmUW4.js";import{J as L}from"./index-BFInlZGI.js";var I=S({name:"NDrawerContent",inheritAttrs:!1,props:{blockScroll:Boolean,show:{type:Boolean,default:void 0},displayDirective:{type:String,required:!0},placement:{type:String,required:!0},contentClass:String,contentStyle:[Object,String],nativeScrollbar:{type:Boolean,required:!0},scrollbarProps:Object,trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},showMask:{type:[Boolean,String],required:!0},maxWidth:Number,maxHeight:Number,minWidth:Number,minHeight:Number,resizable:Boolean,onClickoutside:Function,onAfterLeave:Function,onAfterEnter:Function,onEsc:Function},setup(e){const n=D(!!e.show),o=D(null),i=F(r);let a=0,s="",l=null;const u=D(!1),h=D(!1),v=O(()=>"top"===e.placement||"bottom"===e.placement),{mergedClsPrefixRef:b,mergedRtlRef:f}=m(e),p=t("Drawer",f,b),w=S,{doUpdateHeight:y,doUpdateWidth:z}=i;function $(t){var n,r;if(h.value)if(v.value){let r=(null===(n=o.value)||void 0===n?void 0:n.offsetHeight)||0;const i=a-t.clientY;r+="bottom"===e.placement?i:-i,r=(t=>{const{maxHeight:n}=e;if(n&&t>n)return n;const{minHeight:r}=e;return r&&t<r?r:t})(r),y(r),a=t.clientY}else{let n=(null===(r=o.value)||void 0===r?void 0:r.offsetWidth)||0;const i=a-t.clientX;n+="right"===e.placement?i:-i,n=(t=>{const{maxWidth:n}=e;if(n&&t>n)return n;const{minWidth:r}=e;return r&&t<r?r:t})(n),z(n),a=t.clientX}}function S(){h.value&&(a=0,h.value=!1,document.body.style.cursor=s,document.body.removeEventListener("mousemove",$),document.body.removeEventListener("mouseup",S),document.body.removeEventListener("mouseleave",w))}M(()=>{e.show&&(n.value=!0)}),H(()=>e.show,e=>{e||S()}),P(()=>{S()});const k=O(()=>{const{show:t}=e,n=[[T,t]];return e.showMask||n.push([x,e.onClickoutside,void 0,{capture:!0}]),n});return j(O(()=>e.blockScroll&&n.value)),C(g,o),C(d,null),C(c,null),{bodyRef:o,rtlEnabled:p,mergedClsPrefix:i.mergedClsPrefixRef,isMounted:i.isMountedRef,mergedTheme:i.mergedThemeRef,displayed:n,transitionName:O(()=>({right:"slide-in-from-right-transition",left:"slide-in-from-left-transition",top:"slide-in-from-top-transition",bottom:"slide-in-from-bottom-transition"}[e.placement])),handleAfterLeave:function(){var t;n.value=!1,null===(t=e.onAfterLeave)||void 0===t||t.call(e)},bodyDirectives:k,handleMousedownResizeTrigger:e=>{h.value=!0,a=v.value?e.clientY:e.clientX,s=document.body.style.cursor,document.body.style.cursor=v.value?"ns-resize":"ew-resize",document.body.addEventListener("mousemove",$),document.body.addEventListener("mouseleave",w),document.body.addEventListener("mouseup",S)},handleMouseenterResizeTrigger:()=>{null!==l&&(window.clearTimeout(l),l=null),h.value?u.value=!0:l=window.setTimeout(()=>{u.value=!0},300)},handleMouseleaveResizeTrigger:()=>{null!==l&&(window.clearTimeout(l),l=null),u.value=!1},isDragging:h,isHoverOnResizeTrigger:u}},render(){const{$slots:e,mergedClsPrefix:t}=this;return"show"===this.displayDirective||this.displayed||this.show?N(B("div",{role:"none"},B(i,{disabled:!this.showMask||!this.trapFocus,active:this.show,autoFocus:this.autoFocus,onEsc:this.onEsc},{default:()=>B(W,{name:this.transitionName,appear:this.isMounted,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave},{default:()=>N(B("div",k(this.$attrs,{role:"dialog",ref:"bodyRef","aria-modal":"true",class:[`${t}-drawer`,this.rtlEnabled&&`${t}-drawer--rtl`,`${t}-drawer--${this.placement}-placement`,this.isDragging&&`${t}-drawer--unselectable`,this.nativeScrollbar&&`${t}-drawer--native-scrollbar`]}),[this.resizable?B("div",{class:[`${t}-drawer__resize-trigger`,(this.isDragging||this.isHoverOnResizeTrigger)&&`${t}-drawer__resize-trigger--hover`],onMouseenter:this.handleMouseenterResizeTrigger,onMouseleave:this.handleMouseleaveResizeTrigger,onMousedown:this.handleMousedownResizeTrigger}):null,this.nativeScrollbar?B("div",{class:[`${t}-drawer-content-wrapper`,this.contentClass],style:this.contentStyle,role:"none"},e):B(z,Object.assign({},this.scrollbarProps,{contentStyle:this.contentStyle,contentClass:[`${t}-drawer-content-wrapper`,this.contentClass],theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar}),e)]),this.bodyDirectives)})})),[[T,"if"===this.displayDirective||this.displayed||this.show]]):null}}),{cubicBezierEaseIn:X,cubicBezierEaseOut:Y}=e;var{cubicBezierEaseIn:_,cubicBezierEaseOut:q}=e;var{cubicBezierEaseIn:V,cubicBezierEaseOut:J}=e;var{cubicBezierEaseIn:Q,cubicBezierEaseOut:Z}=e;var G=v([h("drawer","\n word-break: break-word;\n line-height: var(--n-line-height);\n position: absolute;\n pointer-events: all;\n box-shadow: var(--n-box-shadow);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n background-color: var(--n-color);\n color: var(--n-text-color);\n box-sizing: border-box;\n ",[function({duration:e="0.3s",leaveDuration:t="0.2s",name:n="slide-in-from-right"}={}){return[v(`&.${n}-transition-leave-active`,{transition:`transform ${t} ${V}`}),v(`&.${n}-transition-enter-active`,{transition:`transform ${e} ${J}`}),v(`&.${n}-transition-enter-to`,{transform:"translateX(0)"}),v(`&.${n}-transition-enter-from`,{transform:"translateX(100%)"}),v(`&.${n}-transition-leave-from`,{transform:"translateX(0)"}),v(`&.${n}-transition-leave-to`,{transform:"translateX(100%)"})]}(),function({duration:e="0.3s",leaveDuration:t="0.2s",name:n="slide-in-from-left"}={}){return[v(`&.${n}-transition-leave-active`,{transition:`transform ${t} ${_}`}),v(`&.${n}-transition-enter-active`,{transition:`transform ${e} ${q}`}),v(`&.${n}-transition-enter-to`,{transform:"translateX(0)"}),v(`&.${n}-transition-enter-from`,{transform:"translateX(-100%)"}),v(`&.${n}-transition-leave-from`,{transform:"translateX(0)"}),v(`&.${n}-transition-leave-to`,{transform:"translateX(-100%)"})]}(),function({duration:e="0.3s",leaveDuration:t="0.2s",name:n="slide-in-from-top"}={}){return[v(`&.${n}-transition-leave-active`,{transition:`transform ${t} ${Q}`}),v(`&.${n}-transition-enter-active`,{transition:`transform ${e} ${Z}`}),v(`&.${n}-transition-enter-to`,{transform:"translateY(0)"}),v(`&.${n}-transition-enter-from`,{transform:"translateY(-100%)"}),v(`&.${n}-transition-leave-from`,{transform:"translateY(0)"}),v(`&.${n}-transition-leave-to`,{transform:"translateY(-100%)"})]}(),function({duration:e="0.3s",leaveDuration:t="0.2s",name:n="slide-in-from-bottom"}={}){return[v(`&.${n}-transition-leave-active`,{transition:`transform ${t} ${X}`}),v(`&.${n}-transition-enter-active`,{transition:`transform ${e} ${Y}`}),v(`&.${n}-transition-enter-to`,{transform:"translateY(0)"}),v(`&.${n}-transition-enter-from`,{transform:"translateY(100%)"}),v(`&.${n}-transition-leave-from`,{transform:"translateY(0)"}),v(`&.${n}-transition-leave-to`,{transform:"translateY(100%)"})]}(),$("unselectable","\n user-select: none; \n -webkit-user-select: none;\n "),$("native-scrollbar",[h("drawer-content-wrapper","\n overflow: auto;\n height: 100%;\n ")]),w("resize-trigger","\n position: absolute;\n background-color: #0000;\n transition: background-color .3s var(--n-bezier);\n ",[$("hover","\n background-color: var(--n-resize-trigger-color-hover);\n ")]),h("drawer-content-wrapper","\n box-sizing: border-box;\n "),h("drawer-content","\n height: 100%;\n display: flex;\n flex-direction: column;\n ",[$("native-scrollbar",[h("drawer-body-content-wrapper","\n height: 100%;\n overflow: auto;\n ")]),h("drawer-body","\n flex: 1 0 0;\n overflow: hidden;\n "),h("drawer-body-content-wrapper","\n box-sizing: border-box;\n padding: var(--n-body-padding);\n "),h("drawer-header","\n font-weight: var(--n-title-font-weight);\n line-height: 1;\n font-size: var(--n-title-font-size);\n color: var(--n-title-text-color);\n padding: var(--n-header-padding);\n transition: border .3s var(--n-bezier);\n border-bottom: 1px solid var(--n-divider-color);\n border-bottom: var(--n-header-border-bottom);\n display: flex;\n justify-content: space-between;\n align-items: center;\n ",[w("main","\n flex: 1;\n "),w("close","\n margin-left: 6px;\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n ")]),h("drawer-footer","\n display: flex;\n justify-content: flex-end;\n border-top: var(--n-footer-border-top);\n transition: border .3s var(--n-bezier);\n padding: var(--n-footer-padding);\n ")]),$("right-placement","\n top: 0;\n bottom: 0;\n right: 0;\n border-top-left-radius: var(--n-border-radius);\n border-bottom-left-radius: var(--n-border-radius);\n ",[w("resize-trigger","\n width: 3px;\n height: 100%;\n top: 0;\n left: 0;\n transform: translateX(-1.5px);\n cursor: ew-resize;\n ")]),$("left-placement","\n top: 0;\n bottom: 0;\n left: 0;\n border-top-right-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n ",[w("resize-trigger","\n width: 3px;\n height: 100%;\n top: 0;\n right: 0;\n transform: translateX(1.5px);\n cursor: ew-resize;\n ")]),$("top-placement","\n top: 0;\n left: 0;\n right: 0;\n border-bottom-left-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n ",[w("resize-trigger","\n width: 100%;\n height: 3px;\n bottom: 0;\n left: 0;\n transform: translateY(1.5px);\n cursor: ns-resize;\n ")]),$("bottom-placement","\n left: 0;\n bottom: 0;\n right: 0;\n border-top-left-radius: var(--n-border-radius);\n border-top-right-radius: var(--n-border-radius);\n ",[w("resize-trigger","\n width: 100%;\n height: 3px;\n top: 0;\n left: 0;\n transform: translateY(-1.5px);\n cursor: ns-resize;\n ")])]),v("body",[v(">",[h("drawer-container","\n position: fixed;\n ")])]),h("drawer-container","\n position: relative;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n ",[v("> *","\n pointer-events: all;\n ")]),h("drawer-mask","\n background-color: rgba(0, 0, 0, .3);\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n ",[$("invisible","\n background-color: rgba(0, 0, 0, 0)\n "),y({enterDuration:"0.2s",leaveDuration:"0.2s",enterCubicBezier:"var(--n-bezier-in)",leaveCubicBezier:"var(--n-bezier-out)"})])]),K=S({name:"Drawer",inheritAttrs:!1,props:Object.assign(Object.assign({},o.props),{show:Boolean,width:[Number,String],height:[Number,String],placement:{type:String,default:"right"},maskClosable:{type:Boolean,default:!0},showMask:{type:[Boolean,String],default:!0},to:[String,Object],displayDirective:{type:String,default:"if"},nativeScrollbar:{type:Boolean,default:!0},zIndex:Number,onMaskClick:Function,scrollbarProps:Object,contentClass:String,contentStyle:[Object,String],trapFocus:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0},maxWidth:Number,maxHeight:Number,minWidth:Number,minHeight:Number,resizable:Boolean,defaultWidth:{type:[Number,String],default:251},defaultHeight:{type:[Number,String],default:251},onUpdateWidth:[Function,Array],onUpdateHeight:[Function,Array],"onUpdate:width":[Function,Array],"onUpdate:height":[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onAfterLeave:Function,drawerStyle:[String,Object],drawerClass:String,target:null,onShow:Function,onHide:Function}),setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:i}=m(e),s=u(),d=o("Drawer","-drawer",G,L,e,t),c=D(e.defaultWidth),h=D(e.defaultHeight),v=a(A(e,"width"),c),g=a(A(e,"height"),h),w=O(()=>{const{placement:t}=e;return"top"===t||"bottom"===t?"":f(v.value)}),y=O(()=>{const{placement:t}=e;return"left"===t||"right"===t?"":f(g.value)}),z=O(()=>[{width:w.value,height:y.value},e.drawerStyle||""]);function $(t){const{onMaskClick:n,maskClosable:r}=e;r&&S(!1),n&&n(t)}const x=U();function S(t){const{onHide:n,onUpdateShow:r,"onUpdate:show":o}=e;r&&l(r,t),o&&l(o,t),n&&!t&&l(n,t)}C(r,{isMountedRef:s,mergedThemeRef:d,mergedClsPrefixRef:t,doUpdateShow:S,doUpdateHeight:t=>{const{onUpdateHeight:n,"onUpdate:width":r}=e;n&&l(n,t),r&&l(r,t),h.value=t},doUpdateWidth:t=>{const{onUpdateWidth:n,"onUpdate:width":r}=e;n&&l(n,t),r&&l(r,t),c.value=t}});const k=O(()=>{const{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:n},self:{color:r,textColor:o,boxShadow:i,lineHeight:a,headerPadding:s,footerPadding:l,borderRadius:c,bodyPadding:u,titleFontSize:h,titleTextColor:m,titleFontWeight:v,headerBorderBottom:b,footerBorderTop:f,closeIconColor:p,closeIconColorHover:g,closeIconColorPressed:w,closeColorHover:y,closeColorPressed:z,closeIconSize:$,closeSize:x,closeBorderRadius:S,resizableTriggerColorHover:k}}=d.value;return{"--n-line-height":a,"--n-color":r,"--n-border-radius":c,"--n-text-color":o,"--n-box-shadow":i,"--n-bezier":e,"--n-bezier-out":n,"--n-bezier-in":t,"--n-header-padding":s,"--n-body-padding":u,"--n-footer-padding":l,"--n-title-text-color":m,"--n-title-font-size":h,"--n-title-font-weight":v,"--n-header-border-bottom":b,"--n-footer-border-top":f,"--n-close-icon-color":p,"--n-close-icon-color-hover":g,"--n-close-icon-color-pressed":w,"--n-close-size":x,"--n-close-color-hover":y,"--n-close-color-pressed":z,"--n-close-icon-size":$,"--n-close-border-radius":S,"--n-resize-trigger-color-hover":k}}),E=i?b("drawer",void 0,k,e):void 0;return{mergedClsPrefix:t,namespace:n,mergedBodyStyle:z,handleOutsideClick:function(e){$(e)},handleMaskClick:$,handleEsc:function(t){var n;null===(n=e.onEsc)||void 0===n||n.call(e),e.show&&e.closeOnEsc&&p(t)&&(x.value||S(!1))},mergedTheme:d,cssVars:i?void 0:k,themeClass:null==E?void 0:E.themeClass,onRender:null==E?void 0:E.onRender,isMounted:s}},render(){const{mergedClsPrefix:e}=this;return B(n,{to:this.to,show:this.show},{default:()=>{var t;return null===(t=this.onRender)||void 0===t||t.call(this),N(B("div",{class:[`${e}-drawer-container`,this.namespace,this.themeClass],style:this.cssVars,role:"none"},this.showMask?B(W,{name:"fade-in-transition",appear:this.isMounted},{default:()=>this.show?B("div",{"aria-hidden":!0,class:[`${e}-drawer-mask`,"transparent"===this.showMask&&`${e}-drawer-mask--invisible`],onClick:this.handleMaskClick}):null}):null,B(I,Object.assign({},this.$attrs,{class:[this.drawerClass,this.$attrs.class],style:[this.mergedBodyStyle,this.$attrs.style],blockScroll:this.blockScroll,contentStyle:this.contentStyle,contentClass:this.contentClass,placement:this.placement,scrollbarProps:this.scrollbarProps,show:this.show,displayDirective:this.displayDirective,nativeScrollbar:this.nativeScrollbar,onAfterEnter:this.onAfterEnter,onAfterLeave:this.onAfterLeave,trapFocus:this.trapFocus,autoFocus:this.autoFocus,resizable:this.resizable,maxHeight:this.maxHeight,minHeight:this.minHeight,maxWidth:this.maxWidth,minWidth:this.minWidth,showMask:this.showMask,onEsc:this.handleEsc,onClickoutside:this.handleOutsideClick}),this.$slots)),[[s,{zIndex:this.zIndex,enabled:this.show}]])}})}});function ee(e=520,t=null){const n=D("undefined"!=typeof window?window.innerWidth:1200),r=()=>{n.value=window.innerWidth};R(()=>{window.addEventListener("resize",r)}),E(()=>{window.removeEventListener("resize",r)});const o=O(()=>n.value<640),i=O(()=>n.value>=640&&n.value<1024);return{drawerWidth:O(()=>{if(n.value<640)return"100%";if(n.value<768)return Math.min(.95*n.value,e);if(n.value<1024){const r=t||e;return Math.min(.85*n.value,r)}return e}),isMobile:o,isTablet:i,windowWidth:n}}export{K as n,ee as t};
|
|
1
|
+
import{F as e,I as t,It as n,Jt as r,N as o,Nt as i,Qt as a,Rt as s,Tt as l,Ut as d,Wt as c,Zt as u,gn as h,gt as m,hn as v,ht as b,jt as f,kt as p,qt as g,vn as w,w as y,y as z,yn as $,zt as x}from"./_plugin-vue_export-helper-BeLZJZij.js";import{A as S,F as k,G as C,H as E,M as B,N as F,Q as M,V as R,Z as H,b as O,dt as A,f as T,l as W,st as D,tt as N,z as P}from"./vue-vendor-BqZbbXHA.js";import{n as U,t as j}from"./use-lock-html-scroll-DXIqmUW4.js";import{J as L}from"./index-BKlAWTH-.js";var I=S({name:"NDrawerContent",inheritAttrs:!1,props:{blockScroll:Boolean,show:{type:Boolean,default:void 0},displayDirective:{type:String,required:!0},placement:{type:String,required:!0},contentClass:String,contentStyle:[Object,String],nativeScrollbar:{type:Boolean,required:!0},scrollbarProps:Object,trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},showMask:{type:[Boolean,String],required:!0},maxWidth:Number,maxHeight:Number,minWidth:Number,minHeight:Number,resizable:Boolean,onClickoutside:Function,onAfterLeave:Function,onAfterEnter:Function,onEsc:Function},setup(e){const n=D(!!e.show),o=D(null),i=F(r);let a=0,s="",l=null;const u=D(!1),h=D(!1),v=O(()=>"top"===e.placement||"bottom"===e.placement),{mergedClsPrefixRef:b,mergedRtlRef:f}=m(e),p=t("Drawer",f,b),w=S,{doUpdateHeight:y,doUpdateWidth:z}=i;function $(t){var n,r;if(h.value)if(v.value){let r=(null===(n=o.value)||void 0===n?void 0:n.offsetHeight)||0;const i=a-t.clientY;r+="bottom"===e.placement?i:-i,r=(t=>{const{maxHeight:n}=e;if(n&&t>n)return n;const{minHeight:r}=e;return r&&t<r?r:t})(r),y(r),a=t.clientY}else{let n=(null===(r=o.value)||void 0===r?void 0:r.offsetWidth)||0;const i=a-t.clientX;n+="right"===e.placement?i:-i,n=(t=>{const{maxWidth:n}=e;if(n&&t>n)return n;const{minWidth:r}=e;return r&&t<r?r:t})(n),z(n),a=t.clientX}}function S(){h.value&&(a=0,h.value=!1,document.body.style.cursor=s,document.body.removeEventListener("mousemove",$),document.body.removeEventListener("mouseup",S),document.body.removeEventListener("mouseleave",w))}M(()=>{e.show&&(n.value=!0)}),H(()=>e.show,e=>{e||S()}),P(()=>{S()});const k=O(()=>{const{show:t}=e,n=[[T,t]];return e.showMask||n.push([x,e.onClickoutside,void 0,{capture:!0}]),n});return j(O(()=>e.blockScroll&&n.value)),C(g,o),C(d,null),C(c,null),{bodyRef:o,rtlEnabled:p,mergedClsPrefix:i.mergedClsPrefixRef,isMounted:i.isMountedRef,mergedTheme:i.mergedThemeRef,displayed:n,transitionName:O(()=>({right:"slide-in-from-right-transition",left:"slide-in-from-left-transition",top:"slide-in-from-top-transition",bottom:"slide-in-from-bottom-transition"}[e.placement])),handleAfterLeave:function(){var t;n.value=!1,null===(t=e.onAfterLeave)||void 0===t||t.call(e)},bodyDirectives:k,handleMousedownResizeTrigger:e=>{h.value=!0,a=v.value?e.clientY:e.clientX,s=document.body.style.cursor,document.body.style.cursor=v.value?"ns-resize":"ew-resize",document.body.addEventListener("mousemove",$),document.body.addEventListener("mouseleave",w),document.body.addEventListener("mouseup",S)},handleMouseenterResizeTrigger:()=>{null!==l&&(window.clearTimeout(l),l=null),h.value?u.value=!0:l=window.setTimeout(()=>{u.value=!0},300)},handleMouseleaveResizeTrigger:()=>{null!==l&&(window.clearTimeout(l),l=null),u.value=!1},isDragging:h,isHoverOnResizeTrigger:u}},render(){const{$slots:e,mergedClsPrefix:t}=this;return"show"===this.displayDirective||this.displayed||this.show?N(B("div",{role:"none"},B(i,{disabled:!this.showMask||!this.trapFocus,active:this.show,autoFocus:this.autoFocus,onEsc:this.onEsc},{default:()=>B(W,{name:this.transitionName,appear:this.isMounted,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave},{default:()=>N(B("div",k(this.$attrs,{role:"dialog",ref:"bodyRef","aria-modal":"true",class:[`${t}-drawer`,this.rtlEnabled&&`${t}-drawer--rtl`,`${t}-drawer--${this.placement}-placement`,this.isDragging&&`${t}-drawer--unselectable`,this.nativeScrollbar&&`${t}-drawer--native-scrollbar`]}),[this.resizable?B("div",{class:[`${t}-drawer__resize-trigger`,(this.isDragging||this.isHoverOnResizeTrigger)&&`${t}-drawer__resize-trigger--hover`],onMouseenter:this.handleMouseenterResizeTrigger,onMouseleave:this.handleMouseleaveResizeTrigger,onMousedown:this.handleMousedownResizeTrigger}):null,this.nativeScrollbar?B("div",{class:[`${t}-drawer-content-wrapper`,this.contentClass],style:this.contentStyle,role:"none"},e):B(z,Object.assign({},this.scrollbarProps,{contentStyle:this.contentStyle,contentClass:[`${t}-drawer-content-wrapper`,this.contentClass],theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar}),e)]),this.bodyDirectives)})})),[[T,"if"===this.displayDirective||this.displayed||this.show]]):null}}),{cubicBezierEaseIn:X,cubicBezierEaseOut:Y}=e;var{cubicBezierEaseIn:_,cubicBezierEaseOut:q}=e;var{cubicBezierEaseIn:V,cubicBezierEaseOut:J}=e;var{cubicBezierEaseIn:Q,cubicBezierEaseOut:Z}=e;var G=v([h("drawer","\n word-break: break-word;\n line-height: var(--n-line-height);\n position: absolute;\n pointer-events: all;\n box-shadow: var(--n-box-shadow);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n background-color: var(--n-color);\n color: var(--n-text-color);\n box-sizing: border-box;\n ",[function({duration:e="0.3s",leaveDuration:t="0.2s",name:n="slide-in-from-right"}={}){return[v(`&.${n}-transition-leave-active`,{transition:`transform ${t} ${V}`}),v(`&.${n}-transition-enter-active`,{transition:`transform ${e} ${J}`}),v(`&.${n}-transition-enter-to`,{transform:"translateX(0)"}),v(`&.${n}-transition-enter-from`,{transform:"translateX(100%)"}),v(`&.${n}-transition-leave-from`,{transform:"translateX(0)"}),v(`&.${n}-transition-leave-to`,{transform:"translateX(100%)"})]}(),function({duration:e="0.3s",leaveDuration:t="0.2s",name:n="slide-in-from-left"}={}){return[v(`&.${n}-transition-leave-active`,{transition:`transform ${t} ${_}`}),v(`&.${n}-transition-enter-active`,{transition:`transform ${e} ${q}`}),v(`&.${n}-transition-enter-to`,{transform:"translateX(0)"}),v(`&.${n}-transition-enter-from`,{transform:"translateX(-100%)"}),v(`&.${n}-transition-leave-from`,{transform:"translateX(0)"}),v(`&.${n}-transition-leave-to`,{transform:"translateX(-100%)"})]}(),function({duration:e="0.3s",leaveDuration:t="0.2s",name:n="slide-in-from-top"}={}){return[v(`&.${n}-transition-leave-active`,{transition:`transform ${t} ${Q}`}),v(`&.${n}-transition-enter-active`,{transition:`transform ${e} ${Z}`}),v(`&.${n}-transition-enter-to`,{transform:"translateY(0)"}),v(`&.${n}-transition-enter-from`,{transform:"translateY(-100%)"}),v(`&.${n}-transition-leave-from`,{transform:"translateY(0)"}),v(`&.${n}-transition-leave-to`,{transform:"translateY(-100%)"})]}(),function({duration:e="0.3s",leaveDuration:t="0.2s",name:n="slide-in-from-bottom"}={}){return[v(`&.${n}-transition-leave-active`,{transition:`transform ${t} ${X}`}),v(`&.${n}-transition-enter-active`,{transition:`transform ${e} ${Y}`}),v(`&.${n}-transition-enter-to`,{transform:"translateY(0)"}),v(`&.${n}-transition-enter-from`,{transform:"translateY(100%)"}),v(`&.${n}-transition-leave-from`,{transform:"translateY(0)"}),v(`&.${n}-transition-leave-to`,{transform:"translateY(100%)"})]}(),$("unselectable","\n user-select: none; \n -webkit-user-select: none;\n "),$("native-scrollbar",[h("drawer-content-wrapper","\n overflow: auto;\n height: 100%;\n ")]),w("resize-trigger","\n position: absolute;\n background-color: #0000;\n transition: background-color .3s var(--n-bezier);\n ",[$("hover","\n background-color: var(--n-resize-trigger-color-hover);\n ")]),h("drawer-content-wrapper","\n box-sizing: border-box;\n "),h("drawer-content","\n height: 100%;\n display: flex;\n flex-direction: column;\n ",[$("native-scrollbar",[h("drawer-body-content-wrapper","\n height: 100%;\n overflow: auto;\n ")]),h("drawer-body","\n flex: 1 0 0;\n overflow: hidden;\n "),h("drawer-body-content-wrapper","\n box-sizing: border-box;\n padding: var(--n-body-padding);\n "),h("drawer-header","\n font-weight: var(--n-title-font-weight);\n line-height: 1;\n font-size: var(--n-title-font-size);\n color: var(--n-title-text-color);\n padding: var(--n-header-padding);\n transition: border .3s var(--n-bezier);\n border-bottom: 1px solid var(--n-divider-color);\n border-bottom: var(--n-header-border-bottom);\n display: flex;\n justify-content: space-between;\n align-items: center;\n ",[w("main","\n flex: 1;\n "),w("close","\n margin-left: 6px;\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n ")]),h("drawer-footer","\n display: flex;\n justify-content: flex-end;\n border-top: var(--n-footer-border-top);\n transition: border .3s var(--n-bezier);\n padding: var(--n-footer-padding);\n ")]),$("right-placement","\n top: 0;\n bottom: 0;\n right: 0;\n border-top-left-radius: var(--n-border-radius);\n border-bottom-left-radius: var(--n-border-radius);\n ",[w("resize-trigger","\n width: 3px;\n height: 100%;\n top: 0;\n left: 0;\n transform: translateX(-1.5px);\n cursor: ew-resize;\n ")]),$("left-placement","\n top: 0;\n bottom: 0;\n left: 0;\n border-top-right-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n ",[w("resize-trigger","\n width: 3px;\n height: 100%;\n top: 0;\n right: 0;\n transform: translateX(1.5px);\n cursor: ew-resize;\n ")]),$("top-placement","\n top: 0;\n left: 0;\n right: 0;\n border-bottom-left-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n ",[w("resize-trigger","\n width: 100%;\n height: 3px;\n bottom: 0;\n left: 0;\n transform: translateY(1.5px);\n cursor: ns-resize;\n ")]),$("bottom-placement","\n left: 0;\n bottom: 0;\n right: 0;\n border-top-left-radius: var(--n-border-radius);\n border-top-right-radius: var(--n-border-radius);\n ",[w("resize-trigger","\n width: 100%;\n height: 3px;\n top: 0;\n left: 0;\n transform: translateY(-1.5px);\n cursor: ns-resize;\n ")])]),v("body",[v(">",[h("drawer-container","\n position: fixed;\n ")])]),h("drawer-container","\n position: relative;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n ",[v("> *","\n pointer-events: all;\n ")]),h("drawer-mask","\n background-color: rgba(0, 0, 0, .3);\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n ",[$("invisible","\n background-color: rgba(0, 0, 0, 0)\n "),y({enterDuration:"0.2s",leaveDuration:"0.2s",enterCubicBezier:"var(--n-bezier-in)",leaveCubicBezier:"var(--n-bezier-out)"})])]),K=S({name:"Drawer",inheritAttrs:!1,props:Object.assign(Object.assign({},o.props),{show:Boolean,width:[Number,String],height:[Number,String],placement:{type:String,default:"right"},maskClosable:{type:Boolean,default:!0},showMask:{type:[Boolean,String],default:!0},to:[String,Object],displayDirective:{type:String,default:"if"},nativeScrollbar:{type:Boolean,default:!0},zIndex:Number,onMaskClick:Function,scrollbarProps:Object,contentClass:String,contentStyle:[Object,String],trapFocus:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0},maxWidth:Number,maxHeight:Number,minWidth:Number,minHeight:Number,resizable:Boolean,defaultWidth:{type:[Number,String],default:251},defaultHeight:{type:[Number,String],default:251},onUpdateWidth:[Function,Array],onUpdateHeight:[Function,Array],"onUpdate:width":[Function,Array],"onUpdate:height":[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onAfterLeave:Function,drawerStyle:[String,Object],drawerClass:String,target:null,onShow:Function,onHide:Function}),setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:i}=m(e),s=u(),d=o("Drawer","-drawer",G,L,e,t),c=D(e.defaultWidth),h=D(e.defaultHeight),v=a(A(e,"width"),c),g=a(A(e,"height"),h),w=O(()=>{const{placement:t}=e;return"top"===t||"bottom"===t?"":f(v.value)}),y=O(()=>{const{placement:t}=e;return"left"===t||"right"===t?"":f(g.value)}),z=O(()=>[{width:w.value,height:y.value},e.drawerStyle||""]);function $(t){const{onMaskClick:n,maskClosable:r}=e;r&&S(!1),n&&n(t)}const x=U();function S(t){const{onHide:n,onUpdateShow:r,"onUpdate:show":o}=e;r&&l(r,t),o&&l(o,t),n&&!t&&l(n,t)}C(r,{isMountedRef:s,mergedThemeRef:d,mergedClsPrefixRef:t,doUpdateShow:S,doUpdateHeight:t=>{const{onUpdateHeight:n,"onUpdate:width":r}=e;n&&l(n,t),r&&l(r,t),h.value=t},doUpdateWidth:t=>{const{onUpdateWidth:n,"onUpdate:width":r}=e;n&&l(n,t),r&&l(r,t),c.value=t}});const k=O(()=>{const{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:n},self:{color:r,textColor:o,boxShadow:i,lineHeight:a,headerPadding:s,footerPadding:l,borderRadius:c,bodyPadding:u,titleFontSize:h,titleTextColor:m,titleFontWeight:v,headerBorderBottom:b,footerBorderTop:f,closeIconColor:p,closeIconColorHover:g,closeIconColorPressed:w,closeColorHover:y,closeColorPressed:z,closeIconSize:$,closeSize:x,closeBorderRadius:S,resizableTriggerColorHover:k}}=d.value;return{"--n-line-height":a,"--n-color":r,"--n-border-radius":c,"--n-text-color":o,"--n-box-shadow":i,"--n-bezier":e,"--n-bezier-out":n,"--n-bezier-in":t,"--n-header-padding":s,"--n-body-padding":u,"--n-footer-padding":l,"--n-title-text-color":m,"--n-title-font-size":h,"--n-title-font-weight":v,"--n-header-border-bottom":b,"--n-footer-border-top":f,"--n-close-icon-color":p,"--n-close-icon-color-hover":g,"--n-close-icon-color-pressed":w,"--n-close-size":x,"--n-close-color-hover":y,"--n-close-color-pressed":z,"--n-close-icon-size":$,"--n-close-border-radius":S,"--n-resize-trigger-color-hover":k}}),E=i?b("drawer",void 0,k,e):void 0;return{mergedClsPrefix:t,namespace:n,mergedBodyStyle:z,handleOutsideClick:function(e){$(e)},handleMaskClick:$,handleEsc:function(t){var n;null===(n=e.onEsc)||void 0===n||n.call(e),e.show&&e.closeOnEsc&&p(t)&&(x.value||S(!1))},mergedTheme:d,cssVars:i?void 0:k,themeClass:null==E?void 0:E.themeClass,onRender:null==E?void 0:E.onRender,isMounted:s}},render(){const{mergedClsPrefix:e}=this;return B(n,{to:this.to,show:this.show},{default:()=>{var t;return null===(t=this.onRender)||void 0===t||t.call(this),N(B("div",{class:[`${e}-drawer-container`,this.namespace,this.themeClass],style:this.cssVars,role:"none"},this.showMask?B(W,{name:"fade-in-transition",appear:this.isMounted},{default:()=>this.show?B("div",{"aria-hidden":!0,class:[`${e}-drawer-mask`,"transparent"===this.showMask&&`${e}-drawer-mask--invisible`],onClick:this.handleMaskClick}):null}):null,B(I,Object.assign({},this.$attrs,{class:[this.drawerClass,this.$attrs.class],style:[this.mergedBodyStyle,this.$attrs.style],blockScroll:this.blockScroll,contentStyle:this.contentStyle,contentClass:this.contentClass,placement:this.placement,scrollbarProps:this.scrollbarProps,show:this.show,displayDirective:this.displayDirective,nativeScrollbar:this.nativeScrollbar,onAfterEnter:this.onAfterEnter,onAfterLeave:this.onAfterLeave,trapFocus:this.trapFocus,autoFocus:this.autoFocus,resizable:this.resizable,maxHeight:this.maxHeight,minHeight:this.minHeight,maxWidth:this.maxWidth,minWidth:this.minWidth,showMask:this.showMask,onEsc:this.handleEsc,onClickoutside:this.handleOutsideClick}),this.$slots)),[[s,{zIndex:this.zIndex,enabled:this.show}]])}})}});function ee(e=520,t=null){const n=D("undefined"!=typeof window?window.innerWidth:1200),r=()=>{n.value=window.innerWidth};R(()=>{window.addEventListener("resize",r)}),E(()=>{window.removeEventListener("resize",r)});const o=O(()=>n.value<640),i=O(()=>n.value>=640&&n.value<1024);return{drawerWidth:O(()=>{if(n.value<640)return"100%";if(n.value<768)return Math.min(.95*n.value,e);if(n.value<1024){const r=t||e;return Math.min(.85*n.value,r)}return e}),isMobile:o,isTablet:i,windowWidth:n}}export{K as n,ee as t};
|
package/dist/web/index.html
CHANGED
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
<link rel="icon" href="/favicon.ico">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
7
|
<title>coding-tool-x · AI 编程工作台</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BKlAWTH-.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/vue-vendor-BqZbbXHA.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-BeLZJZij.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/vendors-D0c_0KLP.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/client-UDwXBP9i.js">
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/icons-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/platforms-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/platforms-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/use-message-
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/icons-DmFe4b5j.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/platforms-BmzzwnSw.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/platforms-DWXgmy2w.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/use-message-DqCwefG6.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/use-lock-html-scroll-DXIqmUW4.js">
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/light-
|
|
19
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/light-0eavxNvt.js">
|
|
19
|
+
<link rel="stylesheet" crossorigin href="/assets/index-3Lp6z8TQ.css">
|
|
20
20
|
</head>
|
|
21
21
|
<body>
|
|
22
22
|
<div id="app"></div>
|
package/package.json
CHANGED
package/src/commands/daemon.js
CHANGED
|
@@ -15,6 +15,17 @@ const { hasHostFlag } = require('../utils/cli-flags');
|
|
|
15
15
|
const { getPlatformRegistry, getPlatformRuntime } = require('../platforms/runtime');
|
|
16
16
|
const PM2_APP_NAME = 'cc-tool';
|
|
17
17
|
const STARTUP_LOG_FILE = 'cc-tool-out.log';
|
|
18
|
+
const PM2_RUNTIME_ENV_KEYS = [
|
|
19
|
+
'HOME',
|
|
20
|
+
'USERPROFILE',
|
|
21
|
+
'PATH',
|
|
22
|
+
'CODEX_HOME',
|
|
23
|
+
'OMP_COMMAND',
|
|
24
|
+
'OMP_CONFIG_DIR',
|
|
25
|
+
'OMP_PROFILE',
|
|
26
|
+
'PI_CODING_AGENT_DIR',
|
|
27
|
+
'OMP_CODING_AGENT_DIR'
|
|
28
|
+
];
|
|
18
29
|
const CURRENT_PM2_FORK_PATH = resolveCurrentPm2ForkPath();
|
|
19
30
|
|
|
20
31
|
function resolveCurrentPm2ForkPath() {
|
|
@@ -475,6 +486,21 @@ function buildStartOptions(port, enableHost, enableHttps) {
|
|
|
475
486
|
pmArgs.push('--https');
|
|
476
487
|
}
|
|
477
488
|
|
|
489
|
+
const env = {
|
|
490
|
+
NODE_ENV: 'production',
|
|
491
|
+
CC_TOOL_PORT: port
|
|
492
|
+
};
|
|
493
|
+
PM2_RUNTIME_ENV_KEYS.forEach((key) => {
|
|
494
|
+
if (key === 'CODEX_HOME'
|
|
495
|
+
|| key.startsWith('OMP_')
|
|
496
|
+
|| key.endsWith('_CODING_AGENT_DIR')) {
|
|
497
|
+
// Explicitly pass empty native path/profile overrides too, so PM2 cannot resurrect stale state.
|
|
498
|
+
env[key] = process.env[key] || '';
|
|
499
|
+
} else if (process.env[key]) {
|
|
500
|
+
env[key] = process.env[key];
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
|
|
478
504
|
return {
|
|
479
505
|
name: PM2_APP_NAME,
|
|
480
506
|
script: path.join(__dirname, '../index.js'),
|
|
@@ -484,10 +510,7 @@ function buildStartOptions(port, enableHost, enableHttps) {
|
|
|
484
510
|
autorestart: true,
|
|
485
511
|
kill_timeout: 5000,
|
|
486
512
|
max_memory_restart: '500M',
|
|
487
|
-
env
|
|
488
|
-
NODE_ENV: 'production',
|
|
489
|
-
CC_TOOL_PORT: port
|
|
490
|
-
},
|
|
513
|
+
env,
|
|
491
514
|
output: path.join(PATHS.logs, STARTUP_LOG_FILE),
|
|
492
515
|
error: path.join(PATHS.logs, STARTUP_LOG_FILE),
|
|
493
516
|
merge_logs: true,
|
package/src/commands/search.js
CHANGED
|
@@ -96,10 +96,14 @@ function reportDriverFailure(result) {
|
|
|
96
96
|
async function searchSessionsAcrossProjects(config = {}, keyword, limitOrOptions = 15, maybeOptions = {}) {
|
|
97
97
|
const { limit, options } = resolveLimitAndOptions(limitOrOptions, maybeOptions);
|
|
98
98
|
const spinner = ora(`[SEARCH] 正在搜索 "${keyword}"...`).start();
|
|
99
|
+
const operationOptions = { config };
|
|
100
|
+
for (const key of ['projectName', 'project', 'contextLength', 'force', 'consistency']) {
|
|
101
|
+
if (options[key] !== undefined) operationOptions[key] = options[key];
|
|
102
|
+
}
|
|
99
103
|
const result = await invokeSessionOperation(
|
|
100
104
|
config,
|
|
101
105
|
'searchAcrossProjects',
|
|
102
|
-
[keyword, limit,
|
|
106
|
+
[keyword, limit, operationOptions],
|
|
103
107
|
options
|
|
104
108
|
);
|
|
105
109
|
const searchResults = normalizeSearchResults(result);
|
|
@@ -128,7 +132,11 @@ async function searchSessionsAcrossProjects(config = {}, keyword, limitOrOptions
|
|
|
128
132
|
return [];
|
|
129
133
|
}
|
|
130
134
|
|
|
131
|
-
allResults.sort((a, b) =>
|
|
135
|
+
allResults.sort((a, b) => {
|
|
136
|
+
const aUpdated = searchTimestamp(a.updatedAt ?? a.lastUpdated ?? a.mtimeMs ?? a.mtime);
|
|
137
|
+
const bUpdated = searchTimestamp(b.updatedAt ?? b.lastUpdated ?? b.mtimeMs ?? b.mtime);
|
|
138
|
+
return bUpdated - aUpdated || a.sessionId.localeCompare(b.sessionId);
|
|
139
|
+
});
|
|
132
140
|
const totalMatches = allResults.reduce((sum, resultItem) => sum + resultItem.matchCount, 0);
|
|
133
141
|
|
|
134
142
|
console.clear();
|
|
@@ -183,6 +191,13 @@ async function searchSessionsAcrossProjects(config = {}, keyword, limitOrOptions
|
|
|
183
191
|
return choices;
|
|
184
192
|
}
|
|
185
193
|
|
|
194
|
+
function searchTimestamp(value) {
|
|
195
|
+
const numeric = Number(value);
|
|
196
|
+
if (Number.isFinite(numeric) && numeric > 0) return numeric;
|
|
197
|
+
const parsed = Date.parse(String(value || ''));
|
|
198
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
186
201
|
/**
|
|
187
202
|
* 处理搜索会话
|
|
188
203
|
*/
|