All checks were successful
ci/woodpecker/push/check_format Pipeline was successful
255 lines
28 KiB
JavaScript
255 lines
28 KiB
JavaScript
import{c as Ue,s as Ke,f as Xe,t as Ge,m as Ye,u as Qe,a as ke,b as Je,_ as Ze,d as et,e as tt,S as nt,g as ot}from"./main.js";import{c as it,u as rt,_ as lt,a as at,b as st}from"./DropDown.js";import{aG as ct,aw as Se,aH as dt,a_ as ut,x as Ie,B as te,d as me,r as B,c as R,p as Me,w as mt,b as pe,H as i,aC as ht,aO as Oe,ax as g,az as W,ay as l,aB as J,aA as he,D as ve,aE as Re,aP as ft,aI as gt,n as be,U as Te,aK as ze,V as Be,c4 as Ve,be as Fe,aJ as H,bd as pt,aW as vt,aD as N,N as ye,M as A,aU as we,aN as X,bf as bt,aZ as Ce,bn as _t,aT as xt,aQ as Pe,bK as yt,bL as wt,bP as Ct,bB as zt,bV as Q,bU as j,bN as s,bR as U,bW as K,bT as T,bS as w,c0 as St,i as Rt,b$ as $t,bo as kt,bQ as S,bX as Tt,F as re,b_ as Le,A as de,bm as Bt}from"./_plugin-vue_export-helper.js";import{u as Vt,P as Ft,A as Pt}from"./Play.js";import"./Forward.js";function Lt(e){const{textColor2:t,modalColor:r,borderColor:o,fontSize:n,primaryColor:c}=e;return{loaderFontSize:n,loaderTextColor:t,loaderColor:r,loaderBorder:`1px solid ${o}`,loadingColor:c}}const jt=ct({name:"Log",common:Se,peers:{Scrollbar:dt,Code:it},self:Lt});function Ht(e){const{primaryColor:t,opacityDisabled:r,borderRadius:o,textColor3:n}=e;return Object.assign(Object.assign({},Ue),{iconColor:n,textColor:"white",loadingColor:t,opacityDisabled:r,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:o,railBorderRadiusMedium:o,railBorderRadiusLarge:o,buttonBorderRadiusSmall:o,buttonBorderRadiusMedium:o,buttonBorderRadiusLarge:o,boxShadowFocus:`0 0 0 2px ${ut(t,{alpha:.2})}`})}const It={name:"Switch",common:Se,self:Ht};function Mt(e){const{textColor3:t,infoColor:r,errorColor:o,successColor:n,warningColor:c,textColor1:d,textColor2:f,railColor:b,fontWeightStrong:p,fontSize:z}=e;return Object.assign(Object.assign({},Ke),{contentFontSize:z,titleFontWeight:p,circleBorder:`2px solid ${t}`,circleBorderInfo:`2px solid ${r}`,circleBorderError:`2px solid ${o}`,circleBorderSuccess:`2px solid ${n}`,circleBorderWarning:`2px solid ${c}`,iconColor:t,iconColorInfo:r,iconColorError:o,iconColorSuccess:n,iconColorWarning:c,titleTextColor:d,contentTextColor:f,metaTextColor:t,lineColor:b})}const Ot={name:"Timeline",common:Se,self:Mt},qe=Ie("n-log"),qt=te({props:{line:{type:String,default:""}},setup(e){const{trimRef:t,highlightRef:r,languageRef:o,mergedHljsRef:n}=me(qe),c=B(null),d=R(()=>t.value?e.line.trim():e.line);function f(){c.value&&(c.value.innerHTML=b(o.value,d.value))}function b(p,z){const{value:_}=n;return _&&p&&_.getLanguage(p)?_.highlight(z,{language:p}).value:z}return Me(()=>{r.value&&f()}),mt(pe(e,"line"),()=>{r.value&&f()}),{highlight:r,selfRef:c,maybeTrimmedLines:d}},render(){const{highlight:e,maybeTrimmedLines:t}=this;return i("pre",{ref:"selfRef"},e?null:t)}}),Nt=te({name:"LogLoader",props:{clsPrefix:{type:String,required:!0}},setup(){return{locale:ht("Log").localeRef}},render(){const{clsPrefix:e}=this;return i("div",{class:`${e}-log-loader`},i(Oe,{clsPrefix:e,strokeWidth:24,scale:.85}),i("span",{class:`${e}-log-loader__content`},this.locale.loading))}}),Wt=g("log",`
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
transition: border-color .3s var(--n-bezier);
|
|
`,[W("pre",`
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
margin: 0;
|
|
`),g("log-loader",`
|
|
transition:
|
|
color .3s var(--n-bezier),
|
|
background-color .3s var(--n-bezier),
|
|
border-color .3s var(--n-bezier);
|
|
box-sizing: border-box;
|
|
position: absolute;
|
|
right: 16px;
|
|
top: 8px;
|
|
height: 34px;
|
|
border-radius: 17px;
|
|
line-height: 34px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
border: var(--n-loader-border);
|
|
color: var(--n-loader-text-color);
|
|
background-color: var(--n-loader-color);
|
|
font-size: var(--n-loader-font-size);
|
|
`,[Xe(),l("content",`
|
|
display: inline-block;
|
|
vertical-align: bottom;
|
|
line-height: 34px;
|
|
padding-left: 40px;
|
|
padding-right: 20px;
|
|
white-space: nowrap;
|
|
`),g("base-loading",`
|
|
color: var(--n-loading-color);
|
|
position: absolute;
|
|
left: 12px;
|
|
top: calc(50% - 10px);
|
|
font-size: 20px;
|
|
width: 20px;
|
|
height: 20px;
|
|
display: inline-block;
|
|
`)])]),Et=Object.assign(Object.assign({},J.props),{loading:Boolean,trim:Boolean,log:String,fontSize:{type:Number,default:14},lines:{type:Array,default:()=>[]},lineHeight:{type:Number,default:1.25},language:String,rows:{type:Number,default:15},offsetTop:{type:Number,default:0},offsetBottom:{type:Number,default:0},hljs:Object,onReachTop:Function,onReachBottom:Function,onRequireMore:Function}),Dt=te({name:"Log",props:Et,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=he(e),o=B(!1),n=R(()=>e.language!==void 0),c=R(()=>`calc(${Math.round(e.rows*e.lineHeight*e.fontSize)}px)`),d=R(()=>{const{log:v}=e;return v?v.split(`
|
|
`):e.lines}),f=B(null),b=J("Log","-log",Wt,jt,e,t);function p(v){const y=v.target,F=y.firstElementChild;if(o.value){be(()=>{o.value=!1});return}const P=y.offsetHeight,$=y.scrollTop,L=F.offsetHeight,u=$,E=L-$-P;if(u<=e.offsetTop){const{onReachTop:V,onRequireMore:C}=e;C&&C("top"),V&&V()}if(E<=e.offsetBottom){const{onReachBottom:V,onRequireMore:C}=e;C&&C("bottom"),V&&V()}}const z=Ge(_,300);function _(v){if(o.value){be(()=>{o.value=!1});return}if(f.value){const{containerRef:y,contentRef:F}=f.value;if(y&&F){const P=y.offsetHeight,$=y.scrollTop,L=F.offsetHeight,u=$,E=L-$-P,V=v.deltaY;if(u===0&&V<0){const{onRequireMore:C}=e;C&&C("top")}if(E<=0&&V>0){const{onRequireMore:C}=e;C&&C("bottom")}}}}function m(v){const{value:y}=f;if(!y)return;const{silent:F,top:P,position:$}=v;F&&(o.value=!0),P!==void 0?y.scrollTo({left:0,top:P}):($==="bottom"||$==="top")&&y.scrollTo({position:$})}function a(v=!1){Te("log","`scrollToTop` is deprecated, please use `scrollTo({ position: 'top'})` instead."),m({position:"top",silent:v})}function x(v=!1){Te("log","`scrollToTop` is deprecated, please use `scrollTo({ position: 'bottom'})` instead."),m({position:"bottom",silent:v})}ve(qe,{languageRef:pe(e,"language"),mergedHljsRef:rt(e),trimRef:pe(e,"trim"),highlightRef:n});const Z={scrollTo:m},G=R(()=>{const{self:{loaderFontSize:v,loaderTextColor:y,loaderColor:F,loaderBorder:P,loadingColor:$},common:{cubicBezierEaseInOut:L}}=b.value;return{"--n-bezier":L,"--n-loader-font-size":v,"--n-loader-border":P,"--n-loader-color":F,"--n-loader-text-color":y,"--n-loading-color":$}}),M=r?Re("log",void 0,G,e):void 0;return Object.assign(Object.assign({},Z),{mergedClsPrefix:t,scrollbarRef:f,mergedTheme:b,styleHeight:c,mergedLines:d,scrollToTop:a,scrollToBottom:x,handleWheel:z,handleScroll:p,cssVars:r?void 0:G,themeClass:M==null?void 0:M.themeClass,onRender:M==null?void 0:M.onRender})},render(){const{mergedClsPrefix:e,mergedTheme:t,onRender:r}=this;return r==null||r(),i("div",{class:[`${e}-log`,this.themeClass],style:[{lineHeight:this.lineHeight,height:this.styleHeight},this.cssVars],onWheelPassive:this.handleWheel},[i(ft,{ref:"scrollbarRef",theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,onScroll:this.handleScroll},{default:()=>i(lt,{internalNoHighlight:!0,internalFontSize:this.fontSize,theme:t.peers.Code,themeOverrides:t.peerOverrides.Code},{default:()=>this.mergedLines.map((o,n)=>i(qt,{key:n,line:o}))})}),i(gt,{name:"fade-in-scale-up-transition"},{default:()=>this.loading?i(Nt,{clsPrefix:e}):null})])}}),At=Object.assign(Object.assign({},J.props),{autoFill:Boolean,speed:{type:Number,default:48}}),Ut=W([g("marquee",`
|
|
overflow: hidden;
|
|
display: flex;
|
|
`,[l("group",`
|
|
flex: 0 0 auto;
|
|
min-width: var(--n-min-width);
|
|
z-index: 1;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
animation: n-marquee var(--n-duration) linear var(--n-delay) var(--n-iteration-count);
|
|
animation-play-state: var(--n-play);
|
|
animation-delay: var(--n-delay);
|
|
animation-direction: var(--n-direction);
|
|
`),ze("auto-fill",[l("group","min-width: 100%;"),l("item","min-width: 100%;")])]),W("@keyframes n-marquee",{from:{transform:"translateX(0)"},to:{transform:"translateX(-100%)"}})]),Kt=te({name:"Marquee",props:At,setup(e){const{mergedClsPrefixRef:t}=he(e);J("Marquee","-marquee",Ut,Ye,e,t);const r=B(null),o=B(-1),n=B(-1),c=B("running"),d=R(()=>{if(!e.autoFill)return 1;const{value:a}=o,{value:x}=n;return a===-1||x===-1?1:Math.ceil(n.value/a)}),f=R(()=>{const{value:a}=o;return a===-1?0:a*d.value/e.speed}),b=R(()=>({"--n-play":c.value,"--n-direction":"normal","--n-duration":`${f.value}s`,"--n-delay":"0s","--n-iteration-count":"infinite","--n-min-width":"auto"}));function p(){c.value="paused",be().then(()=>{var a;(a=r.value)===null||a===void 0||a.offsetTop,c.value="running"})}function z(a){n.value=a.contentRect.width}function _(a){o.value=a.contentRect.width}function m(){p()}return{mergedClsPrefix:t,animationCssVars:b,containerElRef:r,repeatCountInOneGroup:d,handleContainerResize:z,handleContentResize:_,handleAnimationIteration:m}},render(){const{$slots:e,mergedClsPrefix:t,animationCssVars:r,repeatCountInOneGroup:o,handleAnimationIteration:n}=this,c=i(Be,{onResize:this.handleContentResize},i("div",{class:`${t}-marquee__item ${t}-marquee__original-item`},e)),d=i("div",{class:`${t}-marquee__item`},e);return this.autoFill?i(Be,{onResize:this.handleContainerResize},i("div",{class:`${t}-marquee ${t}-marquee--auto-fill`,ref:"containerElRef",style:r},i("div",{class:`${t}-marquee__group`,onAnimationiteration:n},c,Ve(o-1,d)),i("div",{class:`${t}-marquee__group`},Ve(o,d)))):i("div",{class:[`${t}-marquee`],ref:"containerElRef",style:r},i("div",{class:`${t}-marquee__group`,onAnimationiteration:n},c),i("div",{class:`${t}-marquee__group`},d))}}),Xt=g("switch",`
|
|
height: var(--n-height);
|
|
min-width: var(--n-width);
|
|
vertical-align: middle;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
display: inline-flex;
|
|
outline: none;
|
|
justify-content: center;
|
|
align-items: center;
|
|
`,[l("children-placeholder",`
|
|
height: var(--n-rail-height);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
pointer-events: none;
|
|
visibility: hidden;
|
|
`),l("rail-placeholder",`
|
|
display: flex;
|
|
flex-wrap: none;
|
|
`),l("button-placeholder",`
|
|
width: calc(1.75 * var(--n-rail-height));
|
|
height: var(--n-rail-height);
|
|
`),g("base-loading",`
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translateX(-50%) translateY(-50%);
|
|
font-size: calc(var(--n-button-width) - 4px);
|
|
color: var(--n-loading-color);
|
|
transition: color .3s var(--n-bezier);
|
|
`,[Fe({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),l("checked, unchecked",`
|
|
transition: color .3s var(--n-bezier);
|
|
color: var(--n-text-color);
|
|
box-sizing: border-box;
|
|
position: absolute;
|
|
white-space: nowrap;
|
|
top: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
line-height: 1;
|
|
`),l("checked",`
|
|
right: 0;
|
|
padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
|
`),l("unchecked",`
|
|
left: 0;
|
|
justify-content: flex-end;
|
|
padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
|
`),W("&:focus",[l("rail",`
|
|
box-shadow: var(--n-box-shadow-focus);
|
|
`)]),H("round",[l("rail","border-radius: calc(var(--n-rail-height) / 2);",[l("button","border-radius: calc(var(--n-button-height) / 2);")])]),ze("disabled",[ze("icon",[H("rubber-band",[H("pressed",[l("rail",[l("button","max-width: var(--n-button-width-pressed);")])]),l("rail",[W("&:active",[l("button","max-width: var(--n-button-width-pressed);")])]),H("active",[H("pressed",[l("rail",[l("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),l("rail",[W("&:active",[l("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),H("active",[l("rail",[l("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),l("rail",`
|
|
overflow: hidden;
|
|
height: var(--n-rail-height);
|
|
min-width: var(--n-rail-width);
|
|
border-radius: var(--n-rail-border-radius);
|
|
cursor: pointer;
|
|
position: relative;
|
|
transition:
|
|
opacity .3s var(--n-bezier),
|
|
background .3s var(--n-bezier),
|
|
box-shadow .3s var(--n-bezier);
|
|
background-color: var(--n-rail-color);
|
|
`,[l("button-icon",`
|
|
color: var(--n-icon-color);
|
|
transition: color .3s var(--n-bezier);
|
|
font-size: calc(var(--n-button-height) - 4px);
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
line-height: 1;
|
|
`,[Fe()]),l("button",`
|
|
align-items: center;
|
|
top: var(--n-offset);
|
|
left: var(--n-offset);
|
|
height: var(--n-button-height);
|
|
width: var(--n-button-width-pressed);
|
|
max-width: var(--n-button-width);
|
|
border-radius: var(--n-button-border-radius);
|
|
background-color: var(--n-button-color);
|
|
box-shadow: var(--n-button-box-shadow);
|
|
box-sizing: border-box;
|
|
cursor: inherit;
|
|
content: "";
|
|
position: absolute;
|
|
transition:
|
|
background-color .3s var(--n-bezier),
|
|
left .3s var(--n-bezier),
|
|
opacity .3s var(--n-bezier),
|
|
max-width .3s var(--n-bezier),
|
|
box-shadow .3s var(--n-bezier);
|
|
`)]),H("active",[l("rail","background-color: var(--n-rail-color-active);")]),H("loading",[l("rail",`
|
|
cursor: wait;
|
|
`)]),H("disabled",[l("rail",`
|
|
cursor: not-allowed;
|
|
opacity: .5;
|
|
`)])]),Gt=Object.assign(Object.assign({},J.props),{size:{type:String,default:"medium"},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},onChange:[Function,Array]});let ue;const Yt=te({name:"Switch",props:Gt,setup(e){ue===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?ue=CSS.supports("width","max(1px)"):ue=!1:ue=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=he(e),o=J("Switch","-switch",Xt,It,e,t),n=pt(e),{mergedSizeRef:c,mergedDisabledRef:d}=n,f=B(e.defaultValue),b=pe(e,"value"),p=vt(b,f),z=R(()=>p.value===e.checkedValue),_=B(!1),m=B(!1),a=R(()=>{const{railStyle:u}=e;if(u)return u({focused:m.value,checked:z.value})});function x(u){const{"onUpdate:value":E,onChange:V,onUpdateValue:C}=e,{nTriggerFormInput:le,nTriggerFormChange:ee}=n;E&&Ce(E,u),C&&Ce(C,u),V&&Ce(V,u),f.value=u,le(),ee()}function Z(){const{nTriggerFormFocus:u}=n;u()}function G(){const{nTriggerFormBlur:u}=n;u()}function M(){e.loading||d.value||(p.value!==e.checkedValue?x(e.checkedValue):x(e.uncheckedValue))}function v(){m.value=!0,Z()}function y(){m.value=!1,G(),_.value=!1}function F(u){e.loading||d.value||u.key===" "&&(p.value!==e.checkedValue?x(e.checkedValue):x(e.uncheckedValue),_.value=!1)}function P(u){e.loading||d.value||u.key===" "&&(u.preventDefault(),_.value=!0)}const $=R(()=>{const{value:u}=c,{self:{opacityDisabled:E,railColor:V,railColorActive:C,buttonBoxShadow:le,buttonColor:ee,boxShadowFocus:_e,loadingColor:fe,textColor:O,iconColor:h,[N("buttonHeight",u)]:q,[N("buttonWidth",u)]:Y,[N("buttonWidthPressed",u)]:ne,[N("railHeight",u)]:I,[N("railWidth",u)]:D,[N("railBorderRadius",u)]:xe,[N("buttonBorderRadius",u)]:oe},common:{cubicBezierEaseInOut:ie}}=o.value;let ae,se,ce;return ue?(ae=`calc((${I} - ${q}) / 2)`,se=`max(${I}, ${q})`,ce=`max(${D}, calc(${D} + ${q} - ${I}))`):(ae=ye((A(I)-A(q))/2),se=ye(Math.max(A(I),A(q))),ce=A(I)>A(q)?D:ye(A(D)+A(q)-A(I))),{"--n-bezier":ie,"--n-button-border-radius":oe,"--n-button-box-shadow":le,"--n-button-color":ee,"--n-button-width":Y,"--n-button-width-pressed":ne,"--n-button-height":q,"--n-height":se,"--n-offset":ae,"--n-opacity-disabled":E,"--n-rail-border-radius":xe,"--n-rail-color":V,"--n-rail-color-active":C,"--n-rail-height":I,"--n-rail-width":D,"--n-width":ce,"--n-box-shadow-focus":_e,"--n-loading-color":fe,"--n-text-color":O,"--n-icon-color":h}}),L=r?Re("switch",R(()=>c.value[0]),$,e):void 0;return{handleClick:M,handleBlur:y,handleFocus:v,handleKeyup:F,handleKeydown:P,mergedRailStyle:a,pressed:_,mergedClsPrefix:t,mergedValue:p,checked:z,mergedDisabled:d,cssVars:r?void 0:$,themeClass:L==null?void 0:L.themeClass,onRender:L==null?void 0:L.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:r,mergedRailStyle:o,onRender:n,$slots:c}=this;n==null||n();const{checked:d,unchecked:f,icon:b,"checked-icon":p,"unchecked-icon":z}=c,_=!(we(b)&&we(p)&&we(z));return i("div",{role:"switch","aria-checked":r,class:[`${e}-switch`,this.themeClass,_&&`${e}-switch--icon`,r&&`${e}-switch--active`,t&&`${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},i("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:o},X(d,m=>X(f,a=>m||a?i("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},i("div",{class:`${e}-switch__rail-placeholder`},i("div",{class:`${e}-switch__button-placeholder`}),m),i("div",{class:`${e}-switch__rail-placeholder`},i("div",{class:`${e}-switch__button-placeholder`}),a)):null)),i("div",{class:`${e}-switch__button`},X(b,m=>X(p,a=>X(z,x=>i(bt,null,{default:()=>this.loading?i(Oe,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(a||m)?i("div",{class:`${e}-switch__button-icon`,key:a?"checked-icon":"icon"},a||m):!this.checked&&(x||m)?i("div",{class:`${e}-switch__button-icon`,key:x?"unchecked-icon":"icon"},x||m):null})))),X(d,m=>m&&i("div",{key:"checked",class:`${e}-switch__checked`},m)),X(f,m=>m&&i("div",{key:"unchecked",class:`${e}-switch__unchecked`},m)))))}}),je=1.25,Qt=g("timeline",`
|
|
position: relative;
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
line-height: ${je};
|
|
`,[H("horizontal",`
|
|
flex-direction: row;
|
|
`,[W(">",[g("timeline-item",`
|
|
flex-shrink: 0;
|
|
padding-right: 40px;
|
|
`,[H("dashed-line-type",[W(">",[g("timeline-item-timeline",[l("line",`
|
|
background-image: linear-gradient(90deg, var(--n-color-start), var(--n-color-start) 50%, transparent 50%, transparent 100%);
|
|
background-size: 10px 1px;
|
|
`)])])]),W(">",[g("timeline-item-content",`
|
|
margin-top: calc(var(--n-icon-size) + 12px);
|
|
`,[W(">",[l("meta",`
|
|
margin-top: 6px;
|
|
margin-bottom: unset;
|
|
`)])]),g("timeline-item-timeline",`
|
|
width: 100%;
|
|
height: calc(var(--n-icon-size) + 12px);
|
|
`,[l("line",`
|
|
left: var(--n-icon-size);
|
|
top: calc(var(--n-icon-size) / 2 - 1px);
|
|
right: 0px;
|
|
width: unset;
|
|
height: 2px;
|
|
`)])])])])]),H("right-placement",[g("timeline-item",[g("timeline-item-content",`
|
|
text-align: right;
|
|
margin-right: calc(var(--n-icon-size) + 12px);
|
|
`),g("timeline-item-timeline",`
|
|
width: var(--n-icon-size);
|
|
right: 0;
|
|
`)])]),H("left-placement",[g("timeline-item",[g("timeline-item-content",`
|
|
margin-left: calc(var(--n-icon-size) + 12px);
|
|
`),g("timeline-item-timeline",`
|
|
left: 0;
|
|
`)])]),g("timeline-item",`
|
|
position: relative;
|
|
`,[W("&:last-child",[g("timeline-item-timeline",[l("line",`
|
|
display: none;
|
|
`)]),g("timeline-item-content",[l("meta",`
|
|
margin-bottom: 0;
|
|
`)])]),g("timeline-item-content",[l("title",`
|
|
margin: var(--n-title-margin);
|
|
font-size: var(--n-title-font-size);
|
|
transition: color .3s var(--n-bezier);
|
|
font-weight: var(--n-title-font-weight);
|
|
color: var(--n-title-text-color);
|
|
`),l("content",`
|
|
transition: color .3s var(--n-bezier);
|
|
font-size: var(--n-content-font-size);
|
|
color: var(--n-content-text-color);
|
|
`),l("meta",`
|
|
transition: color .3s var(--n-bezier);
|
|
font-size: 12px;
|
|
margin-top: 6px;
|
|
margin-bottom: 20px;
|
|
color: var(--n-meta-text-color);
|
|
`)]),H("dashed-line-type",[g("timeline-item-timeline",[l("line",`
|
|
--n-color-start: var(--n-line-color);
|
|
transition: --n-color-start .3s var(--n-bezier);
|
|
background-color: transparent;
|
|
background-image: linear-gradient(180deg, var(--n-color-start), var(--n-color-start) 50%, transparent 50%, transparent 100%);
|
|
background-size: 1px 10px;
|
|
`)])]),g("timeline-item-timeline",`
|
|
width: calc(var(--n-icon-size) + 12px);
|
|
position: absolute;
|
|
top: calc(var(--n-title-font-size) * ${je} / 2 - var(--n-icon-size) / 2);
|
|
height: 100%;
|
|
`,[l("circle",`
|
|
border: var(--n-circle-border);
|
|
transition:
|
|
background-color .3s var(--n-bezier),
|
|
border-color .3s var(--n-bezier);
|
|
width: var(--n-icon-size);
|
|
height: var(--n-icon-size);
|
|
border-radius: var(--n-icon-size);
|
|
box-sizing: border-box;
|
|
`),l("icon",`
|
|
color: var(--n-icon-color);
|
|
font-size: var(--n-icon-size);
|
|
height: var(--n-icon-size);
|
|
width: var(--n-icon-size);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
`),l("line",`
|
|
transition: background-color .3s var(--n-bezier);
|
|
position: absolute;
|
|
top: var(--n-icon-size);
|
|
left: calc(var(--n-icon-size) / 2 - 1px);
|
|
bottom: 0px;
|
|
width: 2px;
|
|
background-color: var(--n-line-color);
|
|
`)])])]),Jt=Object.assign(Object.assign({},J.props),{horizontal:Boolean,itemPlacement:{type:String,default:"left"},size:{type:String,default:"medium"},iconSize:Number}),Ne=Ie("n-timeline"),Zt=te({name:"Timeline",props:Jt,setup(e,{slots:t}){const{mergedClsPrefixRef:r}=he(e),o=J("Timeline","-timeline",Qt,Ot,e,r);return ve(Ne,{props:e,mergedThemeRef:o,mergedClsPrefixRef:r}),()=>{const{value:n}=r;return i("div",{class:[`${n}-timeline`,e.horizontal&&`${n}-timeline--horizontal`,`${n}-timeline--${e.size}-size`,!e.horizontal&&`${n}-timeline--${e.itemPlacement}-placement`]},t)}}}),en={time:[String,Number],title:String,content:String,color:String,lineType:{type:String,default:"default"},type:{type:String,default:"default"}},tn=te({name:"TimelineItem",props:en,setup(e){const t=me(Ne);t||_t("timeline-item","`n-timeline-item` must be placed inside `n-timeline`."),Vt();const{inlineThemeDisabled:r}=he(),o=R(()=>{const{props:{size:c,iconSize:d},mergedThemeRef:f}=t,{type:b}=e,{self:{titleTextColor:p,contentTextColor:z,metaTextColor:_,lineColor:m,titleFontWeight:a,contentFontSize:x,[N("iconSize",c)]:Z,[N("titleMargin",c)]:G,[N("titleFontSize",c)]:M,[N("circleBorder",b)]:v,[N("iconColor",b)]:y},common:{cubicBezierEaseInOut:F}}=f.value;return{"--n-bezier":F,"--n-circle-border":v,"--n-icon-color":y,"--n-content-font-size":x,"--n-content-text-color":z,"--n-line-color":m,"--n-meta-text-color":_,"--n-title-font-size":M,"--n-title-font-weight":a,"--n-title-margin":G,"--n-title-text-color":p,"--n-icon-size":xt(d)||Z}}),n=r?Re("timeline-item",R(()=>{const{props:{size:c,iconSize:d}}=t,{type:f}=e;return`${c[0]}${d||"a"}${f[0]}`}),o,t.props):void 0;return{mergedClsPrefix:t.mergedClsPrefixRef,cssVars:r?void 0:o,themeClass:n==null?void 0:n.themeClass,onRender:n==null?void 0:n.onRender}},render(){const{mergedClsPrefix:e,color:t,onRender:r,$slots:o}=this;return r==null||r(),i("div",{class:[`${e}-timeline-item`,this.themeClass,`${e}-timeline-item--${this.type}-type`,`${e}-timeline-item--${this.lineType}-line-type`],style:this.cssVars},i("div",{class:`${e}-timeline-item-timeline`},i("div",{class:`${e}-timeline-item-timeline__line`}),X(o.icon,n=>n?i("div",{class:`${e}-timeline-item-timeline__icon`,style:{color:t}},n):i("div",{class:`${e}-timeline-item-timeline__circle`,style:{borderColor:t}}))),i("div",{class:`${e}-timeline-item-content`},X(o.header,n=>n||this.title?i("div",{class:`${e}-timeline-item-content__title`},n||this.title):null),i("div",{class:`${e}-timeline-item-content__content`},Pe(o.default,()=>[this.content])),i("div",{class:`${e}-timeline-item-content__meta`},Pe(o.footer,()=>[this.time]))))}});var ge={},He;function nn(){if(He)return ge;He=1,Object.defineProperty(ge,"__esModule",{value:!0});const e=yt(),t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"};return ge.default=(0,e.defineComponent)({name:"Stop",render:function(o,n){return(0,e.openBlock)(),(0,e.createElementBlock)("svg",t,n[0]||(n[0]=[(0,e.createElementVNode)("path",{d:"M392 432H120a40 40 0 0 1-40-40V120a40 40 0 0 1 40-40h272a40 40 0 0 1 40 40v272a40 40 0 0 1-40 40z",fill:"currentColor"},null,-1)]))}}),ge}var on=nn();const rn=wt(on),ln={class:"home-container"},an={style:{overflow:"auto"}},sn={class:"action-container"},cn={class:"scroll-container"},dn={key:0,class:"scroll-label"},un={__name:"Log",setup(e){$t(O=>({"7e3728b5":s($),"2b827f97":s(L),ca8d0482:s(u)}));const t=Qe(),{log:r,log_mobile:o,running:n,task_list:c,waiting:d,get_task_id:f,sc_uri:b,speed_msg:p,basement_task_list:z}=ke(t),{get_tasks:_}=t,m=me("axios"),a=me("mobile"),x=B(!0);function Z(O){O||be(()=>{var h;(h=document.querySelector(".n-scrollbar-content"))==null||h.scrollIntoView(!1)})}Me(()=>{_(),fe()}),zt(()=>{clearTimeout(f.value)});function G(){n.value=!0,m.get("/start"),_()}function M(){d.value=!0,m.get("/stop").then(O=>{n.value=!O.data,d.value=!1})}B(!0);const v=B(!1),y=B(!0);ve("show_task",v),ve("add_task",y);const F=Je(),{conf:P}=ke(F),$=R(()=>P.value.theme=="light"?.25:.3),L=R(()=>a.value?"cover, cover":"753px, cover"),u=R(()=>a.value?"25% 0, 50%, 50%":"70% -15%, 50% 50%");function E(){m.get("/stop-maa")}const V=[{label:"停止Maa",key:"maa"}],C=B(!0),le=me("settings"),ee=B({}),_e=O=>{const h=new Date,q=new Date(O),Y=Math.floor((q-h)/1e3);if(Y<=0)return"正在执行";const ne=Math.floor(Y/3600),I=Math.floor(Y%3600/60),D=Y%60;return`${String(ne).padStart(2,"0")}:${String(I).padStart(2,"0")}:${String(D).padStart(2,"0")}`},fe=()=>{c.value.forEach(O=>{ee.value[O.time]=_e(O.time)}),requestAnimationFrame(fe)};return(O,h)=>{const q=Ze,Y=Kt,ne=et,I=tn,D=Zt,xe=Dt,oe=Bt,ie=kt,ae=at,se=st,ce=ot,We=tt,Ee=Yt;return S(),Q("div",ln,[h[9]||(h[9]=j("div",{class:"log-bg"},null,-1)),s(C)?(S(),U(q,{key:0,"preview-disabled":"",width:"100%",class:"sc",src:s(b)==""?"/black.jpg":s(b),"object-fit":"scale-down"},null,8,["src"])):K("",!0),s(p)!=""?(S(),U(ne,{key:1,closable:""},{default:w(()=>[T(Y,{speed:100},{default:w(()=>[j("h3",null,"🚁🚁"+Tt(s(p))+"🚁🚁",1)]),_:1})]),_:1})):K("",!0),T(ne,{closable:"",title:"时间线"},{default:w(()=>[j("div",an,[T(D,{horizontal:""},{default:w(()=>[(S(!0),Q(re,null,Le(s(c),k=>(S(),Q(re,{key:k.time},[Object.keys(k.plan).length?(S(!0),Q(re,{key:0},Le(k.plan,(De,$e)=>(S(),U(I,{key:$e,title:$e,content:De.map(Ae=>Ae||"_").join(", "),time:`${k.time.split("T")[1].split(".")[0]} (剩余时间: ${s(ee)[k.time]})`},null,8,["title","content","time"]))),128)):(S(),U(I,{key:k.time,content:k.meta_data+k.type.display_value,time:`${k.time.split("T")[1].split(".")[0]} (剩余时间: ${s(ee)[k.time]})`},null,8,["content","time"]))],64))),128))]),_:1})])]),_:1}),T(xe,{class:St(["log",{"auto-scroll":s(x)}]),log:s(a)?s(o):s(r),language:"mower",style:{"user-select":"text"}},null,8,["class","log"]),j("div",sn,[s(n)?(S(),U(ae,{key:0,select:E,options:V,type:"error",up:!0},{default:w(()=>[T(ie,{type:"error",onClick:M,loading:s(d),disabled:s(d)},{icon:w(()=>[T(oe,null,{default:w(()=>[T(s(rn))]),_:1})]),default:w(()=>[s(a)?K("",!0):(S(),Q(re,{key:0},[de("停止运行")],64))]),_:1},8,["loading","disabled"])]),_:1})):(S(),U(ie,{key:1,type:"primary",onClick:G,loading:s(d),disabled:s(d)},{icon:w(()=>[T(oe,null,{default:w(()=>[T(s(Ft))]),_:1})]),default:w(()=>[s(a)?K("",!0):(S(),Q(re,{key:0},[de("开始运行")],64))]),_:1},8,["loading","disabled"])),T(se),T(ie,{type:"warning",onClick:h[0]||(h[0]=k=>v.value=!0)},{icon:w(()=>[T(oe,null,{default:w(()=>[T(s(Pt))]),_:1})]),default:w(()=>[s(a)?K("",!0):(S(),Q(re,{key:0},[h[5]||(h[5]=de("新增任务 ")),s(a)?K("",!0):(S(),U(ce,{key:0},{default:w(()=>h[4]||(h[4]=[j("div",null,"目前只糊了一个勉强能用的版本,其他功能敬请期待",-1),j("div",null,"只开放了空任务/专精任务",-1),j("div",null,"只能增,不能删!!谨慎填写任务",-1),j("div",null,"如果 mower 休息到 00:30,新增的 00:15 的任务是不会被执行的,因为此时在休息",-1),j("div",null,"所以最好在 00:00 mower运行的时候添加 00:15 的任务了,考验手速的时候到了",-1),j("div",null,"空任务,请确保任务房间名字,干员数量正确(没有判定)",-1),j("div",null,"专精任务,UI有详细说明;新增完毕,UI上面的表会实时反馈",-1),j("div",null,"在Q群或者频道提以上问题,看心情踢人",-1)])),_:1}))],64))]),_:1}),s(a)?K("",!0):(S(),U(We,{key:2,checked:s(P).start_automatically,"onUpdate:checked":h[1]||(h[1]=k=>s(P).start_automatically=k)},{default:w(()=>h[6]||(h[6]=[de(" 启动后自动运行 ")])),_:1},8,["checked"])),h[8]||(h[8]=j("div",{class:"expand"},null,-1)),s(a)?K("",!0):(S(),U(ie,{key:3,type:"info",onClick:h[2]||(h[2]=k=>le.value=!0)},{icon:w(()=>[T(oe,null,{default:w(()=>[T(s(nt))]),_:1})]),default:w(()=>[h[7]||(h[7]=de(" 全部设置 "))]),_:1})),j("div",cn,[T(Ee,{value:s(x),"onUpdate:value":[h[3]||(h[3]=k=>Rt(x)?x.value=k:null),Z]},null,8,["value"]),s(a)?K("",!0):(S(),Q("span",dn,"自动滚动"))])])])}}},vn=Ct(un,[["__scopeId","data-v-0f8c4b98"]]);export{vn as default};
|