/*! For license information please see 70413.5745d96f2266a4c0.js.LICENSE.txt */
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["70413"],{57237:function(t,e,o){o.d(e,{d:function(){return i}});const i=t=>t.stopPropagation()},36961:function(t,e,o){o.d(e,{q:function(){return a}});var i;o(31436),o(74423),o(55081);const a=Boolean(globalThis.ElementInternals)&&(null===(i=globalThis.HTMLElement)||void 0===i||null===(i=i.prototype.attachInternals)||void 0===i?void 0:i.toString().includes("[native code]"))},54753:function(t,e,o){o.a(t,async function(t,i){try{o.r(e),o.d(e,{HaFormString:function(){return b}});o(74423),o(62953);var a=o(40445),r=o(96196),n=o(77845),s=o(1087),l=o(26300),h=o(91485),p=t([l,h]);[l,h]=p.then?(await p)():p;let d,u,c,v=t=>t;const g=["password","secret","token"];class b extends r.WF{reportValidity(){var t,e;return null===(t=null===(e=this._input)||void 0===e?void 0:e.reportValidity())||void 0===t||t}render(){var t,e;return(0,r.qy)(d||(d=v` <ha-input .passwordToggle="${0}" .type="${0}" .label="${0}" .value="${0}" .hint="${0}" .disabled="${0}" .required="${0}" .autoValidate="${0}" .name="${0}" .autofocus="${0}" .autocomplete="${0}" .validationMessage="${0}" @input="${0}" @change="${0}"> ${0} </ha-input> `),this.isPassword,this.isPassword?"password":this.stringType,this.label,this.data||"",this.helper,this.disabled,!!this.schema.required,!!this.schema.required,this.schema.name,!!this.schema.autofocus,this.schema.autocomplete,this.schema.required?null===(t=this.localize)||void 0===t?void 0:t.call(this,"ui.common.error_required"):void 0,this._valueChanged,this._valueChanged,null!==(e=this.schema.description)&&void 0!==e&&e.suffix?(0,r.qy)(u||(u=v`<span slot="end">${0}</span>`),this.schema.description.suffix):r.s6)}updated(t){t.has("schema")&&this.toggleAttribute("own-margin",!!this.schema.required)}_valueChanged(t){let e=t.target.value;this.data!==e&&(""!==e||this.schema.required||(e=void 0),(0,s.r)(this,"value-changed",{value:e}))}get stringType(){if(this.schema.format){if(["email","url"].includes(this.schema.format))return this.schema.format;if("fqdnurl"===this.schema.format)return"url"}return"text"}get isPassword(){return g.some(t=>this.schema.name.includes(t))}constructor(...t){super(...t),this.localizeBaseKey="ui.components.selectors.text",this.disabled=!1}}b.shadowRootOptions={...r.WF.shadowRootOptions,delegatesFocus:!0},b.styles=(0,r.AH)(c||(c=v`:host{display:block;position:relative}:host([own-margin]){margin-bottom:5px}`)),(0,a.Cg)([(0,n.MZ)({attribute:!1})],b.prototype,"localize",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],b.prototype,"localizeBaseKey",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],b.prototype,"schema",void 0),(0,a.Cg)([(0,n.MZ)()],b.prototype,"data",void 0),(0,a.Cg)([(0,n.MZ)()],b.prototype,"label",void 0),(0,a.Cg)([(0,n.MZ)()],b.prototype,"helper",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],b.prototype,"disabled",void 0),(0,a.Cg)([(0,n.P)("ha-input")],b.prototype,"_input",void 0),b=(0,a.Cg)([(0,n.EM)("ha-form-string")],b),i()}catch(d){i(d)}})},34127:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var i=o(40445),a=o(52630),r=o(96196),n=o(77845),s=t([a]);a=(s.then?(await s)():s)[0];let l,h=t=>t;class p extends a.A{static get styles(){return[a.A.styles,(0,r.AH)(l||(l=h`:host{--wa-tooltip-background-color:var(
            --ha-tooltip-background-color,
            var(--secondary-background-color)
          );--wa-tooltip-content-color:var(
            --ha-tooltip-text-color,
            var(--primary-text-color)
          );--wa-tooltip-font-family:var(
            --ha-tooltip-font-family,
            var(--ha-font-family-body)
          );--wa-tooltip-font-size:var(
            --ha-tooltip-font-size,
            var(--ha-font-size-s)
          );--wa-tooltip-font-weight:var(
            --ha-tooltip-font-weight,
            var(--ha-font-weight-normal)
          );--wa-tooltip-line-height:var(
            --ha-tooltip-line-height,
            var(--ha-line-height-condensed)
          );--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
            --ha-tooltip-border-radius,
            var(--ha-border-radius-sm)
          );--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 8px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}`))]}constructor(...t){super(...t),this.showDelay=150,this.hideDelay=150}}(0,i.Cg)([(0,n.MZ)({attribute:"show-delay",type:Number})],p.prototype,"showDelay",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-delay",type:Number})],p.prototype,"hideDelay",void 0),p=(0,i.Cg)([(0,n.EM)("ha-tooltip")],p),e()}catch(l){e(l)}})},91485:function(t,e,o){o.a(t,async function(t,i){try{o.d(e,{U:function(){return _}});o(3362),o(27495),o(62953);var a=o(40445),r=(o(54430),o(30006)),n=o(92070),s=o(96196),l=o(77845),h=o(94333),p=o(32288),d=o(22786),u=o(57237),c=o(26300),v=(o(67094),o(34127)),g=o(36961),b=t([r,c,v]);[r,c,v]=b.then?(await b)():b;let w,y,m,f,C=t=>t;const M="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",k="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",$="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";class _ extends s.WF{select(){var t;null===(t=this._input)||void 0===t||t.select()}setSelectionRange(t,e,o){var i;null===(i=this._input)||void 0===i||i.setSelectionRange(t,e,o)}setRangeText(t,e,o,i){var a;null===(a=this._input)||void 0===a||a.setRangeText(t,e,o,i)}showPicker(){var t;null===(t=this._input)||void 0===t||t.showPicker()}stepUp(){var t;null===(t=this._input)||void 0===t||t.stepUp()}stepDown(){var t;null===(t=this._input)||void 0===t||t.stepDown()}checkValidity(){var t,e;return!g.q||(null===(t=null===(e=this._input)||void 0===e?void 0:e.checkValidity())||void 0===t||t)}reportValidity(){const t=this.checkValidity();return this._invalid=!t,t}async firstUpdated(t){var e;(super.firstUpdated(t),this.insetLabel)||(await(null===(e=this._input)||void 0===e?void 0:e.updateComplete),this._syncStartSlotWidth())}render(){var t,e;const o=!this.label&&this._hasSlotController.test("label"),i=!this.hint&&this._hasSlotController.test("hint");return(0,s.qy)(w||(w=C` <wa-input .type="${0}" .value="${0}" .withClear="${0}" .placeholder="${0}" .readonly="${0}" .passwordToggle="${0}" .passwordVisible="${0}" .withoutSpinButtons="${0}" .required="${0}" .pattern="${0}" .minlength="${0}" .maxlength="${0}" .min="${0}" .max="${0}" .step="${0}" .autocapitalize="${0}" .autocorrect="${0}" .autocomplete="${0}" .autofocus="${0}" .enterkeyhint="${0}" .spellcheck="${0}" .inputmode="${0}" .name="${0}" .disabled="${0}" class="${0}" @input="${0}" @change="${0}" @blur="${0}" @wa-invalid="${0}" exportparts="base:wa-base, hint:wa-hint, input:wa-input"> ${0} <slot name="start" slot="start" @slotchange="${0}"> ${0} </slot> <slot name="end" slot="end"> ${0} </slot> <slot name="clear-icon" slot="clear-icon"> <ha-icon-button .path="${0}"></ha-icon-button> </slot> <slot name="show-password-icon" slot="show-password-icon"> <ha-icon-button @keydown="${0}" .path="${0}"></ha-icon-button> </slot> <slot name="hide-password-icon" slot="hide-password-icon"> <ha-icon-button @keydown="${0}" .path="${0}"></ha-icon-button> </slot> <div slot="hint" class="${0}" role="${0}" aria-live="polite"> ${0} </div> </wa-input> `),this.type,null!==(t=this.value)&&void 0!==t?t:null,this.withClear,this.placeholder,this.readonly,this.passwordToggle,this.passwordVisible,this.withoutSpinButtons,this.required,this.pattern,this.minlength,this.maxlength,this.min,this.max,this.step,this.autocapitalize||void 0,this.autocorrect?"on":"off",this.autocomplete,this.autofocus,this.enterkeyhint||void 0,this.spellcheck,this.inputmode||void 0,this.name,this.disabled,(0,h.H)({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||i||this.required||this._invalid||this.invalid)}),this._handleInput,this._handleChange,this._handleBlur,this._handleInvalid,this.label||o?(0,s.qy)(y||(y=C`<slot name="label" slot="label">${0}</slot>`),this._renderLabel(this.label,this.required)):s.s6,this._syncStartSlotWidth,this.renderStartDefault(),this.renderEndDefault(),M,u.d,k,u.d,$,(0,h.H)({error:this.invalid||this._invalid}),(0,p.J)(this.invalid||this._invalid?"alert":void 0),this._invalid||this.invalid?this.validationMessage||(null===(e=this._input)||void 0===e?void 0:e.validationMessage):this.hint||(i?(0,s.qy)(m||(m=C`<slot name="hint"></slot>`)):s.s6))}renderStartDefault(){return s.s6}renderEndDefault(){return s.s6}_handleInput(){var t,e,o;this.value=null!==(t=null===(e=this._input)||void 0===e?void 0:e.value)&&void 0!==t?t:void 0,this._invalid&&null!==(o=this._input)&&void 0!==o&&o.checkValidity()&&(this._invalid=!1)}_handleChange(){var t,e;this.value=null!==(t=null===(e=this._input)||void 0===e?void 0:e.value)&&void 0!==t?t:void 0}_handleBlur(){var t;this.autoValidate&&(this._invalid=!(null!==(t=this._input)&&void 0!==t&&t.checkValidity()))}_handleInvalid(){this._invalid=!0}constructor(...t){super(...t),this.appearance="material",this.type="text",this.label="",this.hint="",this.withClear=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.withoutSpinButtons=!1,this.required=!1,this.autocapitalize="",this.autocorrect=!1,this.autofocus=!1,this.enterkeyhint="",this.spellcheck=!0,this.inputmode="",this.disabled=!1,this.validationMessage="",this.autoValidate=!1,this.invalid=!1,this.insetLabel=!1,this._invalid=!1,this._hasSlotController=new n.X(this,"label","hint","input"),this._syncStartSlotWidth=()=>{var t,e;const o=null===(t=this._input)||void 0===t||null===(t=t.shadowRoot)||void 0===t?void 0:t.querySelector('[part~="start"]'),i=null!==(e=null==o?void 0:o.offsetWidth)&&void 0!==e?e:0;i>0&&!this.insetLabel?(this.style.setProperty("--start-slot-width",`calc(${i}px + var(--ha-space-1))`),this.style.setProperty("--input-padding-inline-start","var(--ha-space-1)")):(this.style.removeProperty("--start-slot-width"),this.style.removeProperty("--input-padding-inline-start"))},this._renderLabel=(0,d.A)((t,e)=>{if(!e)return t;let o=getComputedStyle(this).getPropertyValue("--ha-input-required-marker");return o||(o="*"),o.startsWith('"')&&o.endsWith('"')&&(o=o.slice(1,-1)),o?`${t}${o}`:t})}}_.shadowRootOptions={mode:"open",delegatesFocus:!0},_.styles=(0,s.AH)(f||(f=C`:host{display:flex;align-items:flex-start;padding-top:var(--ha-input-padding-top);padding-bottom:var(--ha-input-padding-bottom,var(--ha-space-2));text-align:var(--ha-input-text-align,start)}:host([appearance=outlined]){padding-bottom:var(--ha-input-padding-bottom)}wa-input{flex:1;min-width:0;--wa-transition-fast:var(--wa-transition-normal);position:relative}wa-input::part(label){position:absolute;top:0;font-weight:var(--ha-font-weight-normal);font-family:var(--ha-font-family-body);transition:all var(--wa-transition-normal) ease-in-out;color:var(--secondary-text-color);line-height:var(--ha-line-height-condensed);z-index:1;pointer-events:none;padding-inline-start:calc(var(--start-slot-width,0px) + var(--ha-space-4));padding-inline-end:var(--ha-space-4);padding-top:var(--ha-space-5);font-size:var(--ha-font-size-m)}:host([appearance=material]:focus-within) wa-input::part(label){color:var(--primary-color)}:host(:focus-within) wa-input.invalid::part(label),wa-input.invalid:not([disabled])::part(label){color:var(--ha-color-fill-danger-loud-resting)}:host(:focus-within) wa-input::part(label),:host([type=date]) wa-input::part(label),wa-input.label-raised::part(label){padding-top:var(--ha-space-3);font-size:var(--ha-font-size-xs)}wa-input::part(base){height:56px;background-color:var(--ha-color-form-background);border-top-left-radius:var(--ha-border-radius-sm);border-top-right-radius:var(--ha-border-radius-sm);border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square);border:none;padding:0 var(--ha-space-4);position:relative;transition:background-color var(--wa-transition-normal) ease-in-out}:host([appearance=outlined]) wa-input.no-label::part(base){height:32px;padding:0 var(--ha-space-2)}:host([appearance=outlined]) wa-input::part(base){border:1px solid var(--ha-color-border-neutral-quiet);background-color:var(--card-background-color);border-radius:var(--ha-border-radius-md);transition:border-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]) ::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([appearance=material]:focus-within) wa-input::part(base)::after{height:2px;background-color:var(--primary-color)}:host([appearance=material]) wa-input.invalid:not([disabled])::part(base)::after,:host([appearance=material]:focus-within) wa-input.invalid::part(base)::after{background-color:var(--ha-color-border-danger-normal)}wa-input::part(input){padding-top:var(--ha-space-3);padding-inline-start:var(--input-padding-inline-start,0)}wa-input.no-label::part(input){padding-top:0}:host([type=color]) wa-input::part(input){padding-top:var(--ha-space-6);cursor:pointer}:host([type=color]) wa-input.no-label::part(input){padding:var(--ha-space-2)}:host([type=color]) wa-input.no-label::part(base){padding:0}wa-input::part(input)::placeholder{color:var(--ha-color-neutral-60)}:host(:focus-within) wa-input::part(base){outline:0}wa-input::part(base):hover{background-color:var(--ha-color-form-background-hover)}:host([appearance=outlined]) wa-input::part(base):hover{border-color:var(--ha-color-border-neutral-normal)}:host([appearance=outlined]:focus-within) wa-input::part(base){border-color:var(--primary-color)}wa-input:disabled::part(base){background-color:var(--ha-color-form-background-disabled)}wa-input:disabled::part(label){opacity:.5}wa-input::part(hint){min-height:var(--ha-space-5);margin-block-start:0;margin-inline-start:var(--ha-space-3);font-size:var(--ha-font-size-xs);display:flex;align-items:center;color:var(--ha-color-text-secondary)}wa-input.hint-hidden::part(hint){height:0;min-height:0}.error{color:var(--ha-color-on-danger-quiet)}wa-input::part(end){color:var(--ha-color-text-secondary)}:host([appearance=outlined]) wa-input.no-label{--ha-icon-button-size:24px;--mdc-icon-size:18px}`)),(0,a.Cg)([(0,l.MZ)({reflect:!0})],_.prototype,"appearance",void 0),(0,a.Cg)([(0,l.MZ)({reflect:!0})],_.prototype,"type",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"value",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"label",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"hint",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean,attribute:"with-clear"})],_.prototype,"withClear",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"placeholder",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean})],_.prototype,"readonly",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean,attribute:"password-toggle"})],_.prototype,"passwordToggle",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean,attribute:"password-visible"})],_.prototype,"passwordVisible",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean,attribute:"without-spin-buttons"})],_.prototype,"withoutSpinButtons",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],_.prototype,"required",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"pattern",void 0),(0,a.Cg)([(0,l.MZ)({type:Number})],_.prototype,"minlength",void 0),(0,a.Cg)([(0,l.MZ)({type:Number})],_.prototype,"maxlength",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"min",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"max",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"step",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"autocapitalize",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean})],_.prototype,"autocorrect",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"autocomplete",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean})],_.prototype,"autofocus",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"enterkeyhint",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean})],_.prototype,"spellcheck",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"inputmode",void 0),(0,a.Cg)([(0,l.MZ)()],_.prototype,"name",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean})],_.prototype,"disabled",void 0),(0,a.Cg)([(0,l.MZ)({attribute:"validation-message"})],_.prototype,"validationMessage",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean,attribute:"auto-validate"})],_.prototype,"autoValidate",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean})],_.prototype,"invalid",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean,attribute:"inset-label"})],_.prototype,"insetLabel",void 0),(0,a.Cg)([(0,l.wk)()],_.prototype,"_invalid",void 0),(0,a.Cg)([(0,l.P)("wa-input")],_.prototype,"_input",void 0),_=(0,a.Cg)([(0,l.EM)("ha-input")],_),i()}catch(w){i(w)}})},69235:function(t,e,o){o.a(t,async function(t,e){try{o(3362),o(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await o.e("71055").then(o.bind(o,52370))).default),e()}catch(i){e(i)}},1)},35370:function(t,e,o){var i=o(26198);t.exports=function(t,e,o){for(var a=0,r=arguments.length>2?o:i(e),n=new t(r);r>a;)n[a]=e[a++];return n}},52630:function(t,e,o){o.a(t,async function(t,i){try{o.d(e,{A:function(){return _}});o(74423),o(44114),o(18111),o(22489),o(3362),o(27495),o(62953);var a=o(96196),r=o(77845),n=o(94333),s=o(17051),l=o(42462),h=o(28438),p=o(98779),d=o(27259),u=o(25877),c=o(984),v=o(53720),g=o(9395),b=o(12754),w=o(40158),y=o(51920),m=t([w]);w=(m.then?(await m)():m)[0];let k,$=t=>t;var f=Object.defineProperty,C=Object.getOwnPropertyDescriptor,M=(t,e,o,i)=>{for(var a,r=i>1?void 0:i?C(e,o):e,n=t.length-1;n>=0;n--)(a=t[n])&&(r=(i?a(e,o,r):a(r))||r);return i&&r&&f(e,o,r),r};let _=class extends b.A{connectedCallback(){super.connectedCallback(),this.eventController.signal.aborted&&(this.eventController=new AbortController),this.addEventListener("mouseout",this.handleMouseOut),this.open&&(this.open=!1,this.updateComplete.then(()=>{this.open=!0})),this.id||(this.id=(0,v.N)("wa-tooltip-")),this.for&&this.anchor?(this.anchor=null,this.handleForChange()):this.for&&this.handleForChange()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,u.Fw)(this),this.eventController.abort(),this.anchor&&this.removeFromAriaLabelledBy(this.anchor,this.id)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(t){return this.trigger.split(" ").includes(t)}addToAriaLabelledBy(t,e){const o=(t.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean);o.includes(e)||(o.push(e),t.setAttribute("aria-labelledby",o.join(" ")))}removeFromAriaLabelledBy(t,e){const o=(t.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean).filter(t=>t!==e);o.length>0?t.setAttribute("aria-labelledby",o.join(" ")):t.removeAttribute("aria-labelledby")}async handleOpenChange(){if(this.open){if(this.disabled)return;const t=new p.k;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);document.addEventListener("keydown",this.handleDocumentKeyDown,{signal:this.eventController.signal}),(0,u.AZ)(this),this.body.hidden=!1,this.popup.active=!0,await(0,d.Ud)(this.popup.popup,"show-with-scale"),this.popup.reposition(),this.dispatchEvent(new l.q)}else{const t=new h.L;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,u.Fw)(this),await(0,d.Ud)(this.popup.popup,"hide-with-scale"),this.popup.active=!1,this.body.hidden=!0,this.dispatchEvent(new s.Z)}}handleForChange(){const t=this.getRootNode();if(!t)return;const e=this.for?t.getElementById(this.for):null,o=this.anchor;if(e===o)return;const{signal:i}=this.eventController;e&&(this.addToAriaLabelledBy(e,this.id),e.addEventListener("blur",this.handleBlur,{capture:!0,signal:i}),e.addEventListener("focus",this.handleFocus,{capture:!0,signal:i}),e.addEventListener("click",this.handleClick,{signal:i}),e.addEventListener("mouseover",this.handleMouseOver,{signal:i}),e.addEventListener("mouseout",this.handleMouseOut,{signal:i})),o&&(this.removeFromAriaLabelledBy(o,this.id),o.removeEventListener("blur",this.handleBlur,{capture:!0}),o.removeEventListener("focus",this.handleFocus,{capture:!0}),o.removeEventListener("click",this.handleClick),o.removeEventListener("mouseover",this.handleMouseOver),o.removeEventListener("mouseout",this.handleMouseOut)),this.anchor=e}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,(0,c.l)(this,"wa-after-show")}async hide(){if(this.open)return this.open=!1,(0,c.l)(this,"wa-after-hide")}render(){return(0,a.qy)(k||(k=$` <wa-popup part="base" exportparts="
          popup:base__popup,
          arrow:base__arrow
        " class="${0}" placement="${0}" distance="${0}" skidding="${0}" flip shift ?arrow="${0}" hover-bridge .anchor="${0}"> <div part="body" class="body"> <slot></slot> </div> </wa-popup> `),(0,n.H)({tooltip:!0,"tooltip-open":this.open}),this.placement,this.distance,this.skidding,!this.withoutArrow,this.anchor)}constructor(){super(...arguments),this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.showDelay=150,this.hideDelay=0,this.trigger="hover focus",this.withoutArrow=!1,this.for=null,this.anchor=null,this.eventController=new AbortController,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.open&&(0,u.a0)(this)&&(t.preventDefault(),t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),this.showDelay))},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){var t;const e=Boolean(null===(t=this.anchor)||void 0===t?void 0:t.matches(":hover")),o=this.matches(":hover");if(e||o)return;clearTimeout(this.hoverTimeout),e||o||(this.hoverTimeout=window.setTimeout(()=>{this.hide()},this.hideDelay))}}}};_.css=y.A,_.dependencies={"wa-popup":w.A},M([(0,r.P)("slot:not([name])")],_.prototype,"defaultSlot",2),M([(0,r.P)(".body")],_.prototype,"body",2),M([(0,r.P)("wa-popup")],_.prototype,"popup",2),M([(0,r.MZ)()],_.prototype,"placement",2),M([(0,r.MZ)({type:Boolean,reflect:!0})],_.prototype,"disabled",2),M([(0,r.MZ)({type:Number})],_.prototype,"distance",2),M([(0,r.MZ)({type:Boolean,reflect:!0})],_.prototype,"open",2),M([(0,r.MZ)({type:Number})],_.prototype,"skidding",2),M([(0,r.MZ)({attribute:"show-delay",type:Number})],_.prototype,"showDelay",2),M([(0,r.MZ)({attribute:"hide-delay",type:Number})],_.prototype,"hideDelay",2),M([(0,r.MZ)()],_.prototype,"trigger",2),M([(0,r.MZ)({attribute:"without-arrow",type:Boolean,reflect:!0})],_.prototype,"withoutArrow",2),M([(0,r.MZ)()],_.prototype,"for",2),M([(0,r.wk)()],_.prototype,"anchor",2),M([(0,g.w)("open",{waitUntilFirstUpdate:!0})],_.prototype,"handleOpenChange",1),M([(0,g.w)("for")],_.prototype,"handleForChange",1),M([(0,g.w)(["distance","placement","skidding"])],_.prototype,"handleOptionsChange",1),M([(0,g.w)("disabled")],_.prototype,"handleDisabledChange",1),_=M([(0,r.EM)("wa-tooltip")],_),i()}catch(k){i(k)}})},51920:function(t,e,o){o.d(e,{A:function(){return a}});let i;var a=(0,o(96196).AH)(i||(i=(t=>t)`:host{--max-width:30ch;display:inline-block;position:absolute;color:var(--wa-tooltip-content-color);font-size:var(--wa-tooltip-font-size);line-height:var(--wa-tooltip-line-height);text-align:start;white-space:normal}.tooltip{--arrow-size:var(--wa-tooltip-arrow-size);--arrow-color:var(--wa-tooltip-background-color)}.tooltip::part(popup){z-index:1000}.tooltip[placement^=top]::part(popup){transform-origin:bottom}.tooltip[placement^=bottom]::part(popup){transform-origin:top}.tooltip[placement^=left]::part(popup){transform-origin:right}.tooltip[placement^=right]::part(popup){transform-origin:left}.body{display:block;width:max-content;max-width:var(--max-width);border-radius:var(--wa-tooltip-border-radius);background-color:var(--wa-tooltip-background-color);border:var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color);padding:.25em .5em;user-select:none;-webkit-user-select:none}.tooltip{--popup-border-width:var(--wa-tooltip-border-width)}.tooltip::part(arrow){border-bottom:var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color);border-right:var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color)}`))},984:function(t,e,o){o.d(e,{l:function(){return i}});o(3362);function i(t,e){return new Promise(o=>{t.addEventListener(e,function i(a){a.target===t&&(t.removeEventListener(e,i),o())})})}}}]);
//# sourceMappingURL=70413.5745d96f2266a4c0.js.map