diff --git a/home-assistant-polymer b/home-assistant-polymer
index d900e40d0..145e5d7bc 160000
--- a/home-assistant-polymer
+++ b/home-assistant-polymer
@@ -1 +1 @@
-Subproject commit d900e40d04ee748a329bd6ff875d78dfe92194a8
+Subproject commit 145e5d7bc6f639a29c4f37b9a4aacc2b0093f3af
diff --git a/supervisor/api/panel/entrypoint.js b/supervisor/api/panel/entrypoint.js
index 13f69e5c7..0adc3c641 100644
--- a/supervisor/api/panel/entrypoint.js
+++ b/supervisor/api/panel/entrypoint.js
@@ -1,14 +1,14 @@
function loadES5() {
var el = document.createElement('script');
- el.src = '/api/hassio/app/frontend_es5/entrypoint.c3a8263d.js';
+ el.src = '/api/hassio/app/frontend_es5/entrypoint.8d8df2e1.js';
document.body.appendChild(el);
}
if (/.*Version\/(?:11|12)(?:\.\d+)*.*Safari\//.test(navigator.userAgent)) {
loadES5();
} else {
try {
- new Function("import('/api/hassio/app/frontend_latest/entrypoint.531ccfea.js')")();
+ new Function("import('/api/hassio/app/frontend_latest/entrypoint.0d570a49.js')")();
} catch (err) {
loadES5();
}
diff --git a/supervisor/api/panel/entrypoint.js.gz b/supervisor/api/panel/entrypoint.js.gz
index 6ee4e732d..50c46d090 100644
Binary files a/supervisor/api/panel/entrypoint.js.gz and b/supervisor/api/panel/entrypoint.js.gz differ
diff --git a/supervisor/api/panel/frontend_es5/056a7275.js b/supervisor/api/panel/frontend_es5/056a7275.js
new file mode 100644
index 000000000..aa9b174c9
--- /dev/null
+++ b/supervisor/api/panel/frontend_es5/056a7275.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[606],{12198:function(e,t,r){r.d(t,{p6:function(){return i},WB:function(){return a}});var n=r(14516);r(29607);(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric"})}));var i=function(e,t){return o(t).format(e)},o=(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric"})})),a=function(e,t){return s(t).format(e)},s=(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"numeric",day:"numeric"})}));(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{month:"long"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric"})}))},44583:function(e,t,r){r.d(t,{o0:function(){return o}});var n=r(14516),i=r(65810);r(29607);var o=function(e,t){return a(t).format(e)},a=(0,n.Z)((function(e){return new Intl.DateTimeFormat("en"!==e.language||(0,i.y)(e)?e.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:(0,i.y)(e)?"numeric":"2-digit",minute:"2-digit",hour12:(0,i.y)(e)})}));(0,n.Z)((function(e){return new Intl.DateTimeFormat("en"!==e.language||(0,i.y)(e)?e.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:(0,i.y)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:(0,i.y)(e)})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat("en"!==e.language||(0,i.y)(e)?e.language:"en-u-hc-h23",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",hour12:(0,i.y)(e)})}))},65810:function(e,t,r){r.d(t,{y:function(){return o}});var n=r(14516),i=r(66477),o=(0,n.Z)((function(e){if(e.time_format===i.zt.language||e.time_format===i.zt.system){var t=e.time_format===i.zt.language?e.language:void 0,r=(new Date).toLocaleString(t);return r.includes("AM")||r.includes("PM")}return e.time_format===i.zt.am_pm}))},58831:function(e,t,r){r.d(t,{M:function(){return n}});var n=function(e){return e.substr(0,e.indexOf("."))}},22311:function(e,t,r){r.d(t,{N:function(){return i}});var n=r(58831),i=function(e){return(0,n.M)(e.entity_id)}},40095:function(e,t,r){r.d(t,{e:function(){return n}});var n=function(e,t){return 0!=(e.attributes.supported_features&t)}},83447:function(e,t,r){r.d(t,{l:function(){return n}});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_",r="àáäâãåăæąçćčđďèéěėëêęğǵḧìíïîįłḿǹńňñòóöôœøṕŕřßşśšșťțùúüûǘůűūųẃẍÿýźžż·/_,:;",n="aaaaaaaaacccddeeeeeeegghiiiiilmnnnnooooooprrsssssttuuuuuuuuuwxyyzzz".concat(t).concat(t).concat(t).concat(t).concat(t).concat(t),i=new RegExp(r.split("").join("|"),"g");return e.toString().toLowerCase().replace(/\s+/g,t).replace(i,(function(e){return n.charAt(r.indexOf(e))})).replace(/&/g,"".concat(t,"and").concat(t)).replace(/[^\w-]+/g,"").replace(/-/g,t).replace(new RegExp("(".concat(t,")\\1+"),"g"),"$1").replace(new RegExp("^".concat(t,"+")),"").replace(new RegExp("".concat(t,"+$")),"")}},36057:function(e,t,r){r(44577);var n,i=r(37500),o=r(63550),a=r(14516),s=r(47181),c=r(58831),l=r(91741),u=r(85415),d=(r(77576),r(66255),r(52039),r(51346)),f=r(70483),p=r(22311);var h,m,y,v,b=(0,i.iv)(n||(h=['\n ha-state-icon[data-domain="alert"][data-state="on"],\n ha-state-icon[data-domain="automation"][data-state="on"],\n ha-state-icon[data-domain="binary_sensor"][data-state="on"],\n ha-state-icon[data-domain="calendar"][data-state="on"],\n ha-state-icon[data-domain="camera"][data-state="streaming"],\n ha-state-icon[data-domain="cover"][data-state="open"],\n ha-state-icon[data-domain="device_tracker"][data-state="home"],\n ha-state-icon[data-domain="fan"][data-state="on"],\n ha-state-icon[data-domain="humidifier"][data-state="on"],\n ha-state-icon[data-domain="light"][data-state="on"],\n ha-state-icon[data-domain="input_boolean"][data-state="on"],\n ha-state-icon[data-domain="lock"][data-state="unlocked"],\n ha-state-icon[data-domain="media_player"][data-state="on"],\n ha-state-icon[data-domain="media_player"][data-state="paused"],\n ha-state-icon[data-domain="media_player"][data-state="playing"],\n ha-state-icon[data-domain="remote"][data-state="on"],\n ha-state-icon[data-domain="script"][data-state="on"],\n ha-state-icon[data-domain="sun"][data-state="above_horizon"],\n ha-state-icon[data-domain="switch"][data-state="on"],\n ha-state-icon[data-domain="timer"][data-state="active"],\n ha-state-icon[data-domain="vacuum"][data-state="cleaning"],\n ha-state-icon[data-domain="group"][data-state="on"],\n ha-state-icon[data-domain="group"][data-state="home"],\n ha-state-icon[data-domain="group"][data-state="open"],\n ha-state-icon[data-domain="group"][data-state="locked"],\n ha-state-icon[data-domain="group"][data-state="problem"] {\n color: var(--paper-item-icon-active-color, #fdd835);\n }\n\n ha-state-icon[data-domain="climate"][data-state="cooling"] {\n color: var(--cool-color, var(--state-climate-cool-color));\n }\n\n ha-state-icon[data-domain="climate"][data-state="heating"] {\n color: var(--heat-color, var(--state-climate-heat-color));\n }\n\n ha-state-icon[data-domain="climate"][data-state="drying"] {\n color: var(--dry-color, var(--state-climate-dry-color));\n }\n\n ha-state-icon[data-domain="alarm_control_panel"] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n }\n ha-state-icon[data-domain="alarm_control_panel"][data-state="disarmed"] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n }\n ha-state-icon[data-domain="alarm_control_panel"][data-state="pending"],\n ha-state-icon[data-domain="alarm_control_panel"][data-state="arming"] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n }\n ha-state-icon[data-domain="alarm_control_panel"][data-state="triggered"] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n }\n\n @keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n ha-state-icon[data-domain="plant"][data-state="problem"],\n\n /* Color the icon if unavailable */\n ha-state-icon[data-state="unavailable"] {\n color: var(--state-unavailable-color);\n }\n'],m||(m=h.slice(0)),n=Object.freeze(Object.defineProperties(h,{raw:{value:Object.freeze(m)}})))),k="M19,18.31V20A2,2 0 0,1 17,22H7A2,2 0 0,1 5,20V16.3C4.54,16.12 3.95,16 3,16A1,1 0 0,1 2,15A1,1 0 0,1 3,14C3.82,14 4.47,14.08 5,14.21V12.3C4.54,12.12 3.95,12 3,12A1,1 0 0,1 2,11A1,1 0 0,1 3,10C3.82,10 4.47,10.08 5,10.21V8.3C4.54,8.12 3.95,8 3,8A1,1 0 0,1 2,7A1,1 0 0,1 3,6C3.82,6 4.47,6.08 5,6.21V4A2,2 0 0,1 7,2H17A2,2 0 0,1 19,4V6.16C20.78,6.47 21.54,7.13 21.71,7.29C22.1,7.68 22.1,8.32 21.71,8.71C21.32,9.1 20.8,9.09 20.29,8.71V8.71C20.29,8.71 19.25,8 17,8C15.74,8 14.91,8.41 13.95,8.9C12.91,9.41 11.74,10 10,10C9.64,10 9.31,10 9,9.96V7.95C9.3,8 9.63,8 10,8C11.26,8 12.09,7.59 13.05,7.11C14.09,6.59 15.27,6 17,6V4H7V20H17V18C18.5,18 18.97,18.29 19,18.31M17,10C15.27,10 14.09,10.59 13.05,11.11C12.09,11.59 11.26,12 10,12C9.63,12 9.3,12 9,11.95V13.96C9.31,14 9.64,14 10,14C11.74,14 12.91,13.41 13.95,12.9C14.91,12.42 15.74,12 17,12C19.25,12 20.29,12.71 20.29,12.71V12.71C20.8,13.1 21.32,13.1 21.71,12.71C22.1,12.32 22.1,11.69 21.71,11.29C21.5,11.08 20.25,10 17,10M17,14C15.27,14 14.09,14.59 13.05,15.11C12.09,15.59 11.26,16 10,16C9.63,16 9.3,16 9,15.95V17.96C9.31,18 9.64,18 10,18C11.74,18 12.91,17.41 13.95,16.9C14.91,16.42 15.74,16 17,16C19.25,16 20.29,16.71 20.29,16.71V16.71C20.8,17.1 21.32,17.1 21.71,16.71C22.1,16.32 22.1,15.69 21.71,15.29C21.5,15.08 20.25,14 17,14Z",g="M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M14,21A2,2 0 0,1 12,23A2,2 0 0,1 10,21",w="M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z",E="M7,2V13H10V22L17,10H13L17,2H7Z",C="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z",P="M7.27,10L9,7H14.42L15.58,5L15.5,4.5A1.5,1.5 0 0,1 17,3A1.5,1.5 0 0,1 18.5,4.5C18.5,5.21 18,5.81 17.33,5.96L16.37,7.63L17.73,10L18.59,8.5L18.5,8A1.5,1.5 0 0,1 20,6.5A1.5,1.5 0 0,1 21.5,8C21.5,8.71 21,9.3 20.35,9.46L18.89,12L20.62,15C21.39,15.07 22,15.71 22,16.5A1.5,1.5 0 0,1 20.5,18A1.5,1.5 0 0,1 19,16.5V16.24L17.73,14L16.37,16.37L17.33,18.04C18,18.19 18.5,18.79 18.5,19.5A1.5,1.5 0 0,1 17,21A1.5,1.5 0 0,1 15.5,19.5L15.58,19L14.42,17H10.58L9.42,19L9.5,19.5A1.5,1.5 0 0,1 8,21A1.5,1.5 0 0,1 6.5,19.5C6.5,18.79 7,18.19 7.67,18.04L8.63,16.37L4.38,9C3.61,8.93 3,8.29 3,7.5A1.5,1.5 0 0,1 4.5,6A1.5,1.5 0 0,1 6,7.5C6,7.59 6,7.68 6,7.76L7.27,10M10.15,9L8.42,12L10.15,15H14.85L16.58,12L14.85,9H10.15Z",A="M2,11H9.17C9.58,9.83 10.69,9 12,9C13.31,9 14.42,9.83 14.83,11H22V13H14.83C14.42,14.17 13.31,15 12,15C10.69,15 9.58,14.17 9.17,13H2V11Z",_="M16.5,21C13.5,21 12.31,16.76 11.05,12.28C10.14,9.04 9,5 7.5,5C4.11,5 4,11.93 4,12H2C2,11.63 2.06,3 7.5,3C10.5,3 11.71,7.25 12.97,11.74C13.83,14.8 15,19 16.5,19C19.94,19 20.03,12.07 20.03,12H22.03C22.03,12.37 21.97,21 16.5,21Z",O="M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z",S="M17,3H7A2,2 0 0,0 5,5V21L12,18L19,21V5C19,3.89 18.1,3 17,3Z",D={alert:"M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z",air_quality:k,automation:"M12,2A2,2 0 0,1 14,4C14,4.74 13.6,5.39 13,5.73V7H14A7,7 0 0,1 21,14H22A1,1 0 0,1 23,15V18A1,1 0 0,1 22,19H21V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V19H2A1,1 0 0,1 1,18V15A1,1 0 0,1 2,14H3A7,7 0 0,1 10,7H11V5.73C10.4,5.39 10,4.74 10,4A2,2 0 0,1 12,2M7.5,13A2.5,2.5 0 0,0 5,15.5A2.5,2.5 0 0,0 7.5,18A2.5,2.5 0 0,0 10,15.5A2.5,2.5 0 0,0 7.5,13M16.5,13A2.5,2.5 0 0,0 14,15.5A2.5,2.5 0 0,0 16.5,18A2.5,2.5 0 0,0 19,15.5A2.5,2.5 0 0,0 16.5,13Z",calendar:w,camera:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z",climate:"M16.95,16.95L14.83,14.83C15.55,14.1 16,13.1 16,12C16,11.26 15.79,10.57 15.43,10L17.6,7.81C18.5,9 19,10.43 19,12C19,13.93 18.22,15.68 16.95,16.95M12,5C13.57,5 15,5.5 16.19,6.4L14,8.56C13.43,8.21 12.74,8 12,8A4,4 0 0,0 8,12C8,13.1 8.45,14.1 9.17,14.83L7.05,16.95C5.78,15.68 5,13.93 5,12A7,7 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z",configurator:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",conversation:"M8,7A2,2 0 0,1 10,9V14A2,2 0 0,1 8,16A2,2 0 0,1 6,14V9A2,2 0 0,1 8,7M14,14C14,16.97 11.84,19.44 9,19.92V22H7V19.92C4.16,19.44 2,16.97 2,14H4A4,4 0 0,0 8,18A4,4 0 0,0 12,14H14M21.41,9.41L17.17,13.66L18.18,10H14A2,2 0 0,1 12,8V4A2,2 0 0,1 14,2H20A2,2 0 0,1 22,4V8C22,8.55 21.78,9.05 21.41,9.41Z",counter:"M4,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4M4,6V18H11V6H4M20,18V6H18.76C19,6.54 18.95,7.07 18.95,7.13C18.88,7.8 18.41,8.5 18.24,8.75L15.91,11.3L19.23,11.28L19.24,12.5L14.04,12.47L14,11.47C14,11.47 17.05,8.24 17.2,7.95C17.34,7.67 17.91,6 16.5,6C15.27,6.05 15.41,7.3 15.41,7.3L13.87,7.31C13.87,7.31 13.88,6.65 14.25,6H13V18H15.58L15.57,17.14L16.54,17.13C16.54,17.13 17.45,16.97 17.46,16.08C17.5,15.08 16.65,15.08 16.5,15.08C16.37,15.08 15.43,15.13 15.43,15.95H13.91C13.91,15.95 13.95,13.89 16.5,13.89C19.1,13.89 18.96,15.91 18.96,15.91C18.96,15.91 19,17.16 17.85,17.63L18.37,18H20M8.92,16H7.42V10.2L5.62,10.76V9.53L8.76,8.41H8.92V16Z",fan:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",google_assistant:"M7,2A6,6 0 0,0 1,8A6,6 0 0,0 7,14A6,6 0 0,0 13,8A6,6 0 0,0 7,2M21.5,6A1.5,1.5 0 0,0 20,7.5A1.5,1.5 0 0,0 21.5,9A1.5,1.5 0 0,0 23,7.5A1.5,1.5 0 0,0 21.5,6M17,8A3,3 0 0,0 14,11A3,3 0 0,0 17,14A3,3 0 0,0 20,11A3,3 0 0,0 17,8M17,15A3.5,3.5 0 0,0 13.5,18.5A3.5,3.5 0 0,0 17,22A3.5,3.5 0 0,0 20.5,18.5A3.5,3.5 0 0,0 17,15Z",group:"M15,12C13.89,12 13,12.89 13,14A2,2 0 0,0 15,16A2,2 0 0,0 17,14C17,12.89 16.1,12 15,12M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M14,9C14,7.89 13.1,7 12,7C10.89,7 10,7.89 10,9A2,2 0 0,0 12,11A2,2 0 0,0 14,9M9,12A2,2 0 0,0 7,14A2,2 0 0,0 9,16A2,2 0 0,0 11,14C11,12.89 10.1,12 9,12Z",homeassistant:"M21.8,13H20V21H13V17.67L15.79,14.88L16.5,15C17.66,15 18.6,14.06 18.6,12.9C18.6,11.74 17.66,10.8 16.5,10.8A2.1,2.1 0 0,0 14.4,12.9L14.5,13.61L13,15.13V9.65C13.66,9.29 14.1,8.6 14.1,7.8A2.1,2.1 0 0,0 12,5.7A2.1,2.1 0 0,0 9.9,7.8C9.9,8.6 10.34,9.29 11,9.65V15.13L9.5,13.61L9.6,12.9A2.1,2.1 0 0,0 7.5,10.8A2.1,2.1 0 0,0 5.4,12.9A2.1,2.1 0 0,0 7.5,15L8.21,14.88L11,17.67V21H4V13H2.25C1.83,13 1.42,13 1.42,12.79C1.43,12.57 1.85,12.15 2.28,11.72L11,3C11.33,2.67 11.67,2.33 12,2.33C12.33,2.33 12.67,2.67 13,3L17,7V6H19V9L21.78,11.78C22.18,12.18 22.59,12.59 22.6,12.8C22.6,13 22.2,13 21.8,13M7.5,12A0.9,0.9 0 0,1 8.4,12.9A0.9,0.9 0 0,1 7.5,13.8A0.9,0.9 0 0,1 6.6,12.9A0.9,0.9 0 0,1 7.5,12M16.5,12C17,12 17.4,12.4 17.4,12.9C17.4,13.4 17,13.8 16.5,13.8A0.9,0.9 0 0,1 15.6,12.9A0.9,0.9 0 0,1 16.5,12M12,6.9C12.5,6.9 12.9,7.3 12.9,7.8C12.9,8.3 12.5,8.7 12,8.7C11.5,8.7 11.1,8.3 11.1,7.8C11.1,7.3 11.5,6.9 12,6.9Z",homekit:"M12,3L2,12H5V20H19V12H22L12,3M12,8.5C14.34,8.5 16.46,9.43 18,10.94L16.8,12.12C15.58,10.91 13.88,10.17 12,10.17C10.12,10.17 8.42,10.91 7.2,12.12L6,10.94C7.54,9.43 9.66,8.5 12,8.5M12,11.83C13.4,11.83 14.67,12.39 15.6,13.3L14.4,14.47C13.79,13.87 12.94,13.5 12,13.5C11.06,13.5 10.21,13.87 9.6,14.47L8.4,13.3C9.33,12.39 10.6,11.83 12,11.83M12,15.17C12.94,15.17 13.7,15.91 13.7,16.83C13.7,17.75 12.94,18.5 12,18.5C11.06,18.5 10.3,17.75 10.3,16.83C10.3,15.91 11.06,15.17 12,15.17Z",image_processing:"M18,8H6V18H18M20,20H4V6H8.5L12.04,2.5L15.5,6H20M20,4H16L12,0L8,4H4A2,2 0 0,0 2,6V20A2,2 0 0,0 4,22H20A2,2 0 0,0 22,20V6A2,2 0 0,0 20,4Z",input_button:"M13 5C15.21 5 17 6.79 17 9C17 10.5 16.2 11.77 15 12.46V11.24C15.61 10.69 16 9.89 16 9C16 7.34 14.66 6 13 6S10 7.34 10 9C10 9.89 10.39 10.69 11 11.24V12.46C9.8 11.77 9 10.5 9 9C9 6.79 10.79 5 13 5M20 20.5C19.97 21.32 19.32 21.97 18.5 22H13C12.62 22 12.26 21.85 12 21.57L8 17.37L8.74 16.6C8.93 16.39 9.2 16.28 9.5 16.28H9.7L12 18V9C12 8.45 12.45 8 13 8S14 8.45 14 9V13.47L15.21 13.6L19.15 15.79C19.68 16.03 20 16.56 20 17.14V20.5M20 2H4C2.9 2 2 2.9 2 4V12C2 13.11 2.9 14 4 14H8V12L4 12L4 4H20L20 12H18V14H20V13.96L20.04 14C21.13 14 22 13.09 22 12V4C22 2.9 21.11 2 20 2Z",input_datetime:"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z",input_number:A,input_select:C,input_text:"M17,7H22V17H17V19A1,1 0 0,0 18,20H20V22H17.5C16.95,22 16,21.55 16,21C16,21.55 15.05,22 14.5,22H12V20H14A1,1 0 0,0 15,19V5A1,1 0 0,0 14,4H12V2H14.5C15.05,2 16,2.45 16,3C16,2.45 16.95,2 17.5,2H20V4H18A1,1 0 0,0 17,5V7M2,7H13V9H4V15H13V17H2V7M20,15V9H17V15H20Z",light:"M12,2A7,7 0 0,0 5,9C5,11.38 6.19,13.47 8,14.74V17A1,1 0 0,0 9,18H15A1,1 0 0,0 16,17V14.74C17.81,13.47 19,11.38 19,9A7,7 0 0,0 12,2M9,21A1,1 0 0,0 10,22H14A1,1 0 0,0 15,21V20H9V21Z",mailbox:"M17,4H7A5,5 0 0,0 2,9V20H20A2,2 0 0,0 22,18V9A5,5 0 0,0 17,4M10,18H4V9A3,3 0 0,1 7,6A3,3 0 0,1 10,9V18M19,15H17V13H13V11H19V15M9,11H5V9H9V11Z",notify:"M9 22C8.4 22 8 21.6 8 21V18H4C2.9 18 2 17.1 2 16V4C2 2.9 2.9 2 4 2H20C21.1 2 22 2.9 22 4V16C22 17.1 21.1 18 20 18H13.9L10.2 21.7C10 21.9 9.8 22 9.5 22H9M13 11V5H11V11M13 15V13H11V15H13Z",number:A,persistent_notification:g,person:"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z",plant:"M3,13A9,9 0 0,0 12,22C12,17 7.97,13 3,13M12,5.5A2.5,2.5 0 0,1 14.5,8A2.5,2.5 0 0,1 12,10.5A2.5,2.5 0 0,1 9.5,8A2.5,2.5 0 0,1 12,5.5M5.6,10.25A2.5,2.5 0 0,0 8.1,12.75C8.63,12.75 9.12,12.58 9.5,12.31C9.5,12.37 9.5,12.43 9.5,12.5A2.5,2.5 0 0,0 12,15A2.5,2.5 0 0,0 14.5,12.5C14.5,12.43 14.5,12.37 14.5,12.31C14.88,12.58 15.37,12.75 15.9,12.75C17.28,12.75 18.4,11.63 18.4,10.25C18.4,9.25 17.81,8.4 16.97,8C17.81,7.6 18.4,6.74 18.4,5.75C18.4,4.37 17.28,3.25 15.9,3.25C15.37,3.25 14.88,3.41 14.5,3.69C14.5,3.63 14.5,3.56 14.5,3.5A2.5,2.5 0 0,0 12,1A2.5,2.5 0 0,0 9.5,3.5C9.5,3.56 9.5,3.63 9.5,3.69C9.12,3.41 8.63,3.25 8.1,3.25A2.5,2.5 0 0,0 5.6,5.75C5.6,6.74 6.19,7.6 7.03,8C6.19,8.4 5.6,9.25 5.6,10.25M12,22A9,9 0 0,0 21,13C16,13 12,17 12,22Z",proximity:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,14.09 4.8,16 6.11,17.41L9.88,9.88L17.41,6.11C16,4.8 14.09,4 12,4M12,20A8,8 0 0,0 20,12C20,9.91 19.2,8 17.89,6.59L14.12,14.12L6.59,17.89C8,19.2 9.91,20 12,20M12,12L11.23,11.23L9.7,14.3L12.77,12.77L12,12M12,17.5H13V19H12V17.5M15.88,15.89L16.59,15.18L17.65,16.24L16.94,16.95L15.88,15.89M17.5,12V11H19V12H17.5M12,6.5H11V5H12V6.5M8.12,8.11L7.41,8.82L6.35,7.76L7.06,7.05L8.12,8.11M6.5,12V13H5V12H6.5Z",remote:"M12,0C8.96,0 6.21,1.23 4.22,3.22L5.63,4.63C7.26,3 9.5,2 12,2C14.5,2 16.74,3 18.36,4.64L19.77,3.23C17.79,1.23 15.04,0 12,0M7.05,6.05L8.46,7.46C9.37,6.56 10.62,6 12,6C13.38,6 14.63,6.56 15.54,7.46L16.95,6.05C15.68,4.78 13.93,4 12,4C10.07,4 8.32,4.78 7.05,6.05M12,15A2,2 0 0,1 10,13A2,2 0 0,1 12,11A2,2 0 0,1 14,13A2,2 0 0,1 12,15M15,9H9A1,1 0 0,0 8,10V22A1,1 0 0,0 9,23H15A1,1 0 0,0 16,22V10A1,1 0 0,0 15,9Z",scene:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z",script:"M17.8,20C17.4,21.2 16.3,22 15,22H5C3.3,22 2,20.7 2,19V18H5L14.2,18C14.6,19.2 15.7,20 17,20H17.8M19,2C20.7,2 22,3.3 22,5V6H20V5C20,4.4 19.6,4 19,4C18.4,4 18,4.4 18,5V18H17C16.4,18 16,17.6 16,17V16H5V5C5,3.3 6.3,2 8,2H19M8,6V8H15V6H8M8,10V12H14V10H8Z",select:C,sensor:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",siren:"M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z",simple_alarm:g,sun:"M3.55,18.54L4.96,19.95L6.76,18.16L5.34,16.74M11,22.45C11.32,22.45 13,22.45 13,22.45V19.5H11M12,5.5A6,6 0 0,0 6,11.5A6,6 0 0,0 12,17.5A6,6 0 0,0 18,11.5C18,8.18 15.31,5.5 12,5.5M20,12.5H23V10.5H20M17.24,18.16L19.04,19.95L20.45,18.54L18.66,16.74M20.45,4.46L19.04,3.05L17.24,4.84L18.66,6.26M13,0.55H11V3.5H13M4,10.5H1V12.5H4M6.76,4.84L4.96,3.05L3.55,4.46L5.34,6.26L6.76,4.84Z",timer:"M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M19.03,7.39L20.45,5.97C20,5.46 19.55,5 19.04,4.56L17.62,6C16.07,4.74 14.12,4 12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22C17,22 21,17.97 21,13C21,10.88 20.26,8.93 19.03,7.39M11,14H13V8H11M15,1H9V3H15V1Z",updater:"M14,13V17H10V13H7L12,8L17,13M19.35,10.03C18.67,6.59 15.64,4 12,4C9.11,4 6.6,5.64 5.35,8.03C2.34,8.36 0,10.9 0,14A6,6 0 0,0 6,20H19A5,5 0 0,0 24,15C24,12.36 21.95,10.22 19.35,10.03Z",vacuum:"M12,2C14.65,2 17.19,3.06 19.07,4.93L17.65,6.35C16.15,4.85 14.12,4 12,4C9.88,4 7.84,4.84 6.35,6.35L4.93,4.93C6.81,3.06 9.35,2 12,2M3.66,6.5L5.11,7.94C4.39,9.17 4,10.57 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,10.57 19.61,9.17 18.88,7.94L20.34,6.5C21.42,8.12 22,10.04 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12C2,10.04 2.58,8.12 3.66,6.5M12,6A6,6 0 0,1 18,12C18,13.59 17.37,15.12 16.24,16.24L14.83,14.83C14.08,15.58 13.06,16 12,16C10.94,16 9.92,15.58 9.17,14.83L7.76,16.24C6.63,15.12 6,13.59 6,12A6,6 0 0,1 12,6M12,8A1,1 0 0,0 11,9A1,1 0 0,0 12,10A1,1 0 0,0 13,9A1,1 0 0,0 12,8Z",water_heater:O,weather:"M6,19A5,5 0 0,1 1,14A5,5 0 0,1 6,9C7,6.65 9.3,5 12,5C15.43,5 18.24,7.66 18.5,11.03L19,11A4,4 0 0,1 23,15A4,4 0 0,1 19,19H6M19,13H17V12A5,5 0 0,0 12,7C9.5,7 7.45,8.82 7.06,11.19C6.73,11.07 6.37,11 6,11A3,3 0 0,0 3,14A3,3 0 0,0 6,17H19A2,2 0 0,0 21,15A2,2 0 0,0 19,13Z",zone:"M12,2C15.31,2 18,4.66 18,7.95C18,12.41 12,19 12,19C12,19 6,12.41 6,7.95C6,4.66 8.69,2 12,2M12,6A2,2 0 0,0 10,8A2,2 0 0,0 12,10A2,2 0 0,0 14,8A2,2 0 0,0 12,6M20,19C20,21.21 16.42,23 12,23C7.58,23 4,21.21 4,19C4,17.71 5.22,16.56 7.11,15.83L7.75,16.74C6.67,17.19 6,17.81 6,18.5C6,19.88 8.69,21 12,21C15.31,21 18,19.88 18,18.5C18,17.81 17.33,17.19 16.25,16.74L16.89,15.83C18.78,16.56 20,17.71 20,19Z"},x={apparent_power:E,aqi:k,carbon_dioxide:"M5,7A2,2 0 0,0 3,9V15A2,2 0 0,0 5,17H8V15H5V9H8V7H5M11,7A2,2 0 0,0 9,9V15A2,2 0 0,0 11,17H13A2,2 0 0,0 15,15V9A2,2 0 0,0 13,7H11M11,9H13V15H11V9M16,10.5V12H19V13.5H17.5A1.5,1.5 0 0,0 16,15V18H20.5V16.5H17.5V15H19A1.5,1.5 0 0,0 20.5,13.5V12A1.5,1.5 0 0,0 19,10.5H16Z",carbon_monoxide:"M8 7C6.9 7 6 7.9 6 9V15C6 16.11 6.9 17 8 17H11V15H8V9H11V7H8M14 7C12.9 7 12 7.9 12 9V15C12 16.11 12.9 17 14 17H16C17.11 17 18 16.11 18 15V9C18 7.9 17.11 7 16 7H14M14 9H16V15H14V9",current:"M12.43 11C12.28 10.84 10 7 7 7S2.32 10.18 2 11V13H11.57C11.72 13.16 14 17 17 17S21.68 13.82 22 13V11H12.43M7 9C8.17 9 9.18 9.85 10 11H4.31C4.78 10.17 5.54 9 7 9M17 15C15.83 15 14.82 14.15 14 13H19.69C19.22 13.83 18.46 15 17 15Z",date:w,energy:"M11 15H6L13 1V9H18L11 23V15Z",frequency:_,gas:"M16,9V14L16,20A2,2 0 0,1 14,22H10A2,2 0 0,1 8,20V14L8,9C8,7.14 9.27,5.57 11,5.13V4H9V2H15V4H13V5.13C14.73,5.57 16,7.14 16,9Z",humidity:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",illuminance:"M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z",monetary:"M3,6H21V18H3V6M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M7,8A2,2 0 0,1 5,10V14A2,2 0 0,1 7,16H17A2,2 0 0,1 19,14V10A2,2 0 0,1 17,8H7Z",nitrogen_dioxide:P,nitrogen_monoxide:P,nitrous_oxide:P,ozone:P,pm1:P,pm10:P,pm25:P,power:E,power_factor:"M20,19H4.09L14.18,4.43L15.82,5.57L11.28,12.13C12.89,12.96 14,14.62 14,16.54C14,16.7 14,16.85 13.97,17H20V19M7.91,17H11.96C12,16.85 12,16.7 12,16.54C12,15.28 11.24,14.22 10.14,13.78L7.91,17Z",pressure:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12C20,14.4 19,16.5 17.3,18C15.9,16.7 14,16 12,16C10,16 8.2,16.7 6.7,18C5,16.5 4,14.4 4,12A8,8 0 0,1 12,4M14,5.89C13.62,5.9 13.26,6.15 13.1,6.54L11.81,9.77L11.71,10C11,10.13 10.41,10.6 10.14,11.26C9.73,12.29 10.23,13.45 11.26,13.86C12.29,14.27 13.45,13.77 13.86,12.74C14.12,12.08 14,11.32 13.57,10.76L13.67,10.5L14.96,7.29L14.97,7.26C15.17,6.75 14.92,6.17 14.41,5.96C14.28,5.91 14.15,5.89 14,5.89M10,6A1,1 0 0,0 9,7A1,1 0 0,0 10,8A1,1 0 0,0 11,7A1,1 0 0,0 10,6M7,9A1,1 0 0,0 6,10A1,1 0 0,0 7,11A1,1 0 0,0 8,10A1,1 0 0,0 7,9M17,9A1,1 0 0,0 16,10A1,1 0 0,0 17,11A1,1 0 0,0 18,10A1,1 0 0,0 17,9Z",reactive_power:E,signal_strength:"M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z",sulphur_dioxide:P,temperature:O,timestamp:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",volatile_organic_compounds:P,voltage:_},j=(new Set(["fan","input_boolean","light","switch","group","automation","humidifier"]),new Set(["camera","media_player"]),r(40095)),T=function(e){return function(e){return(0,j.e)(e,4)&&"number"==typeof e.attributes.in_progress}(e)||!!e.attributes.in_progress},z="M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",V="M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z",H="M12 5.69L17 10.19V18H15V12H9V18H7V10.19L12 5.69M12 3L2 12H5V20H11V14H13V20H19V12H22",M="M16,7V3H14V7H10V3H8V7H8C7,7 6,8 6,9V14.5L9.5,18V21H14.5V18L18,14.5V9C18,8 17,7 16,7Z",R="M20.84 22.73L15.31 17.2L14.5 18V21H9.5V18L6 14.5V9C6 8.7 6.1 8.41 6.25 8.14L1.11 3L2.39 1.73L22.11 21.46L20.84 22.73M18 14.5V9C18 8 17 7 16 7V3H14V7H10.2L17.85 14.65L18 14.5M10 3H8V4.8L10 6.8V3Z",L="M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z",F="M21,19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5A2,2 0 0,1 5,3H19C20.11,3 21,3.9 21,5V19M13,18V9.5L16.5,13L17.92,11.58L12,5.66L6.08,11.58L7.5,13L11,9.5V18H13Z",I="M3,5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5M11,6V14.5L7.5,11L6.08,12.42L12,18.34L17.92,12.42L16.5,11L13,14.5V6H11Z",B="M6,11H10V9H14V11H18V4H6V11M18,13H6V20H18V13M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2Z",Z="M6,8H10V6H14V8H18V4H6V8M18,10H6V15H18V10M6,20H18V17H6V20M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2Z",U="M13,20V4H15.03V20H13M10,20V4H12.03V20H10M5,8L9.03,12L5,16V13H2V11H5V8M20,16L16,12L20,8V11H23V13H20V16Z",N="M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",q={10:"M16,18H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",20:"M16,17H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",30:"M16,15H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",40:"M16,14H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",50:"M16,13H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",60:"M16,12H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",70:"M16,10H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",80:"M16,9H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",90:"M16,8H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",100:N},$={10:"M23.05,11H20.05V4L15.05,14H18.05V22M12,18H4L4.05,6H12.05M12.72,4H11.05V2H5.05V4H3.38A1.33,1.33 0 0,0 2.05,5.33V20.67C2.05,21.4 2.65,22 3.38,22H12.72C13.45,22 14.05,21.4 14.05,20.67V5.33A1.33,1.33 0 0,0 12.72,4Z",20:"M23.05,11H20.05V4L15.05,14H18.05V22M12.05,17H4.05V6H12.05M12.72,4H11.05V2H5.05V4H3.38A1.33,1.33 0 0,0 2.05,5.33V20.67C2.05,21.4 2.65,22 3.38,22H12.72C13.45,22 14.05,21.4 14.05,20.67V5.33A1.33,1.33 0 0,0 12.72,4Z",30:"M12,15H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4M23,11H20V4L15,14H18V22L23,11Z",40:"M13 4H11V2H5V4H3C2.4 4 2 4.4 2 5V21C2 21.6 2.4 22 3 22H13C13.6 22 14 21.6 14 21V5C14 4.4 13.6 4 13 4M12 14.5H4V6H12V14.5M23 11H20V4L15 14H18V22",50:"M23,11H20V4L15,14H18V22M12,13H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z",60:"M12,11H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4M23,11H20V4L15,14H18V22L23,11Z",70:"M12,10H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4M23,11H20V4L15,14H18V22L23,11Z",80:"M23,11H20V4L15,14H18V22M12,9H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z",90:"M23,11H20V4L15,14H18V22M12,8H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z",100:"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.66C6,21.4 6.6,22 7.33,22H16.66C17.4,22 18,21.4 18,20.67V5.33C18,4.6 17.4,4 16.67,4M11,20V14.5H9L13,7V12.5H15"},W=function(e,t){var r=Number(e);if(isNaN(r))return"off"===e?N:"on"===e?"M13 14H11V8H13M13 18H11V16H13M16.7 4H15V2H9V4H7.3C6.6 4 6 4.6 6 5.3V20.6C6 21.4 6.6 22 7.3 22H16.6C17.3 22 17.9 21.4 17.9 20.7V5.3C18 4.6 17.4 4 16.7 4Z":"M15.07,12.25L14.17,13.17C13.63,13.71 13.25,14.18 13.09,15H11.05C11.16,14.1 11.56,13.28 12.17,12.67L13.41,11.41C13.78,11.05 14,10.55 14,10C14,8.89 13.1,8 12,8A2,2 0 0,0 10,10H8A4,4 0 0,1 12,6A4,4 0 0,1 16,10C16,10.88 15.64,11.68 15.07,12.25M13,19H11V17H13M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.66C6,21.4 6.6,22 7.33,22H16.67C17.4,22 18,21.4 18,20.66V5.33C18,4.59 17.4,4 16.67,4Z";var n=10*Math.round(r/10);return t&&r>=10?$[n]:t?"M23.05,11H20.05V4L15.05,14H18.05V22M12,20H4L4.05,6H12.05M12.72,4H11.05V2H5.05V4H3.38A1.33,1.33 0 0,0 2.05,5.33V20.67C2.05,21.4 2.65,22 3.38,22H12.72C13.45,22 14.05,21.4 14.05,20.67V5.33A1.33,1.33 0 0,0 12.72,4Z":r<=5?"M14 20H6V6H14M14.67 4H13V2H7V4H5.33C4.6 4 4 4.6 4 5.33V20.67C4 21.4 4.6 22 5.33 22H14.67C15.4 22 16 21.4 16 20.67V5.33C16 4.6 15.4 4 14.67 4M21 7H19V13H21V8M21 15H19V17H21V15Z":q[n]},Y=function(e){var t,r,n,i=null==e?void 0:e.attributes.device_class;if(i&&i in x)return x[i];if("battery"===i)return e?(r=e.state,n=t&&"on"===t.state,W(r,n)):"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z";var o=null==e?void 0:e.attributes.unit_of_measurement;return"°C"===o||"°F"===o?"M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z":void 0},K="M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M5.12,5H18.87L17.93,4H5.93L5.12,5M12,9.5L6.5,15H10V17H14V15H17.5L12,9.5Z",X="M18.4 1.6C18 1.2 17.5 1 17 1H7C6.5 1 6 1.2 5.6 1.6C5.2 2 5 2.5 5 3V21C5 21.5 5.2 22 5.6 22.4C6 22.8 6.5 23 7 23H17C17.5 23 18 22.8 18.4 22.4C18.8 22 19 21.5 19 21V3C19 2.5 18.8 2 18.4 1.6M16 7C16 7.6 15.6 8 15 8H9C8.4 8 8 7.6 8 7V5C8 4.4 8.4 4 9 4H15C15.6 4 16 4.4 16 5V7Z",G=function(e,t,r){var n=void 0!==r?r:null==t?void 0:t.state;switch(e){case"alarm_control_panel":return function(e){switch(e){case"armed_away":return"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1M12,7C13.4,7 14.8,8.1 14.8,9.5V11C15.4,11 16,11.6 16,12.3V15.8C16,16.4 15.4,17 14.7,17H9.2C8.6,17 8,16.4 8,15.7V12.2C8,11.6 8.6,11 9.2,11V9.5C9.2,8.1 10.6,7 12,7M12,8.2C11.2,8.2 10.5,8.7 10.5,9.5V11H13.5V9.5C13.5,8.7 12.8,8.2 12,8.2Z";case"armed_vacation":return"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1M12,5.68C12.5,5.68 12.95,6.11 12.95,6.63V10.11L18,13.26V14.53L12.95,12.95V16.42L14.21,17.37V18.32L12,17.68L9.79,18.32V17.37L11.05,16.42V12.95L6,14.53V13.26L11.05,10.11V6.63C11.05,6.11 11.5,5.68 12,5.68Z";case"armed_home":return"M11,13H13V16H16V11H18L12,6L6,11H8V16H11V13M12,1L21,5V11C21,16.55 17.16,21.74 12,23C6.84,21.74 3,16.55 3,11V5L12,1Z";case"armed_night":return"M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1M15.97 14.41C14.13 16.58 10.76 16.5 9 14.34C6.82 11.62 8.36 7.62 11.7 7C12.04 6.95 12.33 7.28 12.21 7.61C11.75 8.84 11.82 10.25 12.53 11.47C13.24 12.69 14.42 13.46 15.71 13.67C16.05 13.72 16.2 14.14 15.97 14.41Z";case"armed_custom_bypass":return"M12,12H19C18.47,16.11 15.72,19.78 12,20.92V12H5V6.3L12,3.19M12,1L3,5V11C3,16.55 6.84,21.73 12,23C17.16,21.73 21,16.55 21,11V5L12,1Z";case"pending":return"M21,11C21,16.55 17.16,21.74 12,23C6.84,21.74 3,16.55 3,11V5L12,1L21,5V11M12,21C15.75,20 19,15.54 19,11.22V6.3L12,3.18L5,6.3V11.22C5,15.54 8.25,20 12,21Z";case"triggered":return"M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M14,21A2,2 0 0,1 12,23A2,2 0 0,1 10,21M19.75,3.19L18.33,4.61C20.04,6.3 21,8.6 21,11H23C23,8.07 21.84,5.25 19.75,3.19M1,11H3C3,8.6 3.96,6.3 5.67,4.61L4.25,3.19C2.16,5.25 1,8.07 1,11Z";case"disarmed":return"M1,4.27L2.28,3L20.5,21.22L19.23,22.5L17,20.25C15.57,21.57 13.87,22.54 12,23C6.84,21.74 3,16.55 3,11V6.27L1,4.27M12,1L21,5V11C21,13.28 20.35,15.5 19.23,17.41L5.65,3.82L12,1Z";default:return"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1Z"}}(n);case"binary_sensor":return function(e,t){var r="off"===e;switch(null==t?void 0:t.attributes.device_class){case"battery":return r?z:"M16,20H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z";case"battery_charging":return r?z:"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.66C6,21.4 6.6,22 7.33,22H16.66C17.4,22 18,21.4 18,20.67V5.33C18,4.6 17.4,4 16.67,4M11,20V14.5H9L13,7V12.5H15";case"carbon_monoxide":return r?"M12,18A6,6 0 0,0 18,12C18,8.68 15.31,6 12,6C8.68,6 6,8.68 6,12A6,6 0 0,0 12,18M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H19M8,12A4,4 0 0,1 12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12Z":"M10 18C13.3 18 16 15.3 16 12C16 8.7 13.3 6 10 6C6.7 6 4 8.7 4 12C4 15.3 6.7 18 10 18M17 3C18.1 3 19 3.9 19 5V19C19 20.1 18.1 21 17 21H3C1.9 21 1 20.1 1 19V5C1 3.9 1.9 3 3 3H17M6 12C6 9.8 7.8 8 10 8S14 9.8 14 12 12.2 16 10 16 6 14.2 6 12M23 7H21V13H23V8M23 15H21V17H23V15Z";case"cold":return r?L:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z";case"connectivity":return r?"M15,20A1,1 0 0,0 14,19H13V17H17A2,2 0 0,0 19,15V5A2,2 0 0,0 17,3H7A2,2 0 0,0 5,5V15A2,2 0 0,0 7,17H11V19H10A1,1 0 0,0 9,20H2V22H9A1,1 0 0,0 10,23H14A1,1 0 0,0 15,22H22V20H15M7,15V5H17V15H7M15.54,12.12L13.41,10L15.53,7.87L14.12,6.46L12,8.59L9.88,6.46L8.47,7.87L10.59,10L8.47,12.13L9.88,13.54L12,11.41L14.12,13.54L15.54,12.12Z":"M15,20A1,1 0 0,0 14,19H13V17H17A2,2 0 0,0 19,15V5A2,2 0 0,0 17,3H7A2,2 0 0,0 5,5V15A2,2 0 0,0 7,17H11V19H10A1,1 0 0,0 9,20H2V22H9A1,1 0 0,0 10,23H14A1,1 0 0,0 15,22H22V20H15M7,15V5H17V15H7M8,10.37L9.24,9.13L10.93,10.83L14.76,7L16,8.5L10.93,13.57L8,10.37Z";case"door":return r?"M16,11H18V13H16V11M12,3H19C20.11,3 21,3.89 21,5V19H22V21H2V19H10V5C10,3.89 10.89,3 12,3M12,5V19H19V5H12Z":"M12,3C10.89,3 10,3.89 10,5H3V19H2V21H22V19H21V5C21,3.89 20.11,3 19,3H12M12,5H19V19H12V5M5,11H7V13H5V11Z";case"garage_door":return r?"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12M8,15H16V17H8V15M16,18V20H8V18H16Z":"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12Z";case"power":case"plug":return r?R:M;case"gas":case"problem":case"safety":case"tamper":return r?"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z":"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";case"smoke":return r?"M12 4C16.41 4 20 7.59 20 12S16.41 20 12 20 4 16.41 4 12 7.59 4 12 4M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 11C11.45 11 11 11.45 11 12S11.45 13 12 13 13 12.55 13 12 12.55 11 12 11M10.72 9.3C11.11 9.11 11.54 9 12 9S12.89 9.11 13.29 9.3L14 8.57C13.43 8.22 12.74 8 12 8S10.58 8.22 10 8.57L10.72 9.3M15 12C15 12.46 14.89 12.89 14.7 13.29L15.43 14C15.79 13.43 16 12.74 16 12S15.79 10.58 15.43 10L14.7 10.72C14.89 11.11 15 11.54 15 12M9 12C9 11.54 9.11 11.11 9.3 10.72L8.57 10C8.22 10.58 8 11.26 8 12S8.22 13.43 8.57 14L9.3 13.29C9.11 12.89 9 12.46 9 12M13.29 14.7C12.89 14.89 12.46 15 12 15S11.11 14.89 10.72 14.7L10 15.43C10.58 15.79 11.26 16 12 16S13.43 15.79 14 15.43L13.29 14.7M16.89 8.53L16.17 9.25C16.69 10.04 17 11 17 12S16.69 13.96 16.17 14.75L16.89 15.47C17.59 14.5 18 13.3 18 12S17.59 9.5 16.89 8.53M9.25 7.83C10.04 7.31 11 7 12 7S13.96 7.31 14.75 7.83L15.47 7.11C14.5 6.42 13.3 6 12 6S9.5 6.42 8.53 7.11L9.25 7.83M14.75 16.17C13.96 16.69 13 17 12 17S10.04 16.69 9.25 16.17L8.53 16.89C9.5 17.59 10.7 18 12 18S14.5 17.59 15.47 16.89L14.75 16.17M7.83 14.75C7.31 13.96 7 13 7 12S7.31 10.04 7.83 9.25L7.11 8.53C6.42 9.5 6 10.7 6 12S6.42 14.5 7.11 15.47L7.83 14.75Z":"M10 4C14.4 4 18 7.6 18 12S14.4 20 10 20 2 16.4 2 12 5.6 4 10 4M10 2C4.5 2 0 6.5 0 12S4.5 22 10 22 20 17.5 20 12 15.5 2 10 2M10 11C9.4 11 9 11.4 9 12S9.4 13 10 13 11 12.6 11 12 10.6 11 10 11M8.7 9.3C9.1 9.1 9.5 9 10 9S10.9 9.1 11.3 9.3L12 8.6C11.4 8.2 10.7 8 10 8S8.6 8.2 8 8.6L8.7 9.3M13 12C13 12.5 12.9 12.9 12.7 13.3L13.4 14C13.8 13.4 14 12.7 14 12S13.8 10.6 13.4 10L12.7 10.7C12.9 11.1 13 11.5 13 12M7 12C7 11.5 7.1 11.1 7.3 10.7L6.6 10C6.2 10.6 6 11.3 6 12S6.2 13.4 6.6 14L7.3 13.3C7.1 12.9 7 12.5 7 12M11.3 14.7C10.9 14.9 10.5 15 10 15S9.1 14.9 8.7 14.7L8 15.4C8.6 15.8 9.3 16 10 16S11.4 15.8 12 15.4L11.3 14.7M14.9 8.5L14.2 9.2C14.7 10 15 11 15 12S14.7 14 14.2 14.8L14.9 15.5C15.6 14.5 16 13.3 16 12S15.6 9.5 14.9 8.5M7.2 7.8C8 7.3 9 7 10 7S12 7.3 12.8 7.8L13.5 7.1C12.5 6.4 11.3 6 10 6S7.5 6.4 6.5 7.1L7.2 7.8M12.8 16.2C12 16.7 11 17 10 17S8 16.7 7.2 16.2L6.5 16.9C7.5 17.6 8.7 18 10 18S12.5 17.6 13.5 16.9L12.8 16.2M5.8 14.8C5.3 14 5 13 5 12S5.3 10 5.8 9.2L5.1 8.5C4.4 9.5 4 10.7 4 12S4.4 14.5 5.1 15.5L5.8 14.8M24 7H22V13H24V8M24 15H22V17H24V15Z";case"heat":return r?L:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z";case"light":return r?"M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z":"M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z";case"lock":return r?"M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z":"M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z";case"moisture":return r?"M20.84 22.73L16.29 18.18C15.2 19.3 13.69 20 12 20C8.69 20 6 17.31 6 14C6 12.67 6.67 11.03 7.55 9.44L1.11 3L2.39 1.73L22.11 21.46L20.84 22.73M18 14C18 10 12 3.25 12 3.25S10.84 4.55 9.55 6.35L17.95 14.75C18 14.5 18 14.25 18 14Z":"M12,20A6,6 0 0,1 6,14C6,10 12,3.25 12,3.25C12,3.25 18,10 18,14A6,6 0 0,1 12,20Z";case"motion":return r?"M11.4 8.2H15V10H13.2L11.4 8.2M19.67 1H18.33C18.33 3.58 20.42 5.67 23 5.67V4.33C21.16 4.33 19.67 2.84 19.67 1M21 1C21 2.11 21.9 3 23 3V1H21M17 1H15.67C15.67 5.05 18.95 8.33 23 8.33V7C19.69 7 17 4.31 17 1M10 3.8C11 3.8 11.8 3 11.8 2S11 .2 10 .2 8.2 1 8.2 2 9 3.8 10 3.8M2.39 1.73L1.11 3L3.46 5.35L2 5.8V11H3.8V7.33L5.05 6.94L5.68 7.57L2 22H3.8L6.67 13.89L9 17V22H10.8V15.59L8.31 11.05L8.5 10.37L20.84 22.73L22.11 21.46L2.39 1.73M9.38 4.87C9.08 4.37 8.54 4.03 7.92 4.03C7.75 4.03 7.58 4.06 7.42 4.11L7.34 4.14L11.35 8.15L9.38 4.87Z":"M10,0.2C9,0.2 8.2,1 8.2,2C8.2,3 9,3.8 10,3.8C11,3.8 11.8,3 11.8,2C11.8,1 11,0.2 10,0.2M15.67,1A7.33,7.33 0 0,0 23,8.33V7A6,6 0 0,1 17,1H15.67M18.33,1C18.33,3.58 20.42,5.67 23,5.67V4.33C21.16,4.33 19.67,2.84 19.67,1H18.33M21,1A2,2 0 0,0 23,3V1H21M7.92,4.03C7.75,4.03 7.58,4.06 7.42,4.11L2,5.8V11H3.8V7.33L5.91,6.67L2,22H3.8L6.67,13.89L9,17V22H10.8V15.59L8.31,11.05L9.04,8.18L10.12,10H15V8.2H11.38L9.38,4.87C9.08,4.37 8.54,4.03 7.92,4.03Z";case"occupancy":case"presence":return r?H:V;case"opening":return r?"M3,3V21H21V3":"M3,3H21V21H3V3M5,5V19H19V5H5Z";case"running":return r?"M18,18H6V6H18V18Z":"M8,5.14V19.14L19,12.14L8,5.14Z";case"sound":return r?"M4.27 3L3 4.27L12 13.27V13.55C11.41 13.21 10.73 13 10 13C7.79 13 6 14.79 6 17S7.79 21 10 21 14 19.21 14 17V15.27L19.73 21L21 19.73L4.27 3M14 7H18V3H12V8.18L14 10.18Z":"M12 3V13.55C11.41 13.21 10.73 13 10 13C7.79 13 6 14.79 6 17S7.79 21 10 21 14 19.21 14 17V7H18V3H12Z";case"update":return r?"M5.12,5H18.87L17.93,4H5.93L5.12,5M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M6,18H12V15H6V18Z":"M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M5.12,5H18.87L17.93,4H5.93L5.12,5M12,9.5L6.5,15H10V17H14V15H17.5L12,9.5Z";case"vibration":return r?"M17,19H7V5H17M17,3H7A2,2 0 0,0 5,5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V5C19,3.89 18.1,3 17,3Z":"M16,19H8V5H16M16.5,3H7.5A1.5,1.5 0 0,0 6,4.5V19.5A1.5,1.5 0 0,0 7.5,21H16.5A1.5,1.5 0 0,0 18,19.5V4.5A1.5,1.5 0 0,0 16.5,3M19,17H21V7H19M22,9V15H24V9M3,17H5V7H3M0,15H2V9H0V15Z";case"window":return r?"M6,11H10V9H14V11H18V4H6V11M18,13H6V20H18V13M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2Z":"M6,8H10V6H14V8H18V4H6V8M18,10H6V15H18V10M6,20H18V17H6V20M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2Z";default:return r?"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z":"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}}(n,t);case"button":switch(null==t?void 0:t.attributes.device_class){case"restart":return"M12,4C14.1,4 16.1,4.8 17.6,6.3C20.7,9.4 20.7,14.5 17.6,17.6C15.8,19.5 13.3,20.2 10.9,19.9L11.4,17.9C13.1,18.1 14.9,17.5 16.2,16.2C18.5,13.9 18.5,10.1 16.2,7.7C15.1,6.6 13.5,6 12,6V10.6L7,5.6L12,0.6V4M6.3,17.6C3.7,15 3.3,11 5.1,7.9L6.6,9.4C5.5,11.6 5.9,14.4 7.8,16.2C8.3,16.7 8.9,17.1 9.6,17.4L9,19.4C8,19 7.1,18.4 6.3,17.6Z";case"update":return K;default:return"M13 5C15.21 5 17 6.79 17 9C17 10.5 16.2 11.77 15 12.46V11.24C15.61 10.69 16 9.89 16 9C16 7.34 14.66 6 13 6S10 7.34 10 9C10 9.89 10.39 10.69 11 11.24V12.46C9.8 11.77 9 10.5 9 9C9 6.79 10.79 5 13 5M20 20.5C19.97 21.32 19.32 21.97 18.5 22H13C12.62 22 12.26 21.85 12 21.57L8 17.37L8.74 16.6C8.93 16.39 9.2 16.28 9.5 16.28H9.7L12 18V9C12 8.45 12.45 8 13 8S14 8.45 14 9V13.47L15.21 13.6L19.15 15.79C19.68 16.03 20 16.56 20 17.14V20.5M20 2H4C2.9 2 2 2.9 2 4V12C2 13.11 2.9 14 4 14H8V12L4 12L4 4H20L20 12H18V14H20V13.96L20.04 14C21.13 14 22 13.09 22 12V4C22 2.9 21.11 2 20 2Z"}case"cover":return function(e,t){var r="closed"!==e;switch(null==t?void 0:t.attributes.device_class){case"garage":switch(e){case"opening":return F;case"closing":return I;case"closed":return"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12M8,15H16V17H8V15M16,18V20H8V18H16Z";default:return"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12Z"}case"gate":switch(e){case"opening":case"closing":return"M15 6V11H13V7H11V11H9V9H7V21H9V19H11V21H12.09C12.03 20.67 12 20.34 12 20C12 18.82 12.35 17.67 13 16.69V13H15V14.81C15.62 14.45 16.3 14.21 17 14.09V13H19V14.09C19.7 14.21 20.38 14.45 21 14.81V13H22V11H21V6H19V11H17V6H15M9 13H11V17H9V13M19 17V19H15V21H19V23L22 20L19 17Z";case"closed":return"M9 6V11H7V7H5V11H3V9H1V21H3V19H5V21H7V19H9V21H11V19H13V21H15V19H17V21H19V19H21V21H23V9H21V11H19V7H17V11H15V6H13V11H11V6H9M3 13H5V17H3V13M7 13H9V17H7V13M11 13H13V17H11V13M15 13H17V17H15V13M19 13H21V17H19V13Z";default:return"M7 21V7H5V11H3V9H1V21H3V19H5V21H7M3 17V13H5V17H3M21 9V11H19V7H17V21H19V19H21V21H23V9H21M21 17H19V13H21V17Z"}case"door":return r?"M12,3C10.89,3 10,3.89 10,5H3V19H2V21H22V19H21V5C21,3.89 20.11,3 19,3H12M12,5H19V19H12V5M5,11H7V13H5V11Z":"M16,11H18V13H16V11M12,3H19C20.11,3 21,3.89 21,5V19H22V21H2V19H10V5C10,3.89 10.89,3 12,3M12,5V19H19V5H12Z";case"damper":return r?"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z":"M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4Z";case"shutter":switch(e){case"opening":return F;case"closing":return I;case"closed":return"M3 4H21V8H19V20H17V8H7V20H5V8H3V4M8 9H16V11H8V9M8 12H16V14H8V12M8 15H16V17H8V15M8 18H16V20H8V18Z";default:return"M3 4H21V8H19V20H17V8H7V20H5V8H3V4M8 9H16V11H8V9Z"}case"curtain":switch(e){case"opening":return"M18,16V13H15V22H13V2H15V11H18V8L22,12L18,16M2,12L6,16V13H9V22H11V2H9V11H6V8L2,12Z";case"closing":return U;case"closed":return"M23 3H1V1H23V3M2 22H11V4H2V22M22 4H13V22H22V4Z";default:return"M23 3H1V1H23V3M2 22H6C6 19 4 17 4 17C10 13 11 4 11 4H2V22M22 4H13C13 4 14 13 20 17C20 17 18 19 18 22H22V4Z"}case"blind":case"shade":switch(e){case"opening":return F;case"closing":return I;case"closed":return"M3,2H21A1,1 0 0,1 22,3V5A1,1 0 0,1 21,6H20V13A1,1 0 0,1 19,14H13V16.17C14.17,16.58 15,17.69 15,19A3,3 0 0,1 12,22A3,3 0 0,1 9,19C9,17.69 9.83,16.58 11,16.17V14H5A1,1 0 0,1 4,13V6H3A1,1 0 0,1 2,5V3A1,1 0 0,1 3,2M12,18A1,1 0 0,0 11,19A1,1 0 0,0 12,20A1,1 0 0,0 13,19A1,1 0 0,0 12,18Z";default:return"M3 2H21C21.55 2 22 2.45 22 3V5C22 5.55 21.55 6 21 6H20V7C20 7.55 19.55 8 19 8H13V10.17C14.17 10.58 15 11.7 15 13C15 14.66 13.66 16 12 16C10.34 16 9 14.66 9 13C9 11.69 9.84 10.58 11 10.17V8H5C4.45 8 4 7.55 4 7V6H3C2.45 6 2 5.55 2 5V3C2 2.45 2.45 2 3 2M12 12C11.45 12 11 12.45 11 13C11 13.55 11.45 14 12 14C12.55 14 13 13.55 13 13C13 12.45 12.55 12 12 12Z"}case"window":switch(e){case"opening":return F;case"closing":return I;case"closed":return B;default:return Z}}switch(e){case"opening":return F;case"closing":return I;case"closed":return B;default:return Z}}(n,t);case"device_tracker":return"router"===(null==t?void 0:t.attributes.source_type)?"home"===n?"M4,1C2.89,1 2,1.89 2,3V7C2,8.11 2.89,9 4,9H1V11H13V9H10C11.11,9 12,8.11 12,7V3C12,1.89 11.11,1 10,1H4M4,3H10V7H4V3M3,13V18L3,20H10V18H5V13H3M14,13C12.89,13 12,13.89 12,15V19C12,20.11 12.89,21 14,21H11V23H23V21H20C21.11,21 22,20.11 22,19V15C22,13.89 21.11,13 20,13H14M14,15H20V19H14V15Z":"M4,1C2.89,1 2,1.89 2,3V7C2,8.11 2.89,9 4,9H1V11H13V9H10C11.11,9 12,8.11 12,7V3C12,1.89 11.11,1 10,1H4M4,3H10V7H4V3M14,13C12.89,13 12,13.89 12,15V19C12,20.11 12.89,21 14,21H11V23H23V21H20C21.11,21 22,20.11 22,19V15C22,13.89 21.11,13 20,13H14M3.88,13.46L2.46,14.88L4.59,17L2.46,19.12L3.88,20.54L6,18.41L8.12,20.54L9.54,19.12L7.41,17L9.54,14.88L8.12,13.46L6,15.59L3.88,13.46M14,15H20V19H14V15Z":["bluetooth","bluetooth_le"].includes(null==t?void 0:t.attributes.source_type)?"home"===n?"M19,10L17,12L19,14L21,12M14.88,16.29L13,18.17V14.41M13,5.83L14.88,7.71L13,9.58M17.71,7.71L12,2H11V9.58L6.41,5L5,6.41L10.59,12L5,17.58L6.41,19L11,14.41V22H12L17.71,16.29L13.41,12M7,12L5,10L3,12L5,14L7,12Z":"M14.88,16.29L13,18.17V14.41M13,5.83L14.88,7.71L13,9.58M17.71,7.71L12,2H11V9.58L6.41,5L5,6.41L10.59,12L5,17.58L6.41,19L11,14.41V22H12L17.71,16.29L13.41,12L17.71,7.71Z":"not_home"===n?"M6 8C6 5.79 7.79 4 10 4S14 5.79 14 8 12.21 12 10 12 6 10.21 6 8M10 14C5.58 14 2 15.79 2 18V20H13.09C13.04 19.67 13 19.34 13 19C13 17.36 13.66 15.87 14.74 14.78C13.41 14.29 11.78 14 10 14M23 19L20 16V18H16V20H20V22L23 19Z":"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z";case"humidifier":return r&&"off"===r?"M22.1 21.5L2.4 1.7L1.1 3L3.8 5.7C3.3 6.3 3 7.1 3 8V22H18V19.9L20.8 22.7L22.1 21.5M9.6 11.5L12.4 14.3C12.1 14.7 11.6 15 11 15C9.9 15 9 14.1 9 13C9 12.4 9.3 11.9 9.6 11.5M16 17.9V20H5V8C5 7.7 5.1 7.4 5.2 7.1L8.2 10.1C7.5 10.8 7 11.9 7 13C7 15.2 8.8 17 11 17C12.1 17 13.2 16.5 13.9 15.8L16 17.9M17 13.8C17.1 12.5 19 10.5 19 10.5S21 12.7 21 14C21 15 20.2 15.9 19.2 16L17 13.8M9.2 6L7.2 4H14C16.2 4 18 5.8 18 8V9H16V8C16 6.9 15.1 6 14 6H9.2Z":"M11 9C8.79 9 7 10.79 7 13S8.79 17 11 17 15 15.21 15 13 13.21 9 11 9M11 15C9.9 15 9 14.11 9 13S9.9 11 11 11 13 11.9 13 13 12.11 15 11 15M7 4H14C16.21 4 18 5.79 18 8V9H16V8C16 6.9 15.11 6 14 6H7C5.9 6 5 6.9 5 8V20H16V18H18V22H3V8C3 5.79 4.79 4 7 4M19 10.5C19 10.5 21 12.67 21 14C21 15.1 20.1 16 19 16S17 15.1 17 14C17 12.67 19 10.5 19 10.5";case"input_boolean":return"on"===n?"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z":"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2C6.47,2 2,6.47 2,12C2,17.53 6.47,22 12,22C17.53,22 22,17.53 22,12C22,6.47 17.53,2 12,2M14.59,8L12,10.59L9.41,8L8,9.41L10.59,12L8,14.59L9.41,16L12,13.41L14.59,16L16,14.59L13.41,12L16,9.41L14.59,8Z";case"lock":switch(n){case"unlocked":return"M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z";case"jammed":return"M10 17C11.1 17 12 16.1 12 15C12 13.9 11.1 13 10 13C8.9 13 8 13.9 8 15S8.9 17 10 17M16 8C17.1 8 18 8.9 18 10V20C18 21.1 17.1 22 16 22H4C2.9 22 2 21.1 2 20V10C2 8.9 2.9 8 4 8H5V6C5 3.2 7.2 1 10 1S15 3.2 15 6V8H16M10 3C8.3 3 7 4.3 7 6V8H13V6C13 4.3 11.7 3 10 3M22 13H20V7H22V13M22 17H20V15H22V17Z";case"locking":case"unlocking":return"M8.5,2C6,2 4,4 4,6.5V7C2.89,7 2,7.89 2,9V18C2,19.11 2.89,20 4,20H8.72C10.18,21.29 12.06,22 14,22A8,8 0 0,0 22,14A8,8 0 0,0 14,6C13.66,6 13.32,6.03 13,6.08C12.76,3.77 10.82,2 8.5,2M8.5,4A2.5,2.5 0 0,1 11,6.5V7H6V6.5A2.5,2.5 0 0,1 8.5,4M14,8A6,6 0 0,1 20,14A6,6 0 0,1 14,20A6,6 0 0,1 8,14A6,6 0 0,1 14,8M13,10V15L16.64,17.19L17.42,15.9L14.5,14.15V10H13Z";default:return"M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z"}case"media_player":return"playing"===n?"M21,3H3C1.89,3 1,3.89 1,5V8H3V5H21V19H14V21H21A2,2 0 0,0 23,19V5C23,3.89 22.1,3 21,3M1,10V12A9,9 0 0,1 10,21H12C12,14.92 7.07,10 1,10M19,7H5V8.63C8.96,9.91 12.09,13.04 13.37,17H19M1,14V16A5,5 0 0,1 6,21H8A7,7 0 0,0 1,14M1,18V21H4A3,3 0 0,0 1,18Z":"M1,10V12A9,9 0 0,1 10,21H12C12,14.92 7.07,10 1,10M1,14V16A5,5 0 0,1 6,21H8A7,7 0 0,0 1,14M1,18V21H4A3,3 0 0,0 1,18M21,3H3C1.89,3 1,3.89 1,5V8H3V5H21V19H14V21H21A2,2 0 0,0 23,19V5C23,3.89 22.1,3 21,3Z";case"switch":switch(null==t?void 0:t.attributes.device_class){case"outlet":return"on"===n?"M16,7V3H14V7H10V3H8V7H8C7,7 6,8 6,9V14.5L9.5,18V21H14.5V18L18,14.5V9C18,8 17,7 16,7Z":"M20.84 22.73L15.31 17.2L14.5 18V21H9.5V18L6 14.5V9C6 8.7 6.1 8.41 6.25 8.14L1.11 3L2.39 1.73L22.11 21.46L20.84 22.73M18 14.5V9C18 8 17 7 16 7V3H14V7H10.2L17.85 14.65L18 14.5M10 3H8V4.8L10 6.8V3Z";case"switch":return"on"===n?X:"M5.6 1.6C6 1.2 6.5 1 7 1H17C17.5 1 18 1.2 18.4 1.6C18.8 2 19 2.5 19 3V21C19 21.5 18.8 22 18.4 22.4C18 22.8 17.5 23 17 23H7C6.5 23 6 22.8 5.6 22.4C5.2 22 5 21.5 5 21V3C5 2.5 5.2 2 5.6 1.6M8 3C7.4 3 7 3.4 7 4V20C7 20.6 7.4 21 8 21H16C16.6 21 17 20.6 17 20V4C17 3.4 16.6 3 16 3H8M8 17C8 16.4 8.4 16 9 16H15C15.6 16 16 16.4 16 17V19C16 19.6 15.6 20 15 20H9C8.4 20 8 19.6 8 19V17Z";default:return X}case"sensor":var i=Y(t);if(i)return i;break;case"input_datetime":if(null==t||!t.attributes.has_date)return"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z";if(!t.attributes.has_time)return"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z";break;case"sun":return"above_horizon"===(null==t?void 0:t.state)?D[e]:"M17.75,4.09L15.22,6.03L16.13,9.09L13.5,7.28L10.87,9.09L11.78,6.03L9.25,4.09L12.44,4L13.5,1L14.56,4L17.75,4.09M21.25,11L19.61,12.25L20.2,14.23L18.5,13.06L16.8,14.23L17.39,12.25L15.75,11L17.81,10.95L18.5,9L19.19,10.95L21.25,11M18.97,15.95C19.8,15.87 20.69,17.05 20.16,17.8C19.84,18.25 19.5,18.67 19.08,19.07C15.17,23 8.84,23 4.94,19.07C1.03,15.17 1.03,8.83 4.94,4.93C5.34,4.53 5.76,4.17 6.21,3.85C6.96,3.32 8.14,4.21 8.06,5.04C7.79,7.9 8.75,10.87 10.95,13.06C13.14,15.26 16.1,16.22 18.97,15.95M17.33,17.97C14.5,17.81 11.7,16.64 9.53,14.5C7.36,12.31 6.2,9.5 6.04,6.68C3.23,9.82 3.34,14.64 6.35,17.66C9.37,20.67 14.19,20.78 17.33,17.97Z";case"update":return"on"===n?T(t)?"M5.12,5L5.93,4H17.93L18.87,5M12,17.5L6.5,12H10V10H14V12H17.5L12,17.5M20.54,5.23L19.15,3.55C18.88,3.21 18.47,3 18,3H6C5.53,3 5.12,3.21 4.84,3.55L3.46,5.23C3.17,5.57 3,6 3,6.5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V6.5C21,6 20.83,5.57 20.54,5.23Z":K:"M5.12,5H18.87L17.93,4H5.93L5.12,5M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M6,18H12V15H6V18Z"}return e in D?D[e]:(console.warn("Unable to find icon for domain ".concat(e)),S)};function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function J(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(e,t){return te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},te(e,t)}function re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=oe(e);if(t){var i=oe(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ne(this,r)}}function ne(e,t){if(t&&("object"===Q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ie(e)}function ie(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ae(){ae=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!le(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r"])),this.icon||(null===(t=this.state)||void 0===t?void 0:t.attributes.icon)):(0,i.dy)(v||(v=J([""])),(r=this.state)?G((0,c.M)(r.entity_id),r):S)}}]}}),i.oi);function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ke(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function we(e,t){return we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},we(e,t)}function Ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ve(e);if(t){var i=Ve(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ce(this,r)}}function Ce(e,t){if(t&&("object"===be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pe(e)}function Pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ae(){Ae=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Se(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n =0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ',"\n "])),!!e.entity_id,e.state?(0,i.dy)(Me||(Me=et(['=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n \n ',"\n ']))),this.icon,this.invalid,this.helper,this.value?(0,u.dy)(a||(a=D([" ha-icon-button {\n --mdc-icon-button-size: 24px;\n padding: 2px;\n color: var(--secondary-text-color);\n }\n ha-svg-icon {\n color: var(--input-dropdown-icon-color);\n position: absolute;\n cursor: pointer;\n }\n .toggle-button {\n right: 12px;\n top: -10px;\n }\n :host([opened]) .toggle-button {\n color: var(--primary-color);\n }\n .clear-button {\n --mdc-icon-size: 20px;\n top: -7px;\n right: 36px;\n }\n\n :host-context([style*="direction: rtl;"]) .toggle-button {\n left: 12px;\n right: auto;\n top: -10px;\n }\n :host-context([style*="direction: rtl;"]) .clear-button {\n --mdc-icon-size: 20px;\n top: -7px;\n left: 36px;\n right: auto;\n }\n '])))}}]}}),u.oi)},66606:function(e,t,r){r.r(t),r.d(t,{HaSelector:function(){return XV}});var n=r(37500),i=r(63550),o=r(55642),a=(r(51187),r(47181)),s=(r(22098),r(44577),r(14516)),c=r(85415),l=r(69505);function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],i||(i=r.slice(0)),f=Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(i)}}))),this.hass,e,this._entityPicked,R)}},{kind:"method",key:"_entityPicked",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:{service:"scene.turn_on",target:{entity_id:e.detail.value},metadata:{}}})}}]}}),n.oi);function L(e){return void 0===e||Array.isArray(e)?e:[e]}var F,I,B;r(13701);function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function U(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||ae(e)||ie(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $(e,t){return $=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},$(e,t)}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=X(e);if(t){var i=X(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Y(this,r)}}function Y(e,t){if(t&&("object"===Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function K(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}function G(){G=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ee(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n ","\n \n
\n \n \n ",":\n
\n \n "])),(t.choose?L(t.choose):[]).map((function(t,r){return(0,n.dy)(I||(I=N(["\n \n \n ',":\n
\n \n ",":\n
\n \n \n ",":\n
\n \n \n "])),r,e._removeOption,e.hass.localize("ui.panel.config.automation.editor.actions.type.choose.remove_option"),"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",e.hass.localize("ui.panel.config.automation.editor.actions.type.choose.option","number",r+1),e.hass.localize("ui.panel.config.automation.editor.actions.type.choose.conditions"),t.conditions,e.hass,r,e._conditionChanged,e.hass.localize("ui.panel.config.automation.editor.actions.type.choose.sequence"),e.hass,[{name:"sequence",selector:{action:{}}}],t,r,e._actionChanged)})),this._addOption,this.hass.localize("ui.panel.config.automation.editor.actions.type.choose.add_option"),this.hass.localize("ui.panel.config.automation.editor.actions.type.choose.default"),t.default||[],this._defaultChanged,this.hass)}},{kind:"method",key:"_conditionChanged",value:function(e){e.stopPropagation();var t=e.detail.value,r=e.target.idx,n=this.action.choose?U(L(this.action.choose)):[];n[r].conditions=t,(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{choose:n})})}},{kind:"method",key:"_actionChanged",value:function(e){e.stopPropagation();var t=e.detail.value.sequence,r=e.target.idx,n=this.action.choose?U(L(this.action.choose)):[];n[r].sequence=t,(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{choose:n})})}},{kind:"method",key:"_addOption",value:function(){var e=this.action.choose?U(L(this.action.choose)):[];e.push({conditions:[],sequence:[]}),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{choose:e})})}},{kind:"method",key:"_removeOption",value:function(e){var t=e.currentTarget.idx,r=this.action.choose?U(L(this.action.choose)):[];r.splice(t,1),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{choose:r})})}},{kind:"method",key:"_defaultChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{default:t})})}},{kind:"get",static:!0,key:"styles",value:function(){return[g.Qx,(0,n.iv)(B||(B=N(["\n ha-card {\n margin-top: 16px;\n }\n .add-card mwc-button {\n display: block;\n text-align: center;\n }\n ha-icon-button {\n position: absolute;\n right: 0;\n padding: 4px;\n }\n ha-form::part(root) {\n overflow: visible;\n }\n "])))]}}]}}),n.oi),r(18900),r(98762);var se,ce,le,ue,de,fe,pe=function(e,t,r,n){return e.connection.subscribeMessage(t,{type:"subscribe_trigger",trigger:r,variables:n})},he=function(e,t,r){return e.callWS({type:"test_condition",condition:t,variables:r})};function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function ye(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function ve(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(e,t){return ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ke(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ce(e);if(t){var i=Ce(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return we(this,r)}}function we(e,t){if(t&&("object"===me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ee(e)}function Ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ce(e)}function Pe(){Pe=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Oe(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n ","\n \n
\n \n "])),this._testCondition,this.hass.localize("ui.panel.config.automation.editor.conditions.test"),this._handleAction,this.hass.localize("ui.common.menu"),"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",this._yamlMode?this.hass.localize("ui.panel.config.automation.editor.edit_ui"):this.hass.localize("ui.panel.config.automation.editor.edit_yaml"),this.hass.localize("ui.panel.config.automation.editor.actions.duplicate"),this.hass.localize("ui.panel.config.automation.editor.actions.delete"),this._warnings?(0,n.dy)(le||(le=ve(['","subtype",t.subtype?e.localize("component.".concat(t.domain,".device_automation.action_subtype.").concat(t.subtype))||t.subtype:"")||(t.subtype?'"'.concat(t.subtype,'" ').concat(t.type):t.type)},Ke=function(e,t){var r=t.entity_id?e.states[t.entity_id]:void 0;return e.localize("component.".concat(t.domain,".device_automation.condition_type.").concat(t.type),"entity_name",r?(0,ze.C)(r):t.entity_id||"","subtype",t.subtype?e.localize("component.".concat(t.domain,".device_automation.condition_subtype.").concat(t.subtype))||t.subtype:"")||(t.subtype?'"'.concat(t.subtype,'" ').concat(t.type):t.type)},Xe=function(e,t){var r=t.entity_id?e.states[t.entity_id]:void 0;return e.localize("component.".concat(t.domain,".device_automation.trigger_type.").concat(t.type),"entity_name",r?(0,ze.C)(r):t.entity_id||"","subtype",t.subtype?e.localize("component.".concat(t.domain,".device_automation.trigger_subtype.").concat(t.subtype))||t.subtype:"")||(t.subtype?'"'.concat(t.subtype,'" ').concat(t.type):t.type)};function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}function Qe(e,t){return mt(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||pt(e,t)||ft()}function Je(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function et(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tt(e,t){return tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},tt(e,t)}function rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vt(e);if(t){var i=vt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}function nt(e,t){if(t&&("object"===Ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return it(e)}function it(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ot(){ot=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ct(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n ","\n ","\n \n "])),this.label,t,this._automationChanged,0===this._automations.length,t===bt?(0,n.dy)(Re||(Re=et(["\n ","\n "])),bt,this.NO_AUTOMATION_TEXT):"",t===kt?(0,n.dy)(Le||(Le=et(["\n ","\n "])),kt,this.UNKNOWN_AUTOMATION_TEXT):"",this._automations.map((function(t,r){return(0,n.dy)(Fe||(Fe=et(["\n \n ","\n \n "])),"".concat(t.device_id,"_").concat(r),e._localizeDeviceAutomation(e.hass,t))})))}},{kind:"method",key:"updated",value:function(e){yt(vt(s.prototype),"updated",this).call(this,e),e.has("deviceId")&&this._updateDeviceInfo()}},{kind:"method",key:"_updateDeviceInfo",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.deviceId){e.next=6;break}return e.next=3,this._fetchDeviceAutomations(this.hass,this.deviceId);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=[];case 7:return this._automations=e.t0,this.value&&this.value.device_id===this.deviceId||this._setValue(this._automations.length?this._automations[0]:this._createNoAutomation(this.deviceId)),this._renderEmpty=!0,e.next=12,this.updateComplete;case 12:this._renderEmpty=!1;case 13:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Je(o,n,i,a,s,"next",e)}function s(e){Je(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_automationChanged",value:function(e){var t=e.target.value;if(t&&![kt,bt].includes(t)){var r=Qe(t.split("_"),2),n=r[0],i=r[1],o=this._automations[i];o.device_id===n&&this._setValue(o)}}},{kind:"method",key:"_setValue",value:function(e){this.value&&We(e,this.value)||((0,a.B)(this,"change"),(0,a.B)(this,"value-changed",{value:e}))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Ie||(Ie=et(["\n ha-select {\n width: 100%;\n margin-top: 4px;\n }\n "])))}}]}}),n.oi);function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function Et(e,t){return Et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Et(e,t)}function Ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_t(e);if(t){var i=_t(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pt(this,r)}}function Pt(e,t){if(t&&("object"===wt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return At(e)}function At(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _t(e){return _t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_t(e)}function Ot(){Ot=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!xt(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Kt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xt(e,t){return Xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Xt(e,t)}function Gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=er(e);if(t){var i=er(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qt(this,r)}}function Qt(e,t){if(t&&("object"===Wt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Jt(e)}function Jt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function er(e){return er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},er(e)}function tr(){tr=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ir(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ",'\n ',"\n"])),!!e.area,e.name,e.area)};!function(e,t,r,n){var i=tr();if(n)for(var o=0;o\n "])),this.hass,void 0===this.label&&this.hass?this.hass.localize("ui.components.device-picker.device"):this.label,this._value,this.helper,hr,this.disabled,this.required,this._openedChanged,this._deviceChanged):(0,n.dy)(Mt||(Mt=ur([""])))}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_deviceChanged",value:function(e){e.stopPropagation();var t=e.detail.value;"no_devices"===t&&(t=""),t!==this._value&&this._setValue(t)}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_setValue",value:function(e){var t=this;this.value=e,setTimeout((function(){(0,a.B)(t,"value-changed",{value:e}),(0,a.B)(t,"change")}),0)}}]}}),(0,$t.f)(n.oi));function mr(e){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(e)}function yr(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function vr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function br(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kr(e,t){return kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},kr(e,t)}function gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cr(e);if(t){var i=Cr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wr(this,r)}}function wr(e,t){if(t&&("object"===mr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Er(e)}function Er(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Cr(e)}function Pr(){Pr=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Or(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ","\n "])),t,this._devicePicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.conditions.type.device.label"),this.condition,t,this._deviceConditionPicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.conditions.type.device.condition"),null!==(e=this._capabilities)&&void 0!==e&&e.extra_fields?(0,n.dy)(fr||(fr=vr(["\n \n "])),this.hass,this._extraFieldsData(this.condition,this._capabilities),this._capabilities.extra_fields,this._extraFieldsComputeLabelCallback(this.hass.localize),this._extraFieldsChanged):"")}},{kind:"method",key:"firstUpdated",value:function(){this._capabilities||this._getCapabilities(),this.condition&&(this._origCondition=this.condition)}},{kind:"method",key:"updated",value:function(e){var t=e.get("condition");t&&!We(t,this.condition)&&this._getCapabilities()}},{kind:"method",key:"_getCapabilities",value:(r=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.condition).domain){e.next=7;break}return e.next=4,Ne(this.hass,t);case 4:e.t0=e.sent,e.next=8;break;case 7:e.t0=void 0;case 8:this._capabilities=e.t0;case 9:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){yr(o,n,i,a,s,"next",e)}function s(e){yr(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_devicePicked",value:function(e){e.stopPropagation(),this._deviceId=e.target.value,void 0===this._deviceId&&(0,a.B)(this,"value-changed",{value:Object.assign({},c.defaultConfig,{condition:"device"})})}},{kind:"method",key:"_deviceConditionPicked",value:function(e){e.stopPropagation();var t=e.detail.value;this._origCondition&&We(this._origCondition,t)&&(t=this._origCondition),(0,a.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_extraFieldsChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,e.detail.value)})}},{kind:"method",key:"_extraFieldsComputeLabelCallback",value:function(e){return function(t){return e("ui.panel.config.automation.editor.conditions.type.device.extra_fields.".concat(t.name))||t.name}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(pr||(pr=vr(["\n ha-device-picker {\n display: block;\n margin-bottom: 24px;\n }\n "])))}}]}}),n.oi);function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function Lr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Fr(e){return function(e){if(Array.isArray(e))return en(e)}(e)||tn(e)||Jr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ir(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Br(e,t){return Br=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Br(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qr(e);if(t){var i=qr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ur(this,r)}}function Ur(e,t){if(t&&("object"===Rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Nr(e)}function Nr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qr(e){return qr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qr(e)}function $r(){$r=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Kr(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n ","\n \n
\n \n "])),this.conditions.map((function(t,r){return(0,n.dy)(Vr||(Vr=Lr(["\n \n "])),r,t,e._duplicateCondition,e._conditionChanged,e.hass)})),this._addCondition,this.hass.localize("ui.panel.config.automation.editor.conditions.add")):(0,n.dy)(Tr||(Tr=Lr([""])))}},{kind:"method",key:"_addCondition",value:function(){var e=this.conditions.concat(Object.assign({condition:"device"},Mr.defaultConfig));(0,a.B)(this,"value-changed",{value:e})}},{kind:"method",key:"_conditionChanged",value:function(e){e.stopPropagation();var t=Fr(this.conditions),r=e.detail.value,n=e.target.index;null===r?t.splice(n,1):t[n]=r,(0,a.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_duplicateCondition",value:function(e){e.stopPropagation();var t=e.target.index;(0,a.B)(this,"value-changed",{value:this.conditions.concat(this.conditions[t])})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Hr||(Hr=Lr(["\n ha-automation-condition-row,\n ha-card {\n display: block;\n margin-top: 16px;\n }\n .add-card mwc-button {\n display: block;\n text-align: center;\n }\n "])))}}]}}),n.oi);function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}var nn,on=function(e){if(void 0!==e){if("object"!==rn(e)){if("string"==typeof e||isNaN(e)){var t=(null==e?void 0:e.toString().split(":"))||[];return{hours:Number(t[0])||0,minutes:Number(t[1])||0,seconds:Number(t[2])||0,milliseconds:Number(t[3])||0}}return{seconds:e}}if(!("days"in e))return e;var r=e.days,n=e.minutes,i=e.seconds,o=e.milliseconds,a=e.hours||0;return{hours:a=(a||0)+24*(r||0),minutes:n,seconds:i,milliseconds:o}}},an=(0,l.Ry)({platform:(0,l.Z_)(),id:(0,l.jt)((0,l.Z_)())}),sn=(0,l.Ry)({days:(0,l.jt)((0,l.Rx)()),hours:(0,l.jt)((0,l.Rx)()),minutes:(0,l.jt)((0,l.Rx)()),seconds:(0,l.jt)((0,l.Rx)())});function cn(e){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(e)}function ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(e,t){return un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},un(e,t)}function dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hn(e);if(t){var i=hn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fn(this,r)}}function fn(e,t){if(t&&("object"===cn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pn(e)}function pn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hn(e){return hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},hn(e)}function mn(){mn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!bn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),nn=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,i,o,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;Object.keys(t).forEach((function(e){return void 0===t[e]||""===t[e]?delete t[e]:{}})),(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){switch(t.name){case"entity_id":return e.hass.localize("ui.components.entity.entity-picker.entity");case"attribute":return e.hass.localize("ui.components.entity.entity-attribute-picker.attribute");case"for":return e.hass.localize("ui.panel.config.automation.editor.triggers.type.state.for");default:return e.hass.localize("ui.panel.config.automation.editor.conditions.type.state.".concat(t.name))}}}}]}}),n.oi);function _n(e){return _n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_n(e)}function On(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sn(e,t){return Sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Sn(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Tn(e);if(t){var i=Tn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xn(this,r)}}function xn(e,t){if(t&&("object"===_n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jn(e)}function jn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tn(e){return Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tn(e)}function zn(){zn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Mn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Cn=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.condition.conditions||[],this._valueChanged,this.hass);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,{conditions:e.detail.value})})}}]}}),n.oi);function Zn(e){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zn(e)}function Un(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nn(e,t){return Nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Nn(e,t)}function qn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yn(e);if(t){var i=Yn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $n(this,r)}}function $n(e,t){if(t&&("object"===Zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wn(e)}function Wn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yn(e){return Yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Yn(e)}function Kn(){Kn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Qn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),bi=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,this.condition,r,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){switch(t.name){case"entity_id":return e.hass.localize("ui.components.entity.entity-picker.entity");case"attribute":return e.hass.localize("ui.components.entity.entity-attribute-picker.attribute");default:return e.hass.localize("ui.panel.config.automation.editor.triggers.type.numeric_state.".concat(t.name))}}}}]}}),n.oi);function Vi(e){return Vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vi(e)}function Hi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mi(e,t){return Mi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mi(e,t)}function Ri(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ii(e);if(t){var i=Ii(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Li(this,r)}}function Li(e,t){if(t&&("object"===Vi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fi(e)}function Fi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ii(e){return Ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ii(e)}function Bi(){Bi=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ni(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Ki=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),r,this.condition,this.hass,this._computeLabelCallback,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.conditions.type.sun.".concat(t.name))}}}]}}),n.oi),r(53297);function po(e){return po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},po(e)}function ho(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mo(e,t){return mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},mo(e,t)}function yo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ko(e);if(t){var i=ko(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vo(this,r)}}function vo(e,t){if(t&&("object"===po(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bo(e)}function bo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ko(e){return ko=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ko(e)}function go(){go=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Co(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n *\n
\n \n '],t||(t=e.slice(0)),fo=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass.localize("ui.panel.config.automation.editor.conditions.type.template.value_template"),"value_template",this.hass,r,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){Te(this,e)}}]}}),n.oi);function Do(e){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Do(e)}function xo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jo(e,t){return jo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},jo(e,t)}function To(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ho(e);if(t){var i=Ho(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zo(this,r)}}function zo(e,t){if(t&&("object"===Do(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vo(e)}function Vo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ho(e){return Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ho(e)}function Mo(){Mo=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Fo(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],a||(a=o.slice(0)),So=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(a)}}))),this.hass,u,l,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;this._inputModeAfter="input"===t.mode_after,this._inputModeBefore="input"===t.mode_before,delete t.mode_after,delete t.mode_before,Object.keys(t).forEach((function(e){return void 0===t[e]||""===t[e]?delete t[e]:{}})),(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.conditions.type.time.".concat(t.name))}}}]}}),n.oi);function Wo(e){return Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wo(e)}function Yo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ko(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xo(e,t){return Xo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Xo(e,t)}function Go(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=la(e);if(t){var i=la(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qo(this,r)}}function Qo(e,t){if(t&&("object"===Wo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Jo(e)}function Jo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ea(){ea=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!na(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n "])),this.hass.localize("ui.panel.config.automation.editor.conditions.type.trigger.id"),e,this._triggerPicked,this._triggers.map((function(e){return(0,n.dy)(qo||(qo=Yo(["\n "," \n "])),e.id,e.id)}))):this.hass.localize("ui.panel.config.automation.editor.conditions.type.trigger.no_triggers")}},{kind:"method",key:"_automationUpdated",value:function(e){this._triggers=null!=e&&e.trigger?L(e.trigger).filter((function(e){return e.id})):[]}},{kind:"method",key:"_triggerPicked",value:function(e){if(e.stopPropagation(),e.target.value){var t=e.target.value;this.condition.id!==t&&(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,{id:t})})}}}]}}),n.oi);var ua,da,fa=r(22311),pa=function(e){return"latitude"in e.attributes&&"longitude"in e.attributes};function ha(e){return ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ha(e)}function ma(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ya(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function va(e,t){return va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},va(e,t)}function ba(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wa(e);if(t){var i=wa(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ka(this,r)}}function ka(e,t){if(t&&("object"===ha(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ga(e)}function ga(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wa(e){return wa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wa(e)}function Ea(){Ea=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Aa(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ',"\n \n "])),this.hass.localize("ui.panel.config.automation.editor.conditions.type.zone.entity"),t,this._entityPicked,this.hass,xa,this.hass.localize("ui.panel.config.automation.editor.conditions.type.zone.zone"),r,this._zonePicked,this.hass,Ra,this.hass.localize("ui.panel.config.automation.editor.conditions.type.zone.event"))}},{kind:"method",key:"_entityPicked",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,{entity_id:e.detail.value})})}},{kind:"method",key:"_zonePicked",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,{zone:e.detail.value})})}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(da||(da=ma(["\n ha-entity-picker {\n display: block;\n margin-bottom: 24px;\n }\n "])))}}]}}),n.oi);function La(e){return La="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(e)}function Fa(e,t){return ns(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||ts(e,t)||es()}function Ia(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Za(e,t){return Za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Za(e,t)}function Ua(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$a(e);if(t){var i=$a(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Na(this,r)}}function Na(e,t){if(t&&("object"===La(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qa(e)}function qa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $a(e){return $a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$a(e)}function Wa(){Wa=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Xa(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n \n \n "])),-1===e?(0,n.dy)(za||(za=Ia(["\n ","\n "])),this.hass.localize("ui.panel.config.automation.editor.conditions.unsupported_condition","condition",this.condition.condition)):"",this.hass.localize("ui.panel.config.automation.editor.edit_yaml"),this.hass,this.condition,this._onYamlChange):(0,n.dy)(Va||(Va=Ia(["\n \n ","\n \n\n \n ","\n
\n "])),this.hass.localize("ui.panel.config.automation.editor.conditions.type_select"),this.condition.condition,this._typeChanged,this._processedTypes(this.hass.localize).map((function(e){var t=Fa(e,2),r=t[0],i=t[1];return(0,n.dy)(Ha||(Ha=Ia(["\n ","\n "])),r,i)})),(0,o.h)("ha-automation-condition-".concat(this.condition.condition),{hass:this.hass,condition:this.condition})))}},{kind:"method",key:"_typeChanged",value:function(e){var t=e.target.value;if(t){var r=customElements.get("ha-automation-condition-".concat(t));t!==this.condition.condition&&(0,a.B)(this,"value-changed",{value:Object.assign({condition:t},r.defaultConfig)})}}},{kind:"method",key:"_onYamlChange",value:function(e){e.stopPropagation(),e.detail.isValid&&(0,a.B)(this,"value-changed",{value:e.detail.value,yaml:!0})}},{kind:"field",static:!0,key:"styles",value:function(){return[g.Qx,(0,n.iv)(Ma||(Ma=Ia(["\n ha-select {\n margin-bottom: 24px;\n }\n "])))]}}]}}),n.oi);function as(e){return as="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},as(e)}function ss(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cs(e,t){return cs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},cs(e,t)}function ls(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fs(e);if(t){var i=fs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return us(this,r)}}function us(e,t){if(t&&("object"===as(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ds(e)}function ds(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fs(e)}function ps(){ps=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ys(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),is=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.action,this.hass,this._conditionChanged);var e,t}},{kind:"method",key:"_conditionChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:e.detail.value})}}]}}),n.oi);function ws(e){return ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ws(e)}var Es,Cs=new RegExp("{%|{{"),Ps=function e(t){return!!t&&("string"==typeof t?function(e){return Cs.test(e)}(t):"object"===ws(t)&&(Array.isArray(t)?t:Object.values(t)).some((function(t){return t&&e(t)})))};r(47289);function As(e){return As="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},As(e)}function _s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Os(e,t){return Os=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Os(e,t)}function Ss(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=js(e);if(t){var i=js(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ds(this,r)}}function Ds(e,t){if(t&&("object"===As(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xs(e)}function xs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function js(e){return js=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},js(e)}function Ts(){Ts=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Hs(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r"],t||(t=e.slice(0)),Es=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass.localize("ui.panel.config.automation.editor.actions.type.delay.delay"),this._timeData,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;t&&(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{delay:t})})}}]}}),n.oi);function Is(e){return Is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Is(e)}function Bs(e,t){return Bs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Bs(e,t)}function Zs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qs(e);if(t){var i=qs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Us(this,r)}}function Us(e,t){if(t&&("object"===Is(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ns(e)}function Ns(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qs(e)}function $s(){$s=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ks(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ","\n "])),t,this._devicePicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.actions.type.device_id.label"),this.action,t,this._deviceActionPicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.actions.type.device_id.action"),null!==(e=this._capabilities)&&void 0!==e&&e.extra_fields?(0,n.dy)(tc||(tc=oc(["\n \n "])),this.hass,this._extraFieldsData(this.action,this._capabilities),this._capabilities.extra_fields,this._extraFieldsComputeLabelCallback(this.hass.localize),this._extraFieldsChanged):"")}},{kind:"method",key:"firstUpdated",value:function(){this._capabilities||this._getCapabilities(),this.action&&(this._origAction=this.action)}},{kind:"method",key:"updated",value:function(e){var t=e.get("action");t&&!We(t,this.action)&&(this._deviceId=void 0,this._getCapabilities())}},{kind:"method",key:"_getCapabilities",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.action.domain){e.next=6;break}return e.next=3,t=this.hass,r=this.action,t.callWS({type:"device_automation/action/capabilities",action:r});case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=void 0;case 7:this._capabilities=e.t0;case 8:case"end":return e.stop()}var t,r}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){ic(o,n,i,a,s,"next",e)}function s(e){ic(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_devicePicked",value:function(e){e.stopPropagation(),this._deviceId=e.target.value,void 0===this._deviceId&&(0,a.B)(this,"value-changed",{value:c.defaultConfig})}},{kind:"method",key:"_deviceActionPicked",value:function(e){e.stopPropagation();var t=e.detail.value;this._origAction&&We(this._origAction,t)&&(t=this._origAction),(0,a.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_extraFieldsChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,e.detail.value)})}},{kind:"method",key:"_extraFieldsComputeLabelCallback",value:function(e){return function(t){return e("ui.panel.config.automation.editor.actions.type.device_id.extra_fields.".concat(t.name))||t.name}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(rc||(rc=oc(["\n ha-device-picker {\n display: block;\n margin-bottom: 16px;\n }\n ha-device-action-picker {\n display: block;\n }\n "])))}}]}}),n.oi),Cc=function(e,t,r){return e("component.".concat(t,".title"))||(null==r?void 0:r.name)||t},Pc=function(e,t){return e.callWS({type:"manifest/get",integration:t})};function Ac(e){return Ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ac(e)}function _c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oc(e,t){return Oc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Oc(e,t)}function Sc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jc(e);if(t){var i=jc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Dc(this,r)}}function Dc(e,t){if(t&&("object"===Ac(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xc(e)}function xc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jc(e){return jc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},jc(e)}function Tc(){Tc=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Hc(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ",'\n ',"\n"])),e.name,e.name===e.service?"":e.service)},Uc=function(e,t,r,n){var i=Tc();if(n)for(var o=0;o\n "])),this.hass,this.hass.localize("ui.components.service-picker.service"),this._filteredServices(this.hass.localize,this.hass.services,this._filter),this.value,Zc,this._filterChanged,this._valueChanged)}},{kind:"field",key:"_services",value:function(){return(0,s.Z)((function(e,t){if(!t)return[];var r=[];return Object.keys(t).sort().forEach((function(n){var i,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Fc(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(Object.keys(t[n]).sort());try{for(o.s();!(i=o.n()).done;){var a=i.value;r.push({service:"".concat(n,".").concat(a),name:"".concat(Cc(e,n),": ").concat(t[n][a].name||a)})}}catch(s){o.e(s)}finally{o.f()}})),r}))}},{kind:"field",key:"_filteredServices",value:function(){var e=this;return(0,s.Z)((function(t,r,n){if(!r)return[];var i=e._services(t,r);return n?i.filter((function(e){var t;return e.service.toLowerCase().includes(n)||(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(n))})):i}))}},{kind:"method",key:"_filterChanged",value:function(e){this._filter=e.detail.value.toLowerCase()}},{kind:"method",key:"_valueChanged",value:function(e){this.value=e.detail.value,(0,a.B)(this,"change"),(0,a.B)(this,"value-changed",{value:this.value})}}]}}),n.oi);customElements.define("ha-service-picker",Uc);var Nc,qc;r(3555);function $c(e){return $c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$c(e)}function Wc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Yc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kc(e,t){return Kc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Kc(e,t)}function Xc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Jc(e);if(t){var i=Jc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Gc(this,r)}}function Gc(e,t){if(t&&("object"===$c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Qc(e)}function Qc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jc(e){return Jc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Jc(e)}function el(){el=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!nl(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n "])),this.hass.localize("ui.panel.config.automation.editor.actions.type.event.event"),t,this._eventChanged,this.hass,this.hass.localize("ui.panel.config.automation.editor.actions.type.event.event_data"),"event_data",r,this._dataChanged)}},{kind:"method",key:"_dataChanged",value:function(e){e.stopPropagation(),e.detail.isValid&&(this._actionData=e.detail.value,pw(this,e))}},{kind:"method",key:"_eventChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{event:e.target.value})})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(qc||(qc=Wc(["\n ha-textfield {\n display: block;\n }\n "])))}}]}}),n.oi);function ll(e){return ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ll(e)}function ul(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dl(e,t){return dl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},dl(e,t)}function fl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ml(e);if(t){var i=ml(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pl(this,r)}}function pl(e,t){if(t&&("object"===ll(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hl(e)}function hl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ml(e){return ml=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ml(e)}function yl(){yl=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!kl(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","*:\n \n \n\n \n ","*:\n
\n \n\n \n ",":\n
\n \n "],t||(t=e.slice(0)),cl=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass.localize("ui.panel.config.automation.editor.actions.type.if.if"),r.if,this.hass,this._ifChanged,this.hass.localize("ui.panel.config.automation.editor.actions.type.if.then"),r.then,this._thenChanged,this.hass,this.hass.localize("ui.panel.config.automation.editor.actions.type.if.else"),r.else||[],this._elseChanged,this.hass)}},{kind:"method",key:"_ifChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{if:t})})}},{kind:"method",key:"_thenChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{then:t})})}},{kind:"method",key:"_elseChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{else:t})})}},{kind:"get",static:!0,key:"styles",value:function(){return g.Qx}}]}}),n.oi);var Pl,Al,_l,Ol,Sl,Dl,xl=r(8636),jl=r(40095),Tl=r(22814),zl=r(46749),Vl=r(11254);function Hl(e){return Hl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hl(e)}function Ml(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Rl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ll(e,t){return Ll=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ll(e,t)}function Fl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Zl(e);if(t){var i=Zl(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Il(this,r)}}function Il(e,t){if(t&&("object"===Hl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Bl(e)}function Bl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zl(e){return Zl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zl(e)}function Ul(){Ul=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!$l(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ",""])),this.hass,null===(r=this.value)||void 0===r?void 0:r.entity_id,this.label||this.hass.localize("ui.components.selectors.media.pick_media_player"),this.disabled,this.helper,this.required,this._entityChanged,m?(0,n.dy)(_l||(_l=Ml(["\n ','\n \n \n ',"\n
\n "])),this._pickMedia,this.disabled||null===(i=this.value)||void 0===i||!i.entity_id?"disabled":"",(0,xl.$)({portrait:!(null===(o=this.value)||void 0===o||null===(a=o.metadata)||void 0===a||!a.media_class)&&"portrait"===zl.Fn[this.value.metadata.children_media_class||this.value.metadata.media_class].thumbnail_ratio}),null!==(s=this.value)&&void 0!==s&&null!==(c=s.metadata)&&void 0!==c&&c.thumbnail?(0,n.dy)(Ol||(Ol=Ml(['\n \n
=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Gl=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,this._getSelectorValue(this.action),this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:{service:"media_player.play_media",target:{entity_id:e.detail.value.entity_id},data:{media_content_id:e.detail.value.media_content_id,media_content_type:e.detail.value.media_content_type},metadata:e.detail.value.metadata||{}}})}}]}}),n.oi);function gu(e){return gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gu(e)}function wu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Eu(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Cu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pu(e,t){return Pu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Pu(e,t)}function Au(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Su(e);if(t){var i=Su(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _u(this,r)}}function _u(e,t){if(t&&("object"===gu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ou(e)}function Ou(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Su(e){return Su=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Su(e)}function Du(){Du=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Tu(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n \n ","\n ","\n ","\n \n ",":\n
\n \n "])),this.hass.localize("ui.panel.config.automation.editor.actions.type.repeat.type_select"),r,this._typeChanged,Wu.map((function(t){return(0,n.dy)(mu||(mu=Eu(["\n \n ","\n \n "])),t,e.hass.localize("ui.panel.config.automation.editor.actions.type.repeat.type.".concat(t,".label")))})),"count"===r?(0,n.dy)(yu||(yu=Eu(["\n =0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ","\n ",""])),this.hass,null===(r=this._value)||void 0===r?void 0:r.service,this._serviceChanged,null==l?void 0:l.description,this._manifest?(0,n.dy)(Lu||(Lu=rd([" \n \n '])),this._manifest.is_built_in?(0,Qu.R)(this.hass,"/integrations/".concat(this._manifest.domain)):this._manifest.documentation,this.hass.localize("ui.components.service-control.integration_doc"),"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"):"",l&&"target"in l?(0,n.dy)(Fu||(Fu=rd(["\n ",'\n ','\n ',""])),this.narrow,f?(0,n.dy)(Iu||(Iu=rd(['']))):"",this.hass.localize("ui.components.service-control.target"),this.hass.localize("ui.components.service-control.target_description"),this.hass,l.target?{target:l.target}:{target:{}},this._targetChanged,null===(i=this._value)||void 0===i?void 0:i.target):d?(0,n.dy)(Bu||(Bu=rd([""])),this.hass,null===(o=this._value)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.entity_id,d.description,this._entityPicked):"",u?(0,n.dy)(Zu||(Zu=rd([""])),this.hass,this.hass.localize("ui.components.service-control.service_data"),"data",null===(s=this._value)||void 0===s?void 0:s.data,this._dataChanged):null==l?void 0:l.fields.map((function(e){var t,r,i,o,a=Cd(e);return e.selector&&(!e.advanced||c.showAdvanced||null!==(t=c._value)&&void 0!==t&&t.data&&void 0!==c._value.data[e.key])?(0,n.dy)(Uu||(Uu=rd(["\n ",'\n ','\n ',"\n \n "])),c.narrow,a?(0,n.dy)(qu||(qu=rd(["'])),e.key,c._checkedKeys.has(e.key)||(null===(r=c._value)||void 0===r?void 0:r.data)&&void 0!==c._value.data[e.key],c._checkboxChanged):f?(0,n.dy)(Nu||(Nu=rd(['']))):"",e.name||e.key,null==e?void 0:e.description,a&&!c._checkedKeys.has(e.key)&&(!(null!==(i=c._value)&&void 0!==i&&i.data)||void 0===c._value.data[e.key]),c.hass,e.selector,e.key,c._serviceDataChanged,null!==(o=c._value)&&void 0!==o&&o.data&&void 0!==c._value.data[e.key]?c._value.data[e.key]:e.default):""})))}},{kind:"method",key:"_checkboxChanged",value:function(e){var t,r=e.currentTarget.checked,n=e.currentTarget.key;if(r){var i,o,s;this._checkedKeys.add(n);var c,l=null===(i=this._getServiceInfo(null===(s=this._value)||void 0===s?void 0:s.service,this.hass.services))||void 0===i||null===(o=i.fields.find((function(e){return e.key===n})))||void 0===o?void 0:o.default;if(l)t=Object.assign({},null===(c=this._value)||void 0===c?void 0:c.data,td({},n,l))}else{var u;this._checkedKeys.delete(n),delete(t=Object.assign({},null===(u=this._value)||void 0===u?void 0:u.data))[n]}t&&(0,a.B)(this,"value-changed",{value:Object.assign({},this._value,{data:t})}),this.requestUpdate("_checkedKeys")}},{kind:"method",key:"_serviceChanged",value:function(e){var t;e.stopPropagation(),e.detail.value!==(null===(t=this._value)||void 0===t?void 0:t.service)&&(0,a.B)(this,"value-changed",{value:{service:e.detail.value||""}})}},{kind:"method",key:"_entityPicked",value:function(e){var t,r,n;e.stopPropagation();var i=e.detail.value;if((null===(t=this._value)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.entity_id)!==i){var o,s;if(!i&&null!==(n=this._value)&&void 0!==n&&n.data)delete(o=Object.assign({},this._value)).data.entity_id;else o=Object.assign({},this._value,{data:Object.assign({},null===(s=this._value)||void 0===s?void 0:s.data,{entity_id:e.detail.value})});(0,a.B)(this,"value-changed",{value:o})}}},{kind:"method",key:"_targetChanged",value:function(e){var t;e.stopPropagation();var r,n=e.detail.value;(null===(t=this._value)||void 0===t?void 0:t.target)!==n&&(n?r=Object.assign({},this._value,{target:e.detail.value}):delete(r=Object.assign({},this._value)).target,(0,a.B)(this,"value-changed",{value:r}))}},{kind:"method",key:"_serviceDataChanged",value:function(e){var t,r,n,i,o;e.stopPropagation();var s=e.currentTarget.key,c=e.detail.value;if((null===(t=this._value)||void 0===t||null===(r=t.data)||void 0===r?void 0:r[s])!==c&&(null!==(n=this._value)&&void 0!==n&&null!==(i=n.data)&&void 0!==i&&i[s]||""!==c&&void 0!==c)){var l=Object.assign({},null===(o=this._value)||void 0===o?void 0:o.data,td({},s,c));""!==c&&void 0!==c||delete l[s],(0,a.B)(this,"value-changed",{value:Object.assign({},this._value,{data:l})})}}},{kind:"method",key:"_dataChanged",value:function(e){e.stopPropagation(),e.detail.isValid&&(0,a.B)(this,"value-changed",{value:Object.assign({},this._value,{data:e.detail.value})})}},{kind:"method",key:"_fetchManifest",value:(r=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._manifest=void 0,e.prev=1,e.next=4,Pc(this.hass,t);case 4:this._manifest=e.sent,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(1);case 9:case"end":return e.stop()}}),e,this,[[1,7]])})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){ed(o,n,i,a,s,"next",e)}function s(e){ed(o,n,i,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)($u||($u=rd(["\n ha-settings-row {\n padding: var(--service-control-padding, 0 16px);\n }\n ha-settings-row {\n --paper-time-input-justify-content: flex-end;\n --settings-row-content-width: 100%;\n border-top: var(\n --service-control-items-border-top,\n 1px solid var(--divider-color)\n );\n }\n ha-service-picker,\n ha-entity-picker,\n ha-yaml-editor {\n display: block;\n margin: var(--service-control-padding, 0 16px);\n }\n ha-yaml-editor {\n padding: 16px 0;\n }\n p {\n margin: var(--service-control-padding, 0 16px);\n padding: 16px 0;\n }\n .checkbox-spacer {\n width: 32px;\n }\n ha-checkbox {\n margin-left: -16px;\n }\n .help-icon {\n color: var(--secondary-text-color);\n }\n .description {\n justify-content: space-between;\n display: flex;\n align-items: center;\n padding-right: 2px;\n }\n "])))}}]}}),n.oi);function Pd(e){return Pd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pd(e)}function Ad(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Od(e,t){return Od=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Od(e,t)}function Sd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jd(e);if(t){var i=jd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Dd(this,r)}}function Dd(e,t){if(t&&("object"===Pd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xd(e)}function xd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jd(e){return jd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},jd(e)}function Td(){Td=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Hd(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),this.narrow,this.hass,this._action,null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced,this._actionChanged)}},{kind:"method",key:"_actionChanged",value:function(e){e.detail.value===this._action&&e.stopPropagation()}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Ed||(Ed=Ad(["\n ha-service-control {\n display: block;\n margin: 0 -16px;\n }\n "])))}}]}}),n.oi);function Ud(e){return Ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ud(e)}function Nd(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function qd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $d(e,t){return $d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},$d(e,t)}function Wd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xd(e);if(t){var i=Xd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Yd(this,r)}}function Yd(e,t){if(t&&("object"===Ud(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Kd(e)}function Kd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xd(e){return Xd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xd(e)}function Gd(){Gd=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ef(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n \n "])),this.hass.localize("ui.panel.config.automation.editor.actions.type.stop.stop"),r,this._stopChanged,this.hass.localize("ui.panel.config.automation.editor.actions.type.stop.error"),null!=t&&t,this._errorChanged)}},{kind:"method",key:"_stopChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{stop:e.target.value})})}},{kind:"method",key:"_errorChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{error:e.target.checked})})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Bd||(Bd=Nd(["\n ha-textfield {\n display: block;\n margin-bottom: 24px;\n }\n "])))}}]}}),n.oi),r(83927);function sf(e){return sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sf(e)}function cf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lf(e,t){return lf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lf(e,t)}function uf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pf(e);if(t){var i=pf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return df(this,r)}}function df(e,t){if(t&&("object"===sf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ff(e)}function ff(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pf(e){return pf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pf(e)}function hf(){hf=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!vf(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),af=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),r,this.trigger,this.hass,this._computeLabelCallback,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.calendar.".concat(t.name))}}}]}}),n.oi);function Ef(e){return Ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ef(e)}function Cf(e,t){return Cf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Cf(e,t)}function Pf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Of(e);if(t){var i=Of(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Af(this,r)}}function Af(e,t){if(t&&("object"===Ef(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _f(e)}function _f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Of(e){return Of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Of(e)}function Sf(){Sf=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!jf(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ","\n "])),t,this._devicePicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.triggers.type.device.label"),this.trigger,t,this._deviceTriggerPicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.triggers.type.device.trigger"),null!==(e=this._capabilities)&&void 0!==e&&e.extra_fields?(0,n.dy)(Rf||(Rf=Bf(["\n \n "])),this.hass,this._extraFieldsData(this.trigger,this._capabilities),this._capabilities.extra_fields,this._extraFieldsComputeLabelCallback(this.hass.localize),this._extraFieldsChanged):"")}},{kind:"method",key:"firstUpdated",value:function(){this._capabilities||this._getCapabilities(),this.trigger&&(this._origTrigger=this.trigger)}},{kind:"method",key:"updated",value:function(e){if(e.has("trigger")){var t=e.get("trigger");t&&!We(t,this.trigger)&&this._getCapabilities()}}},{kind:"method",key:"_getCapabilities",value:(r=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.trigger).domain){e.next=7;break}return e.next=4,qe(this.hass,t);case 4:e.t0=e.sent,e.next=8;break;case 7:e.t0=void 0;case 8:this._capabilities=e.t0;case 9:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){If(o,n,i,a,s,"next",e)}function s(e){If(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_devicePicked",value:function(e){e.stopPropagation(),this._deviceId=e.target.value,void 0===this._deviceId&&(0,a.B)(this,"value-changed",{value:Object.assign({},c.defaultConfig,{platform:"device"})})}},{kind:"method",key:"_deviceTriggerPicked",value:function(e){e.stopPropagation();var t=e.detail.value;this._origTrigger&&We(this._origTrigger,t)&&(t=this._origTrigger),this.trigger.id&&(t.id=this.trigger.id),(0,a.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_extraFieldsChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.trigger,e.detail.value)})}},{kind:"method",key:"_extraFieldsComputeLabelCallback",value:function(e){return function(t){return e("ui.panel.config.automation.editor.triggers.type.device.extra_fields.".concat(t.name))||t.name}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(Lf||(Lf=Bf(["\n ha-device-picker {\n display: block;\n margin-bottom: 24px;\n }\n "])))}}]}}),n.oi),np=r(1460);function ip(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function op(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){ip(o,n,i,a,s,"next",e)}function s(e){ip(o,n,i,a,s,"throw",e)}a(void 0)}))}}var ap,sp,cp,lp,up=function(){var e=op(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.callWS({type:"config/auth/list"}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),dp=r(70483);function fp(e){return fp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fp(e)}function pp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function hp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mp(e,t){return mp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},mp(e,t)}function yp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sp(e);if(t){var i=Sp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vp(this,r)}}function vp(e,t){if(t&&("object"===fp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bp(e)}function bp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kp(){kp=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ep(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r '])),(0,dp.V)({backgroundImage:"url(".concat(e,")")}));var t,r=(t=this.user.name)?t.trim().split(" ").slice(0,3).map((function(e){return e.substring(0,1)})).join(""):"?";return(0,n.dy)(cp||(cp=pp(['\n ',"\n
"])),(0,xl.$)({long:r.length>2}),r)}},{kind:"method",key:"_getPersonPicture",value:function(){if(this._personEntityId=void 0,this._personPicture=void 0,this.hass&&this.user)for(var e=0,t=Object.values(this.hass.states);e=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n ","\n \n "])),this.label,this.disabled,this.value,this._userChanged,0===(null===(e=this.users)||void 0===e?void 0:e.length)?(0,n.dy)(xp||(xp=Vp(['\n ',"\n "])),this.noUserLabel||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.components.user-picker.no_user"))):"",this._sortedUsers(this.users).map((function(e){return(0,n.dy)(jp||(jp=Vp(['\n \n ',"\n \n "])),e.id,r.hass,e,e.name)})))}},{kind:"method",key:"firstUpdated",value:function(e){var t=this;Yp(Kp(r.prototype),"firstUpdated",this).call(this,e),void 0===this.users&&up(this.hass).then((function(e){t.users=e}))}},{kind:"method",key:"_userChanged",value:function(e){var t=this,r=e.target.value;r!==this.value&&(this.value=r,setTimeout((function(){(0,a.B)(t,"value-changed",{value:r}),(0,a.B)(t,"change")}),0))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Tp||(Tp=Vp(["\n :host {\n display: inline-block;\n }\n mwc-list {\n display: block;\n }\n "])))}}]}}),n.oi);function th(e){return th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},th(e)}function rh(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function nh(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){rh(o,n,i,a,s,"next",e)}function s(e){rh(o,n,i,a,s,"throw",e)}a(void 0)}))}}function ih(e){return function(e){if(Array.isArray(e))return kh(e)}(e)||gh(e)||bh(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ah(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sh(e,t){return sh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sh(e,t)}function ch(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Eh(e);if(t){var i=Eh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lh(this,r)}}function lh(e,t){if(t&&("object"===th(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return uh(e)}function uh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dh(){dh=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!hh(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),(0,np.l)([t],(function(){var r;return null===(r=e.value)||void 0===r?void 0:r.map((function(r,i){return(0,n.dy)(Qp||(Qp=oh(["\n \n \n \n >\n
\n "])),e.pickedUserLabel,e.hass.localize("ui.components.user-picker.remove_user"),i,e.hass,r,e._notSelectedUsersAndSelected(r,e.users,t),e._userChanged,r,e.hass.localize("ui.components.user-picker.remove_user"),"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",e._removeUser)}))})),this.pickUserLabel||this.hass.localize("ui.components.user-picker.add_user"),this.hass,t,!(null!=t&&t.length),this._addUser)}},{kind:"field",key:"_notSelectedUsers",value:function(){return(0,s.Z)((function(e,t){return t?null==e?void 0:e.filter((function(e){return!e.system_generated&&!t.includes(e.id)})):null==e?void 0:e.filter((function(e){return!e.system_generated}))}))}},{kind:"field",key:"_notSelectedUsersAndSelected",value:function(){return function(e,t,r){var n=null==t?void 0:t.find((function(t){return t.id===e}));return n?r?[].concat(ih(r),[n]):[n]:r}}},{kind:"get",key:"_currentUsers",value:function(){return this.value||[]}},{kind:"method",key:"_updateUsers",value:(o=nh(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.value=t,(0,a.B)(this,"value-changed",{value:t});case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{kind:"method",key:"_userChanged",value:function(e){e.stopPropagation();var t=e.currentTarget.index,r=e.detail.value,n=ih(this._currentUsers);""===r?n.splice(t,1):n.splice(t,1,r),this._updateUsers(n)}},{kind:"method",key:"_addUser",value:(r=nh(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),r=t.detail.value,t.currentTarget.value="",r){e.next=5;break}return e.abrupt("return");case 5:if(!(n=this._currentUsers).includes(r)){e.next=8;break}return e.abrupt("return");case 8:this._updateUsers([].concat(ih(n),[r]));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{kind:"method",key:"_removeUser",value:function(e){var t=e.currentTarget.userId;this._updateUsers(this._currentUsers.filter((function(e){return e!==t})))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Jp||(Jp=oh(["\n :host {\n display: block;\n }\n div {\n display: flex;\n align-items: center;\n }\n "])))}}]}}),n.oi);function Ah(e){return Ah="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ah(e)}function _h(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Oh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sh(e,t){return Sh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Sh(e,t)}function Dh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Th(e);if(t){var i=Th(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xh(this,r)}}function xh(e,t){if(t&&("object"===Ah(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jh(e)}function jh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Th(e){return Th=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Th(e)}function zh(){zh=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Mh(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Bh=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this._schema(this.hass.localize),this.trigger,this.hass,this._computeLabelCallback,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.geo_location.".concat(t.name))}}}]}}),n.oi);function om(e){return om="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},om(e)}function am(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function sm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cm(e,t){return cm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},cm(e,t)}function lm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fm(e);if(t){var i=fm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return um(this,r)}}function um(e,t){if(t&&("object"===om(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return dm(e)}function dm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fm(e){return fm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fm(e)}function pm(){pm=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ym(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),this._schema(this.hass.localize),this.trigger,this.hass,this._computeLabelCallback,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.geo_location.".concat(t.name))}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(im||(im=am(["\n label {\n display: flex;\n align-items: center;\n }\n "])))}}]}}),n.oi);function Em(e){return Em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Em(e)}function Cm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pm(e,t){return Pm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Pm(e,t)}function Am(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sm(e);if(t){var i=Sm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _m(this,r)}}function _m(e,t){if(t&&("object"===Em(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Om(e)}function Om(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sm(e){return Sm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Sm(e)}function Dm(){Dm=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Tm(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),wm=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),Lm,this.trigger,this.hass,this._computeLabelCallback,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.mqtt.".concat(t.name))}}}]}}),n.oi);function Fm(e){return Fm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fm(e)}function Im(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bm(e,t){return Bm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Bm(e,t)}function Zm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qm(e);if(t){var i=qm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Um(this,r)}}function Um(e,t){if(t&&("object"===Fm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Nm(e)}function Nm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qm(e){return qm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qm(e)}function $m(){$m=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Km(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Rm=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,i,o,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){switch(t.name){case"entity_id":return e.hass.localize("ui.components.entity.entity-picker.entity");case"attribute":return e.hass.localize("ui.components.entity.entity-attribute-picker.attribute");case"for":return e.hass.localize("ui.panel.config.automation.editor.triggers.type.state.for");default:return e.hass.localize("ui.panel.config.automation.editor.triggers.type.numeric_state.".concat(t.name))}}}}]}}),n.oi);function ty(e){return ty="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ty(e)}function ry(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ny(e,t){return ny=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ny(e,t)}function iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sy(e);if(t){var i=sy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oy(this,r)}}function oy(e,t){if(t&&("object"===ty(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ay(e)}function ay(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sy(e){return sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sy(e)}function cy(){cy=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!dy(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),ey=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,i,o,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;Object.keys(t).forEach((function(e){return void 0===t[e]||""===t[e]?delete t[e]:{}})),(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("entity_id"===t.name?"ui.components.entity.entity-picker.entity":"ui.panel.config.automation.editor.triggers.type.state.".concat(t.name))}}}]}}),n.oi);function by(e){return by="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},by(e)}function ky(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gy(e,t){return gy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},gy(e,t)}function wy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Py(e);if(t){var i=Py(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ey(this,r)}}function Ey(e,t){if(t&&("object"===by(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Cy(e)}function Cy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Py(e){return Py=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Py(e)}function Ay(){Ay=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Sy(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),yy=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),r,this.trigger,this.hass,this._computeLabelCallback,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.sun.".concat(t.name))}}}]}}),n.oi);function zy(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function Vy(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){zy(o,n,i,a,s,"next",e)}function s(e){zy(o,n,i,a,s,"throw",e)}a(void 0)}))}}var Hy,My,Ry=function(){var e=Vy(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.callWS({type:"tag/list"}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Ly(e){return Ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ly(e)}function Fy(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function Iy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zy(e,t){return Zy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Zy(e,t)}function Uy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=tv(e);if(t){var i=tv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ny(this,r)}}function Ny(e,t){if(t&&("object"===Ly(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qy(e)}function qy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $y(){$y=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ky(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n \n "])),this.hass.localize("ui.panel.config.automation.editor.triggers.type.tag.label"),0===this._tags.length,e,this._tagChanged,this._tags.map((function(e){return(0,n.dy)(My||(My=Iy(["\n \n ","\n \n "])),e.id,e.name||e.id)})))}},{kind:"method",key:"_fetchTags",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ry(this.hass);case 2:this._tags=e.sent,this._tags.sort((function(e,t){return(0,c.f)(e.name||e.id,t.name||t.id)}));case 4:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Fy(o,n,i,a,s,"next",e)}function s(e){Fy(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_tagChanged",value:function(e){(0,a.B)(this,"value-changed",{value:Object.assign({},this.trigger,{tag_id:e.target.value})})}}]}}),n.oi);function nv(e){return nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nv(e)}function iv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ov(e,t){return ov=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ov(e,t)}function av(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=lv(e);if(t){var i=lv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return sv(this,r)}}function sv(e,t){if(t&&("object"===nv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cv(e)}function cv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lv(e){return lv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},lv(e)}function uv(){uv=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!pv(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n *\n \n \n '],t||(t=e.slice(0)),rv=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass.localize("ui.panel.config.automation.editor.triggers.type.template.value_template"),"value_template",this.hass,r,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){Dk(this,e)}}]}}),n.oi);function gv(e){return gv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gv(e)}function wv(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ev(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cv(e,t){return Cv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Cv(e,t)}function Pv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ov(e);if(t){var i=Ov(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Av(this,r)}}function Av(e,t){if(t&&("object"===gv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _v(e)}function _v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ov(e){return Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ov(e)}function Sv(){Sv=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!jv(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),this.hass,o,i,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;this._inputMode="input"===t.mode,delete t.mode,Object.keys(t).forEach((function(e){return void 0===t[e]||""===t[e]?delete t[e]:{}})),(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.time.".concat(t.name))}}}]}}),n.oi);function Rv(e){return Rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rv(e)}function Lv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fv(e,t){return Fv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Fv(e,t)}function Iv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Uv(e);if(t){var i=Uv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Bv(this,r)}}function Bv(e,t){if(t&&("object"===Rv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Zv(e)}function Zv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Uv(e)}function Nv(){Nv=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Wv(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Mv=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,Qv,this.trigger,this._computeLabelCallback,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.time_pattern.".concat(t.name))}}}]}}),n.oi),r(83447));function eb(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}var tb,rb,nb=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!navigator.clipboard){e.next=9;break}return e.prev=1,e.next=4,navigator.clipboard.writeText(t);case 4:return e.abrupt("return");case 7:e.prev=7,e.t0=e.catch(1);case 9:(r=document.createElement("textarea")).value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r);case 15:case"end":return e.stop()}}),e,null,[[1,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){eb(o,n,i,a,s,"next",e)}function s(e){eb(o,n,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();function ib(e){return ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ib(e)}function ob(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function ab(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function sb(e){return function(e){if(Array.isArray(e))return wb(e)}(e)||Eb(e)||gb(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lb(e,t){return lb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lb(e,t)}function ub(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pb(e);if(t){var i=Pb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return db(this,r)}}function db(e,t){if(t&&("object"===ib(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fb(e)}function fb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pb(){pb=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!yb(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n\n \n ","\n "])),(0,u.$)(i),this.renderRipple(),this.outlined?this.renderOutline():this.renderLabel(),this.renderInput(),this.renderCharCounter(t),this.renderLineRipple(),this.renderHelperText(o,n))}},{key:"renderInput",value:function(){var e=this.label?"label":void 0,t=-1===this.minLength?void 0:this.minLength,n=-1===this.maxLength?void 0:this.maxLength,r=this.autocapitalize?this.autocapitalize:void 0;return(0,s.dy)(o||(o=d(["\n '])),(0,c.o)(e),(0,f.a)(this.value),this.rows,this.cols,this.disabled,this.placeholder,this.required,this.readOnly,(0,c.o)(t),(0,c.o)(n),(0,c.o)(""===this.name?void 0:this.name),(0,c.o)(this.inputMode),(0,c.o)(r),this.handleInputChange,this.onInputBlur)}}])&&y(t.prototype,n),i&&y(t,i),l}(a.P);(0,i.__decorate)([(0,l.IO)("textarea")],g.prototype,"formElement",void 0),(0,i.__decorate)([(0,l.Cb)({type:Number})],g.prototype,"rows",void 0),(0,i.__decorate)([(0,l.Cb)({type:Number})],g.prototype,"cols",void 0),(0,i.__decorate)([(0,l.Cb)({converter:{fromAttribute:function(e){return null!==e&&(""===e||e)},toAttribute:function(e){return"boolean"==typeof e?e?"":null:e}}})],g.prototype,"charCounter",void 0)},96791:function(e,t,n){var r;n.d(t,{W:function(){return a}});var o,i,a=(0,n(37500).iv)(r||(o=[".mdc-text-field{height:100%}.mdc-text-field__input{resize:none}"],i||(i=o.slice(0)),r=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}}))))},93117:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n".concat(w.toString().replace(":host","html"),""),document.head.appendChild(O.content);var x,k,S,P=(0,v.iv)(g||(x=["\n /* prettier-ignore */\n :host {\n /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */\n --material-shadow-elevation-2dp: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n --material-shadow-elevation-3dp: 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-4dp: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-6dp: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-8dp: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-12dp: 0 12px 16px 1px rgba(0, 0, 0, 0.14), 0 4px 22px 3px rgba(0, 0, 0, 0.12), 0 6px 7px -4px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-16dp: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-24dp: 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.4);\n }\n"],k||(k=x.slice(0)),g=Object.freeze(Object.defineProperties(x,{raw:{value:Object.freeze(k)}})))),I=document.createElement("template");I.innerHTML=""),document.head.appendChild(I.content);var C=(0,v.iv)(S||(S=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n top: 16px;\n right: 16px;\n /* TODO (@jouni): remove unnecessary multiplication after https://github.com/vaadin/vaadin-overlay/issues/90 is fixed */\n bottom: calc(1px * var(--vaadin-overlay-viewport-bottom) + 16px);\n left: 16px;\n }\n\n [part='overlay'] {\n background-color: var(--material-background-color);\n border-radius: 4px;\n box-shadow: var(--material-shadow-elevation-4dp);\n color: var(--material-body-text-color);\n font-family: var(--material-font-family);\n font-size: var(--material-body-font-size);\n font-weight: 400;\n }\n\n [part='content'] {\n padding: 8px 0;\n }\n\n [part='backdrop'] {\n opacity: 0.2;\n animation: 0.2s vaadin-overlay-backdrop-enter;\n will-change: opacity;\n }\n\n @keyframes vaadin-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n"])));(0,v.hC)("",C,{moduleId:"material-overlay"});var R,E=C;(0,v.hC)("",E,{moduleId:"material-menu-overlay"});var j,T=(0,v.iv)(R||(R=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n --_vaadin-combo-box-items-container-border-width: 8px 0;\n --_vaadin-combo-box-items-container-border-style: solid;\n --_vaadin-combo-box-items-container-border-color: transparent;\n }\n\n [part='overlay'] {\n position: relative;\n overflow: visible;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n [part='content'] {\n padding: 0;\n }\n\n :host([loading]) [part='loader'] {\n height: 2px;\n position: absolute;\n z-index: 1;\n top: -2px;\n left: 0;\n right: 0;\n background: var(--material-background-color)\n linear-gradient(\n 90deg,\n transparent 0%,\n transparent 20%,\n var(--material-primary-color) 20%,\n var(--material-primary-color) 40%,\n transparent 40%,\n transparent 60%,\n var(--material-primary-color) 60%,\n var(--material-primary-color) 80%,\n transparent 80%,\n transparent 100%\n )\n 0 0 / 400% 100% repeat-x;\n opacity: 0;\n animation: 3s linear infinite material-combo-box-loader-progress, 0.3s 0.1s both material-combo-box-loader-fade-in;\n }\n\n [part='loader']::before {\n content: '';\n display: block;\n height: 100%;\n opacity: 0.16;\n background: var(--material-primary-color);\n }\n\n @keyframes material-combo-box-loader-fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n @keyframes material-combo-box-loader-progress {\n 0% {\n background-position: 0 0;\n background-size: 300% 100%;\n }\n\n 33% {\n background-position: -100% 0;\n background-size: 400% 100%;\n }\n\n 67% {\n background-position: -200% 0;\n background-size: 250% 100%;\n }\n\n 100% {\n background-position: -300% 0;\n background-size: 300% 100%;\n }\n }\n\n /* RTL specific styles */\n\n @keyframes material-combo-box-loader-progress-rtl {\n 0% {\n background-position: 100% 0;\n background-size: 300% 100%;\n }\n\n 33% {\n background-position: 200% 0;\n background-size: 400% 100%;\n }\n\n 67% {\n background-position: 300% 0;\n background-size: 250% 100%;\n }\n\n 100% {\n background-position: 400% 0;\n background-size: 300% 100%;\n }\n }\n\n :host([loading][dir='rtl']) [part='loader'] {\n animation: 3s linear infinite material-combo-box-loader-progress-rtl,\n 0.3s 0.1s both material-combo-box-loader-fade-in;\n }\n"])));(0,v.hC)("vaadin-combo-box-overlay",[E,T],{moduleId:"material-combo-box-overlay"});var A,z=(0,v.iv)(j||(j=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n min-height: 36px;\n padding: 8px 32px 8px 10px;\n overflow: hidden;\n font-family: var(--material-font-family);\n font-size: var(--material-small-font-size);\n line-height: 24px;\n }\n\n /* It's the list-box's responsibility to add the focus style */\n :host([focused]) {\n outline: none;\n }\n\n /* Checkmark */\n [part='checkmark']::before {\n display: var(--_material-item-selected-icon-display, none);\n content: '';\n font-family: material-icons;\n font-size: 24px;\n line-height: 1;\n font-weight: 400;\n width: 24px;\n text-align: center;\n margin-right: 10px;\n color: var(--material-secondary-text-color);\n flex: none;\n }\n\n :host([selected]) [part='checkmark']::before {\n content: var(--material-icons-check);\n }\n\n @media (any-hover: hover) {\n :host(:hover:not([disabled])) {\n background-color: var(--material-secondary-background-color);\n }\n\n :host([focused]:not([disabled])) {\n background-color: var(--material-divider-color);\n }\n }\n\n /* Disabled */\n :host([disabled]) {\n color: var(--material-disabled-text-color);\n cursor: default;\n pointer-events: none;\n }\n\n /* RTL specific styles */\n :host([dir='rtl']) {\n padding: 8px 10px 8px 32px;\n }\n\n :host([dir='rtl']) [part='checkmark']::before {\n margin-right: 0;\n margin-left: 10px;\n }\n"])));(0,v.hC)("vaadin-item",z,{moduleId:"material-item"});var V=(0,v.iv)(A||(A=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n padding: 4px 10px;\n --_material-item-selected-icon-display: block;\n }\n"])));(0,v.hC)("vaadin-combo-box-item",[z,V],{moduleId:"material-combo-box-item"});var L=n(28426);function B(e,t){for(var n=0;n0?t="default":(e.scrollLeft=2,e.scrollLeft<2&&(t="negative")),document.body.removeChild(e),t}},{key:"getNormalizedScrollLeft",value:function(e,t,n){var r=n.scrollLeft;if("rtl"!==t||!e)return r;switch(e){case"negative":return n.scrollWidth-n.clientWidth+r;case"reverse":return n.scrollWidth-n.clientWidth-r}return r}},{key:"setNormalizedScrollLeft",value:function(e,t,n,r){if("rtl"===t&&e)switch(e){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+r;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-r;break;default:n.scrollLeft=r}else n.scrollLeft=r}}],(n=null)&&B(t.prototype,n),r&&B(t,r),e}();function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:e.getAttribute("dir");t?e.setAttribute("dir",t):null!=n&&e.removeAttribute("dir")},J=function(){return document.documentElement.getAttribute("dir")},Q=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}(i,e);var t,n,r,o=q(i);function i(){return N(this,i),o.apply(this,arguments)}return t=i,n=[{key:"connectedCallback",value:function(){$(W(i.prototype),"connectedCallback",this).call(this),this.hasAttribute("dir")||(this.__subscribe(),K(this,J(),null))}},{key:"attributeChangedCallback",value:function(e,t,n){if($(W(i.prototype),"attributeChangedCallback",this).call(this,e,t,n),"dir"===e){var r=J(),o=n===r&&-1===G.indexOf(this),a=!n&&t&&-1===G.indexOf(this),s=n!==r&&t===r;o||a?(this.__subscribe(),K(this,r,n)):s&&this.__subscribe(!1)}}},{key:"disconnectedCallback",value:function(){$(W(i.prototype),"disconnectedCallback",this).call(this),this.__subscribe(!1),this.removeAttribute("dir")}},{key:"_valueToNodeAttribute",value:function(e,t,n){("dir"!==n||""!==t||e.hasAttribute("dir"))&&$(W(i.prototype),"_valueToNodeAttribute",this).call(this,e,t,n)}},{key:"_attributeToProperty",value:function(e,t,n){"dir"!==e||t?$(W(i.prototype),"_attributeToProperty",this).call(this,e,t,n):this.dir=""}},{key:"__subscribe",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e?-1===G.indexOf(this)&&G.push(this):G.indexOf(this)>-1&&G.splice(G.indexOf(this),1)}},{key:"__getNormalizedScrollLeft",value:function(e){return D.getNormalizedScrollLeft(Y,this.getAttribute("dir")||"ltr",e)}},{key:"__setNormalizedScrollLeft",value:function(e,t){return D.setNormalizedScrollLeft(Y,this.getAttribute("dir")||"ltr",e,t)}}],r=[{key:"properties",get:function(){return{dir:{type:String,value:"",reflectToAttribute:!0}}}},{key:"finalize",value:function(){$(W(i),"finalize",this).call(this),Y||(Y=D.detectScrollType())}}],n&&H(t.prototype,n),r&&H(t,r),i}(e)};function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(e,t){for(var n=0;n\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n \n \n \n \n
\n '])))}},{key:"is",get:function(){return"vaadin-combo-box-item"}},{key:"properties",get:function(){return{index:Number,item:Object,label:String,selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,_oldRenderer:Function}}},{key:"observers",get:function(){return["__rendererOrItemChanged(renderer, index, item.*, selected, focused)","__updateLabel(label, renderer)"]}}],n&&te(t.prototype,n),r&&te(t,r),i}((0,v.Tb)(Q(L.H3)));customElements.define(se.is,se);var le=n(20723),ue=n(87529),ce=n(52521),fe=function(e){return e.test(navigator.userAgent)},he=function(e){return e.test(navigator.platform)},de=(fe(/Android/),fe(/Chrome/)&&/Google Inc/.test(navigator.vendor),fe(/Firefox/),he(/^iPad/)||he(/^Mac/)&&navigator.maxTouchPoints>1),pe=he(/^iPhone/)||de,ye=fe(/^((?!chrome|android).)*safari/i),ve=function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}();function be(e,t){for(var n=0;n0;if(o>=0&&t.push(r),n="slot"===r.localName?r.assignedNodes({flatten:!0}):(r.shadowRoot||r).children)for(var a=0;a0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?n.push(t.shift()):n.push(e.shift());return n.concat(e,t)}},{key:"_hasLowerTabOrder",value:function(e,t){var n=Math.max(e.tabIndex,0),r=Math.max(t.tabIndex,0);return 0===n||0===r?r>n:n>r}}],(n=null)&&be(t.prototype,n),r&&be(t,r),e}();function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function we(e,t){for(var n=0;n\n :host {\n z-index: 200;\n position: fixed;\n\n /* Despite of what the names say, is just a container\n for position/sizing/alignment. The actual overlay is the overlay part. */\n\n /* Default position constraints: the entire viewport. Note: themes can\n override this to introduce gaps between the overlay and the viewport. */\n top: 0;\n right: 0;\n bottom: var(--vaadin-overlay-viewport-bottom);\n left: 0;\n\n /* Use flexbox alignment for the overlay part. */\n display: flex;\n flex-direction: column; /* makes dropdowns sizing easier */\n /* Align to center by default. */\n align-items: center;\n justify-content: center;\n\n /* Allow centering when max-width/max-height applies. */\n margin: auto;\n\n /* The host is not clickable, only the overlay part is. */\n pointer-events: none;\n\n /* Remove tap highlight on touch devices. */\n -webkit-tap-highlight-color: transparent;\n\n /* CSS API for host */\n --vaadin-overlay-viewport-bottom: 0;\n }\n\n :host([hidden]),\n :host(:not([opened]):not([closing])) {\n display: none !important;\n }\n\n [part=\'overlay\'] {\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n pointer-events: auto;\n\n /* Prevent overflowing the host in MSIE 11 */\n max-width: 100%;\n box-sizing: border-box;\n\n -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */\n }\n\n [part=\'backdrop\'] {\n z-index: -1;\n content: \'\';\n background: rgba(0, 0, 0, 0.5);\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n pointer-events: auto;\n }\n \n\n \n \n '])))}},{key:"is",get:function(){return"vaadin-overlay"}},{key:"properties",get:function(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},instanceProps:{type:Object},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldInstanceProps:Object,_oldRenderer:Object,_oldOpened:Boolean}}},{key:"observers",get:function(){return["_templateOrRendererChanged(template, renderer, owner, model, instanceProps, opened)"]}},{key:"__attachedInstances",get:function(){return Array.from(document.body.children).filter((function(e){return e instanceof i&&!e.hasAttribute("closing")})).sort((function(e,t){return e.__zIndex-t.__zIndex||0}))}}],(n=[{key:"ready",value:function(){Oe(Ie(i.prototype),"ready",this).call(this),this._observer.flush(),this.addEventListener("click",(function(){})),this.$.backdrop.addEventListener("click",(function(){}))}},{key:"_detectIosNavbar",value:function(){if(this.opened){var e=window.innerHeight,t=window.innerWidth>e,n=document.documentElement.clientHeight;t&&n>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",n-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}}},{key:"_setTemplateFromNodes",value:function(e){this.template=e.filter((function(e){return e.localName&&"template"===e.localName}))[0]||this.template}},{key:"close",value:function(e){var t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}},{key:"connectedCallback",value:function(){Oe(Ie(i.prototype),"connectedCallback",this).call(this),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}},{key:"disconnectedCallback",value:function(){Oe(Ie(i.prototype),"disconnectedCallback",this).call(this),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}},{key:"requestContentUpdate",value:function(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}},{key:"_ironOverlayCanceled",value:function(e){e.preventDefault()}},{key:"_mouseDownListener",value:function(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}},{key:"_mouseUpListener",value:function(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}},{key:"_outsideClickListener",value:function(e){if(-1!==e.composedPath().indexOf(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(this._last){var t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},{key:"_keydownListener",value:function(e){if(this._last)if("Tab"===e.key&&this.focusTrap&&!e.defaultPrevented)this._cycleTab(e.shiftKey?-1:1),e.preventDefault();else if("Escape"===e.key||"Esc"===e.key){var t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},{key:"_ensureTemplatized",value:function(){this._setTemplateFromNodes(Array.from(this.children))}},{key:"_openedChanged",value:function(e,t){var n=this;this._instance||this._ensureTemplatized(),e?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),(0,ue.T8)(this,(function(){n.focusTrap&&!n.contains(document.activeElement)&&n._cycleTab(0,0);var e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});n.dispatchEvent(e)})),this.modeless||this._addGlobalListeners()):t&&(this._animatedClosing(),this.modeless||this._removeGlobalListeners())}},{key:"_hiddenChanged",value:function(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}},{key:"_shouldAnimate",value:function(){var e=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&e&&"none"!=e}},{key:"_enqueueAnimation",value:function(e,t){var n=this,r="__".concat(e,"Handler"),o=function e(o){o&&o.target!==n||(t(),n.removeEventListener("animationend",e),delete n[r])};this[r]=o,this.addEventListener("animationend",o)}},{key:"_flushAnimation",value:function(e){var t="__".concat(e,"Handler");"function"==typeof this[t]&&this[t]()}},{key:"_animatedOpening",value:function(){var e=this;this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening","");var t=function(){document.addEventListener("iron-overlay-canceled",e._boundIronOverlayCanceledListener),e.removeAttribute("opening")};this._shouldAnimate()?this._enqueueAnimation("opening",t):t()}},{key:"_attachOverlay",value:function(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}},{key:"_animatedClosing",value:function(){var e=this;if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){if(this._exitModalState(),this.restoreFocusOnClose&&this.__restoreFocusNode){var t=this._getActiveElement();(t===document.body||this._deepContains(t))&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null}this.setAttribute("closing","");var n=function(){document.removeEventListener("iron-overlay-canceled",e._boundIronOverlayCanceledListener),e._detachOverlay(),e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.removeAttribute("closing")};this._shouldAnimate()?this._enqueueAnimation("closing",n):n()}}},{key:"_detachOverlay",value:function(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}},{key:"_last",get:function(){return this===i.__attachedInstances.pop()}},{key:"_modelessChanged",value:function(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}},{key:"_addGlobalListeners",value:function(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0),document.addEventListener("keydown",this._boundKeydownListener)}},{key:"_enterModalState",value:function(){var e=this;"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),i.__attachedInstances.forEach((function(t){t!==e&&(t.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}},{key:"_removeGlobalListeners",value:function(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0),document.removeEventListener("keydown",this._boundKeydownListener)}},{key:"_exitModalState",value:function(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);for(var e,t=i.__attachedInstances;(e=t.pop())&&(e===this||(e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.modeless)););}},{key:"_removeOldContent",value:function(){var e=this;this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((function(t){t.parentNode===e.content&&e.content.removeChild(t)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}},{key:"_stampOverlayTemplate",value:function(e,t){this._removeOldContent(),e._Templatizer||(e._Templatizer=(0,ce.Uv)(e,this,{instanceProps:t,forwardHostProp:function(e,t){this._instance&&this._instance.forwardHostProp(e,t)}})),this._instance=new e._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);var n=e._templateRoot||(e._templateRoot=e.getRootNode());if(n!==document){this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});var r=Array.from(n.querySelectorAll("style")).reduce((function(e,t){return e+t.textContent}),"");if(r=r.replace(/:host/g,":host-nomatch")){var o=document.createElement("style");o.textContent=r,this.$.content.shadowRoot.appendChild(o),this._contentNodes.unshift(o)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}},{key:"_removeNewRendererOrTemplate",value:function(e,t,n,r){e!==t?this.template=void 0:n!==r&&(this.renderer=void 0)}},{key:"_templateOrRendererChanged",value:function(e,t,n,r,o,i){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");var a=this._oldOwner!==n||this._oldModel!==r;this._oldModel=r,this._oldOwner=n;var s=this._oldInstanceProps!==o||this._oldTemplate!==e;this._oldInstanceProps=o,this._oldTemplate=e;var l=this._oldRenderer!==t;this._oldRenderer=t;var u=this._oldOpened!==i;this._oldOpened=i,l&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),e&&s?this._stampOverlayTemplate(e,o):t&&(l||u||a)&&i&&this.requestContentUpdate()}},{key:"_isFocused",value:function(e){return e&&e.getRootNode().activeElement===e}},{key:"_focusedIndex",value:function(e){return(e=e||this._getFocusableElements()).indexOf(e.filter(this._isFocused).pop())}},{key:"_cycleTab",value:function(e,t){var n=this._getFocusableElements();void 0===t&&(t=this._focusedIndex(n)),(t+=e)>=n.length?t=0:t<0&&(t=n.length-1),n[t].focus()}},{key:"_getFocusableElements",value:function(){return me.getTabbableNodes(this.$.overlay)}},{key:"_getActiveElement",value:function(){for(var e=document.activeElement||document.body;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}},{key:"_deepContains",value:function(e){if(this.contains(e))return!0;for(var t=e,n=e.ownerDocument;t&&t!==n&&t!==this;)t=t.parentNode||t.host;return t===this}},{key:"bringToFront",value:function(){var e=this,t="",n=i.__attachedInstances.filter((function(t){return t!==e})).pop();n&&(t=n.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}])&&we(t.prototype,n),r&&we(t,r),i}((0,v.Tb)(Q(L.H3)));function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t){for(var n=0;n(o?l:s)||u>t)}},{key:"__calculatePositionInOneDimension",value:function(e,t,n,r,o,i){var a,s=i?r.start:r.end,l=i?r.end:r.start;return Ee(a={},s,parseFloat(o.style[s]||getComputedStyle(o)[s])+(t[i?r.start:r.end]-e[n===i?r.end:r.start])*(i?-1:1)+"px"),Ee(a,l,""),a}}],r=[{key:"properties",get:function(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1}}}},{key:"observers",get:function(){return["__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)","__overlayOpenedChanged(opened)"]}}],n&&je(t.prototype,n),r&&je(t,r),i}(Ce));customElements.define(Xe.is,Xe);var Ke=0,Je=0,Qe=[],Ze=0,et=!1,tt=document.createTextNode("");new window.MutationObserver((function(){et=!1;for(var e=Qe.length,t=0;t=0){if(!Qe[t])throw new Error("invalid async handle: "+e);Qe[t]=null}}};function at(e,t){for(var n=0;n=8,ht={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return(this.grid?this._physicalRows*this._rowHeight:this._physicalSize)-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var e=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,e-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this.grid&&(e-=e%this._itemsPerRow),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){(e%=this._physicalCount)<0&&(e=this._physicalCount+e),this.grid&&(e-=e%this._itemsPerRow),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){var e=this._firstVisibleIndexVal;if(null==e){var t=this._physicalTop+this._scrollOffset;e=this._iterateItems((function(e,n){return(t+=this._getPhysicalSizeIncrement(e))>this._scrollPosition?this.grid?n-n%this._itemsPerRow:n:this.grid&&this._virtualCount-1===n?n-n%this._itemsPerRow:void 0}))||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){var e=this._lastVisibleIndexVal;if(null==e){if(this.grid)e=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var t=this._physicalTop+this._scrollOffset;this._iterateItems((function(n,r){t=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;var r=Math.round(t/this._physicalAverage)*this._itemsPerRow;this._virtualStart=this._virtualStart+r,this._physicalStart=this._physicalStart+r,this._physicalTop=Math.min(Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){var o=this._getReusables(n);n?(this._physicalTop=o.physicalTop,this._virtualStart=this._virtualStart+o.indexes.length,this._physicalStart=this._physicalStart+o.indexes.length):(this._virtualStart=this._virtualStart-o.indexes.length,this._physicalStart=this._physicalStart-o.indexes.length),this._update(o.indexes,n?null:o.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),it)}},_getReusables:function(e){var t,n,r,o=[],i=this._hiddenContentSize*this._ratio,a=this._virtualStart,s=this._virtualEnd,l=this._physicalCount,u=this._physicalTop+this._scrollOffset,c=this._physicalBottom+this._scrollOffset,f=this._scrollPosition,h=this._scrollBottom;for(e?(t=this._physicalStart,this._physicalEnd,n=f-u):(t=this._physicalEnd,this._physicalStart,n=c-h);n-=r=this._getPhysicalSizeIncrement(t),!(o.length>=l||n<=i);)if(e){if(s+o.length+1>=this._virtualCount)break;if(u+r>=f-this._scrollOffset)break;o.push(t),u+=r,t=(t+1)%l}else{if(a-o.length<=0)break;if(u+this._physicalSize-r<=h)break;o.push(t),u-=r,t=0===t?l-1:t-1}return{indexes:o,physicalTop:u-this._scrollOffset}},_update:function(e,t){if(!(e&&0===e.length||0===this._physicalCount)){if(this._manageFocus(),this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){var n=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(n)}this._positionItems(),this._updateScrollerSize()}},_isClientFull:function(){return 0!=this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){var t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart);if(t=this._convertIndexToCompleteRow(t),this.grid){var n=t%this._itemsPerRow;n&&t-n<=this._physicalCount&&(t+=this._itemsPerRow),t-=n}var r=t-this._physicalCount,o=Math.round(.5*this._physicalCount);if(!(r<0)){if(r>0){var i=window.performance.now();[].push.apply(this._physicalItems,this._createPool(r));for(var a=0;athis._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)=this._virtualCount-1||0===o||(this._isClientFull()?this._physicalSize0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_gridChanged:function(e,t){void 0!==t&&(this.notifyResize(),ut(),e&&this._updateGridMetrics())},_itemsChanged:function(e){if("items"===e.path)this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render,rt);else if("items.splices"===e.path){if(this._adjustVirtualIndex(e.value.indexSplices),this._virtualCount=this.items?this.items.length:0,e.value.indexSplices.some((function(e){return e.addedCount>0||e.removed.length>0}))){var t=this._getActiveElement();this.contains(t)&&t.blur()}var n=e.value.indexSplices.some((function(e){return e.index+e.addedCount>=this._virtualStart&&e.index<=this._virtualEnd}),this);this._isClientFull()&&!n||this._debounce("_render",this._render,rt)}else"items.length"!==e.path&&this._forwardItemPath(e.path,e.value)},_iterateItems:function(e,t){var n,r,o,i;if(2===arguments.length&&t){for(i=0;i=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_updateMetrics:function(e){ut();var t=0,n=0,r=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((function(e,r){n+=this._physicalSizes[e],this._physicalSizes[e]=this._physicalItems[e].offsetHeight,t+=this._physicalSizes[e],this._physicalAverageCount+=this._physicalSizes[e]?1:0}),e),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(n=1===this._itemsPerRow?n:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+t-n,this._itemsPerRow=1),this._physicalAverageCount!==r&&(this._physicalAverage=Math.round((o*r+t)/this._physicalAverageCount))},_updateGridMetrics:function(){this._itemWidth=this._physicalCount>0?this._physicalItems[0].getBoundingClientRect().width:200,this._rowHeight=this._physicalCount>0?this._physicalItems[0].offsetHeight:200,this._itemsPerRow=this._itemWidth?Math.floor(this._viewportWidth/this._itemWidth):this._itemsPerRow},_positionItems:function(){this._adjustScrollPosition();var e=this._physicalTop;if(this.grid){var t=this._itemsPerRow*this._itemWidth,n=(this._viewportWidth-t)/2;this._iterateItems((function(t,r){var o=r%this._itemsPerRow,i=Math.floor(o*this._itemWidth+n);this._isRTL&&(i*=-1),this.translate3d(i+"px",e+"px",0,this._physicalItems[t]),this._shouldRenderNextRow(r)&&(e+=this._rowHeight)}))}else{var r=[];this._iterateItems((function(t,n){var o=this._physicalItems[t];this.translate3d(0,e+"px",0,o),e+=this._physicalSizes[t];var i=o.id;i&&r.push(i)})),r.length&&this.setAttribute("aria-owns",r.join(" "))}},_getPhysicalSizeIncrement:function(e){return this.grid?this._computeVidx(e)%this._itemsPerRow!=this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[e]},_shouldRenderNextRow:function(e){return e%this._itemsPerRow==this._itemsPerRow-1},_adjustScrollPosition:function(){var e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop=this._physicalTop-e;var t=this._scrollPosition;!ft&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,((e=(e=(e=e||0===this._scrollHeight)||this._scrollPosition>=this._estScrollHeight-this._physicalSize)||this.grid&&this.$.items.style.height=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToIndex:function(e){if(!("number"!=typeof e||e<0||e>this.items.length-1)&&(ut(),0!==this._physicalCount)){e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=this.grid?e-2*this._itemsPerRow:e-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var t=this._physicalStart,n=this._virtualStart,r=0,o=this._hiddenContentSize;n=this._virtualStart&&e<=this._virtualEnd},_isIndexVisible:function(e){return e>=this.firstVisibleIndex&&e<=this.lastVisibleIndex},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp:function(e,t,n){return Math.min(n,Math.max(t,e))},_debounce:function(e,t,n){var r;this._debouncers=this._debouncers||{},this._debouncers[e]=st.debounce(this._debouncers[e],n,t.bind(this)),r=this._debouncers[e],lt.add(r)}};function dt(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size-1;this.__getVisibleElements().forEach((function(r){r.__virtualIndex>=t&&r.__virtualIndex<=n&&e.__updateElement(r,r.__virtualIndex,!0)}))}},{key:"__updateElement",value:function(e,t,n){e.style.minHeight&&(e.style.minHeight=""),this.__preventElementUpdates||e.__lastUpdatedIndex===t&&!n||(this.updateElement(e,t),e.__lastUpdatedIndex=t),0===e.offsetHeight&&(e.style.minHeight="200px")}},{key:"__getIndexScrollOffset",value:function(e){var t=this.__getVisibleElements().find((function(t){return t.__virtualIndex===e}));return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}},{key:"size",get:function(){return this.__size},set:function(e){var t=this;if(e!==this.size){var n,r;if(this.__preventElementUpdates=!0,e>0&&(n=this.adjustedFirstVisibleIndex,r=this.__getIndexScrollOffset(n)),this.__size=e,ut(),this._itemsChanged({path:"items"}),ut(),e>0){n=Math.min(n,e-1),this.scrollToIndex(n);var o=this.__getIndexScrollOffset(n);void 0!==r&&void 0!==o&&(this._scrollTop+=r-o)}this.elementsContainer.children.length||requestAnimationFrame((function(){return t._resizeHandler()})),this.__preventElementUpdates=!1,this._resizeHandler(),ut()}}},{key:"_scrollTop",get:function(){return this.scrollTarget.scrollTop},set:function(e){this.scrollTarget.scrollTop=e}},{key:"items",get:function(){return{length:Math.min(this.size,1e5)}}},{key:"offsetHeight",get:function(){return this.scrollTarget.offsetHeight}},{key:"$",get:function(){return{items:this.scrollContainer}}},{key:"updateViewportBoundaries",value:function(){var e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean("rtl"===e.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}},{key:"setAttribute",value:function(){}},{key:"_createPool",value:function(e){var t=this,n=this.createElements(e),r=document.createDocumentFragment();return n.forEach((function(e){e.style.position="absolute",r.appendChild(e),t.__resizeObserver.observe(e)})),this.elementsContainer.appendChild(r),n}},{key:"_assignModels",value:function(e){var t=this;this._iterateItems((function(e,n){var r=t._physicalItems[e];r.hidden=n>=t.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=n+(t._vidxOffset||0),t.__updateElement(r,r.__virtualIndex))}),e)}},{key:"_isClientFull",value:function(){var t=this;return setTimeout((function(){return t.__clientFull=!0})),this.__clientFull||pt(yt(e.prototype),"_isClientFull",this).call(this)}},{key:"translate3d",value:function(e,t,n,r){r.style.transform="translateY(".concat(t,")")}},{key:"toggleScrollListener",value:function(){}},{key:"_scrollHandler",value:function(){var t=this;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0)),pt(yt(e.prototype),"_scrollHandler",this).call(this),this.reorderElements&&(this.__scrollReorderDebouncer=st.debounce(this.__scrollReorderDebouncer,nt(this.timeouts.SCROLL_REORDER),(function(){return t.__reorderElements()}))),this.__previousScrollTop=this._scrollTop}},{key:"__onWheel",value:function(e){var t=this;if(!e.ctrlKey&&!this._hasScrolledAncestor(e.target,e.deltaX,e.deltaY)){var n=e.deltaY;if(e.deltaMode===WheelEvent.DOM_DELTA_LINE?n*=this._scrollLineHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._scrollPageHeight),this._deltaYAcc=this._deltaYAcc||0,this._wheelAnimationFrame)return this._deltaYAcc+=n,void e.preventDefault();n+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=st.debounce(this.__debouncerWheelAnimationFrame,rt,(function(){return t._wheelAnimationFrame=!1}));var r=Math.abs(e.deltaX)+Math.abs(n);this._canScroll(this.scrollTarget,e.deltaX,n)?(e.preventDefault(),this.scrollTarget.scrollTop+=n,this.scrollTarget.scrollLeft+=e.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=st.debounce(this._debouncerIgnoreNewWheel,nt(this.timeouts.IGNORE_WHEEL),(function(){return t._ignoreNewWheel=!1}))):this._hasResidualMomentum&&r<=this._previousMomentum||this._ignoreNewWheel?e.preventDefault():r>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=r}}},{key:"_hasScrolledAncestor",value:function(e,t,n){return e!==this.scrollTarget&&e!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(e,t,n)||-1===["auto","scroll"].indexOf(getComputedStyle(e).overflow))||(e!==this&&e.parentElement?this._hasScrolledAncestor(e.parentElement,t,n):void 0))}},{key:"_canScroll",value:function(e,t,n){return n>0&&e.scrollTop0||t>0&&e.scrollLeft0}},{key:"_getScrollLineHeight",value:function(){var e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);var t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}},{key:"__getVisibleElements",value:function(){return Array.from(this.elementsContainer.children).filter((function(e){return!e.hidden}))}},{key:"__reorderElements",value:function(){var e=this;if(this.__mouseDown)this.__pendingReorder=!0;else{this.__pendingReorder=!1;var t=this._virtualStart+(this._vidxOffset||0),n=this.__getVisibleElements(),r=n.find((function(t){return t.contains(e.elementsContainer.getRootNode().activeElement)||t.contains(e.scrollTarget.getRootNode().activeElement)}))||n[0];if(r){var o=r.__virtualIndex-t,i=n.indexOf(r)-o;if(i>0)for(var a=0;a=this.size)this._vidxOffset=0;else{if(this.__skipNextVirtualIndexAdjust)return void(this.__skipNextVirtualIndexAdjust=!1);if(Math.abs(t)>1e4){var n=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight),r=n*this.size;this._vidxOffset=Math.round(r-n*this._virtualCount)}else{var o=this._vidxOffset;0===this._scrollTop?(this._vidxOffset=0,o!==this._vidxOffset&&pt(yt(e.prototype),"scrollToIndex",this).call(this,0)):this.firstVisibleIndex<1e3&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,100),pt(yt(e.prototype),"scrollToIndex",this).call(this,this.firstVisibleIndex+(o-this._vidxOffset)));var i=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=i,o!==this._vidxOffset&&pt(yt(e.prototype),"scrollToIndex",this).call(this,this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-1e3&&this._vidxOffset0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size-1;this.__adapter.update(e,t)}},{key:"flush",value:function(){this.__adapter.flush()}},{key:"firstVisibleIndex",get:function(){return this.__adapter.adjustedFirstVisibleIndex}},{key:"lastVisibleIndex",get:function(){return this.__adapter.adjustedLastVisibleIndex}}],n&&_t(t.prototype,n),r&&_t(t,r),e}();function gt(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0){var n=this._visibleItemsCount(),r=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),r=e-n+1):e>this.__virtualizer.firstVisibleIndex&&(r=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,r));var o=kt(this.children).find((function(e){return!e.hidden&&e.index===t.__virtualizer.lastVisibleIndex}));if(o&&e===o.index){var i=o.getBoundingClientRect(),a=this.getBoundingClientRect(),s=i.bottom-a.bottom+this._viewportTotalPaddingBottom;s>0&&(this.scrollTop+=s)}}}},{key:"__getAriaRole",value:function(e){return void 0!==e&&"option"}},{key:"__getAriaSelected",value:function(e,t){return this.__isItemFocused(e,t).toString()}},{key:"__isItemFocused",value:function(e,t){return e==t}},{key:"__isItemSelected",value:function(e,t,n){return!(e instanceof Ot)&&(n&&void 0!==e&&void 0!==t?this.get(n,e)===this.get(n,t):e===t)}},{key:"__itemsChanged",value:function(e){this.__virtualizer&&e&&(this.__virtualizer.size=e.length,this.__virtualizer.flush(),this.setAttribute("aria-setsize",e.length),this.requestContentUpdate())}},{key:"__loadingChanged",value:function(e){var t=this;this.__virtualizer&&!e&&setTimeout((function(){return t.requestContentUpdate()}))}},{key:"__focusedIndexChanged",value:function(e){this.__virtualizer&&e>=0&&(this.requestContentUpdate(),this.scrollIntoView(e))}},{key:"__rendererChanged",value:function(e,t){(e||t)&&this.requestContentUpdate()}},{key:"__createElements",value:function(e){var t=this;return kt(Array(e)).map((function(){var e=document.createElement("".concat(t.__hostTagName,"-item"));return e.addEventListener("click",t.__boundOnItemClick),e.tabIndex="-1",e.style.width="100%",e}))}},{key:"__updateElement",value:function(e,t){var n=this.items[t],r=this.focusedIndex;e.setProperties({item:n,index:this.__requestItemByIndex(n,t),label:this.getItemLabel(n),selected:this.__isItemSelected(n,this.selectedItem,this.itemIdPath),renderer:this.renderer,focused:this.__isItemFocused(r,t)}),e.id="".concat(this.__hostTagName,"-item-").concat(t),e.setAttribute("role",this.__getAriaRole(t)),e.setAttribute("aria-selected",this.__getAriaSelected(r,t)),e.setAttribute("aria-posinset",t+1),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme")}},{key:"__onItemClick",value:function(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}},{key:"__patchWheelOverScrolling",value:function(){var e=this;this.$.selector.addEventListener("wheel",(function(t){var n=0===e.scrollTop,r=e.scrollHeight-e.scrollTop-e.clientHeight<=1;(n&&t.deltaY<0||r&&t.deltaY>0)&&t.preventDefault()}))}},{key:"_viewportTotalPaddingBottom",get:function(){if(void 0===this._cachedViewportTotalPaddingBottom){var e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map((function(e){return parseInt(e,10)})).reduce((function(e,t){return e+t}))}return this._cachedViewportTotalPaddingBottom}},{key:"__requestItemByIndex",value:function(e,t){return e instanceof Ot&&void 0!==t&&this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t,currentScrollerPos:this._oldScrollerPosition}})),t}},{key:"_visibleItemsCount",value:function(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}],r=[{key:"is",get:function(){return"vaadin-combo-box-scroller"}},{key:"template",get:function(){return(0,L.dy)(wt||(wt=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n \n \n \n
\n "])))}},{key:"properties",get:function(){return{items:{type:Array,observer:"__itemsChanged"},focusedIndex:{type:Number,observer:"__focusedIndexChanged"},loading:{type:Boolean,observer:"__loadingChanged"},opened:{type:Boolean,observer:"__openedChanged"},selectedItem:{type:Object},itemIdPath:{type:String},comboBox:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,observer:"__rendererChanged"},theme:{type:String}}}}],n&&Pt(t.prototype,n),r&&Pt(t,r),i}(L.H3);customElements.define(At.is,At);n(48175);var zt,Vt=n(87156),Lt=n(74460),Bt=new Set,Dt={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(Bt.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():Lt.my||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=(0,Vt.vz)(e).rootTarget;t!==this&&(t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function t(){document.removeEventListener("readystatechange",t),e()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(e){e!==this&&e._findParent()}),this):(Bt.forEach((function(e){e!==this&&e._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?Bt.delete(this):Bt.add(this)}};function Mt(e){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}function Nt(e,t){for(var n=0;n=0)return this._items[e]}},{key:"indexOfLabel",value:function(e){if(this._items&&e)for(var t=0;t\n '])))}},{key:"properties",get:function(){return{opened:Boolean,positionTarget:{type:Object,observer:"_positionTargetChanged"},renderer:Function,loading:{type:Boolean,value:!1,reflectToAttribute:!0},theme:String,_selectedItem:{type:Object},_items:{type:Array},_focusedIndex:{type:Number,value:-1},focusedItem:{type:String,computed:"_getFocusedItem(_focusedIndex)"},_itemLabelPath:{type:String,value:"label"},_itemValuePath:{type:String,value:"value"},_scroller:Object,_itemIdPath:String,_overlayOpened:{type:Boolean,observer:"_openedChanged"}}}},{key:"observers",get:function(){return["_openedOrItemsChanged(opened, _items, loading)","__updateScroller(_scroller, _items, opened, loading, _selectedItem, _itemIdPath, _focusedIndex, renderer, theme)"]}}],n&&Nt(t.prototype,n),r&&Nt(t,r),i}((0,n(33367).P)(Dt,L.H3));customElements.define(Wt.is,Wt);var Yt=n(67130);function Gt(e){return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gt(e)}function Xt(e){return function(e){if(Array.isArray(e))return Kt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n :host([opened]) {\n pointer-events: auto;\n }\n \n\n \n\n \n '])))}},{key:"properties",get:function(){return{attrForValue:{type:String,value:"value"}}}}],(n=[{key:"clearElement",get:function(){return this.querySelector(".clear-button")}},{key:"ready",value:function(){Wn(Kn(i.prototype),"ready",this).call(this),this._toggleElement=this.querySelector(".toggle-button")}},{key:"connectedCallback",value:function(){Wn(Kn(i.prototype),"connectedCallback",this).call(this),this._setInputElement(this.querySelector("vaadin-text-field,.input")),this._revertInputValue()}},{key:"checkValidity",value:function(){return this.inputElement.validate?this.inputElement.validate():Wn(Kn(i.prototype),"checkValidity",this).call(this)}},{key:"_propertyForValue",get:function(){return(0,Yt.z)(this.attrForValue)}},{key:"_isClearButton",value:function(e){return Wn(Kn(i.prototype),"_isClearButton",this).call(this,e)||"input"===e.type&&!e.isTrusted||"clear-button"===e.composedPath()[0].getAttribute("part")}},{key:"_onChange",value:function(e){Wn(Kn(i.prototype),"_onChange",this).call(this,e),this._isClearButton(e)&&this._clear()}}])&&Un(t.prototype,n),r&&Un(t,r),i}(function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&en(e,t)}(i,e);var t,n,r,o=tn(i);function i(){return Jt(this,i),o.apply(this,arguments)}return t=i,n=[{key:"_dataProviderClearFilter",value:function(e,t,n){!e||this.loading||!this.filter||t&&this.autoOpenDisabled&&n===this.filter||(this.size=void 0,this._pendingRequests={},this.filter="",this.clearCache())}},{key:"ready",value:function(){var e=this;Zt(rn(i.prototype),"ready",this).call(this),this.clearCache(),this.$.dropdown.addEventListener("index-requested",(function(t){var n=t.detail.index,r=t.detail.currentScrollerPos,o=Math.floor(1.5*e.pageSize);if(!e._shouldSkipIndex(n,o,r)&&void 0!==n){var i=e._getPageForIndex(n);e._shouldLoadPage(i)&&e._loadPage(i)}}))}},{key:"_dataProviderFilterChanged",value:function(){this._shouldFetchData()&&(this.size=void 0,this._pendingRequests={},this.clearCache())}},{key:"_shouldFetchData",value:function(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}},{key:"_ensureFirstPage",value:function(e){e&&this._shouldLoadPage(0)&&this._loadPage(0)}},{key:"_shouldSkipIndex",value:function(e,t,n){return 0!==n&&e>=n-t&&e<=n+t}},{key:"_shouldLoadPage",value:function(e){if(!this.filteredItems||this._forceNextRequest)return this._forceNextRequest=!1,!0;var t=this.filteredItems[e*this.pageSize];return void 0!==t?t instanceof Ot:void 0===this.size}},{key:"_loadPage",value:function(e){var t=this;if(!this._pendingRequests[e]&&this.dataProvider){this.loading=!0;var n={page:e,pageSize:this.pageSize,filter:this.filter},r=function r(o,i){if(t._pendingRequests[e]===r){if(t.filteredItems)t.splice.apply(t,["filteredItems",n.page*n.pageSize,o.length].concat(Xt(o)));else{var a=[];a.splice.apply(a,[n.page*n.pageSize,o.length].concat(Xt(o))),t.filteredItems=a}t._isValidValue(t.value)&&t._getItemValue(t.selectedItem)!==t.value&&t._selectItemForValue(t.value),t.opened||t.hasAttribute("focused")||t._commitValue(),t.size=i,delete t._pendingRequests[e],0===Object.keys(t._pendingRequests).length&&(t.loading=!1)}};this._pendingRequests[e]||(this._pendingRequests[e]=r,this.dataProvider(n,r))}}},{key:"_getPageForIndex",value:function(e){return Math.floor(e/this.pageSize)}},{key:"clearCache",value:function(){if(this.dataProvider){this._pendingRequests={};for(var e=[],t=0;t<(this.size||0);t++)e.push(this.__placeHolder);this.filteredItems=e,this._shouldFetchData()?this._loadPage(0):this._forceNextRequest=!0}}},{key:"_sizeChanged",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(this.filteredItems||[]).slice(0,e),n=0;n 0");this.clearCache()}},{key:"_dataProviderChanged",value:function(e,t){var n=this;this._ensureItemsOrDataProvider((function(){n.dataProvider=t}))}},{key:"_ensureItemsOrDataProvider",value:function(e){if(void 0!==this.items&&void 0!==this.dataProvider)throw e(),new Error("Using `items` and `dataProvider` together is not supported");this.dataProvider&&!this.filteredItems&&(this.filteredItems=[])}},{key:"_warnDataProviderValue",value:function(e,t){if(e&&""!==t&&(void 0===this.selectedItem||null===this.selectedItem)){var n=this._indexOfValue(t,this.filteredItems);(n<0||!this._getItemLabel(this.filteredItems[n]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}},{key:"_flushPendingRequests",value:function(e){if(this._pendingRequests)for(var t=Math.ceil(e/this.pageSize),n=Object.keys(this._pendingRequests),r=0;r=t&&this._pendingRequests[o]([],e)}}}],r=[{key:"properties",get:function(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},size:{type:Number,observer:"_sizeChanged"},dataProvider:{type:Object,observer:"_dataProviderChanged"},_pendingRequests:{value:function(){return{}}},__placeHolder:{value:new Ot}}}},{key:"observers",get:function(){return["_dataProviderFilterChanged(filter, dataProvider)","_dataProviderClearFilter(dataProvider, opened, value)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}}],n&&Qt(t.prototype,n),r&&Qt(t,r),i}(e)}((Jn=(0,v.Tb)(L.H3),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bn(e,t)}(i,e);var t,n,r,o=Dn(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this))._boundOnFocusout=e._onFocusout.bind(Nn(e)),e._boundOverlaySelectedItemChanged=e._overlaySelectedItemChanged.bind(Nn(e)),e._boundOnClearButtonMouseDown=e.__onClearButtonMouseDown.bind(Nn(e)),e._boundClose=e.close.bind(Nn(e)),e._boundOnOpened=e._onOpened.bind(Nn(e)),e._boundOnClick=e._onClick.bind(Nn(e)),e._boundOnOverlayTouchAction=e._onOverlayTouchAction.bind(Nn(e)),e._boundOnTouchend=e._onTouchend.bind(Nn(e)),e}return t=i,n=[{key:"_inputElementValue",get:function(){return this.inputElement?this.inputElement[this._propertyForValue]:void 0},set:function(e){this.inputElement&&(this.inputElement[this._propertyForValue]=e)}},{key:"_inputElementChanged",value:function(e){Ln(Hn(i.prototype),"_inputElementChanged",this).call(this,e),e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}},{key:"ready",value:function(){var e=this;Ln(Hn(i.prototype),"ready",this).call(this),this.addEventListener("focusout",this._boundOnFocusout),this._lastCommittedValue=this.value,this.$.dropdown.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this.addEventListener("vaadin-combo-box-dropdown-closed",this._boundClose),this.addEventListener("vaadin-combo-box-dropdown-opened",this._boundOnOpened),this.addEventListener("click",this._boundOnClick),this.$.dropdown.addEventListener("vaadin-overlay-touch-action",this._boundOnOverlayTouchAction),this.addEventListener("touchend",this._boundOnTouchend);var t,n=function(){requestAnimationFrame((function(){e.$.dropdown.$.overlay.bringToFront()}))};this.addEventListener("mousedown",n),this.addEventListener("touchstart",n),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn("WARNING: inside <".concat(t.localName,"> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility."))}},{key:"requestContentUpdate",value:function(){this.$.dropdown._scroller&&(this.$.dropdown._scroller.requestContentUpdate(),this._getItemElements().forEach((function(e){e.requestContentUpdate()})))}},{key:"open",value:function(){this.disabled||this.readonly||(this.opened=!0)}},{key:"close",value:function(){this.opened=!1}},{key:"_focusedIndexChanged",value:function(e,t){void 0!==t&&this._updateActiveDescendant(e)}},{key:"_updateActiveDescendant",value:function(e){var t=this.inputElement;if(t){var n=this._getItemElements().find((function(t){return t.index===e}));n?t.setAttribute("aria-activedescendant",n.id):t.removeAttribute("aria-activedescendant")}}},{key:"_openedChanged",value:function(e,t){if(void 0!==t){e?(this._openedWithFocusRing=this.hasAttribute("focus-ring"),this.hasAttribute("focused")||ve||this.focus()):(this._onClosed(),this._openedWithFocusRing&&this.hasAttribute("focused")&&this.setAttribute("focus-ring",""));var n=this.inputElement;n&&(n.setAttribute("aria-expanded",!!e),e?n.setAttribute("aria-controls",this.$.dropdown.scrollerId):n.removeAttribute("aria-controls"))}}},{key:"_onOverlayTouchAction",value:function(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}},{key:"_isClearButton",value:function(e){return e.composedPath()[0]===this.clearElement}},{key:"_handleClearButtonClick",value:function(e){e.preventDefault(),this._clear(),this.opened&&this.requestContentUpdate()}},{key:"_onClick",value:function(e){this._closeOnBlurIsPrevented=!0;var t=e.composedPath();this._isClearButton(e)?this._handleClearButtonClick(e):t.indexOf(this._toggleElement)>-1?this.opened?this.close():this.open():this.autoOpenDisabled||this.open(),this._closeOnBlurIsPrevented=!1}},{key:"_onKeyDown",value:function(e){40===e.keyCode?(this._closeOnBlurIsPrevented=!0,this._onArrowDown(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):38===e.keyCode?(this._closeOnBlurIsPrevented=!0,this._onArrowUp(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):13===e.keyCode?this._onEnter(e):27===e.keyCode&&this._onEscape(e)}},{key:"_getItemLabel",value:function(e){return this.$.dropdown.getItemLabel(e)}},{key:"_getItemValue",value:function(e){var t=e&&this.itemValuePath?this.get(this.itemValuePath,e):void 0;return void 0===t&&(t=e?e.toString():""),t}},{key:"_onArrowDown",value:function(){if(this.opened){var e=this._getOverlayItems();e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}},{key:"_onArrowUp",value:function(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{var e=this._getOverlayItems();e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}},{key:"_prefillFocusedItemLabel",value:function(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this.$.dropdown.focusedItem),this._markAllSelectionRange())}},{key:"_setSelectionRange",value:function(e,t){this.hasAttribute("focused")&&this.inputElement.setSelectionRange(e,t)}},{key:"_markAllSelectionRange",value:function(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}},{key:"_clearSelectionRange",value:function(){if(void 0!==this._inputElementValue){var e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}},{key:"_closeOrCommit",value:function(){this.opened||this.loading?this.close():this._commitValue()}},{key:"_onEnter",value:function(e){(this.opened||this.autoOpenDisabled)&&(this.allowCustomValue||""===this._inputElementValue||this._focusedIndex>-1)&&(this._closeOrCommit(),e.preventDefault(),e.stopPropagation())}},{key:"_onEscape",value:function(e){this.autoOpenDisabled?this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.clearButtonVisible&&!this.opened&&this.value&&(e.stopPropagation(),this._clear()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(e.stopPropagation(),this._clear())}},{key:"_toggleElementChanged",value:function(e){var t=this;e&&(e.addEventListener("mousedown",(function(e){return e.preventDefault()})),e.addEventListener("click",(function(){ve&&!t.hasAttribute("focused")&&document.activeElement.blur()})))}},{key:"_clear",value:function(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}},{key:"cancel",value:function(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}},{key:"_onOpened",value:function(){var e=this;setTimeout((function(){return e._resizeDropdown()}),1),requestAnimationFrame((function(){e.$.dropdown.adjustScrollPosition(),e._updateActiveDescendant(e._focusedIndex)})),this._lastCommittedValue=this.value}},{key:"_onClosed",value:function(){this.opened&&this.close(),this.loading&&!this.allowCustomValue||this._commitValue()}},{key:"_commitValue",value:function(){var e=this,t=this._getOverlayItems();if(t&&this._focusedIndex>-1){var n=t[this._focusedIndex];this.selectedItem!==n&&(this.selectedItem=n),this._inputElementValue=this._getItemLabel(this.selectedItem)}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{var r=function(e){return e&&e.toLowerCase&&e.toLowerCase()},o=[].concat(An(this.filteredItems||[]),[this.selectedItem]).find((function(t){return r(e._getItemLabel(t))===r(e._inputElementValue)}));if(this.allowCustomValue&&!o){var i=new CustomEvent("custom-value-set",{detail:this._inputElementValue,composed:!0,cancelable:!0,bubbles:!0});if(this.dispatchEvent(i),!i.defaultPrevented){var a=this._inputElementValue;this._selectItemForValue(a),this.value=a}}else this.allowCustomValue||this.opened||!o?this._inputElementValue=this.selectedItem?this._getItemLabel(this.selectedItem):this.value||"":this.value=this._getItemValue(o)}this._detectAndDispatchChange(),this._clearSelectionRange(),this.dataProvider||(this.filter="")}},{key:"_propertyForValue",get:function(){return"value"}},{key:"_onInput",value:function(e){this.opened||this._isClearButton(e)||this.autoOpenDisabled||this.open();var t=this._inputElementValue;this.filter===t?this._filterChanged(this.filter,this.itemValuePath,this.itemLabelPath):this.filter=t}},{key:"_onChange",value:function(e){e.stopPropagation()}},{key:"_itemLabelPathChanged",value:function(e){"string"!=typeof e&&console.error("You should set itemLabelPath to a valid string")}},{key:"_filterChanged",value:function(e,t,n){void 0!==e&&(this.$.dropdown._scrollIntoView(0),this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged({path:"filteredItems",value:this.filteredItems},t,n))}},{key:"_loadingChanged",value:function(e){e&&(this._focusedIndex=-1)}},{key:"_revertInputValue",value:function(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}},{key:"_revertInputValueToValue",value:function(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}},{key:"_resizeDropdown",value:function(){this.$.dropdown.notifyResize()}},{key:"_selectedItemChanged",value:function(e){if(null==e)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(""!==this.value),this._inputElementValue=this.value);else{var t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e)}this.$.dropdown._selectedItem=e;var n=this._getOverlayItems();this.filteredItems&&n&&(this._focusedIndex=this.filteredItems.indexOf(e))}},{key:"_valueChanged",value:function(e,t){var n;""===e&&void 0===t||(this._isValidValue(e)?(this._getItemValue(this.selectedItem)!==e?this._selectItemForValue(e):n=this.selectedItem,!n&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(""!==this.value)):this.selectedItem=null,this._lastCommittedValue=void 0)}},{key:"_detectAndDispatchChange",value:function(){this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}},{key:"_itemsChanged",value:function(e,t){var n=this;this._ensureItemsOrDataProvider((function(){n.items=t}))}},{key:"_itemsOrPathsChanged",value:function(e){if("items"===e.path||"items.splices"===e.path){this.items?this.filteredItems=this.items.slice(0):this.__previousItems&&(this.filteredItems=null);var t=this._indexOfValue(this.value,this.items);this._focusedIndex=t;var n=t>-1&&this.items[t];n&&(this.selectedItem=n)}this.__previousItems=e.value}},{key:"_filteredItemsChanged",value:function(e){if(("filteredItems"===e.path||"filteredItems.splices"===e.path)&&(this._setOverlayItems(this.filteredItems),this._focusedIndex=this.opened||this.autoOpenDisabled?this.$.dropdown.indexOfLabel(this.filter):this._indexOfValue(this.value,this.filteredItems),null===this.selectedItem&&this._focusedIndex>=0)){var t=this.filteredItems[this._focusedIndex];this._getItemValue(t)===this.value&&this._selectItemForValue(this.value)}}},{key:"_filterItems",value:function(e,t){var n=this;if(!e)return e;var r=e.filter((function(e){return t=t?t.toString().toLowerCase():"",n._getItemLabel(e).toString().toLowerCase().indexOf(t)>-1}));return r}},{key:"_selectItemForValue",value:function(e){var t=this._indexOfValue(e,this.filteredItems),n=this.selectedItem;this.selectedItem=t>=0?this.filteredItems[t]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===n&&this._selectedItemChanged(this.selectedItem)}},{key:"_getItemElements",value:function(){return Array.from(this.$.dropdown._scroller.querySelectorAll("vaadin-combo-box-item"))}},{key:"_getOverlayItems",value:function(){return this.$.dropdown._items}},{key:"_setOverlayItems",value:function(e){this.$.dropdown.set("_items",e)}},{key:"_indexOfValue",value:function(e,t){if(t&&this._isValidValue(e))for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:{};if(e){var r=customElements.get(e);r&&Object.prototype.hasOwnProperty.call(r,"__finalized")&&console.warn('The custom element definition for "'.concat(e,'"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.'))}t=I(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(e,t,n):x.push({themeFor:e,styles:t,include:n.include,moduleId:n.moduleId})}function S(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():x}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;return 0===e.indexOf("lumo-")||0===e.indexOf("material-")?t=1:0===e.indexOf("vaadin-")&&(t=2),t}function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e instanceof r.c3?t.push(e):Array.isArray(e)?e.forEach((function(e){return I(e,t)})):console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),t}function C(e){var t=[];return e.include&&[].concat(e.include).forEach((function(e){var n=S().find((function(t){return t.moduleId===e}));n?t.push.apply(t,w(C(n)).concat(w(n.styles))):console.warn("Included moduleId ".concat(e," not found in style registry"))}),e.styles),t}function R(e){var t=e+"-default-theme",n=S().filter((function(n){return n.moduleId!==t&&function(e,t){return(e||"").split(" ").some((function(e){return new RegExp("^"+e.split("*").join(".*")+"$").test(t)}))}(n.themeFor,e)})).map((function(e){return Object.assign({},e,{styles:[].concat(w(C(e)),w(e.styles)),includePriority:P(e.moduleId)})})).sort((function(e,t){return t.includePriority-e.includePriority}));return n.length>0?n:S().filter((function(e){return e.moduleId===t}))}var E=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(i,e);var t,n,r,o=_(i);function i(){return p(this,i),o.apply(this,arguments)}return t=i,r=[{key:"finalize",value:function(){v(g(i),"finalize",this).call(this);var e=this.prototype._template;if(e&&!e.__themes){var t=Object.getPrototypeOf(this.prototype)._template,n=(t?t.__themes:[])||[];e.__themes=[].concat(w(n),w(R(this.is))),function(e,t){var n=document.createElement("style");n.innerHTML=e.filter((function(t,n){return n===e.lastIndexOf(t)})).map((function(e){return e.cssText})).join("\n"),t.content.appendChild(n)}(e.__themes.reduce((function(e,t){return[].concat(w(e),w(t.styles))}),[]),e)}}},{key:"finalizeStyles",value:function(e){return R(this.is).reduce((function(e,t){return[].concat(w(e),w(t.styles))}),[]).concat(e)}}],(n=null)&&y(t.prototype,n),r&&y(t,r),i}(h(e))}},19596:function(e,t,n){n.d(t,{s:function(){return O}});var r=n(81563),o=n(38941);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(i);try{for(s.s();!(a=s.n()).done;){var l=a.value;null===(o=(r=l)._$AO)||void 0===o||o.call(r,n,!1),e(l,n)}}catch(u){s.e(u)}finally{s.f()}return!0},b=function(e){var t,n;do{if(void 0===(t=e._$AM))break;(n=t._$AN).delete(e),e=t}while(0===(null==n?void 0:n.size))},_=function(e){for(var t;t=e._$AM;e=t){var n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),w(t)}};function m(e){void 0!==this._$AN?(b(this),this._$AM=e,_(this)):this._$AM=e}function g(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(r))for(var i=n;i1&&void 0!==arguments[1])||arguments[1];e!==this.isConnected&&(this.isConnected=e,e?null===(t=this.reconnected)||void 0===t||t.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),r&&(v(this,e),b(this))}},{key:"setValue",value:function(e){if((0,r.OR)(this._$Ct))this._$Ct._$AI(e,this);else{var t=a(this._$Ct._$AH);t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}},{key:"disconnected",value:function(){}},{key:"reconnected",value:function(){}}],n&&l(t.prototype,n),o&&l(t,o),h}(o.Xe)},76902:function(e,t,n){n.d(t,{t7:function(){return k}});var r=n(37500),o=n(57835);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&othis._$Cft);u++){var c=l(u);if("object"===d(c))return c.v}return r.Jb}},{key:"disconnected",value:function(){this._$CG.disconnect(),this._$CK.pause()}},{key:"reconnected",value:function(){this._$CG.reconnect(this),this._$CK.resume()}}],n&&y(t.prototype,n),o&&y(t,o),a}(a.s);(0,o.XM)(O)},69505:function(e,t,n){n.d(t,{DD:function(){return S},Yj:function(){return D},IX:function(){return M},hu:function(){return A},f0:function(){return L},is:function(){return z},i0:function(){return N},Rx:function(){return $},Ry:function(){return F},jt:function(){return q},lF:function(){return X},Z_:function(){return U},G0:function(){return Y}});var r=["message"];function o(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e){return function(e){if(Array.isArray(e))return y(e)}(e)||p(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function p(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t="function"==typeof Map?new Map:void 0;return g=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return w(e,arguments,k(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),x(r,e)},g(e)}function w(e,t,n){return w=O()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&x(o,n.prototype),o},w.apply(null,arguments)}function O(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function x(e,t){return x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},x(e,t)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(i,e);var t,n,o=(t=i,n=O(),function(){var e,r=k(t);if(n){var o=k(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return _(this,e)});function i(e,t){var n,a;b(this,i);var s=e.message,l=v(e,r),u=e.path,c=0===u.length?s:"At path: "+u.join(".")+" -- "+s;return n=o.call(this,c),Object.assign(m(n),l),n.name=n.constructor.name,n.failures=function(){var n;return null!=(n=a)?n:a=[e].concat(h(t()))},n}return i}(g(TypeError));function P(e){return"object"===f(e)&&null!=e}function I(e){return"string"==typeof e?JSON.stringify(e):""+e}function C(e){var t=e.next(),n=t.done,r=t.value;return n?void 0:r}function R(e,t,n,r){if(!0!==e){!1===e?e={}:"string"==typeof e&&(e={message:e});var o=t.path,i=t.branch,a=n.type,s=e,l=s.refinement,u=s.message,c=void 0===u?"Expected a value of type `"+a+"`"+(l?" with refinement `"+l+"`":"")+", but received: `"+I(r)+"`":u;return Object.assign({value:r,type:a,refinement:l,key:o[o.length-1],path:o,branch:i},e,{message:c})}}function E(e,t,n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:P(u=e)&&"function"==typeof u[Symbol.iterator]||(e=[e]),o=c(e),l.prev=2,o.s();case 4:if((i=o.n()).done){l.next=12;break}if(a=i.value,!(s=R(a,t,n,r))){l.next=10;break}return l.next=10,s;case 10:l.next=4;break;case 12:l.next=17;break;case 14:l.prev=14,l.t0=l.catch(2),o.e(l.t0);case 17:return l.prev=17,o.f(),l.finish(17);case 20:case"end":return l.stop()}var u}),l,null,[[2,14,17,20]])}function j(e,t){var n,r,o,a,s,l,f,d,p,y,v,b,_,m,g,w,O,x,k,S,I,C,R,E,T,A,z,V,L=arguments;return regeneratorRuntime.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(n=L.length>2&&void 0!==L[2]?L[2]:{},r=n.path,o=void 0===r?[]:r,a=n.branch,s=void 0===a?[e]:a,l=n.coerce,f=void 0!==l&&l,d=n.mask,p=void 0!==d&&d,y={path:o,branch:s},f&&(e=t.coercer(e,y),p&&"type"!==t.type&&P(t.schema)&&P(e)&&!Array.isArray(e)))for(v in e)void 0===t.schema[v]&&delete e[v];b=!0,_=c(t.validator(e,y)),u.prev=6,_.s();case 8:if((m=_.n()).done){u.next=15;break}return g=m.value,b=!1,u.next=13,[g,void 0];case 13:u.next=8;break;case 15:u.next=20;break;case 17:u.prev=17,u.t0=u.catch(6),_.e(u.t0);case 20:return u.prev=20,_.f(),u.finish(20);case 23:w=c(t.entries(e,y)),u.prev=24,w.s();case 26:if((O=w.n()).done){u.next=53;break}x=i(O.value,3),k=x[0],S=x[1],I=x[2],C=j(S,I,{path:void 0===k?o:[].concat(h(o),[k]),branch:void 0===k?s:[].concat(h(s),[S]),coerce:f,mask:p}),R=c(C),u.prev=30,R.s();case 32:if((E=R.n()).done){u.next=43;break}if(!(T=E.value)[0]){u.next=40;break}return b=!1,u.next=38,[T[0],void 0];case 38:u.next=41;break;case 40:f&&(S=T[1],void 0===k?e=S:e instanceof Map?e.set(k,S):e instanceof Set?e.add(S):P(e)&&(e[k]=S));case 41:u.next=32;break;case 43:u.next=48;break;case 45:u.prev=45,u.t1=u.catch(30),R.e(u.t1);case 48:return u.prev=48,R.f(),u.finish(48);case 51:u.next=26;break;case 53:u.next=58;break;case 55:u.prev=55,u.t2=u.catch(24),w.e(u.t2);case 58:return u.prev=58,w.f(),u.finish(58);case 61:if(!b){u.next=80;break}A=c(t.refiner(e,y)),u.prev=63,A.s();case 65:if((z=A.n()).done){u.next=72;break}return V=z.value,b=!1,u.next=70,[V,void 0];case 70:u.next=65;break;case 72:u.next=77;break;case 74:u.prev=74,u.t3=u.catch(63),A.e(u.t3);case 77:return u.prev=77,A.f(),u.finish(77);case 80:if(!b){u.next=83;break}return u.next=83,[void 0,e];case 83:case"end":return u.stop()}}),u,null,[[6,17,20,23],[24,55,58,61],[30,45,48,51],[63,74,77,80]])}var T=function(){function e(t){var n=this;b(this,e);var r=t.type,o=t.schema,i=t.validator,a=t.refiner,s=t.coercer,l=void 0===s?function(e){return e}:s,u=t.entries,c=void 0===u?regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):u;this.type=r,this.schema=o,this.entries=c,this.coercer=l,this.validator=i?function(e,t){return E(i(e,t),t,n,e)}:function(){return[]},this.refiner=a?function(e,t){return E(a(e,t),t,n,e)}:function(){return[]}}var t,n,r;return t=e,n=[{key:"assert",value:function(e){return A(e,this)}},{key:"create",value:function(e){return function(e,t){var n=V(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"is",value:function(e){return z(e,this)}},{key:"mask",value:function(e){return function(e,t){var n=V(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return V(e,this,t)}}],n&&o(t.prototype,n),r&&o(t,r),e}();function A(e,t){var n=V(e,t);if(n[0])throw n[0]}function z(e,t){return!V(e,t)[0]}function V(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=j(e,t,n),o=C(r);if(o[0]){var i=new S(o[0],regeneratorRuntime.mark((function e(){var t,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c(r),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!(o=n.value)[0]){e.next=8;break}return e.next=8,o[0];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])})));return[i,void 0]}var a=o[1];return[void 0,a]}function L(){for(var e=arguments.length,t=new Array(e),n=0;n\n ',"\n ","\n ","\n ","\n ","\n \n ","\n "])),(0,u.$)(i),this.renderRipple(),this.outlined?this.renderOutline():this.renderLabel(),this.renderInput(),this.renderCharCounter(t),this.renderLineRipple(),this.renderHelperText(o,n))}},{key:"renderInput",value:function(){var e=this.label?"label":void 0,t=-1===this.minLength?void 0:this.minLength,n=-1===this.maxLength?void 0:this.maxLength,r=this.autocapitalize?this.autocapitalize:void 0;return(0,s.dy)(o||(o=d(["\n '])),(0,c.o)(e),(0,f.a)(this.value),this.rows,this.cols,this.disabled,this.placeholder,this.required,this.readOnly,(0,c.o)(t),(0,c.o)(n),(0,c.o)(""===this.name?void 0:this.name),(0,c.o)(this.inputMode),(0,c.o)(r),this.handleInputChange,this.onInputBlur)}}])&&y(t.prototype,n),i&&y(t,i),l}(a.P);(0,i.__decorate)([(0,l.IO)("textarea")],g.prototype,"formElement",void 0),(0,i.__decorate)([(0,l.Cb)({type:Number})],g.prototype,"rows",void 0),(0,i.__decorate)([(0,l.Cb)({type:Number})],g.prototype,"cols",void 0),(0,i.__decorate)([(0,l.Cb)({converter:{fromAttribute:function(e){return null!==e&&(""===e||e)},toAttribute:function(e){return"boolean"==typeof e?e?"":null:e}}})],g.prototype,"charCounter",void 0)},96791:function(e,t,n){var r;n.d(t,{W:function(){return a}});var o,i,a=(0,n(37500).iv)(r||(o=[".mdc-text-field{height:100%}.mdc-text-field__input{resize:none}"],i||(i=o.slice(0)),r=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}}))))},93117:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n".concat(w.toString().replace(":host","html"),""),document.head.appendChild(O.content);var x,k,S,P=(0,v.iv)(g||(x=["\n /* prettier-ignore */\n :host {\n /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */\n --material-shadow-elevation-2dp: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n --material-shadow-elevation-3dp: 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-4dp: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-6dp: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-8dp: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-12dp: 0 12px 16px 1px rgba(0, 0, 0, 0.14), 0 4px 22px 3px rgba(0, 0, 0, 0.12), 0 6px 7px -4px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-16dp: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-24dp: 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.4);\n }\n"],k||(k=x.slice(0)),g=Object.freeze(Object.defineProperties(x,{raw:{value:Object.freeze(k)}})))),I=document.createElement("template");I.innerHTML=""),document.head.appendChild(I.content);var C=(0,v.iv)(S||(S=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n top: 16px;\n right: 16px;\n /* TODO (@jouni): remove unnecessary multiplication after https://github.com/vaadin/vaadin-overlay/issues/90 is fixed */\n bottom: calc(1px * var(--vaadin-overlay-viewport-bottom) + 16px);\n left: 16px;\n }\n\n [part='overlay'] {\n background-color: var(--material-background-color);\n border-radius: 4px;\n box-shadow: var(--material-shadow-elevation-4dp);\n color: var(--material-body-text-color);\n font-family: var(--material-font-family);\n font-size: var(--material-body-font-size);\n font-weight: 400;\n }\n\n [part='content'] {\n padding: 8px 0;\n }\n\n [part='backdrop'] {\n opacity: 0.2;\n animation: 0.2s vaadin-overlay-backdrop-enter;\n will-change: opacity;\n }\n\n @keyframes vaadin-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n"])));(0,v.hC)("",C,{moduleId:"material-overlay"});var R,E=C;(0,v.hC)("",E,{moduleId:"material-menu-overlay"});var j,T=(0,v.iv)(R||(R=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n --_vaadin-combo-box-items-container-border-width: 8px 0;\n --_vaadin-combo-box-items-container-border-style: solid;\n --_vaadin-combo-box-items-container-border-color: transparent;\n }\n\n [part='overlay'] {\n position: relative;\n overflow: visible;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n [part='content'] {\n padding: 0;\n }\n\n :host([loading]) [part='loader'] {\n height: 2px;\n position: absolute;\n z-index: 1;\n top: -2px;\n left: 0;\n right: 0;\n background: var(--material-background-color)\n linear-gradient(\n 90deg,\n transparent 0%,\n transparent 20%,\n var(--material-primary-color) 20%,\n var(--material-primary-color) 40%,\n transparent 40%,\n transparent 60%,\n var(--material-primary-color) 60%,\n var(--material-primary-color) 80%,\n transparent 80%,\n transparent 100%\n )\n 0 0 / 400% 100% repeat-x;\n opacity: 0;\n animation: 3s linear infinite material-combo-box-loader-progress, 0.3s 0.1s both material-combo-box-loader-fade-in;\n }\n\n [part='loader']::before {\n content: '';\n display: block;\n height: 100%;\n opacity: 0.16;\n background: var(--material-primary-color);\n }\n\n @keyframes material-combo-box-loader-fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n @keyframes material-combo-box-loader-progress {\n 0% {\n background-position: 0 0;\n background-size: 300% 100%;\n }\n\n 33% {\n background-position: -100% 0;\n background-size: 400% 100%;\n }\n\n 67% {\n background-position: -200% 0;\n background-size: 250% 100%;\n }\n\n 100% {\n background-position: -300% 0;\n background-size: 300% 100%;\n }\n }\n\n /* RTL specific styles */\n\n @keyframes material-combo-box-loader-progress-rtl {\n 0% {\n background-position: 100% 0;\n background-size: 300% 100%;\n }\n\n 33% {\n background-position: 200% 0;\n background-size: 400% 100%;\n }\n\n 67% {\n background-position: 300% 0;\n background-size: 250% 100%;\n }\n\n 100% {\n background-position: 400% 0;\n background-size: 300% 100%;\n }\n }\n\n :host([loading][dir='rtl']) [part='loader'] {\n animation: 3s linear infinite material-combo-box-loader-progress-rtl,\n 0.3s 0.1s both material-combo-box-loader-fade-in;\n }\n"])));(0,v.hC)("vaadin-combo-box-overlay",[E,T],{moduleId:"material-combo-box-overlay"});var A,z=(0,v.iv)(j||(j=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n min-height: 36px;\n padding: 8px 32px 8px 10px;\n overflow: hidden;\n font-family: var(--material-font-family);\n font-size: var(--material-small-font-size);\n line-height: 24px;\n }\n\n /* It's the list-box's responsibility to add the focus style */\n :host([focused]) {\n outline: none;\n }\n\n /* Checkmark */\n [part='checkmark']::before {\n display: var(--_material-item-selected-icon-display, none);\n content: '';\n font-family: material-icons;\n font-size: 24px;\n line-height: 1;\n font-weight: 400;\n width: 24px;\n text-align: center;\n margin-right: 10px;\n color: var(--material-secondary-text-color);\n flex: none;\n }\n\n :host([selected]) [part='checkmark']::before {\n content: var(--material-icons-check);\n }\n\n @media (any-hover: hover) {\n :host(:hover:not([disabled])) {\n background-color: var(--material-secondary-background-color);\n }\n\n :host([focused]:not([disabled])) {\n background-color: var(--material-divider-color);\n }\n }\n\n /* Disabled */\n :host([disabled]) {\n color: var(--material-disabled-text-color);\n cursor: default;\n pointer-events: none;\n }\n\n /* RTL specific styles */\n :host([dir='rtl']) {\n padding: 8px 10px 8px 32px;\n }\n\n :host([dir='rtl']) [part='checkmark']::before {\n margin-right: 0;\n margin-left: 10px;\n }\n"])));(0,v.hC)("vaadin-item",z,{moduleId:"material-item"});var V=(0,v.iv)(A||(A=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n padding: 4px 10px;\n --_material-item-selected-icon-display: block;\n }\n"])));(0,v.hC)("vaadin-combo-box-item",[z,V],{moduleId:"material-combo-box-item"});var L=n(28426);function B(e,t){for(var n=0;n0?t="default":(e.scrollLeft=2,e.scrollLeft<2&&(t="negative")),document.body.removeChild(e),t}},{key:"getNormalizedScrollLeft",value:function(e,t,n){var r=n.scrollLeft;if("rtl"!==t||!e)return r;switch(e){case"negative":return n.scrollWidth-n.clientWidth+r;case"reverse":return n.scrollWidth-n.clientWidth-r}return r}},{key:"setNormalizedScrollLeft",value:function(e,t,n,r){if("rtl"===t&&e)switch(e){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+r;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-r;break;default:n.scrollLeft=r}else n.scrollLeft=r}}],(n=null)&&B(t.prototype,n),r&&B(t,r),e}();function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:e.getAttribute("dir");t?e.setAttribute("dir",t):null!=n&&e.removeAttribute("dir")},J=function(){return document.documentElement.getAttribute("dir")},Q=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}(i,e);var t,n,r,o=q(i);function i(){return N(this,i),o.apply(this,arguments)}return t=i,n=[{key:"connectedCallback",value:function(){$(W(i.prototype),"connectedCallback",this).call(this),this.hasAttribute("dir")||(this.__subscribe(),K(this,J(),null))}},{key:"attributeChangedCallback",value:function(e,t,n){if($(W(i.prototype),"attributeChangedCallback",this).call(this,e,t,n),"dir"===e){var r=J(),o=n===r&&-1===G.indexOf(this),a=!n&&t&&-1===G.indexOf(this),s=n!==r&&t===r;o||a?(this.__subscribe(),K(this,r,n)):s&&this.__subscribe(!1)}}},{key:"disconnectedCallback",value:function(){$(W(i.prototype),"disconnectedCallback",this).call(this),this.__subscribe(!1),this.removeAttribute("dir")}},{key:"_valueToNodeAttribute",value:function(e,t,n){("dir"!==n||""!==t||e.hasAttribute("dir"))&&$(W(i.prototype),"_valueToNodeAttribute",this).call(this,e,t,n)}},{key:"_attributeToProperty",value:function(e,t,n){"dir"!==e||t?$(W(i.prototype),"_attributeToProperty",this).call(this,e,t,n):this.dir=""}},{key:"__subscribe",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e?-1===G.indexOf(this)&&G.push(this):G.indexOf(this)>-1&&G.splice(G.indexOf(this),1)}},{key:"__getNormalizedScrollLeft",value:function(e){return D.getNormalizedScrollLeft(Y,this.getAttribute("dir")||"ltr",e)}},{key:"__setNormalizedScrollLeft",value:function(e,t){return D.setNormalizedScrollLeft(Y,this.getAttribute("dir")||"ltr",e,t)}}],r=[{key:"properties",get:function(){return{dir:{type:String,value:"",reflectToAttribute:!0}}}},{key:"finalize",value:function(){$(W(i),"finalize",this).call(this),Y||(Y=D.detectScrollType())}}],n&&H(t.prototype,n),r&&H(t,r),i}(e)};function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(e,t){for(var n=0;n\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n \n \n \n \n
\n '])))}},{key:"is",get:function(){return"vaadin-combo-box-item"}},{key:"properties",get:function(){return{index:Number,item:Object,label:String,selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,_oldRenderer:Function}}},{key:"observers",get:function(){return["__rendererOrItemChanged(renderer, index, item.*, selected, focused)","__updateLabel(label, renderer)"]}}],n&&te(t.prototype,n),r&&te(t,r),i}((0,v.Tb)(Q(L.H3)));customElements.define(se.is,se);var le=n(20723),ue=n(87529),ce=n(52521),fe=function(e){return e.test(navigator.userAgent)},he=function(e){return e.test(navigator.platform)},de=(fe(/Android/),fe(/Chrome/)&&/Google Inc/.test(navigator.vendor),fe(/Firefox/),he(/^iPad/)||he(/^Mac/)&&navigator.maxTouchPoints>1),pe=he(/^iPhone/)||de,ye=fe(/^((?!chrome|android).)*safari/i),ve=function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}();function be(e,t){for(var n=0;n0;if(o>=0&&t.push(r),n="slot"===r.localName?r.assignedNodes({flatten:!0}):(r.shadowRoot||r).children)for(var a=0;a0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?n.push(t.shift()):n.push(e.shift());return n.concat(e,t)}},{key:"_hasLowerTabOrder",value:function(e,t){var n=Math.max(e.tabIndex,0),r=Math.max(t.tabIndex,0);return 0===n||0===r?r>n:n>r}}],(n=null)&&be(t.prototype,n),r&&be(t,r),e}();function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function we(e,t){for(var n=0;n\n :host {\n z-index: 200;\n position: fixed;\n\n /* Despite of what the names say, is just a container\n for position/sizing/alignment. The actual overlay is the overlay part. */\n\n /* Default position constraints: the entire viewport. Note: themes can\n override this to introduce gaps between the overlay and the viewport. */\n top: 0;\n right: 0;\n bottom: var(--vaadin-overlay-viewport-bottom);\n left: 0;\n\n /* Use flexbox alignment for the overlay part. */\n display: flex;\n flex-direction: column; /* makes dropdowns sizing easier */\n /* Align to center by default. */\n align-items: center;\n justify-content: center;\n\n /* Allow centering when max-width/max-height applies. */\n margin: auto;\n\n /* The host is not clickable, only the overlay part is. */\n pointer-events: none;\n\n /* Remove tap highlight on touch devices. */\n -webkit-tap-highlight-color: transparent;\n\n /* CSS API for host */\n --vaadin-overlay-viewport-bottom: 0;\n }\n\n :host([hidden]),\n :host(:not([opened]):not([closing])) {\n display: none !important;\n }\n\n [part=\'overlay\'] {\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n pointer-events: auto;\n\n /* Prevent overflowing the host in MSIE 11 */\n max-width: 100%;\n box-sizing: border-box;\n\n -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */\n }\n\n [part=\'backdrop\'] {\n z-index: -1;\n content: \'\';\n background: rgba(0, 0, 0, 0.5);\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n pointer-events: auto;\n }\n \n\n \n \n '])))}},{key:"is",get:function(){return"vaadin-overlay"}},{key:"properties",get:function(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},instanceProps:{type:Object},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldInstanceProps:Object,_oldRenderer:Object,_oldOpened:Boolean}}},{key:"observers",get:function(){return["_templateOrRendererChanged(template, renderer, owner, model, instanceProps, opened)"]}},{key:"__attachedInstances",get:function(){return Array.from(document.body.children).filter((function(e){return e instanceof i&&!e.hasAttribute("closing")})).sort((function(e,t){return e.__zIndex-t.__zIndex||0}))}}],(n=[{key:"ready",value:function(){Oe(Ie(i.prototype),"ready",this).call(this),this._observer.flush(),this.addEventListener("click",(function(){})),this.$.backdrop.addEventListener("click",(function(){}))}},{key:"_detectIosNavbar",value:function(){if(this.opened){var e=window.innerHeight,t=window.innerWidth>e,n=document.documentElement.clientHeight;t&&n>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",n-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}}},{key:"_setTemplateFromNodes",value:function(e){this.template=e.filter((function(e){return e.localName&&"template"===e.localName}))[0]||this.template}},{key:"close",value:function(e){var t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}},{key:"connectedCallback",value:function(){Oe(Ie(i.prototype),"connectedCallback",this).call(this),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}},{key:"disconnectedCallback",value:function(){Oe(Ie(i.prototype),"disconnectedCallback",this).call(this),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}},{key:"requestContentUpdate",value:function(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}},{key:"_ironOverlayCanceled",value:function(e){e.preventDefault()}},{key:"_mouseDownListener",value:function(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}},{key:"_mouseUpListener",value:function(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}},{key:"_outsideClickListener",value:function(e){if(-1!==e.composedPath().indexOf(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(this._last){var t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},{key:"_keydownListener",value:function(e){if(this._last)if("Tab"===e.key&&this.focusTrap&&!e.defaultPrevented)this._cycleTab(e.shiftKey?-1:1),e.preventDefault();else if("Escape"===e.key||"Esc"===e.key){var t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},{key:"_ensureTemplatized",value:function(){this._setTemplateFromNodes(Array.from(this.children))}},{key:"_openedChanged",value:function(e,t){var n=this;this._instance||this._ensureTemplatized(),e?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),(0,ue.T8)(this,(function(){n.focusTrap&&!n.contains(document.activeElement)&&n._cycleTab(0,0);var e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});n.dispatchEvent(e)})),this.modeless||this._addGlobalListeners()):t&&(this._animatedClosing(),this.modeless||this._removeGlobalListeners())}},{key:"_hiddenChanged",value:function(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}},{key:"_shouldAnimate",value:function(){var e=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&e&&"none"!=e}},{key:"_enqueueAnimation",value:function(e,t){var n=this,r="__".concat(e,"Handler"),o=function e(o){o&&o.target!==n||(t(),n.removeEventListener("animationend",e),delete n[r])};this[r]=o,this.addEventListener("animationend",o)}},{key:"_flushAnimation",value:function(e){var t="__".concat(e,"Handler");"function"==typeof this[t]&&this[t]()}},{key:"_animatedOpening",value:function(){var e=this;this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening","");var t=function(){document.addEventListener("iron-overlay-canceled",e._boundIronOverlayCanceledListener),e.removeAttribute("opening")};this._shouldAnimate()?this._enqueueAnimation("opening",t):t()}},{key:"_attachOverlay",value:function(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}},{key:"_animatedClosing",value:function(){var e=this;if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){if(this._exitModalState(),this.restoreFocusOnClose&&this.__restoreFocusNode){var t=this._getActiveElement();(t===document.body||this._deepContains(t))&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null}this.setAttribute("closing","");var n=function(){document.removeEventListener("iron-overlay-canceled",e._boundIronOverlayCanceledListener),e._detachOverlay(),e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.removeAttribute("closing")};this._shouldAnimate()?this._enqueueAnimation("closing",n):n()}}},{key:"_detachOverlay",value:function(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}},{key:"_last",get:function(){return this===i.__attachedInstances.pop()}},{key:"_modelessChanged",value:function(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}},{key:"_addGlobalListeners",value:function(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0),document.addEventListener("keydown",this._boundKeydownListener)}},{key:"_enterModalState",value:function(){var e=this;"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),i.__attachedInstances.forEach((function(t){t!==e&&(t.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}},{key:"_removeGlobalListeners",value:function(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0),document.removeEventListener("keydown",this._boundKeydownListener)}},{key:"_exitModalState",value:function(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);for(var e,t=i.__attachedInstances;(e=t.pop())&&(e===this||(e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.modeless)););}},{key:"_removeOldContent",value:function(){var e=this;this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((function(t){t.parentNode===e.content&&e.content.removeChild(t)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}},{key:"_stampOverlayTemplate",value:function(e,t){this._removeOldContent(),e._Templatizer||(e._Templatizer=(0,ce.Uv)(e,this,{instanceProps:t,forwardHostProp:function(e,t){this._instance&&this._instance.forwardHostProp(e,t)}})),this._instance=new e._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);var n=e._templateRoot||(e._templateRoot=e.getRootNode());if(n!==document){this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});var r=Array.from(n.querySelectorAll("style")).reduce((function(e,t){return e+t.textContent}),"");if(r=r.replace(/:host/g,":host-nomatch")){var o=document.createElement("style");o.textContent=r,this.$.content.shadowRoot.appendChild(o),this._contentNodes.unshift(o)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}},{key:"_removeNewRendererOrTemplate",value:function(e,t,n,r){e!==t?this.template=void 0:n!==r&&(this.renderer=void 0)}},{key:"_templateOrRendererChanged",value:function(e,t,n,r,o,i){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");var a=this._oldOwner!==n||this._oldModel!==r;this._oldModel=r,this._oldOwner=n;var s=this._oldInstanceProps!==o||this._oldTemplate!==e;this._oldInstanceProps=o,this._oldTemplate=e;var l=this._oldRenderer!==t;this._oldRenderer=t;var u=this._oldOpened!==i;this._oldOpened=i,l&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),e&&s?this._stampOverlayTemplate(e,o):t&&(l||u||a)&&i&&this.requestContentUpdate()}},{key:"_isFocused",value:function(e){return e&&e.getRootNode().activeElement===e}},{key:"_focusedIndex",value:function(e){return(e=e||this._getFocusableElements()).indexOf(e.filter(this._isFocused).pop())}},{key:"_cycleTab",value:function(e,t){var n=this._getFocusableElements();void 0===t&&(t=this._focusedIndex(n)),(t+=e)>=n.length?t=0:t<0&&(t=n.length-1),n[t].focus()}},{key:"_getFocusableElements",value:function(){return me.getTabbableNodes(this.$.overlay)}},{key:"_getActiveElement",value:function(){for(var e=document.activeElement||document.body;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}},{key:"_deepContains",value:function(e){if(this.contains(e))return!0;for(var t=e,n=e.ownerDocument;t&&t!==n&&t!==this;)t=t.parentNode||t.host;return t===this}},{key:"bringToFront",value:function(){var e=this,t="",n=i.__attachedInstances.filter((function(t){return t!==e})).pop();n&&(t=n.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}])&&we(t.prototype,n),r&&we(t,r),i}((0,v.Tb)(Q(L.H3)));function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t){for(var n=0;n(o?l:s)||u>t)}},{key:"__calculatePositionInOneDimension",value:function(e,t,n,r,o,i){var a,s=i?r.start:r.end,l=i?r.end:r.start;return Ee(a={},s,parseFloat(o.style[s]||getComputedStyle(o)[s])+(t[i?r.start:r.end]-e[n===i?r.end:r.start])*(i?-1:1)+"px"),Ee(a,l,""),a}}],r=[{key:"properties",get:function(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1}}}},{key:"observers",get:function(){return["__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)","__overlayOpenedChanged(opened)"]}}],n&&je(t.prototype,n),r&&je(t,r),i}(Ce));customElements.define(Xe.is,Xe);var Ke=0,Je=0,Qe=[],Ze=0,et=!1,tt=document.createTextNode("");new window.MutationObserver((function(){et=!1;for(var e=Qe.length,t=0;t=0){if(!Qe[t])throw new Error("invalid async handle: "+e);Qe[t]=null}}};function at(e,t){for(var n=0;n=8,ht={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return(this.grid?this._physicalRows*this._rowHeight:this._physicalSize)-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var e=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,e-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this.grid&&(e-=e%this._itemsPerRow),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){(e%=this._physicalCount)<0&&(e=this._physicalCount+e),this.grid&&(e-=e%this._itemsPerRow),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){var e=this._firstVisibleIndexVal;if(null==e){var t=this._physicalTop+this._scrollOffset;e=this._iterateItems((function(e,n){return(t+=this._getPhysicalSizeIncrement(e))>this._scrollPosition?this.grid?n-n%this._itemsPerRow:n:this.grid&&this._virtualCount-1===n?n-n%this._itemsPerRow:void 0}))||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){var e=this._lastVisibleIndexVal;if(null==e){if(this.grid)e=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var t=this._physicalTop+this._scrollOffset;this._iterateItems((function(n,r){t=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;var r=Math.round(t/this._physicalAverage)*this._itemsPerRow;this._virtualStart=this._virtualStart+r,this._physicalStart=this._physicalStart+r,this._physicalTop=Math.min(Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){var o=this._getReusables(n);n?(this._physicalTop=o.physicalTop,this._virtualStart=this._virtualStart+o.indexes.length,this._physicalStart=this._physicalStart+o.indexes.length):(this._virtualStart=this._virtualStart-o.indexes.length,this._physicalStart=this._physicalStart-o.indexes.length),this._update(o.indexes,n?null:o.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),it)}},_getReusables:function(e){var t,n,r,o=[],i=this._hiddenContentSize*this._ratio,a=this._virtualStart,s=this._virtualEnd,l=this._physicalCount,u=this._physicalTop+this._scrollOffset,c=this._physicalBottom+this._scrollOffset,f=this._scrollPosition,h=this._scrollBottom;for(e?(t=this._physicalStart,this._physicalEnd,n=f-u):(t=this._physicalEnd,this._physicalStart,n=c-h);n-=r=this._getPhysicalSizeIncrement(t),!(o.length>=l||n<=i);)if(e){if(s+o.length+1>=this._virtualCount)break;if(u+r>=f-this._scrollOffset)break;o.push(t),u+=r,t=(t+1)%l}else{if(a-o.length<=0)break;if(u+this._physicalSize-r<=h)break;o.push(t),u-=r,t=0===t?l-1:t-1}return{indexes:o,physicalTop:u-this._scrollOffset}},_update:function(e,t){if(!(e&&0===e.length||0===this._physicalCount)){if(this._manageFocus(),this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){var n=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(n)}this._positionItems(),this._updateScrollerSize()}},_isClientFull:function(){return 0!=this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){var t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart);if(t=this._convertIndexToCompleteRow(t),this.grid){var n=t%this._itemsPerRow;n&&t-n<=this._physicalCount&&(t+=this._itemsPerRow),t-=n}var r=t-this._physicalCount,o=Math.round(.5*this._physicalCount);if(!(r<0)){if(r>0){var i=window.performance.now();[].push.apply(this._physicalItems,this._createPool(r));for(var a=0;athis._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)=this._virtualCount-1||0===o||(this._isClientFull()?this._physicalSize0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_gridChanged:function(e,t){void 0!==t&&(this.notifyResize(),ut(),e&&this._updateGridMetrics())},_itemsChanged:function(e){if("items"===e.path)this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render,rt);else if("items.splices"===e.path){if(this._adjustVirtualIndex(e.value.indexSplices),this._virtualCount=this.items?this.items.length:0,e.value.indexSplices.some((function(e){return e.addedCount>0||e.removed.length>0}))){var t=this._getActiveElement();this.contains(t)&&t.blur()}var n=e.value.indexSplices.some((function(e){return e.index+e.addedCount>=this._virtualStart&&e.index<=this._virtualEnd}),this);this._isClientFull()&&!n||this._debounce("_render",this._render,rt)}else"items.length"!==e.path&&this._forwardItemPath(e.path,e.value)},_iterateItems:function(e,t){var n,r,o,i;if(2===arguments.length&&t){for(i=0;i=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_updateMetrics:function(e){ut();var t=0,n=0,r=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((function(e,r){n+=this._physicalSizes[e],this._physicalSizes[e]=this._physicalItems[e].offsetHeight,t+=this._physicalSizes[e],this._physicalAverageCount+=this._physicalSizes[e]?1:0}),e),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(n=1===this._itemsPerRow?n:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+t-n,this._itemsPerRow=1),this._physicalAverageCount!==r&&(this._physicalAverage=Math.round((o*r+t)/this._physicalAverageCount))},_updateGridMetrics:function(){this._itemWidth=this._physicalCount>0?this._physicalItems[0].getBoundingClientRect().width:200,this._rowHeight=this._physicalCount>0?this._physicalItems[0].offsetHeight:200,this._itemsPerRow=this._itemWidth?Math.floor(this._viewportWidth/this._itemWidth):this._itemsPerRow},_positionItems:function(){this._adjustScrollPosition();var e=this._physicalTop;if(this.grid){var t=this._itemsPerRow*this._itemWidth,n=(this._viewportWidth-t)/2;this._iterateItems((function(t,r){var o=r%this._itemsPerRow,i=Math.floor(o*this._itemWidth+n);this._isRTL&&(i*=-1),this.translate3d(i+"px",e+"px",0,this._physicalItems[t]),this._shouldRenderNextRow(r)&&(e+=this._rowHeight)}))}else{var r=[];this._iterateItems((function(t,n){var o=this._physicalItems[t];this.translate3d(0,e+"px",0,o),e+=this._physicalSizes[t];var i=o.id;i&&r.push(i)})),r.length&&this.setAttribute("aria-owns",r.join(" "))}},_getPhysicalSizeIncrement:function(e){return this.grid?this._computeVidx(e)%this._itemsPerRow!=this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[e]},_shouldRenderNextRow:function(e){return e%this._itemsPerRow==this._itemsPerRow-1},_adjustScrollPosition:function(){var e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop=this._physicalTop-e;var t=this._scrollPosition;!ft&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,((e=(e=(e=e||0===this._scrollHeight)||this._scrollPosition>=this._estScrollHeight-this._physicalSize)||this.grid&&this.$.items.style.height=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToIndex:function(e){if(!("number"!=typeof e||e<0||e>this.items.length-1)&&(ut(),0!==this._physicalCount)){e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=this.grid?e-2*this._itemsPerRow:e-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var t=this._physicalStart,n=this._virtualStart,r=0,o=this._hiddenContentSize;n=this._virtualStart&&e<=this._virtualEnd},_isIndexVisible:function(e){return e>=this.firstVisibleIndex&&e<=this.lastVisibleIndex},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp:function(e,t,n){return Math.min(n,Math.max(t,e))},_debounce:function(e,t,n){var r;this._debouncers=this._debouncers||{},this._debouncers[e]=st.debounce(this._debouncers[e],n,t.bind(this)),r=this._debouncers[e],lt.add(r)}};function dt(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size-1;this.__getVisibleElements().forEach((function(r){r.__virtualIndex>=t&&r.__virtualIndex<=n&&e.__updateElement(r,r.__virtualIndex,!0)}))}},{key:"__updateElement",value:function(e,t,n){e.style.minHeight&&(e.style.minHeight=""),this.__preventElementUpdates||e.__lastUpdatedIndex===t&&!n||(this.updateElement(e,t),e.__lastUpdatedIndex=t),0===e.offsetHeight&&(e.style.minHeight="200px")}},{key:"__getIndexScrollOffset",value:function(e){var t=this.__getVisibleElements().find((function(t){return t.__virtualIndex===e}));return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}},{key:"size",get:function(){return this.__size},set:function(e){var t=this;if(e!==this.size){var n,r;if(this.__preventElementUpdates=!0,e>0&&(n=this.adjustedFirstVisibleIndex,r=this.__getIndexScrollOffset(n)),this.__size=e,ut(),this._itemsChanged({path:"items"}),ut(),e>0){n=Math.min(n,e-1),this.scrollToIndex(n);var o=this.__getIndexScrollOffset(n);void 0!==r&&void 0!==o&&(this._scrollTop+=r-o)}this.elementsContainer.children.length||requestAnimationFrame((function(){return t._resizeHandler()})),this.__preventElementUpdates=!1,this._resizeHandler(),ut()}}},{key:"_scrollTop",get:function(){return this.scrollTarget.scrollTop},set:function(e){this.scrollTarget.scrollTop=e}},{key:"items",get:function(){return{length:Math.min(this.size,1e5)}}},{key:"offsetHeight",get:function(){return this.scrollTarget.offsetHeight}},{key:"$",get:function(){return{items:this.scrollContainer}}},{key:"updateViewportBoundaries",value:function(){var e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean("rtl"===e.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}},{key:"setAttribute",value:function(){}},{key:"_createPool",value:function(e){var t=this,n=this.createElements(e),r=document.createDocumentFragment();return n.forEach((function(e){e.style.position="absolute",r.appendChild(e),t.__resizeObserver.observe(e)})),this.elementsContainer.appendChild(r),n}},{key:"_assignModels",value:function(e){var t=this;this._iterateItems((function(e,n){var r=t._physicalItems[e];r.hidden=n>=t.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=n+(t._vidxOffset||0),t.__updateElement(r,r.__virtualIndex))}),e)}},{key:"_isClientFull",value:function(){var t=this;return setTimeout((function(){return t.__clientFull=!0})),this.__clientFull||pt(yt(e.prototype),"_isClientFull",this).call(this)}},{key:"translate3d",value:function(e,t,n,r){r.style.transform="translateY(".concat(t,")")}},{key:"toggleScrollListener",value:function(){}},{key:"_scrollHandler",value:function(){var t=this;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0)),pt(yt(e.prototype),"_scrollHandler",this).call(this),this.reorderElements&&(this.__scrollReorderDebouncer=st.debounce(this.__scrollReorderDebouncer,nt(this.timeouts.SCROLL_REORDER),(function(){return t.__reorderElements()}))),this.__previousScrollTop=this._scrollTop}},{key:"__onWheel",value:function(e){var t=this;if(!e.ctrlKey&&!this._hasScrolledAncestor(e.target,e.deltaX,e.deltaY)){var n=e.deltaY;if(e.deltaMode===WheelEvent.DOM_DELTA_LINE?n*=this._scrollLineHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._scrollPageHeight),this._deltaYAcc=this._deltaYAcc||0,this._wheelAnimationFrame)return this._deltaYAcc+=n,void e.preventDefault();n+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=st.debounce(this.__debouncerWheelAnimationFrame,rt,(function(){return t._wheelAnimationFrame=!1}));var r=Math.abs(e.deltaX)+Math.abs(n);this._canScroll(this.scrollTarget,e.deltaX,n)?(e.preventDefault(),this.scrollTarget.scrollTop+=n,this.scrollTarget.scrollLeft+=e.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=st.debounce(this._debouncerIgnoreNewWheel,nt(this.timeouts.IGNORE_WHEEL),(function(){return t._ignoreNewWheel=!1}))):this._hasResidualMomentum&&r<=this._previousMomentum||this._ignoreNewWheel?e.preventDefault():r>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=r}}},{key:"_hasScrolledAncestor",value:function(e,t,n){return e!==this.scrollTarget&&e!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(e,t,n)||-1===["auto","scroll"].indexOf(getComputedStyle(e).overflow))||(e!==this&&e.parentElement?this._hasScrolledAncestor(e.parentElement,t,n):void 0))}},{key:"_canScroll",value:function(e,t,n){return n>0&&e.scrollTop0||t>0&&e.scrollLeft0}},{key:"_getScrollLineHeight",value:function(){var e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);var t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}},{key:"__getVisibleElements",value:function(){return Array.from(this.elementsContainer.children).filter((function(e){return!e.hidden}))}},{key:"__reorderElements",value:function(){var e=this;if(this.__mouseDown)this.__pendingReorder=!0;else{this.__pendingReorder=!1;var t=this._virtualStart+(this._vidxOffset||0),n=this.__getVisibleElements(),r=n.find((function(t){return t.contains(e.elementsContainer.getRootNode().activeElement)||t.contains(e.scrollTarget.getRootNode().activeElement)}))||n[0];if(r){var o=r.__virtualIndex-t,i=n.indexOf(r)-o;if(i>0)for(var a=0;a=this.size)this._vidxOffset=0;else{if(this.__skipNextVirtualIndexAdjust)return void(this.__skipNextVirtualIndexAdjust=!1);if(Math.abs(t)>1e4){var n=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight),r=n*this.size;this._vidxOffset=Math.round(r-n*this._virtualCount)}else{var o=this._vidxOffset;0===this._scrollTop?(this._vidxOffset=0,o!==this._vidxOffset&&pt(yt(e.prototype),"scrollToIndex",this).call(this,0)):this.firstVisibleIndex<1e3&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,100),pt(yt(e.prototype),"scrollToIndex",this).call(this,this.firstVisibleIndex+(o-this._vidxOffset)));var i=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=i,o!==this._vidxOffset&&pt(yt(e.prototype),"scrollToIndex",this).call(this,this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-1e3&&this._vidxOffset0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size-1;this.__adapter.update(e,t)}},{key:"flush",value:function(){this.__adapter.flush()}},{key:"firstVisibleIndex",get:function(){return this.__adapter.adjustedFirstVisibleIndex}},{key:"lastVisibleIndex",get:function(){return this.__adapter.adjustedLastVisibleIndex}}],n&&_t(t.prototype,n),r&&_t(t,r),e}();function gt(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0){var n=this._visibleItemsCount(),r=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),r=e-n+1):e>this.__virtualizer.firstVisibleIndex&&(r=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,r));var o=kt(this.children).find((function(e){return!e.hidden&&e.index===t.__virtualizer.lastVisibleIndex}));if(o&&e===o.index){var i=o.getBoundingClientRect(),a=this.getBoundingClientRect(),s=i.bottom-a.bottom+this._viewportTotalPaddingBottom;s>0&&(this.scrollTop+=s)}}}},{key:"__getAriaRole",value:function(e){return void 0!==e&&"option"}},{key:"__getAriaSelected",value:function(e,t){return this.__isItemFocused(e,t).toString()}},{key:"__isItemFocused",value:function(e,t){return e==t}},{key:"__isItemSelected",value:function(e,t,n){return!(e instanceof Ot)&&(n&&void 0!==e&&void 0!==t?this.get(n,e)===this.get(n,t):e===t)}},{key:"__itemsChanged",value:function(e){this.__virtualizer&&e&&(this.__virtualizer.size=e.length,this.__virtualizer.flush(),this.setAttribute("aria-setsize",e.length),this.requestContentUpdate())}},{key:"__loadingChanged",value:function(e){var t=this;this.__virtualizer&&!e&&setTimeout((function(){return t.requestContentUpdate()}))}},{key:"__focusedIndexChanged",value:function(e){this.__virtualizer&&e>=0&&(this.requestContentUpdate(),this.scrollIntoView(e))}},{key:"__rendererChanged",value:function(e,t){(e||t)&&this.requestContentUpdate()}},{key:"__createElements",value:function(e){var t=this;return kt(Array(e)).map((function(){var e=document.createElement("".concat(t.__hostTagName,"-item"));return e.addEventListener("click",t.__boundOnItemClick),e.tabIndex="-1",e.style.width="100%",e}))}},{key:"__updateElement",value:function(e,t){var n=this.items[t],r=this.focusedIndex;e.setProperties({item:n,index:this.__requestItemByIndex(n,t),label:this.getItemLabel(n),selected:this.__isItemSelected(n,this.selectedItem,this.itemIdPath),renderer:this.renderer,focused:this.__isItemFocused(r,t)}),e.id="".concat(this.__hostTagName,"-item-").concat(t),e.setAttribute("role",this.__getAriaRole(t)),e.setAttribute("aria-selected",this.__getAriaSelected(r,t)),e.setAttribute("aria-posinset",t+1),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme")}},{key:"__onItemClick",value:function(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}},{key:"__patchWheelOverScrolling",value:function(){var e=this;this.$.selector.addEventListener("wheel",(function(t){var n=0===e.scrollTop,r=e.scrollHeight-e.scrollTop-e.clientHeight<=1;(n&&t.deltaY<0||r&&t.deltaY>0)&&t.preventDefault()}))}},{key:"_viewportTotalPaddingBottom",get:function(){if(void 0===this._cachedViewportTotalPaddingBottom){var e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map((function(e){return parseInt(e,10)})).reduce((function(e,t){return e+t}))}return this._cachedViewportTotalPaddingBottom}},{key:"__requestItemByIndex",value:function(e,t){return e instanceof Ot&&void 0!==t&&this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t,currentScrollerPos:this._oldScrollerPosition}})),t}},{key:"_visibleItemsCount",value:function(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}],r=[{key:"is",get:function(){return"vaadin-combo-box-scroller"}},{key:"template",get:function(){return(0,L.dy)(wt||(wt=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n \n \n \n
\n "])))}},{key:"properties",get:function(){return{items:{type:Array,observer:"__itemsChanged"},focusedIndex:{type:Number,observer:"__focusedIndexChanged"},loading:{type:Boolean,observer:"__loadingChanged"},opened:{type:Boolean,observer:"__openedChanged"},selectedItem:{type:Object},itemIdPath:{type:String},comboBox:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,observer:"__rendererChanged"},theme:{type:String}}}}],n&&Pt(t.prototype,n),r&&Pt(t,r),i}(L.H3);customElements.define(At.is,At);n(48175);var zt,Vt=n(87156),Lt=n(74460),Bt=new Set,Dt={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(Bt.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():Lt.my||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=(0,Vt.vz)(e).rootTarget;t!==this&&(t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function t(){document.removeEventListener("readystatechange",t),e()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(e){e!==this&&e._findParent()}),this):(Bt.forEach((function(e){e!==this&&e._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?Bt.delete(this):Bt.add(this)}};function Mt(e){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}function Nt(e,t){for(var n=0;n=0)return this._items[e]}},{key:"indexOfLabel",value:function(e){if(this._items&&e)for(var t=0;t\n '])))}},{key:"properties",get:function(){return{opened:Boolean,positionTarget:{type:Object,observer:"_positionTargetChanged"},renderer:Function,loading:{type:Boolean,value:!1,reflectToAttribute:!0},theme:String,_selectedItem:{type:Object},_items:{type:Array},_focusedIndex:{type:Number,value:-1},focusedItem:{type:String,computed:"_getFocusedItem(_focusedIndex)"},_itemLabelPath:{type:String,value:"label"},_itemValuePath:{type:String,value:"value"},_scroller:Object,_itemIdPath:String,_overlayOpened:{type:Boolean,observer:"_openedChanged"}}}},{key:"observers",get:function(){return["_openedOrItemsChanged(opened, _items, loading)","__updateScroller(_scroller, _items, opened, loading, _selectedItem, _itemIdPath, _focusedIndex, renderer, theme)"]}}],n&&Nt(t.prototype,n),r&&Nt(t,r),i}((0,n(33367).P)(Dt,L.H3));customElements.define(Wt.is,Wt);var Yt=n(67130);function Gt(e){return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gt(e)}function Xt(e){return function(e){if(Array.isArray(e))return Kt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n :host([opened]) {\n pointer-events: auto;\n }\n \n\n \n\n \n '])))}},{key:"properties",get:function(){return{attrForValue:{type:String,value:"value"}}}}],(n=[{key:"clearElement",get:function(){return this.querySelector(".clear-button")}},{key:"ready",value:function(){Wn(Kn(i.prototype),"ready",this).call(this),this._toggleElement=this.querySelector(".toggle-button")}},{key:"connectedCallback",value:function(){Wn(Kn(i.prototype),"connectedCallback",this).call(this),this._setInputElement(this.querySelector("vaadin-text-field,.input")),this._revertInputValue()}},{key:"checkValidity",value:function(){return this.inputElement.validate?this.inputElement.validate():Wn(Kn(i.prototype),"checkValidity",this).call(this)}},{key:"_propertyForValue",get:function(){return(0,Yt.z)(this.attrForValue)}},{key:"_isClearButton",value:function(e){return Wn(Kn(i.prototype),"_isClearButton",this).call(this,e)||"input"===e.type&&!e.isTrusted||"clear-button"===e.composedPath()[0].getAttribute("part")}},{key:"_onChange",value:function(e){Wn(Kn(i.prototype),"_onChange",this).call(this,e),this._isClearButton(e)&&this._clear()}}])&&Un(t.prototype,n),r&&Un(t,r),i}(function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&en(e,t)}(i,e);var t,n,r,o=tn(i);function i(){return Jt(this,i),o.apply(this,arguments)}return t=i,n=[{key:"_dataProviderClearFilter",value:function(e,t,n){!e||this.loading||!this.filter||t&&this.autoOpenDisabled&&n===this.filter||(this.size=void 0,this._pendingRequests={},this.filter="",this.clearCache())}},{key:"ready",value:function(){var e=this;Zt(rn(i.prototype),"ready",this).call(this),this.clearCache(),this.$.dropdown.addEventListener("index-requested",(function(t){var n=t.detail.index,r=t.detail.currentScrollerPos,o=Math.floor(1.5*e.pageSize);if(!e._shouldSkipIndex(n,o,r)&&void 0!==n){var i=e._getPageForIndex(n);e._shouldLoadPage(i)&&e._loadPage(i)}}))}},{key:"_dataProviderFilterChanged",value:function(){this._shouldFetchData()&&(this.size=void 0,this._pendingRequests={},this.clearCache())}},{key:"_shouldFetchData",value:function(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}},{key:"_ensureFirstPage",value:function(e){e&&this._shouldLoadPage(0)&&this._loadPage(0)}},{key:"_shouldSkipIndex",value:function(e,t,n){return 0!==n&&e>=n-t&&e<=n+t}},{key:"_shouldLoadPage",value:function(e){if(!this.filteredItems||this._forceNextRequest)return this._forceNextRequest=!1,!0;var t=this.filteredItems[e*this.pageSize];return void 0!==t?t instanceof Ot:void 0===this.size}},{key:"_loadPage",value:function(e){var t=this;if(!this._pendingRequests[e]&&this.dataProvider){this.loading=!0;var n={page:e,pageSize:this.pageSize,filter:this.filter},r=function r(o,i){if(t._pendingRequests[e]===r){if(t.filteredItems)t.splice.apply(t,["filteredItems",n.page*n.pageSize,o.length].concat(Xt(o)));else{var a=[];a.splice.apply(a,[n.page*n.pageSize,o.length].concat(Xt(o))),t.filteredItems=a}t._isValidValue(t.value)&&t._getItemValue(t.selectedItem)!==t.value&&t._selectItemForValue(t.value),t.opened||t.hasAttribute("focused")||t._commitValue(),t.size=i,delete t._pendingRequests[e],0===Object.keys(t._pendingRequests).length&&(t.loading=!1)}};this._pendingRequests[e]||(this._pendingRequests[e]=r,this.dataProvider(n,r))}}},{key:"_getPageForIndex",value:function(e){return Math.floor(e/this.pageSize)}},{key:"clearCache",value:function(){if(this.dataProvider){this._pendingRequests={};for(var e=[],t=0;t<(this.size||0);t++)e.push(this.__placeHolder);this.filteredItems=e,this._shouldFetchData()?this._loadPage(0):this._forceNextRequest=!0}}},{key:"_sizeChanged",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(this.filteredItems||[]).slice(0,e),n=0;n 0");this.clearCache()}},{key:"_dataProviderChanged",value:function(e,t){var n=this;this._ensureItemsOrDataProvider((function(){n.dataProvider=t}))}},{key:"_ensureItemsOrDataProvider",value:function(e){if(void 0!==this.items&&void 0!==this.dataProvider)throw e(),new Error("Using `items` and `dataProvider` together is not supported");this.dataProvider&&!this.filteredItems&&(this.filteredItems=[])}},{key:"_warnDataProviderValue",value:function(e,t){if(e&&""!==t&&(void 0===this.selectedItem||null===this.selectedItem)){var n=this._indexOfValue(t,this.filteredItems);(n<0||!this._getItemLabel(this.filteredItems[n]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}},{key:"_flushPendingRequests",value:function(e){if(this._pendingRequests)for(var t=Math.ceil(e/this.pageSize),n=Object.keys(this._pendingRequests),r=0;r=t&&this._pendingRequests[o]([],e)}}}],r=[{key:"properties",get:function(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},size:{type:Number,observer:"_sizeChanged"},dataProvider:{type:Object,observer:"_dataProviderChanged"},_pendingRequests:{value:function(){return{}}},__placeHolder:{value:new Ot}}}},{key:"observers",get:function(){return["_dataProviderFilterChanged(filter, dataProvider)","_dataProviderClearFilter(dataProvider, opened, value)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}}],n&&Qt(t.prototype,n),r&&Qt(t,r),i}(e)}((Jn=(0,v.Tb)(L.H3),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bn(e,t)}(i,e);var t,n,r,o=Dn(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this))._boundOnFocusout=e._onFocusout.bind(Nn(e)),e._boundOverlaySelectedItemChanged=e._overlaySelectedItemChanged.bind(Nn(e)),e._boundOnClearButtonMouseDown=e.__onClearButtonMouseDown.bind(Nn(e)),e._boundClose=e.close.bind(Nn(e)),e._boundOnOpened=e._onOpened.bind(Nn(e)),e._boundOnClick=e._onClick.bind(Nn(e)),e._boundOnOverlayTouchAction=e._onOverlayTouchAction.bind(Nn(e)),e._boundOnTouchend=e._onTouchend.bind(Nn(e)),e}return t=i,n=[{key:"_inputElementValue",get:function(){return this.inputElement?this.inputElement[this._propertyForValue]:void 0},set:function(e){this.inputElement&&(this.inputElement[this._propertyForValue]=e)}},{key:"_inputElementChanged",value:function(e){Ln(Hn(i.prototype),"_inputElementChanged",this).call(this,e),e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}},{key:"ready",value:function(){var e=this;Ln(Hn(i.prototype),"ready",this).call(this),this.addEventListener("focusout",this._boundOnFocusout),this._lastCommittedValue=this.value,this.$.dropdown.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this.addEventListener("vaadin-combo-box-dropdown-closed",this._boundClose),this.addEventListener("vaadin-combo-box-dropdown-opened",this._boundOnOpened),this.addEventListener("click",this._boundOnClick),this.$.dropdown.addEventListener("vaadin-overlay-touch-action",this._boundOnOverlayTouchAction),this.addEventListener("touchend",this._boundOnTouchend);var t,n=function(){requestAnimationFrame((function(){e.$.dropdown.$.overlay.bringToFront()}))};this.addEventListener("mousedown",n),this.addEventListener("touchstart",n),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn("WARNING: inside <".concat(t.localName,"> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility."))}},{key:"requestContentUpdate",value:function(){this.$.dropdown._scroller&&(this.$.dropdown._scroller.requestContentUpdate(),this._getItemElements().forEach((function(e){e.requestContentUpdate()})))}},{key:"open",value:function(){this.disabled||this.readonly||(this.opened=!0)}},{key:"close",value:function(){this.opened=!1}},{key:"_focusedIndexChanged",value:function(e,t){void 0!==t&&this._updateActiveDescendant(e)}},{key:"_updateActiveDescendant",value:function(e){var t=this.inputElement;if(t){var n=this._getItemElements().find((function(t){return t.index===e}));n?t.setAttribute("aria-activedescendant",n.id):t.removeAttribute("aria-activedescendant")}}},{key:"_openedChanged",value:function(e,t){if(void 0!==t){e?(this._openedWithFocusRing=this.hasAttribute("focus-ring"),this.hasAttribute("focused")||ve||this.focus()):(this._onClosed(),this._openedWithFocusRing&&this.hasAttribute("focused")&&this.setAttribute("focus-ring",""));var n=this.inputElement;n&&(n.setAttribute("aria-expanded",!!e),e?n.setAttribute("aria-controls",this.$.dropdown.scrollerId):n.removeAttribute("aria-controls"))}}},{key:"_onOverlayTouchAction",value:function(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}},{key:"_isClearButton",value:function(e){return e.composedPath()[0]===this.clearElement}},{key:"_handleClearButtonClick",value:function(e){e.preventDefault(),this._clear(),this.opened&&this.requestContentUpdate()}},{key:"_onClick",value:function(e){this._closeOnBlurIsPrevented=!0;var t=e.composedPath();this._isClearButton(e)?this._handleClearButtonClick(e):t.indexOf(this._toggleElement)>-1?this.opened?this.close():this.open():this.autoOpenDisabled||this.open(),this._closeOnBlurIsPrevented=!1}},{key:"_onKeyDown",value:function(e){40===e.keyCode?(this._closeOnBlurIsPrevented=!0,this._onArrowDown(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):38===e.keyCode?(this._closeOnBlurIsPrevented=!0,this._onArrowUp(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):13===e.keyCode?this._onEnter(e):27===e.keyCode&&this._onEscape(e)}},{key:"_getItemLabel",value:function(e){return this.$.dropdown.getItemLabel(e)}},{key:"_getItemValue",value:function(e){var t=e&&this.itemValuePath?this.get(this.itemValuePath,e):void 0;return void 0===t&&(t=e?e.toString():""),t}},{key:"_onArrowDown",value:function(){if(this.opened){var e=this._getOverlayItems();e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}},{key:"_onArrowUp",value:function(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{var e=this._getOverlayItems();e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}},{key:"_prefillFocusedItemLabel",value:function(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this.$.dropdown.focusedItem),this._markAllSelectionRange())}},{key:"_setSelectionRange",value:function(e,t){this.hasAttribute("focused")&&this.inputElement.setSelectionRange(e,t)}},{key:"_markAllSelectionRange",value:function(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}},{key:"_clearSelectionRange",value:function(){if(void 0!==this._inputElementValue){var e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}},{key:"_closeOrCommit",value:function(){this.opened||this.loading?this.close():this._commitValue()}},{key:"_onEnter",value:function(e){(this.opened||this.autoOpenDisabled)&&(this.allowCustomValue||""===this._inputElementValue||this._focusedIndex>-1)&&(this._closeOrCommit(),e.preventDefault(),e.stopPropagation())}},{key:"_onEscape",value:function(e){this.autoOpenDisabled?this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.clearButtonVisible&&!this.opened&&this.value&&(e.stopPropagation(),this._clear()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(e.stopPropagation(),this._clear())}},{key:"_toggleElementChanged",value:function(e){var t=this;e&&(e.addEventListener("mousedown",(function(e){return e.preventDefault()})),e.addEventListener("click",(function(){ve&&!t.hasAttribute("focused")&&document.activeElement.blur()})))}},{key:"_clear",value:function(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}},{key:"cancel",value:function(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}},{key:"_onOpened",value:function(){var e=this;setTimeout((function(){return e._resizeDropdown()}),1),requestAnimationFrame((function(){e.$.dropdown.adjustScrollPosition(),e._updateActiveDescendant(e._focusedIndex)})),this._lastCommittedValue=this.value}},{key:"_onClosed",value:function(){this.opened&&this.close(),this.loading&&!this.allowCustomValue||this._commitValue()}},{key:"_commitValue",value:function(){var e=this,t=this._getOverlayItems();if(t&&this._focusedIndex>-1){var n=t[this._focusedIndex];this.selectedItem!==n&&(this.selectedItem=n),this._inputElementValue=this._getItemLabel(this.selectedItem)}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{var r=function(e){return e&&e.toLowerCase&&e.toLowerCase()},o=[].concat(An(this.filteredItems||[]),[this.selectedItem]).find((function(t){return r(e._getItemLabel(t))===r(e._inputElementValue)}));if(this.allowCustomValue&&!o){var i=new CustomEvent("custom-value-set",{detail:this._inputElementValue,composed:!0,cancelable:!0,bubbles:!0});if(this.dispatchEvent(i),!i.defaultPrevented){var a=this._inputElementValue;this._selectItemForValue(a),this.value=a}}else this.allowCustomValue||this.opened||!o?this._inputElementValue=this.selectedItem?this._getItemLabel(this.selectedItem):this.value||"":this.value=this._getItemValue(o)}this._detectAndDispatchChange(),this._clearSelectionRange(),this.dataProvider||(this.filter="")}},{key:"_propertyForValue",get:function(){return"value"}},{key:"_onInput",value:function(e){this.opened||this._isClearButton(e)||this.autoOpenDisabled||this.open();var t=this._inputElementValue;this.filter===t?this._filterChanged(this.filter,this.itemValuePath,this.itemLabelPath):this.filter=t}},{key:"_onChange",value:function(e){e.stopPropagation()}},{key:"_itemLabelPathChanged",value:function(e){"string"!=typeof e&&console.error("You should set itemLabelPath to a valid string")}},{key:"_filterChanged",value:function(e,t,n){void 0!==e&&(this.$.dropdown._scrollIntoView(0),this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged({path:"filteredItems",value:this.filteredItems},t,n))}},{key:"_loadingChanged",value:function(e){e&&(this._focusedIndex=-1)}},{key:"_revertInputValue",value:function(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}},{key:"_revertInputValueToValue",value:function(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}},{key:"_resizeDropdown",value:function(){this.$.dropdown.notifyResize()}},{key:"_selectedItemChanged",value:function(e){if(null==e)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(""!==this.value),this._inputElementValue=this.value);else{var t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e)}this.$.dropdown._selectedItem=e;var n=this._getOverlayItems();this.filteredItems&&n&&(this._focusedIndex=this.filteredItems.indexOf(e))}},{key:"_valueChanged",value:function(e,t){var n;""===e&&void 0===t||(this._isValidValue(e)?(this._getItemValue(this.selectedItem)!==e?this._selectItemForValue(e):n=this.selectedItem,!n&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(""!==this.value)):this.selectedItem=null,this._lastCommittedValue=void 0)}},{key:"_detectAndDispatchChange",value:function(){this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}},{key:"_itemsChanged",value:function(e,t){var n=this;this._ensureItemsOrDataProvider((function(){n.items=t}))}},{key:"_itemsOrPathsChanged",value:function(e){if("items"===e.path||"items.splices"===e.path){this.items?this.filteredItems=this.items.slice(0):this.__previousItems&&(this.filteredItems=null);var t=this._indexOfValue(this.value,this.items);this._focusedIndex=t;var n=t>-1&&this.items[t];n&&(this.selectedItem=n)}this.__previousItems=e.value}},{key:"_filteredItemsChanged",value:function(e){if(("filteredItems"===e.path||"filteredItems.splices"===e.path)&&(this._setOverlayItems(this.filteredItems),this._focusedIndex=this.opened||this.autoOpenDisabled?this.$.dropdown.indexOfLabel(this.filter):this._indexOfValue(this.value,this.filteredItems),null===this.selectedItem&&this._focusedIndex>=0)){var t=this.filteredItems[this._focusedIndex];this._getItemValue(t)===this.value&&this._selectItemForValue(this.value)}}},{key:"_filterItems",value:function(e,t){var n=this;if(!e)return e;var r=e.filter((function(e){return t=t?t.toString().toLowerCase():"",n._getItemLabel(e).toString().toLowerCase().indexOf(t)>-1}));return r}},{key:"_selectItemForValue",value:function(e){var t=this._indexOfValue(e,this.filteredItems),n=this.selectedItem;this.selectedItem=t>=0?this.filteredItems[t]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===n&&this._selectedItemChanged(this.selectedItem)}},{key:"_getItemElements",value:function(){return Array.from(this.$.dropdown._scroller.querySelectorAll("vaadin-combo-box-item"))}},{key:"_getOverlayItems",value:function(){return this.$.dropdown._items}},{key:"_setOverlayItems",value:function(e){this.$.dropdown.set("_items",e)}},{key:"_indexOfValue",value:function(e,t){if(t&&this._isValidValue(e))for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:{};if(e){var r=customElements.get(e);r&&Object.prototype.hasOwnProperty.call(r,"__finalized")&&console.warn('The custom element definition for "'.concat(e,'"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.'))}t=I(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(e,t,n):x.push({themeFor:e,styles:t,include:n.include,moduleId:n.moduleId})}function S(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():x}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;return 0===e.indexOf("lumo-")||0===e.indexOf("material-")?t=1:0===e.indexOf("vaadin-")&&(t=2),t}function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e instanceof r.c3?t.push(e):Array.isArray(e)?e.forEach((function(e){return I(e,t)})):console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),t}function C(e){var t=[];return e.include&&[].concat(e.include).forEach((function(e){var n=S().find((function(t){return t.moduleId===e}));n?t.push.apply(t,w(C(n)).concat(w(n.styles))):console.warn("Included moduleId ".concat(e," not found in style registry"))}),e.styles),t}function R(e){var t=e+"-default-theme",n=S().filter((function(n){return n.moduleId!==t&&function(e,t){return(e||"").split(" ").some((function(e){return new RegExp("^"+e.split("*").join(".*")+"$").test(t)}))}(n.themeFor,e)})).map((function(e){return Object.assign({},e,{styles:[].concat(w(C(e)),w(e.styles)),includePriority:P(e.moduleId)})})).sort((function(e,t){return t.includePriority-e.includePriority}));return n.length>0?n:S().filter((function(e){return e.moduleId===t}))}var E=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(i,e);var t,n,r,o=_(i);function i(){return p(this,i),o.apply(this,arguments)}return t=i,r=[{key:"finalize",value:function(){v(g(i),"finalize",this).call(this);var e=this.prototype._template;if(e&&!e.__themes){var t=Object.getPrototypeOf(this.prototype)._template,n=(t?t.__themes:[])||[];e.__themes=[].concat(w(n),w(R(this.is))),function(e,t){var n=document.createElement("style");n.innerHTML=e.filter((function(t,n){return n===e.lastIndexOf(t)})).map((function(e){return e.cssText})).join("\n"),t.content.appendChild(n)}(e.__themes.reduce((function(e,t){return[].concat(w(e),w(t.styles))}),[]),e)}}},{key:"finalizeStyles",value:function(e){return R(this.is).reduce((function(e,t){return[].concat(w(e),w(t.styles))}),[]).concat(e)}}],(n=null)&&y(t.prototype,n),r&&y(t,r),i}(h(e))}},19596:function(e,t,n){n.d(t,{s:function(){return O}});var r=n(81563),o=n(38941);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(i);try{for(s.s();!(a=s.n()).done;){var l=a.value;null===(o=(r=l)._$AO)||void 0===o||o.call(r,n,!1),e(l,n)}}catch(u){s.e(u)}finally{s.f()}return!0},b=function(e){var t,n;do{if(void 0===(t=e._$AM))break;(n=t._$AN).delete(e),e=t}while(0===(null==n?void 0:n.size))},_=function(e){for(var t;t=e._$AM;e=t){var n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),w(t)}};function m(e){void 0!==this._$AN?(b(this),this._$AM=e,_(this)):this._$AM=e}function g(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(r))for(var i=n;i1&&void 0!==arguments[1])||arguments[1];e!==this.isConnected&&(this.isConnected=e,e?null===(t=this.reconnected)||void 0===t||t.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),r&&(v(this,e),b(this))}},{key:"setValue",value:function(e){if((0,r.OR)(this._$Ct))this._$Ct._$AI(e,this);else{var t=a(this._$Ct._$AH);t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}},{key:"disconnected",value:function(){}},{key:"reconnected",value:function(){}}],n&&l(t.prototype,n),o&&l(t,o),h}(o.Xe)},76902:function(e,t,n){n.d(t,{t7:function(){return k}});var r=n(37500),o=n(57835);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&othis._$Cft);u++){var c=l(u);if("object"===d(c))return c.v}return r.Jb}},{key:"disconnected",value:function(){this._$CG.disconnect(),this._$CK.pause()}},{key:"reconnected",value:function(){this._$CG.reconnect(this),this._$CK.resume()}}],n&&y(t.prototype,n),o&&y(t,o),a}(a.s),x=(0,o.XM)(O)},69505:function(e,t,n){n.d(t,{DD:function(){return S},Yj:function(){return D},IX:function(){return M},hu:function(){return A},f0:function(){return L},is:function(){return z},i0:function(){return N},Rx:function(){return $},Ry:function(){return F},jt:function(){return q},lF:function(){return X},Z_:function(){return U},G0:function(){return Y}});var r=["message"];function o(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e){return function(e){if(Array.isArray(e))return y(e)}(e)||p(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function p(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t="function"==typeof Map?new Map:void 0;return g=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return w(e,arguments,k(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),x(r,e)},g(e)}function w(e,t,n){return w=O()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&x(o,n.prototype),o},w.apply(null,arguments)}function O(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function x(e,t){return x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},x(e,t)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(i,e);var t,n,o=(t=i,n=O(),function(){var e,r=k(t);if(n){var o=k(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return _(this,e)});function i(e,t){var n,a;b(this,i);var s=e.message,l=v(e,r),u=e.path,c=0===u.length?s:"At path: "+u.join(".")+" -- "+s;return n=o.call(this,c),Object.assign(m(n),l),n.name=n.constructor.name,n.failures=function(){var n;return null!=(n=a)?n:a=[e].concat(h(t()))},n}return i}(g(TypeError));function P(e){return"object"===f(e)&&null!=e}function I(e){return"string"==typeof e?JSON.stringify(e):""+e}function C(e){var t=e.next(),n=t.done,r=t.value;return n?void 0:r}function R(e,t,n,r){if(!0!==e){!1===e?e={}:"string"==typeof e&&(e={message:e});var o=t.path,i=t.branch,a=n.type,s=e,l=s.refinement,u=s.message,c=void 0===u?"Expected a value of type `"+a+"`"+(l?" with refinement `"+l+"`":"")+", but received: `"+I(r)+"`":u;return Object.assign({value:r,type:a,refinement:l,key:o[o.length-1],path:o,branch:i},e,{message:c})}}function E(e,t,n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:P(u=e)&&"function"==typeof u[Symbol.iterator]||(e=[e]),o=c(e),l.prev=2,o.s();case 4:if((i=o.n()).done){l.next=12;break}if(a=i.value,!(s=R(a,t,n,r))){l.next=10;break}return l.next=10,s;case 10:l.next=4;break;case 12:l.next=17;break;case 14:l.prev=14,l.t0=l.catch(2),o.e(l.t0);case 17:return l.prev=17,o.f(),l.finish(17);case 20:case"end":return l.stop()}var u}),l,null,[[2,14,17,20]])}function j(e,t){var n,r,o,a,s,l,f,d,p,y,v,b,_,m,g,w,O,x,k,S,I,C,R,E,T,A,z,V,L=arguments;return regeneratorRuntime.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(n=L.length>2&&void 0!==L[2]?L[2]:{},r=n.path,o=void 0===r?[]:r,a=n.branch,s=void 0===a?[e]:a,l=n.coerce,f=void 0!==l&&l,d=n.mask,p=void 0!==d&&d,y={path:o,branch:s},f&&(e=t.coercer(e,y),p&&"type"!==t.type&&P(t.schema)&&P(e)&&!Array.isArray(e)))for(v in e)void 0===t.schema[v]&&delete e[v];b=!0,_=c(t.validator(e,y)),u.prev=6,_.s();case 8:if((m=_.n()).done){u.next=15;break}return g=m.value,b=!1,u.next=13,[g,void 0];case 13:u.next=8;break;case 15:u.next=20;break;case 17:u.prev=17,u.t0=u.catch(6),_.e(u.t0);case 20:return u.prev=20,_.f(),u.finish(20);case 23:w=c(t.entries(e,y)),u.prev=24,w.s();case 26:if((O=w.n()).done){u.next=53;break}x=i(O.value,3),k=x[0],S=x[1],I=x[2],C=j(S,I,{path:void 0===k?o:[].concat(h(o),[k]),branch:void 0===k?s:[].concat(h(s),[S]),coerce:f,mask:p}),R=c(C),u.prev=30,R.s();case 32:if((E=R.n()).done){u.next=43;break}if(!(T=E.value)[0]){u.next=40;break}return b=!1,u.next=38,[T[0],void 0];case 38:u.next=41;break;case 40:f&&(S=T[1],void 0===k?e=S:e instanceof Map?e.set(k,S):e instanceof Set?e.add(S):P(e)&&(e[k]=S));case 41:u.next=32;break;case 43:u.next=48;break;case 45:u.prev=45,u.t1=u.catch(30),R.e(u.t1);case 48:return u.prev=48,R.f(),u.finish(48);case 51:u.next=26;break;case 53:u.next=58;break;case 55:u.prev=55,u.t2=u.catch(24),w.e(u.t2);case 58:return u.prev=58,w.f(),u.finish(58);case 61:if(!b){u.next=80;break}A=c(t.refiner(e,y)),u.prev=63,A.s();case 65:if((z=A.n()).done){u.next=72;break}return V=z.value,b=!1,u.next=70,[V,void 0];case 70:u.next=65;break;case 72:u.next=77;break;case 74:u.prev=74,u.t3=u.catch(63),A.e(u.t3);case 77:return u.prev=77,A.f(),u.finish(77);case 80:if(!b){u.next=83;break}return u.next=83,[void 0,e];case 83:case"end":return u.stop()}}),u,null,[[6,17,20,23],[24,55,58,61],[30,45,48,51],[63,74,77,80]])}var T=function(){function e(t){var n=this;b(this,e);var r=t.type,o=t.schema,i=t.validator,a=t.refiner,s=t.coercer,l=void 0===s?function(e){return e}:s,u=t.entries,c=void 0===u?regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):u;this.type=r,this.schema=o,this.entries=c,this.coercer=l,this.validator=i?function(e,t){return E(i(e,t),t,n,e)}:function(){return[]},this.refiner=a?function(e,t){return E(a(e,t),t,n,e)}:function(){return[]}}var t,n,r;return t=e,n=[{key:"assert",value:function(e){return A(e,this)}},{key:"create",value:function(e){return function(e,t){var n=V(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"is",value:function(e){return z(e,this)}},{key:"mask",value:function(e){return function(e,t){var n=V(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return V(e,this,t)}}],n&&o(t.prototype,n),r&&o(t,r),e}();function A(e,t){var n=V(e,t);if(n[0])throw n[0]}function z(e,t){return!V(e,t)[0]}function V(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=j(e,t,n),o=C(r);if(o[0]){var i=new S(o[0],regeneratorRuntime.mark((function e(){var t,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c(r),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!(o=n.value)[0]){e.next=8;break}return e.next=8,o[0];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])})));return[i,void 0]}var a=o[1];return[void 0,a]}function L(){for(var e=arguments.length,t=new Array(e),n=0;n=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ',"\n ","\n \n ","\n \n "])),this.supervisor.localize("update_available.update_name",{name:this._name}),this._error?(0,o.dy)(O||(O=W(['',""])),this._error):"",this._version===this._version_latest?(0,o.dy)(D||(D=W(["\n ","\n
"])),this.supervisor.localize("update_available.no_update",{name:this._name})):this._updating?(0,o.dy)(R||(R=W(['\n \n \n ',"\n
"])),this.supervisor.localize("update_available.updating",{name:this._name,version:this._version_latest})):(0,o.dy)(j||(j=W(["\n ",'\n \n ","\n "])),this._changelogContent?(0,o.dy)(A||(A=W(["\n \n \n \n \n "])),this._changelogContent):"",this.supervisor.localize("update_available.description",{name:this._name,version:this._version,newest_version:this._version_latest}),["core","addon"].includes(this._updateType)?(0,o.dy)(z||(z=W(["\n \n \n \n "])),this.supervisor.localize("update_available.create_backup")):""),this._version===this._version_latest||this._updating?"":(0,o.dy)(I||(I=W(['\n \n ',"\n \n \n ","\n \n
\n "])),e?(0,o.dy)(B||(B=W(["\n =0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ',"\n ","\n \n ","\n \n "])),this.supervisor.localize("update_available.update_name",{name:this._name}),this._error?(0,o.dy)(O||(O=W(['',""])),this._error):"",this._version===this._version_latest?(0,o.dy)(D||(D=W(["\n ","\n
"])),this.supervisor.localize("update_available.no_update",{name:this._name})):this._updating?(0,o.dy)(R||(R=W(['\n \n \n ',"\n
"])),this.supervisor.localize("update_available.updating",{name:this._name,version:this._version_latest})):(0,o.dy)(j||(j=W(["\n ",'\n \n ","\n "])),this._changelogContent?(0,o.dy)(A||(A=W(["\n \n \n \n \n "])),this._changelogContent):"",this.supervisor.localize("update_available.description",{name:this._name,version:this._version,newest_version:this._version_latest}),["core","addon"].includes(this._updateType)?(0,o.dy)(z||(z=W(["\n \n \n \n "])),this.supervisor.localize("update_available.create_backup")):""),this._version===this._version_latest||this._updating?"":(0,o.dy)(I||(I=W(['\n \n ',"\n \n \n ","\n \n
\n "])),e?(0,o.dy)(B||(B=W(["\n =0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r"])),this.content,this.allowSvg,this.breaks):(0,i.dy)(C||(C=j([""])))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,i.iv)(T||(T=j(["\n :host {\n display: block;\n }\n ha-markdown-element {\n -ms-user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n }\n ha-markdown-element > *:first-child {\n margin-top: 0;\n }\n ha-markdown-element > *:last-child {\n margin-bottom: 0;\n }\n a {\n color: var(--primary-color);\n }\n img {\n max-width: 100%;\n }\n code,\n pre {\n background-color: var(--markdown-code-background-color, none);\n border-radius: 3px;\n }\n svg {\n background-color: var(--markdown-svg-background-color, none);\n color: var(--markdown-svg-color, none);\n }\n code {\n font-size: 85%;\n padding: 0.2em 0.4em;\n }\n pre code {\n padding: 0;\n }\n pre {\n padding: 16px;\n overflow: auto;\n line-height: 1.45;\n font-family: var(--code-font-family, monospace);\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n line-height: initial;\n }\n h2 {\n font-size: 1.5em;\n font-weight: bold;\n }\n "])))}}]}}),i.oi)}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[546],{93546:function(e,t,r){var n,i=r(37500),o=r(63550),a=r(47181),s=r(93217);function c(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}var l=function(){var e,t=(e=regeneratorRuntime.mark((function e(t,i,o){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n||(n=(0,s.Ud)(new Worker(new URL(r.p+r.u(971),r.b)))),e.abrupt("return",n.renderMarkdown(t,i,o));case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))});return function(e,r,n){return t.apply(this,arguments)}}();function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function f(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=D(e);if(t){var i=D(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}function m(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){v=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!k(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r"])),this.content,this.allowSvg,this.breaks):(0,i.dy)(C||(C=j([""])))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,i.iv)(T||(T=j(["\n :host {\n display: block;\n }\n ha-markdown-element {\n -ms-user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n }\n ha-markdown-element > *:first-child {\n margin-top: 0;\n }\n ha-markdown-element > *:last-child {\n margin-bottom: 0;\n }\n a {\n color: var(--primary-color);\n }\n img {\n max-width: 100%;\n }\n code,\n pre {\n background-color: var(--markdown-code-background-color, none);\n border-radius: 3px;\n }\n svg {\n background-color: var(--markdown-svg-background-color, none);\n color: var(--markdown-svg-color, none);\n }\n code {\n font-size: 85%;\n padding: 0.2em 0.4em;\n }\n pre code {\n padding: 0;\n }\n pre {\n padding: 16px;\n overflow: auto;\n line-height: 1.45;\n font-family: var(--code-font-family, monospace);\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n line-height: initial;\n }\n h2 {\n font-size: 1.5em;\n font-weight: bold;\n }\n "])))}}]}}),i.oi)}}]);
\ No newline at end of file
diff --git a/supervisor/api/panel/frontend_es5/2fd7f4ad.js.gz b/supervisor/api/panel/frontend_es5/2fd7f4ad.js.gz
new file mode 100644
index 000000000..a793b2ec9
Binary files /dev/null and b/supervisor/api/panel/frontend_es5/2fd7f4ad.js.gz differ
diff --git a/supervisor/api/panel/frontend_es5/3980f6cb.js.gz b/supervisor/api/panel/frontend_es5/3980f6cb.js.gz
deleted file mode 100644
index 11e946915..000000000
Binary files a/supervisor/api/panel/frontend_es5/3980f6cb.js.gz and /dev/null differ
diff --git a/supervisor/api/panel/frontend_es5/3b68a3c9.js b/supervisor/api/panel/frontend_es5/3b68a3c9.js
new file mode 100644
index 000000000..32c34725c
--- /dev/null
+++ b/supervisor/api/panel/frontend_es5/3b68a3c9.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[872],{49872:function(e,t,r){r.r(t);var n=r(37500),i=r(63550),o=r(14516),a=r(47181),s=r(83849),c=r(15493),l=(r(34552),r(34154)),d=r(41682),u=(r(48811),r(21625),r(1359),r(11654)),p=r(55677),f=(r(51187),r(44577),r(32594)),h=(r(98762),r(9381),r(22098),r(86248),r(20258)),m=r(26765);function v(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}var y,b,g,w,k,E,_,C=function(){var e,t=(e=regeneratorRuntime.mark((function e(t,r,n,i){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.g7)(t,{title:n.localize("common.restart_name","name",i.name),text:n.localize("dialog.restart_addon.text"),confirmText:n.localize("dialog.restart_addon.confirm_text"),dismissText:n.localize("common.cancel")});case 2:if(!e.sent){e.next=12;break}return e.prev=4,e.next=7,(0,l.P$)(r,i.slug);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),(0,m.Ys)(t,{title:n.localize("common.failed_to_restart_name","name",i.name),text:(0,d.js)(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[4,9]])})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){v(o,n,i,a,s,"next",e)}function s(e){v(o,n,i,a,s,"throw",e)}a(void 0)}))});return function(e,r,n,i){return t.apply(this,arguments)}}();function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function P(e){return function(e){if(Array.isArray(e))return Z(e)}(e)||N(e)||U(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){A(o,n,i,a,s,"next",e)}function s(e){A(o,n,i,a,s,"throw",e)}a(void 0)}))}}function S(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){return j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},j(e,t)}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=q(e);if(t){var i=q(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}function T(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return H(e)}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(){R=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!M(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ',"\n ","\n ",'\n \n \n \n ","\n \n
\n \n "])),this.supervisor.localize("addon.configuration.audio.header"),this._error?(0,n.dy)(b||(b=S(['',""])),this._error):"",this._inputDevices&&(0,n.dy)(g||(g=S(["\n ","\n "])),this.supervisor.localize("addon.configuration.audio.input"),this._setInputDevice,f.U,this._selectedInput,this._inputDevices.map((function(e){return(0,n.dy)(w||(w=S(["\n \n ","\n \n "])),e.device||"",e.name)}))),this._outputDevices&&(0,n.dy)(k||(k=S(["\n ","\n "])),this.supervisor.localize("addon.configuration.audio.output"),this._setOutputDevice,f.U,this._selectedOutput,this._outputDevices.map((function(e){return(0,n.dy)(E||(E=S(["\n ","\n "])),e.device||"",e.name)}))),this._saveSettings,this.supervisor.localize("common.save"))}},{kind:"get",static:!0,key:"styles",value:function(){return[u.Qx,p.l,(0,n.iv)(_||(_=S(["\n :host,\n ha-card {\n display: block;\n }\n paper-item {\n width: 450px;\n }\n .card-actions {\n text-align: right;\n }\n ha-select {\n width: 100%;\n }\n ha-select:last-child {\n margin-top: 8px;\n }\n "])))]}},{kind:"method",key:"willUpdate",value:function(e){$(q(a.prototype),"willUpdate",this).call(this,e),e.has("addon")&&this._addonChanged()}},{kind:"method",key:"_setInputDevice",value:function(e){var t=e.target.value;this._selectedInput=t}},{kind:"method",key:"_setOutputDevice",value:function(e){var t=e.target.value;this._selectedOutput=t}},{kind:"method",key:"_addonChanged",value:(o=O(regeneratorRuntime.mark((function e(){var t,r,n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._selectedInput=null===this.addon.audio_input?"default":this.addon.audio_input,this._selectedOutput=null===this.addon.audio_output?"default":this.addon.audio_output,!this._outputDevices){e.next=4;break}return e.abrupt("return");case 4:return t={device:"default",name:this.supervisor.localize("addon.configuration.audio.default")},e.prev=5,e.next=8,(0,h.G)(this.hass);case 8:r=e.sent,n=r.audio,i=Object.keys(n.input).map((function(e){return{device:e,name:n.input[e]}})),o=Object.keys(n.output).map((function(e){return{device:e,name:n.output[e]}})),this._inputDevices=[t].concat(P(i)),this._outputDevices=[t].concat(P(o)),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(5),this._error="Failed to fetch audio hardware",this._inputDevices=[t],this._outputDevices=[t];case 21:case"end":return e.stop()}}),e,this,[[5,16]])}))),function(){return o.apply(this,arguments)})},{kind:"method",key:"_saveSettings",value:(r=O(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,this._error=void 0,n={audio_input:"default"===this._selectedInput?null:this._selectedInput,audio_output:"default"===this._selectedOutput?null:this._selectedOutput},e.prev=4,e.next=7,(0,l.d3)(this.hass,this.addon.slug,n);case 7:if("started"!==(null===(i=this.addon)||void 0===i?void 0:i.state)){e.next=10;break}return e.next=10,C(this,this.hass,this.supervisor,this.addon);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),this._error="Failed to set addon audio device";case 15:r.progress=!1;case 16:case"end":return e.stop()}}),e,this,[[4,12]])}))),function(e){return r.apply(this,arguments)})}]}}),n.oi);var Q,Y,W,K,G,J,X,ee=r(77426);r(81545),r(13701),r(83927),r(66255),r(4019),r(18900);function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function ne(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){re(o,n,i,a,s,"next",e)}function s(e){re(o,n,i,a,s,"throw",e)}a(void 0)}))}}function ie(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t){return ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ae(e,t)}function se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ge(e);if(t){var i=ge(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ce(this,r)}}function ce(e,t){if(t&&("object"===te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return le(e)}function le(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function de(){de=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!fe(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r",'\n \n \n\n \n ',"\n ","\n ","\n
\n ",'\n \n \n ","\n \n
\n \n "])),this.addon.name,this.supervisor.localize("addon.configuration.options.header"),this._handleAction,this.supervisor.localize("common.menu"),"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",!this._canShowSchema,this._yamlMode?this.supervisor.localize("addon.configuration.options.edit_in_ui"):this.supervisor.localize("addon.configuration.options.edit_in_yaml"),this.supervisor.localize("common.reset_defaults"),e?(0,n.dy)(Y||(Y=ie([""])),this._options,this._configChanged,this.computeLabel,this.computeHelper,this._convertSchema(this._showOptional?this.addon.schema:this._filteredShchema(this.addon.options,this.addon.schema))):(0,n.dy)(W||(W=ie([" "])),this._configChanged,Pe),this._error?(0,n.dy)(K||(K=ie(['',""])),this._error):"",!this._yamlMode||this._canShowSchema&&this.addon.schema||this._valid?"":(0,n.dy)(G||(G=ie(['\n \n ',"\n \n "])),this.supervisor.localize("addon.configuration.options.invalid_yaml")),t?(0,n.dy)(J||(J=ie(['=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ',"\n
\n ","\n\n \n \n ",'\n \n \n ","\n \n \n ","\n \n
\n \n "])),this.supervisor.localize("addon.configuration.network.header"),this.supervisor.localize("addon.configuration.network.introduction"),this._error?(0,n.dy)(Ee||(Ee=ze(['',""])),this._error):"",this._config,this._configChanged,this._computeLabel,this._computeHelper,this._createSchema(this._config,this._showOptional,(null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced)||!1),r?(0,n.dy)(_e||(_e=ze(['=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r"])));var e=this.addon.options&&Object.keys(this.addon.options).length||this.addon.schema&&Object.keys(this.addon.schema).length;return(0,n.dy)(Je||(Je=at(['\n \n ',"\n
\n "])),e||this.addon.network||this.addon.audio?(0,n.dy)(Xe||(Xe=at(["\n ","\n ","\n ","\n "])),e?(0,n.dy)(et||(et=at(["\n \n "])),this.hass,this.addon,this.supervisor):"",this.addon.network?(0,n.dy)(tt||(tt=at(["\n \n "])),this.hass,this.addon,this.supervisor):"",this.addon.audio?(0,n.dy)(rt||(rt=at(["\n \n "])),this.hass,this.addon,this.supervisor):""):this.supervisor.localize("addon.configuration.no_configuration"))}},{kind:"get",static:!0,key:"styles",value:function(){return[u.Qx,p.l,(0,n.iv)(nt||(nt=at(["\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n }\n "])))]}}]}}),n.oi),r(93546);function At(e){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},At(e)}function Ot(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function St(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function Dt(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){St(o,n,i,a,s,"next",e)}function s(e){St(o,n,i,a,s,"throw",e)}a(void 0)}))}}function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zt(e,t){return zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},zt(e,t)}function Tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$t(e);if(t){var i=$t(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ht(this,r)}}function Ht(e,t){if(t&&("object"===At(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Rt(e)}function Rt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vt(){Vt=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!It(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ','\n \n ',"\n
\n \n \n "])),this._error?(0,n.dy)(_t||(_t=Ot(['',""])),this._error):"",this._content?(0,n.dy)(Ct||(Ct=Ot([""])),this._content):(0,n.dy)(xt||(xt=Ot([""])))):(0,n.dy)(kt||(kt=Ot([""])))}},{kind:"get",static:!0,key:"styles",value:function(){return[u.Qx,p.l,(0,n.iv)(Pt||(Pt=Ot(["\n ha-card {\n display: block;\n }\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n ha-markdown {\n padding: 16px;\n }\n "])))]}},{kind:"method",key:"_loadData",value:(r=Dt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,e.prev=1,e.next=4,(0,l.ii)(this.hass,this.addon.slug);case 4:this._content=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),this._error=this.supervisor.localize("addon.documentation.get_logs","error",(0,d.js)(e.t0));case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return r.apply(this,arguments)})}]}}),n.oi);var qt,Qt,Yt=r(8636),Wt=r(63864);function Kt(e){return Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(e)}function Gt(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function Jt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Xt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function er(e,t){return er=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},er(e,t)}function tr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ir(e);if(t){var i=ir(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rr(this,r)}}function rr(e,t){if(t&&("object"===Kt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return nr(e)}function nr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ir(e){return ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ir(e)}function or(){or=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!cr(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),this.progress,this._buttonTapped,this.disabled)}},{kind:"method",key:"_buttonTapped",value:(r=regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.progress=!0,t={method:this.method,path:this.path,data:this.data},e.prev=2,e.next=5,this.hass.callApi(this.method,this.path,this.data);case 5:r=e.sent,this.progress=!1,this._progressButton.actionSuccess(),t.success=!0,t.response=r,e.next=18;break;case 12:e.prev=12,e.t0=e.catch(2),this.progress=!1,this._progressButton.actionError(),t.success=!1,t.response=e.t0;case 18:(0,a.B)(this,"hass-api-called",t);case 19:case"end":return e.stop()}}),e,this,[[2,12]])})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Gt(o,n,i,a,s,"next",e)}function s(e){Gt(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Qt||(Qt=Jt(["\n :host([disabled]) {\n pointer-events: none;\n }\n "])))}}]}}),n.oi);customElements.define("ha-call-api-button",fr);r(88324),r(85124),r(14089),r(52039);var hr,mr,vr,yr,br,gr,wr,kr,Er,_r,Cr,xr,Pr,Ar,Or,Sr,Dr,jr,zr,Tr,Hr,Rr,Vr,Lr,Mr,Ir,Fr,Br,Ur,Zr,Nr,$r,qr,Qr,Yr,Wr,Kr,Gr,Jr,Xr,en,tn=r(70203),rn=(r(46586),r(21050),function(e,t){(0,a.B)(e,"show-dialog",{dialogTag:"dialog-hassio-markdown",dialogImport:function(){return r.e(884).then(r.bind(r,56884))},dialogParams:t})}),nn=(r(23432),r(34450));function on(e){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},on(e)}function an(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function sn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){an(o,n,i,a,s,"next",e)}function s(e){an(o,n,i,a,s,"throw",e)}a(void 0)}))}}function cn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e,t){return dn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},dn(e,t)}function un(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_n(e);if(t){var i=_n(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pn(this,r)}}function pn(e,t){if(t&&("object"===on(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fn(e)}function fn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hn(){hn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!yn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n
\n ','\n
\n\n
\n ',"\n\n \n \n\n \n ',".
\n ",'\n
\n \n
\n ',"\n ","\n
\n
\n ","\n
\n
\n ","\n ",'\n \n \n
\n ',"\n
\n
\n ","\n
\n
\n \n\n ","\n "])),this.addon.update_available?(0,n.dy)(mr||(mr=cn(["\n \n "])),this.hass,this.narrow,this.supervisor,this.addon.slug,this._updateComplete):"",this.addon.protected?"":(0,n.dy)(vr||(vr=cn(['\n \n (',")\n \n "])),this.addon.version,this._openChangelog,this.supervisor.localize("addon.dashboard.changelog")):(0,n.dy)(Er||(Er=cn(['",""])),this._openChangelog,this.supervisor.localize("addon.dashboard.changelog")),"stable"!==this.addon.stage?(0,n.dy)(_r||(_r=cn([" \n \n \n \n \n \n \n \n \n \n \n ',""])),this.addon.url,this.addon.name)),this.addon.logo?(0,n.dy)(Rr||(Rr=cn(['\n
\n '])),this.addon.slug):"",this.addon.version?(0,n.dy)(Vr||(Vr=cn(["\n \n \n \n ','\n \n \n ',"\n \n \n \n\n ","\n ","\n ","\n ","\n
\n "])),(0,Yt.$)({"addon-options":!0,started:"started"===this.addon.state}),this.narrow,this.supervisor.localize("addon.dashboard.option.boot.title"),this.supervisor.localize("addon.dashboard.option.boot.description"),this._startOnBootToggled,"auto"===this.addon.boot,"once"!==this.addon.startup?(0,n.dy)(Lr||(Lr=cn(["\n \n \n ','\n \n \n ',"\n \n \n \n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.watchdog.title"),this.supervisor.localize("addon.dashboard.option.watchdog.description"),this._watchdogToggled,this.addon.watchdog):"",this.addon.auto_update||null!==(o=this.hass.userData)&&void 0!==o&&o.showAdvanced?(0,n.dy)(Mr||(Mr=cn(["\n \n \n ','\n \n \n ',"\n \n \n \n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.auto_update.title"),this.supervisor.localize("addon.dashboard.option.auto_update.description"),this._autoUpdateToggled,this.addon.auto_update):"",!this._computeCannotIngressSidebar&&this.addon.ingress?(0,n.dy)(Ir||(Ir=cn(["\n \n \n ','\n \n \n ',"\n \n \n \n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.ingress_panel.title"),this.supervisor.localize("addon.dashboard.option.ingress_panel.description"),this._panelToggled,this.addon.ingress_panel):"",this._computeUsesProtectedOptions?(0,n.dy)(Fr||(Fr=cn(["\n \n \n ','\n \n \n ',"\n \n \n \n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.protected.title"),this.supervisor.localize("addon.dashboard.option.protected.description"),this._protectionToggled,this.addon.protected):""):"","started"===this.addon.state?(0,n.dy)(Br||(Br=cn(["\n \n ','\n \n ',"
\n \n ",""])),this.narrow,this.supervisor.localize("addon.dashboard.hostname"),this.addon.hostname,s.map((function(e){var t;return(0,n.dy)(Ur||(Ur=cn(["\n \n "])),e.description,null!==(t=e.value)&&void 0!==t?t:0,e.tooltip)}))):"",this._error?(0,n.dy)(Zr||(Zr=cn(['',""])),this._error):"",this.addon.version||!a||this.addon.available?"":(0,nn.I)(this.supervisor.info.supported_arch,this.addon.arch)?(0,n.dy)($r||($r=cn(['\n \n ',"\n \n "])),this.supervisor.localize("addon.dashboard.not_available_version","core_version_installed",this.supervisor.core.version,"core_version_needed",a.homeassistant)):(0,n.dy)(Nr||(Nr=cn(['\n \n ',"\n \n "])),this.supervisor.localize("addon.dashboard.not_available_arch")),this.addon.version?this._computeIsRunning?(0,n.dy)(qr||(qr=cn(['\n \n ",'\n \n \n ","\n \n "])),this._stopClicked,this.supervisor.localize("addon.dashboard.stop"),this._restartClicked,this.supervisor.localize("addon.dashboard.restart")):(0,n.dy)(Qr||(Qr=cn(["\n \n ","\n \n "])),this._startClicked,this.supervisor.localize("addon.dashboard.start")):(0,n.dy)(Yr||(Yr=cn(["\n \n ","\n \n "])),!this.addon.available,this._installClicked,this.supervisor.localize("addon.dashboard.install")),this.addon.version?(0,n.dy)(Wr||(Wr=cn([" ","\n ",'\n \n ","\n \n ",""])),this._computeShowWebUI?(0,n.dy)(Kr||(Kr=cn(["\n \n \n ',"\n \n \n "])),this._pathWebui,this.supervisor.localize("addon.dashboard.open_web_ui")):"",this._computeShowIngressUI?(0,n.dy)(Gr||(Gr=cn(["\n \n ","\n \n "])),this._openIngress,this.supervisor.localize("addon.dashboard.open_web_ui")):"",this._uninstallClicked,this.supervisor.localize("addon.dashboard.uninstall"),this.addon.build?(0,n.dy)(Jr||(Jr=cn(['\n \n ',"\n \n "])),this.hass,this.addon.slug,this.supervisor.localize("addon.dashboard.rebuild")):""):"",this.addon.long_description?(0,n.dy)(Xr||(Xr=cn(['\n \n \n
'),"icon_experimental",''),"icon_deprecated",'')):this.supervisor.localize("addon.dashboard.capability.".concat(t,".description"))})}},{kind:"get",key:"_computeIsRunning",value:function(){var e;return"started"===(null===(e=this.addon)||void 0===e?void 0:e.state)}},{kind:"get",key:"_pathWebui",value:function(){return this.addon.webui&&this.addon.webui.replace("[HOST]",document.location.hostname)}},{kind:"get",key:"_computeShowWebUI",value:function(){return!this.addon.ingress&&this.addon.webui&&this._computeIsRunning}},{kind:"method",key:"_openIngress",value:function(){(0,s.c)("/hassio/ingress/".concat(this.addon.slug))}},{kind:"get",key:"_computeShowIngressUI",value:function(){return this.addon.ingress&&this._computeIsRunning}},{kind:"get",key:"_computeCannotIngressSidebar",value:function(){return!this.addon.ingress||!(0,Wt.I)(this.hass.config.version,0,92)}},{kind:"get",key:"_computeUsesProtectedOptions",value:function(){return this.addon.docker_api||this.addon.full_access||this.addon.host_pid}},{kind:"method",key:"_startOnBootToggled",value:(E=sn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={boot:"auto"===this.addon.boot?"manual":"auto"},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return E.apply(this,arguments)})},{kind:"method",key:"_watchdogToggled",value:(k=sn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={watchdog:!this.addon.watchdog},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return k.apply(this,arguments)})},{kind:"method",key:"_autoUpdateToggled",value:(w=sn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={auto_update:!this.addon.auto_update},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return w.apply(this,arguments)})},{kind:"method",key:"_protectionToggled",value:(g=sn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={protected:!this.addon.protected},e.prev=2,e.next=5,(0,l.NI)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"security"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return g.apply(this,arguments)})},{kind:"method",key:"_panelToggled",value:(b=sn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={ingress_panel:!this.addon.ingress_panel},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return b.apply(this,arguments)})},{kind:"method",key:"_openChangelog",value:(y=sn(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,l.CH)(this.hass,this.addon.slug);case 3:t=e.sent,rn(this,{title:this.supervisor.localize("addon.dashboard.changelog"),content:(0,nn.H)(this.addon,t)}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),(0,m.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.get_changelog"),text:(0,d.js)(e.t0)});case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return y.apply(this,arguments)})},{kind:"method",key:"_updateComplete",value:function(){var e={success:!0,response:void 0,path:"install"};(0,a.B)(this,"hass-api-called",e)}},{kind:"method",key:"_installClicked",value:(v=sn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.fU)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"install"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,m.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.install"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return v.apply(this,arguments)})},{kind:"method",key:"_stopClicked",value:(h=sn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.ow)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"stop"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,m.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.stop"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return h.apply(this,arguments)})},{kind:"method",key:"_restartClicked",value:(f=sn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.P$)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"stop"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,m.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.restart"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return f.apply(this,arguments)})},{kind:"method",key:"_startClicked",value:(c=sn(regeneratorRuntime.mark((function e(t){var r,n,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.su)(this.hass,this.addon.slug);case 5:if((n=e.sent).valid){e.next=11;break}return e.next=9,(0,m.g7)(this,{title:this.supervisor.localize("addon.dashboard.action_error.start_invalid_config"),text:n.message.split(" Got ")[0],confirm:function(){return o._openConfiguration()},confirmText:this.supervisor.localize("addon.dashboard.action_error.go_to_config"),dismissText:this.supervisor.localize("common.cancel")});case 9:return r.progress=!1,e.abrupt("return");case 11:e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(2),(0,m.Ys)(this,{title:"Failed to validate addon configuration",text:(0,d.js)(e.t0)}),r.progress=!1,e.abrupt("return");case 18:return e.prev=18,e.next=21,(0,l.kP)(this.hass,this.addon.slug);case 21:return e.next=23,(0,l.AD)(this.hass,this.addon.slug);case 23:this.addon=e.sent,i={success:!0,response:void 0,path:"start"},(0,a.B)(this,"hass-api-called",i),e.next=31;break;case 28:e.prev=28,e.t1=e.catch(18),(0,m.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.start"),text:(0,d.js)(e.t1)});case 31:r.progress=!1;case 32:case"end":return e.stop()}}),e,this,[[2,13],[18,28]])}))),function(e){return c.apply(this,arguments)})},{kind:"method",key:"_openConfiguration",value:function(){(0,s.c)("/hassio/addon/".concat(this.addon.slug,"/config"))}},{kind:"method",key:"_uninstallClicked",value:(r=sn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.next=4,(0,m.g7)(this,{title:this.addon.name,text:"Are you sure you want to uninstall this add-on?",confirmText:"uninstall add-on",dismissText:"no"});case 4:if(e.sent){e.next=8;break}return r.progress=!1,e.abrupt("return");case 8:return this._error=void 0,e.prev=9,e.next=12,(0,l.Yn)(this.hass,this.addon.slug);case 12:n={success:!0,response:void 0,path:"uninstall"},(0,a.B)(this,"hass-api-called",n),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(9),(0,m.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.uninstall"),text:(0,d.js)(e.t0)});case 19:r.progress=!1;case 20:case"end":return e.stop()}}),e,this,[[9,16]])}))),function(e){return r.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[u.Qx,p.l,(0,n.iv)(en||(en=cn(['\n :host {\n display: block;\n }\n ha-card {\n display: block;\n margin-bottom: 16px;\n }\n ha-card.warning {\n background-color: var(--error-color);\n color: white;\n }\n ha-card.warning .card-header {\n color: white;\n }\n ha-card.warning .card-content {\n color: white;\n }\n ha-card.warning mwc-button {\n --mdc-theme-primary: white !important;\n }\n .warning {\n color: var(--error-color);\n --mdc-theme-primary: var(--error-color);\n }\n .light-color {\n color: var(--secondary-text-color);\n }\n .addon-header {\n padding-left: 8px;\n font-size: 24px;\n color: var(--ha-card-header-color, --primary-text-color);\n }\n .addon-version {\n float: right;\n font-size: 15px;\n vertical-align: middle;\n }\n .errors {\n color: var(--error-color);\n margin-bottom: 16px;\n }\n .description {\n margin-bottom: 16px;\n }\n img.logo {\n max-width: 100%;\n max-height: 60px;\n margin: 16px 0;\n display: block;\n }\n\n ha-switch {\n display: flex;\n }\n ha-svg-icon.running {\n color: var(--success-color);\n }\n ha-svg-icon.stopped {\n color: var(--error-color);\n }\n ha-call-api-button {\n font-weight: 500;\n color: var(--primary-color);\n }\n protection-enable mwc-button {\n --mdc-theme-primary: white;\n }\n .description a {\n color: var(--primary-color);\n }\n ha-chip {\n text-transform: capitalize;\n --ha-chip-text-color: var(--text-primary-color);\n --ha-chip-background-color: var(--primary-color);\n }\n\n .red {\n --ha-chip-background-color: var(--label-badge-red, #df4c1e);\n }\n .blue {\n --ha-chip-background-color: var(--label-badge-blue, #039be5);\n }\n .green {\n --ha-chip-background-color: var(--label-badge-green, #0da035);\n }\n .yellow {\n --ha-chip-background-color: var(--label-badge-yellow, #f4b400);\n }\n .capabilities {\n margin-bottom: 16px;\n }\n .card-actions {\n justify-content: space-between;\n display: flex;\n }\n .changelog {\n display: contents;\n }\n .changelog-link {\n color: var(--primary-color);\n text-decoration: underline;\n cursor: pointer;\n }\n ha-markdown {\n padding: 16px;\n }\n ha-settings-row {\n padding: 0;\n height: 54px;\n width: 100%;\n }\n ha-settings-row > span[slot="description"] {\n white-space: normal;\n color: var(--secondary-text-color);\n }\n ha-settings-row[three-line] {\n height: 74px;\n }\n\n .addon-options {\n max-width: 90%;\n }\n\n .addon-container {\n display: grid;\n grid-auto-flow: column;\n grid-template-columns: 60% 40%;\n }\n\n .addon-container > div:last-of-type {\n align-self: end;\n }\n\n ha-alert mwc-button {\n --mdc-theme-primary: var(--primary-text-color);\n }\n a {\n text-decoration: none;\n }\n\n update-available-card {\n padding-bottom: 16px;\n }\n\n @media (max-width: 720px) {\n ha-chip {\n line-height: 36px;\n }\n .addon-options {\n max-width: 100%;\n }\n .addon-container {\n display: block;\n }\n }\n '])))]}}]}}),n.oi);function jn(e){return jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jn(e)}function zn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Tn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hn(e,t){return Hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Hn(e,t)}function Rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Mn(e);if(t){var i=Mn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Vn(this,r)}}function Vn(e,t){if(t&&("object"===jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ln(e)}function Ln(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mn(e){return Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mn(e)}function In(){In=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Un(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n =0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r","\n \n ",'\n \n ','\n
\n \n \n ","\n \n
\n \n "])),this.addon.name,this._error?(0,n.dy)(Yn||(Yn=Jn(['',""])),this._error):"",this._content?(0,n.dy)(Wn||(Wn=Jn([""])),this._content):"",this._refresh,this.supervisor.localize("common.refresh"))}},{kind:"get",static:!0,key:"styles",value:function(){return[u.Qx,p.l,(0,n.iv)(Kn||(Kn=Jn(["\n :host,\n ha-card {\n display: block;\n }\n "])))]}},{kind:"method",key:"_loadData",value:(o=ei(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,e.prev=1,e.next=4,(0,l.kr)(this.hass,this.addon.slug);case 4:this._content=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),this._error=this.supervisor.localize("addon.logs.get_logs","error",(0,d.js)(e.t0));case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return o.apply(this,arguments)})},{kind:"method",key:"_refresh",value:(r=ei(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._loadData();case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})}]}}),n.oi);function gi(e){return gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gi(e)}function wi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ki(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ei(e,t){return Ei=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ei(e,t)}function _i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pi(e);if(t){var i=Pi(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ci(this,r)}}function Ci(e,t){if(t&&("object"===gi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xi(e)}function xi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pi(e){return Pi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Pi(e)}function Ai(){Ai=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Di(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n =0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r"])),this._error);if(!this.addon)return(0,n.dy)(Gi||(Gi=no([""])));var e=[{translationKey:"addon.panel.info",path:"/hassio/addon/".concat(this.addon.slug,"/info"),iconPath:"M13.5,4A1.5,1.5 0 0,0 12,5.5A1.5,1.5 0 0,0 13.5,7A1.5,1.5 0 0,0 15,5.5A1.5,1.5 0 0,0 13.5,4M13.14,8.77C11.95,8.87 8.7,11.46 8.7,11.46C8.5,11.61 8.56,11.6 8.72,11.88C8.88,12.15 8.86,12.17 9.05,12.04C9.25,11.91 9.58,11.7 10.13,11.36C12.25,10 10.47,13.14 9.56,18.43C9.2,21.05 11.56,19.7 12.17,19.3C12.77,18.91 14.38,17.8 14.54,17.69C14.76,17.54 14.6,17.42 14.43,17.17C14.31,17 14.19,17.12 14.19,17.12C13.54,17.55 12.35,18.45 12.19,17.88C12,17.31 13.22,13.4 13.89,10.71C14,10.07 14.3,8.67 13.14,8.77Z"}];this.addon.documentation&&e.push({translationKey:"addon.panel.documentation",path:"/hassio/addon/".concat(this.addon.slug,"/documentation"),iconPath:"M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z"}),this.addon.version&&e.push({translationKey:"addon.panel.configuration",path:"/hassio/addon/".concat(this.addon.slug,"/config"),iconPath:"M15.9,18.45C17.25,18.45 18.35,17.35 18.35,16C18.35,14.65 17.25,13.55 15.9,13.55C14.54,13.55 13.45,14.65 13.45,16C13.45,17.35 14.54,18.45 15.9,18.45M21.1,16.68L22.58,17.84C22.71,17.95 22.75,18.13 22.66,18.29L21.26,20.71C21.17,20.86 21,20.92 20.83,20.86L19.09,20.16C18.73,20.44 18.33,20.67 17.91,20.85L17.64,22.7C17.62,22.87 17.47,23 17.3,23H14.5C14.32,23 14.18,22.87 14.15,22.7L13.89,20.85C13.46,20.67 13.07,20.44 12.71,20.16L10.96,20.86C10.81,20.92 10.62,20.86 10.54,20.71L9.14,18.29C9.05,18.13 9.09,17.95 9.22,17.84L10.7,16.68L10.65,16L10.7,15.31L9.22,14.16C9.09,14.05 9.05,13.86 9.14,13.71L10.54,11.29C10.62,11.13 10.81,11.07 10.96,11.13L12.71,11.84C13.07,11.56 13.46,11.32 13.89,11.15L14.15,9.29C14.18,9.13 14.32,9 14.5,9H17.3C17.47,9 17.62,9.13 17.64,9.29L17.91,11.15C18.33,11.32 18.73,11.56 19.09,11.84L20.83,11.13C21,11.07 21.17,11.13 21.26,11.29L22.66,13.71C22.75,13.86 22.71,14.05 22.58,14.16L21.1,15.31L21.15,16L21.1,16.68M6.69,8.07C7.56,8.07 8.26,7.37 8.26,6.5C8.26,5.63 7.56,4.92 6.69,4.92A1.58,1.58 0 0,0 5.11,6.5C5.11,7.37 5.82,8.07 6.69,8.07M10.03,6.94L11,7.68C11.07,7.75 11.09,7.87 11.03,7.97L10.13,9.53C10.08,9.63 9.96,9.67 9.86,9.63L8.74,9.18L8,9.62L7.81,10.81C7.79,10.92 7.7,11 7.59,11H5.79C5.67,11 5.58,10.92 5.56,10.81L5.4,9.62L4.64,9.18L3.5,9.63C3.41,9.67 3.3,9.63 3.24,9.53L2.34,7.97C2.28,7.87 2.31,7.75 2.39,7.68L3.34,6.94L3.31,6.5L3.34,6.06L2.39,5.32C2.31,5.25 2.28,5.13 2.34,5.03L3.24,3.47C3.3,3.37 3.41,3.33 3.5,3.37L4.63,3.82L5.4,3.38L5.56,2.19C5.58,2.08 5.67,2 5.79,2H7.59C7.7,2 7.79,2.08 7.81,2.19L8,3.38L8.74,3.82L9.86,3.37C9.96,3.33 10.08,3.37 10.13,3.47L11.03,5.03C11.09,5.13 11.07,5.25 11,5.32L10.03,6.06L10.06,6.5L10.03,6.94Z"},{translationKey:"addon.panel.log",path:"/hassio/addon/".concat(this.addon.slug,"/logs"),iconPath:"M18 7C16.9 7 16 7.9 16 9V15C16 16.1 16.9 17 18 17H20C21.1 17 22 16.1 22 15V11H20V15H18V9H22V7H18M2 7V17H8V15H4V7H2M11 7C9.9 7 9 7.9 9 9V15C9 16.1 9.9 17 11 17H13C14.1 17 15 16.1 15 15V9C15 7.9 14.1 7 13 7H11M11 9H13V15H11V9Z"});var t=this._computeTail(this.route);return(0,n.dy)(Ji||(Ji=no(["\n ',"\n \n \n "])),this.hass,this.supervisor.localize,this.narrow,t,e,this.addon.name,t,this.narrow,this.hass,this.supervisor,this.addon)}},{kind:"get",static:!0,key:"styles",value:function(){return[u.Qx,p.l,(0,n.iv)(Xi||(Xi=no(["\n :host {\n color: var(--primary-text-color);\n }\n .content {\n padding: 24px 0 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n width: 600px;\n }\n hassio-addon-logs {\n max-width: calc(100% - 8px);\n min-width: 600px;\n }\n @media only screen and (max-width: 600px) {\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config,\n hassio-addon-logs {\n max-width: 100%;\n min-width: 100%;\n }\n }\n "])))]}},{kind:"method",key:"firstUpdated",value:(h=ro(regeneratorRuntime.mark((function e(){var t,r,n,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==this.route.path){e.next=8;break}if(!(t=(0,c.io)("addon"))){e.next=8;break}return e.next=5,(0,l.yt)(this.hass);case 5:r=e.sent,n=r.addons.some((function(e){return e.slug===t})),n?(0,s.c)("/hassio/addon/".concat(t),{replace:!0}):this._error=this.supervisor.localize("my.error_addon_not_found");case 8:this.addEventListener("hass-api-called",(function(e){return i._apiCalled(e)}));case 9:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{kind:"method",key:"_apiCalled",value:(f=ro(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.detail.success){e.next=2;break}return e.abrupt("return");case 2:if((n=null===(r=t.detail.path)||void 0===r?void 0:r.split("/"))&&0!==n.length){e.next=5;break}return e.abrupt("return");case 5:if(i=n[n.length-1],["uninstall","install","update","start","stop"].includes(i)&&(0,a.B)(this,"supervisor-collection-refresh",{collection:"supervisor"}),"uninstall"!==i){e.next=11;break}window.history.back(),e.next=13;break;case 11:return e.next=13,this._routeDataChanged();case 13:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{kind:"method",key:"updated",value:function(e){e.has("route")&&!this.addon&&this._routeDataChanged()}},{kind:"method",key:"_routeDataChanged",value:(r=ro(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.route.path.split("/")[1]){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,(0,l.AD)(this.hass,t);case 6:r=e.sent,this.addon=r,e.next=14;break;case 10:e.prev=10,e.t0=e.catch(3),this._error="Error fetching addon info: ".concat((0,d.js)(e.t0)),this.addon=void 0;case 14:case"end":return e.stop()}}),e,this,[[3,10]])}))),function(){return r.apply(this,arguments)})}]}}),n.oi)}}]);
\ No newline at end of file
diff --git a/supervisor/api/panel/frontend_es5/3b68a3c9.js.gz b/supervisor/api/panel/frontend_es5/3b68a3c9.js.gz
new file mode 100644
index 000000000..e2f20b5fe
Binary files /dev/null and b/supervisor/api/panel/frontend_es5/3b68a3c9.js.gz differ
diff --git a/supervisor/api/panel/frontend_es5/b770accc.js b/supervisor/api/panel/frontend_es5/3db32a0e.js
similarity index 99%
rename from supervisor/api/panel/frontend_es5/b770accc.js
rename to supervisor/api/panel/frontend_es5/3db32a0e.js
index bc2b7e5d8..f9506ca36 100644
--- a/supervisor/api/panel/frontend_es5/b770accc.js
+++ b/supervisor/api/panel/frontend_es5/3db32a0e.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[395],{42395:function(e,t,r){r.r(t);var n=r(37500),i=r(80458),o=r(47181),s=r(83849),a=r(15493),c=r(96151),l=(r(66255),r(34154)),u=r(41682),d=r(63864);function p(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){p(o,n,i,s,a,"next",e)}function a(e){p(o,n,i,s,a,"throw",e)}s(void 0)}))}}function h(e){return document.cookie="ingress_session=".concat(e,";path=/api/hassio_ingress/;SameSite=Strict").concat("https:"===location.protocol?";Secure":""),e}var v,m,y,b,g,k,w=function(){var e=f(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,d.I)(t.config.version,2021,2,4)){e.next=5;break}return e.next=3,t.callWS({type:"supervisor/api",endpoint:"/ingress/session",method:"post"});case 3:return r=e.sent,e.abrupt("return",h(r.session));case 5:return e.next=7,t.callApi("POST","hassio/ingress/session");case 7:return n=e.sent,e.abrupt("return",h(n.data.session));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=f(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,d.I)(t.config.version,2021,2,4)){e.next=4;break}return e.next=3,t.callWS({type:"supervisor/api",endpoint:"/ingress/validate_session",method:"post",data:{session:r}});case 3:return e.abrupt("return");case 4:return e.next=6,t.callApi("POST","hassio/ingress/validate_session",{session:r});case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),E=r(26765);r(21625),r(60010);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}function A(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){P(o,n,i,s,a,"next",e)}function a(e){P(o,n,i,s,a,"throw",e)}s(void 0)}))}}function S(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=B(e);if(t){var i=B(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return j(this,r)}}function j(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(){z=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!F(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r "])));var e=(0,n.dy)(m||(m=S([""])),this._addon.ingress_url);return this.ingressPanel?(0,n.dy)(b||(b=S(["",""])),this.narrow||"always_hidden"===this.hass.dockedSidebar?(0,n.dy)(g||(g=S(['\n ",""])),this.hass.localize("ui.sidebar.sidebar_toggle"),"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",this._toggleMenu,this._addon.name,e):e):(0,n.dy)(y||(y=S(["\n ","\n "])),this.hass,this._addon.name,this.narrow,e)}},{kind:"method",key:"firstUpdated",value:(d=A(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==this.route.path){e.next=34;break}if(!(t=(0,a.io)("addon"))){e.next=34;break}return e.prev=3,e.next=6,(0,l.AD)(this.hass,t);case 6:r=e.sent,e.next=17;break;case 9:return e.prev=9,e.t0=e.catch(3),e.next=13,(0,E.Ys)(this,{text:(0,u.js)(e.t0),title:t});case 13:return e.next=15,(0,c.y)();case 15:return(0,s.c)("/hassio/store",{replace:!0}),e.abrupt("return");case 17:if(r.version){e.next=25;break}return e.next=20,(0,E.Ys)(this,{text:this.supervisor.localize("my.error_addon_not_installed"),title:r.name});case 20:return e.next=22,(0,c.y)();case 22:(0,s.c)("/hassio/addon/".concat(r.slug,"/info"),{replace:!0}),e.next=34;break;case 25:if(r.ingress){e.next=33;break}return e.next=28,(0,E.Ys)(this,{text:this.supervisor.localize("my.error_addon_no_ingress"),title:r.name});case 28:return e.next=30,(0,c.y)();case 30:(0,s.c)("/hassio/addon/".concat(r.slug,"/info"),{replace:!0}),e.next=34;break;case 33:(0,s.c)("/hassio/ingress/".concat(r.slug),{replace:!0});case 34:case"end":return e.stop()}}),e,this,[[3,9]])}))),function(){return d.apply(this,arguments)})},{kind:"method",key:"updated",value:function(e){if(V(B(p.prototype),"updated",this).call(this,e),e.has("route")){var t=this.route.path.substr(1),r=e.get("route"),n=r?r.path.substr(1):void 0;t&&t!==n&&this._fetchData(t)}}},{kind:"method",key:"_fetchData",value:(r=A(regeneratorRuntime.mark((function e(t){var r,n,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=w(this.hass),e.prev=1,e.next=4,(0,l.AD)(this.hass,t);case 4:n=e.sent,e.next=15;break;case 7:return e.prev=7,e.t0=e.catch(1),e.next=11,(0,E.Ys)(this,{text:"Unable to fetch add-on info to start Ingress",title:"Supervisor"});case 11:return e.next=13,(0,c.y)();case 13:return history.back(),e.abrupt("return");case 15:if(n.ingress_url){e.next=22;break}return e.next=18,(0,E.Ys)(this,{text:"Add-on does not support Ingress",title:n.name});case 18:return e.next=20,(0,c.y)();case 20:return history.back(),e.abrupt("return");case 22:if("started"===n.state){e.next=29;break}return e.next=25,(0,E.Ys)(this,{text:"Add-on is not running. Please start it first",title:n.name});case 25:return e.next=27,(0,c.y)();case 27:return(0,s.c)("/hassio/addon/".concat(n.slug,"/info"),{replace:!0}),e.abrupt("return");case 29:return e.prev=29,e.next=32,r;case 32:i=e.sent,e.next=43;break;case 35:return e.prev=35,e.t1=e.catch(29),e.next=39,(0,E.Ys)(this,{text:"Unable to create an Ingress session",title:n.name});case 39:return e.next=41,(0,c.y)();case 41:return history.back(),e.abrupt("return");case 43:this._sessionKeepAlive&&clearInterval(this._sessionKeepAlive),this._sessionKeepAlive=window.setInterval(A(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,x(o.hass,i);case 3:e.next=10;break;case 5:return e.prev=5,e.t0=e.catch(0),e.next=9,w(o.hass);case 9:i=e.sent;case 10:case"end":return e.stop()}}),e,null,[[0,5]])}))),6e4),this._addon=n;case 46:case"end":return e.stop()}}),e,this,[[1,7],[29,35]])}))),function(e){return r.apply(this,arguments)})},{kind:"method",key:"_toggleMenu",value:function(){(0,o.B)(this,"hass-toggle-menu")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(k||(k=S(["\n iframe {\n display: block;\n width: 100%;\n height: 100%;\n border: 0;\n }\n\n .header + iframe {\n height: calc(100% - 40px);\n }\n\n .header {\n display: flex;\n align-items: center;\n font-size: 16px;\n height: 40px;\n padding: 0 16px;\n pointer-events: none;\n background-color: var(--app-header-background-color);\n font-weight: 400;\n color: var(--app-header-text-color, white);\n border-bottom: var(--app-header-border-bottom, none);\n box-sizing: border-box;\n --mdc-icon-size: 20px;\n }\n\n .main-title {\n margin: 0 0 0 24px;\n line-height: 20px;\n flex-grow: 1;\n }\n\n ha-icon-button {\n pointer-events: auto;\n }\n\n hass-subpage {\n --app-header-background-color: var(--sidebar-background-color);\n --app-header-text-color: var(--sidebar-text-color);\n --app-header-border-bottom: 1px solid var(--divider-color);\n }\n "])))}}]}}),n.oi)}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[395],{42395:function(e,t,r){r.r(t);var n=r(37500),i=r(63550),o=r(47181),s=r(83849),a=r(15493),c=r(96151),l=(r(66255),r(34154)),u=r(41682),d=r(63864);function p(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){p(o,n,i,s,a,"next",e)}function a(e){p(o,n,i,s,a,"throw",e)}s(void 0)}))}}function h(e){return document.cookie="ingress_session=".concat(e,";path=/api/hassio_ingress/;SameSite=Strict").concat("https:"===location.protocol?";Secure":""),e}var v,m,y,b,g,k,w=function(){var e=f(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,d.I)(t.config.version,2021,2,4)){e.next=5;break}return e.next=3,t.callWS({type:"supervisor/api",endpoint:"/ingress/session",method:"post"});case 3:return r=e.sent,e.abrupt("return",h(r.session));case 5:return e.next=7,t.callApi("POST","hassio/ingress/session");case 7:return n=e.sent,e.abrupt("return",h(n.data.session));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=f(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,d.I)(t.config.version,2021,2,4)){e.next=4;break}return e.next=3,t.callWS({type:"supervisor/api",endpoint:"/ingress/validate_session",method:"post",data:{session:r}});case 3:return e.abrupt("return");case 4:return e.next=6,t.callApi("POST","hassio/ingress/validate_session",{session:r});case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),E=r(26765);r(21625),r(60010);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}function A(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){P(o,n,i,s,a,"next",e)}function a(e){P(o,n,i,s,a,"throw",e)}s(void 0)}))}}function S(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=B(e);if(t){var i=B(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return j(this,r)}}function j(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(){z=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!F(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r "])));var e=(0,n.dy)(m||(m=S([""])),this._addon.ingress_url);return this.ingressPanel?(0,n.dy)(b||(b=S(["",""])),this.narrow||"always_hidden"===this.hass.dockedSidebar?(0,n.dy)(g||(g=S(['\n ",""])),this.hass.localize("ui.sidebar.sidebar_toggle"),"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",this._toggleMenu,this._addon.name,e):e):(0,n.dy)(y||(y=S(["\n ","\n "])),this.hass,this._addon.name,this.narrow,e)}},{kind:"method",key:"firstUpdated",value:(d=A(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==this.route.path){e.next=34;break}if(!(t=(0,a.io)("addon"))){e.next=34;break}return e.prev=3,e.next=6,(0,l.AD)(this.hass,t);case 6:r=e.sent,e.next=17;break;case 9:return e.prev=9,e.t0=e.catch(3),e.next=13,(0,E.Ys)(this,{text:(0,u.js)(e.t0),title:t});case 13:return e.next=15,(0,c.y)();case 15:return(0,s.c)("/hassio/store",{replace:!0}),e.abrupt("return");case 17:if(r.version){e.next=25;break}return e.next=20,(0,E.Ys)(this,{text:this.supervisor.localize("my.error_addon_not_installed"),title:r.name});case 20:return e.next=22,(0,c.y)();case 22:(0,s.c)("/hassio/addon/".concat(r.slug,"/info"),{replace:!0}),e.next=34;break;case 25:if(r.ingress){e.next=33;break}return e.next=28,(0,E.Ys)(this,{text:this.supervisor.localize("my.error_addon_no_ingress"),title:r.name});case 28:return e.next=30,(0,c.y)();case 30:(0,s.c)("/hassio/addon/".concat(r.slug,"/info"),{replace:!0}),e.next=34;break;case 33:(0,s.c)("/hassio/ingress/".concat(r.slug),{replace:!0});case 34:case"end":return e.stop()}}),e,this,[[3,9]])}))),function(){return d.apply(this,arguments)})},{kind:"method",key:"updated",value:function(e){if(V(B(p.prototype),"updated",this).call(this,e),e.has("route")){var t=this.route.path.substr(1),r=e.get("route"),n=r?r.path.substr(1):void 0;t&&t!==n&&this._fetchData(t)}}},{kind:"method",key:"_fetchData",value:(r=A(regeneratorRuntime.mark((function e(t){var r,n,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=w(this.hass),e.prev=1,e.next=4,(0,l.AD)(this.hass,t);case 4:n=e.sent,e.next=15;break;case 7:return e.prev=7,e.t0=e.catch(1),e.next=11,(0,E.Ys)(this,{text:"Unable to fetch add-on info to start Ingress",title:"Supervisor"});case 11:return e.next=13,(0,c.y)();case 13:return history.back(),e.abrupt("return");case 15:if(n.ingress_url){e.next=22;break}return e.next=18,(0,E.Ys)(this,{text:"Add-on does not support Ingress",title:n.name});case 18:return e.next=20,(0,c.y)();case 20:return history.back(),e.abrupt("return");case 22:if("started"===n.state){e.next=29;break}return e.next=25,(0,E.Ys)(this,{text:"Add-on is not running. Please start it first",title:n.name});case 25:return e.next=27,(0,c.y)();case 27:return(0,s.c)("/hassio/addon/".concat(n.slug,"/info"),{replace:!0}),e.abrupt("return");case 29:return e.prev=29,e.next=32,r;case 32:i=e.sent,e.next=43;break;case 35:return e.prev=35,e.t1=e.catch(29),e.next=39,(0,E.Ys)(this,{text:"Unable to create an Ingress session",title:n.name});case 39:return e.next=41,(0,c.y)();case 41:return history.back(),e.abrupt("return");case 43:this._sessionKeepAlive&&clearInterval(this._sessionKeepAlive),this._sessionKeepAlive=window.setInterval(A(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,x(o.hass,i);case 3:e.next=10;break;case 5:return e.prev=5,e.t0=e.catch(0),e.next=9,w(o.hass);case 9:i=e.sent;case 10:case"end":return e.stop()}}),e,null,[[0,5]])}))),6e4),this._addon=n;case 46:case"end":return e.stop()}}),e,this,[[1,7],[29,35]])}))),function(e){return r.apply(this,arguments)})},{kind:"method",key:"_toggleMenu",value:function(){(0,o.B)(this,"hass-toggle-menu")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(k||(k=S(["\n iframe {\n display: block;\n width: 100%;\n height: 100%;\n border: 0;\n }\n\n .header + iframe {\n height: calc(100% - 40px);\n }\n\n .header {\n display: flex;\n align-items: center;\n font-size: 16px;\n height: 40px;\n padding: 0 16px;\n pointer-events: none;\n background-color: var(--app-header-background-color);\n font-weight: 400;\n color: var(--app-header-text-color, white);\n border-bottom: var(--app-header-border-bottom, none);\n box-sizing: border-box;\n --mdc-icon-size: 20px;\n }\n\n .main-title {\n margin: 0 0 0 24px;\n line-height: 20px;\n flex-grow: 1;\n }\n\n ha-icon-button {\n pointer-events: auto;\n }\n\n hass-subpage {\n --app-header-background-color: var(--sidebar-background-color);\n --app-header-text-color: var(--sidebar-text-color);\n --app-header-border-bottom: 1px solid var(--divider-color);\n }\n "])))}}]}}),n.oi)}}]);
\ No newline at end of file
diff --git a/supervisor/api/panel/frontend_es5/3db32a0e.js.gz b/supervisor/api/panel/frontend_es5/3db32a0e.js.gz
new file mode 100644
index 000000000..dd95540ab
Binary files /dev/null and b/supervisor/api/panel/frontend_es5/3db32a0e.js.gz differ
diff --git a/supervisor/api/panel/frontend_es5/bad3e74d.js b/supervisor/api/panel/frontend_es5/3f904f2c.js
similarity index 99%
rename from supervisor/api/panel/frontend_es5/bad3e74d.js
rename to supervisor/api/panel/frontend_es5/3f904f2c.js
index cbd796cc8..7ff7809eb 100644
--- a/supervisor/api/panel/frontend_es5/bad3e74d.js
+++ b/supervisor/api/panel/frontend_es5/3f904f2c.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[708],{52708:function(e,t,r){r.r(t);r(44577);var i,n,o,s,a,c,l,d=r(37500),u=r(80458),f=r(14516),p=r(47181),h=(r(34552),r(93546),r(86248),r(41682)),m=r(35460),v=r(26765),y=r(11654);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function k(e,t,r,i,n,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(i,n)}function b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=x(e);if(t){var n=x(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return _(this,r)}}function _(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return D(e)}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function z(){z=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!O(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var o=this.decorateConstructor(r,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,n[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;se.length)&&(t=e.length);for(var r=0,i=new Array(t);r\n ","\n \n "])),this.moving?this.dialogParams.supervisor.localize("dialog.datadisk_move.moving"):this.dialogParams.supervisor.localize("dialog.datadisk_move.title"),this.closeDialog,this.moving,this.moving?(0,d.dy)(o||(o=b([' \n \n \n ',"\n
"])),this.dialogParams.supervisor.localize("dialog.datadisk_move.moving_desc")):(0,d.dy)(s||(s=b([" ",'\n\n \n ","\n \n\n \n ","\n "])),null!==(e=this.devices)&&void 0!==e&&e.length?(0,d.dy)(a||(a=b(["\n ","\n
\n\n \n ","\n \n "])),this.dialogParams.supervisor.localize("dialog.datadisk_move.description",{current_path:this.dialogParams.supervisor.os.data_disk,time:R(this.dialogParams.supervisor)}),this.dialogParams.supervisor.localize("dialog.datadisk_move.select_device"),this._select_device,this.devices.map((function(e){return(0,d.dy)(c||(c=b(["",""])),e,e)}))):void 0===this.devices?this.dialogParams.supervisor.localize("dialog.datadisk_move.loading_devices"):this.dialogParams.supervisor.localize("dialog.datadisk_move.no_devices"),this.closeDialog,this.dialogParams.supervisor.localize("dialog.datadisk_move.cancel"),!this.selectedDevice,this._moveDatadisk,this.dialogParams.supervisor.localize("dialog.datadisk_move.move"))):(0,d.dy)(i||(i=b([""])))}},{kind:"method",key:"_select_device",value:function(e){this.selectedDevice=e.target.value}},{kind:"method",key:"_moveDatadisk",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.moving=!0,e.prev=1,e.next=4,(0,m.Sx)(this.hass,this.selectedDevice);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),this.hass.connection.connected&&!(0,h.yz)(e.t0)&&((0,v.Ys)(this,{title:this.dialogParams.supervisor.localize("system.host.failed_to_move"),text:(0,h.js)(e.t0)}),this.closeDialog());case 9:case"end":return e.stop()}}),e,this,[[1,6]])})),f=function(){var e=this,t=arguments;return new Promise((function(i,n){var o=r.apply(e,t);function s(e){k(o,i,n,s,a,"next",e)}function a(e){k(o,i,n,s,a,"throw",e)}s(void 0)}))},function(){return f.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[y.Qx,y.yu,(0,d.iv)(l||(l=b(["\n ha-select {\n width: 100%;\n }\n ha-circular-progress {\n display: block;\n margin: 32px;\n text-align: center;\n }\n\n .progress-text {\n text-align: center;\n }\n "])))]}}]}}),d.oi)}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[708],{52708:function(e,t,r){r.r(t);r(44577);var i,n,o,s,a,c,l,d=r(37500),u=r(63550),f=r(14516),p=r(47181),h=(r(34552),r(93546),r(86248),r(41682)),m=r(35460),v=r(26765),y=r(11654);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function k(e,t,r,i,n,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(i,n)}function b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=x(e);if(t){var n=x(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return _(this,r)}}function _(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return D(e)}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function z(){z=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!O(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var o=this.decorateConstructor(r,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,n[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;se.length)&&(t=e.length);for(var r=0,i=new Array(t);r\n ","\n \n "])),this.moving?this.dialogParams.supervisor.localize("dialog.datadisk_move.moving"):this.dialogParams.supervisor.localize("dialog.datadisk_move.title"),this.closeDialog,this.moving,this.moving?(0,d.dy)(o||(o=b([' \n \n \n ',"\n
"])),this.dialogParams.supervisor.localize("dialog.datadisk_move.moving_desc")):(0,d.dy)(s||(s=b([" ",'\n\n \n ","\n \n\n \n ","\n "])),null!==(e=this.devices)&&void 0!==e&&e.length?(0,d.dy)(a||(a=b(["\n ","\n
\n\n \n ","\n \n "])),this.dialogParams.supervisor.localize("dialog.datadisk_move.description",{current_path:this.dialogParams.supervisor.os.data_disk,time:R(this.dialogParams.supervisor)}),this.dialogParams.supervisor.localize("dialog.datadisk_move.select_device"),this._select_device,this.devices.map((function(e){return(0,d.dy)(c||(c=b(["",""])),e,e)}))):void 0===this.devices?this.dialogParams.supervisor.localize("dialog.datadisk_move.loading_devices"):this.dialogParams.supervisor.localize("dialog.datadisk_move.no_devices"),this.closeDialog,this.dialogParams.supervisor.localize("dialog.datadisk_move.cancel"),!this.selectedDevice,this._moveDatadisk,this.dialogParams.supervisor.localize("dialog.datadisk_move.move"))):(0,d.dy)(i||(i=b([""])))}},{kind:"method",key:"_select_device",value:function(e){this.selectedDevice=e.target.value}},{kind:"method",key:"_moveDatadisk",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.moving=!0,e.prev=1,e.next=4,(0,m.Sx)(this.hass,this.selectedDevice);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),this.hass.connection.connected&&!(0,h.yz)(e.t0)&&((0,v.Ys)(this,{title:this.dialogParams.supervisor.localize("system.host.failed_to_move"),text:(0,h.js)(e.t0)}),this.closeDialog());case 9:case"end":return e.stop()}}),e,this,[[1,6]])})),f=function(){var e=this,t=arguments;return new Promise((function(i,n){var o=r.apply(e,t);function s(e){k(o,i,n,s,a,"next",e)}function a(e){k(o,i,n,s,a,"throw",e)}s(void 0)}))},function(){return f.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[y.Qx,y.yu,(0,d.iv)(l||(l=b(["\n ha-select {\n width: 100%;\n }\n ha-circular-progress {\n display: block;\n margin: 32px;\n text-align: center;\n }\n\n .progress-text {\n text-align: center;\n }\n "])))]}}]}}),d.oi)}}]);
\ No newline at end of file
diff --git a/supervisor/api/panel/frontend_es5/3f904f2c.js.gz b/supervisor/api/panel/frontend_es5/3f904f2c.js.gz
new file mode 100644
index 000000000..edc38b08f
Binary files /dev/null and b/supervisor/api/panel/frontend_es5/3f904f2c.js.gz differ
diff --git a/supervisor/api/panel/frontend_es5/57e32e95.js.gz b/supervisor/api/panel/frontend_es5/57e32e95.js.gz
deleted file mode 100644
index cff1b91f3..000000000
Binary files a/supervisor/api/panel/frontend_es5/57e32e95.js.gz and /dev/null differ
diff --git a/supervisor/api/panel/frontend_es5/71d1152e.js b/supervisor/api/panel/frontend_es5/583bd93f.js
similarity index 99%
rename from supervisor/api/panel/frontend_es5/71d1152e.js
rename to supervisor/api/panel/frontend_es5/583bd93f.js
index 93df6746d..b851d924d 100644
--- a/supervisor/api/panel/frontend_es5/71d1152e.js
+++ b/supervisor/api/panel/frontend_es5/583bd93f.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[758],{94758:function(e,t,r){var n,i,o,a,s,l=r(37500),c=r(80458),u=r(63864),d=r(12198),f=r(44583);r(32511),r(83927),r(260),r(52039);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g(e);if(t){var i=g(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b(this,r)}}function b(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(){w=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!C(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r',"\n ","\n "])),this.imageUrl?(0,l.dy)(i||(i=h(['
'])),this.imageUrl):this.iconPath?(0,l.dy)(o||(o=h(["'])),this.iconPath):"",this.label,this.version?(0,l.dy)(a||(a=h(['(',")"])),this.version):"")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,l.iv)(s||(s=h(["\n :host {\n display: flex;\n align-items: center;\n }\n .label {\n margin-right: 4px;\n }\n .version {\n color: var(--secondary-text-color);\n }\n .icon {\n max-height: 22px;\n max-width: 22px;\n margin-right: 8px;\n }\n "])))}}]}}),l.oi);function q(e){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(e)}function G(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(e,t){return K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},K(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ce(e);if(t){var i=ce(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return X(this,r)}}function X(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Y(e)}function Y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ee(){ee=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ne(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);rt.name?1:-1}))),this.addons=(this.backup?this.backup.addons:null===(t=this.supervisor)||void 0===t?void 0:t.supervisor.addons).map((function(e){return{slug:e.slug,name:e.name,version:e.version,checked:!1}})).sort((function(e,t){return e.name>t.name?1:-1})),this.backupType=(null===(n=this.backup)||void 0===n?void 0:n.type)||"full",this.backupName=(null===(i=this.backup)||void 0===i?void 0:i.name)||"",this.backupHasPassword=(null===(o=this.backup)||void 0===o?void 0:o.protected)||!1)}},{kind:"method",key:"focus",value:function(){var e;null===(e=this._focusTarget)||void 0===e||e.focus()}},{kind:"field",key:"_localize",value:function(){var e=this;return function(t){var r;return(null===(r=e.supervisor)||void 0===r?void 0:r.localize("backup.".concat(t)))||e.localize("ui.panel.page-onboarding.restore.".concat(t))}}},{kind:"method",key:"render",value:function(){if(!this.onboarding&&!this.supervisor)return(0,l.dy)(S||(S=G([""])));var e="partial"===this.backupType?this._getSection("folders"):void 0,t="partial"===this.backupType?this._getSection("addons"):void 0;return(0,l.dy)(D||(D=G(["\n ","\n ","\n ","\n ","\n ","\n ","\n "])),this.backup?(0,l.dy)(z||(z=G(['\n ',"\n (",")
\n ","\n
"])),"full"===this.backup.type?this._localize("full_backup"):this._localize("partial_backup"),Math.ceil(10*this.backup.size)/10+" MB",this.hass?(0,f.o0)(new Date(this.backup.date),this.hass.locale):this.backup.date):(0,l.dy)(O||(O=G([' \n \n
\n \n \n \n ',"
\n "])),(0,l.dy)(I||(I=G(["\n "])),this._localize("folders"),ue),this._toggleSection,e.checked,e.indeterminate,"folders",e.templates):"",null!=t&&t.templates.length?(0,l.dy)(R||(R=G(["\n \n '," \n "])),(0,l.dy)(M||(M=G(["\n "])),this._localize("addons"),de),this._toggleSection,t.checked,t.indeterminate,"addons",t.templates):""):"","partial"!==this.backupType||this.backup&&!this.backupHasPassword?"":(0,l.dy)(L||(L=G(["
"]))),this.backup?"":(0,l.dy)(Z||(Z=G(['=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r',"\n ","\n "])),this.imageUrl?(0,l.dy)(i||(i=h(['
'])),this.imageUrl):this.iconPath?(0,l.dy)(o||(o=h(["'])),this.iconPath):"",this.label,this.version?(0,l.dy)(a||(a=h(['(',")"])),this.version):"")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,l.iv)(s||(s=h(["\n :host {\n display: flex;\n align-items: center;\n }\n .label {\n margin-right: 4px;\n }\n .version {\n color: var(--secondary-text-color);\n }\n .icon {\n max-height: 22px;\n max-width: 22px;\n margin-right: 8px;\n }\n "])))}}]}}),l.oi);function q(e){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(e)}function G(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(e,t){return K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},K(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ce(e);if(t){var i=ce(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return X(this,r)}}function X(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Y(e)}function Y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ee(){ee=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ne(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);rt.name?1:-1}))),this.addons=(this.backup?this.backup.addons:null===(t=this.supervisor)||void 0===t?void 0:t.supervisor.addons).map((function(e){return{slug:e.slug,name:e.name,version:e.version,checked:!1}})).sort((function(e,t){return e.name>t.name?1:-1})),this.backupType=(null===(n=this.backup)||void 0===n?void 0:n.type)||"full",this.backupName=(null===(i=this.backup)||void 0===i?void 0:i.name)||"",this.backupHasPassword=(null===(o=this.backup)||void 0===o?void 0:o.protected)||!1)}},{kind:"method",key:"focus",value:function(){var e;null===(e=this._focusTarget)||void 0===e||e.focus()}},{kind:"field",key:"_localize",value:function(){var e=this;return function(t){var r;return(null===(r=e.supervisor)||void 0===r?void 0:r.localize("backup.".concat(t)))||e.localize("ui.panel.page-onboarding.restore.".concat(t))}}},{kind:"method",key:"render",value:function(){if(!this.onboarding&&!this.supervisor)return(0,l.dy)(S||(S=G([""])));var e="partial"===this.backupType?this._getSection("folders"):void 0,t="partial"===this.backupType?this._getSection("addons"):void 0;return(0,l.dy)(D||(D=G(["\n ","\n ","\n ","\n ","\n ","\n ","\n "])),this.backup?(0,l.dy)(z||(z=G(['\n ',"\n (",")
\n ","\n
"])),"full"===this.backup.type?this._localize("full_backup"):this._localize("partial_backup"),Math.ceil(10*this.backup.size)/10+" MB",this.hass?(0,f.o0)(new Date(this.backup.date),this.hass.locale):this.backup.date):(0,l.dy)(O||(O=G(['\n \n ",":\n
\n \n "])),(t.choose?F(t.choose):[]).map((function(t,r){return(0,n.dy)(I||(I=N(["\n \n \n ',":\n
\n \n ",":\n
\n \n \n ",":\n
\n \n \n "])),r,e._removeOption,e.hass.localize("ui.panel.config.automation.editor.actions.type.choose.remove_option"),"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",e.hass.localize("ui.panel.config.automation.editor.actions.type.choose.option","number",r+1),e.hass.localize("ui.panel.config.automation.editor.actions.type.choose.conditions"),t.conditions,e.hass,r,e._conditionChanged,e.hass.localize("ui.panel.config.automation.editor.actions.type.choose.sequence"),e.hass,[{name:"sequence",selector:{action:{}}}],t,r,e._actionChanged)})),this._addOption,this.hass.localize("ui.panel.config.automation.editor.actions.type.choose.add_option"),this.hass.localize("ui.panel.config.automation.editor.actions.type.choose.default"),t.default||[],this._defaultChanged,this.hass)}},{kind:"method",key:"_conditionChanged",value:function(e){e.stopPropagation();var t=e.detail.value,r=e.target.idx,n=this.action.choose?U(F(this.action.choose)):[];n[r].conditions=t,(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{choose:n})})}},{kind:"method",key:"_actionChanged",value:function(e){e.stopPropagation();var t=e.detail.value.sequence,r=e.target.idx,n=this.action.choose?U(F(this.action.choose)):[];n[r].sequence=t,(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{choose:n})})}},{kind:"method",key:"_addOption",value:function(){var e=this.action.choose?U(F(this.action.choose)):[];e.push({conditions:[],sequence:[]}),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{choose:e})})}},{kind:"method",key:"_removeOption",value:function(e){var t=e.currentTarget.idx,r=this.action.choose?U(F(this.action.choose)):[];r.splice(t,1),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{choose:r})})}},{kind:"method",key:"_defaultChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{default:t})})}},{kind:"get",static:!0,key:"styles",value:function(){return[g.Qx,(0,n.iv)(B||(B=N(["\n ha-card {\n margin-top: 16px;\n }\n .add-card mwc-button {\n display: block;\n text-align: center;\n }\n ha-icon-button {\n position: absolute;\n right: 0;\n padding: 4px;\n }\n ha-form::part(root) {\n overflow: visible;\n }\n "])))]}}]}}),n.oi),r(44764),r(98762);var se,ce,le,ue,de,fe,pe=function(e,t,r,n){return e.connection.subscribeMessage(t,{type:"subscribe_trigger",trigger:r,variables:n})},he=function(e,t,r){return e.callWS({type:"test_condition",condition:t,variables:r})};function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function ye(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function ve(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(e,t){return ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ke(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ce(e);if(t){var i=Ce(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return we(this,r)}}function we(e,t){if(t&&("object"===me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ee(e)}function Ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ce(e)}function Pe(){Pe=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Oe(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n ","\n \n
\n \n "])),this._testCondition,this.hass.localize("ui.panel.config.automation.editor.conditions.test"),this._handleAction,this.hass.localize("ui.common.menu"),"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",this._yamlMode?this.hass.localize("ui.panel.config.automation.editor.edit_ui"):this.hass.localize("ui.panel.config.automation.editor.edit_yaml"),this.hass.localize("ui.panel.config.automation.editor.actions.duplicate"),this.hass.localize("ui.panel.config.automation.editor.actions.delete"),this._warnings?(0,n.dy)(le||(le=ve(['","subtype",t.subtype?e.localize("component.".concat(t.domain,".device_automation.condition_subtype.").concat(t.subtype))||t.subtype:"")||(t.subtype?'"'.concat(t.subtype,'" ').concat(t.type):t.type)},Xe=function(e,t){var r=t.entity_id?e.states[t.entity_id]:void 0;return e.localize("component.".concat(t.domain,".device_automation.trigger_type.").concat(t.type),"entity_name",r?(0,ze.C)(r):t.entity_id||"","subtype",t.subtype?e.localize("component.".concat(t.domain,".device_automation.trigger_subtype.").concat(t.subtype))||t.subtype:"")||(t.subtype?'"'.concat(t.subtype,'" ').concat(t.type):t.type)};function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}function Qe(e,t){return mt(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||pt(e,t)||ft()}function Je(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function et(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tt(e,t){return tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},tt(e,t)}function rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vt(e);if(t){var i=vt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}function nt(e,t){if(t&&("object"===Ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return it(e)}function it(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ot(){ot=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ct(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n ","\n ","\n \n "])),this.label,t,this._automationChanged,0===this._automations.length,t===bt?(0,n.dy)(Re||(Re=et(["\n ","\n "])),bt,this.NO_AUTOMATION_TEXT):"",t===kt?(0,n.dy)(Fe||(Fe=et(["\n ","\n "])),kt,this.UNKNOWN_AUTOMATION_TEXT):"",this._automations.map((function(t,r){return(0,n.dy)(Le||(Le=et(["\n \n ","\n \n "])),"".concat(t.device_id,"_").concat(r),e._localizeDeviceAutomation(e.hass,t))})))}},{kind:"method",key:"updated",value:function(e){yt(vt(s.prototype),"updated",this).call(this,e),e.has("deviceId")&&this._updateDeviceInfo()}},{kind:"method",key:"_updateDeviceInfo",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.deviceId){e.next=6;break}return e.next=3,this._fetchDeviceAutomations(this.hass,this.deviceId);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=[];case 7:return this._automations=e.t0,this.value&&this.value.device_id===this.deviceId||this._setValue(this._automations.length?this._automations[0]:this._createNoAutomation(this.deviceId)),this._renderEmpty=!0,e.next=12,this.updateComplete;case 12:this._renderEmpty=!1;case 13:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Je(o,n,i,a,s,"next",e)}function s(e){Je(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_automationChanged",value:function(e){var t=e.target.value;if(t&&![kt,bt].includes(t)){var r=Qe(t.split("_"),2),n=r[0],i=r[1],o=this._automations[i];o.device_id===n&&this._setValue(o)}}},{kind:"method",key:"_setValue",value:function(e){this.value&&We(e,this.value)||((0,a.B)(this,"change"),(0,a.B)(this,"value-changed",{value:e}))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Ie||(Ie=et(["\n ha-select {\n width: 100%;\n margin-top: 4px;\n }\n "])))}}]}}),n.oi);function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function Et(e,t){return Et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Et(e,t)}function Ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=At(e);if(t){var i=At(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pt(this,r)}}function Pt(e,t){if(t&&("object"===wt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _t(e)}function _t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function At(e){return At=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},At(e)}function Ot(){Ot=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!xt(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Kt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xt(e,t){return Xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Xt(e,t)}function Gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=er(e);if(t){var i=er(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qt(this,r)}}function Qt(e,t){if(t&&("object"===Wt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Jt(e)}function Jt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function er(e){return er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},er(e)}function tr(){tr=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ir(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ",'\n ',"\n"])),!!e.area,e.name,e.area)};!function(e,t,r,n){var i=tr();if(n)for(var o=0;o\n "])),this.hass,void 0===this.label&&this.hass?this.hass.localize("ui.components.device-picker.device"):this.label,this._value,this.helper,hr,this.disabled,this.required,this._openedChanged,this._deviceChanged):(0,n.dy)(Mt||(Mt=ur([""])))}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_deviceChanged",value:function(e){e.stopPropagation();var t=e.detail.value;"no_devices"===t&&(t=""),t!==this._value&&this._setValue(t)}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_setValue",value:function(e){var t=this;this.value=e,setTimeout((function(){(0,a.B)(t,"value-changed",{value:e}),(0,a.B)(t,"change")}),0)}}]}}),(0,$t.f)(n.oi));function mr(e){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(e)}function yr(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function vr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function br(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kr(e,t){return kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},kr(e,t)}function gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cr(e);if(t){var i=Cr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wr(this,r)}}function wr(e,t){if(t&&("object"===mr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Er(e)}function Er(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Cr(e)}function Pr(){Pr=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Or(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ","\n "])),t,this._devicePicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.conditions.type.device.label"),this.condition,t,this._deviceConditionPicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.conditions.type.device.condition"),null!==(e=this._capabilities)&&void 0!==e&&e.extra_fields?(0,n.dy)(fr||(fr=vr(["\n \n "])),this.hass,this._extraFieldsData(this.condition,this._capabilities),this._capabilities.extra_fields,this._extraFieldsComputeLabelCallback(this.hass.localize),this._extraFieldsChanged):"")}},{kind:"method",key:"firstUpdated",value:function(){this._capabilities||this._getCapabilities(),this.condition&&(this._origCondition=this.condition)}},{kind:"method",key:"updated",value:function(e){var t=e.get("condition");t&&!We(t,this.condition)&&this._getCapabilities()}},{kind:"method",key:"_getCapabilities",value:(r=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.condition).domain){e.next=7;break}return e.next=4,Ne(this.hass,t);case 4:e.t0=e.sent,e.next=8;break;case 7:e.t0=void 0;case 8:this._capabilities=e.t0;case 9:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){yr(o,n,i,a,s,"next",e)}function s(e){yr(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_devicePicked",value:function(e){e.stopPropagation(),this._deviceId=e.target.value,void 0===this._deviceId&&(0,a.B)(this,"value-changed",{value:Object.assign({},c.defaultConfig,{condition:"device"})})}},{kind:"method",key:"_deviceConditionPicked",value:function(e){e.stopPropagation();var t=e.detail.value;this._origCondition&&We(this._origCondition,t)&&(t=this._origCondition),(0,a.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_extraFieldsChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,e.detail.value)})}},{kind:"method",key:"_extraFieldsComputeLabelCallback",value:function(e){return function(t){return e("ui.panel.config.automation.editor.conditions.type.device.extra_fields.".concat(t.name))||t.name}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(pr||(pr=vr(["\n ha-device-picker {\n display: block;\n margin-bottom: 24px;\n }\n "])))}}]}}),n.oi);function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function Fr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Lr(e){return function(e){if(Array.isArray(e))return en(e)}(e)||tn(e)||Jr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ir(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Br(e,t){return Br=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Br(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qr(e);if(t){var i=qr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ur(this,r)}}function Ur(e,t){if(t&&("object"===Rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Nr(e)}function Nr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qr(e){return qr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qr(e)}function $r(){$r=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Kr(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n ","\n \n
\n \n "])),this.conditions.map((function(t,r){return(0,n.dy)(Vr||(Vr=Fr(["\n \n "])),r,t,e._duplicateCondition,e._conditionChanged,e.hass)})),this._addCondition,this.hass.localize("ui.panel.config.automation.editor.conditions.add")):(0,n.dy)(Tr||(Tr=Fr([""])))}},{kind:"method",key:"_addCondition",value:function(){var e=this.conditions.concat(Object.assign({condition:"device"},Mr.defaultConfig));(0,a.B)(this,"value-changed",{value:e})}},{kind:"method",key:"_conditionChanged",value:function(e){e.stopPropagation();var t=Lr(this.conditions),r=e.detail.value,n=e.target.index;null===r?t.splice(n,1):t[n]=r,(0,a.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_duplicateCondition",value:function(e){e.stopPropagation();var t=e.target.index;(0,a.B)(this,"value-changed",{value:this.conditions.concat(this.conditions[t])})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Hr||(Hr=Fr(["\n ha-automation-condition-row,\n ha-card {\n display: block;\n margin-top: 16px;\n }\n .add-card mwc-button {\n display: block;\n text-align: center;\n }\n "])))}}]}}),n.oi);function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}var nn,on=function(e){if(void 0!==e){if("object"!==rn(e)){if("string"==typeof e||isNaN(e)){var t=(null==e?void 0:e.toString().split(":"))||[];return{hours:Number(t[0])||0,minutes:Number(t[1])||0,seconds:Number(t[2])||0,milliseconds:Number(t[3])||0}}return{seconds:e}}if(!("days"in e))return e;var r=e.days,n=e.minutes,i=e.seconds,o=e.milliseconds,a=e.hours||0;return{hours:a=(a||0)+24*(r||0),minutes:n,seconds:i,milliseconds:o}}},an=(0,l.Ry)({platform:(0,l.Z_)(),id:(0,l.jt)((0,l.Z_)())}),sn=(0,l.Ry)({days:(0,l.jt)((0,l.Rx)()),hours:(0,l.jt)((0,l.Rx)()),minutes:(0,l.jt)((0,l.Rx)()),seconds:(0,l.jt)((0,l.Rx)())});function cn(e){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(e)}function ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(e,t){return un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},un(e,t)}function dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hn(e);if(t){var i=hn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fn(this,r)}}function fn(e,t){if(t&&("object"===cn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pn(e)}function pn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hn(e){return hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},hn(e)}function mn(){mn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!bn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),nn=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,i,o,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;Object.keys(t).forEach((function(e){return void 0===t[e]||""===t[e]?delete t[e]:{}})),(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){switch(t.name){case"entity_id":return e.hass.localize("ui.components.entity.entity-picker.entity");case"attribute":return e.hass.localize("ui.components.entity.entity-attribute-picker.attribute");case"for":return e.hass.localize("ui.panel.config.automation.editor.triggers.type.state.for");default:return e.hass.localize("ui.panel.config.automation.editor.conditions.type.state.".concat(t.name))}}}}]}}),n.oi);function An(e){return An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},An(e)}function On(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sn(e,t){return Sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Sn(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Tn(e);if(t){var i=Tn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xn(this,r)}}function xn(e,t){if(t&&("object"===An(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jn(e)}function jn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tn(e){return Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tn(e)}function zn(){zn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Mn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Cn=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.condition.conditions||[],this._valueChanged,this.hass);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,{conditions:e.detail.value})})}}]}}),n.oi);function Zn(e){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zn(e)}function Un(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nn(e,t){return Nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Nn(e,t)}function qn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yn(e);if(t){var i=Yn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $n(this,r)}}function $n(e,t){if(t&&("object"===Zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wn(e)}function Wn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yn(e){return Yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Yn(e)}function Kn(){Kn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Qn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),bi=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,this.condition,r,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){switch(t.name){case"entity_id":return e.hass.localize("ui.components.entity.entity-picker.entity");case"attribute":return e.hass.localize("ui.components.entity.entity-attribute-picker.attribute");default:return e.hass.localize("ui.panel.config.automation.editor.triggers.type.numeric_state.".concat(t.name))}}}}]}}),n.oi);function Vi(e){return Vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vi(e)}function Hi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mi(e,t){return Mi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mi(e,t)}function Ri(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ii(e);if(t){var i=Ii(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fi(this,r)}}function Fi(e,t){if(t&&("object"===Vi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Li(e)}function Li(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ii(e){return Ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ii(e)}function Bi(){Bi=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ni(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Ki=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),r,this.condition,this.hass,this._computeLabelCallback,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.conditions.type.sun.".concat(t.name))}}}]}}),n.oi),r(53297);function ho(e){return ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ho(e)}function mo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function yo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vo(e,t){return vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},vo(e,t)}function bo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wo(e);if(t){var i=wo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ko(this,r)}}function ko(e,t){if(t&&("object"===ho(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return go(e)}function go(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wo(e){return wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wo(e)}function Eo(){Eo=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!_o(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n '])),this.hass.localize("ui.panel.config.automation.editor.conditions.type.template.value_template"),e,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){Te(this,e)}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(po||(po=mo(["\n ha-textarea {\n display: block;\n }\n "])))}}]}}),n.oi);function jo(e){return jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jo(e)}function To(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zo(e,t){return zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},zo(e,t)}function Vo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ro(e);if(t){var i=Ro(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ho(this,r)}}function Ho(e,t){if(t&&("object"===jo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Mo(e)}function Mo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ro(e)}function Fo(){Fo=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Bo(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],a||(a=o.slice(0)),xo=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(a)}}))),this.hass,u,l,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;this._inputModeAfter="input"===t.mode_after,this._inputModeBefore="input"===t.mode_before,delete t.mode_after,delete t.mode_before,Object.keys(t).forEach((function(e){return void 0===t[e]||""===t[e]?delete t[e]:{}})),(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.conditions.type.time.".concat(t.name))}}}]}}),n.oi);function Ko(e){return Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ko(e)}function Xo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Go(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qo(e,t){return Qo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Qo(e,t)}function Jo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=da(e);if(t){var i=da(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ea(this,r)}}function ea(e,t){if(t&&("object"===Ko(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ta(e)}function ta(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ra(){ra=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!oa(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n "])),this.hass.localize("ui.panel.config.automation.editor.conditions.type.trigger.id"),e,this._triggerPicked,this._triggers.map((function(e){return(0,n.dy)(Wo||(Wo=Xo(["\n "," \n "])),e.id,e.id)}))):this.hass.localize("ui.panel.config.automation.editor.conditions.type.trigger.no_triggers")}},{kind:"method",key:"_automationUpdated",value:function(e){this._triggers=null!=e&&e.trigger?F(e.trigger).filter((function(e){return e.id})):[]}},{kind:"method",key:"_triggerPicked",value:function(e){if(e.stopPropagation(),e.target.value){var t=e.target.value;this.condition.id!==t&&(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,{id:t})})}}}]}}),n.oi);var fa,pa,ha=r(22311),ma=function(e){return"latitude"in e.attributes&&"longitude"in e.attributes};function ya(e){return ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ya(e)}function va(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ka(e,t){return ka=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ka(e,t)}function ga(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ca(e);if(t){var i=Ca(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wa(this,r)}}function wa(e,t){if(t&&("object"===ya(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ea(e)}function Ea(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ca(e)}function Pa(){Pa=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Oa(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ',"\n \n "])),this.hass.localize("ui.panel.config.automation.editor.conditions.type.zone.entity"),t,this._entityPicked,this.hass,Ta,this.hass.localize("ui.panel.config.automation.editor.conditions.type.zone.zone"),r,this._zonePicked,this.hass,La,this.hass.localize("ui.panel.config.automation.editor.conditions.type.zone.event"))}},{kind:"method",key:"_entityPicked",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,{entity_id:e.detail.value})})}},{kind:"method",key:"_zonePicked",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.condition,{zone:e.detail.value})})}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(pa||(pa=va(["\n ha-entity-picker {\n display: block;\n margin-bottom: 24px;\n }\n "])))}}]}}),n.oi);function Ia(e){return Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ia(e)}function Ba(e,t){return os(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||ns(e,t)||rs()}function Za(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Na(e,t){return Na=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Na(e,t)}function qa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ya(e);if(t){var i=Ya(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $a(this,r)}}function $a(e,t){if(t&&("object"===Ia(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wa(e)}function Wa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ya(e){return Ya=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ya(e)}function Ka(){Ka=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Qa(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n \n \n "])),-1===e?(0,n.dy)(Ha||(Ha=Za(["\n ","\n "])),this.hass.localize("ui.panel.config.automation.editor.conditions.unsupported_condition","condition",this.condition.condition)):"",this.hass.localize("ui.panel.config.automation.editor.edit_yaml"),this.hass,this.condition,this._onYamlChange):(0,n.dy)(Ma||(Ma=Za(["\n \n ","\n \n\n \n ","\n
\n "])),this.hass.localize("ui.panel.config.automation.editor.conditions.type_select"),this.condition.condition,this._typeChanged,this._processedTypes(this.hass.localize).map((function(e){var t=Ba(e,2),r=t[0],i=t[1];return(0,n.dy)(Ra||(Ra=Za(["\n ","\n "])),r,i)})),(0,o.h)("ha-automation-condition-".concat(this.condition.condition),{hass:this.hass,condition:this.condition})))}},{kind:"method",key:"_typeChanged",value:function(e){var t=e.target.value;if(t){var r=customElements.get("ha-automation-condition-".concat(t));t!==this.condition.condition&&(0,a.B)(this,"value-changed",{value:Object.assign({condition:t},r.defaultConfig)})}}},{kind:"method",key:"_onYamlChange",value:function(e){e.stopPropagation(),e.detail.isValid&&(0,a.B)(this,"value-changed",{value:e.detail.value,yaml:!0})}},{kind:"field",static:!0,key:"styles",value:function(){return[g.Qx,(0,n.iv)(Fa||(Fa=Za(["\n ha-select {\n margin-bottom: 24px;\n }\n "])))]}}]}}),n.oi);function cs(e){return cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cs(e)}function ls(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function us(e,t){return us=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},us(e,t)}function ds(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hs(e);if(t){var i=hs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fs(this,r)}}function fs(e,t){if(t&&("object"===cs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ps(e)}function ps(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},hs(e)}function ms(){ms=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!bs(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),as=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.action,this.hass,this._conditionChanged);var e,t}},{kind:"method",key:"_conditionChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:e.detail.value})}}]}}),n.oi);function Cs(e){return Cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cs(e)}var Ps,_s=new RegExp("{%|{{"),As=function e(t){return!!t&&("string"==typeof t?function(e){return _s.test(e)}(t):"object"===Cs(t)&&(Array.isArray(t)?t:Object.values(t)).some((function(t){return t&&e(t)})))};r(47289);function Os(e){return Os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Os(e)}function Ss(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ds(e,t){return Ds=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ds(e,t)}function xs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zs(e);if(t){var i=zs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return js(this,r)}}function js(e,t){if(t&&("object"===Os(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ts(e)}function Ts(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zs(e){return zs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},zs(e)}function Vs(){Vs=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Rs(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r"],t||(t=e.slice(0)),Ps=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass.localize("ui.panel.config.automation.editor.actions.type.delay.delay"),this._timeData,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;t&&(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{delay:t})})}}]}}),n.oi);function Zs(e){return Zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zs(e)}function Us(e,t){return Us=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Us(e,t)}function Ns(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ws(e);if(t){var i=Ws(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return qs(this,r)}}function qs(e,t){if(t&&("object"===Zs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $s(e)}function $s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ws(e){return Ws=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ws(e)}function Ys(){Ys=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Gs(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ","\n "])),t,this._devicePicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.actions.type.device_id.label"),this.action,t,this._deviceActionPicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.actions.type.device_id.action"),null!==(e=this._capabilities)&&void 0!==e&&e.extra_fields?(0,n.dy)(nc||(nc=sc(["\n \n "])),this.hass,this._extraFieldsData(this.action,this._capabilities),this._capabilities.extra_fields,this._extraFieldsComputeLabelCallback(this.hass.localize),this._extraFieldsChanged):"")}},{kind:"method",key:"firstUpdated",value:function(){this._capabilities||this._getCapabilities(),this.action&&(this._origAction=this.action)}},{kind:"method",key:"updated",value:function(e){var t=e.get("action");t&&!We(t,this.action)&&(this._deviceId=void 0,this._getCapabilities())}},{kind:"method",key:"_getCapabilities",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.action.domain){e.next=6;break}return e.next=3,t=this.hass,r=this.action,t.callWS({type:"device_automation/action/capabilities",action:r});case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=void 0;case 7:this._capabilities=e.t0;case 8:case"end":return e.stop()}var t,r}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){ac(o,n,i,a,s,"next",e)}function s(e){ac(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_devicePicked",value:function(e){e.stopPropagation(),this._deviceId=e.target.value,void 0===this._deviceId&&(0,a.B)(this,"value-changed",{value:c.defaultConfig})}},{kind:"method",key:"_deviceActionPicked",value:function(e){e.stopPropagation();var t=e.detail.value;this._origAction&&We(this._origAction,t)&&(t=this._origAction),(0,a.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_extraFieldsChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,e.detail.value)})}},{kind:"method",key:"_extraFieldsComputeLabelCallback",value:function(e){return function(t){return e("ui.panel.config.automation.editor.actions.type.device_id.extra_fields.".concat(t.name))||t.name}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(ic||(ic=sc(["\n ha-device-picker {\n display: block;\n margin-bottom: 16px;\n }\n ha-device-action-picker {\n display: block;\n }\n "])))}}]}}),n.oi),_c=function(e,t,r){return e("component.".concat(t,".title"))||(null==r?void 0:r.name)||t},Ac=function(e,t){return e.callWS({type:"manifest/get",integration:t})};function Oc(e){return Oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oc(e)}function Sc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dc(e,t){return Dc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Dc(e,t)}function xc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zc(e);if(t){var i=zc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jc(this,r)}}function jc(e,t){if(t&&("object"===Oc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tc(e)}function Tc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zc(e){return zc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},zc(e)}function Vc(){Vc=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Rc(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ",'\n ',"\n"])),e.name,e.name===e.service?"":e.service)},qc=function(e,t,r,n){var i=Vc();if(n)for(var o=0;o\n "])),this.hass,this.hass.localize("ui.components.service-picker.service"),this._filteredServices(this.hass.localize,this.hass.services,this._filter),this.value,Nc,this._filterChanged,this._valueChanged)}},{kind:"field",key:"_services",value:function(){return(0,s.Z)((function(e,t){if(!t)return[];var r=[];return Object.keys(t).sort().forEach((function(n){var i,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Bc(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(Object.keys(t[n]).sort());try{for(o.s();!(i=o.n()).done;){var a=i.value;r.push({service:"".concat(n,".").concat(a),name:"".concat(_c(e,n),": ").concat(t[n][a].name||a)})}}catch(s){o.e(s)}finally{o.f()}})),r}))}},{kind:"field",key:"_filteredServices",value:function(){var e=this;return(0,s.Z)((function(t,r,n){if(!r)return[];var i=e._services(t,r);return n?i.filter((function(e){var t;return e.service.toLowerCase().includes(n)||(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(n))})):i}))}},{kind:"method",key:"_filterChanged",value:function(e){this._filter=e.detail.value.toLowerCase()}},{kind:"method",key:"_valueChanged",value:function(e){this.value=e.detail.value,(0,a.B)(this,"change"),(0,a.B)(this,"value-changed",{value:this.value})}}]}}),n.oi);customElements.define("ha-service-picker",qc);var $c,Wc;r(3555);function Yc(e){return Yc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yc(e)}function Kc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Xc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gc(e,t){return Gc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Gc(e,t)}function Qc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=tl(e);if(t){var i=tl(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jc(this,r)}}function Jc(e,t){if(t&&("object"===Yc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return el(e)}function el(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tl(e){return tl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},tl(e)}function rl(){rl=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ol(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n "])),this.hass.localize("ui.panel.config.automation.editor.actions.type.event.event"),t,this._eventChanged,this.hass,this.hass.localize("ui.panel.config.automation.editor.actions.type.event.event_data"),"event_data",r,this._dataChanged)}},{kind:"method",key:"_dataChanged",value:function(e){e.stopPropagation(),e.detail.isValid&&(this._actionData=e.detail.value,wg(this,e))}},{kind:"method",key:"_eventChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.action,{event:e.target.value})})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Wc||(Wc=Kc(["\n ha-textfield {\n display: block;\n }\n "])))}}]}}),n.oi);var ul,dl,fl,pl,hl,ml,yl=r(8636),vl=r(40095),bl=r(22814),kl=r(46749),gl=r(11254);function wl(e){return wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wl(e)}function El(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Cl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pl(e,t){return Pl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Pl(e,t)}function _l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sl(e);if(t){var i=Sl(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Al(this,r)}}function Al(e,t){if(t&&("object"===wl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ol(e)}function Ol(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Sl(e)}function Dl(){Dl=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Tl(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ",""])),this.hass,null===(r=this.value)||void 0===r?void 0:r.entity_id,this.label||this.hass.localize("ui.components.selectors.media.pick_media_player"),this.disabled,this.helper,this.required,this._entityChanged,m?(0,n.dy)(fl||(fl=El(["\n ','\n \n \n ',"\n
\n "])),this._pickMedia,this.disabled||null===(i=this.value)||void 0===i||!i.entity_id?"disabled":"",(0,yl.$)({portrait:!(null===(o=this.value)||void 0===o||null===(a=o.metadata)||void 0===a||!a.media_class)&&"portrait"===kl.Fn[this.value.metadata.children_media_class||this.value.metadata.media_class].thumbnail_ratio}),null!==(s=this.value)&&void 0!==s&&null!==(c=s.metadata)&&void 0!==c&&c.thumbnail?(0,n.dy)(pl||(pl=El(['\n \n
=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Rl=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,this._getSelectorValue(this.action),this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:{service:"media_player.play_media",target:{entity_id:e.detail.value.entity_id},data:{media_content_id:e.detail.value.media_content_id,media_content_type:e.detail.value.media_content_type},metadata:e.detail.value.metadata||{}}})}}]}}),n.oi);function au(e){return au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},au(e)}function su(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cu(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function lu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uu(e,t){return uu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},uu(e,t)}function du(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hu(e);if(t){var i=hu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}function fu(e,t){if(t&&("object"===au(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pu(e)}function pu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hu(e){return hu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},hu(e)}function mu(){mu=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!bu(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n \n ","\n ","\n ","\n \n ",":\n
\n \n "])),this.hass.localize("ui.panel.config.automation.editor.actions.type.repeat.type_select"),r,this._typeChanged,zu.map((function(t){return(0,n.dy)(tu||(tu=cu(["\n \n ","\n \n "])),t,e.hass.localize("ui.panel.config.automation.editor.actions.type.repeat.type.".concat(t,".label")))})),"count"===r?(0,n.dy)(ru||(ru=cu(["\n =0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ","\n ",""])),this.hass,null===(r=this._value)||void 0===r?void 0:r.service,this._serviceChanged,null==l?void 0:l.description,this._manifest?(0,n.dy)(Pu||(Pu=Zu([" \n \n '])),this._manifest.is_built_in?(0,Fu.R)(this.hass,"/integrations/".concat(this._manifest.domain)):this._manifest.documentation,this.hass.localize("ui.components.service-control.integration_doc"),"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"):"",l&&"target"in l?(0,n.dy)(_u||(_u=Zu(["\n ",'\n ','\n ',""])),this.narrow,f?(0,n.dy)(Au||(Au=Zu(['']))):"",this.hass.localize("ui.components.service-control.target"),this.hass.localize("ui.components.service-control.target_description"),this.hass,l.target?{target:l.target}:{target:{}},this._targetChanged,null===(i=this._value)||void 0===i?void 0:i.target):d?(0,n.dy)(Ou||(Ou=Zu([""])),this.hass,null===(o=this._value)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.entity_id,d.description,this._entityPicked):"",u?(0,n.dy)(Su||(Su=Zu([""])),this.hass,this.hass.localize("ui.components.service-control.service_data"),"data",null===(s=this._value)||void 0===s?void 0:s.data,this._dataChanged):null==l?void 0:l.fields.map((function(e){var t,r,i,o,a=ld(e);return e.selector&&(!e.advanced||c.showAdvanced||null!==(t=c._value)&&void 0!==t&&t.data&&void 0!==c._value.data[e.key])?(0,n.dy)(Du||(Du=Zu(["\n ",'\n ','\n ',"\n \n "])),c.narrow,a?(0,n.dy)(ju||(ju=Zu(["'])),e.key,c._checkedKeys.has(e.key)||(null===(r=c._value)||void 0===r?void 0:r.data)&&void 0!==c._value.data[e.key],c._checkboxChanged):f?(0,n.dy)(xu||(xu=Zu(['']))):"",e.name||e.key,null==e?void 0:e.description,a&&!c._checkedKeys.has(e.key)&&(!(null!==(i=c._value)&&void 0!==i&&i.data)||void 0===c._value.data[e.key]),c.hass,e.selector,e.key,c._serviceDataChanged,null!==(o=c._value)&&void 0!==o&&o.data&&void 0!==c._value.data[e.key]?c._value.data[e.key]:e.default):""})))}},{kind:"method",key:"_checkboxChanged",value:function(e){var t,r=e.currentTarget.checked,n=e.currentTarget.key;if(r){var i,o,s;this._checkedKeys.add(n);var c,l=null===(i=this._getServiceInfo(null===(s=this._value)||void 0===s?void 0:s.service,this.hass.services))||void 0===i||null===(o=i.fields.find((function(e){return e.key===n})))||void 0===o?void 0:o.default;if(l)t=Object.assign({},null===(c=this._value)||void 0===c?void 0:c.data,Bu({},n,l))}else{var u;this._checkedKeys.delete(n),delete(t=Object.assign({},null===(u=this._value)||void 0===u?void 0:u.data))[n]}t&&(0,a.B)(this,"value-changed",{value:Object.assign({},this._value,{data:t})}),this.requestUpdate("_checkedKeys")}},{kind:"method",key:"_serviceChanged",value:function(e){var t;e.stopPropagation(),e.detail.value!==(null===(t=this._value)||void 0===t?void 0:t.service)&&(0,a.B)(this,"value-changed",{value:{service:e.detail.value||""}})}},{kind:"method",key:"_entityPicked",value:function(e){var t,r,n;e.stopPropagation();var i=e.detail.value;if((null===(t=this._value)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.entity_id)!==i){var o,s;if(!i&&null!==(n=this._value)&&void 0!==n&&n.data)delete(o=Object.assign({},this._value)).data.entity_id;else o=Object.assign({},this._value,{data:Object.assign({},null===(s=this._value)||void 0===s?void 0:s.data,{entity_id:e.detail.value})});(0,a.B)(this,"value-changed",{value:o})}}},{kind:"method",key:"_targetChanged",value:function(e){var t;e.stopPropagation();var r,n=e.detail.value;(null===(t=this._value)||void 0===t?void 0:t.target)!==n&&(n?r=Object.assign({},this._value,{target:e.detail.value}):delete(r=Object.assign({},this._value)).target,(0,a.B)(this,"value-changed",{value:r}))}},{kind:"method",key:"_serviceDataChanged",value:function(e){var t,r,n,i,o;e.stopPropagation();var s=e.currentTarget.key,c=e.detail.value;if((null===(t=this._value)||void 0===t||null===(r=t.data)||void 0===r?void 0:r[s])!==c&&(null!==(n=this._value)&&void 0!==n&&null!==(i=n.data)&&void 0!==i&&i[s]||""!==c&&void 0!==c)){var l=Object.assign({},null===(o=this._value)||void 0===o?void 0:o.data,Bu({},s,c));""!==c&&void 0!==c||delete l[s],(0,a.B)(this,"value-changed",{value:Object.assign({},this._value,{data:l})})}}},{kind:"method",key:"_dataChanged",value:function(e){e.stopPropagation(),e.detail.isValid&&(0,a.B)(this,"value-changed",{value:Object.assign({},this._value,{data:e.detail.value})})}},{kind:"method",key:"_fetchManifest",value:(r=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._manifest=void 0,e.prev=1,e.next=4,Ac(this.hass,t);case 4:this._manifest=e.sent,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(1);case 9:case"end":return e.stop()}}),e,this,[[1,7]])})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Iu(o,n,i,a,s,"next",e)}function s(e){Iu(o,n,i,a,s,"throw",e)}a(void 0)}))},function(e){return o.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Tu||(Tu=Zu(["\n ha-settings-row {\n padding: var(--service-control-padding, 0 16px);\n }\n ha-settings-row {\n --paper-time-input-justify-content: flex-end;\n --settings-row-content-width: 100%;\n border-top: var(\n --service-control-items-border-top,\n 1px solid var(--divider-color)\n );\n }\n ha-service-picker,\n ha-entity-picker,\n ha-yaml-editor {\n display: block;\n margin: var(--service-control-padding, 0 16px);\n }\n ha-yaml-editor {\n padding: 16px 0;\n }\n p {\n margin: var(--service-control-padding, 0 16px);\n padding: 16px 0;\n }\n .checkbox-spacer {\n width: 32px;\n }\n ha-checkbox {\n margin-left: -16px;\n }\n .help-icon {\n color: var(--secondary-text-color);\n }\n .description {\n justify-content: space-between;\n display: flex;\n align-items: center;\n padding-right: 2px;\n }\n "])))}}]}}),n.oi);function ud(e){return ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ud(e)}function dd(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function fd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pd(e,t){return pd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},pd(e,t)}function hd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vd(e);if(t){var i=vd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return md(this,r)}}function md(e,t){if(t&&("object"===ud(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yd(e)}function yd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vd(e){return vd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},vd(e)}function bd(){bd=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!wd(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),this.narrow,this.hass,this._action,null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced,this._actionChanged)}},{kind:"method",key:"_actionChanged",value:function(e){e.detail.value===this._action&&e.stopPropagation()}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(cd||(cd=dd(["\n ha-service-control {\n display: block;\n margin: 0 -16px;\n }\n "])))}}]}}),n.oi),r(83927);function Od(e){return Od="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Od(e)}function Sd(e,t){return Sd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Sd(e,t)}function Dd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Td(e);if(t){var i=Td(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xd(this,r)}}function xd(e,t){if(t&&("object"===Od(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jd(e)}function jd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Td(e){return Td=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Td(e)}function zd(){zd=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Md(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n ","\n "])),t,this._devicePicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.triggers.type.device.label"),this.trigger,t,this._deviceTriggerPicked,this.hass,this.hass.localize("ui.panel.config.automation.editor.triggers.type.device.trigger"),null!==(e=this._capabilities)&&void 0!==e&&e.extra_fields?(0,n.dy)(Zd||(Zd=$d(["\n \n "])),this.hass,this._extraFieldsData(this.trigger,this._capabilities),this._capabilities.extra_fields,this._extraFieldsComputeLabelCallback(this.hass.localize),this._extraFieldsChanged):"")}},{kind:"method",key:"firstUpdated",value:function(){this._capabilities||this._getCapabilities(),this.trigger&&(this._origTrigger=this.trigger)}},{kind:"method",key:"updated",value:function(e){if(e.has("trigger")){var t=e.get("trigger");t&&!We(t,this.trigger)&&this._getCapabilities()}}},{kind:"method",key:"_getCapabilities",value:(r=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.trigger).domain){e.next=7;break}return e.next=4,qe(this.hass,t);case 4:e.t0=e.sent,e.next=8;break;case 7:e.t0=void 0;case 8:this._capabilities=e.t0;case 9:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){qd(o,n,i,a,s,"next",e)}function s(e){qd(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_devicePicked",value:function(e){e.stopPropagation(),this._deviceId=e.target.value,void 0===this._deviceId&&(0,a.B)(this,"value-changed",{value:Object.assign({},c.defaultConfig,{platform:"device"})})}},{kind:"method",key:"_deviceTriggerPicked",value:function(e){e.stopPropagation();var t=e.detail.value;this._origTrigger&&We(this._origTrigger,t)&&(t=this._origTrigger),this.trigger.id&&(t.id=this.trigger.id),(0,a.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_extraFieldsChanged",value:function(e){e.stopPropagation(),(0,a.B)(this,"value-changed",{value:Object.assign({},this.trigger,e.detail.value)})}},{kind:"method",key:"_extraFieldsComputeLabelCallback",value:function(e){return function(t){return e("ui.panel.config.automation.editor.triggers.type.device.extra_fields.".concat(t.name))||t.name}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(Ud||(Ud=$d(["\n ha-device-picker {\n display: block;\n margin-bottom: 24px;\n }\n "])))}}]}}),n.oi),lf=r(1460);function uf(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function df(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){uf(o,n,i,a,s,"next",e)}function s(e){uf(o,n,i,a,s,"throw",e)}a(void 0)}))}}var ff,pf,hf,mf,yf=function(){var e=df(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.callWS({type:"config/auth/list"}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),vf=r(70483);function bf(e){return bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bf(e)}function kf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wf(e,t){return wf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},wf(e,t)}function Ef(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vf(e);if(t){var i=Vf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Cf(this,r)}}function Cf(e,t){if(t&&("object"===bf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pf(e)}function Pf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _f(){_f=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Sf(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r '])),(0,vf.V)({backgroundImage:"url(".concat(e,")")}));var t,r=(t=this.user.name)?t.trim().split(" ").slice(0,3).map((function(e){return e.substring(0,1)})).join(""):"?";return(0,n.dy)(hf||(hf=kf(['\n ',"\n
"])),(0,yl.$)({long:r.length>2}),r)}},{kind:"method",key:"_getPersonPicture",value:function(){if(this._personEntityId=void 0,this._personPicture=void 0,this.hass&&this.user)for(var e=0,t=Object.values(this.hass.states);e=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n ","\n \n "])),this.label,this.disabled,this.value,this._userChanged,0===(null===(e=this.users)||void 0===e?void 0:e.length)?(0,n.dy)(Mf||(Mf=If(['\n ',"\n "])),this.noUserLabel||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.components.user-picker.no_user"))):"",this._sortedUsers(this.users).map((function(e){return(0,n.dy)(Rf||(Rf=If(['\n \n ',"\n \n "])),e.id,r.hass,e,e.name)})))}},{kind:"method",key:"firstUpdated",value:function(e){var t=this;ep(tp(r.prototype),"firstUpdated",this).call(this,e),void 0===this.users&&yf(this.hass).then((function(e){t.users=e}))}},{kind:"method",key:"_userChanged",value:function(e){var t=this,r=e.target.value;r!==this.value&&(this.value=r,setTimeout((function(){(0,a.B)(t,"value-changed",{value:r}),(0,a.B)(t,"change")}),0))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Ff||(Ff=If(["\n :host {\n display: inline-block;\n }\n mwc-list {\n display: block;\n }\n "])))}}]}}),n.oi);function sp(e){return sp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sp(e)}function cp(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function lp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){cp(o,n,i,a,s,"next",e)}function s(e){cp(o,n,i,a,s,"throw",e)}a(void 0)}))}}function up(e){return function(e){if(Array.isArray(e))return _p(e)}(e)||Ap(e)||Pp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function fp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pp(e,t){return pp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},pp(e,t)}function hp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sp(e);if(t){var i=Sp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mp(this,r)}}function mp(e,t){if(t&&("object"===sp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yp(e)}function yp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vp(){vp=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!gp(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),(0,lf.l)([t],(function(){var r;return null===(r=e.value)||void 0===r?void 0:r.map((function(r,i){return(0,n.dy)(ip||(ip=dp(["\n \n \n \n >\n
\n "])),e.pickedUserLabel,e.hass.localize("ui.components.user-picker.remove_user"),i,e.hass,r,e._notSelectedUsersAndSelected(r,e.users,t),e._userChanged,r,e.hass.localize("ui.components.user-picker.remove_user"),"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",e._removeUser)}))})),this.pickUserLabel||this.hass.localize("ui.components.user-picker.add_user"),this.hass,t,!(null!=t&&t.length),this._addUser)}},{kind:"field",key:"_notSelectedUsers",value:function(){return(0,s.Z)((function(e,t){return t?null==e?void 0:e.filter((function(e){return!e.system_generated&&!t.includes(e.id)})):null==e?void 0:e.filter((function(e){return!e.system_generated}))}))}},{kind:"field",key:"_notSelectedUsersAndSelected",value:function(){return function(e,t,r){var n=null==t?void 0:t.find((function(t){return t.id===e}));return n?r?[].concat(up(r),[n]):[n]:r}}},{kind:"get",key:"_currentUsers",value:function(){return this.value||[]}},{kind:"method",key:"_updateUsers",value:(o=lp(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.value=t,(0,a.B)(this,"value-changed",{value:t});case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{kind:"method",key:"_userChanged",value:function(e){e.stopPropagation();var t=e.currentTarget.index,r=e.detail.value,n=up(this._currentUsers);""===r?n.splice(t,1):n.splice(t,1,r),this._updateUsers(n)}},{kind:"method",key:"_addUser",value:(r=lp(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),r=t.detail.value,t.currentTarget.value="",r){e.next=5;break}return e.abrupt("return");case 5:if(!(n=this._currentUsers).includes(r)){e.next=8;break}return e.abrupt("return");case 8:this._updateUsers([].concat(up(n),[r]));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{kind:"method",key:"_removeUser",value:function(e){var t=e.currentTarget.userId;this._updateUsers(this._currentUsers.filter((function(e){return e!==t})))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(op||(op=dp(["\n :host {\n display: block;\n }\n div {\n display: flex;\n align-items: center;\n }\n "])))}}]}}),n.oi);function jp(e){return jp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jp(e)}function Tp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function zp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vp(e,t){return Vp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Vp(e,t)}function Hp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Fp(e);if(t){var i=Fp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Mp(this,r)}}function Mp(e,t){if(t&&("object"===jp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Rp(e)}function Rp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fp(e){return Fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Fp(e)}function Lp(){Lp=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Zp(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Wp=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this._schema(this.hass.localize),this.trigger,this.hass,this._computeLabelCallback,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.geo_location.".concat(t.name))}}}]}}),n.oi);function dh(e){return dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dh(e)}function fh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ph(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hh(e,t){return hh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},hh(e,t)}function mh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bh(e);if(t){var i=bh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yh(this,r)}}function yh(e,t){if(t&&("object"===dh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vh(e)}function vh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bh(e){return bh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},bh(e)}function kh(){kh=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Eh(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),this._schema(this.hass.localize),this.trigger,this.hass,this._computeLabelCallback,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.geo_location.".concat(t.name))}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(uh||(uh=fh(["\n label {\n display: flex;\n align-items: center;\n }\n "])))}}]}}),n.oi);function Sh(e){return Sh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sh(e)}function Dh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xh(e,t){return xh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xh(e,t)}function jh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vh(e);if(t){var i=Vh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Th(this,r)}}function Th(e,t){if(t&&("object"===Sh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zh(e)}function zh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vh(e)}function Hh(){Hh=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Fh(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Oh=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),Nh,this.trigger,this.hass,this._computeLabelCallback,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.mqtt.".concat(t.name))}}}]}}),n.oi);function qh(e){return qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qh(e)}function $h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wh(e,t){return Wh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Wh(e,t)}function Yh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Gh(e);if(t){var i=Gh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kh(this,r)}}function Kh(e,t){if(t&&("object"===qh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Xh(e)}function Xh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gh(e){return Gh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gh(e)}function Qh(){Qh=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!tm(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Uh=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,i,o,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){switch(t.name){case"entity_id":return e.hass.localize("ui.components.entity.entity-picker.entity");case"attribute":return e.hass.localize("ui.components.entity.entity-attribute-picker.attribute");case"for":return e.hass.localize("ui.panel.config.automation.editor.triggers.type.state.for");default:return e.hass.localize("ui.panel.config.automation.editor.triggers.type.numeric_state.".concat(t.name))}}}}]}}),n.oi);function sm(e){return sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sm(e)}function cm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lm(e,t){return lm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lm(e,t)}function um(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pm(e);if(t){var i=pm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dm(this,r)}}function dm(e,t){if(t&&("object"===sm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fm(e)}function fm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pm(e){return pm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pm(e)}function hm(){hm=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!vm(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),am=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,i,o,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;Object.keys(t).forEach((function(e){return void 0===t[e]||""===t[e]?delete t[e]:{}})),(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("entity_id"===t.name?"ui.components.entity.entity-picker.entity":"ui.panel.config.automation.editor.triggers.type.state.".concat(t.name))}}}]}}),n.oi);function Pm(e){return Pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pm(e)}function _m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Am(e,t){return Am=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Am(e,t)}function Om(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xm(e);if(t){var i=xm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Sm(this,r)}}function Sm(e,t){if(t&&("object"===Pm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dm(e)}function Dm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xm(e){return xm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xm(e)}function jm(){jm=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Vm(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Em=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),r,this.trigger,this.hass,this._computeLabelCallback,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.sun.".concat(t.name))}}}]}}),n.oi);function Lm(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function Im(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Lm(o,n,i,a,s,"next",e)}function s(e){Lm(o,n,i,a,s,"throw",e)}a(void 0)}))}}var Bm,Zm,Um=function(){var e=Im(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.callWS({type:"tag/list"}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Nm(e){return Nm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nm(e)}function qm(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function $m(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Wm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ym(e,t){return Ym=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ym(e,t)}function Km(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sy(e);if(t){var i=sy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Xm(this,r)}}function Xm(e,t){if(t&&("object"===Nm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Gm(e)}function Gm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qm(){Qm=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ty(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ","\n \n "])),this.hass.localize("ui.panel.config.automation.editor.triggers.type.tag.label"),0===this._tags.length,e,this._tagChanged,this._tags.map((function(e){return(0,n.dy)(Zm||(Zm=$m(["\n \n ","\n \n "])),e.id,e.name||e.id)})))}},{kind:"method",key:"_fetchTags",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Um(this.hass);case 2:this._tags=e.sent,this._tags.sort((function(e,t){return(0,c.f)(e.name||e.id,t.name||t.id)}));case 4:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){qm(o,n,i,a,s,"next",e)}function s(e){qm(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"method",key:"_tagChanged",value:function(e){(0,a.B)(this,"value-changed",{value:Object.assign({},this.trigger,{tag_id:e.target.value})})}}]}}),n.oi);function uy(e){return uy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uy(e)}function dy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function fy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function py(e,t){return py=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},py(e,t)}function hy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vy(e);if(t){var i=vy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return my(this,r)}}function my(e,t){if(t&&("object"===uy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yy(e)}function yy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vy(e){return vy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},vy(e)}function by(){by=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!wy(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n '])),this.hass.localize("ui.panel.config.automation.editor.triggers.type.template.value_template"),e,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){Rb(this,e)}},{kind:"field",static:!0,key:"styles",value:function(){return(0,n.iv)(ly||(ly=dy(["\n ha-textarea {\n display: block;\n }\n "])))}}]}}),n.oi);function Sy(e){return Sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sy(e)}function Dy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jy(e,t){return jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},jy(e,t)}function Ty(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Hy(e);if(t){var i=Hy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zy(this,r)}}function zy(e,t){if(t&&("object"===Sy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vy(e)}function Vy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hy(e){return Hy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Hy(e)}function My(){My=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ly(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),this.hass,o,i,this._valueChanged,this._computeLabelCallback)}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;this._inputMode="input"===t.mode,delete t.mode,Object.keys(t).forEach((function(e){return void 0===t[e]||""===t[e]?delete t[e]:{}})),(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.time.".concat(t.name))}}}]}}),n.oi);function qy(e){return qy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qy(e)}function $y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wy(e,t){return Wy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Wy(e,t)}function Yy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Gy(e);if(t){var i=Gy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ky(this,r)}}function Ky(e,t){if(t&&("object"===qy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Xy(e)}function Xy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gy(e){return Gy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gy(e)}function Qy(){Qy=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!tv(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),Ny=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,av,this.trigger,this._computeLabelCallback,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;(0,a.B)(this,"value-changed",{value:t})}},{kind:"field",key:"_computeLabelCallback",value:function(){var e=this;return function(t){return e.hass.localize("ui.panel.config.automation.editor.triggers.type.time_pattern.".concat(t.name))}}}]}}),n.oi),r(83447));function cv(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}var lv,uv,dv=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!navigator.clipboard){e.next=9;break}return e.prev=1,e.next=4,navigator.clipboard.writeText(t);case 4:return e.abrupt("return");case 7:e.prev=7,e.t0=e.catch(1);case 9:(r=document.createElement("textarea")).value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r);case 15:case"end":return e.stop()}}),e,null,[[1,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){cv(o,n,i,a,s,"next",e)}function s(e){cv(o,n,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();function fv(e){return fv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fv(e)}function pv(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function hv(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function mv(e){return function(e){if(Array.isArray(e))return Dv(e)}(e)||xv(e)||Sv(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vv(e,t){return vv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},vv(e,t)}function bv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Tv(e);if(t){var i=Tv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return kv(this,r)}}function kv(e,t){if(t&&("object"===fv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gv(e)}function gv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wv(){wv=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Pv(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r