UNPKG

homebridge-camera-ui

Version:
1 lines 16 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["camview~dashboard"],{"1a68":function(t,e,n){},"20b6":function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return u}));var r=n("1da1"),i=(n("96cf"),n("99af"),n("365ce")),o="/settings",a="reset",s=function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,n,r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].patch("".concat(o,"/").concat(e).concat(r||""),n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}(),c=function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].get("".concat(o,"/").concat(e));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),u=function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].put("".concat(o,"/").concat(a));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},3835:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,"a",(function(){return s}));n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0");function i(t,e){var n=t&&("undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),e&&o.length===e)break}catch(c){s=!0,i=c}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw i}}return o}}var o=n("06c5");function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){return r(t)||i(t,e)||Object(o["a"])(t,e)||a()}},5336:function(t,e,n){"use strict";n("1a68")},"7db0":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").find,o=n("44d2"),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},b72c:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"fade"},on:{enter:t.enter}},[t.showButton?n("div",[n("div",{staticClass:"wrapper add-new-item d-flex flex-wrap justify-content-center align-content-center add-new-item-hover pulse"},[n("b-icon",{staticClass:"add-icon show-icon",attrs:{icon:"gear-wide-connected",animation:"spin","aria-hidden":"true"},on:{click:function(e){t.show=!t.show}}})],1),n("b-modal",{attrs:{"modal-class":"overflow-hidden","dialog-class":"modal-bottom","hide-footer":"","hide-header":""},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[t.showLeftNavi||t.showRightNavi?n("div",{staticClass:"row pb-4"},[n("div",{staticClass:"col d-flex flex-wrap justify-content-start align-content-center"},[n("b-button",{staticClass:"left-button",attrs:{pill:""},on:{click:function(e){return t.$emit("leftNaviClick")}}},[t._v(t._s(t.leftNaviName))])],1),n("div",{staticClass:"col d-flex flex-wrap justify-content-center align-content-center"},[n("b-button",{staticClass:"middle-button",attrs:{pill:""},on:{click:function(e){return t.$emit("middleNaviClick")}}},[t._v(t._s(t.middleNaviName))])],1),n("div",{staticClass:"col d-flex flex-wrap justify-content-end align-content-center"},[n("b-button",{staticClass:"btn-primary right-button",attrs:{pill:""},on:{click:function(e){return t.$emit("rightNaviClick")}}},[t._v(t._s(t.rightNaviName))])],1)]):t._e(),t.showLeftNavi||t.showRightNavi?n("hr",{staticClass:"mt-0 pt-0"}):t._e(),t._l(t.items,(function(e,r){return n("div",{key:e.name},[n("div",{staticClass:"row"},[n("div",{staticClass:"col d-flex flex-wrap align-content-center"},[t._v(t._s(e.name))]),n("div",{staticClass:"col d-flex flex-wrap align-content-center justify-content-end mt-3"},[n("toggle-button",{attrs:{color:"var(--primary-color) !important",height:30,sync:!0},on:{change:function(n){return t.$emit("changeState",{name:e.name,state:e[t.state]})}},model:{value:e[t.state],callback:function(n){t.$set(e,t.state,n)},expression:"item[state]"}})],1)]),r!==t.items.length-1?n("hr"):n("div",{staticClass:"safe-height"})])}))],2)],1):t._e()])},i=[],o=n("0759"),a=n("7386"),s=n("f206"),c={name:"AddCamera",components:{BIcon:o["a"],BIconGearWideConnected:a["n"],ToggleButton:s["ToggleButton"]},props:{items:{type:Array,required:!0},leftNaviName:{type:String,default:"Back"},middleNaviName:{type:String,default:"Fullscreen"},rightNaviName:{type:String,default:"Signout"},showLeftNavi:{type:Boolean,default:!1},showMiddleNavi:{type:Boolean,default:!1},showRightNavi:{type:Boolean,default:!1},state:{type:String,default:""}},data:function(){return{show:!1,showButton:!1}},watch:{show:function(t){t?this.fadeOutTimer&&(clearTimeout(this.fadeOutTimer),this.fadeOutTimer=null):this.enter()}},beforeDestroy:function(){document.removeEventListener("click",this.clickHandler)},mounted:function(){var t=this;document.addEventListener("click",this.clickHandler),setTimeout((function(){return t.showButton=!0}),250)},methods:{clickHandler:function(t){var e=t.target,n=e.classList.contains("toggleArea");n&&(this.showButton?this.showButton=!1:(this.showButton=!0,this.enter()))},enter:function(){var t=this;this.fadeOutTimer&&(clearTimeout(this.fadeOutTimer),this.fadeOutTimer=null),this.fadeOutTimer=setTimeout((function(){return t.showButton=!1}),1e4)},handleShow:function(){this.show=!this.show,this.enter()}}},u=c,l=(n("5336"),n("2877")),d=Object(l["a"])(u,r,i,!1,null,"601cee7a",null);e["a"]=d.exports},f206:function(t,e,n){(function(e,n){t.exports=n()})(0,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=2)}([function(t,e,n){n(8);var r=n(6)(n(1),n(7),"data-v-25adc6c0",null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o="#75c791",a="#bfcbd9",s="on",c="off",u="#fff";e["default"]={name:"ToggleButton",props:{value:{type:Boolean,default:!1},name:{type:String},disabled:{type:Boolean,default:!1},tag:{type:String},sync:{type:Boolean,default:!1},speed:{type:Number,default:300},color:{type:[String,Object],validator:function(t){return n.i(r["a"])(t)||n.i(r["b"])(t,"checked")||n.i(r["b"])(t,"unchecked")||n.i(r["b"])(t,"disabled")}},switchColor:{type:[String,Object],validator:function(t){return n.i(r["a"])(t)||n.i(r["b"])(t,"checked")||n.i(r["b"])(t,"unchecked")}},cssColors:{type:Boolean,default:!1},labels:{type:[Boolean,Object],default:!1,validator:function(t){return"object"===("undefined"===typeof t?"undefined":i(t))?t.checked||t.unchecked:"boolean"===typeof t}},height:{type:Number,default:22},width:{type:Number,default:50},margin:{type:Number,default:3},fontSize:{type:Number}},computed:{className:function(){var t=this.toggled,e=this.disabled;return["vue-js-switch",{toggled:t,disabled:e}]},coreStyle:function(){return{width:n.i(r["c"])(this.width),height:n.i(r["c"])(this.height),backgroundColor:this.cssColors?null:this.disabled?this.colorDisabled:this.colorCurrent,borderRadius:n.i(r["c"])(Math.round(this.height/2))}},buttonRadius:function(){return this.height-2*this.margin},distance:function(){return n.i(r["c"])(this.width-this.height+this.margin)},buttonStyle:function(){var t="transform "+this.speed+"ms",e=n.i(r["c"])(this.margin),i=this.toggled?n.i(r["d"])(this.distance,e):n.i(r["d"])(e,e),o=this.switchColor?this.switchColorCurrent:null;return{width:n.i(r["c"])(this.buttonRadius),height:n.i(r["c"])(this.buttonRadius),transition:t,transform:i,background:o}},labelStyle:function(){return{lineHeight:n.i(r["c"])(this.height),fontSize:this.fontSize?n.i(r["c"])(this.fontSize):null}},colorChecked:function(){var t=this.color;return n.i(r["e"])(t)?n.i(r["f"])(t,"checked",o):t||o},colorUnchecked:function(){return n.i(r["f"])(this.color,"unchecked",a)},colorDisabled:function(){return n.i(r["f"])(this.color,"disabled",this.colorCurrent)},colorCurrent:function(){return this.toggled?this.colorChecked:this.colorUnchecked},labelChecked:function(){return n.i(r["f"])(this.labels,"checked",s)},labelUnchecked:function(){return n.i(r["f"])(this.labels,"unchecked",c)},switchColorChecked:function(){return n.i(r["f"])(this.switchColor,"checked",u)},switchColorUnchecked:function(){return n.i(r["f"])(this.switchColor,"unchecked",u)},switchColorCurrent:function(){this.switchColor;return n.i(r["e"])(this.switchColor)?this.toggled?this.switchColorChecked:this.switchColorUnchecked:this.switchColor||u}},watch:{value:function(t){this.sync&&(this.toggled=!!t)}},data:function(){return{toggled:!!this.value}},methods:{toggle:function(t){var e=!this.toggled;this.sync||(this.toggled=e),this.$emit("input",e),this.$emit("change",{value:e,tag:this.tag,srcEvent:t})}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n.n(r);n.d(e,"ToggleButton",(function(){return i.a}));var o=!1;e["default"]={install:function(t){o||(t.component("ToggleButton",i.a),o=!0)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u}));var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t){return"string"===typeof t},o=function(t){return"object"===("undefined"===typeof t?"undefined":r(t))},a=function(t,e){return o(t)&&t.hasOwnProperty(e)},s=function(t,e,n){return a(t,e)?t[e]:n},c=function(t){return t+"px"},u=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0px";return"translate3d("+t+", "+e+", "+n+")"}},function(t,e,n){e=t.exports=n(5)(),e.push([t.i,".vue-js-switch[data-v-25adc6c0]{display:inline-block;position:relative;vertical-align:middle;user-select:none;font-size:10px;cursor:pointer}.vue-js-switch .v-switch-input[data-v-25adc6c0]{opacity:0;position:absolute;width:1px;height:1px}.vue-js-switch .v-switch-label[data-v-25adc6c0]{position:absolute;top:0;font-weight:600;color:#fff;z-index:1}.vue-js-switch .v-switch-label.v-left[data-v-25adc6c0]{left:10px}.vue-js-switch .v-switch-label.v-right[data-v-25adc6c0]{right:10px}.vue-js-switch .v-switch-core[data-v-25adc6c0]{display:block;position:relative;box-sizing:border-box;outline:0;margin:0;transition:border-color .3s,background-color .3s;user-select:none}.vue-js-switch .v-switch-core .v-switch-button[data-v-25adc6c0]{display:block;position:absolute;overflow:hidden;top:0;left:0;border-radius:100%;background-color:#fff;z-index:2}.vue-js-switch.disabled[data-v-25adc6c0]{pointer-events:none;opacity:.6}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"===typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"===typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(t,e){t.exports=function(t,e,n,r){var i,o=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(i=t,o=t.default);var s="function"===typeof o?o.options:o;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var c=Object.create(s.computed||null);Object.keys(r).forEach((function(t){var e=r[t];c[t]=function(){return e}})),s.computed=c}return{esModule:i,exports:o,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{class:t.className},[n("input",{staticClass:"v-switch-input",attrs:{type:"checkbox",name:t.name,disabled:t.disabled},domProps:{checked:t.value},on:{change:function(e){return e.stopPropagation(),t.toggle(e)}}}),t._v(" "),n("div",{staticClass:"v-switch-core",style:t.coreStyle},[n("div",{staticClass:"v-switch-button",style:t.buttonStyle})]),t._v(" "),t.labels?[t.toggled?n("span",{staticClass:"v-switch-label v-left",style:t.labelStyle},[t._t("checked",[[t._v(t._s(t.labelChecked))]])],2):n("span",{staticClass:"v-switch-label v-right",style:t.labelStyle},[t._t("unchecked",[[t._v(t._s(t.labelUnchecked))]])],2)]:t._e()],2)},staticRenderFns:[]}},function(t,e,n){var r=n(4);"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(9)("2283861f",r,!0)},function(t,e,n){var r="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i=n(10),o={},a=r&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},d="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(t){for(var e=0;e<t.length;e++){var n=t[e],r=o[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(p(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i<n.parts.length;i++)a.push(p(n.parts[i]));o[n.id]={id:n.id,refs:1,parts:a}}}}function h(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function p(t){var e,n,r=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(d){var i=c++;r=s||(s=h()),e=b.bind(null,r,i,!1),n=b.bind(null,r,i,!0)}else r=h(),e=m.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}t.exports=function(t,e,n){u=n;var r=i(t,e);return f(r),function(e){for(var n=[],a=0;a<r.length;a++){var s=r[a],c=o[s.id];c.refs--,n.push(c)}e?(r=i(t,e),f(r)):r=[];for(a=0;a<n.length;a++){c=n[a];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}};var v=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function b(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=v(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function m(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},function(t,e){t.exports=function(t,e){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],c=o[2],u=o[3],l={id:t+":"+i,css:s,media:c,sourceMap:u};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}}])}))}}]);