hermes-web-ui 0.3.4 → 0.3.5
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/LICENSE +21 -0
- package/dist/client/assets/{Add-DBcT5hzg.js → Add-B30B6hm7.js} +1 -1
- package/dist/client/assets/{Button-R5s3092y.js → Button-DwGfyqPw.js} +1 -1
- package/dist/client/assets/ChannelsView-CBp2DN0o.js +1 -0
- package/dist/client/assets/{ChatView-CtLv9X8G.css → ChatView-C-DDndDr.css} +1 -1
- package/dist/client/assets/ChatView-DFe0-MBb.js +127 -0
- package/dist/client/assets/Close-Cx3QWBlf.js +45 -0
- package/dist/client/assets/{FormItem-ZuVh5lSE.js → FormItem-IDqRbieL.js} +1 -1
- package/dist/client/assets/GatewaysView-B6iuJPRt.css +1 -0
- package/dist/client/assets/GatewaysView-BhcgCbRT.js +1 -0
- package/dist/client/assets/{Input-CbOEVtEq.js → Input-DZ1ybW2S.js} +3 -3
- package/dist/client/assets/{InputNumber-B6xJGyAP.js → InputNumber-Cv9gxxh7.js} +2 -2
- package/dist/client/assets/{JobsView-BNGFt0kv.js → JobsView-BC5mylk0.js} +2 -2
- package/dist/client/assets/{LoginView-B-UpFAOr.js → LoginView-D3boEGsw.js} +1 -1
- package/dist/client/assets/{LogsView-BMJ5FVwp.js → LogsView-c6KTVy2B.js} +1 -1
- package/dist/client/assets/{MarkdownRenderer-C8-GFOw3.js → MarkdownRenderer-BXguAKSD.js} +1 -1
- package/dist/client/assets/{MemoryView-Rfsn9nzW.js → MemoryView-DbnZK85J.js} +1 -1
- package/dist/client/assets/{Modal-DCJNfzf6.js → Modal-DT_Uaxiw.js} +6 -6
- package/dist/client/assets/{ModelsView-wE2P2H3O.js → ModelsView-j8N9aa4s.js} +1 -1
- package/dist/client/assets/Popconfirm-DZmjYOls.js +16 -0
- package/dist/client/assets/Popover-D3ojycbe.js +117 -0
- package/dist/client/assets/ProfilesView-BMreMf7c.js +440 -0
- package/dist/client/assets/{ProfilesView-Chffv0-D.css → ProfilesView-Djk2r_Yi.css} +1 -1
- package/dist/client/assets/Select-C81CZLeG.js +340 -0
- package/dist/client/assets/{SettingRow-Bztj1Qvd.js → SettingRow-CVQtnZk0.js} +1 -1
- package/dist/client/assets/SettingsView-DhcMUR45.js +352 -0
- package/dist/client/assets/{SettingsView-BIEQOPzq.css → SettingsView-DsKujD7e.css} +1 -1
- package/dist/client/assets/{SkillsView-DA7GSqMh.js → SkillsView-D1av-rLk.js} +1 -1
- package/dist/client/assets/{Spin-UenY6DjU.js → Spin-BhfQbLIz.js} +3 -3
- package/dist/client/assets/Suffix-BXl6NL7N.js +90 -0
- package/dist/client/assets/{Switch-D4sdzrF1.js → Switch-C0uGgDpw.js} +2 -2
- package/dist/client/assets/{light-UKc15Qzy.js → Tag-DvesGg6w.js} +2 -2
- package/dist/client/assets/{TerminalView-bdOH27Rz.js → TerminalView-17YCUOqm.js} +16 -16
- package/dist/client/assets/{TerminalView-DPdn9YA7.css → TerminalView-bGVoBQc1.css} +1 -1
- package/dist/client/assets/{Tooltip-shahfZE0.js → Tooltip-qYbjBcWW.js} +1 -1
- package/dist/client/assets/{UsageView-LP-yDWfN.js → UsageView-D25PQIYU.js} +1 -1
- package/dist/client/assets/Warning-DAmP6UnC.js +1 -0
- package/dist/client/assets/{_plugin-vue_export-helper-B5RrPTMt.js → _plugin-vue_export-helper-UAuz8oHE.js} +1 -1
- package/dist/client/assets/app-CBE2Q2m7.js +1 -0
- package/dist/client/assets/app-DPPUfw54.js +1 -0
- package/dist/client/assets/{browser-Cnde4syl.js → browser-CLSxHAWY.js} +1 -1
- package/dist/client/assets/chat-BLmoNi4J.js +6 -0
- package/dist/client/assets/composables-Co9VYRg8.js +1 -0
- package/dist/client/assets/fade-in.cssr-CDLVanQc.js +12 -0
- package/dist/client/assets/index-BsT9PCg4.css +1 -0
- package/dist/client/assets/index-D5e-xsve.js +284 -0
- package/dist/client/assets/{jobs-Bg3B0qd3.js → jobs-B7ZtNcWS.js} +1 -1
- package/dist/client/assets/{light-B9EqymT1.js → light-B5t3raDD.js} +1 -1
- package/dist/client/assets/light-BuwZuC3T.js +1 -0
- package/dist/client/assets/{light-7AGE9udo.js → light-C0tle1ml.js} +1 -1
- package/dist/client/assets/{light-C_iMTPuX.js → light-DmNKMghu.js} +1 -1
- package/dist/client/assets/light-DskCB02V.js +23 -0
- package/dist/client/assets/{light-CtcMXxnt.js → light-J6RXkH_f.js} +1 -1
- package/dist/client/assets/light-drc_JZYD.js +1 -0
- package/dist/client/assets/{pinia-BizF94YH.js → pinia-BCdMNHqH.js} +1 -1
- package/dist/client/assets/profiles-0gLtDD3L.js +1 -0
- package/dist/client/assets/{router-BuVIua3w.js → router-xXGgrS8z.js} +2 -2
- package/dist/client/assets/{sessions-CpgDAUKL.js → sessions-CT0dx-Es.js} +1 -1
- package/dist/client/assets/{skills-BGUX0Zk7.js → skills-6XXzYR4m.js} +1 -1
- package/dist/client/assets/{use-message-DgahoF2f.js → use-message-DX_6iCeB.js} +1 -1
- package/dist/client/assets/{useTheme-CRVFV8Ud.js → useTheme-DYGtqD4X.js} +1 -1
- package/dist/client/index.html +29 -29
- package/dist/server/index.js +17 -79
- package/dist/server/routes/hermes/gateways.d.ts +4 -0
- package/dist/server/routes/hermes/gateways.js +73 -0
- package/dist/server/routes/hermes/index.js +2 -0
- package/dist/server/routes/hermes/profiles.js +28 -84
- package/dist/server/routes/hermes/proxy-handler.js +17 -1
- package/dist/server/routes/hermes/sessions.js +9 -0
- package/dist/server/services/hermes/gateway-manager.d.ts +131 -0
- package/dist/server/services/hermes/gateway-manager.js +536 -0
- package/dist/server/services/hermes/sessions-db.d.ts +24 -0
- package/dist/server/services/hermes/sessions-db.js +147 -0
- package/package.json +1 -1
- package/dist/client/assets/ChannelsView-CH6386MX.js +0 -1
- package/dist/client/assets/ChatView-C_mCyb0n.js +0 -127
- package/dist/client/assets/Close-CbcMKiZ9.js +0 -45
- package/dist/client/assets/Popconfirm-pG5fyaNw.js +0 -16
- package/dist/client/assets/Popover-BcnZkOJ0.js +0 -117
- package/dist/client/assets/ProfilesView-CAOfb8ly.js +0 -440
- package/dist/client/assets/Scrollbar-B7udJACg.js +0 -77
- package/dist/client/assets/Select-B6Xt21kv.js +0 -340
- package/dist/client/assets/SettingsView-Dwx8y_nj.js +0 -352
- package/dist/client/assets/Suffix-DopnzIdr.js +0 -25
- package/dist/client/assets/Warning-DT2rnqpH.js +0 -1
- package/dist/client/assets/app-B3-jMgcz.js +0 -1
- package/dist/client/assets/app-Baqdn89g.js +0 -1
- package/dist/client/assets/chat-CCvtq7iz.js +0 -6
- package/dist/client/assets/composables-yAWv_nAD.js +0 -1
- package/dist/client/assets/fade-in-scale-up.cssr-7cCctcdO.js +0 -1
- package/dist/client/assets/index-JeutuTe0.css +0 -1
- package/dist/client/assets/index-vZMUiSyM.js +0 -284
- package/dist/client/assets/light-87-mk9Yl.js +0 -1
- package/dist/client/assets/profiles-DXTLdlvo.js +0 -23
- package/dist/client/assets/use-compitable-C1bGazqI.js +0 -1
- /package/dist/client/assets/{_common-DgdkN_d5.js → _common-DgvLN1LQ.js} +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import{C as e,F as t,H as n,J as r,L as i,M as a,N as o,U as s,V as c,X as l,Z as u,ct as d,d as f,dt as p,j as m,y as h,z as g}from"./router-xXGgrS8z.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-CLSxHAWY.js";import{c as A,l as j,n as ne,r as re,s as ie,t as M}from"./fade-in.cssr-CDLVanQc.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 P(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 F(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=P(e,t,n)),a}function se(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=F(e,t,n);return Object.keys(i).forEach(e=>{L(e,document,i[e],r)}),!0}return!1}function I(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=F(e,t,n);return Object.keys(i).forEach(e=>{R(e,document,i[e],r)}),!0}return!1}function ce(){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,se(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(I(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:L,off:R}=ce();function le(t,n){return l(t,e=>{e!==void 0&&(n.value=e)}),e(()=>t.value===void 0?n.value:t.value)}var ue=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function de(){return ue}function fe(e){let t={isDeactivated:!1},r=!1;return g(()=>{if(t.isDeactivated=!1,!r){r=!0;return}e()}),n(()=>{t.isDeactivated=!0,r||=!0}),t}function pe(e,t){console.error(`[vueuc/${e}]: ${t}`)}var z=[],me=function(){return z.some(function(e){return e.activeTargets.length>0})},he=function(){return z.some(function(e){return e.skippedTargets.length>0})},ge=`ResizeObserver loop completed with undelivered notifications.`,_e=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:ge}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=ge),window.dispatchEvent(e)},B;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(B||={});var V=function(e){return Object.freeze(e)},ve=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,V(this)}return e}(),ye=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,V(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}(),be=function(e){return e instanceof SVGElement&&`getBBox`in e},xe=function(e){if(be(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)},Se=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},H=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},U=typeof window<`u`?window:{},W=new WeakMap,G=/auto|scroll/,Ce=/^tb|vertical/,we=/msie|trident/i.test(U.navigator&&U.navigator.userAgent),K=function(e){return parseFloat(e||`0`)},q=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new ve((n?t:e)||0,(n?e:t)||0)},Te=V({devicePixelContentBoxSize:q(),borderBoxSize:q(),contentBoxSize:q(),contentRect:new ye(0,0,0,0)}),Ee=function(e,t){if(t===void 0&&(t=!1),W.has(e)&&!t)return W.get(e);if(xe(e))return W.set(e,Te),Te;var n=getComputedStyle(e),r=be(e)&&e.ownerSVGElement&&e.getBBox(),i=!we&&n.boxSizing===`border-box`,a=Ce.test(n.writingMode||``),o=!r&&G.test(n.overflowY||``),s=!r&&G.test(n.overflowX||``),c=r?0:K(n.paddingTop),l=r?0:K(n.paddingRight),u=r?0:K(n.paddingBottom),d=r?0:K(n.paddingLeft),f=r?0:K(n.borderTopWidth),p=r?0:K(n.borderRightWidth),m=r?0:K(n.borderBottomWidth),h=r?0:K(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:K(n.width)-S-x,w=r?r.height:K(n.height)-ee-b,T=C+g+x+v,E=w+_+b+y,D=V({devicePixelContentBoxSize:q(Math.round(C*devicePixelRatio),Math.round(w*devicePixelRatio),a),borderBoxSize:q(T,E,a),contentBoxSize:q(C,w,a),contentRect:new ye(d,c,C,w)});return W.set(e,D),D},De=function(e,t,n){var r=Ee(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case B.DEVICE_PIXEL_CONTENT_BOX:return o;case B.BORDER_BOX:return i;default:return a}},Oe=function(){function e(e){var t=Ee(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=V([t.borderBoxSize]),this.contentBoxSize=V([t.contentBoxSize]),this.devicePixelContentBoxSize=V([t.devicePixelContentBoxSize])}return e}(),J=function(e){if(xe(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},ke=function(){var e=1/0,t=[];z.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new Oe(t.target),i=J(t.target);r.push(n),t.lastReportedSize=De(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},Ae=function(e){z.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(J(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},je=function(){var e=0;for(Ae(e);me();)e=ke(),Ae(e);return he()&&_e(),e>0},Y,Me=[],X=function(){return Me.splice(0).forEach(function(e){return e()})},Ne=function(e){if(!Y){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return X()}).observe(n,{characterData:!0}),Y=function(){n.textContent=`${t?t--:t++}`}}Me.push(e),Y()},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=je()}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():U.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 U.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Re.forEach(function(t){return U.removeEventListener(t,e.listener,!0)}),!0)},e}()),He=function(e){!Z&&e>0&&Ve.start(),Z+=e,!Z&&Ve.stop()},Ue=function(e){return!be(e)&&!H(e)&&getComputedStyle(e).display===`inline`},We=function(){function e(e,t){this.target=e,this.observedBox=t||B.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=De(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&&z.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&&z.splice(z.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(!Se(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(!Se(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=m({name:`ResizeObserver`,props:{onResize:Function},setup(e){let t=!1,n=a().proxy;function r(t){let{onResize:n}=e;n!==void 0&&n(t)}s(()=>{let e=n.$el;if(e===void 0){pe(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){pe(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(Xe.registerHandler(e.nextElementSibling,r),t=!0)}),c(()=>{t&&Xe.unregisterHandler(n.$el.nextElementSibling)})},render(){return r(this.$slots,`default`)}});function Qe(e){let{left:t,right:n,top:r,bottom:i}=A(e);return`${r} ${t} ${i} ${n}`}var $e=m({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(n){let{mergedLocaleRef:r,mergedDateLocaleRef:i}=t(v,null)||{},a=e(()=>r?.value?.[n]??et[n]);return{dateLocaleRef:e(()=>i?.value??dt),localeRef:a}}var pt=m({name:`ChevronDown`,render(){return o(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},o(`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`,()=>o(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},o(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},o(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},o(`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=m({name:`BaseClear`,props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return w(`-base-clear`,ht,p(e,`clsPrefix`)),{handleMouseDown(e){e.preventDefault()}}},render(){let{clsPrefix:e}=this;return o(`div`,{class:`${e}-base-clear`},o(E,null,{default:()=>{var t;return this.show?o(`div`,{key:`dismiss`,class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},y(this.$slots.icon,()=>[o(re,{clsPrefix:e},{default:()=>o(mt,null)})])):o(`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
|
+
`,[M(),O(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),xt=m({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(t){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=_(t),a=ee(`Scrollbar`,i,n),o=d(null),l=d(null),f=d(null),p=d(null),m=d(null),h=d(null),g=d(null),v=d(null),y=d(null),b=d(null),S=d(null),C=d(0),w=d(0),T=d(!1),E=d(!1),D=!1,O=!1,k,j,ne=0,re=0,M=0,N=0,oe=de(),P=x(`Scrollbar`,`-scrollbar`,bt,yt,t,n),F=e(()=>{let{value:e}=v,{value:t}=h,{value:n}=b;return e===null||t===null||n===null?0:Math.min(e,n*e/t+ie(P.value.self.width)*1.5)}),se=e(()=>`${F.value}px`),I=e(()=>{let{value:e}=y,{value:t}=g,{value:n}=S;return e===null||t===null||n===null?0:n*e/t+ie(P.value.self.height)*1.5}),ce=e(()=>`${I.value}px`),le=e(()=>{let{value:e}=v,{value:t}=C,{value:n}=h,{value:r}=b;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-F.value):0}}),ue=e(()=>`${le.value}px`),pe=e(()=>{let{value:e}=y,{value:t}=w,{value:n}=g,{value:r}=S;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-I.value):0}}),z=e(()=>`${pe.value}px`),me=e(()=>{let{value:e}=v,{value:t}=h;return e!==null&&t!==null&&t>e}),he=e(()=>{let{value:e}=y,{value:t}=g;return e!==null&&t!==null&&t>e}),ge=e(()=>{let{trigger:e}=t;return e===`none`||T.value}),_e=e(()=>{let{trigger:e}=t;return e===`none`||E.value}),B=e(()=>{let{container:e}=t;return e?e():l.value}),V=e(()=>{let{content:e}=t;return e?e():f.value}),ve=(e,n)=>{if(!t.scrollable)return;if(typeof e==`number`){H(e,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=e;(r!==void 0||i!==void 0)&&H(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?H(0,a*o,o,u,c):s===`bottom`?H(0,2**53-1,0,!1,c):s===`top`&&H(0,0,0,!1,c):H(0,l.offsetTop,l.offsetHeight,u,c)},ye=fe(()=>{t.container||ve({top:C.value,left:w.value})}),be=()=>{ye.isDeactivated||J()},xe=e=>{if(ye.isDeactivated)return;let{onResize:n}=t;n&&n(e),J()},Se=(e,n)=>{if(!t.scrollable)return;let{value:r}=B;r&&(typeof e==`object`?r.scrollBy(e):r.scrollBy(e,n||0))};function H(e,t,n,r,i){let{value:a}=B;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 U(){K(),q(),J()}function W(){G()}function G(){Ce(),we()}function Ce(){j!==void 0&&window.clearTimeout(j),j=window.setTimeout(()=>{E.value=!1},t.duration)}function we(){k!==void 0&&window.clearTimeout(k),k=window.setTimeout(()=>{T.value=!1},t.duration)}function K(){k!==void 0&&window.clearTimeout(k),T.value=!0}function q(){j!==void 0&&window.clearTimeout(j),E.value=!0}function Te(e){let{onScroll:n}=t;n&&n(e),Ee()}function Ee(){let{value:e}=B;e&&(C.value=e.scrollTop,w.value=e.scrollLeft*(a?.value?-1:1))}function De(){let{value:e}=V;e&&(h.value=e.offsetHeight,g.value=e.offsetWidth);let{value:t}=B;t&&(v.value=t.offsetHeight,y.value=t.offsetWidth);let{value:n}=m,{value:r}=p;n&&(S.value=n.offsetWidth),r&&(b.value=r.offsetHeight)}function Oe(){let{value:e}=B;e&&(C.value=e.scrollTop,w.value=e.scrollLeft*(a?.value?-1:1),v.value=e.offsetHeight,y.value=e.offsetWidth,h.value=e.scrollHeight,g.value=e.scrollWidth);let{value:t}=m,{value:n}=p;t&&(S.value=t.offsetWidth),n&&(b.value=n.offsetHeight)}function J(){t.scrollable&&(t.useUnifiedContainer?Oe():(De(),Ee()))}function ke(e){return!o.value?.contains(ae(e))}function Ae(e){e.preventDefault(),e.stopPropagation(),O=!0,L(`mousemove`,window,je,!0),L(`mouseup`,window,Y,!0),re=w.value,M=a?.value?window.innerWidth-e.clientX:e.clientX}function je(e){if(!O)return;k!==void 0&&window.clearTimeout(k),j!==void 0&&window.clearTimeout(j);let{value:n}=y,{value:r}=g,{value:i}=I;if(n===null||r===null)return;let o=(a?.value?window.innerWidth-e.clientX-M:e.clientX-M)*(r-n)/(n-i),s=r-n,c=re+o;c=Math.min(s,c),c=Math.max(c,0);let{value:l}=B;if(l){l.scrollLeft=c*(a?.value?-1:1);let{internalOnUpdateScrollLeft:e}=t;e&&e(c)}}function Y(e){e.preventDefault(),e.stopPropagation(),R(`mousemove`,window,je,!0),R(`mouseup`,window,Y,!0),O=!1,J(),ke(e)&&G()}function Me(e){e.preventDefault(),e.stopPropagation(),D=!0,L(`mousemove`,window,X,!0),L(`mouseup`,window,Ne,!0),ne=C.value,N=e.clientY}function X(e){if(!D)return;k!==void 0&&window.clearTimeout(k),j!==void 0&&window.clearTimeout(j);let{value:t}=v,{value:n}=h,{value:r}=F;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}=B;s&&(s.scrollTop=o)}function Ne(e){e.preventDefault(),e.stopPropagation(),R(`mousemove`,window,X,!0),R(`mouseup`,window,Ne,!0),D=!1,J(),ke(e)&&G()}u(()=>{let{value:e}=he,{value:t}=me,{value:r}=n,{value:i}=m,{value:a}=p;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`))}),s(()=>{t.container||J()}),c(()=>{k!==void 0&&window.clearTimeout(k),j!==void 0&&window.clearTimeout(j),R(`mousemove`,window,X,!0),R(`mouseup`,window,Ne,!0)});let Pe=e(()=>{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}}=P.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,t):void 0;return Object.assign(Object.assign({},{scrollTo:ve,scrollBy:Se,sync:J,syncUnifiedContainer:Oe,handleMouseEnterWrapper:U,handleMouseLeaveWrapper:W}),{mergedClsPrefix:n,rtlEnabled:a,containerScrollTop:C,wrapperRef:o,containerRef:l,contentRef:f,yRailRef:p,xRailRef:m,needYBar:me,needXBar:he,yBarSizePx:se,xBarSizePx:ce,yBarTopPx:ue,xBarLeftPx:z,isShowXBar:ge,isShowYBar:_e,isIos:oe,handleScroll:Te,handleContentResize:be,handleContainerResize:xe,handleYScrollMouseDown:Me,handleXScrollMouseDown:Ae,containerWidth:y,cssVars:r?void 0:Pe,themeClass:Z?.themeClass,onRender:Z?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,triggerDisplayManually:n,rtlEnabled:r,internalHoistYRail:a,yPlacement:s,xPlacement:c,xScrollable:l}=this;if(!this.scrollable)return e.default?.call(e);let u=this.trigger===`none`,d=(e,n)=>o(`div`,{ref:`yRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--vertical`,`${t}-scrollbar-rail--vertical--${s}`,e],"data-scrollbar-rail":!0,style:[n||``,this.verticalRailStyle],"aria-hidden":!0},o(u?$e:f,u?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?o(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),p=()=>{var s;return(s=this.onRender)==null||s.call(this),o(`div`,i(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):o(`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},o(Ze,{onResize:this.handleContentResize},{default:()=>o(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${t}-scrollbar-content`,this.contentClass]},e)})),a?null:d(void 0,void 0),l&&o(`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},o(u?$e:f,u?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?o(`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}))])},m=this.container?p():o(Ze,{onResize:this.handleContainerResize},{default:p});return a?o(h,null,m,d(this.themeClass,this.cssVars)):m}}),St=xt,Ct=m({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 o(D,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?o(gt,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>o(re,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>y(t.default,()=>[o(pt,null)])})}):null})}}});export{vt as a,$e as c,le as d,R as f,yt as i,Ze as l,ae as m,xt as n,gt as o,L as p,St as r,ft as s,Ct as t,Xe as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,N as t,ct as n,dt as r,j as i}from"./router-
|
|
1
|
+
import{C as e,N as t,ct as n,dt as r,j as i}from"./router-xXGgrS8z.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-CLSxHAWY.js";import{d as C}from"./Suffix-BXl6NL7N.js";import{l as w,s as T}from"./fade-in.cssr-CDLVanQc.js";import{t as E}from"./_common-DgvLN1LQ.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-BuVIua3w.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=i({name:`Switch`,props:A,slots:Object,setup(t){j===void 0&&(j=typeof CSS<`u`?CSS.supports===void 0?!1:CSS.supports(`width`,`max(1px)`):!0);let{mergedClsPrefixRef:i,inlineThemeDisabled:o,mergedComponentPropsRef:c}=a(t),l=u(`Switch`,`-switch`,k,O,t,i),d=s(t,{mergedSize(e){return t.size===void 0?e?e.mergedSize.value:c?.value?.Switch?.size||`medium`:t.size}}),{mergedSizeRef:f,mergedDisabledRef:p}=d,m=n(t.defaultValue),h=
|
|
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=i({name:`Switch`,props:A,slots:Object,setup(t){j===void 0&&(j=typeof CSS<`u`?CSS.supports===void 0?!1:CSS.supports(`width`,`max(1px)`):!0);let{mergedClsPrefixRef:i,inlineThemeDisabled:o,mergedComponentPropsRef:c}=a(t),l=u(`Switch`,`-switch`,k,O,t,i),d=s(t,{mergedSize(e){return t.size===void 0?e?e.mergedSize.value:c?.value?.Switch?.size||`medium`:t.size}}),{mergedSizeRef:f,mergedDisabledRef:p}=d,m=n(t.defaultValue),h=C(r(t,`value`),m),g=e(()=>h.value===t.checkedValue),y=n(!1),b=n(!1),x=e(()=>{let{railStyle:e}=t;if(e)return e({focused:b.value,checked:g.value})});function E(e){let{"onUpdate:value":n,onChange:r,onUpdateValue:i}=t,{nTriggerFormInput:a,nTriggerFormChange:o}=d;n&&v(n,e),i&&v(i,e),r&&v(r,e),m.value=e,a(),o()}function D(){let{nTriggerFormFocus:e}=d;e()}function A(){let{nTriggerFormBlur:e}=d;e()}function M(){t.loading||p.value||(h.value===t.checkedValue?E(t.uncheckedValue):E(t.checkedValue))}function N(){b.value=!0,D()}function P(){b.value=!1,A(),y.value=!1}function F(e){t.loading||p.value||e.key===` `&&(h.value===t.checkedValue?E(t.uncheckedValue):E(t.checkedValue),y.value=!1)}function I(e){t.loading||p.value||e.key===` `&&(e.preventDefault(),y.value=!0)}let L=e(()=>{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`,e(()=>f.value[0]),L,t):void 0;return{handleClick:M,handleBlur:P,handleFocus:N,handleKeyup:F,handleKeydown:I,mergedRailStyle:x,pressed:y,mergedClsPrefix:i,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{C as e,K as t,N as n,ct as r,dt as i,j as a}from"./router-
|
|
1
|
+
import{C as e,K as t,N as n,ct as r,dt as i,j as a}from"./router-xXGgrS8z.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-CLSxHAWY.js";import{c as x}from"./fade-in.cssr-CDLVanQc.js";import{t as S}from"./Close-Cx3QWBlf.js";import{o as C}from"./Button-DwGfyqPw.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-BuVIua3w.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=a({name:`Tag`,props:k,slots:Object,setup(n){let a=r(null),{mergedBorderedRef:o,mergedClsPrefixRef:c,inlineThemeDisabled:u,mergedRtlRef:f,mergedComponentPropsRef:p}=s(n),m=e(()=>n.size||p?.value?.Tag?.size||`medium`),h=l(`Tag`,`-tag`,O,E,n,c);t(A,{roundRef:i(n,`round`)});function v(){if(!n.disabled&&n.checkable){let{checked:e,onCheckedChange:t,onUpdateChecked:r,"onUpdate:checked":i}=n;r&&r(!e),i&&i(!e),t&&t(!e)}}function y(e){if(n.triggerClickOnClose||e.stopPropagation(),!n.disabled){let{onClose:t}=n;t&&_(t,e)}}let
|
|
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=a({name:`Tag`,props:k,slots:Object,setup(n){let a=r(null),{mergedBorderedRef:o,mergedClsPrefixRef:c,inlineThemeDisabled:u,mergedRtlRef:f,mergedComponentPropsRef:p}=s(n),m=e(()=>n.size||p?.value?.Tag?.size||`medium`),h=l(`Tag`,`-tag`,O,E,n,c);t(A,{roundRef:i(n,`round`)});function v(){if(!n.disabled&&n.checkable){let{checked:e,onCheckedChange:t,onUpdateChecked:r,"onUpdate:checked":i}=n;r&&r(!e),i&&i(!e),t&&t(!e)}}function y(e){if(n.triggerClickOnClose||e.stopPropagation(),!n.disabled){let{onClose:t}=n;t&&_(t,e)}}let S={setTextContent(e){let{value:t}=a;t&&(t.textContent=e)}},w=d(`Tag`,f,c),T=e(()=>{let{type:e,color:{color:t,textColor:r}={}}=n,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`,e)]:D,[g(`closeSize`,i)]:O,[g(`closeIconSize`,i)]:k,[g(`fontSize`,i)]:A,[g(`height`,i)]:j,[g(`color`,e)]:M,[g(`textColor`,e)]:N,[g(`border`,e)]:P,[g(`closeIconColor`,e)]:F,[g(`closeIconColorHover`,e)]:I,[g(`closeIconColorPressed`,e)]:L,[g(`closeColorHover`,e)]:R,[g(`closeColorPressed`,e)]: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":t||(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`,e(()=>{let e=``,{type:t,color:{color:r,textColor:i}={}}=n;return e+=t[0],e+=m.value[0],r&&(e+=`a${C(r)}`),i&&(e+=`b${C(i)}`),o.value&&(e+=`c`),e}),T,n):void 0;return Object.assign(Object.assign({},S),{rtlEnabled:w,mergedClsPrefix:c,contentRef:a,mergedBordered:o,handleClick:v,handleCloseClick:y,cssVars:u?void 0:T,themeClass:D?.themeClass,onRender:D?.onRender})},render(){var e;let{mergedClsPrefix:t,rtlEnabled:r,closable:i,color:{borderColor:a}={},round:o,onRender:s,$slots:l}=this;s?.();let u=c(l.avatar,e=>e&&n(`div`,{class:`${t}-tag__avatar`},e)),d=c(l.icon,e=>e&&n(`div`,{class:`${t}-tag__icon`},e));return n(`div`,{class:[`${t}-tag`,this.themeClass,{[`${t}-tag--rtl`]:r,[`${t}-tag--strong`]:this.strong,[`${t}-tag--disabled`]:this.disabled,[`${t}-tag--checkable`]:this.checkable,[`${t}-tag--checked`]:this.checkable&&this.checked,[`${t}-tag--round`]:o,[`${t}-tag--avatar`]:u,[`${t}-tag--icon`]:d,[`${t}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},d||u,n(`span`,{class:`${t}-tag__content`,ref:`contentRef`},(e=this.$slots).default?.call(e)),!this.checkable&&i?n(S,{clsPrefix:t,class:`${t}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:o,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?n(`div`,{class:`${t}-tag__border`,style:{borderColor:a}}):null)}});export{w as n,j as t};
|