UNPKG

iobroker.lovelace

Version:

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

1 lines 7.44 kB
export const __rspack_esm_id=28456;export const __rspack_esm_ids=[28456];export const __webpack_modules__={603(e,t,a){a.r(t);a(18111),a(22489),a(18237),a(33110),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(88454),a(29452);var r,n=a(32838);function o(e){if("symbol"==typeof e)throw TypeError("Cannot convert a Symbol value to a string");return String(e)}function i(e){return Intl.getCanonicalLocales(e)}function l(e,t,a,r,n){if("object"!=typeof e)throw new TypeError("Options must be an object");let i=e[t];if(void 0!==i){if("boolean"!==a&&"string"!==a)throw new TypeError("invalid type");if("boolean"===a&&(i=Boolean(i)),"string"===a&&(i=o(i)),void 0!==r&&!r.filter(e=>e==i).length)throw new RangeError(`${i} is not within ${r.join(", ")}`);return i}return n}const c=/[^A-Z]/;function s(e){return 3===(e=e.replace(/([a-z])/g,(e,t)=>t.toUpperCase())).length&&!c.test(e)}function u(e,t,a){let r="best fit";return void 0!==a&&(r=l(a=function(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)}(a),"localeMatcher","string",["lookup","best fit"],"best fit")),(0,n.s8)(Array.from(e),t)}function f(e,t){const a=t&&t.cache?t.cache:v,r=t&&t.serializer?t.serializer:b;return(t&&t.strategy?t.strategy:y)(e,{cache:a,serializer:r})}function d(e,t,a,r){const n=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:a(r);var o;let i=t.get(n);return void 0===i&&(i=e.call(this,r),t.set(n,i)),i}function p(e,t,a){const r=Array.prototype.slice.call(arguments,3),n=a(r);let o=t.get(n);return void 0===o&&(o=e.apply(this,r),t.set(n,o)),o}function g(e,t,a,r,n){return a.bind(t,e,r,n)}function y(e,t){return g(e,this,1===e.length?d:p,t.cache.create(),t.serializer)}const b=function(){return JSON.stringify(arguments)};var h=class{get(e){return this.cache[e]}set(e,t){this.cache[e]=t}constructor(){this.cache=Object.create(null)}};const v={create:function(){return new h}},w={variadic:function(e,t){return g(e,this,p,t.cache.create(),t.serializer)},monadic:function(e,t){return g(e,this,d,t.cache.create(),t.serializer)}};function _(e,t,...a){const r=e.get(t);if(!r)throw new TypeError(`${t} InternalSlot has not been initialized`);return a.reduce((e,t)=>(e[t]=r[t],e),Object.create(null))}function m(e,t,a=Error){if(!e)throw new a(t)}f((...e)=>new Intl.NumberFormat(...e),{strategy:w.variadic}),f((...e)=>new Intl.PluralRules(...e),{strategy:w.variadic}),f((...e)=>new Intl.Locale(...e),{strategy:w.variadic}),f((...e)=>new Intl.ListFormat(...e),{strategy:w.variadic});const D=["era","year","quarter","month","weekOfYear","weekday","day","dayPeriod","hour","minute","second","timeZoneName"];function z(e){return D.indexOf(e)>=0}const L=/^([a-z]{2}|[0-9]{3})$/i,T=/^[a-z]{4}$/i,j=/^[a-z0-9]{3,8}([-_][a-z0-9]{3,8})*$/i;function O(e,t){if("language"===e)return i([t])[0];if("region"===e){if(a=t,!L.test(a))throw RangeError("invalid region");return t.toUpperCase()}var a,r;if("script"===e){if(r=t,!T.test(r))throw RangeError("invalid script");return`${t[0].toUpperCase()}${t.slice(1).toLowerCase()}`}if("calendar"===e){if(!function(e){return j.test(e)}(t))throw RangeError("invalid calendar");return t.toLowerCase()}if("dateTimeField"===e){if(!z(t))throw RangeError("invalid dateTimeField");return t}if(m("currency"===e,"invalid type"),!s(t))throw RangeError("invalid currency");return t.toUpperCase()}var E=(r=class e{static supportedLocalesOf(t,a){return u(e.availableLocales,i(t),a)}static __addLocaleData(...t){for(const{data:a,locale:r}of t){const t=new Intl.Locale(r).minimize().toString();e.localeData[r]=e.localeData[t]=a,e.availableLocales.add(t),e.availableLocales.add(r),e.__defaultLocale||(e.__defaultLocale=t)}}of(e){A(this,"of");const t=S(this,"type"),a=o(e);if(!function(e,t){switch(e){case"language":return/^[a-z]{2,3}(-[a-z]{4})?(-([a-z]{2}|\d{3}))?(-([a-z\d]{5,8}|\d[a-z\d]{3}))*$/i.test(t);case"region":return/^([a-z]{2}|\d{3})$/i.test(t);case"script":return/^[a-z]{4}$/i.test(t);case"currency":return s(t);case"calendar":return/^[a-z0-9]{3,8}([-_][a-z0-9]{3,8})*$/i.test(t);case"dateTimeField":return z(t)}}(t,a))throw RangeError("invalid code for Intl.DisplayNames.prototype.of");const{localeData:r,style:n,fallback:i}=_(I,this,"localeData","style","fallback");let l,c=O(t,a);if("language"===t)l=function(e,t,a,r,n){const o=t.types.language[e],i=o[a][r]||o.long[r];if(void 0!==i)return i;{const e=/-([a-z]{2}|\d{3})\b/i.exec(r);if(e){const i=r.substring(0,e.index)+r.substring(e.index+e[0].length),l=e[1],c=o[a][i]||o.long[i];if(void 0===c||!l)return c;{const e=t.types.region,r=e[a][l]||e.long[l];if(r||"code"===n)return t.patterns.locale.replace("{0}",c).replace("{1}",r||l)}}}}(S(this,"languageDisplay"),r,n,c,i);else{const e=r.types[t];l=e[n][c]||e.long[c]}return void 0!==l?l:"code"===i?a:void 0}resolvedOptions(){return A(this,"resolvedOptions"),{..._(I,this,"locale","style","type","fallback","languageDisplay")}}static getDefaultLocale(){return e.__defaultLocale}constructor(t,a){if(void 0===new.target)throw TypeError("Constructor Intl.DisplayNames requires 'new'");const r=i(t);a=function(e){if(void 0===e)return Object.create(null);if("object"==typeof e)return e;throw new TypeError("Options must be an object")}(a);const o=Object.create(null),{localeData:c}=e;o.localeMatcher=l(a,"localeMatcher","string",["lookup","best fit"],"best fit");const s=(0,n.Bg)(Array.from(e.availableLocales),r,o,[],e.localeData,e.getDefaultLocale),u=l(a,"style","string",["narrow","short","long"],"long");$(this,"style",u);const f=l(a,"type","string",["language","region","script","currency","calendar","dateTimeField"],void 0);if(void 0===f)throw TypeError('Intl.DisplayNames constructor requires "type" option');$(this,"type",f);$(this,"fallback",l(a,"fallback","string",["code","none"],"code")),$(this,"locale",s.locale);const{dataLocale:d}=s,p=c[d];m(!!p,`Missing locale data for ${d}`),$(this,"localeData",p),m(void 0!==p,`locale data for ${s.locale} does not exist.`);const{types:g}=p;m("object"==typeof g&&null!=g,"invalid types data");const y=g[f];m("object"==typeof y&&null!=y,"invalid typeFields data");const b=l(a,"languageDisplay","string",["dialect","standard"],"dialect");if("language"===f){$(this,"languageDisplay",b);const e=g[f][b];m("object"==typeof e&&null!=e,"invalid language typeFields data")}const h="language"===f?g[f][b][u]:g[f][u];m("object"==typeof h&&null!=h,"invalid styleFields data"),$(this,"fields",h)}},r.localeData={},r.availableLocales=new Set,r.__defaultLocale="",r.polyfilled=!0,r);try{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(E.prototype,Symbol.toStringTag,{value:"Intl.DisplayNames",configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(E,"length",{value:2,writable:!1,enumerable:!1,configurable:!0})}catch{}const I=new WeakMap;function S(e,t){return _(I,e,a=t)[a];var a}function $(e,t,a){!function(e,t,a,r){e.get(t)||e.set(t,Object.create(null)),e.get(t)[a]=r}(I,e,t,a)}function A(e,t){if(!(e instanceof E))throw TypeError(`Method Intl.DisplayNames.prototype.${t} called on incompatible receiver`)}!function(e,t,{value:a}){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:a})}(("undefined"==typeof Intl&&Object.defineProperty(globalThis,"Intl",{configurable:!0,enumerable:!1,writable:!0,value:{}}),Intl),"DisplayNames",{value:E});const k=globalThis.__FORMATJS_DISPLAYNAMES_DATA__;if(k){for(const e of k)E.__addLocaleData(e);delete globalThis.__FORMATJS_DISPLAYNAMES_DATA__}}};