iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
22 lines • 22.7 kB
JavaScript
export const __rspack_esm_id=17481;export const __rspack_esm_ids=[17481];export const __webpack_modules__={27267(e,t,o){o.d(t,{n:()=>a});const a=e=>{if(!e)return new Date;const t=e.match(/^\d{4}-\d{2}-\d{2}/)?.[0];return new Date(`${t??e}T00:00:00`)}},64080(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaDialogDatePicker:()=>k});var r=o(62826),i=(o(68825),o(35211)),s=o(97686),l=o(5124),n=o(22441),d=o(72487),h=o(27267),c=o(32172),p=o(22792),u=o(89441),v=o(18350),g=o(94512),m=(o(93444),o(26300)),b=o(25440),_=o(45100),y=o(61370),f=e([s,v,g,m,b,_,d]);[s,v,g,m,b,_,d]=f.then?(await f)():f;const w="M22,3H7C6.31,3 5.77,3.35 5.41,3.88L0,12L5.41,20.11C5.77,20.64 6.31,21 7,21H22A2,2 0 0,0 24,19V5A2,2 0 0,0 22,3M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12",C="M7,10H12V15H7M19,19H5V8H19M19,3H18V1H16V3H8V1H6V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z";class k extends((0,u.O)(l.WF)){connectedCallback(){if(super.connectedCallback(),this.params){const e=(0,h.n)(this.params.value);this._pickerYear=(0,d.Pm)(e,this._i18n.locale,this._hassConfig),this._pickerMonth=(0,d.Wq)(e,this._i18n.locale,this._hassConfig),this._value=this.params.value?{year:this._pickerYear,title:(0,d.kz)(e,this._i18n.locale,this._hassConfig),dateString:(0,d.bl)(e,this._i18n.locale,this._hassConfig)}:void 0}}render(){return this.params?l.qy`<ha-adaptive-popover .dialogAnchor="${this.dialogAnchor}" open width="small" .headerTitle="${this._value?.title||this._i18n.localize("ui.dialogs.date-picker.title")}" .headerSubtitle="${this._value?.year}" header-subtitle-position="above"> ${this.params.canClear?l.qy` <ha-icon-button .path="${w}" .label="${this._i18n.localize("ui.dialogs.date-picker.clear")}" slot="headerActionItems" ="${this._clear}"></ha-icon-button> `:l.s6} <wa-divider></wa-divider> <calendar-date .value="${this._value?.dateString}" .min="${this.params.min}" .max="${this.params.max}" .locale="${this.params.locale}" .firstDayOfWeek="${this.params.firstWeekday}" .focusedDate="${this._focusDate}" ="${this._valueChanged}" ="${this._focusChanged}"> <ha-icon-button-prev tabindex="-1" slot="previous"></ha-icon-button-prev> <div class="heading" slot="heading"> <span class="month-year">${this._pickerMonth} ${this._pickerYear}</span> <ha-icon-button ="${this._setToday}" .path="${C}" .label="${this._i18n.localize("ui.dialogs.date-picker.today")}"></ha-icon-button> </div> <ha-icon-button-next tabindex="-1" slot="next"></ha-icon-button-next> <calendar-month></calendar-month> </calendar-date> <ha-dialog-footer slot="footer"> <ha-button appearance="plain" slot="secondaryAction" ="${this.closeDialog}"> ${this._i18n.localize("ui.common.cancel")} </ha-button> <ha-button slot="primaryAction" ="${this._setValue}"> ${this._i18n.localize("ui.common.ok")} </ha-button> </ha-dialog-footer> </ha-adaptive-popover>`:l.s6}_valueChanged(e){const t=e.target;t.value&&this._updateValue(t.value)}_updateValue(e,t=!1){const o=(0,h.n)(e);this._value={year:(0,d.Pm)(o,this._i18n.locale,this._hassConfig),title:(0,d.kz)(o,this._i18n.locale,this._hassConfig),dateString:e||(0,d.bl)(o,this._i18n.locale,this._hassConfig)},t&&(this._focusDate=this._value.dateString,this._pickerMonth=(0,d.Wq)(o,this._i18n.locale,this._hassConfig),this._pickerYear=(0,d.Pm)(o,this._i18n.locale,this._hassConfig))}_focusChanged(e){const t=e.detail;this._pickerMonth=(0,d.Wq)(t,this._i18n.locale,this._hassConfig),this._pickerYear=(0,d.Pm)(t,this._i18n.locale,this._hassConfig),this._focusDate=void 0}_clear(){this.params?.onChange(void 0),this.closeDialog()}_setToday(){this._updateValue(void 0,!0)}_setValue(){this._value||this._setToday(),this.params?.onChange(this._value?.dateString),this.closeDialog()}}k.styles=[y.D,l.AH`ha-adaptive-popover{--dialog-content-padding:0}`],(0,r.Cg)([(0,n.wk)(),(0,i.Fg)({context:p.D5,subscribe:!0})],k.prototype,"_i18n",void 0),(0,r.Cg)([(0,n.wk)(),(0,i.Fg)({context:p.WF,subscribe:!0}),(0,c.p)({transformer:({config:e})=>e})],k.prototype,"_hassConfig",void 0),(0,r.Cg)([(0,n.wk)()],k.prototype,"_value",void 0),(0,r.Cg)([(0,n.wk)()],k.prototype,"_pickerMonth",void 0),(0,r.Cg)([(0,n.wk)()],k.prototype,"_pickerYear",void 0),(0,r.Cg)([(0,n.wk)()],k.prototype,"_focusDate",void 0),k=(0,r.Cg)([(0,n.EM)("ha-dialog-date-picker")],k),a()}catch(e){a(e)}})},61370(e,t,o){o.d(t,{D:()=>r,g:()=>i});var a=o(5124);const r=a.AH`calendar-date,calendar-range{width:100%;min-width:300px}calendar-date::part(button),calendar-range::part(button){border:none;background-color:unset;border-radius:var(--ha-border-radius-circle);outline-offset:-2px;outline-color:var(--ha-color-neutral-60)}calendar-month{width:calc(40px * 7);margin:0 auto;min-height:calc(42px * 7)}calendar-month::part(heading){display:none}calendar-month::part(day){color:var(--disabled-text-color);font-size:var(--ha-font-size-m);font-family:var(--ha-font-body)}calendar-month::part(button){color:var(--primary-text-color);height:32px;width:32px;margin:var(--ha-space-1);border-radius:var(--ha-border-radius-circle)}calendar-month::part(button):focus-visible{background-color:inherit;outline:2px solid var(--accent-color);outline-offset:2px}calendar-month::part(button):hover{background-color:var(--ha-color-fill-primary-quiet-hover)}calendar-month::part(today){color:var(--primary-color)}calendar-month::part(range-end),calendar-month::part(range-inner),calendar-month::part(range-start),calendar-month::part(selected),calendar-month::part(selected):hover{color:var(--text-primary-color);background-color:var(--primary-color);height:40px;width:40px;margin:0}calendar-month::part(selected):focus-visible{background-color:var(--primary-color);color:var(--text-primary-color)}calendar-month::part(outside){cursor:pointer}.heading{display:flex;justify-content:center;align-items:center;width:100%;font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-medium)}.month-year{flex:1;text-align:center;margin-left:48px;margin-inline-start:48px;margin-inline-end:initial}`,i=a.AH`calendar-month::part(selected):focus-visible{background-color:var(--primary-color);color:var(--text-primary-color)}calendar-month::part(range-end),calendar-month::part(range-end):hover,calendar-month::part(range-inner),calendar-month::part(range-inner):hover,calendar-month::part(range-start),calendar-month::part(range-start):hover{color:var(--text-primary-color);background-color:var(--primary-color);border-radius:var(--ha-border-radius-square);display:block;margin:0}calendar-month::part(range-start),calendar-month::part(range-start):hover{border-top-left-radius:var(--ha-border-radius-circle);border-bottom-left-radius:var(--ha-border-radius-circle)}calendar-month::part(range-end),calendar-month::part(range-end):hover{border-top-right-radius:var(--ha-border-radius-circle);border-bottom-right-radius:var(--ha-border-radius-circle)}calendar-month::part(range-end):hover,calendar-month::part(range-inner):hover,calendar-month::part(range-start):hover{color:var(--primary-text-color)}`},14693(e,t,o){o.a(e,async function(e,a){try{o.d(t,{r:()=>m});var r=o(62826),i=o(35211),s=o(5124),l=o(22441),n=o(71769),d=o(22792),h=o(99611),c=(o(76538),o(26300)),p=o(72554),u=e([h,c,p]);[h,c,p]=u.then?(await u)():u;const v="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",g="(max-width: 870px), (max-height: 500px)";class m extends s.WF{connectedCallback(){super.connectedCallback(),this._unsubMediaQuery=(0,n.m)(g,e=>{this._modeSet&&!this.allowModeChange||(this.mode=e?"bottom-sheet":"dialog",this._modeSet=!0)})}get _defaultAriaLabelledBy(){return this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)}_renderCloseButton(e){return this.hideCloseButton?s.qy`<span slot="${e}"></span>`:s.qy` <slot name="headerNavigationIcon" slot="${e}"> <ha-icon-button data-dialog="close" .label="${this._i18n?.localize?.("ui.common.close")??"Close"}" .path="${v}"></ha-icon-button> </slot> `}_renderHeaderContent(){return s.qy` <ha-dialog-header .subtitlePosition="${this.headerSubtitlePosition}"> ${this._renderCloseButton("navigationIcon")} ${void 0!==this.headerTitle?s.qy`<span slot="title" class="title" id="ha-dialog-title"> ${this.headerTitle} </span>`:s.qy`<slot name="headerTitle" slot="title"></slot>`} ${void 0!==this.headerSubtitle?s.qy`<span slot="subtitle">${this.headerSubtitle}</span>`:s.qy`<slot name="headerSubtitle" slot="subtitle"></slot>`} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> `}disconnectedCallback(){super.disconnectedCallback(),this._unsubMediaQuery?.(),this._unsubMediaQuery=void 0,this._modeSet=!1}render(){return"bottom-sheet"===this.mode?s.qy` <ha-bottom-sheet .ariaLabelledBy="${this._defaultAriaLabelledBy}" .ariaDescribedBy="${this.ariaDescribedBy}" .flexContent="${this.flexContent}" .open="${this.open}" .preventScrimClose="${this.preventScrimClose}"> ${this.withoutHeader?s.s6:s.qy` <slot name="header" slot="header">${this._renderHeaderContent()}</slot> `} <slot></slot> <slot name="footer" slot="footer"></slot> </ha-bottom-sheet> `:s.qy` <ha-dialog .open="${this.open}" .type="${this.type}" .width="${this.width}" .preventScrimClose="${this.preventScrimClose}" .ariaLabelledBy="${this.ariaLabelledBy}" .ariaDescribedBy="${this.ariaDescribedBy}" .headerTitle="${this.headerTitle}" .headerSubtitle="${this.headerSubtitle}" .headerSubtitlePosition="${this.headerSubtitlePosition}" .flexContent="${this.flexContent}" .withoutHeader="${this.withoutHeader}"> ${this._renderCloseButton("headerNavigationIcon")} <slot name="headerTitle" slot="headerTitle"></slot> <slot name="headerSubtitle" slot="headerSubtitle"></slot> <slot name="headerActionItems" slot="headerActionItems"></slot> <slot></slot> <slot name="footer" slot="footer"></slot> </ha-dialog> `}static get styles(){return[s.AH`ha-bottom-sheet{--ha-bottom-sheet-border-radius:var(--ha-border-radius-2xl);--ha-bottom-sheet-surface-background:var(
--ha-dialog-surface-background,
var(--card-background-color, var(--ha-color-surface-default))
);--ha-bottom-sheet-padding:0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);--ha-bottom-sheet-content-padding:var(
--dialog-content-padding,
0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6)
)}`]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.allowModeChange=!1,this.withoutHeader=!1,this.hideCloseButton=!1,this.flexContent=!1,this.mode="dialog",this._modeSet=!1}}(0,r.Cg)([(0,l.MZ)({attribute:"aria-labelledby"})],m.prototype,"ariaLabelledBy",void 0),(0,r.Cg)([(0,l.MZ)({attribute:"aria-describedby"})],m.prototype,"ariaDescribedBy",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],m.prototype,"open",void 0),(0,r.Cg)([(0,l.MZ)({reflect:!0})],m.prototype,"type",void 0),(0,r.Cg)([(0,l.MZ)({type:String,reflect:!0,attribute:"width"})],m.prototype,"width",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],m.prototype,"preventScrimClose",void 0),(0,r.Cg)([(0,l.MZ)({attribute:"header-title"})],m.prototype,"headerTitle",void 0),(0,r.Cg)([(0,l.MZ)({attribute:"header-subtitle"})],m.prototype,"headerSubtitle",void 0),(0,r.Cg)([(0,l.MZ)({type:String,attribute:"header-subtitle-position"})],m.prototype,"headerSubtitlePosition",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,attribute:"allow-mode-change"})],m.prototype,"allowModeChange",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,attribute:"without-header"})],m.prototype,"withoutHeader",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,attribute:"hide-close-button"})],m.prototype,"hideCloseButton",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],m.prototype,"flexContent",void 0),(0,r.Cg)([(0,l.wk)()],m.prototype,"mode",void 0),(0,r.Cg)([(0,l.wk)(),(0,i.Fg)({context:d.D5,subscribe:!0})],m.prototype,"_i18n",void 0),m=(0,r.Cg)([(0,l.EM)("ha-adaptive-dialog")],m),a()}catch(e){a(e)}})},94512(e,t,o){o.a(e,async function(e,t){try{o(74423),o(18111),o(7588),o(13579);var a=o(62826),r=o(61366),i=o(5124),s=o(22441),l=o(63672),n=o(1087),d=o(38897),h=o(14693),c=e([r,h]);[r,h]=c.then?(await c)():c;class p extends((0,d.s)(h.r)){willUpdate(e){(e.has("dialogAnchor")||e.has("mode"))&&(this._shouldRenderPopover=Boolean(this.dialogAnchor&&"bottom-sheet"!==this.mode),this._shouldRenderPopover||(this.unlockBodyScroll(),this._cancelPopoverOpen(),this._popoverOpen=!1)),e.has("open")&&!this.open&&this._shouldRenderPopover&&(this._allowPopoverHide=!0,this._popoverOpen=!1)}updated(){this.open&&this._shouldRenderPopover&&!this._popoverOpen&&this._schedulePopoverOpen()}disconnectedCallback(){super.disconnectedCallback(),this._cancelPopoverOpen(),this._allowPopoverHide=!1}render(){return this._shouldRenderPopover?i.qy` <wa-popover .open="${this._popoverOpen}" .anchor="${this.dialogAnchor??null}" auto-size="vertical" auto-size-padding="16" without-arrow trap-focus role="dialog" aria-modal="true" aria-labelledby="${(0,l.J)(this._defaultAriaLabelledBy)}" aria-describedby="${(0,l.J)(this.ariaDescribedBy)}" ="${this._handlePopoverPointerDown}" -show="${this._handlePopoverShow}" -hide="${this._handlePopoverHide}" -after-show="${this._handlePopoverAfterShow}" -after-hide="${this._handlePopoverAfterHide}"> <div class="popover-surface" ="${this._handlePopoverClick}"> ${this.withoutHeader?i.s6:i.qy`<slot name="header">${this._renderHeaderContent()}</slot>`} <div class="content-wrapper"> <div class="body"><slot></slot></div> </div> <slot name="footer"></slot> </div> </wa-popover> `:super.render()}_schedulePopoverOpen(){void 0===this._openPopoverAnimationFrame&&(this._openPopoverAnimationFrame=requestAnimationFrame(()=>{this._openPopoverAnimationFrame=void 0,this.open&&this._shouldRenderPopover&&(this._popoverOpen=!0)}))}_cancelPopoverOpen(){void 0!==this._openPopoverAnimationFrame&&(cancelAnimationFrame(this._openPopoverAnimationFrame),this._openPopoverAnimationFrame=void 0)}_handlePopoverClick(e){e.composedPath().some(e=>e instanceof HTMLElement&&("close"===e.getAttribute("data-dialog")||"close"===e.getAttribute("data-popover")||null!==e.closest('[data-dialog="close"], [data-popover="close"]')))&&(this._allowPopoverHide=!0,this._popoverOpen=!1,this.open=!1)}_handlePopoverShow(e){e.eventPhase===Event.AT_TARGET&&(this.lockBodyScroll(),(0,n.r)(this,"opened"),requestAnimationFrame(()=>{this.querySelector("[autofocus]")?.focus()}))}_handlePopoverHide(e){e.eventPhase===Event.AT_TARGET&&this.preventScrimClose&&!this._allowPopoverHide&&(e.preventDefault(),this._pulsePopover())}_handlePopoverAfterShow(e){e.eventPhase===Event.AT_TARGET&&(0,n.r)(this,"after-show")}_handlePopoverAfterHide(e){e.eventPhase===Event.AT_TARGET&&(this._popoverOpen=!1,this.open=!1,this.unlockBodyScroll(),this._allowPopoverHide=!1,(0,n.r)(this,"closed"))}_handlePopoverPointerDown(e){const t=this._popoverElement,o=t?.shadowRoot?.querySelector("dialog"),a=t?.shadowRoot?.querySelector(".body");if(!o)return;const r=e.composedPath();!r.includes(o)||a&&r.includes(a)||(this.preventScrimClose?this._pulsePopover():(this._allowPopoverHide=!0,this._popoverOpen=!1,this.open=!1))}_pulsePopover(){const e=this._popoverElement,t=e?.shadowRoot?.querySelector("wa-popup"),o=t?.popup;o&&(o.getAnimations().forEach(e=>e.cancel()),o.animate([{scale:"1"},{scale:"1.02"},{scale:"1"}],{duration:250,easing:"ease"}))}static get styles(){return[...super.styles,i.AH`wa-popover{--full-width:var(
--ha-dialog-width-full,
min(95vw, var(--safe-width))
);--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--show-duration:var(
--ha-dialog-show-duration,
var(--ha-animation-duration-normal)
);--hide-duration:var(
--ha-dialog-hide-duration,
var(--ha-animation-duration-normal)
);--wa-color-surface-raised:var(
--ha-dialog-surface-background,
var(--card-background-color, var(--ha-color-surface-default))
);--wa-panel-border-radius:var(
--ha-dialog-border-radius,
var(--ha-border-radius-3xl)
);--max-width:var(--width)}wa-popover::part(dialog){pointer-events:auto}:host([width=small]) wa-popover{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-popover{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([width=full]) wa-popover{--width:var(--full-width)}wa-popover::part(body){padding:0;border-color:transparent;box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));min-width:var(--width,var(--full-width));max-width:var(--width);max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));overflow:hidden;color:var(--primary-text-color);-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);-webkit-user-select:text;user-select:text}.popover-surface{display:flex;flex-direction:column;min-height:0;max-height:inherit}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:relative;padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}slot[name=footer]{display:block;padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box}`]}constructor(...e){super(...e),this._allowPopoverHide=!1,this._popoverOpen=!1,this._shouldRenderPopover=!1}}(0,a.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"dialogAnchor",void 0),(0,a.Cg)([(0,s.wk)()],p.prototype,"_popoverOpen",void 0),(0,a.Cg)([(0,s.wk)()],p.prototype,"_shouldRenderPopover",void 0),(0,a.Cg)([(0,s.P)("wa-popover")],p.prototype,"_popoverElement",void 0),p=(0,a.Cg)([(0,s.EM)("ha-adaptive-popover")],p),t()}catch(e){t(e)}})},25440(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaIconButtonNext:()=>p});var r=o(62826),i=o(5124),s=o(22441),l=o(63091),n=o(26300),d=e([n]);n=(d.then?(await d)():d)[0];const h="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",c="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";class p extends i.WF{render(){return i.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.next")||"Next"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===l.G.document.dir?h:c}}(0,r.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"label",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"href",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"target",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"rel",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"download",void 0),(0,r.Cg)([(0,s.wk)()],p.prototype,"_icon",void 0),p=(0,r.Cg)([(0,s.EM)("ha-icon-button-next")],p),a()}catch(e){a(e)}})},45100(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaIconButtonPrev:()=>p});var r=o(62826),i=o(5124),s=o(22441),l=o(63091),n=o(26300),d=e([n]);n=(d.then?(await d)():d)[0];const h="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",c="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";class p extends i.WF{render(){return i.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===l.G.document.dir?c:h}}(0,r.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"label",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"href",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"target",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"rel",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"download",void 0),(0,r.Cg)([(0,s.wk)()],p.prototype,"_icon",void 0),p=(0,r.Cg)([(0,s.EM)("ha-icon-button-prev")],p),a()}catch(e){a(e)}})},89441(e,t,o){o.d(t,{O:()=>r});var a=o(1087);const r=e=>class extends e{closeDialog(e){if(this._closePromise)return this._closePromise;const t=this.shadowRoot?.querySelector("ha-adaptive-popover, ha-adaptive-dialog, ha-dialog, ha-bottom-sheet");return t&&(this._closePromise=new Promise(e=>{this._closeResolve=e}),t.open=!1),this._closePromise||!0}connectedCallback(){super.connectedCallback(),this.addEventListener("closed",this._removeDialog,{once:!0})}disconnectedCallback(){this._dialogClosedFired||(0,a.r)(this,"dialog-closed",{dialog:this.localName}),this.removeEventListener("closed",this._removeDialog),super.disconnectedCallback()}constructor(...e){super(...e),this.dialogNext=!0,this._dialogClosedFired=!1,this._removeDialog=e=>{e.stopPropagation(),this._closeResolve?.(!0),this._closePromise=void 0,this._closeResolve=void 0,this._dialogClosedFired=!0,(0,a.r)(this,"dialog-closed",{dialog:this.localName}),this.remove()}}}},38897(e,t,o){o.d(t,{s:()=>a});const a=e=>{class t extends e{disconnectedCallback(){this.unlockBodyScroll(),super.disconnectedCallback()}lockBodyScroll(){this._bodyScrollLocked||(this._bodyScrollLocked=!0,0===t._bodyScrollLockCount&&(t._previousBodyOverflow=document.body.style.overflow,t._previousScrollbarGutter=document.documentElement.style.getPropertyValue("scrollbar-gutter"),t._reserveScrollbarGutter=window.innerWidth>document.documentElement.clientWidth),t._bodyScrollLockCount+=1,document.body.style.overflow="hidden",t._reserveScrollbarGutter&&document.documentElement.style.setProperty("scrollbar-gutter","stable"))}unlockBodyScroll(){this._bodyScrollLocked&&(this._bodyScrollLocked=!1,t._bodyScrollLockCount-=1,0===t._bodyScrollLockCount&&(document.body.style.overflow=t._previousBodyOverflow,t._previousScrollbarGutter?document.documentElement.style.setProperty("scrollbar-gutter",t._previousScrollbarGutter):document.documentElement.style.removeProperty("scrollbar-gutter"),t._reserveScrollbarGutter=!1))}constructor(...e){super(...e),this._bodyScrollLocked=!1}}return t._bodyScrollLockCount=0,t._previousBodyOverflow="",t._previousScrollbarGutter="",t._reserveScrollbarGutter=!1,t}}};