Anvil/assets/Created-B43aJ4UY.js
André Jaenisch 902b3bf474
Updates
2024-07-05 09:29:52 +02:00

1 line
1.9 KiB
JavaScript

import{a as b,n as c}from"./utils-AUSSiI9x.js";import{e as m,i as k,d,a as f,t as g,H as v,f as p,h as u,j as S,c as D,l as _,m as y}from"./lifecycle-DZHCWxcx.js";import{S as w,i as C}from"./index-CRVYNev9.js";function h(n){let a,e,t,l,o;return{c(){a=f("span"),e=g("created "),t=f("time"),l=new v(!1),this.h()},l(i){a=p(i,"SPAN",{});var r=u(a);e=S(r,"created "),t=p(r,"TIME",{datetime:!0});var s=u(t);l=D(s,!1),s.forEach(d),r.forEach(d),this.h()},h(){var i;l.a=null,_(t,"datetime",o=(i=n[0])==null?void 0:i.toISOString())},m(i,r){k(i,a,r),y(a,e),y(a,t),l.m(n[1],t)},p(i,r){var s;r&2&&l.p(i[1]),r&1&&o!==(o=(s=i[0])==null?void 0:s.toISOString())&&_(t,"datetime",o)},d(i){i&&d(a)}}}function I(n){let a,e=n[0]&&n[1]&&h(n);return{c(){e&&e.c(),a=m()},l(t){e&&e.l(t),a=m()},m(t,l){e&&e.m(t,l),k(t,a,l)},p(t,[l]){t[0]&&t[1]?e?e.p(t,l):(e=h(t),e.c(),e.m(a.parentNode,a)):e&&(e.d(1),e=null)},i:c,o:c,d(t){t&&d(a),e&&e.d(t)}}}function E(n,a,e){let t,{created_at:l=null}=a,{locale:o="en"}=a;return n.$$set=i=>{"created_at"in i&&e(0,l=i.created_at),"locale"in i&&e(2,o=i.locale)},n.$$.update=()=>{n.$$.dirty&5&&e(1,t=new Intl.DateTimeFormat(o).format(l))},[l,t,o]}class H extends w{constructor(a){super(),C(this,a,E,I,b,{created_at:0,locale:2})}}H.__docgen={version:3,name:"Created.svelte",data:[{keywords:[{name:"type",description:"{Date | null}"}],visibility:"public",description:"Date object for created time.",name:"created_at",kind:"let",static:!1,readonly:!1,type:{kind:"union",text:"Date | null",type:[{kind:"type",text:"Date",type:"Date"},{kind:"type",text:"null",type:"null"}]},defaultValue:null},{keywords:[],visibility:"public",description:"Locale to format the datetime according to.",name:"locale",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"en"}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};export{H as C};