export const __rspack_esm_id="80403";export const __rspack_esm_ids=["80403"];export const __webpack_modules__={34238(r,e,s){s.a(r,async function(r,t){try{s.d(e,{REDIRECTS:()=>_});s(18111),s(7588);var o=s(62826),a=s(25939),i=s(96196),c=s(44457),p=s(91926),n=s(6030),d=s(28794),h=r([d]);d=(h.then?(await h)():h)[0];const _={supervisor:{redirect:"/hassio/dashboard"},supervisor_logs:{redirect:"/hassio/system"},supervisor_info:{redirect:"/hassio/system"},supervisor_snapshots:{redirect:"/hassio/backups"},supervisor_backups:{redirect:"/hassio/backups"},supervisor_store:{redirect:"/hassio/store"},supervisor_addons:{redirect:"/hassio/dashboard"},supervisor_addon:{redirect:"/hassio/addon",params:{addon:"string"},optional_params:{repository_url:"url"}},supervisor_ingress:{redirect:"/hassio/ingress",params:{addon:"string"}},supervisor_add_addon_repository:{redirect:"/hassio/store",params:{repository_url:"url"}}};class u extends i.WF{connectedCallback(){super.connectedCallback();const r=this.route.path.substr(1),e=_[r];if(!e)return void(this._error=this.supervisor.localize("my.not_supported",{link:i.qy`<a target="_blank" rel="noreferrer noopener" href="https://my.home-assistant.io/faq.html#supported-pages"> ${this.supervisor.localize("my.faq_link")} </a>`}));let s;try{s=this._createRedirectUrl(e)}catch(r){return void(this._error=this.supervisor.localize("my.error"))}(0,p.o)(s,{replace:!0})}render(){return this._error?i.qy`<hass-error-screen .error="${this._error}"></hass-error-screen>`:i.s6}_createRedirectUrl(r){const e=this._createRedirectParams(r);return`${r.redirect}${e}`}_createRedirectParams(r){const e=(0,n.px)();if(!r.params&&!Object.keys(e).length)return"";const s={};return Object.entries(r.params||{}).forEach(([r,t])=>{if(!e[r]||!this._checkParamType(t,e[r]))throw Error();s[r]=e[r]}),Object.entries(r.optional_params||{}).forEach(([r,t])=>{if(e[r]){if(!this._checkParamType(t,e[r]))throw Error();s[r]=e[r]}}),`?${(0,n.KH)(s)}`}_checkParamType(r,e){return"string"===r||"url"===r&&(e&&e===(0,a.sanitizeUrl)(e))}}(0,o.Cg)([(0,c.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,o.Cg)([(0,c.MZ)({attribute:!1})],u.prototype,"supervisor",void 0),(0,o.Cg)([(0,c.MZ)({attribute:!1})],u.prototype,"route",void 0),(0,o.Cg)([(0,c.wk)()],u.prototype,"_error",void 0),u=(0,o.Cg)([(0,c.EM)("hassio-my-redirect")],u),t()}catch(r){t(r)}})}};
//# sourceMappingURL=80403.13c8acc99bc184b2.js.map