hermes-web-ui 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/bin/hermes-web-ui.mjs +114 -19
  2. package/dist/assets/ChatView-DrzZz5ex.css +1 -0
  3. package/dist/assets/ChatView-WnNeYrS7.js +38 -0
  4. package/dist/assets/JobsView-BF9wWdwU.js +831 -0
  5. package/dist/assets/JobsView-BhwwXuLt.css +1 -0
  6. package/dist/assets/Modal-CQVLL_Oc.js +276 -0
  7. package/dist/assets/_plugin-vue_export-helper-D5N3Hfca.js +231 -0
  8. package/dist/assets/chat-640V6r6N.js +1 -0
  9. package/dist/assets/client-BxIiwrqC.js +1 -0
  10. package/dist/assets/index-4iFlrAYJ.js +307 -0
  11. package/dist/assets/index-CMJKLUKk.css +1 -0
  12. package/dist/assets/jobs-Cuol6Mqb.js +1 -0
  13. package/dist/assets/use-message-B8ClBznx.js +117 -0
  14. package/dist/favicon.ico +0 -0
  15. package/dist/index.html +21 -0
  16. package/package.json +3 -11
  17. package/index.html +0 -13
  18. package/src/App.vue +0 -54
  19. package/src/api/chat.ts +0 -87
  20. package/src/api/client.ts +0 -44
  21. package/src/api/jobs.ts +0 -100
  22. package/src/api/system.ts +0 -25
  23. package/src/assets/hero.png +0 -0
  24. package/src/assets/vite.svg +0 -1
  25. package/src/components/chat/ChatInput.vue +0 -123
  26. package/src/components/chat/ChatPanel.vue +0 -289
  27. package/src/components/chat/MarkdownRenderer.vue +0 -187
  28. package/src/components/chat/MessageItem.vue +0 -189
  29. package/src/components/chat/MessageList.vue +0 -94
  30. package/src/components/jobs/JobCard.vue +0 -244
  31. package/src/components/jobs/JobFormModal.vue +0 -188
  32. package/src/components/jobs/JobsPanel.vue +0 -58
  33. package/src/components/layout/AppSidebar.vue +0 -169
  34. package/src/composables/useKeyboard.ts +0 -39
  35. package/src/env.d.ts +0 -7
  36. package/src/main.ts +0 -10
  37. package/src/router/index.ts +0 -24
  38. package/src/stores/app.ts +0 -66
  39. package/src/stores/chat.ts +0 -344
  40. package/src/stores/jobs.ts +0 -72
  41. package/src/styles/global.scss +0 -60
  42. package/src/styles/theme.ts +0 -71
  43. package/src/styles/variables.scss +0 -56
  44. package/src/views/ChatView.vue +0 -25
  45. package/src/views/JobsView.vue +0 -93
  46. package/src/views/SettingsView.vue +0 -257
  47. package/tsconfig.app.json +0 -17
  48. package/tsconfig.json +0 -7
  49. package/tsconfig.node.json +0 -24
  50. package/vite.config.ts +0 -39
  51. /package/{assets/logo.png → dist/assets/logo-BAarh-tH.png} +0 -0
  52. /package/{public → dist}/favicon.svg +0 -0
  53. /package/{public → dist}/icons.svg +0 -0
@@ -0,0 +1,117 @@
1
+ import{$ as e,$n as t,$t as n,A as r,An as i,At as a,B as o,Bt as s,Ct as c,D as l,Dn as u,Dt as d,En as f,Et as p,F as m,Ft as h,G as g,H as _,I as v,In as y,J as b,Jt as x,K as S,Kn as C,L as w,Lt as T,M as E,N as ee,Nt as te,O as D,On as O,P as ne,Pn as k,Pt as re,Q as ie,Qt as ae,R as oe,Rt as A,S as j,St as se,T as ce,Tt as le,U as ue,Un as M,Ut as de,V as fe,W as N,Wn as pe,X as me,Xn as P,Xt as F,Y as he,Z as ge,Zt as I,_n as _e,an as ve,d as ye,en as L,fn as be,ft as xe,gn as Se,gt as Ce,ht as we,it as Te,j as Ee,jn as De,k as Oe,kn as R,kt as ke,l as Ae,ln as je,mn as Me,n as Ne,nt as Pe,pt as Fe,q as z,rt as Ie,st as Le,tn as Re,u as ze,ut as Be,vn as B,wt as Ve,x as He,yt as Ue,z as We,zn as V,zt as H}from"./_plugin-vue_export-helper-D5N3Hfca.js";var Ge=[],Ke=new WeakMap;function qe(){Ge.forEach(e=>e(...Ke.get(e))),Ge=[]}function Je(e,...t){Ke.set(e,t),!Ge.includes(e)&&Ge.push(e)===1&&requestAnimationFrame(qe)}var Ye=T?document?.fonts?.ready:void 0,U=!1;Ye===void 0?U=!0:Ye.then(()=>{U=!0});function Xe(e){if(U)return;let t=!1;y(()=>{U||Ye?.then(()=>{t||e()})}),k(()=>{t=!0})}function Ze(e,t){return M(e,e=>{e!==void 0&&(t.value=e)}),B(()=>e.value===void 0?t.value:e.value)}function Qe(e,t){return B(()=>{for(let n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}var $e=re(`n-internal-select-menu`),et=re(`n-internal-select-menu-body`),tt=`__disabled__`;function W(e){let t=R(a,null),n=R(te,null),r=R(ke,null),i=R(et,null),o=P();if(typeof document<`u`){o.value=document.fullscreenElement;let e=()=>{o.value=document.fullscreenElement};y(()=>{s(`fullscreenchange`,document,e)}),k(()=>{H(`fullscreenchange`,document,e)})}return A(()=>{let{to:a}=e;return a===void 0?t?.value?t.value.$el??t.value:n?.value?n.value:r?.value?r.value:i?.value?i.value:a??(o.value||`body`):a===!1?tt:a===!0?o.value||`body`:a})}W.tdkey=tt,W.propTo={type:[String,Object,Boolean],default:void 0};var G=null;function nt(){if(G===null&&(G=document.getElementById(`v-binder-view-measurer`),G===null)){G=document.createElement(`div`),G.id=`v-binder-view-measurer`;let{style:e}=G;e.position=`fixed`,e.left=`0`,e.right=`0`,e.top=`0`,e.bottom=`0`,e.pointerEvents=`none`,e.visibility=`hidden`,document.body.appendChild(G)}return G.getBoundingClientRect()}function rt(e,t){let n=nt();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function it(e){let t=e.getBoundingClientRect(),n=nt();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function at(e){return e.nodeType===9?null:e.parentNode}function ot(e){if(e===null)return null;let t=at(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){let{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return ot(t)}var st=f({name:`Binder`,props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){V(`VBinder`,u()?.proxy);let t=R(`VBinder`,null),n=P(null),r=r=>{n.value=r,t&&e.syncTargetWithParent&&t.setTargetRef(r)},i=[],a=()=>{let e=n.value;for(;e=ot(e),e!==null;)i.push(e);for(let e of i)s(`scroll`,e,f,!0)},o=()=>{for(let e of i)H(`scroll`,e,f,!0);i=[]},c=new Set,l=e=>{c.size===0&&a(),c.has(e)||c.add(e)},d=e=>{c.has(e)&&c.delete(e),c.size===0&&o()},f=()=>{Je(p)},p=()=>{c.forEach(e=>e())},m=new Set,h=e=>{m.size===0&&s(`resize`,window,_),m.has(e)||m.add(e)},g=e=>{m.has(e)&&m.delete(e),m.size===0&&H(`resize`,window,_)},_=()=>{m.forEach(e=>e())};return k(()=>{H(`resize`,window,_),o()}),{targetRef:n,setTargetRef:r,addScrollListener:l,removeScrollListener:d,addResizeListener:h,removeResizeListener:g}},render(){return d(`binder`,this.$slots)}}),ct=f({name:`Target`,setup(){let{setTargetRef:e,syncTarget:t}=R(`VBinder`);return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){let{syncTarget:e,setTargetDirective:t}=this;return e?C(p(`follower`,this.$slots),[[t]]):p(`follower`,this.$slots)}}),K=`@@mmoContext`,lt={mounted(e,{value:t}){e[K]={handler:void 0},typeof t==`function`&&(e[K].handler=t,s(`mousemoveoutside`,e,t))},updated(e,{value:t}){let n=e[K];typeof t==`function`?n.handler?n.handler!==t&&(H(`mousemoveoutside`,e,n.handler),n.handler=t,s(`mousemoveoutside`,e,t)):(e[K].handler=t,s(`mousemoveoutside`,e,t)):n.handler&&=(H(`mousemoveoutside`,e,n.handler),void 0)},unmounted(e){let{handler:t}=e[K];t&&H(`mousemoveoutside`,e,t),e[K].handler=void 0}},{c:q}=ve(),ut=`vueuc-style`,dt={top:`bottom`,bottom:`top`,left:`right`,right:`left`},ft={start:`end`,center:`center`,end:`start`},pt={top:`height`,bottom:`height`,left:`width`,right:`width`},mt={"bottom-start":`top left`,bottom:`top center`,"bottom-end":`top right`,"top-start":`bottom left`,top:`bottom center`,"top-end":`bottom right`,"right-start":`top left`,right:`center left`,"right-end":`bottom left`,"left-start":`top right`,left:`center right`,"left-end":`bottom right`},ht={"bottom-start":`bottom left`,bottom:`bottom center`,"bottom-end":`bottom right`,"top-start":`top left`,top:`top center`,"top-end":`top right`,"right-start":`top right`,right:`center right`,"right-end":`bottom right`,"left-start":`top left`,left:`center left`,"left-end":`bottom left`},gt={"bottom-start":`right`,"bottom-end":`left`,"top-start":`right`,"top-end":`left`,"right-start":`bottom`,"right-end":`top`,"left-start":`bottom`,"left-end":`top`},_t={top:!0,bottom:!1,left:!0,right:!1},vt={top:`end`,bottom:`start`,left:`end`,right:`start`};function yt(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};let[o,s]=e.split(`-`),c=s??`center`,l={top:0,left:0},u=(e,i,a)=>{let o=0,s=0,c=n[e]-t[i]-t[e];return c>0&&r&&(a?s=_t[i]?c:-c:o=_t[i]?c:-c),{left:o,top:s}},d=o===`left`||o===`right`;if(c!==`center`){let r=gt[e],i=dt[r],a=pt[r];if(n[a]>t[a]){if(t[r]+t[a]<n[a]){let e=(n[a]-t[a])/2;t[r]<e||t[i]<e?t[r]<t[i]?(c=ft[s],l=u(a,i,d)):l=u(a,r,d):c=`center`}}else n[a]<t[a]&&t[i]<0&&t[r]>t[i]&&(c=ft[s])}else{let e=o===`bottom`||o===`top`?`left`:`top`,r=dt[e],i=pt[e],a=(n[i]-t[i])/2;(t[e]<a||t[r]<a)&&(t[e]>t[r]?(c=vt[e],l=u(i,e,d)):(c=vt[r],l=u(i,r,d)))}let f=o;return t[o]<n[pt[o]]&&t[o]<t[dt[o]]&&(f=dt[o]),{placement:c===`center`?f:`${f}-${c}`,left:l.left,top:l.top}}function bt(e,t){return t?ht[e]:mt[e]}function xt(e,t,n,r,i,a){if(a)switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`top-end`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-50%)`};default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%) translateY(-100%)`}}switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:``};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-100%)`};case`top-end`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:``};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%)`};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateY(-100%) translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-50%) translateX(-100%)`};default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateX(-50%)`}}}var St=q([q(`.v-binder-follower-container`,{position:`absolute`,left:`0`,right:`0`,top:`0`,height:`0`,pointerEvents:`none`,zIndex:`auto`}),q(`.v-binder-follower-content`,{position:`absolute`,zIndex:`auto`},[q(`> *`,{pointerEvents:`all`})])]),Ct=f({name:`Follower`,inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom`},syncTrigger:{type:Array,default:[`resize`,`scroll`]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){let n=R(`VBinder`),r=A(()=>e.enabled===void 0?e.show:e.enabled),i=P(null),a=P(null),o=()=>{let{syncTrigger:t}=e;t.includes(`scroll`)&&n.addScrollListener(u),t.includes(`resize`)&&n.addResizeListener(u)},s=()=>{n.removeScrollListener(u),n.removeResizeListener(u)};y(()=>{r.value&&(u(),o())});let l=c();St.mount({id:`vueuc/binder`,head:!0,anchorMetaName:ut,ssr:l}),k(()=>{s()}),Xe(()=>{r.value&&u()});let u=()=>{if(!r.value)return;let t=i.value;if(t===null)return;let o=n.targetRef,{x:s,y:c,overlap:l}=e,u=s!==void 0&&c!==void 0?rt(s,c):it(o);t.style.setProperty(`--v-target-width`,`${Math.round(u.width)}px`),t.style.setProperty(`--v-target-height`,`${Math.round(u.height)}px`);let{width:d,minWidth:f,placement:p,internalShift:m,flip:h}=e;t.setAttribute(`v-placement`,p),l?t.setAttribute(`v-overlap`,``):t.removeAttribute(`v-overlap`);let{style:g}=t;d===`target`?g.width=`${u.width}px`:d===void 0?g.width=``:g.width=d,f===`target`?g.minWidth=`${u.width}px`:f===void 0?g.minWidth=``:g.minWidth=f;let _=it(t),v=it(a.value),{left:y,top:b,placement:x}=yt(p,u,_,m,h,l),S=bt(x,l),{left:C,top:w,transform:T}=xt(x,v,u,b,y,l);t.setAttribute(`v-placement`,x),t.style.setProperty(`--v-offset-left`,`${Math.round(y)}px`),t.style.setProperty(`--v-offset-top`,`${Math.round(b)}px`),t.style.transform=`translateX(${C}) translateY(${w}) ${T}`,t.style.setProperty(`--v-transform-origin`,S),t.style.transformOrigin=S};M(r,e=>{e?(o(),d()):s()});let d=()=>{De().then(u).catch(e=>console.error(e))};[`placement`,`x`,`y`,`internalShift`,`flip`,`width`,`overlap`,`minWidth`].forEach(n=>{M(t(e,n),u)}),[`teleportDisabled`].forEach(n=>{M(t(e,n),d)}),M(t(e,`syncTrigger`),e=>{e.includes(`resize`)?n.addResizeListener(u):n.removeResizeListener(u),e.includes(`scroll`)?n.addScrollListener(u):n.removeScrollListener(u)});let f=h();return{VBinder:n,mergedEnabled:r,offsetContainerRef:a,followerRef:i,mergedTo:A(()=>{let{to:t}=e;if(t!==void 0)return t;f.value}),syncPosition:u}},render(){return O(se,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e;let t=O(`div`,{class:[`v-binder-follower-container`,this.containerClass],ref:`offsetContainerRef`},[O(`div`,{class:`v-binder-follower-content`,ref:`followerRef`},(e=this.$slots).default?.call(e))]);return this.zindexable?C(t,[[Ve,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):t}})}}),wt=/^(\d|\.)+$/,Tt=/(\d|\.)+/;function Et(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e==`number`){let r=(e+n)*t;return r===0?`0`:`${r}px`}else if(typeof e==`string`)if(wt.test(e)){let i=(Number(e)+n)*t;return r?i===0?`0`:`${i}px`:`${i}`}else{let r=Tt.exec(e);return r?e.replace(Tt,String((Number(r[0])+n)*t)):e}return e}var Dt;function Ot(){return Dt===void 0&&(Dt=navigator.userAgent.includes(`Node.js`)||navigator.userAgent.includes(`jsdom`)),Dt}var kt={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 At(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function J(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 Y(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)?Mt(s,e=>e.test(o)):jt(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 jt(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Mt(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Nt(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 Pt={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`}},Ft=(e,t,n)=>{let r,i=Pt[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},It={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Lt=(e,t,n,r)=>It[e],Rt={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:J({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:J({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:J({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:J({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:J({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`})},zt={ordinalNumber:Nt({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Y({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:Y({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:Y({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:Y({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:Y({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`})},Bt={name:`en-US`,locale:{code:`en-US`,formatDistance:Ft,formatLong:{date:At({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:At({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:At({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:Lt,localize:Rt,match:zt,options:{weekStartsOn:0,firstWeekContainsDate:1}}},Vt=ue(e,`WeakMap`),Ht=ee(Object.keys,Object),Ut=Object.prototype.hasOwnProperty;function Wt(e){if(!oe(e))return Ht(e);var t=[];for(var n in Object(e))Ut.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Gt(e){return We(e)?ne(e):Wt(e)}var Kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qt=/^\w*$/;function Jt(e,t){if(z(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||he(e)?!0:qt.test(e)||!Kt.test(e)||t!=null&&e in Object(t)}var Yt=`Expected a function`;function Xt(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Yt);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Xt.Cache||Ee),n}Xt.Cache=Ee;var Zt=500;function Qt(e){var t=Xt(e,function(e){return n.size===Zt&&n.clear(),e}),n=t.cache;return t}var $t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,en=/\\(\\)?/g,tn=Qt(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace($t,function(e,n,r,i){t.push(r?i.replace(en,`$1`):n||e)}),t});function nn(e,t){return z(e)?e:Jt(e,t)?[e]:tn(r(e))}var rn=1/0;function an(e){if(typeof e==`string`||he(e))return e;var t=e+``;return t==`0`&&1/e==-rn?`-0`:t}function on(e,t){t=nn(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[an(t[n++])];return n&&n==r?e:void 0}function sn(e,t,n){var r=e==null?void 0:on(e,t);return r===void 0?n:r}function cn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function ln(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function un(){return[]}var dn=Object.prototype.propertyIsEnumerable,fn=Object.getOwnPropertySymbols,pn=fn?function(e){return e==null?[]:(e=Object(e),ln(fn(e),function(t){return dn.call(e,t)}))}:un;function mn(e,t,n){var r=t(e);return z(e)?r:cn(r,n(e))}function hn(e){return mn(e,Gt,pn)}var gn=ue(e,`DataView`),_n=ue(e,`Promise`),vn=ue(e,`Set`),yn=`[object Map]`,bn=`[object Object]`,xn=`[object Promise]`,Sn=`[object Set]`,Cn=`[object WeakMap]`,wn=`[object DataView]`,Tn=N(gn),En=N(E),Dn=N(_n),On=N(vn),kn=N(Vt),X=ge;(gn&&X(new gn(new ArrayBuffer(1)))!=wn||E&&X(new E)!=yn||_n&&X(_n.resolve())!=xn||vn&&X(new vn)!=Sn||Vt&&X(new Vt)!=Cn)&&(X=function(e){var t=ge(e),n=t==bn?e.constructor:void 0,r=n?N(n):``;if(r)switch(r){case Tn:return wn;case En:return yn;case Dn:return xn;case On:return Sn;case kn:return Cn}return t});var An=X,jn=`__lodash_hash_undefined__`;function Mn(e){return this.__data__.set(e,jn),this}function Nn(e){return this.__data__.has(e)}function Pn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ee;++t<n;)this.add(e[t])}Pn.prototype.add=Pn.prototype.push=Mn,Pn.prototype.has=Nn;function Fn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function In(e,t){return e.has(t)}var Ln=1,Rn=2;function zn(e,t,n,r,i,a){var o=n&Ln,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Rn?new Pn:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Fn(t,function(e,t){if(!In(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function Bn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Vn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Hn=1,Un=2,Wn=`[object Boolean]`,Gn=`[object Date]`,Kn=`[object Error]`,qn=`[object Map]`,Jn=`[object Number]`,Yn=`[object RegExp]`,Xn=`[object Set]`,Zn=`[object String]`,Qn=`[object Symbol]`,$n=`[object ArrayBuffer]`,er=`[object DataView]`,tr=ie?ie.prototype:void 0,nr=tr?tr.valueOf:void 0;function rr(e,t,n,r,i,a,o){switch(n){case er:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $n:return!(e.byteLength!=t.byteLength||!a(new D(e),new D(t)));case Wn:case Gn:case Jn:return fe(+e,+t);case Kn:return e.name==t.name&&e.message==t.message;case Yn:case Zn:return e==t+``;case qn:var s=Bn;case Xn:var c=r&Hn;if(s||=Vn,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Un,o.set(e,t);var u=zn(s(e),s(t),r,i,a,o);return o.delete(e),u;case Qn:if(nr)return nr.call(e)==nr.call(t)}return!1}var ir=1,ar=Object.prototype.hasOwnProperty;function or(e,t,n,r,i,a){var o=n&ir,s=hn(e),c=s.length;if(c!=hn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:ar.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var sr=1,cr=`[object Arguments]`,lr=`[object Array]`,ur=`[object Object]`,dr=Object.prototype.hasOwnProperty;function fr(e,t,n,r,i,a){var o=z(e),s=z(t),c=o?lr:An(e),l=s?lr:An(t);c=c==cr?ur:c,l=l==cr?ur:l;var u=c==ur,d=l==ur,f=c==l;if(f&&v(e)){if(!v(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Oe,o||m(e)?zn(e,t,n,r,i,a):rr(e,t,c,n,r,i,a);if(!(n&sr)){var p=u&&dr.call(e,`__wrapped__`),h=d&&dr.call(t,`__wrapped__`);if(p||h){var g=p?e.value():e,_=h?t.value():t;return a||=new Oe,i(g,_,n,r,a)}}return f?(a||=new Oe,or(e,t,n,r,i,a)):!1}function pr(e,t,n,r,i){return e===t?!0:e==null||t==null||!me(e)&&!me(t)?e!==e&&t!==t:fr(e,t,n,r,pr,i)}var mr=1,hr=2;function gr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new Oe;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?pr(u,l,mr|hr,r,d):f))return!1}}return!0}function _r(e){return e===e&&!S(e)}function vr(e){for(var t=Gt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,_r(i)]}return t}function yr(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function br(e){var t=vr(e);return t.length==1&&t[0][2]?yr(t[0][0],t[0][1]):function(n){return n===e||gr(n,e,t)}}function xr(e,t){return e!=null&&t in Object(e)}function Sr(e,t,n){t=nn(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var s=an(t[r]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&o(i)&&_(s,i)&&(z(e)||w(e)))}function Cr(e,t){return e!=null&&Sr(e,t,xr)}var wr=1,Tr=2;function Er(e,t){return Jt(e)&&_r(t)?yr(an(e),t):function(n){var r=sn(n,e);return r===void 0&&r===t?Cr(n,e):pr(t,r,wr|Tr)}}function Dr(e){return function(t){return t?.[e]}}function Or(e){return function(t){return on(t,e)}}function kr(e){return Jt(e)?Dr(an(e)):Or(e)}function Ar(e){return typeof e==`function`?e:e==null?g:typeof e==`object`?z(e)?Er(e[0],e[1]):br(e):kr(e)}function jr(e,t){return e&&l(e,t,Gt)}function Mr(e,t){return function(n,r){if(n==null)return n;if(!We(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Nr=Mr(jr);function Pr(e,t){var n=-1,r=We(e)?Array(e.length):[];return Nr(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function Fr(e,t){return(z(e)?b:Pr)(e,Ar(t,3))}function Ir(e){let{mergedLocaleRef:t,mergedDateLocaleRef:n}=R(Te,null)||{},r=B(()=>t?.value?.[e]??kt[e]);return{dateLocaleRef:B(()=>n?.value??Bt),localeRef:r}}var Lr={space:`6px`,spaceArrow:`10px`,arrowOffset:`10px`,arrowOffsetVertical:`10px`,arrowHeight:`6px`,padding:`8px 14px`};function Rr(e){let{boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:i,fontSize:a,dividerColor:o}=e;return Object.assign(Object.assign({},Lr),{fontSize:a,borderRadius:i,color:n,dividerColor:o,textColor:r,boxShadow:t})}var zr=He({name:`Popover`,common:ye,peers:{Scrollbar:ze},self:Rr}),Br={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Z=`var(--n-arrow-height) * 1.414`,Vr=F([I(`popover`,`
2
+ transition:
3
+ box-shadow .3s var(--n-bezier),
4
+ background-color .3s var(--n-bezier),
5
+ color .3s var(--n-bezier);
6
+ position: relative;
7
+ font-size: var(--n-font-size);
8
+ color: var(--n-text-color);
9
+ box-shadow: var(--n-box-shadow);
10
+ word-break: break-word;
11
+ `,[F(`>`,[I(`scrollbar`,`
12
+ height: inherit;
13
+ max-height: inherit;
14
+ `)]),Re(`raw`,`
15
+ background-color: var(--n-color);
16
+ border-radius: var(--n-border-radius);
17
+ `,[Re(`scrollable`,[Re(`show-header-or-footer`,`padding: var(--n-padding);`)])]),n(`header`,`
18
+ padding: var(--n-padding);
19
+ border-bottom: 1px solid var(--n-divider-color);
20
+ transition: border-color .3s var(--n-bezier);
21
+ `),n(`footer`,`
22
+ padding: var(--n-padding);
23
+ border-top: 1px solid var(--n-divider-color);
24
+ transition: border-color .3s var(--n-bezier);
25
+ `),L(`scrollable, show-header-or-footer`,[n(`content`,`
26
+ padding: var(--n-padding);
27
+ `)])]),I(`popover-shared`,`
28
+ transform-origin: inherit;
29
+ `,[I(`popover-arrow-wrapper`,`
30
+ position: absolute;
31
+ overflow: hidden;
32
+ pointer-events: none;
33
+ `,[I(`popover-arrow`,`
34
+ transition: background-color .3s var(--n-bezier);
35
+ position: absolute;
36
+ display: block;
37
+ width: calc(${Z});
38
+ height: calc(${Z});
39
+ box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
40
+ transform: rotate(45deg);
41
+ background-color: var(--n-color);
42
+ pointer-events: all;
43
+ `)]),F(`&.popover-transition-enter-from, &.popover-transition-leave-to`,`
44
+ opacity: 0;
45
+ transform: scale(.85);
46
+ `),F(`&.popover-transition-enter-to, &.popover-transition-leave-from`,`
47
+ transform: scale(1);
48
+ opacity: 1;
49
+ `),F(`&.popover-transition-enter-active`,`
50
+ transition:
51
+ box-shadow .3s var(--n-bezier),
52
+ background-color .3s var(--n-bezier),
53
+ color .3s var(--n-bezier),
54
+ opacity .15s var(--n-bezier-ease-out),
55
+ transform .15s var(--n-bezier-ease-out);
56
+ `),F(`&.popover-transition-leave-active`,`
57
+ transition:
58
+ box-shadow .3s var(--n-bezier),
59
+ background-color .3s var(--n-bezier),
60
+ color .3s var(--n-bezier),
61
+ opacity .15s var(--n-bezier-ease-in),
62
+ transform .15s var(--n-bezier-ease-in);
63
+ `)]),$(`top-start`,`
64
+ top: calc(${Z} / -2);
65
+ left: calc(${Q(`top-start`)} - var(--v-offset-left));
66
+ `),$(`top`,`
67
+ top: calc(${Z} / -2);
68
+ transform: translateX(calc(${Z} / -2)) rotate(45deg);
69
+ left: 50%;
70
+ `),$(`top-end`,`
71
+ top: calc(${Z} / -2);
72
+ right: calc(${Q(`top-end`)} + var(--v-offset-left));
73
+ `),$(`bottom-start`,`
74
+ bottom: calc(${Z} / -2);
75
+ left: calc(${Q(`bottom-start`)} - var(--v-offset-left));
76
+ `),$(`bottom`,`
77
+ bottom: calc(${Z} / -2);
78
+ transform: translateX(calc(${Z} / -2)) rotate(45deg);
79
+ left: 50%;
80
+ `),$(`bottom-end`,`
81
+ bottom: calc(${Z} / -2);
82
+ right: calc(${Q(`bottom-end`)} + var(--v-offset-left));
83
+ `),$(`left-start`,`
84
+ left: calc(${Z} / -2);
85
+ top: calc(${Q(`left-start`)} - var(--v-offset-top));
86
+ `),$(`left`,`
87
+ left: calc(${Z} / -2);
88
+ transform: translateY(calc(${Z} / -2)) rotate(45deg);
89
+ top: 50%;
90
+ `),$(`left-end`,`
91
+ left: calc(${Z} / -2);
92
+ bottom: calc(${Q(`left-end`)} + var(--v-offset-top));
93
+ `),$(`right-start`,`
94
+ right: calc(${Z} / -2);
95
+ top: calc(${Q(`right-start`)} - var(--v-offset-top));
96
+ `),$(`right`,`
97
+ right: calc(${Z} / -2);
98
+ transform: translateY(calc(${Z} / -2)) rotate(45deg);
99
+ top: 50%;
100
+ `),$(`right-end`,`
101
+ right: calc(${Z} / -2);
102
+ bottom: calc(${Q(`right-end`)} + var(--v-offset-top));
103
+ `),...Fr({top:[`right-start`,`left-start`],right:[`top-end`,`bottom-end`],bottom:[`right-end`,`left-end`],left:[`top-start`,`bottom-start`]},(e,t)=>{let n=[`right`,`left`].includes(t),r=n?`width`:`height`;return e.map(e=>{let i=e.split(`-`)[1]===`end`,a=`calc((${`var(--v-target-${r}, 0px)`} - ${Z}) / 2)`,o=Q(e);return F(`[v-placement="${e}"] >`,[I(`popover-shared`,[L(`center-arrow`,[I(`popover-arrow`,`${t}: calc(max(${a}, ${o}) ${i?`+`:`-`} var(--v-offset-${n?`left`:`top`}));`)])])])})})]);function Q(e){return[`top`,`bottom`].includes(e.split(`-`)[0])?`var(--n-arrow-offset)`:`var(--n-arrow-offset-vertical)`}function $(e,t){let n=e.split(`-`)[0],r=[`top`,`bottom`].includes(n)?`height: var(--n-space-arrow);`:`width: var(--n-space-arrow);`;return F(`[v-placement="${e}"] >`,[I(`popover-shared`,`
104
+ margin-${Br[n]}: var(--n-space);
105
+ `,[L(`show-arrow`,`
106
+ margin-${Br[n]}: var(--n-space-arrow);
107
+ `),L(`overlap`,`
108
+ margin: 0;
109
+ `),ae(`popover-arrow-wrapper`,`
110
+ right: 0;
111
+ left: 0;
112
+ top: 0;
113
+ bottom: 0;
114
+ ${n}: 100%;
115
+ ${Br[n]}: auto;
116
+ ${r}
117
+ `,[I(`popover-arrow`,t)])])])}var Hr=Object.assign(Object.assign({},j.props),{to:W.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function Ur({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return O(`div`,{key:`__popover-arrow__`,style:r,class:[`${i}-popover-arrow-wrapper`,n]},O(`div`,{class:[`${i}-popover-arrow`,e],style:t}))}var Wr=f({name:`PopoverBody`,inheritAttrs:!1,props:Hr,setup(e,{slots:n,attrs:r}){let{namespaceRef:o,mergedClsPrefixRef:s,inlineThemeDisabled:c,mergedRtlRef:l}=Ie(e),u=j(`Popover`,`-popover`,Vr,zr,e,s),d=ce(`Popover`,l,s),f=P(null),p=R(`NPopover`),m=P(null),h=P(e.show),g=P(!1);pe(()=>{let{show:t}=e;t&&!Ot()&&!e.internalDeactivateImmediately&&(g.value=!0)});let _=B(()=>{let{trigger:t,onClickoutside:n}=e,r=[],{positionManuallyRef:{value:i}}=p;return i||(t===`click`&&!n&&r.push([le,ee,void 0,{capture:!0}]),t===`hover`&&r.push([lt,E])),n&&r.push([le,ee,void 0,{capture:!0}]),(e.displayDirective===`show`||e.animated&&g.value)&&r.push([be,e.show]),r}),v=B(()=>{let{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:n},self:{space:r,spaceArrow:i,padding:a,fontSize:o,textColor:s,dividerColor:c,color:l,boxShadow:d,borderRadius:f,arrowHeight:p,arrowOffset:m,arrowOffsetVertical:h}}=u.value;return{"--n-box-shadow":d,"--n-bezier":e,"--n-bezier-ease-in":t,"--n-bezier-ease-out":n,"--n-font-size":o,"--n-text-color":s,"--n-color":l,"--n-divider-color":c,"--n-border-radius":f,"--n-arrow-height":p,"--n-arrow-offset":m,"--n-arrow-offset-vertical":h,"--n-padding":a,"--n-space":r,"--n-space-arrow":i}}),y=B(()=>{let t=e.width===`trigger`?void 0:Et(e.width),n=[];t&&n.push({width:t});let{maxWidth:r,minWidth:i}=e;return r&&n.push({maxWidth:Et(r)}),i&&n.push({maxWidth:Et(i)}),c||n.push(v.value),n}),b=c?Pe(`popover`,void 0,v,e):void 0;p.setBodyInstance({syncPosition:S}),k(()=>{p.setBodyInstance(null)}),M(t(e,`show`),t=>{e.animated||(t?h.value=!0:h.value=!1)});function S(){var e;(e=f.value)==null||e.syncPosition()}function w(t){e.trigger===`hover`&&e.keepAliveOnHover&&e.show&&p.handleMouseEnter(t)}function T(t){e.trigger===`hover`&&e.keepAliveOnHover&&p.handleMouseLeave(t)}function E(t){e.trigger===`hover`&&!D().contains(x(t))&&p.handleMouseMoveOutside(t)}function ee(t){(e.trigger===`click`&&!D().contains(x(t))||e.onClickoutside)&&p.handleClickOutside(t)}function D(){return p.getTriggerElement()}V(ke,m),V(te,null),V(a,null);function ne(){if(b?.onRender(),!(e.displayDirective===`show`||e.show||e.animated&&g.value))return null;let t,a=p.internalRenderBodyRef.value,{value:o}=s;if(a)t=a([`${o}-popover-shared`,d?.value&&`${o}-popover--rtl`,b?.themeClass.value,e.overlap&&`${o}-popover-shared--overlap`,e.showArrow&&`${o}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${o}-popover-shared--center-arrow`],m,y.value,w,T);else{let{value:a}=p.extraClassRef,{internalTrapFocus:s}=e,c=!Le(n.header)||!Le(n.footer),l=()=>{let t=c?O(Me,null,Be(n.header,t=>t?O(`div`,{class:[`${o}-popover__header`,e.headerClass],style:e.headerStyle},t):null),Be(n.default,t=>t?O(`div`,{class:[`${o}-popover__content`,e.contentClass],style:e.contentStyle},n):null),Be(n.footer,t=>t?O(`div`,{class:[`${o}-popover__footer`,e.footerClass],style:e.footerStyle},t):null)):e.scrollable?n.default?.call(n):O(`div`,{class:[`${o}-popover__content`,e.contentClass],style:e.contentStyle},n);return[e.scrollable?O(Ae,{themeOverrides:u.value.peerOverrides.Scrollbar,theme:u.value.peers.Scrollbar,contentClass:c?void 0:`${o}-popover__content ${e.contentClass??``}`,contentStyle:c?void 0:e.contentStyle},{default:()=>t}):t,e.showArrow?Ur({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:o}):null]};t=O(`div`,i({class:[`${o}-popover`,`${o}-popover-shared`,d?.value&&`${o}-popover--rtl`,b?.themeClass.value,a.map(e=>`${o}-${e}`),{[`${o}-popover--scrollable`]:e.scrollable,[`${o}-popover--show-header-or-footer`]:c,[`${o}-popover--raw`]:e.raw,[`${o}-popover-shared--overlap`]:e.overlap,[`${o}-popover-shared--show-arrow`]:e.showArrow,[`${o}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:m,style:y.value,onKeydown:p.handleKeydown,onMouseenter:w,onMouseleave:T},r),s?O(Ue,{active:e.show,autoFocus:!0},{default:l}):l())}return C(t,_.value)}return{displayed:g,namespace:o,isMounted:p.isMountedRef,zIndex:p.zIndexRef,followerRef:f,adjustedTo:W(e),followerEnabled:h,renderContentNode:ne}},render(){return O(Ct,{ref:`followerRef`,zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width===`trigger`?`target`:void 0,teleportDisabled:this.adjustedTo===W.tdkey},{default:()=>this.animated?O(je,{name:`popover-transition`,appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)==null||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),Gr=Object.keys(Hr),Kr={focus:[`onFocus`,`onBlur`],click:[`onClick`],hover:[`onMouseenter`,`onMouseleave`],manual:[],nested:[`onFocus`,`onBlur`,`onMouseenter`,`onMouseleave`,`onClick`]};function qr(e,t,n){Kr[t].forEach(t=>{e.props?e.props=Object.assign({},e.props):e.props={};let r=e.props[t],i=n[t];r?e.props[t]=(...e)=>{r(...e),i(...e)}:e.props[t]=i})}var Jr={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:`hover`},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:`top`},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:`if`},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:W.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},Yr=f({name:`Popover`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},j.props),Jr),{internalOnAfterLeave:Function,internalRenderBody:Function}),slots:Object,__popover__:!0,setup(e){let n=h(),r=P(null),i=B(()=>e.show),a=P(e.defaultShow),o=Ze(i,a),s=A(()=>e.disabled?!1:o.value),c=()=>{if(e.disabled)return!0;let{getDisabled:t}=e;return!!t?.()},l=()=>c()?!1:o.value,u=Qe(e,[`arrow`,`showArrow`]),d=B(()=>e.overlap?!1:u.value),f=null,p=P(null),m=P(null),g=A(()=>e.x!==void 0&&e.y!==void 0);function _(t){let{"onUpdate:show":n,onUpdateShow:r,onShow:i,onHide:o}=e;a.value=t,n&&we(n,t),r&&we(r,t),t&&i&&we(i,!0),t&&o&&we(o,!1)}function v(){f&&f.syncPosition()}function y(){let{value:e}=p;e&&(window.clearTimeout(e),p.value=null)}function b(){let{value:e}=m;e&&(window.clearTimeout(e),m.value=null)}function x(){let t=c();if(e.trigger===`focus`&&!t){if(l())return;_(!0)}}function S(){let t=c();if(e.trigger===`focus`&&!t){if(!l())return;_(!1)}}function C(){let t=c();if(e.trigger===`hover`&&!t){if(b(),p.value!==null||l())return;let t=()=>{_(!0),p.value=null},{delay:n}=e;n===0?t():p.value=window.setTimeout(t,n)}}function w(){let t=c();if(e.trigger===`hover`&&!t){if(y(),m.value!==null||!l())return;let t=()=>{_(!1),m.value=null},{duration:n}=e;n===0?t():m.value=window.setTimeout(t,n)}}function T(){w()}function E(t){var n;l()&&(e.trigger===`click`&&(y(),b(),_(!1)),(n=e.onClickoutside)==null||n.call(e,t))}function ee(){e.trigger===`click`&&!c()&&(y(),b(),_(!l()))}function te(t){e.internalTrapFocus&&t.key===`Escape`&&(y(),b(),_(!1))}function D(e){a.value=e}function O(){return r.value?.targetRef}function ne(e){f=e}return V(`NPopover`,{getTriggerElement:O,handleKeydown:te,handleMouseEnter:C,handleMouseLeave:w,handleClickOutside:E,handleMouseMoveOutside:T,setBodyInstance:ne,positionManuallyRef:g,isMountedRef:n,zIndexRef:t(e,`zIndex`),extraClassRef:t(e,`internalExtraClass`),internalRenderBodyRef:t(e,`internalRenderBody`)}),pe(()=>{o.value&&c()&&_(!1)}),{binderInstRef:r,positionManually:g,mergedShowConsideringDisabledProp:s,uncontrolledShow:a,mergedShowArrow:d,getMergedShow:l,setShow:D,handleClick:ee,handleMouseEnter:C,handleMouseLeave:w,handleFocus:x,handleBlur:S,syncPosition:v}},render(){let{positionManually:e,$slots:t}=this,n,r=!1;if(!e&&(n=Fe(t,`trigger`),n)){n=_e(n),n=n.type===Se?O(`span`,[n]):n;let t={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(n.type?.__popover__)r=!0,n.props||={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]},n.props.internalSyncTargetWithParent=!0,n.props.internalInheritedEventHandlers?n.props.internalInheritedEventHandlers=[t,...n.props.internalInheritedEventHandlers]:n.props.internalInheritedEventHandlers=[t];else{let{internalInheritedEventHandlers:r}=this,i=[t,...r];qr(n,r?`nested`:e?`manual`:this.trigger,{onBlur:e=>{i.forEach(t=>{t.onBlur(e)})},onFocus:e=>{i.forEach(t=>{t.onFocus(e)})},onClick:e=>{i.forEach(t=>{t.onClick(e)})},onMouseenter:e=>{i.forEach(t=>{t.onMouseenter(e)})},onMouseleave:e=>{i.forEach(t=>{t.onMouseleave(e)})}})}}return O(st,{ref:`binderInstRef`,syncTarget:!r,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;let t=this.getMergedShow();return[this.internalTrapFocus&&t?C(O(`div`,{style:{position:`fixed`,top:0,right:0,bottom:0,left:0}}),[[Ve,{enabled:t,zIndex:this.zIndex}]]):null,e?null:O(ct,null,{default:()=>n}),O(Wr,xe(this.$props,Gr,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:t})),{default:()=>{var e;return(e=this.$slots).default?.call(e)},header:()=>{var e;return(e=this.$slots).header?.call(e)},footer:()=>{var e;return(e=this.$slots).footer?.call(e)}})]}})}}),Xr={padding:`8px 14px`};function Zr(e){let{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},Xr),{borderRadius:t,boxShadow:n,color:de(r,`rgba(0, 0, 0, .85)`),textColor:r})}var Qr=He({name:`Tooltip`,common:ye,peers:{Popover:zr},self:Zr}),$r=f({name:`Tooltip`,props:Object.assign(Object.assign({},Jr),j.props),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=Ie(e),n=j(`Tooltip`,`-tooltip`,void 0,Qr,e,t),r=P(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(e){r.value.setShow(e)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:B(()=>n.value.self)})},render(){let{mergedTheme:e,internalExtraClass:t}=this;return O(Yr,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat(`tooltip`),ref:`popoverRef`}),this.$slots)}});function ei(){let e=R(Ne,null);return e===null&&Ce(`use-message`,"No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}export{Qe as _,zr as a,Et as c,ut as d,ct as f,$e as g,et as h,Jr as i,Ct as l,W as m,$r as n,Ir as o,st as p,Yr as r,sn as s,ei as t,q as u,Ze as v,Je as y};
Binary file
@@ -0,0 +1,21 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+ <title>Hermes</title>
9
+ <script type="module" crossorigin src="/assets/index-4iFlrAYJ.js"></script>
10
+ <link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-D5N3Hfca.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/Modal-CQVLL_Oc.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/client-BxIiwrqC.js">
13
+ <link rel="modulepreload" crossorigin href="/assets/chat-640V6r6N.js">
14
+ <link rel="stylesheet" crossorigin href="/assets/index-CMJKLUKk.css">
15
+ </head>
16
+
17
+ <body>
18
+ <div id="app"></div>
19
+ </body>
20
+
21
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermes-web-ui",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "hermes-web-ui": "./bin/hermes-web-ui.mjs"
@@ -13,15 +13,7 @@
13
13
  },
14
14
  "files": [
15
15
  "bin/",
16
- "index.html",
17
- "public/",
18
- "assets/",
19
- "src/",
20
- "vite.config.ts",
21
- "tsconfig.json",
22
- "tsconfig.app.json",
23
- "tsconfig.node.json",
24
- "package.json"
16
+ "dist/"
25
17
  ],
26
18
  "dependencies": {
27
19
  "highlight.js": "^11.11.1",
@@ -41,4 +33,4 @@
41
33
  "vite": "^8.0.4",
42
34
  "vue-tsc": "^3.2.6"
43
35
  }
44
- }
36
+ }
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!doctype html>
2
- <html lang="zh-CN">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Hermes</title>
8
- </head>
9
- <body>
10
- <div id="app"></div>
11
- <script type="module" src="/src/main.ts"></script>
12
- </body>
13
- </html>
package/src/App.vue DELETED
@@ -1,54 +0,0 @@
1
- <script setup lang="ts">
2
- import { onMounted, onUnmounted } from 'vue'
3
- import { NConfigProvider, NMessageProvider, NDialogProvider, NNotificationProvider } from 'naive-ui'
4
- import { themeOverrides } from '@/styles/theme'
5
- import AppSidebar from '@/components/layout/AppSidebar.vue'
6
- import { useKeyboard } from '@/composables/useKeyboard'
7
- import { useAppStore } from '@/stores/app'
8
-
9
- const appStore = useAppStore()
10
-
11
- onMounted(() => {
12
- appStore.startHealthPolling()
13
- })
14
-
15
- onUnmounted(() => {
16
- appStore.stopHealthPolling()
17
- })
18
-
19
- useKeyboard()
20
- </script>
21
-
22
- <template>
23
- <NConfigProvider :theme-overrides="themeOverrides">
24
- <NMessageProvider>
25
- <NDialogProvider>
26
- <NNotificationProvider>
27
- <div class="app-layout">
28
- <AppSidebar />
29
- <main class="app-main">
30
- <router-view />
31
- </main>
32
- </div>
33
- </NNotificationProvider>
34
- </NDialogProvider>
35
- </NMessageProvider>
36
- </NConfigProvider>
37
- </template>
38
-
39
- <style scoped lang="scss">
40
- @use '@/styles/variables' as *;
41
-
42
- .app-layout {
43
- display: flex;
44
- height: 100vh;
45
- width: 100vw;
46
- overflow: hidden;
47
- }
48
-
49
- .app-main {
50
- flex: 1;
51
- overflow: hidden;
52
- background-color: $bg-primary;
53
- }
54
- </style>
package/src/api/chat.ts DELETED
@@ -1,87 +0,0 @@
1
- import { request, getBaseUrlValue } from './client'
2
-
3
- export interface ChatMessage {
4
- role: 'user' | 'assistant' | 'system'
5
- content: string
6
- }
7
-
8
- export interface StartRunRequest {
9
- input: string | ChatMessage[]
10
- instructions?: string
11
- conversation_history?: ChatMessage[]
12
- session_id?: string
13
- }
14
-
15
- export interface StartRunResponse {
16
- run_id: string
17
- status: string
18
- }
19
-
20
- // SSE event types from /v1/runs/{id}/events
21
- export interface RunEvent {
22
- event: string
23
- run_id?: string
24
- delta?: string
25
- tool?: string
26
- name?: string
27
- preview?: string
28
- timestamp?: number
29
- error?: string
30
- }
31
-
32
- export async function startRun(body: StartRunRequest): Promise<StartRunResponse> {
33
- return request<StartRunResponse>('/v1/runs', {
34
- method: 'POST',
35
- body: JSON.stringify(body),
36
- })
37
- }
38
-
39
- export function streamRunEvents(
40
- runId: string,
41
- onEvent: (event: RunEvent) => void,
42
- onDone: () => void,
43
- onError: (err: Error) => void,
44
- ) {
45
- const baseUrl = getBaseUrlValue()
46
- const url = `${baseUrl}/v1/runs/${runId}/events`
47
-
48
- let closed = false
49
- const source = new EventSource(url)
50
-
51
- source.onmessage = (e) => {
52
- if (closed) return
53
- try {
54
- const parsed = JSON.parse(e.data)
55
- onEvent(parsed)
56
-
57
- if (parsed.event === 'run.completed' || parsed.event === 'run.failed') {
58
- closed = true
59
- source.close()
60
- onDone()
61
- }
62
- } catch {
63
- onEvent({ event: 'message', delta: e.data })
64
- }
65
- }
66
-
67
- source.onerror = () => {
68
- if (closed) return
69
- closed = true
70
- source.close()
71
- onError(new Error('SSE connection error'))
72
- }
73
-
74
- // Return AbortController-compatible object
75
- return {
76
- abort: () => {
77
- if (!closed) {
78
- closed = true
79
- source.close()
80
- }
81
- },
82
- } as unknown as AbortController
83
- }
84
-
85
- export async function fetchModels(): Promise<{ data: Array<{ id: string }> }> {
86
- return request('/v1/models')
87
- }
package/src/api/client.ts DELETED
@@ -1,44 +0,0 @@
1
- const DEFAULT_BASE_URL = ''
2
-
3
- function getBaseUrl(): string {
4
- return localStorage.getItem('hermes_server_url') || DEFAULT_BASE_URL
5
- }
6
-
7
- function getApiKey(): string {
8
- return localStorage.getItem('hermes_api_key') || ''
9
- }
10
-
11
- export function setServerUrl(url: string) {
12
- localStorage.setItem('hermes_server_url', url)
13
- }
14
-
15
- export function setApiKey(key: string) {
16
- localStorage.setItem('hermes_api_key', key)
17
- }
18
-
19
- export async function request<T>(path: string, options: RequestInit = {}): Promise<T> {
20
- const base = getBaseUrl()
21
- const url = `${base}${path}`
22
- const headers: Record<string, string> = {
23
- 'Content-Type': 'application/json',
24
- ...options.headers as Record<string, string>,
25
- }
26
-
27
- const apiKey = getApiKey()
28
- if (apiKey) {
29
- headers['Authorization'] = `Bearer ${apiKey}`
30
- }
31
-
32
- const res = await fetch(url, { ...options, headers })
33
-
34
- if (!res.ok) {
35
- const text = await res.text().catch(() => '')
36
- throw new Error(`API Error ${res.status}: ${text || res.statusText}`)
37
- }
38
-
39
- return res.json()
40
- }
41
-
42
- export function getBaseUrlValue(): string {
43
- return getBaseUrl()
44
- }
package/src/api/jobs.ts DELETED
@@ -1,100 +0,0 @@
1
- import { request } from './client'
2
-
3
- export interface Job {
4
- job_id: string
5
- id: string
6
- name: string
7
- prompt: string
8
- prompt_preview?: string
9
- skills: string[]
10
- skill: string | null
11
- model: string | null
12
- provider: string | null
13
- base_url: string | null
14
- script: string | null
15
- schedule: string | { kind: string; expr: string; display: string }
16
- schedule_display: string
17
- repeat: string | { times: number | null; completed: number }
18
- enabled: boolean
19
- state: string
20
- paused_at: string | null
21
- paused_reason: string | null
22
- created_at: string
23
- next_run_at: string | null
24
- last_run_at: string | null
25
- last_status: string | null
26
- last_error: string | null
27
- deliver: string
28
- origin: {
29
- platform: string
30
- chat_id: string
31
- chat_name: string
32
- thread_id: string | null
33
- } | null
34
- last_delivery_error: string | null
35
- }
36
-
37
- export interface CreateJobRequest {
38
- name: string
39
- schedule: string
40
- prompt?: string
41
- deliver?: string
42
- skills?: string[]
43
- repeat?: number
44
- }
45
-
46
- export interface UpdateJobRequest {
47
- name?: string
48
- schedule?: string
49
- prompt?: string
50
- deliver?: string
51
- skills?: string[]
52
- skill?: string
53
- repeat?: number
54
- enabled?: boolean
55
- }
56
-
57
- function unwrap(res: { job: Job }): Job {
58
- return res.job
59
- }
60
-
61
- export async function listJobs(): Promise<Job[]> {
62
- const res = await request<{ jobs: Job[] }>('/api/jobs?include_disabled=true')
63
- return res.jobs
64
- }
65
-
66
- export async function getJob(jobId: string): Promise<Job> {
67
- return unwrap(await request<{ job: Job }>(`/api/jobs/${jobId}`))
68
- }
69
-
70
- export async function createJob(data: CreateJobRequest): Promise<Job> {
71
- return unwrap(await request<{ job: Job }>('/api/jobs', {
72
- method: 'POST',
73
- body: JSON.stringify(data),
74
- }))
75
- }
76
-
77
- export async function updateJob(jobId: string, data: UpdateJobRequest): Promise<Job> {
78
- return unwrap(await request<{ job: Job }>(`/api/jobs/${jobId}`, {
79
- method: 'PATCH',
80
- body: JSON.stringify(data),
81
- }))
82
- }
83
-
84
- export async function deleteJob(jobId: string): Promise<{ ok: boolean }> {
85
- return request<{ ok: boolean }>(`/api/jobs/${jobId}`, {
86
- method: 'DELETE',
87
- })
88
- }
89
-
90
- export async function pauseJob(jobId: string): Promise<Job> {
91
- return unwrap(await request<{ job: Job }>(`/api/jobs/${jobId}/pause`, { method: 'POST' }))
92
- }
93
-
94
- export async function resumeJob(jobId: string): Promise<Job> {
95
- return unwrap(await request<{ job: Job }>(`/api/jobs/${jobId}/resume`, { method: 'POST' }))
96
- }
97
-
98
- export async function runJob(jobId: string): Promise<Job> {
99
- return unwrap(await request<{ job: Job }>(`/api/jobs/${jobId}/run`, { method: 'POST' }))
100
- }
package/src/api/system.ts DELETED
@@ -1,25 +0,0 @@
1
- import { request } from './client'
2
-
3
- export interface HealthResponse {
4
- status: string
5
- version?: string
6
- }
7
-
8
- export interface Model {
9
- id: string
10
- object: string
11
- owned_by: string
12
- }
13
-
14
- export interface ModelsResponse {
15
- object: string
16
- data: Model[]
17
- }
18
-
19
- export async function checkHealth(): Promise<HealthResponse> {
20
- return request<HealthResponse>('/health')
21
- }
22
-
23
- export async function fetchModels(): Promise<ModelsResponse> {
24
- return request<ModelsResponse>('/v1/models')
25
- }
Binary file
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="77" height="47" fill="none" aria-labelledby="vite-logo-title" viewBox="0 0 77 47"><title id="vite-logo-title">Vite</title><style>.parenthesis{fill:#000}@media (prefers-color-scheme:dark){.parenthesis{fill:#fff}}</style><path fill="#9135ff" d="M40.151 45.71c-.663.844-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.493c-.92 0-1.457-1.04-.92-1.788l7.479-10.471c1.07-1.498 0-3.578-1.842-3.578H15.443c-.92 0-1.456-1.04-.92-1.788l9.696-13.576c.213-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.472c-1.07 1.497 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.087.89 1.83L40.153 45.712z"/><mask id="a" width="48" height="47" x="14" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M40.047 45.71c-.663.843-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.389c-.92 0-1.457-1.04-.92-1.788l7.479-10.472c1.07-1.497 0-3.578-1.842-3.578H15.34c-.92 0-1.456-1.04-.92-1.788l9.696-13.575c.213-.297.556-.474.92-.474H53.93c.92 0 1.456 1.04.92 1.788L47.37 13.03c-1.07 1.498 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.088.89 1.831L40.049 45.712z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#eee6ff" rx="5.508" ry="14.704" transform="rotate(269.814 20.96 11.29)scale(-1 1)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#eee6ff" rx="10.399" ry="29.851" transform="rotate(89.814 -16.902 -8.275)scale(1 -1)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#8900ff" rx="5.508" ry="30.487" transform="rotate(89.814 -19.197 -7.127)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.928 4.177)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.738 5.52)scale(1 -1)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#eee6ff" rx="14.072" ry="22.078" transform="rotate(93.35 31.245 55.578)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx="14.592" cy="9.743" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(39.51 14.592 9.743)"/></g><g filter="url(#k)"><ellipse cx="61.728" cy="-5.321" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 61.728 -5.32)"/></g><g filter="url(#l)"><ellipse cx="55.618" cy="7.104" fill="#00c2ff" rx="5.971" ry="9.665" transform="rotate(37.892 55.618 7.104)"/></g><g filter="url(#m)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#n)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#o)"><ellipse cx="49.857" cy="30.678" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 49.857 30.678)"/></g><g filter="url(#p)"><ellipse cx="52.623" cy="33.171" fill="#00c2ff" rx="5.971" ry="15.297" transform="rotate(37.892 52.623 33.17)"/></g></g><path d="M6.919 0c-9.198 13.166-9.252 33.575 0 46.789h6.215c-9.25-13.214-9.196-33.623 0-46.789zm62.424 0h-6.215c9.198 13.166 9.252 33.575 0 46.789h6.215c9.25-13.214 9.196-33.623 0-46.789" class="parenthesis"/><defs><filter id="b" width="60.045" height="41.654" x="-5.564" y="16.92" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-40.407" y="-6.762" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-35.435" y="2.801" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-30.84" y="20.8" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-29.307" y="21.949" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="29.961" y="-17.13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-13.43" y="-22.082" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="34.321" y="-37.644" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="38.847" y="-10.552" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="22.45" y="-1.645" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="32.919" y="11.36" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter></defs></svg>