1import{R as e,b as t,y as n,z as r}from"./runtime-core.esm-bundler-DnuX0c2R.js";var i=`Invalid number`,a=`Invalid rounding method`,o=`Invalid precision`,s=`iec`,c=`jedec`,l=`si`,u=`bit`,d=`bits`,f=`byte`,p=`bytes`,m=`kbit`,h=`kB`,g=`array`,ee=`function`,_=`object`,v=`string`,y=`exponent`,te=`round`,b=`e`,x=``,S=`.`,C=`s`,w=` `,T=`0`,E={symbol:{iec:{bits:[`bit`,`Kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],bytes:[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`]},jedec:{bits:[`bit`,`Kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],bytes:[`B`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`]}},fullform:{iec:[``,`kibi`,`mebi`,`gibi`,`tebi`,`pebi`,`exbi`,`zebi`,`yobi`],jedec:[``,`kilo`,`mega`,`giga`,`tera`,`peta`,`exa`,`zetta`,`yotta`]}},D=[1,1024,1048576,1073741824,1099511627776,0x4000000000000,0x1000000000000000,0x400000000000000000,12089258196146292e8],O=[1,1e3,1e6,1e9,0xe8d4a51000,0x38d7ea4c68000,0xde0b6b3a7640000,1e21,1e24],k=Math.log(1024),A=Math.log(1e3),j={[l]:{isDecimal:!0,ceil:1e3,actualStandard:c},[s]:{isDecimal:!1,ceil:1024,actualStandard:s},[c]:{isDecimal:!1,ceil:1024,actualStandard:c}};function ne(e,t){return j[e]?j[e]:t===2?{isDecimal:!1,ceil:1024,actualStandard:s}:{isDecimal:!0,ceil:1e3,actualStandard:c}}function re(e,t,n,r,i,a,o,s,c,l,d){let p;return p=e>0?0 .toPrecision(e):c&&l>0?0 .toFixed(l):0,o===y?0:(d||=n?E.symbol[t].bits[0]:E.symbol[t].bytes[0],r[d]&&(d=r[d]),i&&(a[0]?d=a[0]:(d=E.fullform[t][0],d+=n?u:f)),o===g?[p,d]:o===_?{value:p,symbol:d,exponent:0,unit:d}:p+s+d)}function M(e,t,n,r,i,a=!0){let o;o=n?O[t]:D[t];let s=e/o;return r&&(s*=8,a&&s>=i&&t<8&&(s/=i,t++)),{result:s,e:t}}function ie(e,t,n,r,i){if(typeof t==`string`&&(t=Number(t)),t===-1||isNaN(t)){if(t=0,r)for(;t<8&&e>=10n**BigInt(3*(t+1));)t++;else for(;t<8&&e>=1024n**BigInt(t+1);)t++}else t=t<0?0:Math.floor(t);return t>8?(i>0&&(i+=8-t),{e:8,precision:i}):{e:t,precision:i}}function N(e,t,n,r,i,a=!0){let o=n?10n**BigInt(3*t):1024n**BigInt(t),s=10n**16n,c=Number(e*s/o)/Number(s);return r&&(c*=8,a&&c>=i&&t<8&&(c/=i,t++)),{result:c,e:t}}function P(e,t,n,r,i,a,s,c,l,u){if(typeof e==`string`&&(e=parseFloat(e)),typeof t!=`number`||isNaN(t)||(t=Math.floor(t),t<1||t>100))throw TypeError(o);let d=e.toPrecision(t),f=u===-1||isNaN(u);if(d.includes(b)&&n<8&&f){n++;let{result:e}=M(r,n,i,a,s),o;o=l>0?10**l:1;let u;u=o===1?c(e):c(e*o)/o,d=u.toPrecision(t)}return{value:d,e:n}}function F(e,t,n,r,i,a,o){let s=e,c=i&&a>0?{minimumFractionDigits:a,maximumFractionDigits:a}:void 0;if(t===!0)s=s.toLocaleString(void 0,c);else if(t.length>0)s=s.toLocaleString(t,{...n,...c});else if(r.length>0){if(i&&a>0){let e=10**a;s=o(s*e)/e}s=s.toString().replace(S,r)}if(typeof s==`number`&&isFinite(s)&&s.toString().includes(b)&&(s=s.toLocaleString(`en-US`,{useGrouping:!1})),i&&a>0&&t!==!0&&t.length===0){let e=s.toString(),t=r||S,n=e.split(t),i=n[1]||x;s=`${n[0]}${t}${i.padEnd(a,T)}`}return s}function I(e,t,n,r,i){return typeof t==`string`&&(t=Number(t)),t===-1||isNaN(t)?(t=Math.floor(r?Math.log(e)/A:Math.log(e)/k),t<0&&(t=0)):t=t<0?0:Math.floor(t),t>8?(i>0&&(i+=8-t),{e:8,precision:i}):{e:t,precision:i}}function L(e,t,n,r,i,a){let o;o=n>0&&r>0?10**r:1;let s;return s=o===1?i(e):i(e*o)/o,s===t&&n<8&&a&&(s=1,n++),{value:s,e:n}}function R(e,t,n,r){let i=E.symbol[e][t?d:p],a;return a=r&&n===1?t?m:h:i[n],a}function z(e,t,n,r,i,a,o,s,c,l,d,p,m,h){t&&(e[0]=typeof e[0]==`string`?`-${e[0]}`:e[0]===0?`-0`:-e[0]),n[e[1]]&&(e[1]=n[e[1]]);let g;if(g=typeof e[0]==`string`?parseFloat(e[0]):e[0],e[0]=F(e[0],r,i,a,o,s,h),c){let t;t=m?u:f;let n;n=Math.abs(g)===1?x:C,e[1]=l[p]?l[p]:E.fullform[d][p]+t+n}}function ae(e,t,n,r,i){if(r!==g&&r!==_&&r!==v&&r!==y)throw TypeError(`Invalid output: ${r}`);if(r===g)return e;if(r===_)return{value:e[0],symbol:e[1],exponent:t,unit:n};let a;return a=i===w?`${e[0]} ${e[1]}`:e.join(i),a}function B(e,{bits:t=!1,pad:n=!1,base:r=-1,round:o=2,locale:s=x,localeOptions:c={},separator:l=x,spacer:u=w,symbols:d={},standard:f=x,output:p=v,fullform:m=!1,fullforms:h=[],exponent:g=-1,roundingMethod:_=te,precision:b=0}={}){let S=g,C,T=[],E=0,D=x,O=typeof e==`bigint`;if(C=Number(e),isNaN(C)||!isFinite(C))throw TypeError(i);let{isDecimal:k,ceil:A,actualStandard:j}=ne(f,r),F=m===!0,B=C<0,V=Math[_];if(typeof V!==ee)throw TypeError(a);if(B&&(C=-C),C===0)return re(b,j,t,d,F,h,p,u,n,o);let H=O?B?-BigInt(e):BigInt(e):null,U=b;if(O){let{e,precision:t}=ie(H,S,g,k,b);S=e,U=t}else{let{e,precision:t}=I(C,S,g,k,b);S=e,U=t}let W=g===-1||isNaN(g),G;G=O?N(H,S,k,t,A,W):M(C,S,k,t,A,W),E=G.result,S=G.e;let K=L(E,A,S,o,V,W);if(T[0]=K.value,S=K.e,U>0){let e=P(T[0],U,S,C,k,t,A,V,o,g);T[0]=e.value,S=e.e}return p===y?S:(D=R(j,t,S,k),T[1]=D,z(T,B,d,s,c,l,n,o,F,h,j,S,t,V),ae(T,S,D,p,u))}var V=`/api/counter`,H=`counter-snapshot`,U=1e3,W=6e4,G=()=>{try{return JSON.parse(localStorage.getItem(H)??`null`)}catch{return null}},K=e=>{try{localStorage.setItem(H,JSON.stringify(e))}catch{}},q=r(G()),J=null,Y=0,X=0,Z,Q=()=>
1{if(clearTimeout(Z),J||!Y)return;let e=location.protocol===`https:`?`wss:`:`ws:`,t=new WebSocket(`${e}//${location.host}${V}`);J=t,t.addEventListener(`message`,({data:e})=>{X=0,q.value=JSON.parse(e),K(q.value)}),t.addEventListener(`close`,()=>{J===t&&(J=null,oe())})},oe=()=>{if(!Y||document.hidden)return;let e=Math.min(W,U*2**X++);Z=setTimeout(Q,Math.random()*e)},$=()=>{document.hidden||Q()},se=()=>(n(()=>{Y++===0&&document.addEventListener(`visibilitychange`,$),Q()}),t(()=>{if(--Y>0)return;document.removeEventListener(`visibilitychange`,$),clearTimeout(Z);let e=J;J=null,e?.close()}),e(q)),ce=e=>{let t=JSON.stringify(e);if(J?.readyState===WebSocket.OPEN){J.send(t);return}fetch(V,{method:`POST`,body:t,keepalive:!0}).catch(()=>{})};export{se as n,B as r,ce as t};
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.