platypush/platypush/backend/http/webapp/dist/static/js/3077.af4019ef.js.map

1 line
13 KiB
Plaintext

{"version":3,"file":"static/js/3077.af4019ef.js","mappings":"0QAMM,OAEM,OAFDA,MAAM,UAAQ,EACjB,OAAmB,OAAdA,MAAM,UADb,K,GAGMA,MAAM,S,0CARhB,QAYM,OAZDA,OAAK,SAAC,eAAc,UAAoB,EAAAC,YAAY,QAAK,8BAAO,EAAAC,SAAA,EAAAA,WAAA,IAAO,YAA5E,EAEE,OAAwC,SAAjCC,KAAK,WAAYC,QAAS,EAAAC,OAAjC,WACA,OAQQ,cANN,GAGA,OAEO,OAFP,EAEO,EADL,QAAQ,sCATd,E,CAgBF,OACEC,KAAM,eACNC,MAAO,CAAC,SACRC,MAAO,CACLH,MAAO,CACLF,KAAMM,QACNC,SAAS,GAGXT,SAAU,CACRE,KAAMM,QACNC,SAAS,IAIbC,QAAS,CACPT,QAAQU,GACN,GAAIC,KAAKZ,SACP,OAAO,EAETY,KAAKC,MAAM,QAASF,EACrB,I,UC/BL,MAAMG,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O,+GCROhB,MAAM,sC,GACJA,MAAM,Q,GACJA,MAAM,c,GAONA,MAAM,e,qBAINA,MAAM,8B,oGAbf,QAqBM,MArBN,EAqBM,EApBJ,OAmBM,MAnBN,EAmBM,EAlBJ,OAKM,MALN,EAKM,EAJJ,QAGmB,GAFhBiB,OAAQ,EAAAZ,MACRa,QAAS,EAAAA,QACTC,MAAO,EAAAA,OAHV,wCAMF,OAEM,MAFN,EAEM,EADJ,OAAwC,OAAnCnB,MAAM,O,aAAO,QAAmB,EAAN,MAACM,OAAhC,aAGF,OAMM,MANN,EAMM,EALJ,QAIgB,GAHbD,MAAO,EAAAe,OAAOC,UACdpB,SAAU,EAAAiB,QACV,QAAO,EAAAI,QACP,QAAK,sBAAN,QAAW,YAJb,4C,gCAeR,GACEhB,KAAM,mBACNiB,WAAY,CAACC,aAAD,I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AAGS,SAC/BT,EAAO9B,KAAK8B,MACP,IAAIA,EACZ,EAEDP,YACE,OAAOvB,KAAK+B,cAAgB/B,KAAKoC,aAAaI,KAC/C,EAEDf,iBACE,OAAOzB,KAAKuB,YAAcvB,KAAKM,MAAQ,CAAC,WAAcN,KAAKuB,WAAa,CAAC,CAC1E,EAEDG,yBACE,MAAMI,EAAO,IAAI9B,KAAKoC,cAGtB,OAFIpC,KAAKuB,kBACAO,EAAKU,MACPV,CACR,EAEDxC,OACE,IAAImD,EAAczC,KAAKI,OAAOd,MAAQ,GACtC,OAAOmD,EAAWC,OAAO,GAAGC,cAAgBF,EAAWG,MAAM,EAC9D,I,UCrEL,MAAM1C,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O","sources":["webpack://platypush/./src/components/elements/ToggleSwitch.vue","webpack://platypush/./src/components/elements/ToggleSwitch.vue?94aa","webpack://platypush/./src/components/panels/Entities/BluetoothService.vue","webpack://platypush/./src/components/panels/Entities/BluetoothService.vue?3095","webpack://platypush/./src/components/panels/Entities/EntityIcon.vue","webpack://platypush/./src/components/panels/Entities/EntityIcon.vue?8abc"],"sourcesContent":["<template>\n <div class=\"power-switch\" :class=\"{disabled: disabled}\" @click.stop=\"onInput\">\n <!--suppress HtmlFormInputWithoutLabel -->\n <input type=\"checkbox\" :checked=\"value\">\n <label>\n <!--suppress HtmlUnknownTag -->\n <div class=\"switch\">\n <div class=\"dot\" />\n </div>\n <span class=\"label\">\n <slot />\n </span>\n </label>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"ToggleSwitch\",\n emits: ['input'],\n props: {\n value: {\n type: Boolean,\n default: false,\n },\n\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n methods: {\n onInput(event) {\n if (this.disabled)\n return false\n\n this.$emit('input', event)\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.power-switch {\n position: relative;\n transition: transform .3s;\n transform: scale(var(--scale, 1)) translateZ(0);\n\n &:active {\n --scale: .96;\n }\n\n &.disabled {\n opacity: 0.6;\n }\n\n input {\n display: none;\n & + label {\n border-radius: 1em;\n display: inline-flex;\n cursor: pointer;\n position: relative;\n transition: box-shadow .4s;\n\n &:before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n border-radius: inherit;\n background: none;\n opacity: var(--gradient, 0);\n transition: opacity .4s;\n }\n\n .switch {\n position: relative;\n display: inline-block;\n vertical-align: top;\n height: 1.4em;\n width: 2.5em;\n border-radius: 1em;\n background: $slider-bg;\n box-shadow: inset 1px 0px 3px 0 $slider-track-shadow;\n\n &:before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n border-radius: inherit;\n background: $slider-progress-bg;\n opacity: var(--gradient, 0);\n transition: opacity .4s;\n }\n\n .dot {\n background: $toggle-dot-bg;\n position: absolute;\n width: 1.5em;\n height: 1.5em;\n border-radius: 50%;\n box-shadow: 1px 0px 3.5px 0 $slider-thumb-shadow;\n left: -0.25em;\n top: -0.05em;\n transform: translateX(var(--offset, 0));\n transition: transform .4s, box-shadow .4s;\n\n &:before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n border-radius: inherit;\n background: $toggle-selected-dot-bg;\n opacity: var(--gradient, 0);\n transition: opacity .4s;\n }\n }\n }\n\n span {\n line-height: 2em;\n font-size: 1.2em;\n color: var(--text, #646B8C);\n font-weight: 500;\n display: inline-block;\n vertical-align: top;\n position: relative;\n margin-left: 0.5em;\n transition: color .4s;\n }\n\n & + span {\n text-align: center;\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n top: 100%;\n opacity: 0;\n font-size: 1em;\n font-weight: 500;\n color: $slider-bg;\n transform: translateY(0.2em);\n transition: opacity .4s, transform .4s;\n }\n }\n\n &:not(:checked) {\n & + label {\n pointer-events: none;\n & + span {\n opacity: 1;\n transform: translateY(0.6em);\n }\n }\n }\n\n &:checked {\n & + label {\n --offset: 1.5em;\n --text: $slider-progress-bg;\n --gradient: 1;\n --shadow: rgba(0, 39, 6, .1);\n }\n }\n }\n}\n</style>\n","import { render } from \"./ToggleSwitch.vue?vue&type=template&id=a6396ae8&scoped=true\"\nimport script from \"./ToggleSwitch.vue?vue&type=script&lang=js\"\nexport * from \"./ToggleSwitch.vue?vue&type=script&lang=js\"\n\nimport \"./ToggleSwitch.vue?vue&type=style&index=0&id=a6396ae8&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-a6396ae8\"]])\n\nexport default __exports__","<template>\n <div class=\"entity bluetooth-service-container\">\n <div class=\"head\">\n <div class=\"col-1 icon\">\n <EntityIcon\n :entity=\"value\"\n :loading=\"loading\"\n :error=\"error\" />\n </div>\n\n <div class=\"col-9 label\">\n <div class=\"name\" v-text=\"value.name\" />\n </div>\n\n <div class=\"col-2 connector pull-right\">\n <ToggleSwitch\n :value=\"parent.connected\"\n :disabled=\"loading\" \n @input=\"connect\"\n @click.stop />\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport ToggleSwitch from \"@/components/elements/ToggleSwitch\"\nimport EntityIcon from \"./EntityIcon\"\nimport EntityMixin from \"./EntityMixin\"\n\nexport default {\n name: 'BluetoothService',\n components: {ToggleSwitch, EntityIcon},\n mixins: [EntityMixin],\n\n methods: {\n async connect(event) {\n event.stopPropagation()\n this.$emit('loading', true)\n\n try {\n await this.request('bluetooth.connect', {\n device: this.parent.address,\n service_uuid: this.uuid,\n })\n } finally {\n this.$emit('loading', false)\n }\n },\n\n async disconnect(event) {\n event.stopPropagation()\n this.$emit('loading', true)\n\n try {\n await this.request('bluetooth.disconnect', {\n device: this.parent.address,\n })\n } finally {\n this.$emit('loading', false)\n }\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"common\";\n\n.switch-container {\n .switch {\n direction: rtl;\n }\n}\n</style>\n","import { render } from \"./BluetoothService.vue?vue&type=template&id=a94a2cfa&scoped=true\"\nimport script from \"./BluetoothService.vue?vue&type=script&lang=js\"\nexport * from \"./BluetoothService.vue?vue&type=script&lang=js\"\n\nimport \"./BluetoothService.vue?vue&type=style&index=0&id=a94a2cfa&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-a94a2cfa\"]])\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","disabled","onInput","type","checked","value","name","emits","props","Boolean","default","methods","event","this","$emit","__exports__","render","entity","loading","error","parent","connected","connect","components","ToggleSwitch","EntityIcon","mixins","EntityMixin","async","stopPropagation","request","device","address","service_uuid","uuid","src","colorFill","style","colorFillStyle","computedIconNormalized","Icon","Object","required","icon","hasColorFill","data","component","modalVisible","computed","computedIcon","meta","keys","length","color","entityType","charAt","toUpperCase","slice"],"sourceRoot":""}