UNPKG

iobroker.lovelace

Version:

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

2 lines 12 kB
/*! For license information please see 91858.7c2e31e8aa4ead93.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[91858],{13611:function(e,t,n){var i=n(46518),r=n(44576),o=n(62106),a=n(43724),s=TypeError,c=Object.defineProperty,l=r.self!==r;try{if(a){var h=Object.getOwnPropertyDescriptor(r,"self");!l&&h&&h.get&&h.enumerable||o(r,"self",{get:function(){return r},set:function(e){if(this!==r)throw new s("Illegal invocation");c(r,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else i({global:!0,simple:!0,forced:l},{self:r})}catch(d){}},65722:function(e,t,n){n.d(t,{A:function(){return i}});n(89463),n(66412),n(16280),n(3362),n(62953);function i(e){var t,n,i,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,i=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(i&&null!=(t=e[i]))return new r(t.call(e));n="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}},97577:function(e,t,n){n.d(t,{A:function(){return _}});n(27495),n(62953);var i=n(5124),r=n(67576),o=n(6412),a=n(63672),s=n(34514),c=n(40991),l=n(92070),h=n(49546),d=n(9395),u=n(62676),f=n(15477),p=n(31896);n(38625);let v;var b=(0,i.AH)(v||(v=(e=>e)`:host{--checked-icon-color:var(--wa-color-brand-on-loud);--checked-icon-scale:0.8;display:inline-flex;color:var(--wa-form-control-value-color);font-family:inherit;font-weight:var(--wa-form-control-value-font-weight);line-height:var(--wa-form-control-value-line-height);user-select:none;-webkit-user-select:none}[part~=control]{display:inline-flex;flex:0 0 auto;position:relative;align-items:center;justify-content:center;width:var(--wa-form-control-toggle-size);height:var(--wa-form-control-toggle-size);border-color:var(--wa-form-control-border-color);border-radius:min(calc(var(--wa-form-control-toggle-size) * .375),var(--wa-border-radius-s));border-style:var(--wa-border-style);border-width:var(--wa-form-control-border-width);background-color:var(--wa-form-control-background-color);transition:background var(--wa-transition-normal),border-color var(--wa-transition-fast),box-shadow var(--wa-transition-fast),color var(--wa-transition-fast);transition-timing-function:var(--wa-transition-easing);margin-inline-end:.5em}[part~=base]{display:flex;align-items:flex-start;position:relative;color:currentColor;vertical-align:middle;cursor:pointer}[part~=label]{display:inline}[part~=control]:has(:checked,:indeterminate){color:var(--checked-icon-color);border-color:var(--wa-form-control-activated-color);background-color:var(--wa-form-control-activated-color)}[part~=control]:has(> input:focus-visible:not(:disabled)){outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}:host [part~=base]:has(input:disabled){opacity:.5;cursor:not-allowed}input{position:absolute;padding:0;margin:0;height:100%;width:100%;opacity:0;pointer-events:none}[part~=icon]{display:flex;scale:var(--checked-icon-scale)}[part~=icon]::part(svg){translate:0.0009765625em}input:not(:checked,:indeterminate)+[part~=icon]{visibility:hidden}:host([required]) [part~=label]::after{content:var(--wa-form-control-required-content);color:var(--wa-form-control-required-content-color);margin-inline-start:var(--wa-form-control-required-content-offset)}`));let m,y,g,w=e=>e;var k=Object.defineProperty,C=Object.getOwnPropertyDescriptor,$=(e,t,n,i)=>{for(var r,o=i>1?void 0:i?C(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(o=(i?r(t,n,o):r(o))||o);return i&&o&&k(t,n,o),o};let _=class extends u.q{static get validators(){const e=i.S$?[]:[(0,h.Y)({validationProperty:"checked",validationElement:Object.assign(document.createElement("input"),{type:"checkbox",required:!0})})];return[...super.validators,...e]}get value(){var e;return null!==(e=this._value)&&void 0!==e?e:"on"}set value(e){this._value=e}handleSizeChange(){(0,c.b)(this.localName,this.size)}get checked(){var e;return this.valueHasChanged?Boolean(this._checked):null!==(e=this._checked)&&void 0!==e?e:this.defaultChecked}set checked(e){this._checked=Boolean(e),this.valueHasChanged=!0}handleClick(){this.hasInteracted=!0,this.checked=!this.checked,this.indeterminate=!1,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})}connectedCallback(){super.connectedCallback(),this.handleDefaultCheckedChange()}handleDefaultCheckedChange(){this.handleValueOrCheckedChange()}handleValueOrCheckedChange(){this.setValue(this.checked?this.value:null,this._value),this.updateValidity()}handleStateChange(){this.hasUpdated&&(this.input.checked=this.checked,this.input.indeterminate=this.indeterminate),this.customStates.set("checked",this.checked),this.customStates.set("indeterminate",this.indeterminate),this.updateValidity()}handleDisabledChange(){this.customStates.set("disabled",this.disabled)}willUpdate(e){super.willUpdate(e),(e.has("value")||e.has("checked")||e.has("defaultChecked"))&&this.handleValueOrCheckedChange()}formResetCallback(){this._checked=null,super.formResetCallback(),this.handleValueOrCheckedChange()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){const e=!!i.S$||this.hasSlotController.test("hint"),t=!!this.hint||!!e,n=!this.checked&&this.indeterminate,r=n?"indeterminate":"check",c=n?"indeterminate":"check";return(0,i.qy)(m||(m=w` <label part="base"> <span part="control"> <input class="input" type="checkbox" title="${0}" name="${0}" value="${0}" .indeterminate="${0}" .checked="${0}" .disabled="${0}" .required="${0}" aria-checked="${0}" aria-describedby="hint" @click="${0}"> <wa-icon part="${0}-icon icon" library="system" name="${0}"></wa-icon> </span> <slot part="label"></slot> </label> <slot id="hint" part="hint" name="hint" aria-hidden="${0}" class="${0}"> ${0} </slot> `),this.title,(0,a.J)(this.name),(0,a.J)(this._value),(0,s.V)(this.indeterminate),(0,s.V)(this.checked),this.disabled,this.required,this.indeterminate?"mixed":this.checked?"true":"false",this.handleClick,c,r,t?"false":"true",(0,o.H)({"has-slotted":t}),this.hint)}constructor(){var e;super(...arguments),this.hasSlotController=new l.X(this,"hint"),this.title="",this.name=null,this._value=null!==(e=this.getAttribute("value"))&&void 0!==e?e:null,this.size="m",this.disabled=!1,this.indeterminate=!1,this._checked=null,this.defaultChecked=this.hasAttribute("checked"),this.required=!1,this.hint=""}};_.css=[f.A,p.A,b],_.shadowRootOptions=Object.assign(Object.assign({},u.q.shadowRootOptions),{},{delegatesFocus:!0}),$([(0,r.P)('input[type="checkbox"]')],_.prototype,"input",2),$([(0,r.MZ)()],_.prototype,"title",2),$([(0,r.MZ)({reflect:!0})],_.prototype,"name",2),$([(0,r.MZ)({reflect:!0})],_.prototype,"value",1),$([(0,r.MZ)({reflect:!0})],_.prototype,"size",2),$([(0,d.w)("size")],_.prototype,"handleSizeChange",1),$([(0,r.MZ)({type:Boolean})],_.prototype,"disabled",2),$([(0,r.MZ)({type:Boolean,reflect:!0})],_.prototype,"indeterminate",2),$([(0,r.MZ)({type:Boolean,attribute:!1})],_.prototype,"checked",1),$([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"checked"})],_.prototype,"defaultChecked",2),$([(0,r.MZ)({type:Boolean,reflect:!0})],_.prototype,"required",2),$([(0,r.MZ)()],_.prototype,"hint",2),$([(0,d.w)(["checked","defaultChecked"])],_.prototype,"handleDefaultCheckedChange",1),$([(0,d.w)(["checked","indeterminate"])],_.prototype,"handleStateChange",1),$([(0,d.w)("disabled")],_.prototype,"handleDisabledChange",1),_=$([(0,r.EM)("wa-checkbox")],_),null===(y=(g=_).disableWarning)||void 0===y||y.call(g,"change-in-update")},49546:function(e,t,n){n.d(t,{Y:function(){return i}});n(44114);const i=(e={})=>{let{validationElement:t,validationProperty:n}=e;t||(t=Object.assign(document.createElement("input"),{required:!0})),n||(n="value");const i={observedAttributes:["required"],message:t.validationMessage,checkValidity(e){var t;const r={message:"",isValid:!0,invalidKeys:[]};if(!(null!==(t=e.required)&&void 0!==t?t:e.hasAttribute("required")))return r;return!e[n]&&(r.message="function"==typeof i.message?i.message(e):i.message||"",r.isValid=!1,r.invalidKeys.push("valueMissing")),r}};return i}},74816:function(e,t,n){n.d(t,{x:function(){return r}});n(18111),n(20116),n(61701);var i=n(73420);function r(e,...t){const n=i.w.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}},9160:function(e,t,n){n.d(t,{_P:function(){return a},my:function(){return i},s0:function(){return o},w4:function(){return r}});Math.pow(10,8);const i=6048e5,r=864e5,o=36e5,a=Symbol.for("constructDateFrom")},73420:function(e,t,n){n.d(t,{w:function(){return r}});var i=n(9160);function r(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&i._P in e?e[i._P](t):e instanceof Date?new e.constructor(t):new Date(t)}},35932:function(e,t,n){n.d(t,{o:function(){return r}});var i=n(83504);function r(e,t){const n=(0,i.a)(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}},83504:function(e,t,n){n.d(t,{a:function(){return r}});var i=n(73420);function r(e,t){return(0,i.w)(t||e,e)}},89784:function(e,t,n){n.d(t,{W:function(){return s}});n(16280),n(74423),n(72712),n(18111),n(18237),n(27495),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(25440),n(62953);var i=n(5055),r=n(42017);const o="important",a=" !"+o,s=(0,r.u$)(class extends r.WL{render(e){return Object.keys(e).reduce((t,n)=>{const i=e[n];return null==i?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:n}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)null==t[i]&&(this.ft.delete(i),i.includes("-")?n.removeProperty(i):n[i]=null);for(const i in t){const e=t[i];if(null!=e){this.ft.add(i);const t="string"==typeof e&&e.endsWith(a);i.includes("-")||t?n.setProperty(i,t?e.slice(0,-11):e,t?o:""):n[i]=e}}return i.c0}constructor(e){var t;if(super(e),e.type!==r.OA.ATTRIBUTE||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}})},91450:function(e,t,n){n.d(t,{T:function(){return u}});n(18111),n(20116),n(3362),n(62953);var i=n(5055),r=n(63937),o=n(37540);n(65722);class a{disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}constructor(e){this.G=e}}class s{get(){return this.Y}pause(){var e;null!==(e=this.Y)&&void 0!==e||(this.Y=new Promise(e=>this.Z=e))}resume(){var e;null!==(e=this.Z)&&void 0!==e&&e.call(this),this.Y=this.Z=void 0}constructor(){this.Y=void 0,this.Z=void 0}}var c=n(42017);const l=e=>!(0,r.sO)(e)&&"function"==typeof e.then,h=1073741823;class d extends o.Kq{render(...e){var t;return null!==(t=e.find(e=>!l(e)))&&void 0!==t?t:i.c0}update(e,t){const n=this._$Cbt;let r=n.length;this._$Cbt=t;const o=this._$CK,a=this._$CX;this.isConnected||this.disconnected();for(let i=0;i<t.length&&!(i>this._$Cwt);i++){const e=t[i];if(!l(e))return this._$Cwt=i,e;i<r&&e===n[i]||(this._$Cwt=h,r=0,Promise.resolve(e).then(async t=>{for(;a.get();)await a.get();const n=o.deref();if(void 0!==n){const i=n._$Cbt.indexOf(e);i>-1&&i<n._$Cwt&&(n._$Cwt=i,n.setValue(t))}}))}return i.c0}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}constructor(){super(...arguments),this._$Cwt=h,this._$Cbt=[],this._$CK=new a(this),this._$CX=new s}}const u=(0,c.u$)(d)}}]);