@nysds/nys-datepicker 1.23.1 → 1.24.0

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,6 +1,6 @@
1
- import { LitElement as De, unsafeCSS as Ke, html as A } from "lit";
2
- import { property as g, state as Ve } from "lit/decorators.js";
3
- import { ifDefined as D } from "lit/directives/if-defined.js";
1
+ import { LitElement as Me, unsafeCSS as Ze, html as F } from "lit";
2
+ import { property as v, state as et } from "lit/decorators.js";
3
+ import { ifDefined as S } from "lit/directives/if-defined.js";
4
4
  import "@nysds/nys-label";
5
5
  import "@nysds/nys-errormessage";
6
6
  import "@nysds/nys-icon";
@@ -10,46 +10,46 @@ import "@nysds/nys-button";
10
10
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
11
11
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
12
12
  *
13
- * Datepicker Component v1.23.1
13
+ * Datepicker Component v1.24.0
14
14
  * Part of the New York State Design System
15
15
  * Repository: https://github.com/its-hcd/nysds
16
16
  * License: MIT
17
17
  */
18
18
  /*!
19
- * New York State Design System v1.23.1
19
+ * New York State Design System v1.24.0
20
20
  * Description: A design system for New York State's digital products.
21
21
  * Repository: https://github.com/its-hcd/nysds
22
22
  * License: MIT
23
23
  */
24
- let Ge = 0;
25
- function Qe(t) {
26
- return `${t}-${Date.now()}-${Ge++}`;
24
+ let tt = 0;
25
+ function at(t) {
26
+ return `${t}-${Date.now()}-${tt++}`;
27
27
  }
28
- function ne(t, e, a) {
28
+ function ce(t, e, a) {
29
29
  t.dispatchEvent(
30
30
  new CustomEvent(e, { detail: a, bubbles: !0, composed: !0 })
31
31
  );
32
32
  }
33
- function oe(t, e) {
33
+ function de(t, e) {
34
34
  t.dispatchEvent(
35
35
  new Event(`nys-${e}`, { bubbles: !0, composed: !0 })
36
36
  );
37
37
  }
38
- const Xe = (t) => {
38
+ const st = (t) => {
39
39
  class e extends t {
40
40
  get idPrefix() {
41
41
  return this.localName || "nys-element";
42
42
  }
43
43
  ensureId() {
44
- this.id || (this.id = Qe(this.idPrefix));
44
+ this.id || (this.id = at(this.idPrefix));
45
45
  }
46
46
  connectedCallback() {
47
47
  super.connectedCallback(), this.ensureId();
48
48
  }
49
49
  }
50
50
  return e;
51
- }, Je = (t) => {
52
- class e extends Xe(t) {
51
+ }, it = (t) => {
52
+ class e extends st(t) {
53
53
  constructor() {
54
54
  super(...arguments), this.__internals = null;
55
55
  }
@@ -72,7 +72,7 @@ const Xe = (t) => {
72
72
  n[s] = i;
73
73
  return;
74
74
  }
75
- const r = Ze(s);
75
+ const r = rt(s);
76
76
  i === null ? this.removeAttribute(r) : this.setAttribute(r, i);
77
77
  }
78
78
  reflectDefaultSemantics() {
@@ -85,13 +85,13 @@ const Xe = (t) => {
85
85
  }
86
86
  return e;
87
87
  };
88
- function Ze(t) {
88
+ function rt(t) {
89
89
  if (t === "role") return "role";
90
90
  const e = t.replace(/^aria/, "");
91
91
  return "aria-" + e.charAt(0).toLowerCase() + e.slice(1);
92
92
  }
93
- const et = (t) => {
94
- const e = class extends Je(t) {
93
+ const nt = (t) => {
94
+ const e = class extends it(t) {
95
95
  constructor() {
96
96
  super(...arguments), this.__internalValidationMessage = "";
97
97
  }
@@ -127,7 +127,7 @@ const et = (t) => {
127
127
  }
128
128
  };
129
129
  return e.formAssociated = !0, e;
130
- }, tt = /* @__PURE__ */ et(De), at = ':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-font-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{position:relative;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 .position-top{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))}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}', R = {
130
+ }, ot = /* @__PURE__ */ nt(Me), lt = ':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-font-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{position:relative;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 .position-top{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))}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__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__previous-month-button--disabled,.wc-datepicker__next-month-button:disabled,.wc-datepicker__next-month-button[aria-disabled=true],.wc-datepicker__next-month-button--disabled,.wc-datepicker__previous-year-button:disabled,.wc-datepicker__previous-year-button[aria-disabled=true],.wc-datepicker__previous-year-button--disabled,.wc-datepicker__next-year-button:disabled,.wc-datepicker__next-year-button[aria-disabled=true],.wc-datepicker__next-year-button--disabled{cursor:not-allowed;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}', L = {
131
131
  allRenderFn: !1,
132
132
  cmpDidLoad: !0,
133
133
  cmpDidUnload: !1,
@@ -211,10 +211,10 @@ const et = (t) => {
211
211
  transformTagName: !1,
212
212
  attachStyles: !0
213
213
  };
214
- let B, xe, Q, Se = !1, H = !1, se = !1, _ = !1, le = null, te = !1;
214
+ let R, Ce, Q, Te = !1, H = !1, ie = !1, _ = !1, ue = null, ae = !1;
215
215
  const E = (t, e = "") => () => {
216
- }, ce = "http://www.w3.org/1999/xlink", de = {}, st = "http://www.w3.org/2000/svg", it = "http://www.w3.org/1999/xhtml", rt = (t) => t != null, ie = (t) => (t = typeof t, t === "object" || t === "function");
217
- function nt(t) {
216
+ }, he = "http://www.w3.org/1999/xlink", pe = {}, ct = "http://www.w3.org/2000/svg", dt = "http://www.w3.org/1999/xhtml", ut = (t) => t != null, re = (t) => (t = typeof t, t === "object" || t === "function");
217
+ function ht(t) {
218
218
  var e, a, s;
219
219
  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;
220
220
  }
@@ -222,7 +222,7 @@ const h = (t, e, ...a) => {
222
222
  let s = null, i = null, n = null, r = !1, o = !1;
223
223
  const l = [], c = (u) => {
224
224
  for (let p = 0; p < u.length; p++)
225
- s = u[p], Array.isArray(s) ? c(s) : s != null && typeof s != "boolean" && ((r = typeof t != "function" && !ie(s)) && (s = String(s)), r && o ? l[l.length - 1].$text$ += s : l.push(r ? j(null, s) : s), o = r);
225
+ s = u[p], Array.isArray(s) ? c(s) : s != null && typeof s != "boolean" && ((r = typeof t != "function" && !re(s)) && (s = String(s)), r && o ? l[l.length - 1].$text$ += s : l.push(r ? z(null, s) : s), o = r);
226
226
  };
227
227
  if (c(a), e) {
228
228
  e.key && (i = e.key), e.name && (n = e.name);
@@ -232,10 +232,10 @@ const h = (t, e, ...a) => {
232
232
  }
233
233
  }
234
234
  if (typeof t == "function")
235
- return t(e === null ? {} : e, l, lt);
236
- const d = j(t, null);
235
+ return t(e === null ? {} : e, l, ft);
236
+ const d = z(t, null);
237
237
  return d.$attrs$ = e, l.length > 0 && (d.$children$ = l), d.$key$ = i, d.$name$ = n, d;
238
- }, j = (t, e) => {
238
+ }, z = (t, e) => {
239
239
  const a = {
240
240
  $flags$: 0,
241
241
  $tag$: t,
@@ -244,65 +244,65 @@ const h = (t, e, ...a) => {
244
244
  $children$: null
245
245
  };
246
246
  return a.$attrs$ = null, a.$key$ = null, a.$name$ = null, a;
247
- }, Ce = {}, ot = (t) => t && t.$tag$ === Ce, lt = {
248
- forEach: (t, e) => t.map(ue).forEach(e),
249
- map: (t, e) => t.map(ue).map(e).map(ct)
250
- }, ue = (t) => ({
247
+ }, Ee = {}, pt = (t) => t && t.$tag$ === Ee, ft = {
248
+ forEach: (t, e) => t.map(fe).forEach(e),
249
+ map: (t, e) => t.map(fe).map(e).map(yt)
250
+ }, fe = (t) => ({
251
251
  vattrs: t.$attrs$,
252
252
  vchildren: t.$children$,
253
253
  vkey: t.$key$,
254
254
  vname: t.$name$,
255
255
  vtag: t.$tag$,
256
256
  vtext: t.$text$
257
- }), ct = (t) => {
257
+ }), yt = (t) => {
258
258
  if (typeof t.vtag == "function") {
259
259
  const a = Object.assign({}, t.vattrs);
260
260
  return t.vkey && (a.key = t.vkey), t.vname && (a.name = t.vname), h(t.vtag, a, ...t.vchildren || []);
261
261
  }
262
- const e = j(t.vtag, t.vtext);
262
+ const e = z(t.vtag, t.vtext);
263
263
  return e.$attrs$ = t.vattrs, e.$children$ = t.vchildren, e.$key$ = t.vkey, e.$name$ = t.vname, e;
264
- }, dt = (t) => Ft.map((e) => e(t)).find((e) => !!e), ut = (t, e) => t != null && !ie(t) ? e & 4 ? t === "false" ? !1 : t === "" || !!t : e & 2 ? parseFloat(t) : e & 1 ? String(t) : t : t, ht = (t) => t, he = (t, e, a) => {
265
- const s = ht(t);
264
+ }, gt = (t) => jt.map((e) => e(t)).find((e) => !!e), vt = (t, e) => t != null && !re(t) ? e & 4 ? t === "false" ? !1 : t === "" || !!t : e & 2 ? parseFloat(t) : e & 1 ? String(t) : t : t, kt = (t) => t, ye = (t, e, a) => {
265
+ const s = kt(t);
266
266
  return {
267
- emit: (i) => pt(s, e, {
267
+ emit: (i) => bt(s, e, {
268
268
  bubbles: !0,
269
269
  composed: !0,
270
270
  cancelable: !0,
271
271
  detail: i
272
272
  })
273
273
  };
274
- }, pt = (t, e, a) => {
274
+ }, bt = (t, e, a) => {
275
275
  const s = b.ce(e, a);
276
276
  return t.dispatchEvent(s), s;
277
- }, pe = /* @__PURE__ */ new WeakMap(), ft = (t, e, a) => {
278
- let s = K.get(t);
279
- Ut && a ? (s = s || new CSSStyleSheet(), typeof s == "string" ? s = e : s.replaceSync(e)) : s = e, K.set(t, s);
280
- }, yt = (t, e, a, s) => {
277
+ }, ge = /* @__PURE__ */ new WeakMap(), mt = (t, e, a) => {
278
+ let s = V.get(t);
279
+ Vt && a ? (s = s || new CSSStyleSheet(), typeof s == "string" ? s = e : s.replaceSync(e)) : s = e, V.set(t, s);
280
+ }, _t = (t, e, a, s) => {
281
281
  var i;
282
- let n = Me(e, a);
283
- const r = K.get(n);
284
- if (t = t.nodeType === 11 ? t : w, r)
282
+ let n = Le(e, a);
283
+ const r = V.get(n);
284
+ if (t = t.nodeType === 11 ? t : D, r)
285
285
  if (typeof r == "string") {
286
286
  t = t.head || t;
287
- let o = pe.get(t), l;
288
- if (o || pe.set(t, o = /* @__PURE__ */ new Set()), !o.has(n)) {
287
+ let o = ge.get(t), l;
288
+ if (o || ge.set(t, o = /* @__PURE__ */ new Set()), !o.has(n)) {
289
289
  {
290
- l = w.createElement("style"), l.innerHTML = r;
291
- const c = (i = b.$nonce$) !== null && i !== void 0 ? i : nt(w);
290
+ l = D.createElement("style"), l.innerHTML = r;
291
+ const c = (i = b.$nonce$) !== null && i !== void 0 ? i : ht(D);
292
292
  c != null && l.setAttribute("nonce", c), t.insertBefore(l, t.querySelector("link"));
293
293
  }
294
294
  o && o.add(n);
295
295
  }
296
296
  } else t.adoptedStyleSheets.includes(r) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, r]);
297
297
  return n;
298
- }, gt = (t) => {
299
- const e = t.$cmpMeta$, a = t.$hostElement$, s = e.$flags$, i = E("attachStyles", e.$tagName$), n = yt(a.shadowRoot ? a.shadowRoot : a.getRootNode(), e, t.$modeName$);
298
+ }, $t = (t) => {
299
+ const e = t.$cmpMeta$, a = t.$hostElement$, s = e.$flags$, i = E("attachStyles", e.$tagName$), n = _t(a.shadowRoot ? a.shadowRoot : a.getRootNode(), e, t.$modeName$);
300
300
  s & 10 && (a["s-sc"] = n, a.classList.add(n + "-h"), s & 2 && a.classList.add(n + "-s")), i();
301
- }, Me = (t, e) => "sc-" + (e && t.$flags$ & 32 ? t.$tagName$ + "-" + e : t.$tagName$), fe = (t, e, a, s, i, n) => {
301
+ }, Le = (t, e) => "sc-" + (e && t.$flags$ & 32 ? t.$tagName$ + "-" + e : t.$tagName$), ve = (t, e, a, s, i, n) => {
302
302
  if (a !== s) {
303
- let r = ke(t, e), o = e.toLowerCase();
303
+ let r = _e(t, e), o = e.toLowerCase();
304
304
  if (e === "class") {
305
- const l = t.classList, c = ye(a), d = ye(s);
305
+ const l = t.classList, c = ke(a), d = ke(s);
306
306
  l.remove(...c.filter((u) => u && !d.includes(u))), l.add(...d.filter((u) => u && !c.includes(u)));
307
307
  } else if (e === "style") {
308
308
  for (const l in a)
@@ -313,9 +313,9 @@ const h = (t, e, ...a) => {
313
313
  if (e === "ref")
314
314
  s && s(t);
315
315
  else if (!t.__lookupSetter__(e) && e[0] === "o" && e[1] === "n")
316
- e[2] === "-" ? e = e.slice(3) : ke(J, 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);
316
+ e[2] === "-" ? e = e.slice(3) : _e(J, 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);
317
317
  else {
318
- const l = ie(s);
318
+ const l = re(s);
319
319
  if ((r || l && s !== null) && !i)
320
320
  try {
321
321
  if (t.tagName.includes("-"))
@@ -327,52 +327,52 @@ const h = (t, e, ...a) => {
327
327
  } catch {
328
328
  }
329
329
  let c = !1;
330
- o !== (o = o.replace(/^xlink\:?/, "")) && (e = o, c = !0), s == null || s === !1 ? (s !== !1 || t.getAttribute(e) === "") && (c ? t.removeAttributeNS(ce, e) : t.removeAttribute(e)) : (!r || n & 4 || i) && !l && (s = s === !0 ? "" : s, c ? t.setAttributeNS(ce, e, s) : t.setAttribute(e, s));
330
+ o !== (o = o.replace(/^xlink\:?/, "")) && (e = o, c = !0), s == null || s === !1 ? (s !== !1 || t.getAttribute(e) === "") && (c ? t.removeAttributeNS(he, e) : t.removeAttribute(e)) : (!r || n & 4 || i) && !l && (s = s === !0 ? "" : s, c ? t.setAttributeNS(he, e, s) : t.setAttribute(e, s));
331
331
  }
332
332
  }
333
- }, vt = /\s/, ye = (t) => t ? t.split(vt) : [], Ee = (t, e, a, s) => {
334
- const i = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, n = t && t.$attrs$ || de, r = e.$attrs$ || de;
333
+ }, wt = /\s/, ke = (t) => t ? t.split(wt) : [], Re = (t, e, a, s) => {
334
+ const i = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, n = t && t.$attrs$ || pe, r = e.$attrs$ || pe;
335
335
  for (s in n)
336
- s in r || fe(i, s, n[s], void 0, a, e.$flags$);
336
+ s in r || ve(i, s, n[s], void 0, a, e.$flags$);
337
337
  for (s in r)
338
- fe(i, s, n[s], r[s], a, e.$flags$);
339
- }, z = (t, e, a, s) => {
338
+ ve(i, s, n[s], r[s], a, e.$flags$);
339
+ }, K = (t, e, a, s) => {
340
340
  const i = e.$children$[a];
341
341
  let n = 0, r, o, l;
342
- if (Se || (se = !0, i.$tag$ === "slot" && (B && s.classList.add(B + "-s"), i.$flags$ |= i.$children$ ? (
342
+ if (Te || (ie = !0, i.$tag$ === "slot" && (R && s.classList.add(R + "-s"), i.$flags$ |= i.$children$ ? (
343
343
  // slot element has fallback content
344
344
  2
345
345
  ) : (
346
346
  // slot element does not have fallback content
347
347
  1
348
348
  ))), i.$text$ !== null)
349
- r = i.$elm$ = w.createTextNode(i.$text$);
349
+ r = i.$elm$ = D.createTextNode(i.$text$);
350
350
  else if (i.$flags$ & 1)
351
- r = i.$elm$ = w.createTextNode("");
351
+ r = i.$elm$ = D.createTextNode("");
352
352
  else {
353
- if (_ || (_ = i.$tag$ === "svg"), r = i.$elm$ = w.createElementNS(_ ? st : it, i.$flags$ & 2 ? "slot-fb" : i.$tag$), _ && i.$tag$ === "foreignObject" && (_ = !1), Ee(null, i, _), rt(B) && r["s-si"] !== B && r.classList.add(r["s-si"] = B), i.$children$)
353
+ if (_ || (_ = i.$tag$ === "svg"), r = i.$elm$ = D.createElementNS(_ ? ct : dt, i.$flags$ & 2 ? "slot-fb" : i.$tag$), _ && i.$tag$ === "foreignObject" && (_ = !1), Re(null, i, _), ut(R) && r["s-si"] !== R && r.classList.add(r["s-si"] = R), i.$children$)
354
354
  for (n = 0; n < i.$children$.length; ++n)
355
- o = z(t, i, n, r), o && r.appendChild(o);
355
+ o = K(t, i, n, r), o && r.appendChild(o);
356
356
  i.$tag$ === "svg" ? _ = !1 : r.tagName === "foreignObject" && (_ = !0);
357
357
  }
358
- return r["s-hn"] = Q, i.$flags$ & 3 && (r["s-sr"] = !0, r["s-cr"] = xe, r["s-sn"] = i.$name$ || "", l = t && t.$children$ && t.$children$[a], l && l.$tag$ === i.$tag$ && t.$elm$ && q(t.$elm$, !1)), r;
359
- }, q = (t, e) => {
358
+ return r["s-hn"] = Q, i.$flags$ & 3 && (r["s-sr"] = !0, r["s-cr"] = Ce, r["s-sn"] = i.$name$ || "", l = t && t.$children$ && t.$children$[a], l && l.$tag$ === i.$tag$ && t.$elm$ && W(t.$elm$, !1)), r;
359
+ }, W = (t, e) => {
360
360
  b.$flags$ |= 1;
361
361
  const a = t.childNodes;
362
362
  for (let s = a.length - 1; s >= 0; s--) {
363
363
  const i = a[s];
364
- i["s-hn"] !== Q && i["s-ol"] && (Re(i).insertBefore(i, re(i)), i["s-ol"].remove(), i["s-ol"] = void 0, se = !0), e && q(i, e);
364
+ i["s-hn"] !== Q && i["s-ol"] && (Ie(i).insertBefore(i, ne(i)), i["s-ol"].remove(), i["s-ol"] = void 0, ie = !0), e && W(i, e);
365
365
  }
366
366
  b.$flags$ &= -2;
367
- }, Te = (t, e, a, s, i, n) => {
367
+ }, Oe = (t, e, a, s, i, n) => {
368
368
  let r = t["s-cr"] && t["s-cr"].parentNode || t, o;
369
369
  for (r.shadowRoot && r.tagName === Q && (r = r.shadowRoot); i <= n; ++i)
370
- s[i] && (o = z(null, a, i, t), o && (s[i].$elm$ = o, r.insertBefore(o, re(e))));
371
- }, Le = (t, e, a, s, i) => {
370
+ s[i] && (o = K(null, a, i, t), o && (s[i].$elm$ = o, r.insertBefore(o, ne(e))));
371
+ }, Ae = (t, e, a, s, i) => {
372
372
  for (; e <= a; ++e)
373
- (s = t[e]) && (i = s.$elm$, Ie(s), H = !0, i["s-ol"] ? i["s-ol"].remove() : q(i, !0), i.remove());
374
- }, kt = (t, e, a, s) => {
375
- let i = 0, n = 0, r = 0, o = 0, l = e.length - 1, c = e[0], d = e[l], u = s.length - 1, p = s[0], v = s[u], $, S;
373
+ (s = t[e]) && (i = s.$elm$, Ne(s), H = !0, i["s-ol"] ? i["s-ol"].remove() : W(i, !0), i.remove());
374
+ }, Dt = (t, e, a, s) => {
375
+ let i = 0, n = 0, r = 0, o = 0, l = e.length - 1, c = e[0], d = e[l], u = s.length - 1, p = s[0], y = s[u], m, x;
376
376
  for (; i <= l && n <= u; )
377
377
  if (c == null)
378
378
  c = e[++i];
@@ -380,29 +380,29 @@ const h = (t, e, ...a) => {
380
380
  d = e[--l];
381
381
  else if (p == null)
382
382
  p = s[++n];
383
- else if (v == null)
384
- v = s[--u];
385
- else if (Y(c, p))
383
+ else if (y == null)
384
+ y = s[--u];
385
+ else if (j(c, p))
386
386
  O(c, p), c = e[++i], p = s[++n];
387
- else if (Y(d, v))
388
- O(d, v), d = e[--l], v = s[--u];
389
- else if (Y(c, v))
390
- (c.$tag$ === "slot" || v.$tag$ === "slot") && q(c.$elm$.parentNode, !1), O(c, v), t.insertBefore(c.$elm$, d.$elm$.nextSibling), c = e[++i], v = s[--u];
391
- else if (Y(d, p))
392
- (c.$tag$ === "slot" || v.$tag$ === "slot") && q(d.$elm$.parentNode, !1), O(d, p), t.insertBefore(d.$elm$, c.$elm$), d = e[--l], p = s[++n];
387
+ else if (j(d, y))
388
+ O(d, y), d = e[--l], y = s[--u];
389
+ else if (j(c, y))
390
+ (c.$tag$ === "slot" || y.$tag$ === "slot") && W(c.$elm$.parentNode, !1), O(c, y), t.insertBefore(c.$elm$, d.$elm$.nextSibling), c = e[++i], y = s[--u];
391
+ else if (j(d, p))
392
+ (c.$tag$ === "slot" || y.$tag$ === "slot") && W(d.$elm$.parentNode, !1), O(d, p), t.insertBefore(d.$elm$, c.$elm$), d = e[--l], p = s[++n];
393
393
  else {
394
394
  for (r = -1, o = i; o <= l; ++o)
395
395
  if (e[o] && e[o].$key$ !== null && e[o].$key$ === p.$key$) {
396
396
  r = o;
397
397
  break;
398
398
  }
399
- r >= 0 ? (S = e[r], S.$tag$ !== p.$tag$ ? $ = z(e && e[n], a, r, t) : (O(S, p), e[r] = void 0, $ = S.$elm$), p = s[++n]) : ($ = z(e && e[n], a, n, t), p = s[++n]), $ && Re(c.$elm$).insertBefore($, re(c.$elm$));
399
+ r >= 0 ? (x = e[r], x.$tag$ !== p.$tag$ ? m = K(e && e[n], a, r, t) : (O(x, p), e[r] = void 0, m = x.$elm$), p = s[++n]) : (m = K(e && e[n], a, n, t), p = s[++n]), m && Ie(c.$elm$).insertBefore(m, ne(c.$elm$));
400
400
  }
401
- i > l ? Te(t, s[u + 1] == null ? null : s[u + 1].$elm$, a, s, n, u) : n > u && Le(e, i, l);
402
- }, Y = (t, e) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : t.$key$ === e.$key$ : !1, re = (t) => t && t["s-ol"] || t, Re = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, O = (t, e) => {
401
+ i > l ? Oe(t, s[u + 1] == null ? null : s[u + 1].$elm$, a, s, n, u) : n > u && Ae(e, i, l);
402
+ }, j = (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, Ie = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, O = (t, e) => {
403
403
  const a = e.$elm$ = t.$elm$, s = t.$children$, i = e.$children$, n = e.$tag$, r = e.$text$;
404
404
  let o;
405
- r === null ? (_ = n === "svg" ? !0 : n === "foreignObject" ? !1 : _, n === "slot" || Ee(t, e, _), s !== null && i !== null ? kt(a, s, e, i) : i !== null ? (t.$text$ !== null && (a.textContent = ""), Te(a, null, e, i, 0, i.length - 1)) : s !== null && Le(s, 0, s.length - 1), _ && n === "svg" && (_ = !1)) : (o = a["s-cr"]) ? o.parentNode.textContent = r : t.$text$ !== r && (a.data = r);
405
+ r === null ? (_ = n === "svg" ? !0 : n === "foreignObject" ? !1 : _, n === "slot" || Re(t, e, _), s !== null && i !== null ? Dt(a, s, e, i) : i !== null ? (t.$text$ !== null && (a.textContent = ""), Oe(a, null, e, i, 0, i.length - 1)) : s !== null && Ae(s, 0, s.length - 1), _ && n === "svg" && (_ = !1)) : (o = a["s-cr"]) ? o.parentNode.textContent = r : t.$text$ !== r && (a.data = r);
406
406
  }, Be = (t) => {
407
407
  const e = t.childNodes;
408
408
  let a, s, i, n, r, o;
@@ -422,35 +422,35 @@ const h = (t, e, ...a) => {
422
422
  }
423
423
  Be(a);
424
424
  }
425
- }, m = [], Oe = (t) => {
425
+ }, w = [], Fe = (t) => {
426
426
  let e, a, s, i, n, r, o = 0;
427
427
  const l = t.childNodes, c = l.length;
428
428
  for (; o < c; o++) {
429
429
  if (e = l[o], e["s-sr"] && (a = e["s-cr"]) && a.parentNode)
430
430
  for (s = a.parentNode.childNodes, i = e["s-sn"], r = s.length - 1; r >= 0; r--)
431
- a = s[r], !a["s-cn"] && !a["s-nr"] && a["s-hn"] !== e["s-hn"] && (ge(a, i) ? (n = m.find((d) => d.$nodeToRelocate$ === a), H = !0, a["s-sn"] = a["s-sn"] || i, n ? n.$slotRefNode$ = e : m.push({
431
+ a = s[r], !a["s-cn"] && !a["s-nr"] && a["s-hn"] !== e["s-hn"] && (be(a, i) ? (n = w.find((d) => d.$nodeToRelocate$ === a), H = !0, a["s-sn"] = a["s-sn"] || i, n ? n.$slotRefNode$ = e : w.push({
432
432
  $slotRefNode$: e,
433
433
  $nodeToRelocate$: a
434
- }), a["s-sr"] && m.map((d) => {
435
- ge(d.$nodeToRelocate$, a["s-sn"]) && (n = m.find((u) => u.$nodeToRelocate$ === a), n && !d.$slotRefNode$ && (d.$slotRefNode$ = n.$slotRefNode$));
436
- })) : m.some((d) => d.$nodeToRelocate$ === a) || m.push({
434
+ }), a["s-sr"] && w.map((d) => {
435
+ be(d.$nodeToRelocate$, a["s-sn"]) && (n = w.find((u) => u.$nodeToRelocate$ === a), n && !d.$slotRefNode$ && (d.$slotRefNode$ = n.$slotRefNode$));
436
+ })) : w.some((d) => d.$nodeToRelocate$ === a) || w.push({
437
437
  $nodeToRelocate$: a
438
438
  }));
439
- e.nodeType === 1 && Oe(e);
439
+ e.nodeType === 1 && Fe(e);
440
440
  }
441
- }, ge = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", Ie = (t) => {
442
- t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(Ie);
443
- }, bt = (t, e) => {
444
- const a = t.$hostElement$, s = t.$cmpMeta$, i = t.$vnode$ || j(null, null), n = ot(e) ? e : h(null, null, e);
445
- Q = a.tagName, s.$attrsToReflect$ && (n.$attrs$ = n.$attrs$ || {}, s.$attrsToReflect$.map(([r, o]) => n.$attrs$[o] = a[r])), n.$tag$ = null, n.$flags$ |= 4, t.$vnode$ = n, n.$elm$ = i.$elm$ = a.shadowRoot || a, B = a["s-sc"], xe = a["s-cr"], Se = (s.$flags$ & 1) !== 0, H = !1, O(i, n);
441
+ }, be = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", Ne = (t) => {
442
+ t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(Ne);
443
+ }, xt = (t, e) => {
444
+ const a = t.$hostElement$, s = t.$cmpMeta$, i = t.$vnode$ || z(null, null), n = pt(e) ? e : h(null, null, e);
445
+ Q = a.tagName, s.$attrsToReflect$ && (n.$attrs$ = n.$attrs$ || {}, s.$attrsToReflect$.map(([r, o]) => n.$attrs$[o] = a[r])), n.$tag$ = null, n.$flags$ |= 4, t.$vnode$ = n, n.$elm$ = i.$elm$ = a.shadowRoot || a, R = a["s-sc"], Ce = a["s-cr"], Te = (s.$flags$ & 1) !== 0, H = !1, O(i, n);
446
446
  {
447
- if (b.$flags$ |= 1, se) {
448
- Oe(n.$elm$);
447
+ if (b.$flags$ |= 1, ie) {
448
+ Fe(n.$elm$);
449
449
  let r, o, l, c, d, u, p = 0;
450
- for (; p < m.length; p++)
451
- r = m[p], o = r.$nodeToRelocate$, o["s-ol"] || (l = w.createTextNode(""), l["s-nr"] = o, o.parentNode.insertBefore(o["s-ol"] = l, o));
452
- for (p = 0; p < m.length; p++)
453
- if (r = m[p], o = r.$nodeToRelocate$, r.$slotRefNode$) {
450
+ for (; p < w.length; p++)
451
+ r = w[p], o = r.$nodeToRelocate$, o["s-ol"] || (l = D.createTextNode(""), l["s-nr"] = o, o.parentNode.insertBefore(o["s-ol"] = l, o));
452
+ for (p = 0; p < w.length; p++)
453
+ if (r = w[p], o = r.$nodeToRelocate$, r.$slotRefNode$) {
454
454
  for (c = r.$slotRefNode$.parentNode, d = r.$slotRefNode$.nextSibling, l = o["s-ol"]; l = l.previousSibling; )
455
455
  if (u = l["s-nr"], u && u["s-sn"] === o["s-sn"] && c === u.parentNode && (u = u.nextSibling, !u || !u["s-nr"])) {
456
456
  d = u;
@@ -460,26 +460,26 @@ const h = (t, e, ...a) => {
460
460
  } else
461
461
  o.nodeType === 1 && (o.hidden = !0);
462
462
  }
463
- H && Be(n.$elm$), b.$flags$ &= -2, m.length = 0;
463
+ H && Be(n.$elm$), b.$flags$ &= -2, w.length = 0;
464
464
  }
465
- }, _t = (t, e) => {
466
- }, Ae = (t, e) => (t.$flags$ |= 16, _t(t, t.$ancestorComponent$), jt(() => $t(t, e))), $t = (t, e) => {
465
+ }, St = (t, e) => {
466
+ }, qe = (t, e) => (t.$flags$ |= 16, St(t, t.$ancestorComponent$), Xt(() => Mt(t, e))), Mt = (t, e) => {
467
467
  const a = t.$hostElement$, s = E("scheduleUpdate", t.$cmpMeta$.$tagName$), i = a;
468
468
  let n;
469
- return e ? n = I(i, "componentWillLoad") : n = I(i, "componentWillUpdate"), n = ve(n, () => I(i, "componentWillRender")), s(), ve(n, () => mt(t, i, e));
470
- }, mt = async (t, e, a) => {
469
+ return e ? n = I(i, "componentWillLoad") : n = I(i, "componentWillUpdate"), n = me(n, () => I(i, "componentWillRender")), s(), me(n, () => Ct(t, i, e));
470
+ }, Ct = async (t, e, a) => {
471
471
  const s = t.$hostElement$, i = E("update", t.$cmpMeta$.$tagName$);
472
- s["s-rc"], a && gt(t);
472
+ s["s-rc"], a && $t(t);
473
473
  const n = E("render", t.$cmpMeta$.$tagName$);
474
- wt(t, e, s), n(), i(), Dt(t);
475
- }, wt = (t, e, a) => {
474
+ Tt(t, e, s), n(), i(), Et(t);
475
+ }, Tt = (t, e, a) => {
476
476
  try {
477
- le = e, e = e.render && e.render(), t.$flags$ &= -17, t.$flags$ |= 2, (R.hasRenderFn || R.reflect) && (R.vdomRender || R.reflect) && (R.hydrateServerSide || bt(t, e));
477
+ ue = e, e = e.render && e.render(), t.$flags$ &= -17, t.$flags$ |= 2, (L.hasRenderFn || L.reflect) && (L.vdomRender || L.reflect) && (L.hydrateServerSide || xt(t, e));
478
478
  } catch (o) {
479
- P(o, t.$hostElement$);
479
+ U(o, t.$hostElement$);
480
480
  }
481
- return le = null, null;
482
- }, Dt = (t) => {
481
+ return ue = null, null;
482
+ }, Et = (t) => {
483
483
  const e = t.$cmpMeta$.$tagName$, a = t.$hostElement$, s = E("postUpdate", e), i = a;
484
484
  t.$ancestorComponent$, I(i, "componentDidRender"), t.$flags$ & 64 ? (I(i, "componentDidUpdate"), s()) : (t.$flags$ |= 64, I(i, "componentDidLoad"), s());
485
485
  }, I = (t, e, a) => {
@@ -487,11 +487,11 @@ const h = (t, e, ...a) => {
487
487
  try {
488
488
  return t[e](a);
489
489
  } catch (s) {
490
- P(s);
490
+ U(s);
491
491
  }
492
- }, ve = (t, e) => t && t.then ? t.then(e) : e(), xt = (t, e) => X(t).$instanceValues$.get(e), St = (t, e, a, s) => {
492
+ }, me = (t, e) => t && t.then ? t.then(e) : e(), Lt = (t, e) => X(t).$instanceValues$.get(e), Rt = (t, e, a, s) => {
493
493
  const i = X(t), n = t, r = i.$instanceValues$.get(e), o = i.$flags$, l = n;
494
- a = ut(a, s.$members$[e][0]);
494
+ a = vt(a, s.$members$[e][0]);
495
495
  const c = Number.isNaN(r) && Number.isNaN(a);
496
496
  if (a !== r && !c) {
497
497
  i.$instanceValues$.set(e, a);
@@ -501,29 +501,29 @@ const h = (t, e, ...a) => {
501
501
  u && u.map((p) => {
502
502
  try {
503
503
  l[p](a, r, e);
504
- } catch (v) {
505
- P(v, n);
504
+ } catch (y) {
505
+ U(y, n);
506
506
  }
507
507
  });
508
508
  }
509
509
  if ((o & 18) === 2) {
510
510
  if (l.componentShouldUpdate && l.componentShouldUpdate(a, r, e) === !1)
511
511
  return;
512
- Ae(i, !1);
512
+ qe(i, !1);
513
513
  }
514
514
  }
515
515
  }
516
- }, Ct = (t, e, a) => {
516
+ }, Ot = (t, e, a) => {
517
517
  if (e.$members$) {
518
518
  t.watchers && (e.$watchers$ = t.watchers);
519
519
  const s = Object.entries(e.$members$), i = t.prototype;
520
520
  s.map(([n, [r]]) => {
521
521
  (r & 31 || r & 32) && Object.defineProperty(i, n, {
522
522
  get() {
523
- return xt(this, n);
523
+ return Lt(this, n);
524
524
  },
525
525
  set(o) {
526
- St(this, n, o, e);
526
+ Rt(this, n, o, e);
527
527
  },
528
528
  configurable: !0,
529
529
  enumerable: !0
@@ -550,37 +550,37 @@ const h = (t, e, ...a) => {
550
550
  }
551
551
  }
552
552
  return t;
553
- }, Mt = async (t, e, a, s, i) => {
553
+ }, At = async (t, e, a, s, i) => {
554
554
  if ((e.$flags$ & 32) === 0 && (i = t.constructor, e.$flags$ |= 32, customElements.whenDefined(a.$tagName$).then(() => e.$flags$ |= 128), i.style)) {
555
555
  let r = i.style;
556
- typeof r != "string" && (r = r[e.$modeName$ = dt(t)]);
557
- const o = Me(a, e.$modeName$);
558
- if (!K.has(o)) {
556
+ typeof r != "string" && (r = r[e.$modeName$ = gt(t)]);
557
+ const o = Le(a, e.$modeName$);
558
+ if (!V.has(o)) {
559
559
  const l = E("registerStyles", a.$tagName$);
560
- ft(o, r, !!(a.$flags$ & 1)), l();
560
+ mt(o, r, !!(a.$flags$ & 1)), l();
561
561
  }
562
562
  }
563
- e.$ancestorComponent$, Ae(e, !0);
564
- }, Et = (t) => {
565
- }, Tt = (t) => {
563
+ e.$ancestorComponent$, qe(e, !0);
564
+ }, It = (t) => {
565
+ }, Bt = (t) => {
566
566
  if ((b.$flags$ & 1) === 0) {
567
567
  const e = X(t), a = e.$cmpMeta$, s = E("connectedCallback", a.$tagName$);
568
- e.$flags$ & 1 ? (Ne(t, e, a.$listeners$), Et(e.$lazyInstance$)) : (e.$flags$ |= 1, a.$flags$ & 12 && Lt(t), a.$members$ && Object.entries(a.$members$).map(([i, [n]]) => {
568
+ e.$flags$ & 1 ? (Ye(t, e, a.$listeners$), It(e.$lazyInstance$)) : (e.$flags$ |= 1, a.$flags$ & 12 && Ft(t), a.$members$ && Object.entries(a.$members$).map(([i, [n]]) => {
569
569
  if (n & 31 && t.hasOwnProperty(i)) {
570
570
  const r = t[i];
571
571
  delete t[i], t[i] = r;
572
572
  }
573
- }), Mt(t, e, a)), s();
573
+ }), At(t, e, a)), s();
574
574
  }
575
- }, Lt = (t) => {
576
- const e = t["s-cr"] = w.createComment("");
575
+ }, Ft = (t) => {
576
+ const e = t["s-cr"] = D.createComment("");
577
577
  e["s-cn"] = !0, t.insertBefore(e, t.firstChild);
578
- }, Rt = (t) => {
578
+ }, Nt = (t) => {
579
579
  if ((b.$flags$ & 1) === 0) {
580
580
  const e = X(t);
581
581
  e.$rmListeners$ && (e.$rmListeners$.map((a) => a()), e.$rmListeners$ = void 0);
582
582
  }
583
- }, Bt = (t, e) => {
583
+ }, qt = (t, e) => {
584
584
  const a = {
585
585
  $flags$: e[0],
586
586
  $tagName$: e[1]
@@ -589,13 +589,13 @@ const h = (t, e, ...a) => {
589
589
  const s = t.prototype.connectedCallback, i = t.prototype.disconnectedCallback;
590
590
  return Object.assign(t.prototype, {
591
591
  __registerHost() {
592
- Nt(this, a);
592
+ Ut(this, a);
593
593
  },
594
594
  connectedCallback() {
595
- Tt(this), s && s.call(this);
595
+ Bt(this), s && s.call(this);
596
596
  },
597
597
  disconnectedCallback() {
598
- Rt(this), i && i.call(this);
598
+ Nt(this), i && i.call(this);
599
599
  },
600
600
  __attachShadow() {
601
601
  this.attachShadow({
@@ -603,30 +603,30 @@ const h = (t, e, ...a) => {
603
603
  delegatesFocus: !!(a.$flags$ & 16)
604
604
  });
605
605
  }
606
- }), t.is = a.$tagName$, Ct(t, a);
607
- }, Ne = (t, e, a, s) => {
606
+ }), t.is = a.$tagName$, Ot(t, a);
607
+ }, Ye = (t, e, a, s) => {
608
608
  a && a.map(([i, n, r]) => {
609
- const o = It(t, i), l = Ot(e, r), c = At(i);
609
+ const o = Pt(t, i), l = Yt(e, r), c = Wt(i);
610
610
  b.ael(o, n, l, c), (e.$rmListeners$ = e.$rmListeners$ || []).push(() => b.rel(o, n, l, c));
611
611
  });
612
- }, Ot = (t, e) => (a) => {
612
+ }, Yt = (t, e) => (a) => {
613
613
  try {
614
- R.lazyLoad || t.$hostElement$[e](a);
614
+ L.lazyLoad || t.$hostElement$[e](a);
615
615
  } catch (s) {
616
- P(s);
616
+ U(s);
617
617
  }
618
- }, It = (t, e) => e & 4 ? w : e & 8 ? J : e & 16 ? w.body : t, At = (t) => Pt ? {
618
+ }, Pt = (t, e) => e & 4 ? D : e & 8 ? J : e & 16 ? D.body : t, Wt = (t) => zt ? {
619
619
  passive: (t & 1) !== 0,
620
620
  capture: (t & 2) !== 0
621
- } : (t & 2) !== 0, Fe = /* @__PURE__ */ new WeakMap(), X = (t) => Fe.get(t), Nt = (t, e) => {
621
+ } : (t & 2) !== 0, Pe = /* @__PURE__ */ new WeakMap(), X = (t) => Pe.get(t), Ut = (t, e) => {
622
622
  const a = {
623
623
  $flags$: 0,
624
624
  $hostElement$: t,
625
625
  $cmpMeta$: e,
626
626
  $instanceValues$: /* @__PURE__ */ new Map()
627
627
  };
628
- return Ne(t, a, e.$listeners$), Fe.set(t, a);
629
- }, ke = (t, e) => e in t, P = (t, e) => (0, console.error)(t, e), K = /* @__PURE__ */ new Map(), Ft = [], J = typeof window < "u" ? window : {}, w = J.document || { head: {} }, qt = J.HTMLElement || class {
628
+ return Ye(t, a, e.$listeners$), Pe.set(t, a);
629
+ }, _e = (t, e) => e in t, U = (t, e) => (0, console.error)(t, e), V = /* @__PURE__ */ new Map(), jt = [], J = typeof window < "u" ? window : {}, D = J.document || { head: {} }, Ht = J.HTMLElement || class {
630
630
  }, b = {
631
631
  $flags$: 0,
632
632
  $resourcesUrl$: "",
@@ -635,10 +635,10 @@ const h = (t, e, ...a) => {
635
635
  ael: (t, e, a, s) => t.addEventListener(e, a, s),
636
636
  rel: (t, e, a, s) => t.removeEventListener(e, a, s),
637
637
  ce: (t, e) => new CustomEvent(t, e)
638
- }, Pt = /* @__PURE__ */ (() => {
638
+ }, zt = /* @__PURE__ */ (() => {
639
639
  let t = !1;
640
640
  try {
641
- w.addEventListener("e", null, Object.defineProperty({}, "passive", {
641
+ D.addEventListener("e", null, Object.defineProperty({}, "passive", {
642
642
  get() {
643
643
  t = !0;
644
644
  }
@@ -646,60 +646,68 @@ const h = (t, e, ...a) => {
646
646
  } catch {
647
647
  }
648
648
  return t;
649
- })(), Yt = (t) => Promise.resolve(t), Ut = /* @__PURE__ */ (() => {
649
+ })(), Kt = (t) => Promise.resolve(t), Vt = /* @__PURE__ */ (() => {
650
650
  try {
651
651
  return new CSSStyleSheet(), typeof new CSSStyleSheet().replaceSync == "function";
652
652
  } catch {
653
653
  }
654
654
  return !1;
655
- })(), be = [], qe = [], Wt = (t, e) => (a) => {
656
- t.push(a), te || (te = !0, e && b.$flags$ & 4 ? Ht(ae) : b.raf(ae));
657
- }, _e = (t) => {
655
+ })(), $e = [], We = [], Gt = (t, e) => (a) => {
656
+ t.push(a), ae || (ae = !0, e && b.$flags$ & 4 ? Qt(se) : b.raf(se));
657
+ }, we = (t) => {
658
658
  for (let e = 0; e < t.length; e++)
659
659
  try {
660
660
  t[e](performance.now());
661
661
  } catch (a) {
662
- P(a);
662
+ U(a);
663
663
  }
664
664
  t.length = 0;
665
- }, ae = () => {
666
- _e(be), _e(qe), (te = be.length > 0) && b.raf(ae);
667
- }, Ht = (t) => Yt().then(t), jt = /* @__PURE__ */ Wt(qe, !0);
668
- function U(t, e) {
665
+ }, se = () => {
666
+ we($e), we(We), (ae = $e.length > 0) && b.raf(se);
667
+ }, Qt = (t) => Kt().then(t), Xt = /* @__PURE__ */ Gt(We, !0);
668
+ function N(t, e) {
669
669
  const a = new Date(t);
670
670
  return a.setDate(a.getDate() + e), a;
671
671
  }
672
- function zt(t, e, a) {
673
- const s = [], i = V(t), n = i.getDay() === 0 ? 7 : i.getDay(), r = N(t), o = r.getDay() === 0 ? 7 : r.getDay(), l = a === 1 ? 7 : a - 1, c = [], d = [];
672
+ function Ue(t, e) {
673
+ let a = t.getDay() - e;
674
+ return a < 0 && (a = 7 + a), P(t, a);
675
+ }
676
+ function Jt(t, e) {
677
+ const a = Ue(t, e);
678
+ return N(a, 6);
679
+ }
680
+ function Zt(t, e, a) {
681
+ const s = [], i = q(t), n = i.getDay() === 0 ? 7 : i.getDay(), r = A(t), o = r.getDay() === 0 ? 7 : r.getDay(), l = a === 1 ? 7 : a - 1, c = [], d = [];
674
682
  {
675
- let v = (7 - a + n) % 7, $ = G(i);
676
- for (; v > 0; )
677
- c.push($), $ = G($), v -= 1;
683
+ let y = (7 - a + n) % 7, m = G(i);
684
+ for (; y > 0; )
685
+ c.push(m), m = G(m), y -= 1;
678
686
  c.reverse();
679
- let T = (7 - o + l) % 7, L = F(r);
680
- for (; T > 0; )
681
- d.push(L), L = F(L), T -= 1;
687
+ let C = (7 - o + l) % 7, B = Y(r);
688
+ for (; C > 0; )
689
+ d.push(B), B = Y(B), C -= 1;
682
690
  }
683
691
  let u = i;
684
692
  for (; u.getMonth() === t.getMonth(); )
685
- s.push(u), u = F(u);
693
+ s.push(u), u = Y(u);
686
694
  return [...c, ...s, ...d];
687
695
  }
688
- function V(t) {
689
- return k(/* @__PURE__ */ new Date(`${String(Ye(t)).padStart(4, "0")}-${String(Pe(t)).padStart(2, "0")}-01`));
696
+ function q(t) {
697
+ return k(/* @__PURE__ */ new Date(`${String(He(t)).padStart(4, "0")}-${String(je(t)).padStart(2, "0")}-01`));
690
698
  }
691
- function C(t) {
699
+ function $(t) {
692
700
  if (t instanceof Date)
693
701
  return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
694
702
  }
695
- function N(t) {
696
- const e = V(t);
703
+ function A(t) {
704
+ const e = q(t);
697
705
  return e.setMonth(e.getMonth() + 1), e.setDate(e.getDate() - 1), e;
698
706
  }
699
- function Pe(t) {
707
+ function je(t) {
700
708
  return t.getMonth() + 1;
701
709
  }
702
- function Kt(t) {
710
+ function ea(t) {
703
711
  return new Array(12).fill(void 0).map((e, a) => {
704
712
  const s = k(/* @__PURE__ */ new Date(`2006-${String(a + 1).padStart(2, "0")}-01`));
705
713
  return Intl.DateTimeFormat(t, {
@@ -707,29 +715,29 @@ function Kt(t) {
707
715
  }).format(s);
708
716
  });
709
717
  }
710
- function F(t) {
711
- return U(t, 1);
718
+ function Y(t) {
719
+ return N(t, 1);
712
720
  }
713
- function Z(t) {
721
+ function ee(t) {
714
722
  const e = new Date(t);
715
723
  return e.setDate(1), e.setMonth(e.getMonth() + 1), e;
716
724
  }
717
- function $e(t) {
725
+ function De(t) {
718
726
  const e = new Date(t);
719
727
  return e.setFullYear(e.getFullYear() + 1), e;
720
728
  }
721
729
  function G(t) {
722
- return W(t, 1);
730
+ return P(t, 1);
723
731
  }
724
- function ee(t) {
732
+ function te(t) {
725
733
  const e = new Date(t);
726
734
  return e.setDate(1), e.setMonth(e.getMonth() - 1), e;
727
735
  }
728
- function me(t) {
736
+ function xe(t) {
729
737
  const e = new Date(t);
730
738
  return e.setFullYear(e.getFullYear() - 1), e;
731
739
  }
732
- function Vt(t, e) {
740
+ function ta(t, e) {
733
741
  return new Array(7).fill(void 0).map((a, s) => (t + s) % 7 + 1).map((a) => {
734
742
  const s = k(/* @__PURE__ */ new Date(`2006-01-0${a}`));
735
743
  return [
@@ -742,28 +750,31 @@ function Vt(t, e) {
742
750
  ];
743
751
  });
744
752
  }
745
- function Ye(t) {
753
+ function He(t) {
746
754
  return t.getFullYear();
747
755
  }
748
- function we(t, e) {
756
+ function Se(t, e) {
749
757
  if (!t || !e || !e.from || !e.to)
750
758
  return !1;
751
759
  const a = e.from < e.to ? e.from : e.to, s = e.from < e.to ? e.to : e.from;
752
760
  return t >= a && t <= s;
753
761
  }
754
- function x(t, e) {
762
+ function M(t, e) {
755
763
  return !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
756
764
  }
757
765
  function k(t) {
758
766
  const e = new Date(t);
759
767
  return e.setMinutes(e.getMinutes() + e.getTimezoneOffset()), e;
760
768
  }
761
- function W(t, e) {
769
+ function P(t, e) {
762
770
  const a = new Date(t);
763
771
  return a.setDate(a.getDate() - e), a;
764
772
  }
765
- const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}", Qt = {
773
+ const aa = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}", sa = {
766
774
  clearButton: "Clear value",
775
+ dateDeselected: "deselected",
776
+ dateSelected: "selected",
777
+ datesSelected: "{count} dates selected",
767
778
  monthSelect: "Select month",
768
779
  nextMonthButton: "Next month",
769
780
  nextYearButton: "Next year",
@@ -772,9 +783,9 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
772
783
  previousYearButton: "Previous year",
773
784
  todayButton: "Show today",
774
785
  yearSelect: "Select year"
775
- }, Xt = /* @__PURE__ */ Bt(class extends qt {
786
+ }, ia = /* @__PURE__ */ qt(class extends Ht {
776
787
  constructor() {
777
- super(), this.__registerHost(), this.selectDate = he(this, "selectDate"), this.changeMonth = he(this, "changeMonth"), this.disabled = !1, this.disableDate = () => !1, this.elementClassName = "wc-datepicker", this.firstDayOfWeek = 0, this.goToRangeStartOnSelect = !0, this.labels = Qt, 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 = () => {
788
+ super(), this.__registerHost(), this.selectDate = ye(this, "selectDate"), this.changeMonth = ye(this, "changeMonth"), this.disabled = !1, this.disableDate = () => !1, this.elementClassName = "wc-datepicker", this.firstDayOfWeek = 0, this.goToRangeStartOnSelect = !0, this.labels = sa, this.locale = navigator?.language || "en-US", this.maxSearchDays = 365, this.navigateWeeks = !1, this.showClearButton = !1, this.showMonthStepper = !0, this.showTodayButton = !1, this.showYearStepper = !1, this.startDate = $(/* @__PURE__ */ new Date()), this.pendingClick = !1, this.init = () => {
778
789
  this.currentDate = this.startDate ? k(new Date(this.startDate)) : /* @__PURE__ */ new Date(), this.updateWeekdays(), this.handleMinDate(), this.handleMaxDate();
779
790
  }, this.getAvailableDate = (t, e) => {
780
791
  let a, s = !1;
@@ -783,52 +794,60 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
783
794
  a = G(t);
784
795
  break;
785
796
  case "nextDay":
786
- a = F(t);
797
+ a = Y(t);
787
798
  break;
788
799
  case "previousSameWeekDay":
789
- a = W(t, 7);
800
+ a = P(t, 7);
790
801
  break;
791
802
  case "nextSameWeekDay":
792
- a = U(t, 7);
803
+ a = N(t, 7);
804
+ break;
805
+ case "firstOfWeek":
806
+ a = Ue(t, this.firstDayOfWeek);
807
+ break;
808
+ case "lastOfWeek":
809
+ a = Jt(t, this.firstDayOfWeek);
793
810
  break;
794
811
  case "firstOfMonth":
795
- a = V(t);
812
+ a = q(t);
796
813
  break;
797
814
  case "lastOfMonth":
798
- a = N(t);
815
+ a = A(t);
799
816
  break;
800
817
  case "previousMonth":
801
- a = ee(t);
818
+ a = te(t);
802
819
  break;
803
820
  case "nextMonth":
804
- a = Z(t);
821
+ a = ee(t);
805
822
  break;
806
823
  case "previousYear":
807
- a = me(t);
824
+ a = xe(t);
808
825
  break;
809
826
  case "nextYear":
810
- a = $e(t);
827
+ a = De(t);
811
828
  break;
812
829
  }
813
830
  for (; this.disableDate(a) && !s; ) {
814
831
  switch (e) {
815
832
  case "previousDay":
833
+ case "lastOfWeek":
816
834
  case "lastOfMonth":
817
835
  a = G(a);
818
836
  break;
819
837
  case "nextDay":
838
+ case "firstOfWeek":
820
839
  case "firstOfMonth":
821
840
  case "previousMonth":
822
841
  case "nextMonth":
823
842
  case "previousYear":
824
843
  case "nextYear":
825
- a = F(a);
844
+ a = Y(a);
826
845
  break;
827
846
  case "previousSameWeekDay":
828
- a = W(a, 7);
847
+ a = P(a, 7);
829
848
  break;
830
849
  case "nextSameWeekDay":
831
- a = U(a, 7);
850
+ a = N(a, 7);
832
851
  break;
833
852
  }
834
853
  switch (e) {
@@ -845,26 +864,26 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
845
864
  s = a.getMonth() !== t.getMonth() + 1;
846
865
  break;
847
866
  default:
848
- s = !we(a, {
849
- from: W(t, this.maxSearchDays),
850
- to: U(t, this.maxSearchDays)
867
+ s = !Se(a, {
868
+ from: P(t, this.maxSearchDays),
869
+ to: N(t, this.maxSearchDays)
851
870
  });
852
871
  break;
853
872
  }
854
873
  }
855
874
  return s ? t : a;
856
875
  }, this.nextMonth = () => {
857
- this.updateCurrentDate(Z(this.currentDate));
876
+ this.updateCurrentDate(ee(this.currentDate));
858
877
  }, this.nextYear = () => {
859
- this.updateCurrentDate($e(this.currentDate));
878
+ this.updateCurrentDate(De(this.currentDate));
860
879
  }, this.previousMonth = () => {
861
- this.updateCurrentDate(ee(this.currentDate));
880
+ this.updateCurrentDate(te(this.currentDate));
862
881
  }, this.previousYear = () => {
863
- this.updateCurrentDate(me(this.currentDate));
882
+ this.updateCurrentDate(xe(this.currentDate));
864
883
  }, this.showToday = () => {
865
884
  this.updateCurrentDate(/* @__PURE__ */ new Date());
866
885
  }, this.clear = () => {
867
- this.value = void 0, this.selectDate.emit(void 0);
886
+ this.value = void 0, this.lastToggle = void 0, this.selectDate.emit(void 0);
868
887
  }, this.onClick = (t) => {
869
888
  if (this.disabled)
870
889
  return;
@@ -875,18 +894,20 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
875
894
  const a = k(new Date(e.dataset.date));
876
895
  this.isDateDisabled(a) || (this.updateCurrentDate(a), this.onSelectDate(a));
877
896
  }, this.onMonthSelect = (t) => {
878
- const e = +t.target.value - 1, a = this.currentDate.getDate(), s = new Date(this.currentDate.getFullYear(), e, 1), i = N(s).getDate(), n = Math.min(a, i), r = new Date(this.currentDate.getFullYear(), e, n);
879
- this.updateCurrentDate(r);
897
+ const e = +t.target.value - 1, a = this.currentDate.getDate(), s = new Date(this.currentDate.getFullYear(), e, 1), i = A(s).getDate(), n = Math.min(a, i), r = new Date(this.currentDate.getFullYear(), e, n);
898
+ this.updateCurrentDate(this.clampDateToRange(r));
880
899
  }, this.onYearSelect = (t) => {
881
900
  let e = +t.target.value;
882
901
  const a = t.target;
883
902
  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));
884
- const s = this.currentDate.getDate(), i = this.currentDate.getMonth(), n = /* @__PURE__ */ new Date();
885
- n.setFullYear(e, i, 1);
886
- const r = N(n).getDate(), o = Math.min(s, r), l = /* @__PURE__ */ new Date();
887
- l.setFullYear(e, i, o), this.updateCurrentDate(l);
903
+ const s = this.getMinDate(), i = this.getMaxDate(), n = s?.getFullYear(), r = i?.getFullYear(), c = Math.max(n ?? 0, Math.min(r ?? 9999, e));
904
+ c !== e && (a.value = String(c)), e = c;
905
+ const d = this.currentDate.getDate(), u = this.currentDate.getMonth(), p = /* @__PURE__ */ new Date();
906
+ p.setFullYear(e, u, 1);
907
+ const y = A(p).getDate(), m = Math.min(d, y), x = /* @__PURE__ */ new Date();
908
+ x.setFullYear(e, u, m), this.updateCurrentDate(this.clampDateToRange(x));
888
909
  }, this.onKeyDown = (t) => {
889
- 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)));
910
+ 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, this.navigateWeeks ? "firstOfWeek" : "firstOfMonth"), !0)) : t.code === "End" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, this.navigateWeeks ? "lastOfWeek" : "lastOfMonth"), !0)) : (t.code === "Space" || t.code === "Enter") && (t.preventDefault(), this.isDateDisabled(this.currentDate) || this.onSelectDate(this.currentDate)));
890
911
  }, this.onMouseEnter = (t) => {
891
912
  if (this.disabled)
892
913
  return;
@@ -900,7 +921,7 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
900
921
  if (this.pendingClick)
901
922
  return;
902
923
  const e = k(new Date(t.target.dataset.date));
903
- x(e, this.currentDate) || this.updateCurrentDate(e);
924
+ M(e, this.currentDate) || this.updateCurrentDate(e);
904
925
  };
905
926
  }
906
927
  componentWillLoad() {
@@ -913,13 +934,16 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
913
934
  this.locale || (this.locale = navigator?.language || "en-US"), this.updateWeekdays();
914
935
  }
915
936
  watchRange() {
916
- this.value = void 0, this.selectDate.emit(void 0);
937
+ this.value = void 0, this.lastToggle = void 0, this.selectDate.emit(void 0);
938
+ }
939
+ watchSelectionMode() {
940
+ this.value = void 0, this.lastToggle = void 0, this.selectDate.emit(void 0);
917
941
  }
918
942
  watchStartDate() {
919
943
  this.currentDate = this.startDate ? k(new Date(this.startDate)) : /* @__PURE__ */ new Date();
920
944
  }
921
945
  watchValue() {
922
- 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));
946
+ this.value && (Array.isArray(this.value) && this.value.length === 0 || (Array.isArray(this.value) ? this.currentDate = this.mode === "multiple" ? this.value[this.value.length - 1] : this.value.length > 1 && !this.goToRangeStartOnSelect ? this.value[1] : this.value[0] : this.value instanceof Date && (this.currentDate = this.value)));
923
947
  }
924
948
  handleMinDate() {
925
949
  this.minDate && this.currentDate < k(new Date(this.minDate)) && (this.currentDate = k(new Date(this.minDate)));
@@ -931,13 +955,13 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
931
955
  this.moveFocusAfterMonthChanged && (this.focusDate(this.currentDate), this.moveFocusAfterMonthChanged = !1);
932
956
  }
933
957
  updateWeekdays() {
934
- this.weekdays = Vt(this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek, this.locale);
958
+ this.weekdays = ta(this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek, this.locale);
935
959
  }
936
960
  getClassName(t) {
937
961
  return t ? `${this.elementClassName}__${t}` : this.elementClassName;
938
962
  }
939
963
  getCalendarRows() {
940
- const t = zt(this.currentDate, !0, this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek), e = [];
964
+ const t = Zt(this.currentDate, !0, this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek), e = [];
941
965
  for (let a = 0; a < t.length; a += 7) {
942
966
  const s = t.slice(a, a + 7);
943
967
  e.push(s);
@@ -945,8 +969,8 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
945
969
  return e;
946
970
  }
947
971
  getTitle() {
948
- if (this.value)
949
- if (this.isRangeValue(this.value)) {
972
+ if (this.value) {
973
+ if (this.mode === "range" && Array.isArray(this.value)) {
950
974
  const t = Intl.DateTimeFormat(this.locale, {
951
975
  day: "numeric",
952
976
  month: "long",
@@ -957,56 +981,97 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
957
981
  year: "numeric"
958
982
  }).format(this.value[1]) : void 0;
959
983
  return e ? `${t} - ${e}` : t;
960
- } else
984
+ } else if (this.mode === "single" && this.value instanceof Date)
961
985
  return Intl.DateTimeFormat(this.locale, {
962
986
  day: "numeric",
963
987
  month: "long",
964
988
  year: "numeric"
965
989
  }).format(this.value);
990
+ }
991
+ }
992
+ getLiveRegionText() {
993
+ if (this.mode === "multiple") {
994
+ if (this.lastToggle) {
995
+ const e = Intl.DateTimeFormat(this.locale, {
996
+ day: "numeric",
997
+ month: "long",
998
+ year: "numeric"
999
+ }).format(this.lastToggle.date), a = this.lastToggle.action === "selected" ? this.labels.dateSelected : this.labels.dateDeselected, s = Array.isArray(this.value) ? this.value.length : 0, i = this.labels.datesSelected.replace(/\{count\}/g, String(s));
1000
+ return `${e} ${a}. ${i}`;
1001
+ }
1002
+ const t = Array.isArray(this.value) ? this.value.length : 0;
1003
+ if (t > 0)
1004
+ return this.labels.datesSelected.replace(/\{count\}/g, String(t));
1005
+ } else
1006
+ return this.getTitle();
1007
+ }
1008
+ getGridTitle() {
1009
+ return Intl.DateTimeFormat(this.locale, {
1010
+ month: "long",
1011
+ year: "numeric"
1012
+ }).format(this.currentDate);
966
1013
  }
967
1014
  focusDate(t) {
968
1015
  var e;
969
- (e = this.el.querySelector(`[data-date="${C(t)}"]`)) === null || e === void 0 || e.focus();
1016
+ (e = this.el.querySelector(`[data-date="${$(t)}"]`)) === null || e === void 0 || e.focus();
970
1017
  }
971
1018
  updateCurrentDate(t, e) {
972
1019
  const a = t.getMonth(), s = t.getFullYear();
973
1020
  if (s > 9999 || s < 0)
974
1021
  return;
975
1022
  (a !== this.currentDate.getMonth() || s !== this.currentDate.getFullYear()) && (this.changeMonth.emit({
976
- month: Pe(t),
977
- year: Ye(t),
1023
+ month: je(t),
1024
+ year: He(t),
978
1025
  day: t.getDate()
979
1026
  }), e && (this.moveFocusAfterMonthChanged = !0)), this.currentDate = t, e && this.focusDate(this.currentDate);
980
1027
  }
981
1028
  onSelectDate(t) {
982
- var e, a;
1029
+ var e;
983
1030
  if (!this.isDateDisabled(t))
984
- if (this.isRangeValue(this.value)) {
985
- const s = ((e = this.value) === null || e === void 0 ? void 0 : e[0]) === void 0 || this.value.length === 2 ? [t] : [this.value[0], t];
1031
+ if (this.mode === "range") {
1032
+ const a = Array.isArray(this.value) ? this.value : [], s = a[0] === void 0 || a.length === 2 ? [t] : [a[0], t];
986
1033
  s.length === 2 && s[0] > s[1] && s.reverse();
987
- const i = s[1] === void 0 ? [C(s[0])] : [C(s[0]), C(s[1])];
1034
+ const i = s[1] === void 0 ? [$(s[0])] : [$(s[0]), $(s[1])];
988
1035
  this.value = s, this.selectDate.emit(i);
1036
+ } else if (this.mode === "multiple") {
1037
+ const a = $(t), s = Array.isArray(this.value) ? [...this.value] : [], i = s.findIndex((n) => $(n) === a);
1038
+ i >= 0 ? (s.splice(i, 1), this.lastToggle = { action: "deselected", date: t }) : (s.push(t), this.lastToggle = { action: "selected", date: t }), s.sort((n, r) => n.getTime() - r.getTime()), this.value = s, this.selectDate.emit(s.map((n) => $(n)));
989
1039
  } else {
990
- if (((a = this.value) === null || a === void 0 ? void 0 : a.getTime()) === t.getTime())
1040
+ if (this.value instanceof Date && ((e = this.value) === null || e === void 0 ? void 0 : e.getTime()) === t.getTime())
991
1041
  return;
992
- this.value = t, this.selectDate.emit(C(t));
1042
+ this.value = t, this.selectDate.emit($(t));
993
1043
  }
994
1044
  }
995
- // @ts-ignore
996
- isRangeValue(t) {
997
- return this.range;
998
- }
999
1045
  get isPreviousMonthDisabled() {
1000
1046
  if (!this.minDate)
1001
1047
  return !1;
1002
- const t = ee(this.currentDate), e = k(new Date(this.minDate));
1003
- return N(t) < e;
1048
+ const t = te(this.currentDate), e = k(new Date(this.minDate));
1049
+ return A(t) < e;
1004
1050
  }
1005
1051
  get isNextMonthDisabled() {
1006
1052
  if (!this.maxDate)
1007
1053
  return !1;
1008
- const t = Z(this.currentDate), e = k(new Date(this.maxDate));
1009
- return V(t) > e;
1054
+ const t = ee(this.currentDate), e = k(new Date(this.maxDate));
1055
+ return q(t) > e;
1056
+ }
1057
+ getMinDate() {
1058
+ if (this.minDate)
1059
+ return k(new Date(this.minDate));
1060
+ }
1061
+ getMaxDate() {
1062
+ if (this.maxDate)
1063
+ return k(new Date(this.maxDate));
1064
+ }
1065
+ isMonthOutOfRange(t, e) {
1066
+ const a = new Date(t, e, 1), s = q(a), i = A(a), n = this.getMinDate(), r = this.getMaxDate();
1067
+ return !!(n && i < n || r && s > r);
1068
+ }
1069
+ clampDateToRange(t) {
1070
+ const e = this.getMinDate(), a = this.getMaxDate();
1071
+ return e && t < e ? e : a && t > a ? a : t;
1072
+ }
1073
+ get mode() {
1074
+ return this.selectionMode !== void 0 ? this.selectionMode : this.range ? "range" : "single";
1010
1075
  }
1011
1076
  isDateDisabled(t) {
1012
1077
  if (this.disableDate(t))
@@ -1015,44 +1080,45 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
1015
1080
  return !!(e || a);
1016
1081
  }
1017
1082
  render() {
1018
- const t = this.showTodayButton || this.showClearButton;
1019
- return h(Ce, null, h("div", { "aria-disabled": String(this.disabled), "aria-label": this.labels.picker, class: {
1083
+ var t, e, a, s;
1084
+ const i = this.showTodayButton || this.showClearButton, n = this.mode === "multiple" && Array.isArray(this.value) ? new Set(this.value.map((r) => $(r))) : null;
1085
+ return h(Ee, null, h("div", { "aria-disabled": String(this.disabled), "aria-label": this.labels.picker, class: {
1020
1086
  [this.getClassName()]: !0,
1021
1087
  [`${this.getClassName()}--disabled`]: this.disabled
1022
- }, 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: {
1088
+ }, role: "group" }, h("div", { class: this.getClassName("header") }, h("span", { "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getLiveRegionText()), 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("slot", { name: "button-year-prev" }, 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: {
1023
1089
  [this.getClassName("previous-month-button")]: !0,
1024
1090
  [this.getClassName("next-month-button--disabled")]: this.isPreviousMonthDisabled
1025
- }, 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 }, Kt(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: {
1091
+ }, disabled: this.disabled || this.isPreviousMonthDisabled, innerHTML: this.previousMonthButtonContent || void 0, onClick: this.previousMonth, type: "button" }, h("slot", { name: "button-month-prev" }, 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 }, ea(this.locale).map((r, o) => h("option", { key: r, disabled: this.isMonthOutOfRange(this.currentDate.getFullYear(), o), selected: this.currentDate.getMonth() === o, value: o + 1 }, r))), h("input", { title: this.labels.yearSelect, "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), disabled: this.disabled, max: (e = (t = this.getMaxDate()) === null || t === void 0 ? void 0 : t.getFullYear()) !== null && e !== void 0 ? e : 9999, maxLength: 4, min: (s = (a = this.getMinDate()) === null || a === void 0 ? void 0 : a.getFullYear()) !== null && s !== void 0 ? s : 1, onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && h("button", { "aria-label": this.labels.nextMonthButton, class: {
1026
1092
  [this.getClassName("next-month-button")]: !0,
1027
1093
  [this.getClassName("next-month-button--disabled")]: this.isNextMonthDisabled
1028
- }, 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) => {
1029
- const a = `row-${e[0].getMonth()}-${e[0].getDate()}`;
1030
- return h("tr", { class: this.getClassName("calendar-row"), key: a }, e.map((s) => {
1031
- var i, n, r, o, l;
1032
- const c = x(s, this.currentDate), d = s.getMonth() !== this.currentDate.getMonth(), u = Array.isArray(this.value) ? x(s, this.value[0]) || x(s, this.value[1]) : x(s, this.value), p = this.isRangeValue ? we(s, {
1033
- from: (i = this.value) === null || i === void 0 ? void 0 : i[0],
1034
- to: ((n = this.value) === null || n === void 0 ? void 0 : n[1]) || this.hoveredDate || this.currentDate
1035
- }) : !1, v = !((r = this.value) === null || r === void 0) && r[0] ? [
1036
- (o = this.value) === null || o === void 0 ? void 0 : o[0],
1037
- ((l = this.value) === null || l === void 0 ? void 0 : l[1]) || this.hoveredDate
1038
- ].sort((je, ze) => je - ze) : [], $ = this.range && x(v[0], s), S = this.range && x(v[1], s), T = x(s, /* @__PURE__ */ new Date()), L = this.isDateDisabled(s), Ue = `cell-${s.getMonth()}-${s.getDate()}`, We = {
1094
+ }, disabled: this.disabled || this.isNextMonthDisabled, innerHTML: this.nextMonthButtonContent || void 0, onClick: this.nextMonth, type: "button" }, h("slot", { name: "button-month-next" }, 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("slot", { name: "button-year-next" }, 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", "aria-label": this.getGridTitle(), "aria-multiselectable": this.mode === "range" || this.mode === "multiple" ? "true" : "false" }, h("thead", { class: this.getClassName("calendar-header") }, h("tr", { class: this.getClassName("weekday-row") }, this.weekdays.map((r) => h("th", { "aria-label": r[1], abbr: r[1], class: this.getClassName("weekday"), key: r[0], scope: "col" }, h("span", null, r[0]))))), h("tbody", null, this.getCalendarRows().map((r) => {
1095
+ const o = `row-${r[0].getMonth()}-${r[0].getDate()}`;
1096
+ return h("tr", { class: this.getClassName("calendar-row"), key: o }, r.map((l) => {
1097
+ var c, d, u, p, y;
1098
+ const m = M(l, this.currentDate), x = l.getMonth() !== this.currentDate.getMonth(), C = n ? n.has($(l)) : Array.isArray(this.value) ? this.mode === "range" && (M(l, this.value[0]) || M(l, this.value[1])) : M(l, this.value), B = this.mode === "range" ? Se(l, {
1099
+ from: (c = this.value) === null || c === void 0 ? void 0 : c[0],
1100
+ to: ((d = this.value) === null || d === void 0 ? void 0 : d[1]) || this.hoveredDate || this.currentDate
1101
+ }) : !1, oe = this.mode === "range" && (!((u = this.value) === null || u === void 0) && u[0]) ? [
1102
+ (p = this.value) === null || p === void 0 ? void 0 : p[0],
1103
+ ((y = this.value) === null || y === void 0 ? void 0 : y[1]) || this.hoveredDate
1104
+ ].sort((Xe, Je) => Xe - Je) : [], ze = this.mode === "range" && M(oe[0], l), Ke = this.mode === "range" && M(oe[1], l), Z = M(l, /* @__PURE__ */ new Date()), le = this.isDateDisabled(l), Ve = `cell-${l.getMonth()}-${l.getDate()}`, Ge = {
1039
1105
  [this.getClassName("date")]: !0,
1040
- [this.getClassName("date--current")]: c,
1041
- [this.getClassName("date--disabled")]: L,
1042
- [this.getClassName("date--overflowing")]: d,
1043
- [this.getClassName("date--today")]: T,
1044
- [this.getClassName("date--selected")]: u,
1045
- [this.getClassName("date--in-range")]: p,
1046
- [this.getClassName("date--start")]: $,
1047
- [this.getClassName("date--end")]: S
1048
- }, He = u ? "strong" : T ? "em" : "span";
1049
- return h("td", { "aria-disabled": String(L), "aria-selected": u ? "true" : void 0, "aria-current": T ? "date" : u ? "true" : void 0, class: We, "data-date": C(s), key: Ue, onClick: this.onClick, onMouseDown: this.onMouseDown, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onFocus: this.onFocus, role: "gridcell", tabIndex: x(s, this.currentDate) && !this.disabled ? 0 : -1 }, h(He, { "aria-hidden": "true" }, s.getDate()), h("span", { class: "visually-hidden" }, Intl.DateTimeFormat(this.locale, {
1106
+ [this.getClassName("date--current")]: m,
1107
+ [this.getClassName("date--disabled")]: le,
1108
+ [this.getClassName("date--overflowing")]: x,
1109
+ [this.getClassName("date--today")]: Z,
1110
+ [this.getClassName("date--selected")]: C,
1111
+ [this.getClassName("date--in-range")]: B,
1112
+ [this.getClassName("date--start")]: ze,
1113
+ [this.getClassName("date--end")]: Ke
1114
+ }, Qe = C ? "strong" : Z ? "em" : "span";
1115
+ return h("td", { "aria-disabled": String(le), "aria-selected": C ? "true" : void 0, "aria-current": Z ? "date" : C ? "true" : void 0, class: Ge, "data-date": $(l), key: Ve, onClick: this.onClick, onMouseDown: this.onMouseDown, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onFocus: this.onFocus, role: "gridcell", tabIndex: M(l, this.currentDate) && !this.disabled ? 0 : -1 }, h(Qe, { "aria-hidden": "true" }, l.getDate()), h("span", { class: "visually-hidden" }, Intl.DateTimeFormat(this.locale, {
1050
1116
  day: "numeric",
1051
1117
  month: "long",
1052
1118
  year: "numeric"
1053
- }).format(s)));
1119
+ }).format(l)));
1054
1120
  }));
1055
- })))), 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))));
1121
+ })))), i && h("div", { class: this.getClassName("footer") }, this.showTodayButton && h("button", { class: this.getClassName("today-button"), disabled: this.disabled, onClick: this.showToday, type: "button" }, h("slot", { name: "button-today" }, this.labels.todayButton)), this.showClearButton && h("button", { class: this.getClassName("clear-button"), disabled: this.disabled, onClick: this.clear, type: "button" }, h("slot", { name: "button-clear" }, this.labels.clearButton)))));
1056
1122
  }
1057
1123
  get el() {
1058
1124
  return this;
@@ -1062,6 +1128,7 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
1062
1128
  firstDayOfWeek: ["watchFirstDayOfWeek"],
1063
1129
  locale: ["watchLocale"],
1064
1130
  range: ["watchRange"],
1131
+ selectionMode: ["watchSelectionMode"],
1065
1132
  startDate: ["watchStartDate"],
1066
1133
  value: ["watchValue"],
1067
1134
  minDate: ["handleMinDate"],
@@ -1069,21 +1136,22 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
1069
1136
  };
1070
1137
  }
1071
1138
  static get style() {
1072
- return Gt;
1139
+ return aa;
1073
1140
  }
1074
- }, [2, "wc-datepicker", {
1075
- clearButtonContent: [1, "clear-button-content"],
1141
+ }, [6, "wc-datepicker", {
1076
1142
  disabled: [4],
1077
1143
  disableDate: [16],
1078
1144
  elementClassName: [1, "element-class-name"],
1079
1145
  firstDayOfWeek: [2, "first-day-of-week"],
1080
1146
  goToRangeStartOnSelect: [4, "go-to-range-start-on-select"],
1081
1147
  range: [4],
1148
+ selectionMode: [1, "selection-mode"],
1082
1149
  labels: [16],
1083
1150
  locale: [1],
1084
1151
  maxDate: [1, "max-date"],
1085
1152
  maxSearchDays: [2, "max-search-days"],
1086
1153
  minDate: [1, "min-date"],
1154
+ navigateWeeks: [4, "navigate-weeks"],
1087
1155
  nextMonthButtonContent: [1, "next-month-button-content"],
1088
1156
  nextYearButtonContent: [1, "next-year-button-content"],
1089
1157
  previousMonthButtonContent: [1, "previous-month-button-content"],
@@ -1093,20 +1161,20 @@ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
1093
1161
  showTodayButton: [4, "show-today-button"],
1094
1162
  showYearStepper: [4, "show-year-stepper"],
1095
1163
  startDate: [1, "start-date"],
1096
- todayButtonContent: [1, "today-button-content"],
1097
1164
  value: [1040],
1098
1165
  currentDate: [32],
1099
1166
  hoveredDate: [32],
1167
+ lastToggle: [32],
1100
1168
  weekdays: [32]
1101
- }]), Jt = Xt;
1102
- var Zt = Object.defineProperty, y = (t, e, a, s) => {
1169
+ }]), ra = ia;
1170
+ var na = Object.defineProperty, g = (t, e, a, s) => {
1103
1171
  for (var i = void 0, n = t.length - 1, r; n >= 0; n--)
1104
1172
  (r = t[n]) && (i = r(e, a, i) || i);
1105
- return i && Zt(e, a, i), i;
1173
+ return i && na(e, a, i), i;
1106
1174
  };
1107
- customElements.get("wc-datepicker") || customElements.define("wc-datepicker", Jt);
1108
- var M;
1109
- const f = (M = class extends tt {
1175
+ customElements.get("wc-datepicker") || customElements.define("wc-datepicker", ra);
1176
+ var T;
1177
+ const f = (T = class extends ot {
1110
1178
  constructor() {
1111
1179
  super(...arguments), this.id = "", this.name = "", this.width = "full", 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.DATEPICKER_GAP = 4, this._hasUserInteracted = !1, this._dirtySinceCommit = !1, this._onKeydownEsc = (e) => {
1112
1180
  e.key !== "Escape" || e.code !== "Escape" || this.datepickerIsOpen && (e.preventDefault(), e.stopPropagation(), this._closeCalendar(), this._focusInput());
@@ -1129,6 +1197,13 @@ const f = (M = class extends tt {
1129
1197
  async firstUpdated() {
1130
1198
  this._setValue(this.value), !(this._shouldUseNativeDatepicker() || !await this._whenWcDatepickerReady()) && (setTimeout(() => this._replaceButtonSVG(), 0), setTimeout(() => this._addMonthDropdownIcon(), 0), setTimeout(() => this._handleDateChange(), 0), setTimeout(() => this._onDocumentClick(), 0));
1131
1199
  }
1200
+ // Normalize `value` and derive the required message before rendering, not
1201
+ // after, so the writes _setValue()/_manageRequire() make in updated() are
1202
+ // no-ops and Lit doesn't schedule a second update
1203
+ // (see lit.dev/msg/change-in-update).
1204
+ willUpdate(e) {
1205
+ super.willUpdate(e), e.has("value") && (this.value ? typeof this.value == "string" && (this.value = this._parseLocalDate(this.value)) : this.value = void 0), (!this.hasUpdated || e.has("value") || e.has("required")) && (this.internalValidationMessage = this.required && !this.value ? "This field is required." : "");
1206
+ }
1132
1207
  updated(e) {
1133
1208
  if (super.updated(e), e.has("value")) {
1134
1209
  const a = e.get("value"), s = this.value;
@@ -1311,7 +1386,7 @@ const f = (M = class extends tt {
1311
1386
  ].join("-") : "";
1312
1387
  }
1313
1388
  _dispatchInputEvent() {
1314
- ne(this, "nys-input", {
1389
+ ce(this, "nys-input", {
1315
1390
  id: this.id,
1316
1391
  name: this.name,
1317
1392
  value: this.value
@@ -1320,7 +1395,7 @@ const f = (M = class extends tt {
1320
1395
  // Commit the current value: fires nys-change and clears the dirty flag so
1321
1396
  // a later blur doesn't re-commit the same selection.
1322
1397
  _dispatchChangeEvent() {
1323
- this._dirtySinceCommit = !1, ne(this, "nys-change", {
1398
+ this._dirtySinceCommit = !1, ce(this, "nys-change", {
1324
1399
  id: this.id,
1325
1400
  name: this.name,
1326
1401
  value: this._valueAsString()
@@ -1344,11 +1419,11 @@ const f = (M = class extends tt {
1344
1419
  // internal focus moves (input <-> calendar popup) don't re-fire it.
1345
1420
  _handleFocus(e) {
1346
1421
  const a = e.relatedTarget;
1347
- a && (this.contains(a) || this.shadowRoot?.contains(a)) || oe(this, "focus");
1422
+ a && (this.contains(a) || this.shadowRoot?.contains(a)) || de(this, "focus");
1348
1423
  }
1349
1424
  _handleBlur(e) {
1350
1425
  const a = e.relatedTarget;
1351
- a && (this.contains(a) || this.shadowRoot?.contains(a)) || this.datepickerIsOpen && !a || (this._hasUserInteracted || (this._hasUserInteracted = !0), this._closeCalendar(), this._validate(), this._dirtySinceCommit && this._dispatchChangeEvent(), oe(this, "blur"), this.removeEventListener("keydown", this._handleFocusTrap));
1426
+ a && (this.contains(a) || this.shadowRoot?.contains(a)) || this.datepickerIsOpen && !a || (this._hasUserInteracted || (this._hasUserInteracted = !0), this._closeCalendar(), this._validate(), this._dirtySinceCommit && this._dispatchChangeEvent(), de(this, "blur"), this.removeEventListener("keydown", this._handleFocusTrap));
1352
1427
  }
1353
1428
  // For when users click outside of the datepicker, we remove the calendar popup
1354
1429
  _onDocumentClick() {
@@ -1502,7 +1577,7 @@ const f = (M = class extends tt {
1502
1577
  }
1503
1578
  render() {
1504
1579
  const e = this._shouldUseNativeDatepicker();
1505
- return A` <div class="nys-datepicker--container">
1580
+ return F` <div class="nys-datepicker--container">
1506
1581
  <nys-label
1507
1582
  id="${this.id}--label"
1508
1583
  label=${this.label}
@@ -1518,22 +1593,22 @@ const f = (M = class extends tt {
1518
1593
  id=${this.id}
1519
1594
  class="nys-datepicker--input"
1520
1595
  type="date"
1521
- min=${D(this.minDate || void 0)}
1596
+ min=${S(this.minDate || void 0)}
1522
1597
  max=${this.maxDate || "9999-12-31"}
1523
1598
  ?required=${this.required}
1524
1599
  .value=${this.value instanceof Date ? this.value.toISOString().split("T")[0] : this.value || ""}
1525
1600
  ?disabled=${this.disabled}
1526
- aria-labelledby=${D(
1601
+ aria-labelledby=${S(
1527
1602
  this.label ? this.id + "--label" : void 0
1528
1603
  )}
1529
- aria-label=${D(
1604
+ aria-label=${S(
1530
1605
  !this.label && this.ariaLabel ? this.ariaLabel : void 0
1531
1606
  )}
1532
- aria-disabled=${D(this.disabled ? "true" : void 0)}
1533
- aria-required=${D(this.required ? "true" : void 0)}
1607
+ aria-disabled=${S(this.disabled ? "true" : void 0)}
1608
+ aria-required=${S(this.required ? "true" : void 0)}
1534
1609
  aria-invalid=${this.showError ? "true" : "false"}
1535
1610
  aria-errormessage=${this.id + "--error"}
1536
- aria-describedby=${D(
1611
+ aria-describedby=${S(
1537
1612
  this.showError ? this.id + "--error" : void 0
1538
1613
  )}
1539
1614
  @click=${this._openDatepicker}
@@ -1541,7 +1616,7 @@ const f = (M = class extends tt {
1541
1616
  @blur=${this._handleBlur}
1542
1617
  @keydown=${this._handleInputKeydown}
1543
1618
  />
1544
- ${e ? null : A`
1619
+ ${e ? null : F`
1545
1620
  <button
1546
1621
  id="calendar-button"
1547
1622
  @click=${this._toggleDatepicker}
@@ -1563,15 +1638,15 @@ const f = (M = class extends tt {
1563
1638
  locale="en-US"
1564
1639
  .value=${this.value instanceof Date ? this.value : this.value ? this._parseLocalDate(this.value) : void 0}
1565
1640
  ?disabled=${this.disabled}
1566
- start-date=${D(this.startDate ? this.startDate : void 0)}
1567
- min-date=${D(this.minDate || void 0)}
1568
- max-date=${D(this.maxDate || void 0)}
1641
+ start-date=${S(this.startDate ? this.startDate : void 0)}
1642
+ min-date=${S(this.minDate || void 0)}
1643
+ max-date=${S(this.maxDate || void 0)}
1569
1644
  role="dialog"
1570
1645
  aria-modal=${this.datepickerIsOpen ? "true" : "false"}
1571
1646
  >
1572
- ${!this.hideTodayButton || !this.hideClearButton ? A`
1647
+ ${!this.hideTodayButton || !this.hideClearButton ? F`
1573
1648
  <div class="wc-datepicker--button-container">
1574
- ${this.hideTodayButton ? null : A`
1649
+ ${this.hideTodayButton ? null : F`
1575
1650
  <nys-button
1576
1651
  label="Today"
1577
1652
  size="sm"
@@ -1581,7 +1656,7 @@ const f = (M = class extends tt {
1581
1656
  @nys-click=${this._handleTodayClick}
1582
1657
  ></nys-button>
1583
1658
  `}
1584
- ${this.hideClearButton ? null : A`
1659
+ ${this.hideClearButton ? null : F`
1585
1660
  <nys-button
1586
1661
  label="Clear"
1587
1662
  size="sm"
@@ -1602,69 +1677,69 @@ const f = (M = class extends tt {
1602
1677
  errorMessage=${this.resolvedErrorMessage()}
1603
1678
  ></nys-errormessage>`;
1604
1679
  }
1605
- }, M.styles = Ke(at), M.shadowRootOptions = {
1606
- ...De.shadowRootOptions,
1680
+ }, T.styles = Ze(lt), T.shadowRootOptions = {
1681
+ ...Me.shadowRootOptions,
1607
1682
  delegatesFocus: !0
1608
- }, M);
1609
- y([
1610
- g({ type: String, reflect: !0 })
1683
+ }, T);
1684
+ g([
1685
+ v({ type: String, reflect: !0 })
1611
1686
  ], f.prototype, "id");
1612
- y([
1613
- g({ type: String, reflect: !0 })
1687
+ g([
1688
+ v({ type: String, reflect: !0 })
1614
1689
  ], f.prototype, "name");
1615
- y([
1616
- g({ type: String, reflect: !0 })
1690
+ g([
1691
+ v({ type: String, reflect: !0 })
1617
1692
  ], f.prototype, "width");
1618
- y([
1619
- g({ type: Boolean })
1693
+ g([
1694
+ v({ type: Boolean })
1620
1695
  ], f.prototype, "hideTodayButton");
1621
- y([
1622
- g({ type: Boolean })
1696
+ g([
1697
+ v({ type: Boolean })
1623
1698
  ], f.prototype, "hideClearButton");
1624
- y([
1625
- g({ type: Boolean, reflect: !0 })
1699
+ g([
1700
+ v({ type: Boolean, reflect: !0 })
1626
1701
  ], f.prototype, "disabled");
1627
- y([
1628
- g({ type: Boolean, reflect: !0 })
1702
+ g([
1703
+ v({ type: Boolean, reflect: !0 })
1629
1704
  ], f.prototype, "required");
1630
- y([
1631
- g({ type: Boolean, reflect: !0 })
1705
+ g([
1706
+ v({ type: Boolean, reflect: !0 })
1632
1707
  ], f.prototype, "optional");
1633
- y([
1634
- g({ type: Boolean, reflect: !0 })
1708
+ g([
1709
+ v({ type: Boolean, reflect: !0 })
1635
1710
  ], f.prototype, "showError");
1636
- y([
1637
- g({ type: String })
1711
+ g([
1712
+ v({ type: String })
1638
1713
  ], f.prototype, "errorMessage");
1639
- y([
1640
- g({ type: String, reflect: !0 })
1714
+ g([
1715
+ v({ type: String, reflect: !0 })
1641
1716
  ], f.prototype, "form");
1642
- y([
1643
- g({ type: String })
1717
+ g([
1718
+ v({ type: String })
1644
1719
  ], f.prototype, "tooltip");
1645
- y([
1646
- g({ type: String })
1720
+ g([
1721
+ v({ type: String })
1647
1722
  ], f.prototype, "type");
1648
- y([
1649
- g({ type: String })
1723
+ g([
1724
+ v({ type: String })
1650
1725
  ], f.prototype, "label");
1651
- y([
1652
- g({ type: String })
1726
+ g([
1727
+ v({ type: String })
1653
1728
  ], f.prototype, "description");
1654
- y([
1655
- g({ type: String })
1729
+ g([
1730
+ v({ type: String })
1656
1731
  ], f.prototype, "startDate");
1657
- y([
1658
- g({ type: String })
1732
+ g([
1733
+ v({ type: String })
1659
1734
  ], f.prototype, "minDate");
1660
- y([
1661
- g({ type: String })
1735
+ g([
1736
+ v({ type: String })
1662
1737
  ], f.prototype, "maxDate");
1663
- y([
1664
- g({ type: Boolean, reflect: !0 })
1738
+ g([
1739
+ v({ type: Boolean, reflect: !0 })
1665
1740
  ], f.prototype, "inverted");
1666
- y([
1667
- g({
1741
+ g([
1742
+ v({
1668
1743
  type: Object,
1669
1744
  converter: {
1670
1745
  fromAttribute: (t) => t ? f.prototype._parseLocalDate(t) : void 0,
@@ -1672,12 +1747,12 @@ y([
1672
1747
  }
1673
1748
  })
1674
1749
  ], f.prototype, "value");
1675
- y([
1676
- Ve()
1750
+ g([
1751
+ et()
1677
1752
  ], f.prototype, "datepickerIsOpen");
1678
- let ea = f;
1679
- customElements.get("nys-datepicker") || customElements.define("nys-datepicker", ea);
1753
+ let oa = f;
1754
+ customElements.get("nys-datepicker") || customElements.define("nys-datepicker", oa);
1680
1755
  export {
1681
- ea as NysDatepicker
1756
+ oa as NysDatepicker
1682
1757
  };
1683
1758
  //# sourceMappingURL=nys-datepicker.js.map