iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 26.4 kB
JavaScript
/*! For license information please see 62756.e1e7b3bd6b6e2677.js.LICENSE.txt */
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[62756],{93905:function(t,e,a){a.d(e,{I:function(){return r}});a(16280),a(44114),a(18111),a(7588),a(69112),a(33110);class i{addFromStorage(t){if(!this._storage[t]){const e=this.storage.getItem(t);e&&(this._storage[t]=JSON.parse(e))}}subscribeChanges(t,e){return this._listeners[t]?this._listeners[t].push(e):this._listeners[t]=[e],()=>{this.unsubscribeChanges(t,e)}}unsubscribeChanges(t,e){if(!(t in this._listeners))return;const a=this._listeners[t].indexOf(e);-1!==a&&this._listeners[t].splice(a,1)}hasKey(t){return t in this._storage}getValue(t){return this._storage[t]}setValue(t,e){const a=this._storage[t];this._storage[t]=e;try{void 0===e?this.storage.removeItem(t):this.storage.setItem(t,JSON.stringify(e))}catch(i){}finally{this._listeners[t]&&this._listeners[t].forEach(t=>t(a,e))}}constructor(t=window.localStorage){this._storage={},this._listeners={},this.storage=t,this.storage===window.localStorage&&window.addEventListener("storage",t=>{t.key&&this.hasKey(t.key)&&(this._storage[t.key]=t.newValue?JSON.parse(t.newValue):t.newValue,this._listeners[t.key]&&this._listeners[t.key].forEach(e=>e(t.oldValue?JSON.parse(t.oldValue):t.oldValue,this._storage[t.key])))})}}const s={};function r(t){return(e,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const r=t.storage||"localStorage";let o;r&&r in s?o=s[r]:(o=new i(window[r]),s[r]=o);const n=t.key||String(a);o.addFromStorage(n);const l=!1!==t.subscribe?t=>o.subscribeChanges(n,(e,i)=>{t.requestUpdate(a,e)}):void 0,h=()=>o.hasKey(n)?t.deserializer?t.deserializer(o.getValue(n)):o.getValue(n):void 0,u=(e,i)=>{let s;t.state&&(s=h()),o.setValue(n,t.serializer?t.serializer(i):i),t.state&&e.requestUpdate(a,s)},c=e.performUpdate;if(e.performUpdate=function(){this.__initialized=!0,c.call(this)},t.subscribe){const t=e.connectedCallback,a=e.disconnectedCallback;e.connectedCallback=function(){t.call(this);const e=this;e.__unbsubLocalStorage||(e.__unbsubLocalStorage=null==l?void 0:l(this))},e.disconnectedCallback=function(){var t;a.call(this);const e=this;null===(t=e.__unbsubLocalStorage)||void 0===t||t.call(e),e.__unbsubLocalStorage=void 0}}const d=Object.getOwnPropertyDescriptor(e,a);let p;if(void 0===d)p={get(){return h()},set(t){(this.__initialized||void 0===h())&&u(this,t)},configurable:!0,enumerable:!0};else{const t=d.set;p=Object.assign(Object.assign({},d),{},{get(){return h()},set(e){(this.__initialized||void 0===h())&&u(this,e),null==t||t.call(this,e)}})}Object.defineProperty(e,a,p)}}},89300:function(t,e,a){a.a(t,async function(t,e){try{a(62953);var i=a(40445),s=a(5124),r=a(67576),o=a(6412),n=a(18350),l=a(65829),h=(a(67094),t([n,l]));[n,l]=h.then?(await h)():h;let u,c,d,p,v,g,b=t=>t;const m="M2.2,16.06L3.88,12L2.2,7.94L6.26,6.26L7.94,2.2L12,3.88L16.06,2.2L17.74,6.26L21.8,7.94L20.12,12L21.8,16.06L17.74,17.74L16.06,21.8L12,20.12L7.94,21.8L6.26,17.74L2.2,16.06M13,17V15H11V17H13M13,13V7H11V13H13Z",f="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z";class y extends s.WF{render(){const t=this.progress||this._result?"accent":this.appearance;return(0,s.qy)(u||(u=b` <ha-button .appearance="${0}" .disabled="${0}" .loading="${0}" .variant="${0}" class="${0}"> ${0} <slot>${0}</slot> </ha-button> ${0} `),t,this.disabled,this.progress,"success"===this._result?"success":"error"===this._result?"danger":this.variant,(0,o.H)({result:!!this._result,success:"success"===this._result,error:"error"===this._result}),this.iconPath?(0,s.qy)(c||(c=b`<ha-svg-icon .path="${0}" slot="start"></ha-svg-icon>`),this.iconPath):s.s6,this.label,this._result?(0,s.qy)(d||(d=b` <div class="progress"> ${0} </div> `),"success"===this._result?(0,s.qy)(p||(p=b`<ha-svg-icon .path="${0}"></ha-svg-icon>`),f):"error"===this._result?(0,s.qy)(v||(v=b`<ha-svg-icon .path="${0}"></ha-svg-icon>`),m):s.s6):s.s6)}actionSuccess(){this._setResult("success")}actionError(){this._setResult("error")}_setResult(t){this._result=t,setTimeout(()=>{this._result=void 0},2e3)}constructor(...t){super(...t),this.disabled=!1,this.progress=!1,this.appearance="accent",this.variant="brand"}}y.styles=(0,s.AH)(g||(g=b`:host{outline:0;display:inline-block;position:relative}:host([progress]){pointer-events:none}.progress{bottom:0;display:flex;justify-content:center;align-items:center;position:absolute;top:0;width:100%}ha-button{width:100%}ha-button.result::part(caret),ha-button.result::part(end),ha-button.result::part(label),ha-button.result::part(spinner),ha-button.result::part(start){visibility:hidden}:host([appearance=brand]) ha-svg-icon{color:var(--white-color)}`)),(0,i.Cg)([(0,r.MZ)()],y.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],y.prototype,"progress",void 0),(0,i.Cg)([(0,r.MZ)()],y.prototype,"appearance",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],y.prototype,"iconPath",void 0),(0,i.Cg)([(0,r.MZ)()],y.prototype,"variant",void 0),(0,i.Cg)([(0,r.wk)()],y.prototype,"_result",void 0),y=(0,i.Cg)([(0,r.EM)("ha-progress-button")],y),e()}catch(u){e(u)}})},56304:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(27495),a(62953),a(49255);var i=a(40445),s=a(99324),r=a(92070),o=a(5124),n=a(67576),l=a(6412),h=a(63672),u=a(57237),c=a(53305),d=t([s]);s=(d.then?(await d)():d)[0];let p,v,g,b,m=t=>t;class f extends((0,c.w)(o.WF)){get _formControl(){return this._textarea}setFocused(t){t?this.toggleAttribute("focused",!0):this.removeAttribute("focused")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",u.d)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",u.d)}async firstUpdated(t){var e,a;(super.firstUpdated(t),this.autofocus)&&(await(null===(e=this._textarea)||void 0===e?void 0:e.updateComplete),null===(a=this._textarea)||void 0===a||a.focus())}focus(t){var e;null===(e=this._textarea)||void 0===e||e.focus(t)}render(){var t,e,a;const i=!this.label&&this._hasSlotController.test("label"),s=!this.hint&&this._hasSlotController.test("hint");return(0,o.qy)(p||(p=m` <wa-textarea .value="${0}" .placeholder="${0}" .readonly="${0}" .required="${0}" .rows="${0}" .resize="${0}" .disabled="${0}" name="${0}" autocapitalize="${0}" autocomplete="${0}" .autofocus="${0}" .spellcheck="${0}" inputmode="${0}" enterkeyhint="${0}" minlength="${0}" maxlength="${0}" class="${0}" ="${0}" ="${0}" ="${0}" -invalid="${0}" exportparts="base:wa-base, hint:wa-hint, textarea:wa-textarea"> ${0} <div slot="hint" class="${0}" role="${0}" aria-live="polite"> ${0} </div> </wa-textarea> `),null!==(t=this.value)&&void 0!==t?t:null,this.placeholder,this.readonly,this.required,null!==(e=this.rows)&&void 0!==e?e:4,this.resize,this.disabled,(0,h.J)(this.name),(0,h.J)(this.autocapitalize||void 0),(0,h.J)(this.autocomplete),this.autofocus,this.spellcheck,(0,h.J)(this.inputmode||void 0),(0,h.J)(this.enterkeyhint||void 0),(0,h.J)(this.minlength),(0,h.J)(this.maxlength),(0,l.H)({input:!0,invalid:this.invalid||this._invalid,"label-raised":void 0!==this.value&&""!==this.value||this.label&&this.placeholder,"no-label":!this.label,"hint-hidden":!(this.hint||s||this.required||this._invalid||this.invalid)}),this._handleInput,this._handleChange,this._handleBlur,this._handleInvalid,this.label||i?(0,o.qy)(v||(v=m`<slot name="label" slot="label">${0}</slot>`),this.label?this._renderLabel(this.label,this.required):o.s6):o.s6,(0,l.H)({error:this.invalid||this._invalid}),(0,h.J)(this.invalid||this._invalid?"alert":void 0),this._invalid||this.invalid?this.validationMessage||(null===(a=this._textarea)||void 0===a?void 0:a.validationMessage):this.hint||(s?(0,o.qy)(g||(g=m`<slot name="hint"></slot>`)):o.s6))}constructor(...t){super(...t),this.resize="none",this._hasSlotController=new r.X(this,"label","hint"),this._requiredMarkerCSSVar="--ha-textarea-required-marker"}}f.styles=[c.N,(0,o.AH)(b||(b=m`:host{display:flex;align-items:flex-start;padding-bottom:var(--ha-textarea-padding-bottom)}wa-textarea::part(label){width:calc(100% - var(--ha-space-2));background-color:var(--ha-color-form-background);transition:all var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out;padding-inline-start:var(--ha-space-3);padding-inline-end:var(--ha-space-3);margin:var(--ha-space-1) var(--ha-space-1) 0;padding-top:var(--ha-space-4);white-space:nowrap;overflow:hidden}:host(:focus-within) wa-textarea::part(label),:host([focused]) wa-textarea::part(label){color:var(--primary-color)}:host(:focus-within) wa-textarea::part(label),:host([focused]) wa-textarea::part(label),wa-textarea.label-raised::part(label){padding-top:var(--ha-space-2);font-size:var(--ha-font-size-xs)}wa-textarea.no-label::part(label){height:0;padding:0}wa-textarea::part(base){min-height:56px;padding-top:var(--ha-space-6);padding-bottom:var(--ha-space-2)}wa-textarea.no-label::part(base){padding-top:var(--ha-space-3)}wa-textarea::part(base)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background-color:var(--ha-color-border-neutral-loud);transition:height var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out}:host(:focus-within) wa-textarea::part(base)::after,:host([focused]) wa-textarea::part(base)::after{height:2px;background-color:var(--primary-color)}:host(:focus-within) wa-textarea.invalid::part(base)::after,wa-textarea.invalid:not([disabled])::part(base)::after{background-color:var(--ha-color-border-danger-normal)}wa-textarea::part(textarea){padding:0 var(--ha-space-4);font-family:var(--ha-font-family-body);font-size:var(--ha-font-size-m)}:host([resize=auto]) wa-textarea::part(textarea){max-height:var(--ha-textarea-max-height,200px);overflow-y:auto}wa-textarea:hover::part(base),wa-textarea:hover::part(label){background-color:var(--ha-color-form-background-hover)}wa-textarea[disabled]::part(textarea){cursor:not-allowed}wa-textarea[disabled]::part(base),wa-textarea[disabled]::part(label){background-color:var(--ha-color-form-background-disabled)}`))],(0,i.Cg)([(0,n.MZ)({type:Number})],f.prototype,"rows",void 0),(0,i.Cg)([(0,n.MZ)()],f.prototype,"resize",void 0),(0,i.Cg)([(0,n.P)("wa-textarea")],f.prototype,"_textarea",void 0),f=(0,i.Cg)([(0,n.EM)("ha-textarea")],f),e()}catch(p){e(p)}})},52069:function(t,e,a){a.d(e,{EF:function(){return o},S_:function(){return i},Xv:function(){return n},ni:function(){return r},u1:function(){return l},z3:function(){return h}});const i=(t,e)=>t.callApi("POST","tts_get_url",e),s="media-source://tts/",r=t=>t.startsWith(s),o=t=>t.substring(19),n=(t,e,a)=>t.callWS({type:"tts/engine/list",language:e,country:a}),l=(t,e)=>t.callWS({type:"tts/engine/get",engine_id:e}),h=(t,e,a)=>t.callWS({type:"tts/engine/voices",engine_id:e,language:a})},12911:function(t,e,a){a.a(t,async function(t,i){try{a.r(e),a.d(e,{TTSTryDialog:function(){return w}});a(3362),a(62953);var s=a(40445),r=a(5124),o=a(67576),n=a(93905),l=a(1087),h=a(89300),u=(a(93444),a(56304)),c=a(72554),d=a(52069),p=a(14503),v=a(65063),g=t([h,u,c]);[h,u,c]=g.then?(await g)():g;let b,m,f=t=>t;const y="M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M10,16.5L16,12L10,7.5V16.5Z";class w extends r.WF{showDialog(t){this._params=t,this._valid=Boolean(this._defaultMessage),this._open=!0}closeDialog(){this._open=!1}_dialogClosed(){this._params=void 0,(0,l.r)(this,"dialog-closed",{dialog:this.localName})}get _defaultMessage(){var t,e;const a=null===(t=this._params.language)||void 0===t?void 0:t.substring(0,2),i=this.hass.locale.language.substring(0,2);return a&&null!==(e=this._messages)&&void 0!==e&&e[a]?this._messages[a]:a===i?this.hass.localize("ui.dialogs.tts-try.message_example"):""}render(){return this._params?(0,r.qy)(b||(b=f` <ha-dialog .open="${0}" header-title="${0}" ="${0}"> <ha-textarea resize="auto" id="message" .label="${0}" .placeholder="${0}" .value="${0}" ="${0}" ?autofocus="${0}"> </ha-textarea> <ha-dialog-footer slot="footer"> <ha-progress-button slot="primaryAction" .progress="${0}" ?autofocus="${0}" ="${0}" .disabled="${0}" .iconPath="${0}"> ${0} </ha-progress-button> </ha-dialog-footer> </ha-dialog> `),this._open,this.hass.localize("ui.dialogs.tts-try.header"),this._dialogClosed,this.hass.localize("ui.dialogs.tts-try.message"),this.hass.localize("ui.dialogs.tts-try.message_placeholder"),this._defaultMessage,this._inputChanged,!this._defaultMessage,this._loadingExample,Boolean(this._defaultMessage),this._playExample,!this._valid,y,this.hass.localize("ui.dialogs.tts-try.play")):r.s6}async _inputChanged(){var t;this._valid=Boolean(null===(t=this._messageInput)||void 0===t?void 0:t.value)}async _playExample(){var t;const e=null===(t=this._messageInput)||void 0===t?void 0:t.value;if(!e)return;const a=this._params.engine,i=this._params.language,s=this._params.voice;i&&(this._messages=Object.assign(Object.assign({},this._messages),{},{[i.substring(0,2)]:e})),this._loadingExample=!0;const r=new Audio;let o;r.play();try{o=(await(0,d.S_)(this.hass,{platform:a,message:e,language:i,options:{voice:s}})).path}catch(n){return this._loadingExample=!1,void(0,v.showAlertDialog)(this,{text:`Unable to load example. ${n.error||n.body||n}`,warning:!0})}r.src=o,r.addEventListener("canplaythrough",()=>r.play()),r.addEventListener("playing",()=>{this._loadingExample=!1}),r.addEventListener("error",()=>{(0,v.showAlertDialog)(this,{title:"Error playing audio."}),this._loadingExample=!1})}constructor(...t){super(...t),this._loadingExample=!1,this._open=!1,this._valid=!1}}w.styles=[p.nA,(0,r.AH)(m||(m=f`ha-select,ha-textarea{width:100%}ha-select{margin-top:8px}.loading{height:36px}`))],(0,s.Cg)([(0,o.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,s.Cg)([(0,o.wk)()],w.prototype,"_loadingExample",void 0),(0,s.Cg)([(0,o.wk)()],w.prototype,"_open",void 0),(0,s.Cg)([(0,o.wk)()],w.prototype,"_params",void 0),(0,s.Cg)([(0,o.wk)()],w.prototype,"_valid",void 0),(0,s.Cg)([(0,o.P)("#message")],w.prototype,"_messageInput",void 0),(0,s.Cg)([(0,n.I)({key:"ttsTryMessages",state:!1,subscribe:!1})],w.prototype,"_messages",void 0),w=(0,s.Cg)([(0,o.EM)("dialog-tts-try")],w),i()}catch(b){i(b)}})},99324:function(t,e,a){a.a(t,async function(t,e){try{var i=a(69235),s=(a(3362),a(27495),a(62953),a(5124)),r=a(67576),o=a(6412),n=a(63672),l=a(34514),h=a(40991),u=a(92070),c=a(41268),d=a(9395),p=a(62676),v=a(15477),g=a(31896),b=a(32565),m=a(17060),f=a(9054),y=t([i,m]);[i,m]=y.then?(await y)():y;let $,C,k,z,M=t=>t;var w=Object.defineProperty,x=Object.getOwnPropertyDescriptor,_=(t,e,a,i)=>{for(var s,r=i>1?void 0:i?x(e,a):e,o=t.length-1;o>=0;o--)(s=t[o])&&(r=(i?s(e,a,r):s(r))||r);return i&&r&&w(e,a,r),r};let L=class extends p.q{static get validators(){return[...super.validators,(0,c.i)()]}get value(){var t;return this.valueHasChanged?this._value:null!==(t=this._value)&&void 0!==t?t:this.defaultValue}set value(t){this._value!==t&&(this.valueHasChanged=!0,this._value=t)}handleSizeChange(){(0,h.b)(this.localName,this.size)}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{if(this.setTextareaDimensions(),this.updateResizeObserver(),this.didSSR&&this.input&&this.value!==this.input.value){const t=this.input.value;this.value=t}})}disconnectedCallback(){var t;super.disconnectedCallback(),clearTimeout(this.countAnnounceTimeout),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0}updateResizeObserver(){const t="none"!==this.resize;this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0),t&&this.input&&("auto"===this.resize?(this.resizeObserver=new ResizeObserver(t=>{var e,a;const i=null!==(e=null===(a=t[0])||void 0===a?void 0:a.contentRect.width)&&void 0!==e?e:0;i!==this.lastObservedWidth&&(this.lastObservedWidth=i,requestAnimationFrame(()=>this.setTextareaDimensions()))}),this.resizeObserver.observe(this)):(this.resizeObserver=new ResizeObserver(()=>this.setTextareaDimensions()),this.resizeObserver.observe(this.input)))}handleBlur(){this.checkValidity()}handleChange(t){this.valueHasChanged=!0,this.value=this.input.value,this.setTextareaDimensions(),this.checkValidity(),this.relayNativeEvent(t,{bubbles:!0,composed:!0})}handleInput(t){this.valueHasChanged=!0,this.value=this.input.value,this.relayNativeEvent(t,{bubbles:!0,composed:!0}),this.scheduleCountAnnouncement()}scheduleCountAnnouncement(){clearTimeout(this.countAnnounceTimeout),this.countAnnounceTimeout=setTimeout(()=>{var t;const e=(null!==(t=this.value)&&void 0!==t?t:"").length;this.announcedCountText=null!=this.maxlength?this.localize.term("numCharactersRemaining",this.maxlength-e):this.localize.term("numCharacters",e)},1e3)}setTextareaDimensions(){if("none"===this.resize)return this.base.style.width="",void(this.base.style.height="");if("auto"===this.resize){this.sizeAdjuster.style.height=`${this.input.clientHeight}px`,this.input.style.height="auto";const t=this.input.scrollHeight;return this.input.style.height=`${t}px`,this.sizeAdjuster.style.height=`${t}px`,this.base.style.width="",void(this.base.style.height="")}if(this.input.style.width){const t=Number(this.input.style.width.split(/px/)[0])+2;this.base.style.width=`${t}px`}if(this.input.style.height){const t=Number(this.input.style.height.split(/px/)[0])+2;this.base.style.height=`${t}px`}}handleRowsChange(){this.setTextareaDimensions()}async handleValueChange(){await this.updateComplete,this.checkValidity(),this.setTextareaDimensions()}updated(t){t.has("resize")&&(this.setTextareaDimensions(),this.updateResizeObserver()),super.updated(t),t.has("value")&&this.customStates.set("blank",!this.value)}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(t){return t?("number"==typeof t.top&&(this.input.scrollTop=t.top),void("number"==typeof t.left&&(this.input.scrollLeft=t.left))):{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(t,e,a="none"){this.input.setSelectionRange(t,e,a)}setRangeText(t,e,a,i="preserve"){const s=null!=e?e:this.input.selectionStart,r=null!=a?a:this.input.selectionEnd;this.input.setRangeText(t,s,r,i),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaDimensions())}formResetCallback(){this._value=null,this.input&&(this.input.value=this.value||""),super.formResetCallback()}render(){var t;const e=this.hasUpdated?this.hasSlotController.test("label"):this.withLabel,a=this.hasUpdated?this.hasSlotController.test("hint"):this.withHint,i=!!this.label||!!e,r=!!this.hint||!!a,h=(null!==(t=this.value)&&void 0!==t?t:"").length,u=null!=this.maxlength?this.localize.term("numCharactersRemaining",this.maxlength-h):this.localize.term("numCharacters",h);return(0,s.qy)($||($=M` <label part="form-control-label label" class="${0}" for="input" aria-hidden="${0}"> <slot name="label">${0}</slot> </label> <div part="base" class="textarea"> <textarea part="textarea" id="input" class="control" title="${0}" name="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" ?required="${0}" placeholder="${0}" rows="${0}" minlength="${0}" maxlength="${0}" autocapitalize="${0}" autocorrect="${0}" ?autofocus="${0}" spellcheck="${0}" enterkeyhint="${0}" inputmode="${0}" aria-describedby="hint" ="${0}" ="${0}" ="${0}"></textarea> <div part="textarea-adjuster" class="size-adjuster" ?hidden="${0}"></div> </div> <div class="${0}"> <slot id="hint" name="hint" part="hint" aria-hidden="${0}" class="${0}">${0}</slot> ${0} </div> `),(0,o.H)({label:!0,"has-label":i}),i?"false":"true",this.label,this.title,(0,n.J)(this.name),(0,l.V)(this.value),this.disabled,this.readonly,this.required,(0,n.J)(this.placeholder),(0,n.J)(this.rows),(0,n.J)(this.minlength),(0,n.J)(this.maxlength),(0,n.J)(this.autocapitalize),(0,n.J)(this.autocorrect),this.autofocus,(0,n.J)(this.spellcheck),(0,n.J)(this.enterkeyhint),(0,n.J)(this.inputmode),this.handleChange,this.handleInput,this.handleBlur,"auto"!==this.resize,(0,o.H)({footer:!0,"has-count":this.withCount}),r?"false":"true",(0,o.H)({"has-slotted":r}),this.hint,this.withCount?(0,s.qy)(C||(C=M` <div part="count" class="count" aria-hidden="true">${0}</div> <div class="wa-visually-hidden-force" aria-live="polite">${0}</div> `),u,this.announcedCountText):"")}constructor(){var t;super(...arguments),this.assumeInteractionOn=["blur","input"],this.hasSlotController=new u.X(this,"hint","label"),this.localize=new m.c(this),this.announcedCountText="",this.title="",this.name=null,this._value=null,this.defaultValue=null!==(t=this.getAttribute("value"))&&void 0!==t?t:"",this.size="m",this.appearance="outlined",this.label="",this.hint="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.required=!1,this.spellcheck=!0,this.withLabel=!1,this.withHint=!1,this.withCount=!1,this.lastObservedWidth=0}};L.css=[f.A,v.A,g.A,b.A],_([(0,r.wk)()],L.prototype,"announcedCountText",2),_([(0,r.P)(".control")],L.prototype,"input",2),_([(0,r.P)('[part~="base"]')],L.prototype,"base",2),_([(0,r.P)(".size-adjuster")],L.prototype,"sizeAdjuster",2),_([(0,r.MZ)()],L.prototype,"title",2),_([(0,r.MZ)({reflect:!0})],L.prototype,"name",2),_([(0,r.wk)()],L.prototype,"value",1),_([(0,r.MZ)({attribute:"value",reflect:!0})],L.prototype,"defaultValue",2),_([(0,r.MZ)({reflect:!0})],L.prototype,"size",2),_([(0,d.w)("size")],L.prototype,"handleSizeChange",1),_([(0,r.MZ)({reflect:!0})],L.prototype,"appearance",2),_([(0,r.MZ)()],L.prototype,"label",2),_([(0,r.MZ)({attribute:"hint"})],L.prototype,"hint",2),_([(0,r.MZ)()],L.prototype,"placeholder",2),_([(0,r.MZ)({type:Number})],L.prototype,"rows",2),_([(0,r.MZ)({reflect:!0})],L.prototype,"resize",2),_([(0,r.MZ)({type:Boolean})],L.prototype,"disabled",2),_([(0,r.MZ)({type:Boolean,reflect:!0})],L.prototype,"readonly",2),_([(0,r.MZ)({type:Boolean,reflect:!0})],L.prototype,"required",2),_([(0,r.MZ)({type:Number})],L.prototype,"minlength",2),_([(0,r.MZ)({type:Number})],L.prototype,"maxlength",2),_([(0,r.MZ)()],L.prototype,"autocapitalize",2),_([(0,r.MZ)({type:Boolean,converter:{fromAttribute:t=>!(!t||"off"===t),toAttribute:t=>t?"on":"off"}})],L.prototype,"autocorrect",2),_([(0,r.MZ)()],L.prototype,"autocomplete",2),_([(0,r.MZ)({type:Boolean})],L.prototype,"autofocus",2),_([(0,r.MZ)()],L.prototype,"enterkeyhint",2),_([(0,r.MZ)({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],L.prototype,"spellcheck",2),_([(0,r.MZ)()],L.prototype,"inputmode",2),_([(0,r.MZ)({attribute:"with-label",type:Boolean})],L.prototype,"withLabel",2),_([(0,r.MZ)({attribute:"with-hint",type:Boolean})],L.prototype,"withHint",2),_([(0,r.MZ)({attribute:"with-count",type:Boolean,reflect:!0})],L.prototype,"withCount",2),_([(0,d.w)("rows",{waitUntilFirstUpdate:!0})],L.prototype,"handleRowsChange",1),_([(0,d.w)("value",{waitUntilFirstUpdate:!0})],L.prototype,"handleValueChange",1),L=_([(0,r.EM)("wa-textarea")],L),null===(k=(z=L).disableWarning)||void 0===k||k.call(z,"change-in-update"),e()}catch($){e($)}})},9054:function(t,e,a){a.d(e,{A:function(){return s}});let i;var s=(0,a(5124).AH)(i||(i=(t=>t)`:host{border-width:0}.textarea{display:grid;align-items:center;margin:0;border:none;outline:0;cursor:inherit;font:inherit;background-color:var(--wa-form-control-background-color);border-color:var(--wa-form-control-border-color);border-radius:var(--wa-form-control-border-radius);border-style:var(--wa-form-control-border-style);border-width:var(--wa-form-control-border-width);-webkit-appearance:none;outline:var(--wa-focus-ring-style) var(--wa-focus-ring-width) transparent;outline-offset:var(--wa-focus-ring-offset)}.textarea:focus-within{outline-color:var(--wa-color-focus)}:host([appearance=outlined]) .textarea{background-color:var(--wa-form-control-background-color);border-color:var(--wa-form-control-border-color)}:host([appearance=filled]) .textarea{background-color:var(--wa-color-neutral-fill-quiet);border-color:var(--wa-color-neutral-fill-quiet)}:host([appearance=filled-outlined]) .textarea{background-color:var(--wa-color-neutral-fill-quiet);border-color:var(--wa-form-control-border-color)}textarea{display:block;width:100%;border:none;background:0 0;font:inherit;color:inherit;padding:calc(var(--wa-form-control-padding-block) - ((1lh - 1em)/ 2)) var(--wa-form-control-padding-inline);min-height:calc(var(--wa-form-control-height) - var(--border-width) * 2);box-shadow:none;margin:0}textarea::placeholder{color:var(--wa-form-control-placeholder-color);user-select:none;-webkit-user-select:none}textarea:autofill,textarea:autofill:active,textarea:autofill:focus,textarea:autofill:hover{box-shadow:none;caret-color:var(--wa-form-control-value-color)}textarea:focus{outline:0}.control,.size-adjuster{grid-area:1/1/2/2}.size-adjuster{visibility:hidden;pointer-events:none;opacity:0;padding:0}textarea::-webkit-search-cancel-button,textarea::-webkit-search-decoration,textarea::-webkit-search-results-button,textarea::-webkit-search-results-decoration{-webkit-appearance:none}:host([resize=none]) textarea{resize:none}:host([resize=vertical]) textarea,textarea{resize:vertical}:host([resize=horizontal]) textarea{resize:horizontal}:host([resize=both]) textarea{resize:both}:host([resize=auto]) textarea{height:auto;resize:none;overflow-y:hidden}.footer{display:flex;align-items:baseline;gap:1em}.footer.has-count [part=hint]{flex:1 1 auto;min-width:0}.count{flex:0 0 auto;color:var(--wa-form-control-hint-color);font-weight:var(--wa-form-control-hint-font-weight);line-height:var(--wa-form-control-hint-line-height);margin-block-start:0.5em;font-size:var(--wa-font-size-smaller);margin-inline-start:auto}`))},32565:function(t,e,a){a.d(e,{A:function(){return s}});let i;var s=(0,a(5124).AH)(i||(i=(t=>t)`.wa-visually-hidden-force,.wa-visually-hidden-hint::part(hint),.wa-visually-hidden-label::part(form-control-label),.wa-visually-hidden-label::part(label),.wa-visually-hidden:not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;border:none!important;overflow:hidden!important;white-space:nowrap!important;padding:0!important}`))}}]);