(self.webpackJsonp=self.webpackJsonp||[]).push([[100],{140:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(92),o={},i=function(e){if(e.html_url){var t=[n.e(72).then(n.bind(null,174))];return e.embed_iframe||t.push(Promise.all([n.e(121),n.e(74)]).then(n.bind(null,136))),Promise.all(t).then(function(t){return(0,t[0].importHrefPromise)(e.html_url)})}return e.js_url?(e.js_url in o||(o[e.js_url]=Object(r.b)(e.js_url)),o[e.js_url]):e.module_url?Object(r.c)(e.module_url):Promise.reject("No valid url found in panel config.")}},141:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(e){var t="html_url"in e?"ha-panel-"+e.name:e.name;return document.createElement(t)}},142:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(e,t){"setProperties"in e?e.setProperties(t):Object.keys(t).forEach(function(n){e[n]=t[n]})}},678:function(e,t,n){"use strict";n.r(t),n.d(t,"HaPanelCustom",function(){return u});var r=n(0),o=n(1),i=n(140),s=n(141),c=n(142),a=n(99),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.navigate=function(e,n){return Object(a.a)(t,e,n)},t}return Object(r.d)(t,e),t.prototype.registerIframe=function(e,t){e(this.panel,{hass:this.hass,narrow:this.narrow,route:this.route}),this._setProperties=t},t.prototype.disconnectedCallback=function(){e.prototype.disconnectedCallback.call(this),this._cleanupPanel()},t.prototype.updated=function(e){if(e.has("panel"))return e.get("panel")&&this._cleanupPanel(),void this._createPanel(this.panel);if(this._setProperties){for(var t={},n=0,r=e.keys();n<r.length;n++){var o=r[n];t[o]=this[o]}this._setProperties(t)}},t.prototype._cleanupPanel=function(){for(delete window.customPanel,this._setProperties=void 0;this.lastChild;)this.removeChild(this.lastChild)},t.prototype._createPanel=function(e){var t=this,n=e.config._panel_custom,r=document.createElement("a");if(r.href=n.html_url||n.js_url||n.module_url||"",n.trust_external||["localhost","127.0.0.1",location.hostname].includes(r.hostname)||confirm('Do you trust the external panel "'+n.name+'" at "'+r.href+'"?\n\nIt will have access to all data in Home Assistant.\n\n(Check docs for the panel_custom component to hide this message)'))if(n.embed_iframe){window.customPanel=this,this.innerHTML="\n    <style>\n      iframe {\n        border: 0;\n        width: 100%;\n        height: 100%;\n        display: block;\n      }\n    </style>\n    <iframe></iframe>\n    ".trim();var o=this.querySelector("iframe").contentWindow.document;o.open(),o.write("<!doctype html><script src='"+window.customPanelJS+"'><\/script>"),o.close()}else Object(i.a)(n).then(function(){var r=Object(s.a)(n);t._setProperties=function(e){return Object(c.a)(r,e)},Object(c.a)(r,{panel:e,hass:t.hass,narrow:t.narrow,route:t.route}),t.appendChild(r)},function(){alert("Unable to load custom panel from "+r.href)})},Object(r.c)([Object(o.g)()],t.prototype,"hass",void 0),Object(r.c)([Object(o.g)()],t.prototype,"narrow",void 0),Object(r.c)([Object(o.g)()],t.prototype,"route",void 0),Object(r.c)([Object(o.g)()],t.prototype,"panel",void 0),t}(o.b);customElements.define("ha-panel-custom",u)},92:function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return s});var r=function(e,t,n){return new Promise(function(r,o){var i=document.createElement(e),s="src",c="body";switch(i.onload=function(){return r(t)},i.onerror=function(){return o(t)},e){case"script":i.async=!0,n&&(i.type=n);break;case"link":i.type="text/css",i.rel="stylesheet",s="href",c="head"}i[s]=t,document[c].appendChild(i)})},o=function(e){return r("link",e)},i=function(e){return r("script",e)},s=function(e){return r("script",e,"module")}}}]);
//# sourceMappingURL=chunk.7457c9a301939e077698.js.map