1import{A as m,r as u,t as c}from"./lit.DbNriq8W.js";import{G as s}from"./graphql-element.G-F3P3Q1.js";import{d as k,I as p,p as v,g as N}from"./atom.Buo3ADfN.js";import"./settings.DVV_Jmfg.js";import"./util.BCLdrt3j.js";import"./graphql.Hq5qrITd.js";import"./base-element.CUDnHYVs.js";import"./rich-text-html-renderer.es5.D4rTbbuL.js";import"./index.DHcnIGZy.js";import"./_commonjsHelpers.Cpj98o6Y.js";import"./marks.B7E1ViE9.js";const S=":host{display:contents}",y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Counter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"preview"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"locale"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"counter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"locale"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}},{kind:"Argument",name:{kind:"Name",value:"preview"},value:{kind:"Variable",name:{kind:"Name",value:"preview"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Counter"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"Counter"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Counter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]};var b=Object.getOwnPropertyDescriptor,f=(t,e,d,r)=>{for(var n=r>1?void 0:r?b(e,d):e,a=t.length-1,i;a>=0;a--)(i=t[a])&&(n=i(n)||n);return n};let o=class extends s{constructor(){super(),this.query=y}render(){var e;const t=(e=this.data)==null?void 0:e.counter;return t?k({class:{"text-center":!0},slot:{content:[p({class:{block:!0,"text-3xl":!0,"leading-8":!0,"font-black":!0},"data-start":t.start,"data-end":t.end,"data-current":t.start,slot:{content:t.start.toLocaleString(this.locale)}}),v({class:{"mb-0":!0,"font-bold":!0},slot:{content:t.text}})]}}):m}updated(t){super.updated(t),this.shadowRoot.querySelectorAll("output").forEach(e=>{const r=e.dataset.end,n=()=>{const a=+r,i=+e.dataset.current,l=a/500;i<a?(e.dataset.current=Math.ceil(i+l).toString(),e.innerText=Math.ceil(i+l).toLocaleString(this.locale),setTimeout(n,10)):(e.dataset.current=Math.ceil(i+l).toString(),e.innerText=a.toLocaleString(this.locale))};n()})}};o.browserStyles=[...s.browserStyles,N(),u(S)];o=f([c("fa-counter")],o);export{o as Counter};
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.