Files
waybar-online/assets/battery-BJphxynz.js

3 lines
9.0 KiB
JavaScript
Raw Normal View History

function _(e){Object.defineProperty(e,"__esModule",{value:!0,configurable:!0})}function A(e,c,a,o){Object.defineProperty(e,c,{get:a,set:o,enumerable:!0,configurable:!0})}var R={};_(R);A(R,"default",()=>U);class U extends Error{constructor(c,a,o,m,s){super(c+":"+o+":"+m+": "+a),this.reason=a,this.filename=c,this.line=o,this.column=m,this.source=s}}var z={};_(z);A(z,"default",()=>H);class H{constructor(c,a,o){this.start=c,this.end=a,this.source=o}}var oe={};A(oe,"CssTypes",()=>x);var x=function(e){return e.stylesheet="stylesheet",e.rule="rule",e.declaration="declaration",e.comment="comment",e.container="container",e.charset="charset",e.document="document",e.customMedia="custom-media",e.fontFace="font-face",e.host="host",e.import="import",e.keyframes="keyframes",e.keyframe="keyframe",e.layer="layer",e.media="media",e.namespace="namespace",e.page="page",e.startingStyle="starting-style",e.supports="supports",e}({});const Q=1e4,N=(e,c,a)=>{let o=a,m=Q;do{const s=c.map(h=>e.indexOf(h,o));s.push(e.indexOf("\\",o));const $=s.filter(h=>h!==-1);if($.length===0)return-1;const r=Math.min(...$);if(e[r]==="\\")o=r+2,m--;else return r}while(m>0);throw new Error("Too many escaping")},E=(e,c,a)=>{let o=a,m=Q;do{const s=c.map(i=>e.indexOf(i,o));s.push(e.indexOf("(",o)),s.push(e.indexOf('"',o)),s.push(e.indexOf("'",o)),s.push(e.indexOf("\\",o));const $=s.filter(i=>i!==-1);if($.length===0)return-1;const r=Math.min(...$);switch(e[r]){case"\\":o=r+2;break;case"(":{const i=E(e,[")"],r+1);if(i===-1)return-1;o=i+1}break;case'"':{const i=N(e,['"'],r+1);if(i===-1)return-1;o=i+1}break;case"'":{const i=N(e,["'"],r+1);if(i===-1)return-1;o=i+1}break;default:return r}m--}while(m>0);throw new Error("Too many escaping")},ce=(e,c)=>{const a=[];let o=0;for(;o<e.length;){const m=E(e,c,o);if(m===-1)return a.push(e.substring(o)),a;a.push(e.substring(o,m)),o=m+1}return a},L=/\/\*[^]*?(?:\*\/|$)/g,se=(e,c)=>{c=c||{};let a=1,o=1;function m(n){const t=n.match(/\n/g);t&&(a+=t.length);const u=n.lastIndexOf(`
`);o=~u?n.length-u:o+n.length}function s(){const n={line:a,column:o};return function(t){return t.position=new H(n,{line:a,column:o},c?.source||""),b(),t}}const $=[];function r(n){const t=new U(c?.source||"",n,a,o,e);if(c?.silent)$.push(t);else throw t}function h(){const n=y();return{type:x.stylesheet,stylesheet:{source:c?.source,rules:n,parsingErrors:$}}}function i(){const n=/^{\s*/.exec(e);return n?(f(n),!0):!1}function d(){const n=/^}/.exec(e);return n?(f(n),!0):!1}function y(){let n;const t=[];for(b(),p(t);e.length&&e.charAt(0)!=="}"&&(n=ne()||re());)n&&(t.push(n),p(t));return t}function f(n){const t=n[0];return m(t),e=e.slice(t.length),n}function b(){const n=/^\s*/.exec(e);n&&f(n)}function p(n){let t;for(n=n||[];t=V();)t&&n.push(t);return n}function V(){const n=s();if(e.charAt(0)!=="/"||e.charAt(1)!=="*")return;const t=/^\/\*[^]*?\*\//.exec(e);return t?(f(t),n({type:x.comment,comment:t[0].slice(2,-2)})):r("End of comment missing")}function S(){const n=/^([^{]+)/.exec(e);if(!n)return;f(n);const t=w(n[0]).replace(L,"");return ce(t,[","]).map(u=>w(u))}function k(){const n=s(),t=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);if(!t)return;f(t);const u=w(t[0]),l=/^:\s*/.exec(e);if(!l)return r("property missing ':'");f(l);let g="";const v=E(e,[";","}"]);v!==-1&&(g=e.substring(0,v),f([g]),g=w(g).replace(L,""));const M=n({type:x.declaration,property:u.replace(L,""),value:g}),F=/^[;\s]*/.exec(e);return F&&f(F),M}function I(){const n=[];if(!i())return r("missing '{'");p(n);let t;for(;t=k();)t&&(n.push(t),p(n));return d()?n:r("missing '}'")}function j(){let n;const t=[],u=s();for(;n=/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);){const l=f(n);t.push(l[1]);const g=/^,\s*/.exec(e);g&&f(g)}if(t.length)return u({type:x.keyframe,values:t,declarations:I()||[]})}function B(){const n=s(),t=/^@([-\w]+)?keyframes\s*/.exec(e);if(!t)return;const u=f(t)[1],l=/^([-\w]+)\s*/.exec(e);if(!l)return r("@keyframes missing name");const g=f(l)[1];if(!i())return r("@keyframes missing '{'");let v,M=p();for(;v=j();)M.push(v),M=M.concat(p());return d()?n({type:x.keyframes,name:g,vendor:u,keyframes:M}):r("@keyframes missing '}'")}function W(){const n=s(),t=/^@supports *([^{]+)/.exec(e);if(!t)return;const u=w(f(t)[1]);if(!i())return r("@supports missing '{'");const l=p().concat(y());return d()?n({type:x.supports,supports:u,rules:l}):r("@supports missing '}'")}function q(){const n=s(),t=/^@host\s*/.exec(e);if(!t)return;if(f(t),!i())return r("@host missing '{'");const u=p().concat(y());return d()?n({type:x.host,rules:u}):r("@host missing '}'")}function D(){const n=s(),t=/^@container *([^{]+)/.exec(e);if(!t)return;const u=w(f(t)[1]);if(!i())return r("@container missing '{'");const l=p().concat(y());return d()?n({type:x.container,container:u,rules:l}):r("@container missing '}'")}function G(){const n=s(),t=/^@layer *([^{;@]+)/.exec(e);if(!t)return;const u=w(f(t)[1]);if(!i()){const g=/^[;\s]*/.exec(e);return g&&f(g),n({type:x.layer,layer:u})}const l=p().concat(y());return d()?n({type:x.layer,layer:u,rules:l}):r("@layer missing '}'")}function J(){const n=s(),t=/^@media *([^{]+)/.exec(e);if(!t)return;const u=w(f(t)[1]);if(!i())return r("@media missing '{'");const l=p().concat(y());return d()?n({type:x.media,media:u,rules:l}):r("@media missing '}'")}function K(){const n=s(),t=/^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);if(!t)return;const u=f(t);return n({type:x.customMedia,name:w(u[1]),media:w(u[2])})}function X(){const n=s(),t=/^@page */.exec(e);if(!t)return;f(t);const u=S()||[];if(!i())return r("@page missing '{'");let l=p(),g;for(;g=k();)l.push(g),l=l.concat(p());return d()?n({type:x.page,selectors:u,declarations:l}):r("@page missing '}'")}function Y(){const n=s(),t=/^@([-\w]+)?document *([^{]+)/.exec(e);if(!t)return;const u=f(t),l=w(u[1]),g=w(u[2]);if(!i())return r("@document missing '{'");const v=p().concat(y());return d()?n({type:x.document,document:g,vendor:l,rules:v}):r("@document missing '}'")}function Z(){const n=s(),t=/^@font-face\s*/.exec(e);if(!t)return;if(f(t),!i())return r("@font-face missing '{'");let u=p(),l;for(;l=k();)u.push(l),u=u.c