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BAAsB,CACrB,KACA,KACA,KACA,MAED,gBAAiB,CAChB,KACA,KACA,KACA,MAED,oBAAqB,CACpB,KACA,KACA,KACA,OAGF,SAASY,EAAoBC,GAC5B,IAAIC,EAAoBC,EAAEf,EAAKa,GAC9B,OAAOG,QAAQC,UAAUC,MAAK,WAC7B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBP,EAAM,KAEjD,MADAM,EAAEE,KAAO,mBACHF,CACP,IAGD,IAAIG,EAAMtB,EAAIa,GAAMU,EAAKD,EAAI,GAC7B,OAAON,QAAQQ,IAAIF,EAAInB,MAAM,GAAGH,IAAIc,EAAoBK,IAAID,MAAK,WAChE,OAAOJ,EAAoBS,EAC5B,GACD,CACAX,EAAoBrC,KAAO,WAAa,OAAOD,OAAOC,KAAKyB,EAAM,EACjEY,EAAoBW,GAAK,KACzBE,EAAOC,QAAUd,C","sources":["webpack://platypush/./src/components/panels/Switches/Index.vue","webpack://platypush/./src/components/panels/Switches/Index.vue?3eac","webpack://platypush/./src/components/panels/Switches|lazy|/^\\.\\/.*\\/Index$/|groupOptions: {}|namespace object"],"sourcesContent":["<template>\n <div class=\"switches-container\">\n <Loading v-if=\"loading\" />\n\n <div class=\"switch-plugins\">\n <div class=\"no-content\" v-if=\"!Object.keys(plugins).length\">No switch plugins configured</div>\n\n <div class=\"switch-plugin\" v-for=\"pluginName in Object.keys(plugins)\" :key=\"pluginName\"\n @click=\"selectedPlugin = selectedPlugin === pluginName ? null : pluginName\">\n <div class=\"header\" :class=\"{selected: selectedPlugin === pluginName}\">\n <div class=\"name col-10\" v-text=\"pluginName\" />\n <div class=\"refresh col-2\" v-if=\"selectedPlugin === pluginName\">\n <button @click.stop=\"bus.emit('refresh', pluginName)\" title=\"Refresh plugin\" :disabled=\"loading\">\n <i class=\"fa fa-sync\" />\n </button>\n </div>\n </div>\n\n <div class=\"body\" :class=\"{hidden: selectedPlugin !== pluginName}\">\n <component :is=\"components[pluginName]\" :config=\"plugins[pluginName]\" :plugin-name=\"pluginName\"\n :selected=\"selectedPlugin === pluginName\" :bus=\"bus\" />\n </div>\n </div>\n </div>\n\n <div class=\"refresh-button\">\n <button @click=\"refresh\" :disabled=\"loading\" title=\"Refresh plugins\">\n <i class=\"fa fa-sync\" />\n </button>\n </div>\n </div>\n</template>\n\n<script>\nimport Loading from \"@/components/Loading\";\nimport Utils from \"@/Utils\";\nimport {defineAsyncComponent} from \"vue\";\nimport mitt from \"mitt\";\n\nexport default {\n name: \"Switches\",\n components: {Loading},\n mixins: [Utils],\n\n data() {\n return {\n loading: false,\n plugins: {},\n components: {},\n selectedPlugin: null,\n bus: mitt(),\n }\n },\n\n methods: {\n initPanels() {\n this.components = {}\n\n Object.keys(this.plugins).forEach(async (pluginName) => {\n const componentName = pluginName.split('.').map((token) => token[0].toUpperCase() + token.slice(1)).join('')\n let comp = null\n try {\n comp = await import(`@/components/panels/Switches/${componentName}/Index`)\n } catch (e) {\n return\n }\n\n const component = defineAsyncComponent(async () => { return comp })\n this.$options.components[pluginName] = component\n this.components[pluginName] = component\n })\n },\n\n async refresh() {\n this.loading = true\n\n try {\n this.plugins = await this.request('utils.get_switch_plugins')\n this.initPanels()\n } finally {\n this.loading = false\n }\n },\n },\n\n mounted() {\n this.refresh()\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"vars\";\n\n.switches-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: auto;\n\n .switch-plugins {\n background: $background-color;\n display: flex;\n flex-direction: column;\n box-shadow: $border-shadow-bottom-right;\n\n @media screen and (max-width: calc(#{$tablet - 1px})) {\n width: 100%;\n }\n\n @media screen and (min-width: $tablet) {\n width: 90%;\n border-radius: 1em;\n margin-top: 2em;\n }\n\n @media screen and (min-width: $desktop) {\n width: 500pt;\n margin-top: 3em;\n }\n }\n\n .no-content {\n padding: 1.5em;\n }\n\n .switch-plugin {\n display: flex;\n flex-direction: column;\n\n .header {\n display: flex;\n align-items: center;\n padding: 1em 1.5em 1em .5em;\n text-transform: uppercase;\n letter-spacing: .075em;\n border-bottom: $default-border-2;\n cursor: pointer;\n\n &:hover {\n background: $hover-bg;\n }\n\n &.selected {\n background: $selected-bg;\n box-shadow: $border-shadow-bottom-right;\n border: none;\n }\n\n .refresh {\n text-align: right;\n }\n\n button {\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n\n &:hover {\n color: $default-hover-fg-2;\n }\n }\n }\n\n @media screen and (min-width: $tablet) {\n &:first-child {\n .header {\n border-radius: 1em 1em 0 0;\n }\n }\n\n &:last-child {\n .header {\n border-radius: 0 0 1em 1em;\n }\n }\n }\n\n .body {\n display: flex;\n border: $default-border-2;\n border-bottom: 0;\n box-shadow: $border-shadow-bottom;\n }\n }\n\n .refresh-button {\n position: fixed;\n bottom: 1.5em;\n right: 1.5em;\n\n button {\n width: 4em;\n height: 4em;\n border-radius: 2em;\n background: $refresh-button-bg;\n color: $refresh-button-fg;\n border: none;\n box-shadow: $border-shadow-bottom-right;\n\n &:hover {\n color: $default-hover-fg-2;\n }\n\n &:disabled {\n opacity: .7;\n }\n }\n }\n}\n</style>\n","import { render } from \"./Index.vue?vue&type=template&id=eac2ea44&scoped=true\"\nimport script from \"./Index.vue?vue&type=script&lang=js\"\nexport * from \"./Index.vue?vue&type=script&lang=js\"\n\nimport \"./Index.vue?vue&type=style&index=0&id=eac2ea44&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-eac2ea44\"]])\n\nexport default __exports__","var map = {\n\t\"./LightHue/Index\": [\n\t\t2844,\n\t\t3490,\n\t\t6590,\n\t\t2844\n\t],\n\t\"./Smartthings/Index\": [\n\t\t9196,\n\t\t3490,\n\t\t6590,\n\t\t9196\n\t],\n\t\"./SwitchTplink/Index\": [\n\t\t3785,\n\t\t3490,\n\t\t6590,\n\t\t3785\n\t],\n\t\"./SwitchWemo/Index\": [\n\t\t5210,\n\t\t3490,\n\t\t6590,\n\t\t5210\n\t],\n\t\"./Switchbot/Index\": [\n\t\t9694,\n\t\t3490,\n\t\t6590,\n\t\t9694\n\t],\n\t\"./SwitchbotBluetooth/Index\": [\n\t\t9694,\n\t\t3490,\n\t\t6590,\n\t\t9694\n\t],\n\t\"./ZigbeeMqtt/Index\": [\n\t\t5466,\n\t\t3490,\n\t\t6590,\n\t\t5466\n\t],\n\t\"./Zwave/Index\": [\n\t\t7262,\n\t\t3490,\n\t\t6590,\n\t\t7262\n\t],\n\t\"./ZwaveMqtt/Index\": [\n\t\t2380,\n\t\t3490,\n\t\t6590,\n\t\t2380\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function() { return Object.keys(map); };\nwebpackAsyncContext.id = 6371;\nmodule.exports = webpackAsyncContext;"],"names":["class","loading","Object","keys","plugins","length","pluginName","key","selectedPlugin","bus","emit","title","disabled","components","config","selected","refresh","name","Loading","mixins","Utils","data","methods","initPanels","this","forEach","componentName","split","map","token","toUpperCase","slice","join","comp","component","$options","request","mounted","__exports__","render","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","Error","code","ids","id","all","module","exports"],"sourceRoot":""}