coding-tool-x 3.9.9-261027 → 3.9.9-261105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/web/assets/AgentsDrawer-DWnAsTH_.js +1 -0
- package/dist/web/assets/Analytics-D_WWRO5h.js +1 -0
- package/dist/web/assets/AssetPathField-CoIuoSZr.js +1 -0
- package/dist/web/assets/ChatHistoryDrawer-B_OnCpxR.js +1 -0
- package/dist/web/assets/CollapseItem-DEV7PQ-o.js +1 -0
- package/dist/web/assets/CommandsDrawer-gG61nb7a.js +1 -0
- package/dist/web/assets/ConfigExportDrawer-BkSzLSuZ.js +1 -0
- package/dist/web/assets/ConfigTemplates-DvEDpIso.js +1 -0
- package/dist/web/assets/ConfigTemplatesDrawer-DMPO4gjt.js +1 -0
- package/dist/web/assets/ConfigTemplatesPanel-BQe31_bq.js +1 -0
- package/dist/web/assets/Divider-CEqaZMTW.js +1 -0
- package/dist/web/assets/DrawerContent-BYlV968f.js +1 -0
- package/dist/web/assets/FavoritesDrawer-Y-MmIIE9.js +1 -0
- package/dist/web/assets/{Forward-DLCL7aMY.js → Forward-kgMPT2RI.js} +1 -1
- package/dist/web/assets/GatewayConvertDrawer-BvYhzJD6.js +1 -0
- package/dist/web/assets/Home-BOwk4kTa.js +1 -0
- package/dist/web/assets/MarkdownEditor-Bf9QKKaV.js +1 -0
- package/dist/web/assets/McpDrawer-B7cwI24B.js +1 -0
- package/dist/web/assets/McpFormDrawer-Djt5CJyE.js +1 -0
- package/dist/web/assets/PluginManager-B4J_hR0V.js +1 -0
- package/dist/web/assets/PluginsDrawer-Ch4x66-E.js +1 -0
- package/dist/web/assets/PluginsPanel-mqXBlKZg.js +1 -0
- package/dist/web/assets/ProjectList-DtmQyoPc.css +1 -0
- package/dist/web/assets/ProjectList-xToRgLVw.js +1 -0
- package/dist/web/assets/PromptsDrawer-VYrlk-F6.js +1 -0
- package/dist/web/assets/RecentSessionsDrawer-DCsgGSBu.js +1 -0
- package/dist/web/assets/SessionCard-C9n9lC_Y.css +1 -0
- package/dist/web/assets/SessionCard-DwzxeSe9.js +1 -0
- package/dist/web/assets/{SessionList-qG_XpPBJ.css → SessionList-CCuKp6ib.css} +1 -1
- package/dist/web/assets/SessionList-GqzUHgOu.js +1 -0
- package/dist/web/assets/SettingsDrawer-Q_aTOBhf.js +1 -0
- package/dist/web/assets/SkillManager-B1B58WKe.js +1 -0
- package/dist/web/assets/SkillsDrawer-Ch1b1hLn.js +1 -0
- package/dist/web/assets/SkillsPanel-B_xxyDpy.js +1 -0
- package/dist/web/assets/{Upload-xqorL26i.js → Upload-B6Kn1TvG.js} +1 -1
- package/dist/web/assets/WorkspaceDrawer-C3w-Z87U.js +1 -0
- package/dist/web/assets/WorkspaceManager-BFzjeEWh.js +1 -0
- package/dist/web/assets/WorkspacePanel-DkrwFSLs.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-DyHLuIR4.js +1 -0
- package/dist/web/assets/{client-oU6RT-6I.js → client-B31QOzWk.js} +1 -1
- package/dist/web/assets/{dsh-agent-presets-DjJRVMT6.js → dsh-agent-presets-DopJnuAZ.js} +1 -1
- package/dist/web/assets/headers-nTUGmJee.js +1 -0
- package/dist/web/assets/{icons-B-AzZoeE.js → icons-C6KNTFqo.js} +1 -1
- package/dist/web/assets/index-BXWpib7P.js +2 -0
- package/dist/web/assets/{index-DjIuAtaS.css → index-CvL_fRpL.css} +1 -1
- package/dist/web/assets/light-DeIjG9s_.js +1 -0
- package/dist/web/assets/markdown-xLK9ekFg.js +1 -0
- package/dist/web/assets/platforms-BdTllxKt.js +1 -0
- package/dist/web/assets/{platforms-p9AiybLU.js → platforms-CDltfh5G.js} +1 -1
- package/dist/web/assets/{project-config-CzFKBw_m.js → project-config-C16yaWHF.js} +1 -1
- package/dist/web/assets/rolldown-runtime-DcNxTHDL.js +1 -0
- package/dist/web/assets/sessions-B4RD8wDx.js +1 -0
- package/dist/web/assets/{sessions-DJiJJgvg.js → sessions-Xl0HAvhA.js} +1 -1
- package/dist/web/assets/use-lock-html-scroll-Bu94jdUB.js +1 -0
- package/dist/web/assets/use-message-BYx0IRj1.js +1 -0
- package/dist/web/assets/useResponsiveDrawer-Deh7Xdcj.js +1 -0
- package/dist/web/assets/vendors-CvGw6U_t.js +1 -0
- package/dist/web/assets/vue-vendor-Cr_NLmXY.js +1 -0
- package/dist/web/assets/{workspaces-D2yLnT-B.js → workspaces-Y7hS24p2.js} +1 -1
- package/dist/web/assets/xml-B78loRzO.js +1 -0
- package/dist/web/index.html +13 -12
- package/package.json +3 -3
- package/src/config/model-metadata.json +30 -4
- package/src/platforms/drivers/dsh/api-operations.js +1 -1
- package/src/platforms/drivers/dsh/channels-implementation.js +10 -0
- package/src/platforms/drivers/dsh/channels.js +10 -0
- package/src/platforms/drivers/dsh/proxy-implementation.js +7 -1
- package/src/platforms/drivers/dsh/sessions.js +5 -1
- package/src/platforms/manifest-schema.js +1 -1
- package/src/platforms/manifests/dsh.json +8 -0
- package/src/server/services/model-detector.js +22 -3
- package/dist/web/assets/AgentsDrawer-CKEf8ie1.js +0 -1
- package/dist/web/assets/Analytics-0BCMxQ-o.js +0 -1
- package/dist/web/assets/AssetPathField-pfN6L814.js +0 -1
- package/dist/web/assets/ChatHistoryDrawer-nuUPRqje.js +0 -1
- package/dist/web/assets/CollapseItem-B2SdqQp2.js +0 -1
- package/dist/web/assets/CommandsDrawer-D8m0qLzQ.js +0 -1
- package/dist/web/assets/ConfigExportDrawer-BlCBLdue.js +0 -1
- package/dist/web/assets/ConfigTemplates-CePBARK8.js +0 -1
- package/dist/web/assets/ConfigTemplatesDrawer-DbVY4rD1.js +0 -1
- package/dist/web/assets/ConfigTemplatesPanel-CwYPLEFV.js +0 -1
- package/dist/web/assets/Divider-BLLhMTSt.js +0 -1
- package/dist/web/assets/DrawerContent-ChXgZ1Xm.js +0 -1
- package/dist/web/assets/FavoritesDrawer-BKAKQNqP.js +0 -1
- package/dist/web/assets/GatewayConvertDrawer-D2MFXcqS.js +0 -1
- package/dist/web/assets/Home-BmElvXVZ.js +0 -1
- package/dist/web/assets/MarkdownEditor-buNC2iDj.js +0 -1
- package/dist/web/assets/McpDrawer-NBjAyFU5.js +0 -1
- package/dist/web/assets/McpFormDrawer-BUnW9j4A.js +0 -1
- package/dist/web/assets/PluginManager-BgHpsF5S.js +0 -1
- package/dist/web/assets/PluginsDrawer-CFnmqzV0.js +0 -1
- package/dist/web/assets/PluginsPanel-ClSdnSCu.js +0 -1
- package/dist/web/assets/ProjectList-CjlHEyU1.js +0 -1
- package/dist/web/assets/ProjectList-VbIYSHbH.css +0 -1
- package/dist/web/assets/PromptsDrawer-xeSGgpCd.js +0 -1
- package/dist/web/assets/RecentSessionsDrawer-DELB6-rU.js +0 -1
- package/dist/web/assets/SessionCard-BaH42eOe.js +0 -1
- package/dist/web/assets/SessionCard-aM2NHu6i.css +0 -1
- package/dist/web/assets/SessionList-BGB9GwYE.js +0 -1
- package/dist/web/assets/SettingsDrawer-DdYC8GIa.js +0 -1
- package/dist/web/assets/SkillManager-CF7EiSps.js +0 -1
- package/dist/web/assets/SkillsDrawer-Bc5zA1bk.js +0 -1
- package/dist/web/assets/SkillsPanel-SnzwzqW5.js +0 -1
- package/dist/web/assets/WorkspaceDrawer-DBiEnZ7j.js +0 -1
- package/dist/web/assets/WorkspaceManager-C1dNfoAy.js +0 -1
- package/dist/web/assets/WorkspacePanel-CWNQZjm1.js +0 -1
- package/dist/web/assets/_plugin-vue_export-helper-BeLZJZij.js +0 -1
- package/dist/web/assets/headers-DbowkmZJ.js +0 -1
- package/dist/web/assets/index-BKpL4XdU.js +0 -2
- package/dist/web/assets/light-C2X7hegj.js +0 -1
- package/dist/web/assets/markdown-u082bbtj.js +0 -1
- package/dist/web/assets/platforms-Cq6XDXfy.js +0 -1
- package/dist/web/assets/sessions-DSLpMXCq.js +0 -1
- package/dist/web/assets/use-lock-html-scroll-DXIqmUW4.js +0 -1
- package/dist/web/assets/use-message-DBsCm7FJ.js +0 -1
- package/dist/web/assets/useResponsiveDrawer-CTQPBATk.js +0 -1
- package/dist/web/assets/vendors-D0c_0KLP.js +0 -1
- package/dist/web/assets/vue-vendor-BqZbbXHA.js +0 -1
- package/dist/web/assets/xml-CgY3RMlX.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,A as n,Dt as t,E as r,Et as o,H as i,Ht as l,I as a,It as s,L as d,N as u,O as c,Ot as p,Qt as h,Rt as f,Tn as g,Tt as v,Yt as m,Zt as w,bn as b,gn as x,gt as y,hn as C,ht as R,j as k,jt as P,k as S,mt as O,nn as L,rn as z,s as $,tn as T,vn as B,w as D,xn as j,xt as I,yn as A}from"./_plugin-vue_export-helper-BeLZJZij.js";import{A as U,G as M,I as E,M as F,N as H,Q as N,V as W,Z,_ as q,b as _,dt as V,f as X,ft as G,g as Y,gt as J,l as Q,st as K,tt as ee,z as ne}from"./vue-vendor-BqZbbXHA.js";import{F as te,h as re,v as oe}from"./use-message-DBsCm7FJ.js";import{M as ie,N as le,P as ae,j as se}from"./light-C2X7hegj.js";import{F as de,R as ue,V as ce,Y as pe,_t as he,lt as fe}from"./index-BKpL4XdU.js";function ge(e,n){if(!e)return;const t=document.createElement("a");t.href=e,void 0!==n&&(t.download=n),document.body.appendChild(t),t.click(),document.body.removeChild(t)}var ve,me=(ve={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==ve?void 0:ve[e]}),we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var xe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ce="\\ud800-\\udfff",Re="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="["+Se+"]",Le="\\d+",ze="["+Re+"]",$e="["+ke+"]",Te="[^"+Ce+Se+Le+Re+ke+Pe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Pe+"]",Ie="(?:"+$e+"|"+Te+")",Ae="(?:"+je+"|"+Te+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Me="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ee="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Fe="[\\ufe0e\\ufe0f]?",He=Fe+Ee+("(?:\\u200d(?:"+["[^"+Ce+"]",Be,De].join("|")+")"+Fe+Ee+")*"),Ne="(?:"+[ze,Be,De].join("|")+")"+He,We=RegExp([je+"?"+$e+"+"+Ue+"(?="+[Oe,je,"$"].join("|")+")",Ae+"+"+Me+"(?="+[Oe,je+Ie,"$"].join("|")+")",je+"?"+Ie+"+"+Ue,je+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ne].join("|"),"g");function Ze(e,n,t){return e=i(e),void 0===(n=t?void 0:n)?function(e){return ye.test(e)}(e)?function(e){return e.match(We)||[]}(e):function(e){return e.match(xe)||[]}(e):e.match(n)||[]}var qe=RegExp("['’]","g");var _e,Ve=(_e=function(e,n,t){return e+(t?"-":"")+n.toLowerCase()},function(e){return function(e,n,t,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(t=e[++o]);++o<i;)t=n(t,e[o],o,e);return t}(Ze(function(e){return(e=i(e))&&e.replace(we,me).replace(be,"")}(e).replace(qe,"")),_e,"")}),Xe=S("attach",()=>F("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},F("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},F("g",{fill:"currentColor","fill-rule":"nonzero"},F("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),Ge=S("cancel",()=>F("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},F("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},F("g",{fill:"currentColor","fill-rule":"nonzero"},F("path",{d:"M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z"}))))),Ye=S("download",()=>F("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},F("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},F("g",{fill:"currentColor","fill-rule":"nonzero"},F("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),Je=U({name:"ResizeSmall",render:()=>F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},F("g",{fill:"none"},F("path",{d:"M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z",fill:"currentColor"})))}),Qe=S("retry",()=>F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},F("path",{d:"M320,146s24.36-12-64-12A160,160,0,1,0,416,294",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;"}),F("polyline",{points:"256 58 336 138 256 218",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),Ke=S("rotateClockwise",()=>F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z",fill:"currentColor"}),F("path",{d:"M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z",fill:"currentColor"}))),en=S("rotateClockwise",()=>F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z",fill:"currentColor"}),F("path",{d:"M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z",fill:"currentColor"}))),nn=S("trash",()=>F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},F("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),F("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),F("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),F("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),tn=S("zoomIn",()=>F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z",fill:"currentColor"}),F("path",{d:"M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z",fill:"currentColor"}))),rn=S("zoomOut",()=>F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z",fill:"currentColor"}),F("path",{d:"M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z",fill:"currentColor"}))),on=l&&"loading"in document.createElement("img");var ln=new WeakMap,an=new WeakMap,sn=new WeakMap,dn=(e,n,t)=>{if(!e)return()=>{};const r=function(e={}){var n;const{root:t=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):null!==(n=e.threshold)&&void 0!==n?n:"0"}`,options:Object.assign(Object.assign({},e),{root:("string"==typeof t?document.querySelector(t):t)||document.documentElement})}}(n),{root:o}=r.options;let i;const l=ln.get(o);let a,s;l?i=l:(i=new Map,ln.set(o,i)),i.has(r.hash)?(s=i.get(r.hash),s[1].has(e)||(a=s[0],s[1].add(e),a.observe(e))):(a=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=an.get(e.target),t=sn.get(e.target);n&&n(),t&&(t.value=!0)}})},r.options),a.observe(e),s=[a,new Set([e])],i.set(r.hash,s));let d=!1;const u=()=>{d||(an.delete(e),sn.delete(e),d=!0,s[1].has(e)&&(s[0].unobserve(e),s[1].delete(e)),s[1].size<=0&&i.delete(r.hash),i.size||ln.delete(o))};return an.set(e,u),sn.set(e,t),u};function un(){return F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z",fill:"currentColor"}))}function cn(){return F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z",fill:"currentColor"}))}function pn(){return F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z",fill:"currentColor"}))}var hn=Object.assign(Object.assign({},u.props),{onPreviewPrev:Function,onPreviewNext:Function,showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean,renderToolbar:Function}),fn=m("n-image"),gn=C([C("body >",[x("image-container","position: fixed;")]),x("image-preview-container","\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n "),x("image-preview-overlay","\n z-index: -1;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(0, 0, 0, .3);\n ",[D()]),x("image-preview-toolbar","\n z-index: 1;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n border-radius: var(--n-toolbar-border-radius);\n height: 48px;\n bottom: 40px;\n padding: 0 12px;\n background: var(--n-toolbar-color);\n box-shadow: var(--n-toolbar-box-shadow);\n color: var(--n-toolbar-icon-color);\n transition: color .3s var(--n-bezier);\n display: flex;\n align-items: center;\n ",[x("base-icon","\n padding: 0 8px;\n font-size: 28px;\n cursor: pointer;\n "),D()]),x("image-preview-wrapper","\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n pointer-events: none;\n ",[re()]),x("image-preview","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: all;\n margin: auto;\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n transition: transform .3s var(--n-bezier);\n "),x("image","\n display: inline-flex;\n max-height: 100%;\n max-width: 100%;\n ",[b("preview-disabled","\n cursor: pointer;\n "),C("img","\n border-radius: inherit;\n ")])]),vn=U({name:"ImagePreview",props:Object.assign(Object.assign({},hn),{src:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onNext:Function,onPrev:Function,onClose:[Function,Array]}),setup(e){const{src:n}=G(e),{mergedClsPrefixRef:t}=y(e),r=u("Image","-image",gn,de,e,t);let o=null;const i=K(null),l=K(null),a=K(!1),{localeRef:s}=d("Image"),c=K(e.defaultShow),p=V(e,"show"),f=h(p,c);function g(n){var t,r;switch(n.key){case" ":n.preventDefault();break;case"ArrowLeft":null===(t=e.onPrev)||void 0===t||t.call(e);break;case"ArrowRight":null===(r=e.onNext)||void 0===r||r.call(e);break;case"ArrowUp":n.preventDefault(),W();break;case"ArrowDown":n.preventDefault(),q();break;case"Escape":Y()}}function m(n){const{onUpdateShow:t,"onUpdate:show":r}=e;t&&v(t,n),r&&v(r,n),c.value=n,a.value=!0}Z(f,e=>{e?L("keydown",document,g):T("keydown",document,g)}),ne(()=>{T("keydown",document,g)});let b=0,x=0,C=0,k=0,P=0,S=0,O=0,z=0,$=!1;function B(e){const{clientX:n,clientY:t}=e;C=n-b,k=t-x,te(X)}function D(e){const{value:n}=i;if(!n)return{offsetX:0,offsetY:0};const t=n.getBoundingClientRect(),{moveVerticalDirection:r,moveHorizontalDirection:o,deltaHorizontal:l,deltaVertical:a}=e||{};let s=0,d=0;return s=t.width<=window.innerWidth?0:t.left>0?(t.width-window.innerWidth)/2:t.right<window.innerWidth?-(t.width-window.innerWidth)/2:"horizontalRight"===o?Math.min((t.width-window.innerWidth)/2,P-(null!=l?l:0)):Math.max(-(t.width-window.innerWidth)/2,P-(null!=l?l:0)),d=t.height<=window.innerHeight?0:t.top>0?(t.height-window.innerHeight)/2:t.bottom<window.innerHeight?-(t.height-window.innerHeight)/2:"verticalBottom"===r?Math.min((t.height-window.innerHeight)/2,S-(null!=a?a:0)):Math.max(-(t.height-window.innerHeight)/2,S-(null!=a?a:0)),{offsetX:s,offsetY:d}}function j(e){T("mousemove",document,B),T("mouseup",document,j);const{clientX:n,clientY:t}=e;$=!1;const r=D(function(e){const{mouseUpClientX:n,mouseUpClientY:t,mouseDownClientX:r,mouseDownClientY:o}=e,i=r-n,l=o-t;return{moveVerticalDirection:"vertical"+(l>0?"Top":"Bottom"),moveHorizontalDirection:"horizontal"+(i>0?"Left":"Right"),deltaHorizontal:i,deltaVertical:l}}({mouseUpClientX:n,mouseUpClientY:t,mouseDownClientX:O,mouseDownClientY:z}));C=r.offsetX,k=r.offsetY,X()}const I=H(fn,null);let A=0,U=1,M=0;function E(){U=1,A=0}function N(){const{value:e}=i;if(!e)return 1;const{innerWidth:n,innerHeight:t}=window,r=e.naturalHeight/(t-32),o=e.naturalWidth/(n-32);return r<1&&o<1?1:Math.max(r,o)}function W(){const e=function(){const{value:e}=i;if(!e)return 1;const{innerWidth:n,innerHeight:t}=window,r=Math.max(1,e.naturalHeight/(t-32)),o=Math.max(1,e.naturalWidth/(n-32));return Math.max(3,2*r,2*o)}();U<e&&(A+=1,U=Math.min(e,Math.pow(1.5,A)),X())}function q(){if(U>.5){const e=U;A-=1,U=Math.max(.5,Math.pow(1.5,A));const n=e-U;X(!1);const t=D();U+=n,X(!1),U-=n,C=t.offsetX,k=t.offsetY,X()}}function X(e=!0){var n;const{value:t}=i;if(!t)return;const{style:r}=t,o=J(null===(n=null==I?void 0:I.previewedImgPropsRef.value)||void 0===n?void 0:n.style);let l="";if("string"==typeof o)l=`${o};`;else for(const i in o)l+=`${Ve(i)}: ${o[i]};`;const a=`transform-origin: center; transform: translateX(${C}px) translateY(${k}px) rotate(${M}deg) scale(${U});`;r.cssText=$?`${l}cursor: grabbing; transition: none;${a}`:`${l}cursor: grab;${a}${e?"":"transition: none;"}`,e||t.offsetHeight}function Y(){if(f.value){const{onClose:n}=e;n&&v(n),m(!1),c.value=!1}}const Q={setThumbnailEl:e=>{o=e}};const ee=_(()=>{const{common:{cubicBezierEaseInOut:e},self:{toolbarIconColor:n,toolbarBorderRadius:t,toolbarBoxShadow:o,toolbarColor:i}}=r.value;return{"--n-bezier":e,"--n-toolbar-icon-color":n,"--n-toolbar-color":i,"--n-toolbar-border-radius":t,"--n-toolbar-box-shadow":o}}),{inlineThemeDisabled:re}=y(),oe=re?R("image-preview",void 0,ee,e):void 0;return Object.assign({clsPrefix:t,previewRef:i,previewWrapperRef:l,previewSrc:n,mergedShow:f,appear:w(),displayed:a,previewedImgProps:null==I?void 0:I.previewedImgPropsRef,handleWheel:function(e){e.preventDefault()},handlePreviewMousedown:function(e){var n,t;if(null===(t=null===(n=null==I?void 0:I.previewedImgPropsRef.value)||void 0===n?void 0:n.onMousedown)||void 0===t||t.call(n,e),0!==e.button)return;const{clientX:r,clientY:o}=e;$=!0,b=r-C,x=o-k,P=C,S=k,O=r,z=o,X(),L("mousemove",document,B),L("mouseup",document,j)},handlePreviewDblclick:function(e){var n,t;null===(t=null===(n=null==I?void 0:I.previewedImgPropsRef.value)||void 0===n?void 0:n.onDblclick)||void 0===t||t.call(n,e);const r=N();U=U===r?1:r,X()},syncTransformOrigin:function(){const{value:e}=l;if(!o||!e)return;const{style:n}=e,t=o.getBoundingClientRect();n.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`},handleAfterLeave:()=>{E(),M=0,a.value=!1},handleDragStart:e=>{var n,t;null===(t=null===(n=null==I?void 0:I.previewedImgPropsRef.value)||void 0===n?void 0:n.onDragstart)||void 0===t||t.call(n,e),e.preventDefault()},zoomIn:W,zoomOut:q,handleDownloadClick:function(){const e=n.value;e&&ge(e,void 0)},rotateCounterclockwise:function(){M-=90,X()},rotateClockwise:function(){M+=90,X()},handleSwitchPrev:function(){var n;E(),M=0,null===(n=e.onPrev)||void 0===n||n.call(e)},handleSwitchNext:function(){var n;E(),M=0,null===(n=e.onNext)||void 0===n||n.call(e)},withTooltip:function(n,t){if(e.showToolbarTooltip){const{value:e}=r;return F(pe,{to:!1,theme:e.peers.Tooltip,themeOverrides:e.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>s.value[t],trigger:()=>n})}return n},resizeToOrignalImageSize:function(){U=N(),A=Math.ceil(Math.log(U)/Math.log(1.5)),C=0,k=0,X()},cssVars:re?void 0:ee,themeClass:null==oe?void 0:oe.themeClass,onRender:null==oe?void 0:oe.onRender,doUpdateShow:m,close:Y},Q)},render(){var e,n;const{clsPrefix:t,renderToolbar:r,withTooltip:o}=this,i=o(F(k,{clsPrefix:t,onClick:this.handleSwitchPrev},{default:un}),"tipPrevious"),l=o(F(k,{clsPrefix:t,onClick:this.handleSwitchNext},{default:cn}),"tipNext"),a=o(F(k,{clsPrefix:t,onClick:this.rotateCounterclockwise},{default:()=>F(en,null)}),"tipCounterclockwise"),d=o(F(k,{clsPrefix:t,onClick:this.rotateClockwise},{default:()=>F(Ke,null)}),"tipClockwise"),u=o(F(k,{clsPrefix:t,onClick:this.resizeToOrignalImageSize},{default:()=>F(Je,null)}),"tipOriginalSize"),c=o(F(k,{clsPrefix:t,onClick:this.zoomOut},{default:()=>F(rn,null)}),"tipZoomOut"),p=o(F(k,{clsPrefix:t,onClick:this.handleDownloadClick},{default:()=>F(Ye,null)}),"tipDownload"),h=o(F(k,{clsPrefix:t,onClick:()=>this.close()},{default:pn}),"tipClose"),g=o(F(k,{clsPrefix:t,onClick:this.zoomIn},{default:()=>F(tn,null)}),"tipZoomIn");return F(Y,null,null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e),F(s,{show:this.mergedShow},{default:()=>{var e;return this.mergedShow||this.displayed?(null===(e=this.onRender)||void 0===e||e.call(this),ee(F("div",{ref:"containerRef",class:[`${t}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},F(Q,{name:"fade-in-transition",appear:this.appear},{default:()=>this.mergedShow?F("div",{class:`${t}-image-preview-overlay`,onClick:()=>this.close()}):null}),this.showToolbar?F(Q,{name:"fade-in-transition",appear:this.appear},{default:()=>this.mergedShow?F("div",{class:`${t}-image-preview-toolbar`},r?r({nodes:{prev:i,next:l,rotateCounterclockwise:a,rotateClockwise:d,resizeToOriginalSize:u,zoomOut:c,zoomIn:g,download:p,close:h}}):F(Y,null,this.onPrev?F(Y,null,i,l):null,a,d,u,c,g,p,h)):null}):null,F(Q,{name:"fade-in-scale-up-transition",onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{const{previewedImgProps:e={}}=this;return ee(F("div",{class:`${t}-image-preview-wrapper`,ref:"previewWrapperRef"},F("img",Object.assign({},e,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${t}-image-preview`,e.class],key:this.previewSrc,src:this.previewSrc,ref:"previewRef",onDragstart:this.handleDragStart}))),[[X,this.mergedShow]])}})),[[f,{enabled:this.mergedShow}]])):null}}))}}),mn=m("n-image-group"),wn=U({name:"ImageGroup",props:Object.assign(Object.assign({},hn),{srcList:Array,current:Number,defaultCurrent:{type:Number,default:0},show:{type:Boolean,default:void 0},defaultShow:Boolean,onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],onUpdateCurrent:[Function,Array],"onUpdate:current":[Function,Array]}),setup(e){const{mergedClsPrefixRef:n}=y(e),r=`c${z()}`,o=K(null),i=K(e.defaultShow),l=V(e,"show"),a=h(l,i),s=K(new Map),d=_(()=>{if(e.srcList){const n=new Map;return e.srcList.forEach((e,t)=>{n.set(`p${t}`,e)}),n}return s.value}),u=_(()=>Array.from(d.value.keys())),c=()=>u.value.length;const p=K(e.defaultCurrent),f=V(e,"current"),g=h(f,p),m=n=>{if(n!==g.value){const{onUpdateCurrent:t,"onUpdate:current":r}=e;t&&v(t,n),r&&v(r,n),p.value=n}},w=_(()=>u.value[g.value]),b=_(()=>d.value.get(w.value));function x(n){const{onUpdateShow:t,"onUpdate:show":r}=e;t&&v(t,n),r&&v(r,n),i.value=n}const C=_(()=>{const e=(e,n)=>{for(let t=e;t<=n;t++){const e=u.value[t];if(d.value.get(e))return t}},n=e(g.value+1,c()-1);return void 0===n?e(0,g.value-1):n}),R=_(()=>{const e=(e,n)=>{for(let t=e;t>=n;t--){const e=u.value[t];if(d.value.get(e))return t}},n=e(g.value-1,0);return void 0===n?e(c()-1,g.value+1):n});function k(n){var t,r;1===n?(void 0!==R.value&&m(C.value),null===(t=e.onPreviewNext)||void 0===t||t.call(e)):(void 0!==C.value&&m(R.value),null===(r=e.onPreviewPrev)||void 0===r||r.call(e))}return M(mn,{mergedClsPrefixRef:n,registerImageUrl:function(n,r){e.srcList&&t("image-group","`n-image` can't be placed inside `n-image-group` when image group's `src-list` prop is set.");const o=`r${n}`;return s.value.has(`r${o}`)||s.value.set(o,r),function(){s.value.has(o)||s.value.delete(o)}},setThumbnailEl:e=>{var n;null===(n=o.value)||void 0===n||n.setThumbnailEl(e)},toggleShow:e=>{x(!0),(e=>{const n=u.value.indexOf(e);n!==g.value&&m(n)})(e)},groupId:r,renderToolbarRef:V(e,"renderToolbar")}),{mergedClsPrefix:n,previewInstRef:o,mergedShow:a,src:b,onClose:function(){x(!1)},next:()=>{k(1)},prev:()=>{k(-1)}}},render(){return F(vn,{theme:this.theme,themeOverrides:this.themeOverrides,ref:"previewInstRef",onPrev:this.prev,onNext:this.next,src:this.src,show:this.mergedShow,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,onClose:this.onClose},this.$slots)}}),bn=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:"fill"},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},hn),xn=0,yn=U({name:"Image",props:bn,slots:Object,inheritAttrs:!1,setup(e){const n=K(null),t=K(!1),r=K(null),o=H(mn,null),{mergedClsPrefixRef:i}=o||y(e),l=_(()=>e.previewSrc||e.src),a=K(!1),s=xn++,d=()=>{if(e.previewDisabled||t.value)return;if(o)return o.setThumbnailEl(n.value),void o.toggleShow(`r${s}`);const{value:i}=r;i&&(i.setThumbnailEl(n.value),a.value=!0)},u={click:()=>{d()},showPreview:d},c=K(!e.lazy);W(()=>{var e;null===(e=n.value)||void 0===e||e.setAttribute("data-group-id",(null==o?void 0:o.groupId)||"")}),W(()=>{if(e.lazy&&e.intersectionObserverOptions){let t;const r=N(()=>{null==t||t(),t=void 0,t=dn(n.value,e.intersectionObserverOptions,c)});ne(()=>{r(),null==t||t()})}}),N(()=>{var n;e.src||null===(n=e.imgProps)||void 0===n||n.src,t.value=!1}),N(e=>{var n;const t=null===(n=null==o?void 0:o.registerImageUrl)||void 0===n?void 0:n.call(o,s,l.value||"");e(()=>{null==t||t()})});const p=K(!1);return M(fn,{previewedImgPropsRef:V(e,"previewedImgProps")}),Object.assign({mergedClsPrefix:i,groupId:null==o?void 0:o.groupId,previewInstRef:r,imageRef:n,mergedPreviewSrc:l,showError:t,shouldStartLoading:c,loaded:p,mergedOnClick:n=>{!function(n){var t,r;u.showPreview(),null===(r=null===(t=e.imgProps)||void 0===t?void 0:t.onClick)||void 0===r||r.call(t,n)}(n)},onPreviewClose:function(){a.value=!1},mergedOnError:n=>{if(!c.value)return;t.value=!0;const{onError:r,imgProps:{onError:o}={}}=e;null==r||r(n),null==o||o(n)},mergedOnLoad:n=>{const{onLoad:t,imgProps:{onLoad:r}={}}=e;null==t||t(n),null==r||r(n),p.value=!0},previewShow:a},u)},render(){var e,n;const{mergedClsPrefix:t,imgProps:r={},loaded:o,$attrs:i,lazy:l}=this,a=I(this.$slots.error,()=>[]),s=null===(n=(e=this.$slots).placeholder)||void 0===n?void 0:n.call(e),d=this.src||r.src,u=this.showError&&a.length?a:F("img",Object.assign(Object.assign({},r),{ref:"imageRef",width:this.width||r.width,height:this.height||r.height,src:this.showError?this.fallbackSrc:l&&this.intersectionObserverOptions?this.shouldStartLoading?d:void 0:d,alt:this.alt||r.alt,"aria-label":this.alt||r.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:on&&l&&!this.intersectionObserverOptions?"lazy":"eager",style:[r.style||"",s&&!o?{height:"0",width:"0",visibility:"hidden"}:"",{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return F("div",Object.assign({},i,{role:"none",class:[i.class,`${t}-image`,(this.previewDisabled||this.showError)&&`${t}-image--preview-disabled`]}),this.groupId?u:F(vn,{theme:this.theme,themeOverrides:this.themeOverrides,ref:"previewInstRef",showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,src:this.mergedPreviewSrc,show:!this.previewDisabled&&this.previewShow,onClose:this.onPreviewClose},{default:()=>u}),!o&&s)}}),Cn={success:F(ie,null),error:F(ae,null),warning:F(se,null),info:F(le,null)},Rn=U({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:[String,Object],railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:n}){const t=_(()=>{const n="gradient",{fillColor:t}=e;return"object"==typeof t?`${n}-${g(JSON.stringify(t))}`:n});function r(n,r,o,i){const{gapDegree:l,viewBoxWidth:a,strokeWidth:s}=e,d=50,u=50+s/2,c=`M ${u},${u} m 0,50\n a 50,50 0 1 1 0,-100\n a 50,50 0 1 1 0,100`,p=2*Math.PI*d;return{pathString:c,pathStyle:{stroke:"rail"===i?o:"object"==typeof e.fillColor?`url(#${t.value})`:o,strokeDasharray:`${Math.min(n,100)/100*(p-l)}px ${8*a}px`,strokeDashoffset:`-${l/2}px`,transformOrigin:r?"center":void 0,transform:r?`rotate(${r}deg)`:void 0}}}return()=>{const{fillColor:o,railColor:i,strokeWidth:l,offsetDegree:a,status:s,percentage:d,showIndicator:u,indicatorTextColor:c,unit:p,gapOffsetDegree:h,clsPrefix:f}=e,{pathString:g,pathStyle:v}=r(100,0,i,"rail"),{pathString:m,pathStyle:w}=r(d,a,o,"fill"),b=100+l;return F("div",{class:`${f}-progress-content`,role:"none"},F("div",{class:`${f}-progress-graph`,"aria-hidden":!0},F("div",{class:`${f}-progress-graph-circle`,style:{transform:h?`rotate(${h}deg)`:void 0}},F("svg",{viewBox:`0 0 ${b} ${b}`},(()=>{const n="object"==typeof e.fillColor,r=n?e.fillColor.stops[0]:"",o=n?e.fillColor.stops[1]:"";return n&&F("defs",null,F("linearGradient",{id:t.value,x1:"0%",y1:"100%",x2:"100%",y2:"0%"},F("stop",{offset:"0%","stop-color":r}),F("stop",{offset:"100%","stop-color":o})))})(),F("g",null,F("path",{class:`${f}-progress-graph-circle-rail`,d:g,"stroke-width":l,"stroke-linecap":"round",fill:"none",style:v})),F("g",null,F("path",{class:[`${f}-progress-graph-circle-fill`,0===d&&`${f}-progress-graph-circle-fill--empty`],d:m,"stroke-width":l,"stroke-linecap":"round",fill:"none",style:w}))))),u?F("div",null,n.default?F("div",{class:`${f}-progress-custom-content`,role:"none"},n.default()):"default"!==s?F("div",{class:`${f}-progress-icon`,"aria-hidden":!0},F(k,{clsPrefix:f},{default:()=>Cn[s]})):F("div",{class:`${f}-progress-text`,style:{color:c},role:"none"},F("span",{class:`${f}-progress-text__percentage`},d),F("span",{class:`${f}-progress-text__unit`},p))):null)}}}),kn={success:F(ie,null),error:F(ae,null),warning:F(se,null),info:F(le,null)},Pn=U({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:[String,Object],status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:n}){const t=_(()=>P(e.height)),r=_(()=>{var n,t;return"object"==typeof e.fillColor?`linear-gradient(to right, ${null===(n=e.fillColor)||void 0===n?void 0:n.stops[0]} , ${null===(t=e.fillColor)||void 0===t?void 0:t.stops[1]})`:e.fillColor}),o=_(()=>void 0!==e.railBorderRadius?P(e.railBorderRadius):void 0!==e.height?P(e.height,{c:.5}):""),i=_(()=>void 0!==e.fillBorderRadius?P(e.fillBorderRadius):void 0!==e.railBorderRadius?P(e.railBorderRadius):void 0!==e.height?P(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:l,railColor:a,railStyle:s,percentage:d,unit:u,indicatorTextColor:c,status:p,showIndicator:h,processing:f,clsPrefix:g}=e;return F("div",{class:`${g}-progress-content`,role:"none"},F("div",{class:`${g}-progress-graph`,"aria-hidden":!0},F("div",{class:[`${g}-progress-graph-line`,{[`${g}-progress-graph-line--indicator-${l}`]:!0}]},F("div",{class:`${g}-progress-graph-line-rail`,style:[{backgroundColor:a,height:t.value,borderRadius:o.value},s]},F("div",{class:[`${g}-progress-graph-line-fill`,f&&`${g}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,background:r.value,height:t.value,lineHeight:t.value,borderRadius:i.value}},"inside"===l?F("div",{class:`${g}-progress-graph-line-indicator`,style:{color:c}},n.default?n.default():`${d}${u}`):null)))),h&&"outside"===l?F("div",null,n.default?F("div",{class:`${g}-progress-custom-content`,style:{color:c},role:"none"},n.default()):"default"===p?F("div",{role:"none",class:`${g}-progress-icon ${g}-progress-icon--as-text`,style:{color:c}},d,u):F("div",{class:`${g}-progress-icon`,"aria-hidden":!0},F(k,{clsPrefix:g},{default:()=>kn[p]}))):null)}}});function Sn(e,n,t=100){return`m ${t/2} ${t/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}var On=U({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:n}){const t=_(()=>e.percentage.map((n,t)=>`${Math.PI*n/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*t)-e.circleGap*t)*2}, ${8*e.viewBoxWidth}`));return()=>{const{viewBoxWidth:r,strokeWidth:o,circleGap:i,showIndicator:l,fillColor:a,railColor:s,railStyle:d,percentage:u,clsPrefix:c}=e;return F("div",{class:`${c}-progress-content`,role:"none"},F("div",{class:`${c}-progress-graph`,"aria-hidden":!0},F("div",{class:`${c}-progress-graph-circle`},F("svg",{viewBox:`0 0 ${r} ${r}`},F("defs",null,u.map((n,t)=>((n,t)=>{const r=e.fillColor[t],o="object"==typeof r?r.stops[0]:"",i="object"==typeof r?r.stops[1]:"";return"object"==typeof e.fillColor[t]&&F("linearGradient",{id:`gradient-${t}`,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},F("stop",{offset:"0%","stop-color":o}),F("stop",{offset:"100%","stop-color":i}))})(0,t))),u.map((e,n)=>F("g",{key:n},F("path",{class:`${c}-progress-graph-circle-rail`,d:Sn(r/2-o/2*(1+2*n)-i*n,0,r),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:s[n]},d[n]]}),F("path",{class:[`${c}-progress-graph-circle-fill`,0===e&&`${c}-progress-graph-circle-fill--empty`],d:Sn(r/2-o/2*(1+2*n)-i*n,0,r),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:t.value[n],strokeDashoffset:0,stroke:"object"==typeof a[n]?`url(#gradient-${n})`:a[n]}})))))),l&&n.default?F("div",null,F("div",{class:`${c}-progress-text`},n.default())):null)}}}),Ln=C([x("progress",{display:"inline-block"},[x("progress-icon","\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n "),A("line","\n width: 100%;\n display: block;\n ",[x("progress-content","\n display: flex;\n align-items: center;\n ",[x("progress-graph",{flex:1})]),x("progress-custom-content",{marginLeft:"14px"}),x("progress-icon","\n width: 30px;\n padding-left: 14px;\n height: var(--n-icon-size-line);\n line-height: var(--n-icon-size-line);\n font-size: var(--n-icon-size-line);\n ",[A("as-text","\n color: var(--n-text-color-line-outer);\n text-align: center;\n width: 40px;\n font-size: var(--n-font-size);\n padding-left: 4px;\n transition: color .3s var(--n-bezier);\n ")])]),A("circle, dashboard",{width:"120px"},[x("progress-custom-content","\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n "),x("progress-text","\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: flex;\n align-items: center;\n color: inherit;\n font-size: var(--n-font-size-circle);\n color: var(--n-text-color-circle);\n font-weight: var(--n-font-weight-circle);\n transition: color .3s var(--n-bezier);\n white-space: nowrap;\n "),x("progress-icon","\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: flex;\n align-items: center;\n color: var(--n-icon-color);\n font-size: var(--n-icon-size-circle);\n ")]),A("multiple-circle","\n width: 200px;\n color: inherit;\n ",[x("progress-text","\n font-weight: var(--n-font-weight-circle);\n color: var(--n-text-color-circle);\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color .3s var(--n-bezier);\n ")]),x("progress-content",{position:"relative"}),x("progress-graph",{position:"relative"},[x("progress-graph-circle",[C("svg",{verticalAlign:"bottom"}),x("progress-graph-circle-fill","\n stroke: var(--n-fill-color);\n transition:\n opacity .3s var(--n-bezier),\n stroke .3s var(--n-bezier),\n stroke-dasharray .3s var(--n-bezier);\n ",[A("empty",{opacity:0})]),x("progress-graph-circle-rail","\n transition: stroke .3s var(--n-bezier);\n overflow: hidden;\n stroke: var(--n-rail-color);\n ")]),x("progress-graph-line",[A("indicator-inside",[x("progress-graph-line-rail","\n height: 16px;\n line-height: 16px;\n border-radius: 10px;\n ",[x("progress-graph-line-fill","\n height: inherit;\n border-radius: 10px;\n "),x("progress-graph-line-indicator","\n background: #0000;\n white-space: nowrap;\n text-align: right;\n margin-left: 14px;\n margin-right: 14px;\n height: inherit;\n font-size: 12px;\n color: var(--n-text-color-line-inner);\n transition: color .3s var(--n-bezier);\n ")])]),A("indicator-inside-label","\n height: 16px;\n display: flex;\n align-items: center;\n ",[x("progress-graph-line-rail","\n flex: 1;\n transition: background-color .3s var(--n-bezier);\n "),x("progress-graph-line-indicator","\n background: var(--n-fill-color);\n font-size: 12px;\n transform: translateZ(0);\n display: flex;\n vertical-align: middle;\n height: 16px;\n line-height: 16px;\n padding: 0 10px;\n border-radius: 10px;\n position: absolute;\n white-space: nowrap;\n color: var(--n-text-color-line-inner);\n transition:\n right .2s var(--n-bezier),\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n ")]),x("progress-graph-line-rail","\n position: relative;\n overflow: hidden;\n height: var(--n-rail-height);\n border-radius: 5px;\n background-color: var(--n-rail-color);\n transition: background-color .3s var(--n-bezier);\n ",[x("progress-graph-line-fill","\n background: var(--n-fill-color);\n position: relative;\n border-radius: 5px;\n height: inherit;\n width: 100%;\n max-width: 0%;\n transition:\n background-color .3s var(--n-bezier),\n max-width .2s var(--n-bezier);\n ",[A("processing",[C("&::after",'\n content: "";\n background-image: var(--n-line-bg-processing);\n animation: progress-processing-animation 2s var(--n-bezier) infinite;\n ')])])])])])]),C("@keyframes progress-processing-animation","\n 0% {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 100%;\n opacity: 1;\n }\n 66% {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n }\n 100% {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n }\n ")]),zn=U({name:"Progress",props:Object.assign(Object.assign({},u.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array,Object],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),setup(e){const n=_(()=>e.indicatorPlacement||e.indicatorPosition),t=_(()=>e.gapDegree||0===e.gapDegree?e.gapDegree:"dashboard"===e.type?75:void 0),{mergedClsPrefixRef:r,inlineThemeDisabled:o}=y(e),i=u("Progress","-progress",Ln,ce,e,r),l=_(()=>{const{status:n}=e,{common:{cubicBezierEaseInOut:t},self:{fontSize:r,fontSizeCircle:o,railColor:l,railHeight:a,iconSizeCircle:s,iconSizeLine:d,textColorCircle:u,textColorLineInner:c,textColorLineOuter:p,lineBgProcessing:h,fontWeightCircle:f,[j("iconColor",n)]:g,[j("fillColor",n)]:v}}=i.value;return{"--n-bezier":t,"--n-fill-color":v,"--n-font-size":r,"--n-font-size-circle":o,"--n-font-weight-circle":f,"--n-icon-color":g,"--n-icon-size-circle":s,"--n-icon-size-line":d,"--n-line-bg-processing":h,"--n-rail-color":l,"--n-rail-height":a,"--n-text-color-circle":u,"--n-text-color-line-inner":c,"--n-text-color-line-outer":p}}),a=o?R("progress",_(()=>e.status[0]),l,e):void 0;return{mergedClsPrefix:r,mergedIndicatorPlacement:n,gapDeg:t,cssVars:o?void 0:l,themeClass:null==a?void 0:a.themeClass,onRender:null==a?void 0:a.onRender}},render(){const{type:e,cssVars:n,indicatorTextColor:t,showIndicator:r,status:o,railColor:i,railStyle:l,color:a,percentage:s,viewBoxWidth:d,strokeWidth:u,mergedIndicatorPlacement:c,unit:p,borderRadius:h,fillBorderRadius:f,height:g,processing:v,circleGap:m,mergedClsPrefix:w,gapDeg:b,gapOffsetDegree:x,themeClass:y,$slots:C,onRender:R}=this;return null==R||R(),F("div",{class:[y,`${w}-progress`,`${w}-progress--${e}`,`${w}-progress--${o}`],style:n,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,role:"circle"===e||"line"===e||"dashboard"===e?"progressbar":"none"},"circle"===e||"dashboard"===e?F(Rn,{clsPrefix:w,status:o,showIndicator:r,indicatorTextColor:t,railColor:i,fillColor:a,railStyle:l,offsetDegree:this.offsetDegree,percentage:s,viewBoxWidth:d,strokeWidth:u,gapDegree:void 0===b?"dashboard"===e?75:0:b,gapOffsetDegree:x,unit:p},C):"line"===e?F(Pn,{clsPrefix:w,status:o,showIndicator:r,indicatorTextColor:t,railColor:i,fillColor:a,railStyle:l,percentage:s,processing:v,indicatorPlacement:c,unit:p,fillBorderRadius:f,railBorderRadius:h,height:g},C):"multiple-circle"===e?F(On,{clsPrefix:w,strokeWidth:u,railColor:i,fillColor:a,railStyle:l,viewBoxWidth:d,percentage:s,showIndicator:r,circleGap:m},C):null)}}),$n=m("n-upload"),Tn=C([x("upload","width: 100%;",[A("dragger-inside",[x("upload-trigger","\n display: block;\n ")]),A("drag-over",[x("upload-dragger","\n border: var(--n-dragger-border-hover);\n ")])]),x("upload-dragger","\n cursor: pointer;\n box-sizing: border-box;\n width: 100%;\n text-align: center;\n border-radius: var(--n-border-radius);\n padding: 24px;\n opacity: 1;\n transition:\n opacity .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n background-color: var(--n-dragger-color);\n border: var(--n-dragger-border);\n ",[C("&:hover","\n border: var(--n-dragger-border-hover);\n "),A("disabled","\n cursor: not-allowed;\n ")]),x("upload-trigger","\n display: inline-block;\n box-sizing: border-box;\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n ",[C("+",[x("upload-file-list","margin-top: 8px;")]),A("disabled","\n opacity: var(--n-item-disabled-opacity);\n cursor: not-allowed;\n "),A("image-card","\n width: 96px;\n height: 96px;\n ",[x("base-icon","\n font-size: 24px;\n "),x("upload-dragger","\n padding: 0;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n ")])]),x("upload-file-list","\n line-height: var(--n-line-height);\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n ",[C("a, img","outline: none;"),A("disabled","\n opacity: var(--n-item-disabled-opacity);\n cursor: not-allowed;\n ",[x("upload-file","cursor: not-allowed;")]),A("grid","\n display: grid;\n grid-template-columns: repeat(auto-fill, 96px);\n grid-gap: 8px;\n margin-top: 0;\n "),x("upload-file","\n display: block;\n box-sizing: border-box;\n cursor: default;\n padding: 0px 12px 0 6px;\n transition: background-color .3s var(--n-bezier);\n border-radius: var(--n-border-radius);\n ",[fe(),x("progress",[fe({foldPadding:!0})]),C("&:hover","\n background-color: var(--n-item-color-hover);\n ",[x("upload-file-info",[B("action","\n opacity: 1;\n ")])]),A("image-type","\n border-radius: var(--n-border-radius);\n text-decoration: underline;\n text-decoration-color: #0000;\n ",[x("upload-file-info","\n padding-top: 0px;\n padding-bottom: 0px;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 6px 0;\n ",[x("progress","\n padding: 2px 0;\n margin-bottom: 0;\n "),B("name","\n padding: 0 8px;\n "),B("thumbnail","\n width: 32px;\n height: 32px;\n font-size: 28px;\n display: flex;\n justify-content: center;\n align-items: center;\n ",[C("img","\n width: 100%;\n ")])])]),A("text-type",[x("progress","\n box-sizing: border-box;\n padding-bottom: 6px;\n margin-bottom: 6px;\n ")]),A("image-card-type","\n position: relative;\n width: 96px;\n height: 96px;\n border: var(--n-item-border-image-card);\n border-radius: var(--n-border-radius);\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);\n border-radius: var(--n-border-radius);\n overflow: hidden;\n ",[x("progress","\n position: absolute;\n left: 8px;\n bottom: 8px;\n right: 8px;\n width: unset;\n "),x("upload-file-info","\n padding: 0;\n width: 100%;\n height: 100%;\n ",[B("thumbnail","\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: 36px;\n ",[C("img","\n width: 100%;\n ")])]),C("&::before",'\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: inherit;\n opacity: 0;\n transition: opacity .2s var(--n-bezier);\n content: "";\n '),C("&:hover",[C("&::before","opacity: 1;"),x("upload-file-info",[B("thumbnail","opacity: .12;")])])]),A("error-status",[C("&:hover","\n background-color: var(--n-item-color-hover-error);\n "),x("upload-file-info",[B("name","color: var(--n-item-text-color-error);"),B("thumbnail","color: var(--n-item-text-color-error);")]),A("image-card-type","\n border: var(--n-item-border-image-card-error);\n ")]),A("with-url","\n cursor: pointer;\n ",[x("upload-file-info",[B("name","\n color: var(--n-item-text-color-success);\n text-decoration-color: var(--n-item-text-color-success);\n ",[C("a","\n text-decoration: underline;\n ")])])]),x("upload-file-info","\n position: relative;\n padding-top: 6px;\n padding-bottom: 6px;\n display: flex;\n flex-wrap: nowrap;\n ",[B("thumbnail","\n font-size: 18px;\n opacity: 1;\n transition: opacity .2s var(--n-bezier);\n color: var(--n-item-icon-color);\n ",[x("base-icon","\n margin-right: 2px;\n vertical-align: middle;\n transition: color .3s var(--n-bezier);\n ")]),B("action","\n padding-top: inherit;\n padding-bottom: inherit;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 80px;\n display: flex;\n align-items: center;\n transition: opacity .2s var(--n-bezier);\n justify-content: flex-end;\n opacity: 0;\n ",[x("button",[C("&:not(:last-child)",{marginRight:"4px"}),x("base-icon",[C("svg",[c()])])]),A("image-type","\n position: relative;\n max-width: 80px;\n width: auto;\n "),A("image-card-type","\n z-index: 2;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n ")]),B("name","\n color: var(--n-item-text-color);\n flex: 1;\n display: flex;\n justify-content: center;\n text-overflow: ellipsis;\n overflow: hidden;\n flex-direction: column;\n text-decoration-color: #0000;\n font-size: var(--n-font-size);\n transition:\n color .3s var(--n-bezier),\n text-decoration-color .3s var(--n-bezier); \n ",[C("a","\n color: inherit;\n text-decoration: underline;\n ")])])])]),x("upload-file-input","\n display: none;\n width: 0;\n height: 0;\n opacity: 0;\n ")]),Bn="__UPLOAD_DRAGGER__",Dn=U({name:"UploadDragger",[Bn]:!0,setup(e,{slots:n}){const r=H($n,null);return r||t("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:e},mergedDisabledRef:{value:t},maxReachedRef:{value:o}}=r;return F("div",{class:[`${e}-upload-dragger`,(t||o)&&`${e}-upload-dragger--disabled`]},n)}}});function jn(){return F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},F("g",{fill:"none"},F("path",{d:"M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z",fill:"currentColor"})))}function In(){return F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},F("g",{fill:"none"},F("path",{d:"M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z",fill:"currentColor"})))}var An=U({name:"UploadProgress",props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup:()=>({mergedTheme:H($n).mergedThemeRef}),render(){return F(r,null,{default:()=>this.show?F(zn,{type:"line",showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),Un=function(e,n,t,r){return new(t||(t=Promise))(function(o,i){function l(e){try{s(r.next(e))}catch(n){i(n)}}function a(e){try{s(r.throw(e))}catch(n){i(n)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(l,a)}s((r=r.apply(e,n||[])).next())})};function Mn(e){return e.includes("image/")}function En(e=""){const n=e.split("/"),t=n[n.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(t)||[""])[0]}var Fn=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,Hn=e=>{if(e.type)return Mn(e.type);const n=En(e.name||"");if(Fn.test(n))return!0;const t=e.thumbnailUrl||e.url||"",r=En(t);return!(!/^data:image\//.test(t)&&!Fn.test(r))};var Nn=l&&window.FileReader&&window.File;function Wn(e){return e.isDirectory}function Zn(e){return e.isFile}function qn(e){const{id:n,name:t,percentage:r,status:o,url:i,file:l,thumbnailUrl:a,type:s,fullPath:d,batchId:u}=e;return{id:n,name:t,percentage:null!=r?r:null,status:o,url:null!=i?i:null,file:null!=l?l:null,thumbnailUrl:null!=a?a:null,type:null!=s?s:null,fullPath:null!=d?d:null,batchId:null!=u?u:null}}var _n=function(e,n,t,r){return new(t||(t=Promise))(function(o,i){function l(e){try{s(r.next(e))}catch(n){i(n)}}function a(e){try{s(r.throw(e))}catch(n){i(n)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(l,a)}s((r=r.apply(e,n||[])).next())})},Vn={paddingMedium:"0 3px",heightMedium:"24px",iconSizeMedium:"18px"},Xn=U({name:"UploadFile",props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0},index:{type:Number,required:!0}},setup(n){const t=H($n),r=K(null),o=K(""),i=_(()=>{const{file:e}=n;return"finished"===e.status?"success":"error"===e.status?"error":"info"}),l=_(()=>{const{file:e}=n;if("error"===e.status)return"error"}),a=_(()=>{const{file:e}=n;return"uploading"===e.status}),s=_(()=>{if(!t.showCancelButtonRef.value)return!1;const{file:e}=n;return["uploading","pending","error"].includes(e.status)}),d=_(()=>{if(!t.showRemoveButtonRef.value)return!1;const{file:e}=n;return["finished"].includes(e.status)}),u=_(()=>{if(!t.showDownloadButtonRef.value)return!1;const{file:e}=n;return["finished"].includes(e.status)}),c=_(()=>{if(!t.showRetryButtonRef.value)return!1;const{file:e}=n;return["error"].includes(e.status)}),h=e(()=>o.value||n.file.thumbnailUrl||n.file.url),f=_(()=>{if(!t.showPreviewButtonRef.value)return!1;const{file:{status:e},listType:r}=n;return["finished"].includes(e)&&h.value&&"image-card"===r});function g(e){const{xhrMap:r,doChange:o,onRemoveRef:{value:i},mergedFileListRef:{value:l}}=t;Promise.resolve(!i||i({file:Object.assign({},e),fileList:l,index:n.index})).then(n=>{if(!1===n)return;const t=Object.assign({},e,{status:"removed"});r.delete(e.id),o(t,void 0,{remove:!0})})}const v=()=>_n(this,void 0,void 0,function*(){const{listType:e}=n;"image"!==e&&"image-card"!==e||t.shouldUseThumbnailUrlRef.value(n.file)&&(o.value=yield t.getFileThumbnailUrlResolver(n.file))});return N(()=>{v()}),{mergedTheme:t.mergedThemeRef,progressStatus:i,buttonType:l,showProgress:a,disabled:t.mergedDisabledRef,showCancelButton:s,showRemoveButton:d,showDownloadButton:u,showRetryButton:c,showPreviewButton:f,mergedThumbnailUrl:h,shouldUseThumbnailUrl:t.shouldUseThumbnailUrlRef,renderIcon:t.renderIconRef,imageRef:r,handleRemoveOrCancelClick:function(e){e.preventDefault();const{file:r}=n;["finished","pending","error"].includes(r.status)?g(r):["uploading"].includes(r.status)?function(e){const{xhrMap:n}=t,r=n.get(e.id);null==r||r.abort(),g(Object.assign({},e))}(r):p("upload","The button clicked type is unknown.")},handleDownloadClick:function(e){e.preventDefault(),function(e){const{onDownloadRef:{value:n},customDownloadRef:{value:r}}=t;Promise.resolve(!n||n(Object.assign({},e))).then(n=>{!1!==n&&(r?r(Object.assign({},e)):ge(e.url,e.name))})}(n.file)},handleRetryClick:function(){return _n(this,void 0,void 0,function*(){const e=t.onRetryRef.value;e&&!1===(yield e({file:n.file}))||t.submit(n.file.id)})},handlePreviewClick:function(e){const{onPreviewRef:{value:o}}=t;if(o)o(n.file,{event:e});else if("image-card"===n.listType){const{value:e}=r;if(!e)return;e.showPreview()}}}},render(){const{clsPrefix:e,mergedTheme:t,listType:r,file:o,renderIcon:i}=this;let l;const a="image"===r;l=a||"image-card"===r?this.shouldUseThumbnailUrl(o)&&this.mergedThumbnailUrl?F("a",{rel:"noopener noreferer",target:"_blank",href:o.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},"image-card"===r?F(yn,{src:this.mergedThumbnailUrl||void 0,previewSrc:o.url||void 0,alt:o.name,ref:"imageRef"}):F("img",{src:this.mergedThumbnailUrl||void 0,alt:o.name})):F("span",{class:`${e}-upload-file-info__thumbnail`},i?i(o):Hn(o)?F(k,{clsPrefix:e},{default:jn}):F(k,{clsPrefix:e},{default:In})):F("span",{class:`${e}-upload-file-info__thumbnail`},i?i(o):F(k,{clsPrefix:e},{default:()=>F(Xe,null)}));const s=F(An,{show:this.showProgress,percentage:o.percentage||0,status:this.progressStatus}),d="text"===r||"image"===r;return F("div",{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,o.url&&"error"!==o.status&&"image-card"!==r&&`${e}-upload-file--with-url`,`${e}-upload-file--${r}-type`]},F("div",{class:`${e}-upload-file-info`},l,F("div",{class:`${e}-upload-file-info__name`},d&&(o.url&&"error"!==o.status?F("a",{rel:"noopener noreferer",target:"_blank",href:o.url||void 0,onClick:this.handlePreviewClick},o.name):F("span",{onClick:this.handlePreviewClick},o.name)),a&&s),F("div",{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${r}-type`]},this.showPreviewButton?F($,{key:"preview",quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Vn},{icon:()=>F(k,{clsPrefix:e},{default:()=>F(oe,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&F($,{key:"cancelOrTrash",theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:Vn,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>F(n,null,{default:()=>this.showRemoveButton?F(k,{clsPrefix:e,key:"trash"},{default:()=>F(nn,null)}):F(k,{clsPrefix:e,key:"cancel"},{default:()=>F(Ge,null)})})}),this.showRetryButton&&!this.disabled&&F($,{key:"retry",quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Vn},{icon:()=>F(k,{clsPrefix:e},{default:()=>F(Qe,null)})}),this.showDownloadButton?F($,{key:"download",quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Vn},{icon:()=>F(k,{clsPrefix:e},{default:()=>F(Ye,null)})}):null)),!a&&s)}}),Gn=U({name:"UploadTrigger",props:{abstract:Boolean},slots:Object,setup(e,{slots:n}){const r=H($n,null);r||t("upload-trigger","`n-upload-trigger` must be placed inside `n-upload`.");const{mergedClsPrefixRef:i,mergedDisabledRef:l,maxReachedRef:a,listTypeRef:s,dragOverRef:d,openOpenFileDialog:u,draggerInsideRef:c,handleFileAddition:p,mergedDirectoryDndRef:h,triggerClassRef:f,triggerStyleRef:g}=r,v=_(()=>"image-card"===s.value);function m(){l.value||a.value||u()}function w(e){e.preventDefault(),d.value=!0}function b(e){e.preventDefault(),d.value=!0}function x(e){e.preventDefault(),d.value=!1}function y(e){var n;if(e.preventDefault(),!c.value||l.value||a.value)return void(d.value=!1);const t=null===(n=e.dataTransfer)||void 0===n?void 0:n.items;(null==t?void 0:t.length)?function(n,t){return Un(this,void 0,void 0,function*(){const r=[];return yield function n(i){return Un(this,void 0,void 0,function*(){for(const l of i)if(l)if(t&&Wn(l)){const t=l.createReader();let r,i=[];try{do{r=yield new Promise((e,n)=>{t.readEntries(e,n)}),i=i.concat(r)}while(r.length>0)}catch(e){o("upload","error happens when handling directory upload",e)}yield n(i)}else if(Zn(l))try{const e=yield new Promise((e,n)=>{l.file(e,n)});r.push({file:e,entry:l,source:"dnd"})}catch(e){o("upload","error happens when handling file upload",e)}})}(n),r})}(Array.from(t).map(e=>e.webkitGetAsEntry()),h.value).then(e=>{p(e)}).finally(()=>{d.value=!1}):d.value=!1}return()=>{var t;const{value:r}=i;return e.abstract?null===(t=n.default)||void 0===t?void 0:t.call(n,{handleClick:m,handleDrop:y,handleDragOver:w,handleDragEnter:b,handleDragLeave:x}):F("div",{class:[`${r}-upload-trigger`,(l.value||a.value)&&`${r}-upload-trigger--disabled`,v.value&&`${r}-upload-trigger--image-card`,f.value],style:g.value,onClick:m,onDrop:y,onDragover:w,onDragenter:b,onDragleave:x},v.value?F(Dn,null,{default:()=>I(n.default,()=>[F(k,{clsPrefix:r},{default:()=>F(he,null)})])}):n)}}}),Yn=U({name:"UploadFileList",setup(e,{slots:n}){const o=H($n,null);o||t("upload-file-list","`n-upload-file-list` must be placed inside `n-upload`.");const{abstractRef:i,mergedClsPrefixRef:l,listTypeRef:a,mergedFileListRef:s,fileListClassRef:d,fileListStyleRef:u,cssVarsRef:c,themeClassRef:p,maxReachedRef:h,showTriggerRef:f,imageGroupPropsRef:g}=o,v=_(()=>"image-card"===a.value),m=()=>s.value.map((e,n)=>F(Xn,{clsPrefix:l.value,key:e.id,file:e,index:n,listType:a.value}));return()=>{const{value:e}=l,{value:t}=i;return F("div",{class:[`${e}-upload-file-list`,v.value&&`${e}-upload-file-list--grid`,t?null==p?void 0:p.value:void 0,d.value],style:[t&&c?c.value:"",u.value]},v.value?F(wn,Object.assign({},g.value),{default:m}):F(r,{group:!0},{default:m}),f.value&&!h.value&&v.value&&F(Gn,null,n))}}}),Jn=function(e,n,t,r){return new(t||(t=Promise))(function(o,i){function l(e){try{s(r.next(e))}catch(n){i(n)}}function a(e){try{s(r.throw(e))}catch(n){i(n)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(l,a)}s((r=r.apply(e,n||[])).next())})};function Qn(e,n,t){const r=function(e,n,t){const{doChange:r,xhrMap:o}=e;let i=0;function l(t){var l;let a=Object.assign({},n,{status:"error",percentage:i});o.delete(n.id),a=qn((null===(l=e.onError)||void 0===l?void 0:l.call(e,{file:a,event:t}))||a),r(a,t)}return{handleXHRLoad:function(a){var s;if(e.isErrorState){if(e.isErrorState(t))return void l(a)}else if(t.status<200||t.status>=300)return void l(a);let d=Object.assign({},n,{status:"finished",percentage:i});o.delete(n.id),d=qn((null===(s=e.onFinish)||void 0===s?void 0:s.call(e,{file:d,event:a}))||d),r(d,a)},handleXHRError:l,handleXHRAbort(e){const t=Object.assign({},n,{status:"removed",file:null,percentage:i});o.delete(n.id),r(t,e)},handleXHRProgress(e){const t=Object.assign({},n,{status:"uploading"});if(e.lengthComputable){const n=Math.ceil(e.loaded/e.total*100);t.percentage=n,i=n}r(t,e)}}}(e,n,t);t.onabort=r.handleXHRAbort,t.onerror=r.handleXHRError,t.onload=r.handleXHRLoad,t.upload&&(t.upload.onprogress=r.handleXHRProgress)}function Kn(e,n){return"function"==typeof e?e({file:n}):e||{}}function et(e,n,t,{method:r,action:o,withCredentials:i,responseType:l,headers:a,data:s}){const d=new XMLHttpRequest;d.responseType=l,e.xhrMap.set(t.id,d),d.withCredentials=i;const u=new FormData;if(function(e,n,t){const r=Kn(n,t);r&&Object.keys(r).forEach(n=>{e.append(n,r[n])})}(u,s,t),null!==t.file&&u.append(n,t.file),Qn(e,t,d),void 0!==o){d.open(r.toUpperCase(),o),function(e,n,t){const r=Kn(n,t);r&&Object.keys(r).forEach(n=>{e.setRequestHeader(n,r[n])})}(d,a,t),d.send(u);const n=Object.assign({},t,{status:"uploading"});e.doChange(n)}}var nt=U({name:"Upload",props:Object.assign(Object.assign({},u.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onRetry:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,customDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListClass:String,fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>!!Nn&&Hn(e)},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerClass:String,triggerStyle:[String,Object],renderIcon:Function}),setup(e){e.abstract&&"image-card"===e.listType&&t("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:o}=y(e),i=u("Upload","-upload",Tn,ue,e,n),l=a("Upload",o,n),s=O(e),d=K(e.defaultFileList),c=V(e,"fileList"),p=K(null),f={value:!1},g=K(!1),m=new Map,w=h(c,d),b=_(()=>w.value.map(qn)),x=_(()=>{const{max:n}=e;return void 0!==n&&b.value.length>=n});function C(){var e;null===(e=p.value)||void 0===e||e.click()}const k=_(()=>e.multiple||e.directory),P=(n,t,r={append:!1,remove:!1})=>{const{append:o,remove:i}=r,l=Array.from(b.value),a=l.findIndex(e=>e.id===n.id);if(o||i||~a){o?l.push(n):i?l.splice(a,1):l.splice(a,1,n);const{onChange:r}=e;r&&r({file:n,fileList:l,event:t}),function(n){const{"onUpdate:fileList":t,onUpdateFileList:r}=e;t&&v(t,n),r&&v(r,n),d.value=n}(l)}};function S(n,t){if(!n||0===n.length)return;const{onBeforeUpload:r}=e;n=k.value?n:[n[0]];const{max:o,accept:i}=e;n=n.filter(({file:e,source:n})=>"dnd"!==n||!(null==i?void 0:i.trim())||function(e,n,t){return e=e.toLowerCase(),n=n.toLocaleLowerCase(),(t=t.toLocaleLowerCase()).split(",").map(e=>e.trim()).filter(Boolean).some(t=>{if(t.startsWith(".")){if(e.endsWith(t))return!0}else{if(!t.includes("/"))return!0;{const[e,r]=n.split("/"),[o,i]=t.split("/");if(("*"===o||e&&o&&o===e)&&("*"===i||r&&i&&i===r))return!0}}return!1})}(e.name,e.type,i)),o&&(n=n.slice(0,o-b.value.length));const l=z();Promise.all(n.map(e=>Jn(this,[e],void 0,function*({file:e,entry:n}){var t;const o={id:z(),batchId:l,name:e.name,status:"pending",percentage:0,file:e,url:null,type:e.type,thumbnailUrl:null,fullPath:null!==(t=null==n?void 0:n.fullPath)&&void 0!==t?t:`/${e.webkitRelativePath||e.name}`};return r&&!1===(yield r({file:o,fileList:b.value}))?null:o}))).then(e=>Jn(this,void 0,void 0,function*(){let n=Promise.resolve();e.forEach(e=>{n=n.then(E).then(()=>{e&&P(e,t,{append:!0})})}),yield n})).then(()=>{e.defaultUpload&&L()})}function L(n){const{method:t,action:r,withCredentials:o,headers:i,data:l,name:a}=e,s=void 0!==n?b.value.filter(e=>e.id===n):b.value,d=void 0!==n;s.forEach(n=>{const{status:s}=n;("pending"===s||"error"===s&&d)&&(e.customRequest?function(e){const{inst:n,file:t,data:r,headers:o,withCredentials:i,action:l,customRequest:a}=e,{doChange:s}=e.inst;let d=0;a({file:t,data:r,headers:o,withCredentials:i,action:l,onProgress(e){const n=Object.assign({},t,{status:"uploading"}),r=e.percent;n.percentage=r,d=r,s(n)},onFinish(){var e;let r=Object.assign({},t,{status:"finished",percentage:d});r=qn((null===(e=n.onFinish)||void 0===e?void 0:e.call(n,{file:r}))||r),s(r)},onError(){var e;let r=Object.assign({},t,{status:"error",percentage:d});r=qn((null===(e=n.onError)||void 0===e?void 0:e.call(n,{file:r}))||r),s(r)}})}({inst:{doChange:P,xhrMap:m,onFinish:e.onFinish,onError:e.onError},file:n,action:r,withCredentials:o,headers:i,data:l,customRequest:e.customRequest}):et({doChange:P,xhrMap:m,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},a,n,{method:t,action:r,withCredentials:o,responseType:e.responseType,headers:i,data:l}))})}const $=_(()=>{const{common:{cubicBezierEaseInOut:e},self:{draggerColor:n,draggerBorder:t,draggerBorderHover:r,itemColorHover:o,itemColorHoverError:l,itemTextColorError:a,itemTextColorSuccess:s,itemTextColor:d,itemIconColor:u,itemDisabledOpacity:c,lineHeight:p,borderRadius:h,fontSize:f,itemBorderImageCardError:g,itemBorderImageCard:v}}=i.value;return{"--n-bezier":e,"--n-border-radius":h,"--n-dragger-border":t,"--n-dragger-border-hover":r,"--n-dragger-color":n,"--n-font-size":f,"--n-item-color-hover":o,"--n-item-color-hover-error":l,"--n-item-disabled-opacity":c,"--n-item-icon-color":u,"--n-item-text-color":d,"--n-item-text-color-error":a,"--n-item-text-color-success":s,"--n-line-height":p,"--n-item-border-image-card-error":g,"--n-item-border-image-card":v}}),T=r?R("upload",void 0,$,e):void 0;M($n,{mergedClsPrefixRef:n,mergedThemeRef:i,showCancelButtonRef:V(e,"showCancelButton"),showDownloadButtonRef:V(e,"showDownloadButton"),showRemoveButtonRef:V(e,"showRemoveButton"),showRetryButtonRef:V(e,"showRetryButton"),onRemoveRef:V(e,"onRemove"),onDownloadRef:V(e,"onDownload"),customDownloadRef:V(e,"customDownload"),mergedFileListRef:b,triggerClassRef:V(e,"triggerClass"),triggerStyleRef:V(e,"triggerStyle"),shouldUseThumbnailUrlRef:V(e,"shouldUseThumbnailUrl"),renderIconRef:V(e,"renderIcon"),xhrMap:m,submit:L,doChange:P,showPreviewButtonRef:V(e,"showPreviewButton"),onPreviewRef:V(e,"onPreview"),getFileThumbnailUrlResolver:function(n){var t;if(n.thumbnailUrl)return n.thumbnailUrl;const{createThumbnailUrl:r}=e;return r?null!==(t=r(n.file,n))&&void 0!==t?t:n.url||"":n.url?n.url:n.file?function(e){return Un(this,void 0,void 0,function*(){return yield new Promise(n=>{e.type&&Mn(e.type)?n(window.URL.createObjectURL(e)):n("")})})}(n.file):""},listTypeRef:V(e,"listType"),dragOverRef:g,openOpenFileDialog:C,draggerInsideRef:f,handleFileAddition:S,mergedDisabledRef:s.mergedDisabledRef,maxReachedRef:x,fileListClassRef:V(e,"fileListClass"),fileListStyleRef:V(e,"fileListStyle"),abstractRef:V(e,"abstract"),acceptRef:V(e,"accept"),cssVarsRef:r?void 0:$,themeClassRef:null==T?void 0:T.themeClass,onRender:null==T?void 0:T.onRender,showTriggerRef:V(e,"showTrigger"),imageGroupPropsRef:V(e,"imageGroupProps"),mergedDirectoryDndRef:_(()=>{var n;return null!==(n=e.directoryDnd)&&void 0!==n?n:e.directory}),onRetryRef:V(e,"onRetry")});const B={clear:()=>{d.value=[]},submit:L,openOpenFileDialog:C};return Object.assign({mergedClsPrefix:n,draggerInsideRef:f,rtlEnabled:l,inputElRef:p,mergedTheme:i,dragOver:g,mergedMultiple:k,cssVars:r?void 0:$,themeClass:null==T?void 0:T.themeClass,onRender:null==T?void 0:T.onRender,handleFileInputChange:function(e){const n=e.target;S(n.files?Array.from(n.files).map(e=>({file:e,entry:null,source:"input"})):null,e),n.value=""}},B)},render(){var e,n;const{draggerInsideRef:t,mergedClsPrefix:r,$slots:o,directory:i,onRender:l}=this;if(o.default&&!this.abstract){const n=o.default()[0];(null===(e=null==n?void 0:n.type)||void 0===e?void 0:e.__UPLOAD_DRAGGER__)&&(t.value=!0)}const a=F("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${r}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:i||void 0,directory:i||void 0}));return this.abstract?F(Y,null,null===(n=o.default)||void 0===n?void 0:n.call(o),F(q,{to:"body"},a)):(null==l||l(),F("div",{class:[`${r}-upload`,this.rtlEnabled&&`${r}-upload--rtl`,t.value&&`${r}-upload--dragger-inside`,this.dragOver&&`${r}-upload--drag-over`,this.themeClass],style:this.cssVars},a,this.showTrigger&&"image-card"!==this.listType&&F(Gn,null,o),this.showFileList&&F(Yn,null,o)))}});export{Dn as n,nt as t};
|
|
1
|
+
import{$t as e,A as n,Dt as t,E as r,Et as o,H as i,Ht as l,I as a,It as s,L as d,N as u,O as c,Ot as p,Qt as h,Rt as f,Tn as g,Tt as v,Yt as m,Zt as w,bn as b,gn as x,gt as y,hn as C,ht as R,j as k,jt as P,k as S,mt as O,nn as L,rn as z,s as $,tn as T,vn as B,w as D,xn as j,xt as I,yn as A}from"./_plugin-vue_export-helper-DyHLuIR4.js";import{A as U,G as M,I as E,M as F,N as H,Q as N,V as W,Z,_ as q,b as _,dt as V,f as X,ft as G,g as Y,gt as J,l as Q,st as K,tt as ee,z as ne}from"./vue-vendor-Cr_NLmXY.js";import{F as te,R as re,V as oe,Y as ie,_t as le,lt as ae}from"./index-BXWpib7P.js";import{F as se,h as de,v as ue}from"./use-message-BYx0IRj1.js";import{M as ce,N as pe,P as he,j as fe}from"./light-DeIjG9s_.js";function ge(e,n){if(!e)return;const t=document.createElement("a");t.href=e,void 0!==n&&(t.download=n),document.body.appendChild(t),t.click(),document.body.removeChild(t)}var ve,me=(ve={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==ve?void 0:ve[e]}),we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var xe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ce="\\ud800-\\udfff",Re="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="["+Se+"]",Le="\\d+",ze="["+Re+"]",$e="["+ke+"]",Te="[^"+Ce+Se+Le+Re+ke+Pe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Pe+"]",Ie="(?:"+$e+"|"+Te+")",Ae="(?:"+je+"|"+Te+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Me="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ee="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Fe="[\\ufe0e\\ufe0f]?",He=Fe+Ee+("(?:\\u200d(?:"+["[^"+Ce+"]",Be,De].join("|")+")"+Fe+Ee+")*"),Ne="(?:"+[ze,Be,De].join("|")+")"+He,We=RegExp([je+"?"+$e+"+"+Ue+"(?="+[Oe,je,"$"].join("|")+")",Ae+"+"+Me+"(?="+[Oe,je+Ie,"$"].join("|")+")",je+"?"+Ie+"+"+Ue,je+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ne].join("|"),"g");function Ze(e,n,t){return e=i(e),void 0===(n=t?void 0:n)?function(e){return ye.test(e)}(e)?function(e){return e.match(We)||[]}(e):function(e){return e.match(xe)||[]}(e):e.match(n)||[]}var qe=RegExp("['’]","g");var _e,Ve=(_e=function(e,n,t){return e+(t?"-":"")+n.toLowerCase()},function(e){return function(e,n,t,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(t=e[++o]);++o<i;)t=n(t,e[o],o,e);return t}(Ze(function(e){return(e=i(e))&&e.replace(we,me).replace(be,"")}(e).replace(qe,"")),_e,"")}),Xe=S("attach",()=>F("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},F("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},F("g",{fill:"currentColor","fill-rule":"nonzero"},F("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),Ge=S("cancel",()=>F("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},F("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},F("g",{fill:"currentColor","fill-rule":"nonzero"},F("path",{d:"M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z"}))))),Ye=S("download",()=>F("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},F("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},F("g",{fill:"currentColor","fill-rule":"nonzero"},F("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),Je=U({name:"ResizeSmall",render:()=>F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},F("g",{fill:"none"},F("path",{d:"M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z",fill:"currentColor"})))}),Qe=S("retry",()=>F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},F("path",{d:"M320,146s24.36-12-64-12A160,160,0,1,0,416,294",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;"}),F("polyline",{points:"256 58 336 138 256 218",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),Ke=S("rotateClockwise",()=>F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z",fill:"currentColor"}),F("path",{d:"M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z",fill:"currentColor"}))),en=S("rotateClockwise",()=>F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z",fill:"currentColor"}),F("path",{d:"M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z",fill:"currentColor"}))),nn=S("trash",()=>F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},F("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),F("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),F("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),F("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),tn=S("zoomIn",()=>F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z",fill:"currentColor"}),F("path",{d:"M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z",fill:"currentColor"}))),rn=S("zoomOut",()=>F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z",fill:"currentColor"}),F("path",{d:"M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z",fill:"currentColor"}))),on=l&&"loading"in document.createElement("img");var ln=new WeakMap,an=new WeakMap,sn=new WeakMap,dn=(e,n,t)=>{if(!e)return()=>{};const r=function(e={}){var n;const{root:t=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):null!==(n=e.threshold)&&void 0!==n?n:"0"}`,options:Object.assign(Object.assign({},e),{root:("string"==typeof t?document.querySelector(t):t)||document.documentElement})}}(n),{root:o}=r.options;let i;const l=ln.get(o);let a,s;l?i=l:(i=new Map,ln.set(o,i)),i.has(r.hash)?(s=i.get(r.hash),s[1].has(e)||(a=s[0],s[1].add(e),a.observe(e))):(a=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=an.get(e.target),t=sn.get(e.target);n&&n(),t&&(t.value=!0)}})},r.options),a.observe(e),s=[a,new Set([e])],i.set(r.hash,s));let d=!1;const u=()=>{d||(an.delete(e),sn.delete(e),d=!0,s[1].has(e)&&(s[0].unobserve(e),s[1].delete(e)),s[1].size<=0&&i.delete(r.hash),i.size||ln.delete(o))};return an.set(e,u),sn.set(e,t),u};function un(){return F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z",fill:"currentColor"}))}function cn(){return F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z",fill:"currentColor"}))}function pn(){return F("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F("path",{d:"M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z",fill:"currentColor"}))}var hn=Object.assign(Object.assign({},u.props),{onPreviewPrev:Function,onPreviewNext:Function,showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean,renderToolbar:Function}),fn=m("n-image"),gn=C([C("body >",[x("image-container","position: fixed;")]),x("image-preview-container","\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n "),x("image-preview-overlay","\n z-index: -1;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(0, 0, 0, .3);\n ",[D()]),x("image-preview-toolbar","\n z-index: 1;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n border-radius: var(--n-toolbar-border-radius);\n height: 48px;\n bottom: 40px;\n padding: 0 12px;\n background: var(--n-toolbar-color);\n box-shadow: var(--n-toolbar-box-shadow);\n color: var(--n-toolbar-icon-color);\n transition: color .3s var(--n-bezier);\n display: flex;\n align-items: center;\n ",[x("base-icon","\n padding: 0 8px;\n font-size: 28px;\n cursor: pointer;\n "),D()]),x("image-preview-wrapper","\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n pointer-events: none;\n ",[de()]),x("image-preview","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: all;\n margin: auto;\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n transition: transform .3s var(--n-bezier);\n "),x("image","\n display: inline-flex;\n max-height: 100%;\n max-width: 100%;\n ",[b("preview-disabled","\n cursor: pointer;\n "),C("img","\n border-radius: inherit;\n ")])]),vn=U({name:"ImagePreview",props:Object.assign(Object.assign({},hn),{src:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onNext:Function,onPrev:Function,onClose:[Function,Array]}),setup(e){const{src:n}=G(e),{mergedClsPrefixRef:t}=y(e),r=u("Image","-image",gn,te,e,t);let o=null;const i=K(null),l=K(null),a=K(!1),{localeRef:s}=d("Image"),c=K(e.defaultShow),p=V(e,"show"),f=h(p,c);function g(n){var t,r;switch(n.key){case" ":n.preventDefault();break;case"ArrowLeft":null===(t=e.onPrev)||void 0===t||t.call(e);break;case"ArrowRight":null===(r=e.onNext)||void 0===r||r.call(e);break;case"ArrowUp":n.preventDefault(),W();break;case"ArrowDown":n.preventDefault(),q();break;case"Escape":Y()}}function m(n){const{onUpdateShow:t,"onUpdate:show":r}=e;t&&v(t,n),r&&v(r,n),c.value=n,a.value=!0}Z(f,e=>{e?L("keydown",document,g):T("keydown",document,g)}),ne(()=>{T("keydown",document,g)});let b=0,x=0,C=0,k=0,P=0,S=0,O=0,z=0,$=!1;function B(e){const{clientX:n,clientY:t}=e;C=n-b,k=t-x,se(X)}function D(e){const{value:n}=i;if(!n)return{offsetX:0,offsetY:0};const t=n.getBoundingClientRect(),{moveVerticalDirection:r,moveHorizontalDirection:o,deltaHorizontal:l,deltaVertical:a}=e||{};let s=0,d=0;return s=t.width<=window.innerWidth?0:t.left>0?(t.width-window.innerWidth)/2:t.right<window.innerWidth?-(t.width-window.innerWidth)/2:"horizontalRight"===o?Math.min((t.width-window.innerWidth)/2,P-(null!=l?l:0)):Math.max(-(t.width-window.innerWidth)/2,P-(null!=l?l:0)),d=t.height<=window.innerHeight?0:t.top>0?(t.height-window.innerHeight)/2:t.bottom<window.innerHeight?-(t.height-window.innerHeight)/2:"verticalBottom"===r?Math.min((t.height-window.innerHeight)/2,S-(null!=a?a:0)):Math.max(-(t.height-window.innerHeight)/2,S-(null!=a?a:0)),{offsetX:s,offsetY:d}}function j(e){T("mousemove",document,B),T("mouseup",document,j);const{clientX:n,clientY:t}=e;$=!1;const r=D(function(e){const{mouseUpClientX:n,mouseUpClientY:t,mouseDownClientX:r,mouseDownClientY:o}=e,i=r-n,l=o-t;return{moveVerticalDirection:"vertical"+(l>0?"Top":"Bottom"),moveHorizontalDirection:"horizontal"+(i>0?"Left":"Right"),deltaHorizontal:i,deltaVertical:l}}({mouseUpClientX:n,mouseUpClientY:t,mouseDownClientX:O,mouseDownClientY:z}));C=r.offsetX,k=r.offsetY,X()}const I=H(fn,null);let A=0,U=1,M=0;function E(){U=1,A=0}function N(){const{value:e}=i;if(!e)return 1;const{innerWidth:n,innerHeight:t}=window,r=e.naturalHeight/(t-32),o=e.naturalWidth/(n-32);return r<1&&o<1?1:Math.max(r,o)}function W(){const e=function(){const{value:e}=i;if(!e)return 1;const{innerWidth:n,innerHeight:t}=window,r=Math.max(1,e.naturalHeight/(t-32)),o=Math.max(1,e.naturalWidth/(n-32));return Math.max(3,2*r,2*o)}();U<e&&(A+=1,U=Math.min(e,Math.pow(1.5,A)),X())}function q(){if(U>.5){const e=U;A-=1,U=Math.max(.5,Math.pow(1.5,A));const n=e-U;X(!1);const t=D();U+=n,X(!1),U-=n,C=t.offsetX,k=t.offsetY,X()}}function X(e=!0){var n;const{value:t}=i;if(!t)return;const{style:r}=t,o=J(null===(n=null==I?void 0:I.previewedImgPropsRef.value)||void 0===n?void 0:n.style);let l="";if("string"==typeof o)l=`${o};`;else for(const i in o)l+=`${Ve(i)}: ${o[i]};`;const a=`transform-origin: center; transform: translateX(${C}px) translateY(${k}px) rotate(${M}deg) scale(${U});`;r.cssText=$?`${l}cursor: grabbing; transition: none;${a}`:`${l}cursor: grab;${a}${e?"":"transition: none;"}`,e||t.offsetHeight}function Y(){if(f.value){const{onClose:n}=e;n&&v(n),m(!1),c.value=!1}}const Q={setThumbnailEl:e=>{o=e}};const ee=_(()=>{const{common:{cubicBezierEaseInOut:e},self:{toolbarIconColor:n,toolbarBorderRadius:t,toolbarBoxShadow:o,toolbarColor:i}}=r.value;return{"--n-bezier":e,"--n-toolbar-icon-color":n,"--n-toolbar-color":i,"--n-toolbar-border-radius":t,"--n-toolbar-box-shadow":o}}),{inlineThemeDisabled:re}=y(),oe=re?R("image-preview",void 0,ee,e):void 0;return Object.assign({clsPrefix:t,previewRef:i,previewWrapperRef:l,previewSrc:n,mergedShow:f,appear:w(),displayed:a,previewedImgProps:null==I?void 0:I.previewedImgPropsRef,handleWheel:function(e){e.preventDefault()},handlePreviewMousedown:function(e){var n,t;if(null===(t=null===(n=null==I?void 0:I.previewedImgPropsRef.value)||void 0===n?void 0:n.onMousedown)||void 0===t||t.call(n,e),0!==e.button)return;const{clientX:r,clientY:o}=e;$=!0,b=r-C,x=o-k,P=C,S=k,O=r,z=o,X(),L("mousemove",document,B),L("mouseup",document,j)},handlePreviewDblclick:function(e){var n,t;null===(t=null===(n=null==I?void 0:I.previewedImgPropsRef.value)||void 0===n?void 0:n.onDblclick)||void 0===t||t.call(n,e);const r=N();U=U===r?1:r,X()},syncTransformOrigin:function(){const{value:e}=l;if(!o||!e)return;const{style:n}=e,t=o.getBoundingClientRect();n.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`},handleAfterLeave:()=>{E(),M=0,a.value=!1},handleDragStart:e=>{var n,t;null===(t=null===(n=null==I?void 0:I.previewedImgPropsRef.value)||void 0===n?void 0:n.onDragstart)||void 0===t||t.call(n,e),e.preventDefault()},zoomIn:W,zoomOut:q,handleDownloadClick:function(){const e=n.value;e&&ge(e,void 0)},rotateCounterclockwise:function(){M-=90,X()},rotateClockwise:function(){M+=90,X()},handleSwitchPrev:function(){var n;E(),M=0,null===(n=e.onPrev)||void 0===n||n.call(e)},handleSwitchNext:function(){var n;E(),M=0,null===(n=e.onNext)||void 0===n||n.call(e)},withTooltip:function(n,t){if(e.showToolbarTooltip){const{value:e}=r;return F(ie,{to:!1,theme:e.peers.Tooltip,themeOverrides:e.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>s.value[t],trigger:()=>n})}return n},resizeToOrignalImageSize:function(){U=N(),A=Math.ceil(Math.log(U)/Math.log(1.5)),C=0,k=0,X()},cssVars:re?void 0:ee,themeClass:null==oe?void 0:oe.themeClass,onRender:null==oe?void 0:oe.onRender,doUpdateShow:m,close:Y},Q)},render(){var e,n;const{clsPrefix:t,renderToolbar:r,withTooltip:o}=this,i=o(F(k,{clsPrefix:t,onClick:this.handleSwitchPrev},{default:un}),"tipPrevious"),l=o(F(k,{clsPrefix:t,onClick:this.handleSwitchNext},{default:cn}),"tipNext"),a=o(F(k,{clsPrefix:t,onClick:this.rotateCounterclockwise},{default:()=>F(en,null)}),"tipCounterclockwise"),d=o(F(k,{clsPrefix:t,onClick:this.rotateClockwise},{default:()=>F(Ke,null)}),"tipClockwise"),u=o(F(k,{clsPrefix:t,onClick:this.resizeToOrignalImageSize},{default:()=>F(Je,null)}),"tipOriginalSize"),c=o(F(k,{clsPrefix:t,onClick:this.zoomOut},{default:()=>F(rn,null)}),"tipZoomOut"),p=o(F(k,{clsPrefix:t,onClick:this.handleDownloadClick},{default:()=>F(Ye,null)}),"tipDownload"),h=o(F(k,{clsPrefix:t,onClick:()=>this.close()},{default:pn}),"tipClose"),g=o(F(k,{clsPrefix:t,onClick:this.zoomIn},{default:()=>F(tn,null)}),"tipZoomIn");return F(Y,null,null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e),F(s,{show:this.mergedShow},{default:()=>{var e;return this.mergedShow||this.displayed?(null===(e=this.onRender)||void 0===e||e.call(this),ee(F("div",{ref:"containerRef",class:[`${t}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},F(Q,{name:"fade-in-transition",appear:this.appear},{default:()=>this.mergedShow?F("div",{class:`${t}-image-preview-overlay`,onClick:()=>this.close()}):null}),this.showToolbar?F(Q,{name:"fade-in-transition",appear:this.appear},{default:()=>this.mergedShow?F("div",{class:`${t}-image-preview-toolbar`},r?r({nodes:{prev:i,next:l,rotateCounterclockwise:a,rotateClockwise:d,resizeToOriginalSize:u,zoomOut:c,zoomIn:g,download:p,close:h}}):F(Y,null,this.onPrev?F(Y,null,i,l):null,a,d,u,c,g,p,h)):null}):null,F(Q,{name:"fade-in-scale-up-transition",onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{const{previewedImgProps:e={}}=this;return ee(F("div",{class:`${t}-image-preview-wrapper`,ref:"previewWrapperRef"},F("img",Object.assign({},e,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${t}-image-preview`,e.class],key:this.previewSrc,src:this.previewSrc,ref:"previewRef",onDragstart:this.handleDragStart}))),[[X,this.mergedShow]])}})),[[f,{enabled:this.mergedShow}]])):null}}))}}),mn=m("n-image-group"),wn=U({name:"ImageGroup",props:Object.assign(Object.assign({},hn),{srcList:Array,current:Number,defaultCurrent:{type:Number,default:0},show:{type:Boolean,default:void 0},defaultShow:Boolean,onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],onUpdateCurrent:[Function,Array],"onUpdate:current":[Function,Array]}),setup(e){const{mergedClsPrefixRef:n}=y(e),r=`c${z()}`,o=K(null),i=K(e.defaultShow),l=V(e,"show"),a=h(l,i),s=K(new Map),d=_(()=>{if(e.srcList){const n=new Map;return e.srcList.forEach((e,t)=>{n.set(`p${t}`,e)}),n}return s.value}),u=_(()=>Array.from(d.value.keys())),c=()=>u.value.length;const p=K(e.defaultCurrent),f=V(e,"current"),g=h(f,p),m=n=>{if(n!==g.value){const{onUpdateCurrent:t,"onUpdate:current":r}=e;t&&v(t,n),r&&v(r,n),p.value=n}},w=_(()=>u.value[g.value]),b=_(()=>d.value.get(w.value));function x(n){const{onUpdateShow:t,"onUpdate:show":r}=e;t&&v(t,n),r&&v(r,n),i.value=n}const C=_(()=>{const e=(e,n)=>{for(let t=e;t<=n;t++){const e=u.value[t];if(d.value.get(e))return t}},n=e(g.value+1,c()-1);return void 0===n?e(0,g.value-1):n}),R=_(()=>{const e=(e,n)=>{for(let t=e;t>=n;t--){const e=u.value[t];if(d.value.get(e))return t}},n=e(g.value-1,0);return void 0===n?e(c()-1,g.value+1):n});function k(n){var t,r;1===n?(void 0!==R.value&&m(C.value),null===(t=e.onPreviewNext)||void 0===t||t.call(e)):(void 0!==C.value&&m(R.value),null===(r=e.onPreviewPrev)||void 0===r||r.call(e))}return M(mn,{mergedClsPrefixRef:n,registerImageUrl:function(n,r){e.srcList&&t("image-group","`n-image` can't be placed inside `n-image-group` when image group's `src-list` prop is set.");const o=`r${n}`;return s.value.has(`r${o}`)||s.value.set(o,r),function(){s.value.has(o)||s.value.delete(o)}},setThumbnailEl:e=>{var n;null===(n=o.value)||void 0===n||n.setThumbnailEl(e)},toggleShow:e=>{x(!0),(e=>{const n=u.value.indexOf(e);n!==g.value&&m(n)})(e)},groupId:r,renderToolbarRef:V(e,"renderToolbar")}),{mergedClsPrefix:n,previewInstRef:o,mergedShow:a,src:b,onClose:function(){x(!1)},next:()=>{k(1)},prev:()=>{k(-1)}}},render(){return F(vn,{theme:this.theme,themeOverrides:this.themeOverrides,ref:"previewInstRef",onPrev:this.prev,onNext:this.next,src:this.src,show:this.mergedShow,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,onClose:this.onClose},this.$slots)}}),bn=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:"fill"},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},hn),xn=0,yn=U({name:"Image",props:bn,slots:Object,inheritAttrs:!1,setup(e){const n=K(null),t=K(!1),r=K(null),o=H(mn,null),{mergedClsPrefixRef:i}=o||y(e),l=_(()=>e.previewSrc||e.src),a=K(!1),s=xn++,d=()=>{if(e.previewDisabled||t.value)return;if(o)return o.setThumbnailEl(n.value),void o.toggleShow(`r${s}`);const{value:i}=r;i&&(i.setThumbnailEl(n.value),a.value=!0)},u={click:()=>{d()},showPreview:d},c=K(!e.lazy);W(()=>{var e;null===(e=n.value)||void 0===e||e.setAttribute("data-group-id",(null==o?void 0:o.groupId)||"")}),W(()=>{if(e.lazy&&e.intersectionObserverOptions){let t;const r=N(()=>{null==t||t(),t=void 0,t=dn(n.value,e.intersectionObserverOptions,c)});ne(()=>{r(),null==t||t()})}}),N(()=>{var n;e.src||null===(n=e.imgProps)||void 0===n||n.src,t.value=!1}),N(e=>{var n;const t=null===(n=null==o?void 0:o.registerImageUrl)||void 0===n?void 0:n.call(o,s,l.value||"");e(()=>{null==t||t()})});const p=K(!1);return M(fn,{previewedImgPropsRef:V(e,"previewedImgProps")}),Object.assign({mergedClsPrefix:i,groupId:null==o?void 0:o.groupId,previewInstRef:r,imageRef:n,mergedPreviewSrc:l,showError:t,shouldStartLoading:c,loaded:p,mergedOnClick:n=>{!function(n){var t,r;u.showPreview(),null===(r=null===(t=e.imgProps)||void 0===t?void 0:t.onClick)||void 0===r||r.call(t,n)}(n)},onPreviewClose:function(){a.value=!1},mergedOnError:n=>{if(!c.value)return;t.value=!0;const{onError:r,imgProps:{onError:o}={}}=e;null==r||r(n),null==o||o(n)},mergedOnLoad:n=>{const{onLoad:t,imgProps:{onLoad:r}={}}=e;null==t||t(n),null==r||r(n),p.value=!0},previewShow:a},u)},render(){var e,n;const{mergedClsPrefix:t,imgProps:r={},loaded:o,$attrs:i,lazy:l}=this,a=I(this.$slots.error,()=>[]),s=null===(n=(e=this.$slots).placeholder)||void 0===n?void 0:n.call(e),d=this.src||r.src,u=this.showError&&a.length?a:F("img",Object.assign(Object.assign({},r),{ref:"imageRef",width:this.width||r.width,height:this.height||r.height,src:this.showError?this.fallbackSrc:l&&this.intersectionObserverOptions?this.shouldStartLoading?d:void 0:d,alt:this.alt||r.alt,"aria-label":this.alt||r.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:on&&l&&!this.intersectionObserverOptions?"lazy":"eager",style:[r.style||"",s&&!o?{height:"0",width:"0",visibility:"hidden"}:"",{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return F("div",Object.assign({},i,{role:"none",class:[i.class,`${t}-image`,(this.previewDisabled||this.showError)&&`${t}-image--preview-disabled`]}),this.groupId?u:F(vn,{theme:this.theme,themeOverrides:this.themeOverrides,ref:"previewInstRef",showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,src:this.mergedPreviewSrc,show:!this.previewDisabled&&this.previewShow,onClose:this.onPreviewClose},{default:()=>u}),!o&&s)}}),Cn={success:F(ce,null),error:F(he,null),warning:F(fe,null),info:F(pe,null)},Rn=U({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:[String,Object],railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:n}){const t=_(()=>{const n="gradient",{fillColor:t}=e;return"object"==typeof t?`${n}-${g(JSON.stringify(t))}`:n});function r(n,r,o,i){const{gapDegree:l,viewBoxWidth:a,strokeWidth:s}=e,d=50,u=50+s/2,c=`M ${u},${u} m 0,50\n a 50,50 0 1 1 0,-100\n a 50,50 0 1 1 0,100`,p=2*Math.PI*d;return{pathString:c,pathStyle:{stroke:"rail"===i?o:"object"==typeof e.fillColor?`url(#${t.value})`:o,strokeDasharray:`${Math.min(n,100)/100*(p-l)}px ${8*a}px`,strokeDashoffset:`-${l/2}px`,transformOrigin:r?"center":void 0,transform:r?`rotate(${r}deg)`:void 0}}}return()=>{const{fillColor:o,railColor:i,strokeWidth:l,offsetDegree:a,status:s,percentage:d,showIndicator:u,indicatorTextColor:c,unit:p,gapOffsetDegree:h,clsPrefix:f}=e,{pathString:g,pathStyle:v}=r(100,0,i,"rail"),{pathString:m,pathStyle:w}=r(d,a,o,"fill"),b=100+l;return F("div",{class:`${f}-progress-content`,role:"none"},F("div",{class:`${f}-progress-graph`,"aria-hidden":!0},F("div",{class:`${f}-progress-graph-circle`,style:{transform:h?`rotate(${h}deg)`:void 0}},F("svg",{viewBox:`0 0 ${b} ${b}`},(()=>{const n="object"==typeof e.fillColor,r=n?e.fillColor.stops[0]:"",o=n?e.fillColor.stops[1]:"";return n&&F("defs",null,F("linearGradient",{id:t.value,x1:"0%",y1:"100%",x2:"100%",y2:"0%"},F("stop",{offset:"0%","stop-color":r}),F("stop",{offset:"100%","stop-color":o})))})(),F("g",null,F("path",{class:`${f}-progress-graph-circle-rail`,d:g,"stroke-width":l,"stroke-linecap":"round",fill:"none",style:v})),F("g",null,F("path",{class:[`${f}-progress-graph-circle-fill`,0===d&&`${f}-progress-graph-circle-fill--empty`],d:m,"stroke-width":l,"stroke-linecap":"round",fill:"none",style:w}))))),u?F("div",null,n.default?F("div",{class:`${f}-progress-custom-content`,role:"none"},n.default()):"default"!==s?F("div",{class:`${f}-progress-icon`,"aria-hidden":!0},F(k,{clsPrefix:f},{default:()=>Cn[s]})):F("div",{class:`${f}-progress-text`,style:{color:c},role:"none"},F("span",{class:`${f}-progress-text__percentage`},d),F("span",{class:`${f}-progress-text__unit`},p))):null)}}}),kn={success:F(ce,null),error:F(he,null),warning:F(fe,null),info:F(pe,null)},Pn=U({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:[String,Object],status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:n}){const t=_(()=>P(e.height)),r=_(()=>{var n,t;return"object"==typeof e.fillColor?`linear-gradient(to right, ${null===(n=e.fillColor)||void 0===n?void 0:n.stops[0]} , ${null===(t=e.fillColor)||void 0===t?void 0:t.stops[1]})`:e.fillColor}),o=_(()=>void 0!==e.railBorderRadius?P(e.railBorderRadius):void 0!==e.height?P(e.height,{c:.5}):""),i=_(()=>void 0!==e.fillBorderRadius?P(e.fillBorderRadius):void 0!==e.railBorderRadius?P(e.railBorderRadius):void 0!==e.height?P(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:l,railColor:a,railStyle:s,percentage:d,unit:u,indicatorTextColor:c,status:p,showIndicator:h,processing:f,clsPrefix:g}=e;return F("div",{class:`${g}-progress-content`,role:"none"},F("div",{class:`${g}-progress-graph`,"aria-hidden":!0},F("div",{class:[`${g}-progress-graph-line`,{[`${g}-progress-graph-line--indicator-${l}`]:!0}]},F("div",{class:`${g}-progress-graph-line-rail`,style:[{backgroundColor:a,height:t.value,borderRadius:o.value},s]},F("div",{class:[`${g}-progress-graph-line-fill`,f&&`${g}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,background:r.value,height:t.value,lineHeight:t.value,borderRadius:i.value}},"inside"===l?F("div",{class:`${g}-progress-graph-line-indicator`,style:{color:c}},n.default?n.default():`${d}${u}`):null)))),h&&"outside"===l?F("div",null,n.default?F("div",{class:`${g}-progress-custom-content`,style:{color:c},role:"none"},n.default()):"default"===p?F("div",{role:"none",class:`${g}-progress-icon ${g}-progress-icon--as-text`,style:{color:c}},d,u):F("div",{class:`${g}-progress-icon`,"aria-hidden":!0},F(k,{clsPrefix:g},{default:()=>kn[p]}))):null)}}});function Sn(e,n,t=100){return`m ${t/2} ${t/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}var On=U({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:n}){const t=_(()=>e.percentage.map((n,t)=>`${Math.PI*n/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*t)-e.circleGap*t)*2}, ${8*e.viewBoxWidth}`));return()=>{const{viewBoxWidth:r,strokeWidth:o,circleGap:i,showIndicator:l,fillColor:a,railColor:s,railStyle:d,percentage:u,clsPrefix:c}=e;return F("div",{class:`${c}-progress-content`,role:"none"},F("div",{class:`${c}-progress-graph`,"aria-hidden":!0},F("div",{class:`${c}-progress-graph-circle`},F("svg",{viewBox:`0 0 ${r} ${r}`},F("defs",null,u.map((n,t)=>((n,t)=>{const r=e.fillColor[t],o="object"==typeof r?r.stops[0]:"",i="object"==typeof r?r.stops[1]:"";return"object"==typeof e.fillColor[t]&&F("linearGradient",{id:`gradient-${t}`,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},F("stop",{offset:"0%","stop-color":o}),F("stop",{offset:"100%","stop-color":i}))})(0,t))),u.map((e,n)=>F("g",{key:n},F("path",{class:`${c}-progress-graph-circle-rail`,d:Sn(r/2-o/2*(1+2*n)-i*n,0,r),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:s[n]},d[n]]}),F("path",{class:[`${c}-progress-graph-circle-fill`,0===e&&`${c}-progress-graph-circle-fill--empty`],d:Sn(r/2-o/2*(1+2*n)-i*n,0,r),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:t.value[n],strokeDashoffset:0,stroke:"object"==typeof a[n]?`url(#gradient-${n})`:a[n]}})))))),l&&n.default?F("div",null,F("div",{class:`${c}-progress-text`},n.default())):null)}}}),Ln=C([x("progress",{display:"inline-block"},[x("progress-icon","\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n "),A("line","\n width: 100%;\n display: block;\n ",[x("progress-content","\n display: flex;\n align-items: center;\n ",[x("progress-graph",{flex:1})]),x("progress-custom-content",{marginLeft:"14px"}),x("progress-icon","\n width: 30px;\n padding-left: 14px;\n height: var(--n-icon-size-line);\n line-height: var(--n-icon-size-line);\n font-size: var(--n-icon-size-line);\n ",[A("as-text","\n color: var(--n-text-color-line-outer);\n text-align: center;\n width: 40px;\n font-size: var(--n-font-size);\n padding-left: 4px;\n transition: color .3s var(--n-bezier);\n ")])]),A("circle, dashboard",{width:"120px"},[x("progress-custom-content","\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n "),x("progress-text","\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: flex;\n align-items: center;\n color: inherit;\n font-size: var(--n-font-size-circle);\n color: var(--n-text-color-circle);\n font-weight: var(--n-font-weight-circle);\n transition: color .3s var(--n-bezier);\n white-space: nowrap;\n "),x("progress-icon","\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: flex;\n align-items: center;\n color: var(--n-icon-color);\n font-size: var(--n-icon-size-circle);\n ")]),A("multiple-circle","\n width: 200px;\n color: inherit;\n ",[x("progress-text","\n font-weight: var(--n-font-weight-circle);\n color: var(--n-text-color-circle);\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color .3s var(--n-bezier);\n ")]),x("progress-content",{position:"relative"}),x("progress-graph",{position:"relative"},[x("progress-graph-circle",[C("svg",{verticalAlign:"bottom"}),x("progress-graph-circle-fill","\n stroke: var(--n-fill-color);\n transition:\n opacity .3s var(--n-bezier),\n stroke .3s var(--n-bezier),\n stroke-dasharray .3s var(--n-bezier);\n ",[A("empty",{opacity:0})]),x("progress-graph-circle-rail","\n transition: stroke .3s var(--n-bezier);\n overflow: hidden;\n stroke: var(--n-rail-color);\n ")]),x("progress-graph-line",[A("indicator-inside",[x("progress-graph-line-rail","\n height: 16px;\n line-height: 16px;\n border-radius: 10px;\n ",[x("progress-graph-line-fill","\n height: inherit;\n border-radius: 10px;\n "),x("progress-graph-line-indicator","\n background: #0000;\n white-space: nowrap;\n text-align: right;\n margin-left: 14px;\n margin-right: 14px;\n height: inherit;\n font-size: 12px;\n color: var(--n-text-color-line-inner);\n transition: color .3s var(--n-bezier);\n ")])]),A("indicator-inside-label","\n height: 16px;\n display: flex;\n align-items: center;\n ",[x("progress-graph-line-rail","\n flex: 1;\n transition: background-color .3s var(--n-bezier);\n "),x("progress-graph-line-indicator","\n background: var(--n-fill-color);\n font-size: 12px;\n transform: translateZ(0);\n display: flex;\n vertical-align: middle;\n height: 16px;\n line-height: 16px;\n padding: 0 10px;\n border-radius: 10px;\n position: absolute;\n white-space: nowrap;\n color: var(--n-text-color-line-inner);\n transition:\n right .2s var(--n-bezier),\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n ")]),x("progress-graph-line-rail","\n position: relative;\n overflow: hidden;\n height: var(--n-rail-height);\n border-radius: 5px;\n background-color: var(--n-rail-color);\n transition: background-color .3s var(--n-bezier);\n ",[x("progress-graph-line-fill","\n background: var(--n-fill-color);\n position: relative;\n border-radius: 5px;\n height: inherit;\n width: 100%;\n max-width: 0%;\n transition:\n background-color .3s var(--n-bezier),\n max-width .2s var(--n-bezier);\n ",[A("processing",[C("&::after",'\n content: "";\n background-image: var(--n-line-bg-processing);\n animation: progress-processing-animation 2s var(--n-bezier) infinite;\n ')])])])])])]),C("@keyframes progress-processing-animation","\n 0% {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 100%;\n opacity: 1;\n }\n 66% {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n }\n 100% {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n opacity: 0;\n }\n ")]),zn=U({name:"Progress",props:Object.assign(Object.assign({},u.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array,Object],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),setup(e){const n=_(()=>e.indicatorPlacement||e.indicatorPosition),t=_(()=>e.gapDegree||0===e.gapDegree?e.gapDegree:"dashboard"===e.type?75:void 0),{mergedClsPrefixRef:r,inlineThemeDisabled:o}=y(e),i=u("Progress","-progress",Ln,oe,e,r),l=_(()=>{const{status:n}=e,{common:{cubicBezierEaseInOut:t},self:{fontSize:r,fontSizeCircle:o,railColor:l,railHeight:a,iconSizeCircle:s,iconSizeLine:d,textColorCircle:u,textColorLineInner:c,textColorLineOuter:p,lineBgProcessing:h,fontWeightCircle:f,[j("iconColor",n)]:g,[j("fillColor",n)]:v}}=i.value;return{"--n-bezier":t,"--n-fill-color":v,"--n-font-size":r,"--n-font-size-circle":o,"--n-font-weight-circle":f,"--n-icon-color":g,"--n-icon-size-circle":s,"--n-icon-size-line":d,"--n-line-bg-processing":h,"--n-rail-color":l,"--n-rail-height":a,"--n-text-color-circle":u,"--n-text-color-line-inner":c,"--n-text-color-line-outer":p}}),a=o?R("progress",_(()=>e.status[0]),l,e):void 0;return{mergedClsPrefix:r,mergedIndicatorPlacement:n,gapDeg:t,cssVars:o?void 0:l,themeClass:null==a?void 0:a.themeClass,onRender:null==a?void 0:a.onRender}},render(){const{type:e,cssVars:n,indicatorTextColor:t,showIndicator:r,status:o,railColor:i,railStyle:l,color:a,percentage:s,viewBoxWidth:d,strokeWidth:u,mergedIndicatorPlacement:c,unit:p,borderRadius:h,fillBorderRadius:f,height:g,processing:v,circleGap:m,mergedClsPrefix:w,gapDeg:b,gapOffsetDegree:x,themeClass:y,$slots:C,onRender:R}=this;return null==R||R(),F("div",{class:[y,`${w}-progress`,`${w}-progress--${e}`,`${w}-progress--${o}`],style:n,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,role:"circle"===e||"line"===e||"dashboard"===e?"progressbar":"none"},"circle"===e||"dashboard"===e?F(Rn,{clsPrefix:w,status:o,showIndicator:r,indicatorTextColor:t,railColor:i,fillColor:a,railStyle:l,offsetDegree:this.offsetDegree,percentage:s,viewBoxWidth:d,strokeWidth:u,gapDegree:void 0===b?"dashboard"===e?75:0:b,gapOffsetDegree:x,unit:p},C):"line"===e?F(Pn,{clsPrefix:w,status:o,showIndicator:r,indicatorTextColor:t,railColor:i,fillColor:a,railStyle:l,percentage:s,processing:v,indicatorPlacement:c,unit:p,fillBorderRadius:f,railBorderRadius:h,height:g},C):"multiple-circle"===e?F(On,{clsPrefix:w,strokeWidth:u,railColor:i,fillColor:a,railStyle:l,viewBoxWidth:d,percentage:s,showIndicator:r,circleGap:m},C):null)}}),$n=m("n-upload"),Tn=C([x("upload","width: 100%;",[A("dragger-inside",[x("upload-trigger","\n display: block;\n ")]),A("drag-over",[x("upload-dragger","\n border: var(--n-dragger-border-hover);\n ")])]),x("upload-dragger","\n cursor: pointer;\n box-sizing: border-box;\n width: 100%;\n text-align: center;\n border-radius: var(--n-border-radius);\n padding: 24px;\n opacity: 1;\n transition:\n opacity .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n background-color: var(--n-dragger-color);\n border: var(--n-dragger-border);\n ",[C("&:hover","\n border: var(--n-dragger-border-hover);\n "),A("disabled","\n cursor: not-allowed;\n ")]),x("upload-trigger","\n display: inline-block;\n box-sizing: border-box;\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n ",[C("+",[x("upload-file-list","margin-top: 8px;")]),A("disabled","\n opacity: var(--n-item-disabled-opacity);\n cursor: not-allowed;\n "),A("image-card","\n width: 96px;\n height: 96px;\n ",[x("base-icon","\n font-size: 24px;\n "),x("upload-dragger","\n padding: 0;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n ")])]),x("upload-file-list","\n line-height: var(--n-line-height);\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n ",[C("a, img","outline: none;"),A("disabled","\n opacity: var(--n-item-disabled-opacity);\n cursor: not-allowed;\n ",[x("upload-file","cursor: not-allowed;")]),A("grid","\n display: grid;\n grid-template-columns: repeat(auto-fill, 96px);\n grid-gap: 8px;\n margin-top: 0;\n "),x("upload-file","\n display: block;\n box-sizing: border-box;\n cursor: default;\n padding: 0px 12px 0 6px;\n transition: background-color .3s var(--n-bezier);\n border-radius: var(--n-border-radius);\n ",[ae(),x("progress",[ae({foldPadding:!0})]),C("&:hover","\n background-color: var(--n-item-color-hover);\n ",[x("upload-file-info",[B("action","\n opacity: 1;\n ")])]),A("image-type","\n border-radius: var(--n-border-radius);\n text-decoration: underline;\n text-decoration-color: #0000;\n ",[x("upload-file-info","\n padding-top: 0px;\n padding-bottom: 0px;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 6px 0;\n ",[x("progress","\n padding: 2px 0;\n margin-bottom: 0;\n "),B("name","\n padding: 0 8px;\n "),B("thumbnail","\n width: 32px;\n height: 32px;\n font-size: 28px;\n display: flex;\n justify-content: center;\n align-items: center;\n ",[C("img","\n width: 100%;\n ")])])]),A("text-type",[x("progress","\n box-sizing: border-box;\n padding-bottom: 6px;\n margin-bottom: 6px;\n ")]),A("image-card-type","\n position: relative;\n width: 96px;\n height: 96px;\n border: var(--n-item-border-image-card);\n border-radius: var(--n-border-radius);\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);\n border-radius: var(--n-border-radius);\n overflow: hidden;\n ",[x("progress","\n position: absolute;\n left: 8px;\n bottom: 8px;\n right: 8px;\n width: unset;\n "),x("upload-file-info","\n padding: 0;\n width: 100%;\n height: 100%;\n ",[B("thumbnail","\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: 36px;\n ",[C("img","\n width: 100%;\n ")])]),C("&::before",'\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: inherit;\n opacity: 0;\n transition: opacity .2s var(--n-bezier);\n content: "";\n '),C("&:hover",[C("&::before","opacity: 1;"),x("upload-file-info",[B("thumbnail","opacity: .12;")])])]),A("error-status",[C("&:hover","\n background-color: var(--n-item-color-hover-error);\n "),x("upload-file-info",[B("name","color: var(--n-item-text-color-error);"),B("thumbnail","color: var(--n-item-text-color-error);")]),A("image-card-type","\n border: var(--n-item-border-image-card-error);\n ")]),A("with-url","\n cursor: pointer;\n ",[x("upload-file-info",[B("name","\n color: var(--n-item-text-color-success);\n text-decoration-color: var(--n-item-text-color-success);\n ",[C("a","\n text-decoration: underline;\n ")])])]),x("upload-file-info","\n position: relative;\n padding-top: 6px;\n padding-bottom: 6px;\n display: flex;\n flex-wrap: nowrap;\n ",[B("thumbnail","\n font-size: 18px;\n opacity: 1;\n transition: opacity .2s var(--n-bezier);\n color: var(--n-item-icon-color);\n ",[x("base-icon","\n margin-right: 2px;\n vertical-align: middle;\n transition: color .3s var(--n-bezier);\n ")]),B("action","\n padding-top: inherit;\n padding-bottom: inherit;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 80px;\n display: flex;\n align-items: center;\n transition: opacity .2s var(--n-bezier);\n justify-content: flex-end;\n opacity: 0;\n ",[x("button",[C("&:not(:last-child)",{marginRight:"4px"}),x("base-icon",[C("svg",[c()])])]),A("image-type","\n position: relative;\n max-width: 80px;\n width: auto;\n "),A("image-card-type","\n z-index: 2;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n ")]),B("name","\n color: var(--n-item-text-color);\n flex: 1;\n display: flex;\n justify-content: center;\n text-overflow: ellipsis;\n overflow: hidden;\n flex-direction: column;\n text-decoration-color: #0000;\n font-size: var(--n-font-size);\n transition:\n color .3s var(--n-bezier),\n text-decoration-color .3s var(--n-bezier); \n ",[C("a","\n color: inherit;\n text-decoration: underline;\n ")])])])]),x("upload-file-input","\n display: none;\n width: 0;\n height: 0;\n opacity: 0;\n ")]),Bn="__UPLOAD_DRAGGER__",Dn=U({name:"UploadDragger",[Bn]:!0,setup(e,{slots:n}){const r=H($n,null);return r||t("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:e},mergedDisabledRef:{value:t},maxReachedRef:{value:o}}=r;return F("div",{class:[`${e}-upload-dragger`,(t||o)&&`${e}-upload-dragger--disabled`]},n)}}});function jn(){return F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},F("g",{fill:"none"},F("path",{d:"M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z",fill:"currentColor"})))}function In(){return F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},F("g",{fill:"none"},F("path",{d:"M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z",fill:"currentColor"})))}var An=U({name:"UploadProgress",props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup:()=>({mergedTheme:H($n).mergedThemeRef}),render(){return F(r,null,{default:()=>this.show?F(zn,{type:"line",showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),Un=function(e,n,t,r){return new(t||(t=Promise))(function(o,i){function l(e){try{s(r.next(e))}catch(n){i(n)}}function a(e){try{s(r.throw(e))}catch(n){i(n)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(l,a)}s((r=r.apply(e,n||[])).next())})};function Mn(e){return e.includes("image/")}function En(e=""){const n=e.split("/"),t=n[n.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(t)||[""])[0]}var Fn=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,Hn=e=>{if(e.type)return Mn(e.type);const n=En(e.name||"");if(Fn.test(n))return!0;const t=e.thumbnailUrl||e.url||"",r=En(t);return!(!/^data:image\//.test(t)&&!Fn.test(r))};var Nn=l&&window.FileReader&&window.File;function Wn(e){return e.isDirectory}function Zn(e){return e.isFile}function qn(e){const{id:n,name:t,percentage:r,status:o,url:i,file:l,thumbnailUrl:a,type:s,fullPath:d,batchId:u}=e;return{id:n,name:t,percentage:null!=r?r:null,status:o,url:null!=i?i:null,file:null!=l?l:null,thumbnailUrl:null!=a?a:null,type:null!=s?s:null,fullPath:null!=d?d:null,batchId:null!=u?u:null}}var _n=function(e,n,t,r){return new(t||(t=Promise))(function(o,i){function l(e){try{s(r.next(e))}catch(n){i(n)}}function a(e){try{s(r.throw(e))}catch(n){i(n)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(l,a)}s((r=r.apply(e,n||[])).next())})},Vn={paddingMedium:"0 3px",heightMedium:"24px",iconSizeMedium:"18px"},Xn=U({name:"UploadFile",props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0},index:{type:Number,required:!0}},setup(n){const t=H($n),r=K(null),o=K(""),i=_(()=>{const{file:e}=n;return"finished"===e.status?"success":"error"===e.status?"error":"info"}),l=_(()=>{const{file:e}=n;if("error"===e.status)return"error"}),a=_(()=>{const{file:e}=n;return"uploading"===e.status}),s=_(()=>{if(!t.showCancelButtonRef.value)return!1;const{file:e}=n;return["uploading","pending","error"].includes(e.status)}),d=_(()=>{if(!t.showRemoveButtonRef.value)return!1;const{file:e}=n;return["finished"].includes(e.status)}),u=_(()=>{if(!t.showDownloadButtonRef.value)return!1;const{file:e}=n;return["finished"].includes(e.status)}),c=_(()=>{if(!t.showRetryButtonRef.value)return!1;const{file:e}=n;return["error"].includes(e.status)}),h=e(()=>o.value||n.file.thumbnailUrl||n.file.url),f=_(()=>{if(!t.showPreviewButtonRef.value)return!1;const{file:{status:e},listType:r}=n;return["finished"].includes(e)&&h.value&&"image-card"===r});function g(e){const{xhrMap:r,doChange:o,onRemoveRef:{value:i},mergedFileListRef:{value:l}}=t;Promise.resolve(!i||i({file:Object.assign({},e),fileList:l,index:n.index})).then(n=>{if(!1===n)return;const t=Object.assign({},e,{status:"removed"});r.delete(e.id),o(t,void 0,{remove:!0})})}const v=()=>_n(this,void 0,void 0,function*(){const{listType:e}=n;"image"!==e&&"image-card"!==e||t.shouldUseThumbnailUrlRef.value(n.file)&&(o.value=yield t.getFileThumbnailUrlResolver(n.file))});return N(()=>{v()}),{mergedTheme:t.mergedThemeRef,progressStatus:i,buttonType:l,showProgress:a,disabled:t.mergedDisabledRef,showCancelButton:s,showRemoveButton:d,showDownloadButton:u,showRetryButton:c,showPreviewButton:f,mergedThumbnailUrl:h,shouldUseThumbnailUrl:t.shouldUseThumbnailUrlRef,renderIcon:t.renderIconRef,imageRef:r,handleRemoveOrCancelClick:function(e){e.preventDefault();const{file:r}=n;["finished","pending","error"].includes(r.status)?g(r):["uploading"].includes(r.status)?function(e){const{xhrMap:n}=t,r=n.get(e.id);null==r||r.abort(),g(Object.assign({},e))}(r):p("upload","The button clicked type is unknown.")},handleDownloadClick:function(e){e.preventDefault(),function(e){const{onDownloadRef:{value:n},customDownloadRef:{value:r}}=t;Promise.resolve(!n||n(Object.assign({},e))).then(n=>{!1!==n&&(r?r(Object.assign({},e)):ge(e.url,e.name))})}(n.file)},handleRetryClick:function(){return _n(this,void 0,void 0,function*(){const e=t.onRetryRef.value;e&&!1===(yield e({file:n.file}))||t.submit(n.file.id)})},handlePreviewClick:function(e){const{onPreviewRef:{value:o}}=t;if(o)o(n.file,{event:e});else if("image-card"===n.listType){const{value:e}=r;if(!e)return;e.showPreview()}}}},render(){const{clsPrefix:e,mergedTheme:t,listType:r,file:o,renderIcon:i}=this;let l;const a="image"===r;l=a||"image-card"===r?this.shouldUseThumbnailUrl(o)&&this.mergedThumbnailUrl?F("a",{rel:"noopener noreferer",target:"_blank",href:o.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},"image-card"===r?F(yn,{src:this.mergedThumbnailUrl||void 0,previewSrc:o.url||void 0,alt:o.name,ref:"imageRef"}):F("img",{src:this.mergedThumbnailUrl||void 0,alt:o.name})):F("span",{class:`${e}-upload-file-info__thumbnail`},i?i(o):Hn(o)?F(k,{clsPrefix:e},{default:jn}):F(k,{clsPrefix:e},{default:In})):F("span",{class:`${e}-upload-file-info__thumbnail`},i?i(o):F(k,{clsPrefix:e},{default:()=>F(Xe,null)}));const s=F(An,{show:this.showProgress,percentage:o.percentage||0,status:this.progressStatus}),d="text"===r||"image"===r;return F("div",{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,o.url&&"error"!==o.status&&"image-card"!==r&&`${e}-upload-file--with-url`,`${e}-upload-file--${r}-type`]},F("div",{class:`${e}-upload-file-info`},l,F("div",{class:`${e}-upload-file-info__name`},d&&(o.url&&"error"!==o.status?F("a",{rel:"noopener noreferer",target:"_blank",href:o.url||void 0,onClick:this.handlePreviewClick},o.name):F("span",{onClick:this.handlePreviewClick},o.name)),a&&s),F("div",{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${r}-type`]},this.showPreviewButton?F($,{key:"preview",quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Vn},{icon:()=>F(k,{clsPrefix:e},{default:()=>F(ue,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&F($,{key:"cancelOrTrash",theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:Vn,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>F(n,null,{default:()=>this.showRemoveButton?F(k,{clsPrefix:e,key:"trash"},{default:()=>F(nn,null)}):F(k,{clsPrefix:e,key:"cancel"},{default:()=>F(Ge,null)})})}),this.showRetryButton&&!this.disabled&&F($,{key:"retry",quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Vn},{icon:()=>F(k,{clsPrefix:e},{default:()=>F(Qe,null)})}),this.showDownloadButton?F($,{key:"download",quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Vn},{icon:()=>F(k,{clsPrefix:e},{default:()=>F(Ye,null)})}):null)),!a&&s)}}),Gn=U({name:"UploadTrigger",props:{abstract:Boolean},slots:Object,setup(e,{slots:n}){const r=H($n,null);r||t("upload-trigger","`n-upload-trigger` must be placed inside `n-upload`.");const{mergedClsPrefixRef:i,mergedDisabledRef:l,maxReachedRef:a,listTypeRef:s,dragOverRef:d,openOpenFileDialog:u,draggerInsideRef:c,handleFileAddition:p,mergedDirectoryDndRef:h,triggerClassRef:f,triggerStyleRef:g}=r,v=_(()=>"image-card"===s.value);function m(){l.value||a.value||u()}function w(e){e.preventDefault(),d.value=!0}function b(e){e.preventDefault(),d.value=!0}function x(e){e.preventDefault(),d.value=!1}function y(e){var n;if(e.preventDefault(),!c.value||l.value||a.value)return void(d.value=!1);const t=null===(n=e.dataTransfer)||void 0===n?void 0:n.items;(null==t?void 0:t.length)?function(n,t){return Un(this,void 0,void 0,function*(){const r=[];return yield function n(i){return Un(this,void 0,void 0,function*(){for(const l of i)if(l)if(t&&Wn(l)){const t=l.createReader();let r,i=[];try{do{r=yield new Promise((e,n)=>{t.readEntries(e,n)}),i=i.concat(r)}while(r.length>0)}catch(e){o("upload","error happens when handling directory upload",e)}yield n(i)}else if(Zn(l))try{const e=yield new Promise((e,n)=>{l.file(e,n)});r.push({file:e,entry:l,source:"dnd"})}catch(e){o("upload","error happens when handling file upload",e)}})}(n),r})}(Array.from(t).map(e=>e.webkitGetAsEntry()),h.value).then(e=>{p(e)}).finally(()=>{d.value=!1}):d.value=!1}return()=>{var t;const{value:r}=i;return e.abstract?null===(t=n.default)||void 0===t?void 0:t.call(n,{handleClick:m,handleDrop:y,handleDragOver:w,handleDragEnter:b,handleDragLeave:x}):F("div",{class:[`${r}-upload-trigger`,(l.value||a.value)&&`${r}-upload-trigger--disabled`,v.value&&`${r}-upload-trigger--image-card`,f.value],style:g.value,onClick:m,onDrop:y,onDragover:w,onDragenter:b,onDragleave:x},v.value?F(Dn,null,{default:()=>I(n.default,()=>[F(k,{clsPrefix:r},{default:()=>F(le,null)})])}):n)}}}),Yn=U({name:"UploadFileList",setup(e,{slots:n}){const o=H($n,null);o||t("upload-file-list","`n-upload-file-list` must be placed inside `n-upload`.");const{abstractRef:i,mergedClsPrefixRef:l,listTypeRef:a,mergedFileListRef:s,fileListClassRef:d,fileListStyleRef:u,cssVarsRef:c,themeClassRef:p,maxReachedRef:h,showTriggerRef:f,imageGroupPropsRef:g}=o,v=_(()=>"image-card"===a.value),m=()=>s.value.map((e,n)=>F(Xn,{clsPrefix:l.value,key:e.id,file:e,index:n,listType:a.value}));return()=>{const{value:e}=l,{value:t}=i;return F("div",{class:[`${e}-upload-file-list`,v.value&&`${e}-upload-file-list--grid`,t?null==p?void 0:p.value:void 0,d.value],style:[t&&c?c.value:"",u.value]},v.value?F(wn,Object.assign({},g.value),{default:m}):F(r,{group:!0},{default:m}),f.value&&!h.value&&v.value&&F(Gn,null,n))}}}),Jn=function(e,n,t,r){return new(t||(t=Promise))(function(o,i){function l(e){try{s(r.next(e))}catch(n){i(n)}}function a(e){try{s(r.throw(e))}catch(n){i(n)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(l,a)}s((r=r.apply(e,n||[])).next())})};function Qn(e,n,t){const r=function(e,n,t){const{doChange:r,xhrMap:o}=e;let i=0;function l(t){var l;let a=Object.assign({},n,{status:"error",percentage:i});o.delete(n.id),a=qn((null===(l=e.onError)||void 0===l?void 0:l.call(e,{file:a,event:t}))||a),r(a,t)}return{handleXHRLoad:function(a){var s;if(e.isErrorState){if(e.isErrorState(t))return void l(a)}else if(t.status<200||t.status>=300)return void l(a);let d=Object.assign({},n,{status:"finished",percentage:i});o.delete(n.id),d=qn((null===(s=e.onFinish)||void 0===s?void 0:s.call(e,{file:d,event:a}))||d),r(d,a)},handleXHRError:l,handleXHRAbort(e){const t=Object.assign({},n,{status:"removed",file:null,percentage:i});o.delete(n.id),r(t,e)},handleXHRProgress(e){const t=Object.assign({},n,{status:"uploading"});if(e.lengthComputable){const n=Math.ceil(e.loaded/e.total*100);t.percentage=n,i=n}r(t,e)}}}(e,n,t);t.onabort=r.handleXHRAbort,t.onerror=r.handleXHRError,t.onload=r.handleXHRLoad,t.upload&&(t.upload.onprogress=r.handleXHRProgress)}function Kn(e,n){return"function"==typeof e?e({file:n}):e||{}}function et(e,n,t,{method:r,action:o,withCredentials:i,responseType:l,headers:a,data:s}){const d=new XMLHttpRequest;d.responseType=l,e.xhrMap.set(t.id,d),d.withCredentials=i;const u=new FormData;if(function(e,n,t){const r=Kn(n,t);r&&Object.keys(r).forEach(n=>{e.append(n,r[n])})}(u,s,t),null!==t.file&&u.append(n,t.file),Qn(e,t,d),void 0!==o){d.open(r.toUpperCase(),o),function(e,n,t){const r=Kn(n,t);r&&Object.keys(r).forEach(n=>{e.setRequestHeader(n,r[n])})}(d,a,t),d.send(u);const n=Object.assign({},t,{status:"uploading"});e.doChange(n)}}var nt=U({name:"Upload",props:Object.assign(Object.assign({},u.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onRetry:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,customDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListClass:String,fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>!!Nn&&Hn(e)},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerClass:String,triggerStyle:[String,Object],renderIcon:Function}),setup(e){e.abstract&&"image-card"===e.listType&&t("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:o}=y(e),i=u("Upload","-upload",Tn,re,e,n),l=a("Upload",o,n),s=O(e),d=K(e.defaultFileList),c=V(e,"fileList"),p=K(null),f={value:!1},g=K(!1),m=new Map,w=h(c,d),b=_(()=>w.value.map(qn)),x=_(()=>{const{max:n}=e;return void 0!==n&&b.value.length>=n});function C(){var e;null===(e=p.value)||void 0===e||e.click()}const k=_(()=>e.multiple||e.directory),P=(n,t,r={append:!1,remove:!1})=>{const{append:o,remove:i}=r,l=Array.from(b.value),a=l.findIndex(e=>e.id===n.id);if(o||i||~a){o?l.push(n):i?l.splice(a,1):l.splice(a,1,n);const{onChange:r}=e;r&&r({file:n,fileList:l,event:t}),function(n){const{"onUpdate:fileList":t,onUpdateFileList:r}=e;t&&v(t,n),r&&v(r,n),d.value=n}(l)}};function S(n,t){if(!n||0===n.length)return;const{onBeforeUpload:r}=e;n=k.value?n:[n[0]];const{max:o,accept:i}=e;n=n.filter(({file:e,source:n})=>"dnd"!==n||!(null==i?void 0:i.trim())||function(e,n,t){return e=e.toLowerCase(),n=n.toLocaleLowerCase(),(t=t.toLocaleLowerCase()).split(",").map(e=>e.trim()).filter(Boolean).some(t=>{if(t.startsWith(".")){if(e.endsWith(t))return!0}else{if(!t.includes("/"))return!0;{const[e,r]=n.split("/"),[o,i]=t.split("/");if(("*"===o||e&&o&&o===e)&&("*"===i||r&&i&&i===r))return!0}}return!1})}(e.name,e.type,i)),o&&(n=n.slice(0,o-b.value.length));const l=z();Promise.all(n.map(e=>Jn(this,[e],void 0,function*({file:e,entry:n}){var t;const o={id:z(),batchId:l,name:e.name,status:"pending",percentage:0,file:e,url:null,type:e.type,thumbnailUrl:null,fullPath:null!==(t=null==n?void 0:n.fullPath)&&void 0!==t?t:`/${e.webkitRelativePath||e.name}`};return r&&!1===(yield r({file:o,fileList:b.value}))?null:o}))).then(e=>Jn(this,void 0,void 0,function*(){let n=Promise.resolve();e.forEach(e=>{n=n.then(E).then(()=>{e&&P(e,t,{append:!0})})}),yield n})).then(()=>{e.defaultUpload&&L()})}function L(n){const{method:t,action:r,withCredentials:o,headers:i,data:l,name:a}=e,s=void 0!==n?b.value.filter(e=>e.id===n):b.value,d=void 0!==n;s.forEach(n=>{const{status:s}=n;("pending"===s||"error"===s&&d)&&(e.customRequest?function(e){const{inst:n,file:t,data:r,headers:o,withCredentials:i,action:l,customRequest:a}=e,{doChange:s}=e.inst;let d=0;a({file:t,data:r,headers:o,withCredentials:i,action:l,onProgress(e){const n=Object.assign({},t,{status:"uploading"}),r=e.percent;n.percentage=r,d=r,s(n)},onFinish(){var e;let r=Object.assign({},t,{status:"finished",percentage:d});r=qn((null===(e=n.onFinish)||void 0===e?void 0:e.call(n,{file:r}))||r),s(r)},onError(){var e;let r=Object.assign({},t,{status:"error",percentage:d});r=qn((null===(e=n.onError)||void 0===e?void 0:e.call(n,{file:r}))||r),s(r)}})}({inst:{doChange:P,xhrMap:m,onFinish:e.onFinish,onError:e.onError},file:n,action:r,withCredentials:o,headers:i,data:l,customRequest:e.customRequest}):et({doChange:P,xhrMap:m,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},a,n,{method:t,action:r,withCredentials:o,responseType:e.responseType,headers:i,data:l}))})}const $=_(()=>{const{common:{cubicBezierEaseInOut:e},self:{draggerColor:n,draggerBorder:t,draggerBorderHover:r,itemColorHover:o,itemColorHoverError:l,itemTextColorError:a,itemTextColorSuccess:s,itemTextColor:d,itemIconColor:u,itemDisabledOpacity:c,lineHeight:p,borderRadius:h,fontSize:f,itemBorderImageCardError:g,itemBorderImageCard:v}}=i.value;return{"--n-bezier":e,"--n-border-radius":h,"--n-dragger-border":t,"--n-dragger-border-hover":r,"--n-dragger-color":n,"--n-font-size":f,"--n-item-color-hover":o,"--n-item-color-hover-error":l,"--n-item-disabled-opacity":c,"--n-item-icon-color":u,"--n-item-text-color":d,"--n-item-text-color-error":a,"--n-item-text-color-success":s,"--n-line-height":p,"--n-item-border-image-card-error":g,"--n-item-border-image-card":v}}),T=r?R("upload",void 0,$,e):void 0;M($n,{mergedClsPrefixRef:n,mergedThemeRef:i,showCancelButtonRef:V(e,"showCancelButton"),showDownloadButtonRef:V(e,"showDownloadButton"),showRemoveButtonRef:V(e,"showRemoveButton"),showRetryButtonRef:V(e,"showRetryButton"),onRemoveRef:V(e,"onRemove"),onDownloadRef:V(e,"onDownload"),customDownloadRef:V(e,"customDownload"),mergedFileListRef:b,triggerClassRef:V(e,"triggerClass"),triggerStyleRef:V(e,"triggerStyle"),shouldUseThumbnailUrlRef:V(e,"shouldUseThumbnailUrl"),renderIconRef:V(e,"renderIcon"),xhrMap:m,submit:L,doChange:P,showPreviewButtonRef:V(e,"showPreviewButton"),onPreviewRef:V(e,"onPreview"),getFileThumbnailUrlResolver:function(n){var t;if(n.thumbnailUrl)return n.thumbnailUrl;const{createThumbnailUrl:r}=e;return r?null!==(t=r(n.file,n))&&void 0!==t?t:n.url||"":n.url?n.url:n.file?function(e){return Un(this,void 0,void 0,function*(){return yield new Promise(n=>{e.type&&Mn(e.type)?n(window.URL.createObjectURL(e)):n("")})})}(n.file):""},listTypeRef:V(e,"listType"),dragOverRef:g,openOpenFileDialog:C,draggerInsideRef:f,handleFileAddition:S,mergedDisabledRef:s.mergedDisabledRef,maxReachedRef:x,fileListClassRef:V(e,"fileListClass"),fileListStyleRef:V(e,"fileListStyle"),abstractRef:V(e,"abstract"),acceptRef:V(e,"accept"),cssVarsRef:r?void 0:$,themeClassRef:null==T?void 0:T.themeClass,onRender:null==T?void 0:T.onRender,showTriggerRef:V(e,"showTrigger"),imageGroupPropsRef:V(e,"imageGroupProps"),mergedDirectoryDndRef:_(()=>{var n;return null!==(n=e.directoryDnd)&&void 0!==n?n:e.directory}),onRetryRef:V(e,"onRetry")});const B={clear:()=>{d.value=[]},submit:L,openOpenFileDialog:C};return Object.assign({mergedClsPrefix:n,draggerInsideRef:f,rtlEnabled:l,inputElRef:p,mergedTheme:i,dragOver:g,mergedMultiple:k,cssVars:r?void 0:$,themeClass:null==T?void 0:T.themeClass,onRender:null==T?void 0:T.onRender,handleFileInputChange:function(e){const n=e.target;S(n.files?Array.from(n.files).map(e=>({file:e,entry:null,source:"input"})):null,e),n.value=""}},B)},render(){var e,n;const{draggerInsideRef:t,mergedClsPrefix:r,$slots:o,directory:i,onRender:l}=this;if(o.default&&!this.abstract){const n=o.default()[0];(null===(e=null==n?void 0:n.type)||void 0===e?void 0:e.__UPLOAD_DRAGGER__)&&(t.value=!0)}const a=F("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${r}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:i||void 0,directory:i||void 0}));return this.abstract?F(Y,null,null===(n=o.default)||void 0===n?void 0:n.call(o),F(q,{to:"body"},a)):(null==l||l(),F("div",{class:[`${r}-upload`,this.rtlEnabled&&`${r}-upload--rtl`,t.value&&`${r}-upload--dragger-inside`,this.dragOver&&`${r}-upload--drag-over`,this.themeClass],style:this.cssVars},a,this.showTrigger&&"image-card"!==this.listType&&F(Gn,null,o),this.showFileList&&F(Yn,null,o)))}});export{Dn as n,nt as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as e,S as a,W as s,b as r,et as t,mt as o,x as l}from"./vue-vendor-Cr_NLmXY.js";import{n as i,t as d}from"./useResponsiveDrawer-Deh7Xdcj.js";import{t as n}from"./DrawerContent-BYlV968f.js";import{t as p}from"./WorkspacePanel-DkrwFSLs.js";import{t as v}from"./_plugin-vue_export-helper-DyHLuIR4.js";var u=v({__name:"WorkspaceDrawer",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(v,{emit:u}){const m=v,c=u,{drawerWidth:w}=d(720),b=r({get:()=>m.visible,set:e=>c("update:visible",e)}),f={padding:0,display:"flex",flexDirection:"column",overflow:"hidden"};return(r,d)=>(s(),a(o(i),{show:b.value,"onUpdate:show":d[1]||(d[1]=e=>b.value=e),width:o(w),placement:"right","mask-closable":!0},{default:t(()=>[e(o(n),{closable:"","native-scrollbar":!1,"body-content-style":f},{header:t(()=>[...d[2]||(d[2]=[l("div",{class:"drawer-header"},"工作区管理",-1)])]),default:t(()=>[e(p,{"in-drawer":!0,"hide-back":!0,"drawer-visible":b.value,onBack:d[0]||(d[0]=e=>b.value=!1)},null,8,["drawer-visible"])]),_:1})]),_:1},8,["show","width"]))}},[["__scopeId","data-v-311a4d94"]]);export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as a,W as e,et as r,mt as s,w as t}from"./vue-vendor-Cr_NLmXY.js";import{O as o}from"./light-DeIjG9s_.js";import{t as p}from"./WorkspacePanel-DkrwFSLs.js";import{t as d}from"./_plugin-vue_export-helper-DyHLuIR4.js";var m={class:"workspace-manager"},i=d({__name:"WorkspaceManager",setup:d=>(d,i)=>(e(),t("div",m,[a(s(o),{title:"工作区管理",bordered:!1},{default:r(()=>[a(p,{"in-drawer":!1,"hide-back":!0})]),_:1})]))},[["__scopeId","data-v-c6211fd6"]]);export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,C as a,D as t,K as s,M as o,O as r,S as l,V as n,W as i,Z as c,_t as d,b as p,et as u,g as v,ht as h,m as b,mt as m,p as f,st as g,w,x as y}from"./vue-vendor-Cr_NLmXY.js";import{Cn as k,N as x,Sn as _,Xt as j,bn as C,gn as z,gt as $,hn as R,ht as S,i as P,in as I,s as B,t as G,vn as M,xn as W,yn as U}from"./_plugin-vue_export-helper-DyHLuIR4.js";import{$ as A,A as D,G as O,H as E,I as T,L as N,M as L,X as F,Z as q,bt as K,ft as V,rt as Z,st as H,ut as X}from"./index-BXWpib7P.js";import{C as J,t as Q}from"./use-message-BYx0IRj1.js";import{S as Y,l as ee}from"./light-DeIjG9s_.js";import{At as ae,J as te,K as se,Nt as oe,R as re,S as le,dt as ne,g as ie,r as ce}from"./icons-C6KNTFqo.js";import{a as de,c as pe,i as ue,l as ve,n as he,o as be,p as me,r as fe,s as ge,t as we}from"./workspaces-Y7hS24p2.js";import{t as ye}from"./Divider-CEqaZMTW.js";import{t as ke}from"./clipboard-B46yyoz_.js";function xe(e,a="default",t=[]){const{children:s}=e;if(null!==s&&"object"==typeof s&&!Array.isArray(s)){const e=s[a];if("function"==typeof e)return e()}return t}var _e=R([z("descriptions",{fontSize:"var(--n-font-size)"},[z("descriptions-separator","\n display: inline-block;\n margin: 0 8px 0 2px;\n "),z("descriptions-table-wrapper",[z("descriptions-table",[z("descriptions-table-row",[z("descriptions-table-header",{padding:"var(--n-th-padding)"}),z("descriptions-table-content",{padding:"var(--n-td-padding)"})])])]),C("bordered",[z("descriptions-table-wrapper",[z("descriptions-table",[z("descriptions-table-row",[R("&:last-child",[z("descriptions-table-content",{paddingBottom:0})])])])])]),U("left-label-placement",[z("descriptions-table-content",[R("> *",{verticalAlign:"top"})])]),U("left-label-align",[R("th",{textAlign:"left"})]),U("center-label-align",[R("th",{textAlign:"center"})]),U("right-label-align",[R("th",{textAlign:"right"})]),U("bordered",[z("descriptions-table-wrapper","\n border-radius: var(--n-border-radius);\n overflow: hidden;\n background: var(--n-merged-td-color);\n border: 1px solid var(--n-merged-border-color);\n ",[z("descriptions-table",[z("descriptions-table-row",[R("&:not(:last-child)",[z("descriptions-table-content",{borderBottom:"1px solid var(--n-merged-border-color)"}),z("descriptions-table-header",{borderBottom:"1px solid var(--n-merged-border-color)"})]),z("descriptions-table-header","\n font-weight: 400;\n background-clip: padding-box;\n background-color: var(--n-merged-th-color);\n ",[R("&:not(:last-child)",{borderRight:"1px solid var(--n-merged-border-color)"})]),z("descriptions-table-content",[R("&:not(:last-child)",{borderRight:"1px solid var(--n-merged-border-color)"})])])])])]),z("descriptions-header","\n font-weight: var(--n-th-font-weight);\n font-size: 18px;\n transition: color .3s var(--n-bezier);\n line-height: var(--n-line-height);\n margin-bottom: 16px;\n color: var(--n-title-text-color);\n "),z("descriptions-table-wrapper","\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n ",[z("descriptions-table","\n width: 100%;\n border-collapse: separate;\n border-spacing: 0;\n box-sizing: border-box;\n ",[z("descriptions-table-row","\n box-sizing: border-box;\n transition: border-color .3s var(--n-bezier);\n ",[z("descriptions-table-header","\n font-weight: var(--n-th-font-weight);\n line-height: var(--n-line-height);\n display: table-cell;\n box-sizing: border-box;\n color: var(--n-th-text-color);\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n "),z("descriptions-table-content","\n vertical-align: top;\n line-height: var(--n-line-height);\n display: table-cell;\n box-sizing: border-box;\n color: var(--n-td-text-color);\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n ",[M("content","\n transition: color .3s var(--n-bezier);\n display: inline-block;\n color: var(--n-td-text-color);\n ")]),M("label","\n font-weight: var(--n-th-font-weight);\n transition: color .3s var(--n-bezier);\n display: inline-block;\n margin-right: 14px;\n color: var(--n-th-text-color);\n ")])])])]),z("descriptions-table-wrapper","\n --n-merged-th-color: var(--n-th-color);\n --n-merged-td-color: var(--n-td-color);\n --n-merged-border-color: var(--n-border-color);\n "),_(z("descriptions-table-wrapper","\n --n-merged-th-color: var(--n-th-color-modal);\n --n-merged-td-color: var(--n-td-color-modal);\n --n-merged-border-color: var(--n-border-color-modal);\n ")),k(z("descriptions-table-wrapper","\n --n-merged-th-color: var(--n-th-color-popover);\n --n-merged-td-color: var(--n-td-color-popover);\n --n-merged-border-color: var(--n-border-color-popover);\n "))]),je="DESCRIPTION_ITEM_FLAG";var Ce=e({name:"Descriptions",props:Object.assign(Object.assign({},x.props),{title:String,column:{type:Number,default:3},columns:Number,labelPlacement:{type:String,default:"top"},labelAlign:{type:String,default:"left"},separator:{type:String,default:":"},size:{type:String,default:"medium"},bordered:Boolean,labelClass:String,labelStyle:[Object,String],contentClass:String,contentStyle:[Object,String]}),slots:Object,setup(e){const{mergedClsPrefixRef:a,inlineThemeDisabled:t}=$(e),s=x("Descriptions","-descriptions",_e,O,e,a),o=p(()=>{const{size:a,bordered:t}=e,{common:{cubicBezierEaseInOut:o},self:{titleTextColor:r,thColor:l,thColorModal:n,thColorPopover:i,thTextColor:c,thFontWeight:d,tdTextColor:p,tdColor:u,tdColorModal:v,tdColorPopover:h,borderColor:b,borderColorModal:m,borderColorPopover:f,borderRadius:g,lineHeight:w,[W("fontSize",a)]:y,[W(t?"thPaddingBordered":"thPadding",a)]:k,[W(t?"tdPaddingBordered":"tdPadding",a)]:x}}=s.value;return{"--n-title-text-color":r,"--n-th-padding":k,"--n-td-padding":x,"--n-font-size":y,"--n-bezier":o,"--n-th-font-weight":d,"--n-line-height":w,"--n-th-text-color":c,"--n-td-text-color":p,"--n-th-color":l,"--n-th-color-modal":n,"--n-th-color-popover":i,"--n-td-color":u,"--n-td-color-modal":v,"--n-td-color-popover":h,"--n-border-radius":g,"--n-border-color":b,"--n-border-color-modal":m,"--n-border-color-popover":f}}),r=t?S("descriptions",p(()=>{let a="";const{size:t,bordered:s}=e;return s&&(a+="a"),a+=t[0],a}),o,e):void 0;return{mergedClsPrefix:a,cssVars:t?void 0:o,themeClass:null==r?void 0:r.themeClass,onRender:null==r?void 0:r.onRender,compitableColumn:j(e,["columns","column"]),inlineThemeDisabled:t}},render(){const e=this.$slots.default,a=e?J(e()):[];a.length;const{contentClass:t,labelClass:s,compitableColumn:r,labelPlacement:l,labelAlign:n,size:i,bordered:c,title:d,cssVars:p,mergedClsPrefix:u,separator:v,onRender:h}=this;null==h||h();const b=a.filter(e=>{return!("object"!=typeof(a=e)||!a||Array.isArray(a))&&a.type&&a.type.DESCRIPTION_ITEM_FLAG;var a}),m=b.reduce((e,a,n)=>{const i=a.props||{},d=b.length-1===n,p=["label"in i?i.label:xe(a,"label")],h=[xe(a)],m=i.span||1,f=e.span;e.span+=m;const g=i.labelStyle||i["label-style"]||this.labelStyle,w=i.contentStyle||i["content-style"]||this.contentStyle;if("left"===l)c?e.row.push(o("th",{class:[`${u}-descriptions-table-header`,s],colspan:1,style:g},p),o("td",{class:[`${u}-descriptions-table-content`,t],colspan:d?2*(r-f)+1:2*m-1,style:w},h)):e.row.push(o("td",{class:`${u}-descriptions-table-content`,colspan:d?2*(r-f):2*m},o("span",{class:[`${u}-descriptions-table-content__label`,s],style:g},[...p,v&&o("span",{class:`${u}-descriptions-separator`},v)]),o("span",{class:[`${u}-descriptions-table-content__content`,t],style:w},h)));else{const a=d?2*(r-f):2*m;e.row.push(o("th",{class:[`${u}-descriptions-table-header`,s],colspan:a,style:g},p)),e.secondRow.push(o("td",{class:[`${u}-descriptions-table-content`,t],colspan:a,style:w},h))}return(e.span>=r||d)&&(e.span=0,e.row.length&&(e.rows.push(e.row),e.row=[]),"left"!==l&&e.secondRow.length&&(e.rows.push(e.secondRow),e.secondRow=[])),e},{span:0,row:[],secondRow:[],rows:[]}).rows.map(e=>o("tr",{class:`${u}-descriptions-table-row`},e));return o("div",{style:p,class:[`${u}-descriptions`,this.themeClass,`${u}-descriptions--${l}-label-placement`,`${u}-descriptions--${n}-label-align`,`${u}-descriptions--${i}-size`,c&&`${u}-descriptions--bordered`]},d||this.$slots.header?o("div",{class:`${u}-descriptions-header`},d||K(this,"header")):null,o("div",{class:`${u}-descriptions-table-wrapper`},o("table",{class:`${u}-descriptions-table`},o("tbody",null,"top"===l&&o("tr",{class:`${u}-descriptions-table-row`,style:{visibility:"collapse"}},I(2*r,o("td",null))),m))))}}),ze={label:String,span:{type:Number,default:1},labelClass:String,labelStyle:[Object,String],contentClass:String,contentStyle:[Object,String]},$e=e({name:"DescriptionsItem",[je]:!0,props:ze,slots:Object,render:()=>null}),Re={class:"card-header"},Se={class:"card-title"},Pe={class:"name"},Ie={class:"card-body"},Be={key:0,class:"info-row"},Ge={class:"value"},Me={class:"info-row"},We={class:"value"},Ue={class:"info-row"},Ae={class:"value path"},De={key:1,class:"info-row"},Oe={class:"value"},Ee=G({__name:"WorkspaceCard",props:{workspace:{type:Object,required:!0}},emits:["click","view","delete"],setup:e=>(s,o)=>{return i(),w("div",{class:"workspace-card",onClick:o[3]||(o[3]=a=>s.$emit("click",e.workspace))},[y("div",Re,[y("div",Se,[y("span",Pe,d(e.workspace.name),1),r(m(X),{type:e.workspace.exists?"success":"error",size:"small"},{default:u(()=>[t(d(e.workspace.exists?"存在":"不存在"),1)]),_:1},8,["type"])]),y("div",{class:"card-actions",onClick:o[2]||(o[2]=b(()=>{},["stop"]))},[r(m(B),{text:"",size:"small",onClick:o[0]||(o[0]=a=>s.$emit("view",e.workspace))},{icon:u(()=>[r(m(P),null,{default:u(()=>[r(m(te))]),_:1})]),_:1}),r(m(B),{text:"",size:"small",type:"error",onClick:o[1]||(o[1]=a=>s.$emit("delete",e.workspace))},{icon:u(()=>[r(m(P),null,{default:u(()=>[r(m(ce))]),_:1})]),_:1})])]),y("div",Ie,[e.workspace.description?(i(),w("div",Be,[o[4]||(o[4]=y("span",{class:"label"},"描述",-1)),y("span",Ge,d(e.workspace.description),1)])):a("",!0),y("div",Me,[o[5]||(o[5]=y("span",{class:"label"},"项目数",-1)),y("span",We,d(e.workspace.projectCount||0),1)]),y("div",Ue,[o[6]||(o[6]=y("span",{class:"label"},"路径",-1)),y("span",Ae,d(e.workspace.path),1)]),e.workspace.lastUsed?(i(),w("div",De,[o[7]||(o[7]=y("span",{class:"label"},"最后使用",-1)),y("span",Oe,d((l=e.workspace.lastUsed,l?new Date(l).toLocaleString("zh-CN"):"-")),1)])):a("",!0)])]);var l}},[["__scopeId","data-v-74e07bc9"]]),Te={class:"project-item"},Ne={class:"item-header"},Le={class:"item-title"},Fe={class:"item-body"},qe={key:2,class:"git-options"},Ke={key:0,class:"branch-inputs"},Ve={key:1,class:"branch-inputs"},Ze={key:2,class:"branch-inputs"},He=G({__name:"ProjectItem",props:{project:{type:Object,required:!0},index:{type:Number,required:!0},existingOptions:{type:Array,default:()=>[]},showRemoveButton:{type:Boolean,default:!0}},emits:["remove","select-existing"],setup(e){const s=e;async function o(){if(s.project.sourcePath)try{const e=await he(s.project.sourcePath);e.success&&(s.project.isGitRepo=e.data.isGitRepo,e.data.isGitRepo&&!s.project.createWorktree&&(s.project.createWorktree=!0),e.data.isGitRepo&&!s.project.branchMode&&(s.project.branchMode="existing"))}catch(e){}}return(s,n)=>(i(),w("div",Te,[y("div",Ne,[y("span",Le,"项目 "+d(e.index+1),1),e.showRemoveButton?(i(),l(m(B),{key:0,text:"",size:"tiny",type:"error",onClick:n[0]||(n[0]=e=>s.$emit("remove"))},{icon:u(()=>[r(m(P),null,{default:u(()=>[r(m(ne))]),_:1})]),_:1})):a("",!0)]),y("div",Fe,[e.project.fromExisting?(i(),w(v,{key:0},[r(m(A),{value:e.project.selectedKey,"onUpdate:value":[n[1]||(n[1]=a=>e.project.selectedKey=a),n[2]||(n[2]=a=>s.$emit("select-existing",e.index,a))],options:e.existingOptions,placeholder:"选择已有项目",filterable:"",size:"small"},null,8,["value","options"]),r(m(H),{value:e.project.sourcePath,placeholder:"项目路径",disabled:"",size:"small"},null,8,["value"])],64)):(i(),w(v,{key:1},[r(m(H),{value:e.project.sourcePath,"onUpdate:value":n[3]||(n[3]=a=>e.project.sourcePath=a),placeholder:"项目源路径",size:"small",onBlur:o},null,8,["value"]),r(m(H),{value:e.project.name,"onUpdate:value":n[4]||(n[4]=a=>e.project.name=a),placeholder:"软链接名称(可选)",size:"small"},null,8,["value"])],64)),e.project.isGitRepo?(i(),w("div",qe,[r(m(Z),{checked:e.project.createWorktree,"onUpdate:checked":n[5]||(n[5]=a=>e.project.createWorktree=a),size:"small"},{default:u(()=>[...n[10]||(n[10]=[t(" 创建 Git Worktree ",-1)])]),_:1},8,["checked"]),e.project.createWorktree?(i(),w("div",Ke,[r(m(F),{value:e.project.branchMode,"onUpdate:value":n[6]||(n[6]=a=>e.project.branchMode=a),size:"small",class:"branch-mode-group"},{default:u(()=>[r(m(q),{value:"existing"},{default:u(()=>[...n[11]||(n[11]=[t("使用已有分支",-1)])]),_:1}),r(m(q),{value:"new"},{default:u(()=>[...n[12]||(n[12]=[t("新建分支",-1)])]),_:1})]),_:1},8,["value"])])):a("",!0),e.project.createWorktree&&"existing"===(e.project.branchMode||"existing")?(i(),w("div",Ve,[r(m(H),{value:e.project.branch,"onUpdate:value":n[7]||(n[7]=a=>e.project.branch=a),placeholder:"已有分支名(留空使用当前分支)",size:"small",style:{flex:"1"}},null,8,["value"])])):a("",!0),e.project.createWorktree&&"new"===(e.project.branchMode||"existing")?(i(),w("div",Ze,[r(m(H),{value:e.project.branch,"onUpdate:value":n[8]||(n[8]=a=>e.project.branch=a),placeholder:"新分支名",size:"small",style:{flex:"1"}},null,8,["value"]),r(m(H),{value:e.project.baseBranch,"onUpdate:value":n[9]||(n[9]=a=>e.project.baseBranch=a),placeholder:"基于分支(可选,如 main)",size:"small",style:{flex:"1"}},null,8,["value"])])):a("",!0),e.project.createWorktree?(i(),l(m(D),{key:3,depth:"3",style:{"font-size":"11px","margin-top":"4px"}},{default:u(()=>["existing"===(e.project.branchMode||"existing")?(i(),w(v,{key:0},[t(" [INFO] 填已有分支名时优先直接检出;留空则使用当前分支 ")],64)):e.project.branch&&e.project.baseBranch?(i(),w(v,{key:1},[t(' [INFO] 将新建分支 "'+d(e.project.branch)+'",并基于 "'+d(e.project.baseBranch)+'" 创建 ',1)],64)):e.project.branch?(i(),w(v,{key:2},[t(' [INFO] 将新建分支 "'+d(e.project.branch)+'",并基于源仓库当前分支创建 ',1)],64)):(i(),w(v,{key:3},[t(" [INFO] 请输入新分支名 ")],64))]),_:1})):a("",!0)])):a("",!0),e.project.isGitRepo?(i(),l(m(D),{key:3,depth:"3",style:{"font-size":"11px"}},{default:u(()=>[...n[13]||(n[13]=[t("[v] Git 仓库",-1)])]),_:1})):a("",!0)])]))}},[["__scopeId","data-v-1cf82955"]]);function Xe(e=""){const a=String(e||"").trim();if(!a)return"";const t=a.replace(/[\\/]+$/,"");if(!t)return"";const s=t.split(/[\\/]+/);return s[s.length-1]||""}function Je({fromExisting:e=!1}={}){return{sourcePath:"",name:"",createWorktree:!1,branchMode:"existing",branch:"",baseBranch:"",isGitRepo:!1,fromExisting:e,selectedKey:""}}function Qe(e){return"string"==typeof e?e.trim():""}function Ye(e={}){const a={sourcePath:Qe(e.sourcePath),name:Qe(e.name),createWorktree:!1!==e.createWorktree&&!!e.isGitRepo};if(a.name||delete a.name,!a.createWorktree)return a;a.branchMode="new"===e.branchMode?"new":"existing";const t=Qe(e.branch);if(t&&(a.branch=t),"new"===a.branchMode){const t=Qe(e.baseBranch);t&&(a.baseBranch=t)}return a}var ea={class:"projects-section"},aa={class:"projects-actions"},ta={key:0,class:"projects-list"},sa=G({__name:"WorkspaceFormModal",props:{show:{type:Boolean,default:!1}},emits:["update:show","success"],setup(e,{emit:a}){const o=e,n=a,d=Q(),h=g(null),k=g(!1),x=g([]),_=g([]),j=p({get:()=>o.show,set:e=>n("update:show",e)}),C=g({name:"",description:"",baseDir:"",configTemplateId:null,projects:[]}),z={name:[{required:!0,message:"请输入工作区名称",trigger:"blur"},{pattern:/^[a-zA-Z0-9_\-\u4e00-\u9fa5]+$/,message:"名称只能包含字母、数字、下划线、中划线和中文",trigger:"blur"}],projects:[{type:"array",required:!0,min:1,message:"至少需要添加一个项目",trigger:"blur"}]},$=p(()=>x.value.map(e=>({label:e.name,value:e.id}))),R=p(()=>_.value.map(e=>({label:`${e.displayName||e.name} (${e.channel})${e.isGitRepo?" [Git]":""}`,value:`${e.channel}::${e.name}`,path:e.fullPath||e.name,isGitRepo:e.isGitRepo})));function S(e){C.value.projects.push(Je({fromExisting:e}))}function P(e,a){const t=R.value.find(e=>e.value===a);if(!t)return;const s=C.value.projects[e];s.sourcePath=t.path,s.name=Xe(t.path),s.isGitRepo=t.isGitRepo,s.createWorktree=t.isGitRepo,s.branchMode="existing",s.branch="",s.baseBranch=""}async function I(){try{await(h.value?.validate());for(const t of C.value.projects)if(!t.sourcePath)return void d.error("请填写项目路径");k.value=!0;const e={...C.value,projects:C.value.projects.map(Ye)},a=await fe(e);a.success?(d.success("工作区创建成功"),C.value={name:"",description:"",baseDir:"",configTemplateId:null,projects:[]},n("success")):d.error(a.message||"创建失败")}catch(e){const a=e.message||"创建失败";a.includes("\n")?d.warning(a,{duration:8e3}):d.error(a),e.errors}finally{k.value=!1}}return c(j,e=>{e&&async function(){try{const[e,a]=await Promise.all([me(),de()]);e.success&&(x.value=e.data||[]),a.success&&(_.value=Array.isArray(a.data)?a.data:[])}catch(e){}}()}),(e,a)=>(i(),l(m(ee),{show:j.value,"onUpdate:show":a[8]||(a[8]=e=>j.value=e),preset:"card",title:"创建工作区",style:{width:"650px"},"mask-closable":!1},{footer:u(()=>[r(m(E),{justify:"end"},{default:u(()=>[r(m(B),{onClick:a[7]||(a[7]=e=>j.value=!1)},{default:u(()=>[...a[12]||(a[12]=[t("取消",-1)])]),_:1}),r(m(B),{type:"primary",onClick:I,loading:k.value},{default:u(()=>[...a[13]||(a[13]=[t("创建",-1)])]),_:1},8,["loading"])]),_:1})]),default:u(()=>[r(m(N),{ref_key:"formRef",ref:h,model:C.value,rules:z,"label-placement":"left","label-width":"100"},{default:u(()=>[r(m(T),{label:"工作区名称",path:"name"},{default:u(()=>[r(m(H),{value:C.value.name,"onUpdate:value":a[0]||(a[0]=e=>C.value.name=e),placeholder:"输入工作区名称",onKeydown:a[1]||(a[1]=f(b(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),r(m(T),{label:"描述",path:"description"},{default:u(()=>[r(m(H),{value:C.value.description,"onUpdate:value":a[2]||(a[2]=e=>C.value.description=e),placeholder:"可选描述",type:"textarea",rows:2},null,8,["value"])]),_:1}),r(m(T),{label:"基础目录",path:"baseDir"},{default:u(()=>[r(m(H),{value:C.value.baseDir,"onUpdate:value":a[3]||(a[3]=e=>C.value.baseDir=e),placeholder:"留空则使用第一个项目的父目录"},null,8,["value"])]),_:1}),r(m(T),{label:"配置模板",path:"configTemplateId"},{default:u(()=>[r(m(A),{value:C.value.configTemplateId,"onUpdate:value":a[4]||(a[4]=e=>C.value.configTemplateId=e),options:$.value,placeholder:"选择配置模板",clearable:""},null,8,["value","options"])]),_:1}),r(m(T),{label:"项目列表",path:"projects"},{default:u(()=>[y("div",ea,[y("div",aa,[r(m(B),{size:"small",dashed:"",onClick:a[5]||(a[5]=e=>S(!1))},{default:u(()=>[...a[9]||(a[9]=[t("添加项目",-1)])]),_:1}),r(m(B),{size:"small",dashed:"",onClick:a[6]||(a[6]=e=>S(!0))},{default:u(()=>[...a[10]||(a[10]=[t("添加已有项目",-1)])]),_:1})]),C.value.projects.length>0?(i(),w("div",ta,[(i(!0),w(v,null,s(C.value.projects,(e,a)=>(i(),l(He,{key:a,project:e,index:a,"existing-options":R.value,onRemove:e=>function(e){C.value.projects.splice(e,1)}(a),onSelectExisting:P},null,8,["project","index","existing-options","onRemove"]))),128))])):(i(),l(m(D),{key:1,depth:"3",style:{"font-size":"12px"}},{default:u(()=>[...a[11]||(a[11]=[t("请添加至少一个项目",-1)])]),_:1}))])]),_:1})]),_:1},8,["model"])]),_:1},8,["show"]))}},[["__scopeId","data-v-4b48727c"]]),oa={class:"form-section"},ra={class:"actions-row"},la=G({__name:"WorkspaceProjectFormModal",props:{show:{type:Boolean,default:!1},workspaceId:{type:String,required:!0}},emits:["update:show","success"],setup(e,{emit:a}){const s=e,o=a,n=Q(),d=g(!1),v=g([]),h=g(Je()),b=p({get:()=>s.show,set:e=>o("update:show",e)}),f=p(()=>v.value.map(e=>({label:`${e.displayName||e.name} (${e.channel})${e.isGitRepo?" [Git]":""}`,value:`${e.channel}::${e.name}`,path:e.fullPath||e.name,isGitRepo:e.isGitRepo})));function w(){h.value=Je()}function k(){h.value=Je({fromExisting:!1})}function x(){h.value=Je({fromExisting:!0})}function _(e,a){const t=f.value.find(e=>e.value===a);t&&(h.value.selectedKey=a,h.value.sourcePath=t.path,h.value.name=Xe(t.path),h.value.isGitRepo=t.isGitRepo,h.value.createWorktree=t.isGitRepo,h.value.branchMode="existing",h.value.branch="",h.value.baseBranch="",h.value.fromExisting=!0)}async function j(){const e=Ye(h.value);if(e.sourcePath)if(!h.value.createWorktree||"new"!==h.value.branchMode||e.branch){d.value=!0;try{const a=await we(s.workspaceId,e);if(a.success)return n.success("仓库已添加到工作区"),b.value=!1,w(),void o("success");n.error(a.message||"添加失败")}catch(a){n.error(`添加失败: ${a.message}`)}finally{d.value=!1}}else n.error("请输入新分支名");else n.error("请填写项目路径")}return c(b,e=>{e&&(w(),async function(){try{const e=await de();e.success&&(v.value=Array.isArray(e.data)?e.data:[])}catch(e){}}())}),(e,a)=>(i(),l(m(ee),{show:b.value,"onUpdate:show":a[1]||(a[1]=e=>b.value=e),preset:"card",title:"添加仓库到工作区",style:{width:"620px"},"mask-closable":!1},{footer:u(()=>[r(m(E),{justify:"end"},{default:u(()=>[r(m(B),{onClick:a[0]||(a[0]=e=>b.value=!1)},{default:u(()=>[...a[4]||(a[4]=[t("取消",-1)])]),_:1}),r(m(B),{type:"primary",loading:d.value,onClick:j},{default:u(()=>[...a[5]||(a[5]=[t("添加",-1)])]),_:1},8,["loading"])]),_:1})]),default:u(()=>[y("div",oa,[y("div",ra,[r(m(B),{size:"small",dashed:"",type:h.value.fromExisting?"default":"primary",onClick:k},{default:u(()=>[...a[2]||(a[2]=[t(" 手动填写路径 ",-1)])]),_:1},8,["type"]),r(m(B),{size:"small",dashed:"",type:h.value.fromExisting?"primary":"default",onClick:x},{default:u(()=>[...a[3]||(a[3]=[t(" 选择已有项目 ",-1)])]),_:1},8,["type"])]),r(He,{project:h.value,index:0,"existing-options":f.value,"show-remove-button":!1,onSelectExisting:_},null,8,["project","existing-options"])])]),_:1},8,["show"]))}},[["__scopeId","data-v-16febc8c"]]),na={class:"section-header"},ia={class:"section-title"},ca={key:0,class:"projects-list"},da={class:"proj-name"},pa={class:"proj-path"},ua=G({__name:"WorkspaceDetailModal",props:{show:{type:Boolean,default:!1},workspace:{type:Object,default:null}},emits:["update:show","updated"],setup(e,{emit:o}){const n=e,h=o,b=Q(),f=Y(),k=p({get:()=>n.show,set:e=>h("update:show",e)}),x=g(null),_=g(!1);function j(e){return e?new Date(e).toLocaleString("zh-CN"):"-"}async function C(){if(n.workspace?.id)try{const e=await ge(n.workspace.id);e.success&&(x.value=e.data)}catch(e){}}function z(){C(),h("updated")}async function $(e){if(n.workspace?.id)try{const a=await be(n.workspace.id,e);if(a.success){const e=`cd "${a.data.cwd}" && ${a.data.command}`;if("manual"===(await ke(e))?.method)return void b.warning("自动复制失败,已弹出手动复制框");b.success("启动命令已复制到剪贴板")}else b.error(a.message||"获取命令失败")}catch(a){b.error("获取命令失败: "+a.message)}}return c(k,e=>{e&&n.workspace&&C()}),(o,c)=>(i(),l(m(ee),{show:k.value,"onUpdate:show":c[6]||(c[6]=e=>k.value=e),preset:"card",title:"工作区详情",style:{width:"700px"}},{default:u(()=>[e.workspace?(i(),w(v,{key:0},[r(m(Ce),{column:1,bordered:"",size:"small"},{default:u(()=>[r(m($e),{label:"名称"},{default:u(()=>[t(d(e.workspace.name),1)]),_:1}),r(m($e),{label:"描述"},{default:u(()=>[t(d(e.workspace.description||"-"),1)]),_:1}),r(m($e),{label:"路径"},{default:u(()=>[t(d(e.workspace.path),1)]),_:1}),r(m($e),{label:"状态"},{default:u(()=>[r(m(X),{type:e.workspace.exists?"success":"error",size:"small"},{default:u(()=>[t(d(e.workspace.exists?"存在":"不存在"),1)]),_:1},8,["type"])]),_:1}),r(m($e),{label:"创建时间"},{default:u(()=>[t(d(j(e.workspace.createdAt)),1)]),_:1}),r(m($e),{label:"最后使用"},{default:u(()=>[t(d(j(e.workspace.lastUsed)),1)]),_:1})]),_:1}),r(m(ye)),c[15]||(c[15]=y("div",{class:"section-title"},"启动 CLI 工具",-1)),r(m(E),null,{default:u(()=>[r(m(B),{type:"primary",size:"small",onClick:c[0]||(c[0]=e=>$("claude")),disabled:!e.workspace.exists},{default:u(()=>[...c[7]||(c[7]=[t(" Claude Code ",-1)])]),_:1},8,["disabled"]),r(m(B),{type:"info",size:"small",onClick:c[1]||(c[1]=e=>$("codex")),disabled:!e.workspace.exists},{default:u(()=>[...c[8]||(c[8]=[t(" Codex ",-1)])]),_:1},8,["disabled"]),r(m(B),{type:"success",size:"small",onClick:c[2]||(c[2]=e=>$("gemini")),disabled:!e.workspace.exists},{default:u(()=>[...c[9]||(c[9]=[t(" Gemini CLI ",-1)])]),_:1},8,["disabled"]),r(m(B),{type:"warning",size:"small",onClick:c[3]||(c[3]=e=>$("omp")),disabled:!e.workspace.exists},{default:u(()=>[...c[10]||(c[10]=[t(" OMP ",-1)])]),_:1},8,["disabled"])]),_:1}),r(m(D),{depth:"3",style:{display:"block","margin-top":"6px","font-size":"11px"}},{default:u(()=>[...c[11]||(c[11]=[t(" 点击按钮将复制启动命令到剪贴板 ",-1)])]),_:1}),r(m(ye)),y("div",na,[y("div",ia,"包含项目 ("+d(x.value?.projects?.length||0)+")",1),r(m(B),{size:"small",type:"primary",ghost:"",disabled:!x.value?.exists,onClick:c[4]||(c[4]=e=>_.value=!0)},{default:u(()=>[...c[12]||(c[12]=[t(" 添加仓库 ",-1)])]),_:1},8,["disabled"])]),x.value?.projects?.length?(i(),w("div",ca,[(i(!0),w(v,null,s(x.value.projects,(e,s)=>(i(),w("div",{class:"project-row",key:s},[r(m(X),{type:e.sourceExists?"success":"error",size:"small"},{default:u(()=>[t(d(e.sourceExists?"[v]":"[x]"),1)]),_:2},1032,["type"]),y("span",da,d(e.name),1),y("span",pa,d(e.sourcePath),1),e.useWorktree?(i(),l(m(X),{key:0,type:"info",size:"small"},{default:u(()=>[...c[13]||(c[13]=[t("worktree",-1)])]),_:1})):a("",!0),r(m(B),{text:"",size:"small",type:"error",onClick:a=>{return t=e,void(n.workspace?.id&&f.warning({title:"确认移除仓库",content:`确定要从工作区移除 "${t.name}" 吗?`,positiveText:"移除",negativeText:"取消",onPositiveClick:async()=>{try{const e=await ve(n.workspace.id,t.name);if(e.success)return b.success("仓库已移除"),void z();b.error(e.message||"移除失败")}catch(e){b.error(`移除失败: ${e.message}`)}}}));var t}},{default:u(()=>[...c[14]||(c[14]=[t(" 移除 ",-1)])]),_:1},8,["onClick"])]))),128))])):(i(),l(m(V),{key:1,description:"暂无项目",size:"small"}))],64)):a("",!0),r(la,{show:_.value,"onUpdate:show":c[5]||(c[5]=e=>_.value=e),"workspace-id":n.workspace?.id||"",onSuccess:z},null,8,["show","workspace-id"])]),_:1},8,["show"]))}},[["__scopeId","data-v-1ee80e2a"]]),va={key:0,class:"panel-header"},ha={class:"header-left"},ba={class:"header-right"},ma={key:1,class:"drawer-header-bar"},fa={class:"header-right"},ga={class:"stats-bar"},wa={class:"stats-text"},ya={class:"filter-bar"},ka={class:"panel-content"},xa={key:0,class:"empty-state"},_a={key:1,class:"card-list"},ja={class:"panel-footer"},Ca=G({__name:"WorkspacePanel",props:{inDrawer:{type:Boolean,default:!1},hideBack:{type:Boolean,default:!1},drawerVisible:{type:Boolean,default:!1}},emits:["back","updated"],setup(e,{emit:o}){const b=e,f=o,k=Q(),x=Y(),_=g(!1),j=g([]),C=g(""),z=g(!1),$=g(!1),R=g(null),S=p(()=>{if(!C.value.trim())return j.value;const e=C.value.toLowerCase();return j.value.filter(a=>a.name?.toLowerCase().includes(e)||a.description?.toLowerCase().includes(e)||a.path?.toLowerCase().includes(e))});async function I(){_.value=!0;try{const e=await pe();e.success&&(j.value=e.data||[])}catch(e){k.error("加载工作区失败: "+e.message)}finally{_.value=!1}}function G(e){R.value=e,$.value=!0}function M(e){x.warning({title:"确认删除",content:`确定要删除工作区"${e.name}"吗?`,positiveText:"删除",negativeText:"取消",onPositiveClick:async()=>{try{const a=await ue(e.id,!1);a.success?(k.success("删除成功"),I(),f("updated")):k.error(a.message||"删除失败")}catch(a){k.error("删除失败: "+a.message)}}})}function W(){z.value=!1,I(),f("updated")}return n(()=>I()),c(()=>b.drawerVisible,e=>{e&&I()}),(o,n)=>(i(),w("div",{class:h(["workspace-panel",{"in-drawer":e.inDrawer}])},[e.inDrawer?a("",!0):(i(),w("div",va,[y("div",ha,[e.hideBack?a("",!0):(i(),l(m(B),{key:0,text:"",onClick:n[0]||(n[0]=e=>o.$emit("back")),class:"back-btn"},{icon:u(()=>[r(m(P),null,{default:u(()=>[r(m(ae))]),_:1})]),_:1})),n[7]||(n[7]=y("span",{class:"panel-title"},"工作区管理",-1))]),y("div",ba,[r(m(B),{text:"",onClick:n[1]||(n[1]=e=>z.value=!0),class:"action-btn"},{icon:u(()=>[r(m(P),null,{default:u(()=>[r(m(oe))]),_:1})]),default:u(()=>[n[8]||(n[8]=t(" 创建 ",-1))]),_:1}),r(m(B),{text:"",onClick:I,loading:_.value,class:"action-btn"},{icon:u(()=>[r(m(P),null,{default:u(()=>[r(m(le))]),_:1})]),default:u(()=>[n[9]||(n[9]=t(" 刷新 ",-1))]),_:1},8,["loading"])])])),e.inDrawer?(i(),w("div",ma,[y("div",fa,[r(m(B),{text:"",onClick:n[2]||(n[2]=e=>z.value=!0),class:"action-btn"},{icon:u(()=>[r(m(P),null,{default:u(()=>[r(m(oe))]),_:1})]),default:u(()=>[n[10]||(n[10]=t(" 创建 ",-1))]),_:1}),r(m(B),{text:"",onClick:I,loading:_.value,class:"action-btn"},{icon:u(()=>[r(m(P),null,{default:u(()=>[r(m(le))]),_:1})]),default:u(()=>[n[11]||(n[11]=t(" 刷新 ",-1))]),_:1},8,["loading"])])])):a("",!0),y("div",ga,[y("span",wa," 共 "+d(j.value.length)+" 个工作区 ",1)]),y("div",ya,[r(m(H),{value:C.value,"onUpdate:value":n[3]||(n[3]=e=>C.value=e),placeholder:"搜索工作区...",clearable:"",size:"small",class:"search-input"},{prefix:u(()=>[r(m(P),null,{default:u(()=>[r(m(ie))]),_:1})]),_:1},8,["value"])]),y("div",ka,[r(m(L),{show:_.value},{default:u(()=>[0!==S.value.length||_.value?(i(),w("div",_a,[(i(!0),w(v,null,s(S.value,e=>(i(),l(Ee,{key:e.id,workspace:e,onClick:G,onView:G,onDelete:M},null,8,["workspace"]))),128))])):(i(),w("div",xa,[r(m(V),{description:"暂无工作区"},{icon:u(()=>[r(m(P),{size:"48",color:"var(--text-quaternary)"},{default:u(()=>[r(m(se))]),_:1})]),extra:u(()=>[r(m(B),{size:"small",onClick:n[4]||(n[4]=e=>z.value=!0)},{default:u(()=>[...n[12]||(n[12]=[t("创建第一个工作区",-1)])]),_:1})]),_:1})]))]),_:1},8,["show"])]),y("div",ja,[r(m(P),{size:"14",class:"info-icon"},{default:u(()=>[r(m(re))]),_:1}),n[13]||(n[13]=y("span",null,"工作区用于管理多个项目的统一开发环境",-1))]),r(sa,{show:z.value,"onUpdate:show":n[5]||(n[5]=e=>z.value=e),onSuccess:W},null,8,["show"]),r(ua,{show:$.value,"onUpdate:show":n[6]||(n[6]=e=>$.value=e),workspace:R.value,onUpdated:I},null,8,["show","workspace"])],2))}},[["__scopeId","data-v-da5160b9"]]);export{Ca as t};
|