hermes-web-ui 0.4.2 → 0.4.3
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/bin/hermes-web-ui.mjs +76 -9
- package/dist/client/assets/Add-DiTv65Se.js +1 -0
- package/dist/client/assets/{Button-pgPN7RfC.js → Button-vKfgky-Y.js} +3 -3
- package/dist/client/assets/{ChannelsView-qFMvJ9rS.js → ChannelsView-CHWtzAkF.js} +1 -1
- package/dist/client/assets/ChatView--lvFbW3I.js +127 -0
- package/dist/client/assets/ChatView-b0_L3ucp.css +1 -0
- package/dist/client/assets/{Close-CXC76d7R.js → Close-Brba3ay5.js} +2 -2
- package/dist/client/assets/{FormItem-DIcSMjKz.js → FormItem-kXuCeSKq.js} +3 -3
- package/dist/client/assets/GatewaysView-DUPP1UyD.js +1 -0
- package/dist/client/assets/Input-BS71ZaoJ.js +234 -0
- package/dist/client/assets/{InputNumber-Btyn8bQo.js → InputNumber-BXy4reTI.js} +2 -2
- package/dist/client/assets/JobsView-CXa1h0NF.js +2 -0
- package/dist/client/assets/LoginView-Cpod3SAL.js +1 -0
- package/dist/client/assets/LoginView-DfWYTzX1.css +1 -0
- package/dist/client/assets/LogsView-CgxeVMn-.js +1 -0
- package/dist/client/assets/{MarkdownRenderer-G4nly1xR.js → MarkdownRenderer-B7t0ZEw0.js} +9 -9
- package/dist/client/assets/MemoryView-BQjYVDJc.js +7 -0
- package/dist/client/assets/{Modal-rKb1tfQv.js → Modal-6Bv1v4kO.js} +4 -4
- package/dist/client/assets/ModelsView-CVghPzgk.js +1 -0
- package/dist/client/assets/Popconfirm-Bpz_dC1j.js +16 -0
- package/dist/client/assets/Popover-CXrjClQw.js +117 -0
- package/dist/client/assets/ProfilesView-Brpyzl-Q.js +440 -0
- package/dist/client/assets/{Select-CpNY3UGb.js → Select-Z20Mp4nQ.js} +5 -5
- package/dist/client/assets/SettingRow-Cz749k-e.js +1 -0
- package/dist/client/assets/SettingsView-C3HbKb4w.js +352 -0
- package/dist/client/assets/{SettingsView-CX312EGG.css → SettingsView-Cw4iOwXj.css} +1 -1
- package/dist/client/assets/SkillsView-qVZkbI37.js +1 -0
- package/dist/client/assets/Spin-DKwUVt1F.js +43 -0
- package/dist/client/assets/Suffix-C1Mw6UwH.js +90 -0
- package/dist/client/assets/{Switch-haCJAcVn.js → Switch-DG-3EwdR.js} +2 -2
- package/dist/client/assets/{Tag-CKzgX6hi.js → Tag-BWD1u63m.js} +2 -2
- package/dist/client/assets/{TerminalView-CmSON012.js → TerminalView-DTR8bNOy.js} +6 -6
- package/dist/client/assets/Tooltip-Dka1-DNs.js +1 -0
- package/dist/client/assets/UsageView-elTUQCED.js +1 -0
- package/dist/client/assets/{Warning-B2AD2ulw.js → Warning-CCZES7el.js} +1 -1
- package/dist/client/assets/{_plugin-vue_export-helper-DXZ6IauR.js → _plugin-vue_export-helper-Bl_Pm_OI.js} +2 -2
- package/dist/client/assets/app-BMD_VOYs.js +1 -0
- package/dist/client/assets/{app-Du5RZCLa.js → app-y8cD3FPg.js} +1 -1
- package/dist/client/assets/auth-BPBv1nNQ.js +1 -0
- package/dist/client/assets/browser-DlPqZ-4M.js +47 -0
- package/dist/client/assets/chat-3-o9JAHE.js +6 -0
- package/dist/client/assets/composables-CoSqDggz.js +1 -0
- package/dist/client/assets/{fade-in.cssr-CkQxIGt5.js → fade-in.cssr-D0suZaLL.js} +2 -2
- package/dist/client/assets/index-BRXOdlZt.css +1 -0
- package/dist/client/assets/index-CeFFa_Wg.js +284 -0
- package/dist/client/assets/{jobs-BnXwbdOs.js → jobs-DMiCP2Li.js} +1 -1
- package/dist/client/assets/light-BNuYwJcs.js +1 -0
- package/dist/client/assets/{light-BZfVIZ0W.js → light-DLz3o2il.js} +1 -1
- package/dist/client/assets/{light-Bdfae2y3.js → light-DbUQYfY2.js} +1 -1
- package/dist/client/assets/{light-Jn66LOmu.js → light-DcGe0-g1.js} +1 -1
- package/dist/client/assets/{light-Dgzhn0jz.js → light-cIgLWDVk.js} +1 -1
- package/dist/client/assets/{models-mCQyOPuV.js → models-EKNn3-zC.js} +1 -1
- package/dist/client/assets/{pinia-Jb4QOAzE.js → pinia-C8BDM-Fc.js} +1 -1
- package/dist/client/assets/profiles-1vZTTlBc.js +1 -0
- package/dist/client/assets/{router-qWVkGgap.js → router-kR4kqS2l.js} +2 -2
- package/dist/client/assets/{session-browser-prefs-Bh1and1f.js → session-browser-prefs-BI-rZu2N.js} +1 -1
- package/dist/client/assets/sessions-CJI89wYu.js +1 -0
- package/dist/client/assets/{skills-BIFy9nXD.js → skills-DjdZmDZP.js} +1 -1
- package/dist/client/assets/{use-message-Do_vF1fs.js → use-message-sSsrvqld.js} +1 -1
- package/dist/client/assets/{useTheme-BFm8wMmc.js → useTheme-DgQIobZP.js} +1 -1
- package/dist/client/index.html +29 -30
- package/dist/server/index.js +1067 -329
- package/dist/server/index.js.map +4 -4
- package/package.json +2 -2
- package/dist/client/assets/Add-COjp_zn3.js +0 -1
- package/dist/client/assets/ChatView-DVQv3z6i.js +0 -127
- package/dist/client/assets/ChatView-w9DKSiie.css +0 -1
- package/dist/client/assets/GatewaysView-BeaZvbdd.js +0 -1
- package/dist/client/assets/Input-CxMM68Q2.js +0 -234
- package/dist/client/assets/JobsView-DhosFF52.js +0 -2
- package/dist/client/assets/LoginView-DHPxG3eC.css +0 -1
- package/dist/client/assets/LoginView-DrjDX7xD.js +0 -1
- package/dist/client/assets/LogsView-BpW_vgEs.js +0 -1
- package/dist/client/assets/MemoryView-CP3K8mDG.js +0 -7
- package/dist/client/assets/ModelsView-DdQUiiu6.js +0 -1
- package/dist/client/assets/Popconfirm-DnYCLqNF.js +0 -16
- package/dist/client/assets/Popover-DAXLiB78.js +0 -117
- package/dist/client/assets/ProfilesView-Bkhqt3QB.js +0 -440
- package/dist/client/assets/SettingRow-B4_BuJSm.js +0 -1
- package/dist/client/assets/SettingsView-ZwzxJZVc.js +0 -352
- package/dist/client/assets/SkillsView-B3X9y2kZ.js +0 -1
- package/dist/client/assets/Spin-CAOjab_F.js +0 -43
- package/dist/client/assets/Suffix-DQWmhzzW.js +0 -90
- package/dist/client/assets/Tooltip-U6DmMv6W.js +0 -1
- package/dist/client/assets/UsageView-rmIKdR1u.js +0 -1
- package/dist/client/assets/app-lD2ZIoa4.js +0 -1
- package/dist/client/assets/browser-DcLLT85r.js +0 -47
- package/dist/client/assets/chat-DJP53-h1.js +0 -6
- package/dist/client/assets/composables-CjmuafMO.js +0 -1
- package/dist/client/assets/index-BfU2Be-n.css +0 -1
- package/dist/client/assets/index-BqaBjme9.js +0 -284
- package/dist/client/assets/light-ZuZhSzix.js +0 -1
- package/dist/client/assets/light-ba4gwt1q.js +0 -1
- package/dist/client/assets/omit-1BRB6K75.js +0 -1
- package/dist/client/assets/profiles-PisKQKsd.js +0 -1
- package/dist/client/assets/sessions-smjenK_5.js +0 -1
- /package/dist/client/assets/{_common-Yp55QE79.js → _common-D_mHAddk.js} +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import{B as e,H as t,I as n,M as r,N as i,P as a,Q as o,R as s,U as c,W as l,Y as u,Z as d,b as f,f as p,ft as m,lt as h,w as g}from"./router-kR4kqS2l.js";import{B as _,V as v,W as y,a as b,c as x,ct as S,d as ee,dt as C,l as w,n as T,o as E,r as D,st as O,ut as k,z as te}from"./browser-DlPqZ-4M.js";import{c as A,l as j,n as ne,r as M,s as re,t as ie}from"./fade-in.cssr-D0suZaLL.js";function ae(e){return e.composedPath()[0]||null}function N(e){return e.composedPath()[0]}var oe={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function se(e,t,n){if(e===`mousemoveoutside`){let e=e=>{t.contains(N(e))||n(e)};return{mousemove:e,touchstart:e}}else if(e===`clickoutside`){let e=!1,r=n=>{e=!t.contains(N(n))},i=r=>{e&&(t.contains(N(r))||n(r))};return{mousedown:r,mouseup:i,touchstart:r,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function P(e,t,n){let r=oe[e],i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=se(e,t,n)),a}function ce(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=P(e,t,n);return Object.keys(i).forEach(e=>{I(e,document,i[e],r)}),!0}return!1}function F(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=P(e,t,n);return Object.keys(i).forEach(e=>{L(e,document,i[e],r)}),!0}return!1}function le(){if(typeof window>`u`)return{on:()=>{},off:()=>{}};let e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(e,t,n){let r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function a(e,t){e[t]=Event.prototype[t]}let o=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,`currentTarget`);function c(){return o.get(this)??null}function l(e,t){s!==void 0&&Object.defineProperty(e,`currentTarget`,{configurable:!0,enumerable:!0,get:t??s.get})}let u={bubble:{},capture:{}},d={};function f(){let s=function(s){let{type:d,eventPhase:f,bubbles:p}=s,m=N(s);if(f===2)return;let h=f===1?`capture`:`bubble`,g=m,_=[];for(;g===null&&(g=window),_.push(g),g!==window;)g=g.parentNode||null;let v=u.capture[d],y=u.bubble[d];if(i(s,`stopPropagation`,n),i(s,`stopImmediatePropagation`,r),l(s,c),h===`capture`){if(v===void 0)return;for(let n=_.length-1;n>=0&&!e.has(s);--n){let e=_[n],r=v.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}if(n===0&&!p&&y!==void 0){let n=y.get(e);if(n!==void 0)for(let e of n){if(t.has(s))break;e(s)}}}}else if(h===`bubble`){if(y===void 0)return;for(let n=0;n<_.length&&!e.has(s);++n){let e=_[n],r=y.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}}}a(s,`stopPropagation`),a(s,`stopImmediatePropagation`),l(s)};return s.displayName=`evtdUnifiedHandler`,s}function p(){let e=function(e){let{type:t,eventPhase:n}=e;if(n!==2)return;let r=d[t];r!==void 0&&r.forEach(t=>t(e))};return e.displayName=`evtdUnifiedWindowEventHandler`,e}let m=f(),h=p();function g(e,t){let n=u[e];return n[t]===void 0&&(n[t]=new Map,window.addEventListener(t,m,e===`capture`)),n[t]}function _(e){return d[e]===void 0&&(d[e]=new Set,window.addEventListener(e,h)),d[e]}function v(e,t){let n=e.get(t);return n===void 0&&e.set(t,n=new Set),n}function y(e,t,n,r){let i=u[t][n];if(i!==void 0){let t=i.get(e);if(t!==void 0&&t.has(r))return!0}return!1}function b(e,t){let n=d[e];return!!(n!==void 0&&n.has(t))}function x(e,t,n,r){let i;if(i=typeof r==`object`&&r.once===!0?a=>{S(e,t,i,r),n(a)}:n,ce(e,t,i,r))return;let a=v(g(r===!0||typeof r==`object`&&r.capture===!0?`capture`:`bubble`,e),t);if(a.has(i)||a.add(i),t===window){let t=_(e);t.has(i)||t.add(i)}}function S(e,t,n,r){if(F(e,t,n,r))return;let i=r===!0||typeof r==`object`&&r.capture===!0,a=i?`capture`:`bubble`,o=g(a,e),s=v(o,t);if(t===window&&!y(t,i?`bubble`:`capture`,e,n)&&b(e,n)){let t=d[e];t.delete(n),t.size===0&&(window.removeEventListener(e,h),d[e]=void 0)}s.has(n)&&s.delete(n),s.size===0&&o.delete(t),o.size===0&&(window.removeEventListener(e,m,a===`capture`),u[a][e]=void 0)}return{on:x,off:S}}var{on:I,off:L}=le();function ue(e,t){return d(e,e=>{e!==void 0&&(t.value=e)}),g(()=>e.value===void 0?t.value:e.value)}var de=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function fe(){return de}function pe(t){let n={isDeactivated:!1},r=!1;return e(()=>{if(n.isDeactivated=!1,!r){r=!0;return}t()}),c(()=>{n.isDeactivated=!0,r||=!0}),n}function me(e,t){console.error(`[vueuc/${e}]: ${t}`)}var R=[],he=function(){return R.some(function(e){return e.activeTargets.length>0})},ge=function(){return R.some(function(e){return e.skippedTargets.length>0})},_e=`ResizeObserver loop completed with undelivered notifications.`,ve=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:_e}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=_e),window.dispatchEvent(e)},z;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(z||={});var B=function(e){return Object.freeze(e)},ye=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,B(this)}return e}(),V=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,B(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),H=function(e){return e instanceof SVGElement&&`getBBox`in e},be=function(e){if(H(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},xe=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},U=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},W=typeof window<`u`?window:{},G=new WeakMap,K=/auto|scroll/,Se=/^tb|vertical/,Ce=/msie|trident/i.test(W.navigator&&W.navigator.userAgent),q=function(e){return parseFloat(e||`0`)},J=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new ye((n?t:e)||0,(n?e:t)||0)},we=B({devicePixelContentBoxSize:J(),borderBoxSize:J(),contentBoxSize:J(),contentRect:new V(0,0,0,0)}),Te=function(e,t){if(t===void 0&&(t=!1),G.has(e)&&!t)return G.get(e);if(be(e))return G.set(e,we),we;var n=getComputedStyle(e),r=H(e)&&e.ownerSVGElement&&e.getBBox(),i=!Ce&&n.boxSizing===`border-box`,a=Se.test(n.writingMode||``),o=!r&&K.test(n.overflowY||``),s=!r&&K.test(n.overflowX||``),c=r?0:q(n.paddingTop),l=r?0:q(n.paddingRight),u=r?0:q(n.paddingBottom),d=r?0:q(n.paddingLeft),f=r?0:q(n.borderTopWidth),p=r?0:q(n.borderRightWidth),m=r?0:q(n.borderBottomWidth),h=r?0:q(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,ee=i?_+y:0,C=r?r.width:q(n.width)-S-x,w=r?r.height:q(n.height)-ee-b,T=C+g+x+v,E=w+_+b+y,D=B({devicePixelContentBoxSize:J(Math.round(C*devicePixelRatio),Math.round(w*devicePixelRatio),a),borderBoxSize:J(T,E,a),contentBoxSize:J(C,w,a),contentRect:new V(d,c,C,w)});return G.set(e,D),D},Ee=function(e,t,n){var r=Te(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case z.DEVICE_PIXEL_CONTENT_BOX:return o;case z.BORDER_BOX:return i;default:return a}},De=function(){function e(e){var t=Te(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=B([t.borderBoxSize]),this.contentBoxSize=B([t.contentBoxSize]),this.devicePixelContentBoxSize=B([t.devicePixelContentBoxSize])}return e}(),Y=function(e){if(be(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Oe=function(){var e=1/0,t=[];R.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new De(t.target),i=Y(t.target);r.push(n),t.lastReportedSize=Ee(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},ke=function(e){R.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(Y(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Ae=function(){var e=0;for(ke(e);he();)e=Oe(),ke(e);return ge()&&ve(),e>0},X,je=[],Me=function(){return je.splice(0).forEach(function(e){return e()})},Ne=function(e){if(!X){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return Me()}).observe(n,{characterData:!0}),X=function(){n.textContent=`${t?t--:t++}`}}je.push(e),X()},Pe=function(e){Ne(function(){requestAnimationFrame(e)})},Z=0,Fe=function(){return!!Z},Ie=250,Le={attributes:!0,characterData:!0,childList:!0,subtree:!0},Re=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],ze=function(e){return e===void 0&&(e=0),Date.now()+e},Be=!1,Ve=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=Ie),!Be){Be=!0;var n=ze(e);Pe(function(){var r=!1;try{r=Ae()}finally{if(Be=!1,e=n-ze(),!Fe())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Le)};document.body?t():W.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Re.forEach(function(t){return W.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Re.forEach(function(t){return W.removeEventListener(t,e.listener,!0)}),!0)},e}()),He=function(e){!Z&&e>0&&Ve.start(),Z+=e,!Z&&Ve.stop()},Ue=function(e){return!H(e)&&!U(e)&&getComputedStyle(e).display===`inline`},We=function(){function e(e,t){this.target=e,this.observedBox=t||z.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Ee(this.target,this.observedBox,!0);return Ue(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Ge=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),Ke=new WeakMap,qe=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Je=function(){function e(){}return e.connect=function(e,t){var n=new Ge(e,t);Ke.set(e,n)},e.observe=function(e,t,n){var r=Ke.get(e),i=r.observationTargets.length===0;qe(r.observationTargets,t)<0&&(i&&R.push(r),r.observationTargets.push(new We(t,n&&n.box)),He(1),Ve.schedule())},e.unobserve=function(e,t){var n=Ke.get(e),r=qe(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&R.splice(R.indexOf(n),1),n.observationTargets.splice(r,1),He(-1))},e.disconnect=function(e){var t=this,n=Ke.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Ye=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);Je.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!xe(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);Je.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!xe(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);Je.unobserve(this,e)},e.prototype.disconnect=function(){Je.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),Xe=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<`u`&&window.ResizeObserver||Ye)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(let t of e){let e=this.elHandlersMap.get(t.target);e!==void 0&&e(t)}}registerHandler(e,t){this.elHandlersMap.set(e,t),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}},Ze=r({name:`ResizeObserver`,props:{onResize:Function},setup(e){let n=!1,r=i().proxy;function a(t){let{onResize:n}=e;n!==void 0&&n(t)}l(()=>{let e=r.$el;if(e===void 0){me(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){me(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(Xe.registerHandler(e.nextElementSibling,a),n=!0)}),t(()=>{n&&Xe.unregisterHandler(r.$el.nextElementSibling)})},render(){return u(this.$slots,`default`)}});function Qe(e){let{left:t,right:n,top:r,bottom:i}=A(e);return`${r} ${t} ${i} ${n}`}var $e=r({render(){var e;return(e=this.$slots).default?.call(e)}}),et={name:`en-US`,global:{undo:`Undo`,redo:`Redo`,confirm:`Confirm`,clear:`Clear`},Popconfirm:{positiveText:`Confirm`,negativeText:`Cancel`},Cascader:{placeholder:`Please Select`,loading:`Loading`,loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`},DatePicker:{yearFormat:`yyyy`,monthFormat:`MMM`,dayFormat:`eeeeee`,yearTypeFormat:`yyyy`,monthTypeFormat:`yyyy-MM`,dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`,quarterFormat:`yyyy-qqq`,weekFormat:`YYYY-w`,clear:`Clear`,now:`Now`,confirm:`Confirm`,selectTime:`Select Time`,selectDate:`Select Date`,datePlaceholder:`Select Date`,datetimePlaceholder:`Select Date and Time`,monthPlaceholder:`Select Month`,yearPlaceholder:`Select Year`,quarterPlaceholder:`Select Quarter`,weekPlaceholder:`Select Week`,startDatePlaceholder:`Start Date`,endDatePlaceholder:`End Date`,startDatetimePlaceholder:`Start Date and Time`,endDatetimePlaceholder:`End Date and Time`,startMonthPlaceholder:`Start Month`,endMonthPlaceholder:`End Month`,monthBeforeYear:!0,firstDayOfWeek:6,today:`Today`},DataTable:{checkTableAll:`Select all in the table`,uncheckTableAll:`Unselect all in the table`,confirm:`Confirm`,clear:`Clear`},LegacyTransfer:{sourceTitle:`Source`,targetTitle:`Target`},Transfer:{selectAll:`Select all`,unselectAll:`Unselect all`,clearAll:`Clear`,total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:`No Data`},Select:{placeholder:`Please Select`},TimePicker:{placeholder:`Select Time`,positiveText:`OK`,negativeText:`Cancel`,now:`Now`,clear:`Clear`},Pagination:{goto:`Goto`,selectionSuffix:`page`},DynamicTags:{add:`Add`},Log:{loading:`Loading`},Input:{placeholder:`Please Input`},InputNumber:{placeholder:`Please Input`},DynamicInput:{create:`Create`},ThemeEditor:{title:`Theme Editor`,clearAllVars:`Clear All Variables`,clearSearch:`Clear Search`,filterCompName:`Filter Component Name`,filterVarName:`Filter Variable Name`,import:`Import`,export:`Export`,restore:`Reset to Default`},Image:{tipPrevious:`Previous picture (←)`,tipNext:`Next picture (→)`,tipCounterclockwise:`Counterclockwise`,tipClockwise:`Clockwise`,tipZoomOut:`Zoom out`,tipZoomIn:`Zoom in`,tipDownload:`Download`,tipClose:`Close (Esc)`,tipOriginalSize:`Zoom to original size`},Heatmap:{less:`less`,more:`more`,monthFormat:`MMM`,weekdayFormat:`eee`}};function tt(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Q(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function $(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?rt(s,e=>e.test(o)):nt(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function nt(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function rt(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function it(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var at={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},ot=(e,t,n)=>{let r,i=at[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},st={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},ct=(e,t,n,r)=>st[e],lt={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:Q({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:Q({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Q({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:Q({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:Q({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})},ut={ordinalNumber:it({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},dt={name:`en-US`,locale:{code:`en-US`,formatDistance:ot,formatLong:{date:tt({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:tt({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:tt({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:ct,localize:lt,match:ut,options:{weekStartsOn:0,firstWeekContainsDate:1}}};function ft(e){let{mergedLocaleRef:t,mergedDateLocaleRef:r}=n(v,null)||{},i=g(()=>t?.value?.[e]??et[e]);return{dateLocaleRef:g(()=>r?.value??dt),localeRef:i}}var pt=r({name:`ChevronDown`,render(){return a(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a(`path`,{d:`M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z`,fill:`currentColor`}))}}),mt=ne(`clear`,()=>a(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},a(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},a(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},a(`path`,{d:`M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z`}))))),ht=S(`base-clear`,`
|
|
2
|
+
flex-shrink: 0;
|
|
3
|
+
height: 1em;
|
|
4
|
+
width: 1em;
|
|
5
|
+
position: relative;
|
|
6
|
+
`,[O(`>`,[k(`clear`,`
|
|
7
|
+
font-size: var(--n-clear-size);
|
|
8
|
+
height: 1em;
|
|
9
|
+
width: 1em;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
color: var(--n-clear-color);
|
|
12
|
+
transition: color .3s var(--n-bezier);
|
|
13
|
+
display: flex;
|
|
14
|
+
`,[O(`&:hover`,`
|
|
15
|
+
color: var(--n-clear-color-hover)!important;
|
|
16
|
+
`),O(`&:active`,`
|
|
17
|
+
color: var(--n-clear-color-pressed)!important;
|
|
18
|
+
`)]),k(`placeholder`,`
|
|
19
|
+
display: flex;
|
|
20
|
+
`),k(`clear, placeholder`,`
|
|
21
|
+
position: absolute;
|
|
22
|
+
left: 50%;
|
|
23
|
+
top: 50%;
|
|
24
|
+
transform: translateX(-50%) translateY(-50%);
|
|
25
|
+
`,[b({originalTransform:`translateX(-50%) translateY(-50%)`,left:`50%`,top:`50%`})])])]),gt=r({name:`BaseClear`,props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return w(`-base-clear`,ht,m(e,`clsPrefix`)),{handleMouseDown(e){e.preventDefault()}}},render(){let{clsPrefix:e}=this;return a(`div`,{class:`${e}-base-clear`},a(E,null,{default:()=>{var t;return this.show?a(`div`,{key:`dismiss`,class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},y(this.$slots.icon,()=>[a(M,{clsPrefix:e},{default:()=>a(mt,null)})])):a(`div`,{key:`icon`,class:`${e}-base-clear__placeholder`},(t=this.$slots).placeholder?.call(t))}}))}}),_t={railInsetHorizontalBottom:`auto 2px 4px 2px`,railInsetHorizontalTop:`4px 2px auto 2px`,railInsetVerticalRight:`2px 4px 2px auto`,railInsetVerticalLeft:`2px auto 2px 4px`,railColor:`transparent`};function vt(e){let{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:a}=e;return Object.assign(Object.assign({},_t),{height:r,width:i,borderRadius:a,color:t,colorHover:n})}var yt={name:`Scrollbar`,common:T,self:vt},bt=S(`scrollbar`,`
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
position: relative;
|
|
28
|
+
z-index: auto;
|
|
29
|
+
height: 100%;
|
|
30
|
+
width: 100%;
|
|
31
|
+
`,[O(`>`,[S(`scrollbar-container`,`
|
|
32
|
+
width: 100%;
|
|
33
|
+
overflow: scroll;
|
|
34
|
+
height: 100%;
|
|
35
|
+
min-height: inherit;
|
|
36
|
+
max-height: inherit;
|
|
37
|
+
scrollbar-width: none;
|
|
38
|
+
`,[O(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
39
|
+
width: 0;
|
|
40
|
+
height: 0;
|
|
41
|
+
display: none;
|
|
42
|
+
`),O(`>`,[S(`scrollbar-content`,`
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
min-width: 100%;
|
|
45
|
+
`)])])]),O(`>, +`,[S(`scrollbar-rail`,`
|
|
46
|
+
position: absolute;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
user-select: none;
|
|
49
|
+
background: var(--n-scrollbar-rail-color);
|
|
50
|
+
-webkit-user-select: none;
|
|
51
|
+
`,[C(`horizontal`,`
|
|
52
|
+
height: var(--n-scrollbar-height);
|
|
53
|
+
`,[O(`>`,[k(`scrollbar`,`
|
|
54
|
+
height: var(--n-scrollbar-height);
|
|
55
|
+
border-radius: var(--n-scrollbar-border-radius);
|
|
56
|
+
right: 0;
|
|
57
|
+
`)])]),C(`horizontal--top`,`
|
|
58
|
+
top: var(--n-scrollbar-rail-top-horizontal-top);
|
|
59
|
+
right: var(--n-scrollbar-rail-right-horizontal-top);
|
|
60
|
+
bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
|
|
61
|
+
left: var(--n-scrollbar-rail-left-horizontal-top);
|
|
62
|
+
`),C(`horizontal--bottom`,`
|
|
63
|
+
top: var(--n-scrollbar-rail-top-horizontal-bottom);
|
|
64
|
+
right: var(--n-scrollbar-rail-right-horizontal-bottom);
|
|
65
|
+
bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
|
|
66
|
+
left: var(--n-scrollbar-rail-left-horizontal-bottom);
|
|
67
|
+
`),C(`vertical`,`
|
|
68
|
+
width: var(--n-scrollbar-width);
|
|
69
|
+
`,[O(`>`,[k(`scrollbar`,`
|
|
70
|
+
width: var(--n-scrollbar-width);
|
|
71
|
+
border-radius: var(--n-scrollbar-border-radius);
|
|
72
|
+
bottom: 0;
|
|
73
|
+
`)])]),C(`vertical--left`,`
|
|
74
|
+
top: var(--n-scrollbar-rail-top-vertical-left);
|
|
75
|
+
right: var(--n-scrollbar-rail-right-vertical-left);
|
|
76
|
+
bottom: var(--n-scrollbar-rail-bottom-vertical-left);
|
|
77
|
+
left: var(--n-scrollbar-rail-left-vertical-left);
|
|
78
|
+
`),C(`vertical--right`,`
|
|
79
|
+
top: var(--n-scrollbar-rail-top-vertical-right);
|
|
80
|
+
right: var(--n-scrollbar-rail-right-vertical-right);
|
|
81
|
+
bottom: var(--n-scrollbar-rail-bottom-vertical-right);
|
|
82
|
+
left: var(--n-scrollbar-rail-left-vertical-right);
|
|
83
|
+
`),C(`disabled`,[O(`>`,[k(`scrollbar`,`pointer-events: none;`)])]),O(`>`,[k(`scrollbar`,`
|
|
84
|
+
z-index: 1;
|
|
85
|
+
position: absolute;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
pointer-events: all;
|
|
88
|
+
background-color: var(--n-scrollbar-color);
|
|
89
|
+
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
90
|
+
`,[ie(),O(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),xt=r({name:`Scrollbar`,props:Object.assign(Object.assign({},x.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:`hover`},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,internalExposeWidthCssVar:Boolean,yPlacement:{type:String,default:`right`},xPlacement:{type:String,default:`bottom`}}),inheritAttrs:!1,setup(e){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=_(e),a=ee(`Scrollbar`,i,n),s=h(null),c=h(null),u=h(null),d=h(null),f=h(null),p=h(null),m=h(null),v=h(null),y=h(null),b=h(null),S=h(null),C=h(0),w=h(0),T=h(!1),E=h(!1),D=!1,O=!1,k,j,ne=0,M=0,ie=0,N=0,oe=fe(),se=x(`Scrollbar`,`-scrollbar`,bt,yt,e,n),P=g(()=>{let{value:e}=v,{value:t}=p,{value:n}=b;return e===null||t===null||n===null?0:Math.min(e,n*e/t+re(se.value.self.width)*1.5)}),ce=g(()=>`${P.value}px`),F=g(()=>{let{value:e}=y,{value:t}=m,{value:n}=S;return e===null||t===null||n===null?0:n*e/t+re(se.value.self.height)*1.5}),le=g(()=>`${F.value}px`),ue=g(()=>{let{value:e}=v,{value:t}=C,{value:n}=p,{value:r}=b;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-P.value):0}}),de=g(()=>`${ue.value}px`),me=g(()=>{let{value:e}=y,{value:t}=w,{value:n}=m,{value:r}=S;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-F.value):0}}),R=g(()=>`${me.value}px`),he=g(()=>{let{value:e}=v,{value:t}=p;return e!==null&&t!==null&&t>e}),ge=g(()=>{let{value:e}=y,{value:t}=m;return e!==null&&t!==null&&t>e}),_e=g(()=>{let{trigger:t}=e;return t===`none`||T.value}),ve=g(()=>{let{trigger:t}=e;return t===`none`||E.value}),z=g(()=>{let{container:t}=e;return t?t():c.value}),B=g(()=>{let{content:t}=e;return t?t():u.value}),ye=(t,n)=>{if(!e.scrollable)return;if(typeof t==`number`){U(t,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=t;(r!==void 0||i!==void 0)&&U(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?U(0,a*o,o,u,c):s===`bottom`?U(0,2**53-1,0,!1,c):s===`top`&&U(0,0,0,!1,c):U(0,l.offsetTop,l.offsetHeight,u,c)},V=pe(()=>{e.container||ye({top:C.value,left:w.value})}),H=()=>{V.isDeactivated||Y()},be=t=>{if(V.isDeactivated)return;let{onResize:n}=e;n&&n(t),Y()},xe=(t,n)=>{if(!e.scrollable)return;let{value:r}=z;r&&(typeof t==`object`?r.scrollBy(t):r.scrollBy(t,n||0))};function U(e,t,n,r,i){let{value:a}=z;if(a){if(r){let{scrollTop:r,offsetHeight:o}=a;if(t>r){t+n<=r+o||a.scrollTo({left:e,top:t+n-o,behavior:i});return}}a.scrollTo({left:e,top:t,behavior:i})}}function W(){q(),J(),Y()}function G(){K()}function K(){Se(),Ce()}function Se(){j!==void 0&&window.clearTimeout(j),j=window.setTimeout(()=>{E.value=!1},e.duration)}function Ce(){k!==void 0&&window.clearTimeout(k),k=window.setTimeout(()=>{T.value=!1},e.duration)}function q(){k!==void 0&&window.clearTimeout(k),T.value=!0}function J(){j!==void 0&&window.clearTimeout(j),E.value=!0}function we(t){let{onScroll:n}=e;n&&n(t),Te()}function Te(){let{value:e}=z;e&&(C.value=e.scrollTop,w.value=e.scrollLeft*(a?.value?-1:1))}function Ee(){let{value:e}=B;e&&(p.value=e.offsetHeight,m.value=e.offsetWidth);let{value:t}=z;t&&(v.value=t.offsetHeight,y.value=t.offsetWidth);let{value:n}=f,{value:r}=d;n&&(S.value=n.offsetWidth),r&&(b.value=r.offsetHeight)}function De(){let{value:e}=z;e&&(C.value=e.scrollTop,w.value=e.scrollLeft*(a?.value?-1:1),v.value=e.offsetHeight,y.value=e.offsetWidth,p.value=e.scrollHeight,m.value=e.scrollWidth);let{value:t}=f,{value:n}=d;t&&(S.value=t.offsetWidth),n&&(b.value=n.offsetHeight)}function Y(){e.scrollable&&(e.useUnifiedContainer?De():(Ee(),Te()))}function Oe(e){return!s.value?.contains(ae(e))}function ke(e){e.preventDefault(),e.stopPropagation(),O=!0,I(`mousemove`,window,Ae,!0),I(`mouseup`,window,X,!0),M=w.value,ie=a?.value?window.innerWidth-e.clientX:e.clientX}function Ae(t){if(!O)return;k!==void 0&&window.clearTimeout(k),j!==void 0&&window.clearTimeout(j);let{value:n}=y,{value:r}=m,{value:i}=F;if(n===null||r===null)return;let o=(a?.value?window.innerWidth-t.clientX-ie:t.clientX-ie)*(r-n)/(n-i),s=r-n,c=M+o;c=Math.min(s,c),c=Math.max(c,0);let{value:l}=z;if(l){l.scrollLeft=c*(a?.value?-1:1);let{internalOnUpdateScrollLeft:t}=e;t&&t(c)}}function X(e){e.preventDefault(),e.stopPropagation(),L(`mousemove`,window,Ae,!0),L(`mouseup`,window,X,!0),O=!1,Y(),Oe(e)&&K()}function je(e){e.preventDefault(),e.stopPropagation(),D=!0,I(`mousemove`,window,Me,!0),I(`mouseup`,window,Ne,!0),ne=C.value,N=e.clientY}function Me(e){if(!D)return;k!==void 0&&window.clearTimeout(k),j!==void 0&&window.clearTimeout(j);let{value:t}=v,{value:n}=p,{value:r}=P;if(t===null||n===null)return;let i=(e.clientY-N)*(n-t)/(t-r),a=n-t,o=ne+i;o=Math.min(a,o),o=Math.max(o,0);let{value:s}=z;s&&(s.scrollTop=o)}function Ne(e){e.preventDefault(),e.stopPropagation(),L(`mousemove`,window,Me,!0),L(`mouseup`,window,Ne,!0),D=!1,Y(),Oe(e)&&K()}o(()=>{let{value:e}=ge,{value:t}=he,{value:r}=n,{value:i}=f,{value:a}=d;i&&(e?i.classList.remove(`${r}-scrollbar-rail--disabled`):i.classList.add(`${r}-scrollbar-rail--disabled`)),a&&(t?a.classList.remove(`${r}-scrollbar-rail--disabled`):a.classList.add(`${r}-scrollbar-rail--disabled`))}),l(()=>{e.container||Y()}),t(()=>{k!==void 0&&window.clearTimeout(k),j!==void 0&&window.clearTimeout(j),L(`mousemove`,window,Me,!0),L(`mouseup`,window,Ne,!0)});let Pe=g(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,colorHover:n,height:r,width:i,borderRadius:o,railInsetHorizontalTop:s,railInsetHorizontalBottom:c,railInsetVerticalRight:l,railInsetVerticalLeft:u,railColor:d}}=se.value,{top:f,right:p,bottom:m,left:h}=A(s),{top:g,right:_,bottom:v,left:y}=A(c),{top:b,right:x,bottom:S,left:ee}=A(a?.value?Qe(l):l),{top:C,right:w,bottom:T,left:E}=A(a?.value?Qe(u):u);return{"--n-scrollbar-bezier":e,"--n-scrollbar-color":t,"--n-scrollbar-color-hover":n,"--n-scrollbar-border-radius":o,"--n-scrollbar-width":i,"--n-scrollbar-height":r,"--n-scrollbar-rail-top-horizontal-top":f,"--n-scrollbar-rail-right-horizontal-top":p,"--n-scrollbar-rail-bottom-horizontal-top":m,"--n-scrollbar-rail-left-horizontal-top":h,"--n-scrollbar-rail-top-horizontal-bottom":g,"--n-scrollbar-rail-right-horizontal-bottom":_,"--n-scrollbar-rail-bottom-horizontal-bottom":v,"--n-scrollbar-rail-left-horizontal-bottom":y,"--n-scrollbar-rail-top-vertical-right":b,"--n-scrollbar-rail-right-vertical-right":x,"--n-scrollbar-rail-bottom-vertical-right":S,"--n-scrollbar-rail-left-vertical-right":ee,"--n-scrollbar-rail-top-vertical-left":C,"--n-scrollbar-rail-right-vertical-left":w,"--n-scrollbar-rail-bottom-vertical-left":T,"--n-scrollbar-rail-left-vertical-left":E,"--n-scrollbar-rail-color":d}}),Z=r?te(`scrollbar`,void 0,Pe,e):void 0;return Object.assign(Object.assign({},{scrollTo:ye,scrollBy:xe,sync:Y,syncUnifiedContainer:De,handleMouseEnterWrapper:W,handleMouseLeaveWrapper:G}),{mergedClsPrefix:n,rtlEnabled:a,containerScrollTop:C,wrapperRef:s,containerRef:c,contentRef:u,yRailRef:d,xRailRef:f,needYBar:he,needXBar:ge,yBarSizePx:ce,xBarSizePx:le,yBarTopPx:de,xBarLeftPx:R,isShowXBar:_e,isShowYBar:ve,isIos:oe,handleScroll:we,handleContentResize:H,handleContainerResize:be,handleYScrollMouseDown:je,handleXScrollMouseDown:ke,containerWidth:y,cssVars:r?void 0:Pe,themeClass:Z?.themeClass,onRender:Z?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,triggerDisplayManually:n,rtlEnabled:r,internalHoistYRail:i,yPlacement:o,xPlacement:c,xScrollable:l}=this;if(!this.scrollable)return e.default?.call(e);let u=this.trigger===`none`,d=(e,n)=>a(`div`,{ref:`yRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--vertical`,`${t}-scrollbar-rail--vertical--${o}`,e],"data-scrollbar-rail":!0,style:[n||``,this.verticalRailStyle],"aria-hidden":!0},a(u?$e:p,u?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?a(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),m=()=>{var o;return(o=this.onRender)==null||o.call(this),a(`div`,s(this.$attrs,{role:`none`,ref:`wrapperRef`,class:[`${t}-scrollbar`,this.themeClass,r&&`${t}-scrollbar--rtl`],style:this.cssVars,onMouseenter:n?void 0:this.handleMouseEnterWrapper,onMouseleave:n?void 0:this.handleMouseLeaveWrapper}),[this.container?e.default?.call(e):a(`div`,{role:`none`,ref:`containerRef`,class:[`${t}-scrollbar-container`,this.containerClass],style:[this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":j(this.containerWidth)}:void 0],onScroll:this.handleScroll,onWheel:this.onWheel},a(Ze,{onResize:this.handleContentResize},{default:()=>a(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${t}-scrollbar-content`,this.contentClass]},e)})),i?null:d(void 0,void 0),l&&a(`div`,{ref:`xRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--horizontal`,`${t}-scrollbar-rail--horizontal--${c}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},a(u?$e:p,u?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?a(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:r?this.xBarLeftPx:void 0,left:r?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},h=this.container?m():a(Ze,{onResize:this.handleContainerResize},{default:m});return i?a(f,null,h,d(this.themeClass,this.cssVars)):h}}),St=xt,Ct=r({name:`InternalSelectionSuffix`,props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{let{clsPrefix:n}=e;return a(D,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?a(gt,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>a(M,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>y(t.default,()=>[a(pt,null)])})}):null})}}});export{vt as a,$e as c,ue as d,L as f,yt as i,Ze as l,ae as m,xt as n,gt as o,I as p,St as r,ft as s,Ct as t,Xe as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{M as e,P as t,ft as n,lt as r,w as i}from"./router-kR4kqS2l.js";import{B as a,K as o,R as s,U as c,a as l,c as u,ct as d,dt as f,ft as p,n as m,nt as h,o as g,pt as _,q as v,r as y,st as b,ut as x,z as S}from"./browser-DlPqZ-4M.js";import{d as C}from"./Suffix-C1Mw6UwH.js";import{l as w,s as T}from"./fade-in.cssr-D0suZaLL.js";import{t as E}from"./_common-D_mHAddk.js";function D(e){let{primaryColor:t,opacityDisabled:n,borderRadius:r,textColor3:i}=e;return Object.assign(Object.assign({},E),{iconColor:i,textColor:`white`,loadingColor:t,opacityDisabled:n,railColor:`rgba(0, 0, 0, .14)`,railColorActive:t,buttonBoxShadow:`0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)`,buttonColor:`#FFF`,railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 0 2px ${h(t,{alpha:.2})}`})}var O={name:`Switch`,common:m,self:D},k=d(`switch`,`
|
|
2
2
|
height: var(--n-height);
|
|
3
3
|
min-width: var(--n-width);
|
|
4
4
|
vertical-align: middle;
|
|
@@ -99,4 +99,4 @@ import{C as e,N as t,ct as n,dt as r,j as i}from"./router-qWVkGgap.js";import{B
|
|
|
99
99
|
`)]),f(`disabled`,[x(`rail`,`
|
|
100
100
|
cursor: not-allowed;
|
|
101
101
|
opacity: .5;
|
|
102
|
-
`)])]),A=Object.assign(Object.assign({},u.props),{size:String,value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},spinProps:Object,onChange:[Function,Array]}),j,M=
|
|
102
|
+
`)])]),A=Object.assign(Object.assign({},u.props),{size:String,value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},spinProps:Object,onChange:[Function,Array]}),j,M=e({name:`Switch`,props:A,slots:Object,setup(e){j===void 0&&(j=typeof CSS<`u`?CSS.supports===void 0?!1:CSS.supports(`width`,`max(1px)`):!0);let{mergedClsPrefixRef:t,inlineThemeDisabled:o,mergedComponentPropsRef:c}=a(e),l=u(`Switch`,`-switch`,k,O,e,t),d=s(e,{mergedSize(t){return e.size===void 0?t?t.mergedSize.value:c?.value?.Switch?.size||`medium`:e.size}}),{mergedSizeRef:f,mergedDisabledRef:p}=d,m=r(e.defaultValue),h=C(n(e,`value`),m),g=i(()=>h.value===e.checkedValue),y=r(!1),b=r(!1),x=i(()=>{let{railStyle:t}=e;if(t)return t({focused:b.value,checked:g.value})});function E(t){let{"onUpdate:value":n,onChange:r,onUpdateValue:i}=e,{nTriggerFormInput:a,nTriggerFormChange:o}=d;n&&v(n,t),i&&v(i,t),r&&v(r,t),m.value=t,a(),o()}function D(){let{nTriggerFormFocus:e}=d;e()}function A(){let{nTriggerFormBlur:e}=d;e()}function M(){e.loading||p.value||(h.value===e.checkedValue?E(e.uncheckedValue):E(e.checkedValue))}function N(){b.value=!0,D()}function P(){b.value=!1,A(),y.value=!1}function F(t){e.loading||p.value||t.key===` `&&(h.value===e.checkedValue?E(e.uncheckedValue):E(e.checkedValue),y.value=!1)}function I(t){e.loading||p.value||t.key===` `&&(t.preventDefault(),y.value=!0)}let L=i(()=>{let{value:e}=f,{self:{opacityDisabled:t,railColor:n,railColorActive:r,buttonBoxShadow:i,buttonColor:a,boxShadowFocus:o,loadingColor:s,textColor:c,iconColor:u,[_(`buttonHeight`,e)]:d,[_(`buttonWidth`,e)]:p,[_(`buttonWidthPressed`,e)]:m,[_(`railHeight`,e)]:h,[_(`railWidth`,e)]:g,[_(`railBorderRadius`,e)]:v,[_(`buttonBorderRadius`,e)]:y},common:{cubicBezierEaseInOut:b}}=l.value,x,S,C;return j?(x=`calc((${h} - ${d}) / 2)`,S=`max(${h}, ${d})`,C=`max(${g}, calc(${g} + ${d} - ${h}))`):(x=w((T(h)-T(d))/2),S=w(Math.max(T(h),T(d))),C=T(h)>T(d)?g:w(T(g)+T(d)-T(h))),{"--n-bezier":b,"--n-button-border-radius":y,"--n-button-box-shadow":i,"--n-button-color":a,"--n-button-width":p,"--n-button-width-pressed":m,"--n-button-height":d,"--n-height":S,"--n-offset":x,"--n-opacity-disabled":t,"--n-rail-border-radius":v,"--n-rail-color":n,"--n-rail-color-active":r,"--n-rail-height":h,"--n-rail-width":g,"--n-width":C,"--n-box-shadow-focus":o,"--n-loading-color":s,"--n-text-color":c,"--n-icon-color":u}}),R=o?S(`switch`,i(()=>f.value[0]),L,e):void 0;return{handleClick:M,handleBlur:P,handleFocus:N,handleKeyup:F,handleKeydown:I,mergedRailStyle:x,pressed:y,mergedClsPrefix:t,mergedValue:h,checked:g,mergedDisabled:p,cssVars:o?void 0:L,themeClass:R?.themeClass,onRender:R?.onRender}},render(){let{mergedClsPrefix:e,mergedDisabled:n,checked:r,mergedRailStyle:i,onRender:a,$slots:s}=this;a?.();let{checked:l,unchecked:u,icon:d,"checked-icon":f,"unchecked-icon":p}=s,m=!(c(d)&&c(f)&&c(p));return t(`div`,{role:`switch`,"aria-checked":r,class:[`${e}-switch`,this.themeClass,m&&`${e}-switch--icon`,r&&`${e}-switch--active`,n&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},t(`div`,{class:`${e}-switch__rail`,"aria-hidden":`true`,style:i},o(l,n=>o(u,r=>n||r?t(`div`,{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},t(`div`,{class:`${e}-switch__rail-placeholder`},t(`div`,{class:`${e}-switch__button-placeholder`}),n),t(`div`,{class:`${e}-switch__rail-placeholder`},t(`div`,{class:`${e}-switch__button-placeholder`}),r)):null)),t(`div`,{class:`${e}-switch__button`},o(d,n=>o(f,r=>o(p,i=>t(g,null,{default:()=>this.loading?t(y,Object.assign({key:`loading`,clsPrefix:e,strokeWidth:20},this.spinProps)):this.checked&&(r||n)?t(`div`,{class:`${e}-switch__button-icon`,key:r?`checked-icon`:`icon`},r||n):!this.checked&&(i||n)?t(`div`,{class:`${e}-switch__button-icon`,key:i?`unchecked-icon`:`icon`},i||n):null})))),o(l,n=>n&&t(`div`,{key:`checked`,class:`${e}-switch__checked`},n)),o(u,n=>n&&t(`div`,{key:`unchecked`,class:`${e}-switch__unchecked`},n)))))}});export{M as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{M as e,P as t,ft as n,lt as r,q as i,w as a}from"./router-kR4kqS2l.js";import{$ as o,B as s,K as c,c as l,ct as u,d,dt as f,ft as p,n as m,nt as h,pt as g,q as _,st as v,ut as y,z as b}from"./browser-DlPqZ-4M.js";import{c as x}from"./fade-in.cssr-D0suZaLL.js";import{t as S}from"./Close-Brba3ay5.js";import{o as C}from"./Button-vKfgky-Y.js";var w={closeIconSizeTiny:`12px`,closeIconSizeSmall:`12px`,closeIconSizeMedium:`14px`,closeIconSizeLarge:`14px`,closeSizeTiny:`16px`,closeSizeSmall:`16px`,closeSizeMedium:`18px`,closeSizeLarge:`18px`,padding:`0 7px`,closeMargin:`0 0 0 4px`};function T(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:o,warningColor:s,errorColor:c,baseColor:l,borderColor:u,opacityDisabled:d,tagColor:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:g,borderRadiusSmall:_,fontSizeMini:v,fontSizeTiny:y,fontSizeSmall:b,fontSizeMedium:x,heightMini:S,heightTiny:C,heightSmall:T,heightMedium:E,closeColorHover:D,closeColorPressed:O,buttonColor2Hover:k,buttonColor2Pressed:A,fontWeightStrong:j}=e;return Object.assign(Object.assign({},w),{closeBorderRadius:_,heightTiny:S,heightSmall:C,heightMedium:T,heightLarge:E,borderRadius:_,opacityDisabled:d,fontSizeTiny:v,fontSizeSmall:y,fontSizeMedium:b,fontSizeLarge:x,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:l,colorCheckable:`#0000`,colorHoverCheckable:k,colorPressedCheckable:A,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${u}`,textColor:t,color:f,colorBordered:`rgb(250, 250, 252)`,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:g,closeColorHover:D,closeColorPressed:O,borderPrimary:`1px solid ${h(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:h(i,{alpha:.12}),colorBorderedPrimary:h(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:h(i,{alpha:.12}),closeColorPressedPrimary:h(i,{alpha:.18}),borderInfo:`1px solid ${h(a,{alpha:.3})}`,textColorInfo:a,colorInfo:h(a,{alpha:.12}),colorBorderedInfo:h(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:h(a,{alpha:.12}),closeColorPressedInfo:h(a,{alpha:.18}),borderSuccess:`1px solid ${h(o,{alpha:.3})}`,textColorSuccess:o,colorSuccess:h(o,{alpha:.12}),colorBorderedSuccess:h(o,{alpha:.1}),closeIconColorSuccess:o,closeIconColorHoverSuccess:o,closeIconColorPressedSuccess:o,closeColorHoverSuccess:h(o,{alpha:.12}),closeColorPressedSuccess:h(o,{alpha:.18}),borderWarning:`1px solid ${h(s,{alpha:.35})}`,textColorWarning:s,colorWarning:h(s,{alpha:.15}),colorBorderedWarning:h(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:h(s,{alpha:.12}),closeColorPressedWarning:h(s,{alpha:.18}),borderError:`1px solid ${h(c,{alpha:.23})}`,textColorError:c,colorError:h(c,{alpha:.1}),colorBorderedError:h(c,{alpha:.08}),closeIconColorError:c,closeIconColorHoverError:c,closeIconColorPressedError:c,closeColorHoverError:h(c,{alpha:.12}),closeColorPressedError:h(c,{alpha:.18})})}var E={name:`Tag`,common:m,self:T},D={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},O=u(`tag`,`
|
|
2
2
|
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
|
3
3
|
white-space: nowrap;
|
|
4
4
|
position: relative;
|
|
@@ -68,4 +68,4 @@ import{C as e,K as t,N as n,ct as r,dt as i,j as a}from"./router-qWVkGgap.js";im
|
|
|
68
68
|
`,[p(`disabled`,[v(`&:hover`,`background-color: var(--n-color-hover-checkable);`,[p(`checked`,`color: var(--n-text-color-hover-checkable);`)]),v(`&:active`,`background-color: var(--n-color-pressed-checkable);`,[p(`checked`,`color: var(--n-text-color-pressed-checkable);`)])]),f(`checked`,`
|
|
69
69
|
color: var(--n-text-color-checked);
|
|
70
70
|
background-color: var(--n-color-checked);
|
|
71
|
-
`,[p(`disabled`,[v(`&:hover`,`background-color: var(--n-color-checked-hover);`),v(`&:active`,`background-color: var(--n-color-checked-pressed);`)])])])]),k=Object.assign(Object.assign(Object.assign({},l.props),D),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),A=o(`n-tag`),j=
|
|
71
|
+
`,[p(`disabled`,[v(`&:hover`,`background-color: var(--n-color-checked-hover);`),v(`&:active`,`background-color: var(--n-color-checked-pressed);`)])])])]),k=Object.assign(Object.assign(Object.assign({},l.props),D),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),A=o(`n-tag`),j=e({name:`Tag`,props:k,slots:Object,setup(e){let t=r(null),{mergedBorderedRef:o,mergedClsPrefixRef:c,inlineThemeDisabled:u,mergedRtlRef:f,mergedComponentPropsRef:p}=s(e),m=a(()=>e.size||p?.value?.Tag?.size||`medium`),h=l(`Tag`,`-tag`,O,E,e,c);i(A,{roundRef:n(e,`round`)});function v(){if(!e.disabled&&e.checkable){let{checked:t,onCheckedChange:n,onUpdateChecked:r,"onUpdate:checked":i}=e;r&&r(!t),i&&i(!t),n&&n(!t)}}function y(t){if(e.triggerClickOnClose||t.stopPropagation(),!e.disabled){let{onClose:n}=e;n&&_(n,t)}}let S={setTextContent(e){let{value:n}=t;n&&(n.textContent=e)}},w=d(`Tag`,f,c),T=a(()=>{let{type:t,color:{color:n,textColor:r}={}}=e,i=m.value,{common:{cubicBezierEaseInOut:a},self:{padding:s,closeMargin:c,borderRadius:l,opacityDisabled:u,textColorCheckable:d,textColorHoverCheckable:f,textColorPressedCheckable:p,textColorChecked:_,colorCheckable:v,colorHoverCheckable:y,colorPressedCheckable:b,colorChecked:S,colorCheckedHover:C,colorCheckedPressed:w,closeBorderRadius:T,fontWeightStrong:E,[g(`colorBordered`,t)]:D,[g(`closeSize`,i)]:O,[g(`closeIconSize`,i)]:k,[g(`fontSize`,i)]:A,[g(`height`,i)]:j,[g(`color`,t)]:M,[g(`textColor`,t)]:N,[g(`border`,t)]:P,[g(`closeIconColor`,t)]:F,[g(`closeIconColorHover`,t)]:I,[g(`closeIconColorPressed`,t)]:L,[g(`closeColorHover`,t)]:R,[g(`closeColorPressed`,t)]:z}}=h.value,B=x(c);return{"--n-font-weight-strong":E,"--n-avatar-size-override":`calc(${j} - 8px)`,"--n-bezier":a,"--n-border-radius":l,"--n-border":P,"--n-close-icon-size":k,"--n-close-color-pressed":z,"--n-close-color-hover":R,"--n-close-border-radius":T,"--n-close-icon-color":F,"--n-close-icon-color-hover":I,"--n-close-icon-color-pressed":L,"--n-close-icon-color-disabled":F,"--n-close-margin-top":B.top,"--n-close-margin-right":B.right,"--n-close-margin-bottom":B.bottom,"--n-close-margin-left":B.left,"--n-close-size":O,"--n-color":n||(o.value?D:M),"--n-color-checkable":v,"--n-color-checked":S,"--n-color-checked-hover":C,"--n-color-checked-pressed":w,"--n-color-hover-checkable":y,"--n-color-pressed-checkable":b,"--n-font-size":A,"--n-height":j,"--n-opacity-disabled":u,"--n-padding":s,"--n-text-color":r||N,"--n-text-color-checkable":d,"--n-text-color-checked":_,"--n-text-color-hover-checkable":f,"--n-text-color-pressed-checkable":p}}),D=u?b(`tag`,a(()=>{let t=``,{type:n,color:{color:r,textColor:i}={}}=e;return t+=n[0],t+=m.value[0],r&&(t+=`a${C(r)}`),i&&(t+=`b${C(i)}`),o.value&&(t+=`c`),t}),T,e):void 0;return Object.assign(Object.assign({},S),{rtlEnabled:w,mergedClsPrefix:c,contentRef:t,mergedBordered:o,handleClick:v,handleCloseClick:y,cssVars:u?void 0:T,themeClass:D?.themeClass,onRender:D?.onRender})},render(){var e;let{mergedClsPrefix:n,rtlEnabled:r,closable:i,color:{borderColor:a}={},round:o,onRender:s,$slots:l}=this;s?.();let u=c(l.avatar,e=>e&&t(`div`,{class:`${n}-tag__avatar`},e)),d=c(l.icon,e=>e&&t(`div`,{class:`${n}-tag__icon`},e));return t(`div`,{class:[`${n}-tag`,this.themeClass,{[`${n}-tag--rtl`]:r,[`${n}-tag--strong`]:this.strong,[`${n}-tag--disabled`]:this.disabled,[`${n}-tag--checkable`]:this.checkable,[`${n}-tag--checked`]:this.checkable&&this.checked,[`${n}-tag--round`]:o,[`${n}-tag--avatar`]:u,[`${n}-tag--icon`]:d,[`${n}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},d||u,t(`span`,{class:`${n}-tag__content`,ref:`contentRef`},(e=this.$slots).default?.call(e)),!this.checkable&&i?t(S,{clsPrefix:n,class:`${n}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:o,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?t(`div`,{class:`${n}-tag__border`,style:{borderColor:a}}):null)}});export{w as n,j as t};
|