UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

1 lines 24.3 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[89292],{71222:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|&colon;)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"},25939:function(e,t,r){r(74423),r(27495),r(25440),r(42762),r(43359),r(62953),r(3296),r(2222),r(27208),r(48408),r(14603),r(47566),r(98721),t.J=function(e){if(!e)return n.BLANK_URL;var t,r=i(e.trim());do{t=(r=i(r=o(r).replace(n.htmlCtrlEntityRegex,"").replace(n.ctrlCharactersRegex,"").replace(n.whitespaceEscapeCharsRegex,"").trim())).match(n.ctrlCharactersRegex)||r.match(n.htmlEntitiesRegex)||r.match(n.htmlCtrlEntityRegex)||r.match(n.whitespaceEscapeCharsRegex)}while(t&&t.length>0);var a=r;if(!a)return n.BLANK_URL;if(function(e){return n.relativeFirstCharacters.indexOf(e[0])>-1}(a))return a;var c=a.trimStart(),s=c.match(n.urlSchemeRegex);if(!s)return a;var l=s[0].toLowerCase().trim();if(n.invalidProtocolRegex.test(l))return n.BLANK_URL;var d=c.replace(/\\/g,"/");if("mailto:"===l||l.includes("://"))return d;if("http:"===l||"https:"===l){if(!function(e){return URL.canParse(e)}(d))return n.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d};var n=r(71222);function o(e){return e.replace(n.ctrlCharactersRegex,"").replace(n.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){try{return decodeURIComponent(e)}catch(t){return e}}},89020:function(e,t,r){r.d(t,{P:function(){return b},x:function(){return v}});r(18111),r(22489),r(3362);var n=r(5124),o=r(77423),i=r(95350),a=r(95093),c=r(77763),s=r(65063),l=r(90676),d=r(44919),p=r(36918),g=r(36312),f=r(91926);let h,u,m,_=e=>e;const v=["zha","zwave_js","matter"],b=async(e,t,r,v)=>{if(null!=v&&v.domain){const e=await t.loadBackendTranslation("title",v.domain);v.domain=(0,i.p$)(e,v.domain)}if(null!=v&&v.brand){var b;const e=await(0,a.O)(t);v.brand=(null===(b=e.core.integration[v.brand])||void 0===b?void 0:b.name)||v.brand}if("zwave_js"===r){const i=null!=v&&v.config_entry?void 0:(await(0,o.VN)(t,{domain:r})).filter(e=>!e.disabled_by);if(!((0,g.x)(t.config,"zwave_js")&&(null!=v&&v.config_entry||null!=i&&i.length)))return void(0,s.dk)(e,{title:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Z-Wave"}),text:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee",{integration:"Z-Wave",brand:(null==v?void 0:v.brand)||(null==v?void 0:v.domain)||"Z-Wave",supported_hardware_link:(0,n.qy)(h||(h=_`<a href="${0}" target="_blank" rel="noreferrer">${0}</a>`),(0,p.o)(t,"/docs/z-wave/controllers"),t.localize("ui.panel.config.integrations.config_flow.supported_hardware"))}),confirmText:t.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,c.W)(e,{startFlowHandler:"zwave_js"})}});(0,d.X)(e,{entry_id:(null==v?void 0:v.config_entry)||i[0].entry_id})}else if("zha"===r){const i=null!=v&&v.config_entry?void 0:(await(0,o.VN)(t,{domain:r})).filter(e=>!e.disabled_by);if(!((0,g.x)(t.config,"zha")&&(null!=v&&v.config_entry||null!=i&&i.length)))return void(0,s.dk)(e,{title:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Zigbee"}),text:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee",{integration:"Zigbee",brand:(null==v?void 0:v.brand)||(null==v?void 0:v.domain)||"Zigbee",supported_hardware_link:(0,n.qy)(u||(u=_`<a href="${0}" target="_blank" rel="noreferrer">${0}</a>`),(0,p.o)(t,"/integrations/zha/#known-working-zigbee-radio-modules"),t.localize("ui.panel.config.integrations.config_flow.supported_hardware"))}),confirmText:t.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,c.W)(e,{startFlowHandler:"zha"})}});(0,f.oo)("/config/zha/add")}else if("matter"===r){const i=null!=v&&v.config_entry?void 0:(await(0,o.VN)(t,{domain:r})).filter(e=>!e.disabled_by);if(!((0,g.x)(t.config,r)&&(null!=v&&v.config_entry||null!=i&&i.length)))return void(0,s.dk)(e,{title:t.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Matter"}),text:t.localize("ui.panel.config.integrations.config_flow.missing_matter",{integration:"Matter",brand:(null==v?void 0:v.brand)||(null==v?void 0:v.domain)||"Matter",supported_hardware_link:(0,n.qy)(m||(m=_`<a href="${0}" target="_blank" rel="noreferrer">${0}</a>`),(0,p.o)(t,"/integrations/matter"),t.localize("ui.panel.config.integrations.config_flow.supported_hardware"))}),confirmText:t.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,c.W)(e,{startFlowHandler:"matter"})}});(0,l.g)(e)}}},26571:function(e,t,r){r.d(t,{Al:function(){return i},KY:function(){return o},PN:function(){return s},dG:function(){return d},jm:function(){return l},m7:function(){return u},sR:function(){return p},t1:function(){return c},t2:function(){return f},x:function(){return h},yu:function(){return g}});var n=r(95350);const o=["bluetooth","dhcp","discovery","esphome","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"],i=["reauth"],a={"HA-Frontend-Base":`${location.protocol}//${location.host}`},c=(e,t,r)=>e.callApi("POST","config/config_entries/flow",{handler:t,entry_id:r},a),s=(e,t)=>e.callApi("GET",`config/config_entries/flow/${t}`,void 0,a),l=(e,t,r)=>e.callApi("POST",`config/config_entries/flow/${t}`,r,a),d=(e,t,r)=>e.callWS({type:"config_entries/ignore_flow",flow_id:t,title:r}),p=(e,t)=>e.callApi("DELETE",`config/config_entries/flow/${t}`),g=(e,t)=>e.callApi("GET","config/config_entries/flow_handlers"+(t?`?type=${t}`:"")),f=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),h=(e,t)=>e.connection.subscribeMessage(e=>t(e),{type:"config_entries/flow/subscribe"}),u=(e,t)=>t.context.title_placeholders&&0!==Object.keys(t.context.title_placeholders).length?e(`component.${t.handler}.config.flow_title`,t.context.title_placeholders)||("name"in t.context.title_placeholders?t.context.title_placeholders.name:(0,n.p$)(e,t.handler)):(0,n.p$)(e,t.handler)},95093:function(e,t,r){r.d(t,{O:function(){return n},s:function(){return o}});r(62953);const n=e=>e.callWS({type:"integration/descriptions"}),o=(e,t)=>{if(e){if(t in e){const r=e[t];if("integration_type"in r)return r}for(const r of Object.values(e))if("integrations"in r&&r.integrations&&t in r.integrations)return r.integrations[t]}}},77763:function(e,t,r){r.d(t,{W:function(){return _}});r(89463),r(3362),r(62953);var n=r(5124),o=r(26571),i=r(95350),a=r(29094);let c,s,l,d,p,g,f,h,u,m=e=>e;const _=(e,t)=>(0,a.g)(e,t,{flowType:"config_flow",showDevices:!0,createFlow:async(e,r)=>{const[n]=await Promise.all([(0,o.t1)(e,r,t.entryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config",r),e.loadBackendTranslation("selector",r),e.loadBackendTranslation("title",r)]);return n},fetchFlow:async(e,t)=>{const[r]=await Promise.all([(0,o.PN)(e,t),e.loadFragmentTranslation("config")]);return await Promise.all([e.loadBackendTranslation("config",r.handler),e.loadBackendTranslation("selector",r.handler),e.loadBackendTranslation("title",r.handler)]),r},handleFlowStep:o.jm,deleteFlow:o.sR,renderAbortDescription(e,t){const r=e.localize(`component.${t.translation_domain||t.handler}.config.abort.${t.reason}`,t.description_placeholders);return r?(0,n.qy)(c||(c=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),r):t.reason},renderShowFormStepHeader(e,t){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.title`,t.description_placeholders)||e.localize(`component.${t.handler}.title`)},renderShowFormStepDescription(e,t){const r=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return r?(0,n.qy)(s||(s=m` <ha-markdown .allowDataUrl="${0}" allow-svg breaks .content="${0}"></ha-markdown> `),"zwave_js"===t.handler,r):""},renderShowFormStepFieldLabel(e,t,r,n){var o;if("expandable"===r.type)return e.localize(`component.${t.handler}.config.step.${t.step_id}.sections.${r.name}.name`,t.description_placeholders)||r.name;const i=null!=n&&null!==(o=n.path)&&void 0!==o&&o[0]?`sections.${n.path[0]}.`:"";return e.localize(`component.${t.handler}.config.step.${t.step_id}.${i}data.${r.name}`,t.description_placeholders)||r.name},renderShowFormStepFieldHelper(e,t,r,o){var i;if("expandable"===r.type)return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.sections.${r.name}.description`,t.description_placeholders);const a=null!=o&&null!==(i=o.path)&&void 0!==i&&i[0]?`sections.${o.path[0]}.`:"",c=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.${a}data_description.${r.name}`,t.description_placeholders);return c?(0,n.qy)(l||(l=m`<ha-markdown breaks .content="${0}"></ha-markdown>`),c):""},renderShowFormStepFieldError(e,t,r){return e.localize(`component.${t.translation_domain||t.translation_domain||t.handler}.config.error.${r}`,t.description_placeholders)||r},renderShowFormStepFieldLocalizeValue(e,t,r){return e.localize(`component.${t.handler}.selector.${r}`)},renderShowFormStepSubmitButton(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===t.last_step?"next":"submit"))},renderExternalStepHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,t){const r=e.localize(`component.${t.translation_domain||t.handler}.config.${t.step_id}.description`,t.description_placeholders);return(0,n.qy)(d||(d=m` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),r?(0,n.qy)(p||(p=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),r):"")},renderCreateEntryDescription(e,t){const r=e.localize(`component.${t.translation_domain||t.handler}.config.create_entry.${t.description||"default"}`,t.description_placeholders);return(0,n.qy)(g||(g=m` ${0} `),r?(0,n.qy)(f||(f=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),r):n.s6)},renderShowFormProgressHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`)},renderShowFormProgressDescription(e,t){const r=e.localize(`component.${t.translation_domain||t.handler}.config.progress.${t.progress_action}`,t.description_placeholders);return r?(0,n.qy)(h||(h=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),r):""},renderMenuHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`)},renderMenuDescription(e,t){const r=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return r?(0,n.qy)(u||(u=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),r):""},renderMenuOption(e,t,r){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_options.${r}`,t.description_placeholders)},renderMenuOptionDescription(e,t,r){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_option_descriptions.${r}`,t.description_placeholders)},renderLoadingDescription(e,t,r,n){if("loading_flow"!==t&&"loading_step"!==t)return"";const o=(null==n?void 0:n.handler)||r;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:o?(0,i.p$)(e.localize,o):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},29094:function(e,t,r){r.d(t,{g:function(){return i}});r(3362),r(62953);var n=r(1087);const o=()=>Promise.all([r.e(72850),r.e(39763),r.e(32450),r.e(46095),r.e(7305),r.e(92769),r.e(3283),r.e(80131),r.e(98470),r.e(54066),r.e(84038),r.e(62364),r.e(62574),r.e(26092),r.e(39005),r.e(28501),r.e(29792)]).then(r.bind(r,78314)),i=(e,t,r)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:o,dialogParams:Object.assign(Object.assign({},t),{},{flowConfig:r,dialogParentElement:e})})}},90676:function(e,t,r){r.d(t,{g:function(){return i}});r(3362),r(62953);var n=r(1087);const o=()=>Promise.all([r.e(72850),r.e(39763),r.e(32450),r.e(46095),r.e(7305),r.e(92769),r.e(34995),r.e(3283),r.e(80131),r.e(35764),r.e(10653),r.e(62574),r.e(26092),r.e(39005),r.e(8851),r.e(12009),r.e(66201),r.e(86499),r.e(49207)]).then(r.bind(r,7664)),i=e=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-matter-add-device",dialogImport:o,dialogParams:{}})}},44919:function(e,t,r){r.d(t,{X:function(){return i}});r(3362),r(62953);var n=r(1087);const o=()=>Promise.all([r.e(72850),r.e(39763),r.e(32450),r.e(46095),r.e(34995),r.e(58300),r.e(62574),r.e(83878)]).then(r.bind(r,54985)),i=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-zwave_js-add-node",dialogImport:o,dialogParams:t})}},84039:function(e,t,r){r.a(e,async function(e,n){try{r.r(t),r.d(t,{getMyRedirects:function(){return k}});r(16280),r(74423),r(62953);var o=r(40445),i=r(25939),a=r(5124),c=r(67576),s=r(36312),l=r(89020),d=r(91926),p=r(6030),g=r(95350),f=r(28794),h=r(36918),u=e([f]);f=(u.then?(await u)():u)[0];let m,_,v,b,w,y=e=>e;const k=()=>({application_credentials:{redirect:"/config/application_credentials"},developer_assist:{redirect:"/config/developer-tools/assist"},developer_debug:{redirect:"/config/developer-tools/debug"},developer_states:{redirect:"/config/developer-tools/state"},developer_services:{redirect:"/config/developer-tools/action"},developer_call_service:{redirect:"/config/developer-tools/action",params:{service:"string"}},developer_template:{redirect:"/config/developer-tools/template"},developer_events:{redirect:"/config/developer-tools/event"},developer_statistics:{redirect:"/config/developer-tools/statistics"},server_controls:{redirect:"/config/developer-tools/yaml"},calendar:{component:"calendar",redirect:"/calendar"},companion_app:{redirect:"#external-app-configuration"},config:{redirect:"/config/dashboard"},cloud:{component:"cloud",redirect:"/config/cloud"},config_flow_start:{redirect:"/config/integrations/dashboard/add",params:{domain:"string"}},brand:{redirect:"/config/integrations/dashboard/add",params:{brand:"string"}},integration:{redirect:"/config/integrations/integration",params:{domain:"string"}},integrations:{redirect:"/config/integrations"},config_mqtt:{component:"mqtt",redirect:"/config/mqtt"},config_zha:{component:"zha",redirect:"/config/zha/dashboard"},config_zwave_js:{component:"zwave_js",redirect:"/config/zwave_js/dashboard"},config_matter:{component:"matter",redirect:"/config/matter/dashboard"},config_thread:{component:"thread",redirect:"/config/thread"},add_zigbee_device:{component:"zha",redirect:"/config/zha/add"},add_zwave_device:{component:"zwave_js",redirect:"/config/zwave_js/add"},add_matter_device:{component:"matter",redirect:"/config/matter/add"},bluetooth_advertisement_monitor:{component:"bluetooth",redirect:"/config/bluetooth/advertisement-monitor"},bluetooth_connection_monitor:{component:"bluetooth",redirect:"/config/bluetooth/connection-monitor"},bluetooth_visualization:{component:"bluetooth",redirect:"/config/bluetooth/visualization"},config_ai_task:{redirect:"/config/general/#ai-task"},config_bluetooth:{component:"bluetooth",redirect:"/config/bluetooth"},config_dhcp:{component:"dhcp",redirect:"/config/dhcp"},config_energy:{component:"energy",redirect:"/config/energy"},config_ssdp:{component:"ssdp",redirect:"/config/ssdp"},config_zeroconf:{component:"zeroconf",redirect:"/config/zeroconf"},devices:{redirect:"/config/devices/dashboard"},entities:{redirect:"/config/entities"},labels:{redirect:"/config/labels"},energy:{component:"energy",redirect:"/energy"},areas:{redirect:"/config/areas/dashboard"},blueprint_import:{component:"blueprint",redirect:"/config/blueprint/dashboard/import",params:{blueprint_url:"url"}},blueprints:{component:"blueprint",redirect:"/config/blueprint/dashboard"},automations:{component:"automation",redirect:"/config/automation/dashboard"},scenes:{component:"scene",redirect:"/config/scene/dashboard"},scripts:{component:"script",redirect:"/config/script/dashboard"},helpers:{redirect:"/config/helpers"},labs:{redirect:"/config/labs",params:{domain:"string?",preview_feature:"string?"}},tags:{component:"tag",redirect:"/config/tags"},voice_assistants:{redirect:"/config/voice-assistants"},lovelace_dashboards:{component:"lovelace",redirect:"/config/lovelace/dashboards"},lovelace_resources:{component:"lovelace",redirect:"/config/lovelace/resources"},oauth:{redirect:"/auth/external/callback",navigate_outside_spa:!0,params:{error:"string?",code:"string?",state:"string"}},people:{component:"person",redirect:"/config/person"},zones:{component:"zone",redirect:"/config/zone"},users:{redirect:"/config/users"},general:{redirect:"/config/general"},logs:{redirect:"/config/logs",params:{provider:"string?"}},repairs:{component:"repairs",redirect:"/config/repairs"},info:{redirect:"/config/info"},system_health:{redirect:"/config/repairs?dialog=system-health"},hardware:{redirect:"/config/hardware"},storage:{redirect:"/config/storage"},network:{redirect:"/config/network"},analytics:{redirect:"/config/analytics"},updates:{redirect:"/config/updates"},system_dashboard:{redirect:"/config/system"},customize:{redirect:"/config/dashboard"},profile_security:{redirect:"/profile/security"},profile:{redirect:"/profile"},logbook:{component:"logbook",redirect:"/logbook"},history:{component:"history",redirect:"/history"},maintenance:{redirect:"/maintenance"},overview:{redirect:"/home/overview"},media_browser:{component:"media_source",redirect:"/media-browser"},backup_list:{component:"backup",redirect:"/config/backup/backups"},backup_config:{component:"backup",redirect:"/config/backup/settings"},backup:{component:"backup",redirect:"/config/backup"},supervisor_snapshots:{component:"backup",redirect:"/config/backup"},supervisor_backups:{component:"backup",redirect:"/config/backup"},supervisor_system:{redirect:"/config/system"},supervisor_logs:{redirect:"/config/logs?provider=supervisor"},supervisor_info:{redirect:"/config/info"},supervisor_store:{component:"hassio",redirect:"/config/apps/available"},supervisor_addons:{component:"hassio",redirect:"/config/apps"},supervisor_app:{component:"hassio",redirect:"/config/app",params:{app:"string"},optional_params:{repository_url:"url"}},supervisor_addon:{component:"hassio",redirect:"/config/app",params:{addon:"string"},optional_params:{repository_url:"url"}},supervisor_add_addon_repository:{component:"hassio",redirect:"/config/apps/available",params:{repository_url:"url"}},hacs_repository:{component:"hacs",redirect:"/hacs/_my_redirect/hacs_repository",params:{owner:"string",repository:"string",category:"string?"}},lights:{redirect:"/lights"}}),z=e=>{var t;return null===(t=k())||void 0===t?void 0:t[e]};class $ extends a.WF{connectedCallback(){super.connectedCallback();const e=this.route.path.substring(1,this.route.path.endsWith("/")?this.route.path.length-1:void 0);if(this._redirect=z(e),!this._redirect)return void(this._error="not_supported");var t;if("#external-app-configuration"===this._redirect.redirect)return null!==(t=this.hass.auth.external)&&void 0!==t&&t.config.hasSettingsScreen?void this.hass.auth.external.fireMessage({type:"config_screen/show"}):void(this._error="not_app");if(this._redirect.component&&!(0,s.x)(this.hass.config,this._redirect.component)){this.hass.loadBackendTranslation("title",this._redirect.component),this._error="hassio"===this._redirect.component?"no_supervisor":"no_component";const e=this._redirect.component;if(l.x.includes(e)){const t=(0,p.px)();this.hass.loadFragmentTranslation("config").then().then(()=>{(0,l.P)(this,this.hass,e,{domain:t.domain,brand:t.brand})})}return}let r;try{r=this._createRedirectUrl()}catch(n){return void(this._error="url_error")}this._redirect.navigate_outside_spa?location.assign(r):(0,d.oo)(r,{replace:!0})}render(){if(this._error){let e;switch(this._error){case"not_supported":e=this.hass.localize("ui.panel.my.not_supported",{link:(0,a.qy)(m||(m=y`<a target="_blank" rel="noreferrer noopener" href="https://my.home-assistant.io/faq.html#supported-pages">${0}</a>`),this.hass.localize("ui.panel.my.faq_link"))})||"This redirect is not supported.";break;case"no_component":e=this.hass.localize("ui.panel.my.component_not_loaded",{integration:(0,a.qy)(_||(_=y`<a target="_blank" rel="noreferrer noopener" href="${0}">${0}</a>`),(0,h.o)(this.hass,`/integrations/${this._redirect.component}`),(0,g.p$)(this.hass.localize,this._redirect.component))})||"This redirect is not supported.";break;case"no_supervisor":e=this.hass.localize("ui.panel.my.no_supervisor",{docs_link:(0,a.qy)(v||(v=y`<a target="_blank" rel="noreferrer noopener" href="${0}">${0}</a>`),(0,h.o)(this.hass,"/installation"),this.hass.localize("ui.panel.my.documentation"))});break;case"not_app":e=this.hass.localize("ui.panel.my.not_app",{link:(0,a.qy)(b||(b=y`<a target="_blank" rel="noreferrer noopener" href="https://companion.home-assistant.io/download">${0}</a>`),this.hass.localize("ui.panel.my.download_app"))});break;case"url_error":e=this.hass.localize("ui.panel.my.url_error");break;default:e=this.hass.localize("ui.panel.my.error")||"Unknown error"}return(0,a.qy)(w||(w=y`<hass-error-screen .error="${0}" .hass="${0}"></hass-error-screen>`),e,this.hass)}return a.s6}_createRedirectUrl(){const e=(0,p.px)();if("/config/app"===this._redirect.redirect){const t=e.app||e.addon;if(t){delete e.app,delete e.addon;return`/config/app/${t}/info${this._createOptionalParams(e)}`}}const t=this._createRedirectParams();return`${this._redirect.redirect}${t}`}_createRedirectParams(){const e=(0,p.px)();if(!this._redirect.params&&!this._redirect.optional_params&&!Object.keys(e).length)return"";const t={};for(const[r,n]of Object.entries(this._redirect.params||{}))if(e[r]||!n.endsWith("?")){if(!e[r]||!this._checkParamType(n,e[r]))throw Error();t[r]=e[r]}for(const[r,n]of Object.entries(this._redirect.optional_params||{}))if(e[r]){if(!this._checkParamType(n,e[r]))throw Error();t[r]=e[r]}return Object.keys(t).length?`?${(0,p.KH)(t)}`:""}_createOptionalParams(e){if(!this._redirect.optional_params)return"";const t={};for(const[r,n]of Object.entries(this._redirect.optional_params))if(e[r]){if(!this._checkParamType(n,e[r]))throw Error();t[r]=e[r]}return Object.keys(t).length?`?${(0,p.KH)(t)}`:""}_checkParamType(e,t){return"string"===e||"string?"===e||"url"===e&&(t&&t===(0,i.J)(t))}}(0,o.Cg)([(0,c.MZ)({attribute:!1})],$.prototype,"hass",void 0),(0,o.Cg)([(0,c.MZ)({attribute:!1})],$.prototype,"route",void 0),(0,o.Cg)([(0,c.wk)()],$.prototype,"_error",void 0),$=(0,o.Cg)([(0,c.EM)("ha-panel-my")],$),n()}catch(m){n(m)}})},36918:function(e,t,r){r.d(t,{o:function(){return n}});const n=(e,t)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},53487:function(e,t,r){var n=r(43802).start,o=r(60706);e.exports=o("trimStart")?function(){return n(this)}:"".trimStart},58934:function(e,t,r){var n=r(46518),o=r(53487);n({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==o},{trimLeft:o})},43359:function(e,t,r){r(58934);var n=r(46518),o=r(53487);n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==o},{trimStart:o})},2222:function(e,t,r){var n=r(46518),o=r(97751),i=r(79039),a=r(22812),c=r(655),s=r(67416),l=o("URL"),d=s&&i(function(){l.canParse()}),p=i(function(){return 1!==l.canParse.length});n({target:"URL",stat:!0,forced:!d||p},{canParse:function(e){var t=a(arguments.length,1),r=c(e),n=t<2||void 0===arguments[1]?void 0:c(arguments[1]);try{return!!new l(r,n)}catch(o){return!1}}})}}]);