export const __rspack_esm_id="58094";export const __rspack_esm_ids=["58094"];export const __webpack_modules__={51324(t,e,i){i.d(e,{ZS:()=>d,is:()=>s.i});var r,o,a=i(62826),n=i(44457),s=i(12451);const l=null!==(o=null===(r=window.ShadyDOM)||void 0===r?void 0:r.inUse)&&void 0!==o&&o;class d extends s.O{findFormElement(){if(!this.shadowRoot||l)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",t=>{this.dispatchEvent(new Event("change",t))})}constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}}d.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,a.Cg)([(0,n.MZ)({type:Boolean})],d.prototype,"disabled",void 0)},3449(t,e,i){var r=i(62826),o=i(96196),a=i(44457);class n extends o.WF{render(){return o.qy`<slot></slot>`}constructor(...t){super(...t),this.disabled=!1}}n.styles=o.AH`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:.75rem;padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var(
        --mdc-typography-caption-letter-spacing,
        .0333333333em
      );line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`,(0,r.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),n=(0,r.Cg)([(0,a.EM)("ha-input-helper-text")],n)},31157(t,e,i){i.a(t,async function(t,r){try{i.r(e),i.d(e,{HaNumberSelector:()=>h});var o=i(62826),a=i(96196),n=i(44457),s=i(94333),l=i(1087),d=(i(3449),i(70759)),p=(i(75709),t([d]));d=(p.then?(await p)():p)[0];class h extends a.WF{willUpdate(t){t.has("value")&&(""!==this._valueStr&&this.value===Number(this._valueStr)||(this._valueStr=null==this.value||isNaN(this.value)?"":this.value.toString()))}render(){const t="box"===this.selector.number?.mode||void 0===this.selector.number?.min||void 0===this.selector.number?.max;let e;if(!t&&(e=this.selector.number.step??1,"any"===e)){e=1;const t=(this.selector.number.max-this.selector.number.min)/100;for(;e>t;)e/=10}const i=this.selector.number?.translation_key;let r=this.selector.number?.unit_of_measurement;return t&&r&&this.localizeValue&&i&&(r=this.localizeValue(`${i}.unit_of_measurement.${r}`)||r),a.qy` ${this.label&&!t?a.qy`${this.label}${this.required?"*":""}`:a.s6} <div class="input"> ${t?a.s6:a.qy` <ha-slider labeled .min="${this.selector.number.min}" .max="${this.selector.number.max}" .value="${this.value}" .step="${e}" .disabled="${this.disabled}" .required="${this.required}" @change="${this._handleSliderChange}" .withMarkers="${this.selector.number?.slider_ticks||!1}"> </ha-slider> `} <ha-textfield .inputMode="${"any"===this.selector.number?.step||(this.selector.number?.step??1)%1!=0?"decimal":"numeric"}" .label="${t?this.label:void 0}" .placeholder="${this.placeholder}" class="${(0,s.H)({single:t})}" .min="${this.selector.number?.min}" .max="${this.selector.number?.max}" .value="${this._valueStr??""}" .step="${this.selector.number?.step??1}" helperPersistent .helper="${t?this.helper:void 0}" .disabled="${this.disabled}" .required="${this.required}" .suffix="${r}" type="number" autoValidate ?no-spinner="${!t}" @input="${this._handleInputChange}"> </ha-textfield> </div> ${!t&&this.helper?a.qy`<ha-input-helper-text .disabled="${this.disabled}">${this.helper}</ha-input-helper-text>`:a.s6} `}_handleInputChange(t){t.stopPropagation(),this._valueStr=t.target.value;const e=""===t.target.value||isNaN(t.target.value)?void 0:Number(t.target.value);this.value!==e&&(0,l.r)(this,"value-changed",{value:e})}_handleSliderChange(t){t.stopPropagation();const e=Number(t.target.value);this.value!==e&&(0,l.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.required=!0,this.disabled=!1,this._valueStr=""}}h.styles=a.AH`.input{display:flex;justify-content:space-between;align-items:center;direction:ltr}ha-slider{flex:1;margin-right:16px;margin-inline-end:16px;margin-inline-start:0}ha-textfield{--ha-textfield-input-width:40px}.single{--ha-textfield-input-width:unset;flex:1}`,(0,o.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"selector",void 0),(0,o.Cg)([(0,n.MZ)({type:Number})],h.prototype,"value",void 0),(0,o.Cg)([(0,n.MZ)({type:Number})],h.prototype,"placeholder",void 0),(0,o.Cg)([(0,n.MZ)()],h.prototype,"label",void 0),(0,o.Cg)([(0,n.MZ)()],h.prototype,"helper",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"localizeValue",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],h.prototype,"required",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],h.prototype,"disabled",void 0),h=(0,o.Cg)([(0,n.EM)("ha-selector-number")],h),r()}catch(t){r(t)}})},70759(t,e,i){i.a(t,async function(t,e){try{var r=i(62826),o=i(60346),a=i(96196),n=i(44457),s=i(63091),l=t([o]);o=(l.then?(await l)():l)[0];class d extends o.A{connectedCallback(){super.connectedCallback(),this.dir=s.G.document.dir}static get styles(){return[o.A.styles,a.AH`:host{--track-size:var(--ha-slider-track-size, 4px);--marker-height:calc(var(--ha-slider-track-size, 4px) / 2);--marker-width:calc(var(--ha-slider-track-size, 4px) / 2);--wa-color-surface-default:var(--card-background-color);--wa-color-neutral-fill-normal:var(--disabled-color);--wa-tooltip-background-color:var(--secondary-background-color);--wa-tooltip-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:8px;--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-z-index-tooltip:var(--ha-tooltip-z-index, 1000);min-width:100px;min-inline-size:100px;width:200px}#thumb{border:none;background-color:var(--ha-slider-thumb-color,var(--primary-color))}#thumb:after{content:"";border-radius:50%;position:absolute;width:calc(var(--thumb-width) * 2 + 8px);height:calc(var(--thumb-height) * 2 + 8px);left:calc(-50% - 4px);top:calc(-50% - 4px);cursor:pointer}#slider:focus-visible:not(.disabled) #thumb,#slider:focus-visible:not(.disabled) #thumb-max,#slider:focus-visible:not(.disabled) #thumb-min{outline:var(--wa-focus-ring)}#track:after{content:"";position:absolute;top:calc(-50% - 4px);left:0;width:100%;height:calc(var(--track-size) * 2 + 8px);cursor:pointer}#indicator{background-color:var(--ha-slider-indicator-color,var(--primary-color))}:host([size=medium]){--thumb-width:20px;--thumb-height:20px}:host([size=small]){--thumb-width:16px;--thumb-height:16px}`]}constructor(...t){super(...t),this.size="small",this.withTooltip=!0}}(0,r.Cg)([(0,n.MZ)({reflect:!0})],d.prototype,"size",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean,attribute:"with-tooltip"})],d.prototype,"withTooltip",void 0),d=(0,r.Cg)([(0,n.EM)("ha-slider")],d),e()}catch(t){e(t)}})},75709(t,e,i){i.d(e,{h:()=>d});var r=i(62826),o=i(68846),a=i(92347),n=i(96196),s=i(44457),l=i(63091);class d extends o.J{updated(t){super.updated(t),(t.has("invalid")||t.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||this.validationMessage||"Invalid":""),(this.invalid||this.validateOnInitialRender||t.has("invalid")&&void 0!==t.get("invalid"))&&this.reportValidity()),t.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),t.has("autocorrect")&&(!1===this.autocorrect?this.formElement.setAttribute("autocorrect","off"):this.formElement.removeAttribute("autocorrect")),t.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}renderIcon(t,e=!1){const i=e?"trailing":"leading";return n.qy` <span class="mdc-text-field__icon mdc-text-field__icon--${i}" tabindex="${e?1:-1}"> <slot name="${i}Icon"></slot> </span> `}constructor(...t){super(...t),this.icon=!1,this.iconTrailing=!1,this.autocorrect=!0}}d.styles=[a.R,n.AH`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding:var(--text-field-padding,0px 16px)}.mdc-text-field__affix--suffix{padding-left:var(--text-field-suffix-padding-left,12px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:ltr}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:var(--text-field-suffix-padding-left,0px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,0px)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){max-width:calc(100% - 16px)}.mdc-floating-label--float-above{max-width:calc((100% - 16px)/ .75);transition:none}input{text-align:var(--text-field-text-align,start)}input[type=color]{height:20px}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-field{overflow:var(--text-field-overflow)}.mdc-floating-label{padding-inline-end:16px;padding-inline-start:initial;inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start);direction:var(--direction);text-align:var(--float-start);box-sizing:border-box;text-overflow:ellipsis}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px - var(--text-field-suffix-padding-left,0px));inset-inline-start:calc(48px + var(--text-field-suffix-padding-left,0px))!important;inset-inline-end:initial!important;direction:var(--direction)}.mdc-text-field__input[type=number]{direction:var(--direction)}.mdc-text-field__affix--prefix{padding-right:var(--text-field-prefix-padding-right,2px);padding-inline-end:var(--text-field-prefix-padding-right,2px);padding-inline-start:initial}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:var(--mdc-text-field-label-ink-color)}#helper-text ha-markdown{display:inline-block}`,"rtl"===l.G.document.dir?n.AH`.mdc-floating-label,.mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field__icon--leading,.mdc-text-field__input[type=number]{direction:rtl;--direction:rtl}`:n.AH``],(0,r.Cg)([(0,s.MZ)({type:Boolean})],d.prototype,"invalid",void 0),(0,r.Cg)([(0,s.MZ)({attribute:"error-message"})],d.prototype,"errorMessage",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],d.prototype,"icon",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],d.prototype,"iconTrailing",void 0),(0,r.Cg)([(0,s.MZ)()],d.prototype,"autocomplete",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],d.prototype,"autocorrect",void 0),(0,r.Cg)([(0,s.MZ)({attribute:"input-spellcheck"})],d.prototype,"inputSpellcheck",void 0),(0,r.Cg)([(0,s.P)("input")],d.prototype,"formElement",void 0),d=(0,r.Cg)([(0,s.EM)("ha-textfield")],d)},63463(t){var e=TypeError;t.exports=function(t){if("string"==typeof t)return t;throw new e("Argument is not a string")}},83972(t,e,i){var r=i(20034),o=String,a=TypeError;t.exports=function(t){if(void 0===t||r(t))return t;throw new a(o(t)+" is not an object or undefined")}},34154(t,e,i){var r=i(36955),o=TypeError;t.exports=function(t){if("Uint8Array"===r(t))return t;throw new o("Argument is not an Uint8Array")}},35370(t,e,i){var r=i(26198);t.exports=function(t,e,i){for(var o=0,a=arguments.length>2?i:r(e),n=new t(a);a>o;)n[o]=e[o++];return n}},92804(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=e+"+/",r=e+"-_",o=function(t){for(var e={},i=0;i<64;i++)e[t.charAt(i)]=i;return e};t.exports={i2c:i,c2i:o(i),i2cUrl:r,c2iUrl:o(r)}},944(t){var e=TypeError;t.exports=function(t){var i=t&&t.alphabet;if(void 0===i||"base64"===i||"base64url"===i)return i||"base64";throw new e("Incorrect `alphabet` option")}},59143(t,e,i){var r=i(44576),o=i(79504),a=i(83972),n=i(63463),s=i(39297),l=i(92804),d=i(944),p=i(55169),h=l.c2i,c=l.c2iUrl,u=r.SyntaxError,f=r.TypeError,g=o("".charAt),v=function(t,e){for(var i=t.length;e<i;e++){var r=g(t,e);if(" "!==r&&"\t"!==r&&"\n"!==r&&"\f"!==r&&"\r"!==r)break}return e},m=function(t,e,i){var r=t.length;r<4&&(t+=2===r?"AA":"A");var o=(e[g(t,0)]<<18)+(e[g(t,1)]<<12)+(e[g(t,2)]<<6)+e[g(t,3)],a=[o>>16&255,o>>8&255,255&o];if(2===r){if(i&&0!==a[1])throw new u("Extra bits");return[a[0]]}if(3===r){if(i&&0!==a[2])throw new u("Extra bits");return[a[0],a[1]]}return a},b=function(t,e,i){for(var r=e.length,o=0;o<r;o++)t[i+o]=e[o];return i+r};t.exports=function(t,e,i,r){n(t),a(e);var o="base64"===d(e)?h:c,l=e?e.lastChunkHandling:void 0;if(void 0===l&&(l="loose"),"loose"!==l&&"strict"!==l&&"stop-before-partial"!==l)throw new f("Incorrect `lastChunkHandling` option");i&&p(i.buffer);var y=t.length,w=i||[],x=0,k=0,E="",C=0;if(r)for(;;){if((C=v(t,C))===y){if(E.length>0){if("stop-before-partial"===l)break;if("loose"!==l)throw new u("Missing padding");if(1===E.length)throw new u("Malformed padding: exactly one additional character");x=b(w,m(E,o,!1),x)}k=y;break}var M=g(t,C);if(++C,"="===M){if(E.length<2)throw new u("Padding is too early");if(C=v(t,C),2===E.length){if(C===y){if("stop-before-partial"===l)break;throw new u("Malformed padding: only one =")}"="===g(t,C)&&(++C,C=v(t,C))}if(C<y)throw new u("Unexpected character after padding");x=b(w,m(E,o,"strict"===l),x),k=y;break}if(!s(o,M))throw new u("Unexpected character");var A=r-x;if(1===A&&2===E.length||2===A&&3===E.length)break;if(4===(E+=M).length&&(x=b(w,m(E,o,!1),x),E="",k=C,x===r))break}return{bytes:w,read:k,written:x}}},42303(t,e,i){var r=i(44576),o=i(79504),a=r.Uint8Array,n=r.SyntaxError,s=r.parseInt,l=Math.min,d=/[^\da-f]/i,p=o(d.exec),h=o("".slice);t.exports=function(t,e){var i=t.length;if(i%2!=0)throw new n("String should be an even number of characters");for(var r=e?l(e.length,i/2):i/2,o=e||new a(r),c=0,u=0;u<r;){var f=h(t,c,c+=2);if(p(d,f))throw new n("String should only contain hex characters");o[u++]=s(f,16)}return{bytes:o,read:c}}},81148(t,e,i){var r=i(46518),o=i(69565),a=i(72652),n=i(79306),s=i(28551),l=i(1767),d=i(9539),p=i(84549)("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:p},{every:function(t){s(this);try{n(t)}catch(t){d(this,"throw",t)}if(p)return o(p,this,t);var e=l(this),i=0;return!a(e,function(e,r){if(!t(e,i++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},16632(t,e,i){var r=i(46518),o=i(44576),a=i(59143),n=i(34154),s=o.Uint8Array,l=!s||!s.prototype.setFromBase64||!function(){var t=new s([255,255,255,255,255]);try{return void t.setFromBase64("",null)}catch(t){}try{return void t.setFromBase64("a")}catch(t){}try{t.setFromBase64("MjYyZg===")}catch(e){return 50===t[0]&&54===t[1]&&50===t[2]&&255===t[3]&&255===t[4]}}();s&&r({target:"Uint8Array",proto:!0,forced:l},{setFromBase64:function(t){n(this);var e=a(t,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:e.read,written:e.written}}})},34226(t,e,i){var r=i(46518),o=i(44576),a=i(63463),n=i(34154),s=i(55169),l=i(42303);o.Uint8Array&&r({target:"Uint8Array",proto:!0},{setFromHex:function(t){n(this),a(t),s(this.buffer);var e=l(t,this).read;return{read:e,written:e/2}}})},9486(t,e,i){var r=i(46518),o=i(44576),a=i(79504),n=i(83972),s=i(34154),l=i(55169),d=i(92804),p=i(944),h=d.i2c,c=d.i2cUrl,u=a("".charAt),f=o.Uint8Array,g=!f||!f.prototype.toBase64||!function(){try{(new f).toBase64(null)}catch(t){return!0}}();f&&r({target:"Uint8Array",proto:!0,forced:g},{toBase64:function(){var t=s(this),e=arguments.length?n(arguments[0]):void 0,i="base64"===p(e)?h:c,r=!!e&&!!e.omitPadding;l(this.buffer);for(var o,a="",d=0,f=t.length,g=function(t){return u(i,o>>6*t&63)};d+2<f;d+=3)o=(t[d]<<16)+(t[d+1]<<8)+t[d+2],a+=g(3)+g(2)+g(1)+g(0);return d+2===f?(o=(t[d]<<16)+(t[d+1]<<8),a+=g(3)+g(2)+g(1)+(r?"":"=")):d+1===f&&(o=t[d]<<16,a+=g(3)+g(2)+(r?"":"==")),a}})},20456(t,e,i){var r=i(46518),o=i(44576),a=i(79504),n=i(34154),s=i(55169),l=a(1.1.toString),d=o.Uint8Array,p=!d||!d.prototype.toHex||!function(){try{return"ffffffffffffffff"===new d([255,255,255,255,255,255,255,255]).toHex()}catch(t){return!1}}();d&&r({target:"Uint8Array",proto:!0,forced:p},{toHex:function(){n(this),s(this.buffer);for(var t="",e=0,i=this.length;e<i;e++){var r=l(this[e],16);t+=1===r.length?"0"+r:r}return t}})},41549(t,e,i){i(16632)},49797(t,e,i){i(34226)},49631(t,e,i){i(9486)},35623(t,e,i){i(20456)},14859(t,e,i){i.d(e,{A:()=>r});const r=i(96196).AH`:host{--arrow-color:black;--arrow-size:var(--wa-tooltip-arrow-size);--show-duration:100ms;--hide-duration:100ms;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}:where(.popup){inset:unset;padding:unset;margin:unset;width:unset;height:unset;color:unset;background:unset;border:unset;overflow:unset}.popup-fixed{position:fixed}.popup:not(.popup-active){display:none}.arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:3;clip-path:polygon(0 100%,100% 0,100% 100%)}:host([data-current-placement~=left]) .arrow{rotate:-45deg}:host([data-current-placement~=right]) .arrow{rotate:135deg}:host([data-current-placement~=bottom]) .arrow{rotate:225deg}.popup-hover-bridge:not(.popup-hover-bridge-visible){display:none}.popup-hover-bridge{position:fixed;z-index:899;top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}.show{animation:show var(--show-duration) ease}.hide{animation:show var(--hide-duration) ease reverse}@keyframes show{from{opacity:0}to{opacity:1}}.show-with-scale{animation:show-with-scale var(--show-duration) ease}.hide-with-scale{animation:show-with-scale var(--hide-duration) ease reverse}@keyframes show-with-scale{from{opacity:0;scale:0.8}to{opacity:1;scale:1}}`},40158(t,e,i){i.a(t,async function(t,r){try{i.d(e,{A:()=>w});i(44114),i(18111),i(22489),i(61701);var o=i(9052),a=i(21306),n=i(73015),s=i(96196),l=i(44457),d=i(94333),p=i(91336),h=i(32510),c=i(17060),u=i(14859),f=t([c]);c=(f.then?(await f)():f)[0];var g=Object.defineProperty,v=Object.getOwnPropertyDescriptor,m=(t,e,i,r)=>{for(var o,a=r>1?void 0:r?v(e,i):e,n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r?o(e,i,a):o(a))||a);return r&&a&&g(e,i,a),a};function b(t){return null!==t&&"object"==typeof t&&"getBoundingClientRect"in t&&(!("contextElement"in t)||t instanceof Element)}const y=globalThis?.HTMLElement?.prototype.hasOwnProperty("popover");let w=class extends h.A{async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||b(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&this.active&&(this.popup.showPopover?.(),this.cleanup=(0,o.ll)(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.popup.hidePopover?.(),this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;const t=[(0,o.cY)({mainAxis:this.distance,crossAxis:this.skidding})];let e;this.sync?t.push((0,o.Ej)({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,i="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=i?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),y&&!b(this.anchor)&&"scroll"===this.boundary&&(e=(0,a.v9)(this.anchorEl).filter(t=>t instanceof Element)),this.flip&&t.push((0,o.UU)({boundary:this.flipBoundary||e,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push((0,o.BN)({boundary:this.shiftBoundary||e,padding:this.shiftPadding})),this.autoSize?t.push((0,o.Ej)({boundary:this.autoSizeBoundary||e,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push((0,o.UE)({element:this.arrowEl,padding:this.arrowPadding}));const i=y?t=>o.iD.getOffsetParent(t,n.WX):o.iD.getOffsetParent;(0,o.rD)(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:y?"absolute":"fixed",platform:{...o.iD,getOffsetParent:i}}).then(({x:t,y:e,middlewareData:i,placement:r})=>{const o="rtl"===this.localize.dir(),a={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=i.arrow.x,e=i.arrow.y;let r="",n="",s="",l="";if("start"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";r="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=o?i:"",l=o?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=o?"":i,l=o?i:"",s="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",r="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",r="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:r,right:n,bottom:s,left:l,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.dispatchEvent(new p.B)}render(){return s.qy` <slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot> <span part="hover-bridge" class="${(0,d.H)({"popup-hover-bridge":!0,"popup-hover-bridge-visible":this.hoverBridge&&this.active})}"></span> <div popover="manual" part="popup" class="${(0,d.H)({popup:!0,"popup-active":this.active,"popup-fixed":!y,"popup-has-arrow":this.arrow})}"> <slot></slot> ${this.arrow?s.qy`<div part="arrow" class="arrow" role="presentation"></div>`:""} </div> `}constructor(){super(...arguments),this.localize=new c.c(this),this.active=!1,this.placement="top",this.boundary="viewport",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let i=0,r=0,o=0,a=0,n=0,s=0,l=0,d=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top<e.top?(i=t.left,r=t.bottom,o=t.right,a=t.bottom,n=e.left,s=e.top,l=e.right,d=e.top):(i=e.left,r=e.bottom,o=e.right,a=e.bottom,n=t.left,s=t.top,l=t.right,d=t.top):t.left<e.left?(i=t.right,r=t.top,o=e.left,a=e.top,n=t.right,s=t.bottom,l=e.left,d=e.bottom):(i=e.right,r=e.top,o=t.left,a=t.top,n=e.right,s=e.bottom,l=t.left,d=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${i}px`),this.style.setProperty("--hover-bridge-top-left-y",`${r}px`),this.style.setProperty("--hover-bridge-top-right-x",`${o}px`),this.style.setProperty("--hover-bridge-top-right-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${n}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${s}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${d}px`)}}}};w.css=u.A,m([(0,l.P)(".popup")],w.prototype,"popup",2),m([(0,l.P)(".arrow")],w.prototype,"arrowEl",2),m([(0,l.MZ)()],w.prototype,"anchor",2),m([(0,l.MZ)({type:Boolean,reflect:!0})],w.prototype,"active",2),m([(0,l.MZ)({reflect:!0})],w.prototype,"placement",2),m([(0,l.MZ)()],w.prototype,"boundary",2),m([(0,l.MZ)({type:Number})],w.prototype,"distance",2),m([(0,l.MZ)({type:Number})],w.prototype,"skidding",2),m([(0,l.MZ)({type:Boolean})],w.prototype,"arrow",2),m([(0,l.MZ)({attribute:"arrow-placement"})],w.prototype,"arrowPlacement",2),m([(0,l.MZ)({attribute:"arrow-padding",type:Number})],w.prototype,"arrowPadding",2),m([(0,l.MZ)({type:Boolean})],w.prototype,"flip",2),m([(0,l.MZ)({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(t=>t.trim()).filter(t=>""!==t),toAttribute:t=>t.join(" ")}})],w.prototype,"flipFallbackPlacements",2),m([(0,l.MZ)({attribute:"flip-fallback-strategy"})],w.prototype,"flipFallbackStrategy",2),m([(0,l.MZ)({type:Object})],w.prototype,"flipBoundary",2),m([(0,l.MZ)({attribute:"flip-padding",type:Number})],w.prototype,"flipPadding",2),m([(0,l.MZ)({type:Boolean})],w.prototype,"shift",2),m([(0,l.MZ)({type:Object})],w.prototype,"shiftBoundary",2),m([(0,l.MZ)({attribute:"shift-padding",type:Number})],w.prototype,"shiftPadding",2),m([(0,l.MZ)({attribute:"auto-size"})],w.prototype,"autoSize",2),m([(0,l.MZ)()],w.prototype,"sync",2),m([(0,l.MZ)({type:Object})],w.prototype,"autoSizeBoundary",2),m([(0,l.MZ)({attribute:"auto-size-padding",type:Number})],w.prototype,"autoSizePadding",2),m([(0,l.MZ)({attribute:"hover-bridge",type:Boolean})],w.prototype,"hoverBridge",2),w=m([(0,l.EM)("wa-popup")],w),r()}catch(x){r(x)}})},61171(t,e,i){i.d(e,{A:()=>r});const r=i(96196).AH`: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::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)}`},52630(t,e,i){i.a(t,async function(t,r){try{i.d(e,{A:()=>k});i(44114),i(18111),i(22489);var o=i(96196),a=i(44457),n=i(94333),s=i(17051),l=i(42462),d=i(28438),p=i(98779),h=i(27259),c=i(984),u=i(53720),f=i(9395),g=i(32510),v=i(40158),m=i(61171),b=t([v]);v=(b.then?(await b)():b)[0];var y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,x=(t,e,i,r)=>{for(var o,a=r>1?void 0:r?w(e,i):e,n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r?o(e,i,a):o(a))||a);return r&&a&&y(e,i,a),a};let k=class extends g.A{connectedCallback(){super.connectedCallback(),this.eventController.signal.aborted&&(this.eventController=new AbortController),this.open&&(this.open=!1,this.updateComplete.then(()=>{this.open=!0})),this.id||(this.id=(0,u.N)("wa-tooltip-")),this.for&&this.anchor?(this.anchor=null,this.handleForChange()):this.for&&this.handleForChange()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeyDown),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 i=(t.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean);i.includes(e)||(i.push(e),t.setAttribute("aria-labelledby",i.join(" ")))}removeFromAriaLabelledBy(t,e){const i=(t.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean).filter(t=>t!==e);i.length>0?t.setAttribute("aria-labelledby",i.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}),this.body.hidden=!1,this.popup.active=!0,await(0,h.Ud)(this.popup.popup,"show-with-scale"),this.popup.reposition(),this.dispatchEvent(new l.q)}else{const t=new d.L;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);document.removeEventListener("keydown",this.handleDocumentKeyDown),await(0,h.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,i=this.anchor;if(e===i)return;const{signal:r}=this.eventController;e&&(this.addToAriaLabelledBy(e,this.id),e.addEventListener("blur",this.handleBlur,{capture:!0,signal:r}),e.addEventListener("focus",this.handleFocus,{capture:!0,signal:r}),e.addEventListener("click",this.handleClick,{signal:r}),e.addEventListener("mouseover",this.handleMouseOver,{signal:r}),e.addEventListener("mouseout",this.handleMouseOut,{signal:r})),i&&(this.removeFromAriaLabelledBy(i,this.id),i.removeEventListener("blur",this.handleBlur,{capture:!0}),i.removeEventListener("focus",this.handleFocus,{capture:!0}),i.removeEventListener("click",this.handleClick),i.removeEventListener("mouseover",this.handleMouseOver),i.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 o.qy` <wa-popup part="base" exportparts="
          popup:base__popup,
          arrow:base__arrow
        " class="${(0,n.H)({tooltip:!0,"tooltip-open":this.open})}" placement="${this.placement}" distance="${this.distance}" skidding="${this.skidding}" flip shift ?arrow="${!this.withoutArrow}" hover-bridge .anchor="${this.anchor}"> <div part="body" class="body"> <slot></slot> </div> </wa-popup> `}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&&(t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),this.showDelay))},this.handleMouseOut=()=>{this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),this.hideDelay))}}};k.css=m.A,k.dependencies={"wa-popup":v.A},x([(0,a.P)("slot:not([name])")],k.prototype,"defaultSlot",2),x([(0,a.P)(".body")],k.prototype,"body",2),x([(0,a.P)("wa-popup")],k.prototype,"popup",2),x([(0,a.MZ)()],k.prototype,"placement",2),x([(0,a.MZ)({type:Boolean,reflect:!0})],k.prototype,"disabled",2),x([(0,a.MZ)({type:Number})],k.prototype,"distance",2),x([(0,a.MZ)({type:Boolean,reflect:!0})],k.prototype,"open",2),x([(0,a.MZ)({type:Number})],k.prototype,"skidding",2),x([(0,a.MZ)({attribute:"show-delay",type:Number})],k.prototype,"showDelay",2),x([(0,a.MZ)({attribute:"hide-delay",type:Number})],k.prototype,"hideDelay",2),x([(0,a.MZ)()],k.prototype,"trigger",2),x([(0,a.MZ)({attribute:"without-arrow",type:Boolean,reflect:!0})],k.prototype,"withoutArrow",2),x([(0,a.MZ)()],k.prototype,"for",2),x([(0,a.wk)()],k.prototype,"anchor",2),x([(0,f.w)("open",{waitUntilFirstUpdate:!0})],k.prototype,"handleOpenChange",1),x([(0,f.w)("for")],k.prototype,"handleForChange",1),x([(0,f.w)(["distance","placement","skidding"])],k.prototype,"handleOptionsChange",1),x([(0,f.w)("disabled")],k.prototype,"handleDisabledChange",1),k=x([(0,a.EM)("wa-tooltip")],k),r()}catch(t){r(t)}})},91336(t,e,i){i.d(e,{B:()=>r});class r extends Event{constructor(){super("wa-reposition",{bubbles:!0,cancelable:!1,composed:!0})}}},984(t,e,i){function r(t,e){return new Promise(i=>{t.addEventListener(e,function r(o){o.target===t&&(t.removeEventListener(e,r),i())})})}i.d(e,{l:()=>r})},73015(t,e,i){i.d(e,{WX:()=>o});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var r=i(21306);function o(t){return n(t)}function a(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function n(t){for(let e=t;e;e=a(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=a(t);e;e=a(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||(0,r.sQ)(t))return e;if("BODY"===e.tagName)return e}}return null}}};
//# sourceMappingURL=58094.e6fa0f0208fb889b.js.map