Initial commit for volume slider in media player more info card
This commit is contained in:
1 parent
0583d63b67
commit
b30bdbfc6a
6 files changed
+241
-70
No files matched your search
@@ -1,2 +1,2 @@
|
||||
""" DO NOT MODIFY. Auto-generated by build_frontend script """
|
||||
VERSION = "6fb0e76d325bb7472fa25355e60539cd"
|
||||
VERSION = "7317977bfe0a61d1b1c79ed332defb7e"
|
||||
@@ -5872,115 +5872,114 @@ function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});va
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! lodash */6),i=["ACTION_LOG_OUT","ACTION_VALIDATING_AUTH_TOKEN","ACTION_VALID_AUTH_TOKEN","ACTION_INVALID_AUTH_TOKEN","ACTION_FETCH_ALL","ACTION_NEW_CONFIG","ACTION_NEW_EVENTS","ACTION_NEW_SERVICES","ACTION_NEW_STATES","ACTION_NEW_STATE_HISTORY","ACTION_NEW_LOGBOOK","ACTION_NEW_NOTIFICATION","ACTION_SET_PREFERENCE","ACTION_EVENT_FIRED","ACTION_INITIAL_LOAD_DONE","ACTION_STREAM_START","ACTION_STREAM_STOP","ACTION_STREAM_ERROR","ACTION_REMOTE_EVENT_RECEIVED","ACTION_LISTENING_START","ACTION_LISTENING_TRANSMITTING","ACTION_LISTENING_DONE","ACTION_LISTENING_ERROR","ACTION_LISTENING_RESULT"];e["default"]=r.merge({REMOTE_EVENT_HOMEASSISTANT_START:"homeassistant_start",REMOTE_EVENT_HOMEASSISTANT_STOP:"homeassistant_stop",REMOTE_EVENT_STATE_CHANGED:"state_changed",REMOTE_EVENT_TIME_CHANGED:"time_changed",REMOTE_EVENT_CALL_SERVICE:"call_service",REMOTE_EVENT_SERVICE_EXECUTED:"service_executed",REMOTE_EVENT_PLATFORM_DISCOVERED:"platform_discovered",REMOTE_EVENT_SERVICE_REGISTERED:"service_registered",REMOTE_EVENT_COMPONENT_LOADED:"component_loaded",UNIT_TEMP_C:"°C",UNIT_TEMP_F:"°F"},r.zipObject(i,i)),t.exports=e["default"]},/*!*****************************!*\
|
||||
!*** ./src/stores/store.js ***!
|
||||
\*****************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},u=n(/*! events */43),a="change",s=function(t){function e(){r(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),i(e,[{key:"emitChange",value:function(){this.emit(a)}},{key:"addChangeListener",value:function(t){this.on(a,t)}},{key:"removeChangeListener",value:function(t){this.removeListener(a,t)}}]),e}(u.EventEmitter);e["default"]=s,t.exports=e["default"]},/*!***************************************!*\
|
||||
function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(/*! events */42),a="change",s=function(t){function e(){r(this,e),null!=t&&t.apply(this,arguments)}return i(e,t),o(e,[{key:"emitChange",value:function(){this.emit(a)}},{key:"addChangeListener",value:function(t){this.on(a,t)}},{key:"removeChangeListener",value:function(t){this.removeListener(a,t)}}]),e}(u.EventEmitter);e["default"]=s,t.exports=e["default"]},/*!***************************************!*\
|
||||
!*** ./~/immutable/dist/immutable.js ***!
|
||||
\***************************************/
|
||||
function(t,e,n){!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return t.value=!1,t}function n(t){t&&(t.value=!0)}function r(){}function i(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;n>i;i++)r[i]=t[i+e];return r}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){return e>=0?+e:o(t)+ +e}function a(){return!0}function s(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function c(t,e){return l(t,e,0)}function f(t,e){return l(t,e,e)}function l(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function h(t){return d(t)?t:C(t)}function p(t){return y(t)?t:k(t)}function _(t){return g(t)?t:x(t)}function v(t){return d(t)&&!m(t)?t:M(t)}function d(t){return!(!t||!t[vn])}function y(t){return!(!t||!t[dn])}function g(t){return!(!t||!t[yn])}function m(t){return y(t)||g(t)}function w(t){return!(!t||!t[gn])}function b(t){this.next=t}function T(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function E(){return{value:void 0,done:!0}}function O(t){return!!A(t)}function I(t){return t&&"function"==typeof t.next}function S(t){var e=A(t);return e&&e.call(t)}function A(t){var e=t&&(Tn&&t[Tn]||t[En]);return"function"==typeof e?e:void 0}function N(t){return t&&"number"==typeof t.length}function C(t){return null===t||void 0===t?P():d(t)?t.toSeq():W(t)}function k(t){return null===t||void 0===t?P().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():q(t)}function x(t){return null===t||void 0===t?P():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():U(t)}function M(t){return(null===t||void 0===t?P():d(t)?y(t)?t.entrySeq():t:U(t)).toSetSeq()}function D(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function j(t){this._iterable=t,this.size=t.length||t.size}function z(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[In])}function P(){return Sn||(Sn=new D([]))}function q(t){var e=Array.isArray(t)?new D(t).fromEntrySeq():I(t)?new z(t).fromEntrySeq():O(t)?new j(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function U(t){var e=G(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function W(t){var e=G(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function G(t){return N(t)?new D(t):I(t)?new z(t):O(t)?new j(t):void 0}function V(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[n?o-u:u];if(e(a[1],r?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,n)}function K(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new b(function(){var t=i[n?o-u:u];return u++>o?E():T(e,r?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,n)}function $(){throw TypeError("Abstract")}function F(){}function H(){}function B(){}function J(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function Y(t,e){return e?X(e,t,"",{"":t}):Q(t)}function X(t,e,n,r){return Array.isArray(e)?t.call(r,n,x(e).map(function(n,r){return X(t,n,r,e)})):Z(e)?t.call(r,n,k(e).map(function(n,r){return X(t,n,r,e)})):e}function Q(t){return Array.isArray(t)?x(t).map(Q).toList():Z(t)?k(t).map(Q).toMap():t}function Z(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===e?t.length>Rn?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Ln[t];return void 0===e&&(e=rt(t),zn===jn&&(zn=0,Ln={}),zn++,Ln[t]=e),e}function rt(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return tt(e)}function it(t){var e;if(xn&&(e=An.get(t),void 0!==e))return e;if(e=t[Dn],void 0!==e)return e;if(!kn){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Dn],void 0!==e)return e;if(e=ot(t),void 0!==e)return e}if(e=++Mn,1073741824&Mn&&(Mn=0),xn)An.set(t,e);else{if(void 0!==Cn&&Cn(t)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(kn)Object.defineProperty(t,Dn,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertLine truncated
|
||||
|
||||
var Pn="@@__IMMUTABLE_MAP__@@",qn=Lt.prototype;qn[Pn]=!0,qn[sn]=qn.remove,qn.removeIn=qn.deleteIn,qt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},qt.prototype.update=function(t,e,r,o,u,a,s){for(var c=u===hn,f=this.entries,l=0,h=f.length;h>l&&!J(o,f[l][0]);l++);var p=h>l;if(p?f[l][1]===u:c)return this;if(n(s),(c||!p)&&n(a),!c||1!==f.length){if(!p&&!c&&f.length>=Wn)return Zt(t,f,o,u);var _=t&&t===this.ownerID,v=_?f:i(f);return p?c?l===h-1?v.pop():v[l]=v.pop():v[l]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new qt(t,v)}},Ut.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&ln),o=this.bitmap;return 0===(o&i)?r:this.nodes[ue(o&i-1)].get(t+cn,e,n,r)},Ut.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=1<<a,c=this.bitmap,f=0!==(c&s);if(!f&&i===hn)return this;var l=ue(c&s-1),h=this.nodes,p=f?h[l]:void 0,_=Yt(p,t,e+cn,n,r,i,o,u);if(_===p)return this;if(!f&&_&&h.length>=Gn)return ee(t,h,c,a,_);if(f&&!_&&2===h.length&&Xt(h[1^l]))return h[1^l];if(f&&_&&1===h.length&&Xt(_))return _;var v=t&&t===this.ownerID,d=f?_?c:c^s:c|s,y=f?_?ae(h,l,_,v):ce(h,l,v):se(h,l,_,v);return v?(this.bitmap=d,this.nodes=y,this):new Ut(t,d,y)},Wt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&ln,o=this.nodes[i];return o?o.get(t+cn,e,n,r):r},Wt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=i===hn,c=this.nodes,f=c[a];if(s&&!f)return this;var l=Yt(f,t,e+cn,n,r,i,o,u);if(l===f)return this;var h=this.count;if(f){if(!l&&(h--,Vn>h))return te(t,c,h,a)}else h++;var p=t&&t===this.ownerID,_=ae(c,a,l,p);return p?(this.count=h,this.nodes=_,this):new Wt(t,h,_)},Gt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},Gt.prototype.update=function(t,e,r,o,u,a,s){void 0===r&&(r=et(o));var c=u===hn;if(r!==this.keyHash)return c?this:(n(s),n(a),Qt(this,t,e,r,[o,u]));for(var f=this.entries,l=0,h=f.length;h>l&&!J(o,f[l][0]);l++);var p=h>l;if(p?f[l][1]===u:c)return this;if(n(s),(c||!p)&&n(a),c&&2===h)return new Vt(t,this.keyHash,f[1^l]);var _=t&&t===this.ownerID,v=_?f:i(f);return p?c?l===h-1?v.pop():v[l]=v.pop():v[l]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Gt(t,this.keyHash,v)},Vt.prototype.get=function(t,e,n,r){return J(n,this.entry[0])?this.entry[1]:r},Vt.prototype.update=function(t,e,r,i,o,u,a){var s=o===hn,c=J(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(n(a),s?void n(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Vt(t,this.keyHash,[i,o]):(n(u),Qt(this,t,e,et(i),[i,o])))},qt.prototype.iterate=Gt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},Ut.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},Vt.prototype.iterate=function(t,e){return t(this.entry)},t(Kt,b),Kt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return $t(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return $t(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return $t(t,o.entry);e=this._stack=Ft(o,e)}continue}e=this._stack=this._stack.__prev}return E()};var Un,Wn=fn/4,Gn=fn/2,Vn=fn/4;t(fe,H),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),0>t||t>=this.size)return e;t+=this._origin;var n=me(this,t);return n&&n.array[t&ln]},fe.prototype.set=function(t,e){return de(this,t,e)},fe.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=cn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ve()},fe.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){we(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])})},fe.prototype.pop=function(){return we(this,0,-1)},fe.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){we(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])})},fe.prototype.shift=function(){return we(this,1)},fe.prototype.merge=function(){return be(this,void 0,arguments)},fe.prototype.mergeWith=function(t){var e=an.call(arguments,1);return be(this,t,e)},fe.prototype.mergeDeep=function(){return be(this,re(void 0),arguments)},fe.prototype.mergeDeepWith=function(t){var e=an.call(arguments,1);return be(this,re(t),e)},fe.prototype.setSize=function(t){return we(this,0,t)},fe.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:we(this,c(t,n),f(e,n))},fe.prototype.__iterator=function(t,e){var n=0Line truncated
|
||||
function(t,e,n){!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return t.value=!1,t}function n(t){t&&(t.value=!0)}function r(){}function i(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;n>i;i++)r[i]=t[i+e];return r}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){return e>=0?+e:o(t)+ +e}function a(){return!0}function s(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function c(t,e){return l(t,e,0)}function f(t,e){return l(t,e,e)}function l(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function h(t){return d(t)?t:C(t)}function p(t){return y(t)?t:k(t)}function _(t){return g(t)?t:x(t)}function v(t){return d(t)&&!m(t)?t:M(t)}function d(t){return!(!t||!t[vn])}function y(t){return!(!t||!t[dn])}function g(t){return!(!t||!t[yn])}function m(t){return y(t)||g(t)}function w(t){return!(!t||!t[gn])}function b(t){this.next=t}function T(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function E(){return{value:void 0,done:!0}}function O(t){return!!A(t)}function I(t){return t&&"function"==typeof t.next}function S(t){var e=A(t);return e&&e.call(t)}function A(t){var e=t&&(Tn&&t[Tn]||t[En]);return"function"==typeof e?e:void 0}function N(t){return t&&"number"==typeof t.length}function C(t){return null===t||void 0===t?P():d(t)?t.toSeq():W(t)}function k(t){return null===t||void 0===t?P().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():q(t)}function x(t){return null===t||void 0===t?P():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():U(t)}function M(t){return(null===t||void 0===t?P():d(t)?y(t)?t.entrySeq():t:U(t)).toSetSeq()}function D(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function j(t){this._iterable=t,this.size=t.length||t.size}function z(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[In])}function P(){return Sn||(Sn=new D([]))}function q(t){var e=Array.isArray(t)?new D(t).fromEntrySeq():I(t)?new z(t).fromEntrySeq():O(t)?new j(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function U(t){var e=G(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function W(t){var e=G(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function G(t){return N(t)?new D(t):I(t)?new z(t):O(t)?new j(t):void 0}function V(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[n?o-u:u];if(e(a[1],r?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,n)}function K(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new b(function(){var t=i[n?o-u:u];return u++>o?E():T(e,r?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,n)}function $(){throw TypeError("Abstract")}function F(){}function H(){}function B(){}function J(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function Y(t,e){return e?X(e,t,"",{"":t}):Q(t)}function X(t,e,n,r){return Array.isArray(e)?t.call(r,n,x(e).map(function(n,r){return X(t,n,r,e)})):Z(e)?t.call(r,n,k(e).map(function(n,r){return X(t,n,r,e)})):e}function Q(t){return Array.isArray(t)?x(t).map(Q).toList():Z(t)?k(t).map(Q).toMap():t}function Z(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===e?t.length>Rn?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Ln[t];return void 0===e&&(e=rt(t),zn===jn&&(zn=0,Ln={}),zn++,Ln[t]=e),e}function rt(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return tt(e)}function it(t){var e;if(xn&&(e=An.get(t),void 0!==e))return e;if(e=t[Dn],void 0!==e)return e;if(!kn){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Dn],void 0!==e)return e;if(e=ot(t),void 0!==e)return e}if(e=++Mn,1073741824&Mn&&(Mn=0),xn)An.set(t,e);else{if(void 0!==Cn&&Cn(t)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(kn)Object.defineProperty(t,Dn,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertLine truncated
|
||||
this.__altered=!1,this)},Lt.isMap=Pt;var Pn="@@__IMMUTABLE_MAP__@@",qn=Lt.prototype;qn[Pn]=!0,qn[sn]=qn.remove,qn.removeIn=qn.deleteIn,qt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},qt.prototype.update=function(t,e,r,o,u,a,s){for(var c=u===hn,f=this.entries,l=0,h=f.length;h>l&&!J(o,f[l][0]);l++);var p=h>l;if(p?f[l][1]===u:c)return this;if(n(s),(c||!p)&&n(a),!c||1!==f.length){if(!p&&!c&&f.length>=Wn)return Zt(t,f,o,u);var _=t&&t===this.ownerID,v=_?f:i(f);return p?c?l===h-1?v.pop():v[l]=v.pop():v[l]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new qt(t,v)}},Ut.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&ln),o=this.bitmap;return 0===(o&i)?r:this.nodes[ue(o&i-1)].get(t+cn,e,n,r)},Ut.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=1<<a,c=this.bitmap,f=0!==(c&s);if(!f&&i===hn)return this;var l=ue(c&s-1),h=this.nodes,p=f?h[l]:void 0,_=Yt(p,t,e+cn,n,r,i,o,u);if(_===p)return this;if(!f&&_&&h.length>=Gn)return ee(t,h,c,a,_);if(f&&!_&&2===h.length&&Xt(h[1^l]))return h[1^l];if(f&&_&&1===h.length&&Xt(_))return _;var v=t&&t===this.ownerID,d=f?_?c:c^s:c|s,y=f?_?ae(h,l,_,v):ce(h,l,v):se(h,l,_,v);return v?(this.bitmap=d,this.nodes=y,this):new Ut(t,d,y)},Wt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&ln,o=this.nodes[i];return o?o.get(t+cn,e,n,r):r},Wt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=i===hn,c=this.nodes,f=c[a];if(s&&!f)return this;var l=Yt(f,t,e+cn,n,r,i,o,u);if(l===f)return this;var h=this.count;if(f){if(!l&&(h--,Vn>h))return te(t,c,h,a)}else h++;var p=t&&t===this.ownerID,_=ae(c,a,l,p);return p?(this.count=h,this.nodes=_,this):new Wt(t,h,_)},Gt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},Gt.prototype.update=function(t,e,r,o,u,a,s){void 0===r&&(r=et(o));var c=u===hn;if(r!==this.keyHash)return c?this:(n(s),n(a),Qt(this,t,e,r,[o,u]));for(var f=this.entries,l=0,h=f.length;h>l&&!J(o,f[l][0]);l++);var p=h>l;if(p?f[l][1]===u:c)return this;if(n(s),(c||!p)&&n(a),c&&2===h)return new Vt(t,this.keyHash,f[1^l]);var _=t&&t===this.ownerID,v=_?f:i(f);return p?c?l===h-1?v.pop():v[l]=v.pop():v[l]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Gt(t,this.keyHash,v)},Vt.prototype.get=function(t,e,n,r){return J(n,this.entry[0])?this.entry[1]:r},Vt.prototype.update=function(t,e,r,i,o,u,a){var s=o===hn,c=J(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(n(a),s?void n(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Vt(t,this.keyHash,[i,o]):(n(u),Qt(this,t,e,et(i),[i,o])))},qt.prototype.iterate=Gt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},Ut.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},Vt.prototype.iterate=function(t,e){return t(this.entry)},t(Kt,b),Kt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return $t(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return $t(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return $t(t,o.entry);e=this._stack=Ft(o,e)}continue}e=this._stack=this._stack.__prev}return E()};var Un,Wn=fn/4,Gn=fn/2,Vn=fn/4;t(fe,H),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),0>t||t>=this.size)return e;t+=this._origin;var n=me(this,t);return n&&n.array[t&ln]},fe.prototype.set=function(t,e){return de(this,t,e)},fe.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=cn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ve()},fe.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){we(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])})},fe.prototype.pop=function(){return we(this,0,-1)},fe.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){we(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])})},fe.prototype.shift=function(){return we(this,1)},fe.prototype.merge=function(){return be(this,void 0,arguments)},fe.prototype.mergeWith=function(t){var e=an.call(arguments,1);return be(this,t,e)},fe.prototype.mergeDeep=function(){return be(this,re(void 0),arguments)},fe.prototype.mergeDeepWith=function(t){var e=an.call(arguments,1);return be(this,re(t),e)},fe.prototype.setSize=function(t){return we(this,0,t)},fe.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:we(this,c(t,n),f(e,n))},fe.protoLine truncated
|
||||
!*** ./src/call_api.js ***!
|
||||
\*************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=n(/*! ./stores/auth */12),o=r(i),u=function(t,e){var n=void 0===arguments[2]?null:arguments[2],r=void 0===arguments[3]?{}:arguments[3],i=r.authToken||o["default"].authToken,u=o["default"].host+"/api/"+e;return new Promise(function(e,r){var o=new XMLHttpRequest;o.open(t,u,!0),o.setRequestHeader("X-HA-access",i),o.onload=function(){if(o.status>199&&o.status<300)e(JSON.parse(o.responseText));else try{r(JSON.parse(o.responseText))}catch(t){r({})}},o.onerror=function(){return r({})},n?o.send(JSON.stringify(n)):o.send()})};e["default"]=u,t.exports=e["default"]},/*!***************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(/*! ./stores/auth */12),o=r(i),u=function(t,e){var n=void 0===arguments[2]?null:arguments[2],r=void 0===arguments[3]?{}:arguments[3],i=r.authToken||o["default"].authToken,u=o["default"].host+"/api/"+e;return new Promise(function(e,r){var o=new XMLHttpRequest;o.open(t,u,!0),o.setRequestHeader("X-HA-access",i),o.onload=function(){if(o.status>199&&o.status<300)e(JSON.parse(o.responseText));else try{r(JSON.parse(o.responseText))}catch(t){r({})}},o.onerror=function(){return r({})},n?o.send(JSON.stringify(n)):o.send()})};e["default"]=u,t.exports=e["default"]},/*!***************************!*\
|
||||
!*** ./~/lodash/index.js ***!
|
||||
\***************************/
|
||||
function(t,e,n){var r;(function(t,i){(function(){function o(t,e){if(t!==e){var n=t===t,r=e===e;if(t>e||!n||t===A&&r)return 1;if(e>t||!r||e===A&&n)return-1}return 0}function u(t,e,n){for(var r=t.length,i=n?r:-1;n?i--:++i<r;)if(e(t[i],i,t))return i;return-1}function a(t,e,n){if(e!==e)return g(t,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function s(t){return"function"==typeof t||!1}function c(t){return"string"==typeof t?t:null==t?"":t+""}function f(t){return t.charCodeAt(0)}function l(t,e){for(var n=-1,r=t.length;++n<r&&e.indexOf(t.charAt(n))>-1;);return n}function h(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function p(t,e){return o(t.criteria,e.criteria)||t.index-e.index}function _(t,e,n){for(var r=-1,i=t.criteria,u=e.criteria,a=i.length,s=n.length;++r<a;){var c=o(i[r],u[r]);if(c)return r>=s?c:c*(n[r]?1:-1)}return t.index-e.index}function v(t){return Ht[t]}function d(t){return Bt[t]}function y(t){return"\\"+Xt[t]}function g(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i<r;){var o=t[i];if(o!==o)return i}return-1}function m(t){return!!t&&"object"==typeof t}function w(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function b(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n<r;)t[n]===e&&(t[n]=F,o[++i]=n);return o}function T(t,e){for(var n,r=-1,i=t.length,o=-1,u=[];++r<i;){var a=t[r],s=e?e(a,r,t):a;r&&n===s||(n=s,u[++o]=a)}return u}function E(t){for(var e=-1,n=t.length;++e<n&&w(t.charCodeAt(e)););return e}function O(t){for(var e=t.length;e--&&w(t.charCodeAt(e)););return e}function I(t){return Jt[t]}function S(t){function e(t){if(m(t)&&!Sa(t)&&!(t instanceof i)){if(t instanceof r)return t;if(Vo.call(t,"__chain__")&&Vo.call(t,"__wrapped__"))return ur(t)}return new r(t)}function n(){}function r(t,e,n){this.__wrapped__=t,this.__actions__=n||[],this.__chain__=!!e}function i(t){this.__wrapped__=t,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=!1,this.__iteratees__=null,this.__takeCount__=Tu,this.__views__=null}function w(){var t=this.__actions__,e=this.__iteratees__,n=this.__views__,r=new i(this.__wrapped__);return r.__actions__=t?te(t):null,r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=e?te(e):null,r.__takeCount__=this.__takeCount__,r.__views__=n?te(n):null,r}function Z(){if(this.__filtered__){var t=new i(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function rt(){var t=this.__wrapped__.value();if(!Sa(t))return tn(t,this.__actions__);var e=this.__dir__,n=0>e,r=qn(0,t.length,this.__views__),i=r.start,o=r.end,u=o-i,a=n?o:i-1,s=du(u,this.__takeCount__),c=this.__iteratees__,f=c?c.length:0,l=0,h=[];t:for(;u--&&s>l;){a+=e;for(var p=-1,_=t[a];++p<f;){var v=c[p],d=v.iteratee,y=v.type;if(y==G){if(v.done&&(n?a>v.index:a<v.index)&&(v.count=0,v.done=!1),v.index=a,!v.done){var g=v.limit;if(!(v.done=g>-1?v.count++>=g:!d(_)))continue t}}else{var m=d(_);if(y==K)_=m;else if(!m){if(y==V)continue t;break t}}}h[l++]=_}return h}function ot(){this.__data__={}}function Ht(t){return this.has(t)&&delete this.__data__[t]}function Bt(t){return"__proto__"==t?A:this.__data__[t]}function Jt(t){return"__proto__"!=t&&Vo.call(this.__data__,t)}function Yt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Xt(t){var e=t?t.length:0;for(this.data={hash:hu(null),set:new iu};e--;)this.push(t[e])}function Qt(t,e){var n=t.data,r="string"==typeof e||Oi(e)?n.set.has(e):n.hash[e];return r?0:-1}function Zt(t){var e=this.data;"string"==typeof t||Oi(t)?e.set.add(t):e.hash[t]=!0}function te(t,e){var n=-1,r=t.length;for(e||(e=No(r));++n<r;)e[n]=t[n];return e}function ee(t,e){for(var n=-1,r=t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function ne(t,e){for(var n=t.length;n--&&e(t[n],n,t)!==!1;);return t}function oe(t,e){for(var n=-1,r=t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function ue(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var u=t[n];e(u,n,t)&&(o[++i]=u)}return o}function ae(t,e){for(var n=-1,r=t.length,i=No(r);++n<r;)i[n]=e(t[n],n,t);return i}function se(t){for(var e=-1,n=t.length,r=bu;++e<n;){var i=t[e];i>r&&(r=i)}return r}function ce(t){for(var e=-1,n=t.length,r=Tu;++e<n;){var i=t[e];r>i&&(r=i)}return r}function fe(t,e,n,r){var i=-1,o=t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function le(t,e,n,r){var i=t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function he(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function pe(t){for(var e=t.length,n=0;e--;)n+=+t[e]||0;return n}function _e(t,e){return t===A?e:t}function ve(t,e,n,r){return t!==A&&Vo.call(r,n)?t:e}function de(t,e,n){var r=Pa(e);eu.apply(r,Gu(e));for(var i=-1,o=r.length;++i<o;){var u=r[i],a=t[u],s=n(a,e[u],u,t,e);(s===s?s===a:a!==a)&&(a!==A||u in t)||(t[u]=s)}return t}function ye(t,e){for(var n=-1,r=null==t,i=!r&&Kn(t),o=i&&t.length,u=e.length,a=No(u);++n<u;){var s=e[n];i?a[n]=$n(s,o)?t[s]:A:a[n]=r?A:t[s]}retLine truncated
|
||||
n.slice(0,o)+t+n}function no(t,e,n){return n&&Fn(t,e,n)&&(e=0),mu(t,e)}function ro(t,e){var n="";if(t=c(t),e=+e,1>e||!t||!pu(e))return n;do e%2&&(n+=t),e=Qo(e/2),t+=t;while(e);return n}function io(t,e,n){return t=c(t),n=null==n?0:du(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function oo(t,n,r){var i=e.templateSettings;r&&Fn(t,n,r)&&(n=r=null),t=c(t),n=de(xu({},r||n),i,ve);var o,u,a=de(xu({},n.imports),i.imports,ve),s=Pa(a),f=Qe(a,s),l=0,h=n.interpolate||Pt,p="__p += '",_=jo((n.escape||Pt).source+"|"+h.source+"|"+(h===It?Dt:Pt).source+"|"+(n.evaluate||Pt).source+"|$","g"),v="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Vt+"]")+"\n";t.replace(_,function(e,n,r,i,a,s){return r||(r=i),p+=t.slice(l,s).replace(qt,y),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+e.length,e}),p+="';\n";var d=n.variable;d||(p="with (obj) {\n"+p+"\n}\n"),p=(u?p.replace(dt,""):p).replace(yt,"$1").replace(gt,"$1;"),p="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Ya(function(){return xo(s,v+"return "+p).apply(A,f)});if(g.source=p,Ei(g))throw g;return g}function uo(t,e,n){var r=t;return(t=c(t))?(n?Fn(r,e,n):null==e)?t.slice(E(t),O(t)+1):(e+="",t.slice(l(t,e),h(t,e)+1)):t}function ao(t,e,n){var r=t;return t=c(t),t?t.slice((n?Fn(r,e,n):null==e)?E(t):l(t,e+"")):t}function so(t,e,n){var r=t;return t=c(t),t?(n?Fn(r,e,n):null==e)?t.slice(0,O(t)+1):t.slice(0,h(t,e+"")+1):t}function co(t,e,n){n&&Fn(t,e,n)&&(e=null);var r=P,i=q;if(null!=e)if(Oi(e)){var o="separator"in e?e.separator:o;r="length"in e?+e.length||0:r,i="omission"in e?c(e.omission):i}else r=+e||0;if(t=c(t),r>=t.length)return t;var u=r-i.length;if(1>u)return i;var a=t.slice(0,u);if(null==o)return a+i;if(ki(o)){if(t.slice(u).search(o)){var s,f,l=t.slice(0,u);for(o.global||(o=jo(o.source,(Rt.exec(o)||"")+"g")),o.lastIndex=0;s=o.exec(l);)f=s.index;a=a.slice(0,null==f?u:f)}}else if(t.indexOf(o,u)!=u){var h=a.lastIndexOf(o);h>-1&&(a=a.slice(0,h))}return a+i}function fo(t){return t=c(t),t&&bt.test(t)?t.replace(mt,I):t}function lo(t,e,n){return n&&Fn(t,e,n)&&(e=null),t=c(t),t.match(e||Ut)||[]}function ho(t,e,n){return n&&Fn(t,e,n)&&(e=null),m(t)?vo(t):me(t,e)}function po(t){return function(){return t}}function _o(t){return t}function vo(t){return Le(we(t,!0))}function yo(t,e){return Pe(t,we(e,!0))}function go(t,e,n){if(null==n){var r=Oi(e),i=r&&Pa(e),o=i&&i.length&&xe(e,i);(o?o.length:r)||(o=!1,n=e,e=t,t=this)}o||(o=xe(e,Pa(e)));var u=!0,a=-1,s=Na(t),c=o.length;n===!1?u=!1:Oi(n)&&"chain"in n&&(u=n.chain);for(;++a<c;){var f=o[a],l=e[f];t[f]=l,s&&(t.prototype[f]=function(e){return function(){var n=this.__chain__;if(u||n){var r=t(this.__wrapped__),i=r.__actions__=te(this.__actions__);return i.push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}var o=[this.value()];return eu.apply(o,arguments),e.apply(t,o)}}(l))}return t}function mo(){return t._=Fo,this}function wo(){}function bo(t){return Hn(t)?We(t):Ge(t)}function To(t){return function(e){return Me(t,or(e),e+"")}}function Eo(t,e,n){n&&Fn(t,e,n)&&(e=n=null),t=+t||0,n=null==n?1:+n||0,null==e?(e=t,t=0):e=+e||0;for(var r=-1,i=vu(Yo((e-t)/(n||1)),0),o=No(i);++r<i;)o[r]=t,t+=n;return o}function Oo(t,e,n){if(t=Qo(t),1>t||!pu(t))return[];var r=-1,i=No(du(t,Eu));for(e=rn(e,n,1);++r<t;)Eu>r?i[r]=e(r):e(r);return i}function Io(t){var e=++Ko;return c(t)+e}function So(t,e){return(+t||0)+(+e||0)}function Ao(t,e,n){n&&Fn(t,e,n)&&(e=null);var r=Ln(),i=null==e;return r===me&&i||(i=!1,e=r(e,n,3)),i?pe(Sa(t)?t:rr(t)):Ye(t,e)}t=t?ie.defaults(re.Object(),t,ie.pick(re,Gt)):re;var No=t.Array,Co=t.Date,ko=t.Error,xo=t.Function,Mo=t.Math,Do=t.Number,Ro=t.Object,jo=t.RegExp,zo=t.String,Lo=t.TypeError,Po=No.prototype,qo=Ro.prototype,Uo=zo.prototype,Wo=(Wo=t.window)&&Wo.document,Go=xo.prototype.toString,Vo=qo.hasOwnProperty,Ko=0,$o=qo.toString,Fo=t._,Ho=jo("^"+to($o).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bo=Ai(Bo=t.ArrayBuffer)&&Bo,Jo=Ai(Jo=Bo&&new Bo(0).slice)&&Jo,Yo=Mo.ceil,Xo=t.clearTimeout,Qo=Mo.floor,Zo=Ai(Zo=Ro.getOwnPropertySymbols)&&Zo,tu=Ai(tu=Ro.getPrototypeOf)&&tu,eu=Po.push,nu=Ai(nu=Ro.preventExtensions)&&nu,ru=qo.propertyIsEnumerable,iu=Ai(iu=t.Set)&&iu,ou=t.setTimeout,uu=Po.splice,au=Ai(au=t.Uint8Array)&&au,su=Ai(su=t.WeakMap)&&su,cu=function(){try{var e=Ai(e=t.Float64Array)&&e,n=new e(new Bo(10),0,1)&&e}catch(r){}return n}(),fu=function(){var t=nu&&Ai(t=Ro.assign)&&t;try{if(t){var e=nu({1:0});e[0]=1}}catch(n){try{t(e,"xo")}catch(n){}return!e[1]&&t}return!1}(),lu=Ai(lu=No.isArray)&&lu,hu=Ai(hu=Ro.create)&&hu,pu=t.isFinite,_u=Ai(_u=Ro.keys)&&_u,vu=Mo.max,du=Mo.min,yu=Ai(yu=Co.now)&&yu,gu=Ai(gu=Do.isFinite)&&gu,mu=t.parseInt,wu=Mo.random,bu=Do.NEGATIVE_INFINITY,Tu=Do.POSITIVE_INFINITY,Eu=Mo.pow(2,32)-1,Ou=Eu-1,Iu=Eu>>>1,Su=cu?cuLine truncated
|
||||
function(t,e,n){var r;(function(t,i){(function(){function o(t,e){if(t!==e){var n=null===t,r=t===S,i=t===t,o=null===e,u=e===S,a=e===e;if(t>e&&!o||!i||n&&!u&&a||r&&a)return 1;if(e>t&&!n||!a||o&&!r&&i||u&&i)return-1}return 0}function u(t,e,n){for(var r=t.length,i=n?r:-1;n?i--:++i<r;)if(e(t[i],i,t))return i;return-1}function a(t,e,n){if(e!==e)return y(t,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function s(t){return"function"==typeof t||!1}function c(t){return"string"==typeof t?t:null==t?"":t+""}function f(t,e){for(var n=-1,r=t.length;++n<r&&e.indexOf(t.charAt(n))>-1;);return n}function l(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function h(t,e){return o(t.criteria,e.criteria)||t.index-e.index}function p(t,e,n){for(var r=-1,i=t.criteria,u=e.criteria,a=i.length,s=n.length;++r<a;){var c=o(i[r],u[r]);if(c)return r>=s?c:c*(n[r]?1:-1)}return t.index-e.index}function _(t){return Ht[t]}function v(t){return Bt[t]}function d(t){return"\\"+Xt[t]}function y(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i<r;){var o=t[i];if(o!==o)return i}return-1}function g(t){return!!t&&"object"==typeof t}function m(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function w(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n<r;)t[n]===e&&(t[n]=$,o[++i]=n);return o}function b(t,e){for(var n,r=-1,i=t.length,o=-1,u=[];++r<i;){var a=t[r],s=e?e(a,r,t):a;r&&n===s||(n=s,u[++o]=a)}return u}function T(t){for(var e=-1,n=t.length;++e<n&&m(t.charCodeAt(e)););return e}function E(t){for(var e=t.length;e--&&m(t.charCodeAt(e)););return e}function O(t){return Jt[t]}function I(t){function e(t){if(g(t)&&!Aa(t)&&!(t instanceof i)){if(t instanceof r)return t;if(Jo.call(t,"__chain__")&&Jo.call(t,"__wrapped__"))return cr(t)}return new r(t)}function n(){}function r(t,e,n){this.__wrapped__=t,this.__actions__=n||[],this.__chain__=!!e}function i(t){this.__wrapped__=t,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=!1,this.__iteratees__=null,this.__takeCount__=Iu,this.__views__=null}function m(){var t=this.__actions__,e=this.__iteratees__,n=this.__views__,r=new i(this.__wrapped__);return r.__actions__=t?te(t):null,r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=e?te(e):null,r.__takeCount__=this.__takeCount__,r.__views__=n?te(n):null,r}function Q(){if(this.__filtered__){var t=new i(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function nt(){var t=this.__wrapped__.value();if(!Aa(t))return en(t,this.__actions__);var e=this.__dir__,n=0>e,r=Gn(0,t.length,this.__views__),i=r.start,o=r.end,u=o-i,a=n?o:i-1,s=mu(u,this.__takeCount__),c=this.__iteratees__,f=c?c.length:0,l=0,h=[];t:for(;u--&&s>l;){a+=e;for(var p=-1,_=t[a];++p<f;){var v=c[p],d=v.iteratee,y=v.type;if(y==W){if(v.done&&(n?a>v.index:a<v.index)&&(v.count=0,v.done=!1),v.index=a,!v.done){var g=v.limit;if(!(v.done=g>-1?v.count++>=g:!d(_)))continue t}}else{var m=d(_);if(y==V)_=m;else if(!m){if(y==G)continue t;break t}}}h[l++]=_}return h}function it(){this.__data__={}}function Ht(t){return this.has(t)&&delete this.__data__[t]}function Bt(t){return"__proto__"==t?S:this.__data__[t]}function Jt(t){return"__proto__"!=t&&Jo.call(this.__data__,t)}function Yt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Xt(t){var e=t?t.length:0;for(this.data={hash:_u(null),set:new su};e--;)this.push(t[e])}function Qt(t,e){var n=t.data,r="string"==typeof e||Ni(e)?n.set.has(e):n.hash[e];return r?0:-1}function Zt(t){var e=this.data;"string"==typeof t||Ni(t)?e.set.add(t):e.hash[t]=!0}function te(t,e){var n=-1,r=t.length;for(e||(e=Ro(r));++n<r;)e[n]=t[n];return e}function ee(t,e){for(var n=-1,r=t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function ne(t,e){for(var n=t.length;n--&&e(t[n],n,t)!==!1;);return t}function oe(t,e){for(var n=-1,r=t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function ue(t,e,n,r){for(var i=-1,o=t.length,u=r,a=u;++i<o;){var s=t[i],c=+e(s);n(c,u)&&(u=c,a=s)}return a}function ae(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var u=t[n];e(u,n,t)&&(o[++i]=u)}return o}function se(t,e){for(var n=-1,r=t.length,i=Ro(r);++n<r;)i[n]=e(t[n],n,t);return i}function ce(t,e,n,r){var i=-1,o=t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function fe(t,e,n,r){var i=t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function le(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function he(t){for(var e=t.length,n=0;e--;)n+=+t[e]||0;return n}function pe(t,e){return t===S?e:t}function _e(t,e,n,r){return t!==S&&Jo.call(r,n)?t:e}function ve(t,e,n){for(var r=-1,i=qa(e),o=i.length;++r<o;){var u=i[r],a=t[u],s=n(a,e[u],u,t,e);(s===s?s===a:a!==a)&&(a!==S||u in t)||(t[u]=s)}return t}function de(t,e){return null==e?t:ge(e,qa(e),t)}function ye(t,e){for(var n=-1,r=null==t,i=!r&&Hn(t),o=i?t.length:0,u=e.length,a=Ro(u);++n<u;){var s=e[n];i?a[n]=Bn(s,o)?t[s]:S:a[n]=r?S:t[s]}return a}functLine truncated
|
||||
Tu(t,e)}function co(t,e){var n="";if(t=c(t),e=+e,1>e||!t||!du(e))return n;do e%2&&(n+=t),e=iu(e/2),t+=t;while(e);return n}function fo(t,e,n){return t=c(t),n=null==n?0:mu(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function lo(t,n,r){var i=e.templateSettings;r&&Jn(t,n,r)&&(n=r=null),t=c(t),n=ve(de({},r||n),i,_e);var o,u,a=ve(de({},n.imports),i.imports,_e),s=qa(a),f=Ze(a,s),l=0,h=n.interpolate||Pt,p="__p += '",_=Wo((n.escape||Pt).source+"|"+h.source+"|"+(h===Ot?Mt:Pt).source+"|"+(n.evaluate||Pt).source+"|$","g"),v="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Vt+"]")+"\n";t.replace(_,function(e,n,r,i,a,s){return r||(r=i),p+=t.slice(l,s).replace(qt,d),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+e.length,e}),p+="';\n";var y=n.variable;y||(p="with (obj) {\n"+p+"\n}\n"),p=(u?p.replace(vt,""):p).replace(dt,"$1").replace(yt,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xa(function(){return Lo(s,v+"return "+p).apply(S,f)});if(g.source=p,Ai(g))throw g;return g}function ho(t,e,n){var r=t;return(t=c(t))?(n?Jn(r,e,n):null==e)?t.slice(T(t),E(t)+1):(e+="",t.slice(f(t,e),l(t,e)+1)):t}function po(t,e,n){var r=t;return t=c(t),t?(n?Jn(r,e,n):null==e)?t.slice(T(t)):t.slice(f(t,e+"")):t}function _o(t,e,n){var r=t;return t=c(t),t?(n?Jn(r,e,n):null==e)?t.slice(0,E(t)+1):t.slice(0,l(t,e+"")+1):t}function vo(t,e,n){n&&Jn(t,e,n)&&(e=null);var r=L,i=P;if(null!=e)if(Ni(e)){var o="separator"in e?e.separator:o;r="length"in e?+e.length||0:r,i="omission"in e?c(e.omission):i}else r=+e||0;if(t=c(t),r>=t.length)return t;var u=r-i.length;if(1>u)return i;var a=t.slice(0,u);if(null==o)return a+i;if(Ri(o)){if(t.slice(u).search(o)){var s,f,l=t.slice(0,u);for(o.global||(o=Wo(o.source,(Dt.exec(o)||"")+"g")),o.lastIndex=0;s=o.exec(l);)f=s.index;a=a.slice(0,null==f?u:f)}}else if(t.indexOf(o,u)!=u){var h=a.lastIndexOf(o);h>-1&&(a=a.slice(0,h))}return a+i}function yo(t){return t=c(t),t&&wt.test(t)?t.replace(gt,O):t}function go(t,e,n){return n&&Jn(t,e,n)&&(e=null),t=c(t),t.match(e||Ut)||[]}function mo(t,e,n){return n&&Jn(t,e,n)&&(e=null),g(t)?To(t):me(t,e)}function wo(t){return function(){return t}}function bo(t){return t}function To(t){return Pe(we(t,!0))}function Eo(t,e){return qe(t,we(e,!0))}function Oo(t,e,n){if(null==n){var r=Ni(e),i=r?qa(e):null,o=i&&i.length?Me(e,i):null;(o?o.length:r)||(o=!1,n=e,e=t,t=this)}o||(o=Me(e,qa(e)));var u=!0,a=-1,s=Ca(t),c=o.length;n===!1?u=!1:Ni(n)&&"chain"in n&&(u=n.chain);for(;++a<c;){var f=o[a],l=e[f];t[f]=l,s&&(t.prototype[f]=function(e){return function(){var n=this.__chain__;if(u||n){var r=t(this.__wrapped__),i=r.__actions__=te(this.__actions__);return i.push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}var o=[this.value()];return au.apply(o,arguments),e.apply(t,o)}}(l))}return t}function Io(){return t._=Qo,this}function So(){}function Ao(t){return Yn(t)?Ge(t):Ve(t)}function No(t){return function(e){return De(t,sr(e),e+"")}}function Co(t,e,n){n&&Jn(t,e,n)&&(e=n=null),t=+t||0,n=null==n?1:+n||0,null==e?(e=t,t=0):e=+e||0;for(var r=-1,i=gu(nu((e-t)/(n||1)),0),o=Ro(i);++r<i;)o[r]=t,t+=n;return o}function ko(t,e,n){if(t=iu(t),1>t||!du(t))return[];var r=-1,i=Ro(mu(t,Su));for(e=on(e,n,1);++r<t;)Su>r?i[r]=e(r):e(r);return i}function xo(t){var e=++Yo;return c(t)+e}function Mo(t,e){return(+t||0)+(+e||0)}function Do(t,e,n){n&&Jn(t,e,n)&&(e=null);var r=Ln(),i=null==e;return i&&r===me||(i=!1,e=r(e,n,3)),i?he(Aa(t)?t:ur(t)):Xe(t,e)}t=t?ie.defaults(re.Object(),t,ie.pick(re,Gt)):re;var Ro=t.Array,jo=t.Date,zo=t.Error,Lo=t.Function,Po=t.Math,qo=t.Number,Uo=t.Object,Wo=t.RegExp,Go=t.String,Vo=t.TypeError,Ko=Ro.prototype,$o=Uo.prototype,Fo=Go.prototype,Ho=(Ho=t.window)?Ho.document:null,Bo=Lo.prototype.toString,Jo=$o.hasOwnProperty,Yo=0,Xo=$o.toString,Qo=t._,Zo=Wo("^"+uo(Bo.call(Jo)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tu=Wn(t,"ArrayBuffer"),eu=Wn(tu&&new tu(0),"slice"),nu=Po.ceil,ru=t.clearTimeout,iu=Po.floor,ou=Wn(Uo,"getPrototypeOf"),uu=t.parseFloat,au=Ko.push,su=Wn(t,"Set"),cu=t.setTimeout,fu=Ko.splice,lu=Wn(t,"Uint8Array"),hu=Wn(t,"WeakMap"),pu=function(){try{var e=Wn(t,"Float64Array"),n=new e(new tu(10),0,1)&&e}catch(r){}return n||null}(),_u=Wn(Uo,"create"),vu=Wn(Ro,"isArray"),du=t.isFinite,yu=Wn(Uo,"keys"),gu=Po.max,mu=Po.min,wu=Wn(jo,"now"),bu=Wn(qo,"isFinite"),Tu=t.parseInt,Eu=Po.random,Ou=qo.NEGATIVE_INFINITY,Iu=qo.POSITIVE_INFINITY,Su=4294967295,Au=Su-1,Nu=Su>>>1,Cu=pu?pu.BYTES_PER_ELEMENT:0,ku=9007199254740991,xu=hu&&new hu,Mu={},Du=e.support={};!function(t){var e=function(){this.x=t},n=[];e.prototype={valueOf:t,y:t};for(var r in new e)n.push(r);try{Du.dom=11===Ho.createDocumentFragment().nodeType}catch(i){Du.dom=!1}}(1,0),e.templateSettings={escape:Tt,evaluate:Et,interLine truncated
|
||||
!*** ./src/actions/notification.js ***!
|
||||
\*************************************/
|
||||
function(t,e,n){"use strict";function r(t){i.dispatch({actionType:u,message:t})}Object.defineProperty(e,"__esModule",{value:!0}),e.notify=r;var i=n(/*! ../app_dispatcher */1),o=n(/*! ../constants */2),u=o.ACTION_NEW_NOTIFICATION},/*!********************************!*\
|
||||
!*** ./src/actions/service.js ***!
|
||||
\********************************/
|
||||
function(t,e,n){"use strict";function r(t){t.length>0&&h["default"].dispatch({actionType:_["default"].ACTION_NEW_SERVICES,services:t})}function i(t){return u("homeassistant","turn_on",{entity_id:t})}function o(t){return u("homeassistant","turn_off",{entity_id:t})}function u(t,e){var n=void 0===arguments[2]?{}:arguments[2];return f["default"]("POST","services/"+t+"/"+e,n).then(function(r){v.notify("turn_on"==e&&n.entity_id?"Turned on "+n.entity_id+".":"turn_off"==e&&n.entity_id?"Turned off "+n.entity_id+".":"Service "+t+"/"+e+" called."),d.newStates(r)})}function a(){return f["default"]("GET","services").then(r)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){return t&&t.__esModule?t:{"default":t}};e.newServices=r,e.callTurnOn=i,e.callTurnOff=o,e.callService=u,e.fetchAll=a;var c=n(/*! ../call_api */5),f=s(c),l=n(/*! ../app_dispatcher */1),h=s(l),p=n(/*! ../constants */2),_=s(p),v=n(/*! ./notification */7),d=n(/*! ./state */9)},/*!******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){t.length>0&&h["default"].dispatch({actionType:_["default"].ACTION_NEW_SERVICES,services:t})}function o(t){return a("homeassistant","turn_on",{entity_id:t})}function u(t){return a("homeassistant","turn_off",{entity_id:t})}function a(t,e){var n=void 0===arguments[2]?{}:arguments[2];return f["default"]("POST","services/"+t+"/"+e,n).then(function(r){"turn_on"==e&&n.entity_id?v.notify("Turned on "+n.entity_id+"."):"turn_off"==e&&n.entity_id?v.notify("Turned off "+n.entity_id+"."):v.notify("Service "+t+"/"+e+" called."),d.newStates(r)})}function s(){return f["default"]("GET","services").then(i)}Object.defineProperty(e,"__esModule",{value:!0}),e.newServices=i,e.callTurnOn=o,e.callTurnOff=u,e.callService=a,e.fetchAll=s;var c=n(/*! ../call_api */5),f=r(c),l=n(/*! ../app_dispatcher */1),h=r(l),p=n(/*! ../constants */2),_=r(p),v=n(/*! ./notification */7),d=n(/*! ./state */9)},/*!******************************!*\
|
||||
!*** ./src/actions/state.js ***!
|
||||
\******************************/
|
||||
function(t,e,n){"use strict";function r(t,e){(t.length>0||e)&&l["default"].dispatch({actionType:h.ACTION_NEW_STATES,states:t,replace:!!e})}function i(t,e){var n=void 0===arguments[2]?!1:arguments[2],i={state:e};n&&(i.attributes=n),c["default"]("POST","states/"+t,i).then(function(n){p.notify("State of "+t+" set to "+e+"."),r([n])})}function o(t){c["default"]("GET","states/"+t).then(function(t){r([t])})}function u(){c["default"]("GET","states").then(function(t){r(t,!0)})}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){return t&&t.__esModule?t:{"default":t}};e.newStates=r,e.set=i,e.fetch=o,e.fetchAll=u;var s=n(/*! ../call_api */5),c=a(s),f=n(/*! ../app_dispatcher */1),l=a(f),h=n(/*! ../constants */2),p=n(/*! ./notification */7)},/*!*****************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){(t.length>0||e)&&l["default"].dispatch({actionType:h.ACTION_NEW_STATES,states:t,replace:!!e})}function o(t,e){var n=void 0===arguments[2]?!1:arguments[2],r={state:e};n&&(r.attributes=n),c["default"]("POST","states/"+t,r).then(function(n){p.notify("State of "+t+" set to "+e+"."),i([n])})}function u(t){c["default"]("GET","states/"+t).then(function(t){i([t])})}function a(){c["default"]("GET","states").then(function(t){i(t,!0)})}Object.defineProperty(e,"__esModule",{value:!0}),e.newStates=i,e.set=o,e.fetch=u,e.fetchAll=a;var s=n(/*! ../call_api */5),c=r(s),f=n(/*! ../app_dispatcher */1),l=r(f),h=n(/*! ../constants */2),p=n(/*! ./notification */7)},/*!*****************************!*\
|
||||
!*** ./src/actions/sync.js ***!
|
||||
\*****************************/
|
||||
function(t,e,n){"use strict";function r(){f["default"].dispatch({actionType:h["default"].ACTION_FETCH_ALL}),p.fetch(),v&&d()}function i(){v=!0,r()}function o(){v=!1,d.cancel()}Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){return t&&t.__esModule?t:{"default":t}};e.fetchAll=r,e.start=i,e.stop=o;var a=n(/*! lodash */6),s=u(a),c=n(/*! ../app_dispatcher */1),f=u(c),l=n(/*! ../constants */2),h=u(l),p=n(/*! ./bootstrap */16),_=3e4,v=!1,d=s["default"].debounce(r,_)},/*!*****************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(){f["default"].dispatch({actionType:h["default"].ACTION_FETCH_ALL}),p.fetch(),v&&d()}function o(){v=!0,i()}function u(){v=!1,d.cancel()}Object.defineProperty(e,"__esModule",{value:!0}),e.fetchAll=i,e.start=o,e.stop=u;var a=n(/*! lodash */6),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ./bootstrap */16),_=3e4,v=!1,d=s["default"].debounce(i,_)},/*!*****************************!*\
|
||||
!*** ./src/models/state.js ***!
|
||||
\*****************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(t,e,n){for(var r=!0;r;){a=c=s=void 0,r=!1;var i=t,o=e,u=n,a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;return void 0===s?void 0:s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=u,r=!0}},s=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},c=n(/*! immutable */4),f=n(/*! ../stores/service */13),l=r(f),h=n(/*! ../util */15),p=new c.Record({entityId:null,domain:null,objectId:null,state:null,entityDisplay:null,stateDisplay:null,lastChanged:null,lastChangedAsDate:null,attributes:{},isCustomGroup:null},"State"),_=function(t){function e(t,n,r){var u=void 0===arguments[3]?{}:arguments[3];o(this,e);var s=t.split("."),c=i(s,2),f=c[0],l=c[1],p=n.replace(/_/g," ");u.unit_of_measurement&&(p+=" "+u.unit_of_measurement),a(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{entityId:t,domain:f,objectId:l,state:n,stateDisplay:p,lastChanged:r,attributes:u,entityDisplay:u.friendly_name||l.replace(/_/g," "),lastChangedAsDate:h.parseDateTime(r),isCustomGroup:"group"===f&&!u.auto})}return s(e,t),u(e,[{key:"canToggle",get:function(){return"group"===this.domain&&("on"===this.state||"off"===this.state)||l["default"].has(this.domain,"turn_on")}}],[{key:"fromJSON",value:function(t){var n=t.entity_id,r=t.state,i=t.last_changed,o=t.attributes;return new e(n,r,i,o)}}]),e}(p);e["default"]=_,t.exports=e["default"]},/*!****************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;a=c=s=void 0,r=!1;var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;return void 0===s?void 0:s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=u,r=!0}},c=n(/*! immutable */4),f=n(/*! ../stores/service */13),l=r(f),h=n(/*! ../util */15),p=new c.Record({entityId:null,domain:null,objectId:null,state:null,entityDisplay:null,stateDisplay:null,lastChanged:null,lastChangedAsDate:null,attributes:{},isCustomGroup:null},"State"),_=function(t){function e(t,n,r){var u=void 0===arguments[3]?{}:arguments[3];o(this,e);var a=t.split("."),c=i(a,2),f=c[0],l=c[1],p=n.replace(/_/g," ");u.unit_of_measurement&&(p+=" "+u.unit_of_measurement),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{entityId:t,domain:f,objectId:l,state:n,stateDisplay:p,lastChanged:r,attributes:u,entityDisplay:u.friendly_name||l.replace(/_/g," "),lastChangedAsDate:h.parseDateTime(r),isCustomGroup:"group"===f&&!u.auto})}return u(e,t),a(e,[{key:"canToggle",get:function(){return"group"===this.domain&&("on"===this.state||"off"===this.state)||l["default"].has(this.domain,"turn_on")}}],[{key:"fromJSON",value:function(t){var n=t.entity_id,r=t.state,i=t.last_changed,o=t.attributes;return new e(n,r,i,o)}}]),e}(p);e["default"]=_,t.exports=e["default"]},/*!****************************!*\
|
||||
!*** ./src/stores/auth.js ***!
|
||||
\****************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! ../app_dispatcher */1),s=r(a),c=n(/*! ../constants */2),f=r(c),l=n(/*! ../stores/store */3),h=r(l),p=!1,_=!1,v="",d="",y=!1,g="",m=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"isValidating",get:function(){return p}},{key:"isLoggedIn",get:function(){return _}},{key:"authToken",get:function(){return v}},{key:"host",get:function(){return d}},{key:"lastAttemptInvalid",get:function(){return y}},{key:"lastAttemptMessage",get:function(){return g}}]),e}(h["default"]),w=new m;w.dispatchToken=s["default"].register(function(t){switch(t.actionType){case f["default"].ACTION_VALIDATING_AUTH_TOKEN:p=!0,v=t.authToken,d=t.host,w.emitChange();break;case f["default"].ACTION_VALID_AUTH_TOKEN:p=!1,_=!0,y=!1,g="",w.emitChange();break;case f["default"].ACTION_INVALID_AUTH_TOKEN:p=!1,_=!1,v="",d="",y=!0,g=t.message||"Unexpected result from API",w.emitChange();break;case f["default"].ACTION_LOG_OUT:p=!1,_=!1,v="",d="",y=!1,g="",w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!*******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(/*! ../app_dispatcher */1),s=r(a),c=n(/*! ../constants */2),f=r(c),l=n(/*! ../stores/store */3),h=r(l),p=!1,_=!1,v="",d="",y=!1,g="",m=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"isValidating",get:function(){return p}},{key:"isLoggedIn",get:function(){return _}},{key:"authToken",get:function(){return v}},{key:"host",get:function(){return d}},{key:"lastAttemptInvalid",get:function(){return y}},{key:"lastAttemptMessage",get:function(){return g}}]),e}(h["default"]),w=new m;w.dispatchToken=s["default"].register(function(t){switch(t.actionType){case f["default"].ACTION_VALIDATING_AUTH_TOKEN:p=!0,v=t.authToken,d=t.host,w.emitChange();break;case f["default"].ACTION_VALID_AUTH_TOKEN:p=!1,_=!0,y=!1,g="",w.emitChange();break;case f["default"].ACTION_INVALID_AUTH_TOKEN:p=!1,_=!1,v="",d="",y=!0,g=t.message||"Unexpected result from API",w.emitChange();break;case f["default"].ACTION_LOG_OUT:p=!1,_=!1,v="",d="",y=!1,g="",w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!*******************************!*\
|
||||
!*** ./src/stores/service.js ***!
|
||||
\*******************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! immutable */4),s=n(/*! ../app_dispatcher */1),c=r(s),f=n(/*! ../constants */2),l=r(f),h=n(/*! ./store */3),p=r(h),_=new a.Map,v=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"all",get:function(){return _}},{key:"has",value:function(t,e){var n=_.get(t);return n&&n.contains(e)}},{key:"getServices",value:function(t){return _.get(t)||new a.List}}]),e}(p["default"]),d=new v;d.dispatchToken=c["default"].register(function(t){switch(t.actionType){case l["default"].ACTION_NEW_SERVICES:_=(new a.Map).withMutations(function(e){t.services.forEach(function(t){e.set(t.domain,new a.List(t.services))})}),d.emitChange();break;case l["default"].ACTION_REMOTE_EVENT_RECEIVED:if(t.event.event_type!==l["default"].REMOTE_EVENT_SERVICE_REGISTERED)break;var e=t.event.data,n=e.domain,r=e.service;if(d.has(n,r))break;var i=d.getServices(n);_=_.set(n,i.push(r)),d.emitChange();break;case l["default"].ACTION_LOG_OUT:_=new a.Map,d.emitChange()}}),e["default"]=d,t.exports=e["default"]},/*!******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(/*! immutable */4),s=n(/*! ../app_dispatcher */1),c=r(s),f=n(/*! ../constants */2),l=r(f),h=n(/*! ./store */3),p=r(h),_=new a.Map,v=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"all",get:function(){return _}},{key:"has",value:function(t,e){var n=_.get(t);return n&&n.contains(e)}},{key:"getServices",value:function(t){return _.get(t)||new a.List}}]),e}(p["default"]),d=new v;d.dispatchToken=c["default"].register(function(t){switch(t.actionType){case l["default"].ACTION_NEW_SERVICES:_=(new a.Map).withMutations(function(e){t.services.forEach(function(t){e.set(t.domain,new a.List(t.services))})}),d.emitChange();break;case l["default"].ACTION_REMOTE_EVENT_RECEIVED:if(t.event.event_type!==l["default"].REMOTE_EVENT_SERVICE_REGISTERED)break;var e=t.event.data,n=e.domain,r=e.service;if(d.has(n,r))break;var i=d.getServices(n);_=_.set(n,i.push(r)),d.emitChange();break;case l["default"].ACTION_LOG_OUT:_=new a.Map,d.emitChange()}}),e["default"]=d,t.exports=e["default"]},/*!******************************!*\
|
||||
!*** ./src/stores/stream.js ***!
|
||||
\******************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! ../app_dispatcher */1),s=r(a),c=n(/*! ../constants */2),f=r(c),l=n(/*! ./store */3),h=r(l),p="STATE_CONNECTED",_="STATE_DISCONNECTED",v="STATE_ERROR",d=_,y=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"state",get:function(){return d}},{key:"isStreaming",get:function(){return d===this.STATE_CONNECTED}},{key:"hasError",get:function(){return d===this.STATE_ERROR}}]),e}(h["default"]),g=new y;g.STATE_CONNECTED=p,g.STATE_DISCONNECTED=_,g.STATE_ERROR=v,g.dispatchToken=s["default"].register(function(t){switch(t.actionType){case f["default"].ACTION_STREAM_START:d=p,g.emitChange();break;case f["default"].ACTION_STREAM_STOP:d=_,g.emitChange();break;case f["default"].ACTION_STREAM_ERROR:d=v,g.emitChange()}}),e["default"]=g,t.exports=e["default"]},/*!*********************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(/*! ../app_dispatcher */1),s=r(a),c=n(/*! ../constants */2),f=r(c),l=n(/*! ./store */3),h=r(l),p="STATE_CONNECTED",_="STATE_DISCONNECTED",v="STATE_ERROR",d=_,y=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"state",get:function(){return d}},{key:"isStreaming",get:function(){return d===this.STATE_CONNECTED}},{key:"hasError",get:function(){return d===this.STATE_ERROR}}]),e}(h["default"]),g=new y;g.STATE_CONNECTED=p,g.STATE_DISCONNECTED=_,g.STATE_ERROR=v,g.dispatchToken=s["default"].register(function(t){switch(t.actionType){case f["default"].ACTION_STREAM_START:d=p,g.emitChange();break;case f["default"].ACTION_STREAM_STOP:d=_,g.emitChange();break;case f["default"].ACTION_STREAM_ERROR:d=v,g.emitChange()}}),e["default"]=g,t.exports=e["default"]},/*!*********************!*\
|
||||
!*** ./src/util.js ***!
|
||||
\*********************/
|
||||
function(t,e,n){"use strict";function r(t){var e=t.split(" "),n=i(e,2),r=n[0],o=n[1],u=r.split(":"),a=i(u,3),s=a[0],c=a[1],f=a[2],l=o.split("-"),h=i(l,3),p=h[0],_=h[1],v=h[2];return new Date(Date.UTC(v,parseInt(_)-1,p,s,c,f))}Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.parseDateTime=r},/*!**********************************!*\
|
||||
function(t,e,n){"use strict";function r(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(t){var e=t.split(" "),n=r(e,2),i=n[0],o=n[1],u=i.split(":"),a=r(u,3),s=a[0],c=a[1],f=a[2],l=o.split("-"),h=r(l,3),p=h[0],_=h[1],v=h[2];return new Date(Date.UTC(v,parseInt(_)-1,p,s,c,f))}Object.defineProperty(e,"__esModule",{value:!0}),e.parseDateTime=i},/*!**********************************!*\
|
||||
!*** ./src/actions/bootstrap.js ***!
|
||||
\**********************************/
|
||||
function(t,e,n){"use strict";function r(t){f.newStates(t.states,!0),l.newServices(t.services),h.newEvents(t.events),p.newConfig(t.config)}function i(){void 0===arguments[0]?!1:arguments[0];return a["default"]("GET","bootstrap").then(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{"default":t}};e.newBootstrapData=r,e.fetch=i;var u=n(/*! ../call_api */5),a=o(u),s=n(/*! ../app_dispatcher */1),c=(o(s),n(/*! ../constants */2)),f=(o(c),n(/*! ./state */9)),l=n(/*! ./service */8),h=n(/*! ./event */18),p=n(/*! ./config */17)},/*!*******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){f.newStates(t.states,!0),l.newServices(t.services),h.newEvents(t.events),p.newConfig(t.config)}function o(){void 0===arguments[0]?!1:arguments[0];return a["default"]("GET","bootstrap").then(i)}Object.defineProperty(e,"__esModule",{value:!0}),e.newBootstrapData=i,e.fetch=o;var u=n(/*! ../call_api */5),a=r(u),s=n(/*! ../app_dispatcher */1),c=(r(s),n(/*! ../constants */2)),f=(r(c),n(/*! ./state */9)),l=n(/*! ./service */8),h=n(/*! ./event */18),p=n(/*! ./config */17)},/*!*******************************!*\
|
||||
!*** ./src/actions/config.js ***!
|
||||
\*******************************/
|
||||
function(t,e,n){"use strict";function r(t){c["default"].dispatch({actionType:l["default"].ACTION_NEW_CONFIG,config:t})}function i(){return a["default"]("GET","config").then(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{"default":t}};e.newConfig=r,e.fetch=i;var u=n(/*! ../call_api */5),a=o(u),s=n(/*! ../app_dispatcher */1),c=o(s),f=n(/*! ../constants */2),l=o(f)},/*!******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){c["default"].dispatch({actionType:l["default"].ACTION_NEW_CONFIG,config:t})}function o(){return a["default"]("GET","config").then(i)}Object.defineProperty(e,"__esModule",{value:!0}),e.newConfig=i,e.fetch=o;var u=n(/*! ../call_api */5),a=r(u),s=n(/*! ../app_dispatcher */1),c=r(s),f=n(/*! ../constants */2),l=r(f)},/*!******************************!*\
|
||||
!*** ./src/actions/event.js ***!
|
||||
\******************************/
|
||||
function(t,e,n){"use strict";function r(t){f["default"].dispatch({actionType:h["default"].ACTION_NEW_EVENTS,events:t})}function i(){s["default"]("GET","events").then(r)}function o(t){var e=void 0===arguments[1]?{}:arguments[1];return s["default"]("POST","events/"+t,e).then(function(){p.notify("Event "+t+" successful fired!"),f["default"].dispatch({actionType:h["default"].ACTION_EVENT_FIRED,eventType:t,eventData:e})})}Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){return t&&t.__esModule?t:{"default":t}};e.newEvents=r,e.fetchAll=i,e.fire=o;var a=n(/*! ../call_api */5),s=u(a),c=n(/*! ../app_dispatcher */1),f=u(c),l=n(/*! ../constants */2),h=u(l),p=n(/*! ./notification */7)},/*!*******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){f["default"].dispatch({actionType:h["default"].ACTION_NEW_EVENTS,events:t})}function o(){s["default"]("GET","events").then(i)}function u(t){var e=void 0===arguments[1]?{}:arguments[1];return s["default"]("POST","events/"+t,e).then(function(){p.notify("Event "+t+" successful fired!"),f["default"].dispatch({actionType:h["default"].ACTION_EVENT_FIRED,eventType:t,eventData:e})})}Object.defineProperty(e,"__esModule",{value:!0}),e.newEvents=i,e.fetchAll=o,e.fire=u;var a=n(/*! ../call_api */5),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ./notification */7)},/*!*******************************!*\
|
||||
!*** ./src/actions/stream.js ***!
|
||||
\*******************************/
|
||||
function(t,e,n){"use strict";function r(){return"EventSource"in window}function i(t){var e=void 0===arguments[1]?!0:arguments[1];null!==y&&w();var n="/api/stream";t&&(n+="?api_password="+t),y=new EventSource(n),g=t,y.addEventListener("open",function(){m(),l["default"].dispatch({actionType:p["default"].ACTION_STREAM_START}),v.stop(),e?v.fetchAll():e=!0},!1),y.addEventListener("message",function(t){m(),"ping"!==t.data&&l["default"].dispatch({actionType:p["default"].ACTION_REMOTE_EVENT_RECEIVED,event:JSON.parse(t.data)})},!1),y.addEventListener("error",function(){y.readyState!==EventSource.CLOSED&&l["default"].dispatch({actionType:p["default"].ACTION_STREAM_ERROR})},!1)}function o(){w(),l["default"].dispatch({actionType:p["default"].ACTION_STREAM_STOP}),v.start()}Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e},a=function(t){return t&&t.__esModule?t:{"default":t}};e.isSupported=r,e.start=i,e.stop=o;var s=n(/*! lodash */6),c=a(s),f=n(/*! ../app_dispatcher */1),l=a(f),h=n(/*! ../constants */2),p=a(h),_=n(/*! ./sync */10),v=u(_),d=6e4,y=null,g=null,m=c["default"].debounce(function(){i(g)},d),w=function(){y.close(),y=null,g=null,m.cancel()}},/*!*********************************!*\
|
||||
function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(){return"EventSource"in window}function u(t){var e=void 0===arguments[1]?!0:arguments[1];null!==y&&w();var n="/api/stream";t&&(n+="?api_password="+t),y=new EventSource(n),g=t,y.addEventListener("open",function(){m(),l["default"].dispatch({actionType:p["default"].ACTION_STREAM_START}),v.stop(),e?v.fetchAll():e=!0},!1),y.addEventListener("message",function(t){m(),"ping"!==t.data&&l["default"].dispatch({actionType:p["default"].ACTION_REMOTE_EVENT_RECEIVED,event:JSON.parse(t.data)})},!1),y.addEventListener("error",function(){y.readyState!==EventSource.CLOSED&&l["default"].dispatch({actionType:p["default"].ACTION_STREAM_ERROR})},!1)}function a(){w(),l["default"].dispatch({actionType:p["default"].ACTION_STREAM_STOP}),v.start()}Object.defineProperty(e,"__esModule",{value:!0}),e.isSupported=o,e.start=u,e.stop=a;var s=n(/*! lodash */6),c=i(s),f=n(/*! ../app_dispatcher */1),l=i(f),h=n(/*! ../constants */2),p=i(h),_=n(/*! ./sync */10),v=r(_),d=6e4,y=null,g=null,m=c["default"].debounce(function(){u(g)},d),w=function(){y.close(),y=null,g=null,m.cancel()}},/*!*********************************!*\
|
||||
!*** ./src/stores/component.js ***!
|
||||
\*********************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=(n(/*! immutable */4),n(/*! ../app_dispatcher */1)),s=r(a),c=n(/*! ../constants */2),f=r(c),l=n(/*! ./store */3),h=r(l),p=n(/*! ./config */21),_=r(p),v=_["default"].components,d=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"loaded",get:function(){return v}},{key:"isLoaded",value:function(t){return v.contains(t)}}]),e}(h["default"]),y=new d;y.dispatchToken=s["default"].register(function(t){switch(t.actionType){case f["default"].ACTION_NEW_CONFIG:s["default"].waitFor([_["default"].dispatchToken]),v=_["default"].components,y.emitChange();break;case f["default"].ACTION_REMOTE_EVENT_RECEIVED:if(t.event.event_type!==f["default"].REMOTE_EVENT_COMPONENT_LOADED)break;var e=t.event.data.component;if(y.isLoaded(e))break;v=v.push(e),y.emitChange();break;case f["default"].ACTION_LOG_OUT:s["default"].waitFor([_["default"].dispatchToken]),v=_["default"].components,y.emitChange()}}),e["default"]=y,t.exports=e["default"]},/*!******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=(n(/*! immutable */4),n(/*! ../app_dispatcher */1)),s=r(a),c=n(/*! ../constants */2),f=r(c),l=n(/*! ./store */3),h=r(l),p=n(/*! ./config */21),_=r(p),v=_["default"].components,d=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"loaded",get:function(){return v}},{key:"isLoaded",value:function(t){return v.contains(t)}}]),e}(h["default"]),y=new d;y.dispatchToken=s["default"].register(function(t){switch(t.actionType){case f["default"].ACTION_NEW_CONFIG:s["default"].waitFor([_["default"].dispatchToken]),v=_["default"].components,y.emitChange();break;case f["default"].ACTION_REMOTE_EVENT_RECEIVED:if(t.event.event_type!==f["default"].REMOTE_EVENT_COMPONENT_LOADED)break;var e=t.event.data.component;if(y.isLoaded(e))break;v=v.push(e),y.emitChange();break;case f["default"].ACTION_LOG_OUT:s["default"].waitFor([_["default"].dispatchToken]),v=_["default"].components,y.emitChange()}}),e["default"]=y,t.exports=e["default"]},/*!******************************!*\
|
||||
!*** ./src/stores/config.js ***!
|
||||
\******************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! ../models/config */35),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ./store */3),_=r(p),v=new s["default"],d=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"latitude",get:function(){return v.latitude}},{key:"longitude",get:function(){return v.longitude}},{key:"temperature_unit",get:function(){return v.temperature_unit}},{key:"location_name",get:function(){return v.location_name}},{key:"time_zone",get:function(){return v.time_zone}},{key:"components",get:function(){return v.components}}]),e}(_["default"]),y=new d;y.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_NEW_CONFIG:v=s["default"].fromJSON(t.config),y.emitChange();break;case h["default"].ACTION_LOG_OUT:v=new s["default"],y.emitChange()}}),e["default"]=y,t.exports=e["default"]},/*!*****************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(/*! ../models/config */35),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ./store */3),_=r(p),v=new s["default"],d=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"latitude",get:function(){return v.latitude}},{key:"longitude",get:function(){return v.longitude}},{key:"temperature_unit",get:function(){return v.temperature_unit}},{key:"location_name",get:function(){return v.location_name}},{key:"time_zone",get:function(){return v.time_zone}},{key:"components",get:function(){return v.components}}]),e}(_["default"]),y=new d;y.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_NEW_CONFIG:v=s["default"].fromJSON(t.config),y.emitChange();break;case h["default"].ACTION_LOG_OUT:v=new s["default"],y.emitChange()}}),e["default"]=y,t.exports=e["default"]},/*!*****************************!*\
|
||||
!*** ./src/stores/event.js ***!
|
||||
\*****************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! immutable */4),s=n(/*! ../app_dispatcher */1),c=r(s),f=n(/*! ../constants */2),l=r(f),h=n(/*! ./store */3),p=r(h),_=new a.List,v=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"all",get:function(){return _}}]),e}(p["default"]),d=new v;d.dispatchToken=c["default"].register(function(t){switch(t.actionType){case l["default"].ACTION_NEW_EVENTS:_=new a.List(t.events),d.emitChange();break;case l["default"].ACTION_LOG_OUT:_=new a.List,d.emitChange()}}),e["default"]=d,t.exports=e["default"]},/*!*******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(/*! immutable */4),s=n(/*! ../app_dispatcher */1),c=r(s),f=n(/*! ../constants */2),l=r(f),h=n(/*! ./store */3),p=r(h),_=new a.List,v=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"all",get:function(){return _}}]),e}(p["default"]),d=new v;d.dispatchToken=c["default"].register(function(t){switch(t.actionType){case l["default"].ACTION_NEW_EVENTS:_=new a.List(t.events),d.emitChange();break;case l["default"].ACTION_LOG_OUT:_=new a.List,d.emitChange()}}),e["default"]=d,t.exports=e["default"]},/*!*******************************!*\
|
||||
!*** ./src/stores/logbook.js ***!
|
||||
\*******************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! immutable */4),s=n(/*! ../app_dispatcher */1),c=r(s),f=n(/*! ../constants */2),l=r(f),h=n(/*! ../stores/store */3),p=r(h),_=n(/*! ../models/logbook_entry */36),v=r(_),d=6e4,y=null,g=new a.List,m=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"isStale",value:function(){return null===y||(new Date).getTime()-y.getTime()>d}},{key:"all",get:function(){return g}}]),e}(p["default"]),w=new m;w.dispatchToken=c["default"].register(function(t){switch(t.actionType){case l["default"].ACTION_NEW_LOGBOOK:g=new a.List(t.logbookEntries.map(function(t){return v["default"].fromJSON(t)})),y=new Date,w.emitChange();break;case l["default"].ACTION_LOG_OUT:y=null,g=new a.List,w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!************************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(/*! immutable */4),s=n(/*! ../app_dispatcher */1),c=r(s),f=n(/*! ../constants */2),l=r(f),h=n(/*! ../stores/store */3),p=r(h),_=n(/*! ../models/logbook_entry */36),v=r(_),d=6e4,y=null,g=new a.List,m=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"isStale",value:function(){return null===y||(new Date).getTime()-y.getTime()>d}},{key:"all",get:function(){return g}}]),e}(p["default"]),w=new m;w.dispatchToken=c["default"].register(function(t){switch(t.actionType){case l["default"].ACTION_NEW_LOGBOOK:g=new a.List(t.logbookEntries.map(function(t){return v["default"].fromJSON(t)})),y=new Date,w.emitChange();break;case l["default"].ACTION_LOG_OUT:y=null,g=new a.List,w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!************************************!*\
|
||||
!*** ./src/stores/notification.js ***!
|
||||
\************************************/
|
||||
function(t,e,n){"use strict";function r(){return y.size}Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{"default":t}},o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},s=n(/*! immutable */4),c=n(/*! ../app_dispatcher */1),f=i(c),l=n(/*! ../constants */2),h=i(l),p=n(/*! ../stores/store */3),_=i(p),v=n(/*! ../models/notification */37),d=i(v),y=new s.List,g=function(t){function e(){o(this,e),null!=t&&t.apply(this,arguments)}return a(e,t),u(e,[{key:"hasNewNotifications",value:function(){var t=void 0===arguments[0]?0:arguments[0];return t+1<=y.size}},{key:"lastNotification",get:function(){return y.last()}}]),e}(_["default"]),m=new g;m.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_NEW_NOTIFICATION:y=y.push(new d["default"](r(),t.message)),m.emitChange();break;case h["default"].ACTION_LOG_OUT:y=new s.List,m.emitChange()}}),e["default"]=m,t.exports=e["default"]},/*!*****************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}function u(){return y.size}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(/*! immutable */4),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ../stores/store */3),_=r(p),v=n(/*! ../models/notification */37),d=r(v),y=new s.List,g=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),a(e,[{key:"hasNewNotifications",value:function(){var t=void 0===arguments[0]?0:arguments[0];return t+1<=y.size}},{key:"lastNotification",get:function(){return y.last()}}]),e}(_["default"]),m=new g;m.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_NEW_NOTIFICATION:y=y.push(new d["default"](u(),t.message)),m.emitChange();break;case h["default"].ACTION_LOG_OUT:y=new s.List,m.emitChange()}}),e["default"]=m,t.exports=e["default"]},/*!*****************************!*\
|
||||
!*** ./src/stores/state.js ***!
|
||||
\*****************************/
|
||||
function(t,e,n){"use strict";function r(t){return t.entityId}function i(t){b=b.set(t.entity_id,w["default"].fromJSON(t))}function o(t,e){var n=e?new f.Map:b;b=n.withMutations(function(e){return t.forEach(function(t){return e.set(t.entity_id,w["default"].fromJSON(t))}),e})}Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){return t&&t.__esModule?t:{"default":t}},a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},f=n(/*! immutable */4),l=n(/*! ../app_dispatcher */1),h=u(l),p=n(/*! ../constants */2),_=u(p),v=n(/*! ./store */3),d=u(v),y=n(/*! ./stream */14),g=u(y),m=n(/*! ../models/state */11),w=u(m),b=new f.Map,T=function(t){function e(){a(this,e),null!=t&&t.apply(this,arguments)}return c(e,t),s(e,[{key:"all",get:function(){return b.valueSeq().sortBy(r)}},{key:"get",value:function(t){return t=t.toLowerCase(),b.get(t)||null}},{key:"gets",value:function(t){return t=t.map(function(t){return t.toLowerCase()}),b.valueSeq().filter(function(e){return-1!==t.indexOf(e.entityId)}).sortBy(r)}},{key:"entityIDs",get:function(){return b.keySeq().sort()}},{key:"domains",get:function(){return b.keySeq().map(function(t){return t.split(".")[0]}).sort().toOrderedSet()}}]),e}(d["default"]),E=new T;E.dispatchToken=h["default"].register(function(t){switch(t.actionType){case _["default"].ACTION_NEW_STATES:(!g["default"].isStreaming||t.replace)&&(o(t.states,t.replace),E.emitChange());break;case _["default"].ACTION_REMOTE_EVENT_RECEIVED:t.event.event_type===_["default"].REMOTE_EVENT_STATE_CHANGED&&(i(t.event.data.new_state),E.emitChange());break;case _["default"].ACTION_LOG_OUT:b=new f.Map,E.emitChange()}}),e["default"]=E,t.exports=e["default"]},/*!*************************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}function u(t){return t.entityId}function a(t){b=b.set(t.entity_id,w["default"].fromJSON(t))}function s(t,e){var n=e?new f.Map:b;b=n.withMutations(function(e){return t.forEach(function(t){return e.set(t.entity_id,w["default"].fromJSON(t))}),e})}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=n(/*! immutable */4),l=n(/*! ../app_dispatcher */1),h=r(l),p=n(/*! ../constants */2),_=r(p),v=n(/*! ./store */3),d=r(v),y=n(/*! ./stream */14),g=r(y),m=n(/*! ../models/state */11),w=r(m),b=new f.Map,T=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),c(e,[{key:"all",get:function(){return b.valueSeq().sortBy(u)}},{key:"get",value:function(t){return t=t.toLowerCase(),b.get(t)||null}},{key:"gets",value:function(t){return t=t.map(function(t){return t.toLowerCase()}),b.valueSeq().filter(function(e){return-1!==t.indexOf(e.entityId)}).sortBy(u)}},{key:"entityIDs",get:function(){return b.keySeq().sort()}},{key:"domains",get:function(){return b.keySeq().map(function(t){return t.split(".")[0]}).sort().toOrderedSet()}}]),e}(d["default"]),E=new T;E.dispatchToken=h["default"].register(function(t){switch(t.actionType){case _["default"].ACTION_NEW_STATES:(!g["default"].isStreaming||t.replace)&&(s(t.states,t.replace),E.emitChange());break;case _["default"].ACTION_REMOTE_EVENT_RECEIVED:t.event.event_type===_["default"].REMOTE_EVENT_STATE_CHANGED&&(a(t.event.data.new_state),E.emitChange());break;case _["default"].ACTION_LOG_OUT:b=new f.Map,E.emitChange()}}),e["default"]=E,t.exports=e["default"]},/*!*************************************!*\
|
||||
!*** ./src/stores/state_history.js ***!
|
||||
\*************************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! lodash */6),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ../stores/store */3),_=r(p),v=6e4,d=null,y={},g={},m=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"isStale",value:function(){var t=void 0===arguments[0]?null:arguments[0],e=null===t?d:y[t]||null;return null===e||(new Date).getTime()-e.getTime()>v}},{key:"get",value:function(t){return g[t]||null}},{key:"all",get:function(){return s["default"].sortBy(s["default"].values(g),function(t){return t[0].entityId})}}]),e}(_["default"]),w=new m;w.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_NEW_STATE_HISTORY:s["default"].forEach(t.stateHistory,function(t){if(0!==t.length){var e=t[0].entityId;g[e]=t,y[e]=new Date}}),t.isFetchAll&&(d=new Date),w.emitChange();break;case h["default"].ACTION_LOG_OUT:d=null,y={},g={},w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!****************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(/*! lodash */6),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ../stores/store */3),_=r(p),v=6e4,d=null,y={},g={},m=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"isStale",value:function(){var t=void 0===arguments[0]?null:arguments[0],e=null===t?d:y[t]||null;return null===e||(new Date).getTime()-e.getTime()>v}},{key:"get",value:function(t){return g[t]||null}},{key:"all",get:function(){return s["default"].sortBy(s["default"].values(g),function(t){return t[0].entityId})}}]),e}(_["default"]),w=new m;w.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_NEW_STATE_HISTORY:s["default"].forEach(t.stateHistory,function(t){if(0!==t.length){var e=t[0].entityId;g[e]=t,y[e]=new Date}}),t.isFetchAll&&(d=new Date),w.emitChange();break;case h["default"].ACTION_LOG_OUT:d=null,y={},g={},w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!****************************!*\
|
||||
!*** ./src/stores/sync.js ***!
|
||||
\****************************/
|
||||
function(t,e,n){"use strict";function r(t){return-1!==y.indexOf(t)}function i(){return y.length===v}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{"default":t}},u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},c=n(/*! ../app_dispatcher */1),f=o(c),l=n(/*! ../constants */2),h=o(l),p=n(/*! ../stores/store */3),_=o(p),v=4,d=!1,y=[],g=function(t){function e(){u(this,e),null!=t&&t.apply(this,arguments)}return s(e,t),a(e,[{key:"isFetching",get:function(){return!i()}},{key:"initialLoadDone",get:function(){return d}},{key:"componentsLoaded",get:function(){return r(h["default"].ACTION_NEW_CONFIG)}},{key:"eventsLoaded",get:function(){return r(h["default"].ACTION_NEW_EVENTS)}},{key:"servicesLoaded",get:function(){return r(h["default"].ACTION_NEW_SERVICES)}},{key:"statesLoaded",get:function(){return r(h["default"].ACTION_NEW_STATES)}}]),e}(_["default"]),m=new g;m.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_FETCH_ALL:y=[],m.emitChange();break;case h["default"].ACTION_NEW_CONFIG:case h["default"].ACTION_NEW_EVENTS:case h["default"].ACTION_NEW_SERVICES:case h["default"].ACTION_NEW_STATES:r(t.actionType)||(y.push(t.actionType),d=d||i(),m.emitChange());break;case h["default"].ACTION_LOG_OUT:d=!1,y=[],m.emitChange()}}),e["default"]=m,t.exports=e["default"]},/*!*****************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}function u(t){return-1!==y.indexOf(t)}function a(){return y.length===v}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ../stores/store */3),_=r(p),v=4,d=!1,y=[],g=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),s(e,[{key:"isFetching",get:function(){return!a()}},{key:"initialLoadDone",get:function(){return d}},{key:"componentsLoaded",get:function(){return u(h["default"].ACTION_NEW_CONFIG)}},{key:"eventsLoaded",get:function(){return u(h["default"].ACTION_NEW_EVENTS)}},{key:"servicesLoaded",get:function(){return u(h["default"].ACTION_NEW_SERVICES)}},{key:"statesLoaded",get:function(){return u(h["default"].ACTION_NEW_STATES)}}]),e}(_["default"]),m=new g;m.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_FETCH_ALL:y=[],m.emitChange();break;case h["default"].ACTION_NEW_CONFIG:case h["default"].ACTION_NEW_EVENTS:case h["default"].ACTION_NEW_SERVICES:case h["default"].ACTION_NEW_STATES:u(t.actionType)||(y.push(t.actionType),d=d||a(),m.emitChange());break;case h["default"].ACTION_LOG_OUT:d=!1,y=[],m.emitChange()}}),e["default"]=m,t.exports=e["default"]},/*!*****************************!*\
|
||||
!*** ./src/stores/voice.js ***!
|
||||
\*****************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! ../app_dispatcher */1),s=r(a),c=n(/*! ../constants */2),f=r(c),l=n(/*! ./store */3),h=r(l),p="STATE_LISTENING",_="STATE_TRANSMITTING",v="STATE_IDLE",d="STATE_ERROR",y=v,g="",m="",w=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),o(e,[{key:"state",get:function(){return y}},{key:"isListening",get:function(){return y===p}},{key:"isTransmitting",get:function(){return y===_}},{key:"hasError",get:function(){return y===d}},{key:"interimTranscript",get:function(){return g}},{key:"finalTranscript",get:function(){return m}}]),e}(h["default"]),b=new w;b.STATE_LISTENING=p,b.STATE_TRANSMITTING=_,b.STATE_IDLE=v,b.STATE_ERROR=d,b.dispatchToken=s["default"].register(function(t){switch(t.actionType){case f["default"].ACTION_LISTENING_START:y=p,g="",m="",b.emitChange();break;case f["default"].ACTION_LISTENING_TRANSMITTING:y=_,g="",m=t.finalTranscript,b.emitChange();break;case f["default"].ACTION_LISTENING_DONE:y=v,b.emitChange();break;case f["default"].ACTION_LISTENING_ERROR:y=d,b.emitChange();break;case f["default"].ACTION_LISTENING_RESULT:g=t.interimTranscript,m=t.finalTranscript,b.emitChange()}}),e["default"]=b,t.exports=e["default"]},/*!*****************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(/*! ../app_dispatcher */1),s=r(a),c=n(/*! ../constants */2),f=r(c),l=n(/*! ./store */3),h=r(l),p="STATE_LISTENING",_="STATE_TRANSMITTING",v="STATE_IDLE",d="STATE_ERROR",y=v,g="",m="",w=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),u(e,[{key:"state",get:function(){return y}},{key:"isListening",get:function(){return y===p}},{key:"isTransmitting",get:function(){return y===_}},{key:"hasError",get:function(){return y===d}},{key:"interimTranscript",get:function(){return g}},{key:"finalTranscript",get:function(){return m}}]),e}(h["default"]),b=new w;b.STATE_LISTENING=p,b.STATE_TRANSMITTING=_,b.STATE_IDLE=v,b.STATE_ERROR=d,b.dispatchToken=s["default"].register(function(t){switch(t.actionType){case f["default"].ACTION_LISTENING_START:y=p,g="",m="",b.emitChange();break;case f["default"].ACTION_LISTENING_TRANSMITTING:y=_,g="",m=t.finalTranscript,b.emitChange();break;case f["default"].ACTION_LISTENING_DONE:y=v,b.emitChange();break;case f["default"].ACTION_LISTENING_ERROR:y=d,b.emitChange();break;case f["default"].ACTION_LISTENING_RESULT:g=t.interimTranscript,m=t.finalTranscript,b.emitChange()}}),e["default"]=b,t.exports=e["default"]},/*!*****************************!*\
|
||||
!*** ./src/actions/auth.js ***!
|
||||
\*****************************/
|
||||
function(t,e,n){"use strict";function r(t,e){var n=e.useStreaming,r=void 0===n?v.isSupported:n,i=e.rememberLogin,o=void 0===i?!1:i,u=e.host,a=void 0===u?"":u;c["default"].dispatch({actionType:l["default"].ACTION_VALIDATING_AUTH_TOKEN,authToken:t,host:a}),d.fetch().then(function(){c["default"].dispatch({actionType:l["default"].ACTION_VALID_AUTH_TOKEN,authToken:t,rememberLogin:o}),r?v.start(t,!1):p.start()},function(t){c["default"].dispatch({actionType:l["default"].ACTION_INVALID_AUTH_TOKEN,message:t.message})})}function i(){c["default"].dispatch({actionType:l["default"].ACTION_LOG_OUT})}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e},u=function(t){return t&&t.__esModule?t:{"default":t}};e.validate=r,e.logOut=i;var a=n(/*! ../call_api */5),s=(u(a),n(/*! ../app_dispatcher */1)),c=u(s),f=n(/*! ../constants */2),l=u(f),h=n(/*! ./sync */10),p=o(h),_=n(/*! ./stream */19),v=o(_),d=n(/*! ./bootstrap */16)},/*!********************************!*\
|
||||
function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n=e.useStreaming,r=void 0===n?v.isSupported:n,i=e.rememberLogin,o=void 0===i?!1:i,u=e.host,a=void 0===u?"":u;c["default"].dispatch({actionType:l["default"].ACTION_VALIDATING_AUTH_TOKEN,authToken:t,host:a}),d.fetch().then(function(){c["default"].dispatch({actionType:l["default"].ACTION_VALID_AUTH_TOKEN,authToken:t,rememberLogin:o}),r?v.start(t,!1):p.start()},function(t){c["default"].dispatch({actionType:l["default"].ACTION_INVALID_AUTH_TOKEN,message:t.message})})}function u(){c["default"].dispatch({actionType:l["default"].ACTION_LOG_OUT})}Object.defineProperty(e,"__esModule",{value:!0}),e.validate=o,e.logOut=u;var a=n(/*! ../call_api */5),s=(i(a),n(/*! ../app_dispatcher */1)),c=i(s),f=n(/*! ../constants */2),l=i(f),h=n(/*! ./sync */10),p=r(h),_=n(/*! ./stream */19),v=r(_),d=n(/*! ./bootstrap */16)},/*!********************************!*\
|
||||
!*** ./src/actions/logbook.js ***!
|
||||
\********************************/
|
||||
function(t,e,n){"use strict";function r(t){c["default"].dispatch({actionType:l["default"].ACTION_NEW_LOGBOOK,logbookEntries:t})}function i(){a["default"]("GET","logbook").then(r)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{"default":t}};e.fetch=i;var u=n(/*! ../call_api */5),a=o(u),s=n(/*! ../app_dispatcher */1),c=o(s),f=n(/*! ../constants */2),l=o(f)},/*!**************************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){c["default"].dispatch({actionType:l["default"].ACTION_NEW_LOGBOOK,logbookEntries:t})}function o(){a["default"]("GET","logbook").then(i)}Object.defineProperty(e,"__esModule",{value:!0}),e.fetch=o;var u=n(/*! ../call_api */5),a=r(u),s=n(/*! ../app_dispatcher */1),c=r(s),f=n(/*! ../constants */2),l=r(f)},/*!**************************************!*\
|
||||
!*** ./src/actions/state_history.js ***!
|
||||
\**************************************/
|
||||
function(t,e,n){"use strict";function r(t,e){(t||e.length>0)&&f["default"].dispatch({actionType:h["default"].ACTION_NEW_STATE_HISTORY,stateHistory:e.map(function(t){return t.map(_["default"].fromJSON)}),isFetchAll:t})}function i(){s["default"]("GET","history/period").then(function(t){return r(!0,t)})}function o(t){s["default"]("GET","history/period?filter_entity_id="+t).then(function(t){return r(!1,t)})}Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){return t&&t.__esModule?t:{"default":t}};e.fetchAll=i,e.fetch=o;var a=n(/*! ../call_api */5),s=u(a),c=n(/*! ../app_dispatcher */1),f=u(c),l=n(/*! ../constants */2),h=u(l),p=n(/*! ../models/state */11),_=u(p)},/*!******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){(t||e.length>0)&&f["default"].dispatch({actionType:h["default"].ACTION_NEW_STATE_HISTORY,stateHistory:e.map(function(t){return t.map(_["default"].fromJSON)}),isFetchAll:t})}function o(){s["default"]("GET","history/period").then(function(t){return i(!0,t)})}function u(t){s["default"]("GET","history/period?filter_entity_id="+t).then(function(t){return i(!1,t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.fetchAll=o,e.fetch=u;var a=n(/*! ../call_api */5),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ../models/state */11),_=r(p)},/*!******************************!*\
|
||||
!*** ./src/actions/voice.js ***!
|
||||
\******************************/
|
||||
function(t,e,n){"use strict";function r(){return"webkitSpeechRecognition"in window}function i(){var t=g||y;l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_TRANSMITTING,finalTranscript:t}),_.callService("conversation","process",{text:t}).then(function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_DONE,finalTranscript:t})},function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_ERROR})})}function o(){null!==d&&(d.onstart=null,d.onresult=null,d.onerror=null,d.onend=null,d.stop(),d=null,i()),y="",g=""}function u(){o(),window.r=d=new webkitSpeechRecognition,d.interimResults=!0,d.onstart=function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_START})},d.onresult=function(t){y="";for(var e=t.resultIndex;e<t.results.length;++e)t.results[e].isFinal?g+=t.results[e][0].transcript:y+=t.results[e][0].transcript;l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_RESULT,interimTranscript:y,finalTranscript:g}),m()},d.onerror=function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_ERROR})},d.onend=o,d.start()}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){return t&&t.__esModule?t:{"default":t}};e.isSupported=r,e.stop=o,e.listen=u;var s=n(/*! lodash */6),c=a(s),f=n(/*! ../app_dispatcher */1),l=a(f),h=n(/*! ../constants */2),p=a(h),_=n(/*! ./service */8),v=3e3,d=null,y="",g="",m=c["default"].debounce(o,v)},/*!******************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(){return"webkitSpeechRecognition"in window}function o(){var t=g||y;l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_TRANSMITTING,finalTranscript:t}),_.callService("conversation","process",{text:t}).then(function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_DONE,finalTranscript:t})},function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_ERROR})})}function u(){null!==d&&(d.onstart=null,d.onresult=null,d.onerror=null,d.onend=null,d.stop(),d=null,o()),y="",g=""}function a(){u(),window.r=d=new webkitSpeechRecognition,d.interimResults=!0,d.onstart=function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_START})},d.onresult=function(t){y="";for(var e=t.resultIndex;e<t.results.length;++e)t.results[e].isFinal?g+=t.results[e][0].transcript:y+=t.results[e][0].transcript;l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_RESULT,interimTranscript:y,finalTranscript:g}),m()},d.onerror=function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_ERROR})},d.onend=u,d.start()}Object.defineProperty(e,"__esModule",{value:!0}),e.isSupported=i,e.stop=u,e.listen=a;var s=n(/*! lodash */6),c=r(s),f=n(/*! ../app_dispatcher */1),l=r(f),h=n(/*! ../constants */2),p=r(h),_=n(/*! ./service */8),v=3e3,d=null,y="",g="",m=c["default"].debounce(u,v)},/*!******************************!*\
|
||||
!*** ./src/homeassistant.js ***!
|
||||
\******************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=n(/*! ./app_dispatcher */1),o=r(i);e["default"]={callApi:n(/*! ./call_api */5),dispatcher:o["default"],constants:n(/*! ./constants */2),util:n(/*! ./util */15),authActions:n(/*! ./actions/auth */29),eventActions:n(/*! ./actions/event */18),serviceActions:n(/*! ./actions/service */8),stateActions:n(/*! ./actions/state */9),syncActions:n(/*! ./actions/sync */10),stateHistoryActions:n(/*! ./actions/state_history */31),streamActions:n(/*! ./actions/stream */19),voiceActions:n(/*! ./actions/voice */32),logbookActions:n(/*! ./actions/logbook */30),configActions:n(/*! ./actions/config */17),authStore:n(/*! ./stores/auth */12),componentStore:n(/*! ./stores/component */20),eventStore:n(/*! ./stores/event */22),serviceStore:n(/*! ./stores/service */13),stateStore:n(/*! ./stores/state */25),syncStore:n(/*! ./stores/sync */27),stateHistoryStore:n(/*! ./stores/state_history */26),streamStore:n(/*! ./stores/stream */14),preferenceStore:n(/*! ./stores/preference */38),notificationStore:n(/*! ./stores/notification */24),voiceStore:n(/*! ./stores/voice */28),logbookStore:n(/*! ./stores/logbook */23),configStore:n(/*! ./stores/config */21),stateModel:n(/*! ./models/state */11),storeListenerMixIn:n(/*! ./mixins/store_listener */34)},t.exports=e["default"]},/*!**************************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(/*! ./app_dispatcher */1),o=r(i);e["default"]={callApi:n(/*! ./call_api */5),dispatcher:o["default"],constants:n(/*! ./constants */2),util:n(/*! ./util */15),authActions:n(/*! ./actions/auth */29),eventActions:n(/*! ./actions/event */18),serviceActions:n(/*! ./actions/service */8),stateActions:n(/*! ./actions/state */9),syncActions:n(/*! ./actions/sync */10),stateHistoryActions:n(/*! ./actions/state_history */31),streamActions:n(/*! ./actions/stream */19),voiceActions:n(/*! ./actions/voice */32),logbookActions:n(/*! ./actions/logbook */30),configActions:n(/*! ./actions/config */17),authStore:n(/*! ./stores/auth */12),componentStore:n(/*! ./stores/component */20),eventStore:n(/*! ./stores/event */22),serviceStore:n(/*! ./stores/service */13),stateStore:n(/*! ./stores/state */25),syncStore:n(/*! ./stores/sync */27),stateHistoryStore:n(/*! ./stores/state_history */26),streamStore:n(/*! ./stores/stream */14),preferenceStore:n(/*! ./stores/preference */38),notificationStore:n(/*! ./stores/notification */24),voiceStore:n(/*! ./stores/voice */28),logbookStore:n(/*! ./stores/logbook */23),configStore:n(/*! ./stores/config */21),stateModel:n(/*! ./models/state */11),storeListenerMixIn:n(/*! ./mixins/store_listener */34)},t.exports=e["default"]},/*!**************************************!*\
|
||||
!*** ./src/mixins/store_listener.js ***!
|
||||
\**************************************/
|
||||
function(t,e,n){"use strict";function r(t,e){e=e||this;var n=[];_.forEach(o,function(r,i){if(e[i]){var o=e[i].bind(e,r);r.addChangeListener(o),n.push({store:r,listener:o}),t&&o()}}.bind(e)),e._storeListeners=n}function i(t){t=t||this,t._storeListeners.forEach(function(t){var e=t.store,n=t.listener;e.removeChangeListener(n)})}Object.defineProperty(e,"__esModule",{value:!0}),e.listenToStores=r,e.stopListeningToStores=i,_=n(/*! lodash */6);var o={authStoreChanged:n(/*! ../stores/auth */12),componentStoreChanged:n(/*! ../stores/component */20),eventStoreChanged:n(/*! ../stores/event */22),serviceStoreChanged:n(/*! ../stores/service */13),stateStoreChanged:n(/*! ../stores/state */25),stateHistoryStoreChanged:n(/*! ../stores/state_history */26),streamStoreChanged:n(/*! ../stores/stream */14),syncStoreChanged:n(/*! ../stores/sync */27),notificationStoreChanged:n(/*! ../stores/notification */24),voiceStoreChanged:n(/*! ../stores/voice */28),logbookStoreChanged:n(/*! ../stores/logbook */23)}},/*!******************************!*\
|
||||
!*** ./src/models/config.js ***!
|
||||
\******************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t,e,n){for(var r=!0;r;){a=c=s=void 0,r=!1;var i=t,o=e,u=n,a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;return void 0===s?void 0:s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=u,r=!0}},u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! immutable */4),s=new a.Record({latitude:null,longitude:null,temperature_unit:null,location_name:null,time_zone:null,components:null},"Config"),c=function(t){function e(t,n,i,u,s,c){r(this,e),o(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{latitude:t,longitude:n,temperature_unit:i,location_name:u||"",time_zone:s,components:new a.List(c)})}return u(e,t),i(e,null,[{key:"fromJSON",value:function(t){var n=t.latitude,r=t.longitude,i=t.temperature_unit,o=t.location_name,u=t.time_zone,a=t.components;return new e(n,r,i,o,u,a)}}]),e}(s);e["default"]=c,t.exports=e["default"]},/*!*************************************!*\
|
||||
function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;a=c=s=void 0,r=!1;var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;return void 0===s?void 0:s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=u,r=!0}},a=n(/*! immutable */4),s=new a.Record({latitude:null,longitude:null,temperature_unit:null,location_name:null,time_zone:null,components:null},"Config"),c=function(t){function e(t,n,i,o,s,c){r(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{latitude:t,longitude:n,temperature_unit:i,location_name:o||"",time_zone:s,components:new a.List(c)})}return i(e,t),o(e,null,[{key:"fromJSON",value:function(t){var n=t.latitude,r=t.longitude,i=t.temperature_unit,o=t.location_name,u=t.time_zone,a=t.components;return new e(n,r,i,o,u,a)}}]),e}(s);e["default"]=c,t.exports=e["default"]},/*!*************************************!*\
|
||||
!*** ./src/models/logbook_entry.js ***!
|
||||
\*************************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t,e,n){for(var r=!0;r;){a=c=s=void 0,r=!1;var i=t,o=e,u=n,a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;return void 0===s?void 0:s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=u,r=!0}},u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},a=n(/*! immutable */4),s=n(/*! ../util */15),c=new a.Record({when:null,name:null,message:null,domain:null,entityId:null},"LogbookEntry"),f=function(t){function e(t,n,i,u,a){r(this,e),o(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{when:t,name:n,message:i,domain:u,entityId:a})}return u(e,t),i(e,null,[{key:"fromJSON",value:function(t){var n=t.when,r=t.name,i=t.message,o=t.domain,u=t.entity_id;return new e(s.parseDateTime(n),r,i,o,u)}}]),e}(c);e["default"]=f,t.exports=e["default"]},/*!************************************!*\
|
||||
function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;a=c=s=void 0,r=!1;var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;return void 0===s?void 0:s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=u,r=!0}},a=n(/*! immutable */4),s=n(/*! ../util */15),c=new a.Record({when:null,name:null,message:null,domain:null,entityId:null},"LogbookEntry"),f=function(t){function e(t,n,i,o,a){r(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{when:t,name:n,message:i,domain:o,entityId:a})}return i(e,t),o(e,null,[{key:"fromJSON",value:function(t){var n=t.when,r=t.name,i=t.message,o=t.domain,u=t.entity_id;return new e(s.parseDateTime(n),r,i,o,u)}}]),e}(c);e["default"]=f,t.exports=e["default"]},/*!************************************!*\
|
||||
!*** ./src/models/notification.js ***!
|
||||
\************************************/
|
||||
function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(t,e,n){for(var r=!0;r;){a=c=s=void 0,r=!1;var i=t,o=e,u=n,a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;return void 0===s?void 0:s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=u,r=!0}},o=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},u=n(/*! immutable */4),a=new u.Record({id:null,message:null},"Notification"),s=function(t){function e(t,n){r(this,e),i(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{id:t,message:n})}return o(e,t),e}(a);e["default"]=s,t.exports=e["default"]},/*!**********************************!*\
|
||||
function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e,n){for(var r=!0;r;){var i=t,o=e,u=n;a=c=s=void 0,r=!1;var a=Object.getOwnPropertyDescriptor(i,o);if(void 0!==a){if("value"in a)return a.value;var s=a.get;return void 0===s?void 0:s.call(u)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=u,r=!0}},u=n(/*! immutable */4),a=new u.Record({id:null,message:null},"Notification"),s=function(t){function e(t,n){r(this,e),o(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,{id:t,message:n})}return i(e,t),e}(a);e["default"]=s,t.exports=e["default"]},/*!**********************************!*\
|
||||
!*** ./src/stores/preference.js ***!
|
||||
\**********************************/
|
||||
function(t,e,n){"use strict";function r(t,e){d[t]=JSON.stringify(e)}function i(t,e){return t in d?JSON.parse(d[t]):e}function o(t){return t in d?(d.removeItem(t),!0):!1}Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){return t&&t.__esModule?t:{"default":t}},a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},f=n(/*! ../app_dispatcher */1),l=u(f),h=n(/*! ../constants */2),p=u(h),_=n(/*! ./store */3),v=u(_);try{var d=localStorage}catch(y){var d={}}var g="PREF_AUTH_TOKEN",m=null,w="PREF_USE_STREAMING",b=!0,T=function(t){function e(){a(this,e),null!=t&&t.apply(this,arguments)}return c(e,t),s(e,[{key:"useStreaming",get:function(){return i(w,b)}},{key:"hasAuthToken",get:function(){return null!==this.authToken}},{key:"authToken",get:function(){return i(g,m)}}]),e}(v["default"]),E=new T;E.dispatchToken=l["default"].register(function(t){switch(t.actionType){case p["default"].ACTION_VALID_AUTH_TOKEN:t.rememberLogin&&(r(g,t.authToken),E.emitChange());break;case p["default"].ACTION_LOG_OUT:o(g)&&E.emitChange();break;case p["default"].ACTION_STREAM_START:r(w,!0),E.emitChange();break;case p["default"].ACTION_STREAM_STOP:r(w,!1),E.emitChange()}}),e["default"]=E,t.exports=e["default"]},/*!*************************!*\
|
||||
function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}function u(t,e){d[t]=JSON.stringify(e)}function a(t,e){return t in d?JSON.parse(d[t]):e}function s(t){return t in d?(d.removeItem(t),!0):!1}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=n(/*! ../app_dispatcher */1),l=r(f),h=n(/*! ../constants */2),p=r(h),_=n(/*! ./store */3),v=r(_);try{var d=localStorage}catch(y){var d={}}var g="PREF_AUTH_TOKEN",m=null,w="PREF_USE_STREAMING",b=!0,T=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return o(e,t),c(e,[{key:"useStreaming",get:function(){return a(w,b)}},{key:"hasAuthToken",get:function(){return null!==this.authToken}},{key:"authToken",get:function(){return a(g,m)}}]),e}(v["default"]),E=new T;E.dispatchToken=l["default"].register(function(t){switch(t.actionType){case p["default"].ACTION_VALID_AUTH_TOKEN:t.rememberLogin&&(u(g,t.authToken),E.emitChange());break;case p["default"].ACTION_LOG_OUT:s(g)&&E.emitChange();break;case p["default"].ACTION_STREAM_START:u(w,!0),E.emitChange();break;case p["default"].ACTION_STREAM_STOP:u(w,!1),E.emitChange()}}),e["default"]=E,t.exports=e["default"]},/*!*************************!*\
|
||||
!*** ./~/flux/index.js ***!
|
||||
\*************************/
|
||||
function(t,e,n){t.exports.Dispatcher=n(/*! ./lib/Dispatcher */40)},/*!**********************************!*\
|
||||
@@ -5989,13 +5988,13 @@ function(t,e,n){t.exports.Dispatcher=n(/*! ./lib/Dispatcher */40)},/*!**********
|
||||
function(t,e,n){"use strict";function r(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=n(/*! ./invariant */41),o=1,u="ID_";r.prototype.register=function(t){var e=u+o++;return this.$Dispatcher_callbacks[e]=t,e},r.prototype.unregister=function(t){i(this.$Dispatcher_callbacks[t],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",t),delete this.$Dispatcher_callbacks[t]},r.prototype.waitFor=function(t){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;e<t.length;e++){var n=t[e];this.$Dispatcher_isPending[n]?i(this.$Dispatcher_isHandled[n],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",n):(i(this.$Dispatcher_callbacks[n],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",n),this.$Dispatcher_invokeCallback(n))}},r.prototype.dispatch=function(t){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(t);try{for(var e in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[e]||this.$Dispatcher_invokeCallback(e)}finally{this.$Dispatcher_stopDispatching()}},r.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},r.prototype.$Dispatcher_invokeCallback=function(t){this.$Dispatcher_isPending[t]=!0,this.$Dispatcher_callbacks[t](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[t]=!0},r.prototype.$Dispatcher_startDispatching=function(t){for(var e in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[e]=!1,this.$Dispatcher_isHandled[e]=!1;this.$Dispatcher_pendingPayload=t,this.$Dispatcher_isDispatching=!0},r.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},t.exports=r},/*!*********************************!*\
|
||||
!*** ./~/flux/lib/invariant.js ***!
|
||||
\*********************************/
|
||||
function(t,e,n){"use strict";var r=function(t,e,n,r,i,o,u,a){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,u,a],f=0;s=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return c[f++]}))}throw s.framesToPop=1,s}};t.exports=r},/*!***********************************!*\
|
||||
function(t,e,n){"use strict";var r=function(t,e,n,r,i,o,u,a){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,u,a],f=0;s=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return c[f++]}))}throw s.framesToPop=1,s}};t.exports=r},/*!************************************************!*\
|
||||
!*** ./~/node-libs-browser/~/events/events.js ***!
|
||||
\************************************************/
|
||||
function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function u(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!o(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||u(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],a(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),s=1;r>s;s++)o[s-1]=arguments[s];n.apply(this,o)}else if(u(n)){for(r=arguments.length,o=new Array(r-1),s=1;r>s;s++)o[s-1]=arguments[s];for(c=n.slice(),r=c.length,s=0;r>s;s++)c[s].apply(this,o)}return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?u(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,u(this._events[t])&&!this._events[t].warned){var n;n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(u(n)){for(a=o;a-->0;)if(n[a]===e||n[a].listener&&n[a].listener===e){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},/*!***********************************!*\
|
||||
!*** (webpack)/buildin/module.js ***!
|
||||
\***********************************/
|
||||
function(t,e,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},/*!********************************************************!*\
|
||||
!*** (webpack)/~/node-libs-browser/~/events/events.js ***!
|
||||
\********************************************************/
|
||||
function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function u(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!o(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||u(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],a(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),s=1;r>s;s++)o[s-1]=arguments[s];n.apply(this,o)}else if(u(n)){for(r=arguments.length,o=new Array(r-1),s=1;r>s;s++)o[s-1]=arguments[s];for(c=n.slice(),r=c.length,s=0;r>s;s++)c[s].apply(this,o)}return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?u(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,u(this._events[t])&&!this._events[t].warned){var n;n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(u(n)){for(a=o;a-->0;)if(n[a]===e||n[a].listener&&n[a].listener===e){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}}]);
|
||||
function(t,e,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}]);
|
||||
//# sourceMappingURL=homeassistant.min.js.map</script>
|
||||
|
||||
<script>
|
||||
@@ -15134,8 +15133,6 @@ CSS properties | Action
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
Polymer.IronOverlayManager = (function() {
|
||||
@@ -15231,6 +15228,8 @@ CSS properties | Action
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
/*
|
||||
@@ -25725,18 +25724,42 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
paper-button, paper-icon-button {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.volume {
|
||||
margin-bottom: 8px;
|
||||
|
||||
max-height: 0px;
|
||||
overflow: hidden;
|
||||
transition: max-height .5s ease-in;
|
||||
}
|
||||
|
||||
.volume paper-slider::shadow #sliderKnobInner,
|
||||
.volume paper-slider::shadow #sliderBar::shadow #activeProgress {
|
||||
background-color: var(--accent-color);
|
||||
}
|
||||
|
||||
.has-volume .volume {
|
||||
max-height: 500px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="layout horizontal">
|
||||
<div class="flex">
|
||||
<paper-icon-button icon="power-settings-new" on-tap="handleTogglePower"></paper-icon-button>
|
||||
<div class$="[[computeClassNames(stateObj)]]">
|
||||
<div class="volume center horizontal layout">
|
||||
<div>Volume</div>
|
||||
<paper-slider max="100" id="volume" value="{{volumeSliderValue}}" on-change="volumeSliderChanged" class="flex">
|
||||
</paper-slider>
|
||||
</div>
|
||||
<div>
|
||||
<template is="dom-if" if="[[!isIdle]]">
|
||||
<paper-icon-button icon="av:skip-previous" on-tap="handlePrevious"></paper-icon-button>
|
||||
<paper-icon-button icon="[[computePlayPauseIcon(stateObj)]]" on-tap="handlePlayPause"></paper-icon-button>
|
||||
<paper-icon-button icon="av:skip-next" on-tap="handleNext"></paper-icon-button>
|
||||
</template>
|
||||
<div class="layout horizontal">
|
||||
<div class="flex">
|
||||
<paper-icon-button icon="power-settings-new" on-tap="handleTogglePower"></paper-icon-button>
|
||||
</div>
|
||||
<div>
|
||||
<template is="dom-if" if="[[!isIdle]]">
|
||||
<paper-icon-button icon="av:skip-previous" on-tap="handlePrevious"></paper-icon-button>
|
||||
<paper-icon-button icon="[[computePlayPauseIcon(stateObj)]]" on-tap="handlePlayPause"></paper-icon-button>
|
||||
<paper-icon-button icon="av:skip-next" on-tap="handleNext"></paper-icon-button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -25745,6 +25768,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<script>
|
||||
(function() {
|
||||
var serviceActions = window.hass.serviceActions;
|
||||
var uiUtil = window.hass.uiUtil;
|
||||
var ATTRIBUTE_CLASSES = ['volume'];
|
||||
|
||||
Polymer({
|
||||
is: 'more-info-media_player',
|
||||
@@ -25752,12 +25777,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
properties: {
|
||||
stateObj: {
|
||||
type: Object,
|
||||
observer: 'stateObjChanged',
|
||||
},
|
||||
|
||||
isIdle: {
|
||||
type: Boolean,
|
||||
computed: 'computeIsIdle(stateObj)',
|
||||
},
|
||||
|
||||
volumeSliderValue: {
|
||||
type: Number,
|
||||
value: 0,
|
||||
}
|
||||
},
|
||||
|
||||
stateObjChanged: function(newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.volumeSliderValue = newVal.attributes.volume;
|
||||
}
|
||||
|
||||
//this.debounce('more-info-volume-animation-finish', function() {
|
||||
// this.fire('iron-resize');
|
||||
//}.bind(this), 500);
|
||||
},
|
||||
|
||||
computeClassNames: function(stateObj) {
|
||||
return uiUtil.attributeClassNames(stateObj, ATTRIBUTE_CLASSES);
|
||||
},
|
||||
|
||||
computeMediaState: function(stateObj) {
|
||||
@@ -25792,6 +25837,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
this.callService('media_next_track');
|
||||
},
|
||||
|
||||
volumeSliderChanged: function(ev) {
|
||||
var volPercentage = parseInt(ev.target.value);
|
||||
|
||||
if(isNaN(volPercentage)) return;
|
||||
|
||||
var vol = volPercentage / 100;
|
||||
|
||||
serviceActions.callService('media_player', 'volume_set', {
|
||||
entity_id: this.stateObj.entityId,
|
||||
volume: vol
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
callService: function(service) {
|
||||
var data = {entity_id: this.stateObj.entityId};
|
||||
serviceActions.callService('media_player', service, data);
|
||||
|
||||
+75
-13
@@ -11,22 +11,48 @@
|
||||
paper-button, paper-icon-button {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.volume {
|
||||
margin-bottom: 8px;
|
||||
|
||||
max-height: 0px;
|
||||
overflow: hidden;
|
||||
transition: max-height .5s ease-in;
|
||||
}
|
||||
|
||||
.volume paper-slider::shadow #sliderKnobInner,
|
||||
.volume paper-slider::shadow #sliderBar::shadow #activeProgress {
|
||||
background-color: var(--accent-color);
|
||||
}
|
||||
|
||||
.has-volume .volume {
|
||||
max-height: 500px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class='layout horizontal'>
|
||||
<div class='flex'>
|
||||
<paper-icon-button icon='power-settings-new'
|
||||
on-tap='handleTogglePower'></paper-icon-button>
|
||||
<div class$='[[computeClassNames(stateObj)]]'>
|
||||
<div class='volume center horizontal layout'>
|
||||
<div>Volume</div>
|
||||
<paper-slider
|
||||
max='100' id='volume' value='{{volumeSliderValue}}'
|
||||
on-change='volumeSliderChanged' class='flex'>
|
||||
</paper-slider>
|
||||
</div>
|
||||
<div>
|
||||
<template is='dom-if' if='[[!isIdle]]'>
|
||||
<paper-icon-button icon='av:skip-previous'
|
||||
on-tap='handlePrevious'></paper-icon-button>
|
||||
<paper-icon-button icon='[[computePlayPauseIcon(stateObj)]]'
|
||||
on-tap='handlePlayPause'></paper-icon-button>
|
||||
<paper-icon-button icon='av:skip-next'
|
||||
on-tap='handleNext'></paper-icon-button>
|
||||
</template>
|
||||
<div class='layout horizontal'>
|
||||
<div class='flex'>
|
||||
<paper-icon-button icon='power-settings-new'
|
||||
on-tap='handleTogglePower'></paper-icon-button>
|
||||
</div>
|
||||
<div>
|
||||
<template is='dom-if' if='[[!isIdle]]'>
|
||||
<paper-icon-button icon='av:skip-previous'
|
||||
on-tap='handlePrevious'></paper-icon-button>
|
||||
<paper-icon-button icon='[[computePlayPauseIcon(stateObj)]]'
|
||||
on-tap='handlePlayPause'></paper-icon-button>
|
||||
<paper-icon-button icon='av:skip-next'
|
||||
on-tap='handleNext'></paper-icon-button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -35,6 +61,8 @@
|
||||
<script>
|
||||
(function() {
|
||||
var serviceActions = window.hass.serviceActions;
|
||||
var uiUtil = window.hass.uiUtil;
|
||||
var ATTRIBUTE_CLASSES = ['volume'];
|
||||
|
||||
Polymer({
|
||||
is: 'more-info-media_player',
|
||||
@@ -42,12 +70,32 @@
|
||||
properties: {
|
||||
stateObj: {
|
||||
type: Object,
|
||||
observer: 'stateObjChanged',
|
||||
},
|
||||
|
||||
isIdle: {
|
||||
type: Boolean,
|
||||
computed: 'computeIsIdle(stateObj)',
|
||||
},
|
||||
|
||||
volumeSliderValue: {
|
||||
type: Number,
|
||||
value: 0,
|
||||
}
|
||||
},
|
||||
|
||||
stateObjChanged: function(newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.volumeSliderValue = newVal.attributes.volume;
|
||||
}
|
||||
|
||||
//this.debounce('more-info-volume-animation-finish', function() {
|
||||
// this.fire('iron-resize');
|
||||
//}.bind(this), 500);
|
||||
},
|
||||
|
||||
computeClassNames: function(stateObj) {
|
||||
return uiUtil.attributeClassNames(stateObj, ATTRIBUTE_CLASSES);
|
||||
},
|
||||
|
||||
computeMediaState: function(stateObj) {
|
||||
@@ -82,6 +130,20 @@
|
||||
this.callService('media_next_track');
|
||||
},
|
||||
|
||||
volumeSliderChanged: function(ev) {
|
||||
var volPercentage = parseInt(ev.target.value);
|
||||
|
||||
if(isNaN(volPercentage)) return;
|
||||
|
||||
var vol = volPercentage / 100;
|
||||
|
||||
serviceActions.callService('media_player', 'volume_set', {
|
||||
entity_id: this.stateObj.entityId,
|
||||
volume: vol
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
callService: function(service) {
|
||||
var data = {entity_id: this.stateObj.entityId};
|
||||
serviceActions.callService('media_player', service, data);
|
||||
|
||||
@@ -10,9 +10,11 @@ from homeassistant.components import discovery
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON, SERVICE_VOLUME_UP,
|
||||
SERVICE_VOLUME_DOWN, SERVICE_MEDIA_PLAY_PAUSE, SERVICE_MEDIA_PLAY,
|
||||
SERVICE_MEDIA_PAUSE, SERVICE_MEDIA_NEXT_TRACK, SERVICE_MEDIA_PREV_TRACK)
|
||||
ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON,
|
||||
SERVICE_VOLUME_UP, SERVICE_VOLUME_DOWN, SERVICE_VOLUME_SET,
|
||||
SERVICE_VOLUME_MUTE,
|
||||
SERVICE_MEDIA_PLAY_PAUSE, SERVICE_MEDIA_PLAY, SERVICE_MEDIA_PAUSE,
|
||||
SERVICE_MEDIA_NEXT_TRACK, SERVICE_MEDIA_PREV_TRACK)
|
||||
|
||||
DOMAIN = 'media_player'
|
||||
DEPENDENCIES = []
|
||||
@@ -85,6 +87,23 @@ def volume_down(hass, entity_id=None):
|
||||
|
||||
hass.services.call(DOMAIN, SERVICE_VOLUME_DOWN, data)
|
||||
|
||||
def volume_mute(hass, entity_id=None):
|
||||
""" Send the media player the command for volume down. """
|
||||
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
|
||||
|
||||
hass.services.call(DOMAIN, SERVICE_VOLUME_MUTE, data)
|
||||
|
||||
def volume_set(hass, entity_id=None, volume=None):
|
||||
""" Send the media player the command for volume down. """
|
||||
data = {
|
||||
key: value for key, value in [
|
||||
(ATTR_ENTITY_ID, entity_id),
|
||||
(ATTR_MEDIA_VOLUME, volume),
|
||||
] if value is not None
|
||||
}
|
||||
|
||||
hass.services.call(DOMAIN, SERVICE_VOLUME_SET, data)
|
||||
|
||||
|
||||
def media_play_pause(hass, entity_id=None):
|
||||
""" Send the media player the command for play/pause. """
|
||||
@@ -126,6 +145,7 @@ SERVICE_TO_METHOD = {
|
||||
SERVICE_TURN_OFF: 'turn_off',
|
||||
SERVICE_VOLUME_UP: 'volume_up',
|
||||
SERVICE_VOLUME_DOWN: 'volume_down',
|
||||
SERVICE_VOLUME_MUTE: 'volume_mute',
|
||||
SERVICE_MEDIA_PLAY_PAUSE: 'media_play_pause',
|
||||
SERVICE_MEDIA_PLAY: 'media_play',
|
||||
SERVICE_MEDIA_PAUSE: 'media_pause',
|
||||
@@ -157,6 +177,19 @@ def setup(hass, config):
|
||||
for service in SERVICE_TO_METHOD:
|
||||
hass.services.register(DOMAIN, service, media_player_service_handler)
|
||||
|
||||
def volume_set_service(service, volume):
|
||||
""" Set specified volume on the media player. """
|
||||
target_players = component.extract_from_service(service)
|
||||
|
||||
if volume:
|
||||
for player in target_players:
|
||||
player.volume_set(volume)
|
||||
|
||||
hass.services.register(DOMAIN, SERVICE_VOLUME_SET,
|
||||
lambda service:
|
||||
volume_set_service(
|
||||
service, service.data.get('volume')))
|
||||
|
||||
def play_youtube_video_service(service, media_id):
|
||||
""" Plays specified media_id on the media player. """
|
||||
target_players = component.extract_from_service(service)
|
||||
@@ -200,6 +233,14 @@ class MediaPlayerDevice(Entity):
|
||||
""" volume_down media player. """
|
||||
pass
|
||||
|
||||
def volume_mute(self):
|
||||
""" mute media player. """
|
||||
pass
|
||||
|
||||
def volume_set(self, volume):
|
||||
""" set volume level of media player. """
|
||||
pass
|
||||
|
||||
def media_play_pause(self):
|
||||
""" media_play_pause media player. """
|
||||
pass
|
||||
|
||||
@@ -156,6 +156,14 @@ class CastDevice(MediaPlayerDevice):
|
||||
""" Service to send the chromecast the command for volume down. """
|
||||
self.cast.volume_down()
|
||||
|
||||
def volume_mute(self):
|
||||
""" Service to send the chromecast the command for volume up. """
|
||||
self.cast.set_volume(0)
|
||||
|
||||
def volume_set(self, volume):
|
||||
""" Service to send the chromecast the command for volume down. """
|
||||
self.cast.set_volume(volume)
|
||||
|
||||
def media_play_pause(self):
|
||||
""" Service to send the chromecast the command for play/pause. """
|
||||
media_state = self.media_state
|
||||
|
||||
@@ -99,6 +99,7 @@ SERVICE_TURN_OFF = 'turn_off'
|
||||
SERVICE_VOLUME_UP = "volume_up"
|
||||
SERVICE_VOLUME_DOWN = "volume_down"
|
||||
SERVICE_VOLUME_MUTE = "volume_mute"
|
||||
SERVICE_VOLUME_SET = "volume_set"
|
||||
SERVICE_MEDIA_PLAY_PAUSE = "media_play_pause"
|
||||
SERVICE_MEDIA_PLAY = "media_play"
|
||||
SERVICE_MEDIA_PAUSE = "media_pause"
|
||||
|
||||
Reference in new issue
Block a user