@nysds/nys-datepicker 1.16.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- import { LitElement as se, unsafeCSS as je, html as I } from "lit";
2
- import { property as k, state as He } from "lit/decorators.js";
3
- import { ifDefined as q } from "lit/directives/if-defined.js";
1
+ import { LitElement as ie, unsafeCSS as je, html as I } from "lit";
2
+ import { property as g, state as He } from "lit/decorators.js";
3
+ import { ifDefined as M } from "lit/directives/if-defined.js";
4
4
  /*!
5
5
  * █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
6
6
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
7
7
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
8
8
  *
9
- * Datepicker Component v1.16.0
9
+ * Datepicker Component v1.16.1
10
10
  * Part of the New York State Design System
11
11
  * Repository: https://github.com/its-hcd/nysds
12
12
  * License: MIT
13
13
  */
14
- const Ke = ':host{--_nys-datepicker-width: fit-content;--_nys-datepicker-width--input: var(--nys-form-width-md, 200px);--_nys-datepicker-gap: var(--nys-space-100, 8px);--_nys-datepicker-height: var(--nys-size-600, 48px);--_nys-datepicker-radius: var(--nys-radius-xl, 12px);--_nys-datepicker-color: var( --nys-color-text, var(--nys-color-neutral-900, #1b1b1b) );--_nys-datepicker-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-datepicker-space-sm: var(--nys-space-50, 4px);--_nys-datepicker-space-md: var(--nys-space-100, 8px);--_nys-datepicker-space-lg: var(--nys-space-150, 12px);--_nys-datepicker-border-width: var(--nys-border-width-sm, 1px);--_nys-datepicker-border-color: var(--nys-color-neutral-400, #909395);--_nys-datepicker-border-radius: var(--nys-radius-md, 4px);--_nys-datepicker-outline-color--hover: var(--nys-color-neutral-900, #1b1b1b);--_nys-datepicker-outline-color--focus: var(--nys-color-focus, #004dd1);--_nys-datepicker-font-size: var(--nys-font-size-ui-md, 16px);--_nys-datepicker-font-weight: var(--nys-font-weight-regular, 400);--_nys-datepicker-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-datepicker-letterspacing: var(--nys-font-letterspacing-ui-md, .044px);--_nys-datepicker-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-datepicker-text-color: var(--nys-color-text, #1b1b1b);--_nys-datepicker-text-disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-datepicker-background-color: var(--nys-color-ink-reverse, #ffffff);--_nys-datepicker-background-color--button--active: var( --nys-color-gray-100, #d0d0ce );--_nys-datepicker-padding--calendar: var(--nys-space-200, 16px);--_nys-datepicker-color--calendar--weekends: var( --nys-color-text-weaker, #797c7f );--_nys-datepicker-gap--calendar-row: var(--nys-space-2-px, 2px);--_nys-datepicker-font-size--date: var(--nys-type-size-ui-sm, 14px);--_nys-datepicker-background-color--date--hover: var( --nys-color-neutral-50, #ededed );--_nys-datepicker-background-color--date--active: var( --nys-color-neutral-100, #d0d0ce );--_nys-datepicker-background-color--date--selected: var( --nys-color-info-weak, #e5effa );--_nys-datepicker-focus-ring--date: var(--nys-color-link, #004dd1);--_nys-datepicker-color--date: var(--nys-color-text, #1b1b1b);--_nys-datepicker-color--date--hover: var(--nys-color-text, #1b1b1b);--_nys-datepicker-color--date--selected: var(--nys-color-info, #004dd1);--_nys-datepicker-color--date--disabled: var( --nys-color-text-disabled, #bec0c1 );--_nys-datepicker-border-color--date--disabled: var( --nys-color-neutral-200, #bec0c1 );--_nys-datepicker-background-color--navigation--hover: var( --nys-color-neutral-10, #f6f6f6 );--_nys-datepicker-background-color--navigation--pressed: var( --nys-color-neutral-50, #ededed );--_nys-datepicker-background-color--navigation--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-datepicker-color--navigation--hover: var( --nys-color-neutral-900, #1b1b1b );--_nys-datepicker-color--navigation--pressed: var( --nys-color-neutral-900, #1b1b1b );--_nys-datepicker-color--navigation--disabled: var( --nys-color-neutral-200, #bec0c1 );--_nys-datepicker-box-shadow-border--navigation: inset 0 0 0 1px var(--nys-color-neutral-900, #1b1b1b)}:host([width=lg]){--_nys-datepicker-width--input: var(--nys-form-width-lg, 384px)}:host([width=full]){--_nys-datepicker-width--input: 100%}:host([showError]){--_nys-datepicker-border-color: var(--nys-color-danger, #b52c2c)}:host([inverted]){--_nys-datepicker-outline-color--focus: var(--nys-color-focus-reverse, #7aa5e7)}.nys-datepicker--container{display:flex;flex-direction:column;gap:var(--_nys-datepicker-space-sm);font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size);font-weight:var(--_nys-datepicker-font-weight);line-height:var(--_nys-datepicker-line-height);width:100%}.nys-datepicker--container .nys-datepicker--input-container{position:relative;width:var(--_nys-datepicker-width--input);display:flex;cursor:pointer}.nys-datepicker--container .nys-datepicker--input-container.disabled #calendar-button{cursor:not-allowed;color:var(--_nys-datepicker-color--date--disabled)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input{cursor:text;text-align:start;font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size);flex:1;height:24px;outline:transparent solid 1px;border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-border-color);background-color:var(--_nys-datepicker-background-color);padding:var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-lg);color:var(--_nys-datepicker-color)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:hover{outline-color:var(--_nys-datepicker-outline-color--hover);border-color:var(--_nys-datepicker-outline-color--hover)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:focus{outline-color:var(--_nys-datepicker-outline-color--focus);border-color:var(--_nys-datepicker-outline-color--focus)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:disabled{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);cursor:not-allowed;color:var(--_nys-datepicker-color--disabled)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input::-webkit-date-and-time-value{text-align:start}.nys-datepicker--container .nys-datepicker--input-container input[type=date]::-webkit-inner-spin-button,.nys-datepicker--container .nys-datepicker--input-container input[type=date]::-webkit-calendar-picker-indicator{display:none;appearance:none}.nys-datepicker--container .nys-datepicker--input-container #calendar-button{display:flex;align-items:center;justify-content:center;padding:var(--_nys-datepicker-space-sm);border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-background-color);outline:transparent solid 1px;background-color:var(--_nys-datepicker-background-color);position:absolute;top:50%;right:var(--_nys-datepicker-space-sm);transform:translateY(-50%);cursor:pointer}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:hover{outline-color:var(--_nys-datepicker-background-color--date--hover);border-color:var(--_nys-datepicker-background-color--date--hover);background:var(--_nys-datepicker-background-color--date--hover)}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:active{outline-color:var(--_nys-datepicker-background-color--button--active);border-color:var(--_nys-datepicker-background-color--button--active);background:var(--_nys-datepicker-background-color--button--active)}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:focus:not(:active):not(:disabled){outline-color:var(--_nys-datepicker-outline-color--focus);border-color:var(--_nys-datepicker-outline-color--focus)}.nys-datepicker--container .wc-datepicker--container{display:flex;width:fit-content}.nys-datepicker--container .wc-datepicker--container *{flex:1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}wc-datepicker{display:none;padding:var(--_nys-datepicker-padding--calendar);border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--nys-color-neutral-100, #d0d0ce);background-color:var(--_nys-datepicker-background-color);box-shadow:0 4px 6px -1px var(--nys-color-black-transparent-100, rgba(27, 27, 27, .1)),0 4px 6px -1px var(--nys-color-black-transparent-50, rgba(27, 27, 27, .01));color:var(--_nys-datepicker-text-color);margin-bottom:3px}wc-datepicker.active{display:flex;flex-direction:column-reverse;position:absolute;z-index:1}wc-datepicker *,wc-datepicker *:before,wc-datepicker *:after{margin:0;box-sizing:border-box}.wc-datepicker{display:block;width:min-content;font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size--date);font-weight:400;line-height:var(--_nys-datepicker-line-height);letter-spacing:var(--_nys-datepicker-letterspacing)}.wc-datepicker--disabled *:disabled{opacity:.5;cursor:not-allowed}.wc-datepicker--disabled .wc-datepicker__date{cursor:not-allowed;opacity:.5}.wc-datepicker--disabled .wc-datepicker__date:focus{outline:none;border-color:var(--_nys-datepicker-border-color--date--disabled);box-shadow:none}.wc-datepicker--disabled .wc-datepicker__date:hover:not(.wc-datepicker__date--selected){background-color:transparent}.wc-datepicker--disabled .wc-datepicker__date--selected:hover{color:var(--_nys-datepicker-background-color);background-color:var(--_nys-datepicker-background-color--date--selected)}.wc-datepicker--disabled #wc-month-dropdown-icon{color:var(--_nys-datepicker-color--date--disabled)}.wc-datepicker__header{display:flex;align-items:center;gap:var(--_nys-datepicker-space-sm)}.wc-datepicker__current-month{display:flex;flex-grow:1;gap:var(--_nys-datepicker-space-sm)}.wc-datepicker__month-select,.wc-datepicker__year-select{display:flex;align-items:center;font-size:var(--_nys-datepicker-font-size);font-family:var(--_nys-datepicker-font-family);padding:var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-lg);border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;color:var(--_nys-datepicker-color);background-color:var(--_nys-datepicker-background-color);line-height:var(--_nys-datepicker-line-height)}.wc-datepicker__month-select:hover:not(:disabled),.wc-datepicker__year-select:hover:not(:disabled){border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--hover);background-color:var(--_nys-datepicker-background-color--navigation--hover);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation)}.wc-datepicker__month-select:active:not(:disabled),.wc-datepicker__month-select[aria-pressed=true],.wc-datepicker__year-select:active:not(:disabled),.wc-datepicker__year-select[aria-pressed=true]{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--pressed);background-color:var(--_nys-datepicker-background-color--navigation--pressed);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation)}.wc-datepicker__month-select:disabled,.wc-datepicker__month-select[aria-disabled=true],.wc-datepicker__year-select:disabled,.wc-datepicker__year-select[aria-disabled=true]{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);background-color:var(--_nys-datepicker-background-color--navigation--disabled);color:var(--_nys-datepicker-color--disabled)}.wc-datepicker .month-wrapper{position:relative;width:135px;display:flex;align-items:center;align-self:stretch}.wc-datepicker .month-wrapper #wc-month-dropdown-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none}.wc-datepicker__month-select{width:100%;max-width:100%;flex-grow:1;cursor:pointer;appearance:none;text-overflow:ellipsis;padding-right:var(--nys-space-400, 32px)}.wc-datepicker__month-select>*{width:91px;height:24px}.wc-datepicker__year-select{border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;padding-right:var(--_nys-datepicker-space-sm);max-width:5rem}.wc-datepicker__previous-month-button,.wc-datepicker__next-month-button,.wc-datepicker__previous-year-button,.wc-datepicker__next-year-button{display:inline-flex;width:40px;max-width:40px;max-height:42px;padding:var(--_nys-datepicker-space-lg);justify-content:center;align-items:center;border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;color:var(--_nys-datepicker-color--date);background-color:var(--_nys-datepicker-background-color);cursor:pointer}.wc-datepicker__previous-month-button:hover:not(:disabled),.wc-datepicker__next-month-button:hover:not(:disabled),.wc-datepicker__previous-year-button:hover:not(:disabled),.wc-datepicker__next-year-button:hover:not(:disabled){background-color:var(--_nys-datepicker-background-color--navigation--hover);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--hover)}.wc-datepicker__previous-month-button:active:not(:disabled),.wc-datepicker__previous-month-button[aria-pressed=true],.wc-datepicker__next-month-button:active:not(:disabled),.wc-datepicker__next-month-button[aria-pressed=true],.wc-datepicker__previous-year-button:active:not(:disabled),.wc-datepicker__previous-year-button[aria-pressed=true],.wc-datepicker__next-year-button:active:not(:disabled),.wc-datepicker__next-year-button[aria-pressed=true]{background-color:var(--_nys-datepicker-background-color--navigation--pressed);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--pressed)}.wc-datepicker__previous-month-button:disabled,.wc-datepicker__previous-month-button[aria-disabled=true],.wc-datepicker__next-month-button:disabled,.wc-datepicker__next-month-button[aria-disabled=true],.wc-datepicker__previous-year-button:disabled,.wc-datepicker__previous-year-button[aria-disabled=true],.wc-datepicker__next-year-button:disabled,.wc-datepicker__next-year-button[aria-disabled=true]{background-color:var(--_nys-datepicker-background-color--navigation--disabled);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);color:var(--_nys-datepicker-color--disabled)}.wc-datepicker__calendar{width:100%;table-layout:fixed;border-collapse:collapse}.wc-datepicker__weekday{padding:var(--_nys-datepicker-padding--calendar) 0 var(--_nys-datepicker-space-sm) 0;min-width:var(--nys-size-500, 40px);font-weight:600;aspect-ratio:1}.wc-datepicker__weekday>span{width:42.3px;height:24px;display:flex;justify-content:center;align-items:center}.wc-datepicker__weekday[aria-label=Saturday],.wc-datepicker__weekday[aria-label=Sunday]{color:var(--_nys-datepicker-color--calendar--weekends)}.wc-datepicker__date{padding:var(--_nys-datepicker-space-md);text-align:center;cursor:pointer;border-radius:var(--nys-radius-lg)}.wc-datepicker__date:focus,.wc-datepicker__date:focus-visible{outline:none}.wc-datepicker__date:focus{box-shadow:inset 0 0 0 2px var(--_nys-datepicker-focus-ring--date)}.wc-datepicker__date:hover:not(.wc-datepicker__date--selected):not(:active){color:var(--_nys-datepicker-color--date--hover);background-color:var(--_nys-datepicker-background-color--date--hover)}.wc-datepicker__date:active{color:var(--_nys-datepicker-color--date--hover);background-color:var(--_nys-datepicker-background-color--date--active)}.wc-datepicker__date>*{display:flex;justify-content:center;align-items:center;aspect-ratio:1;width:24.3px;height:24px}.wc-datepicker__date--today{font-weight:600;color:var(--_nys-datepicker-color--date--selected)}.wc-datepicker__date--today>*{font-style:normal;text-decoration-line:underline}.wc-datepicker__date--selected{text-decoration-line:none;background-color:var(--_nys-datepicker-background-color--date--selected);color:var(--_nys-datepicker-color--date--selected)}.wc-datepicker__date--selected>*{font-weight:600}.wc-datepicker__date--disabled{color:var(--_nys-datepicker-color--date--disabled);cursor:default}.wc-datepicker__date--disabled:not(.wc-datepicker__date--disabled--selected,.wc-datepicker__date--disabled--in-range):hover{background-color:transparent}.wc-datepicker__date.wc-datepicker__date--overflowing{color:var(--_nys-datepicker-text-disabled)}.wc-datepicker__date.wc-datepicker__date--overflowing:hover,.wc-datepicker__date.wc-datepicker__date--overflowing:active{color:var(--_nys-datepicker-color)}.wc-datepicker--button-container{display:flex;padding-top:var(--_nys-datepicker-space-lg);align-items:flex-end;gap:var(--_nys-datepicker-padding--calendar);align-self:stretch}.wc-datepicker tr.wc-datepicker__calendar-row.sc-wc-datepicker{display:flex;align-items:center;gap:var(--_nys-datepicker-gap--calendar-row);align-self:stretch}', E = {
14
+ const Ke = ':host{--_nys-datepicker-width: fit-content;--_nys-datepicker-width--input: var(--nys-form-width-md, 200px);--_nys-datepicker-gap: var(--nys-space-100, 8px);--_nys-datepicker-height: var(--nys-size-600, 48px);--_nys-datepicker-radius: var(--nys-radius-xl, 12px);--_nys-datepicker-color: var( --nys-color-text, var(--nys-color-neutral-900, #1b1b1b) );--_nys-datepicker-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-datepicker-space-sm: var(--nys-space-50, 4px);--_nys-datepicker-space-md: var(--nys-space-100, 8px);--_nys-datepicker-space-lg: var(--nys-space-150, 12px);--_nys-datepicker-border-width: var(--nys-border-width-sm, 1px);--_nys-datepicker-border-color: var(--nys-color-neutral-400, #909395);--_nys-datepicker-border-radius: var(--nys-radius-md, 4px);--_nys-datepicker-outline-color--hover: var(--nys-color-neutral-900, #1b1b1b);--_nys-datepicker-outline-color--focus: var(--nys-color-focus, #004dd1);--_nys-datepicker-font-size: var(--nys-font-size-ui-md, 16px);--_nys-datepicker-font-weight: var(--nys-font-weight-regular, 400);--_nys-datepicker-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-datepicker-letterspacing: var(--nys-font-letterspacing-ui-md, .044px);--_nys-datepicker-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-datepicker-text-color: var(--nys-color-text, #1b1b1b);--_nys-datepicker-text-disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-datepicker-background-color: var(--nys-color-ink-reverse, #ffffff);--_nys-datepicker-background-color--button--active: var( --nys-color-gray-100, #d0d0ce );--_nys-datepicker-padding--calendar: var(--nys-space-200, 16px);--_nys-datepicker-color--calendar--weekends: var( --nys-color-text-weaker, #797c7f );--_nys-datepicker-gap--calendar-row: var(--nys-space-2-px, 2px);--_nys-datepicker-font-size--date: var(--nys-type-size-ui-sm, 14px);--_nys-datepicker-background-color--date--hover: var( --nys-color-neutral-50, #ededed );--_nys-datepicker-background-color--date--active: var( --nys-color-neutral-100, #d0d0ce );--_nys-datepicker-background-color--date--selected: var( --nys-color-info-weak, #e5effa );--_nys-datepicker-focus-ring--date: var(--nys-color-link, #004dd1);--_nys-datepicker-color--date: var(--nys-color-text, #1b1b1b);--_nys-datepicker-color--date--hover: var(--nys-color-text, #1b1b1b);--_nys-datepicker-color--date--selected: var(--nys-color-info, #004dd1);--_nys-datepicker-color--date--disabled: var( --nys-color-text-disabled, #bec0c1 );--_nys-datepicker-border-color--date--disabled: var( --nys-color-neutral-200, #bec0c1 );--_nys-datepicker-background-color--navigation--hover: var( --nys-color-neutral-10, #f6f6f6 );--_nys-datepicker-background-color--navigation--pressed: var( --nys-color-neutral-50, #ededed );--_nys-datepicker-background-color--navigation--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-datepicker-color--navigation--hover: var( --nys-color-neutral-900, #1b1b1b );--_nys-datepicker-color--navigation--pressed: var( --nys-color-neutral-900, #1b1b1b );--_nys-datepicker-color--navigation--disabled: var( --nys-color-neutral-200, #bec0c1 );--_nys-datepicker-box-shadow-border--navigation: inset 0 0 0 1px var(--nys-color-neutral-900, #1b1b1b)}:host([width=lg]){--_nys-datepicker-width--input: var(--nys-form-width-lg, 384px)}:host([width=full]){--_nys-datepicker-width--input: 100%}:host([showError]){--_nys-datepicker-border-color: var(--nys-color-danger, #b52c2c)}:host([inverted]){--_nys-datepicker-outline-color--focus: var(--nys-color-focus-reverse, #7aa5e7)}.nys-datepicker--container{display:flex;flex-direction:column;gap:var(--_nys-datepicker-space-sm);font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size);font-weight:var(--_nys-datepicker-font-weight);line-height:var(--_nys-datepicker-line-height);width:100%}.nys-datepicker--container .nys-datepicker--input-container{position:relative;width:var(--_nys-datepicker-width--input);display:flex;cursor:pointer}.nys-datepicker--container .nys-datepicker--input-container.disabled #calendar-button{cursor:not-allowed;color:var(--_nys-datepicker-color--date--disabled)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input{cursor:text;text-align:start;font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size);flex:1;height:24px;outline:transparent solid 1px;border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-border-color);background-color:var(--_nys-datepicker-background-color);padding:var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-lg);color:var(--_nys-datepicker-color)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:hover{outline-color:var(--_nys-datepicker-outline-color--hover);border-color:var(--_nys-datepicker-outline-color--hover)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:focus{outline-color:var(--_nys-datepicker-outline-color--focus);border-color:var(--_nys-datepicker-outline-color--focus)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:disabled{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);cursor:not-allowed;color:var(--_nys-datepicker-color--disabled)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input::-webkit-date-and-time-value{text-align:start}.nys-datepicker--container .nys-datepicker--input-container input[type=date]::-webkit-inner-spin-button,.nys-datepicker--container .nys-datepicker--input-container input[type=date]::-webkit-calendar-picker-indicator{display:none;appearance:none}.nys-datepicker--container .nys-datepicker--input-container #calendar-button{display:flex;align-items:center;justify-content:center;padding:var(--_nys-datepicker-space-sm);border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-background-color);outline:transparent solid 1px;background-color:var(--_nys-datepicker-background-color);position:absolute;top:50%;right:var(--_nys-datepicker-space-sm);transform:translateY(-50%);cursor:pointer}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:hover{outline-color:var(--_nys-datepicker-background-color--date--hover);border-color:var(--_nys-datepicker-background-color--date--hover);background:var(--_nys-datepicker-background-color--date--hover)}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:active{outline-color:var(--_nys-datepicker-background-color--button--active);border-color:var(--_nys-datepicker-background-color--button--active);background:var(--_nys-datepicker-background-color--button--active)}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:focus:not(:active):not(:disabled){outline-color:var(--_nys-datepicker-outline-color--focus);border-color:var(--_nys-datepicker-outline-color--focus)}.nys-datepicker--container .wc-datepicker--container{display:flex;width:fit-content}.nys-datepicker--container .wc-datepicker--container *{flex:1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}wc-datepicker{display:none;padding:var(--_nys-datepicker-padding--calendar);border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--nys-color-neutral-100, #d0d0ce);background-color:var(--_nys-datepicker-background-color);box-shadow:0 4px 6px -1px var(--nys-color-black-transparent-100, rgba(27, 27, 27, .1)),0 4px 6px -1px var(--nys-color-black-transparent-50, rgba(27, 27, 27, .01));color:var(--_nys-datepicker-text-color);margin-bottom:3px}wc-datepicker.active{display:flex;flex-direction:column-reverse;position:absolute;z-index:1}wc-datepicker *,wc-datepicker *:before,wc-datepicker *:after{margin:0;box-sizing:border-box}.wc-datepicker{display:block;width:min-content;font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size--date);font-weight:400;line-height:var(--_nys-datepicker-line-height);letter-spacing:var(--_nys-datepicker-letterspacing)}.wc-datepicker--disabled *:disabled{opacity:.5;cursor:not-allowed}.wc-datepicker--disabled .wc-datepicker__date{cursor:not-allowed;opacity:.5}.wc-datepicker--disabled .wc-datepicker__date:focus{outline:none;border-color:var(--_nys-datepicker-border-color--date--disabled);box-shadow:none}.wc-datepicker--disabled .wc-datepicker__date:hover:not(.wc-datepicker__date--selected){background-color:transparent}.wc-datepicker--disabled .wc-datepicker__date--selected:hover{color:var(--_nys-datepicker-background-color);background-color:var(--_nys-datepicker-background-color--date--selected)}.wc-datepicker--disabled #wc-month-dropdown-icon{color:var(--_nys-datepicker-color--date--disabled)}.wc-datepicker__header{display:flex;align-items:center;gap:var(--_nys-datepicker-space-sm)}.wc-datepicker__current-month{display:flex;flex-grow:1;gap:var(--_nys-datepicker-space-sm)}.wc-datepicker__month-select,.wc-datepicker__year-select{display:flex;align-items:center;font-size:var(--_nys-datepicker-font-size);font-family:var(--_nys-datepicker-font-family);padding:var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-lg);border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;color:var(--_nys-datepicker-color);background-color:var(--_nys-datepicker-background-color);line-height:var(--_nys-datepicker-line-height)}.wc-datepicker__month-select:hover:not(:disabled),.wc-datepicker__year-select:hover:not(:disabled){border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--hover);background-color:var(--_nys-datepicker-background-color--navigation--hover);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation)}.wc-datepicker__month-select:active:not(:disabled),.wc-datepicker__month-select[aria-pressed=true],.wc-datepicker__year-select:active:not(:disabled),.wc-datepicker__year-select[aria-pressed=true]{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--pressed);background-color:var(--_nys-datepicker-background-color--navigation--pressed);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation)}.wc-datepicker__month-select:disabled,.wc-datepicker__month-select[aria-disabled=true],.wc-datepicker__year-select:disabled,.wc-datepicker__year-select[aria-disabled=true]{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);background-color:var(--_nys-datepicker-background-color--navigation--disabled);color:var(--_nys-datepicker-color--disabled)}.wc-datepicker .month-wrapper{position:relative;width:135px;display:flex;align-items:center;align-self:stretch}.wc-datepicker .month-wrapper #wc-month-dropdown-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none}.wc-datepicker__month-select{width:100%;max-width:100%;flex-grow:1;cursor:pointer;appearance:none;text-overflow:ellipsis;padding-right:var(--nys-space-400, 32px)}.wc-datepicker__month-select>*{width:91px;height:24px}.wc-datepicker__year-select{border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;padding-right:var(--_nys-datepicker-space-sm);max-width:5rem}.wc-datepicker__previous-month-button,.wc-datepicker__next-month-button,.wc-datepicker__previous-year-button,.wc-datepicker__next-year-button{display:inline-flex;width:40px;max-width:40px;max-height:42px;padding:var(--_nys-datepicker-space-lg);justify-content:center;align-items:center;border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;color:var(--_nys-datepicker-color--date);background-color:var(--_nys-datepicker-background-color);cursor:pointer}.wc-datepicker__previous-month-button:hover:not(:disabled),.wc-datepicker__next-month-button:hover:not(:disabled),.wc-datepicker__previous-year-button:hover:not(:disabled),.wc-datepicker__next-year-button:hover:not(:disabled){background-color:var(--_nys-datepicker-background-color--navigation--hover);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--hover)}.wc-datepicker__previous-month-button:active:not(:disabled),.wc-datepicker__previous-month-button[aria-pressed=true],.wc-datepicker__next-month-button:active:not(:disabled),.wc-datepicker__next-month-button[aria-pressed=true],.wc-datepicker__previous-year-button:active:not(:disabled),.wc-datepicker__previous-year-button[aria-pressed=true],.wc-datepicker__next-year-button:active:not(:disabled),.wc-datepicker__next-year-button[aria-pressed=true]{background-color:var(--_nys-datepicker-background-color--navigation--pressed);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--pressed)}.wc-datepicker__previous-month-button:disabled,.wc-datepicker__previous-month-button[aria-disabled=true],.wc-datepicker__next-month-button:disabled,.wc-datepicker__next-month-button[aria-disabled=true],.wc-datepicker__previous-year-button:disabled,.wc-datepicker__previous-year-button[aria-disabled=true],.wc-datepicker__next-year-button:disabled,.wc-datepicker__next-year-button[aria-disabled=true]{background-color:var(--_nys-datepicker-background-color--navigation--disabled);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);color:var(--_nys-datepicker-color--disabled)}.wc-datepicker__calendar{width:100%;table-layout:fixed;border-collapse:collapse}.wc-datepicker__weekday{padding:var(--_nys-datepicker-padding--calendar) 0 var(--_nys-datepicker-space-sm) 0;min-width:var(--nys-size-500, 40px);font-weight:600;aspect-ratio:1}.wc-datepicker__weekday>span{width:42.3px;height:24px;display:flex;justify-content:center;align-items:center}.wc-datepicker__weekday[aria-label=Saturday],.wc-datepicker__weekday[aria-label=Sunday]{color:var(--_nys-datepicker-color--calendar--weekends)}.wc-datepicker__date{padding:var(--_nys-datepicker-space-md);text-align:center;cursor:pointer;border-radius:var(--nys-radius-lg)}.wc-datepicker__date:focus,.wc-datepicker__date:focus-visible{outline:none}.wc-datepicker__date:focus{box-shadow:inset 0 0 0 2px var(--_nys-datepicker-focus-ring--date)}.wc-datepicker__date:hover:not(.wc-datepicker__date--selected):not(:active){color:var(--_nys-datepicker-color--date--hover);background-color:var(--_nys-datepicker-background-color--date--hover)}.wc-datepicker__date:active{color:var(--_nys-datepicker-color--date--hover);background-color:var(--_nys-datepicker-background-color--date--active)}.wc-datepicker__date>*{display:flex;justify-content:center;align-items:center;aspect-ratio:1;width:24.3px;height:24px}.wc-datepicker__date--today{font-weight:600;color:var(--_nys-datepicker-color--date--selected)}.wc-datepicker__date--today>*{font-style:normal;text-decoration-line:underline}.wc-datepicker__date--selected{text-decoration-line:none;background-color:var(--_nys-datepicker-background-color--date--selected);color:var(--_nys-datepicker-color--date--selected)}.wc-datepicker__date--selected>*{font-weight:600}.wc-datepicker__date--disabled{color:var(--_nys-datepicker-color--date--disabled);cursor:default}.wc-datepicker__date--disabled:not(.wc-datepicker__date--disabled--selected,.wc-datepicker__date--disabled--in-range):hover{background-color:transparent}.wc-datepicker__date.wc-datepicker__date--overflowing{color:var(--_nys-datepicker-text-disabled)}.wc-datepicker__date.wc-datepicker__date--overflowing:hover,.wc-datepicker__date.wc-datepicker__date--overflowing:active{color:var(--_nys-datepicker-color)}.wc-datepicker--button-container{display:flex;padding-top:var(--_nys-datepicker-space-lg);align-items:flex-end;gap:var(--_nys-datepicker-padding--calendar);align-self:stretch}.wc-datepicker tr.wc-datepicker__calendar-row.sc-wc-datepicker{display:flex;align-items:center;gap:var(--_nys-datepicker-gap--calendar-row);align-self:stretch}', B = {
15
15
  allRenderFn: !1,
16
16
  cmpDidLoad: !0,
17
17
  cmpDidUnload: !1,
@@ -95,21 +95,21 @@ const Ke = ':host{--_nys-datepicker-width: fit-content;--_nys-datepicker-width--
95
95
  transformTagName: !1,
96
96
  attachStyles: !0
97
97
  };
98
- let B, we, G, De = !1, z = !1, ee = !1, b = !1, ne = null, Z = !1;
99
- const M = (t, e = "") => () => {
100
- }, ie = "http://www.w3.org/1999/xlink", oe = {}, Qe = "http://www.w3.org/2000/svg", Ge = "http://www.w3.org/1999/xhtml", Xe = (t) => t != null, te = (t) => (t = typeof t, t === "object" || t === "function");
98
+ let O, we, X, De = !1, z = !1, se = !1, $ = !1, oe = null, te = !1;
99
+ const T = (t, e = "") => () => {
100
+ }, ce = "http://www.w3.org/1999/xlink", le = {}, Qe = "http://www.w3.org/2000/svg", Ge = "http://www.w3.org/1999/xhtml", Xe = (t) => t != null, re = (t) => (t = typeof t, t === "object" || t === "function");
101
101
  function Je(t) {
102
- var e, a, r;
103
- return (r = (a = (e = t.head) === null || e === void 0 ? void 0 : e.querySelector('meta[name="csp-nonce"]')) === null || a === void 0 ? void 0 : a.getAttribute("content")) !== null && r !== void 0 ? r : void 0;
102
+ var e, a, s;
103
+ return (s = (a = (e = t.head) === null || e === void 0 ? void 0 : e.querySelector('meta[name="csp-nonce"]')) === null || a === void 0 ? void 0 : a.getAttribute("content")) !== null && s !== void 0 ? s : void 0;
104
104
  }
105
105
  const h = (t, e, ...a) => {
106
- let r = null, s = null, n = null, i = !1, o = !1;
106
+ let s = null, r = null, n = null, i = !1, o = !1;
107
107
  const c = [], l = (d) => {
108
108
  for (let p = 0; p < d.length; p++)
109
- r = d[p], Array.isArray(r) ? l(r) : r != null && typeof r != "boolean" && ((i = typeof t != "function" && !te(r)) && (r = String(r)), i && o ? c[c.length - 1].$text$ += r : c.push(i ? j(null, r) : r), o = i);
109
+ s = d[p], Array.isArray(s) ? l(s) : s != null && typeof s != "boolean" && ((i = typeof t != "function" && !re(s)) && (s = String(s)), i && o ? c[c.length - 1].$text$ += s : c.push(i ? j(null, s) : s), o = i);
110
110
  };
111
111
  if (l(a), e) {
112
- e.key && (s = e.key), e.name && (n = e.name);
112
+ e.key && (r = e.key), e.name && (n = e.name);
113
113
  {
114
114
  const d = e.className || e.class;
115
115
  d && (e.class = typeof d != "object" ? d : Object.keys(d).filter((p) => d[p]).join(" "));
@@ -118,7 +118,7 @@ const h = (t, e, ...a) => {
118
118
  if (typeof t == "function")
119
119
  return t(e === null ? {} : e, c, Ve);
120
120
  const u = j(t, null);
121
- return u.$attrs$ = e, c.length > 0 && (u.$children$ = c), u.$key$ = s, u.$name$ = n, u;
121
+ return u.$attrs$ = e, c.length > 0 && (u.$children$ = c), u.$key$ = r, u.$name$ = n, u;
122
122
  }, j = (t, e) => {
123
123
  const a = {
124
124
  $flags$: 0,
@@ -129,9 +129,9 @@ const h = (t, e, ...a) => {
129
129
  };
130
130
  return a.$attrs$ = null, a.$key$ = null, a.$name$ = null, a;
131
131
  }, xe = {}, Ze = (t) => t && t.$tag$ === xe, Ve = {
132
- forEach: (t, e) => t.map(ce).forEach(e),
133
- map: (t, e) => t.map(ce).map(e).map(et)
134
- }, ce = (t) => ({
132
+ forEach: (t, e) => t.map(de).forEach(e),
133
+ map: (t, e) => t.map(de).map(e).map(et)
134
+ }, de = (t) => ({
135
135
  vattrs: t.$attrs$,
136
136
  vchildren: t.$children$,
137
137
  vkey: t.$key$,
@@ -145,34 +145,34 @@ const h = (t, e, ...a) => {
145
145
  }
146
146
  const e = j(t.vtag, t.vtext);
147
147
  return e.$attrs$ = t.vattrs, e.$children$ = t.vchildren, e.$key$ = t.vkey, e.$name$ = t.vname, e;
148
- }, tt = (t) => Tt.map((e) => e(t)).find((e) => !!e), at = (t, e) => t != null && !te(t) ? e & 4 ? t === "false" ? !1 : t === "" || !!t : e & 2 ? parseFloat(t) : e & 1 ? String(t) : t : t, rt = (t) => t, le = (t, e, a) => {
149
- const r = rt(t);
148
+ }, tt = (t) => Tt.map((e) => e(t)).find((e) => !!e), at = (t, e) => t != null && !re(t) ? e & 4 ? t === "false" ? !1 : t === "" || !!t : e & 2 ? parseFloat(t) : e & 1 ? String(t) : t : t, st = (t) => t, ue = (t, e, a) => {
149
+ const s = st(t);
150
150
  return {
151
- emit: (s) => st(r, e, {
151
+ emit: (r) => rt(s, e, {
152
152
  bubbles: !0,
153
153
  composed: !0,
154
154
  cancelable: !0,
155
- detail: s
155
+ detail: r
156
156
  })
157
157
  };
158
- }, st = (t, e, a) => {
159
- const r = v.ce(e, a);
160
- return t.dispatchEvent(r), r;
161
- }, de = /* @__PURE__ */ new WeakMap(), nt = (t, e, a) => {
162
- let r = K.get(t);
163
- Ot && a ? (r = r || new CSSStyleSheet(), typeof r == "string" ? r = e : r.replaceSync(e)) : r = e, K.set(t, r);
164
- }, it = (t, e, a, r) => {
165
- var s;
158
+ }, rt = (t, e, a) => {
159
+ const s = b.ce(e, a);
160
+ return t.dispatchEvent(s), s;
161
+ }, he = /* @__PURE__ */ new WeakMap(), nt = (t, e, a) => {
162
+ let s = K.get(t);
163
+ Ot && a ? (s = s || new CSSStyleSheet(), typeof s == "string" ? s = e : s.replaceSync(e)) : s = e, K.set(t, s);
164
+ }, it = (t, e, a, s) => {
165
+ var r;
166
166
  let n = Se(e, a);
167
167
  const i = K.get(n);
168
- if (t = t.nodeType === 11 ? t : m, i)
168
+ if (t = t.nodeType === 11 ? t : w, i)
169
169
  if (typeof i == "string") {
170
170
  t = t.head || t;
171
- let o = de.get(t), c;
172
- if (o || de.set(t, o = /* @__PURE__ */ new Set()), !o.has(n)) {
171
+ let o = he.get(t), c;
172
+ if (o || he.set(t, o = /* @__PURE__ */ new Set()), !o.has(n)) {
173
173
  {
174
- c = m.createElement("style"), c.innerHTML = i;
175
- const l = (s = v.$nonce$) !== null && s !== void 0 ? s : Je(m);
174
+ c = w.createElement("style"), c.innerHTML = i;
175
+ const l = (r = b.$nonce$) !== null && r !== void 0 ? r : Je(w);
176
176
  l != null && c.setAttribute("nonce", l), t.insertBefore(c, t.querySelector("link"));
177
177
  }
178
178
  o && o.add(n);
@@ -180,120 +180,120 @@ const h = (t, e, ...a) => {
180
180
  } else t.adoptedStyleSheets.includes(i) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, i]);
181
181
  return n;
182
182
  }, ot = (t) => {
183
- const e = t.$cmpMeta$, a = t.$hostElement$, r = e.$flags$, s = M("attachStyles", e.$tagName$), n = it(a.shadowRoot ? a.shadowRoot : a.getRootNode(), e, t.$modeName$);
184
- r & 10 && (a["s-sc"] = n, a.classList.add(n + "-h"), r & 2 && a.classList.add(n + "-s")), s();
185
- }, Se = (t, e) => "sc-" + (e && t.$flags$ & 32 ? t.$tagName$ + "-" + e : t.$tagName$), ue = (t, e, a, r, s, n) => {
186
- if (a !== r) {
187
- let i = ye(t, e), o = e.toLowerCase();
183
+ const e = t.$cmpMeta$, a = t.$hostElement$, s = e.$flags$, r = T("attachStyles", e.$tagName$), n = it(a.shadowRoot ? a.shadowRoot : a.getRootNode(), e, t.$modeName$);
184
+ s & 10 && (a["s-sc"] = n, a.classList.add(n + "-h"), s & 2 && a.classList.add(n + "-s")), r();
185
+ }, Se = (t, e) => "sc-" + (e && t.$flags$ & 32 ? t.$tagName$ + "-" + e : t.$tagName$), pe = (t, e, a, s, r, n) => {
186
+ if (a !== s) {
187
+ let i = ke(t, e), o = e.toLowerCase();
188
188
  if (e === "class") {
189
- const c = t.classList, l = he(a), u = he(r);
189
+ const c = t.classList, l = fe(a), u = fe(s);
190
190
  c.remove(...l.filter((d) => d && !u.includes(d))), c.add(...u.filter((d) => d && !l.includes(d)));
191
191
  } else if (e === "style") {
192
192
  for (const c in a)
193
- (!r || r[c] == null) && (c.includes("-") ? t.style.removeProperty(c) : t.style[c] = "");
194
- for (const c in r)
195
- (!a || r[c] !== a[c]) && (c.includes("-") ? t.style.setProperty(c, r[c]) : t.style[c] = r[c]);
193
+ (!s || s[c] == null) && (c.includes("-") ? t.style.removeProperty(c) : t.style[c] = "");
194
+ for (const c in s)
195
+ (!a || s[c] !== a[c]) && (c.includes("-") ? t.style.setProperty(c, s[c]) : t.style[c] = s[c]);
196
196
  } else if (e !== "key")
197
197
  if (e === "ref")
198
- r && r(t);
198
+ s && s(t);
199
199
  else if (!t.__lookupSetter__(e) && e[0] === "o" && e[1] === "n")
200
- e[2] === "-" ? e = e.slice(3) : ye(J, o) ? e = o.slice(2) : e = o[2] + e.slice(3), a && v.rel(t, e, a, !1), r && v.ael(t, e, r, !1);
200
+ e[2] === "-" ? e = e.slice(3) : ke(Z, o) ? e = o.slice(2) : e = o[2] + e.slice(3), a && b.rel(t, e, a, !1), s && b.ael(t, e, s, !1);
201
201
  else {
202
- const c = te(r);
203
- if ((i || c && r !== null) && !s)
202
+ const c = re(s);
203
+ if ((i || c && s !== null) && !r)
204
204
  try {
205
205
  if (t.tagName.includes("-"))
206
- t[e] = r;
206
+ t[e] = s;
207
207
  else {
208
- const u = r ?? "";
208
+ const u = s ?? "";
209
209
  e === "list" ? i = !1 : (a == null || t[e] != u) && (t[e] = u);
210
210
  }
211
211
  } catch {
212
212
  }
213
213
  let l = !1;
214
- o !== (o = o.replace(/^xlink\:?/, "")) && (e = o, l = !0), r == null || r === !1 ? (r !== !1 || t.getAttribute(e) === "") && (l ? t.removeAttributeNS(ie, e) : t.removeAttribute(e)) : (!i || n & 4 || s) && !c && (r = r === !0 ? "" : r, l ? t.setAttributeNS(ie, e, r) : t.setAttribute(e, r));
214
+ o !== (o = o.replace(/^xlink\:?/, "")) && (e = o, l = !0), s == null || s === !1 ? (s !== !1 || t.getAttribute(e) === "") && (l ? t.removeAttributeNS(ce, e) : t.removeAttribute(e)) : (!i || n & 4 || r) && !c && (s = s === !0 ? "" : s, l ? t.setAttributeNS(ce, e, s) : t.setAttribute(e, s));
215
215
  }
216
216
  }
217
- }, ct = /\s/, he = (t) => t ? t.split(ct) : [], Ce = (t, e, a, r) => {
218
- const s = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, n = t && t.$attrs$ || oe, i = e.$attrs$ || oe;
219
- for (r in n)
220
- r in i || ue(s, r, n[r], void 0, a, e.$flags$);
221
- for (r in i)
222
- ue(s, r, n[r], i[r], a, e.$flags$);
223
- }, H = (t, e, a, r) => {
224
- const s = e.$children$[a];
217
+ }, ct = /\s/, fe = (t) => t ? t.split(ct) : [], Me = (t, e, a, s) => {
218
+ const r = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, n = t && t.$attrs$ || le, i = e.$attrs$ || le;
219
+ for (s in n)
220
+ s in i || pe(r, s, n[s], void 0, a, e.$flags$);
221
+ for (s in i)
222
+ pe(r, s, n[s], i[s], a, e.$flags$);
223
+ }, H = (t, e, a, s) => {
224
+ const r = e.$children$[a];
225
225
  let n = 0, i, o, c;
226
- if (De || (ee = !0, s.$tag$ === "slot" && (B && r.classList.add(B + "-s"), s.$flags$ |= s.$children$ ? (
226
+ if (De || (se = !0, r.$tag$ === "slot" && (O && s.classList.add(O + "-s"), r.$flags$ |= r.$children$ ? (
227
227
  // slot element has fallback content
228
228
  2
229
229
  ) : (
230
230
  // slot element does not have fallback content
231
231
  1
232
- ))), s.$text$ !== null)
233
- i = s.$elm$ = m.createTextNode(s.$text$);
234
- else if (s.$flags$ & 1)
235
- i = s.$elm$ = m.createTextNode("");
232
+ ))), r.$text$ !== null)
233
+ i = r.$elm$ = w.createTextNode(r.$text$);
234
+ else if (r.$flags$ & 1)
235
+ i = r.$elm$ = w.createTextNode("");
236
236
  else {
237
- if (b || (b = s.$tag$ === "svg"), i = s.$elm$ = m.createElementNS(b ? Qe : Ge, s.$flags$ & 2 ? "slot-fb" : s.$tag$), b && s.$tag$ === "foreignObject" && (b = !1), Ce(null, s, b), Xe(B) && i["s-si"] !== B && i.classList.add(i["s-si"] = B), s.$children$)
238
- for (n = 0; n < s.$children$.length; ++n)
239
- o = H(t, s, n, i), o && i.appendChild(o);
240
- s.$tag$ === "svg" ? b = !1 : i.tagName === "foreignObject" && (b = !0);
241
- }
242
- return i["s-hn"] = G, s.$flags$ & 3 && (i["s-sr"] = !0, i["s-cr"] = we, i["s-sn"] = s.$name$ || "", c = t && t.$children$ && t.$children$[a], c && c.$tag$ === s.$tag$ && t.$elm$ && F(t.$elm$, !1)), i;
243
- }, F = (t, e) => {
244
- v.$flags$ |= 1;
237
+ if ($ || ($ = r.$tag$ === "svg"), i = r.$elm$ = w.createElementNS($ ? Qe : Ge, r.$flags$ & 2 ? "slot-fb" : r.$tag$), $ && r.$tag$ === "foreignObject" && ($ = !1), Me(null, r, $), Xe(O) && i["s-si"] !== O && i.classList.add(i["s-si"] = O), r.$children$)
238
+ for (n = 0; n < r.$children$.length; ++n)
239
+ o = H(t, r, n, i), o && i.appendChild(o);
240
+ r.$tag$ === "svg" ? $ = !1 : i.tagName === "foreignObject" && ($ = !0);
241
+ }
242
+ return i["s-hn"] = X, r.$flags$ & 3 && (i["s-sr"] = !0, i["s-cr"] = we, i["s-sn"] = r.$name$ || "", c = t && t.$children$ && t.$children$[a], c && c.$tag$ === r.$tag$ && t.$elm$ && q(t.$elm$, !1)), i;
243
+ }, q = (t, e) => {
244
+ b.$flags$ |= 1;
245
245
  const a = t.childNodes;
246
- for (let r = a.length - 1; r >= 0; r--) {
247
- const s = a[r];
248
- s["s-hn"] !== G && s["s-ol"] && (Le(s).insertBefore(s, ae(s)), s["s-ol"].remove(), s["s-ol"] = void 0, ee = !0), e && F(s, e);
246
+ for (let s = a.length - 1; s >= 0; s--) {
247
+ const r = a[s];
248
+ r["s-hn"] !== X && r["s-ol"] && (Le(r).insertBefore(r, ne(r)), r["s-ol"].remove(), r["s-ol"] = void 0, se = !0), e && q(r, e);
249
249
  }
250
- v.$flags$ &= -2;
251
- }, Me = (t, e, a, r, s, n) => {
250
+ b.$flags$ &= -2;
251
+ }, Ce = (t, e, a, s, r, n) => {
252
252
  let i = t["s-cr"] && t["s-cr"].parentNode || t, o;
253
- for (i.shadowRoot && i.tagName === G && (i = i.shadowRoot); s <= n; ++s)
254
- r[s] && (o = H(null, a, s, t), o && (r[s].$elm$ = o, i.insertBefore(o, ae(e))));
255
- }, Te = (t, e, a, r, s) => {
253
+ for (i.shadowRoot && i.tagName === X && (i = i.shadowRoot); r <= n; ++r)
254
+ s[r] && (o = H(null, a, r, t), o && (s[r].$elm$ = o, i.insertBefore(o, ne(e))));
255
+ }, Te = (t, e, a, s, r) => {
256
256
  for (; e <= a; ++e)
257
- (r = t[e]) && (s = r.$elm$, Oe(r), z = !0, s["s-ol"] ? s["s-ol"].remove() : F(s, !0), s.remove());
258
- }, lt = (t, e, a, r) => {
259
- let s = 0, n = 0, i = 0, o = 0, c = e.length - 1, l = e[0], u = e[c], d = r.length - 1, p = r[0], g = r[d], $, x;
260
- for (; s <= c && n <= d; )
257
+ (s = t[e]) && (r = s.$elm$, Oe(s), z = !0, r["s-ol"] ? r["s-ol"].remove() : q(r, !0), r.remove());
258
+ }, lt = (t, e, a, s) => {
259
+ let r = 0, n = 0, i = 0, o = 0, c = e.length - 1, l = e[0], u = e[c], d = s.length - 1, p = s[0], k = s[d], _, S;
260
+ for (; r <= c && n <= d; )
261
261
  if (l == null)
262
- l = e[++s];
262
+ l = e[++r];
263
263
  else if (u == null)
264
264
  u = e[--c];
265
265
  else if (p == null)
266
- p = r[++n];
267
- else if (g == null)
268
- g = r[--d];
269
- else if (Y(l, p))
270
- O(l, p), l = e[++s], p = r[++n];
271
- else if (Y(u, g))
272
- O(u, g), u = e[--c], g = r[--d];
273
- else if (Y(l, g))
274
- (l.$tag$ === "slot" || g.$tag$ === "slot") && F(l.$elm$.parentNode, !1), O(l, g), t.insertBefore(l.$elm$, u.$elm$.nextSibling), l = e[++s], g = r[--d];
275
- else if (Y(u, p))
276
- (l.$tag$ === "slot" || g.$tag$ === "slot") && F(u.$elm$.parentNode, !1), O(u, p), t.insertBefore(u.$elm$, l.$elm$), u = e[--c], p = r[++n];
266
+ p = s[++n];
267
+ else if (k == null)
268
+ k = s[--d];
269
+ else if (P(l, p))
270
+ R(l, p), l = e[++r], p = s[++n];
271
+ else if (P(u, k))
272
+ R(u, k), u = e[--c], k = s[--d];
273
+ else if (P(l, k))
274
+ (l.$tag$ === "slot" || k.$tag$ === "slot") && q(l.$elm$.parentNode, !1), R(l, k), t.insertBefore(l.$elm$, u.$elm$.nextSibling), l = e[++r], k = s[--d];
275
+ else if (P(u, p))
276
+ (l.$tag$ === "slot" || k.$tag$ === "slot") && q(u.$elm$.parentNode, !1), R(u, p), t.insertBefore(u.$elm$, l.$elm$), u = e[--c], p = s[++n];
277
277
  else {
278
- for (i = -1, o = s; o <= c; ++o)
278
+ for (i = -1, o = r; o <= c; ++o)
279
279
  if (e[o] && e[o].$key$ !== null && e[o].$key$ === p.$key$) {
280
280
  i = o;
281
281
  break;
282
282
  }
283
- i >= 0 ? (x = e[i], x.$tag$ !== p.$tag$ ? $ = H(e && e[n], a, i, t) : (O(x, p), e[i] = void 0, $ = x.$elm$), p = r[++n]) : ($ = H(e && e[n], a, n, t), p = r[++n]), $ && Le(l.$elm$).insertBefore($, ae(l.$elm$));
283
+ i >= 0 ? (S = e[i], S.$tag$ !== p.$tag$ ? _ = H(e && e[n], a, i, t) : (R(S, p), e[i] = void 0, _ = S.$elm$), p = s[++n]) : (_ = H(e && e[n], a, n, t), p = s[++n]), _ && Le(l.$elm$).insertBefore(_, ne(l.$elm$));
284
284
  }
285
- s > c ? Me(t, r[d + 1] == null ? null : r[d + 1].$elm$, a, r, n, d) : n > d && Te(e, s, c);
286
- }, Y = (t, e) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : t.$key$ === e.$key$ : !1, ae = (t) => t && t["s-ol"] || t, Le = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, O = (t, e) => {
287
- const a = e.$elm$ = t.$elm$, r = t.$children$, s = e.$children$, n = e.$tag$, i = e.$text$;
285
+ r > c ? Ce(t, s[d + 1] == null ? null : s[d + 1].$elm$, a, s, n, d) : n > d && Te(e, r, c);
286
+ }, P = (t, e) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : t.$key$ === e.$key$ : !1, ne = (t) => t && t["s-ol"] || t, Le = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, R = (t, e) => {
287
+ const a = e.$elm$ = t.$elm$, s = t.$children$, r = e.$children$, n = e.$tag$, i = e.$text$;
288
288
  let o;
289
- i === null ? (b = n === "svg" ? !0 : n === "foreignObject" ? !1 : b, n === "slot" || Ce(t, e, b), r !== null && s !== null ? lt(a, r, e, s) : s !== null ? (t.$text$ !== null && (a.textContent = ""), Me(a, null, e, s, 0, s.length - 1)) : r !== null && Te(r, 0, r.length - 1), b && n === "svg" && (b = !1)) : (o = a["s-cr"]) ? o.parentNode.textContent = i : t.$text$ !== i && (a.data = i);
289
+ i === null ? ($ = n === "svg" ? !0 : n === "foreignObject" ? !1 : $, n === "slot" || Me(t, e, $), s !== null && r !== null ? lt(a, s, e, r) : r !== null ? (t.$text$ !== null && (a.textContent = ""), Ce(a, null, e, r, 0, r.length - 1)) : s !== null && Te(s, 0, s.length - 1), $ && n === "svg" && ($ = !1)) : (o = a["s-cr"]) ? o.parentNode.textContent = i : t.$text$ !== i && (a.data = i);
290
290
  }, Ee = (t) => {
291
291
  const e = t.childNodes;
292
- let a, r, s, n, i, o;
293
- for (r = 0, s = e.length; r < s; r++)
294
- if (a = e[r], a.nodeType === 1) {
292
+ let a, s, r, n, i, o;
293
+ for (s = 0, r = e.length; s < r; s++)
294
+ if (a = e[s], a.nodeType === 1) {
295
295
  if (a["s-sr"]) {
296
- for (i = a["s-sn"], a.hidden = !1, n = 0; n < s; n++)
296
+ for (i = a["s-sn"], a.hidden = !1, n = 0; n < r; n++)
297
297
  if (o = e[n].nodeType, e[n]["s-hn"] !== a["s-hn"] || i !== "") {
298
298
  if (o === 1 && i === e[n].getAttribute("slot")) {
299
299
  a.hidden = !0;
@@ -306,35 +306,35 @@ const h = (t, e, ...a) => {
306
306
  }
307
307
  Ee(a);
308
308
  }
309
- }, _ = [], Be = (t) => {
310
- let e, a, r, s, n, i, o = 0;
309
+ }, m = [], Be = (t) => {
310
+ let e, a, s, r, n, i, o = 0;
311
311
  const c = t.childNodes, l = c.length;
312
312
  for (; o < l; o++) {
313
313
  if (e = c[o], e["s-sr"] && (a = e["s-cr"]) && a.parentNode)
314
- for (r = a.parentNode.childNodes, s = e["s-sn"], i = r.length - 1; i >= 0; i--)
315
- a = r[i], !a["s-cn"] && !a["s-nr"] && a["s-hn"] !== e["s-hn"] && (pe(a, s) ? (n = _.find((u) => u.$nodeToRelocate$ === a), z = !0, a["s-sn"] = a["s-sn"] || s, n ? n.$slotRefNode$ = e : _.push({
314
+ for (s = a.parentNode.childNodes, r = e["s-sn"], i = s.length - 1; i >= 0; i--)
315
+ a = s[i], !a["s-cn"] && !a["s-nr"] && a["s-hn"] !== e["s-hn"] && (ye(a, r) ? (n = m.find((u) => u.$nodeToRelocate$ === a), z = !0, a["s-sn"] = a["s-sn"] || r, n ? n.$slotRefNode$ = e : m.push({
316
316
  $slotRefNode$: e,
317
317
  $nodeToRelocate$: a
318
- }), a["s-sr"] && _.map((u) => {
319
- pe(u.$nodeToRelocate$, a["s-sn"]) && (n = _.find((d) => d.$nodeToRelocate$ === a), n && !u.$slotRefNode$ && (u.$slotRefNode$ = n.$slotRefNode$));
320
- })) : _.some((u) => u.$nodeToRelocate$ === a) || _.push({
318
+ }), a["s-sr"] && m.map((u) => {
319
+ ye(u.$nodeToRelocate$, a["s-sn"]) && (n = m.find((d) => d.$nodeToRelocate$ === a), n && !u.$slotRefNode$ && (u.$slotRefNode$ = n.$slotRefNode$));
320
+ })) : m.some((u) => u.$nodeToRelocate$ === a) || m.push({
321
321
  $nodeToRelocate$: a
322
322
  }));
323
323
  e.nodeType === 1 && Be(e);
324
324
  }
325
- }, pe = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", Oe = (t) => {
325
+ }, ye = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", Oe = (t) => {
326
326
  t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(Oe);
327
327
  }, dt = (t, e) => {
328
- const a = t.$hostElement$, r = t.$cmpMeta$, s = t.$vnode$ || j(null, null), n = Ze(e) ? e : h(null, null, e);
329
- G = a.tagName, r.$attrsToReflect$ && (n.$attrs$ = n.$attrs$ || {}, r.$attrsToReflect$.map(([i, o]) => n.$attrs$[o] = a[i])), n.$tag$ = null, n.$flags$ |= 4, t.$vnode$ = n, n.$elm$ = s.$elm$ = a.shadowRoot || a, B = a["s-sc"], we = a["s-cr"], De = (r.$flags$ & 1) !== 0, z = !1, O(s, n);
328
+ const a = t.$hostElement$, s = t.$cmpMeta$, r = t.$vnode$ || j(null, null), n = Ze(e) ? e : h(null, null, e);
329
+ X = a.tagName, s.$attrsToReflect$ && (n.$attrs$ = n.$attrs$ || {}, s.$attrsToReflect$.map(([i, o]) => n.$attrs$[o] = a[i])), n.$tag$ = null, n.$flags$ |= 4, t.$vnode$ = n, n.$elm$ = r.$elm$ = a.shadowRoot || a, O = a["s-sc"], we = a["s-cr"], De = (s.$flags$ & 1) !== 0, z = !1, R(r, n);
330
330
  {
331
- if (v.$flags$ |= 1, ee) {
331
+ if (b.$flags$ |= 1, se) {
332
332
  Be(n.$elm$);
333
333
  let i, o, c, l, u, d, p = 0;
334
- for (; p < _.length; p++)
335
- i = _[p], o = i.$nodeToRelocate$, o["s-ol"] || (c = m.createTextNode(""), c["s-nr"] = o, o.parentNode.insertBefore(o["s-ol"] = c, o));
336
- for (p = 0; p < _.length; p++)
337
- if (i = _[p], o = i.$nodeToRelocate$, i.$slotRefNode$) {
334
+ for (; p < m.length; p++)
335
+ i = m[p], o = i.$nodeToRelocate$, o["s-ol"] || (c = w.createTextNode(""), c["s-nr"] = o, o.parentNode.insertBefore(o["s-ol"] = c, o));
336
+ for (p = 0; p < m.length; p++)
337
+ if (i = m[p], o = i.$nodeToRelocate$, i.$slotRefNode$) {
338
338
  for (l = i.$slotRefNode$.parentNode, u = i.$slotRefNode$.nextSibling, c = o["s-ol"]; c = c.previousSibling; )
339
339
  if (d = c["s-nr"], d && d["s-sn"] === o["s-sn"] && l === d.parentNode && (d = d.nextSibling, !d || !d["s-nr"])) {
340
340
  u = d;
@@ -344,65 +344,65 @@ const h = (t, e, ...a) => {
344
344
  } else
345
345
  o.nodeType === 1 && (o.hidden = !0);
346
346
  }
347
- z && Ee(n.$elm$), v.$flags$ &= -2, _.length = 0;
347
+ z && Ee(n.$elm$), b.$flags$ &= -2, m.length = 0;
348
348
  }
349
349
  }, ut = (t, e) => {
350
- }, Re = (t, e) => (t.$flags$ |= 16, ut(t, t.$ancestorComponent$), Nt(() => ht(t, e))), ht = (t, e) => {
351
- const a = t.$hostElement$, r = M("scheduleUpdate", t.$cmpMeta$.$tagName$), s = a;
350
+ }, Re = (t, e) => (t.$flags$ |= 16, ut(t, t.$ancestorComponent$), It(() => ht(t, e))), ht = (t, e) => {
351
+ const a = t.$hostElement$, s = T("scheduleUpdate", t.$cmpMeta$.$tagName$), r = a;
352
352
  let n;
353
- return e ? n = R(s, "componentWillLoad") : n = R(s, "componentWillUpdate"), n = fe(n, () => R(s, "componentWillRender")), r(), fe(n, () => pt(t, s, e));
353
+ return e ? n = N(r, "componentWillLoad") : n = N(r, "componentWillUpdate"), n = ge(n, () => N(r, "componentWillRender")), s(), ge(n, () => pt(t, r, e));
354
354
  }, pt = async (t, e, a) => {
355
- const r = t.$hostElement$, s = M("update", t.$cmpMeta$.$tagName$);
356
- r["s-rc"], a && ot(t);
357
- const n = M("render", t.$cmpMeta$.$tagName$);
358
- ft(t, e, r), n(), s(), yt(t);
355
+ const s = t.$hostElement$, r = T("update", t.$cmpMeta$.$tagName$);
356
+ s["s-rc"], a && ot(t);
357
+ const n = T("render", t.$cmpMeta$.$tagName$);
358
+ ft(t, e, s), n(), r(), yt(t);
359
359
  }, ft = (t, e, a) => {
360
360
  try {
361
- ne = e, e = e.render && e.render(), t.$flags$ &= -17, t.$flags$ |= 2, (E.hasRenderFn || E.reflect) && (E.vdomRender || E.reflect) && (E.hydrateServerSide || dt(t, e));
361
+ oe = e, e = e.render && e.render(), t.$flags$ &= -17, t.$flags$ |= 2, (B.hasRenderFn || B.reflect) && (B.vdomRender || B.reflect) && (B.hydrateServerSide || dt(t, e));
362
362
  } catch (o) {
363
- A(o, t.$hostElement$);
363
+ Y(o, t.$hostElement$);
364
364
  }
365
- return ne = null, null;
365
+ return oe = null, null;
366
366
  }, yt = (t) => {
367
- const e = t.$cmpMeta$.$tagName$, a = t.$hostElement$, r = M("postUpdate", e), s = a;
368
- t.$ancestorComponent$, R(s, "componentDidRender"), t.$flags$ & 64 ? (R(s, "componentDidUpdate"), r()) : (t.$flags$ |= 64, R(s, "componentDidLoad"), r());
369
- }, R = (t, e, a) => {
367
+ const e = t.$cmpMeta$.$tagName$, a = t.$hostElement$, s = T("postUpdate", e), r = a;
368
+ t.$ancestorComponent$, N(r, "componentDidRender"), t.$flags$ & 64 ? (N(r, "componentDidUpdate"), s()) : (t.$flags$ |= 64, N(r, "componentDidLoad"), s());
369
+ }, N = (t, e, a) => {
370
370
  if (t && t[e])
371
371
  try {
372
372
  return t[e](a);
373
- } catch (r) {
374
- A(r);
373
+ } catch (s) {
374
+ Y(s);
375
375
  }
376
- }, fe = (t, e) => t && t.then ? t.then(e) : e(), gt = (t, e) => X(t).$instanceValues$.get(e), kt = (t, e, a, r) => {
377
- const s = X(t), n = t, i = s.$instanceValues$.get(e), o = s.$flags$, c = n;
378
- a = at(a, r.$members$[e][0]);
376
+ }, ge = (t, e) => t && t.then ? t.then(e) : e(), gt = (t, e) => J(t).$instanceValues$.get(e), kt = (t, e, a, s) => {
377
+ const r = J(t), n = t, i = r.$instanceValues$.get(e), o = r.$flags$, c = n;
378
+ a = at(a, s.$members$[e][0]);
379
379
  const l = Number.isNaN(i) && Number.isNaN(a);
380
380
  if (a !== i && !l) {
381
- s.$instanceValues$.set(e, a);
381
+ r.$instanceValues$.set(e, a);
382
382
  {
383
- if (r.$watchers$ && o & 128) {
384
- const d = r.$watchers$[e];
383
+ if (s.$watchers$ && o & 128) {
384
+ const d = s.$watchers$[e];
385
385
  d && d.map((p) => {
386
386
  try {
387
387
  c[p](a, i, e);
388
- } catch (g) {
389
- A(g, n);
388
+ } catch (k) {
389
+ Y(k, n);
390
390
  }
391
391
  });
392
392
  }
393
393
  if ((o & 18) === 2) {
394
394
  if (c.componentShouldUpdate && c.componentShouldUpdate(a, i, e) === !1)
395
395
  return;
396
- Re(s, !1);
396
+ Re(r, !1);
397
397
  }
398
398
  }
399
399
  }
400
400
  }, vt = (t, e, a) => {
401
401
  if (e.$members$) {
402
402
  t.watchers && (e.$watchers$ = t.watchers);
403
- const r = Object.entries(e.$members$), s = t.prototype;
404
- r.map(([n, [i]]) => {
405
- (i & 31 || i & 32) && Object.defineProperty(s, n, {
403
+ const s = Object.entries(e.$members$), r = t.prototype;
404
+ s.map(([n, [i]]) => {
405
+ (i & 31 || i & 32) && Object.defineProperty(r, n, {
406
406
  get() {
407
407
  return gt(this, n);
408
408
  },
@@ -415,16 +415,16 @@ const h = (t, e, ...a) => {
415
415
  });
416
416
  {
417
417
  const n = /* @__PURE__ */ new Map();
418
- s.attributeChangedCallback = function(i, o, c) {
419
- v.jmp(() => {
418
+ r.attributeChangedCallback = function(i, o, c) {
419
+ b.jmp(() => {
420
420
  const l = n.get(i);
421
421
  if (this.hasOwnProperty(l))
422
422
  c = this[l], delete this[l];
423
- else if (s.hasOwnProperty(l) && typeof this[l] == "number" && this[l] == c)
423
+ else if (r.hasOwnProperty(l) && typeof this[l] == "number" && this[l] == c)
424
424
  return;
425
425
  this[l] = c === null && typeof this[l] == "boolean" ? !1 : c;
426
426
  });
427
- }, t.observedAttributes = r.filter(
427
+ }, t.observedAttributes = s.filter(
428
428
  ([i, o]) => o[0] & 15
429
429
  /* MEMBER_FLAGS.HasAttribute */
430
430
  ).map(([i, o]) => {
@@ -434,34 +434,34 @@ const h = (t, e, ...a) => {
434
434
  }
435
435
  }
436
436
  return t;
437
- }, bt = async (t, e, a, r, s) => {
438
- if ((e.$flags$ & 32) === 0 && (s = t.constructor, e.$flags$ |= 32, customElements.whenDefined(a.$tagName$).then(() => e.$flags$ |= 128), s.style)) {
439
- let i = s.style;
437
+ }, bt = async (t, e, a, s, r) => {
438
+ if ((e.$flags$ & 32) === 0 && (r = t.constructor, e.$flags$ |= 32, customElements.whenDefined(a.$tagName$).then(() => e.$flags$ |= 128), r.style)) {
439
+ let i = r.style;
440
440
  typeof i != "string" && (i = i[e.$modeName$ = tt(t)]);
441
441
  const o = Se(a, e.$modeName$);
442
442
  if (!K.has(o)) {
443
- const c = M("registerStyles", a.$tagName$);
443
+ const c = T("registerStyles", a.$tagName$);
444
444
  nt(o, i, !!(a.$flags$ & 1)), c();
445
445
  }
446
446
  }
447
447
  e.$ancestorComponent$, Re(e, !0);
448
448
  }, $t = (t) => {
449
449
  }, _t = (t) => {
450
- if ((v.$flags$ & 1) === 0) {
451
- const e = X(t), a = e.$cmpMeta$, r = M("connectedCallback", a.$tagName$);
452
- e.$flags$ & 1 ? (Ie(t, e, a.$listeners$), $t(e.$lazyInstance$)) : (e.$flags$ |= 1, a.$flags$ & 12 && mt(t), a.$members$ && Object.entries(a.$members$).map(([s, [n]]) => {
453
- if (n & 31 && t.hasOwnProperty(s)) {
454
- const i = t[s];
455
- delete t[s], t[s] = i;
450
+ if ((b.$flags$ & 1) === 0) {
451
+ const e = J(t), a = e.$cmpMeta$, s = T("connectedCallback", a.$tagName$);
452
+ e.$flags$ & 1 ? (Ne(t, e, a.$listeners$), $t(e.$lazyInstance$)) : (e.$flags$ |= 1, a.$flags$ & 12 && mt(t), a.$members$ && Object.entries(a.$members$).map(([r, [n]]) => {
453
+ if (n & 31 && t.hasOwnProperty(r)) {
454
+ const i = t[r];
455
+ delete t[r], t[r] = i;
456
456
  }
457
- }), bt(t, e, a)), r();
457
+ }), bt(t, e, a)), s();
458
458
  }
459
459
  }, mt = (t) => {
460
- const e = t["s-cr"] = m.createComment("");
460
+ const e = t["s-cr"] = w.createComment("");
461
461
  e["s-cn"] = !0, t.insertBefore(e, t.firstChild);
462
462
  }, wt = (t) => {
463
- if ((v.$flags$ & 1) === 0) {
464
- const e = X(t);
463
+ if ((b.$flags$ & 1) === 0) {
464
+ const e = J(t);
465
465
  e.$rmListeners$ && (e.$rmListeners$.map((a) => a()), e.$rmListeners$ = void 0);
466
466
  }
467
467
  }, Dt = (t, e) => {
@@ -470,16 +470,16 @@ const h = (t, e, ...a) => {
470
470
  $tagName$: e[1]
471
471
  };
472
472
  a.$members$ = e[2], a.$listeners$ = e[3], a.$watchers$ = t.$watchers$, a.$attrsToReflect$ = [];
473
- const r = t.prototype.connectedCallback, s = t.prototype.disconnectedCallback;
473
+ const s = t.prototype.connectedCallback, r = t.prototype.disconnectedCallback;
474
474
  return Object.assign(t.prototype, {
475
475
  __registerHost() {
476
- Mt(this, a);
476
+ Ct(this, a);
477
477
  },
478
478
  connectedCallback() {
479
- _t(this), r && r.call(this);
479
+ _t(this), s && s.call(this);
480
480
  },
481
481
  disconnectedCallback() {
482
- wt(this), s && s.call(this);
482
+ wt(this), r && r.call(this);
483
483
  },
484
484
  __attachShadow() {
485
485
  this.attachShadow({
@@ -488,41 +488,41 @@ const h = (t, e, ...a) => {
488
488
  });
489
489
  }
490
490
  }), t.is = a.$tagName$, vt(t, a);
491
- }, Ie = (t, e, a, r) => {
492
- a && a.map(([s, n, i]) => {
493
- const o = St(t, s), c = xt(e, i), l = Ct(s);
494
- v.ael(o, n, c, l), (e.$rmListeners$ = e.$rmListeners$ || []).push(() => v.rel(o, n, c, l));
491
+ }, Ne = (t, e, a, s) => {
492
+ a && a.map(([r, n, i]) => {
493
+ const o = St(t, r), c = xt(e, i), l = Mt(r);
494
+ b.ael(o, n, c, l), (e.$rmListeners$ = e.$rmListeners$ || []).push(() => b.rel(o, n, c, l));
495
495
  });
496
496
  }, xt = (t, e) => (a) => {
497
497
  try {
498
- E.lazyLoad || t.$hostElement$[e](a);
499
- } catch (r) {
500
- A(r);
498
+ B.lazyLoad || t.$hostElement$[e](a);
499
+ } catch (s) {
500
+ Y(s);
501
501
  }
502
- }, St = (t, e) => e & 4 ? m : e & 8 ? J : e & 16 ? m.body : t, Ct = (t) => Et ? {
502
+ }, St = (t, e) => e & 4 ? w : e & 8 ? Z : e & 16 ? w.body : t, Mt = (t) => Et ? {
503
503
  passive: (t & 1) !== 0,
504
504
  capture: (t & 2) !== 0
505
- } : (t & 2) !== 0, Ne = /* @__PURE__ */ new WeakMap(), X = (t) => Ne.get(t), Mt = (t, e) => {
505
+ } : (t & 2) !== 0, Ie = /* @__PURE__ */ new WeakMap(), J = (t) => Ie.get(t), Ct = (t, e) => {
506
506
  const a = {
507
507
  $flags$: 0,
508
508
  $hostElement$: t,
509
509
  $cmpMeta$: e,
510
510
  $instanceValues$: /* @__PURE__ */ new Map()
511
511
  };
512
- return Ie(t, a, e.$listeners$), Ne.set(t, a);
513
- }, ye = (t, e) => e in t, A = (t, e) => (0, console.error)(t, e), K = /* @__PURE__ */ new Map(), Tt = [], J = typeof window < "u" ? window : {}, m = J.document || { head: {} }, Lt = J.HTMLElement || class {
514
- }, v = {
512
+ return Ne(t, a, e.$listeners$), Ie.set(t, a);
513
+ }, ke = (t, e) => e in t, Y = (t, e) => (0, console.error)(t, e), K = /* @__PURE__ */ new Map(), Tt = [], Z = typeof window < "u" ? window : {}, w = Z.document || { head: {} }, Lt = Z.HTMLElement || class {
514
+ }, b = {
515
515
  $flags$: 0,
516
516
  $resourcesUrl$: "",
517
517
  jmp: (t) => t(),
518
518
  raf: (t) => requestAnimationFrame(t),
519
- ael: (t, e, a, r) => t.addEventListener(e, a, r),
520
- rel: (t, e, a, r) => t.removeEventListener(e, a, r),
519
+ ael: (t, e, a, s) => t.addEventListener(e, a, s),
520
+ rel: (t, e, a, s) => t.removeEventListener(e, a, s),
521
521
  ce: (t, e) => new CustomEvent(t, e)
522
522
  }, Et = /* @__PURE__ */ (() => {
523
523
  let t = !1;
524
524
  try {
525
- m.addEventListener("e", null, Object.defineProperty({}, "passive", {
525
+ w.addEventListener("e", null, Object.defineProperty({}, "passive", {
526
526
  get() {
527
527
  t = !0;
528
528
  }
@@ -536,48 +536,48 @@ const h = (t, e, ...a) => {
536
536
  } catch {
537
537
  }
538
538
  return !1;
539
- })(), ge = [], Fe = [], Rt = (t, e) => (a) => {
540
- t.push(a), Z || (Z = !0, e && v.$flags$ & 4 ? It(V) : v.raf(V));
541
- }, ke = (t) => {
539
+ })(), ve = [], Fe = [], Rt = (t, e) => (a) => {
540
+ t.push(a), te || (te = !0, e && b.$flags$ & 4 ? Nt(ae) : b.raf(ae));
541
+ }, be = (t) => {
542
542
  for (let e = 0; e < t.length; e++)
543
543
  try {
544
544
  t[e](performance.now());
545
545
  } catch (a) {
546
- A(a);
546
+ Y(a);
547
547
  }
548
548
  t.length = 0;
549
- }, V = () => {
550
- ke(ge), ke(Fe), (Z = ge.length > 0) && v.raf(V);
551
- }, It = (t) => Bt().then(t), Nt = /* @__PURE__ */ Rt(Fe, !0);
552
- function P(t, e) {
549
+ }, ae = () => {
550
+ be(ve), be(Fe), (te = ve.length > 0) && b.raf(ae);
551
+ }, Nt = (t) => Bt().then(t), It = /* @__PURE__ */ Rt(Fe, !0);
552
+ function U(t, e) {
553
553
  const a = new Date(t);
554
554
  return a.setDate(a.getDate() + e), a;
555
555
  }
556
556
  function Ft(t, e, a) {
557
- const r = [], s = re(t), n = s.getDay() === 0 ? 7 : s.getDay(), i = U(t), o = i.getDay() === 0 ? 7 : i.getDay(), c = a === 1 ? 7 : a - 1, l = [], u = [];
557
+ const s = [], r = Q(t), n = r.getDay() === 0 ? 7 : r.getDay(), i = F(t), o = i.getDay() === 0 ? 7 : i.getDay(), c = a === 1 ? 7 : a - 1, l = [], u = [];
558
558
  {
559
- let g = (7 - a + n) % 7, $ = Q(s);
560
- for (; g > 0; )
561
- l.push($), $ = Q($), g -= 1;
559
+ let k = (7 - a + n) % 7, _ = G(r);
560
+ for (; k > 0; )
561
+ l.push(_), _ = G(_), k -= 1;
562
562
  l.reverse();
563
- let T = (7 - o + c) % 7, L = N(i);
564
- for (; T > 0; )
565
- u.push(L), L = N(L), T -= 1;
563
+ let L = (7 - o + c) % 7, E = A(i);
564
+ for (; L > 0; )
565
+ u.push(E), E = A(E), L -= 1;
566
566
  }
567
- let d = s;
567
+ let d = r;
568
568
  for (; d.getMonth() === t.getMonth(); )
569
- r.push(d), d = N(d);
570
- return [...l, ...r, ...u];
569
+ s.push(d), d = A(d);
570
+ return [...l, ...s, ...u];
571
571
  }
572
- function re(t) {
573
- return C(/* @__PURE__ */ new Date(`${String(qe(t)).padStart(4, "0")}-${String(Ae(t)).padStart(2, "0")}-01`));
572
+ function Q(t) {
573
+ return v(/* @__PURE__ */ new Date(`${String(qe(t)).padStart(4, "0")}-${String(Ae(t)).padStart(2, "0")}-01`));
574
574
  }
575
- function S(t) {
575
+ function C(t) {
576
576
  if (t instanceof Date)
577
577
  return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
578
578
  }
579
- function U(t) {
580
- const e = re(t);
579
+ function F(t) {
580
+ const e = Q(t);
581
581
  return e.setMonth(e.getMonth() + 1), e.setDate(e.getDate() - 1), e;
582
582
  }
583
583
  function Ae(t) {
@@ -585,27 +585,27 @@ function Ae(t) {
585
585
  }
586
586
  function At(t) {
587
587
  return new Array(12).fill(void 0).map((e, a) => {
588
- const r = C(/* @__PURE__ */ new Date(`2006-${String(a + 1).padStart(2, "0")}-01`));
588
+ const s = v(/* @__PURE__ */ new Date(`2006-${String(a + 1).padStart(2, "0")}-01`));
589
589
  return Intl.DateTimeFormat(t, {
590
590
  month: "long"
591
- }).format(r);
591
+ }).format(s);
592
592
  });
593
593
  }
594
- function N(t) {
595
- return P(t, 1);
594
+ function A(t) {
595
+ return U(t, 1);
596
596
  }
597
- function ve(t) {
597
+ function V(t) {
598
598
  const e = new Date(t);
599
599
  return e.setDate(1), e.setMonth(e.getMonth() + 1), e;
600
600
  }
601
- function be(t) {
601
+ function $e(t) {
602
602
  const e = new Date(t);
603
603
  return e.setFullYear(e.getFullYear() + 1), e;
604
604
  }
605
- function Q(t) {
605
+ function G(t) {
606
606
  return W(t, 1);
607
607
  }
608
- function $e(t) {
608
+ function ee(t) {
609
609
  const e = new Date(t);
610
610
  return e.setDate(1), e.setMonth(e.getMonth() - 1), e;
611
611
  }
@@ -614,15 +614,15 @@ function _e(t) {
614
614
  return e.setFullYear(e.getFullYear() - 1), e;
615
615
  }
616
616
  function qt(t, e) {
617
- return new Array(7).fill(void 0).map((a, r) => (t + r) % 7 + 1).map((a) => {
618
- const r = C(/* @__PURE__ */ new Date(`2006-01-0${a}`));
617
+ return new Array(7).fill(void 0).map((a, s) => (t + s) % 7 + 1).map((a) => {
618
+ const s = v(/* @__PURE__ */ new Date(`2006-01-0${a}`));
619
619
  return [
620
620
  Intl.DateTimeFormat(e, {
621
621
  weekday: "short"
622
- }).format(r).slice(0, 3),
622
+ }).format(s).slice(0, 3),
623
623
  Intl.DateTimeFormat(e, {
624
624
  weekday: "long"
625
- }).format(r)
625
+ }).format(s)
626
626
  ];
627
627
  });
628
628
  }
@@ -632,13 +632,13 @@ function qe(t) {
632
632
  function me(t, e) {
633
633
  if (!t || !e || !e.from || !e.to)
634
634
  return !1;
635
- const a = e.from < e.to ? e.from : e.to, r = e.from < e.to ? e.to : e.from;
636
- return t >= a && t <= r;
635
+ const a = e.from < e.to ? e.from : e.to, s = e.from < e.to ? e.to : e.from;
636
+ return t >= a && t <= s;
637
637
  }
638
- function w(t, e) {
638
+ function D(t, e) {
639
639
  return !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
640
640
  }
641
- function C(t) {
641
+ function v(t) {
642
642
  const e = new Date(t);
643
643
  return e.setMinutes(e.getMinutes() + e.getTimezoneOffset()), e;
644
644
  }
@@ -658,47 +658,47 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
658
658
  yearSelect: "Select year"
659
659
  }, Ut = /* @__PURE__ */ Dt(class extends Lt {
660
660
  constructor() {
661
- super(), this.__registerHost(), this.selectDate = le(this, "selectDate"), this.changeMonth = le(this, "changeMonth"), this.disabled = !1, this.disableDate = () => !1, this.elementClassName = "wc-datepicker", this.firstDayOfWeek = 0, this.labels = Pt, this.locale = navigator?.language || "en-US", this.showClearButton = !1, this.showMonthStepper = !0, this.showTodayButton = !1, this.showYearStepper = !1, this.startDate = S(/* @__PURE__ */ new Date()), this.maxSearchDays = 365, this.goToRangeStartOnSelect = !0, this.init = () => {
662
- this.currentDate = this.startDate ? C(new Date(this.startDate)) : /* @__PURE__ */ new Date(), this.updateWeekdays();
661
+ super(), this.__registerHost(), this.selectDate = ue(this, "selectDate"), this.changeMonth = ue(this, "changeMonth"), this.disabled = !1, this.disableDate = () => !1, this.elementClassName = "wc-datepicker", this.firstDayOfWeek = 0, this.goToRangeStartOnSelect = !0, this.labels = Pt, this.locale = navigator?.language || "en-US", this.maxSearchDays = 365, this.showClearButton = !1, this.showMonthStepper = !0, this.showTodayButton = !1, this.showYearStepper = !1, this.startDate = C(/* @__PURE__ */ new Date()), this.pendingClick = !1, this.init = () => {
662
+ this.currentDate = this.startDate ? v(new Date(this.startDate)) : /* @__PURE__ */ new Date(), this.updateWeekdays(), this.handleMinDate(), this.handleMaxDate();
663
663
  }, this.getAvailableDate = (t, e) => {
664
- let a, r = !1;
664
+ let a, s = !1;
665
665
  switch (e) {
666
666
  case "previousDay":
667
- a = Q(t);
667
+ a = G(t);
668
668
  break;
669
669
  case "nextDay":
670
- a = N(t);
670
+ a = A(t);
671
671
  break;
672
672
  case "previousSameWeekDay":
673
673
  a = W(t, 7);
674
674
  break;
675
675
  case "nextSameWeekDay":
676
- a = P(t, 7);
676
+ a = U(t, 7);
677
677
  break;
678
678
  case "firstOfMonth":
679
- a = re(t);
679
+ a = Q(t);
680
680
  break;
681
681
  case "lastOfMonth":
682
- a = U(t);
682
+ a = F(t);
683
683
  break;
684
684
  case "previousMonth":
685
- a = $e(t);
685
+ a = ee(t);
686
686
  break;
687
687
  case "nextMonth":
688
- a = ve(t);
688
+ a = V(t);
689
689
  break;
690
690
  case "previousYear":
691
691
  a = _e(t);
692
692
  break;
693
693
  case "nextYear":
694
- a = be(t);
694
+ a = $e(t);
695
695
  break;
696
696
  }
697
- for (; this.disableDate(a) && !r; ) {
697
+ for (; this.disableDate(a) && !s; ) {
698
698
  switch (e) {
699
699
  case "previousDay":
700
700
  case "lastOfMonth":
701
- a = Q(a);
701
+ a = G(a);
702
702
  break;
703
703
  case "nextDay":
704
704
  case "firstOfMonth":
@@ -706,13 +706,13 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
706
706
  case "nextMonth":
707
707
  case "previousYear":
708
708
  case "nextYear":
709
- a = N(a);
709
+ a = A(a);
710
710
  break;
711
711
  case "previousSameWeekDay":
712
712
  a = W(a, 7);
713
713
  break;
714
714
  case "nextSameWeekDay":
715
- a = P(a, 7);
715
+ a = U(a, 7);
716
716
  break;
717
717
  }
718
718
  switch (e) {
@@ -720,29 +720,29 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
720
720
  case "lastOfMonth":
721
721
  case "previousYear":
722
722
  case "nextYear":
723
- r = a.getMonth() !== t.getMonth();
723
+ s = a.getMonth() !== t.getMonth();
724
724
  break;
725
725
  case "previousMonth":
726
- r = a.getMonth() !== t.getMonth() - 1;
726
+ s = a.getMonth() !== t.getMonth() - 1;
727
727
  break;
728
728
  case "nextMonth":
729
- r = a.getMonth() !== t.getMonth() + 1;
729
+ s = a.getMonth() !== t.getMonth() + 1;
730
730
  break;
731
731
  default:
732
- r = !me(a, {
732
+ s = !me(a, {
733
733
  from: W(t, this.maxSearchDays),
734
- to: P(t, this.maxSearchDays)
734
+ to: U(t, this.maxSearchDays)
735
735
  });
736
736
  break;
737
737
  }
738
738
  }
739
- return r ? t : a;
739
+ return s ? t : a;
740
740
  }, this.nextMonth = () => {
741
- this.updateCurrentDate(ve(this.currentDate));
741
+ this.updateCurrentDate(V(this.currentDate));
742
742
  }, this.nextYear = () => {
743
- this.updateCurrentDate(be(this.currentDate));
744
- }, this.previousMonth = () => {
745
743
  this.updateCurrentDate($e(this.currentDate));
744
+ }, this.previousMonth = () => {
745
+ this.updateCurrentDate(ee(this.currentDate));
746
746
  }, this.previousYear = () => {
747
747
  this.updateCurrentDate(_e(this.currentDate));
748
748
  }, this.showToday = () => {
@@ -752,34 +752,39 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
752
752
  }, this.onClick = (t) => {
753
753
  if (this.disabled)
754
754
  return;
755
+ this.pendingClick = !1;
755
756
  const e = t.target.closest("[data-date]");
756
757
  if (!e)
757
758
  return;
758
- const a = C(new Date(e.dataset.date));
759
- this.updateCurrentDate(a), this.onSelectDate(a);
759
+ const a = v(new Date(e.dataset.date));
760
+ this.isDateDisabled(a) || (this.updateCurrentDate(a), this.onSelectDate(a));
760
761
  }, this.onMonthSelect = (t) => {
761
- const e = +t.target.value - 1, a = this.currentDate.getDate(), r = new Date(this.currentDate.getFullYear(), e, 1), s = U(r).getDate(), n = Math.min(a, s), i = new Date(this.currentDate.getFullYear(), e, n);
762
+ const e = +t.target.value - 1, a = this.currentDate.getDate(), s = new Date(this.currentDate.getFullYear(), e, 1), r = F(s).getDate(), n = Math.min(a, r), i = new Date(this.currentDate.getFullYear(), e, n);
762
763
  this.updateCurrentDate(i);
763
764
  }, this.onYearSelect = (t) => {
764
765
  let e = +t.target.value;
765
766
  const a = t.target;
766
767
  isNaN(e) ? (e = (/* @__PURE__ */ new Date()).getFullYear(), a.value = String(e)) : e < 0 ? (e = 0, a.value = String(e)) : e > 9999 && (e = 9999, a.value = String(e));
767
- const r = this.currentDate.getDate(), s = this.currentDate.getMonth(), n = /* @__PURE__ */ new Date();
768
- n.setFullYear(e, s, 1);
769
- const i = U(n).getDate(), o = Math.min(r, i), c = /* @__PURE__ */ new Date();
770
- c.setFullYear(e, s, o), this.updateCurrentDate(c);
768
+ const s = this.currentDate.getDate(), r = this.currentDate.getMonth(), n = /* @__PURE__ */ new Date();
769
+ n.setFullYear(e, r, 1);
770
+ const i = F(n).getDate(), o = Math.min(s, i), c = /* @__PURE__ */ new Date();
771
+ c.setFullYear(e, r, o), this.updateCurrentDate(c);
771
772
  }, this.onKeyDown = (t) => {
772
- this.disabled || (t.code === "ArrowLeft" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousDay"), !0)) : t.code === "ArrowRight" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextDay"), !0)) : t.code === "ArrowUp" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousSameWeekDay"), !0)) : t.code === "ArrowDown" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextSameWeekDay"), !0)) : t.code === "PageUp" ? (t.preventDefault(), t.shiftKey ? this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousYear"), !0) : this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousMonth"), !0)) : t.code === "PageDown" ? (t.preventDefault(), t.shiftKey ? this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextYear"), !0) : this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextMonth"), !0)) : t.code === "Home" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "firstOfMonth"), !0)) : t.code === "End" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "lastOfMonth"), !0)) : (t.code === "Space" || t.code === "Enter") && (t.preventDefault(), this.onSelectDate(this.currentDate)));
773
+ this.disabled || (t.code === "ArrowLeft" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousDay"), !0)) : t.code === "ArrowRight" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextDay"), !0)) : t.code === "ArrowUp" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousSameWeekDay"), !0)) : t.code === "ArrowDown" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextSameWeekDay"), !0)) : t.code === "PageUp" ? (t.preventDefault(), t.shiftKey ? this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousYear"), !0) : this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousMonth"), !0)) : t.code === "PageDown" ? (t.preventDefault(), t.shiftKey ? this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextYear"), !0) : this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextMonth"), !0)) : t.code === "Home" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "firstOfMonth"), !0)) : t.code === "End" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "lastOfMonth"), !0)) : (t.code === "Space" || t.code === "Enter") && (t.preventDefault(), this.isDateDisabled(this.currentDate) || this.onSelectDate(this.currentDate)));
773
774
  }, this.onMouseEnter = (t) => {
774
775
  if (this.disabled)
775
776
  return;
776
- const e = C(new Date(t.target.closest("td").dataset.date));
777
+ const e = v(new Date(t.target.closest("td").dataset.date));
777
778
  this.hoveredDate = e;
778
779
  }, this.onMouseLeave = () => {
779
780
  this.hoveredDate = void 0;
781
+ }, this.onMouseDown = () => {
782
+ this.pendingClick = !0;
780
783
  }, this.onFocus = (t) => {
781
- const e = new Date(t.target.dataset.date);
782
- w(e, this.currentDate) || this.updateCurrentDate(e);
784
+ if (this.pendingClick)
785
+ return;
786
+ const e = v(new Date(t.target.dataset.date));
787
+ D(e, this.currentDate) || this.updateCurrentDate(e);
783
788
  };
784
789
  }
785
790
  componentWillLoad() {
@@ -795,11 +800,17 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
795
800
  this.value = void 0, this.selectDate.emit(void 0);
796
801
  }
797
802
  watchStartDate() {
798
- this.currentDate = this.startDate ? C(new Date(this.startDate)) : /* @__PURE__ */ new Date();
803
+ this.currentDate = this.startDate ? v(new Date(this.startDate)) : /* @__PURE__ */ new Date();
799
804
  }
800
805
  watchValue() {
801
806
  this.value && (Array.isArray(this.value) ? this.currentDate = this.value.length > 1 && !this.goToRangeStartOnSelect ? this.value[1] : this.value[0] : this.value instanceof Date && (this.currentDate = this.value));
802
807
  }
808
+ handleMinDate() {
809
+ this.minDate && this.currentDate < v(new Date(this.minDate)) && (this.currentDate = v(new Date(this.minDate)));
810
+ }
811
+ handleMaxDate() {
812
+ this.maxDate && this.currentDate > v(new Date(this.maxDate)) && (this.currentDate = v(new Date(this.maxDate)));
813
+ }
803
814
  componentDidRender() {
804
815
  this.moveFocusAfterMonthChanged && (this.focusDate(this.currentDate), this.moveFocusAfterMonthChanged = !1);
805
816
  }
@@ -812,8 +823,8 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
812
823
  getCalendarRows() {
813
824
  const t = Ft(this.currentDate, !0, this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek), e = [];
814
825
  for (let a = 0; a < t.length; a += 7) {
815
- const r = t.slice(a, a + 7);
816
- e.push(r);
826
+ const s = t.slice(a, a + 7);
827
+ e.push(s);
817
828
  }
818
829
  return e;
819
830
  }
@@ -839,13 +850,13 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
839
850
  }
840
851
  focusDate(t) {
841
852
  var e;
842
- (e = this.el.querySelector(`[data-date="${S(t)}"]`)) === null || e === void 0 || e.focus();
853
+ (e = this.el.querySelector(`[data-date="${C(t)}"]`)) === null || e === void 0 || e.focus();
843
854
  }
844
855
  updateCurrentDate(t, e) {
845
- const a = t.getMonth(), r = t.getFullYear();
846
- if (r > 9999 || r < 0)
856
+ const a = t.getMonth(), s = t.getFullYear();
857
+ if (s > 9999 || s < 0)
847
858
  return;
848
- (a !== this.currentDate.getMonth() || r !== this.currentDate.getFullYear()) && (this.changeMonth.emit({
859
+ (a !== this.currentDate.getMonth() || s !== this.currentDate.getFullYear()) && (this.changeMonth.emit({
849
860
  month: Ae(t),
850
861
  year: qe(t),
851
862
  day: t.getDate()
@@ -853,53 +864,77 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
853
864
  }
854
865
  onSelectDate(t) {
855
866
  var e, a;
856
- if (!this.disableDate(t))
867
+ if (!this.isDateDisabled(t))
857
868
  if (this.isRangeValue(this.value)) {
858
- const r = ((e = this.value) === null || e === void 0 ? void 0 : e[0]) === void 0 || this.value.length === 2 ? [t] : [this.value[0], t];
859
- r.length === 2 && r[0] > r[1] && r.reverse();
860
- const s = r[1] === void 0 ? [S(r[0])] : [S(r[0]), S(r[1])];
861
- this.value = r, this.selectDate.emit(s);
869
+ const s = ((e = this.value) === null || e === void 0 ? void 0 : e[0]) === void 0 || this.value.length === 2 ? [t] : [this.value[0], t];
870
+ s.length === 2 && s[0] > s[1] && s.reverse();
871
+ const r = s[1] === void 0 ? [C(s[0])] : [C(s[0]), C(s[1])];
872
+ this.value = s, this.selectDate.emit(r);
862
873
  } else {
863
874
  if (((a = this.value) === null || a === void 0 ? void 0 : a.getTime()) === t.getTime())
864
875
  return;
865
- this.value = t, this.selectDate.emit(S(t));
876
+ this.value = t, this.selectDate.emit(C(t));
866
877
  }
867
878
  }
868
879
  // @ts-ignore
869
880
  isRangeValue(t) {
870
881
  return this.range;
871
882
  }
883
+ get isPreviousMonthDisabled() {
884
+ if (!this.minDate)
885
+ return !1;
886
+ const t = ee(this.currentDate), e = v(new Date(this.minDate));
887
+ return F(t) < e;
888
+ }
889
+ get isNextMonthDisabled() {
890
+ if (!this.maxDate)
891
+ return !1;
892
+ const t = V(this.currentDate), e = v(new Date(this.maxDate));
893
+ return Q(t) > e;
894
+ }
895
+ isDateDisabled(t) {
896
+ if (this.disableDate(t))
897
+ return !0;
898
+ const e = this.minDate && t < v(new Date(this.minDate)), a = this.maxDate && t > v(new Date(this.maxDate));
899
+ return !!(e || a);
900
+ }
872
901
  render() {
873
902
  const t = this.showTodayButton || this.showClearButton;
874
903
  return h(xe, null, h("div", { "aria-disabled": String(this.disabled), "aria-label": this.labels.picker, class: {
875
904
  [this.getClassName()]: !0,
876
905
  [`${this.getClassName()}--disabled`]: this.disabled
877
- }, role: "group" }, h("div", { class: this.getClassName("header") }, h("span", { "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle()), this.showYearStepper && h("button", { "aria-label": this.labels.previousYearButton, class: this.getClassName("previous-year-button"), disabled: this.disabled, innerHTML: this.previousYearButtonContent || void 0, onClick: this.previousYear, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "11 17 6 12 11 7" }), h("polyline", { points: "18 17 13 12 18 7" }))), this.showMonthStepper && h("button", { "aria-label": this.labels.previousMonthButton, class: this.getClassName("previous-month-button"), disabled: this.disabled, innerHTML: this.previousMonthButtonContent || void 0, onClick: this.previousMonth, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "15 18 9 12 15 6" }))), h("span", { class: this.getClassName("current-month") }, h("select", { title: this.labels.monthSelect, "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), disabled: this.disabled, name: "month", onChange: this.onMonthSelect }, At(this.locale).map((e, a) => h("option", { key: e, selected: this.currentDate.getMonth() === a, value: a + 1 }, e))), h("input", { title: this.labels.yearSelect, "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), disabled: this.disabled, max: 9999, maxLength: 4, min: 1, name: "year", onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && h("button", { "aria-label": this.labels.nextMonthButton, class: this.getClassName("next-month-button"), disabled: this.disabled, innerHTML: this.nextMonthButtonContent || void 0, onClick: this.nextMonth, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "9 18 15 12 9 6" }))), this.showYearStepper && h("button", { "aria-label": this.labels.nextYearButton, class: this.getClassName("next-year-button"), disabled: this.disabled, innerHTML: this.nextYearButtonContent || void 0, onClick: this.nextYear, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "13 17 18 12 13 7" }), h("polyline", { points: "6 17 11 12 6 7" })))), h("div", { class: this.getClassName("body") }, h("table", { class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid" }, h("thead", { class: this.getClassName("calendar-header") }, h("tr", { class: this.getClassName("weekday-row") }, this.weekdays.map((e) => h("th", { "aria-label": e[1], abbr: e[1], class: this.getClassName("weekday"), key: e[0], scope: "col" }, h("span", null, e[0]))))), h("tbody", null, this.getCalendarRows().map((e) => {
906
+ }, role: "group" }, h("div", { class: this.getClassName("header") }, h("span", { "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle()), this.showYearStepper && h("button", { "aria-label": this.labels.previousYearButton, class: this.getClassName("previous-year-button"), disabled: this.disabled, innerHTML: this.previousYearButtonContent || void 0, onClick: this.previousYear, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "11 17 6 12 11 7" }), h("polyline", { points: "18 17 13 12 18 7" }))), this.showMonthStepper && h("button", { "aria-label": this.labels.previousMonthButton, class: {
907
+ [this.getClassName("previous-month-button")]: !0,
908
+ [this.getClassName("next-month-button--disabled")]: this.isPreviousMonthDisabled
909
+ }, disabled: this.disabled || this.isPreviousMonthDisabled, innerHTML: this.previousMonthButtonContent || void 0, onClick: this.previousMonth, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "15 18 9 12 15 6" }))), h("span", { class: this.getClassName("current-month") }, h("select", { title: this.labels.monthSelect, "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), disabled: this.disabled, onChange: this.onMonthSelect }, At(this.locale).map((e, a) => h("option", { key: e, selected: this.currentDate.getMonth() === a, value: a + 1 }, e))), h("input", { title: this.labels.yearSelect, "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), disabled: this.disabled, max: 9999, maxLength: 4, min: 1, onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && h("button", { "aria-label": this.labels.nextMonthButton, class: {
910
+ [this.getClassName("next-month-button")]: !0,
911
+ [this.getClassName("next-month-button--disabled")]: this.isNextMonthDisabled
912
+ }, disabled: this.disabled || this.isNextMonthDisabled, innerHTML: this.nextMonthButtonContent || void 0, onClick: this.nextMonth, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "9 18 15 12 9 6" }))), this.showYearStepper && h("button", { "aria-label": this.labels.nextYearButton, class: this.getClassName("next-year-button"), disabled: this.disabled, innerHTML: this.nextYearButtonContent || void 0, onClick: this.nextYear, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "13 17 18 12 13 7" }), h("polyline", { points: "6 17 11 12 6 7" })))), h("div", { class: this.getClassName("body") }, h("table", { class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid" }, h("thead", { class: this.getClassName("calendar-header") }, h("tr", { class: this.getClassName("weekday-row") }, this.weekdays.map((e) => h("th", { "aria-label": e[1], abbr: e[1], class: this.getClassName("weekday"), key: e[0], scope: "col" }, h("span", null, e[0]))))), h("tbody", null, this.getCalendarRows().map((e) => {
878
913
  const a = `row-${e[0].getMonth()}-${e[0].getDate()}`;
879
- return h("tr", { class: this.getClassName("calendar-row"), key: a }, e.map((r) => {
880
- var s, n, i, o, c;
881
- const l = w(r, this.currentDate), u = r.getMonth() !== this.currentDate.getMonth(), d = Array.isArray(this.value) ? w(r, this.value[0]) || w(r, this.value[1]) : w(r, this.value), p = this.isRangeValue ? me(r, {
882
- from: (s = this.value) === null || s === void 0 ? void 0 : s[0],
914
+ return h("tr", { class: this.getClassName("calendar-row"), key: a }, e.map((s) => {
915
+ var r, n, i, o, c;
916
+ const l = D(s, this.currentDate), u = s.getMonth() !== this.currentDate.getMonth(), d = Array.isArray(this.value) ? D(s, this.value[0]) || D(s, this.value[1]) : D(s, this.value), p = this.isRangeValue ? me(s, {
917
+ from: (r = this.value) === null || r === void 0 ? void 0 : r[0],
883
918
  to: ((n = this.value) === null || n === void 0 ? void 0 : n[1]) || this.hoveredDate || this.currentDate
884
- }) : !1, g = !((i = this.value) === null || i === void 0) && i[0] ? [
919
+ }) : !1, k = !((i = this.value) === null || i === void 0) && i[0] ? [
885
920
  (o = this.value) === null || o === void 0 ? void 0 : o[0],
886
921
  ((c = this.value) === null || c === void 0 ? void 0 : c[1]) || this.hoveredDate
887
- ].sort((We, ze) => We - ze) : [], $ = this.range && w(g[0], r), x = this.range && w(g[1], r), T = w(r, /* @__PURE__ */ new Date()), L = this.disableDate(r), Ye = `cell-${r.getMonth()}-${r.getDate()}`, Pe = {
922
+ ].sort((We, ze) => We - ze) : [], _ = this.range && D(k[0], s), S = this.range && D(k[1], s), L = D(s, /* @__PURE__ */ new Date()), E = this.isDateDisabled(s), Ye = `cell-${s.getMonth()}-${s.getDate()}`, Pe = {
888
923
  [this.getClassName("date")]: !0,
889
924
  [this.getClassName("date--current")]: l,
890
- [this.getClassName("date--disabled")]: L,
925
+ [this.getClassName("date--disabled")]: E,
891
926
  [this.getClassName("date--overflowing")]: u,
892
- [this.getClassName("date--today")]: T,
927
+ [this.getClassName("date--today")]: L,
893
928
  [this.getClassName("date--selected")]: d,
894
929
  [this.getClassName("date--in-range")]: p,
895
- [this.getClassName("date--start")]: $,
896
- [this.getClassName("date--end")]: x
897
- }, Ue = d ? "strong" : T ? "em" : "span";
898
- return h("td", { "aria-disabled": String(L), "aria-selected": d ? "true" : void 0, "aria-current": T ? "date" : d ? "true" : void 0, class: Pe, "data-date": S(r), key: Ye, onClick: this.onClick, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onFocus: this.onFocus, role: "gridcell", tabIndex: w(r, this.currentDate) && !this.disabled ? 0 : -1 }, h(Ue, { "aria-hidden": "true" }, r.getDate()), h("span", { class: "visually-hidden" }, Intl.DateTimeFormat(this.locale, {
930
+ [this.getClassName("date--start")]: _,
931
+ [this.getClassName("date--end")]: S
932
+ }, Ue = d ? "strong" : L ? "em" : "span";
933
+ return h("td", { "aria-disabled": String(E), "aria-selected": d ? "true" : void 0, "aria-current": L ? "date" : d ? "true" : void 0, class: Pe, "data-date": C(s), key: Ye, onClick: this.onClick, onMouseDown: this.onMouseDown, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onFocus: this.onFocus, role: "gridcell", tabIndex: D(s, this.currentDate) && !this.disabled ? 0 : -1 }, h(Ue, { "aria-hidden": "true" }, s.getDate()), h("span", { class: "visually-hidden" }, Intl.DateTimeFormat(this.locale, {
899
934
  day: "numeric",
900
935
  month: "long",
901
936
  year: "numeric"
902
- }).format(r)));
937
+ }).format(s)));
903
938
  }));
904
939
  })))), t && h("div", { class: this.getClassName("footer") }, this.showTodayButton && h("button", { class: this.getClassName("today-button"), disabled: this.disabled, innerHTML: this.todayButtonContent || void 0, onClick: this.showToday, type: "button" }, this.labels.todayButton), this.showClearButton && h("button", { class: this.getClassName("clear-button"), disabled: this.disabled, innerHTML: this.clearButtonContent || void 0, onClick: this.clear, type: "button" }, this.labels.clearButton))));
905
940
  }
@@ -912,7 +947,9 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
912
947
  locale: ["watchLocale"],
913
948
  range: ["watchRange"],
914
949
  startDate: ["watchStartDate"],
915
- value: ["watchValue"]
950
+ value: ["watchValue"],
951
+ minDate: ["handleMinDate"],
952
+ maxDate: ["handleMaxDate"]
916
953
  };
917
954
  }
918
955
  static get style() {
@@ -924,9 +961,13 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
924
961
  disableDate: [16],
925
962
  elementClassName: [1, "element-class-name"],
926
963
  firstDayOfWeek: [2, "first-day-of-week"],
964
+ goToRangeStartOnSelect: [4, "go-to-range-start-on-select"],
927
965
  range: [4],
928
966
  labels: [16],
929
967
  locale: [1],
968
+ maxDate: [1, "max-date"],
969
+ maxSearchDays: [2, "max-search-days"],
970
+ minDate: [1, "min-date"],
930
971
  nextMonthButtonContent: [1, "next-month-button-content"],
931
972
  nextYearButtonContent: [1, "next-year-button-content"],
932
973
  previousMonthButtonContent: [1, "previous-month-button-content"],
@@ -938,24 +979,22 @@ const Yt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
938
979
  startDate: [1, "start-date"],
939
980
  todayButtonContent: [1, "today-button-content"],
940
981
  value: [1040],
941
- maxSearchDays: [2, "max-search-days"],
942
- goToRangeStartOnSelect: [4, "go-to-range-start-on-select"],
943
982
  currentDate: [32],
944
983
  hoveredDate: [32],
945
984
  weekdays: [32]
946
985
  }]), Wt = Ut;
947
- var zt = Object.defineProperty, y = (t, e, a, r) => {
948
- for (var s = void 0, n = t.length - 1, i; n >= 0; n--)
949
- (i = t[n]) && (s = i(e, a, s) || s);
950
- return s && zt(e, a, s), s;
986
+ var zt = Object.defineProperty, y = (t, e, a, s) => {
987
+ for (var r = void 0, n = t.length - 1, i; n >= 0; n--)
988
+ (i = t[n]) && (r = i(e, a, r) || r);
989
+ return r && zt(e, a, r), r;
951
990
  };
952
991
  customElements.get("wc-datepicker") || customElements.define("wc-datepicker", Wt);
953
992
  let jt = 0;
954
- var D;
955
- const f = (D = class extends se {
993
+ var x;
994
+ const f = (x = class extends ie {
956
995
  // allows use of elementInternals' API
957
996
  constructor() {
958
- super(), this.id = "", this.name = "", this.width = "md", this.hideTodayButton = !1, this.hideClearButton = !1, this.disabled = !1, this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.form = null, this.tooltip = "", this.type = "date", this.label = "", this.description = "", this.startDate = "", this.inverted = !1, this.value = void 0, this.datepickerIsOpen = !1, this._hasUserInteracted = !1, this._onKeydownEsc = (e) => {
997
+ super(), this.id = "", this.name = "", this.width = "md", this.hideTodayButton = !1, this.hideClearButton = !1, this.disabled = !1, this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.form = null, this.tooltip = "", this.type = "date", this.label = "", this.description = "", this.startDate = "", this.minDate = "", this.maxDate = "", this.inverted = !1, this.value = void 0, this.datepickerIsOpen = !1, this._hasUserInteracted = !1, this._onKeydownEsc = (e) => {
959
998
  if (e.key !== "Escape" || e.code !== "Escape" || !this.datepickerIsOpen) return;
960
999
  e.preventDefault(), e.stopPropagation(), this.shadowRoot?.querySelector("wc-datepicker")?.classList.remove("active"), this.datepickerIsOpen = !1, this.removeEventListener("keydown", this._handleFocusTrap), this.shadowRoot?.querySelector("input")?.focus();
961
1000
  }, this._internals = this.attachInternals();
@@ -995,14 +1034,14 @@ const f = (D = class extends se {
995
1034
  this.value = void 0, this._internals.setFormValue(""), this._manageRequire();
996
1035
  return;
997
1036
  }
998
- const a = e instanceof Date ? e : this._parseLocalDate(e), r = [
1037
+ const a = e instanceof Date ? e : this._parseLocalDate(e), s = [
999
1038
  a.getFullYear(),
1000
1039
  String(a.getMonth() + 1).padStart(2, "0"),
1001
1040
  String(a.getDate()).padStart(2, "0")
1002
1041
  ].join("-");
1003
- this.value = a, this._internals.setFormValue(r);
1004
- const s = this.shadowRoot?.querySelector("input");
1005
- s && (s.value = r);
1042
+ this.value = a, this._internals.setFormValue(s);
1043
+ const r = this.shadowRoot?.querySelector("input");
1044
+ r && (r.value = s);
1006
1045
  const n = this.shadowRoot?.querySelector("wc-datepicker");
1007
1046
  n && (n.value = a), this._manageRequire();
1008
1047
  }
@@ -1051,8 +1090,8 @@ const f = (D = class extends se {
1051
1090
  e.preventDefault(), this._hasUserInteracted = !0, this._validate();
1052
1091
  const a = this.shadowRoot?.querySelector("input");
1053
1092
  if (a) {
1054
- const r = this._internals.form;
1055
- r ? Array.from(r.elements).find(
1093
+ const s = this._internals.form;
1094
+ s ? Array.from(s.elements).find(
1056
1095
  (i) => typeof i.checkValidity == "function" && !i.checkValidity()
1057
1096
  ) === this && a.focus() : a.focus();
1058
1097
  }
@@ -1070,10 +1109,10 @@ const f = (D = class extends se {
1070
1109
  if (!e) return;
1071
1110
  const a = e.querySelector(
1072
1111
  ".wc-datepicker__next-month-button"
1073
- ), r = e.querySelector(
1112
+ ), s = e.querySelector(
1074
1113
  ".wc-datepicker__previous-month-button"
1075
1114
  );
1076
- !a || !r || (r.innerHTML = `
1115
+ !a || !s || (s.innerHTML = `
1077
1116
  <nys-icon name="arrow_back" size="18"></nys-icon>
1078
1117
  `, a.innerHTML = `
1079
1118
  <nys-icon name="arrow_forward" size="18"></nys-icon>
@@ -1086,16 +1125,16 @@ const f = (D = class extends se {
1086
1125
  ".wc-datepicker__month-select"
1087
1126
  );
1088
1127
  if (a && !a.parentElement?.classList.contains("month-wrapper")) {
1089
- const r = document.createElement("span");
1090
- r.className = "month-wrapper", a.parentNode?.insertBefore(r, a), r.appendChild(a);
1091
- const s = document.createElement("nys-icon");
1092
- s.setAttribute("name", "chevron_down"), s.setAttribute("id", "wc-month-dropdown-icon"), s.setAttribute("size", "20"), r.appendChild(s);
1128
+ const s = document.createElement("span");
1129
+ s.className = "month-wrapper", a.parentNode?.insertBefore(s, a), s.appendChild(a);
1130
+ const r = document.createElement("nys-icon");
1131
+ r.setAttribute("name", "chevron_down"), r.setAttribute("id", "wc-month-dropdown-icon"), r.setAttribute("size", "20"), s.appendChild(r);
1093
1132
  }
1094
1133
  }
1095
1134
  // Creates a Date at local midnight to avoid UTC timezone shifting
1096
1135
  _parseLocalDate(e) {
1097
- const [a, r, s] = e.split("-").map(Number);
1098
- return new Date(a, r - 1, s);
1136
+ const [a, s, r] = e.split("-").map(Number);
1137
+ return new Date(a, s - 1, r);
1099
1138
  }
1100
1139
  _setTodayDate() {
1101
1140
  const e = /* @__PURE__ */ new Date();
@@ -1104,17 +1143,28 @@ const f = (D = class extends se {
1104
1143
  async _setFocusOnTodayDate(e = !1) {
1105
1144
  const a = /* @__PURE__ */ new Date();
1106
1145
  a.setHours(0, 0, 0, 0);
1107
- const r = [
1146
+ const s = [
1108
1147
  a.getFullYear(),
1109
1148
  String(a.getMonth() + 1).padStart(2, "0"),
1110
1149
  String(a.getDate()).padStart(2, "0")
1111
- ].join("-"), s = this.shadowRoot?.querySelector("wc-datepicker");
1112
- if (!s) return;
1113
- const n = s.querySelector(
1114
- `td[data-date="${r}"]`
1150
+ ].join("-"), r = this.shadowRoot?.querySelector("wc-datepicker");
1151
+ if (!r) return;
1152
+ const n = r.querySelector(
1153
+ `td[data-date="${s}"]`
1115
1154
  );
1116
1155
  n && (e || n.focus());
1117
1156
  }
1157
+ _isOutOfRange(e) {
1158
+ if (this.minDate) {
1159
+ const a = this._parseLocalDate(this.minDate);
1160
+ if (e < a) return !0;
1161
+ }
1162
+ if (this.maxDate) {
1163
+ const a = this._parseLocalDate(this.maxDate);
1164
+ if (e > a) return !0;
1165
+ }
1166
+ return !1;
1167
+ }
1118
1168
  _dispatchInputEvent() {
1119
1169
  this.dispatchEvent(
1120
1170
  new CustomEvent("nys-input", {
@@ -1142,22 +1192,22 @@ const f = (D = class extends se {
1142
1192
  _onDocumentClick() {
1143
1193
  if (this._shouldUseNativeDatepicker()) return;
1144
1194
  const e = (a) => {
1145
- const r = a.composedPath(), s = this.shadowRoot?.querySelector(
1195
+ const s = a.composedPath(), r = this.shadowRoot?.querySelector(
1146
1196
  ".nys-datepicker--input-container"
1147
1197
  ), n = this.shadowRoot?.querySelector(
1148
1198
  ".wc-datepicker--container"
1149
1199
  ), i = this.shadowRoot?.querySelector("wc-datepicker");
1150
- s && r.includes(s) || n && r.includes(n) || i && r.includes(i) || i?.classList.remove("active");
1200
+ r && s.includes(r) || n && s.includes(n) || i && s.includes(i) || i?.classList.remove("active");
1151
1201
  };
1152
1202
  document.addEventListener("click", e);
1153
1203
  }
1154
1204
  _toggleDatepicker() {
1155
1205
  if (this.disabled) return;
1156
1206
  if (this._shouldUseNativeDatepicker()) {
1157
- const r = this.shadowRoot?.querySelector(
1207
+ const s = this.shadowRoot?.querySelector(
1158
1208
  "input"
1159
1209
  );
1160
- r && r.focus();
1210
+ s && s.focus();
1161
1211
  return;
1162
1212
  }
1163
1213
  const a = this.shadowRoot?.querySelector("wc-datepicker")?.classList.toggle("active");
@@ -1171,8 +1221,12 @@ const f = (D = class extends se {
1171
1221
  _handleDateChange() {
1172
1222
  const e = this.shadowRoot?.querySelector("wc-datepicker");
1173
1223
  e && e.addEventListener("selectDate", (a) => {
1174
- const r = a.detail, s = this._parseLocalDate(r);
1175
- this._setValue(s), this._validate(), this._dispatchInputEvent(), e.classList.remove("active"), this.datepickerIsOpen = !1, this.removeEventListener("keydown", this._handleFocusTrap);
1224
+ const s = a.detail, r = this._parseLocalDate(s);
1225
+ if (this._isOutOfRange(r)) {
1226
+ e.classList.add("active");
1227
+ return;
1228
+ }
1229
+ this._setValue(r), this._validate(), this._dispatchInputEvent(), e.classList.remove("active"), this.datepickerIsOpen = !1, this.removeEventListener("keydown", this._handleFocusTrap);
1176
1230
  });
1177
1231
  }
1178
1232
  _handleTodayClick() {
@@ -1187,16 +1241,16 @@ const f = (D = class extends se {
1187
1241
  _handleInputChange(e) {
1188
1242
  const a = e.target;
1189
1243
  if (!a) return;
1190
- const r = this._getValidDateFromInput(a.value);
1191
- if (!r) {
1244
+ const s = this._getValidDateFromInput(a.value);
1245
+ if (!s) {
1192
1246
  a.value || (this.value = void 0, this._internals.setFormValue(""), this._hasUserInteracted && this._validate());
1193
1247
  return;
1194
1248
  }
1195
- this._setValue(r), this._hasUserInteracted && this._validate(), this._dispatchInputEvent();
1249
+ this._setValue(s), this._hasUserInteracted && this._validate(), this._dispatchInputEvent();
1196
1250
  }
1197
1251
  _getValidDateFromInput(e) {
1198
- const r = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
1199
- return !r || Number(r[1]) < 1e3 ? null : this._parseLocalDate(e);
1252
+ const s = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
1253
+ return !s || Number(s[1]) < 1e3 ? null : this._parseLocalDate(e);
1200
1254
  }
1201
1255
  _handleFocusTrap(e) {
1202
1256
  if (!this.datepickerIsOpen || e.key !== "Tab") return;
@@ -1204,20 +1258,20 @@ const f = (D = class extends se {
1204
1258
  ".wc-datepicker--container"
1205
1259
  );
1206
1260
  if (!a) return;
1207
- const r = [
1261
+ const s = [
1208
1262
  "button:not([disabled])",
1209
1263
  "input:not([disabled])",
1210
1264
  "select:not([disabled])",
1211
1265
  "[tabindex]:not([tabindex='-1'])"
1212
- ], s = [];
1266
+ ], r = [];
1213
1267
  if (a.querySelectorAll("nys-button").forEach((c) => {
1214
- s.push(c);
1215
- }), s.push(
1268
+ r.push(c);
1269
+ }), r.push(
1216
1270
  ...Array.from(
1217
- a.querySelectorAll(r.join(","))
1271
+ a.querySelectorAll(s.join(","))
1218
1272
  ).filter((c) => c.offsetParent !== null)
1219
- ), s.length === 0) return;
1220
- const n = s[0], i = s[s.length - 1], o = this.shadowRoot?.activeElement;
1273
+ ), r.length === 0) return;
1274
+ const n = r[0], i = r[r.length - 1], o = this.shadowRoot?.activeElement;
1221
1275
  e.shiftKey ? o === n && (e.preventDefault(), i.focus()) : o === i && (e.preventDefault(), n.focus());
1222
1276
  }
1223
1277
  _isSafari() {
@@ -1259,13 +1313,14 @@ const f = (D = class extends se {
1259
1313
  id=${this.id}
1260
1314
  class="nys-datepicker--input"
1261
1315
  type="date"
1262
- max="9999-12-31"
1316
+ min=${M(this.minDate || void 0)}
1317
+ max=${this.maxDate || "9999-12-31"}
1263
1318
  ?required=${this.required}
1264
1319
  .value=${this.value instanceof Date ? this.value.toISOString().split("T")[0] : this.value || ""}
1265
1320
  ?disabled=${this.disabled}
1266
- aria-label=${q(this.label || void 0)}
1267
- aria-disabled=${q(this.disabled ? "true" : void 0)}
1268
- aria-required=${q(this.required ? "true" : void 0)}
1321
+ aria-label=${M(this.label || void 0)}
1322
+ aria-disabled=${M(this.disabled ? "true" : void 0)}
1323
+ aria-required=${M(this.required ? "true" : void 0)}
1269
1324
  @click=${this._openDatepicker}
1270
1325
  @input=${this._handleInputChange}
1271
1326
  @blur=${this._handleBlur}
@@ -1293,7 +1348,9 @@ const f = (D = class extends se {
1293
1348
  locale="en-US"
1294
1349
  .value=${this.value instanceof Date ? this.value : this.value ? this._parseLocalDate(this.value) : void 0}
1295
1350
  ?disabled=${this.disabled}
1296
- start-date=${q(this.startDate ? this.startDate : void 0)}
1351
+ start-date=${M(this.startDate ? this.startDate : void 0)}
1352
+ min-date=${M(this.minDate || void 0)}
1353
+ max-date=${M(this.maxDate || void 0)}
1297
1354
  role="dialog"
1298
1355
  aria-modal=${this.datepickerIsOpen ? "true" : "false"}
1299
1356
  >
@@ -1329,63 +1386,69 @@ const f = (D = class extends se {
1329
1386
  errorMessage=${this._internals.validationMessage || this.errorMessage}
1330
1387
  ></nys-errormessage>`;
1331
1388
  }
1332
- }, D.styles = je(Ke), D.shadowRootOptions = {
1333
- ...se.shadowRootOptions,
1389
+ }, x.styles = je(Ke), x.shadowRootOptions = {
1390
+ ...ie.shadowRootOptions,
1334
1391
  delegatesFocus: !0
1335
- }, D.formAssociated = !0, D);
1392
+ }, x.formAssociated = !0, x);
1336
1393
  y([
1337
- k({ type: String, reflect: !0 })
1394
+ g({ type: String, reflect: !0 })
1338
1395
  ], f.prototype, "id");
1339
1396
  y([
1340
- k({ type: String, reflect: !0 })
1397
+ g({ type: String, reflect: !0 })
1341
1398
  ], f.prototype, "name");
1342
1399
  y([
1343
- k({ type: String, reflect: !0 })
1400
+ g({ type: String, reflect: !0 })
1344
1401
  ], f.prototype, "width");
1345
1402
  y([
1346
- k({ type: Boolean })
1403
+ g({ type: Boolean })
1347
1404
  ], f.prototype, "hideTodayButton");
1348
1405
  y([
1349
- k({ type: Boolean })
1406
+ g({ type: Boolean })
1350
1407
  ], f.prototype, "hideClearButton");
1351
1408
  y([
1352
- k({ type: Boolean, reflect: !0 })
1409
+ g({ type: Boolean, reflect: !0 })
1353
1410
  ], f.prototype, "disabled");
1354
1411
  y([
1355
- k({ type: Boolean, reflect: !0 })
1412
+ g({ type: Boolean, reflect: !0 })
1356
1413
  ], f.prototype, "required");
1357
1414
  y([
1358
- k({ type: Boolean, reflect: !0 })
1415
+ g({ type: Boolean, reflect: !0 })
1359
1416
  ], f.prototype, "optional");
1360
1417
  y([
1361
- k({ type: Boolean, reflect: !0 })
1418
+ g({ type: Boolean, reflect: !0 })
1362
1419
  ], f.prototype, "showError");
1363
1420
  y([
1364
- k({ type: String })
1421
+ g({ type: String })
1365
1422
  ], f.prototype, "errorMessage");
1366
1423
  y([
1367
- k({ type: String, reflect: !0 })
1424
+ g({ type: String, reflect: !0 })
1368
1425
  ], f.prototype, "form");
1369
1426
  y([
1370
- k({ type: String })
1427
+ g({ type: String })
1371
1428
  ], f.prototype, "tooltip");
1372
1429
  y([
1373
- k({ type: String })
1430
+ g({ type: String })
1374
1431
  ], f.prototype, "type");
1375
1432
  y([
1376
- k({ type: String })
1433
+ g({ type: String })
1377
1434
  ], f.prototype, "label");
1378
1435
  y([
1379
- k({ type: String })
1436
+ g({ type: String })
1380
1437
  ], f.prototype, "description");
1381
1438
  y([
1382
- k({ type: String })
1439
+ g({ type: String })
1383
1440
  ], f.prototype, "startDate");
1384
1441
  y([
1385
- k({ type: Boolean, reflect: !0 })
1442
+ g({ type: String })
1443
+ ], f.prototype, "minDate");
1444
+ y([
1445
+ g({ type: String })
1446
+ ], f.prototype, "maxDate");
1447
+ y([
1448
+ g({ type: Boolean, reflect: !0 })
1386
1449
  ], f.prototype, "inverted");
1387
1450
  y([
1388
- k({
1451
+ g({
1389
1452
  type: Object,
1390
1453
  converter: {
1391
1454
  fromAttribute: (t) => t ? f.prototype._parseLocalDate(t) : void 0,