1import{u as b}from"./9a5c58fa.js";import{b as S,a as u,w as m,o as M,g as s,l as n,u as t,B as r,q as w,E as f,j as v,t as I}from"./39d175c0.js";import{_ as U}from"./app-bebf2c62.js";import"./55b7a120.js";const z={key:0,class:"label"},B={class:"time"},P=["textContent"],T=["textContent"],W={key:1,class:"label"},h="unixClock",D=S({__name:"WidgetUnixClock",props:{widget:{}},emits:["updateProps"],setup(g,{expose:C,emit:x}){const c=g,k={transparent:{type:"boolean",default:!1},fontSize:{type:"number",default:1.5,step:.1},showMs:{type:"boolean",default:!0},showLabel:{type:"boolean",default:!0}},{widgetProps:e,configure:y}=b(h,k,c,x);let a;const l=u(""),d=u(""),i=u(!1);let p=null;m(i,o=>{o&&window.setTimeout(()=>{i.value=!1},30)});const _=()=>{const o=new Date;l.value=Math.floor(o.getTime()/1e3).toString(),d.value=Math.floor(o.getTime()%1e3/10).toString().padStart(2,"0"),l.value!==p&&(i.value=!0),p=l.value};return _(),m(()=>e.showMs,()=>{a&&window.clearInterval(a),a=window.setInterval(_,e.showMs?10:1e3)},{immediate:!0}),M(()=>{window.clearInterval(a)}),C({name:h,configure:y,id:c.widget?c.widget.id:null}),(o,E)=>(s(),n("div",{class:v(["mkw-unixClock _monospace",{_panel:!t(e).transparent}]),style:I({fontSize:`${t(e).fontSize}em`})},[t(e).showLabel?(s(),n("div",z,"UNIX Epoch")):r("",!0),w("div",B,[w("span",{textContent:f(l.value)},null,8,P),t(e).showMs?(s(),n("span",{key:0,class:v(["colon",{showColon:i.value}])},":",2)):r("",!0),t(e).showMs?(s(),n("span",{key:1,textContent:f(d.value)},null,8,T)):r("",!0)]),t(e).showLabel?(s(),n("div",W,"UTC")):r("",!0)],6))}});const q=U(D,[["__scopeId","data-v-9094c432"]]);export{q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.