export const __rspack_esm_id=18188;export const __rspack_esm_ids=[18188];export const __webpack_modules__={92365(t,e,i){i.a(t,async function(t,r){try{var a=i(39980),s=(i(18111),i(61701),i(33110),i(45367),i(92731),i(80638)),n=t([a]);a=(n.then?(await n)():n)[0];const o=t=>c(t.attributes),c=t=>!!t.unit_of_measurement||!!t.state_class,m=t=>{switch(t.number_format){case s.jG.comma_decimal:return["en-US","en"];case s.jG.decimal_comma:return["de","es","it"];case s.jG.space_comma:return["fr","sv","cs"];case s.jG.quote_decimal:return["de-CH"];case s.jG.system:return;default:return t.language}},u=new Map,d=(t,e)=>{const i=JSON.stringify([t,e]);let r=u.get(i);return r||(r=new Intl.NumberFormat(t,e),u.set(i,r)),r},h=(t,e,i)=>l(t,e,i).map(t=>t.value).join(""),l=(t,e,i)=>{const r=e?m(e):void 0;return e?.number_format===s.jG.none||Number.isNaN(Number(t))?Number.isNaN(Number(t))||""===t||e?.number_format!==s.jG.none?[{type:"literal",value:t}]:d("en-US",g(t,{...i,useGrouping:!1})).formatToParts(Number(t)):d(r,g(t,i)).formatToParts(Number(t))},_=(t,e)=>{const i=e?.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(t?.attributes?.step))&&Number.isInteger(Number(t?.state))?{maximumFractionDigits:0}:void 0},g=(t,e)=>{const i={maximumFractionDigits:2,...e};if("string"!=typeof t)return i;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;i.minimumFractionDigits=e,i.maximumFractionDigits=e}return i};i.d(e,{},{QL:l,ZQ:_,ZV:h,ty:c,x:o}),r()}catch(t){r(t)}})},28943(t,e,i){i.a(t,async function(t,r){try{i(18111),i(61701);var a=i(92365),s=t([a]);a=(s.then?(await s)():s)[0];const n="radio_frequency",o=t=>t.callWS({type:"radio_frequency/list"}),c=[[1e9,"GHz"],[1e6,"MHz"],[1e3,"kHz"],[1,"Hz"]],m=(t,e)=>{const[i,r]=c.find(([e])=>Math.abs(t)>=e)??[1,"Hz"];return`${(0,a.ZV)(t/i,e,{maximumFractionDigits:3})} ${r}`},u=(t,e)=>{const[i,r]=t;return i===r?m(i,e):`${m(i,e)} – ${m(r,e)}`},d=(t,e)=>t.map(t=>u(t,e)).join(", ");i.d(e,{},{V2:n,aq:o,go:d}),r()}catch(t){r(t)}})},64615(t,e,i){i.a(t,async function(t,r){try{i.r(e);var a=i(15697),s=i(79224),n=i(28943),o=i(13288),c=i(99061),m=t([n]);n=(m.then?(await m)():m)[0];class u extends c.a{willUpdate(t){super.willUpdate(t),!this._fetched&&this.hass&&(this._fetched=!0,this._fetchTransmitters())}async _fetchTransmitters(){try{const t=await(0,n.aq)(this.hass);this._transmitters=t.transmitters}catch(t){(0,o.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.radio_frequency.loading_error"),text:t.message})}}updatePageEl(t){t.route=this.routeTail,t.hass=this.hass,t.isWide=this.isWide,t.narrow=this.narrow,t.transmitters=this._transmitters}constructor(...t){super(...t),this.isWide=!1,this.narrow=!1,this._transmitters=[],this._fetched=!1,this.routerOptions={defaultPage:"dashboard",showLoading:!0,routes:{dashboard:{tag:"radio-frequency-config-dashboard",load:()=>Promise.all([i.e(5933),i.e(87888),i.e(18128),i.e(9827)]).then(i.bind(i,82885))},devices:{tag:"radio-frequency-devices-page",load:()=>Promise.all([i.e(4801),i.e(98870),i.e(5933),i.e(13049),i.e(10255),i.e(73142),i.e(54600),i.e(47376),i.e(57425),i.e(79337),i.e(1180)]).then(i.bind(i,39204))}}}}}(0,a.Cg)([(0,s.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"is-wide",type:Boolean})],u.prototype,"isWide",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],u.prototype,"narrow",void 0),(0,a.Cg)([(0,s.wk)()],u.prototype,"_transmitters",void 0),u=(0,a.Cg)([(0,s.EM)("radio-frequency-config-dashboard-router")],u),r()}catch(t){r(t)}})}};
//# sourceMappingURL=18188.6ae496eec30ae9b9.js.map