1import{a4 as w,a7 as _,c as n,r as D,aQ as b,d as I,i as x,t as T,A,aR as B}from"./CN5JKr-_.js";const N=["datetime","title"],k={__name:"NuxtTime",props:{locale:{type:String,required:!1},datetime:{type:[String,Number,Date],required:!0},localeMatcher:{type:String,required:!1},weekday:{type:String,required:!1},era:{type:String,required:!1},year:{type:String,required:!1},month:{type:String,required:!1},day:{type:String,required:!1},hour:{type:String,required:!1},minute:{type:String,required:!1},second:{type:String,required:!1},timeZoneName:{type:String,required:!1},formatMatcher:{type:String,required:!1},hour12:{type:Boolean,required:!1,default:void 0},timeZone:{type:String,required:!1},calendar:{type:String,required:!1},dayPeriod:{type:String,required:!1},numberingSystem:{type:String,required:!1},dateStyle:{type:String,required:!1},timeStyle:{type:String,required:!1},hourCycle:{type:String,required:!1},relative:{type:Boolean,required:!1},numeric:{type:String,required:!1},relativeStyle:{type:String,required:!1},title:{type:[Boolean,String],required:!1}},setup(y){const t=y,o=w()?.vnode.el,l=o?.getAttribute("datetime"),u=o?.getAttribute("data-locale"),d=_(),i=n(()=>{const e=t.datetime;return l&&d.isHydrating?new Date(l):t.datetime?new Date(e):new Date}),c=D(d.isHydrating&&window._nuxtTimeNow?new Date(window._nuxtTimeNow):new Date);if(t.relative){const r=setInterval(()=>{c.value=new Date},1e3);b(()=>clearInterval(r))}const p=n(()=>{const{locale:e,relative:r,relativeStyle:s,...a}=t;return r?new Intl.RelativeTimeFormat(u??e,{...a,style:s}):new Intl.DateTimeFormat(u??e,a)}),m=n(()=>{if(!t.relative)return p.value.format(i.value);const e=(i.value.getTime()-c.value.getTime())/1e3,r=[{unit:"second",seconds:1,threshold:60},{unit:"minute",seconds:60,threshold:60},{unit:"hour",seconds:3600,threshold:24},{unit:"day",seconds:86400,threshold:30},{unit:"month",seconds:2592e3,threshold:12},{unit:"year",seconds:31536e3,threshold:1/0}],{unit:s,seconds:a}=r.find(({seconds:v,threshold:q})=>Math.abs(e/v)<q)||r[r.length-1],h=e/a;return p.value.format(Math.round(h),s)}),f=n(()=>i.value.toISOString()),g=n(()=>t.title===!0?f.value:typeof t.title=="string"?t.title:void 0),S={};return(e,r)=>(x(),I("time",A(S,{datetime:f.value,title:g.value}),T(m.value),17,N))}},R=B("/dev/i-youtube-button.svg");export{k as _,R as a};
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.