platypush/platypush/backend/http/webapp/dist/static/js/9651.2bef8385.js.map

1 line
8.9 KiB
Plaintext

{"version":3,"file":"static/js/9651.2bef8385.js","mappings":"qMACOA,MAAM,4B,GACJA,MAAM,Q,GACJA,MAAM,c,GAQNA,MAAM,yB,qBAINA,MAAM,sC,2FAdf,QAoBM,MApBN,EAoBM,EAnBJ,OAkBM,MAlBN,EAkBM,EAjBJ,OAMM,MANN,EAMM,EALJ,QAImB,GAHhBC,OAAQ,EAAAC,MACRC,KAAM,EAAAA,KACNC,QAAS,EAAAA,QACTC,MAAO,EAAAA,OAJV,+CAOF,OAEM,MAFN,EAEM,EADJ,OAAwC,OAAnCL,MAAM,O,aAAO,QAAmB,EAAN,MAACM,OAAhC,aAGF,OAIM,MAJN,EAIM,CADgB,MAAZ,EAAAC,eAAY,WAFpB,QAEgC,Q,MAF1BP,MAAM,gB,aACV,QAA2B,EAAP,mBADtB,gC,yBAYR,MAAMQ,EAAa,CACjB,CACEC,UAAW,OACXC,MAAO,UACPR,MAAO,IAET,CACEO,UAAW,iBACXC,MAAO,UACPR,MAAO,MAET,CACEO,UAAW,OACXC,MAAO,UACPR,MAAO,MAET,CACEO,UAAW,UACXC,MAAO,UACPR,MAAO,MAET,CACEO,UAAW,MACXC,MAAO,UACPR,MAAO,KAET,CACEO,UAAW,QACXC,MAAO,UACPR,MAAO,MAIX,OACEI,KAAM,UACNK,WAAY,CAACC,WAAU,cACvBC,OAAQ,CAACC,EAAA,YAETC,SAAU,CACRR,eACE,GAAyB,MAArBS,KAAKd,OAAOA,MACd,OAAO,KAET,MAAMe,EAAMD,KAAKd,MAAMe,KAAO,EACxBC,EAAMF,KAAKd,MAAMgB,KAAO,IAC9B,OAAS,IAAMF,KAAKd,MAAMA,OAAUgB,EAAMD,IAAME,QAAQ,EACzD,EAEDhB,OACE,MAAMA,EAAO,IAAKa,KAAKd,MAAMkB,MAAMjB,MAAQ,CAAC,GAC5C,IAAID,EAAQc,KAAKT,aACbc,EAAYb,EAAW,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AKe,YAAcf,KAAKX,MAAQ,CAAC,WAAcW,KAAKe,WAAa,CAAC,CAC1E,EAEDG,yBACE,MAAM/B,EAAO,IAAIa,KAAK8B,cAGtB,OAFI9B,KAAKe,kBACA5B,EAAKO,MACPP,CACR,EAEDkC,OACE,IAAIY,EAAcjC,KAAKf,OAAOoC,MAAQ,GACtC,OAAOY,EAAWC,OAAO,GAAGC,cAAgBF,EAAWG,MAAM,EAC9D,I,UCrEL,MAAMxB,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O","sources":["webpack://platypush/./src/components/panels/Entities/Battery.vue","webpack://platypush/./src/components/panels/Entities/Battery.vue?1b53","webpack://platypush/./src/components/panels/Entities/EntityIcon.vue","webpack://platypush/./src/components/panels/Entities/EntityIcon.vue?8abc"],"sourcesContent":["<template>\n <div class=\"entity battery-container\">\n <div class=\"head\">\n <div class=\"col-1 icon\">\n <EntityIcon\n :entity=\"value\"\n :icon=\"icon\"\n :loading=\"loading\"\n :error=\"error\" />\n </div>\n\n <div class=\"col-s-8 col-m-9 label\">\n <div class=\"name\" v-text=\"value.name\" />\n </div>\n\n <div class=\"col-s-3 col-m-2 buttons pull-right\">\n <span class=\"value-percent\"\n v-text=\"valuePercent + '%'\"\n v-if=\"valuePercent != null\" />\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport EntityMixin from \"./EntityMixin\"\nimport EntityIcon from \"./EntityIcon\"\n\nconst thresholds = [\n {\n iconClass: 'full',\n color: '#157145',\n value: 0.9,\n },\n {\n iconClass: 'three-quarters',\n color: '#94C595',\n value: 0.825,\n },\n {\n iconClass: 'half',\n color: '#F0B67F',\n value: 0.625,\n },\n {\n iconClass: 'quarter',\n color: '#FE5F55',\n value: 0.375,\n },\n {\n iconClass: 'low',\n color: '#CC444B',\n value: 0.15,\n },\n {\n iconClass: 'empty',\n color: '#EC0B43',\n value: 0.05,\n },\n]\n\nexport default {\n name: 'Battery',\n components: {EntityIcon},\n mixins: [EntityMixin],\n\n computed: {\n valuePercent() {\n if (this.value?.value == null)\n return null\n\n const min = this.value.min || 0\n const max = this.value.max || 100\n return ((100 * this.value.value) / (max - min)).toFixed(0)\n },\n\n icon() {\n const icon = {...(this.value.meta?.icon || {})}\n let value = this.valuePercent\n let threshold = thresholds[0]\n\n if (value != null) {\n value = parseFloat(value) / 100\n for (const t of thresholds) {\n if (value > t.value)\n break\n threshold = t\n }\n }\n\n icon['class'] = `fas fa-battery-${threshold.iconClass}`\n icon['color'] = threshold.color\n return icon\n },\n },\n\n methods: {\n prevent(event) {\n event.stopPropagation()\n return false\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"common\";\n\n.battery-container {\n .head {\n .value-percent {\n font-size: 1.1em;\n font-weight: bold;\n opacity: 0.7;\n }\n }\n}\n</style>\n","import { render } from \"./Battery.vue?vue&type=template&id=fb9c9926&scoped=true\"\nimport script from \"./Battery.vue?vue&type=script&lang=js\"\nexport * from \"./Battery.vue?vue&type=script&lang=js\"\n\nimport \"./Battery.vue?vue&type=style&index=0&id=fb9c9926&lang=scss&scoped=true\"\n\nimport exportComponent from \"/home/blacklight/git_tree/platypush/platypush/backend/http/webapp/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-fb9c9926\"]])\n\nexport default __exports__","<template>\n <div class=\"entity-icon-container\"\n :class=\"{'with-color-fill': !!colorFill}\"\n :style=\"colorFillStyle\">\n <img src=\"@/assets/img/spinner.gif\" class=\"loading\" v-if=\"loading\">\n <i class=\"fas fa-circle-exclamation error\" v-else-if=\"error\" />\n <Icon v-bind=\"computedIconNormalized\" v-else />\n </div>\n</template>\n\n<script>\nimport Icon from \"@/components/elements/Icon\";\n\nexport default {\n name: \"EntityIcon\",\n components: {Icon},\n props: {\n loading: {\n type: Boolean,\n default: false,\n },\n\n error: {\n type: Boolean,\n default: false,\n },\n\n entity: {\n type: Object,\n required: true,\n },\n\n icon: {\n type: Object,\n default: () => {},\n },\n\n hasColorFill: {\n type: Boolean,\n default: false,\n },\n },\n\n data() {\n return {\n component: null,\n modalVisible: false,\n }\n },\n\n computed: {\n computedIcon() {\n let icon = {...(this.entity?.meta?.icon || {})}\n if (Object.keys(this.icon || {}).length)\n icon = this.icon\n return {...icon}\n },\n\n colorFill() {\n return this.hasColorFill && this.computedIcon.color\n },\n\n colorFillStyle() {\n return this.colorFill && !this.error ? {'background': this.colorFill} : {}\n },\n\n computedIconNormalized() {\n const icon = {...this.computedIcon}\n if (this.colorFill)\n delete icon.color\n return icon\n },\n\n type() {\n let entityType = (this.entity.type || '')\n return entityType.charAt(0).toUpperCase() + entityType.slice(1)\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"vars\";\n\n.entity-icon-container {\n width: 1.625em;\n height: 1.5em;\n display: inline-flex;\n margin-top: 0.25em;\n margin-left: 0.25em;\n position: relative;\n text-align: center;\n justify-content: center;\n align-items: center;\n\n &.with-color-fill {\n border-radius: 1em;\n }\n\n .loading {\n position: absolute;\n bottom: 0;\n transform: translate(0%, -50%);\n width: 1em;\n height: 1em;\n }\n\n .error {\n color: $error-fg;\n }\n}\n</style>\n","import { render } from \"./EntityIcon.vue?vue&type=template&id=4fad24e6&scoped=true\"\nimport script from \"./EntityIcon.vue?vue&type=script&lang=js\"\nexport * from \"./EntityIcon.vue?vue&type=script&lang=js\"\n\nimport \"./EntityIcon.vue?vue&type=style&index=0&id=4fad24e6&lang=scss&scoped=true\"\n\nimport exportComponent from \"/home/blacklight/git_tree/platypush/platypush/backend/http/webapp/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-4fad24e6\"]])\n\nexport default __exports__"],"names":["class","entity","value","icon","loading","error","name","valuePercent","thresholds","iconClass","color","components","EntityIcon","mixins","EntityMixin","computed","this","min","max","toFixed","meta","threshold","parseFloat","t","methods","prevent","event","stopPropagation","__exports__","render","src","colorFill","style","colorFillStyle","computedIconNormalized","Icon","props","type","Boolean","default","Object","required","hasColorFill","data","component","modalVisible","computedIcon","keys","length","entityType","charAt","toUpperCase","slice"],"sourceRoot":""}