!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/frontend_latest/",n(n.s=201)}({101:function(e,t){},102:function(e,t){if(/^((?!chrome|android).)*version\/14\.0.*safari/i.test(navigator.userAgent)){const e=window.Element.prototype.attachShadow;window.Element.prototype.attachShadow=function(t){return t&&t.delegatesFocus&&delete t.delegatesFocus,e.apply(this,[t])}}},113:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));const o=(e,t,n)=>new Promise((o,r)=>{const c=document.createElement(e);let u="src",l="body";switch(c.onload=()=>o(t),c.onerror=()=>r(t),e){case"script":c.async=!0,n&&(c.type=n);break;case"link":c.type="text/css",c.rel="stylesheet",u="href",l="head"}c[u]=t,document[l].appendChild(c)}),r=e=>o("link",e),c=e=>o("script",e),u=e=>o("script",e,"module")},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=(e,t,n,o)=>{o=o||{},n=null==n?{}:n;const r=new Event(t,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return r.detail=n,e.dispatchEvent(r),r}},174:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=e=>{const t="html_url"in e?"ha-panel-"+e.name:e.name;return document.createElement(t)}},175:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var o=n(113);const r={},c=e=>e.html_url?{type:"html",url:e.html_url}:e.module_url&&e.js_url||e.module_url?{type:"module",url:e.module_url}:{type:"js",url:e.js_url},u=e=>{const t=c(e);return"js"===t.type?(t.url in r||(r[t.url]=Object(o.b)(t.url)),r[t.url]):"module"===t.type?Object(o.c)(t.url):Promise.reject("No valid url found in panel config.")}},176:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=(e,t)=>{"setProperties"in e?e.setProperties(t):Object.keys(t).forEach(n=>{e[n]=t[n]})}},201:function(e,t,n){"use strict";n.r(t);n(101),n(102);var o=n(12),r=n(113);const c="customElements"in window&&"content"in document.createElement("template");var u=n(174),l=n(175),a=n(176);let i,s;function d(e){s&&Object(a.a)(s,e)}function p(e,t){const n=document.createElement("style");n.innerHTML="body{margin:0}",document.head.appendChild(n);const a=e.config._panel_custom;let p=Promise.resolve();c||(p=p.then(()=>Object(r.b)("/static/polyfills/webcomponents-bundle.js"))),p.then(()=>Object(l.b)(a)).then(()=>i||Promise.resolve()).then(()=>{s=Object(u.a)(a);s.addEventListener("hass-toggle-menu",e=>{window.parent.customPanel&&Object(o.a)(window.parent.customPanel,e.type,e.detail)}),window.addEventListener("location-changed",e=>{window.parent.customPanel&&window.parent.customPanel.navigate(window.location.pathname,!!e.detail&&e.detail.replace)}),d({panel:e,...t}),document.body.appendChild(s)},t=>{console.error(t,e),alert(`Unable to load the panel source: ${t}.`)})}window.loadES5Adapter=()=>(i||(i=Object(r.b)("/static/polyfills/custom-elements-es5-adapter.js").catch()),i),document.addEventListener("DOMContentLoaded",()=>window.parent.customPanel.registerIframe(p,d),{once:!0})}});
//# sourceMappingURL=custom-panel.925ab81c.js.map