@lmvz-ds/components 0.35.1 → 0.36.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.
- package/CHANGELOG.md +16 -0
- package/assets/icons/calendar.svg +7 -0
- package/cjs/{aria-validation-controller-BC0Eaiv4.js → aria-validation-controller-Do0uEK4t.js} +1 -1
- package/cjs/{directional-focus-controller-DBat-oF7.js → directional-focus-controller-3uDoin45.js} +3 -1
- package/cjs/{element-activation-controller-BHqCUgQv.js → element-activation-controller-BWtUKzu2.js} +1 -1
- package/cjs/{element.util-CRS_YJ59.js → element.util-CctmBvUY.js} +14 -0
- package/cjs/{index-TGsVZNDP.js → index-BgvZ4y-3.js} +12 -0
- package/cjs/lmvz-action-list.cjs.entry.js +5 -5
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button-group.cjs.entry.js +2 -2
- package/cjs/lmvz-button_2.cjs.entry.js +6 -6
- package/cjs/lmvz-card.cjs.entry.js +2 -2
- package/cjs/lmvz-checkbox.cjs.entry.js +2 -2
- package/cjs/lmvz-chip.cjs.entry.js +2 -2
- package/cjs/lmvz-components.cjs.js +2 -2
- package/cjs/lmvz-datepicker.cjs.entry.js +2764 -0
- package/cjs/lmvz-header_2.cjs.entry.js +6 -6
- package/cjs/{lmvz-popover.cjs.entry.js → lmvz-input_2.cjs.entry.js} +230 -11
- package/cjs/lmvz-link.cjs.entry.js +2 -2
- package/cjs/lmvz-menuitem.cjs.entry.js +5 -5
- package/cjs/lmvz-message.cjs.entry.js +2 -2
- package/cjs/lmvz-modal.cjs.entry.js +4 -4
- package/cjs/lmvz-radio.cjs.entry.js +3 -3
- package/cjs/lmvz-select.cjs.entry.js +3 -3
- package/cjs/lmvz-snackbar.cjs.entry.js +2 -2
- package/cjs/lmvz-spinner.cjs.entry.js +2 -2
- package/cjs/lmvz-tab.cjs.entry.js +2 -2
- package/cjs/lmvz-tabs.cjs.entry.js +4 -4
- package/cjs/lmvz-toggle.cjs.entry.js +4 -5
- package/cjs/loader.cjs.js +2 -2
- package/cjs/{async.util-Dnl6c82X.js → stencil.util-TjS8_DoU.js} +13 -1
- package/collection/assets/icons/calendar.svg +7 -0
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-action-list/lmvz-action-list.css +1 -0
- package/collection/components/lmvz-button/lmvz-button.css +1 -0
- package/collection/components/lmvz-card/lmvz-card.css +1 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.css +166 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.js +988 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.utils.js +189 -0
- package/collection/components/lmvz-datepicker/test/lmvz-datepicker.utils.unit.js +300 -0
- package/collection/components/lmvz-header/lmvz-header.js +1 -1
- package/collection/components/lmvz-icon/lmvz-icon.js +1 -1
- package/collection/components/lmvz-input/lmvz-input.css +2 -1
- package/collection/components/lmvz-input/lmvz-input.js +40 -2
- package/collection/components/lmvz-link/lmvz-link.js +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -1
- package/collection/components/lmvz-message/lmvz-message.js +1 -1
- package/collection/components/lmvz-modal/lmvz-modal.js +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.js +6 -2
- package/collection/components/lmvz-radio/lmvz-radio.js +1 -1
- package/collection/components/lmvz-select/lmvz-select.js +1 -1
- package/collection/components/lmvz-snackbar/lmvz-snackbar.js +1 -1
- package/collection/components/lmvz-spinner/lmvz-spinner.js +1 -1
- package/collection/components/lmvz-tab/lmvz-tab.js +1 -1
- package/collection/components/lmvz-tabs/lmvz-tabs.js +1 -1
- package/collection/components/lmvz-toggle/lmvz-toggle.js +1 -1
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/collection/utils/aria/aria.constants.js +7 -0
- package/collection/utils/aria/directional-focus-controller.js +3 -1
- package/collection/utils/element/element.util.js +5 -0
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.bak +2 -0
- package/components/index.js +1 -1
- package/components/lmvz-action-list.js +1 -1
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.js +1 -1
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-datepicker.d.ts +11 -0
- package/components/lmvz-datepicker.d.ts.bak +11 -0
- package/components/lmvz-datepicker.js +1 -0
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-link.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-message.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-popover.js +1 -1
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.js +1 -1
- package/components/lmvz-spinner.js +1 -1
- package/components/lmvz-tab.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/{p-Chj7BuUZ.js → p--FDdvoIg.js} +1 -1
- package/components/{p-CFTmV4XZ.js → p-BAj4FkUt.js} +1 -1
- package/components/{p-CxLd309t.js → p-BLMXiDE0.js} +1 -1
- package/components/{p-DGg7OzDl.js → p-BPYBmylI.js} +1 -1
- package/components/p-BhALzK62.js +1 -0
- package/components/p-Bnri3fEI.js +1 -0
- package/components/p-C-pRMuMh.js +1 -0
- package/components/p-CPuI0_r_.js +1 -0
- package/components/p-CWpl0WaZ.js +1 -0
- package/components/{p-D5FL8n1q.js → p-CrQCHVKL.js} +1 -1
- package/components/p-DqdrUt_G.js +1 -0
- package/components/{p-CgK6-SEe.js → p-diOze8wI.js} +1 -1
- package/esm/{aria-validation-controller-BvOU1BO8.js → aria-validation-controller-Cp6pofER.js} +1 -1
- package/esm/{directional-focus-controller-DgAdCZrG.js → directional-focus-controller-Bhu7RqYE.js} +3 -1
- package/esm/{element-activation-controller-7PNSl6io.js → element-activation-controller-BuwyVq4A.js} +1 -1
- package/esm/{element.util-BFcYfHYq.js → element.util-Bd9JyKJZ.js} +13 -1
- package/esm/{index-BPeerEwm.js → index-BOXP1Vx0.js} +12 -1
- package/esm/lmvz-action-list.entry.js +5 -5
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button-group.entry.js +2 -2
- package/esm/lmvz-button_2.entry.js +6 -6
- package/esm/lmvz-card.entry.js +2 -2
- package/esm/lmvz-checkbox.entry.js +2 -2
- package/esm/lmvz-chip.entry.js +2 -2
- package/esm/lmvz-components.js +3 -3
- package/esm/lmvz-datepicker.entry.js +2762 -0
- package/esm/lmvz-header_2.entry.js +6 -6
- package/esm/{lmvz-popover.entry.js → lmvz-input_2.entry.js} +227 -9
- package/esm/lmvz-link.entry.js +2 -2
- package/esm/lmvz-menuitem.entry.js +5 -5
- package/esm/lmvz-message.entry.js +2 -2
- package/esm/lmvz-modal.entry.js +4 -4
- package/esm/lmvz-radio.entry.js +3 -3
- package/esm/lmvz-select.entry.js +3 -3
- package/esm/lmvz-snackbar.entry.js +2 -2
- package/esm/lmvz-spinner.entry.js +2 -2
- package/esm/lmvz-tab.entry.js +2 -2
- package/esm/lmvz-tabs.entry.js +4 -4
- package/esm/lmvz-toggle.entry.js +4 -5
- package/esm/loader.js +3 -3
- package/esm/{async.util-DZj20TV1.js → stencil.util-C3QOYC8E.js} +13 -1
- package/hydrate/index.js +3083 -241
- package/hydrate/index.mjs +3083 -241
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/{p-eb62d4af.entry.js → p-0af0211a.entry.js} +1 -1
- package/lmvz-components/{p-0c05f24b.entry.js → p-3d5867df.entry.js} +1 -1
- package/lmvz-components/{p-a887018d.entry.js → p-492adf21.entry.js} +1 -1
- package/lmvz-components/{p-24d13be6.entry.js → p-4fa6e72f.entry.js} +1 -1
- package/lmvz-components/{p-5bbbcfc0.entry.js → p-544e3ccb.entry.js} +1 -1
- package/lmvz-components/{p-eb4c5a6f.entry.js → p-63f6a596.entry.js} +1 -1
- package/lmvz-components/p-7a7aa922.entry.js +1 -0
- package/lmvz-components/p-8022c6dc.entry.js +1 -0
- package/lmvz-components/{p-BPeerEwm.js → p-BOXP1Vx0.js} +2 -2
- package/lmvz-components/p-Bd9JyKJZ.js +1 -0
- package/lmvz-components/{p-D9PQIBzA.js → p-BeY96W7m.js} +1 -1
- package/lmvz-components/p-C3QOYC8E.js +1 -0
- package/lmvz-components/p-GGkwaiT6.js +1 -0
- package/lmvz-components/{p-wlMjNjuv.js → p-UhNgD4L3.js} +1 -1
- package/lmvz-components/{p-d4154a65.entry.js → p-a611c110.entry.js} +1 -1
- package/lmvz-components/{p-46edf36f.entry.js → p-b1bb4393.entry.js} +1 -1
- package/lmvz-components/p-b50b1cb5.entry.js +1 -0
- package/lmvz-components/{p-f42b16e6.entry.js → p-b932cf91.entry.js} +1 -1
- package/lmvz-components/p-bff115d4.entry.js +1 -0
- package/lmvz-components/p-d280d21a.entry.js +1 -0
- package/lmvz-components/{p-c2544495.entry.js → p-d48203f9.entry.js} +1 -1
- package/lmvz-components/{p-e4ce63b3.entry.js → p-d9aede81.entry.js} +1 -1
- package/lmvz-components/{p-ecbd9e93.entry.js → p-dbfbcb74.entry.js} +1 -1
- package/lmvz-components/p-f0e28f3a.entry.js +1 -0
- package/lmvz-components/{p-aaa7691c.entry.js → p-f853faae.entry.js} +1 -1
- package/lmvz-components/p-fa2efc42.entry.js +1 -0
- package/lmvz-components/{p-194a3af5.entry.js → p-fe6f5bdc.entry.js} +1 -1
- package/manifest.json +940 -159
- package/package.json +5 -1
- package/types/api/ds.constants.d.ts +0 -1
- package/types/api/ds.types.d.ts +8 -0
- package/types/components/lmvz-action/lmvz-action.d.ts +0 -1
- package/types/components/lmvz-action-list/lmvz-action-list.d.ts +0 -1
- package/types/components/lmvz-button/lmvz-button.d.ts +0 -1
- package/types/components/lmvz-button-group/lmvz-button-group.d.ts +0 -1
- package/types/components/lmvz-card/lmvz-card.d.ts +0 -1
- package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +0 -1
- package/types/components/lmvz-chip/lmvz-chip.d.ts +0 -1
- package/types/components/lmvz-datepicker/lmvz-datepicker.d.ts +75 -0
- package/types/components/lmvz-datepicker/lmvz-datepicker.utils.d.ts +22 -0
- package/types/components/lmvz-datepicker/test/lmvz-datepicker.utils.unit.d.ts +1 -0
- package/types/components/lmvz-header/lmvz-header.d.ts +0 -1
- package/types/components/lmvz-icon/lmvz-icon.d.ts +0 -1
- package/types/components/lmvz-input/lmvz-input.d.ts +5 -1
- package/types/components/lmvz-link/lmvz-link.d.ts +0 -1
- package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +0 -1
- package/types/components/lmvz-message/lmvz-message.d.ts +0 -1
- package/types/components/lmvz-message/public.d.ts +0 -1
- package/types/components/lmvz-modal/lmvz-modal.d.ts +0 -1
- package/types/components/lmvz-modal/test/testing.d.ts +0 -1
- package/types/components/lmvz-popover/lmvz-popover.d.ts +0 -1
- package/types/components/lmvz-radio/lmvz-radio.d.ts +0 -1
- package/types/components/lmvz-select/lmvz-select.d.ts +0 -1
- package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +0 -1
- package/types/components/lmvz-snackbar/public.d.ts +0 -1
- package/types/components/lmvz-snackbar/snackbar-controller.d.ts +0 -1
- package/types/components/lmvz-spinner/lmvz-spinner.d.ts +0 -1
- package/types/components/lmvz-tab/lmvz-tab.d.ts +0 -1
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +0 -1
- package/types/components/lmvz-toggle/lmvz-toggle.d.ts +0 -1
- package/types/components.d.ts +216 -0
- package/types/index.d.ts +0 -1
- package/types/utils/aria/aria-validation-controller.d.ts +0 -1
- package/types/utils/aria/aria.constants.d.ts +1 -1
- package/types/utils/aria/directional-focus-controller.d.ts +0 -1
- package/types/utils/aria/element-activation-controller.d.ts +0 -1
- package/types/utils/async/async.util.d.ts +1 -2
- package/types/utils/data/event.util.d.ts +0 -1
- package/types/utils/data/number.util.d.ts +0 -1
- package/types/utils/data/object.util.d.ts +0 -1
- package/types/utils/data/time.util.d.ts +0 -1
- package/types/utils/element/element.util.d.ts +1 -1
- package/types/utils/environment.d.ts +0 -1
- package/types/utils/icons/icons-registry.d.ts +0 -1
- package/types/utils/icons/icons.d.ts +0 -1
- package/types/utils/icons/icons.unit.d.ts +0 -1
- package/types/utils/icons/public.d.ts +0 -1
- package/types/utils/public.d.ts +0 -1
- package/types/utils/radio/radio-group-controller.d.ts +0 -1
- package/types/utils/stencil/assets.d.ts +0 -1
- package/types/utils/stencil/reactive-controller-host.d.ts +0 -1
- package/types/utils/stencil/stencil.util.d.ts +0 -1
- package/cjs/lmvz-input.cjs.entry.js +0 -186
- package/cjs/stencil.util-CBrPLd-F.js +0 -17
- package/components/p-BVzxNP7h.js +0 -1
- package/components/p-DLUsBYJH.js +0 -1
- package/components/p-zMWemcoB.js +0 -1
- package/esm/lmvz-input.entry.js +0 -184
- package/esm/stencil.util-D2-5rsN3.js +0 -15
- package/lmvz-components/p-4416d688.entry.js +0 -1
- package/lmvz-components/p-489d9912.entry.js +0 -1
- package/lmvz-components/p-5ff55ba9.entry.js +0 -1
- package/lmvz-components/p-888e04d7.entry.js +0 -1
- package/lmvz-components/p-9dc420e2.entry.js +0 -1
- package/lmvz-components/p-BFcYfHYq.js +0 -1
- package/lmvz-components/p-BuEA0MWd.js +0 -1
- package/lmvz-components/p-DZj20TV1.js +0 -1
- package/lmvz-components/p-af48eccb.entry.js +0 -1
- package/lmvz-components/p-bc237ab7.entry.js +0 -1
- package/lmvz-components/p-bh9cItsP.js +0 -1
package/hydrate/index.js
CHANGED
|
@@ -5668,7 +5668,19 @@ const ariaAttributes = [
|
|
|
5668
5668
|
'aria-valuenow',
|
|
5669
5669
|
'aria-valuetext',
|
|
5670
5670
|
];
|
|
5671
|
+
const ariaHostMirrorAttributes = [
|
|
5672
|
+
'aria-haspopup',
|
|
5673
|
+
'aria-controls',
|
|
5674
|
+
'aria-expanded',
|
|
5675
|
+
'aria-activedescendant',
|
|
5676
|
+
'aria-autocomplete',
|
|
5677
|
+
];
|
|
5671
5678
|
|
|
5679
|
+
function isInputElement(element) {
|
|
5680
|
+
if (!element)
|
|
5681
|
+
return false;
|
|
5682
|
+
return ['INPUT', 'TEXTAREA', 'SELECT', 'LMVZ-INPUT', 'LMVZ-SELECT', 'LMVZ-DATEPICKER'].includes(element.tagName?.toUpperCase());
|
|
5683
|
+
}
|
|
5672
5684
|
function isActionButton(element) {
|
|
5673
5685
|
return ['LMVZ-BUTTON', 'BUTTON'].includes(element.tagName.toUpperCase());
|
|
5674
5686
|
}
|
|
@@ -5896,6 +5908,8 @@ class DirectionalFocusController {
|
|
|
5896
5908
|
this.applyFocusTarget(element, true);
|
|
5897
5909
|
}
|
|
5898
5910
|
handleKeydown = (event) => {
|
|
5911
|
+
if (isInputElement(event.target))
|
|
5912
|
+
return;
|
|
5899
5913
|
const intent = this.getFocusIntent(event.key);
|
|
5900
5914
|
if (!intent)
|
|
5901
5915
|
return;
|
|
@@ -6034,7 +6048,7 @@ function resolveElement(el) {
|
|
|
6034
6048
|
return isDirectionalFocusReceiver(el) ? (el.resolveFocusableElement() ?? el) : el;
|
|
6035
6049
|
}
|
|
6036
6050
|
|
|
6037
|
-
const lmvzActionListCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } .sc-lmvz-action-list-h { display: flex; flex-direction: column; gap: 0; min-width: 15vw; button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } lmvz-button, button { --lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px); --lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-content-justification-override: normal; width: 100%; display: block; } button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); &:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } } }`;
|
|
6051
|
+
const lmvzActionListCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } .sc-lmvz-action-list-h { display: flex; flex-direction: column; gap: 0; min-width: 15vw; button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); min-width: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } lmvz-button, button { --lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px); --lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-content-justification-override: normal; width: 100%; display: block; } button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); &:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } } }`;
|
|
6038
6052
|
|
|
6039
6053
|
class LmvzActionList extends ReactiveControllerHost {
|
|
6040
6054
|
get el() { return getElement(this); }
|
|
@@ -6265,7 +6279,7 @@ function addElementActivationListener(...[target, handler, abortSignal, keys]) {
|
|
|
6265
6279
|
bindHandlers(target, handler, abortSignal, keys);
|
|
6266
6280
|
}
|
|
6267
6281
|
|
|
6268
|
-
const lmvzButtonCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } :host { button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } display: inline-block; button { width: 100%; } } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
|
|
6282
|
+
const lmvzButtonCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } :host { button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); min-width: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } display: inline-block; button { width: 100%; } } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
|
|
6269
6283
|
|
|
6270
6284
|
class LmvzButton extends ReactiveControllerHost {
|
|
6271
6285
|
get el() { return getElement(this); }
|
|
@@ -8737,7 +8751,7 @@ function joinPath(...parts) {
|
|
|
8737
8751
|
return parts.filter(Boolean).join('/').replace('//', '/').replace('/./', '/');
|
|
8738
8752
|
}
|
|
8739
8753
|
|
|
8740
|
-
const lmvzCardCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } .sc-lmvz-card-h { button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } display: flex; min-width: var(--lmvz-card-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-card-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-6-4, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.82rem + 0.78vw, 2.75rem) / 1.4 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }`;
|
|
8754
|
+
const lmvzCardCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } .sc-lmvz-card-h { button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); min-width: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } display: flex; min-width: var(--lmvz-card-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-card-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-6-4, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.82rem + 0.78vw, 2.75rem) / 1.4 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }`;
|
|
8741
8755
|
|
|
8742
8756
|
class LmvzCard {
|
|
8743
8757
|
constructor(hostRef) {
|
|
@@ -8997,244 +9011,3031 @@ class LmvzChip extends ReactiveControllerHost {
|
|
|
8997
9011
|
}; }
|
|
8998
9012
|
}
|
|
8999
9013
|
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
const
|
|
9014
|
+
// Low-Level
|
|
9015
|
+
const expectedPositive = (entityName, num) => `Non-positive ${entityName}: ${num}`;
|
|
9016
|
+
const expectedFinite = (entityName, num) => `Non-finite ${entityName}: ${num}`;
|
|
9017
|
+
const forbiddenBigIntToNumber = (entityName) => `Cannot convert bigint to ${entityName}`;
|
|
9018
|
+
const invalidObject = 'Invalid object';
|
|
9019
|
+
const numberOutOfRange = (entityName, val, min, max) => invalidEntity$1(entityName, val) + `; must be between ${min}-${max}`;
|
|
9020
|
+
// Entity/Fields/Bags
|
|
9021
|
+
const invalidEntity$1 = (fieldName, val) => `Invalid ${fieldName}: ${val}`;
|
|
9003
9022
|
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
keyboardNavigationController = new DirectionalFocusController(this, { orientation: 'both' });
|
|
9013
|
-
get primaryMenuitems() {
|
|
9014
|
-
return this.primarySlot?.assignedElements({ flatten: false }) || [];
|
|
9015
|
-
}
|
|
9016
|
-
get secondaryMenuitems() {
|
|
9017
|
-
return this.secondarySlot?.assignedElements({ flatten: true }) || [];
|
|
9018
|
-
}
|
|
9019
|
-
get role() {
|
|
9020
|
-
return 'banner';
|
|
9021
|
-
}
|
|
9022
|
-
lmvzActiveNav;
|
|
9023
|
-
get secondarySlotName() {
|
|
9024
|
-
return `connect-nav-${this.lmvzActiveNav}`;
|
|
9025
|
-
}
|
|
9026
|
-
constructor(hostRef) {
|
|
9027
|
-
super();
|
|
9028
|
-
registerInstance(this, hostRef);
|
|
9029
|
-
this.addController(new AriaValidationController(this, { reValidateOnPropChanges: true }));
|
|
9030
|
-
this.addController(this.keyboardNavigationController);
|
|
9031
|
-
}
|
|
9032
|
-
handleActiveNavChange() {
|
|
9033
|
-
this.updateElementsActive();
|
|
9034
|
-
}
|
|
9035
|
-
async initFocus() {
|
|
9036
|
-
this.keyboardNavigationController.initFocus();
|
|
9037
|
-
}
|
|
9038
|
-
componentDidLoad() {
|
|
9039
|
-
this.primarySlot?.addEventListener('slotchange', this.handlePrimaryNavItemsChange.bind(this));
|
|
9040
|
-
this.handlePrimaryNavItemsChange();
|
|
9041
|
-
this.secondarySlot?.addEventListener('slotchange', this.handleSecondaryNavItemsChange.bind(this));
|
|
9042
|
-
super.componentDidLoad();
|
|
9043
|
-
}
|
|
9044
|
-
handlePrimaryNavItemsChange() {
|
|
9045
|
-
const items = this.primaryMenuitems;
|
|
9046
|
-
if (!items.length) {
|
|
9047
|
-
console.warn('Primary slot has no assigned elements. Please add navigation items to the primary slot.');
|
|
9048
|
-
return;
|
|
9049
|
-
}
|
|
9050
|
-
items.forEach((el) => {
|
|
9051
|
-
el.setAttribute('aria-haspopup', 'true');
|
|
9052
|
-
el.setAttribute('aria-controls', `nav-secondary`);
|
|
9053
|
-
});
|
|
9054
|
-
this.updateElementsActive();
|
|
9055
|
-
this.updateKeyboardNavSubjects();
|
|
9023
|
+
const nanoInMicro$1 = 1_000;
|
|
9024
|
+
const nanoInMilli$1 = 1_000_000;
|
|
9025
|
+
const nanoInSec$1 = 1_000_000_000;
|
|
9026
|
+
const nanoInMinute$1 = 60_000_000_000;
|
|
9027
|
+
const nanoInHour$1 = 3_600_000_000_000;
|
|
9028
|
+
function normalizeOptions(options) {
|
|
9029
|
+
if (options === undefined) {
|
|
9030
|
+
return Object.create(null);
|
|
9056
9031
|
}
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
this.updateKeyboardNavSubjects();
|
|
9063
|
-
}
|
|
9064
|
-
updateKeyboardNavSubjects() {
|
|
9065
|
-
this.keyboardNavigationController.updateElements([...this.primaryMenuitems, ...this.secondaryMenuitems]);
|
|
9032
|
+
return requireObjectLike(options);
|
|
9033
|
+
}
|
|
9034
|
+
function toFiniteNumber(arg, entityName = 'number') {
|
|
9035
|
+
if (typeof arg === 'bigint') {
|
|
9036
|
+
throw new TypeError(forbiddenBigIntToNumber(entityName));
|
|
9066
9037
|
}
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
return;
|
|
9071
|
-
let label = '';
|
|
9072
|
-
items.forEach((el) => {
|
|
9073
|
-
const isActive = el.id === this.lmvzActiveNav;
|
|
9074
|
-
if (isActive)
|
|
9075
|
-
label = el.textContent || el.id;
|
|
9076
|
-
el.setAttribute('aria-expanded', isActive ? 'true' : 'false');
|
|
9077
|
-
});
|
|
9078
|
-
if (!label)
|
|
9079
|
-
return;
|
|
9080
|
-
this.secondaryNav?.setAttribute('aria-label', `Untermenü für ${label}`);
|
|
9038
|
+
arg = Number(arg);
|
|
9039
|
+
if (!Number.isFinite(arg)) {
|
|
9040
|
+
throw new RangeError(expectedFinite(entityName, arg));
|
|
9081
9041
|
}
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9042
|
+
return arg;
|
|
9043
|
+
}
|
|
9044
|
+
function toIntegerWithTrunc(arg, entityName) {
|
|
9045
|
+
return Math.trunc(toFiniteNumber(arg, entityName)) || 0; // ensure no -0
|
|
9046
|
+
}
|
|
9047
|
+
function toPositiveIntegerWithTruncation(arg, entityName) {
|
|
9048
|
+
return requireNumberIsPositive(toIntegerWithTrunc(arg, entityName), entityName);
|
|
9049
|
+
}
|
|
9050
|
+
/*
|
|
9051
|
+
Already known to be number.
|
|
9052
|
+
*/
|
|
9053
|
+
function requireNumberIsPositive(num, entityName = 'number') {
|
|
9054
|
+
if (num <= 0) {
|
|
9055
|
+
throw new RangeError(expectedPositive(entityName, num));
|
|
9087
9056
|
}
|
|
9088
|
-
|
|
9089
|
-
|
|
9057
|
+
return num;
|
|
9058
|
+
}
|
|
9059
|
+
/*
|
|
9060
|
+
min/max are inclusive
|
|
9061
|
+
*/
|
|
9062
|
+
function constrainToRange$1(num, min, max) {
|
|
9063
|
+
return Math.min(Math.max(num, min), max);
|
|
9064
|
+
}
|
|
9065
|
+
function isObjectLike(arg) {
|
|
9066
|
+
return arg !== null && (typeof arg === 'object' || typeof arg === 'function');
|
|
9067
|
+
}
|
|
9068
|
+
function requireObjectLike(arg) {
|
|
9069
|
+
if (!isObjectLike(arg)) {
|
|
9070
|
+
throw new TypeError(invalidObject);
|
|
9090
9071
|
}
|
|
9091
|
-
|
|
9092
|
-
"lmvzActiveNav": [{
|
|
9093
|
-
"handleActiveNavChange": 0
|
|
9094
|
-
}]
|
|
9095
|
-
}; }
|
|
9096
|
-
static get style() { return lmvzHeaderCss(); }
|
|
9097
|
-
static get cmpMeta() { return {
|
|
9098
|
-
"$flags$": 777,
|
|
9099
|
-
"$tagName$": "lmvz-header",
|
|
9100
|
-
"$members$": {
|
|
9101
|
-
"role": [2561],
|
|
9102
|
-
"lmvzActiveNav": [1, "lmvz-active-nav"],
|
|
9103
|
-
"initFocus": [64]
|
|
9104
|
-
},
|
|
9105
|
-
"$listeners$": undefined,
|
|
9106
|
-
"$lazyBundleId$": "-",
|
|
9107
|
-
"$attrsToReflect$": [["role", "role"]]
|
|
9108
|
-
}; }
|
|
9072
|
+
return arg;
|
|
9109
9073
|
}
|
|
9110
9074
|
|
|
9111
|
-
const
|
|
9075
|
+
const invalidEntity = invalidEntity$1;
|
|
9112
9076
|
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
if (this.intersectionObserver && typeof this.intersectionObserver.disconnect === 'function') {
|
|
9142
|
-
this.intersectionObserver.disconnect();
|
|
9143
|
-
}
|
|
9144
|
-
this.intersectionObserver = undefined;
|
|
9145
|
-
super.disconnectedCallback();
|
|
9146
|
-
}
|
|
9147
|
-
async loadIconPathData() {
|
|
9148
|
-
{
|
|
9149
|
-
return;
|
|
9150
|
-
}
|
|
9151
|
-
}
|
|
9152
|
-
componentDidRender() {
|
|
9153
|
-
this.validationEl = this.el.querySelector('svg');
|
|
9154
|
-
this.ariaValidationController.revalidateAria();
|
|
9155
|
-
super.componentDidRender();
|
|
9156
|
-
}
|
|
9157
|
-
render() {
|
|
9158
|
-
return hAsync(Host, { key: '4fba217d573d968951819f12af24d775c8ac62dc', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
|
|
9159
|
-
}
|
|
9160
|
-
waitUntilVisible(callback, rootMargin = 50) {
|
|
9161
|
-
{
|
|
9162
|
-
callback();
|
|
9163
|
-
return;
|
|
9164
|
-
}
|
|
9165
|
-
}
|
|
9166
|
-
static get watchers() { return {
|
|
9167
|
-
"icon": [{
|
|
9168
|
-
"loadIconPathData": 0
|
|
9169
|
-
}],
|
|
9170
|
-
"iconset": [{
|
|
9171
|
-
"loadIconPathData": 0
|
|
9172
|
-
}]
|
|
9173
|
-
}; }
|
|
9174
|
-
static get style() { return lmvzIconCss(); }
|
|
9175
|
-
static get cmpMeta() { return {
|
|
9176
|
-
"$flags$": 514,
|
|
9177
|
-
"$tagName$": "lmvz-icon",
|
|
9178
|
-
"$members$": {
|
|
9179
|
-
"icon": [513],
|
|
9180
|
-
"weight": [513],
|
|
9181
|
-
"size": [513],
|
|
9182
|
-
"iconset": [513],
|
|
9183
|
-
"ariaLabel": [513, "aria-label"],
|
|
9184
|
-
"iconData": [32],
|
|
9185
|
-
"visible": [32]
|
|
9186
|
-
},
|
|
9187
|
-
"$listeners$": undefined,
|
|
9188
|
-
"$lazyBundleId$": "-",
|
|
9189
|
-
"$attrsToReflect$": [["icon", "icon"], ["weight", "weight"], ["size", "size"], ["iconset", "iconset"], ["ariaLabel", "aria-label"]]
|
|
9190
|
-
}; }
|
|
9077
|
+
const missingField = fieldName => `Missing ${fieldName}`;
|
|
9078
|
+
|
|
9079
|
+
const noValidFields = validFields => "No valid fields: " + validFields.join();
|
|
9080
|
+
|
|
9081
|
+
const invalidChoice = (fieldName, val, choiceMap) => invalidEntity$1(fieldName, val) + "; must be " + Object.keys(choiceMap).join();
|
|
9082
|
+
|
|
9083
|
+
const forbiddenValueOf$1 = "Cannot use valueOf";
|
|
9084
|
+
|
|
9085
|
+
const invalidCallingContext = "Invalid calling context";
|
|
9086
|
+
|
|
9087
|
+
const missingYear = allowEra => "Missing year" + (allowEra ? "/era/eraYear" : "");
|
|
9088
|
+
|
|
9089
|
+
const invalidLeapMonth = "Invalid leap month";
|
|
9090
|
+
|
|
9091
|
+
const exoticCalendarRequired = (calendarId, remedy) => `Unknown calendar ${calendarId}; might need ${remedy}`;
|
|
9092
|
+
|
|
9093
|
+
const invalidTimeZone = calendarId => invalidEntity$1("TimeZone", calendarId);
|
|
9094
|
+
|
|
9095
|
+
const outOfBoundsDate = "Out-of-bounds date";
|
|
9096
|
+
|
|
9097
|
+
const failedParse = s => `Cannot parse: ${s}`;
|
|
9098
|
+
|
|
9099
|
+
const invalidSubstring = substring => `Invalid substring: ${substring}`;
|
|
9100
|
+
|
|
9101
|
+
const constrainToRange = constrainToRange$1;
|
|
9102
|
+
|
|
9103
|
+
function throwRangeError(message) {
|
|
9104
|
+
throw new RangeError(message);
|
|
9191
9105
|
}
|
|
9192
9106
|
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
await wait();
|
|
9197
|
-
await nextFrame();
|
|
9198
|
-
};
|
|
9199
|
-
const raf = (h) => {
|
|
9200
|
-
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
9201
|
-
return __zone_symbol__requestAnimationFrame(h);
|
|
9202
|
-
}
|
|
9203
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
9204
|
-
return requestAnimationFrame(h);
|
|
9205
|
-
}
|
|
9206
|
-
return setTimeout(h);
|
|
9207
|
-
};
|
|
9107
|
+
function throwTypeError(message) {
|
|
9108
|
+
throw new TypeError(message);
|
|
9109
|
+
}
|
|
9208
9110
|
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
}
|
|
9216
|
-
};
|
|
9217
|
-
const hasLazyBuild = (stencilEl) => {
|
|
9218
|
-
return stencilEl.componentOnReady !== undefined;
|
|
9219
|
-
};
|
|
9111
|
+
function clampProp(props, propName, min, max, overflow) {
|
|
9112
|
+
return clampEntity(propName, ((props, propName) => {
|
|
9113
|
+
const propVal = props[propName];
|
|
9114
|
+
return void 0 === propVal && throwTypeError(missingField(propName)), propVal;
|
|
9115
|
+
})(props, propName), min, max, overflow);
|
|
9116
|
+
}
|
|
9220
9117
|
|
|
9221
|
-
|
|
9118
|
+
function clampEntity(entityName, num, min, max, overflow, choices) {
|
|
9119
|
+
const clamped = constrainToRange(num, min, max);
|
|
9120
|
+
return overflow && num !== clamped && throwRangeError(((entityName, val, min, max, choices) => numberOutOfRange(entityName, val, min, max))(entityName, num, min, max)),
|
|
9121
|
+
clamped;
|
|
9122
|
+
}
|
|
9222
9123
|
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9124
|
+
function memoize(generator, MapClass = Map) {
|
|
9125
|
+
const map = new MapClass;
|
|
9126
|
+
return (key, ...otherArgs) => {
|
|
9127
|
+
if (map.has(key)) {
|
|
9128
|
+
return map.get(key);
|
|
9228
9129
|
}
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9130
|
+
const val = generator(key, ...otherArgs);
|
|
9131
|
+
return map.set(key, val), val;
|
|
9132
|
+
};
|
|
9133
|
+
}
|
|
9134
|
+
|
|
9135
|
+
const createNameDescriptors = name => createPropDescriptors({
|
|
9136
|
+
name: name
|
|
9137
|
+
});
|
|
9138
|
+
|
|
9139
|
+
const createPropDescriptors = (propVals, readonly) => mapProps(value => ({
|
|
9140
|
+
value: value,
|
|
9141
|
+
configurable: 1,
|
|
9142
|
+
writable: false
|
|
9143
|
+
}), propVals);
|
|
9144
|
+
|
|
9145
|
+
const createStringTagDescriptors = value => ({
|
|
9146
|
+
[Symbol.toStringTag]: {
|
|
9147
|
+
value: value,
|
|
9148
|
+
configurable: 1
|
|
9149
|
+
}
|
|
9150
|
+
});
|
|
9151
|
+
|
|
9152
|
+
function mapProps(transformer, props) {
|
|
9153
|
+
const res = {};
|
|
9154
|
+
for (const propName in props) {
|
|
9155
|
+
res[propName] = transformer(props[propName], propName);
|
|
9156
|
+
}
|
|
9157
|
+
return res;
|
|
9158
|
+
}
|
|
9159
|
+
|
|
9160
|
+
function zipPropsConst(propNames, propVal) {
|
|
9161
|
+
const res = {};
|
|
9162
|
+
for (const propName of propNames) {
|
|
9163
|
+
res[propName] = propVal;
|
|
9164
|
+
}
|
|
9165
|
+
return res;
|
|
9166
|
+
}
|
|
9167
|
+
|
|
9168
|
+
function createPropGetters(propNames) {
|
|
9169
|
+
const getters = {};
|
|
9170
|
+
for (const propName of propNames) {
|
|
9171
|
+
getters[propName] = slots => slots[propName];
|
|
9172
|
+
}
|
|
9173
|
+
return getters;
|
|
9174
|
+
}
|
|
9175
|
+
|
|
9176
|
+
function pluckProps(propNames, props, dest = Object.create(null)) {
|
|
9177
|
+
for (const propName of propNames) {
|
|
9178
|
+
dest[propName] = props[propName];
|
|
9179
|
+
}
|
|
9180
|
+
return dest;
|
|
9181
|
+
}
|
|
9182
|
+
|
|
9183
|
+
function bindArgs(f, ...boundArgs) {
|
|
9184
|
+
return (...dynamicArgs) => f(...boundArgs, ...dynamicArgs);
|
|
9185
|
+
}
|
|
9186
|
+
|
|
9187
|
+
function noop() {}
|
|
9188
|
+
|
|
9189
|
+
function capitalize(s) {
|
|
9190
|
+
return s[0].toUpperCase() + s.substring(1);
|
|
9191
|
+
}
|
|
9192
|
+
|
|
9193
|
+
function sortStrings(...strss) {
|
|
9194
|
+
return [].concat(...strss).sort();
|
|
9195
|
+
}
|
|
9196
|
+
|
|
9197
|
+
function createRegExp(meat) {
|
|
9198
|
+
return new RegExp(`^${meat}$`, "i");
|
|
9199
|
+
}
|
|
9200
|
+
|
|
9201
|
+
function parseSubsecNano(fracStr) {
|
|
9202
|
+
return parseInt(fracStr.padEnd(9, "0"));
|
|
9203
|
+
}
|
|
9204
|
+
|
|
9205
|
+
function parseSign(s) {
|
|
9206
|
+
return s && "+" !== s ? -1 : 1;
|
|
9207
|
+
}
|
|
9208
|
+
|
|
9209
|
+
function parseInt0(s) {
|
|
9210
|
+
return void 0 === s ? 0 : parseInt(s);
|
|
9211
|
+
}
|
|
9212
|
+
|
|
9213
|
+
function padNumber(digits, num) {
|
|
9214
|
+
return String(num).padStart(digits, "0");
|
|
9215
|
+
}
|
|
9216
|
+
|
|
9217
|
+
const padNumber2 = /*@__PURE__*/ bindArgs(padNumber, 2);
|
|
9218
|
+
|
|
9219
|
+
function compareNumbers(a, b) {
|
|
9220
|
+
return Math.sign(a - b);
|
|
9221
|
+
}
|
|
9222
|
+
|
|
9223
|
+
function divFloorBigInt(num, denom) {
|
|
9224
|
+
const whole = num / denom;
|
|
9225
|
+
return num % denom < 0n ? whole - 1n : whole;
|
|
9226
|
+
}
|
|
9227
|
+
|
|
9228
|
+
function divModFloorBigInt(num, divisor) {
|
|
9229
|
+
const quotient = divFloorBigInt(num, divisor);
|
|
9230
|
+
return [ quotient, num - quotient * divisor ];
|
|
9231
|
+
}
|
|
9232
|
+
|
|
9233
|
+
function divModFloor(num, divisor) {
|
|
9234
|
+
return [ Math.floor(num / divisor), modFloor(num, divisor) ];
|
|
9235
|
+
}
|
|
9236
|
+
|
|
9237
|
+
function modFloor(num, divisor) {
|
|
9238
|
+
return (num % divisor + divisor) % divisor;
|
|
9239
|
+
}
|
|
9240
|
+
|
|
9241
|
+
function divTrunc(num, divisor) {
|
|
9242
|
+
return Math.trunc(num / divisor) || 0;
|
|
9243
|
+
}
|
|
9244
|
+
|
|
9245
|
+
function modTrunc(num, divisor) {
|
|
9246
|
+
return num % divisor || 0;
|
|
9247
|
+
}
|
|
9248
|
+
|
|
9249
|
+
const isoCalendarId = "iso8601";
|
|
9250
|
+
|
|
9251
|
+
const gregoryCalendarId = "gregory";
|
|
9252
|
+
|
|
9253
|
+
const gregoryEraOrigins = {
|
|
9254
|
+
"bce": -1,
|
|
9255
|
+
"ce": 0
|
|
9256
|
+
};
|
|
9257
|
+
|
|
9258
|
+
function normalizeEraName(era) {
|
|
9259
|
+
const normalized = era.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
9260
|
+
return "bc" === normalized || "b" === normalized ? "bce" : "ad" === normalized || "a" === normalized ? "ce" : normalized;
|
|
9261
|
+
}
|
|
9262
|
+
|
|
9263
|
+
const isoCalendarImpl = void 0;
|
|
9264
|
+
|
|
9265
|
+
const gregoryCalendarImpl = 0;
|
|
9266
|
+
|
|
9267
|
+
function getCalendarSlotId(calendar) {
|
|
9268
|
+
return calendar === isoCalendarImpl ? "iso8601" : 0 === calendar ? "gregory" : calendar.id;
|
|
9269
|
+
}
|
|
9270
|
+
|
|
9271
|
+
const monthCodeRegExp = /^M(\d{2})(L?)$/;
|
|
9272
|
+
|
|
9273
|
+
function parseMonthCode(monthCode) {
|
|
9274
|
+
const m = monthCodeRegExp.exec(monthCode);
|
|
9275
|
+
return m || throwRangeError((monthCode => `Invalid monthCode: ${monthCode}`)(monthCode)),
|
|
9276
|
+
[ parseInt(m[1]), Boolean(m[2]) ];
|
|
9277
|
+
}
|
|
9278
|
+
|
|
9279
|
+
function formatMonthCode(monthCodeNumber, isLeapMonth) {
|
|
9280
|
+
return "M" + padNumber2(monthCodeNumber) + (isLeapMonth ? "L" : "");
|
|
9281
|
+
}
|
|
9282
|
+
|
|
9283
|
+
function monthCodeNumberToMonth(monthCodeNumber, isLeapMonth, leapMonth) {
|
|
9284
|
+
return monthCodeNumber + (isLeapMonth || leapMonth && monthCodeNumber >= leapMonth ? 1 : 0);
|
|
9285
|
+
}
|
|
9286
|
+
|
|
9287
|
+
const unitNameMap = {
|
|
9288
|
+
nanosecond: 0,
|
|
9289
|
+
microsecond: 1,
|
|
9290
|
+
millisecond: 2,
|
|
9291
|
+
second: 3,
|
|
9292
|
+
minute: 4,
|
|
9293
|
+
hour: 5,
|
|
9294
|
+
day: 6,
|
|
9295
|
+
week: 7,
|
|
9296
|
+
month: 8,
|
|
9297
|
+
year: 9
|
|
9298
|
+
};
|
|
9299
|
+
|
|
9300
|
+
const unitNamesAsc = /*@__PURE__*/ Object.keys(unitNameMap);
|
|
9301
|
+
|
|
9302
|
+
const nanoInMicro = nanoInMicro$1;
|
|
9303
|
+
|
|
9304
|
+
const nanoInMilli = nanoInMilli$1;
|
|
9305
|
+
|
|
9306
|
+
const nanoInSec = nanoInSec$1;
|
|
9307
|
+
|
|
9308
|
+
const nanoInMinute = nanoInMinute$1;
|
|
9309
|
+
|
|
9310
|
+
const nanoInHour = nanoInHour$1;
|
|
9311
|
+
|
|
9312
|
+
const nanoInUtcDay = 864e11;
|
|
9313
|
+
|
|
9314
|
+
const bigNanoInMicro = /*@__PURE__*/ BigInt(nanoInMicro);
|
|
9315
|
+
|
|
9316
|
+
const bigNanoInMilli = /*@__PURE__*/ BigInt(nanoInMilli);
|
|
9317
|
+
|
|
9318
|
+
const bigNanoInSec = /*@__PURE__*/ BigInt(nanoInSec);
|
|
9319
|
+
|
|
9320
|
+
const bigNanoInMinute = /*@__PURE__*/ BigInt(nanoInMinute);
|
|
9321
|
+
|
|
9322
|
+
const bigNanoInHour = /*@__PURE__*/ BigInt(nanoInHour);
|
|
9323
|
+
|
|
9324
|
+
const bigNanoInUtcDay = /*@__PURE__*/ BigInt(nanoInUtcDay);
|
|
9325
|
+
|
|
9326
|
+
const timeFieldNamesAsc = /*@__PURE__*/ unitNamesAsc.slice(0, 6);
|
|
9327
|
+
|
|
9328
|
+
const yearFieldNamesAsc = [ "year" ];
|
|
9329
|
+
|
|
9330
|
+
const dayFieldNamesAsc = [ "day" ];
|
|
9331
|
+
|
|
9332
|
+
const calendarDateFieldNamesAsc = [ "day", "month", "year" ];
|
|
9333
|
+
|
|
9334
|
+
const eraYearFieldNames = [ "era", "eraYear" ];
|
|
9335
|
+
|
|
9336
|
+
const allYearFieldNames = [ "era", "eraYear", "year" ];
|
|
9337
|
+
|
|
9338
|
+
const monthFieldNames = [ "month", "monthCode" ];
|
|
9339
|
+
|
|
9340
|
+
const monthDayFieldNames = [ "day", "month", "monthCode" ];
|
|
9341
|
+
|
|
9342
|
+
const yearMonthFieldNamesAlpha = /*@__PURE__*/ sortStrings(monthFieldNames, yearFieldNamesAsc);
|
|
9343
|
+
|
|
9344
|
+
const yearMonthCodeFieldNamesAlpha = /*@__PURE__*/ sortStrings([ "monthCode" ], yearFieldNamesAsc);
|
|
9345
|
+
|
|
9346
|
+
const yearMonthCodeFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
|
|
9347
|
+
|
|
9348
|
+
const dateFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, yearMonthFieldNamesAlpha);
|
|
9349
|
+
|
|
9350
|
+
const dateFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthFieldNamesAlpha);
|
|
9351
|
+
|
|
9352
|
+
const yearMonthCodeDayFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, yearMonthCodeFieldNamesAlpha);
|
|
9353
|
+
|
|
9354
|
+
const yearMonthCodeDayFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
|
|
9355
|
+
|
|
9356
|
+
function validateTimeFields(timeFields) {
|
|
9357
|
+
return constrainTimeFields(timeFields, 1), timeFields;
|
|
9358
|
+
}
|
|
9359
|
+
|
|
9360
|
+
const maxValues = {
|
|
9361
|
+
hour: 23,
|
|
9362
|
+
minute: 59,
|
|
9363
|
+
second: 59
|
|
9364
|
+
};
|
|
9365
|
+
|
|
9366
|
+
function constrainTimeFields(timeFields, overflow) {
|
|
9367
|
+
const constrainedFields = {};
|
|
9368
|
+
for (const fieldName of timeFieldNamesAsc) {
|
|
9369
|
+
constrainedFields[fieldName] = clampEntity(fieldName, timeFields[fieldName], 0, maxValues[fieldName] || 999, overflow);
|
|
9370
|
+
}
|
|
9371
|
+
return constrainedFields;
|
|
9372
|
+
}
|
|
9373
|
+
|
|
9374
|
+
function timeFieldsToNano(timeFields) {
|
|
9375
|
+
return timeFieldsToSec(timeFields) * nanoInSec + timeFieldsToSubsecNano(timeFields);
|
|
9376
|
+
}
|
|
9377
|
+
|
|
9378
|
+
function timeFieldsToSec(timeFields) {
|
|
9379
|
+
return 3600 * timeFields.hour + 60 * timeFields.minute + timeFields.second;
|
|
9380
|
+
}
|
|
9381
|
+
|
|
9382
|
+
function timeFieldsToSubsecNano(timeFields) {
|
|
9383
|
+
return timeFields.millisecond * nanoInMilli + timeFields.microsecond * nanoInMicro + timeFields.nanosecond;
|
|
9384
|
+
}
|
|
9385
|
+
|
|
9386
|
+
function nanoToTimeAndDay(nano) {
|
|
9387
|
+
const [dayDelta, timeNano] = divModFloor(nano, nanoInUtcDay);
|
|
9388
|
+
return [ nanoToTimeFields(timeNano), dayDelta ];
|
|
9389
|
+
}
|
|
9390
|
+
|
|
9391
|
+
function nanoToTimeFields(timeNano) {
|
|
9392
|
+
const [timeMilli, nanoAfterMilli] = divModFloor(timeNano, nanoInMilli);
|
|
9393
|
+
const [microsecond, nanosecond] = divModFloor(nanoAfterMilli, nanoInMicro);
|
|
9394
|
+
return milliToTimeFields(timeMilli, microsecond, nanosecond);
|
|
9395
|
+
}
|
|
9396
|
+
|
|
9397
|
+
function milliToTimeFields(timeMilli, microsecond = 0, nanosecond = 0) {
|
|
9398
|
+
const [hour, milliAfterHour] = divModFloor(timeMilli, 36e5);
|
|
9399
|
+
const [minute, milliAfterMinute] = divModFloor(milliAfterHour, 6e4);
|
|
9400
|
+
const [second, millisecond] = divModFloor(milliAfterMinute, 1e3);
|
|
9401
|
+
return {
|
|
9402
|
+
hour: hour,
|
|
9403
|
+
minute: minute,
|
|
9404
|
+
second: second,
|
|
9405
|
+
millisecond: millisecond,
|
|
9406
|
+
microsecond: microsecond,
|
|
9407
|
+
nanosecond: nanosecond
|
|
9408
|
+
};
|
|
9409
|
+
}
|
|
9410
|
+
|
|
9411
|
+
function epochNanoToSecMod(epochNano) {
|
|
9412
|
+
const [epochSec, nano] = divModFloorBigInt(epochNano, bigNanoInSec);
|
|
9413
|
+
return [ Number(epochSec), Number(nano) ];
|
|
9414
|
+
}
|
|
9415
|
+
|
|
9416
|
+
function isoDateToEpochNano(isoDate) {
|
|
9417
|
+
return BigInt(isoDateToEpochDays(isoDate)) * bigNanoInUtcDay;
|
|
9418
|
+
}
|
|
9419
|
+
|
|
9420
|
+
function isoDateToEpochMilli(isoDate) {
|
|
9421
|
+
return 864e5 * isoDateToEpochDays(isoDate);
|
|
9422
|
+
}
|
|
9423
|
+
|
|
9424
|
+
function isoDateToEpochDays(isoDate) {
|
|
9425
|
+
return isoArgsToEpochDays(isoDate.year, isoDate.month, isoDate.day);
|
|
9426
|
+
}
|
|
9427
|
+
|
|
9428
|
+
function isoArgsToEpochDays(isoYear, isoMonth = 1, isoDay = 1) {
|
|
9429
|
+
const monthIndex = isoMonth - 1;
|
|
9430
|
+
return isoYear += Math.floor(monthIndex / 12), isoMonth = modFloor(monthIndex, 12),
|
|
9431
|
+
Date.UTC(isoYear % 400 - 400, isoMonth, 0) / 864e5 + 146097 * (divTrunc(isoYear, 400) + 1) + isoDay;
|
|
9432
|
+
}
|
|
9433
|
+
|
|
9434
|
+
function epochNanoToIsoDateTime(epochNano) {
|
|
9435
|
+
const [epochDays, nanoAfterDay] = divModFloorBigInt(epochNano, bigNanoInUtcDay);
|
|
9436
|
+
return {
|
|
9437
|
+
...epochDaysToIsoDate(Number(epochDays)),
|
|
9438
|
+
...nanoToTimeFields(Number(nanoAfterDay))
|
|
9439
|
+
};
|
|
9440
|
+
}
|
|
9441
|
+
|
|
9442
|
+
function epochDaysToIsoDate(epochDays) {
|
|
9443
|
+
const legacyDate = new Date(864e5 * modFloor(epochDays, 146097));
|
|
9444
|
+
return {
|
|
9445
|
+
year: legacyDate.getUTCFullYear() + 400 * Math.floor(epochDays / 146097),
|
|
9446
|
+
month: legacyDate.getUTCMonth() + 1,
|
|
9447
|
+
day: legacyDate.getUTCDate()
|
|
9448
|
+
};
|
|
9449
|
+
}
|
|
9450
|
+
|
|
9451
|
+
function computeIsoMonthCodeParts(month) {
|
|
9452
|
+
return [ month, 0 ];
|
|
9453
|
+
}
|
|
9454
|
+
|
|
9455
|
+
function computeIsoFieldsFromParts(year, month, day) {
|
|
9456
|
+
return {
|
|
9457
|
+
year: year,
|
|
9458
|
+
month: month,
|
|
9459
|
+
day: day
|
|
9460
|
+
};
|
|
9461
|
+
}
|
|
9462
|
+
|
|
9463
|
+
function computeIsoDaysInMonth(year, month) {
|
|
9464
|
+
switch (month) {
|
|
9465
|
+
case 2:
|
|
9466
|
+
return computeIsoInLeapYear(year) ? 29 : 28;
|
|
9467
|
+
|
|
9468
|
+
case 4:
|
|
9469
|
+
case 6:
|
|
9470
|
+
case 9:
|
|
9471
|
+
case 11:
|
|
9472
|
+
return 30;
|
|
9473
|
+
}
|
|
9474
|
+
return 31;
|
|
9475
|
+
}
|
|
9476
|
+
|
|
9477
|
+
function computeIsoDaysInYear(year) {
|
|
9478
|
+
return computeIsoInLeapYear(year) ? 366 : 365;
|
|
9479
|
+
}
|
|
9480
|
+
|
|
9481
|
+
function computeIsoInLeapYear(year) {
|
|
9482
|
+
return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
|
|
9483
|
+
}
|
|
9484
|
+
|
|
9485
|
+
function addIsoMonths(year, month, monthDelta) {
|
|
9486
|
+
return year += divTrunc(monthDelta, 12), (month += modTrunc(monthDelta, 12)) < 1 ? (year--,
|
|
9487
|
+
month += 12) : month > 12 && (year++, month -= 12), {
|
|
9488
|
+
year: year,
|
|
9489
|
+
month: month
|
|
9490
|
+
};
|
|
9491
|
+
}
|
|
9492
|
+
|
|
9493
|
+
function computeIsoDayOfWeek(isoDateFields) {
|
|
9494
|
+
return modFloor(isoArgsToEpochDays(isoDateFields.year, isoDateFields.month, isoDateFields.day) + 4, 7) || 7;
|
|
9495
|
+
}
|
|
9496
|
+
|
|
9497
|
+
function computeIsoDayOfYear(isoDateFields) {
|
|
9498
|
+
return isoArgsToEpochDays(isoDateFields.year, isoDateFields.month, isoDateFields.day) - isoArgsToEpochDays(isoDateFields.year) + 1;
|
|
9499
|
+
}
|
|
9500
|
+
|
|
9501
|
+
function computeIsoWeekFields(isoDateFields) {
|
|
9502
|
+
let yearOfWeek = isoDateFields.year;
|
|
9503
|
+
let weekOfYear = Math.floor((computeIsoDayOfYear(isoDateFields) - computeIsoDayOfWeek(isoDateFields) + 10) / 7);
|
|
9504
|
+
let weeksInYear = computeIsoWeeksInYear(yearOfWeek);
|
|
9505
|
+
return weekOfYear < 1 ? weekOfYear = weeksInYear = computeIsoWeeksInYear(--yearOfWeek) : weekOfYear > weeksInYear && (weekOfYear = 1,
|
|
9506
|
+
weeksInYear = computeIsoWeeksInYear(++yearOfWeek)), {
|
|
9507
|
+
weekOfYear: weekOfYear,
|
|
9508
|
+
yearOfWeek: yearOfWeek,
|
|
9509
|
+
Ie: weeksInYear
|
|
9510
|
+
};
|
|
9511
|
+
}
|
|
9512
|
+
|
|
9513
|
+
function computeIsoWeeksInYear(year) {
|
|
9514
|
+
const y0DayOfWeek = computeIsoDayOfWeek({
|
|
9515
|
+
year: year,
|
|
9516
|
+
month: 1,
|
|
9517
|
+
day: 1
|
|
9518
|
+
});
|
|
9519
|
+
return 4 === y0DayOfWeek || 3 === y0DayOfWeek && computeIsoInLeapYear(year) ? 53 : 52;
|
|
9520
|
+
}
|
|
9521
|
+
|
|
9522
|
+
function computeGregoryEraFields({year: year}) {
|
|
9523
|
+
return year < 1 ? {
|
|
9524
|
+
era: "bce",
|
|
9525
|
+
eraYear: 1 - year
|
|
9526
|
+
} : {
|
|
9527
|
+
era: "ce",
|
|
9528
|
+
eraYear: year
|
|
9529
|
+
};
|
|
9530
|
+
}
|
|
9531
|
+
|
|
9532
|
+
function validateIsoDateTimeFields(isoDateTime) {
|
|
9533
|
+
return validateIsoDateFields(isoDateTime), validateTimeFields(isoDateTime);
|
|
9534
|
+
}
|
|
9535
|
+
|
|
9536
|
+
function validateIsoDateFields(isoInternals) {
|
|
9537
|
+
return constrainIsoDateFields(isoInternals, 1), isoInternals;
|
|
9538
|
+
}
|
|
9539
|
+
|
|
9540
|
+
function constrainIsoDateFields(isoDate, overflow) {
|
|
9541
|
+
const {year: year} = isoDate;
|
|
9542
|
+
const month = clampProp(isoDate, "month", 1, 12, overflow);
|
|
9543
|
+
return {
|
|
9544
|
+
year: year,
|
|
9545
|
+
month: month,
|
|
9546
|
+
day: clampProp(isoDate, "day", 1, computeIsoDaysInMonth(year, month), overflow)
|
|
9547
|
+
};
|
|
9548
|
+
}
|
|
9549
|
+
|
|
9550
|
+
function computeCalendarDateFields(calendar, isoDate) {
|
|
9551
|
+
return calendar ? calendar.ie(isoDate) : isoDate;
|
|
9552
|
+
}
|
|
9553
|
+
|
|
9554
|
+
function computeCalendarMonthCodeParts(calendar, year, month) {
|
|
9555
|
+
return calendar ? calendar.O(year, month) : computeIsoMonthCodeParts(month);
|
|
9556
|
+
}
|
|
9557
|
+
|
|
9558
|
+
function computeCalendarEraFields(calendar, isoDate) {
|
|
9559
|
+
return 0 === calendar ? computeGregoryEraFields(isoDate) : calendar ? calendar.h(isoDate) : {};
|
|
9560
|
+
}
|
|
9561
|
+
|
|
9562
|
+
function computeCalendarIsoFieldsFromParts(calendar, year, month, day) {
|
|
9563
|
+
return calendar ? calendar.je(year, month, day) : computeIsoFieldsFromParts(year, month, day);
|
|
9564
|
+
}
|
|
9565
|
+
|
|
9566
|
+
function computeCalendarMonthsInYearForYear(calendar, year) {
|
|
9567
|
+
return calendar ? calendar.k(year) : 12;
|
|
9568
|
+
}
|
|
9569
|
+
|
|
9570
|
+
function computeCalendarDaysInMonthForYearMonth(calendar, year, month) {
|
|
9571
|
+
return calendar ? calendar.p(year, month) : computeIsoDaysInMonth(year, month);
|
|
9572
|
+
}
|
|
9573
|
+
|
|
9574
|
+
function computeCalendarMonthCode(calendar, isoDate) {
|
|
9575
|
+
const {year: year, month: month} = computeCalendarDateFields(calendar, isoDate);
|
|
9576
|
+
const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, year, month);
|
|
9577
|
+
return formatMonthCode(monthCodeNumber, isLeapMonth);
|
|
9578
|
+
}
|
|
9579
|
+
|
|
9580
|
+
function computeCalendarInLeapYear(calendar, isoDate) {
|
|
9581
|
+
const {year: year} = computeCalendarDateFields(calendar, isoDate);
|
|
9582
|
+
return calendar ? calendar.u(year) : computeIsoInLeapYear(year);
|
|
9583
|
+
}
|
|
9584
|
+
|
|
9585
|
+
function computeCalendarMonthsInYear(calendar, isoDate) {
|
|
9586
|
+
const {year: year} = computeCalendarDateFields(calendar, isoDate);
|
|
9587
|
+
return computeCalendarMonthsInYearForYear(calendar, year);
|
|
9588
|
+
}
|
|
9589
|
+
|
|
9590
|
+
function computeCalendarDaysInMonth(calendar, isoDate) {
|
|
9591
|
+
const {year: year, month: month} = computeCalendarDateFields(calendar, isoDate);
|
|
9592
|
+
return computeCalendarDaysInMonthForYearMonth(calendar, year, month);
|
|
9593
|
+
}
|
|
9594
|
+
|
|
9595
|
+
function computeCalendarDaysInYear(calendar, isoDate) {
|
|
9596
|
+
const {year: year} = computeCalendarDateFields(calendar, isoDate);
|
|
9597
|
+
return calendar ? calendar.j(year) : computeIsoDaysInYear(year);
|
|
9598
|
+
}
|
|
9599
|
+
|
|
9600
|
+
function computeCalendarDayOfYear(calendar, isoDate) {
|
|
9601
|
+
if (!calendar) {
|
|
9602
|
+
return computeIsoDayOfYear(isoDate);
|
|
9603
|
+
}
|
|
9604
|
+
const {year: year} = computeCalendarDateFields(calendar, isoDate);
|
|
9605
|
+
const yearStartIsoDate = computeCalendarIsoFieldsFromParts(calendar, year, 1, 1);
|
|
9606
|
+
return isoDateToEpochDays(isoDate) - isoDateToEpochDays(yearStartIsoDate) + 1;
|
|
9607
|
+
}
|
|
9608
|
+
|
|
9609
|
+
function computeCalendarWeekOfYear(calendar, isoDate) {
|
|
9610
|
+
return calendar === isoCalendarImpl ? computeIsoWeekFields(isoDate).weekOfYear : void 0;
|
|
9611
|
+
}
|
|
9612
|
+
|
|
9613
|
+
function computeCalendarYearOfWeek(calendar, isoDate) {
|
|
9614
|
+
return calendar === isoCalendarImpl ? computeIsoWeekFields(isoDate).yearOfWeek : void 0;
|
|
9615
|
+
}
|
|
9616
|
+
|
|
9617
|
+
const durationFieldNamesAsc = /*@__PURE__*/ unitNamesAsc.map(unitName => unitName + "s");
|
|
9618
|
+
|
|
9619
|
+
const durationDateFieldNamesAsc = /*@__PURE__*/ durationFieldNamesAsc.slice(6);
|
|
9620
|
+
|
|
9621
|
+
const durationCalendarFieldNamesAsc = /*@__PURE__*/ durationDateFieldNamesAsc.slice(1);
|
|
9622
|
+
|
|
9623
|
+
const durationFieldDefaults = /*@__PURE__*/ zipPropsConst(durationFieldNamesAsc, 0);
|
|
9624
|
+
|
|
9625
|
+
const requireString = /*@__PURE__*/ bindArgs(requireType, "string");
|
|
9626
|
+
|
|
9627
|
+
function requireType(typeName, arg, entityName = typeName) {
|
|
9628
|
+
return typeof arg !== typeName && throwTypeError(invalidEntity(entityName, arg)),
|
|
9629
|
+
arg;
|
|
9630
|
+
}
|
|
9631
|
+
|
|
9632
|
+
function requireNumberIsInteger(num, entityName = "number") {
|
|
9633
|
+
return Number.isInteger(num) || throwRangeError(((entityName, num) => `Non-integer ${entityName}: ${num}`)(entityName, num)),
|
|
9634
|
+
num || 0;
|
|
9635
|
+
}
|
|
9636
|
+
|
|
9637
|
+
function toString$4(arg) {
|
|
9638
|
+
return "symbol" == typeof arg && throwTypeError("Cannot convert Symbol to string"),
|
|
9639
|
+
String(arg);
|
|
9640
|
+
}
|
|
9641
|
+
|
|
9642
|
+
function toStringViaPrimitive(arg, entityName) {
|
|
9643
|
+
return isObjectLike(arg) ? String(arg) : requireString(arg, entityName);
|
|
9644
|
+
}
|
|
9645
|
+
|
|
9646
|
+
function toStrictInteger(arg, entityName) {
|
|
9647
|
+
return requireNumberIsInteger(toFiniteNumber(arg, entityName), entityName);
|
|
9648
|
+
}
|
|
9649
|
+
|
|
9650
|
+
const overflowMap = {
|
|
9651
|
+
constrain: 0,
|
|
9652
|
+
reject: 1
|
|
9653
|
+
};
|
|
9654
|
+
|
|
9655
|
+
const calendarDisplayMap = {
|
|
9656
|
+
auto: 0,
|
|
9657
|
+
never: 1,
|
|
9658
|
+
critical: 2,
|
|
9659
|
+
always: 3
|
|
9660
|
+
};
|
|
9661
|
+
|
|
9662
|
+
function coerceChoiceOption(optionName, enumNameMap, options, defaultChoice = 0) {
|
|
9663
|
+
const enumArg = options[optionName];
|
|
9664
|
+
if (void 0 === enumArg) {
|
|
9665
|
+
return defaultChoice;
|
|
9666
|
+
}
|
|
9667
|
+
const enumStr = toString$4(enumArg);
|
|
9668
|
+
const enumNum = enumNameMap[enumStr];
|
|
9669
|
+
return void 0 === enumNum && throwRangeError(invalidChoice(optionName, enumStr, enumNameMap)),
|
|
9670
|
+
enumNum;
|
|
9671
|
+
}
|
|
9672
|
+
|
|
9673
|
+
const coerceOverflow = /*@__PURE__*/ bindArgs(coerceChoiceOption, "overflow", overflowMap);
|
|
9674
|
+
|
|
9675
|
+
const coerceCalendarDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, "calendarName", calendarDisplayMap);
|
|
9676
|
+
|
|
9677
|
+
function combineDateAndTime(isoDate, time) {
|
|
9678
|
+
return pluckProps(calendarDateFieldNamesAsc, isoDate, pluckProps(timeFieldNamesAsc, time));
|
|
9679
|
+
}
|
|
9680
|
+
|
|
9681
|
+
function refineOverflowOptions(options) {
|
|
9682
|
+
return void 0 === options ? 0 : coerceOverflow(requireObjectLike(options));
|
|
9683
|
+
}
|
|
9684
|
+
|
|
9685
|
+
const epochNanoMax = /*@__PURE__*/ BigInt(1e8) * bigNanoInUtcDay;
|
|
9686
|
+
|
|
9687
|
+
const epochNanoMin = /*@__PURE__*/ BigInt(-1e8) * bigNanoInUtcDay;
|
|
9688
|
+
|
|
9689
|
+
const plainDateEpochNanoMin = epochNanoMin - bigNanoInUtcDay;
|
|
9690
|
+
|
|
9691
|
+
const isoYearMonthIndexMin = -3261848;
|
|
9692
|
+
|
|
9693
|
+
function checkIsoYearMonthInBounds(isoDate) {
|
|
9694
|
+
const isoYearMonthIndex = 12 * isoDate.year + isoDate.month;
|
|
9695
|
+
return (isoYearMonthIndex < isoYearMonthIndexMin || isoYearMonthIndex > 3309129) && throwRangeError(outOfBoundsDate),
|
|
9696
|
+
isoDate;
|
|
9697
|
+
}
|
|
9698
|
+
|
|
9699
|
+
function checkIsoDateInBounds(isoDate, allowPlainDateLowerEdge = 1) {
|
|
9700
|
+
return checkIsoDateEpochNanoInBounds(isoDateToEpochNano(isoDate), allowPlainDateLowerEdge),
|
|
9701
|
+
isoDate;
|
|
9702
|
+
}
|
|
9703
|
+
|
|
9704
|
+
function checkIsoDateTimeInBounds(isoDateTime) {
|
|
9705
|
+
const epochNano = isoDateToEpochNano(isoDateTime);
|
|
9706
|
+
return checkIsoDateEpochNanoInBounds(epochNano), epochNano !== plainDateEpochNanoMin || timeFieldsToNano(isoDateTime) || throwRangeError(outOfBoundsDate),
|
|
9707
|
+
isoDateTime;
|
|
9708
|
+
}
|
|
9709
|
+
|
|
9710
|
+
function checkIsoDateEpochNanoInBounds(epochNano, allowPlainDateLowerEdge = 1) {
|
|
9711
|
+
(epochNano < (allowPlainDateLowerEdge ? plainDateEpochNanoMin : epochNanoMin) || epochNano > epochNanoMax) && throwRangeError(outOfBoundsDate);
|
|
9712
|
+
}
|
|
9713
|
+
|
|
9714
|
+
function checkEpochNanoInBounds(epochNano) {
|
|
9715
|
+
return (epochNano < epochNanoMin || epochNano > epochNanoMax) && throwRangeError(outOfBoundsDate),
|
|
9716
|
+
epochNano;
|
|
9717
|
+
}
|
|
9718
|
+
|
|
9719
|
+
function isoDateTimeAndOffsetToEpochNano(isoDateTime, offsetNano) {
|
|
9720
|
+
return checkEpochNanoInBounds(isoDateToEpochNano(isoDateTime) + BigInt(timeFieldsToNano(isoDateTime) - offsetNano));
|
|
9721
|
+
}
|
|
9722
|
+
|
|
9723
|
+
function createDateSlots(isoDate, calendar) {
|
|
9724
|
+
return pluckProps(calendarDateFieldNamesAsc, isoDate, {
|
|
9725
|
+
calendar: calendar
|
|
9726
|
+
});
|
|
9727
|
+
}
|
|
9728
|
+
|
|
9729
|
+
function createDurationSlots(durationFields) {
|
|
9730
|
+
return pluckProps(durationFieldNamesAsc, durationFields, {
|
|
9731
|
+
sign: computeDurationSign(durationFields)
|
|
9732
|
+
});
|
|
9733
|
+
}
|
|
9734
|
+
|
|
9735
|
+
function moveYearMonth(doSubtract, calendar, isoDateFields, durationSlots, options) {
|
|
9736
|
+
const overflow = refineOverflowOptions(options);
|
|
9737
|
+
durationSlots.sign && getMaxDurationUnit(durationSlots) < 8 && throwRangeError("Cannot use small units");
|
|
9738
|
+
const startOfMonthFields = checkIsoDateInBounds(moveToStartOfMonth(calendar, isoDateFields));
|
|
9739
|
+
return moveToStartOfMonth(calendar, dateAddWithOverflow(calendar, startOfMonthFields, durationSlots, overflow));
|
|
9740
|
+
}
|
|
9741
|
+
|
|
9742
|
+
function moveToStartOfMonth(calendar, isoDateFields) {
|
|
9743
|
+
return moveByDays(isoDateFields, 1 - computeCalendarDateFields(calendar, isoDateFields).day);
|
|
9744
|
+
}
|
|
9745
|
+
|
|
9746
|
+
function moveByDays(isoDate, days) {
|
|
9747
|
+
return days ? epochDaysToIsoDate(isoDateToEpochDays(isoDate) + days) : isoDate;
|
|
9748
|
+
}
|
|
9749
|
+
|
|
9750
|
+
function dateAddWithOverflow(calendar, isoDateFields, durationFields, overflow) {
|
|
9751
|
+
let {years: years, months: months, weeks: weeks, days: days} = durationFields;
|
|
9752
|
+
let isoDate;
|
|
9753
|
+
if (days += Number(durationTimeToBigNano(durationFields) / bigNanoInUtcDay), years || months) {
|
|
9754
|
+
isoDate = addDateMonths(calendar, isoDateFields, years, months, overflow);
|
|
9755
|
+
} else {
|
|
9756
|
+
if (!weeks && !days) {
|
|
9757
|
+
return isoDateFields;
|
|
9758
|
+
}
|
|
9759
|
+
isoDate = isoDateFields;
|
|
9760
|
+
}
|
|
9761
|
+
return (weeks || days) && (isoDate = moveByDays(isoDate, 7 * weeks + days)), checkIsoDateInBounds(isoDate);
|
|
9762
|
+
}
|
|
9763
|
+
|
|
9764
|
+
function addDateMonths(calendar, isoDateFields, years, months, overflow) {
|
|
9765
|
+
const dateParts = computeCalendarDateFields(calendar, isoDateFields);
|
|
9766
|
+
let {year: year, month: month, day: day} = dateParts;
|
|
9767
|
+
if (years) {
|
|
9768
|
+
const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, year, month);
|
|
9769
|
+
year += years, month = computeYearMovedMonth(calendar, monthCodeNumber, isLeapMonth, calendar ? calendar.q(year) : void 0, overflow),
|
|
9770
|
+
month = clampEntity("month", month, 1, computeCalendarMonthsInYearForYear(calendar, year), overflow);
|
|
9771
|
+
}
|
|
9772
|
+
if (months) {
|
|
9773
|
+
const yearMonthParts = calendar ? calendar.N(year, month, months) : addIsoMonths(year, month, months);
|
|
9774
|
+
({year: year, month: month} = yearMonthParts);
|
|
9775
|
+
}
|
|
9776
|
+
return day = clampEntity("day", day, 1, computeCalendarDaysInMonthForYearMonth(calendar, year, month), overflow),
|
|
9777
|
+
computeCalendarIsoFieldsFromParts(calendar, year, month, day);
|
|
9778
|
+
}
|
|
9779
|
+
|
|
9780
|
+
function computeYearMovedMonth(calendar, monthCodeNumber, isLeapMonth, targetLeapMonth, overflow) {
|
|
9781
|
+
if (isLeapMonth) {
|
|
9782
|
+
const leapMonthMeta = calendar ? calendar.m : void 0;
|
|
9783
|
+
return void 0 !== targetLeapMonth && (leapMonthMeta < 0 || targetLeapMonth === monthCodeNumber + 1) ? targetLeapMonth : (1 === overflow && throwRangeError(invalidLeapMonth),
|
|
9784
|
+
leapMonthMeta < 0 ? -leapMonthMeta : monthCodeNumber);
|
|
9785
|
+
}
|
|
9786
|
+
return monthCodeNumberToMonth(monthCodeNumber, 0, targetLeapMonth);
|
|
9787
|
+
}
|
|
9788
|
+
|
|
9789
|
+
function computeDurationSign(fields, fieldNames = durationFieldNamesAsc) {
|
|
9790
|
+
let sign = 0;
|
|
9791
|
+
for (const fieldName of fieldNames) {
|
|
9792
|
+
const fieldSign = Math.sign(fields[fieldName]);
|
|
9793
|
+
fieldSign && (sign && sign !== fieldSign && throwRangeError("Cannot mix duration signs"),
|
|
9794
|
+
sign = fieldSign);
|
|
9795
|
+
}
|
|
9796
|
+
return sign;
|
|
9797
|
+
}
|
|
9798
|
+
|
|
9799
|
+
function validateDurationFields(fields) {
|
|
9800
|
+
for (const calendarUnit of durationCalendarFieldNamesAsc) {
|
|
9801
|
+
clampEntity(calendarUnit, fields[calendarUnit], -4294967295, 4294967295, 1);
|
|
9802
|
+
}
|
|
9803
|
+
const bigNano = durationDayTimeToBigNano(fields);
|
|
9804
|
+
return validateDurationTimeUnit(Number(bigNano / bigNanoInSec)), fields;
|
|
9805
|
+
}
|
|
9806
|
+
|
|
9807
|
+
function validateDurationTimeUnit(n) {
|
|
9808
|
+
Number.isSafeInteger(n) || throwRangeError("Out-of-bounds duration");
|
|
9809
|
+
}
|
|
9810
|
+
|
|
9811
|
+
function durationDayTimeToBigNano(fields) {
|
|
9812
|
+
return BigInt(fields.days) * bigNanoInUtcDay + durationTimeToBigNano(fields);
|
|
9813
|
+
}
|
|
9814
|
+
|
|
9815
|
+
function durationTimeToBigNano(fields) {
|
|
9816
|
+
return BigInt(fields.hours) * bigNanoInHour + BigInt(fields.minutes) * bigNanoInMinute + durationSubMinuteToBigNano(fields);
|
|
9817
|
+
}
|
|
9818
|
+
|
|
9819
|
+
function durationSubMinuteToBigNano(fields) {
|
|
9820
|
+
return BigInt(fields.seconds) * bigNanoInSec + BigInt(fields.milliseconds) * bigNanoInMilli + BigInt(fields.microseconds) * bigNanoInMicro + BigInt(fields.nanoseconds);
|
|
9821
|
+
}
|
|
9822
|
+
|
|
9823
|
+
function getMaxDurationUnit(fields) {
|
|
9824
|
+
let unit = 9;
|
|
9825
|
+
for (;unit > 0 && !fields[durationFieldNamesAsc[unit]]; unit--) {}
|
|
9826
|
+
return unit;
|
|
9827
|
+
}
|
|
9828
|
+
|
|
9829
|
+
function compareIsoDateFields(isoFields0, isoFields1) {
|
|
9830
|
+
return compareNumbers(isoDateToEpochDays(isoFields0), isoDateToEpochDays(isoFields1));
|
|
9831
|
+
}
|
|
9832
|
+
|
|
9833
|
+
function getCalendarEraOrigins(calendar) {
|
|
9834
|
+
return 0 === calendar ? gregoryEraOrigins : calendar ? calendar.l : void 0;
|
|
9835
|
+
}
|
|
9836
|
+
|
|
9837
|
+
function getCalendarFieldNames(calendar, fieldNames, fieldNamesWithEra = fieldNames) {
|
|
9838
|
+
return getCalendarEraOrigins(calendar) ? fieldNamesWithEra : fieldNames;
|
|
9839
|
+
}
|
|
9840
|
+
|
|
9841
|
+
function resolveCalendarYear(calendar, fields) {
|
|
9842
|
+
const exoticCalendar = calendar || void 0;
|
|
9843
|
+
const eraOrigins = getCalendarEraOrigins(calendar);
|
|
9844
|
+
let {era: era, eraYear: eraYear, year: year} = fields;
|
|
9845
|
+
if (void 0 !== year && (year = toIntegerWithTrunc(year, "year")), void 0 !== eraYear && (eraYear = toIntegerWithTrunc(eraYear, "eraYear")),
|
|
9846
|
+
void 0 !== era || void 0 !== eraYear) {
|
|
9847
|
+
void 0 !== era && void 0 !== eraYear || throwTypeError("Mismatching era/eraYear"),
|
|
9848
|
+
eraOrigins || throwRangeError("Forbidden era/eraYear");
|
|
9849
|
+
const normalizedEra = normalizeEraName(era);
|
|
9850
|
+
const eraOrigin = eraOrigins[normalizedEra];
|
|
9851
|
+
void 0 === eraOrigin && throwRangeError((era => `Invalid era: ${era}`)(era));
|
|
9852
|
+
const yearByEra = exoticCalendar?.te ? exoticCalendar.te(eraYear, normalizedEra, eraOrigin) : eraYearToYear(eraYear, eraOrigin);
|
|
9853
|
+
void 0 !== year && year !== yearByEra && throwRangeError("Mismatching year/eraYear"),
|
|
9854
|
+
year = yearByEra;
|
|
9855
|
+
} else {
|
|
9856
|
+
void 0 === year && throwTypeError(missingYear(eraOrigins));
|
|
9857
|
+
}
|
|
9858
|
+
return year;
|
|
9859
|
+
}
|
|
9860
|
+
|
|
9861
|
+
function resolveCalendarMonth(calendar, fields, year, overflow, monthCodeParts) {
|
|
9862
|
+
let {month: month, monthCode: monthCode} = fields;
|
|
9863
|
+
if (void 0 !== monthCode) {
|
|
9864
|
+
const monthByCode = ((calendar, monthCode, year, overflow, monthCodeParts = parseMonthCode(monthCode)) => {
|
|
9865
|
+
const leapMonth = calendar ? calendar.q(year) : void 0;
|
|
9866
|
+
const [monthCodeNumber, wantsLeapMonth] = monthCodeParts;
|
|
9867
|
+
let month = monthCodeNumberToMonth(monthCodeNumber, wantsLeapMonth, leapMonth);
|
|
9868
|
+
if (wantsLeapMonth) {
|
|
9869
|
+
const leapMonthMeta = calendar ? calendar.m : void 0;
|
|
9870
|
+
void 0 === leapMonthMeta && throwRangeError(invalidLeapMonth), leapMonthMeta > 0 ? (month > leapMonthMeta && throwRangeError(invalidLeapMonth),
|
|
9871
|
+
leapMonth !== month && (1 === overflow && throwRangeError(invalidLeapMonth), month = monthCodeNumberToMonth(monthCodeNumber, 0, leapMonth))) : (month !== -leapMonthMeta && throwRangeError(invalidLeapMonth),
|
|
9872
|
+
void 0 === leapMonth && 1 === overflow && throwRangeError(invalidLeapMonth));
|
|
9873
|
+
}
|
|
9874
|
+
return month;
|
|
9875
|
+
})(calendar, monthCode, year, overflow, monthCodeParts);
|
|
9876
|
+
void 0 !== month && month !== monthByCode && throwRangeError("Mismatching month/monthCode"),
|
|
9877
|
+
month = monthByCode, overflow = 1;
|
|
9878
|
+
} else {
|
|
9879
|
+
void 0 === month && throwTypeError("Missing month/monthCode");
|
|
9880
|
+
}
|
|
9881
|
+
return clampEntity("month", month, 1, computeCalendarMonthsInYearForYear(calendar, year), overflow);
|
|
9882
|
+
}
|
|
9883
|
+
|
|
9884
|
+
function resolveCalendarDay(calendar, fields, month, year, overflow) {
|
|
9885
|
+
return clampProp(fields, "day", 1, computeCalendarDaysInMonthForYearMonth(calendar, year, month), overflow);
|
|
9886
|
+
}
|
|
9887
|
+
|
|
9888
|
+
function eraYearToYear(eraYear, eraOrigin) {
|
|
9889
|
+
return (eraOrigin + eraYear) * (Math.sign(eraOrigin) || 1) || 0;
|
|
9890
|
+
}
|
|
9891
|
+
|
|
9892
|
+
const offsetRegExp = /*@__PURE__*/ createRegExp("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");
|
|
9893
|
+
|
|
9894
|
+
function parseOffsetNanoMaybe(s, onlyHourMinute) {
|
|
9895
|
+
const parts = offsetRegExp.exec(s);
|
|
9896
|
+
if (parts && (s => (s => {
|
|
9897
|
+
"T" !== s[0] && "t" !== s[0] || (s = s.slice(1));
|
|
9898
|
+
const fractionIndex = s.search(/[.,]/);
|
|
9899
|
+
const main = fractionIndex < 0 ? s : s.slice(0, fractionIndex);
|
|
9900
|
+
const parts = main.split(":");
|
|
9901
|
+
return 1 === parts.length ? /^(?:\d{2}|\d{4}|\d{6})$/i.test(main) : (2 === parts.length || 3 === parts.length) && parts.every(part => 2 === part.length && /^\d{2}$/i.test(part));
|
|
9902
|
+
})(s.slice(1)))(parts[0])) {
|
|
9903
|
+
return ((parts, onlyHourMinute) => {
|
|
9904
|
+
const firstSubMinutePart = parts[4] || parts[5];
|
|
9905
|
+
firstSubMinutePart && throwRangeError(invalidSubstring(firstSubMinutePart));
|
|
9906
|
+
const offsetNanoPos = parseInt0(parts[2]) * nanoInHour + parseInt0(parts[3]) * nanoInMinute + parseInt0(parts[4]) * nanoInSec + parseSubsecNano(parts[5] || "");
|
|
9907
|
+
return offsetNano = offsetNanoPos * parseSign(parts[1]), Math.abs(offsetNano) >= nanoInUtcDay && throwRangeError("Out-of-bounds offset"),
|
|
9908
|
+
offsetNano;
|
|
9909
|
+
var offsetNano;
|
|
9910
|
+
})(parts);
|
|
9911
|
+
}
|
|
9912
|
+
}
|
|
9913
|
+
|
|
9914
|
+
const dateFieldRefiners = {
|
|
9915
|
+
era: toStringViaPrimitive,
|
|
9916
|
+
month: toPositiveIntegerWithTruncation,
|
|
9917
|
+
monthCode(monthCode, entityName = "monthCode") {
|
|
9918
|
+
return ((monthCode, entityName) => {
|
|
9919
|
+
if ("string" == typeof monthCode) {
|
|
9920
|
+
return monthCode;
|
|
9921
|
+
}
|
|
9922
|
+
if (monthCode && "object" == typeof monthCode) {
|
|
9923
|
+
const monthCodeToString = monthCode.toString;
|
|
9924
|
+
if ("function" == typeof monthCodeToString) {
|
|
9925
|
+
return requireString(monthCodeToString.call(monthCode), entityName);
|
|
9926
|
+
}
|
|
9927
|
+
}
|
|
9928
|
+
return requireString(monthCode, entityName);
|
|
9929
|
+
})(monthCode, entityName);
|
|
9930
|
+
},
|
|
9931
|
+
day: toPositiveIntegerWithTruncation
|
|
9932
|
+
};
|
|
9933
|
+
|
|
9934
|
+
function readAndRefineBagFields(bag, validFieldNames, fieldRefiners, requiredFieldNames, disallowEmpty = !requiredFieldNames) {
|
|
9935
|
+
const res = {};
|
|
9936
|
+
let anyMatching = 0;
|
|
9937
|
+
for (const fieldName of validFieldNames) {
|
|
9938
|
+
let fieldVal = bag[fieldName];
|
|
9939
|
+
if (void 0 !== fieldVal) {
|
|
9940
|
+
anyMatching = 1;
|
|
9941
|
+
const refiner = fieldRefiners[fieldName];
|
|
9942
|
+
refiner && (fieldVal = refiner(fieldVal, fieldName)), res[fieldName] = fieldVal;
|
|
9943
|
+
} else {
|
|
9944
|
+
requiredFieldNames && requiredFieldNames.includes(fieldName) && throwTypeError(missingField(fieldName));
|
|
9945
|
+
}
|
|
9946
|
+
}
|
|
9947
|
+
return disallowEmpty && !anyMatching && throwTypeError(noValidFields(validFieldNames)),
|
|
9948
|
+
res;
|
|
9949
|
+
}
|
|
9950
|
+
|
|
9951
|
+
function createPlainDateFromFields(calendar, fields, options) {
|
|
9952
|
+
return createPlainDateFromPreparedFields(calendar, fields, prepareDateFields(calendar, fields), refineOverflowOptions(options));
|
|
9953
|
+
}
|
|
9954
|
+
|
|
9955
|
+
function createPlainDateFromPreparedFields(calendar, fields, prepared, overflow) {
|
|
9956
|
+
const year = prepared[1];
|
|
9957
|
+
const month = resolveCalendarMonth(calendar, fields, year, overflow, prepared[0]);
|
|
9958
|
+
return createDateSlots(checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, year, month, resolveCalendarDay(calendar, fields, month, year, overflow))), calendar);
|
|
9959
|
+
}
|
|
9960
|
+
|
|
9961
|
+
function parseMonthCodeField(fields) {
|
|
9962
|
+
if (void 0 !== fields.monthCode) {
|
|
9963
|
+
return parseMonthCode(fields.monthCode);
|
|
9964
|
+
}
|
|
9965
|
+
}
|
|
9966
|
+
|
|
9967
|
+
function prepareDateFields(calendar, fields) {
|
|
9968
|
+
const eraOrigins = getCalendarEraOrigins(calendar);
|
|
9969
|
+
return void 0 !== fields.year || void 0 !== fields.era && void 0 !== fields.eraYear || throwTypeError(missingYear(eraOrigins)),
|
|
9970
|
+
void 0 === fields.monthCode && void 0 === fields.month && throwTypeError("Missing month/monthCode"),
|
|
9971
|
+
void 0 === fields.day && throwTypeError(missingField("day")), [ parseMonthCodeField(fields), resolveCalendarYear(calendar, fields) ];
|
|
9972
|
+
}
|
|
9973
|
+
|
|
9974
|
+
function createPlainYearMonthFromFields(calendar, fields, options) {
|
|
9975
|
+
const eraOrigins = getCalendarEraOrigins(calendar);
|
|
9976
|
+
void 0 !== fields.year || void 0 !== fields.era && void 0 !== fields.eraYear || throwTypeError(missingYear(eraOrigins)),
|
|
9977
|
+
void 0 === fields.monthCode && void 0 === fields.month && throwTypeError("Missing month/monthCode");
|
|
9978
|
+
const monthCodeParts = parseMonthCodeField(fields);
|
|
9979
|
+
const year = resolveCalendarYear(calendar, fields);
|
|
9980
|
+
return createDateSlots(checkIsoYearMonthInBounds(computeCalendarIsoFieldsFromParts(calendar, year, resolveCalendarMonth(calendar, fields, year, refineOverflowOptions(options), monthCodeParts), 1)), calendar);
|
|
9981
|
+
}
|
|
9982
|
+
|
|
9983
|
+
const RawDateTimeFormat = Intl.DateTimeFormat;
|
|
9984
|
+
|
|
9985
|
+
function formatEpochMilliToPartsRecord(intlFormat, epochMilli) {
|
|
9986
|
+
epochMilli < -864e13 && throwRangeError(outOfBoundsDate);
|
|
9987
|
+
const parts = intlFormat.formatToParts(epochMilli);
|
|
9988
|
+
const hash = {};
|
|
9989
|
+
for (const part of parts) {
|
|
9990
|
+
hash[part.type] = part.value;
|
|
9991
|
+
}
|
|
9992
|
+
return hash;
|
|
9993
|
+
}
|
|
9994
|
+
|
|
9995
|
+
const timeZonePeriodDaysByName = {
|
|
9996
|
+
"El_Aaiun": 17,
|
|
9997
|
+
"Tucuman": 12,
|
|
9998
|
+
"Tirane": 11,
|
|
9999
|
+
"Riga": 10,
|
|
10000
|
+
"Simferopol": 9,
|
|
10001
|
+
"Vienna": 9,
|
|
10002
|
+
"Tunis": 8,
|
|
10003
|
+
"Boa_Vista": 6,
|
|
10004
|
+
"Fortaleza": 6,
|
|
10005
|
+
"Maceio": 6,
|
|
10006
|
+
"Noronha": 6,
|
|
10007
|
+
"Recife": 6,
|
|
10008
|
+
"Gaza": 6,
|
|
10009
|
+
"Hebron": 6,
|
|
10010
|
+
"DeNoronha": 6
|
|
10011
|
+
};
|
|
10012
|
+
|
|
10013
|
+
const minPossibleTransitionSec = -388152e4;
|
|
10014
|
+
|
|
10015
|
+
function refineDateDisplayOptions(options) {
|
|
10016
|
+
return coerceCalendarDisplay(normalizeOptions(options));
|
|
10017
|
+
}
|
|
10018
|
+
|
|
10019
|
+
function formatPlainDateIso(plainDateSlots, options) {
|
|
10020
|
+
return calendar = plainDateSlots.calendar, isoDate = plainDateSlots, calendarDisplay = refineDateDisplayOptions(options),
|
|
10021
|
+
formatIsoDateFields(isoDate) + formatCalendar(calendar, calendarDisplay);
|
|
10022
|
+
var calendar, isoDate, calendarDisplay;
|
|
10023
|
+
}
|
|
10024
|
+
|
|
10025
|
+
function formatDateIsoAuto(plainDateSlots) {
|
|
10026
|
+
return formatIsoDateFields(plainDateSlots) + (plainDateSlots.calendar === isoCalendarImpl ? "" : formatCalendarId(getCalendarSlotId(plainDateSlots.calendar), 0));
|
|
10027
|
+
}
|
|
10028
|
+
|
|
10029
|
+
function formatPlainYearMonthIso(plainYearMonthSlots, options) {
|
|
10030
|
+
return formatDateLikeIso(plainYearMonthSlots.calendar, formatIsoYearMonthFields, plainYearMonthSlots, refineDateDisplayOptions(options));
|
|
10031
|
+
}
|
|
10032
|
+
|
|
10033
|
+
function formatYearMonthIsoAuto(plainYearMonthSlots) {
|
|
10034
|
+
const calendar = plainYearMonthSlots.calendar;
|
|
10035
|
+
return calendar !== isoCalendarImpl ? formatIsoDateFields(plainYearMonthSlots) + formatCalendarId(getCalendarSlotId(calendar), 0) : formatIsoYearMonthFields(plainYearMonthSlots);
|
|
10036
|
+
}
|
|
10037
|
+
|
|
10038
|
+
function formatDateLikeIso(calendar, formatSimple, isoDate, calendarDisplay) {
|
|
10039
|
+
const showCalendar = calendarDisplay > 1 || 0 === calendarDisplay && calendar !== isoCalendarImpl;
|
|
10040
|
+
return 1 === calendarDisplay ? calendar === isoCalendarImpl ? formatSimple(isoDate) : formatIsoDateFields(isoDate) : showCalendar ? formatIsoDateFields(isoDate) + formatCalendarId(getCalendarSlotId(calendar), 2 === calendarDisplay) : formatSimple(isoDate);
|
|
10041
|
+
}
|
|
10042
|
+
|
|
10043
|
+
function formatIsoDateFields(isoDateFields) {
|
|
10044
|
+
return formatIsoYearMonthFields(isoDateFields) + "-" + padNumber2(isoDateFields.day);
|
|
10045
|
+
}
|
|
10046
|
+
|
|
10047
|
+
function formatIsoYearMonthFields(isoDateFields) {
|
|
10048
|
+
const {year: year} = isoDateFields;
|
|
10049
|
+
return (year < 0 || year > 9999 ? getSignStr(year) + padNumber(6, Math.abs(year)) : padNumber(4, year)) + "-" + padNumber2(isoDateFields.month);
|
|
10050
|
+
}
|
|
10051
|
+
|
|
10052
|
+
function formatOffsetNano(offsetNano, offsetDisplay = 0) {
|
|
10053
|
+
if (1 === offsetDisplay) {
|
|
10054
|
+
return "";
|
|
10055
|
+
}
|
|
10056
|
+
const [hour, nanoRemainder0] = divModFloor(Math.abs(offsetNano), nanoInHour);
|
|
10057
|
+
const [minute, nanoRemainder1] = divModFloor(nanoRemainder0, nanoInMinute);
|
|
10058
|
+
const [second, nanoRemainder2] = divModFloor(nanoRemainder1, nanoInSec);
|
|
10059
|
+
return getSignStr(offsetNano) + padNumber2(hour) + ":" + padNumber2(minute) + (second || nanoRemainder2 ? ":" + padNumber2(second) + formatSubsecNano(nanoRemainder2) : "");
|
|
10060
|
+
}
|
|
10061
|
+
|
|
10062
|
+
function formatCalendar(calendar, calendarDisplay) {
|
|
10063
|
+
return calendarDisplay > 1 || 0 === calendarDisplay && calendar !== isoCalendarImpl ? formatCalendarId(getCalendarSlotId(calendar), 2 === calendarDisplay) : "";
|
|
10064
|
+
}
|
|
10065
|
+
|
|
10066
|
+
function formatCalendarId(calendarId, isCritical) {
|
|
10067
|
+
return "[" + (isCritical ? "!" : "") + "u-ca=" + calendarId + "]";
|
|
10068
|
+
}
|
|
10069
|
+
|
|
10070
|
+
const trailingZerosRE = /0+$/;
|
|
10071
|
+
|
|
10072
|
+
function formatSubsecNano(totalNano, subsecDigits) {
|
|
10073
|
+
let s = padNumber(9, totalNano);
|
|
10074
|
+
return s = s.replace(trailingZerosRE, "") ,
|
|
10075
|
+
s ? "." + s : "";
|
|
10076
|
+
}
|
|
10077
|
+
|
|
10078
|
+
function getSignStr(num) {
|
|
10079
|
+
return num < 0 ? "-" : "+";
|
|
10080
|
+
}
|
|
10081
|
+
|
|
10082
|
+
const icuRegExp = /^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/;
|
|
10083
|
+
|
|
10084
|
+
const badCharactersRegExp = /[^\w\/:+-]+/;
|
|
10085
|
+
|
|
10086
|
+
function refineTimeZoneId(rawId) {
|
|
10087
|
+
return resolveTimeZoneId(requireString(rawId));
|
|
10088
|
+
}
|
|
10089
|
+
|
|
10090
|
+
function resolveTimeZoneId(rawId) {
|
|
10091
|
+
return resolveTimeZoneRecord(rawId).id;
|
|
10092
|
+
}
|
|
10093
|
+
|
|
10094
|
+
function resolveTimeZoneRecord(rawId) {
|
|
10095
|
+
const upperRawId = rawId.toUpperCase();
|
|
10096
|
+
const offsetRecord = (upperRawId => {
|
|
10097
|
+
const offsetNano = parseOffsetNanoMaybe(upperRawId);
|
|
10098
|
+
if (void 0 !== offsetNano) {
|
|
10099
|
+
return {
|
|
10100
|
+
id: formatOffsetNano(offsetNano),
|
|
10101
|
+
_: offsetNano,
|
|
10102
|
+
o: offsetNano
|
|
10103
|
+
};
|
|
10104
|
+
}
|
|
10105
|
+
})(upperRawId);
|
|
10106
|
+
if (offsetRecord) {
|
|
10107
|
+
return {
|
|
10108
|
+
kind: "fixed",
|
|
10109
|
+
...offsetRecord
|
|
10110
|
+
};
|
|
10111
|
+
}
|
|
10112
|
+
const normId = "UTC" === upperRawId ? "UTC" : (rawId => (badCharactersRegExp.test(rawId) && throwRangeError(invalidTimeZone(rawId)),
|
|
10113
|
+
icuRegExp.test(rawId) && throwRangeError("Forbidden ICU TimeZone"), rawId.toLowerCase().split("/").map((part, partI) => (part.length <= 3 || /\d/.test(part)) && !/etc|yap/.test(part) ? part.toUpperCase() : part.replace(/baja|dumont|[a-z]+/g, (a, i) => a.length <= 2 && !partI || "in" === a || "chat" === a ? a.toUpperCase() : a.length > 2 || !i ? capitalize(a).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : a)).join("/")))(rawId);
|
|
10114
|
+
return queryNamedTimeZoneRecord(normId);
|
|
10115
|
+
}
|
|
10116
|
+
|
|
10117
|
+
const queryNamedTimeZoneRecord = /*@__PURE__*/ memoize(normId => {
|
|
10118
|
+
if ("UTC" === normId) {
|
|
10119
|
+
return {
|
|
10120
|
+
kind: "utc",
|
|
10121
|
+
id: normId,
|
|
10122
|
+
o: normId
|
|
10123
|
+
};
|
|
10124
|
+
}
|
|
10125
|
+
const upperNormId = normId.toUpperCase();
|
|
10126
|
+
const format = queryTimeZoneIntlFormat(upperNormId);
|
|
10127
|
+
return {
|
|
10128
|
+
kind: "named",
|
|
10129
|
+
id: normId,
|
|
10130
|
+
format: format,
|
|
10131
|
+
o: format.resolvedOptions().timeZone
|
|
10132
|
+
};
|
|
10133
|
+
});
|
|
10134
|
+
|
|
10135
|
+
const queryTimeZoneIntlFormat = /*@__PURE__*/ memoize(upperNormId => new RawDateTimeFormat("en-u-hc-h23", {
|
|
10136
|
+
calendar: "iso8601",
|
|
10137
|
+
timeZone: upperNormId,
|
|
10138
|
+
era: "short",
|
|
10139
|
+
year: "numeric",
|
|
10140
|
+
month: "numeric",
|
|
10141
|
+
day: "numeric",
|
|
10142
|
+
hour: "numeric",
|
|
10143
|
+
minute: "numeric",
|
|
10144
|
+
second: "numeric"
|
|
10145
|
+
}));
|
|
10146
|
+
|
|
10147
|
+
function queryTimeZone(rawTimeZoneId) {
|
|
10148
|
+
const record = resolveTimeZoneRecord(rawTimeZoneId);
|
|
10149
|
+
return queryTimeZoneRecord(record.id, record);
|
|
10150
|
+
}
|
|
10151
|
+
|
|
10152
|
+
const queryTimeZoneRecord = /*@__PURE__*/ memoize((normTimeZoneId, record) => "named" === record.kind ? new IntlTimeZone(normTimeZoneId, record.o, record.format) : new FixedTimeZone(normTimeZoneId, record.o, "fixed" === record.kind ? record._ : 0));
|
|
10153
|
+
|
|
10154
|
+
class FixedTimeZone {
|
|
10155
|
+
constructor(id, compareKey, offsetNano) {
|
|
10156
|
+
this.id = id, this.o = compareKey, this._ = offsetNano;
|
|
10157
|
+
}
|
|
10158
|
+
C() {
|
|
10159
|
+
return this._;
|
|
10160
|
+
}
|
|
10161
|
+
R(isoDateTime) {
|
|
10162
|
+
return [ isoDateTimeAndOffsetToEpochNano(isoDateTime, this._) ];
|
|
10163
|
+
}
|
|
10164
|
+
U() {}
|
|
10165
|
+
}
|
|
10166
|
+
|
|
10167
|
+
class IntlTimeZone {
|
|
10168
|
+
constructor(id, compareKey, format) {
|
|
10169
|
+
this.id = id, this.o = compareKey, this.qe = ((computeOffsetSec, periodDays) => {
|
|
10170
|
+
const getSample = memoize(computeOffsetSec);
|
|
10171
|
+
const getSplit = memoize(createSplitTuple);
|
|
10172
|
+
const periodSec = 86400 * periodDays;
|
|
10173
|
+
function getOffsetSec(epochSec) {
|
|
10174
|
+
const [startEpochSec, endEpochSec] = computePeriod(epochSec, periodSec);
|
|
10175
|
+
const clampedStartEpochSec = clampIntlSampleEpochSec(startEpochSec);
|
|
10176
|
+
const clampedEndEpochSec = clampIntlSampleEpochSec(endEpochSec);
|
|
10177
|
+
const startOffsetSec = getSample(clampedStartEpochSec);
|
|
10178
|
+
const endOffsetSec = getSample(clampedEndEpochSec);
|
|
10179
|
+
return startOffsetSec === endOffsetSec ? startOffsetSec : pinch(getSplit(clampedStartEpochSec, clampedEndEpochSec), startOffsetSec, endOffsetSec, epochSec);
|
|
10180
|
+
}
|
|
10181
|
+
function pinch(split, startOffsetSec, endOffsetSec, forEpochSec) {
|
|
10182
|
+
let offsetSec;
|
|
10183
|
+
let splitDurSec;
|
|
10184
|
+
for (;(void 0 === forEpochSec || void 0 === (offsetSec = forEpochSec < split[0] ? startOffsetSec : forEpochSec >= split[1] ? endOffsetSec : void 0)) && (splitDurSec = split[1] - split[0]); ) {
|
|
10185
|
+
const middleEpochSec = split[0] + Math.floor(splitDurSec / 2);
|
|
10186
|
+
computeOffsetSec(middleEpochSec) === endOffsetSec ? split[1] = middleEpochSec : split[0] = middleEpochSec + 1;
|
|
10187
|
+
}
|
|
10188
|
+
return offsetSec;
|
|
10189
|
+
}
|
|
10190
|
+
return {
|
|
10191
|
+
Ee(zonedEpochSec) {
|
|
10192
|
+
const wideOffsetSec0 = getOffsetSec(zonedEpochSec - 86400);
|
|
10193
|
+
const wideOffsetSec1 = getOffsetSec(zonedEpochSec + 86400);
|
|
10194
|
+
const wideUtcEpochSec0 = zonedEpochSec - wideOffsetSec0;
|
|
10195
|
+
const wideUtcEpochSec1 = zonedEpochSec - wideOffsetSec1;
|
|
10196
|
+
if (wideOffsetSec0 === wideOffsetSec1) {
|
|
10197
|
+
return [ wideUtcEpochSec0 ];
|
|
10198
|
+
}
|
|
10199
|
+
const narrowOffsetSec0 = getOffsetSec(wideUtcEpochSec0);
|
|
10200
|
+
return narrowOffsetSec0 === getOffsetSec(wideUtcEpochSec1) ? [ zonedEpochSec - narrowOffsetSec0 ] : wideOffsetSec0 > wideOffsetSec1 ? [ wideUtcEpochSec0, wideUtcEpochSec1 ] : [];
|
|
10201
|
+
},
|
|
10202
|
+
De: getOffsetSec,
|
|
10203
|
+
U: function getTransition(epochSec, direction) {
|
|
10204
|
+
if (direction > 0 && epochSec >= 864e10) {
|
|
10205
|
+
return;
|
|
10206
|
+
}
|
|
10207
|
+
if (direction < 0) {
|
|
10208
|
+
if (epochSec <= minPossibleTransitionSec) {
|
|
10209
|
+
return;
|
|
10210
|
+
}
|
|
10211
|
+
const lookaheadEpochSec = getCurrentEpochSec() + 94867200;
|
|
10212
|
+
if (epochSec > lookaheadEpochSec) {
|
|
10213
|
+
return getTransition(lookaheadEpochSec, -1);
|
|
10214
|
+
}
|
|
10215
|
+
}
|
|
10216
|
+
const searchEpochSec = direction > 0 ? Math.max(epochSec, minPossibleTransitionSec) : epochSec;
|
|
10217
|
+
let [startEpochSec, endEpochSec] = computePeriod(searchEpochSec, periodSec);
|
|
10218
|
+
const inc = periodSec * direction;
|
|
10219
|
+
const searchLimit = direction > 0 ? Math.max(epochSec, getCurrentEpochSec()) + 94867200 : minPossibleTransitionSec;
|
|
10220
|
+
const inBounds = () => direction < 0 ? endEpochSec > searchLimit : startEpochSec < searchLimit;
|
|
10221
|
+
for (;inBounds(); ) {
|
|
10222
|
+
const clampedStartEpochSec = clampIntlSampleEpochSec(startEpochSec);
|
|
10223
|
+
const clampedEndEpochSec = clampIntlSampleEpochSec(endEpochSec);
|
|
10224
|
+
const startOffsetSec = getSample(clampedStartEpochSec);
|
|
10225
|
+
const endOffsetSec = getSample(clampedEndEpochSec);
|
|
10226
|
+
if (startOffsetSec !== endOffsetSec) {
|
|
10227
|
+
const split = getSplit(clampedStartEpochSec, clampedEndEpochSec);
|
|
10228
|
+
pinch(split, startOffsetSec, endOffsetSec);
|
|
10229
|
+
const transitionEpochSec = split[0];
|
|
10230
|
+
if ((compareNumbers(transitionEpochSec, epochSec) || 1) === direction) {
|
|
10231
|
+
return transitionEpochSec;
|
|
10232
|
+
}
|
|
10233
|
+
}
|
|
10234
|
+
startEpochSec += inc, endEpochSec += inc;
|
|
10235
|
+
}
|
|
10236
|
+
}
|
|
10237
|
+
};
|
|
10238
|
+
})((format => epochSec => {
|
|
10239
|
+
const intlParts = formatEpochMilliToPartsRecord(format, 1e3 * epochSec);
|
|
10240
|
+
return 86400 * isoArgsToEpochDays((intlParts => {
|
|
10241
|
+
const relatedYear = intlParts.relatedYear;
|
|
10242
|
+
if (void 0 !== relatedYear) {
|
|
10243
|
+
return parseInt(relatedYear);
|
|
10244
|
+
}
|
|
10245
|
+
const year = parseInt(intlParts.year);
|
|
10246
|
+
return void 0 !== intlParts.era && "bce" === normalizeEraName(intlParts.era) ? 1 - year : year;
|
|
10247
|
+
})(intlParts), parseInt(intlParts.month), parseInt(intlParts.day)) + 3600 * parseInt(intlParts.hour) + 60 * parseInt(intlParts.minute) + parseInt(intlParts.second) - epochSec;
|
|
10248
|
+
})(format), (timeZoneId => {
|
|
10249
|
+
const timeZoneName = timeZoneId.split("/").pop();
|
|
10250
|
+
return timeZonePeriodDaysByName[timeZoneName] || 60;
|
|
10251
|
+
})(id));
|
|
10252
|
+
}
|
|
10253
|
+
C(epochNano) {
|
|
10254
|
+
return this.qe.De((epochNano => epochNanoToSecMod(epochNano)[0])(epochNano)) * nanoInSec;
|
|
10255
|
+
}
|
|
10256
|
+
R(isoDateTime) {
|
|
10257
|
+
const zonedEpochSec = 86400 * isoDateToEpochDays(isoDateTime) + timeFieldsToSec(isoDateTime);
|
|
10258
|
+
const subsecNano = timeFieldsToSubsecNano(isoDateTime);
|
|
10259
|
+
return this.qe.Ee(zonedEpochSec).map(epochSec => checkEpochNanoInBounds(BigInt(epochSec) * bigNanoInSec + BigInt(subsecNano)));
|
|
10260
|
+
}
|
|
10261
|
+
U(epochNano, direction) {
|
|
10262
|
+
const [epochSec, subsecNano] = epochNanoToSecMod(epochNano);
|
|
10263
|
+
const resEpochSec = this.qe.U(epochSec + (direction > 0 || subsecNano ? 1 : 0), direction);
|
|
10264
|
+
if (void 0 !== resEpochSec) {
|
|
10265
|
+
return BigInt(resEpochSec) * bigNanoInSec;
|
|
10266
|
+
}
|
|
10267
|
+
}
|
|
10268
|
+
}
|
|
10269
|
+
|
|
10270
|
+
function getCurrentEpochSec() {
|
|
10271
|
+
return Math.floor(Date.now() / 1e3);
|
|
10272
|
+
}
|
|
10273
|
+
|
|
10274
|
+
function createSplitTuple(startEpochSec, endEpochSec) {
|
|
10275
|
+
return [ startEpochSec, endEpochSec ];
|
|
10276
|
+
}
|
|
10277
|
+
|
|
10278
|
+
function computePeriod(epochSec, periodSec) {
|
|
10279
|
+
const startEpochSec = Math.floor(epochSec / periodSec) * periodSec;
|
|
10280
|
+
return [ startEpochSec, startEpochSec + periodSec ];
|
|
10281
|
+
}
|
|
10282
|
+
|
|
10283
|
+
function clampIntlSampleEpochSec(epochSec) {
|
|
10284
|
+
return constrainToRange(epochSec, -1e10, 864e10);
|
|
10285
|
+
}
|
|
10286
|
+
|
|
10287
|
+
function refinePlainDateObjectLike(calendar, bag, options, requireFields = []) {
|
|
10288
|
+
return createPlainDateFromFields(calendar, readAndRefineBagFields(bag, getCalendarFieldNames(calendar, dateFieldNamesAlpha, dateFieldNamesWithEraAlpha), dateFieldRefiners, requireFields), options);
|
|
10289
|
+
}
|
|
10290
|
+
|
|
10291
|
+
function throwFailedParse(s) {
|
|
10292
|
+
throwRangeError(failedParse(s));
|
|
10293
|
+
}
|
|
10294
|
+
|
|
10295
|
+
function parsePlainDate(s, resolveCalendar) {
|
|
10296
|
+
const slots = finalizeDateLike(parsePlainDateLike(requireString(s)), void 0, resolveCalendar);
|
|
10297
|
+
return createDateSlots(slots, slots.calendar);
|
|
10298
|
+
}
|
|
10299
|
+
|
|
10300
|
+
function parsePlainYearMonth(s, resolveCalendar) {
|
|
10301
|
+
const organized = parseYearMonthOnly(requireString(s));
|
|
10302
|
+
if (organized) {
|
|
10303
|
+
return requireIsoCalendar(organized), createDateSlots(checkIsoYearMonthInBounds(validateIsoDateFields(organized)), resolveCalendar(organized.calendarId));
|
|
10304
|
+
}
|
|
10305
|
+
const dateSlots = finalizeDateLike(parsePlainDateLike(s), projectIsoYearMonthDate, resolveCalendar);
|
|
10306
|
+
const {calendar: calendar} = dateSlots;
|
|
10307
|
+
return createDateSlots(moveToStartOfMonth(calendar, dateSlots), calendar);
|
|
10308
|
+
}
|
|
10309
|
+
|
|
10310
|
+
function requireIsoCalendar(organized) {
|
|
10311
|
+
"iso8601" !== organized.calendarId && throwRangeError(invalidSubstring(organized.calendarId));
|
|
10312
|
+
}
|
|
10313
|
+
|
|
10314
|
+
function parsePlainDateLike(s) {
|
|
10315
|
+
const organized = parseDateTimeLike(s);
|
|
10316
|
+
return organized && !organized.F || throwFailedParse(s), organized;
|
|
10317
|
+
}
|
|
10318
|
+
|
|
10319
|
+
function finalizeDateLike(organized, isoDateProjector, resolveCalendar) {
|
|
10320
|
+
return isoDateProjector && "iso8601" === organized.calendarId ? (validateIsoDateFields(organized),
|
|
10321
|
+
organized.fe && validateTimeFields(organized), finalizeDate(isoDateProjector(organized), resolveCalendar)) : organized.fe ? finalizeDateTime(organized, resolveCalendar) : finalizeDate(organized, resolveCalendar);
|
|
10322
|
+
}
|
|
10323
|
+
|
|
10324
|
+
function projectIsoYearMonthDate(organized) {
|
|
10325
|
+
const day = 12 * organized.year + organized.month === isoYearMonthIndexMin ? 20 : 1;
|
|
10326
|
+
return {
|
|
10327
|
+
...organized,
|
|
10328
|
+
day: day
|
|
10329
|
+
};
|
|
10330
|
+
}
|
|
10331
|
+
|
|
10332
|
+
function finalizeDateTime(organized, resolveCalendar) {
|
|
10333
|
+
return validateIsoDateTimeFields(organized), checkIsoDateTimeInBounds(organized),
|
|
10334
|
+
{
|
|
10335
|
+
...combineDateAndTime(organized, organized),
|
|
10336
|
+
calendar: resolveCalendar(organized.calendarId)
|
|
10337
|
+
};
|
|
10338
|
+
}
|
|
10339
|
+
|
|
10340
|
+
function finalizeDate(organized, resolveCalendar) {
|
|
10341
|
+
return validateIsoDateFields(organized), checkIsoDateInBounds(organized), {
|
|
10342
|
+
calendar: resolveCalendar(organized.calendarId),
|
|
10343
|
+
year: organized.year,
|
|
10344
|
+
month: organized.month,
|
|
10345
|
+
day: organized.day
|
|
10346
|
+
};
|
|
10347
|
+
}
|
|
10348
|
+
|
|
10349
|
+
function timeRegExpStr(separatorIndex) {
|
|
10350
|
+
return `(\\d{2})(?:(:?)(\\d{2})(?:\\${separatorIndex}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`;
|
|
10351
|
+
}
|
|
10352
|
+
|
|
10353
|
+
function offsetRegExpStr(separatorIndex) {
|
|
10354
|
+
return "([+-])" + timeRegExpStr(separatorIndex);
|
|
10355
|
+
}
|
|
10356
|
+
|
|
10357
|
+
const dateTimeRegExpStr = "(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]" + timeRegExpStr(8) + "(Z|" + offsetRegExpStr(15) + ")?)?";
|
|
10358
|
+
|
|
10359
|
+
const yearMonthRegExp = /*@__PURE__*/ createRegExp("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
|
|
10360
|
+
|
|
10361
|
+
const dateTimeRegExp = /*@__PURE__*/ createRegExp(dateTimeRegExpStr + "((?:\\[(!?)([^\\]]*)\\]){0,9})");
|
|
10362
|
+
|
|
10363
|
+
const annotationRegExp = /*@__PURE__*/ new RegExp("\\[(!?)([^\\]]*)\\]", "g");
|
|
10364
|
+
|
|
10365
|
+
function parseDateTimeLike(s) {
|
|
10366
|
+
const parts = dateTimeRegExp.exec(s);
|
|
10367
|
+
return parts ? (parts => {
|
|
10368
|
+
const zOrOffset = parts[12];
|
|
10369
|
+
const hasZ = "Z" === (zOrOffset || "").toUpperCase();
|
|
10370
|
+
return {
|
|
10371
|
+
year: organizeIsoYearParts(parts),
|
|
10372
|
+
month: parseInt(parts[5]),
|
|
10373
|
+
day: parseInt(parts[6]),
|
|
10374
|
+
...organizeTimeParts(parts, 7),
|
|
10375
|
+
...organizeAnnotationParts(parts[19]),
|
|
10376
|
+
fe: Boolean(parts[7]),
|
|
10377
|
+
F: hasZ,
|
|
10378
|
+
offset: hasZ ? void 0 : zOrOffset
|
|
10379
|
+
};
|
|
10380
|
+
})(parts) : void 0;
|
|
10381
|
+
}
|
|
10382
|
+
|
|
10383
|
+
function parseYearMonthOnly(s) {
|
|
10384
|
+
const parts = yearMonthRegExp.exec(s);
|
|
10385
|
+
if (parts) {
|
|
10386
|
+
return (parts => ({
|
|
10387
|
+
year: organizeIsoYearParts(parts),
|
|
10388
|
+
month: parseInt(parts[4]),
|
|
10389
|
+
day: 1,
|
|
10390
|
+
...organizeAnnotationParts(parts[5])
|
|
10391
|
+
}))(parts);
|
|
10392
|
+
}
|
|
10393
|
+
}
|
|
10394
|
+
|
|
10395
|
+
function organizeTimeParts(parts, hourIndex) {
|
|
10396
|
+
const second = parseInt0(parts[hourIndex + 3]);
|
|
10397
|
+
return {
|
|
10398
|
+
...nanoToTimeAndDay(parseSubsecNano(parts[hourIndex + 4] || ""))[0],
|
|
10399
|
+
hour: parseInt0(parts[hourIndex]),
|
|
10400
|
+
minute: parseInt0(parts[hourIndex + 2]),
|
|
10401
|
+
second: 60 === second ? 59 : second
|
|
10402
|
+
};
|
|
10403
|
+
}
|
|
10404
|
+
|
|
10405
|
+
function organizeIsoYearParts(parts) {
|
|
10406
|
+
const yearSign = parseSign(parts[1]);
|
|
10407
|
+
const year = parseInt(parts[2] || parts[3]);
|
|
10408
|
+
return yearSign < 0 && !year && throwRangeError(invalidSubstring(-0)), yearSign * year;
|
|
10409
|
+
}
|
|
10410
|
+
|
|
10411
|
+
function organizeAnnotationParts(s) {
|
|
10412
|
+
let calendarIsCritical;
|
|
10413
|
+
let timeZoneId;
|
|
10414
|
+
const calendarIds = [];
|
|
10415
|
+
return s.replace(annotationRegExp, (whole, criticalStr, mainStr) => {
|
|
10416
|
+
const isCritical = Boolean(criticalStr);
|
|
10417
|
+
const [val, name] = mainStr.split("=").reverse();
|
|
10418
|
+
return name ? "u-ca" === name ? (calendarIds.push(val.toLowerCase()), calendarIsCritical || (calendarIsCritical = isCritical)) : (isCritical || /[A-Z]/.test(name)) && throwRangeError(invalidSubstring(whole)) : (timeZoneId && throwRangeError(invalidSubstring(whole)),
|
|
10419
|
+
timeZoneId = val), "";
|
|
10420
|
+
}), calendarIds.length > 1 && calendarIsCritical && throwRangeError(invalidSubstring(s)),
|
|
10421
|
+
{
|
|
10422
|
+
timeZoneId: timeZoneId,
|
|
10423
|
+
calendarId: calendarIds[0] || "iso8601"
|
|
10424
|
+
};
|
|
10425
|
+
}
|
|
10426
|
+
|
|
10427
|
+
function mergeCalendarFields(calendar, baseFields, additionalFields) {
|
|
10428
|
+
const merged = Object.assign(Object.create(null), baseFields);
|
|
10429
|
+
return spliceFields(merged, additionalFields, monthFieldNames), getCalendarEraOrigins(calendar) && (spliceFields(merged, additionalFields, allYearFieldNames),
|
|
10430
|
+
calendar && calendar.le && spliceFields(merged, additionalFields, monthDayFieldNames, eraYearFieldNames)),
|
|
10431
|
+
merged;
|
|
10432
|
+
}
|
|
10433
|
+
|
|
10434
|
+
function spliceFields(dest, additional, allPropNames, deletablePropNames) {
|
|
10435
|
+
let anyMatching = 0;
|
|
10436
|
+
const nonMatchingPropNames = [];
|
|
10437
|
+
for (const propName of allPropNames) {
|
|
10438
|
+
void 0 !== additional[propName] ? anyMatching = 1 : nonMatchingPropNames.push(propName);
|
|
10439
|
+
}
|
|
10440
|
+
if (Object.assign(dest, additional), anyMatching) {
|
|
10441
|
+
for (const deletablePropName of deletablePropNames || nonMatchingPropNames) {
|
|
10442
|
+
delete dest[deletablePropName];
|
|
10443
|
+
}
|
|
10444
|
+
}
|
|
10445
|
+
}
|
|
10446
|
+
|
|
10447
|
+
function convertPlainYearMonthToDate(calendar, input, bag) {
|
|
10448
|
+
return createPlainDateFromMergedFields(calendar, pluckProps(getCalendarFieldNames(calendar, yearMonthCodeFieldNamesAlpha, yearMonthCodeFieldNamesWithEraAlpha), input), readAndRefineBagFields(requireObjectLike(bag), dayFieldNamesAsc, dateFieldRefiners, []));
|
|
10449
|
+
}
|
|
10450
|
+
|
|
10451
|
+
function createPlainDateFromMergedFields(calendar, inputFields, extraFields) {
|
|
10452
|
+
const mergedFieldNames = getCalendarFieldNames(calendar, yearMonthCodeDayFieldNamesAlpha, yearMonthCodeDayFieldNamesWithEraAlpha);
|
|
10453
|
+
let mergedFields = mergeCalendarFields(calendar, inputFields, extraFields);
|
|
10454
|
+
return mergedFields = readAndRefineBagFields(mergedFields, mergedFieldNames, dateFieldRefiners, []),
|
|
10455
|
+
createPlainDateFromFields(calendar, mergedFields);
|
|
10456
|
+
}
|
|
10457
|
+
|
|
10458
|
+
function applyPlainFormatTimeZone(options) {
|
|
10459
|
+
return options.timeZone = "UTC", [ "full", "long" ].includes(options.timeStyle) && (options.timeStyle = "medium"),
|
|
10460
|
+
options;
|
|
10461
|
+
}
|
|
10462
|
+
|
|
10463
|
+
function checkResolvedCalendarCompatible(format, slots, strictCalendarCheck) {
|
|
10464
|
+
const resolvedCalendarId = format.resolvedOptions().calendar;
|
|
10465
|
+
slots.calendar === isoCalendarImpl || getCalendarSlotId(slots.calendar) === resolvedCalendarId || throwRangeError("Mismatching Calendars");
|
|
10466
|
+
}
|
|
10467
|
+
|
|
10468
|
+
function createOptionsTransformer(shapeFieldNames, invalidShapeFieldNames, ignoredFieldNames, defaultShapeFields, dateStyleReplacementFields) {
|
|
10469
|
+
const shapeFieldNameSet = new Set(shapeFieldNames);
|
|
10470
|
+
const invalidShapeFieldNameSet = new Set(invalidShapeFieldNames);
|
|
10471
|
+
const ignoredFieldNameSet = new Set(ignoredFieldNames);
|
|
10472
|
+
return (options, allowPartialOverlap) => {
|
|
10473
|
+
const analysis = ((options, shapeFieldNameSet, invalidShapeFieldNameSet, ignoredFieldNameSet) => {
|
|
10474
|
+
const analysis = {
|
|
10475
|
+
dateStyle: void 0,
|
|
10476
|
+
timeStyle: void 0,
|
|
10477
|
+
me: {},
|
|
10478
|
+
pe: {},
|
|
10479
|
+
xe: {},
|
|
10480
|
+
oe: 0,
|
|
10481
|
+
ue: 0
|
|
10482
|
+
};
|
|
10483
|
+
for (const name of Object.keys(options)) {
|
|
10484
|
+
const value = options[name];
|
|
10485
|
+
void 0 === value || ignoredFieldNameSet.has(name) || (shapeFieldNameSet.has(name) ? "dateStyle" === name ? analysis.dateStyle = value : "timeStyle" === name ? analysis.timeStyle = value : analysis.me[name] = value : "era" === name ? analysis.pe[name] = value : invalidShapeFieldNameSet.has(name) ? "dateStyle" === name || "timeStyle" === name ? analysis.ue = 1 : analysis.oe = 1 : analysis.xe[name] = value);
|
|
10486
|
+
}
|
|
10487
|
+
return analysis;
|
|
10488
|
+
})(options, shapeFieldNameSet, invalidShapeFieldNameSet, ignoredFieldNameSet);
|
|
10489
|
+
const hasDateStyle = void 0 !== analysis.dateStyle;
|
|
10490
|
+
const hasTimeStyle = void 0 !== analysis.timeStyle;
|
|
10491
|
+
const hasAnyStyle = hasDateStyle || hasTimeStyle;
|
|
10492
|
+
const hasGranularShapeFields = Object.keys(analysis.me).length > 0;
|
|
10493
|
+
const hasInvalids = analysis.oe || analysis.ue;
|
|
10494
|
+
const hasShapeFields = hasGranularShapeFields || hasDateStyle || hasTimeStyle;
|
|
10495
|
+
const hasModifierFields = Object.keys(analysis.pe).length > 0;
|
|
10496
|
+
const hasStyleConflictFields = hasGranularShapeFields || hasModifierFields || analysis.oe;
|
|
10497
|
+
(!allowPartialOverlap && hasInvalids || allowPartialOverlap && hasInvalids && !hasShapeFields || hasAnyStyle && hasStyleConflictFields) && throwTypeError("Invalid formatting options");
|
|
10498
|
+
const transformedOptions = {};
|
|
10499
|
+
return hasAnyStyle || hasShapeFields || Object.assign(transformedOptions, defaultShapeFields),
|
|
10500
|
+
Object.assign(transformedOptions, analysis.me, analysis.pe, analysis.xe),
|
|
10501
|
+
hasDateStyle && (dateStyleReplacementFields ? Object.assign(transformedOptions, dateStyleReplacementFields[analysis.dateStyle]) : transformedOptions.dateStyle = analysis.dateStyle),
|
|
10502
|
+
hasTimeStyle && (transformedOptions.timeStyle = analysis.timeStyle), transformedOptions;
|
|
10503
|
+
};
|
|
10504
|
+
}
|
|
10505
|
+
|
|
10506
|
+
const dateDefaultShapeFields = {
|
|
10507
|
+
year: "numeric",
|
|
10508
|
+
month: "numeric",
|
|
10509
|
+
day: "numeric"
|
|
10510
|
+
};
|
|
10511
|
+
|
|
10512
|
+
const dateShapeFieldNames = [ "weekday", "year", "month", "day", "dateStyle" ];
|
|
10513
|
+
|
|
10514
|
+
const timeShapeFieldNames = [ "dayPeriod", "hour", "minute", "second", "fractionalSecondDigits", "timeStyle" ];
|
|
10515
|
+
|
|
10516
|
+
const transformDateOptions = /*@__PURE__*/ createOptionsTransformer(dateShapeFieldNames, timeShapeFieldNames, [ "timeZoneName" ], dateDefaultShapeFields);
|
|
10517
|
+
|
|
10518
|
+
function getCurrentIsoDateTime(timeZone) {
|
|
10519
|
+
const epochNano = getCurrentEpochNano();
|
|
10520
|
+
const offsetNano = timeZone.C(epochNano);
|
|
10521
|
+
return epochNanoToIsoDateTime(epochNano + BigInt(offsetNano));
|
|
10522
|
+
}
|
|
10523
|
+
|
|
10524
|
+
function getCurrentEpochNano() {
|
|
10525
|
+
return BigInt(Date.now()) * bigNanoInMilli;
|
|
10526
|
+
}
|
|
10527
|
+
|
|
10528
|
+
function getCurrentTimeZoneId() {
|
|
10529
|
+
return (new RawDateTimeFormat).resolvedOptions().timeZone;
|
|
10530
|
+
}
|
|
10531
|
+
|
|
10532
|
+
const PlainYearMonthBranding = "PlainYearMonth";
|
|
10533
|
+
|
|
10534
|
+
const PlainDateBranding = "PlainDate";
|
|
10535
|
+
|
|
10536
|
+
const CalendarBranding = "Calendar";
|
|
10537
|
+
|
|
10538
|
+
function defineTemporalClass(branding, cls, getSlots, ...getterMaps) {
|
|
10539
|
+
Object.defineProperties(cls, createNameDescriptors(branding)), Object.defineProperties(cls.prototype, createStringTagDescriptors("Temporal." + branding));
|
|
10540
|
+
for (const getterMap of getterMaps) {
|
|
10541
|
+
defineSlotGetters(cls.prototype, getSlots, getterMap);
|
|
10542
|
+
}
|
|
10543
|
+
return cls;
|
|
10544
|
+
}
|
|
10545
|
+
|
|
10546
|
+
function defineSlotGetters(destPrototype, getSlots, getterMap) {
|
|
10547
|
+
Object.defineProperties(destPrototype, mapProps(getter => ({
|
|
10548
|
+
get() {
|
|
10549
|
+
return getter(getSlots(this));
|
|
10550
|
+
},
|
|
10551
|
+
configurable: 1
|
|
10552
|
+
}), getterMap));
|
|
10553
|
+
}
|
|
10554
|
+
|
|
10555
|
+
const attachDebugString = "noop" === noop.name ? instance => {
|
|
10556
|
+
Object.defineProperty(instance, "_str_", {
|
|
10557
|
+
value: instance.toJSON()
|
|
10558
|
+
});
|
|
10559
|
+
} : noop;
|
|
10560
|
+
|
|
10561
|
+
function invalidRecordType() {
|
|
10562
|
+
throwTypeError(invalidCallingContext);
|
|
10563
|
+
}
|
|
10564
|
+
|
|
10565
|
+
function forbiddenValueOf() {
|
|
10566
|
+
throwTypeError(forbiddenValueOf$1);
|
|
10567
|
+
}
|
|
10568
|
+
|
|
10569
|
+
const yearMonthFieldGetters$1 = {
|
|
10570
|
+
era(slots) {
|
|
10571
|
+
return computeCalendarEraFields(slots.calendar, slots).era;
|
|
10572
|
+
},
|
|
10573
|
+
eraYear(slots) {
|
|
10574
|
+
return computeCalendarEraFields(slots.calendar, slots).eraYear;
|
|
10575
|
+
},
|
|
10576
|
+
year(slots) {
|
|
10577
|
+
return computeCalendarDateFields(slots.calendar, slots).year;
|
|
10578
|
+
},
|
|
10579
|
+
month(slots) {
|
|
10580
|
+
return computeCalendarDateFields(slots.calendar, slots).month;
|
|
10581
|
+
},
|
|
10582
|
+
monthCode(slots) {
|
|
10583
|
+
return computeCalendarMonthCode(slots.calendar, slots);
|
|
10584
|
+
}
|
|
10585
|
+
};
|
|
10586
|
+
|
|
10587
|
+
const dateFieldGetters$1 = {
|
|
10588
|
+
era(slots) {
|
|
10589
|
+
return computeCalendarEraFields(slots.calendar, slots).era;
|
|
10590
|
+
},
|
|
10591
|
+
eraYear(slots) {
|
|
10592
|
+
return computeCalendarEraFields(slots.calendar, slots).eraYear;
|
|
10593
|
+
},
|
|
10594
|
+
year(slots) {
|
|
10595
|
+
return computeCalendarDateFields(slots.calendar, slots).year;
|
|
10596
|
+
},
|
|
10597
|
+
month(slots) {
|
|
10598
|
+
return computeCalendarDateFields(slots.calendar, slots).month;
|
|
10599
|
+
},
|
|
10600
|
+
monthCode(slots) {
|
|
10601
|
+
return computeCalendarMonthCode(slots.calendar, slots);
|
|
10602
|
+
},
|
|
10603
|
+
day(slots) {
|
|
10604
|
+
return computeCalendarDateFields(slots.calendar, slots).day;
|
|
10605
|
+
}
|
|
10606
|
+
};
|
|
10607
|
+
|
|
10608
|
+
const yearMonthDerivedGetters = {
|
|
10609
|
+
daysInMonth(slots) {
|
|
10610
|
+
return computeCalendarDaysInMonth(slots.calendar, slots);
|
|
10611
|
+
},
|
|
10612
|
+
daysInYear(slots) {
|
|
10613
|
+
return computeCalendarDaysInYear(slots.calendar, slots);
|
|
10614
|
+
},
|
|
10615
|
+
monthsInYear(slots) {
|
|
10616
|
+
return computeCalendarMonthsInYear(slots.calendar, slots);
|
|
10617
|
+
},
|
|
10618
|
+
inLeapYear(slots) {
|
|
10619
|
+
return computeCalendarInLeapYear(slots.calendar, slots);
|
|
10620
|
+
}
|
|
10621
|
+
};
|
|
10622
|
+
|
|
10623
|
+
const dateDerivedGetters = {
|
|
10624
|
+
dayOfWeek(slots) {
|
|
10625
|
+
return computeIsoDayOfWeek(slots);
|
|
10626
|
+
},
|
|
10627
|
+
dayOfYear(slots) {
|
|
10628
|
+
return computeCalendarDayOfYear(slots.calendar, slots);
|
|
10629
|
+
},
|
|
10630
|
+
weekOfYear(slots) {
|
|
10631
|
+
return computeCalendarWeekOfYear(slots.calendar, slots);
|
|
10632
|
+
},
|
|
10633
|
+
yearOfWeek(slots) {
|
|
10634
|
+
return computeCalendarYearOfWeek(slots.calendar, slots);
|
|
10635
|
+
},
|
|
10636
|
+
daysInWeek() {
|
|
10637
|
+
return 7;
|
|
10638
|
+
},
|
|
10639
|
+
daysInMonth(slots) {
|
|
10640
|
+
return computeCalendarDaysInMonth(slots.calendar, slots);
|
|
10641
|
+
},
|
|
10642
|
+
daysInYear(slots) {
|
|
10643
|
+
return computeCalendarDaysInYear(slots.calendar, slots);
|
|
10644
|
+
},
|
|
10645
|
+
monthsInYear(slots) {
|
|
10646
|
+
return computeCalendarMonthsInYear(slots.calendar, slots);
|
|
10647
|
+
},
|
|
10648
|
+
inLeapYear(slots) {
|
|
10649
|
+
return computeCalendarInLeapYear(slots.calendar, slots);
|
|
10650
|
+
}
|
|
10651
|
+
};
|
|
10652
|
+
|
|
10653
|
+
function createNativeGetters(shimGetters) {
|
|
10654
|
+
return createPropGetters(Object.keys(shimGetters));
|
|
10655
|
+
}
|
|
10656
|
+
|
|
10657
|
+
const yearMonthFieldGetters = /*@__PURE__*/ createNativeGetters(yearMonthFieldGetters$1);
|
|
10658
|
+
|
|
10659
|
+
const dateFieldGetters = /*@__PURE__*/ createNativeGetters(dateFieldGetters$1);
|
|
10660
|
+
|
|
10661
|
+
createNativeGetters(yearMonthDerivedGetters), createNativeGetters(dateDerivedGetters);
|
|
10662
|
+
|
|
10663
|
+
const PlainYearMonthRecordBranding = `${PlainYearMonthBranding}Record`;
|
|
10664
|
+
|
|
10665
|
+
const PlainDateRecordBranding = `${PlainDateBranding}Record`;
|
|
10666
|
+
|
|
10667
|
+
const CalendarRecordBranding = `${CalendarBranding}Record`;
|
|
10668
|
+
|
|
10669
|
+
const calendarMap = /*@__PURE__*/ new WeakMap;
|
|
10670
|
+
|
|
10671
|
+
const plainDateMap = /*@__PURE__*/ new WeakMap;
|
|
10672
|
+
|
|
10673
|
+
const plainYearMonthMap = /*@__PURE__*/ new WeakMap;
|
|
10674
|
+
|
|
10675
|
+
function getCalendarSlots(record) {
|
|
10676
|
+
return getCalendarSlotsIfPresent(record) || invalidRecordType();
|
|
10677
|
+
}
|
|
10678
|
+
|
|
10679
|
+
function getCalendarSlotsIfPresent(record) {
|
|
10680
|
+
return calendarMap.get(record);
|
|
10681
|
+
}
|
|
10682
|
+
|
|
10683
|
+
function getPlainDateSlots(record) {
|
|
10684
|
+
return getPlainDateSlotsIfPresent(record) || invalidRecordType();
|
|
10685
|
+
}
|
|
10686
|
+
|
|
10687
|
+
function getPlainDateSlotsIfPresent(record) {
|
|
10688
|
+
return plainDateMap.get(record);
|
|
10689
|
+
}
|
|
10690
|
+
|
|
10691
|
+
function setPlainDateSlots(instance, slots) {
|
|
10692
|
+
plainDateMap.set(instance, slots);
|
|
10693
|
+
}
|
|
10694
|
+
|
|
10695
|
+
function isPlainYearMonthRecord(record) {
|
|
10696
|
+
return !!getPlainYearMonthSlotsIfPresent(record);
|
|
10697
|
+
}
|
|
10698
|
+
|
|
10699
|
+
function getPlainYearMonthSlots(record) {
|
|
10700
|
+
return getPlainYearMonthSlotsIfPresent(record) || invalidRecordType();
|
|
10701
|
+
}
|
|
10702
|
+
|
|
10703
|
+
function getPlainYearMonthSlotsIfPresent(record) {
|
|
10704
|
+
return plainYearMonthMap.get(record);
|
|
10705
|
+
}
|
|
10706
|
+
|
|
10707
|
+
function setPlainYearMonthSlots(instance, slots) {
|
|
10708
|
+
plainYearMonthMap.set(instance, slots);
|
|
10709
|
+
}
|
|
10710
|
+
|
|
10711
|
+
const CalendarRecord = /*@__PURE__*/ defineTemporalClass(CalendarRecordBranding, class {
|
|
10712
|
+
toJSON() {
|
|
10713
|
+
return getCalendarRecordId(this);
|
|
10714
|
+
}
|
|
10715
|
+
valueOf() {
|
|
10716
|
+
return getCalendarRecordId(this);
|
|
10717
|
+
}
|
|
10718
|
+
});
|
|
10719
|
+
|
|
10720
|
+
function createCalendarRecord(id, getImpl) {
|
|
10721
|
+
const instance = Object.create(CalendarRecord.prototype);
|
|
10722
|
+
return ((instance, slots) => {
|
|
10723
|
+
calendarMap.set(instance, slots);
|
|
10724
|
+
})(instance, {
|
|
10725
|
+
id: id,
|
|
10726
|
+
Be: getImpl
|
|
10727
|
+
}), attachDebugString(instance), instance;
|
|
10728
|
+
}
|
|
10729
|
+
|
|
10730
|
+
function getCalendarRecordId(record) {
|
|
10731
|
+
return getCalendarSlots(record).id;
|
|
10732
|
+
}
|
|
10733
|
+
|
|
10734
|
+
function getCalendarRecordImplCreator(record) {
|
|
10735
|
+
const getImpl = getCalendarSlots(record).Be;
|
|
10736
|
+
return getImpl || throwRangeError(exoticCalendarRequired(getCalendarRecordId(record), "getExotic or getAny")),
|
|
10737
|
+
getImpl;
|
|
10738
|
+
}
|
|
10739
|
+
|
|
10740
|
+
const isoCalendarRecord = /*@__PURE__*/ createCalendarRecord(isoCalendarId, () => isoCalendarImpl);
|
|
10741
|
+
|
|
10742
|
+
const gregoryCalendarRecord = /*@__PURE__*/ createCalendarRecord(gregoryCalendarId, () => gregoryCalendarImpl);
|
|
10743
|
+
|
|
10744
|
+
function getBasic(rawCalendarId) {
|
|
10745
|
+
const lowerRawCalendarId = requireString(rawCalendarId).toLowerCase();
|
|
10746
|
+
return lowerRawCalendarId === isoCalendarId ? isoCalendarRecord : lowerRawCalendarId === gregoryCalendarId ? gregoryCalendarRecord : getOrCreateUnknownRecord(rawCalendarId);
|
|
10747
|
+
}
|
|
10748
|
+
|
|
10749
|
+
const getOrCreateUnknownRecord = /*@__PURE__*/ memoize(createCalendarRecord);
|
|
10750
|
+
|
|
10751
|
+
const NativeTemporal = globalThis.Temporal;
|
|
10752
|
+
|
|
10753
|
+
function refineNativeCalendarArgMaybe(calendarRecord) {
|
|
10754
|
+
if (void 0 !== calendarRecord) {
|
|
10755
|
+
return getValidatedCalendarId(calendarRecord);
|
|
10756
|
+
}
|
|
10757
|
+
}
|
|
10758
|
+
|
|
10759
|
+
function runNativeCalendarResolver(canonicalCalendarId, getCalendarRecord) {
|
|
10760
|
+
getValidatedCalendarId(getCalendarRecord(canonicalCalendarId));
|
|
10761
|
+
}
|
|
10762
|
+
|
|
10763
|
+
function getValidatedCalendarId(record) {
|
|
10764
|
+
return getCalendarRecordImplCreator(record), getCalendarRecordId(record);
|
|
10765
|
+
}
|
|
10766
|
+
|
|
10767
|
+
const getNativePlainYearMonth = getPlainYearMonthSlots;
|
|
10768
|
+
|
|
10769
|
+
const NativePlainYearMonthRecord = /*@__PURE__*/ defineTemporalClass(PlainYearMonthRecordBranding, class {
|
|
10770
|
+
get calendarId() {
|
|
10771
|
+
return getNativePlainYearMonth(this).calendarId;
|
|
10772
|
+
}
|
|
10773
|
+
toJSON() {
|
|
10774
|
+
return getNativePlainYearMonth(this).toJSON();
|
|
10775
|
+
}
|
|
10776
|
+
valueOf() {
|
|
10777
|
+
return getNativePlainYearMonth(this).valueOf();
|
|
10778
|
+
}
|
|
10779
|
+
}, getNativePlainYearMonth, yearMonthFieldGetters);
|
|
10780
|
+
|
|
10781
|
+
function createNativePlainYearMonthRecord(native) {
|
|
10782
|
+
const instance = Object.create(NativePlainYearMonthRecord.prototype);
|
|
10783
|
+
return setPlainYearMonthSlots(instance, native), attachDebugString(instance), instance;
|
|
10784
|
+
}
|
|
10785
|
+
|
|
10786
|
+
function fromString$3$1(s, getCalendarRecord) {
|
|
10787
|
+
const resNative = NativeTemporal.PlainYearMonth.from(s);
|
|
10788
|
+
return runNativeCalendarResolver(resNative.calendarId, getCalendarRecord), createNativePlainYearMonthRecord(resNative);
|
|
10789
|
+
}
|
|
10790
|
+
|
|
10791
|
+
function daysInMonth$2$1(record) {
|
|
10792
|
+
return getNativePlainYearMonth(record).daysInMonth;
|
|
10793
|
+
}
|
|
10794
|
+
|
|
10795
|
+
function compare$3$1(record, otherRecord) {
|
|
10796
|
+
const native = getNativePlainYearMonth(record);
|
|
10797
|
+
const otherNative = getNativePlainYearMonth(otherRecord);
|
|
10798
|
+
return NativeTemporal.PlainYearMonth.compare(native, otherNative);
|
|
10799
|
+
}
|
|
10800
|
+
|
|
10801
|
+
function toString$3$1(record, options) {
|
|
10802
|
+
return getNativePlainYearMonth(record).toString(options);
|
|
10803
|
+
}
|
|
10804
|
+
|
|
10805
|
+
function toPlainDate$1$1(record, fields) {
|
|
10806
|
+
return createNativePlainDateRecord(getNativePlainYearMonth(record).toPlainDate(fields));
|
|
10807
|
+
}
|
|
10808
|
+
|
|
10809
|
+
function addMonths$2$1(record, months, options) {
|
|
10810
|
+
return createNativePlainYearMonthRecord(getNativePlainYearMonth(record).add({
|
|
10811
|
+
months: months
|
|
10812
|
+
}, options));
|
|
10813
|
+
}
|
|
10814
|
+
|
|
10815
|
+
const getNativePlainDate = getPlainDateSlots;
|
|
10816
|
+
|
|
10817
|
+
const NativePlainDateRecord = /*@__PURE__*/ defineTemporalClass(PlainDateRecordBranding, class {
|
|
10818
|
+
get calendarId() {
|
|
10819
|
+
return getNativePlainDate(this).calendarId;
|
|
10820
|
+
}
|
|
10821
|
+
toJSON() {
|
|
10822
|
+
return getNativePlainDate(this).toJSON();
|
|
10823
|
+
}
|
|
10824
|
+
valueOf() {
|
|
10825
|
+
return getNativePlainDate(this).valueOf();
|
|
10826
|
+
}
|
|
10827
|
+
}, getNativePlainDate, dateFieldGetters);
|
|
10828
|
+
|
|
10829
|
+
function createNativePlainDateRecord(native) {
|
|
10830
|
+
const instance = Object.create(NativePlainDateRecord.prototype);
|
|
10831
|
+
return setPlainDateSlots(instance, native), attachDebugString(instance), instance;
|
|
10832
|
+
}
|
|
10833
|
+
|
|
10834
|
+
function fromFields$1$1(fields, options) {
|
|
10835
|
+
const calendar = refineNativeCalendarArgMaybe(fields.calendar);
|
|
10836
|
+
return createNativePlainDateRecord(NativeTemporal.PlainDate.from({
|
|
10837
|
+
...fields,
|
|
10838
|
+
calendar: calendar
|
|
10839
|
+
}, options));
|
|
10840
|
+
}
|
|
10841
|
+
|
|
10842
|
+
function fromString$2$1(s, getCalendarRecord) {
|
|
10843
|
+
const resNative = NativeTemporal.PlainDate.from(s);
|
|
10844
|
+
return runNativeCalendarResolver(resNative.calendarId, getCalendarRecord), createNativePlainDateRecord(resNative);
|
|
10845
|
+
}
|
|
10846
|
+
|
|
10847
|
+
function dayOfWeek$1$1(record) {
|
|
10848
|
+
return getNativePlainDate(record).dayOfWeek;
|
|
10849
|
+
}
|
|
10850
|
+
|
|
10851
|
+
function compare$2$1(record, otherRecord) {
|
|
10852
|
+
const native = getNativePlainDate(record);
|
|
10853
|
+
const otherNative = getNativePlainDate(otherRecord);
|
|
10854
|
+
return NativeTemporal.PlainDate.compare(native, otherNative);
|
|
10855
|
+
}
|
|
10856
|
+
|
|
10857
|
+
function toLocaleString$2$1(record, locales, options) {
|
|
10858
|
+
return getNativePlainDate(record).toLocaleString(locales, options);
|
|
10859
|
+
}
|
|
10860
|
+
|
|
10861
|
+
function toString$2$1(record, options) {
|
|
10862
|
+
return getNativePlainDate(record).toString(options);
|
|
10863
|
+
}
|
|
10864
|
+
|
|
10865
|
+
function toPlainYearMonth$2(record) {
|
|
10866
|
+
return createNativePlainYearMonthRecord(getNativePlainDate(record).toPlainYearMonth());
|
|
10867
|
+
}
|
|
10868
|
+
|
|
10869
|
+
function addYears$1$1(record, years, options) {
|
|
10870
|
+
return createNativePlainDateRecord(getNativePlainDate(record).add({
|
|
10871
|
+
years: years
|
|
10872
|
+
}, options));
|
|
10873
|
+
}
|
|
10874
|
+
|
|
10875
|
+
function addMonths$1$2(record, months, options) {
|
|
10876
|
+
return createNativePlainDateRecord(getNativePlainDate(record).add({
|
|
10877
|
+
months: months
|
|
10878
|
+
}, options));
|
|
10879
|
+
}
|
|
10880
|
+
|
|
10881
|
+
function addDays$1$1(record, days) {
|
|
10882
|
+
return createNativePlainDateRecord(getNativePlainDate(record).add({
|
|
10883
|
+
days: days
|
|
10884
|
+
}));
|
|
10885
|
+
}
|
|
10886
|
+
|
|
10887
|
+
function plainDateISO$2(timeZoneId) {
|
|
10888
|
+
return createNativePlainDateRecord(NativeTemporal.Now.plainDateISO(timeZoneId));
|
|
10889
|
+
}
|
|
10890
|
+
|
|
10891
|
+
function refineShimCalendarArgMaybe(calendarRecord) {
|
|
10892
|
+
return void 0 === calendarRecord ? isoCalendarImpl : getCalendarRecordImpl(calendarRecord);
|
|
10893
|
+
}
|
|
10894
|
+
|
|
10895
|
+
function createShimCalendarStringResolver(getCalendarRecord) {
|
|
10896
|
+
return calendarId => getCalendarRecordImpl(getCalendarRecord(calendarId.toLowerCase()));
|
|
10897
|
+
}
|
|
10898
|
+
|
|
10899
|
+
function getCalendarRecordImpl(record) {
|
|
10900
|
+
return getCalendarRecordImplCreator(record)();
|
|
10901
|
+
}
|
|
10902
|
+
|
|
10903
|
+
function moveByYears(calendar, isoDate, years, options) {
|
|
10904
|
+
const overflow = refineOverflowOptions(options);
|
|
10905
|
+
return years ? addDateMonths(calendar, isoDate, toStrictInteger(years), 0, overflow) : isoDate;
|
|
10906
|
+
}
|
|
10907
|
+
|
|
10908
|
+
function moveByMonths(calendar, isoDate, months, options) {
|
|
10909
|
+
const overflow = refineOverflowOptions(options);
|
|
10910
|
+
return months ? addDateMonths(calendar, isoDate, 0, toStrictInteger(months), overflow) : isoDate;
|
|
10911
|
+
}
|
|
10912
|
+
|
|
10913
|
+
function moveByDaysStrict(_calendar, isoDate, days) {
|
|
10914
|
+
return moveByDays(isoDate, toStrictInteger(days));
|
|
10915
|
+
}
|
|
10916
|
+
|
|
10917
|
+
const getShimPlainYearMonthSlots = getPlainYearMonthSlots;
|
|
10918
|
+
|
|
10919
|
+
const ShimPlainYearMonthRecord = /*@__PURE__*/ defineTemporalClass(PlainYearMonthRecordBranding, class {
|
|
10920
|
+
get calendarId() {
|
|
10921
|
+
return getCalendarSlotId(getShimPlainYearMonthSlots(this).calendar);
|
|
10922
|
+
}
|
|
10923
|
+
toJSON() {
|
|
10924
|
+
return formatYearMonthIsoAuto(getShimPlainYearMonthSlots(this));
|
|
10925
|
+
}
|
|
10926
|
+
valueOf() {
|
|
10927
|
+
return forbiddenValueOf();
|
|
10928
|
+
}
|
|
10929
|
+
}, getShimPlainYearMonthSlots, yearMonthFieldGetters$1);
|
|
10930
|
+
|
|
10931
|
+
function createShimPlainYearMonthRecord(slots) {
|
|
10932
|
+
const instance = Object.create(ShimPlainYearMonthRecord.prototype);
|
|
10933
|
+
return setPlainYearMonthSlots(instance, slots), attachDebugString(instance), instance;
|
|
10934
|
+
}
|
|
10935
|
+
|
|
10936
|
+
function fromString$3(s, getCalendarRecord) {
|
|
10937
|
+
return createShimPlainYearMonthRecord(parsePlainYearMonth(s, createShimCalendarStringResolver(getCalendarRecord)));
|
|
10938
|
+
}
|
|
10939
|
+
|
|
10940
|
+
function daysInMonth$2(record) {
|
|
10941
|
+
const slots = getShimPlainYearMonthSlots(record);
|
|
10942
|
+
return computeCalendarDaysInMonth(slots.calendar, slots);
|
|
10943
|
+
}
|
|
10944
|
+
|
|
10945
|
+
function compare$3(record, otherRecord) {
|
|
10946
|
+
const slots = getShimPlainYearMonthSlots(record);
|
|
10947
|
+
const otherSlots = getShimPlainYearMonthSlots(otherRecord);
|
|
10948
|
+
return compareIsoDateFields(slots, otherSlots);
|
|
10949
|
+
}
|
|
10950
|
+
|
|
10951
|
+
function toString$3(record, options) {
|
|
10952
|
+
return formatPlainYearMonthIso(getShimPlainYearMonthSlots(record), options);
|
|
10953
|
+
}
|
|
10954
|
+
|
|
10955
|
+
function toPlainDate$1(record, fields) {
|
|
10956
|
+
const slots = getShimPlainYearMonthSlots(record);
|
|
10957
|
+
return createShimPlainDateRecord(convertPlainYearMonthToDate(slots.calendar, record, fields));
|
|
10958
|
+
}
|
|
10959
|
+
|
|
10960
|
+
function addMonths$2(record, months, options) {
|
|
10961
|
+
const slots = getShimPlainYearMonthSlots(record);
|
|
10962
|
+
return createShimPlainYearMonthRecord(createDateSlots(moveYearMonth(0, slots.calendar, slots, createDurationSlots(validateDurationFields({
|
|
10963
|
+
...durationFieldDefaults,
|
|
10964
|
+
months: toStrictInteger(months)
|
|
10965
|
+
})), options), slots.calendar));
|
|
10966
|
+
}
|
|
10967
|
+
|
|
10968
|
+
const getShimPlainDateSlots = getPlainDateSlots;
|
|
10969
|
+
|
|
10970
|
+
const ShimPlainDateRecord = /*@__PURE__*/ defineTemporalClass(PlainDateRecordBranding, class {
|
|
10971
|
+
get calendarId() {
|
|
10972
|
+
return getCalendarSlotId(getShimPlainDateSlots(this).calendar);
|
|
10973
|
+
}
|
|
10974
|
+
toJSON() {
|
|
10975
|
+
return formatDateIsoAuto(getShimPlainDateSlots(this));
|
|
10976
|
+
}
|
|
10977
|
+
valueOf() {
|
|
10978
|
+
return forbiddenValueOf();
|
|
10979
|
+
}
|
|
10980
|
+
}, getShimPlainDateSlots, dateFieldGetters$1);
|
|
10981
|
+
|
|
10982
|
+
function createShimPlainDateRecord(slots) {
|
|
10983
|
+
const instance = Object.create(ShimPlainDateRecord.prototype);
|
|
10984
|
+
return setPlainDateSlots(instance, slots), attachDebugString(instance), instance;
|
|
10985
|
+
}
|
|
10986
|
+
|
|
10987
|
+
function fromFields$1(fields, options) {
|
|
10988
|
+
const calendarImpl = refineShimCalendarArgMaybe(fields.calendar);
|
|
10989
|
+
return createShimPlainDateRecord(refinePlainDateObjectLike(calendarImpl, fields, options));
|
|
10990
|
+
}
|
|
10991
|
+
|
|
10992
|
+
function fromString$2(s, getCalendarRecord) {
|
|
10993
|
+
return createShimPlainDateRecord(parsePlainDate(s, createShimCalendarStringResolver(getCalendarRecord)));
|
|
10994
|
+
}
|
|
10995
|
+
|
|
10996
|
+
function dayOfWeek$1(record) {
|
|
10997
|
+
return computeIsoDayOfWeek(getShimPlainDateSlots(record));
|
|
10998
|
+
}
|
|
10999
|
+
|
|
11000
|
+
function compare$2(record, otherRecord) {
|
|
11001
|
+
const slots = getShimPlainDateSlots(record);
|
|
11002
|
+
const otherSlots = getShimPlainDateSlots(otherRecord);
|
|
11003
|
+
return compareIsoDateFields(slots, otherSlots);
|
|
11004
|
+
}
|
|
11005
|
+
|
|
11006
|
+
function toLocaleString$2(record, locales = void 0, options = {}) {
|
|
11007
|
+
const slots = getShimPlainDateSlots(record);
|
|
11008
|
+
const format = new RawDateTimeFormat(locales, applyPlainFormatTimeZone(transformDateOptions(options)));
|
|
11009
|
+
return checkResolvedCalendarCompatible(format, slots), format.format(isoDateToEpochMilli(slots));
|
|
11010
|
+
}
|
|
11011
|
+
|
|
11012
|
+
function toString$2(record, options) {
|
|
11013
|
+
return formatPlainDateIso(getShimPlainDateSlots(record), options);
|
|
11014
|
+
}
|
|
11015
|
+
|
|
11016
|
+
function toPlainYearMonth$1(record) {
|
|
11017
|
+
const slots = getShimPlainDateSlots(record);
|
|
11018
|
+
const calendarDate = computeCalendarDateFields(slots.calendar, slots);
|
|
11019
|
+
return createShimPlainYearMonthRecord(createPlainYearMonthFromFields(slots.calendar, {
|
|
11020
|
+
year: calendarDate.year,
|
|
11021
|
+
monthCode: computeCalendarMonthCode(slots.calendar, slots)
|
|
11022
|
+
}));
|
|
11023
|
+
}
|
|
11024
|
+
|
|
11025
|
+
function addYears$1(record, years, options) {
|
|
11026
|
+
const slots = getShimPlainDateSlots(record);
|
|
11027
|
+
return createRecordFromDateFields(createDateSlots(moveByYears(slots.calendar, slots, years, options), slots.calendar));
|
|
11028
|
+
}
|
|
11029
|
+
|
|
11030
|
+
function addMonths$1$1(record, months, options) {
|
|
11031
|
+
const slots = getShimPlainDateSlots(record);
|
|
11032
|
+
return createRecordFromDateFields(createDateSlots(moveByMonths(slots.calendar, slots, months, options), slots.calendar));
|
|
11033
|
+
}
|
|
11034
|
+
|
|
11035
|
+
function addDays$1(record, days) {
|
|
11036
|
+
const slots = getShimPlainDateSlots(record);
|
|
11037
|
+
return createRecordFromDateFields(createDateSlots(moveByDaysStrict(slots.calendar, slots, days), slots.calendar));
|
|
11038
|
+
}
|
|
11039
|
+
|
|
11040
|
+
function createRecordFromDateFields(isoDate) {
|
|
11041
|
+
return checkIsoDateInBounds(isoDate), createShimPlainDateRecord(createDateSlots(isoDate, isoDate.calendar));
|
|
11042
|
+
}
|
|
11043
|
+
|
|
11044
|
+
function plainDateISO$1(timeZoneId = getCurrentTimeZoneId()) {
|
|
11045
|
+
const isoDateTime = getCurrentIsoDateTime(queryTimeZone(refineTimeZoneId(timeZoneId)));
|
|
11046
|
+
return createShimPlainDateRecord(createDateSlots(isoDateTime));
|
|
11047
|
+
}
|
|
11048
|
+
|
|
11049
|
+
const plainDateISO = NativeTemporal ? plainDateISO$2 : plainDateISO$1;
|
|
11050
|
+
|
|
11051
|
+
const fromFields = NativeTemporal ? fromFields$1$1 : fromFields$1;
|
|
11052
|
+
|
|
11053
|
+
const fromString$1 = NativeTemporal ? fromString$2$1 : fromString$2;
|
|
11054
|
+
|
|
11055
|
+
const dayOfWeek = NativeTemporal ? dayOfWeek$1$1 : dayOfWeek$1;
|
|
11056
|
+
|
|
11057
|
+
const compare$1 = NativeTemporal ? compare$2$1 : compare$2;
|
|
11058
|
+
|
|
11059
|
+
const toLocaleString = NativeTemporal ? toLocaleString$2$1 : toLocaleString$2;
|
|
11060
|
+
|
|
11061
|
+
const toString$1 = NativeTemporal ? toString$2$1 : toString$2;
|
|
11062
|
+
|
|
11063
|
+
const toPlainYearMonth = NativeTemporal ? toPlainYearMonth$2 : toPlainYearMonth$1;
|
|
11064
|
+
|
|
11065
|
+
const addYears = NativeTemporal ? addYears$1$1 : addYears$1;
|
|
11066
|
+
|
|
11067
|
+
const addMonths$1 = NativeTemporal ? addMonths$1$2 : addMonths$1$1;
|
|
11068
|
+
|
|
11069
|
+
const addDays = NativeTemporal ? addDays$1$1 : addDays$1;
|
|
11070
|
+
|
|
11071
|
+
const isRecord = isPlainYearMonthRecord;
|
|
11072
|
+
|
|
11073
|
+
const fromString = NativeTemporal ? fromString$3$1 : fromString$3;
|
|
11074
|
+
|
|
11075
|
+
const daysInMonth = NativeTemporal ? daysInMonth$2$1 : daysInMonth$2;
|
|
11076
|
+
|
|
11077
|
+
const compare = NativeTemporal ? compare$3$1 : compare$3;
|
|
11078
|
+
|
|
11079
|
+
const toString = NativeTemporal ? toString$3$1 : toString$3;
|
|
11080
|
+
|
|
11081
|
+
const toPlainDate = NativeTemporal ? toPlainDate$1$1 : toPlainDate$1;
|
|
11082
|
+
|
|
11083
|
+
const addMonths = NativeTemporal ? addMonths$2$1 : addMonths$2;
|
|
11084
|
+
|
|
11085
|
+
const chevronLeftSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjMzMzQgMjAuMzMzNEw3LjAwMDA4IDEyTDE1LjMzMzQgMy42NjY2MyIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS43NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=';
|
|
11086
|
+
|
|
11087
|
+
const chevronRightSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNjY2NjMgMjAuMzMzNEwxNyAxMkw4LjY2NjYzIDMuNjY2NjMiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K';
|
|
11088
|
+
|
|
11089
|
+
function parseIsoDateSafely(iso, format = fromString$1) {
|
|
11090
|
+
if (!iso)
|
|
11091
|
+
return undefined;
|
|
11092
|
+
try {
|
|
11093
|
+
return format(iso, getBasic);
|
|
11094
|
+
}
|
|
11095
|
+
catch {
|
|
11096
|
+
return undefined;
|
|
11097
|
+
}
|
|
11098
|
+
}
|
|
11099
|
+
function stripDayFromIsoDate(iso) {
|
|
11100
|
+
return iso.slice(0, 7);
|
|
11101
|
+
}
|
|
11102
|
+
/**
|
|
11103
|
+
* Serialize a PlainDate to an ISO YYYY-MM-DD string.
|
|
11104
|
+
*
|
|
11105
|
+
* IMPORTANT: the `fns` flavor of `temporal-polyfill` records do NOT carry a working instance
|
|
11106
|
+
* `.toString()` (calling it falls through to `Object.prototype.toString`, yielding
|
|
11107
|
+
* `"[object Temporal.PlainDateRecord]"`). Always use the top-level `PlainDateFns.toString()`.
|
|
11108
|
+
*/
|
|
11109
|
+
function toIsoDateString(date) {
|
|
11110
|
+
return toString$1(date);
|
|
11111
|
+
}
|
|
11112
|
+
function toIsoYearMonthString(date) {
|
|
11113
|
+
if (isRecord(date)) {
|
|
11114
|
+
return toString(date);
|
|
11115
|
+
}
|
|
11116
|
+
return stripDayFromIsoDate(toIsoDateString(date));
|
|
11117
|
+
}
|
|
11118
|
+
|
|
11119
|
+
const calendarSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cmVjdCB4PSIzLjUiIHk9IjUiIHdpZHRoPSIxNyIgaGVpZ2h0PSIxNSIgcng9IjIiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiLz4KICAgIDxwYXRoIGQ9Ik0zLjUgOS41SDIwLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiLz4KICAgIDxwYXRoIGQ9Ik04IDNWNi41IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik0xNiAzVjYuNSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS43NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPg==';
|
|
11120
|
+
|
|
11121
|
+
function isSelected(date, value) {
|
|
11122
|
+
if (!value)
|
|
11123
|
+
return false;
|
|
11124
|
+
return compare$1(date, value) === 0;
|
|
11125
|
+
}
|
|
11126
|
+
function isDisabled(date, min, max) {
|
|
11127
|
+
if (min && compare$1(date, min) < 0)
|
|
11128
|
+
return true;
|
|
11129
|
+
if (max && compare$1(date, max) > 0)
|
|
11130
|
+
return true;
|
|
11131
|
+
return false;
|
|
11132
|
+
}
|
|
11133
|
+
function buildCalendarGrid(visibleMonth) {
|
|
11134
|
+
const firstOfMonth = toPlainDate(visibleMonth, { day: 1 });
|
|
11135
|
+
const firstDow = dayOfWeek(firstOfMonth);
|
|
11136
|
+
const offsetToMonday = firstDow - 1;
|
|
11137
|
+
const gridStart = addDays(firstOfMonth, -offsetToMonday);
|
|
11138
|
+
const grid = [];
|
|
11139
|
+
for (let i = 0; i < 42; i++) {
|
|
11140
|
+
grid.push(addDays(gridStart, i));
|
|
11141
|
+
}
|
|
11142
|
+
if (compare(visibleMonth, toPlainYearMonth(grid.at(-7))) !== 0) {
|
|
11143
|
+
return grid.slice(0, -7);
|
|
11144
|
+
}
|
|
11145
|
+
return grid;
|
|
11146
|
+
}
|
|
11147
|
+
function firstSelectableDayOfMonth(visibleMonth, min, max) {
|
|
11148
|
+
const daysInMonth$1 = daysInMonth(visibleMonth);
|
|
11149
|
+
for (let d = 1; d <= daysInMonth$1; d++) {
|
|
11150
|
+
const candidate = toPlainDate(visibleMonth, { day: d });
|
|
11151
|
+
if (!isDisabled(candidate, min, max))
|
|
11152
|
+
return candidate;
|
|
11153
|
+
}
|
|
11154
|
+
return null;
|
|
11155
|
+
}
|
|
11156
|
+
function lastSelectableDayOfMonth(visibleMonth, min, max) {
|
|
11157
|
+
const daysInMonth$1 = daysInMonth(visibleMonth);
|
|
11158
|
+
for (let d = daysInMonth$1; d >= 1; d--) {
|
|
11159
|
+
const candidate = toPlainDate(visibleMonth, { day: d });
|
|
11160
|
+
if (!isDisabled(candidate, min, max))
|
|
11161
|
+
return candidate;
|
|
11162
|
+
}
|
|
11163
|
+
return null;
|
|
11164
|
+
}
|
|
11165
|
+
const NAV_LABELS = {
|
|
11166
|
+
de: { prev: 'Vorheriger Monat', next: 'Nächster Monat' },
|
|
11167
|
+
'de-CH': { prev: 'Vorheriger Monat', next: 'Nächster Monat' },
|
|
11168
|
+
'de-AT': { prev: 'Vorheriger Monat', next: 'Nächster Monat' },
|
|
11169
|
+
'de-DE': { prev: 'Vorheriger Monat', next: 'Nächster Monat' },
|
|
11170
|
+
en: { prev: 'Previous month', next: 'Next month' },
|
|
11171
|
+
'en-US': { prev: 'Previous month', next: 'Next month' },
|
|
11172
|
+
'en-GB': { prev: 'Previous month', next: 'Next month' },
|
|
11173
|
+
fr: { prev: 'Mois précédent', next: 'Mois suivant' },
|
|
11174
|
+
'fr-CH': { prev: 'Mois précédent', next: 'Mois suivant' },
|
|
11175
|
+
it: { prev: 'Mese precedente', next: 'Mese successivo' },
|
|
11176
|
+
'it-CH': { prev: 'Mese precedente', next: 'Mese successivo' },
|
|
11177
|
+
};
|
|
11178
|
+
function getNavLabels(locale) {
|
|
11179
|
+
const DEFAULT = { prev: 'Vorheriger Monat', next: 'Nächster Monat' };
|
|
11180
|
+
const byLocale = NAV_LABELS[locale];
|
|
11181
|
+
if (byLocale)
|
|
11182
|
+
return byLocale;
|
|
11183
|
+
const lang = locale.split('-')[0];
|
|
11184
|
+
const byLang = lang !== undefined ? NAV_LABELS[lang] : undefined;
|
|
11185
|
+
if (byLang)
|
|
11186
|
+
return byLang;
|
|
11187
|
+
return DEFAULT;
|
|
11188
|
+
}
|
|
11189
|
+
const VALIDATION_LABELS = {
|
|
11190
|
+
de: { popoverSuffix: '— Kalender', invalidDateMessage: 'Ungültiges Datum' },
|
|
11191
|
+
'de-CH': { popoverSuffix: '— Kalender', invalidDateMessage: 'Ungültiges Datum' },
|
|
11192
|
+
'de-AT': { popoverSuffix: '— Kalender', invalidDateMessage: 'Ungültiges Datum' },
|
|
11193
|
+
'de-DE': { popoverSuffix: '— Kalender', invalidDateMessage: 'Ungültiges Datum' },
|
|
11194
|
+
en: { popoverSuffix: '— Calendar', invalidDateMessage: 'Invalid date' },
|
|
11195
|
+
'en-US': { popoverSuffix: '— Calendar', invalidDateMessage: 'Invalid date' },
|
|
11196
|
+
'en-GB': { popoverSuffix: '— Calendar', invalidDateMessage: 'Invalid date' },
|
|
11197
|
+
fr: { popoverSuffix: '— Calendrier', invalidDateMessage: 'Date invalide' },
|
|
11198
|
+
'fr-CH': { popoverSuffix: '— Calendrier', invalidDateMessage: 'Date invalide' },
|
|
11199
|
+
it: { popoverSuffix: '— Calendario', invalidDateMessage: 'Data non valida' },
|
|
11200
|
+
'it-CH': { popoverSuffix: '— Calendario', invalidDateMessage: 'Data non valida' },
|
|
11201
|
+
};
|
|
11202
|
+
function getValidationLabels(locale) {
|
|
11203
|
+
const DEFAULT = { popoverSuffix: '— Kalender', invalidDateMessage: 'Ungültiges Datum' };
|
|
11204
|
+
const byLocale = VALIDATION_LABELS[locale];
|
|
11205
|
+
if (byLocale)
|
|
11206
|
+
return byLocale;
|
|
11207
|
+
const lang = locale.split('-')[0];
|
|
11208
|
+
const byLang = lang !== undefined ? VALIDATION_LABELS[lang] : undefined;
|
|
11209
|
+
if (byLang)
|
|
11210
|
+
return byLang;
|
|
11211
|
+
return DEFAULT;
|
|
11212
|
+
}
|
|
11213
|
+
const FORMAT_TOKEN_ORDER = ['yyyy', 'MM', 'dd'];
|
|
11214
|
+
function derivePatternFromLocale(locale) {
|
|
11215
|
+
const reference = new Date(Date.UTC(2001, 10, 22));
|
|
11216
|
+
const parts = new Intl.DateTimeFormat(locale, { year: 'numeric', month: '2-digit', day: '2-digit', timeZone: 'UTC' }).formatToParts(reference);
|
|
11217
|
+
return parts
|
|
11218
|
+
.map((part) => {
|
|
11219
|
+
switch (part.type) {
|
|
11220
|
+
case 'year':
|
|
11221
|
+
return 'yyyy';
|
|
11222
|
+
case 'month':
|
|
11223
|
+
return 'MM';
|
|
11224
|
+
case 'day':
|
|
11225
|
+
return 'dd';
|
|
11226
|
+
default:
|
|
11227
|
+
return part.value;
|
|
11228
|
+
}
|
|
11229
|
+
})
|
|
11230
|
+
.join('');
|
|
11231
|
+
}
|
|
11232
|
+
function escapeRegExp(value) {
|
|
11233
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
11234
|
+
}
|
|
11235
|
+
function buildPatternMatcher(pattern) {
|
|
11236
|
+
const order = [];
|
|
11237
|
+
let regexSource = '';
|
|
11238
|
+
let i = 0;
|
|
11239
|
+
while (i < pattern.length) {
|
|
11240
|
+
const token = FORMAT_TOKEN_ORDER.find((t) => pattern.startsWith(t, i));
|
|
11241
|
+
if (token) {
|
|
11242
|
+
regexSource += token === 'yyyy' ? '(\\d{4})' : '(\\d{1,2})';
|
|
11243
|
+
order.push(token);
|
|
11244
|
+
i += token.length;
|
|
11245
|
+
}
|
|
11246
|
+
else {
|
|
11247
|
+
regexSource += escapeRegExp(pattern[i]);
|
|
11248
|
+
i += 1;
|
|
11249
|
+
}
|
|
11250
|
+
}
|
|
11251
|
+
return { regex: new RegExp(`^${regexSource}$`), order };
|
|
11252
|
+
}
|
|
11253
|
+
function isValidCalendarDate(year, month, day) {
|
|
11254
|
+
if (!Number.isInteger(year) || year < 1)
|
|
11255
|
+
return false;
|
|
11256
|
+
if (!Number.isInteger(month) || month < 1 || month > 12)
|
|
11257
|
+
return false;
|
|
11258
|
+
if (!Number.isInteger(day) || day < 1)
|
|
11259
|
+
return false;
|
|
11260
|
+
try {
|
|
11261
|
+
const ym = fromString(`${String(year).padStart(4, '0')}-${String(month).padStart(2, '0')}`, getBasic);
|
|
11262
|
+
return day <= daysInMonth(ym);
|
|
11263
|
+
}
|
|
11264
|
+
catch {
|
|
11265
|
+
return false;
|
|
11266
|
+
}
|
|
11267
|
+
}
|
|
11268
|
+
function formatToDisplay(value, locale, displayFormat) {
|
|
11269
|
+
if (!value)
|
|
11270
|
+
return '';
|
|
11271
|
+
const date = parseIsoDateSafely(value);
|
|
11272
|
+
if (!date)
|
|
11273
|
+
return '';
|
|
11274
|
+
const pattern = displayFormat ?? derivePatternFromLocale(locale);
|
|
11275
|
+
const yyyy = String(date.year).padStart(4, '0');
|
|
11276
|
+
const MM = String(date.month).padStart(2, '0');
|
|
11277
|
+
const dd = String(date.day).padStart(2, '0');
|
|
11278
|
+
return pattern.replace(/yyyy/g, yyyy).replace(/MM/g, MM).replace(/dd/g, dd);
|
|
11279
|
+
}
|
|
11280
|
+
function parseFromDisplay(text, locale, displayFormat) {
|
|
11281
|
+
const trimmed = text.trim();
|
|
11282
|
+
if (!trimmed)
|
|
11283
|
+
return undefined;
|
|
11284
|
+
const pattern = displayFormat ?? derivePatternFromLocale(locale);
|
|
11285
|
+
const { regex, order } = buildPatternMatcher(pattern);
|
|
11286
|
+
const match = regex.exec(trimmed);
|
|
11287
|
+
if (!match)
|
|
11288
|
+
return undefined;
|
|
11289
|
+
const values = {};
|
|
11290
|
+
order.forEach((token, idx) => {
|
|
11291
|
+
values[token] = Number(match[idx + 1]);
|
|
11292
|
+
});
|
|
11293
|
+
const { yyyy, MM, dd } = values;
|
|
11294
|
+
if (yyyy === undefined || MM === undefined || dd === undefined)
|
|
11295
|
+
return undefined;
|
|
11296
|
+
if (!isValidCalendarDate(yyyy, MM, dd))
|
|
11297
|
+
return undefined;
|
|
11298
|
+
return `${String(yyyy).padStart(4, '0')}-${String(MM).padStart(2, '0')}-${String(dd).padStart(2, '0')}`;
|
|
11299
|
+
}
|
|
11300
|
+
|
|
11301
|
+
const lmvzDatepickerCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } :host { display: inline-block; width: 100%; } .datepicker-panel { display: flex; flex-direction: column; gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); } .datepicker-header { display: flex; align-items: center; justify-content: space-between; width: 100%; } .datepicker-month-label { all: unset; font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--lmvz-semantic-color-on-surface-primary, #000000); text-align: center; cursor: default; pointer-events: none; user-select: none; } .datepicker-weekday-row { display: flex; gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); width: 100%; } .datepicker-weekday { flex: 1; display: flex; align-items: center; justify-content: center; font: var(--lmvz-typography-body-sm-strong, 500 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--lmvz-semantic-color-on-surface-secondary, #545454); min-width: 0; text-align: center; } .datepicker-grid { display: flex; flex-direction: column; gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } .datepicker-week-row { display: flex; gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } [part~='day'] { all: unset; flex: 1; width: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); min-width: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-radius: var(--lmvz-semantic-border-radius-round, 999px); font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--lmvz-semantic-color-on-surface-primary, #000000); background-color: transparent; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; position: relative; } [part~='day--disabled'], [part~='day']:disabled { opacity: var(--lmvz-global-opacity-disabled, 40%); pointer-events: none; } [part~='day']:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } [part~='day']:not(:disabled):hover { background-color: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); color: var(--lmvz-semantic-color-on-surface-primary, #000000); } [part~='day--today'] { box-shadow: inset 0 0 0 1px var(--lmvz-semantic-color-border-active, #0f8acc); } [part~='day--today']:not(:disabled):hover { background-color: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); box-shadow: inset 0 0 0 1px var(--lmvz-semantic-color-border-active, #0f8acc); } [part~='day--selected'] { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); box-shadow: none; } [part~='day--today'][part~='day--selected'] { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); box-shadow: none; } [part~='day--selected']:not(:disabled):hover { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } [part~='day--out-of-month'] { color: var(--lmvz-semantic-color-on-surface-tertiary, #7a7a7a); } `;
|
|
11302
|
+
|
|
11303
|
+
const CHEVRON_LEFT = toValidSvgStringWithFallback(chevronLeftSvg);
|
|
11304
|
+
const CHEVRON_RIGHT = toValidSvgStringWithFallback(chevronRightSvg);
|
|
11305
|
+
const CALENDAR_ICON = toValidSvgStringWithFallback(calendarSvg);
|
|
11306
|
+
class LmvzDatepicker {
|
|
11307
|
+
constructor(hostRef) {
|
|
11308
|
+
registerInstance(this, hostRef);
|
|
11309
|
+
this.lmvzChange = createEvent(this, "lmvzChange", 7);
|
|
11310
|
+
this.lmvzMonthChange = createEvent(this, "lmvzMonthChange", 7);
|
|
11311
|
+
this.lmvzOpen = createEvent(this, "lmvzOpen", 7);
|
|
11312
|
+
this.lmvzClose = createEvent(this, "lmvzClose", 7);
|
|
11313
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
11314
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
11315
|
+
}
|
|
11316
|
+
else {
|
|
11317
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
11318
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
11319
|
+
}
|
|
11320
|
+
}
|
|
11321
|
+
get el() { return getElement(this); }
|
|
11322
|
+
monthLabelId = `lmvz-dp-month-${Math.random().toString(36).slice(2, 9)}`;
|
|
11323
|
+
internals;
|
|
11324
|
+
visibleDays;
|
|
11325
|
+
inputEl;
|
|
11326
|
+
focusedButtonRef;
|
|
11327
|
+
initialValue;
|
|
11328
|
+
pendingGridFocus = false;
|
|
11329
|
+
syncOrigin = null;
|
|
11330
|
+
focusedDate;
|
|
11331
|
+
setFocusedDate(val) {
|
|
11332
|
+
if (this.focusedDate === val || (this.focusedDate && val && compare$1(this.focusedDate, val) === 0))
|
|
11333
|
+
return;
|
|
11334
|
+
this.focusedDate = val;
|
|
11335
|
+
}
|
|
11336
|
+
valueDate;
|
|
11337
|
+
get value() {
|
|
11338
|
+
return this.valueDate ? toIsoDateString(this.valueDate) : undefined;
|
|
11339
|
+
}
|
|
11340
|
+
set value(value) {
|
|
11341
|
+
this.valueDate = value ? parseIsoDateSafely(value) : undefined;
|
|
11342
|
+
this.visibleMonthDate = this.valueDate ? toPlainYearMonth(this.valueDate) : this.effectiveVisibleMonth;
|
|
11343
|
+
this.setFocusedDate(this.valueDate);
|
|
11344
|
+
this.syncInputTextFromValue();
|
|
11345
|
+
this.updateFormState();
|
|
11346
|
+
}
|
|
11347
|
+
visibleMonthDate;
|
|
11348
|
+
get visibleMonth() {
|
|
11349
|
+
return this.visibleMonthDate ? toIsoYearMonthString(this.visibleMonthDate) : undefined;
|
|
11350
|
+
}
|
|
11351
|
+
set visibleMonth(value) {
|
|
11352
|
+
this.visibleMonthDate = value ? fromString(value, getBasic) : undefined;
|
|
11353
|
+
this.initFocusedDate();
|
|
11354
|
+
}
|
|
11355
|
+
min;
|
|
11356
|
+
max;
|
|
11357
|
+
locale = 'de-CH';
|
|
11358
|
+
firstDayOfWeek = 1;
|
|
11359
|
+
disabled = false;
|
|
11360
|
+
readonly = false;
|
|
11361
|
+
required = false;
|
|
11362
|
+
name;
|
|
11363
|
+
label;
|
|
11364
|
+
placeholder;
|
|
11365
|
+
helperText;
|
|
11366
|
+
errorMessage;
|
|
11367
|
+
open = false;
|
|
11368
|
+
displayFormat;
|
|
11369
|
+
lmvzChange;
|
|
11370
|
+
lmvzMonthChange;
|
|
11371
|
+
lmvzOpen;
|
|
11372
|
+
lmvzClose;
|
|
11373
|
+
componentWillLoad() {
|
|
11374
|
+
if (!this.label) {
|
|
11375
|
+
console.warn('[lmvz-datepicker] no `label` provided; the text field will have no accessible name.');
|
|
11376
|
+
}
|
|
11377
|
+
this.initialValue = this.value;
|
|
11378
|
+
this.syncInputTextFromValue();
|
|
11379
|
+
this.updateFormState();
|
|
11380
|
+
}
|
|
11381
|
+
formAssociatedCallback(form) {
|
|
11382
|
+
if (!form)
|
|
11383
|
+
return;
|
|
11384
|
+
this.updateFormState();
|
|
11385
|
+
}
|
|
11386
|
+
formResetCallback() {
|
|
11387
|
+
this.internals.setValidity?.({});
|
|
11388
|
+
this.value = this.initialValue;
|
|
11389
|
+
}
|
|
11390
|
+
formStateRestoreCallback(state) {
|
|
11391
|
+
if (typeof state !== 'string')
|
|
11392
|
+
return;
|
|
11393
|
+
this.value = (state || undefined);
|
|
11394
|
+
}
|
|
11395
|
+
async checkValidity() {
|
|
11396
|
+
return this.internals.checkValidity?.() ?? true;
|
|
11397
|
+
}
|
|
11398
|
+
async reportValidity() {
|
|
11399
|
+
return this.internals.reportValidity?.() ?? true;
|
|
11400
|
+
}
|
|
11401
|
+
handleValidityRelevantPropChange() {
|
|
11402
|
+
this.updateFormState();
|
|
11403
|
+
}
|
|
11404
|
+
handleDisplayFormatChange() {
|
|
11405
|
+
this.syncInputTextFromValue();
|
|
11406
|
+
}
|
|
11407
|
+
handleDisabledChange(disabled) {
|
|
11408
|
+
if (disabled)
|
|
11409
|
+
this.open = false;
|
|
11410
|
+
}
|
|
11411
|
+
handleKeydown(ev) {
|
|
11412
|
+
if (this.disabled)
|
|
11413
|
+
return;
|
|
11414
|
+
const path = ev.composedPath();
|
|
11415
|
+
if (!path.some((el) => el?.getAttribute?.('role') === 'grid'))
|
|
11416
|
+
return;
|
|
11417
|
+
const focused = this.focusedDate;
|
|
11418
|
+
if (!focused) {
|
|
11419
|
+
console.warn('[lmvz-datepicker] any date should be focused but none is.');
|
|
11420
|
+
return;
|
|
11421
|
+
}
|
|
11422
|
+
const minDate = parseIsoDateSafely(this.min);
|
|
11423
|
+
const maxDate = parseIsoDateSafely(this.max);
|
|
11424
|
+
const swallowEvent = () => {
|
|
11425
|
+
ev.preventDefault();
|
|
11426
|
+
ev.stopPropagation();
|
|
11427
|
+
};
|
|
11428
|
+
switch (ev.key) {
|
|
11429
|
+
case 'ArrowRight': {
|
|
11430
|
+
swallowEvent();
|
|
11431
|
+
this.moveFocus(addDays(focused, 1));
|
|
11432
|
+
break;
|
|
11433
|
+
}
|
|
11434
|
+
case 'ArrowLeft': {
|
|
11435
|
+
swallowEvent();
|
|
11436
|
+
this.moveFocus(addDays(focused, -1));
|
|
11437
|
+
break;
|
|
11438
|
+
}
|
|
11439
|
+
case 'ArrowDown': {
|
|
11440
|
+
swallowEvent();
|
|
11441
|
+
this.moveFocus(addDays(focused, 7));
|
|
11442
|
+
break;
|
|
11443
|
+
}
|
|
11444
|
+
case 'ArrowUp': {
|
|
11445
|
+
swallowEvent();
|
|
11446
|
+
this.moveFocus(addDays(focused, -7));
|
|
11447
|
+
break;
|
|
11448
|
+
}
|
|
11449
|
+
case 'Home': {
|
|
11450
|
+
swallowEvent();
|
|
11451
|
+
this.moveFocus(firstSelectableDayOfMonth(this.effectiveVisibleMonth, minDate, maxDate));
|
|
11452
|
+
break;
|
|
11453
|
+
}
|
|
11454
|
+
case 'End': {
|
|
11455
|
+
swallowEvent();
|
|
11456
|
+
this.moveFocus(lastSelectableDayOfMonth(this.effectiveVisibleMonth, minDate, maxDate));
|
|
11457
|
+
break;
|
|
11458
|
+
}
|
|
11459
|
+
case 'PageUp':
|
|
11460
|
+
swallowEvent();
|
|
11461
|
+
this.moveFocus(ev.shiftKey ? addYears(focused, -1) : addMonths$1(focused, -1));
|
|
11462
|
+
break;
|
|
11463
|
+
case 'PageDown':
|
|
11464
|
+
swallowEvent();
|
|
11465
|
+
this.moveFocus(ev.shiftKey ? addYears(focused, 1) : addMonths$1(focused, 1));
|
|
11466
|
+
break;
|
|
11467
|
+
case 'Enter':
|
|
11468
|
+
case ' ':
|
|
11469
|
+
ev.preventDefault();
|
|
11470
|
+
if (!this.readonly && !isDisabled(focused, minDate, maxDate)) {
|
|
11471
|
+
this.selectDate(focused, { origin: 'calendar', closePopover: true });
|
|
11472
|
+
}
|
|
11473
|
+
break;
|
|
11474
|
+
}
|
|
11475
|
+
}
|
|
11476
|
+
initFocusedDate() {
|
|
11477
|
+
const vm = this.effectiveVisibleMonth;
|
|
11478
|
+
if (this.focusedDate && compare(toPlainYearMonth(this.focusedDate), vm) === 0) {
|
|
11479
|
+
return;
|
|
11480
|
+
}
|
|
11481
|
+
const selectedDate = this.valueDate;
|
|
11482
|
+
if (selectedDate && compare(toPlainYearMonth(selectedDate), vm) === 0) {
|
|
11483
|
+
this.setFocusedDate(selectedDate);
|
|
11484
|
+
return;
|
|
11485
|
+
}
|
|
11486
|
+
const todayDate = plainDateISO();
|
|
11487
|
+
if (compare(toPlainYearMonth(todayDate), vm) === 0) {
|
|
11488
|
+
this.setFocusedDate(todayDate);
|
|
11489
|
+
return;
|
|
11490
|
+
}
|
|
11491
|
+
this.setFocusedDate(toPlainDate(vm, { day: 1 }));
|
|
11492
|
+
}
|
|
11493
|
+
get effectiveVisibleMonth() {
|
|
11494
|
+
return this.visibleMonthDate ? this.visibleMonthDate : toPlainYearMonth(plainDateISO());
|
|
11495
|
+
}
|
|
11496
|
+
navigateMonth(delta, byMonthNav = false) {
|
|
11497
|
+
if (delta === 0)
|
|
11498
|
+
return;
|
|
11499
|
+
const newMonth = addMonths(this.effectiveVisibleMonth, delta);
|
|
11500
|
+
this.visibleMonthDate = newMonth;
|
|
11501
|
+
this.lmvzMonthChange.emit({ visibleMonth: toIsoYearMonthString(newMonth) });
|
|
11502
|
+
if (byMonthNav) {
|
|
11503
|
+
this.setFocusedDate(toPlainDate(newMonth, { day: 1 }));
|
|
11504
|
+
}
|
|
11505
|
+
}
|
|
11506
|
+
selectDate(date, opts = { origin: 'calendar' }) {
|
|
11507
|
+
this.syncOrigin = opts.origin;
|
|
11508
|
+
this.valueDate = date;
|
|
11509
|
+
this.setFocusedDate(date);
|
|
11510
|
+
this.lmvzChange.emit({ value: toIsoDateString(date) });
|
|
11511
|
+
this.navigateMonth(compare(toPlainYearMonth(date), this.effectiveVisibleMonth));
|
|
11512
|
+
if (opts.origin === 'input') {
|
|
11513
|
+
this.inputText = formatToDisplay(this.value, this.locale, this.displayFormat);
|
|
11514
|
+
this.hasUnparseableInput = false;
|
|
11515
|
+
}
|
|
11516
|
+
else {
|
|
11517
|
+
this.syncInputTextFromValue();
|
|
11518
|
+
}
|
|
11519
|
+
this.updateFormState();
|
|
11520
|
+
if (opts.closePopover)
|
|
11521
|
+
this.open = false;
|
|
11522
|
+
this.syncOrigin = null;
|
|
11523
|
+
}
|
|
11524
|
+
moveFocus(date) {
|
|
11525
|
+
if (!date)
|
|
11526
|
+
return;
|
|
11527
|
+
this.setFocusedDate(date);
|
|
11528
|
+
if (!this.visibleDays?.length)
|
|
11529
|
+
return;
|
|
11530
|
+
let day = this.visibleDays.at(0);
|
|
11531
|
+
if (day && compare$1(date, day) < 0) {
|
|
11532
|
+
return this.navigateMonth(-1);
|
|
11533
|
+
}
|
|
11534
|
+
day = this.visibleDays.at(-1);
|
|
11535
|
+
if (day && compare$1(date, day) > 0) {
|
|
11536
|
+
return this.navigateMonth(1);
|
|
11537
|
+
}
|
|
11538
|
+
}
|
|
11539
|
+
syncInputTextFromValue() {
|
|
11540
|
+
if (this.syncOrigin === 'input')
|
|
11541
|
+
return;
|
|
11542
|
+
this.inputText = formatToDisplay(this.value, this.locale, this.displayFormat);
|
|
11543
|
+
this.hasUnparseableInput = false;
|
|
11544
|
+
}
|
|
11545
|
+
inputText = '';
|
|
11546
|
+
hasUnparseableInput = false;
|
|
11547
|
+
handleInputTextChange = (ev) => {
|
|
11548
|
+
const text = ev.detail;
|
|
11549
|
+
this.inputText = text;
|
|
11550
|
+
if (!text.trim()) {
|
|
11551
|
+
this.hasUnparseableInput = false;
|
|
11552
|
+
if (this.valueDate) {
|
|
11553
|
+
this.syncOrigin = 'input';
|
|
11554
|
+
this.valueDate = undefined;
|
|
11555
|
+
this.lmvzChange.emit({ value: undefined });
|
|
11556
|
+
this.syncOrigin = null;
|
|
11557
|
+
}
|
|
11558
|
+
this.updateFormState();
|
|
11559
|
+
return;
|
|
11560
|
+
}
|
|
11561
|
+
const parsed = parseFromDisplay(text, this.locale, this.displayFormat);
|
|
11562
|
+
if (!parsed) {
|
|
11563
|
+
this.hasUnparseableInput = true;
|
|
11564
|
+
this.updateFormState();
|
|
11565
|
+
return;
|
|
11566
|
+
}
|
|
11567
|
+
this.hasUnparseableInput = false;
|
|
11568
|
+
const parsedDate = parseIsoDateSafely(parsed);
|
|
11569
|
+
if (!parsedDate)
|
|
11570
|
+
return;
|
|
11571
|
+
if (this.valueDate && compare$1(this.valueDate, parsedDate) === 0)
|
|
11572
|
+
return;
|
|
11573
|
+
this.selectDate(parsedDate, { origin: 'input' });
|
|
11574
|
+
};
|
|
11575
|
+
handleInputFocus(ev) {
|
|
11576
|
+
if (this.disabled || this.readonly)
|
|
11577
|
+
return;
|
|
11578
|
+
const originalTarget = ev.composedPath()[0];
|
|
11579
|
+
if (originalTarget !== this.inputEl && !this.inputEl?.contains(originalTarget ?? null))
|
|
11580
|
+
return;
|
|
11581
|
+
this.initFocusedDate();
|
|
11582
|
+
this.open = true;
|
|
11583
|
+
}
|
|
11584
|
+
handleInputKeydown = (ev) => {
|
|
11585
|
+
if (this.disabled || this.readonly)
|
|
11586
|
+
return;
|
|
11587
|
+
if (!['ArrowDown', 'ArrowUp', ' '].includes(ev.key))
|
|
11588
|
+
return;
|
|
11589
|
+
ev.preventDefault();
|
|
11590
|
+
if (!this.open) {
|
|
11591
|
+
this.pendingGridFocus = true;
|
|
11592
|
+
this.initFocusedDate();
|
|
11593
|
+
this.open = true;
|
|
11594
|
+
}
|
|
11595
|
+
else {
|
|
11596
|
+
this.focusGrid();
|
|
11597
|
+
}
|
|
11598
|
+
};
|
|
11599
|
+
focusGrid() {
|
|
11600
|
+
requestAnimationFrame(() => this.focusedButtonRef?.focus());
|
|
11601
|
+
}
|
|
11602
|
+
handlePopoverOpen = (ev) => {
|
|
11603
|
+
ev.stopPropagation();
|
|
11604
|
+
console.log('emitting open event');
|
|
11605
|
+
this.lmvzOpen.emit();
|
|
11606
|
+
if (this.pendingGridFocus) {
|
|
11607
|
+
this.pendingGridFocus = false;
|
|
11608
|
+
this.focusGrid();
|
|
11609
|
+
}
|
|
11610
|
+
};
|
|
11611
|
+
handlePopoverClose = (ev) => {
|
|
11612
|
+
console.log('handlePopoverClose', ev);
|
|
11613
|
+
ev.stopPropagation();
|
|
11614
|
+
this.open = false;
|
|
11615
|
+
this.lmvzClose.emit();
|
|
11616
|
+
};
|
|
11617
|
+
updateFormState() {
|
|
11618
|
+
const isoValue = this.value;
|
|
11619
|
+
this.internals.setFormValue?.(isoValue ?? null);
|
|
11620
|
+
const flags = {};
|
|
11621
|
+
if (this.required && !this.valueDate) {
|
|
11622
|
+
flags.valueMissing = true;
|
|
11623
|
+
}
|
|
11624
|
+
if (this.hasUnparseableInput) {
|
|
11625
|
+
flags.badInput = true;
|
|
11626
|
+
}
|
|
11627
|
+
if (this.valueDate) {
|
|
11628
|
+
const minDate = parseIsoDateSafely(this.min);
|
|
11629
|
+
const maxDate = parseIsoDateSafely(this.max);
|
|
11630
|
+
if (minDate && compare$1(this.valueDate, minDate) < 0)
|
|
11631
|
+
flags.rangeUnderflow = true;
|
|
11632
|
+
if (maxDate && compare$1(this.valueDate, maxDate) > 0)
|
|
11633
|
+
flags.rangeOverflow = true;
|
|
11634
|
+
}
|
|
11635
|
+
const isInvalid = Object.values(flags).some(Boolean);
|
|
11636
|
+
this.isInvalid = isInvalid;
|
|
11637
|
+
const validationLabels = getValidationLabels(this.locale);
|
|
11638
|
+
this.internals.setValidity?.(flags, isInvalid ? this.errorMessage || validationLabels.invalidDateMessage : undefined, isInvalid ? this.el : undefined);
|
|
11639
|
+
}
|
|
11640
|
+
isInvalid = false;
|
|
11641
|
+
get effectivePlaceholder() {
|
|
11642
|
+
return this.placeholder ?? derivePatternFromLocale(this.locale).toLowerCase();
|
|
11643
|
+
}
|
|
11644
|
+
renderHeader() {
|
|
11645
|
+
const { locale } = this;
|
|
11646
|
+
const vm = this.effectiveVisibleMonth;
|
|
11647
|
+
const navLabels = getNavLabels(locale);
|
|
11648
|
+
const monthYearLabel = toLocaleString(toPlainDate(vm, { day: 1 }), locale, { month: 'long', year: 'numeric' });
|
|
11649
|
+
const prevMonth = addMonths(vm, -1);
|
|
11650
|
+
const nextMonth = addMonths(vm, 1);
|
|
11651
|
+
const minYM = this.min ? fromString(this.min.slice(0, 7), getBasic) : undefined;
|
|
11652
|
+
const maxYM = this.max ? fromString(this.max.slice(0, 7), getBasic) : undefined;
|
|
11653
|
+
const isPrevDisabled = this.disabled || (minYM !== undefined && compare(prevMonth, minYM) < 0);
|
|
11654
|
+
const isNextDisabled = this.disabled || (maxYM !== undefined && compare(nextMonth, maxYM) > 0);
|
|
11655
|
+
return (hAsync("div", { part: "header", class: "datepicker-header" }, hAsync("lmvz-button", { part: "nav-prev", variant: "tertiary", scale: "small", "aria-label": navLabels.prev, disabled: isPrevDisabled, onLmvzActivation: () => this.navigateMonth(-1, true) }, hAsync("lmvz-icon", { icon: CHEVRON_LEFT, "aria-hidden": "true" })), hAsync("span", { id: this.monthLabelId, part: "month-label", class: "datepicker-month-label" }, monthYearLabel), hAsync("lmvz-button", { part: "nav-next", variant: "tertiary", scale: "small", "aria-label": navLabels.next, disabled: isNextDisabled, onLmvzActivation: () => this.navigateMonth(1, true) }, hAsync("lmvz-icon", { icon: CHEVRON_RIGHT, "aria-hidden": "true" }))));
|
|
11656
|
+
}
|
|
11657
|
+
renderWeekdayRow() {
|
|
11658
|
+
const { locale } = this;
|
|
11659
|
+
const mondayFirstDows = [1, 2, 3, 4, 5, 6, 7];
|
|
11660
|
+
const refMonday = fromFields({ year: 2024, month: 1, day: 1 });
|
|
11661
|
+
return (hAsync("div", { part: "weekday-row", role: "row", class: "datepicker-weekday-row" }, mondayFirstDows.map((dow) => {
|
|
11662
|
+
const refDate = addDays(refMonday, dow - 1);
|
|
11663
|
+
const shortName = toLocaleString(refDate, locale, { weekday: 'short' });
|
|
11664
|
+
const longName = toLocaleString(refDate, locale, { weekday: 'long' });
|
|
11665
|
+
return (hAsync("span", { part: "weekday", role: "columnheader", "aria-label": longName, class: "datepicker-weekday", key: dow }, hAsync("abbr", { title: longName }, shortName)));
|
|
11666
|
+
})));
|
|
11667
|
+
}
|
|
11668
|
+
renderGrid() {
|
|
11669
|
+
const { locale, focusedDate } = this;
|
|
11670
|
+
const vm = this.effectiveVisibleMonth;
|
|
11671
|
+
const selectedDate = this.valueDate;
|
|
11672
|
+
const minDate = parseIsoDateSafely(this.min);
|
|
11673
|
+
const maxDate = parseIsoDateSafely(this.max);
|
|
11674
|
+
const grid = (this.visibleDays = buildCalendarGrid(vm));
|
|
11675
|
+
const weekdayAriaLabelFormatter = {
|
|
11676
|
+
weekday: 'long',
|
|
11677
|
+
day: 'numeric',
|
|
11678
|
+
month: 'long',
|
|
11679
|
+
year: 'numeric',
|
|
11680
|
+
};
|
|
11681
|
+
const weeks = [];
|
|
11682
|
+
for (let w = 0; w < 6; w++) {
|
|
11683
|
+
if (!grid.at(w * 7))
|
|
11684
|
+
break;
|
|
11685
|
+
weeks.push(grid.slice(w * 7, w * 7 + 7));
|
|
11686
|
+
}
|
|
11687
|
+
return (hAsync("div", { part: "grid", role: "grid", "aria-labelledby": this.monthLabelId, class: "datepicker-grid" }, this.renderWeekdayRow(), weeks.map((week, wi) => (hAsync("div", { part: "week-row", role: "row", class: "datepicker-week-row", key: wi }, week.map((date) => {
|
|
11688
|
+
const iso = toIsoDateString(date);
|
|
11689
|
+
const isTodayDate = compare$1(date, plainDateISO()) === 0;
|
|
11690
|
+
const isSelectedDate = isSelected(date, selectedDate);
|
|
11691
|
+
const isOutOfMonth = compare(toPlainYearMonth(date), vm) !== 0;
|
|
11692
|
+
const isDisabledDate = this.readonly || isDisabled(date, minDate, maxDate);
|
|
11693
|
+
const isFocused = focusedDate !== undefined && compare$1(date, focusedDate) === 0;
|
|
11694
|
+
const partMarkers = ['day'];
|
|
11695
|
+
if (isTodayDate)
|
|
11696
|
+
partMarkers.push('day--today');
|
|
11697
|
+
if (isSelectedDate)
|
|
11698
|
+
partMarkers.push('day--selected');
|
|
11699
|
+
if (isOutOfMonth)
|
|
11700
|
+
partMarkers.push('day--out-of-month');
|
|
11701
|
+
if (isDisabledDate)
|
|
11702
|
+
partMarkers.push('day--disabled');
|
|
11703
|
+
const ariaLabel = toLocaleString(date, locale, weekdayAriaLabelFormatter);
|
|
11704
|
+
let fromRender = false;
|
|
11705
|
+
let buttonRef;
|
|
11706
|
+
if (isFocused) {
|
|
11707
|
+
requestAnimationFrame(() => {
|
|
11708
|
+
const activeEl = this.el.shadowRoot?.activeElement;
|
|
11709
|
+
if (!(activeEl instanceof HTMLButtonElement) || activeEl.getAttribute('role') !== 'gridcell')
|
|
11710
|
+
return;
|
|
11711
|
+
fromRender = true;
|
|
11712
|
+
buttonRef?.focus();
|
|
11713
|
+
});
|
|
11714
|
+
}
|
|
11715
|
+
return (hAsync("button", { "data-debug-id": iso, role: "gridcell", type: "button", part: partMarkers.join(' '), tabIndex: isFocused ? 0 : -1, "aria-label": ariaLabel, "aria-selected": isSelectedDate ? 'true' : undefined, "aria-current": isTodayDate ? 'date' : undefined, "aria-disabled": isDisabledDate ? 'true' : undefined, onClick: () => {
|
|
11716
|
+
if (isDisabledDate || this.disabled)
|
|
11717
|
+
return;
|
|
11718
|
+
this.selectDate(date, { origin: 'calendar', closePopover: true });
|
|
11719
|
+
}, ref: (e) => {
|
|
11720
|
+
buttonRef = e;
|
|
11721
|
+
if (isFocused)
|
|
11722
|
+
this.focusedButtonRef = e;
|
|
11723
|
+
}, onFocus: (e) => {
|
|
11724
|
+
console.log('focus event on grid cell', iso, e.target);
|
|
11725
|
+
if (!this.el.shadowRoot?.contains(e.target))
|
|
11726
|
+
return;
|
|
11727
|
+
if (fromRender) {
|
|
11728
|
+
fromRender = false;
|
|
11729
|
+
return;
|
|
11730
|
+
}
|
|
11731
|
+
this.setFocusedDate(date);
|
|
11732
|
+
}, key: iso }, date.day));
|
|
11733
|
+
}))))));
|
|
11734
|
+
}
|
|
11735
|
+
render() {
|
|
11736
|
+
const validationLabels = getValidationLabels(this.locale);
|
|
11737
|
+
const popoverLabel = this.label ? `${this.label} ${validationLabels.popoverSuffix}` : undefined;
|
|
11738
|
+
return (hAsync(Host, { key: 'df61136bb4d184e91e086a06f60e3c198f8a2b85' }, hAsync("lmvz-input", { key: '04986afb4a0926df4da693de6210ee4fccd74bd7', ref: (el) => {
|
|
11739
|
+
this.inputEl = el;
|
|
11740
|
+
}, label: this.label ?? '', placeholder: this.effectivePlaceholder, helperText: this.helperText, errorMessage: this.errorMessage, error: this.isInvalid, disabled: this.disabled, readonly: this.readonly, required: this.required, value: this.inputText, autocomplete: "off", onLmvzInput: this.handleInputTextChange, onKeyDown: this.handleInputKeydown }, hAsync("lmvz-icon", { key: '47897492e6df2f4b303c99aa33c48f326f3d9d63', slot: "after-input", icon: CALENDAR_ICON, "aria-hidden": "true" })), hAsync("lmvz-popover", { key: 'd2904def9519907f56dada15df992800da77db55', anchor: this.inputEl, open: this.open && !this.disabled, autoFocus: false, size: "md", label: popoverLabel, onLmvzOpen: this.handlePopoverOpen, onLmvzClose: this.handlePopoverClose }, hAsync("div", { key: 'dbdfe38144a63e5ac9de4c46e0df9918f898de28', part: "panel", class: "datepicker-panel" }, this.renderHeader(), this.renderGrid()))));
|
|
11741
|
+
}
|
|
11742
|
+
static get delegatesFocus() { return true; }
|
|
11743
|
+
static get formAssociated() { return true; }
|
|
11744
|
+
static get watchers() { return {
|
|
11745
|
+
"required": [{
|
|
11746
|
+
"handleValidityRelevantPropChange": 0
|
|
11747
|
+
}],
|
|
11748
|
+
"min": [{
|
|
11749
|
+
"handleValidityRelevantPropChange": 0
|
|
11750
|
+
}],
|
|
11751
|
+
"max": [{
|
|
11752
|
+
"handleValidityRelevantPropChange": 0
|
|
11753
|
+
}],
|
|
11754
|
+
"locale": [{
|
|
11755
|
+
"handleDisplayFormatChange": 0
|
|
11756
|
+
}],
|
|
11757
|
+
"displayFormat": [{
|
|
11758
|
+
"handleDisplayFormatChange": 0
|
|
11759
|
+
}],
|
|
11760
|
+
"disabled": [{
|
|
11761
|
+
"handleDisabledChange": 0
|
|
11762
|
+
}]
|
|
11763
|
+
}; }
|
|
11764
|
+
static get style() { return lmvzDatepickerCss(); }
|
|
11765
|
+
static get cmpMeta() { return {
|
|
11766
|
+
"$flags$": 601,
|
|
11767
|
+
"$tagName$": "lmvz-datepicker",
|
|
11768
|
+
"$members$": {
|
|
11769
|
+
"value": [6145],
|
|
11770
|
+
"visibleMonth": [6145, "visible-month"],
|
|
11771
|
+
"min": [1],
|
|
11772
|
+
"max": [1],
|
|
11773
|
+
"locale": [1],
|
|
11774
|
+
"firstDayOfWeek": [2, "first-day-of-week"],
|
|
11775
|
+
"disabled": [516],
|
|
11776
|
+
"readonly": [516],
|
|
11777
|
+
"required": [516],
|
|
11778
|
+
"name": [513],
|
|
11779
|
+
"label": [1],
|
|
11780
|
+
"placeholder": [1],
|
|
11781
|
+
"helperText": [1, "helper-text"],
|
|
11782
|
+
"errorMessage": [1, "error-message"],
|
|
11783
|
+
"open": [1540],
|
|
11784
|
+
"displayFormat": [1, "display-format"],
|
|
11785
|
+
"focusedDate": [32],
|
|
11786
|
+
"valueDate": [32],
|
|
11787
|
+
"visibleMonthDate": [32],
|
|
11788
|
+
"inputText": [32],
|
|
11789
|
+
"hasUnparseableInput": [32],
|
|
11790
|
+
"isInvalid": [32],
|
|
11791
|
+
"checkValidity": [64],
|
|
11792
|
+
"reportValidity": [64]
|
|
11793
|
+
},
|
|
11794
|
+
"$listeners$": [[0, "keydown", "handleKeydown"], [0, "focusin", "handleInputFocus"], [0, "click", "handleInputFocus"]],
|
|
11795
|
+
"$lazyBundleId$": "-",
|
|
11796
|
+
"$attrsToReflect$": [["disabled", "disabled"], ["readonly", "readonly"], ["required", "required"], ["name", "name"], ["open", "open"]]
|
|
11797
|
+
}; }
|
|
11798
|
+
}
|
|
11799
|
+
|
|
11800
|
+
const logoSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA0NiA3MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI3Ml80MDUpIj4KPHBhdGggZD0iTTEyLjUgMjAuNjVDMTMuMSAyMC42NSAxNC4yIDIwLjM1IDE0LjcgMjAuMzVDMTYuMSAyMC4zNSAxNy4yIDIxLjQ1IDE3LjIgMjIuODVDMTcuMiAyNC4yNSAxNi4xIDI1LjM1IDE0LjcgMjUuMzVIMi44QzEuMiAyNS4zNSAwIDI0LjE1IDAgMjIuNTVDMCAyMS45NSAwLjIgMjAuNjUgMC4yIDIwLjA1VjUuODQ5OTlDMC4yIDUuMTQ5OTkgMCAzLjk0OTk5IDAgMy4zNDk5OUMwIDEuNzQ5OTkgMS4yIDAuNTQ5OTg4IDIuOCAwLjU0OTk4OEM0LjMgMC41NDk5ODggNS42IDEuNzQ5OTkgNS42IDMuMzQ5OTlDNS42IDMuOTQ5OTkgNS40IDUuMTQ5OTkgNS40IDUuODQ5OTlWMjAuNTVIMTIuNVYyMC42NVpNMjIuMSAyMi43NUMyMi4xIDIyLjE1IDIyLjMgMjAuOTUgMjIuMyAyMC4yNVY1Ljg0OTk5QzIyLjMgNS4xNDk5OSAyMi4xIDMuOTQ5OTkgMjIuMSAzLjQ0OTk5QzIyLjEgMS45NDk5OSAyMy4yIDAuNzQ5OTg4IDI0LjYgMC43NDk5ODhIMjUuMkMyNi40IDAuNzQ5OTg4IDI3LjIgMS41NDk5OSAyNy42IDIuNjQ5OTlMMjggMy40NDk5OUwzMi45IDE0LjA1QzMzLjMgMTQuOTUgMzMuNyAxNi4wNSAzNCAxNi43NUMzNC4zIDE2LjA1IDM0LjcgMTQuOTUgMzUuMSAxNC4wNUw0MCAzLjU0OTk5TDQwLjMgMi41NDk5OUM0MC43IDEuNTQ5OTkgNDEuNSAwLjY0OTk4OCA0Mi42IDAuNjQ5OTg4SDQzLjJDNDQuNyAwLjY0OTk4OCA0NS43IDEuODQ5OTkgNDUuNyAzLjM0OTk5QzQ1LjcgMy45NDk5OSA0NS41IDUuMTQ5OTkgNDUuNSA1Ljc0OTk5VjIwLjE1QzQ1LjUgMjAuODUgNDUuNyAyMi4wNSA0NS43IDIyLjY1QzQ1LjcgMjQuMjUgNDQuNSAyNS40NSA0MyAyNS40NUM0MS40IDI1LjQ1IDQwLjMgMjQuMjUgNDAuMyAyMi42NUM0MC4zIDIxLjk1IDQwLjQgMjAuNzUgNDAuNCAyMC4xNUw0MC42IDE0LjA1QzQwLjYgMTMuMTUgNDAuNyAxMS43NSA0MC43IDEwLjY1TDM3IDE5LjA1QzM2LjcgMTkuNzUgMzYuNiAxOS45NSAzNi40IDIwLjM1QzM2IDIxLjI1IDM1LjMgMjEuODUgMzMuOSAyMS44NUMzMi41IDIxLjg1IDMxLjggMjEuMjUgMzEuNCAyMC40NUMzMS4yIDIwLjA1IDMxLjIgMTkuNzUgMzAuOCAxOS4wNUwyNyAxMC43NUMyNyAxMC43NSAyNy4xIDEzLjE1IDI3LjIgMTQuMDVMMjcuNCAyMC4xNUMyNy40IDIwLjg1IDI3LjUgMjEuOTUgMjcuNSAyMi42NUMyNy41IDI0LjI1IDI2LjQgMjUuNDUgMjQuOCAyNS40NUMyMy4zIDI1LjU1IDIyLjEgMjQuMjUgMjIuMSAyMi43NVpNMjguNyAzMi45NUMyOS4xIDMyLjk1IDMwLjIgMzMuMTUgMzAuNyAzMy4xNUg0MS44QzQyLjMgMzMuMTUgNDMuMiAzMi45NSA0My43IDMyLjk1QzQ0LjkgMzIuOTUgNDUuOCAzMy44NSA0NS44IDM1LjA1QzQ1LjggMzYuMTUgNDQuOSAzNy4xNSA0My43IDM3LjE1QzQzLjMgMzcuMTUgNDIuMyAzNi45NSA0MS44IDM2Ljk1SDMwLjhDMzAuMyAzNi45NSAyOS4yIDM3LjE1IDI4LjggMzcuMTVDMjcuNiAzNy4xNSAyNi43IDM2LjI1IDI2LjcgMzUuMDVDMjYuNiAzMy45NSAyNy41IDMyLjk1IDI4LjcgMzIuOTVaTTIuMSA2Ny4yNUMyLjUgNjcuMjUgMy42IDY3LjQ1IDQuMSA2Ny40NUgxOC41QzE5IDY3LjQ1IDE5LjkgNjcuMjUgMjAuNCA2Ny4yNUMyMS42IDY3LjI1IDIyLjUgNjguMTUgMjIuNSA2OS4zNUMyMi41IDcwLjQ1IDIxLjYgNzEuNDUgMjAuNCA3MS40NUMyMCA3MS40NSAxOSA3MS4yNSAxOC41IDcxLjI1SDQuMUMzLjYgNzEuMjUgMi41IDcxLjQ1IDIuMSA3MS40NUMwLjkgNzEuNDUgMCA3MC41NSAwIDY5LjM1QzAgNjguMjUgMC45IDY3LjI1IDIuMSA2Ny4yNVpNMjEuOSAzNS42NUMyMS45IDM1Ljk1IDIxLjggMzYuMzUgMjEuNiAzNi43NUMyMS4zIDM3LjQ1IDIwLjkgMzguMzUgMjAuNyAzOC44NUwxNC43IDU0LjY1QzE0LjUgNTUuMDUgMTQuNCA1NS41NSAxNC4yIDU2LjM1QzEzLjggNTcuNjUgMTIuNiA1OC4yNSAxMS4yIDU4LjI1SDEwLjhDOS40IDU4LjI1IDguMiA1Ny43NSA3LjggNTYuMzVDNy42IDU1LjU1IDcuNCA1NS4xNSA3LjIgNTQuNjVMMS4yIDM4Ljg1QzEgMzguMzUgMC42IDM3LjU1IDAuMiAzNi44NUMwLjEgMzYuNDUgMCAzNS45NSAwIDM1LjY1QzAgMzQuMTUgMS4yIDMyLjg1IDIuOCAzMi44NUMzLjkgMzIuODUgNSAzMy41NSA1LjMgMzQuNzVDNS41IDM1LjU1IDUuNSAzNi4xNSA2IDM3LjU1TDEwLjIgNDkuNDVDMTAuNSA1MC4zNSAxMC45IDUxLjQ1IDExLjEgNTIuMzVDMTEuMyA1MS40NSAxMS42IDUwLjQ1IDExLjkgNDkuNTVMMTYgMzcuNTVDMTYuNSAzNi4wNSAxNi40IDM1LjY1IDE2LjcgMzQuODVDMTcuMSAzMy42NSAxOC4xIDMyLjg1IDE5LjMgMzIuODVDMjAuOSAzMi44NSAyMS45IDM0LjE1IDIxLjkgMzUuNjVaTTI5LjcgNzEuNDVDMjguMiA3MS40NSAyNy4yIDcwLjQ1IDI3LjIgNjkuMTVDMjcuMiA2OC43NSAyNy4yIDY4LjI1IDI3LjggNjcuNDVMMzcuNCA1My40NUMzNy45IDUyLjc1IDM4LjUgNTIuMDUgMzkuMSA1MS4zNUgzMi4yQzMxLjUgNTEuMzUgMzAuNyA1MS42NSAzMC4xIDUxLjY1QzI4LjcgNTEuNjUgMjcuNiA1MC43NSAyNy42IDQ5LjM1QzI3LjYgNDcuOTUgMjguNyA0Ni45NSAzMC4xIDQ2Ljk1SDQyLjdDNDQuMiA0Ni45NSA0NS4yIDQ3Ljg1IDQ1LjIgNDkuMjVDNDUuMiA0OS42NSA0NSA1MC4zNSA0NC41IDUxLjA1TDM1LjIgNjQuODVDMzQuNyA2NS42NSAzNC4xIDY2LjQ1IDMzLjUgNjcuMDVINDEuMUM0MS45IDY3LjA1IDQyLjcgNjYuNzUgNDMuMyA2Ni43NUM0NC43IDY2Ljc1IDQ1LjcgNjcuNzUgNDUuNyA2OS4wNUM0NS43IDcwLjU1IDQ0LjUgNzEuNTUgNDMuMiA3MS41NUgyOS43VjcxLjQ1WiIgZmlsbD0iYmxhY2siLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yNzJfNDA1Ij4KPHJlY3Qgd2lkdGg9IjQ2IiBoZWlnaHQ9IjcyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=';
|
|
11801
|
+
|
|
11802
|
+
const lmvzHeaderCss = () => `:host{display:flex;width:100vw;flex-direction:row;align-items:center;box-sizing:border-box;background-color:var(--lmvz-semantic-color-surface-primary, #ffffff);--lmvz-header-x-spacing-level-1:var(--lmvz-dimension-28-8, clamp(0.5rem, 0.2rem + 1.29vw, 1.75rem));--lmvz-header-x-spacing-level-2:var(--lmvz-component-buttongroup-wrapper-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem));padding:var(--lmvz-dimension-16-8, clamp(0.5rem, 0.38rem + 0.52vw, 1rem)) var(--lmvz-header-x-spacing-level-1);gap:var(--lmvz-header-x-spacing-level-1);.brand{display:inline-flex;justify-content:center;align-items:center}#fallback-logo-lmvz{height:34px;width:auto}nav{flex-grow:1}.primary-menubar{display:flex;flex-direction:row;align-items:center}.secondary-menubar{display:flex;flex-direction:row;align-items:center;margin-left:var(--lmvz-header-x-spacing-level-2);padding-left:var(--lmvz-header-x-spacing-level-2);border-left:1px solid var(--lmvz-semantic-color-border-default, #e0e0e0)}}`;
|
|
11803
|
+
|
|
11804
|
+
class LmvzHeader extends ReactiveControllerHost {
|
|
11805
|
+
get el() { return getElement(this); }
|
|
11806
|
+
get validationEl() {
|
|
11807
|
+
return this.el;
|
|
11808
|
+
}
|
|
11809
|
+
primarySlot;
|
|
11810
|
+
secondarySlot;
|
|
11811
|
+
secondaryNav;
|
|
11812
|
+
keyboardNavigationController = new DirectionalFocusController(this, { orientation: 'both' });
|
|
11813
|
+
get primaryMenuitems() {
|
|
11814
|
+
return this.primarySlot?.assignedElements({ flatten: false }) || [];
|
|
11815
|
+
}
|
|
11816
|
+
get secondaryMenuitems() {
|
|
11817
|
+
return this.secondarySlot?.assignedElements({ flatten: true }) || [];
|
|
11818
|
+
}
|
|
11819
|
+
get role() {
|
|
11820
|
+
return 'banner';
|
|
11821
|
+
}
|
|
11822
|
+
lmvzActiveNav;
|
|
11823
|
+
get secondarySlotName() {
|
|
11824
|
+
return `connect-nav-${this.lmvzActiveNav}`;
|
|
11825
|
+
}
|
|
11826
|
+
constructor(hostRef) {
|
|
11827
|
+
super();
|
|
11828
|
+
registerInstance(this, hostRef);
|
|
11829
|
+
this.addController(new AriaValidationController(this, { reValidateOnPropChanges: true }));
|
|
11830
|
+
this.addController(this.keyboardNavigationController);
|
|
11831
|
+
}
|
|
11832
|
+
handleActiveNavChange() {
|
|
11833
|
+
this.updateElementsActive();
|
|
11834
|
+
}
|
|
11835
|
+
async initFocus() {
|
|
11836
|
+
this.keyboardNavigationController.initFocus();
|
|
11837
|
+
}
|
|
11838
|
+
componentDidLoad() {
|
|
11839
|
+
this.primarySlot?.addEventListener('slotchange', this.handlePrimaryNavItemsChange.bind(this));
|
|
11840
|
+
this.handlePrimaryNavItemsChange();
|
|
11841
|
+
this.secondarySlot?.addEventListener('slotchange', this.handleSecondaryNavItemsChange.bind(this));
|
|
11842
|
+
super.componentDidLoad();
|
|
11843
|
+
}
|
|
11844
|
+
handlePrimaryNavItemsChange() {
|
|
11845
|
+
const items = this.primaryMenuitems;
|
|
11846
|
+
if (!items.length) {
|
|
11847
|
+
console.warn('Primary slot has no assigned elements. Please add navigation items to the primary slot.');
|
|
11848
|
+
return;
|
|
11849
|
+
}
|
|
11850
|
+
items.forEach((el) => {
|
|
11851
|
+
el.setAttribute('aria-haspopup', 'true');
|
|
11852
|
+
el.setAttribute('aria-controls', `nav-secondary`);
|
|
11853
|
+
});
|
|
11854
|
+
this.updateElementsActive();
|
|
11855
|
+
this.updateKeyboardNavSubjects();
|
|
11856
|
+
}
|
|
11857
|
+
handleSecondaryNavItemsChange() {
|
|
11858
|
+
const items = this.secondaryMenuitems;
|
|
11859
|
+
if (!items.length) {
|
|
11860
|
+
return;
|
|
11861
|
+
}
|
|
11862
|
+
this.updateKeyboardNavSubjects();
|
|
11863
|
+
}
|
|
11864
|
+
updateKeyboardNavSubjects() {
|
|
11865
|
+
this.keyboardNavigationController.updateElements([...this.primaryMenuitems, ...this.secondaryMenuitems]);
|
|
11866
|
+
}
|
|
11867
|
+
updateElementsActive() {
|
|
11868
|
+
const items = this.primaryMenuitems;
|
|
11869
|
+
if (!items.length)
|
|
11870
|
+
return;
|
|
11871
|
+
let label = '';
|
|
11872
|
+
items.forEach((el) => {
|
|
11873
|
+
const isActive = el.id === this.lmvzActiveNav;
|
|
11874
|
+
if (isActive)
|
|
11875
|
+
label = el.textContent || el.id;
|
|
11876
|
+
el.setAttribute('aria-expanded', isActive ? 'true' : 'false');
|
|
11877
|
+
});
|
|
11878
|
+
if (!label)
|
|
11879
|
+
return;
|
|
11880
|
+
this.secondaryNav?.setAttribute('aria-label', `Untermenü für ${label}`);
|
|
11881
|
+
}
|
|
11882
|
+
delegateFocus() {
|
|
11883
|
+
const firstFocusable = this.primaryMenuitems[0];
|
|
11884
|
+
if (firstFocusable) {
|
|
11885
|
+
firstFocusable.focus();
|
|
11886
|
+
}
|
|
11887
|
+
}
|
|
11888
|
+
render() {
|
|
11889
|
+
return (hAsync(Host, { key: '77744fd74160551232eb0347e9ebb01eb3b9bec0', onFocus: this.delegateFocus.bind(this) }, hAsync("div", { key: 'dfd78b2a2ab06b010d9f29dd61f57aced82243fe', class: "brand" }, hAsync("slot", { key: 'c6d29bbdbcbe581a8a170fbeb3d6ab1e31d27dcd', name: "brand" }, hAsync("img", { key: '80cea3b254d153411864d52c2ba300e0eb3c57a7', id: "fallback-logo-lmvz", src: logoSvg, alt: "Lehrmittelverlag Z\u00FCrich" }))), hAsync("nav", { key: '71c53ae0300b61291d0763cdb23f1f645a83928a', "aria-label": "Hauptnavigation" }, hAsync("div", { key: '09949b77a66c54a10c4c141de846fd5697b9d445', role: "menubar", class: "primary-menubar" }, hAsync("slot", { key: 'acec0cf7e13325c49d1e0929b90b056ad1cbbe64', name: "nav-primary", ref: (el) => (this.primarySlot = el) }), hAsync("div", { key: 'd35860c71ad5e28ee2e3aaafb157acbeff41d83e', role: "menu", id: "nav-secondary", class: "secondary-menubar", hidden: !this.lmvzActiveNav, ref: (el) => (this.secondaryNav = el) }, hAsync("slot", { key: 'a4c3a1ad1b1de5bd903b54ed6bd1616ce6517bbb', name: this.secondarySlotName, ref: (el) => (this.secondarySlot = el) })))), hAsync("div", { key: 'ff50045d9ab28bf66a619a48d9ea1f0ed2f5f952', class: "actions" }, hAsync("slot", { key: '6ead0b7a54bf93bb06f0eab2aa8159bd6e96e8f5', name: "actions" }))));
|
|
11890
|
+
}
|
|
11891
|
+
static get watchers() { return {
|
|
11892
|
+
"lmvzActiveNav": [{
|
|
11893
|
+
"handleActiveNavChange": 0
|
|
11894
|
+
}]
|
|
11895
|
+
}; }
|
|
11896
|
+
static get style() { return lmvzHeaderCss(); }
|
|
11897
|
+
static get cmpMeta() { return {
|
|
11898
|
+
"$flags$": 777,
|
|
11899
|
+
"$tagName$": "lmvz-header",
|
|
11900
|
+
"$members$": {
|
|
11901
|
+
"role": [2561],
|
|
11902
|
+
"lmvzActiveNav": [1, "lmvz-active-nav"],
|
|
11903
|
+
"initFocus": [64]
|
|
11904
|
+
},
|
|
11905
|
+
"$listeners$": undefined,
|
|
11906
|
+
"$lazyBundleId$": "-",
|
|
11907
|
+
"$attrsToReflect$": [["role", "role"]]
|
|
11908
|
+
}; }
|
|
11909
|
+
}
|
|
11910
|
+
|
|
11911
|
+
const lmvzIconCss = () => `.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));--lmvz-icon-size:var(--lmvz-component-size, var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));display:inline-block;line-height:0;svg{display:block;height:var(--lmvz-icon-size);width:auto}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-lg, clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem))}}[size='inherit'].sc-lmvz-icon-h{svg{height:var(--lmvz-component-size, inherit)}}[weight='light'].sc-lmvz-icon-h{svg path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg path{stroke-width:2;fill:var(--lmvz-icon-color)}}`;
|
|
11912
|
+
|
|
11913
|
+
class LmvzIcon extends ReactiveControllerHost {
|
|
11914
|
+
intersectionObserver;
|
|
11915
|
+
ariaValidationController = new AriaValidationController(this);
|
|
11916
|
+
get el() { return getElement(this); }
|
|
11917
|
+
validationEl;
|
|
11918
|
+
icon;
|
|
11919
|
+
weight = 'medium';
|
|
11920
|
+
size = 'md';
|
|
11921
|
+
iconset;
|
|
11922
|
+
iconData;
|
|
11923
|
+
visible = false;
|
|
11924
|
+
ariaLabel;
|
|
11925
|
+
get ariaHidden() {
|
|
11926
|
+
return !this.ariaLabel;
|
|
11927
|
+
}
|
|
11928
|
+
constructor(hostRef) {
|
|
11929
|
+
super();
|
|
11930
|
+
registerInstance(this, hostRef);
|
|
11931
|
+
this.addController(this.ariaValidationController);
|
|
11932
|
+
}
|
|
11933
|
+
connectedCallback() {
|
|
11934
|
+
this.waitUntilVisible(() => {
|
|
11935
|
+
this.visible = true;
|
|
11936
|
+
this.loadIconPathData();
|
|
11937
|
+
});
|
|
11938
|
+
super.connectedCallback();
|
|
11939
|
+
}
|
|
11940
|
+
disconnectedCallback() {
|
|
11941
|
+
if (this.intersectionObserver && typeof this.intersectionObserver.disconnect === 'function') {
|
|
11942
|
+
this.intersectionObserver.disconnect();
|
|
11943
|
+
}
|
|
11944
|
+
this.intersectionObserver = undefined;
|
|
11945
|
+
super.disconnectedCallback();
|
|
11946
|
+
}
|
|
11947
|
+
async loadIconPathData() {
|
|
11948
|
+
{
|
|
11949
|
+
return;
|
|
11950
|
+
}
|
|
11951
|
+
}
|
|
11952
|
+
componentDidRender() {
|
|
11953
|
+
this.validationEl = this.el.querySelector('svg');
|
|
11954
|
+
this.ariaValidationController.revalidateAria();
|
|
11955
|
+
super.componentDidRender();
|
|
11956
|
+
}
|
|
11957
|
+
render() {
|
|
11958
|
+
return hAsync(Host, { key: 'be6032d11399289c3baddd63ebc7d9e1fb98b773', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
|
|
11959
|
+
}
|
|
11960
|
+
waitUntilVisible(callback, rootMargin = 50) {
|
|
11961
|
+
{
|
|
11962
|
+
callback();
|
|
11963
|
+
return;
|
|
11964
|
+
}
|
|
11965
|
+
}
|
|
11966
|
+
static get watchers() { return {
|
|
11967
|
+
"icon": [{
|
|
11968
|
+
"loadIconPathData": 0
|
|
11969
|
+
}],
|
|
11970
|
+
"iconset": [{
|
|
11971
|
+
"loadIconPathData": 0
|
|
11972
|
+
}]
|
|
11973
|
+
}; }
|
|
11974
|
+
static get style() { return lmvzIconCss(); }
|
|
11975
|
+
static get cmpMeta() { return {
|
|
11976
|
+
"$flags$": 514,
|
|
11977
|
+
"$tagName$": "lmvz-icon",
|
|
11978
|
+
"$members$": {
|
|
11979
|
+
"icon": [513],
|
|
11980
|
+
"weight": [513],
|
|
11981
|
+
"size": [513],
|
|
11982
|
+
"iconset": [513],
|
|
11983
|
+
"ariaLabel": [513, "aria-label"],
|
|
11984
|
+
"iconData": [32],
|
|
11985
|
+
"visible": [32]
|
|
11986
|
+
},
|
|
11987
|
+
"$listeners$": undefined,
|
|
11988
|
+
"$lazyBundleId$": "-",
|
|
11989
|
+
"$attrsToReflect$": [["icon", "icon"], ["weight", "weight"], ["size", "size"], ["iconset", "iconset"], ["ariaLabel", "aria-label"]]
|
|
11990
|
+
}; }
|
|
11991
|
+
}
|
|
11992
|
+
|
|
11993
|
+
const nextFrame = () => new Promise((resolve) => requestAnimationFrame(() => resolve()));
|
|
11994
|
+
const wait = () => new Promise((resolve) => setTimeout(() => resolve()));
|
|
11995
|
+
const waitFrame = async () => {
|
|
11996
|
+
await wait();
|
|
11997
|
+
await nextFrame();
|
|
11998
|
+
};
|
|
11999
|
+
const raf = (h) => {
|
|
12000
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
12001
|
+
return __zone_symbol__requestAnimationFrame(h);
|
|
12002
|
+
}
|
|
12003
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
12004
|
+
return requestAnimationFrame(h);
|
|
12005
|
+
}
|
|
12006
|
+
return setTimeout(h);
|
|
12007
|
+
};
|
|
12008
|
+
|
|
12009
|
+
const componentOnReady = (stencilEl, callback) => {
|
|
12010
|
+
if (hasLazyBuild(stencilEl)) {
|
|
12011
|
+
stencilEl.componentOnReady().then((resolvedEl) => callback(resolvedEl));
|
|
12012
|
+
}
|
|
12013
|
+
else {
|
|
12014
|
+
raf(() => callback(stencilEl));
|
|
12015
|
+
}
|
|
12016
|
+
};
|
|
12017
|
+
const hasLazyBuild = (stencilEl) => {
|
|
12018
|
+
return stencilEl.componentOnReady !== undefined;
|
|
12019
|
+
};
|
|
12020
|
+
|
|
12021
|
+
const lmvzInputCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-input-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --input-radius: var(--lmvz-component-input-radius-default, 999px); --input-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --input-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --input-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --input-border-color-focus: var(--lmvz-semantic-color-border-active, #0f8acc); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --input-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --input-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --input-font-size: var(--lmvz-component-body-md-font-size, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } [size='sm'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --input-padding-x: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --input-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --input-font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='md'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --input-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --input-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --input-font-size: var(--lmvz-component-body-md-font-size, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); } [size='lg'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --input-padding-x: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --input-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --input-font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } .input-container.sc-lmvz-input { display: flex; flex-direction: column; position: relative; width: 100%; } .input-wrapper.sc-lmvz-input { background-color: var(--input-bg); border: var(--input-border-width) solid var(--input-border-color); border-radius: var(--input-radius); display: flex; align-items: center; height: var(--input-height); padding: 0 var(--input-padding-x); position: relative; transition: border-color 0.2s ease; gap: var(--input-gap); } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .input-container.sc-lmvz-input:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--input-border-color-focus); outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); } .sc-lmvz-input-h:not([disabled]) .input-wrapper.sc-lmvz-input:hover { border-color: var(--input-border-color-hover); } .label-input-group.sc-lmvz-input { position: relative; flex-grow: 1; display: flex; align-items: center; height: 100%; } label.sc-lmvz-input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--label-color); font-size: var(--input-font-size); font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: 1.5; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0.5em; transform: translateY(-100%); transform-origin: left top; font-size: var(--lmvz-component-body-2xs-font-size, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 400; } .required-indicator.sc-lmvz-input { color: var(--error-text-color); margin-left: 2px; } input.sc-lmvz-input { border: none; background: transparent; width: 100%; height: 100%; color: var(--input-text-color); font-family: inherit; font-size: var(--input-font-size); outline: none; padding: 0; margin: 0; font-weight: 400; } input.sc-lmvz-input::placeholder { color: var(--label-color); } div.sc-lmvz-input:empty { display: none; } [role='status'].sc-lmvz-input { padding-top: 8px; padding-left: var(--input-padding-x); font-size: 12px; color: var(--helper-text-color); font-weight: 400; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: var(--input-padding-x); font-size: 12px; color: var(--error-text-color); font-weight: 400; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: var(--lmvz-dimension-6-4, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); --lmvz-button-min-height-override: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); }`;
|
|
12022
|
+
|
|
12023
|
+
let inputIdCounter = 0;
|
|
12024
|
+
class LmvzInput extends ReactiveControllerHost {
|
|
12025
|
+
get el() { return getElement(this); }
|
|
12026
|
+
get validationEl() {
|
|
12027
|
+
return this.el;
|
|
12028
|
+
}
|
|
12029
|
+
lmvzInput;
|
|
12030
|
+
internals;
|
|
12031
|
+
nativeInputElement;
|
|
12032
|
+
inputId = `lmvz-input-${inputIdCounter++}`;
|
|
12033
|
+
initialValue = '';
|
|
12034
|
+
ariaHostMirrorObserver;
|
|
12035
|
+
nativeError = false;
|
|
12036
|
+
errorFromProp = false;
|
|
12037
|
+
get helperId() {
|
|
12038
|
+
return this.helperText ? `${this.inputId}-helper` : undefined;
|
|
9238
12039
|
}
|
|
9239
12040
|
get showErrorMessage() {
|
|
9240
12041
|
return this.error && Boolean(this.errorMessage);
|
|
@@ -9330,6 +12131,42 @@ class LmvzInput extends ReactiveControllerHost {
|
|
|
9330
12131
|
this.initialValue = this.value ?? '';
|
|
9331
12132
|
super.componentWillLoad();
|
|
9332
12133
|
}
|
|
12134
|
+
connectedCallback() {
|
|
12135
|
+
super.connectedCallback();
|
|
12136
|
+
this.ariaHostMirrorObserver = new MutationObserver((mutations) => {
|
|
12137
|
+
for (const mutation of mutations) {
|
|
12138
|
+
this.mirrorHostAriaAttribute(mutation.attributeName);
|
|
12139
|
+
}
|
|
12140
|
+
});
|
|
12141
|
+
this.ariaHostMirrorObserver.observe(this.el, {
|
|
12142
|
+
attributes: true,
|
|
12143
|
+
attributeFilter: [...ariaHostMirrorAttributes],
|
|
12144
|
+
});
|
|
12145
|
+
}
|
|
12146
|
+
disconnectedCallback() {
|
|
12147
|
+
super.disconnectedCallback();
|
|
12148
|
+
this.ariaHostMirrorObserver?.disconnect();
|
|
12149
|
+
this.ariaHostMirrorObserver = undefined;
|
|
12150
|
+
}
|
|
12151
|
+
componentDidLoad() {
|
|
12152
|
+
super.componentDidLoad();
|
|
12153
|
+
for (const attr of ariaHostMirrorAttributes) {
|
|
12154
|
+
this.mirrorHostAriaAttribute(attr);
|
|
12155
|
+
}
|
|
12156
|
+
}
|
|
12157
|
+
mirrorHostAriaAttribute(attr) {
|
|
12158
|
+
if (!attr || !this.nativeInputElement)
|
|
12159
|
+
return;
|
|
12160
|
+
if (this.el.hasAttribute(attr)) {
|
|
12161
|
+
const value = this.el.getAttribute(attr);
|
|
12162
|
+
if (value !== null) {
|
|
12163
|
+
this.nativeInputElement.setAttribute(attr, value);
|
|
12164
|
+
}
|
|
12165
|
+
}
|
|
12166
|
+
else {
|
|
12167
|
+
this.nativeInputElement.removeAttribute(attr);
|
|
12168
|
+
}
|
|
12169
|
+
}
|
|
9333
12170
|
formAssociatedCallback(form) {
|
|
9334
12171
|
if (!form)
|
|
9335
12172
|
return;
|
|
@@ -9377,9 +12214,9 @@ class LmvzInput extends ReactiveControllerHost {
|
|
|
9377
12214
|
render() {
|
|
9378
12215
|
const hasValue = Boolean(this.value);
|
|
9379
12216
|
const shouldFloatLabel = hasValue || Boolean(this.placeholder);
|
|
9380
|
-
return (hAsync("div", { key: '
|
|
12217
|
+
return (hAsync("div", { key: 'b7e432c7dbc598189d85040252455c5163fe6395', class: classNames('input-container', {
|
|
9381
12218
|
'interaction-filled': hasValue,
|
|
9382
|
-
}) }, hAsync("div", { key: '
|
|
12219
|
+
}) }, hAsync("div", { key: 'a912a49f4372423d06c7a4856fb5101cb0afd0c5', class: "input-wrapper" }, hAsync("slot", { key: '88e4ee4518de0bfeef9e30a254e0d2ec6693048c', name: "before-input" }), hAsync("div", { key: 'a413a7b7e8f6510f1c09fd0052889c8fad1653f1', class: "label-input-group" }, hAsync("label", { key: '9639713adff74afcf4fb1eab0e74b7447d02b986', htmlFor: this.inputId, class: classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (hAsync("span", { key: '28c1069908a2f1905008f1decce9077e9ef1538a', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), hAsync("input", { key: '421fd9bb50de8ba189a59578373060593e1a9aab', id: this.inputId, ref: (el) => (this.nativeInputElement = el), type: this.type, min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, form: this.form, autocomplete: this.autocomplete, inputmode: this.inputmode, autocorrect: this.autocorrect, autocapitalize: this.autocapitalize, spellcheck: this.spellcheck, autofocus: this.autofocus, minlength: this.minlength, maxlength: this.maxlength, pattern: this.pattern, "aria-invalid": this.error ? 'true' : 'false', "aria-required": this.required ? 'true' : 'false', "aria-describedby": this.describedBy, "aria-errormessage": this.errorId, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur })), hAsync("slot", { key: '09557e1d84bb4ab2456caf391a177c8f80063ab9', name: "after-input" })), hAsync("div", { key: '34162f744f8584991e4493ebcdb6a2f75a1f8990', id: this.helperId, role: "status" }, this.helperText || null), hAsync("div", { key: 'a3c3bffbb439f9127278cedbfefa5e1986e68f23', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
|
|
9383
12220
|
}
|
|
9384
12221
|
static get formAssociated() { return true; }
|
|
9385
12222
|
static get watchers() { return {
|
|
@@ -9485,7 +12322,7 @@ class LmvzLink {
|
|
|
9485
12322
|
const rel = this.computeRel();
|
|
9486
12323
|
const iconSvg = this.type === 'external' ? EXTERNAL_SVG : ARROW_RIGHT_SVG;
|
|
9487
12324
|
const isBlank = this.target === '_blank';
|
|
9488
|
-
return (hAsync(Host, { key: '
|
|
12325
|
+
return (hAsync(Host, { key: 'ee4f5c107243ff858f9189840e56a0525fdac782' }, hAsync("a", { key: '28229373bec276579c2bb7b9fcf254872baae9e8', href: this.computeHref(), target: this.target, rel: rel }, hAsync("slot", { key: '7c58f3f7501e457ee4a35d2a9f2bf80ed0c33fb0' }), hAsync("lmvz-icon", { key: '14784743d148d57e7c83da0f92ba96e4bb3a30a1', "aria-hidden": "true", icon: iconSvg }), isBlank && hAsync("span", { key: 'f72adde57b462282d1a8313e2eb06cf6b68c2697', class: "sr-only" }, this.externalLabel))));
|
|
9489
12326
|
}
|
|
9490
12327
|
static get delegatesFocus() { return true; }
|
|
9491
12328
|
static get watchers() { return {
|
|
@@ -9533,7 +12370,7 @@ class LmvzMenuItem extends ReactiveControllerHost {
|
|
|
9533
12370
|
this.addController(new ElementActivationController(this));
|
|
9534
12371
|
}
|
|
9535
12372
|
render() {
|
|
9536
|
-
return (hAsync(Host, { key: '
|
|
12373
|
+
return (hAsync(Host, { key: 'cd5814d6bcfa9b0f5b1b2f5108ce0fc65722b909' }, hAsync("slot", { key: 'b503b252c95bc09ca4b888d4576badd3976292e9', ref: (e) => (this.validationSlot = e) })));
|
|
9537
12374
|
}
|
|
9538
12375
|
static get style() { return lmvzMenuitemCss(); }
|
|
9539
12376
|
static get cmpMeta() { return {
|
|
@@ -9651,7 +12488,7 @@ class LmvzMessage {
|
|
|
9651
12488
|
}
|
|
9652
12489
|
render() {
|
|
9653
12490
|
const role = this.live === 'assertive' ? 'alert' : this.live === 'polite' ? 'status' : 'note';
|
|
9654
|
-
return (hAsync(Host, { key: '
|
|
12491
|
+
return (hAsync(Host, { key: '1c45cf27f057535ffff047548a3d6681dd487d3c', role: role }, this.leadingIcon && hAsync("span", { key: '8efab69f677dfaa06d333aa304479e17e6d60ad6', class: "leading-icon", "aria-hidden": "true", innerHTML: TYPE_SVG[this.type] }), hAsync("span", { key: '2e88e9053444e2aae23341b7cba923c7c440ff64', class: "message" }, hAsync("slot", { key: 'd6b0ee6c95846a1de97e0e6ed707001c29c78c92', ref: (el) => (this.messageSlot = el), onSlotchange: this.handleSlotChange })), this.actionLabel && (hAsync("lmvz-button", { key: 'c55e38e274e98c8ac584ae16520fb0cab5e11d17', variant: "tertiary", scale: "small", onLmvzActivation: this.handleActionClick }, this.actionLabel)), this.dismissible && (hAsync("lmvz-button", { key: '1ae69fefbb23cd8a219aee1d624e9d7779ae0c08', variant: "tertiary", scale: "small", "aria-label": this.closeLabel, onClick: this.handleDismissClick }, hAsync("lmvz-icon", { key: '572c5b3309a1b1b9798dc6fc3f4ad11d0a354ebc', "aria-hidden": "true", icon: CLOSE_SM_SVG })))));
|
|
9655
12492
|
}
|
|
9656
12493
|
static get style() { return lmvzMessageCss(); }
|
|
9657
12494
|
static get cmpMeta() { return {
|
|
@@ -9895,7 +12732,7 @@ class LmvzModal extends ReactiveControllerHost {
|
|
|
9895
12732
|
this.hasHeader = this.hasAssignedContent(this.headerSlot);
|
|
9896
12733
|
};
|
|
9897
12734
|
render() {
|
|
9898
|
-
return (hAsync(Host, { key: '
|
|
12735
|
+
return (hAsync(Host, { key: '9eb1aa89e4c682586d10291e2a8a2523b8fd17f7' }, hAsync("dialog", { key: '477c537328622f85759dc72a0c499d56e3d5e345', ref: (element) => (this.dialogEl = element), onCancel: this.handleDialogCancel, onClose: this.handleDialogClose, ...this.dialogAccessibilityAttributes }, hAsync("div", { key: 'b9fe9cb306938a117002e5213740ea20269080b8', class: "modal-shell" }, hAsync("header", { key: '34d0cd8078d55d98ec526843f02710044663de70', class: { header: true, 'has-title': this.hasHeader } }, hAsync("div", { key: '1408f0e0875f5e0508ad0f5682f4879a93df65df', class: "title", id: this.dialogTitleId, hidden: !this.hasHeader }, hAsync("slot", { key: '735c1757962e4f3804700a4669d0b49f2d11fb16', name: "header", ref: (element) => (this.headerSlot = element), onSlotchange: this.handleHeaderSlotChange })), hAsync("lmvz-button", { key: 'b0eb76cde508fb434023abdc0f764e1b809b6447', ref: (element) => (this.closeButtonEl = element), type: "button", class: "close-button", "aria-label": this.closeLabel, onLmvzActivation: this.handleCloseButtonClick, variant: "tertiary" }, hAsync("lmvz-icon", { key: '9f978d3117a4046202c3ba1df39aa0c7afc7ee28', icon: closeIconSvg }))), hAsync("div", { key: '46ffd7e7315099189c0a2499d17bdeabeb0e46e5', class: "body" }, hAsync("slot", { key: '095c3353f2ea00f6fa765ac0972ee0123f8e4154' })), hAsync("footer", { key: '5b092b00f10acede66d0fac53f01584ecf528418', class: "actions", hidden: !this.buttonGroupEl?.hasActions }, hAsync("lmvz-button-group", { key: 'ce312e1b1c3407838b8704f20393e7120d6338f9', ref: (element) => (this.buttonGroupEl = element) }, hAsync("slot", { key: '6246782cbee1cc440cfdaf45dac36655f19c972e', name: "actions" })))))));
|
|
9899
12736
|
}
|
|
9900
12737
|
static get watchers() { return {
|
|
9901
12738
|
"open": [{
|
|
@@ -11351,6 +14188,9 @@ class LmvzPopover {
|
|
|
11351
14188
|
anchorEl.setAttribute('aria-haspopup', 'dialog');
|
|
11352
14189
|
}
|
|
11353
14190
|
anchorEl.setAttribute('aria-controls', this.el.getAttribute('id'));
|
|
14191
|
+
if (!anchorEl.hasAttribute('aria-expanded')) {
|
|
14192
|
+
anchorEl.setAttribute('aria-expanded', this.open ? 'true' : 'false');
|
|
14193
|
+
}
|
|
11354
14194
|
if (isActionButton(anchorEl)) {
|
|
11355
14195
|
addElementActivationListener(anchorEl, this.toggle.bind(this), this.extEventController.signal);
|
|
11356
14196
|
}
|
|
@@ -11436,7 +14276,8 @@ class LmvzPopover {
|
|
|
11436
14276
|
document.addEventListener('mousedown', (event) => {
|
|
11437
14277
|
if (!this.open)
|
|
11438
14278
|
return;
|
|
11439
|
-
|
|
14279
|
+
const mouseTarget = (event.target?.shadowRoot ?? document).elementFromPoint(event.x, event.y) ?? event.target;
|
|
14280
|
+
if (this.el === event.target || this.el.contains(mouseTarget) || this.el.contains(event.target))
|
|
11440
14281
|
return;
|
|
11441
14282
|
this.triggerClose();
|
|
11442
14283
|
}, options);
|
|
@@ -11452,7 +14293,7 @@ class LmvzPopover {
|
|
|
11452
14293
|
this.closureController?.abort();
|
|
11453
14294
|
}
|
|
11454
14295
|
render() {
|
|
11455
|
-
return (hAsync(Host, { key: '
|
|
14296
|
+
return (hAsync(Host, { key: 'f996d0a561b8f6d00913b0e2e84ac9711b878f84' }, hAsync("div", { key: 'f7fff89cf470a96b0d3d2adce43a92069d754861', role: "dialog", part: "container", class: `container lmvz-wrapper-card-${this.size}`, "aria-label": this.label || undefined, ref: (el) => (this.containerEl = el) }, hAsync("slot", { key: '2263710272a745d74f118fab6d22f0d05319fc74', ref: (el) => (this.slotEl = el) }))));
|
|
11456
14297
|
}
|
|
11457
14298
|
static get watchers() { return {
|
|
11458
14299
|
"open": [{
|
|
@@ -11825,7 +14666,7 @@ class LmvzRadio extends ReactiveControllerHost {
|
|
|
11825
14666
|
this.radioGroupController.setFocused(target);
|
|
11826
14667
|
}
|
|
11827
14668
|
render() {
|
|
11828
|
-
return (hAsync(Host, { key: '
|
|
14669
|
+
return (hAsync(Host, { key: 'cb2db48956ca781f226fbbddcf1d8ea819f9192a' }, hAsync("input", { key: 'ec208dbaa714ae015415370b0d38ef916955b023', type: "radio", id: this.radioId, name: this.name ?? undefined, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, autoFocus: this.autofocus, "aria-invalid": this.error ? 'true' : undefined, "aria-describedby": this.helperId, ref: (el) => (this.nativeInput = el), onChange: this.handleChange }), hAsync("span", { key: 'ef8221077d410d59248ce30678989f6bf7fbbebb', class: "circle", "aria-hidden": "true" }, this.checked && hAsync("span", { key: '7faa45b58d39f05f64a7782329046fe07b0c2a98', class: "dot" })), hAsync("span", { key: 'e508b4bf061ab0e038df7c169a80285bb7930dc3', class: "content" }, hAsync("label", { key: '8117be47e7b0ae9cc17bab21bb7cc5d9300d2146', htmlFor: this.radioId }, this.label), hAsync("span", { key: '44ab845ee18415b54fb5d23e533f85644f4e5e50', "aria-live": "polite", class: "helper-text", id: this.helperId }, this.helperText))));
|
|
11829
14670
|
}
|
|
11830
14671
|
static get formAssociated() { return true; }
|
|
11831
14672
|
static get watchers() { return {
|
|
@@ -11918,7 +14759,7 @@ class LmvzSelect extends ReactiveControllerHost {
|
|
|
11918
14759
|
render() {
|
|
11919
14760
|
const hasValue = this.hasValue;
|
|
11920
14761
|
const shouldShowLabel = hasValue;
|
|
11921
|
-
return (hAsync(Host, { key: '
|
|
14762
|
+
return (hAsync(Host, { key: '764be3255f76406e66600e800da85d84de8a5b62', "data-highlighted": String(this.highlighted) }, hAsync("div", { key: '81c6c1eb04d9062b142f30c201b3ec24feec8814', class: hasValue ? 'select-wrapper has-value' : 'select-wrapper' }, hAsync("label", { key: '49199adcb31515ce4b4789f27cc2520805c29a3c', htmlFor: this.selectId, class: shouldShowLabel ? 'floating-label' : 'assistive-label' }, this.label, this.required && shouldShowLabel && hAsync("span", { key: 'e7e02e878d8a130d61e426774d9d362a49e481a7', "aria-hidden": "true" }, " *")), hAsync("div", { key: 'bc5ff1214d856a084918c8e68d1b1567a97b41bb', "aria-hidden": "true" }, hAsync("span", { key: 'cc3513a16e4e621bc47f35c252e981bc25bc0d77' }, hasValue ? this.selectedLabel : this.label, this.required && !hasValue && hAsync("span", { key: 'a34658592f038b9438808418cc106842d98e63d5', "aria-hidden": "true" }, " *")), hAsync("span", { key: 'cd71dd492d758e7e53e6212cc9549ec4057abe3f' }, hAsync("svg", { key: 'fa1ea83d316fa9280516316b695163634264151c', width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, hAsync("path", { key: '7750c64531e98cc5cdebafa1ecacf624945ab198', d: "M20.3334 8.66663L12.0001 17L3.66675 8.66663", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" })))), hAsync("select", { key: '53a4e34ad1405447177675e67afcc2e9c18319cb', id: this.selectId, ref: (el) => (this.nativeSelectEl = el), name: this.name, disabled: this.disabled, required: this.required, "aria-label": this.label, onChange: this.handleChange }, !hasValue && hAsync("option", { key: '78ba2e2225d3d3b558c8a20f276f6fbbc0a670b8', value: "", disabled: true, selected: true, hidden: true }), hAsync("slot", { key: 'bbc561f3f55dbc42b705f251fdc146b0496c72a1' }))), this.helperText && hAsync("div", { key: '5bc860035c0ee46f62fefdb74d752b419bb19f7c', role: "status" }, this.helperText)));
|
|
11922
14763
|
}
|
|
11923
14764
|
static get watchers() { return {
|
|
11924
14765
|
"value": [{
|
|
@@ -12010,7 +14851,7 @@ class LmvzSnackbar {
|
|
|
12010
14851
|
this.el.dispatchEvent(new CustomEvent('lmvzAction', { bubbles: false, composed: false }));
|
|
12011
14852
|
};
|
|
12012
14853
|
render() {
|
|
12013
|
-
return (hAsync(Host, { key: '
|
|
14854
|
+
return (hAsync(Host, { key: '3526d31aa5842f2d4bf5b5b878a7ca03bb4bf731', class: this.animationClass }, hAsync("lmvz-icon", { key: '52080f476e527c9af337eb1997db1b29a90fb5c0', icon: STATUS_SVG[this.status], size: "md", weight: "bold" }), hAsync("span", { key: 'a18eaf04ca959432fc76037efd24ecf1001bd798', class: "message" }, this.message), this.actionLabel && (hAsync("lmvz-button", { key: '3126781af40ea74854db8e7c2aa7e1fb1b632d38', variant: "tertiary", scale: "small", onLmvzActivation: this.handleActionClick }, this.actionLabel))));
|
|
12014
14855
|
}
|
|
12015
14856
|
static get watchers() { return {
|
|
12016
14857
|
"status": [{
|
|
@@ -12047,7 +14888,7 @@ class LmvzSpinner {
|
|
|
12047
14888
|
ariaLabel;
|
|
12048
14889
|
render() {
|
|
12049
14890
|
const hasLabel = !!this.ariaLabel?.trim();
|
|
12050
|
-
return (hAsync(Host, { key: '
|
|
14891
|
+
return (hAsync(Host, { key: '96a151ca5586df967f9973e73cfb7be458254dc4', role: hasLabel ? 'status' : undefined, "aria-label": hasLabel ? this.ariaLabel : undefined, "aria-hidden": hasLabel ? undefined : 'true' }, hAsync("svg", { key: '27d404b929294aba50170e0ad4951c0c03d7a286', part: "indicator", viewBox: "0 0 16 16", "aria-hidden": "true" }, hAsync("circle", { key: 'bcf47ee3a704f46ab4ec26de41dd859db17266e9', pathLength: "100", cx: "8", cy: "8", r: "6" }))));
|
|
12051
14892
|
}
|
|
12052
14893
|
static get style() { return lmvzSpinnerCss(); }
|
|
12053
14894
|
static get cmpMeta() { return {
|
|
@@ -12083,7 +14924,7 @@ class LmvzTab {
|
|
|
12083
14924
|
this.el.dispatchEvent(new CustomEvent('lmvzTabReady', { bubbles: true, composed: false }));
|
|
12084
14925
|
}
|
|
12085
14926
|
render() {
|
|
12086
|
-
return (hAsync(Host, { key: '
|
|
14927
|
+
return (hAsync(Host, { key: '992500dcc371efbeab4eb83fbcfb9745384fa423' }, hAsync("button", { key: 'e346c88625b701636704e89b749971e6a016a3ff', part: "button", role: "tab", disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: 0 }, hAsync("slot", { key: 'ee0790e6f04c1c05fbbb7a624e0c791e1db24506', name: "media", ref: (el) => (this.mediaSlotEl = el), onSlotchange: this.handleMediaSlotChange }), hAsync("span", { key: '45b0c2c38dcec72ab02cd308e0301d1c912e96f7', class: "label" }, hAsync("slot", { key: 'e31e6c8ade0c7b44684836c29fbb65464db7ae59' })), hAsync("span", { key: '03016f465e673bf27261e8ceb5c3a6a1666551a7', "aria-hidden": "true", part: "indicator", class: "indicator" }))));
|
|
12087
14928
|
}
|
|
12088
14929
|
static get delegatesFocus() { return true; }
|
|
12089
14930
|
static get style() { return lmvzTabCss(); }
|
|
@@ -12340,7 +15181,7 @@ class LmvzTabs extends ReactiveControllerHost {
|
|
|
12340
15181
|
this.selectTab(value);
|
|
12341
15182
|
};
|
|
12342
15183
|
render() {
|
|
12343
|
-
return (hAsync(Host, { key: '
|
|
15184
|
+
return (hAsync(Host, { key: '27d096ac6ed21fb72a5c6336c6f07ee2fe36bd92', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, hAsync("div", { key: 'c3b530f13cf6829e8519a678e577e8aa6bf1c3d6', role: "tablist", "aria-orientation": this.orientation, class: "tablist" }, hAsync("slot", { key: '018641f52dfcab6dea884c95a5e550dbe60f74f6', ref: (el) => (this.tabSlotEl = el) })), hAsync("div", { key: '6f7cce2b8e551683ba04c53ebae8233c3ef61969', part: "panels-container", class: "panels-container" }, hAsync("slot", { key: '8e9f0c1e1866180a763dd41aa1974f5cf354fb44', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
|
|
12344
15185
|
}
|
|
12345
15186
|
static get watchers() { return {
|
|
12346
15187
|
"value": [{
|
|
@@ -12445,7 +15286,7 @@ class LmvzToggle extends ReactiveControllerHost {
|
|
|
12445
15286
|
this.lmvzChange.emit(newChecked);
|
|
12446
15287
|
};
|
|
12447
15288
|
render() {
|
|
12448
|
-
return (hAsync(Host, { key: '
|
|
15289
|
+
return (hAsync(Host, { key: 'bde08dcbd39c0c02602590bc0c536b5d671fa76e' }, hAsync("span", { key: '2567f70f81014d8ab7b9073a0d59f33bfeeca6a5', class: "track" }, hAsync("input", { key: '88c9fc7523489dd0decf5b5f3ddda604aadcf8a9', type: "checkbox", role: "switch", id: this.toggleId, checked: this.checked, disabled: this.disabled, required: this.required, name: this.name, value: this.value, form: this.form, ref: (el) => (this.nativeInputElement = el), onChange: this.handleChange }), hAsync("span", { key: '816fc007d7c87acc8ff0286eb861bd29059b44eb', class: "thumb", "aria-hidden": "true" })), hAsync("label", { key: '9525cd785d2c6c3b6242c6f5eac215996b881873', htmlFor: this.toggleId }, this.label)));
|
|
12449
15290
|
}
|
|
12450
15291
|
static get formAssociated() { return true; }
|
|
12451
15292
|
static get watchers() { return {
|
|
@@ -12488,6 +15329,7 @@ registerComponents([
|
|
|
12488
15329
|
LmvzCard,
|
|
12489
15330
|
LmvzCheckbox,
|
|
12490
15331
|
LmvzChip,
|
|
15332
|
+
LmvzDatepicker,
|
|
12491
15333
|
LmvzHeader,
|
|
12492
15334
|
LmvzIcon,
|
|
12493
15335
|
LmvzInput,
|