UNPKG

iobroker.lovelace

Version:

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

1 lines 23.1 kB
export const __rspack_esm_id=89292;export const __rspack_esm_ids=[89292];export const __webpack_modules__={71222(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BLANK_URL=r.relativeFirstCharacters=r.whitespaceEscapeCharsRegex=r.urlSchemeRegex=r.ctrlCharactersRegex=r.htmlCtrlEntityRegex=r.htmlEntitiesRegex=r.invalidProtocolRegex=void 0,r.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,r.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,r.htmlCtrlEntityRegex=/&(newline|tab);/gi,r.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,r.urlSchemeRegex=/^.+(:|&colon;)/gim,r.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,r.relativeFirstCharacters=[".","/"],r.BLANK_URL="about:blank"},25939(e,r,t){t(74423),t(2222),t(14603),t(47566),t(98721),r.J=function(e){if(!e)return o.BLANK_URL;var r,t=i(e.trim());do{r=(t=i(t=n(t).replace(o.htmlCtrlEntityRegex,"").replace(o.ctrlCharactersRegex,"").replace(o.whitespaceEscapeCharsRegex,"").trim())).match(o.ctrlCharactersRegex)||t.match(o.htmlEntitiesRegex)||t.match(o.htmlCtrlEntityRegex)||t.match(o.whitespaceEscapeCharsRegex)}while(r&&r.length>0);var a=t;if(!a)return o.BLANK_URL;if(function(e){return o.relativeFirstCharacters.indexOf(e[0])>-1}(a))return a;var c=a.trimStart(),s=c.match(o.urlSchemeRegex);if(!s)return a;var l=s[0].toLowerCase().trim();if(o.invalidProtocolRegex.test(l))return o.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 o.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d};var o=t(71222);function n(e){return e.replace(o.ctrlCharactersRegex,"").replace(o.htmlEntitiesRegex,function(e,r){return String.fromCharCode(r)})}function i(e){try{return decodeURIComponent(e)}catch(r){return e}}},89020(e,r,t){t.d(r,{P:()=>m,x:()=>f});t(18111),t(22489);var o=t(5124),n=t(77423),i=t(95350),a=t(95093),c=t(77763),s=t(65063),l=t(90676),d=t(44919),p=t(36918),g=t(36312),h=t(91926);const f=["zha","zwave_js","matter"],m=async(e,r,t,f)=>{if(f?.domain){const e=await r.loadBackendTranslation("title",f.domain);f.domain=(0,i.p$)(e,f.domain)}if(f?.brand){const e=await(0,a.O)(r);f.brand=e.core.integration[f.brand]?.name||f.brand}if("zwave_js"===t){const i=f?.config_entry?void 0:(await(0,n.VN)(r,{domain:t})).filter(e=>!e.disabled_by);if(!(0,g.x)(r.config,"zwave_js")||!f?.config_entry&&!i?.length)return void(0,s.dk)(e,{title:r.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Z-Wave"}),text:r.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee",{integration:"Z-Wave",brand:f?.brand||f?.domain||"Z-Wave",supported_hardware_link:o.qy`<a href="${(0,p.o)(r,"/docs/z-wave/controllers")}" target="_blank" rel="noreferrer">${r.localize("ui.panel.config.integrations.config_flow.supported_hardware")}</a>`}),confirmText:r.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,c.W)(e,{startFlowHandler:"zwave_js"})}});(0,d.X)(e,{entry_id:f?.config_entry||i[0].entry_id})}else if("zha"===t){const i=f?.config_entry?void 0:(await(0,n.VN)(r,{domain:t})).filter(e=>!e.disabled_by);if(!(0,g.x)(r.config,"zha")||!f?.config_entry&&!i?.length)return void(0,s.dk)(e,{title:r.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Zigbee"}),text:r.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee",{integration:"Zigbee",brand:f?.brand||f?.domain||"Zigbee",supported_hardware_link:o.qy`<a href="${(0,p.o)(r,"/integrations/zha/#known-working-zigbee-radio-modules")}" target="_blank" rel="noreferrer">${r.localize("ui.panel.config.integrations.config_flow.supported_hardware")}</a>`}),confirmText:r.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,c.W)(e,{startFlowHandler:"zha"})}});(0,h.oo)("/config/zha/add")}else if("matter"===t){const i=f?.config_entry?void 0:(await(0,n.VN)(r,{domain:t})).filter(e=>!e.disabled_by);if(!(0,g.x)(r.config,t)||!f?.config_entry&&!i?.length)return void(0,s.dk)(e,{title:r.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Matter"}),text:r.localize("ui.panel.config.integrations.config_flow.missing_matter",{integration:"Matter",brand:f?.brand||f?.domain||"Matter",supported_hardware_link:o.qy`<a href="${(0,p.o)(r,"/integrations/matter")}" target="_blank" rel="noreferrer">${r.localize("ui.panel.config.integrations.config_flow.supported_hardware")}</a>`}),confirmText:r.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,c.W)(e,{startFlowHandler:"matter"})}});(0,l.g)(e)}}},26571(e,r,t){t.d(r,{Al:()=>i,KY:()=>n,PN:()=>s,dG:()=>d,jm:()=>l,m7:()=>m,sR:()=>p,t1:()=>c,t2:()=>h,x:()=>f,yu:()=>g});var o=t(95350);const n=["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,r,t)=>e.callApi("POST","config/config_entries/flow",{handler:r,entry_id:t},a),s=(e,r)=>e.callApi("GET",`config/config_entries/flow/${r}`,void 0,a),l=(e,r,t)=>e.callApi("POST",`config/config_entries/flow/${r}`,t,a),d=(e,r,t)=>e.callWS({type:"config_entries/ignore_flow",flow_id:r,title:t}),p=(e,r)=>e.callApi("DELETE",`config/config_entries/flow/${r}`),g=(e,r)=>e.callApi("GET","config/config_entries/flow_handlers"+(r?`?type=${r}`:"")),h=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),f=(e,r)=>e.connection.subscribeMessage(e=>r(e),{type:"config_entries/flow/subscribe"}),m=(e,r)=>r.context.title_placeholders&&0!==Object.keys(r.context.title_placeholders).length?e(`component.${r.handler}.config.flow_title`,r.context.title_placeholders)||("name"in r.context.title_placeholders?r.context.title_placeholders.name:(0,o.p$)(e,r.handler)):(0,o.p$)(e,r.handler)},95093(e,r,t){t.d(r,{O:()=>o,s:()=>n});const o=e=>e.callWS({type:"integration/descriptions"}),n=(e,r)=>{if(e){if(r in e){const t=e[r];if("integration_type"in t)return t}for(const t of Object.values(e))if("integrations"in t&&t.integrations&&r in t.integrations)return t.integrations[r]}}},77763(e,r,t){t.d(r,{W:()=>c});var o=t(5124),n=t(26571),i=t(95350),a=t(29094);const c=(e,r)=>(0,a.g)(e,r,{flowType:"config_flow",showDevices:!0,createFlow:async(e,t)=>{const[o]=await Promise.all([(0,n.t1)(e,t,r.entryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config",t),e.loadBackendTranslation("selector",t),e.loadBackendTranslation("title",t)]);return o},fetchFlow:async(e,r)=>{const[t]=await Promise.all([(0,n.PN)(e,r),e.loadFragmentTranslation("config")]);return await Promise.all([e.loadBackendTranslation("config",t.handler),e.loadBackendTranslation("selector",t.handler),e.loadBackendTranslation("title",t.handler)]),t},handleFlowStep:n.jm,deleteFlow:n.sR,renderAbortDescription(e,r){const t=e.localize(`component.${r.translation_domain||r.handler}.config.abort.${r.reason}`,r.description_placeholders);return t?o.qy` <ha-markdown allow-svg breaks .content="${t}"></ha-markdown> `:r.reason},renderShowFormStepHeader:(e,r)=>e.localize(`component.${r.translation_domain||r.handler}.config.step.${r.step_id}.title`,r.description_placeholders)||e.localize(`component.${r.handler}.title`),renderShowFormStepDescription(e,r){const t=e.localize(`component.${r.translation_domain||r.handler}.config.step.${r.step_id}.description`,r.description_placeholders);return t?o.qy` <ha-markdown .allowDataUrl="${"zwave_js"===r.handler}" allow-svg breaks .content="${t}"></ha-markdown> `:""},renderShowFormStepFieldLabel(e,r,t,o){if("expandable"===t.type)return e.localize(`component.${r.handler}.config.step.${r.step_id}.sections.${t.name}.name`,r.description_placeholders)||t.name;const n=o?.path?.[0]?`sections.${o.path[0]}.`:"";return e.localize(`component.${r.handler}.config.step.${r.step_id}.${n}data.${t.name}`,r.description_placeholders)||t.name},renderShowFormStepFieldHelper(e,r,t,n){if("expandable"===t.type)return e.localize(`component.${r.translation_domain||r.handler}.config.step.${r.step_id}.sections.${t.name}.description`,r.description_placeholders);const i=n?.path?.[0]?`sections.${n.path[0]}.`:"",a=e.localize(`component.${r.translation_domain||r.handler}.config.step.${r.step_id}.${i}data_description.${t.name}`,r.description_placeholders);return a?o.qy`<ha-markdown breaks .content="${a}"></ha-markdown>`:""},renderShowFormStepFieldError:(e,r,t)=>e.localize(`component.${r.translation_domain||r.translation_domain||r.handler}.config.error.${t}`,r.description_placeholders)||t,renderShowFormStepFieldLocalizeValue:(e,r,t)=>e.localize(`component.${r.handler}.selector.${t}`),renderShowFormStepSubmitButton:(e,r)=>e.localize(`component.${r.handler}.config.step.${r.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===r.last_step?"next":"submit")),renderExternalStepHeader:(e,r)=>e.localize(`component.${r.handler}.config.step.${r.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site"),renderExternalStepDescription(e,r){const t=e.localize(`component.${r.translation_domain||r.handler}.config.${r.step_id}.description`,r.description_placeholders);return o.qy` <p> ${e.localize("ui.panel.config.integrations.config_flow.external_step.description")} </p> ${t?o.qy` <ha-markdown allow-svg breaks .content="${t}"></ha-markdown> `:""} `},renderCreateEntryDescription(e,r){const t=e.localize(`component.${r.translation_domain||r.handler}.config.create_entry.${r.description||"default"}`,r.description_placeholders);return o.qy` ${t?o.qy` <ha-markdown allow-svg breaks .content="${t}"></ha-markdown> `:o.s6} `},renderShowFormProgressHeader:(e,r)=>e.localize(`component.${r.handler}.config.step.${r.step_id}.title`)||e.localize(`component.${r.handler}.title`),renderShowFormProgressDescription(e,r){const t=e.localize(`component.${r.translation_domain||r.handler}.config.progress.${r.progress_action}`,r.description_placeholders);return t?o.qy` <ha-markdown allow-svg breaks .content="${t}"></ha-markdown> `:""},renderMenuHeader:(e,r)=>e.localize(`component.${r.handler}.config.step.${r.step_id}.title`)||e.localize(`component.${r.handler}.title`),renderMenuDescription(e,r){const t=e.localize(`component.${r.translation_domain||r.handler}.config.step.${r.step_id}.description`,r.description_placeholders);return t?o.qy` <ha-markdown allow-svg breaks .content="${t}"></ha-markdown> `:""},renderMenuOption:(e,r,t)=>e.localize(`component.${r.translation_domain||r.handler}.config.step.${r.step_id}.menu_options.${t}`,r.description_placeholders),renderMenuOptionDescription:(e,r,t)=>e.localize(`component.${r.translation_domain||r.handler}.config.step.${r.step_id}.menu_option_descriptions.${t}`,r.description_placeholders),renderLoadingDescription(e,r,t,o){if("loading_flow"!==r&&"loading_step"!==r)return"";const n=o?.handler||t;return e.localize(`ui.panel.config.integrations.config_flow.loading.${r}`,{integration:n?(0,i.p$)(e.localize,n):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},29094(e,r,t){t.d(r,{g:()=>i});var o=t(1087);const n=()=>Promise.all([t.e(4801),t.e(39763),t.e(32450),t.e(46095),t.e(7305),t.e(92769),t.e(3283),t.e(80131),t.e(58416),t.e(54066),t.e(84038),t.e(69205),t.e(26092),t.e(48531),t.e(92411),t.e(44642)]).then(t.bind(t,78314)),i=(e,r,t)=>{(0,o.r)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:n,dialogParams:{...r,flowConfig:t,dialogParentElement:e}})}},90676(e,r,t){t.d(r,{g:()=>i});var o=t(1087);const n=()=>Promise.all([t.e(4801),t.e(39763),t.e(32450),t.e(46095),t.e(7305),t.e(92769),t.e(34995),t.e(3283),t.e(80131),t.e(35764),t.e(47417),t.e(26092),t.e(8851),t.e(12009),t.e(66201),t.e(2513),t.e(40551)]).then(t.bind(t,7664)),i=e=>{(0,o.r)(e,"show-dialog",{dialogTag:"dialog-matter-add-device",dialogImport:n,dialogParams:{}})}},44919(e,r,t){t.d(r,{X:()=>i});var o=t(1087);const n=()=>Promise.all([t.e(4801),t.e(39763),t.e(32450),t.e(46095),t.e(34995),t.e(75613),t.e(64366)]).then(t.bind(t,54985)),i=(e,r)=>{(0,o.r)(e,"show-dialog",{dialogTag:"dialog-zwave_js-add-node",dialogImport:n,dialogParams:r})}},84039(e,r,t){t.a(e,async function(e,o){try{t.r(r),t.d(r,{getMyRedirects:()=>_});t(74423);var n=t(62826),i=t(25939),a=t(5124),c=t(22441),s=t(36312),l=t(89020),d=t(91926),p=t(6030),g=t(95350),h=t(28794),f=t(36918),m=e([h]);h=(m.then?(await m)():m)[0];const _=()=>({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"}}),u=e=>_()?.[e];class b 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=u(e),!this._redirect)return void(this._error="not_supported");if("#external-app-configuration"===this._redirect.redirect)return this.hass.auth.external?.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 r=(0,p.px)();this.hass.loadFragmentTranslation("config").then().then(()=>{(0,l.P)(this,this.hass,e,{domain:r.domain,brand:r.brand})})}return}let r;try{r=this._createRedirectUrl()}catch(e){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:a.qy`<a target="_blank" rel="noreferrer noopener" href="https://my.home-assistant.io/faq.html#supported-pages">${this.hass.localize("ui.panel.my.faq_link")}</a>`})||"This redirect is not supported.";break;case"no_component":e=this.hass.localize("ui.panel.my.component_not_loaded",{integration:a.qy`<a target="_blank" rel="noreferrer noopener" href="${(0,f.o)(this.hass,`/integrations/${this._redirect.component}`)}">${(0,g.p$)(this.hass.localize,this._redirect.component)}</a>`})||"This redirect is not supported.";break;case"no_supervisor":e=this.hass.localize("ui.panel.my.no_supervisor",{docs_link:a.qy`<a target="_blank" rel="noreferrer noopener" href="${(0,f.o)(this.hass,"/installation")}">${this.hass.localize("ui.panel.my.documentation")}</a>`});break;case"not_app":e=this.hass.localize("ui.panel.my.not_app",{link:a.qy`<a target="_blank" rel="noreferrer noopener" href="https://companion.home-assistant.io/download">${this.hass.localize("ui.panel.my.download_app")}</a>`});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 a.qy`<hass-error-screen .error="${e}" .hass="${this.hass}"></hass-error-screen>`}return a.s6}_createRedirectUrl(){const e=(0,p.px)();if("/config/app"===this._redirect.redirect){const r=e.app||e.addon;if(r){delete e.app,delete e.addon;return`/config/app/${r}/info${this._createOptionalParams(e)}`}}const r=this._createRedirectParams();return`${this._redirect.redirect}${r}`}_createRedirectParams(){const e=(0,p.px)();if(!this._redirect.params&&!this._redirect.optional_params&&!Object.keys(e).length)return"";const r={};for(const[t,o]of Object.entries(this._redirect.params||{}))if(e[t]||!o.endsWith("?")){if(!e[t]||!this._checkParamType(o,e[t]))throw Error();r[t]=e[t]}for(const[t,o]of Object.entries(this._redirect.optional_params||{}))if(e[t]){if(!this._checkParamType(o,e[t]))throw Error();r[t]=e[t]}return Object.keys(r).length?`?${(0,p.KH)(r)}`:""}_createOptionalParams(e){if(!this._redirect.optional_params)return"";const r={};for(const[t,o]of Object.entries(this._redirect.optional_params))if(e[t]){if(!this._checkParamType(o,e[t]))throw Error();r[t]=e[t]}return Object.keys(r).length?`?${(0,p.KH)(r)}`:""}_checkParamType(e,r){return"string"===e||"string?"===e||"url"===e&&(r&&r===(0,i.J)(r))}}(0,n.Cg)([(0,c.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,n.Cg)([(0,c.MZ)({attribute:!1})],b.prototype,"route",void 0),(0,n.Cg)([(0,c.wk)()],b.prototype,"_error",void 0),b=(0,n.Cg)([(0,c.EM)("ha-panel-my")],b),o()}catch(e){o(e)}})},36918(e,r,t){t.d(r,{o:()=>o});const o=(e,r)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},67416(e,r,t){var o=t(79039),n=t(78227),i=t(43724),a=t(96395),c=n("iterator");e.exports=!o(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),r=e.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),o="";return e.pathname="c%20d",r.forEach(function(e,t){r.delete("b"),o+=t+e}),t.delete("a",2),t.delete("b",void 0),a&&(!e.toJSON||!t.has("a",1)||t.has("a",2)||!t.has("a",void 0)||t.has("b"))||!r.size&&(a||!i)||!r.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[c]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==o||"x"!==new URL("https://x",void 0).host})},2222(e,r,t){var o=t(46518),n=t(97751),i=t(79039),a=t(22812),c=t(655),s=t(67416),l=n("URL"),d=s&&i(function(){l.canParse()}),p=i(function(){return 1!==l.canParse.length});o({target:"URL",stat:!0,forced:!d||p},{canParse:function(e){var r=a(arguments.length,1),t=c(e),o=r<2||void 0===arguments[1]?void 0:c(arguments[1]);try{return!!new l(t,o)}catch(e){return!1}}})}};