(self.webpackJsonp=self.webpackJsonp||[]).push([[82],{224:function(e,t,o){"use strict";function i(e,t){return e&&-1!==e.config.components.indexOf(t)}o.d(t,"a",function(){return i})},292:function(e,t,o){"use strict";o.d(t,"f",function(){return i}),o.d(t,"c",function(){return s}),o.d(t,"d",function(){return a}),o.d(t,"b",function(){return n}),o.d(t,"e",function(){return c}),o.d(t,"g",function(){return l}),o.d(t,"j",function(){return d}),o.d(t,"i",function(){return r}),o.d(t,"a",function(){return u}),o.d(t,"h",function(){return h});const i=e=>e.callWS({type:"cloud/status"}),s=(e,t)=>e.callWS({type:"cloud/cloudhook/create",webhook_id:t}),a=(e,t)=>e.callWS({type:"cloud/cloudhook/delete",webhook_id:t}),n=e=>e.callWS({type:"cloud/remote/connect"}),c=e=>e.callWS({type:"cloud/remote/disconnect"}),l=e=>e.callWS({type:"cloud/subscription"}),d=(e,t)=>e.callWS(Object.assign({type:"cloud/update_prefs"},t)),r=(e,t,o)=>e.callWS(Object.assign({type:"cloud/google_assistant/entities/update",entity_id:t},o)),u=e=>e.callApi("POST","cloud/google_actions/sync"),h=(e,t,o)=>e.callWS(Object.assign({type:"cloud/alexa/entities/update",entity_id:t},o))},756:function(e,t,o){"use strict";o.r(t);var i=o(3),s=o(0),a=(o(159),o(224)),n=o(292);const c=(e,t)=>{const o=matchMedia(e),i=e=>t(e.matches);return o.addListener(i),t(o.matches),()=>o.removeListener(i)};var l=o(133),d=o(65);let r=class extends l.a{constructor(){super(...arguments),this.routerOptions={defaultPage:"dashboard",cacheAll:!0,preloadAll:!0,routes:{area_registry:{tag:"ha-config-area-registry",load:()=>o.e(83).then(o.bind(null,758))},automation:{tag:"ha-config-automation",load:()=>Promise.all([o.e(0),o.e(1),o.e(2),o.e(3),o.e(84)]).then(o.bind(null,729))},cloud:{tag:"ha-config-cloud",load:()=>Promise.all([o.e(0),o.e(136),o.e(85)]).then(o.bind(null,732))},core:{tag:"ha-config-core",load:()=>Promise.all([o.e(0),o.e(3),o.e(5),o.e(13),o.e(86)]).then(o.bind(null,740))},devices:{tag:"ha-config-devices",load:()=>Promise.all([o.e(0),o.e(11),o.e(14),o.e(137),o.e(89)]).then(o.bind(null,735))},server_control:{tag:"ha-config-server-control",load:()=>Promise.all([o.e(0),o.e(5),o.e(94)]).then(o.bind(null,759))},customize:{tag:"ha-config-customize",load:()=>Promise.all([o.e(0),o.e(1),o.e(3),o.e(5),o.e(87)]).then(o.bind(null,733))},dashboard:{tag:"ha-config-dashboard",load:()=>Promise.all([o.e(5),o.e(88)]).then(o.bind(null,760))},entity_registry:{tag:"ha-config-entity-registry",load:()=>Promise.all([o.e(14),o.e(90)]).then(o.bind(null,688))},integrations:{tag:"ha-config-integrations",load:()=>Promise.all([o.e(0),o.e(1),o.e(3),o.e(6),o.e(91)]).then(o.bind(null,736))},person:{tag:"ha-config-person",load:()=>o.e(92).then(o.bind(null,747))},script:{tag:"ha-config-script",load:()=>Promise.all([o.e(0),o.e(1),o.e(2),o.e(3),o.e(93)]).then(o.bind(null,739))},users:{tag:"ha-config-users",load:()=>Promise.all([o.e(138),o.e(95)]).then(o.bind(null,748))},zha:{tag:"zha-config-panel",load:()=>o.e(96).then(o.bind(null,689))},zwave:{tag:"ha-config-zwave",load:()=>Promise.all([o.e(0),o.e(1),o.e(3),o.e(5),o.e(97)]).then(o.bind(null,734))}}},this._wideSidebar=!1,this._wide=!1,this._listeners=[]}connectedCallback(){super.connectedCallback(),this._listeners.push(c("(min-width: 1040px)",e=>{this._wide=e})),this._listeners.push(c("(min-width: 1296px)",e=>{this._wideSidebar=e})),this._listeners.push(Object(d.b)(this.hass.connection,"core").subscribe(e=>{this._coreUserData=e||{}}))}disconnectedCallback(){for(super.disconnectedCallback();this._listeners.length;)this._listeners.pop()()}firstUpdated(e){super.firstUpdated(e),Object(a.a)(this.hass,"cloud")&&this._updateCloudStatus(),this.addEventListener("ha-refresh-cloud-status",()=>this._updateCloudStatus())}updatePageEl(e){const t=!(!this._coreUserData||!this._coreUserData.showAdvanced),o="docked"===this.hass.dockedSidebar?this._wideSidebar:this._wide;"setProperties"in e?e.setProperties({route:this.routeTail,hass:this.hass,showAdvanced:t,isWide:o,narrow:this.narrow,cloudStatus:this._cloudStatus}):(e.route=this.routeTail,e.hass=this.hass,e.showAdvanced=t,e.isWide=o,e.narrow=this.narrow,e.cloudStatus=this._cloudStatus)}async _updateCloudStatus(){this._cloudStatus=await Object(n.f)(this.hass),"connecting"===this._cloudStatus.cloud&&setTimeout(()=>this._updateCloudStatus(),5e3)}};Object(i.c)([Object(s.g)()],r.prototype,"hass",void 0),Object(i.c)([Object(s.g)()],r.prototype,"narrow",void 0),Object(i.c)([Object(s.g)()],r.prototype,"_wideSidebar",void 0),Object(i.c)([Object(s.g)()],r.prototype,"_wide",void 0),Object(i.c)([Object(s.g)()],r.prototype,"_coreUserData",void 0),Object(i.c)([Object(s.g)()],r.prototype,"_cloudStatus",void 0),r=Object(i.c)([Object(s.d)("ha-panel-config")],r)}}]);
//# sourceMappingURL=chunk.60b42197d135c011729a.js.map