@lmvz-ds/components 0.37.0 → 0.38.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.
Files changed (143) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/cjs/{aria-validation-controller-Do0uEK4t.js → aria-validation-controller-DKNXjnQr.js} +1 -1
  3. package/cjs/checkmark-CuKDPAcx.js +5 -0
  4. package/cjs/{index-BgvZ4y-3.js → index-DWy4nuyZ.js} +41 -0
  5. package/cjs/lmvz-action-list.cjs.entry.js +2 -2
  6. package/cjs/lmvz-action.cjs.entry.js +1 -1
  7. package/cjs/lmvz-button-group.cjs.entry.js +1 -1
  8. package/cjs/lmvz-button_2.cjs.entry.js +2 -2
  9. package/cjs/lmvz-card.cjs.entry.js +1 -1
  10. package/cjs/lmvz-checkbox.cjs.entry.js +4 -5
  11. package/cjs/lmvz-chip.cjs.entry.js +5 -5
  12. package/cjs/lmvz-components.cjs.js +2 -2
  13. package/cjs/lmvz-datepicker.cjs.entry.js +1 -1
  14. package/cjs/lmvz-header_2.cjs.entry.js +2 -2
  15. package/cjs/lmvz-input.cjs.entry.js +4 -7
  16. package/cjs/lmvz-link.cjs.entry.js +1 -1
  17. package/cjs/lmvz-menuitem.cjs.entry.js +2 -2
  18. package/cjs/lmvz-message.cjs.entry.js +2 -2
  19. package/cjs/lmvz-modal.cjs.entry.js +2 -2
  20. package/cjs/lmvz-popover.cjs.entry.js +4 -13
  21. package/cjs/lmvz-radio.cjs.entry.js +2 -2
  22. package/cjs/lmvz-select.cjs.entry.js +110 -15
  23. package/cjs/lmvz-snackbar.cjs.entry.js +1 -1
  24. package/cjs/lmvz-spinner.cjs.entry.js +1 -1
  25. package/cjs/lmvz-tab.cjs.entry.js +1 -1
  26. package/cjs/lmvz-tabs.cjs.entry.js +1 -1
  27. package/cjs/lmvz-toggle.cjs.entry.js +2 -2
  28. package/cjs/loader.cjs.js +2 -2
  29. package/collection/components/lmvz-chip/lmvz-chip.css +1 -1
  30. package/collection/components/lmvz-chip/lmvz-chip.js +2 -2
  31. package/collection/components/lmvz-input/lmvz-input.js +2 -5
  32. package/collection/components/lmvz-message/lmvz-message.css +1 -1
  33. package/collection/components/lmvz-popover/lmvz-popover.css +1 -1
  34. package/collection/components/lmvz-popover/lmvz-popover.js +2 -11
  35. package/collection/components/lmvz-select/lmvz-select.css +46 -12
  36. package/collection/components/lmvz-select/lmvz-select.js +151 -17
  37. package/components/index.js +1 -1
  38. package/components/lmvz-action-list.js +1 -1
  39. package/components/lmvz-action.js +1 -1
  40. package/components/lmvz-button-group.js +1 -1
  41. package/components/lmvz-button.js +1 -1
  42. package/components/lmvz-card.js +1 -1
  43. package/components/lmvz-checkbox.js +1 -1
  44. package/components/lmvz-chip.js +1 -1
  45. package/components/lmvz-datepicker.js +1 -1
  46. package/components/lmvz-header.js +1 -1
  47. package/components/lmvz-icon.js +1 -1
  48. package/components/lmvz-input.js +1 -1
  49. package/components/lmvz-link.js +1 -1
  50. package/components/lmvz-menuitem.js +1 -1
  51. package/components/lmvz-message.js +1 -1
  52. package/components/lmvz-modal.js +1 -1
  53. package/components/lmvz-popover.js +1 -1
  54. package/components/lmvz-radio.js +1 -1
  55. package/components/lmvz-select.js +1 -1
  56. package/components/lmvz-snackbar.js +1 -1
  57. package/components/lmvz-spinner.js +1 -1
  58. package/components/lmvz-tab.js +1 -1
  59. package/components/lmvz-tabs.js +1 -1
  60. package/components/lmvz-toggle.js +1 -1
  61. package/components/p-B6bUOPCG.js +1 -0
  62. package/components/{p-BLMXiDE0.js → p-CcP_sfo8.js} +1 -1
  63. package/components/{p--FDdvoIg.js → p-CgGqXTxQ.js} +1 -1
  64. package/components/{p-DiRcp9V6.js → p-D3wobLRi.js} +1 -1
  65. package/components/p-DAikapVO.js +1 -0
  66. package/components/{p-diOze8wI.js → p-DXFoXTse.js} +1 -1
  67. package/components/p-D_mff3n7.js +1 -0
  68. package/components/p-DbBJxuBm.js +1 -0
  69. package/components/{p-CrQCHVKL.js → p-DfFdoFeH.js} +1 -1
  70. package/components/{p-DqdrUt_G.js → p-GJaYKpHS.js} +1 -1
  71. package/components/p-SnHLBAbf.js +1 -0
  72. package/{lmvz-components/p-BeY96W7m.js → components/p-sACbyedu.js} +1 -1
  73. package/esm/{aria-validation-controller-Cp6pofER.js → aria-validation-controller-Dwv7n0rk.js} +1 -1
  74. package/esm/checkmark-DAikapVO.js +3 -0
  75. package/esm/{index-BOXP1Vx0.js → index-DVab4vzV.js} +41 -1
  76. package/esm/lmvz-action-list.entry.js +2 -2
  77. package/esm/lmvz-action.entry.js +1 -1
  78. package/esm/lmvz-button-group.entry.js +1 -1
  79. package/esm/lmvz-button_2.entry.js +2 -2
  80. package/esm/lmvz-card.entry.js +1 -1
  81. package/esm/lmvz-checkbox.entry.js +3 -4
  82. package/esm/lmvz-chip.entry.js +5 -5
  83. package/esm/lmvz-components.js +3 -3
  84. package/esm/lmvz-datepicker.entry.js +1 -1
  85. package/esm/lmvz-header_2.entry.js +2 -2
  86. package/esm/lmvz-input.entry.js +4 -7
  87. package/esm/lmvz-link.entry.js +1 -1
  88. package/esm/lmvz-menuitem.entry.js +2 -2
  89. package/esm/lmvz-message.entry.js +2 -2
  90. package/esm/lmvz-modal.entry.js +2 -2
  91. package/esm/lmvz-popover.entry.js +4 -13
  92. package/esm/lmvz-radio.entry.js +2 -2
  93. package/esm/lmvz-select.entry.js +110 -15
  94. package/esm/lmvz-snackbar.entry.js +1 -1
  95. package/esm/lmvz-spinner.entry.js +1 -1
  96. package/esm/lmvz-tab.entry.js +1 -1
  97. package/esm/lmvz-tabs.entry.js +1 -1
  98. package/esm/lmvz-toggle.entry.js +2 -2
  99. package/esm/loader.js +3 -3
  100. package/hydrate/index.js +159 -37
  101. package/hydrate/index.mjs +159 -37
  102. package/lmvz-components/lmvz-components.esm.js +1 -1
  103. package/lmvz-components/p-1e1dea53.entry.js +1 -0
  104. package/lmvz-components/{p-0f65d001.entry.js → p-27e8b4fa.entry.js} +1 -1
  105. package/lmvz-components/{p-3d5867df.entry.js → p-335b3867.entry.js} +1 -1
  106. package/lmvz-components/{p-7872a6b4.entry.js → p-3b7203a3.entry.js} +1 -1
  107. package/lmvz-components/{p-70f1e31a.entry.js → p-3fc6c3f6.entry.js} +1 -1
  108. package/lmvz-components/p-6aae1df9.entry.js +1 -0
  109. package/lmvz-components/p-743616c0.entry.js +1 -0
  110. package/lmvz-components/{p-26dd9684.entry.js → p-773e9d95.entry.js} +1 -1
  111. package/lmvz-components/{p-a6fe9b61.entry.js → p-7cbfbc88.entry.js} +1 -1
  112. package/lmvz-components/p-87f21ac9.entry.js +1 -0
  113. package/lmvz-components/{p-a680a7b2.entry.js → p-8ba6ec19.entry.js} +1 -1
  114. package/lmvz-components/{p-57a366e6.entry.js → p-9813a7d2.entry.js} +1 -1
  115. package/lmvz-components/p-DAikapVO.js +1 -0
  116. package/lmvz-components/p-DVab4vzV.js +2 -0
  117. package/{components/p-BAj4FkUt.js → lmvz-components/p-Wi9d2-w9.js} +1 -1
  118. package/lmvz-components/{p-e14058e1.entry.js → p-b5a5eb9a.entry.js} +1 -1
  119. package/lmvz-components/{p-00489151.entry.js → p-cadd88e5.entry.js} +1 -1
  120. package/lmvz-components/p-cebaddb0.entry.js +1 -0
  121. package/lmvz-components/{p-4deaa010.entry.js → p-d53e69de.entry.js} +1 -1
  122. package/lmvz-components/{p-eabbf901.entry.js → p-d73bb7fd.entry.js} +1 -1
  123. package/lmvz-components/{p-398b5cf4.entry.js → p-db75e362.entry.js} +1 -1
  124. package/lmvz-components/{p-137b1fe1.entry.js → p-e35f49a1.entry.js} +1 -1
  125. package/lmvz-components/{p-0af0211a.entry.js → p-eb741e1f.entry.js} +1 -1
  126. package/lmvz-components/{p-88661c50.entry.js → p-efd9d50e.entry.js} +1 -1
  127. package/lmvz-components/p-f24f5207.entry.js +1 -0
  128. package/manifest.json +75 -13
  129. package/package.json +1 -1
  130. package/types/components/lmvz-input/lmvz-input.d.ts +0 -2
  131. package/types/components/lmvz-popover/lmvz-popover.d.ts +0 -1
  132. package/types/components/lmvz-select/lmvz-select.d.ts +12 -2
  133. package/types/components.d.ts +39 -8
  134. package/components/p-BApwCp0R.js +0 -1
  135. package/components/p-BPYBmylI.js +0 -1
  136. package/components/p-C5gRiLRR.js +0 -1
  137. package/lmvz-components/p-40716828.entry.js +0 -1
  138. package/lmvz-components/p-492adf21.entry.js +0 -1
  139. package/lmvz-components/p-4fa6e72f.entry.js +0 -1
  140. package/lmvz-components/p-91eb71bb.entry.js +0 -1
  141. package/lmvz-components/p-BOXP1Vx0.js +0 -2
  142. package/lmvz-components/p-f3f0ed49.entry.js +0 -1
  143. package/lmvz-components/p-f516a949.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{g as e,r as t,c as s,h as l,F as i,H as r}from"./p-DVab4vzV.js";import{c as a}from"./p-DAikapVO.js";import{t as o}from"./p-DjvtQE7c.js";import{A as c}from"./p-Wi9d2-w9.js";import{R as n}from"./p-CICeIanv.js";import"./p-D06Ds9Dh.js";import"./p-BDonpCG8.js";const m={wrap:!0,typeaheadTimeoutMs:500};class h{options=[];_activeId;_selectedId;config;typeaheadBuffer="";typeaheadTimer;constructor(e={}){this.config={...m,...e}}hostDisconnected(){this.clearTypeaheadTimer()}get activeId(){return this._activeId}get activeDescendantId(){return this._activeId}get selectedId(){return this._selectedId}setOptions(e){if(this.options=e,this._activeId&&-1!==this.findEnabledIndex(this._activeId))return;const t=(this._selectedId&&-1!==this.findEnabledIndex(this._selectedId)?this._selectedId:void 0)??this.firstEnabledOption()?.id;this.setActiveId(t)}setActiveId(e){(void 0===e||this.isEnabledId(e))&&e!==this._activeId&&(this._activeId=e,this.config.onActiveChange?.(e))}setSelectedId(e){this._selectedId=e}selectOption(e){this.isEnabledId(e)&&(this._selectedId=e,this.config.onSelect?.(e))}selectActive(){this._activeId&&this.selectOption(this._activeId)}handleKeydown(e){switch(e.key){case"ArrowDown":return e.preventDefault(),this.moveActive("next"),!0;case"ArrowUp":return e.preventDefault(),this.moveActive("previous"),!0;case"Home":return e.preventDefault(),this.setActiveId(this.firstEnabledOption()?.id),!0;case"End":return e.preventDefault(),this.setActiveId(this.lastEnabledOption()?.id),!0;case"Enter":case" ":return e.preventDefault(),this.selectActive(),!0;case"Escape":return e.preventDefault(),this.config.onClose?.(),!0;default:return this.handleTypeahead(e)}}clearTypeahead(){this.typeaheadBuffer="",this.clearTypeaheadTimer()}moveActive(e){const t=this.enabledOptions();if(!t.length)return;const s=this._activeId?t.findIndex((e=>e.id===this._activeId)):-1;if(-1===s)return void this.setActiveId(("next"===e?t[0]:t[t.length-1])?.id);const l=s+("next"===e?1:-1);if(l<0||l>=t.length){if(!this.config.wrap)return;const e=(l+t.length)%t.length;this.setActiveId(t[e]?.id)}else this.setActiveId(t[l]?.id)}handleTypeahead(e){if(1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return!1;e.preventDefault(),this.typeaheadBuffer+=e.key.toLowerCase(),this.restartTypeaheadTimer();const t=this.enabledOptions();if(!t.length)return!0;const s=this._activeId?t.findIndex((e=>e.id===this._activeId)):-1,l=[...t.slice(s+1),...t.slice(0,s+1)].find((e=>e.label.toLowerCase().startsWith(this.typeaheadBuffer)));return l&&this.setActiveId(l.id),!0}restartTypeaheadTimer(){this.clearTypeaheadTimer(),this.typeaheadTimer=setTimeout((()=>{this.typeaheadBuffer=""}),this.config.typeaheadTimeoutMs)}clearTypeaheadTimer(){void 0!==this.typeaheadTimer&&(clearTimeout(this.typeaheadTimer),this.typeaheadTimer=void 0)}enabledOptions(){return this.options.filter((e=>!e.disabled))}firstEnabledOption(){return this.enabledOptions()[0]}lastEnabledOption(){const e=this.enabledOptions();return e[e.length-1]}isEnabledId(e){return-1!==this.findEnabledIndex(e)}findEnabledIndex(e){return this.enabledOptions().findIndex((t=>t.id===e))}}let v=0;const d=o(a),p=class extends n{get el(){return e(this)}get validationEl(){return this.el}internals;selectId="lmvz-select-"+v++;triggerId=`${this.selectId}-trigger`;popoverId=`${this.selectId}-listbox`;triggerEl;optionsSourceEl;optionsMutationObserver;initialValue;initialValueCaptured=!1;initialValues;initialValuesCaptured=!1;flatOptions=[];optionsById=new Map;listboxController=new h({onActiveChange:e=>{this.activeId=e},onSelect:e=>this.handleOptionSelect(e),onClose:()=>this.closePopover()});get helperId(){return this.helperText?`${this.selectId}-helper`:void 0}get showErrorMessage(){return this.error&&Boolean(this.errorMessage)}get errorId(){return`${this.selectId}-error`}get describedBy(){const e=[];return this.helperId&&e.push(this.helperId),this.showErrorMessage&&e.push(this.errorId),e.length>0?e.join(" "):void 0}constructor(e){super(),t(this,e),this.lmvzChange=s(this,"lmvzChange",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.addController(new c(this)),this.addController(this.listboxController)}lmvzChange;value;multiple=!1;values;label;helperText;nativeError=!1;errorFromProp=!1;get error(){return this.errorFromProp||this.nativeError}set error(e){this.errorFromProp=e}errorMessage;disabled=!1;required=!1;name;size="default";highlighted=!1;selectedLabel="";selectedId;activeId;isOpen=!1;optionGroups=[];get hasValue(){return this.multiple?Boolean(this.values&&this.values.length>0):Boolean(this.value)}get triggerAriaLabel(){if(this.multiple){const e=this.values?.length??0;return e>0?`${this.label}, ${e} selected`:this.label}return this.hasValue?`${this.label}, ${this.selectedLabel}`:this.label}get chipSize(){return"small"===this.size?"small":"default"}componentWillLoad(){this.updateValidity(),super.componentWillLoad()}componentDidLoad(){this.handleSlotChange(),this.observeSlottedOptionMutations(),this.updateValidity(),super.componentDidLoad()}disconnectedCallback(){this.optionsMutationObserver?.disconnect(),super.disconnectedCallback()}observeSlottedOptionMutations(){"undefined"!=typeof MutationObserver&&(this.optionsMutationObserver?.disconnect(),this.optionsMutationObserver=new MutationObserver(this.handleSlotChange),this.optionsMutationObserver.observe(this.el,{attributes:!0,attributeFilter:["disabled","selected","value","label"],characterData:!0,childList:!0,subtree:!0}))}async focusTrigger(){this.triggerEl?.focus()}async blurTrigger(){this.triggerEl?.blur()}async checkValidity(){return this.internals.checkValidity?.()??!0}async reportValidity(){return this.internals.reportValidity?.()??!0}async getValidationMessage(){return this.internals.validationMessage??""}formAssociatedCallback(e){e&&this.syncFormValue()}formResetCallback(){this.internals.setValidity?.({}),this.multiple?this.values=this.initialValues?[...this.initialValues]:[]:this.value=this.initialValue,this.updateValidity()}formStateRestoreCallback(e){this.multiple?this.values=e instanceof FormData&&this.name?e.getAll(this.name).map(String):[]:this.value=e}handleValueChange(e){this.multiple||(this.applySelectionFromValue(),this.selectedId&&!this.isOpen&&this.listboxController.setActiveId(this.selectedId),this.internals.setFormValue?.(e??""),this.updateValidity())}handleValuesChange(){this.multiple&&(this.syncFormValue(),this.updateValidity())}handleRequiredChange(){this.updateValidity()}handleDisabledChange(e){e&&(this.closePopover(),this.triggerEl?.blur())}handleSlotChange=()=>{const e=this.optionsSourceEl;if(!e)return;const{flat:t,groups:s}=function(e,t){const s=[],l=[];let i,r=0;const a=(e,l=!1)=>{const i=e,a={id:`${t}-option-${r++}`,value:i.value,label:(i.textContent??"").trim(),disabled:l||i.disabled,selected:i.selected};return s.push(a),a};return Array.from(e.children).forEach((e=>{if("OPTGROUP"!==e.tagName)"OPTION"===e.tagName&&(i||(i={label:void 0,options:[]},l.push(i)),i.options.push(a(e)));else{i=void 0;const t=e,s=Array.from(t.querySelectorAll("option")).map((e=>a(e,t.disabled)));l.push({label:t.label||void 0,options:s})}})),{flat:s,groups:l}}(e,this.selectId);if(this.flatOptions=t,this.optionsById=new Map(t.map((e=>[e.id,e]))),this.optionGroups=s,this.multiple){if(!this.values){const e=t.filter((e=>e.selected&&!e.disabled)).map((e=>e.value));e.length>0&&(this.values=e)}}else{if(!this.value){const e=t.find((e=>e.selected&&!e.disabled));e&&(this.value=e.value)}this.applySelectionFromValue()}this.listboxController.setOptions(t.map((({id:e,label:t,disabled:s})=>({id:e,label:t,disabled:s})))),this.multiple?this.initialValuesCaptured||(this.initialValues=this.values?[...this.values]:[],this.initialValuesCaptured=!0):this.initialValueCaptured||(this.initialValue=this.value,this.initialValueCaptured=!0)};applySelectionFromValue(){const e=this.value?this.flatOptions.find((e=>e.value===this.value)):void 0;this.selectedId=e?.id,this.selectedLabel=e?.label??"",this.listboxController.setSelectedId(e?.id)}isOptionSelected(e){return this.multiple?(this.values??[]).includes(e.value):e.id===this.selectedId}syncFormValue(){if(this.multiple){const e=new FormData;if(this.name)for(const t of this.values??[])e.append(this.name,t);this.internals.setFormValue?.(e)}else this.internals.setFormValue?.(this.value??"")}updateValidity(){!this.required||(this.multiple?this.values&&this.values.length>0:this.value)?(this.internals.setValidity?.({}),this.nativeError=!1):this.internals.setValidity?.({valueMissing:!0},"Please select a value.",this.triggerEl)}handleInvalid(){this.nativeError=!0}handleOptionSelect(e){const t=this.optionsById.get(e);if(!t)return;if(this.multiple){const e=this.values??[],s=e.includes(t.value)?e.filter((e=>e!==t.value)):[...e,t.value];return this.values=s,void this.lmvzChange.emit(s)}const s=t.value!==this.value;this.value=t.value,s&&this.lmvzChange.emit(t.value),this.closePopover()}handleOptionClick=e=>{e.disabled||this.disabled||this.listboxController.selectOption(e.id)};handleLabelClick=()=>{this.disabled||(this.triggerEl?.focus(),this.openPopover())};handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closePopover():this.openPopover())};handleTriggerKeydown=e=>{this.disabled||(this.isOpen?this.listboxController.handleKeydown(e):"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.openPopover()))};handleTriggerBlur=()=>{this.closePopover()};handlePopoverClose=()=>{this.isOpen=!1,this.listboxController.clearTypeahead()};openPopover(){this.isOpen||this.disabled||(this.isOpen=!0)}closePopover(){this.isOpen&&(this.isOpen=!1,this.listboxController.clearTypeahead())}renderOptionGroups(){return this.optionGroups.map(((e,t)=>e.label?l("div",{role:"group","aria-label":e.label,key:`lmvz-select-group-${t}`},e.options.map((e=>this.renderOption(e)))):e.options.map((e=>this.renderOption(e)))))}renderOption(e){const t=this.isOptionSelected(e);return l("div",{id:e.id,key:e.id,role:"option",class:"lmvz-select-option","aria-selected":t?"true":"false","aria-disabled":e.disabled?"true":void 0,"data-active":e.id===this.activeId?"true":void 0,onMouseDown:e=>e.preventDefault(),onClick:()=>this.handleOptionClick(e)},this.multiple&&l("span",{class:"lmvz-select-option-checkbox","aria-hidden":"true"},t&&l("span",{class:"lmvz-select-option-checkbox-indicator",innerHTML:d})),e.label)}renderChips(){const e=this.values??[],t=new Map;return l(i,null,e.map((e=>{const s=t.get(e)??0;t.set(e,s+1);const i=0===s?e:`${e}-dup-${s}`,r=this.flatOptions.find((t=>t.value===e));return l("lmvz-chip",{key:i,size:this.chipSize},r?.label??e)})))}render(){const e=this.hasValue,t=e,s=this.multiple&&e;return l(r,{key:"aece4095568891e34afc978c6a0aa9e638e7e207","data-highlighted":String(this.highlighted)},l("div",{key:"7c0e2a71a2b3b0bee46009c3498062b86f6eca72",class:e?"select-wrapper has-value":"select-wrapper"},l("label",{key:"f473d3a012cbd43c691de1782ead4a5d5e59cd32",htmlFor:this.triggerId,class:t?"floating-label":"assistive-label",onMouseDown:e=>e.preventDefault(),onClick:this.handleLabelClick},this.label,this.required&&t&&l("span",{key:"50a2d3999af0310fcf1af62fdf72109fc25f76ee","aria-hidden":"true"}," *")),l("div",{key:"d09b26c4e8d9e4ae8ab503c4abb2b22f7e0d905c",id:this.triggerId,ref:e=>this.triggerEl=e,class:"select-trigger",role:"combobox",tabIndex:this.disabled?-1:0,"aria-haspopup":"listbox","aria-expanded":String(this.isOpen),"aria-controls":this.popoverId,"aria-activedescendant":this.isOpen?this.activeId:void 0,"aria-label":this.triggerAriaLabel,"aria-disabled":this.disabled?"true":void 0,"aria-required":this.required?"true":"false","aria-invalid":this.error?"true":"false","aria-errormessage":this.showErrorMessage?this.errorId:void 0,"aria-describedby":this.describedBy,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeydown,onBlur:this.handleTriggerBlur},l("span",{key:"99fbb4a7a2ce16e63bf30b2c25a0c413533d60f5"},s?this.renderChips():e?this.selectedLabel:this.label,this.required&&!e&&l("span",{key:"3f6473f7f064e98bcdf936e2b9a5978f20e00772","aria-hidden":"true"}," *")),l("span",{key:"cfb75d279c2c101d7724c596a4f2cd34ce13d7c0","aria-hidden":"true"},l("svg",{key:"51e30ae88d4355e0513cce076c97dd335b6a1d7e",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("path",{key:"0b1fb9c3d6809daa93abc404fbb82469d9f4a1cc",d:"M20.3334 8.66663L12.0001 17L3.66675 8.66663",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"})))),l("lmvz-popover",{key:"02b3524eed3eb4da9899f2acb85eba2cc3f09d78",id:this.popoverId,anchor:this.triggerId,open:this.isOpen,containerRole:"listbox",autoFocus:!1,label:this.label,"aria-multiselectable":this.multiple?"true":void 0,onLmvzClose:this.handlePopoverClose,size:"sm"},this.renderOptionGroups()),l("div",{key:"84cbf09b5d47eeebba9ed55f21aa715257faf1f1",class:"lmvz-select-native-options",hidden:!0,"aria-hidden":"true",ref:e=>this.optionsSourceEl=e},l("slot",{key:"928aa417eca972d4d85592f569c3fc95419dd9b3",onSlotchange:this.handleSlotChange}))),this.helperText&&l("div",{key:"5c0dac612458ba3564c3ac445f396c9e95832fe6",id:this.helperId,role:"status"},this.helperText),this.showErrorMessage&&l("div",{key:"4c5c0a3826239fd2d5b52ad9118937dc5494c632",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],disabled:[{handleDisabledChange:0}]}}};p.style="@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-select-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --lmvz-internal-select-floating-label-top-offset: 0.375rem; --lmvz-select-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-select-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --lmvz-select-border-color: var(--lmvz-semantic-color-border-alternate, #c7c7c7); --lmvz-select-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --lmvz-select-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-select-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-label-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-select-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-xs-font-size, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); --lmvz-select-label-top-offset: calc(var(--lmvz-internal-select-floating-label-top-offset) * -1); --lmvz-select-label-minimized-padding-x: 4px; --lmvz-select-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --lmvz-select-chevron-size: var(--lmvz-component-icon-size-2xs, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); padding-top: var(--lmvz-internal-select-floating-label-top-offset); } .select-wrapper.sc-lmvz-select { position: relative; height: var(--lmvz-select-height); } label.sc-lmvz-select { position: absolute; top: 50%; left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-label-color); line-height: normal; white-space: nowrap; pointer-events: none; z-index: 2; transform: translateY(-50%); transform-origin: left top; transition: top 0.2s ease-out, transform 0.2s ease-out, opacity 0.2s ease-out, padding 0.2s ease-out; } label.assistive-label.sc-lmvz-select { opacity: 0; padding: 0; } label.floating-label.sc-lmvz-select { top: var(--lmvz-select-label-top-offset); transform: translateY(0) scale(0.85); left: calc(var(--lmvz-select-padding-x) - 2px); background-color: var(--lmvz-select-bg); padding: 0 var(--lmvz-select-label-minimized-padding-x); opacity: 1; font-weight: 500; } label.sc-lmvz-select > span[aria-hidden='true'].sc-lmvz-select, .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child > span[aria-hidden='true'].sc-lmvz-select { color: var(--lmvz-select-error-color); margin-left: 2px; display: inline-block; line-height: 0; vertical-align: middle; } .select-trigger.sc-lmvz-select { display: flex; align-items: center; gap: var(--lmvz-select-gap); height: 100%; width: 100%; padding: 0 var(--lmvz-select-padding-x); border-radius: var(--lmvz-select-radius); background-color: var(--lmvz-select-bg); border: var(--lmvz-select-border-width) solid var(--lmvz-select-border-color); box-sizing: border-box; cursor: pointer; position: relative; z-index: 1; transition: border-color 0.15s ease; } .sc-lmvz-select-h:not([disabled] .select-wrapper.sc-lmvz-select:hover .select-trigger.sc-lmvz-select, [highlighted].sc-lmvz-select-h .select-wrapper.sc-lmvz-select:hover .select-trigger.sc-lmvz-select, [error]).sc-lmvz-select-h .select-wrapper.sc-lmvz-select:hover .select-trigger.sc-lmvz-select { border-color: var(--lmvz-select-border-color-hover); } [error].sc-lmvz-select-h .select-trigger.sc-lmvz-select { border-color: var(--lmvz-select-error-color); } [highlighted].sc-lmvz-select-h .select-trigger.sc-lmvz-select { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); border-color: var(--lmvz-semantic-color-border-active, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } [highlighted].sc-lmvz-select-h .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } [highlighted].sc-lmvz-select-h label.floating-label.sc-lmvz-select { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } .sc-lmvz-select-h:has(:focus-visible) .select-trigger.sc-lmvz-select { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { flex: 1 0 0; font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--lmvz-select-text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; } .sc-lmvz-select-h:not([highlighted]) .select-wrapper.has-value.sc-lmvz-select .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child + span.sc-lmvz-select { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .select-trigger.sc-lmvz-select svg.sc-lmvz-select { width: var(--lmvz-select-chevron-size); height: var(--lmvz-select-chevron-size); flex-shrink: 0; } .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child lmvz-chip.sc-lmvz-select { vertical-align: middle; } .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child lmvz-chip.sc-lmvz-select + lmvz-chip.sc-lmvz-select { margin-inline-start: var(--lmvz-select-gap); } .lmvz-select-native-options.sc-lmvz-select { display: none; } [disabled].sc-lmvz-select-h .select-wrapper.sc-lmvz-select { opacity: var(--lmvz-select-disabled-opacity); pointer-events: none; cursor: not-allowed; } [role='status'].sc-lmvz-select { padding-top: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); padding-left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-helper-color); line-height: normal; } [role='alert'].sc-lmvz-select { padding-top: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); padding-left: var(--lmvz-select-padding-x); font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); color: var(--lmvz-select-error-color); line-height: normal; } [size='small'].sc-lmvz-select-h { --lmvz-select-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-select-padding-x: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-2xs-font-size, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); --lmvz-select-chevron-size: var(--lmvz-component-icon-size-4xs, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); } [size='small'].sc-lmvz-select-h .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='large'].sc-lmvz-select-h { --lmvz-select-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-select-padding-x: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-select-chevron-size: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='large'].sc-lmvz-select-h .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } .lmvz-select-option.sc-lmvz-select { --lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); display: flex; align-items: center; gap: var(--lmvz-select-gap); padding: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); border-radius: var(--lmvz-semantic-border-radius-md, 6px); background-color: var(--lmvz-select-option-background); color: var(--lmvz-select-option-color); cursor: pointer; font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); transition: background-color 0.15s ease, color 0.15s ease; } .lmvz-select-option.sc-lmvz-select:not([aria-disabled='true']):hover { --lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } .lmvz-select-option.sc-lmvz-select:not([aria-disabled='true']):active { --lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } .lmvz-select-option.sc-lmvz-select: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; } .lmvz-select-option[data-active='true'].sc-lmvz-select:not([aria-disabled='true']) { --lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } .sc-lmvz-select-h:not([multiple]) .lmvz-select-option[aria-selected='true'].sc-lmvz-select { --lmvz-select-option-background: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); --lmvz-select-option-color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } .lmvz-select-option[aria-disabled='true'].sc-lmvz-select { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } .lmvz-select-option-checkbox.sc-lmvz-select { display: flex; align-items: center; justify-content: center; width: var(--lmvz-global-s18, 18px); height: var(--lmvz-global-s18, 18px); border: var(--lmvz-semantic-border-width-default, 1px) solid currentcolor; border-radius: var(--lmvz-global-s4, 4px); flex-shrink: 0; } .lmvz-select-option-checkbox-indicator.sc-lmvz-select { display: flex; align-items: center; justify-content: center; line-height: 0; } .lmvz-select-option-checkbox-indicator.sc-lmvz-select svg.sc-lmvz-select { width: 100%; height: 100%; }";export{p as lmvz_select}
@@ -1 +1 @@
1
- import{g as r,r as t,h as o,H as n}from"./p-BOXP1Vx0.js";import{A as e}from"./p-BeY96W7m.js";import{D as a}from"./p-CHxiS3ja.js";import{a as v}from"./p-BA3wizqg.js";import{R as l}from"./p-CICeIanv.js";import"./p-BDonpCG8.js";import"./p-DIyiticz.js";const i=class extends l{get el(){return r(this)}slotEl;get validationEl(){return this.el}get validationSlot(){return this.slotEl}focusController=new a(this,{orientation:"vertical",manageTabIndex:!0,enableHomeAndEnd:!0});label;constructor(r){super(),t(this,r),this.addController(this.focusController),this.addController(new e(this,{validationTiming:"slot"}))}componentDidLoad(){this.handleSlotChange(),super.componentDidLoad()}async initFocus(){this.focusController.initFocus()}handleSlotChange=()=>{const r=this.slotEl;if(!r)return;const t=r.assignedElements(),o=[];for(const r of t)m(r,o);for(const r of o)v(r)&&(r.variant||(r.variant="tertiary"));this.focusController.updateElements(o)};render(){return o(n,{key:"9dee495856e733cb17f30d0d8588362a8dcb28ce",role:"menu","aria-label":this.label||void 0},o("slot",{key:"c6454dbbe63eed5be01f3247934245d1cc1ad6e2",onSlotchange:this.handleSlotChange,ref:r=>this.slotEl=r}))}};function m(r,t){const o=r.tagName.toLowerCase();return"lmvz-button"===o?(r.buttonRole="menuitem",void t.push(r)):"button"===o?(r.setAttribute("role","menuitem"),void t.push(r)):void("hr"!==o&&("group"!==r.getAttribute("role")?console.warn("Unexpected element encountered in ActionList:",o):r.querySelectorAll("lmvz-button, button").forEach((r=>m(r,t)))))}i.style="@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); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } .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)); } } }";export{i as lmvz_action_list}
1
+ import{g as r,r as t,h as o,H as n}from"./p-DVab4vzV.js";import{A as e}from"./p-Wi9d2-w9.js";import{D as a}from"./p-CHxiS3ja.js";import{a as v}from"./p-BA3wizqg.js";import{R as l}from"./p-CICeIanv.js";import"./p-BDonpCG8.js";import"./p-DIyiticz.js";const i=class extends l{get el(){return r(this)}slotEl;get validationEl(){return this.el}get validationSlot(){return this.slotEl}focusController=new a(this,{orientation:"vertical",manageTabIndex:!0,enableHomeAndEnd:!0});label;constructor(r){super(),t(this,r),this.addController(this.focusController),this.addController(new e(this,{validationTiming:"slot"}))}componentDidLoad(){this.handleSlotChange(),super.componentDidLoad()}async initFocus(){this.focusController.initFocus()}handleSlotChange=()=>{const r=this.slotEl;if(!r)return;const t=r.assignedElements(),o=[];for(const r of t)m(r,o);for(const r of o)v(r)&&(r.variant||(r.variant="tertiary"));this.focusController.updateElements(o)};render(){return o(n,{key:"9dee495856e733cb17f30d0d8588362a8dcb28ce",role:"menu","aria-label":this.label||void 0},o("slot",{key:"c6454dbbe63eed5be01f3247934245d1cc1ad6e2",onSlotchange:this.handleSlotChange,ref:r=>this.slotEl=r}))}};function m(r,t){const o=r.tagName.toLowerCase();return"lmvz-button"===o?(r.buttonRole="menuitem",void t.push(r)):"button"===o?(r.setAttribute("role","menuitem"),void t.push(r)):void("hr"!==o&&("group"!==r.getAttribute("role")?console.warn("Unexpected element encountered in ActionList:",o):r.querySelectorAll("lmvz-button, button").forEach((r=>m(r,t)))))}i.style="@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); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } .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)); } } }";export{i as lmvz_action_list}
@@ -1 +1 @@
1
- import{g as e,r as t,c as o,h as i,H as s}from"./p-BOXP1Vx0.js";import{c as a}from"./p-BSV3KDWl.js";import{t as r}from"./p-DjvtQE7c.js";import{A as l}from"./p-BeY96W7m.js";import{b as n,g as d}from"./p-BA3wizqg.js";import{R as c}from"./p-CICeIanv.js";import"./p-D06Ds9Dh.js";import"./p-BDonpCG8.js";import"./p-DIyiticz.js";const h=r(a);let m=0;const f=class extends c{get el(){return e(this)}inheritedAriaAttributes={};dialogEl;dialogStateObserver;headerSlot;buttonGroupEl;closeButtonEl;previouslyFocusedElement=null;wrappedDialogShowModal;pendingCloseReturnValue;dialogTitleId="lmvz-modal-title-"+m++;hasHeader=!1;open=!1;closeLabel="Schliessen";dialogClose;dialogCancel;get dialog(){return this.dialogEl}get validationEl(){return this.dialogEl??this.el}constructor(e){super(),t(this,e),this.dialogClose=o(this,"close",6),this.dialogCancel=o(this,"cancel",1),this.addController(new l(this,{validationTiming:"slot"}))}handleFormDialogSubmit(e){const t=e.submitter;("dialog"===e.target.method||"dialog"===t?.getAttribute("formmethod"))&&(e.preventDefault(),this.dialogEl?.close(t?.value??""))}connectedCallback(){this.inheritedAriaAttributes=n(this.el,["role"]),Object.defineProperty(this.el,"dialog",{configurable:!0,enumerable:!0,get:()=>(this.ensureDialogShowModalCapture(),this.dialogEl)}),super.connectedCallback()}componentDidLoad(){this.handleHeaderSlotChange(),this.observeDialogState(),this.syncDialogVisibility(),super.componentDidLoad()}disconnectedCallback(){this.dialogStateObserver?.disconnect(),super.disconnectedCallback()}componentDidRender(){this.open&&this.focusPrimaryAction(),super.componentDidRender()}handleOpenChange(){this.syncDialogVisibility()}get dialogAccessibilityAttributes(){const e={...this.inheritedAriaAttributes};if(delete e["aria-label"],delete e["aria-labelledby"],this.hasHeader)return e["aria-labelledby"]=this.dialogTitleId,e;const t=this.inheritedAriaAttributes["aria-labelledby"];if("string"==typeof t)return e["aria-labelledby"]=t,e;const o=this.inheritedAriaAttributes["aria-label"];return"string"==typeof o&&(e["aria-label"]=o),e}hasAssignedContent(e){return Boolean(e?.assignedNodes({flatten:!0}).some((e=>e.nodeType===Node.TEXT_NODE?Boolean(e.textContent?.trim()):e.nodeType===Node.ELEMENT_NODE)))}observeDialogState(){this.dialogEl&&"undefined"!=typeof MutationObserver&&(this.dialogStateObserver?.disconnect(),this.dialogStateObserver=new MutationObserver((()=>{this.dialogEl&&this.dialogEl.open!==this.open&&(this.open=!!this.dialogEl.open)})),this.dialogStateObserver.observe(this.dialogEl,{attributes:!0,attributeFilter:["open"]}))}capturePreviouslyFocusedElement(){const e=this.dialogEl,t=d(document);e&&t&&!e.contains(t)&&(this.previouslyFocusedElement=t)}ensureDialogShowModalCapture(){const e=this.dialogEl;if(!e||"function"!=typeof e.showModal)return;const t=e.showModal;if(t===this.wrappedDialogShowModal)return;const o=()=>(this.capturePreviouslyFocusedElement(),t.call(e));Object.defineProperty(e,"showModal",{configurable:!0,value:o}),this.wrappedDialogShowModal=o}syncDialogVisibility(){const e=this.dialogEl;if(e)return this.open?(e.open||(this.capturePreviouslyFocusedElement(),"function"==typeof e.showModal?e.showModal():e.setAttribute("open","")),void this.focusPrimaryAction()):void(e.open&&("function"==typeof e.close?e.close():(e.removeAttribute("open"),this.handleDialogClose())))}focusPrimaryAction(){const e=this.buttonGroupEl?.primaryEnabledAction??this.closeButtonEl;e&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{this.open&&e.focus()}))}restoreFocus(){this.previouslyFocusedElement?.isConnected&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=null)}handleCloseButtonClick=()=>{if(!this.dialogEl)return;const e=this.dialogEl;if("function"==typeof e.requestClose)return this.pendingCloseReturnValue="close",void e.requestClose("close");"function"!=typeof this.dialogEl.close?this.handleDialogClose():this.dialogEl.close("close")};handleDialogCancel=e=>{if(e.preventDefault(),this.dialogCancel.emit().defaultPrevented)return void(this.pendingCloseReturnValue=void 0);const t=this.pendingCloseReturnValue;this.pendingCloseReturnValue=void 0,this.dialogEl?.close(t)};handleDialogClose=()=>{console.log("Dialog close handler called"),this.open&&(this.open=!1),this.restoreFocus(),this.dialogClose.emit()};handleHeaderSlotChange=()=>{this.hasHeader=this.hasAssignedContent(this.headerSlot)};render(){return i(s,{key:"9eb1aa89e4c682586d10291e2a8a2523b8fd17f7"},i("dialog",{key:"477c537328622f85759dc72a0c499d56e3d5e345",ref:e=>this.dialogEl=e,onCancel:this.handleDialogCancel,onClose:this.handleDialogClose,...this.dialogAccessibilityAttributes},i("div",{key:"b9fe9cb306938a117002e5213740ea20269080b8",class:"modal-shell"},i("header",{key:"34d0cd8078d55d98ec526843f02710044663de70",class:{header:!0,"has-title":this.hasHeader}},i("div",{key:"1408f0e0875f5e0508ad0f5682f4879a93df65df",class:"title",id:this.dialogTitleId,hidden:!this.hasHeader},i("slot",{key:"735c1757962e4f3804700a4669d0b49f2d11fb16",name:"header",ref:e=>this.headerSlot=e,onSlotchange:this.handleHeaderSlotChange})),i("lmvz-button",{key:"b0eb76cde508fb434023abdc0f764e1b809b6447",ref:e=>this.closeButtonEl=e,type:"button",class:"close-button","aria-label":this.closeLabel,onLmvzActivation:this.handleCloseButtonClick,variant:"tertiary"},i("lmvz-icon",{key:"9f978d3117a4046202c3ba1df39aa0c7afc7ee28",icon:h}))),i("div",{key:"46ffd7e7315099189c0a2499d17bdeabeb0e46e5",class:"body"},i("slot",{key:"095c3353f2ea00f6fa765ac0972ee0123f8e4154"})),i("footer",{key:"5b092b00f10acede66d0fac53f01584ecf528418",class:"actions",hidden:!this.buttonGroupEl?.hasActions},i("lmvz-button-group",{key:"ce312e1b1c3407838b8704f20393e7120d6338f9",ref:e=>this.buttonGroupEl=e},i("slot",{key:"6246782cbee1cc440cfdaf45dac36655f19c972e",name:"actions"}))))))}static get watchers(){return{open:[{handleOpenChange:0}]}}};f.style=" @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); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: contents; --lmvz-modal-shell-gap: var(--lmvz-dimension-20-16, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); } dialog { border: none; padding: 0; background: transparent; height: 100vh; width: 100vw; contain: layout size; } dialog::backdrop { background: rgba(0, 0, 0, 0.19); background: rgb(from var(--lmvz-semantic-color-int-primary, #000000) r g b / 0.29); } .modal-shell { margin-inline: auto; top: 50%; transform: translateY(-50%); box-sizing: border-box; width: fit-content; max-height: 100%; max-width: clamp(20rem, 100%, 90vw); display: flex; flex-direction: column; gap: var(--lmvz-modal-shell-gap); padding: var(--lmvz-component-wrapper-lg-padding-y, clamp(2.25rem, 2.19rem + 0.26vw, 2.5rem)) var(--lmvz-component-wrapper-lg-padding-x, clamp(1.5rem, 1.14rem + 1.55vw, 3rem)); border-radius: var(--lmvz-component-wrapper-lg-border-radius, 18px); background: var(--lmvz-semantic-color-surface-primary, #ffffff); position: relative; .close-button { position: absolute; top: var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); right: var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); } } .header { display: flex; align-items: flex-start; justify-content: flex-end; gap: var(--lmvz-modal-shell-gap); } .title { min-inline-size: 0; font: var(--lmvz-typography-heading-lg, 500 clamp(1.13rem, 1.03rem + 0.39vw, 1.5rem) / 1.5 Router); } .has-title .title { flex: 1 1 auto; } .body { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); flex: 1; overflow: scroll; } ";export{f as lmvz_modal}
1
+ import{g as e,r as t,c as o,h as i,H as s}from"./p-DVab4vzV.js";import{c as a}from"./p-BSV3KDWl.js";import{t as r}from"./p-DjvtQE7c.js";import{A as l}from"./p-Wi9d2-w9.js";import{b as n,g as d}from"./p-BA3wizqg.js";import{R as c}from"./p-CICeIanv.js";import"./p-D06Ds9Dh.js";import"./p-BDonpCG8.js";import"./p-DIyiticz.js";const h=r(a);let m=0;const f=class extends c{get el(){return e(this)}inheritedAriaAttributes={};dialogEl;dialogStateObserver;headerSlot;buttonGroupEl;closeButtonEl;previouslyFocusedElement=null;wrappedDialogShowModal;pendingCloseReturnValue;dialogTitleId="lmvz-modal-title-"+m++;hasHeader=!1;open=!1;closeLabel="Schliessen";dialogClose;dialogCancel;get dialog(){return this.dialogEl}get validationEl(){return this.dialogEl??this.el}constructor(e){super(),t(this,e),this.dialogClose=o(this,"close",6),this.dialogCancel=o(this,"cancel",1),this.addController(new l(this,{validationTiming:"slot"}))}handleFormDialogSubmit(e){const t=e.submitter;("dialog"===e.target.method||"dialog"===t?.getAttribute("formmethod"))&&(e.preventDefault(),this.dialogEl?.close(t?.value??""))}connectedCallback(){this.inheritedAriaAttributes=n(this.el,["role"]),Object.defineProperty(this.el,"dialog",{configurable:!0,enumerable:!0,get:()=>(this.ensureDialogShowModalCapture(),this.dialogEl)}),super.connectedCallback()}componentDidLoad(){this.handleHeaderSlotChange(),this.observeDialogState(),this.syncDialogVisibility(),super.componentDidLoad()}disconnectedCallback(){this.dialogStateObserver?.disconnect(),super.disconnectedCallback()}componentDidRender(){this.open&&this.focusPrimaryAction(),super.componentDidRender()}handleOpenChange(){this.syncDialogVisibility()}get dialogAccessibilityAttributes(){const e={...this.inheritedAriaAttributes};if(delete e["aria-label"],delete e["aria-labelledby"],this.hasHeader)return e["aria-labelledby"]=this.dialogTitleId,e;const t=this.inheritedAriaAttributes["aria-labelledby"];if("string"==typeof t)return e["aria-labelledby"]=t,e;const o=this.inheritedAriaAttributes["aria-label"];return"string"==typeof o&&(e["aria-label"]=o),e}hasAssignedContent(e){return Boolean(e?.assignedNodes({flatten:!0}).some((e=>e.nodeType===Node.TEXT_NODE?Boolean(e.textContent?.trim()):e.nodeType===Node.ELEMENT_NODE)))}observeDialogState(){this.dialogEl&&"undefined"!=typeof MutationObserver&&(this.dialogStateObserver?.disconnect(),this.dialogStateObserver=new MutationObserver((()=>{this.dialogEl&&this.dialogEl.open!==this.open&&(this.open=!!this.dialogEl.open)})),this.dialogStateObserver.observe(this.dialogEl,{attributes:!0,attributeFilter:["open"]}))}capturePreviouslyFocusedElement(){const e=this.dialogEl,t=d(document);e&&t&&!e.contains(t)&&(this.previouslyFocusedElement=t)}ensureDialogShowModalCapture(){const e=this.dialogEl;if(!e||"function"!=typeof e.showModal)return;const t=e.showModal;if(t===this.wrappedDialogShowModal)return;const o=()=>(this.capturePreviouslyFocusedElement(),t.call(e));Object.defineProperty(e,"showModal",{configurable:!0,value:o}),this.wrappedDialogShowModal=o}syncDialogVisibility(){const e=this.dialogEl;if(e)return this.open?(e.open||(this.capturePreviouslyFocusedElement(),"function"==typeof e.showModal?e.showModal():e.setAttribute("open","")),void this.focusPrimaryAction()):void(e.open&&("function"==typeof e.close?e.close():(e.removeAttribute("open"),this.handleDialogClose())))}focusPrimaryAction(){const e=this.buttonGroupEl?.primaryEnabledAction??this.closeButtonEl;e&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{this.open&&e.focus()}))}restoreFocus(){this.previouslyFocusedElement?.isConnected&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=null)}handleCloseButtonClick=()=>{if(!this.dialogEl)return;const e=this.dialogEl;if("function"==typeof e.requestClose)return this.pendingCloseReturnValue="close",void e.requestClose("close");"function"!=typeof this.dialogEl.close?this.handleDialogClose():this.dialogEl.close("close")};handleDialogCancel=e=>{if(e.preventDefault(),this.dialogCancel.emit().defaultPrevented)return void(this.pendingCloseReturnValue=void 0);const t=this.pendingCloseReturnValue;this.pendingCloseReturnValue=void 0,this.dialogEl?.close(t)};handleDialogClose=()=>{console.log("Dialog close handler called"),this.open&&(this.open=!1),this.restoreFocus(),this.dialogClose.emit()};handleHeaderSlotChange=()=>{this.hasHeader=this.hasAssignedContent(this.headerSlot)};render(){return i(s,{key:"9eb1aa89e4c682586d10291e2a8a2523b8fd17f7"},i("dialog",{key:"477c537328622f85759dc72a0c499d56e3d5e345",ref:e=>this.dialogEl=e,onCancel:this.handleDialogCancel,onClose:this.handleDialogClose,...this.dialogAccessibilityAttributes},i("div",{key:"b9fe9cb306938a117002e5213740ea20269080b8",class:"modal-shell"},i("header",{key:"34d0cd8078d55d98ec526843f02710044663de70",class:{header:!0,"has-title":this.hasHeader}},i("div",{key:"1408f0e0875f5e0508ad0f5682f4879a93df65df",class:"title",id:this.dialogTitleId,hidden:!this.hasHeader},i("slot",{key:"735c1757962e4f3804700a4669d0b49f2d11fb16",name:"header",ref:e=>this.headerSlot=e,onSlotchange:this.handleHeaderSlotChange})),i("lmvz-button",{key:"b0eb76cde508fb434023abdc0f764e1b809b6447",ref:e=>this.closeButtonEl=e,type:"button",class:"close-button","aria-label":this.closeLabel,onLmvzActivation:this.handleCloseButtonClick,variant:"tertiary"},i("lmvz-icon",{key:"9f978d3117a4046202c3ba1df39aa0c7afc7ee28",icon:h}))),i("div",{key:"46ffd7e7315099189c0a2499d17bdeabeb0e46e5",class:"body"},i("slot",{key:"095c3353f2ea00f6fa765ac0972ee0123f8e4154"})),i("footer",{key:"5b092b00f10acede66d0fac53f01584ecf528418",class:"actions",hidden:!this.buttonGroupEl?.hasActions},i("lmvz-button-group",{key:"ce312e1b1c3407838b8704f20393e7120d6338f9",ref:e=>this.buttonGroupEl=e},i("slot",{key:"6246782cbee1cc440cfdaf45dac36655f19c972e",name:"actions"}))))))}static get watchers(){return{open:[{handleOpenChange:0}]}}};f.style=" @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); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: contents; --lmvz-modal-shell-gap: var(--lmvz-dimension-20-16, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); } dialog { border: none; padding: 0; background: transparent; height: 100vh; width: 100vw; contain: layout size; } dialog::backdrop { background: rgba(0, 0, 0, 0.19); background: rgb(from var(--lmvz-semantic-color-int-primary, #000000) r g b / 0.29); } .modal-shell { margin-inline: auto; top: 50%; transform: translateY(-50%); box-sizing: border-box; width: fit-content; max-height: 100%; max-width: clamp(20rem, 100%, 90vw); display: flex; flex-direction: column; gap: var(--lmvz-modal-shell-gap); padding: var(--lmvz-component-wrapper-lg-padding-y, clamp(2.25rem, 2.19rem + 0.26vw, 2.5rem)) var(--lmvz-component-wrapper-lg-padding-x, clamp(1.5rem, 1.14rem + 1.55vw, 3rem)); border-radius: var(--lmvz-component-wrapper-lg-border-radius, 18px); background: var(--lmvz-semantic-color-surface-primary, #ffffff); position: relative; .close-button { position: absolute; top: var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); right: var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); } } .header { display: flex; align-items: flex-start; justify-content: flex-end; gap: var(--lmvz-modal-shell-gap); } .title { min-inline-size: 0; font: var(--lmvz-typography-heading-lg, 500 clamp(1.13rem, 1.03rem + 0.39vw, 1.5rem) / 1.5 Router); } .has-title .title { flex: 1 1 auto; } .body { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); flex: 1; overflow: scroll; } ";export{f as lmvz_modal}
@@ -1 +1 @@
1
- import{r as t,g as e,h as s,H as i}from"./p-BOXP1Vx0.js";import{a,i as n}from"./p-BDonpCG8.js";import{v as o}from"./p-0ctLESas.js";import{d as r,e as c,f as d,h,j as l,a as u,k as m}from"./p-BA3wizqg.js";import"./p-DIyiticz.js";const f=class{constructor(e){t(this,e)}get el(){return e(this)}actionsSlot;validationMessageCache=[];actionsStateObserver;stacked=!1;get primaryEnabledAction(){return this.enabledButtons.find(r)??this.enabledButtons[0]}get hasActions(){return this.assignedButtons.some((t=>c(t)&&d(t)&&!h(t)))}componentDidLoad(){this.handleActionsSlotChange()}disconnectedCallback(){this.actionsStateObserver?.disconnect()}get assignedElements(){return this.actionsSlot?.assignedElements({flatten:!0})??[]}get assignedButtons(){return this.assignedElements.filter(d)}get visibleButtons(){return this.assignedButtons.filter(c)}get enabledButtons(){return this.visibleButtons.filter((t=h,(...e)=>{const s=t(...e);return a(s)?s.then((t=>!t)):!s}));var t}getActionValidationResult(){if(!this.visibleButtons.length)return[];const t=this.visibleButtons.filter(r),e=this.visibleButtons.filter(l),s=[],i=this.visibleButtons;if(1!==t.length&&s.push("LmvzButtonGroup actions slot should contain exactly one primary action."),e.length>1&&s.push(`LmvzButtonGroup actions slot should contain at most one secondary action (received ${e.length})`),t.length){const a=e[0];0!==i.indexOf(t[0])&&s.push("Primary action should be the first focusable element in the actions slot (i.e. first child of the actions slot)."),a&&1!==i.indexOf(a)&&s.push("Secondary action should be the second focusable element in the actions slot (i.e. immediately after the primary button).")}else e.length&&0!==i.indexOf(e[0])&&s.push("Secondary action should be the first focusable element in the actions slot when no primary action is present (i.e. first child of the actions slot).");return s}handleActionsSlotChange=()=>{this.observeActionState(),this.syncActionsState()};observeActionState(){"undefined"!=typeof MutationObserver&&(this.actionsStateObserver?.disconnect(),this.assignedButtons.length&&(this.actionsStateObserver=new MutationObserver((()=>{this.syncActionsState()})),this.assignedButtons.forEach((t=>{this.actionsStateObserver?.observe(t,{attributes:!0,attributeFilter:["disabled","hidden","variant"]})}))))}syncActionsState(){this.assignedElements.forEach((t=>{["LMVZ-BUTTON","BUTTON"].includes(t.tagName.toUpperCase())||(t.hasAttribute("hidden")||t.setAttribute("hidden",""),"true"!==t.getAttribute("aria-hidden")&&t.setAttribute("aria-hidden","true"))})),this.checkActions();const t=this.visibleButtons,e=t.length>0&&t.some((t=>r(t)||l(t)));t.length>0&&!e?this.el.setAttribute("data-only-tertiary",""):this.el.removeAttribute("data-only-tertiary"),this.visibleButtons.forEach(((t,e)=>{const s=o[e]??"tertiary";t&&(u(t)?t.getAttribute("variant")||t.variant||t.setAttribute("variant",s):t.classList.add(s))}));const s=this.visibleButtons.find((t=>"tertiary"===t.getAttribute("variant")));this.visibleButtons.forEach((t=>{t===s?t.setAttribute("data-first-tertiary",""):t.removeAttribute("data-first-tertiary")})),this.focusPrimaryAction()}focusPrimaryAction(){const t=this.primaryEnabledAction;t&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{m(t)&&t.focus()}))}checkActions(){if(!n())return;const t=this.getActionValidationResult();t.length&&t.forEach((t=>{this.validationMessageCache.includes(t)||(console.warn(t),this.validationMessageCache.push(t))}))}render(){return s(i,{key:"3e8ce38f7e83e201e47d31579f22161ff36247b1"},s("slot",{key:"bc953d19b333f51c5f5c5ba86be3a85d155a29d1",ref:t=>this.actionsSlot=t,onSlotchange:this.handleActionsSlotChange}))}};f.style=":host{display:flex;flex-flow:row-reverse wrap;gap:var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));font:var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);}:host([stacked]){flex-flow:column nowrap;align-items:stretch;padding:0}:host([stacked]) ::slotted(*){display:block;width:100%}::slotted([hidden]){display:none !important}:host(:not([data-only-tertiary],[stacked])) ::slotted([data-first-tertiary]){margin-inline-end:auto}:host([data-only-tertiary]:not([stacked])){justify-content:flex-end}";export{f as lmvz_button_group}
1
+ import{r as t,g as e,h as s,H as i}from"./p-DVab4vzV.js";import{a,i as n}from"./p-BDonpCG8.js";import{v as o}from"./p-0ctLESas.js";import{d as r,e as c,f as d,h,j as l,a as u,k as m}from"./p-BA3wizqg.js";import"./p-DIyiticz.js";const f=class{constructor(e){t(this,e)}get el(){return e(this)}actionsSlot;validationMessageCache=[];actionsStateObserver;stacked=!1;get primaryEnabledAction(){return this.enabledButtons.find(r)??this.enabledButtons[0]}get hasActions(){return this.assignedButtons.some((t=>c(t)&&d(t)&&!h(t)))}componentDidLoad(){this.handleActionsSlotChange()}disconnectedCallback(){this.actionsStateObserver?.disconnect()}get assignedElements(){return this.actionsSlot?.assignedElements({flatten:!0})??[]}get assignedButtons(){return this.assignedElements.filter(d)}get visibleButtons(){return this.assignedButtons.filter(c)}get enabledButtons(){return this.visibleButtons.filter((t=h,(...e)=>{const s=t(...e);return a(s)?s.then((t=>!t)):!s}));var t}getActionValidationResult(){if(!this.visibleButtons.length)return[];const t=this.visibleButtons.filter(r),e=this.visibleButtons.filter(l),s=[],i=this.visibleButtons;if(1!==t.length&&s.push("LmvzButtonGroup actions slot should contain exactly one primary action."),e.length>1&&s.push(`LmvzButtonGroup actions slot should contain at most one secondary action (received ${e.length})`),t.length){const a=e[0];0!==i.indexOf(t[0])&&s.push("Primary action should be the first focusable element in the actions slot (i.e. first child of the actions slot)."),a&&1!==i.indexOf(a)&&s.push("Secondary action should be the second focusable element in the actions slot (i.e. immediately after the primary button).")}else e.length&&0!==i.indexOf(e[0])&&s.push("Secondary action should be the first focusable element in the actions slot when no primary action is present (i.e. first child of the actions slot).");return s}handleActionsSlotChange=()=>{this.observeActionState(),this.syncActionsState()};observeActionState(){"undefined"!=typeof MutationObserver&&(this.actionsStateObserver?.disconnect(),this.assignedButtons.length&&(this.actionsStateObserver=new MutationObserver((()=>{this.syncActionsState()})),this.assignedButtons.forEach((t=>{this.actionsStateObserver?.observe(t,{attributes:!0,attributeFilter:["disabled","hidden","variant"]})}))))}syncActionsState(){this.assignedElements.forEach((t=>{["LMVZ-BUTTON","BUTTON"].includes(t.tagName.toUpperCase())||(t.hasAttribute("hidden")||t.setAttribute("hidden",""),"true"!==t.getAttribute("aria-hidden")&&t.setAttribute("aria-hidden","true"))})),this.checkActions();const t=this.visibleButtons,e=t.length>0&&t.some((t=>r(t)||l(t)));t.length>0&&!e?this.el.setAttribute("data-only-tertiary",""):this.el.removeAttribute("data-only-tertiary"),this.visibleButtons.forEach(((t,e)=>{const s=o[e]??"tertiary";t&&(u(t)?t.getAttribute("variant")||t.variant||t.setAttribute("variant",s):t.classList.add(s))}));const s=this.visibleButtons.find((t=>"tertiary"===t.getAttribute("variant")));this.visibleButtons.forEach((t=>{t===s?t.setAttribute("data-first-tertiary",""):t.removeAttribute("data-first-tertiary")})),this.focusPrimaryAction()}focusPrimaryAction(){const t=this.primaryEnabledAction;t&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{m(t)&&t.focus()}))}checkActions(){if(!n())return;const t=this.getActionValidationResult();t.length&&t.forEach((t=>{this.validationMessageCache.includes(t)||(console.warn(t),this.validationMessageCache.push(t))}))}render(){return s(i,{key:"3e8ce38f7e83e201e47d31579f22161ff36247b1"},s("slot",{key:"bc953d19b333f51c5f5c5ba86be3a85d155a29d1",ref:t=>this.actionsSlot=t,onSlotchange:this.handleActionsSlotChange}))}};f.style=":host{display:flex;flex-flow:row-reverse wrap;gap:var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));font:var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);}:host([stacked]){flex-flow:column nowrap;align-items:stretch;padding:0}:host([stacked]) ::slotted(*){display:block;width:100%}::slotted([hidden]){display:none !important}:host(:not([data-only-tertiary],[stacked])) ::slotted([data-first-tertiary]){margin-inline-end:auto}:host([data-only-tertiary]:not([stacked])){justify-content:flex-end}";export{f as lmvz_button_group}
@@ -1 +1 @@
1
- import{g as r,r as e,c as o,h as t,H as i}from"./p-BOXP1Vx0.js";import{A as a}from"./p-BeY96W7m.js";import{R as s}from"./p-CICeIanv.js";import"./p-BDonpCG8.js";function l(r){return r.el.shadowRoot?.querySelector("input")??r.el.querySelector("input")??null}class c{hosts=[];_focusedHost=null;_focusinHandler=r=>{this.hosts.some((e=>e.el.contains(r.target)))||this.clearFocused()};register(r){if(!this.hosts.includes(r)){const e=0===this.hosts.length;this.hosts.push(r),this.sortHosts(),e&&document.addEventListener("focusin",this._focusinHandler,!0),this.refreshValidity()}}unregister(r){r===this._focusedHost&&(this._focusedHost=null),this.hosts=this.hosts.filter((e=>e!==r)),0===this.hosts.length&&document.removeEventListener("focusin",this._focusinHandler,!0),this.refreshValidity()}get sortedEnabled(){return this.hosts.filter((r=>!r.disabled))}isAnyChecked(){return this.hosts.some((r=>r.checked))}refreshValidity(){for(const r of this.hosts)r.updateValidity()}setFocused(r){this._focusedHost=r,this.updateTabindex(),r.focusInput()}clearFocused(){this._focusedHost=null,this.updateTabindex()}select(r){this._focusedHost=null;for(const e of this.hosts)e.checked=e===r;this.updateTabindex(),this.refreshValidity()}updateTabindex(){const r=this.sortedEnabled,e=this.hosts.find((r=>r.checked));let o;o=this._focusedHost&&r.includes(this._focusedHost)?this._focusedHost:e??r[0]??null;for(const r of this.hosts){const e=l(r);e&&(e.tabIndex=r===o?0:-1)}}sortHosts(){this.hosts.sort(((r,e)=>r.el.compareDocumentPosition(e.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))}}class n{host;static registry=new Map;group=null;_groupKey=null;_scope=null;constructor(r){this.host=r}hostConnected(){const{group:r,key:e,scope:o}=n.acquireGroup(this.host);this._groupKey=e,this._scope=o,this.group=r,this.group.register(this.host),this.group.updateTabindex()}hostDidRender(){this.group?.updateTabindex()}hostDisconnected(){this.group&&(this.group.unregister(this.host),this.group.updateTabindex(),n.releaseGroup(this._groupKey,this._scope),this._groupKey=null,this._scope=null,this.group=null)}get sortedEnabled(){return this.group?.sortedEnabled??[]}select(r){this.group?.select(r)}isAnyChecked(){return this.group?.isAnyChecked()??!1}refreshValidity(){this.group?.refreshValidity()}setFocused(r){this.group?.setFocused(r)}clearFocused(){this.group?.clearFocused()}updateTabindex(){this.group?.updateTabindex()}static acquireGroup(r){const e=r.name;if(!e)return{group:new c,key:null,scope:null};const o=r.el.closest("form")??document,t=function(r,e){return e instanceof HTMLFormElement?(e.dataset.lmvzRadioGroupId||(e.dataset.lmvzRadioGroupId=String(Math.random())),`${r}::form::${e.dataset.lmvzRadioGroupId}`):`${r}::document`}(e,o);let i=n.registry.get(t);return i||(i={group:new c,refCount:0},n.registry.set(t,i)),i.refCount++,{group:i.group,key:t,scope:o}}static releaseGroup(r,e){if(!r)return;const o=n.registry.get(r);o&&(o.refCount--,o.refCount<=0&&(n.registry.delete(r),e instanceof HTMLFormElement&&e.removeAttribute("data-lmvz-radio-group-id")))}}let d=0;const h=class extends s{get el(){return r(this)}get validationEl(){return this.el}internals;nativeInput;radioId="lmvz-radio-"+d++;initialChecked=!1;radioGroupController;get helperId(){return this.helperText?`${this.radioId}-helper`:void 0}label;checked=!1;value="on";name;disabled=!1;required=!1;nativeError=!1;errorFromProp=!1;get error(){return this.errorFromProp||this.nativeError}set error(r){this.errorFromProp=r}helperText;form;autofocus=!1;_handlingNativeChange=!1;_handlingFormReset=!1;handleCheckedChange(r,e){this.internals.setFormValue?.(r?this.value:null),this.updateValidity(),r||!e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!1),!r||e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!0)}handleRequiredChange(){this.updateValidity()}handleValueChange(r){this.checked&&this.internals.setFormValue?.(r)}handleLabelChange(r){r||console.warn("[lmvz-radio] label prop is required and must not be empty")}lmvzChange;lmvzActivation;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}async getValidationMessage(){return this.internals?.validationMessage??""}constructor(r){super(),e(this,r),this.lmvzChange=o(this,"lmvzChange",7),this.lmvzActivation=o(this,"lmvzActivation",7),r.$hostElement$["s-ei"]?this.internals=r.$hostElement$["s-ei"]:(this.internals=r.$hostElement$.attachInternals(),r.$hostElement$["s-ei"]=this.internals),this.addController(new a(this,{reValidateOnPropChanges:!0})),this.radioGroupController=new n(this),this.addController(this.radioGroupController)}componentWillLoad(){this.initialChecked=this.checked,this.internals.setFormValue?.(this.checked?this.value:null),this.updateValidity(),super.componentWillLoad()}componentDidLoad(){this.updateValidity(),super.componentDidLoad()}formAssociatedCallback(){this.internals.setFormValue?.(this.checked?this.value:null)}formResetCallback(){this._handlingFormReset=!0;try{this.checked=this.initialChecked}finally{this._handlingFormReset=!1}this.updateValidity(),this.radioGroupController.refreshValidity()}formStateRestoreCallback(r){if("string"==typeof r){this._handlingFormReset=!0;try{this.checked=r===this.value}finally{this._handlingFormReset=!1}}}isAnyInGroupChecked(){return this.radioGroupController.isAnyChecked()}updateValidity(){!this.required||this.isAnyInGroupChecked()?(this.internals.setValidity?.({}),this.nativeError=!1):this.internals.setValidity?.({valueMissing:!0},"Please select an option.",this.nativeInput)}handleInvalid(){this.nativeError=!0}handleChange=r=>{this._handlingNativeChange=!0;try{this.checked=r.target.checked,this.lmvzChange.emit(this.checked),this.radioGroupController.select(this),this.lmvzActivation.emit()}finally{this._handlingNativeChange=!1}};handleKeydown(r){const{key:e}=r;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft","Home","End"].includes(e))return;r.preventDefault();const o=this.radioGroupController.sortedEnabled;if(0===o.length)return;const t=o.indexOf(this);if(-1===t)return;let i;i="ArrowDown"===e||"ArrowRight"===e?(t+1)%o.length:"ArrowUp"===e||"ArrowLeft"===e?(t-1+o.length)%o.length:"Home"===e?0:o.length-1;const a=o[i];a&&this.radioGroupController.setFocused(a)}retargetInnerClicks(){this.nativeInput?.click()}render(){return t(i,{key:"f1fdc1167c4e59c2524e1e545c3382ca32853788"},t("input",{key:"c1b711444475ed401766cc5827eeaec0c46b62cf",type:"radio",id:this.radioId,value:this.value,checked:this.checked,disabled:this.disabled,autoFocus:this.autofocus,"aria-required":this.required?"true":"false","aria-invalid":this.error?"true":void 0,"aria-describedby":this.helperId,ref:r=>this.nativeInput=r,onChange:this.handleChange}),t("span",{key:"b25e623269df05bdf8159e72da4df2e0bfb5d7bc",class:"circle","aria-hidden":"true"},this.checked&&t("span",{key:"93d12890c7ba0abe203c63953ea1115aee37d7a0",class:"dot"})),t("span",{key:"44dcfdc4e7ee3820624b0d02a438139f45bb8733",class:"content"},t("label",{key:"d0547cd5e79642b298da155c9937715224b52cae",htmlFor:this.radioId},this.label),t("span",{key:"a9df5dd8a775a2f7422d5bac296869f88553e33f",onClick:this.retargetInnerClicks.bind(this),"aria-live":"polite",class:"helper-text",id:this.helperId},this.helperText)))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}}};h.style="@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-radio-h { display: inline-block; --radio-circle-size: var(--lmvz-global-s18, 18px); --radio-dot-size: 0.5rem; --radio-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --radio-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --radio-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --radio-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-border-color-error: var(--lmvz-semantic-color-status-on-danger, #a31419); --radio-dot-color: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --radio-wrapper-bg-active: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --radio-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --radio-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --radio-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #545454); --radio-easing: var(--lmvz-global-easing-default, ease); --radio-duration: 0.2s; display: flex; align-items: center; gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-block: var(--lmvz-dimension-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: clip; cursor: pointer; background-color: transparent; position: relative; transition: background-color var(--radio-duration) var(--radio-easing); } input.sc-lmvz-radio { position: absolute; inset-block-start: var(--lmvz-dimension-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); inset-inline-start: var(--lmvz-dimension-10-4, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); opacity: 0; width: var(--radio-circle-size); height: var(--radio-circle-size); margin: 0; cursor: pointer; z-index: 1; } .circle.sc-lmvz-radio { width: var(--radio-circle-size); height: var(--radio-circle-size); border-radius: 50%; border: var(--lmvz-semantic-border-width-default, 1px) solid var(--radio-border-color); background-color: var(--radio-bg); pointer-events: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; transition: border-color var(--radio-duration) var(--radio-easing); } .dot.sc-lmvz-radio { width: var(--radio-dot-size); height: var(--radio-dot-size); border-radius: 50%; background-color: var(--radio-dot-color); } .content.sc-lmvz-radio { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; } label.sc-lmvz-radio { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--radio-label-color); cursor: pointer; transition: color var(--radio-duration) var(--radio-easing); } .helper-text.sc-lmvz-radio { display: block; font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--radio-helper-color); margin-block-start: 2px; } .helper-text.sc-lmvz-radio:empty { display: none; } @media (hover: hover) { .sc-lmvz-radio-h:hover .circle.sc-lmvz-radio { border-color: var(--radio-border-color-hover); } .sc-lmvz-radio-h:hover { background-color: var(--radio-wrapper-bg-hover); } } .sc-lmvz-radio-h:active { background-color: var(--radio-wrapper-bg-active); } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-checked); } [checked].sc-lmvz-radio-h label.sc-lmvz-radio { color: var(--radio-label-color-checked); } [error].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-error); } [error].sc-lmvz-radio-h .helper-text.sc-lmvz-radio { color: var(--lmvz-semantic-color-status-on-danger, #a31419); } [disabled].sc-lmvz-radio-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } @media (forced-colors: active) { .circle.sc-lmvz-radio { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: Highlight; } .dot.sc-lmvz-radio { background-color: ButtonText; } [checked].sc-lmvz-radio-h .dot.sc-lmvz-radio { background-color: HighlightText; } }.sc-lmvz-radio-h:has(: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))}@media (forced-colors: active){.sc-lmvz-radio-h:has(:focus-visible){outline-color:Highlight;box-shadow:none}}";export{h as lmvz_radio}
1
+ import{g as r,r as e,c as o,h as i,H as t}from"./p-DVab4vzV.js";import{A as a}from"./p-Wi9d2-w9.js";import{R as s}from"./p-CICeIanv.js";import"./p-BDonpCG8.js";function l(r){return r.el.shadowRoot?.querySelector("input")??r.el.querySelector("input")??null}class c{hosts=[];_focusedHost=null;_focusinHandler=r=>{this.hosts.some((e=>e.el.contains(r.target)))||this.clearFocused()};register(r){if(!this.hosts.includes(r)){const e=0===this.hosts.length;this.hosts.push(r),this.sortHosts(),e&&document.addEventListener("focusin",this._focusinHandler,!0),this.refreshValidity()}}unregister(r){r===this._focusedHost&&(this._focusedHost=null),this.hosts=this.hosts.filter((e=>e!==r)),0===this.hosts.length&&document.removeEventListener("focusin",this._focusinHandler,!0),this.refreshValidity()}get sortedEnabled(){return this.hosts.filter((r=>!r.disabled))}isAnyChecked(){return this.hosts.some((r=>r.checked))}refreshValidity(){for(const r of this.hosts)r.updateValidity()}setFocused(r){this._focusedHost=r,this.updateTabindex(),r.focusInput()}clearFocused(){this._focusedHost=null,this.updateTabindex()}select(r){this._focusedHost=null;for(const e of this.hosts)e.checked=e===r;this.updateTabindex(),this.refreshValidity()}updateTabindex(){const r=this.sortedEnabled,e=this.hosts.find((r=>r.checked));let o;o=this._focusedHost&&r.includes(this._focusedHost)?this._focusedHost:e??r[0]??null;for(const r of this.hosts){const e=l(r);e&&(e.tabIndex=r===o?0:-1)}}sortHosts(){this.hosts.sort(((r,e)=>r.el.compareDocumentPosition(e.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))}}class n{host;static registry=new Map;group=null;_groupKey=null;_scope=null;constructor(r){this.host=r}hostConnected(){const{group:r,key:e,scope:o}=n.acquireGroup(this.host);this._groupKey=e,this._scope=o,this.group=r,this.group.register(this.host),this.group.updateTabindex()}hostDidRender(){this.group?.updateTabindex()}hostDisconnected(){this.group&&(this.group.unregister(this.host),this.group.updateTabindex(),n.releaseGroup(this._groupKey,this._scope),this._groupKey=null,this._scope=null,this.group=null)}get sortedEnabled(){return this.group?.sortedEnabled??[]}select(r){this.group?.select(r)}isAnyChecked(){return this.group?.isAnyChecked()??!1}refreshValidity(){this.group?.refreshValidity()}setFocused(r){this.group?.setFocused(r)}clearFocused(){this.group?.clearFocused()}updateTabindex(){this.group?.updateTabindex()}static acquireGroup(r){const e=r.name;if(!e)return{group:new c,key:null,scope:null};const o=r.el.closest("form")??document,i=function(r,e){return e instanceof HTMLFormElement?(e.dataset.lmvzRadioGroupId||(e.dataset.lmvzRadioGroupId=String(Math.random())),`${r}::form::${e.dataset.lmvzRadioGroupId}`):`${r}::document`}(e,o);let t=n.registry.get(i);return t||(t={group:new c,refCount:0},n.registry.set(i,t)),t.refCount++,{group:t.group,key:i,scope:o}}static releaseGroup(r,e){if(!r)return;const o=n.registry.get(r);o&&(o.refCount--,o.refCount<=0&&(n.registry.delete(r),e instanceof HTMLFormElement&&e.removeAttribute("data-lmvz-radio-group-id")))}}let d=0;const h=class extends s{get el(){return r(this)}get validationEl(){return this.el}internals;nativeInput;radioId="lmvz-radio-"+d++;initialChecked=!1;radioGroupController;get helperId(){return this.helperText?`${this.radioId}-helper`:void 0}label;checked=!1;value="on";name;disabled=!1;required=!1;nativeError=!1;errorFromProp=!1;get error(){return this.errorFromProp||this.nativeError}set error(r){this.errorFromProp=r}helperText;form;autofocus=!1;_handlingNativeChange=!1;_handlingFormReset=!1;handleCheckedChange(r,e){this.internals.setFormValue?.(r?this.value:null),this.updateValidity(),r||!e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!1),!r||e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!0)}handleRequiredChange(){this.updateValidity()}handleValueChange(r){this.checked&&this.internals.setFormValue?.(r)}handleLabelChange(r){r||console.warn("[lmvz-radio] label prop is required and must not be empty")}lmvzChange;lmvzActivation;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}async getValidationMessage(){return this.internals?.validationMessage??""}constructor(r){super(),e(this,r),this.lmvzChange=o(this,"lmvzChange",7),this.lmvzActivation=o(this,"lmvzActivation",7),r.$hostElement$["s-ei"]?this.internals=r.$hostElement$["s-ei"]:(this.internals=r.$hostElement$.attachInternals(),r.$hostElement$["s-ei"]=this.internals),this.addController(new a(this,{reValidateOnPropChanges:!0})),this.radioGroupController=new n(this),this.addController(this.radioGroupController)}componentWillLoad(){this.initialChecked=this.checked,this.internals.setFormValue?.(this.checked?this.value:null),this.updateValidity(),super.componentWillLoad()}componentDidLoad(){this.updateValidity(),super.componentDidLoad()}formAssociatedCallback(){this.internals.setFormValue?.(this.checked?this.value:null)}formResetCallback(){this._handlingFormReset=!0;try{this.checked=this.initialChecked}finally{this._handlingFormReset=!1}this.updateValidity(),this.radioGroupController.refreshValidity()}formStateRestoreCallback(r){if("string"==typeof r){this._handlingFormReset=!0;try{this.checked=r===this.value}finally{this._handlingFormReset=!1}}}isAnyInGroupChecked(){return this.radioGroupController.isAnyChecked()}updateValidity(){!this.required||this.isAnyInGroupChecked()?(this.internals.setValidity?.({}),this.nativeError=!1):this.internals.setValidity?.({valueMissing:!0},"Please select an option.",this.nativeInput)}handleInvalid(){this.nativeError=!0}handleChange=r=>{this._handlingNativeChange=!0;try{this.checked=r.target.checked,this.lmvzChange.emit(this.checked),this.radioGroupController.select(this),this.lmvzActivation.emit()}finally{this._handlingNativeChange=!1}};handleKeydown(r){const{key:e}=r;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft","Home","End"].includes(e))return;r.preventDefault();const o=this.radioGroupController.sortedEnabled;if(0===o.length)return;const i=o.indexOf(this);if(-1===i)return;let t;t="ArrowDown"===e||"ArrowRight"===e?(i+1)%o.length:"ArrowUp"===e||"ArrowLeft"===e?(i-1+o.length)%o.length:"Home"===e?0:o.length-1;const a=o[t];a&&this.radioGroupController.setFocused(a)}retargetInnerClicks(){this.nativeInput?.click()}render(){return i(t,{key:"f1fdc1167c4e59c2524e1e545c3382ca32853788"},i("input",{key:"c1b711444475ed401766cc5827eeaec0c46b62cf",type:"radio",id:this.radioId,value:this.value,checked:this.checked,disabled:this.disabled,autoFocus:this.autofocus,"aria-required":this.required?"true":"false","aria-invalid":this.error?"true":void 0,"aria-describedby":this.helperId,ref:r=>this.nativeInput=r,onChange:this.handleChange}),i("span",{key:"b25e623269df05bdf8159e72da4df2e0bfb5d7bc",class:"circle","aria-hidden":"true"},this.checked&&i("span",{key:"93d12890c7ba0abe203c63953ea1115aee37d7a0",class:"dot"})),i("span",{key:"44dcfdc4e7ee3820624b0d02a438139f45bb8733",class:"content"},i("label",{key:"d0547cd5e79642b298da155c9937715224b52cae",htmlFor:this.radioId},this.label),i("span",{key:"a9df5dd8a775a2f7422d5bac296869f88553e33f",onClick:this.retargetInnerClicks.bind(this),"aria-live":"polite",class:"helper-text",id:this.helperId},this.helperText)))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}}};h.style="@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-radio-h { display: inline-block; --radio-circle-size: var(--lmvz-global-s18, 18px); --radio-dot-size: 0.5rem; --radio-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --radio-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --radio-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --radio-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-border-color-error: var(--lmvz-semantic-color-status-on-danger, #a31419); --radio-dot-color: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --radio-wrapper-bg-active: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --radio-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --radio-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --radio-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #545454); --radio-easing: var(--lmvz-global-easing-default, ease); --radio-duration: 0.2s; display: flex; align-items: center; gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-block: var(--lmvz-dimension-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: clip; cursor: pointer; background-color: transparent; position: relative; transition: background-color var(--radio-duration) var(--radio-easing); } input.sc-lmvz-radio { position: absolute; inset-block-start: var(--lmvz-dimension-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); inset-inline-start: var(--lmvz-dimension-10-4, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); opacity: 0; width: var(--radio-circle-size); height: var(--radio-circle-size); margin: 0; cursor: pointer; z-index: 1; } .circle.sc-lmvz-radio { width: var(--radio-circle-size); height: var(--radio-circle-size); border-radius: 50%; border: var(--lmvz-semantic-border-width-default, 1px) solid var(--radio-border-color); background-color: var(--radio-bg); pointer-events: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; transition: border-color var(--radio-duration) var(--radio-easing); } .dot.sc-lmvz-radio { width: var(--radio-dot-size); height: var(--radio-dot-size); border-radius: 50%; background-color: var(--radio-dot-color); } .content.sc-lmvz-radio { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; } label.sc-lmvz-radio { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--radio-label-color); cursor: pointer; transition: color var(--radio-duration) var(--radio-easing); } .helper-text.sc-lmvz-radio { display: block; font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--radio-helper-color); margin-block-start: 2px; } .helper-text.sc-lmvz-radio:empty { display: none; } @media (hover: hover) { .sc-lmvz-radio-h:hover .circle.sc-lmvz-radio { border-color: var(--radio-border-color-hover); } .sc-lmvz-radio-h:hover { background-color: var(--radio-wrapper-bg-hover); } } .sc-lmvz-radio-h:active { background-color: var(--radio-wrapper-bg-active); } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-checked); } [checked].sc-lmvz-radio-h label.sc-lmvz-radio { color: var(--radio-label-color-checked); } [error].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-error); } [error].sc-lmvz-radio-h .helper-text.sc-lmvz-radio { color: var(--lmvz-semantic-color-status-on-danger, #a31419); } [disabled].sc-lmvz-radio-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } @media (forced-colors: active) { .circle.sc-lmvz-radio { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: Highlight; } .dot.sc-lmvz-radio { background-color: ButtonText; } [checked].sc-lmvz-radio-h .dot.sc-lmvz-radio { background-color: HighlightText; } }.sc-lmvz-radio-h:has(: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))}@media (forced-colors: active){.sc-lmvz-radio-h:has(:focus-visible){outline-color:Highlight;box-shadow:none}}";export{h as lmvz_radio}
@@ -1 +1 @@
1
- import{r as e,c as a,h as t,H as s}from"./p-BOXP1Vx0.js";import{t as i}from"./p-DjvtQE7c.js";import{i as r}from"./p-BDonpCG8.js";import{c as o}from"./p-BSV3KDWl.js";import{i as n,w as l}from"./p-DsT_K3_I.js";import"./p-D06Ds9Dh.js";const c=i(n),m=i(l),d=i(o),v={neutral:c,warning:m},h=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","CAPTION","COLGROUP","DD","DETAILS","DIALOG","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","MENU","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TH","THEAD","TFOOT","TR","UL"]),f=class{constructor(t){e(this,t),this.lmvzDismiss=a(this,"lmvzDismiss",6),this.lmvzAction=a(this,"lmvzAction",6)}messageSlot;warnedTags=new Set;type="neutral";live="off";leadingIcon=!0;dismissible=!1;closeLabel="Schliessen";actionLabel;lmvzDismiss;lmvzAction;componentDidLoad(){this.checkSlotContent()}handleDismissClick=()=>{this.lmvzDismiss.emit()};handleActionClick=()=>{this.lmvzAction.emit()};handleSlotChange=()=>{this.checkSlotContent()};checkSlotContent(){if(!r())return;this.warnedTags.clear();const e=this.messageSlot?.assignedElements({flatten:!0})??[];for(const a of e){const e=a.tagName;h.has(e)&&!this.warnedTags.has(e)&&(console.warn(`[lmvz-message] Block-level element <${e.toLowerCase()}> is not allowed in the message slot. Only inline content is permitted.`),this.warnedTags.add(e))}}render(){return t(s,{key:"1c45cf27f057535ffff047548a3d6681dd487d3c",role:"assertive"===this.live?"alert":"polite"===this.live?"status":"note"},this.leadingIcon&&t("span",{key:"8efab69f677dfaa06d333aa304479e17e6d60ad6",class:"leading-icon","aria-hidden":"true",innerHTML:v[this.type]}),t("span",{key:"2e88e9053444e2aae23341b7cba923c7c440ff64",class:"message"},t("slot",{key:"d6b0ee6c95846a1de97e0e6ed707001c29c78c92",ref:e=>this.messageSlot=e,onSlotchange:this.handleSlotChange})),this.actionLabel&&t("lmvz-button",{key:"c55e38e274e98c8ac584ae16520fb0cab5e11d17",variant:"tertiary",scale:"small",onLmvzActivation:this.handleActionClick},this.actionLabel),this.dismissible&&t("lmvz-button",{key:"1ae69fefbb23cd8a219aee1d624e9d7779ae0c08",variant:"tertiary",scale:"small","aria-label":this.closeLabel,onClick:this.handleDismissClick},t("lmvz-icon",{key:"572c5b3309a1b1b9798dc6fc3f4ad11d0a354ebc","aria-hidden":"true",icon:d})))}};f.style=":host{display:flex;flex-direction:row;align-items:flex-start;width:100%;padding:var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)) var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));gap:var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));border:var(--lmvz-semantic-border-width-default, 1px) solid;border-radius:var(--lmvz-semantic-border-radius-md, 6px);font:var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)}:host([type='neutral']){background-color:var(--lmvz-semantic-color-status-active, #f6fbfe);border-color:var(--lmvz-semantic-color-status-on-active-subtle, #c1e6fa);color:var(--lmvz-semantic-color-status-on-active, #0e7ab4)}:host([type='warning']){background-color:var(--lmvz-semantic-color-status-warning, #ffeeb8);border-color:var(--lmvz-semantic-color-status-on-warning-subtle, #e6b000);color:var(--lmvz-semantic-color-status-on-warning, #614a00)}.leading-icon{flex-shrink:0;display:flex;align-items:flex-start;padding-top:2px;width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}.leading-icon svg{width:100%;height:100%}.message{flex:1}";export{f as lmvz_message}
1
+ import{r as e,c as a,h as t,H as s}from"./p-DVab4vzV.js";import{t as i}from"./p-DjvtQE7c.js";import{i as r}from"./p-BDonpCG8.js";import{c as o}from"./p-BSV3KDWl.js";import{i as n,w as l}from"./p-DsT_K3_I.js";import"./p-D06Ds9Dh.js";const c=i(n),m=i(l),d=i(o),v={neutral:c,warning:m},h=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","CAPTION","COLGROUP","DD","DETAILS","DIALOG","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","MENU","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TH","THEAD","TFOOT","TR","UL"]),f=class{constructor(t){e(this,t),this.lmvzDismiss=a(this,"lmvzDismiss",6),this.lmvzAction=a(this,"lmvzAction",6)}messageSlot;warnedTags=new Set;type="neutral";live="off";leadingIcon=!0;dismissible=!1;closeLabel="Schliessen";actionLabel;lmvzDismiss;lmvzAction;componentDidLoad(){this.checkSlotContent()}handleDismissClick=()=>{this.lmvzDismiss.emit()};handleActionClick=()=>{this.lmvzAction.emit()};handleSlotChange=()=>{this.checkSlotContent()};checkSlotContent(){if(!r())return;this.warnedTags.clear();const e=this.messageSlot?.assignedElements({flatten:!0})??[];for(const a of e){const e=a.tagName;h.has(e)&&!this.warnedTags.has(e)&&(console.warn(`[lmvz-message] Block-level element <${e.toLowerCase()}> is not allowed in the message slot. Only inline content is permitted.`),this.warnedTags.add(e))}}render(){return t(s,{key:"1c45cf27f057535ffff047548a3d6681dd487d3c",role:"assertive"===this.live?"alert":"polite"===this.live?"status":"note"},this.leadingIcon&&t("span",{key:"8efab69f677dfaa06d333aa304479e17e6d60ad6",class:"leading-icon","aria-hidden":"true",innerHTML:v[this.type]}),t("span",{key:"2e88e9053444e2aae23341b7cba923c7c440ff64",class:"message"},t("slot",{key:"d6b0ee6c95846a1de97e0e6ed707001c29c78c92",ref:e=>this.messageSlot=e,onSlotchange:this.handleSlotChange})),this.actionLabel&&t("lmvz-button",{key:"c55e38e274e98c8ac584ae16520fb0cab5e11d17",variant:"tertiary",scale:"small",onLmvzActivation:this.handleActionClick},this.actionLabel),this.dismissible&&t("lmvz-button",{key:"1ae69fefbb23cd8a219aee1d624e9d7779ae0c08",variant:"tertiary",scale:"small","aria-label":this.closeLabel,onClick:this.handleDismissClick},t("lmvz-icon",{key:"572c5b3309a1b1b9798dc6fc3f4ad11d0a354ebc","aria-hidden":"true",icon:d})))}};f.style=":host{display:flex;flex-direction:row;align-items:flex-start;width:100%;padding:var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)) var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));gap:var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));border:var(--lmvz-semantic-border-width-default, 1px) solid;border-radius:var(--lmvz-semantic-border-radius-md, 6px);font:var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)}:host([type='neutral']){background-color:var(--lmvz-semantic-color-status-active, #f6fbfe);border-color:var(--lmvz-semantic-color-status-on-active-subtle, #7fccf5);color:var(--lmvz-semantic-color-status-on-active, #0e7ab4)}:host([type='warning']){background-color:var(--lmvz-semantic-color-status-warning, #ffeeb8);border-color:var(--lmvz-semantic-color-status-on-warning-subtle, #e6b000);color:var(--lmvz-semantic-color-status-on-warning, #614a00)}.leading-icon{flex-shrink:0;display:flex;align-items:flex-start;padding-top:2px;width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}.leading-icon svg{width:100%;height:100%}.message{flex:1}";export{f as lmvz_message}
@@ -1 +1 @@
1
- import{r as t,c as n,g as e,h as r,f as o,H as i}from"./p-BOXP1Vx0.js";import{t as a}from"./p-DjvtQE7c.js";import"./p-D06Ds9Dh.js";const s=(t,n)=>`Invalid ${t}: ${n}`;function c(t,n="number"){if("bigint"==typeof t)throw new TypeError((t=>`Cannot convert bigint to ${t}`)(n));if(t=Number(t),!Number.isFinite(t))throw new RangeError(((t,n)=>`Non-finite ${t}: ${n}`)(n,t));return t}function u(t,n){return Math.trunc(c(t,n))||0}function d(t,n){return function(t,n="number"){if(t<=0)throw new RangeError(((t,n)=>`Non-positive ${t}: ${n}`)(n,t));return t}(u(t,n),n)}function l(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function f(t){if(!l(t))throw new TypeError("Invalid object");return t}const h=s,m=t=>`Missing ${t}`,v=t=>"Missing year"+(t?"/era/eraYear":""),y="Invalid leap month",p="Out-of-bounds date",g=t=>`Invalid substring: ${t}`,b=function(t,n,e){return Math.min(Math.max(t,n),e)};function I(t){throw new RangeError(t)}function M(t){throw new TypeError(t)}function w(t,n,e,r,o){return z(n,((t,n)=>{const e=t[n];return void 0===e&&M(m(n)),e})(t,n),e,r,o)}function z(t,n,e,r,o){const i=b(n,e,r);return o&&n!==i&&I(((t,n,e,r)=>((t,n,e,r)=>s(t,n)+`; must be between ${e}-${r}`)(t,n,e,r))(t,n,e,r)),i}function C(t,n=Map){const e=new n;return(n,...r)=>{if(e.has(n))return e.get(n);const o=t(n,...r);return e.set(n,o),o}}function k(t,n){const e={};for(const r in n)e[r]=t(n[r],r);return e}function x(t,n){const e={};for(const r of t)e[r]=n;return e}function D(t,n,e=Object.create(null)){for(const r of t)e[r]=n[r];return e}function N(t,...n){return(...e)=>t(...n,...e)}function S(){}function j(t){return t[0].toUpperCase()+t.substring(1)}function R(...t){return[].concat(...t).sort()}function B(t){return new RegExp(`^${t}$`,"i")}function O(t){return parseInt(t.padEnd(9,"0"))}function A(t){return t&&"+"!==t?-1:1}function Z(t){return void 0===t?0:parseInt(t)}function H(t,n){return String(n).padStart(t,"0")}const P=N(H,2);function E(t,n){return Math.sign(t-n)}function L(t,n){const e=function(t,n){const e=t/n;return t%n<0n?e-1n:e}(t,n);return[e,t-e*n]}function Y(t,n){return[Math.floor(t/n),$(t,n)]}function $(t,n){return(t%n+n)%n}function T(t,n){return Math.trunc(t/n)||0}const U="iso8601",V="gregory",W={bce:-1,ce:0};function G(t){const n=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return"bc"===n||"b"===n?"bce":"ad"===n||"a"===n?"ce":n}const J=void 0;function F(t){return t===J?"iso8601":0===t?"gregory":t.id}const K=/^M(\d{2})(L?)$/;function Q(t){const n=K.exec(t);return n||I((t=>`Invalid monthCode: ${t}`)(t)),[parseInt(n[1]),Boolean(n[2])]}function X(t,n,e){return t+(n||e&&t>=e?1:0)}const q=Object.keys({nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9}),_=1e3,tt=1e6,nt=1e9,et=6e10,rt=36e11,ot=864e11,it=BigInt(_),at=BigInt(tt),st=BigInt(nt),ct=BigInt(et),ut=BigInt(rt),dt=BigInt(ot),lt=q.slice(0,6),ft=["year"],ht=["day"],mt=["day","month","year"],vt=["era","eraYear"],yt=["era","eraYear","year"],pt=["month","monthCode"],gt=["day","month","monthCode"],bt=R(pt,ft),It=R(["monthCode"],ft),Mt=R(vt,It),wt=R(ht,bt),zt=R(ht,vt,bt),Ct=R(ht,It),kt=R(ht,vt,It);function xt(t){return function(t){const n={};for(const e of lt)n[e]=z(e,t[e],0,Dt[e]||999,1)}(t),t}const Dt={hour:23,minute:59,second:59};function Nt(t){return St(t)*nt+jt(t)}function St(t){return 3600*t.hour+60*t.minute+t.second}function jt(t){return t.millisecond*tt+t.microsecond*_+t.nanosecond}function Rt(t){const[n,e]=Y(t,ot);return[Bt(e),n]}function Bt(t){const[n,e]=Y(t,tt),[r,o]=Y(e,_);return function(t,n=0,e=0){const[r,o]=Y(t,36e5),[i,a]=Y(o,6e4),[s,c]=Y(a,1e3);return{hour:r,minute:i,second:s,millisecond:c,microsecond:n,nanosecond:e}}(n,r,o)}function Ot(t){const[n,e]=L(t,st);return[Number(n),Number(e)]}function At(t){return BigInt(Zt(t))*dt}function Zt(t){return Ht(t.year,t.month,t.day)}function Ht(t,n=1,e=1){const r=n-1;return t+=Math.floor(r/12),n=$(r,12),Date.UTC(t%400-400,n,0)/864e5+146097*(T(t,400)+1)+e}function Pt(t){const n=new Date(864e5*$(t,146097));return{year:n.getUTCFullYear()+400*Math.floor(t/146097),month:n.getUTCMonth()+1,day:n.getUTCDate()}}function Et(t,n){switch(n){case 2:return Lt(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Lt(t){return t%4==0&&(t%100!=0||t%400==0)}function Yt(t){return $(Ht(t.year,t.month,t.day)+4,7)||7}function $t(t){return Ht(t.year,t.month,t.day)-Ht(t.year)+1}function Tt(t){let n=t.year,e=Math.floor(($t(t)-Yt(t)+10)/7),r=Ut(n);return e<1?e=r=Ut(--n):e>r&&(e=1,r=Ut(++n)),{weekOfYear:e,yearOfWeek:n,Ie:r}}function Ut(t){const n=Yt({year:t,month:1,day:1});return 4===n||3===n&&Lt(t)?53:52}function Vt(t){return function(t){const{year:n}=t,e=w(t,"month",1,12,1);w(t,"day",1,Et(n,e),1)}(t),t}function Wt(t,n){return t?t.ie(n):n}function Gt(t,n,e){return t?t.O(n,e):function(t){return[t,0]}(e)}function Jt(t,n){return 0===t?function({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}(n):t?t.h(n):{}}function Ft(t,n,e,r){return t?t.je(n,e,r):function(t,n,e){return{year:t,month:n,day:e}}(n,e,r)}function Kt(t,n){return t?t.k(n):12}function Qt(t,n,e){return t?t.p(n,e):Et(n,e)}function Xt(t,n){const{year:e,month:r}=Wt(t,n),[o,i]=Gt(t,e,r);return function(t,n){return"M"+P(t)+(n?"L":"")}(o,i)}function qt(t,n){const{year:e}=Wt(t,n);return t?t.u(e):Lt(e)}function _t(t,n){const{year:e}=Wt(t,n);return Kt(t,e)}function tn(t,n){const{year:e,month:r}=Wt(t,n);return Qt(t,e,r)}function nn(t,n){const{year:e}=Wt(t,n);return t?t.j(e):function(t){return Lt(t)?366:365}(e)}const en=q.map((t=>t+"s")),rn=en.slice(6).slice(1),on=x(en,0),an=N(sn,"string");function sn(t,n,e=t){return typeof n!==t&&M(h(e,n)),n}function cn(t,n){return function(t,n="number"){return Number.isInteger(t)||I(((t,n)=>`Non-integer ${t}: ${n}`)(n,t)),t||0}(c(t,n),n)}const un={auto:0,never:1,critical:2,always:3};function dn(t,n,e,r=0){const o=e[t];if(void 0===o)return r;const i=("symbol"==typeof(a=o)&&M("Cannot convert Symbol to string"),String(a));var a;const c=n[i];return void 0===c&&I((u=n,s(t,i)+"; must be "+Object.keys(u).join())),c;var u}const ln=N(dn,"overflow",{constrain:0,reject:1}),fn=N(dn,"calendarName",un);function hn(t){return void 0===t?0:ln(f(t))}const mn=BigInt(1e8)*dt,vn=BigInt(-1e8)*dt,yn=vn-dt,pn=-3261848;function gn(t){const n=12*t.year+t.month;return(n<pn||n>3309129)&&I(p),t}function bn(t,n=1){return In(At(t),n),t}function In(t,n=1){(t<(n?yn:vn)||t>mn)&&I(p)}function Mn(t){return(t<vn||t>mn)&&I(p),t}function wn(t,n){return Mn(At(t)+BigInt(Nt(t)-n))}function zn(t,n){return D(mt,t,{calendar:n})}function Cn(t,n){return kn(n,1-Wt(t,n).day)}function kn(t,n){return n?Pt(Zt(t)+n):t}function xn(t,n,e,r,o){const i=Wt(t,n);let{year:a,month:s,day:c}=i;if(e){const[n,r]=Gt(t,a,s);a+=e,s=function(t,n,e,r,o){if(e){const e=t?t.m:void 0;return void 0!==r&&(e<0||r===n+1)?r:(1===o&&I(y),e<0?-e:n)}return X(n,0,r)}(t,n,r,t?t.q(a):void 0,o),s=z("month",s,1,Kt(t,a),o)}if(r){const n=t?t.N(a,s,r):function(t,n,e){return t+=T(e,12),(n+=e%12||0)<1?(t--,n+=12):n>12&&(t++,n-=12),{year:t,month:n}}(a,s,r);({year:a,month:s}=n)}return c=z("day",c,1,Qt(t,a,s),o),Ft(t,a,s,c)}function Dn(t,n=en){let e=0;for(const r of n){const n=Math.sign(t[r]);n&&(e&&e!==n&&I("Cannot mix duration signs"),e=n)}return e}function Nn(t){return BigInt(t.hours)*ut+BigInt(t.minutes)*ct+function(t){return BigInt(t.seconds)*st+BigInt(t.milliseconds)*at+BigInt(t.microseconds)*it+BigInt(t.nanoseconds)}(t)}function Sn(t,n){return E(Zt(t),Zt(n))}function jn(t){return 0===t?W:t?t.l:void 0}function Rn(t,n,e=n){return jn(t)?e:n}function Bn(t,n){const e=t||void 0,r=jn(t);let{era:o,eraYear:i,year:a}=n;if(void 0!==a&&(a=u(a,"year")),void 0!==i&&(i=u(i,"eraYear")),void 0!==o||void 0!==i){void 0!==o&&void 0!==i||M("Mismatching era/eraYear"),r||I("Forbidden era/eraYear");const t=G(o),n=r[t];void 0===n&&I((t=>`Invalid era: ${t}`)(o));const s=e?.te?e.te(i,t,n):function(t,n){return(n+t)*(Math.sign(n)||1)||0}(i,n);void 0!==a&&a!==s&&I("Mismatching year/eraYear"),a=s}else void 0===a&&M(v(r));return a}function On(t,n,e,r,o){let{month:i,monthCode:a}=n;if(void 0!==a){const n=((t,n,e,r,o=Q(n))=>{const i=t?t.q(e):void 0,[a,s]=o;let c=X(a,s,i);if(s){const n=t?t.m:void 0;void 0===n&&I(y),n>0?(c>n&&I(y),i!==c&&(1===r&&I(y),c=X(a,0,i))):(c!==-n&&I(y),void 0===i&&1===r&&I(y))}return c})(t,a,e,r,o);void 0!==i&&i!==n&&I("Mismatching month/monthCode"),i=n,r=1}else void 0===i&&M("Missing month/monthCode");return z("month",i,1,Kt(t,e),r)}const An=B("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?"),Zn={era:function(t,n){return l(t)?String(t):an(t,n)},month:d,monthCode:(t,n="monthCode")=>((t,n)=>{if("string"==typeof t)return t;if(t&&"object"==typeof t){const e=t.toString;if("function"==typeof e)return an(e.call(t),n)}return an(t,n)})(t,n),day:d};function Hn(t,n,e,r,o=!r){const i={};let a=0;for(const o of n){let n=t[o];if(void 0!==n){a=1;const t=e[o];t&&(n=t(n,o)),i[o]=n}else r&&r.includes(o)&&M(m(o))}return o&&!a&&M("No valid fields: "+n.join()),i}function Pn(t,n,e){return function(t,n,e,r){const o=e[1],i=On(t,n,o,r,e[0]);return zn(bn(Ft(t,o,i,function(t,n,e,r,o){return w(n,"day",1,Qt(t,r,e),o)}(t,n,i,o,r))),t)}(t,n,function(t,n){const e=jn(t);return void 0!==n.year||void 0!==n.era&&void 0!==n.eraYear||M(v(e)),void 0===n.monthCode&&void 0===n.month&&M("Missing month/monthCode"),void 0===n.day&&M(m("day")),[En(n),Bn(t,n)]}(t,n),hn(e))}function En(t){if(void 0!==t.monthCode)return Q(t.monthCode)}const Ln=Intl.DateTimeFormat,Yn={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},$n=-388152e4;function Tn(t){return fn(function(t){return void 0===t?Object.create(null):f(t)}(t))}function Un(t){return Vn(t)+"-"+P(t.day)}function Vn(t){const{year:n}=t;return(n<0||n>9999?Fn(n)+H(6,Math.abs(n)):H(4,n))+"-"+P(t.month)}function Wn(t,n=0){if(1===n)return"";const[e,r]=Y(Math.abs(t),rt),[o,i]=Y(r,et),[a,s]=Y(i,nt);return Fn(t)+P(e)+":"+P(o)+(a||s?":"+P(a)+function(t){let n=H(9,t);return n=n.replace(Jn,""),n?"."+n:""}(s):"")}function Gn(t,n){return"["+(n?"!":"")+"u-ca="+t+"]"}const Jn=/0+$/;function Fn(t){return t<0?"-":"+"}const Kn=/^(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$/,Qn=/[^\w\/:+-]+/;function Xn(t){const n=t.toUpperCase(),e=(t=>{const n=function(t){const n=An.exec(t);if(n&&(t=>(t=>{"T"!==t[0]&&"t"!==t[0]||(t=t.slice(1));const n=t.search(/[.,]/),e=n<0?t:t.slice(0,n),r=e.split(":");return 1===r.length?/^(?:\d{2}|\d{4}|\d{6})$/i.test(e):(2===r.length||3===r.length)&&r.every((t=>2===t.length&&/^\d{2}$/i.test(t)))})(t.slice(1)))(n[0]))return(t=>{const n=t[4]||t[5];return n&&I(g(n)),e=(Z(t[2])*rt+Z(t[3])*et+Z(t[4])*nt+O(t[5]||""))*A(t[1]),Math.abs(e)>=ot&&I("Out-of-bounds offset"),e;var e})(n)}(t);if(void 0!==n)return{id:Wn(n),_:n,o:n}})(n);if(e)return{kind:"fixed",...e};const r="UTC"===n?"UTC":(t=>(Qn.test(t)&&I(s("TimeZone",t)),Kn.test(t)&&I("Forbidden ICU TimeZone"),t.toLowerCase().split("/").map(((t,n)=>(t.length<=3||/\d/.test(t))&&!/etc|yap/.test(t)?t.toUpperCase():t.replace(/baja|dumont|[a-z]+/g,((t,e)=>t.length<=2&&!n||"in"===t||"chat"===t?t.toUpperCase():t.length>2||!e?j(t).replace(/island|noronha|murdo|rivadavia|urville/,j):t)))).join("/")))(t);return qn(r)}const qn=C((t=>{if("UTC"===t)return{kind:"utc",id:t,o:t};const n=t.toUpperCase(),e=_n(n);return{kind:"named",id:t,format:e,o:e.resolvedOptions().timeZone}})),_n=C((t=>new Ln("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}))),te=C(((t,n)=>"named"===n.kind?new ee(t,n.o,n.format):new ne(t,n.o,"fixed"===n.kind?n._:0)));class ne{constructor(t,n,e){this.id=t,this.o=n,this._=e}C(){return this._}R(t){return[wn(t,this._)]}U(){}}class ee{constructor(t,n,e){this.id=t,this.o=n,this.qe=((t,n)=>{const e=C(t),r=C(oe),o=86400*n;function i(t){const[n,i]=ie(t,o),s=ae(n),c=ae(i),u=e(s),d=e(c);return u===d?u:a(r(s,c),u,d,t)}function a(n,e,r,o){let i,a;for(;(void 0===o||void 0===(i=o<n[0]?e:o>=n[1]?r:void 0))&&(a=n[1]-n[0]);){const e=n[0]+Math.floor(a/2);t(e)===r?n[1]=e:n[0]=e+1}return i}return{Ee(t){const n=i(t-86400),e=i(t+86400),r=t-n,o=t-e;if(n===e)return[r];const a=i(r);return a===i(o)?[t-a]:n>e?[r,o]:[]},De:i,U:function t(n,i){if(i>0&&n>=864e10)return;if(i<0){if(n<=$n)return;const e=re()+94867200;if(n>e)return t(e,-1)}const s=i>0?Math.max(n,$n):n;let[c,u]=ie(s,o);const d=o*i,l=i>0?Math.max(n,re())+94867200:$n;for(;i<0?u>l:c<l;){const t=ae(c),o=ae(u),s=e(t),l=e(o);if(s!==l){const e=r(t,o);a(e,s,l);const c=e[0];if((E(c,n)||1)===i)return c}c+=d,u+=d}}}})((t=>n=>{const e=function(t,n){n<-864e13&&I(p);const e=t.formatToParts(n),r={};for(const t of e)r[t.type]=t.value;return r}(t,1e3*n);return 86400*Ht((t=>{const n=t.relatedYear;if(void 0!==n)return parseInt(n);const e=parseInt(t.year);return void 0!==t.era&&"bce"===G(t.era)?1-e:e})(e),parseInt(e.month),parseInt(e.day))+3600*parseInt(e.hour)+60*parseInt(e.minute)+parseInt(e.second)-n})(e),(t=>{const n=t.split("/").pop();return Yn[n]||60})(t))}C(t){return this.qe.De((t=>Ot(t)[0])(t))*nt}R(t){const n=86400*Zt(t)+St(t),e=jt(t);return this.qe.Ee(n).map((t=>Mn(BigInt(t)*st+BigInt(e))))}U(t,n){const[e,r]=Ot(t),o=this.qe.U(e+(n>0||r?1:0),n);if(void 0!==o)return BigInt(o)*st}}function re(){return Math.floor(Date.now()/1e3)}function oe(t,n){return[t,n]}function ie(t,n){const e=Math.floor(t/n)*n;return[e,e+n]}function ae(t){return b(t,-1e10,864e10)}function se(t){const n=function(t){const n=me.exec(t);return n?(t=>{const n=t[12],e="Z"===(n||"").toUpperCase();return{year:pe(t),month:parseInt(t[5]),day:parseInt(t[6]),...ye(t,7),...ge(t[19]),fe:Boolean(t[7]),F:e,offset:e?void 0:n}})(n):void 0}(t);return n&&!n.F||function(t){I((t=>`Cannot parse: ${t}`)(t))}(t),n}function ce(t,n,e){return n&&"iso8601"===t.calendarId?(Vt(t),t.fe&&xt(t),de(n(t),e)):t.fe?function(t,n){return Vt(o=t),xt(o),function(t){const n=At(t);In(n),n!==yn||Nt(t)||I(p)}(t),{...(e=t,r=t,D(mt,e,D(lt,r))),calendar:n(t.calendarId)};var e,r,o}(t,e):de(t,e)}function ue(t){const n=12*t.year+t.month===pn?20:1;return{...t,day:n}}function de(t,n){return Vt(t),bn(t),{calendar:n(t.calendarId),year:t.year,month:t.month,day:t.day}}function le(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}const fe="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+le(8)+"(Z|([+-])"+le(15)+")?)?",he=B("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),me=B(fe+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),ve=new RegExp("\\[(!?)([^\\]]*)\\]","g");function ye(t,n){const e=Z(t[n+3]);return{...Rt(O(t[n+4]||""))[0],hour:Z(t[n]),minute:Z(t[n+2]),second:60===e?59:e}}function pe(t){const n=A(t[1]),e=parseInt(t[2]||t[3]);return n<0&&!e&&I(g(-0)),n*e}function ge(t){let n,e;const r=[];return t.replace(ve,((t,o,i)=>{const a=Boolean(o),[s,c]=i.split("=").reverse();return c?"u-ca"===c?(r.push(s.toLowerCase()),n||(n=a)):(a||/[A-Z]/.test(c))&&I(g(t)):(e&&I(g(t)),e=s),""})),r.length>1&&n&&I(g(t)),{timeZoneId:e,calendarId:r[0]||"iso8601"}}function be(t,n,e,r){let o=0;const i=[];for(const t of e)void 0!==n[t]?o=1:i.push(t);if(Object.assign(t,n),o)for(const n of r||i)delete t[n]}function Ie(t,n,e,r,o){const i=new Set(t),a=new Set(n),s=new Set(e);return(t,n)=>{const e=((t,n,e,r)=>{const o={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(const i of Object.keys(t)){const a=t[i];void 0===a||r.has(i)||(n.has(i)?"dateStyle"===i?o.dateStyle=a:"timeStyle"===i?o.timeStyle=a:o.me[i]=a:"era"===i?o.pe[i]=a:e.has(i)?"dateStyle"===i||"timeStyle"===i?o.ue=1:o.oe=1:o.xe[i]=a)}return o})(t,i,a,s),c=void 0!==e.dateStyle,u=void 0!==e.timeStyle,d=c||u,l=Object.keys(e.me).length>0,f=e.oe||e.ue,h=l||c||u,m=Object.keys(e.pe).length>0;(!n&&f||n&&f&&!h||d&&(l||m||e.oe))&&M("Invalid formatting options");const v={};return d||h||Object.assign(v,r),Object.assign(v,e.me,e.pe,e.xe),c&&(o?Object.assign(v,o[e.dateStyle]):v.dateStyle=e.dateStyle),u&&(v.timeStyle=e.timeStyle),v}}const Me=Ie(["weekday","year","month","day","dateStyle"],["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],["timeZoneName"],{year:"numeric",month:"numeric",day:"numeric"});function we(t,n,e,...r){var o;Object.defineProperties(n,k((t=>({value:t,configurable:1,writable:!1})),{name:t})),Object.defineProperties(n.prototype,(o="Temporal."+t,{[Symbol.toStringTag]:{value:o,configurable:1}}));for(const t of r)ze(n.prototype,e,t);return n}function ze(t,n,e){Object.defineProperties(t,k((t=>({get(){return t(n(this))},configurable:1})),e))}const Ce="noop"===S.name?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:S;function ke(){M("Invalid calling context")}function xe(){M("Cannot use valueOf")}const De={era:t=>Jt(t.calendar,t).era,eraYear:t=>Jt(t.calendar,t).eraYear,year:t=>Wt(t.calendar,t).year,month:t=>Wt(t.calendar,t).month,monthCode:t=>Xt(t.calendar,t)},Ne={era:t=>Jt(t.calendar,t).era,eraYear:t=>Jt(t.calendar,t).eraYear,year:t=>Wt(t.calendar,t).year,month:t=>Wt(t.calendar,t).month,monthCode:t=>Xt(t.calendar,t),day:t=>Wt(t.calendar,t).day},Se={daysInMonth:t=>tn(t.calendar,t),daysInYear:t=>nn(t.calendar,t),monthsInYear:t=>_t(t.calendar,t),inLeapYear:t=>qt(t.calendar,t)},je={dayOfWeek:t=>Yt(t),dayOfYear:t=>function(t,n){if(!t)return $t(n);const{year:e}=Wt(t,n),r=Ft(t,e,1,1);return Zt(n)-Zt(r)+1}(t.calendar,t),weekOfYear:t=>t.calendar===J?Tt(t).weekOfYear:void 0,yearOfWeek:t=>t.calendar===J?Tt(t).yearOfWeek:void 0,daysInWeek:()=>7,daysInMonth:t=>tn(t.calendar,t),daysInYear:t=>nn(t.calendar,t),monthsInYear:t=>_t(t.calendar,t),inLeapYear:t=>qt(t.calendar,t)};function Re(t){return function(t){const n={};for(const e of t)n[e]=t=>t[e];return n}(Object.keys(t))}const Be=Re(De),Oe=Re(Ne);Re(Se),Re(je);const Ae="PlainYearMonthRecord",Ze="PlainDateRecord",He=new WeakMap,Pe=new WeakMap,Ee=new WeakMap;function Le(t){return function(t){return He.get(t)}(t)||ke()}function Ye(t){return function(t){return Pe.get(t)}(t)||ke()}function $e(t,n){Pe.set(t,n)}function Te(t){return Ue(t)||ke()}function Ue(t){return Ee.get(t)}function Ve(t,n){Ee.set(t,n)}const We=we("CalendarRecord",class{toJSON(){return Je(this)}valueOf(){return Je(this)}});function Ge(t,n){const e=Object.create(We.prototype);return((t,n)=>{He.set(t,n)})(e,{id:t,Be:n}),Ce(e),e}function Je(t){return Le(t).id}function Fe(t){const n=Le(t).Be;return n||I(`Unknown calendar ${Je(t)}; might need getExotic or getAny`),n}const Ke=Ge(U,(()=>J)),Qe=Ge(V,(()=>0));function Xe(t){const n=an(t).toLowerCase();return n===U?Ke:n===V?Qe:qe(t)}const qe=C(Ge),_e=globalThis.Temporal;function tr(t,n){nr(n(t))}function nr(t){return Fe(t),Je(t)}const er=Te,rr=we(Ae,class{get calendarId(){return er(this).calendarId}toJSON(){return er(this).toJSON()}valueOf(){return er(this).valueOf()}},er,Be);function or(t){const n=Object.create(rr.prototype);return Ve(n,t),Ce(n),n}const ir=Ye,ar=we(Ze,class{get calendarId(){return ir(this).calendarId}toJSON(){return ir(this).toJSON()}valueOf(){return ir(this).valueOf()}},ir,Oe);function sr(t){const n=Object.create(ar.prototype);return $e(n,t),Ce(n),n}function cr(t){return n=>ur(t(n.toLowerCase()))}function ur(t){return Fe(t)()}const dr=Te,lr=we(Ae,class{get calendarId(){return F(dr(this).calendar)}toJSON(){return function(t){const n=t.calendar;return n!==J?Un(t)+Gn(F(n),0):Vn(t)}(dr(this))}valueOf(){return xe()}},dr,De);function fr(t){const n=Object.create(lr.prototype);return Ve(n,t),Ce(n),n}const hr=Ye,mr=we(Ze,class{get calendarId(){return F(hr(this).calendar)}toJSON(){return Un(t=hr(this))+(t.calendar===J?"":Gn(F(t.calendar),0));var t}valueOf(){return xe()}},hr,Ne);function vr(t){const n=Object.create(mr.prototype);return $e(n,t),Ce(n),n}function yr(t){return bn(t),vr(zn(t,t.calendar))}const pr=_e?function(t){return sr(_e.Now.plainDateISO(t))}:function(t=function(){return(new Ln).resolvedOptions().timeZone}()){return vr(zn(function(t){const n=BigInt(Date.now())*at,e=t.C(n);return function(t){const[n,e]=L(t,dt);return{...Pt(Number(n)),...Bt(Number(e))}}(n+BigInt(e))}(function(t){const n=Xn(t);return te(n.id,n)}(function(t){return Xn(t).id}(an(t))))))},gr=_e?function(t,n){const e=function(t){if(void 0!==t)return nr(t)}(t.calendar);return sr(_e.PlainDate.from({...t,calendar:e},n))}:function(t,n){var e;return vr(function(t,n,e,r=[]){return Pn(t,Hn(n,Rn(t,wt,zt),Zn,r),e)}(void 0===(e=t.calendar)?J:ur(e),t,n))},br=_e?function(t,n){const e=_e.PlainDate.from(t);return tr(e.calendarId,n),sr(e)}:function(t,n){return vr(function(t,n){const e=ce(se(an(t)),void 0,n);return zn(e,e.calendar)}(t,cr(n)))},Ir=_e?function(t){return ir(t).dayOfWeek}:function(t){return Yt(hr(t))},Mr=_e?function(t,n){const e=ir(t),r=ir(n);return _e.PlainDate.compare(e,r)}:function(t,n){return Sn(hr(t),hr(n))},wr=_e?function(t,n,e){return ir(t).toLocaleString(n,e)}:function(t,n,e={}){const r=hr(t),o=new Ln(n,function(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}(Me(e)));return function(t,n){const e=t.resolvedOptions().calendar;n.calendar===J||F(n.calendar)===e||I("Mismatching Calendars")}(o,r),o.format(864e5*Zt(r))},zr=_e?function(t,n){return ir(t).toString(n)}:function(t,n){return function(t,n){return e=t.calendar,r=t,o=Tn(n),Un(r)+function(t,n){return n>1||0===n&&t!==J?Gn(F(t),2===n):""}(e,o);var e,r,o}(hr(t),n)},Cr=_e?function(t){return or(ir(t).toPlainYearMonth())}:function(t){const n=hr(t),e=Wt(n.calendar,n);return fr(function(t,n){const e=jn(t);void 0!==n.year||void 0!==n.era&&void 0!==n.eraYear||M(v(e)),void 0===n.monthCode&&void 0===n.month&&M("Missing month/monthCode");const r=En(n),o=Bn(t,n);return zn(gn(Ft(t,o,On(t,n,o,hn(void 0),r),1)),t)}(n.calendar,{year:e.year,monthCode:Xt(n.calendar,n)}))},kr=_e?function(t,n,e){return sr(ir(t).add({years:n},e))}:function(t,n,e){const r=hr(t);return yr(zn(function(t,n,e,r){const o=hn(r);return e?xn(t,n,cn(e),0,o):n}(r.calendar,r,n,e),r.calendar))},xr=_e?function(t,n,e){return sr(ir(t).add({months:n},e))}:function(t,n,e){const r=hr(t);return yr(zn(function(t,n,e,r){const o=hn(r);return e?xn(t,n,0,cn(e),o):n}(r.calendar,r,n,e),r.calendar))},Dr=_e?function(t,n){return sr(ir(t).add({days:n}))}:function(t,n){const e=hr(t);return yr(zn(function(t,n,e){return kn(n,cn(e))}(0,e,n),e.calendar))},Nr=_e?function(t,n){const e=_e.PlainYearMonth.from(t);return tr(e.calendarId,n),or(e)}:function(t,n){return fr(function(t,n){const e=function(t){const n=he.exec(t);if(n)return(t=>({year:pe(t),month:parseInt(t[4]),day:1,...ge(t[5])}))(n)}(an(t));if(e)return function(t){"iso8601"!==t.calendarId&&I(g(t.calendarId))}(e),zn(gn(Vt(e)),n(e.calendarId));const r=ce(se(t),ue,n),{calendar:o}=r;return zn(Cn(o,r),o)}(t,cr(n)))},Sr=_e?function(t){return er(t).daysInMonth}:function(t){const n=dr(t);return tn(n.calendar,n)},jr=_e?function(t,n){const e=er(t),r=er(n);return _e.PlainYearMonth.compare(e,r)}:function(t,n){return Sn(dr(t),dr(n))},Rr=_e?function(t,n){return er(t).toString(n)}:function(t,n){return function(t,n){return function(t,n,e,r){const o=r>1||0===r&&t!==J;return 1===r?t===J?n(e):Un(e):o?Un(e)+Gn(F(t),2===r):n(e)}(t.calendar,Vn,t,Tn(n))}(dr(t),n)},Br=_e?function(t,n){return sr(er(t).toPlainDate(n))}:function(t,n){return vr((e=dr(t).calendar,r=t,o=n,function(t,n,e){const r=Rn(t,Ct,kt);let o=function(t,n,e){const r=Object.assign(Object.create(null),n);return be(r,e,pt),jn(t)&&(be(r,e,yt),t&&t.le&&be(r,e,gt,vt)),r}(t,n,e);return o=Hn(o,r,Zn,[]),Pn(t,o)}(e,D(Rn(e,It,Mt),r),Hn(f(o),ht,Zn,[]))));var e,r,o},Or=_e?function(t,n,e){return or(er(t).add({months:n},e))}:function(t,n,e){const r=dr(t);return fr(zn(function(t,n,e,r,o){const i=hn(o);r.sign&&function(t){let n=9;for(;n>0&&!t[en[n]];n--);return n}(r)<8&&I("Cannot use small units");const a=bn(Cn(n,e));return Cn(n,function(t,n,e,r){let o,{years:i,months:a,weeks:s,days:c}=e;if(c+=Number(Nn(e)/dt),i||a)o=xn(t,n,i,a,r);else{if(!s&&!c)return n;o=n}return(s||c)&&(o=kn(o,7*s+c)),bn(o)}(n,a,r,i))}(0,r.calendar,r,(o=function(t){for(const n of rn)z(n,t[n],-4294967295,4294967295,1);const n=function(t){return BigInt(t.days)*dt+Nn(t)}(t);return e=Number(n/st),Number.isSafeInteger(e)||I("Out-of-bounds duration"),t;var e}({...on,months:cn(n)}),D(en,o,{sign:Dn(o)})),e),r.calendar));var o};function Ar(t,n=br){if(t)try{return n(t,Xe)}catch{return}}function Zr(t){return zr(t)}function Hr(t){return Ue(t)?Rr(t):Zr(t).slice(0,7)}function Pr(t,n,e){return!!(n&&Mr(t,n)<0)||!!(e&&Mr(t,e)>0)}const Er={de:{prev:"Vorheriger Monat",next:"Nächster Monat"},"de-CH":{prev:"Vorheriger Monat",next:"Nächster Monat"},"de-AT":{prev:"Vorheriger Monat",next:"Nächster Monat"},"de-DE":{prev:"Vorheriger Monat",next:"Nächster Monat"},en:{prev:"Previous month",next:"Next month"},"en-US":{prev:"Previous month",next:"Next month"},"en-GB":{prev:"Previous month",next:"Next month"},fr:{prev:"Mois précédent",next:"Mois suivant"},"fr-CH":{prev:"Mois précédent",next:"Mois suivant"},it:{prev:"Mese precedente",next:"Mese successivo"},"it-CH":{prev:"Mese precedente",next:"Mese successivo"}},Lr={de:{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"},"de-CH":{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"},"de-AT":{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"},"de-DE":{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"},en:{popoverSuffix:"— Calendar",invalidDateMessage:"Invalid date"},"en-US":{popoverSuffix:"— Calendar",invalidDateMessage:"Invalid date"},"en-GB":{popoverSuffix:"— Calendar",invalidDateMessage:"Invalid date"},fr:{popoverSuffix:"— Calendrier",invalidDateMessage:"Date invalide"},"fr-CH":{popoverSuffix:"— Calendrier",invalidDateMessage:"Date invalide"},it:{popoverSuffix:"— Calendario",invalidDateMessage:"Data non valida"},"it-CH":{popoverSuffix:"— Calendario",invalidDateMessage:"Data non valida"}};function Yr(t){const n=Lr[t];if(n)return n;const e=t.split("-")[0];return(void 0!==e?Lr[e]:void 0)||{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"}}const $r=["yyyy","MM","dd"];function Tr(t){const n=new Date(Date.UTC(2001,10,22));return new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC"}).formatToParts(n).map((t=>{switch(t.type){case"year":return"yyyy";case"month":return"MM";case"day":return"dd";default:return t.value}})).join("")}function Ur(t,n,e){if(!t)return"";const r=Ar(t);if(!r)return"";const o=e??Tr(n),i=String(r.year).padStart(4,"0"),a=String(r.month).padStart(2,"0"),s=String(r.day).padStart(2,"0");return o.replace(/yyyy/g,i).replace(/MM/g,a).replace(/dd/g,s)}const Vr=a("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjMzMzQgMjAuMzMzNEw3LjAwMDA4IDEyTDE1LjMzMzQgMy42NjY2MyIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS43NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="),Wr=a("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNjY2NjMgMjAuMzMzNEwxNyAxMkw4LjY2NjYzIDMuNjY2NjMiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K"),Gr=a("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cmVjdCB4PSIzLjUiIHk9IjUiIHdpZHRoPSIxNyIgaGVpZ2h0PSIxNSIgcng9IjIiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiLz4KICAgIDxwYXRoIGQ9Ik0zLjUgOS41SDIwLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiLz4KICAgIDxwYXRoIGQ9Ik04IDNWNi41IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik0xNiAzVjYuNSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS43NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPg=="),Jr=class{constructor(e){t(this,e),this.lmvzChange=n(this,"lmvzChange",7),this.lmvzMonthChange=n(this,"lmvzMonthChange",7),this.lmvzOpen=n(this,"lmvzOpen",7),this.lmvzClose=n(this,"lmvzClose",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals)}get el(){return e(this)}monthLabelId=`lmvz-dp-month-${Math.random().toString(36).slice(2,9)}`;internals;visibleDays;inputEl;focusedButtonRef;initialValue;pendingGridFocus=!1;syncOrigin=null;focusedDate;setFocusedDate(t){this.focusedDate===t||this.focusedDate&&t&&0===Mr(this.focusedDate,t)||(this.focusedDate=t)}valueDate;get value(){return this.valueDate?Zr(this.valueDate):void 0}set value(t){this.valueDate=t?Ar(t):void 0,this.visibleMonthDate=this.valueDate?Cr(this.valueDate):this.effectiveVisibleMonth,this.setFocusedDate(this.valueDate),this.syncInputTextFromValue(),this.updateFormState()}visibleMonthDate;get visibleMonth(){return this.visibleMonthDate?Hr(this.visibleMonthDate):void 0}set visibleMonth(t){this.visibleMonthDate=t?Nr(t,Xe):void 0,this.initFocusedDate()}min;max;locale="de-CH";firstDayOfWeek=1;disabled=!1;readonly=!1;required=!1;name;label;placeholder;helperText;errorMessage;open=!1;displayFormat;lmvzChange;lmvzMonthChange;lmvzOpen;lmvzClose;componentWillLoad(){this.label||console.warn("[lmvz-datepicker] no `label` provided; the text field will have no accessible name."),this.initialValue=this.value,this.syncInputTextFromValue(),this.updateFormState()}formAssociatedCallback(t){t&&this.updateFormState()}formResetCallback(){this.internals.setValidity?.({}),this.value=this.initialValue}formStateRestoreCallback(t){"string"==typeof t&&(this.value=t||void 0)}async checkValidity(){return this.internals.checkValidity?.()??!0}async reportValidity(){return this.internals.reportValidity?.()??!0}handleValidityRelevantPropChange(){this.updateFormState()}handleDisplayFormatChange(){this.syncInputTextFromValue()}handleDisabledChange(t){t&&(this.open=!1)}handleKeydown(t){if(this.disabled)return;if(!t.composedPath().some((t=>"grid"===t?.getAttribute?.("role"))))return;const n=this.focusedDate;if(!n)return void console.warn("[lmvz-datepicker] any date should be focused but none is.");const e=Ar(this.min),r=Ar(this.max),o=()=>{t.preventDefault(),t.stopPropagation()};switch(t.key){case"ArrowRight":o(),this.moveFocus(Dr(n,1));break;case"ArrowLeft":o(),this.moveFocus(Dr(n,-1));break;case"ArrowDown":o(),this.moveFocus(Dr(n,7));break;case"ArrowUp":o(),this.moveFocus(Dr(n,-7));break;case"Home":o(),this.moveFocus(function(t,n,e){const r=Sr(t);for(let o=1;o<=r;o++){const r=Br(t,{day:o});if(!Pr(r,n,e))return r}return null}(this.effectiveVisibleMonth,e,r));break;case"End":o(),this.moveFocus(function(t,n,e){for(let r=Sr(t);r>=1;r--){const o=Br(t,{day:r});if(!Pr(o,n,e))return o}return null}(this.effectiveVisibleMonth,e,r));break;case"PageUp":o(),this.moveFocus(t.shiftKey?kr(n,-1):xr(n,-1));break;case"PageDown":o(),this.moveFocus(t.shiftKey?kr(n,1):xr(n,1));break;case"Enter":case" ":t.preventDefault(),this.readonly||Pr(n,e,r)||this.selectDate(n,{origin:"calendar",closePopover:!0})}}initFocusedDate(){const t=this.effectiveVisibleMonth;if(this.focusedDate&&0===jr(Cr(this.focusedDate),t))return;const n=this.valueDate;if(n&&0===jr(Cr(n),t))return void this.setFocusedDate(n);const e=pr();0!==jr(Cr(e),t)?this.setFocusedDate(Br(t,{day:1})):this.setFocusedDate(e)}get effectiveVisibleMonth(){return this.visibleMonthDate?this.visibleMonthDate:Cr(pr())}navigateMonth(t,n=!1){if(0===t)return;const e=Or(this.effectiveVisibleMonth,t);this.visibleMonthDate=e,this.lmvzMonthChange.emit({visibleMonth:Hr(e)}),n&&this.setFocusedDate(Br(e,{day:1}))}selectDate(t,n={origin:"calendar"}){this.syncOrigin=n.origin,this.valueDate=t,this.setFocusedDate(t),this.lmvzChange.emit({value:Zr(t)}),this.navigateMonth(jr(Cr(t),this.effectiveVisibleMonth)),"input"===n.origin?(this.inputText=Ur(this.value,this.locale,this.displayFormat),this.hasUnparseableInput=!1):this.syncInputTextFromValue(),this.updateFormState(),n.closePopover&&(this.open=!1),this.syncOrigin=null}moveFocus(t){if(!t)return;if(this.setFocusedDate(t),!this.visibleDays?.length)return;let n=this.visibleDays.at(0);return n&&Mr(t,n)<0?this.navigateMonth(-1):(n=this.visibleDays.at(-1),n&&Mr(t,n)>0?this.navigateMonth(1):void 0)}syncInputTextFromValue(){"input"!==this.syncOrigin&&(this.inputText=Ur(this.value,this.locale,this.displayFormat),this.hasUnparseableInput=!1)}inputText="";hasUnparseableInput=!1;handleInputTextChange=t=>{const n=t.detail;if(this.inputText=n,!n.trim())return this.hasUnparseableInput=!1,this.valueDate&&(this.syncOrigin="input",this.valueDate=void 0,this.lmvzChange.emit({value:void 0}),this.syncOrigin=null),void this.updateFormState();const e=function(t,n,e){const r=t.trim();if(!r)return;const o=e??Tr(n),{regex:i,order:a}=function(t){const n=[];let e="",r=0;for(;r<t.length;){const o=$r.find((n=>t.startsWith(n,r)));o?(e+="yyyy"===o?"(\\d{4})":"(\\d{1,2})",n.push(o),r+=o.length):(e+=t[r].replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r+=1)}return{regex:new RegExp(`^${e}$`),order:n}}(o),s=i.exec(r);if(!s)return;const c={};a.forEach(((t,n)=>{c[t]=Number(s[n+1])}));const{yyyy:u,MM:d,dd:l}=c;return void 0!==u&&void 0!==d&&void 0!==l&&function(t,n,e){if(!Number.isInteger(t)||t<1)return!1;if(!Number.isInteger(n)||n<1||n>12)return!1;if(!Number.isInteger(e)||e<1)return!1;try{const r=Nr(`${String(t).padStart(4,"0")}-${String(n).padStart(2,"0")}`,Xe);return e<=Sr(r)}catch{return!1}}(u,d,l)?`${String(u).padStart(4,"0")}-${String(d).padStart(2,"0")}-${String(l).padStart(2,"0")}`:void 0}(n,this.locale,this.displayFormat);if(!e)return this.hasUnparseableInput=!0,void this.updateFormState();this.hasUnparseableInput=!1;const r=Ar(e);r&&(this.valueDate&&0===Mr(this.valueDate,r)||this.selectDate(r,{origin:"input"}))};handleInputFocus(t){if(this.disabled||this.readonly)return;const n=t.composedPath()[0];(n===this.inputEl||this.inputEl?.contains(n??null))&&(this.initFocusedDate(),this.open=!0)}handleInputKeydown=t=>{this.disabled||this.readonly||["ArrowDown","ArrowUp"," "].includes(t.key)&&(t.preventDefault(),this.open?this.focusGrid():(this.pendingGridFocus=!0,this.initFocusedDate(),this.open=!0))};focusGrid(){requestAnimationFrame((()=>this.focusedButtonRef?.focus()))}handlePopoverOpen=t=>{t.stopPropagation(),console.log("emitting open event"),this.lmvzOpen.emit(),this.pendingGridFocus&&(this.pendingGridFocus=!1,this.focusGrid())};handlePopoverClose=t=>{console.log("handlePopoverClose",t),t.stopPropagation(),this.open=!1,this.lmvzClose.emit()};updateFormState(){const t=this.value;this.internals.setFormValue?.(t??null);const n={};if(this.required&&!this.valueDate&&(n.valueMissing=!0),this.hasUnparseableInput&&(n.badInput=!0),this.valueDate){const t=Ar(this.min),e=Ar(this.max);t&&Mr(this.valueDate,t)<0&&(n.rangeUnderflow=!0),e&&Mr(this.valueDate,e)>0&&(n.rangeOverflow=!0)}const e=Object.values(n).some(Boolean);this.isInvalid=e,e||(this.nativeError=!1);const r=Yr(this.locale);this.internals.setValidity?.(n,e?this.errorMessage||r.invalidDateMessage:void 0,e?this.el:void 0)}handleInvalid(){this.nativeError=!0}isInvalid=!1;nativeError=!1;get effectivePlaceholder(){return this.placeholder??Tr(this.locale).toLowerCase()}renderHeader(){const{locale:t}=this,n=this.effectiveVisibleMonth,e=function(t){const n=Er[t];if(n)return n;const e=t.split("-")[0];return(void 0!==e?Er[e]:void 0)||{prev:"Vorheriger Monat",next:"Nächster Monat"}}(t),o=wr(Br(n,{day:1}),t,{month:"long",year:"numeric"}),i=Or(n,-1),a=Or(n,1),s=this.min?Nr(this.min.slice(0,7),Xe):void 0,c=this.max?Nr(this.max.slice(0,7),Xe):void 0,u=this.disabled||void 0!==s&&jr(i,s)<0,d=this.disabled||void 0!==c&&jr(a,c)>0;return r("div",{part:"header",class:"datepicker-header"},r("lmvz-button",{part:"nav-prev",variant:"tertiary",scale:"small","aria-label":e.prev,disabled:u,onLmvzActivation:()=>this.navigateMonth(-1,!0)},r("lmvz-icon",{icon:Vr,"aria-hidden":"true"})),r("span",{id:this.monthLabelId,part:"month-label",class:"datepicker-month-label"},o),r("lmvz-button",{part:"nav-next",variant:"tertiary",scale:"small","aria-label":e.next,disabled:d,onLmvzActivation:()=>this.navigateMonth(1,!0)},r("lmvz-icon",{icon:Wr,"aria-hidden":"true"})))}renderWeekdayRow(){const{locale:t}=this,n=gr({year:2024,month:1,day:1});return r("div",{part:"weekday-row",role:"row",class:"datepicker-weekday-row"},[1,2,3,4,5,6,7].map((e=>{const o=Dr(n,e-1),i=wr(o,t,{weekday:"short"}),a=wr(o,t,{weekday:"long"});return r("span",{part:"weekday",role:"columnheader","aria-label":a,class:"datepicker-weekday",key:e},r("abbr",{title:a},i))})))}renderGrid(){const{locale:t,focusedDate:n}=this,e=this.effectiveVisibleMonth,o=this.valueDate,i=Ar(this.min),a=Ar(this.max),s=this.visibleDays=function(t){const n=Br(t,{day:1}),e=Ir(n),r=Dr(n,-(e-1)),o=[];for(let t=0;t<42;t++)o.push(Dr(r,t));return 0!==jr(t,Cr(o.at(-7)))?o.slice(0,-7):o}(e),c={weekday:"long",day:"numeric",month:"long",year:"numeric"},u=[];for(let t=0;t<6&&s.at(7*t);t++)u.push(s.slice(7*t,7*t+7));return r("div",{part:"grid",role:"grid","aria-labelledby":this.monthLabelId,class:"datepicker-grid"},this.renderWeekdayRow(),u.map(((s,u)=>r("div",{part:"week-row",role:"row",class:"datepicker-week-row",key:u},s.map((s=>{const u=Zr(s),d=0===Mr(s,pr()),l=function(t,n){return!!n&&0===Mr(t,n)}(s,o),f=0!==jr(Cr(s),e),h=this.readonly||Pr(s,i,a),m=void 0!==n&&0===Mr(s,n),v=["day"];d&&v.push("day--today"),l&&v.push("day--selected"),f&&v.push("day--out-of-month"),h&&v.push("day--disabled");const y=wr(s,t,c);let p,g=!1;return m&&requestAnimationFrame((()=>{const t=this.el.shadowRoot?.activeElement;t instanceof HTMLButtonElement&&"gridcell"===t.getAttribute("role")&&(g=!0,p?.focus())})),r("button",{"data-debug-id":u,role:"gridcell",type:"button",part:v.join(" "),tabIndex:m?0:-1,"aria-label":y,"aria-selected":l?"true":void 0,"aria-current":d?"date":void 0,"aria-disabled":h?"true":void 0,onClick:()=>{h||this.disabled||this.selectDate(s,{origin:"calendar",closePopover:!0})},ref:t=>{p=t,m&&(this.focusedButtonRef=t)},onFocus:t=>{console.log("focus event on grid cell",u,t.target),this.el.shadowRoot?.contains(t.target)&&(g?g=!1:this.setFocusedDate(s))},key:u},s.day)}))))))}render(){const t=Yr(this.locale),n=this.label?`${this.label} ${t.popoverSuffix}`:void 0;return r(i,{key:"af9d7f075bf97d7eb58c6557f43cf8a245d5f712"},r("lmvz-input",{key:"eef4be58281b8356d443c65c5cf6451192e70f75",ref:t=>{const n=!this.inputEl;this.inputEl=t,n&&this.inputEl&&o(this)},label:this.label??"",placeholder:this.effectivePlaceholder,helperText:this.helperText,errorMessage:this.errorMessage,error:this.nativeError,disabled:this.disabled,readonly:this.readonly,required:this.required,value:this.inputText,autocomplete:"off",onLmvzInput:this.handleInputTextChange,onKeyDown:this.handleInputKeydown},r("lmvz-icon",{key:"fc39ef14720522a8089d33321b918e5577a36cc2",slot:"after-input",icon:Gr,"aria-hidden":"true"})),r("lmvz-popover",{key:"0076c57da02c7c9d0fcb53584f9dc4127317d6a5",anchor:this.inputEl,open:this.open&&!this.disabled,autoFocus:!1,size:"md",label:n,onLmvzOpen:this.handlePopoverOpen,onLmvzClose:this.handlePopoverClose},r("div",{key:"4c1e716e52a5d9ed75155dded3c2c39649e1e844",part:"panel",class:"datepicker-panel"},this.renderHeader(),this.renderGrid())))}static get delegatesFocus(){return!0}static get formAssociated(){return!0}static get watchers(){return{required:[{handleValidityRelevantPropChange:0}],min:[{handleValidityRelevantPropChange:0}],max:[{handleValidityRelevantPropChange:0}],locale:[{handleDisplayFormatChange:0}],displayFormat:[{handleDisplayFormatChange:0}],disabled:[{handleDisabledChange:0}]}}};Jr.style=" @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); } ";export{Jr as lmvz_datepicker}
1
+ import{r as t,c as n,g as e,h as r,f as o,H as i}from"./p-DVab4vzV.js";import{t as a}from"./p-DjvtQE7c.js";import"./p-D06Ds9Dh.js";const s=(t,n)=>`Invalid ${t}: ${n}`;function c(t,n="number"){if("bigint"==typeof t)throw new TypeError((t=>`Cannot convert bigint to ${t}`)(n));if(t=Number(t),!Number.isFinite(t))throw new RangeError(((t,n)=>`Non-finite ${t}: ${n}`)(n,t));return t}function u(t,n){return Math.trunc(c(t,n))||0}function d(t,n){return function(t,n="number"){if(t<=0)throw new RangeError(((t,n)=>`Non-positive ${t}: ${n}`)(n,t));return t}(u(t,n),n)}function l(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function f(t){if(!l(t))throw new TypeError("Invalid object");return t}const h=s,m=t=>`Missing ${t}`,v=t=>"Missing year"+(t?"/era/eraYear":""),y="Invalid leap month",p="Out-of-bounds date",g=t=>`Invalid substring: ${t}`,b=function(t,n,e){return Math.min(Math.max(t,n),e)};function I(t){throw new RangeError(t)}function M(t){throw new TypeError(t)}function w(t,n,e,r,o){return z(n,((t,n)=>{const e=t[n];return void 0===e&&M(m(n)),e})(t,n),e,r,o)}function z(t,n,e,r,o){const i=b(n,e,r);return o&&n!==i&&I(((t,n,e,r)=>((t,n,e,r)=>s(t,n)+`; must be between ${e}-${r}`)(t,n,e,r))(t,n,e,r)),i}function C(t,n=Map){const e=new n;return(n,...r)=>{if(e.has(n))return e.get(n);const o=t(n,...r);return e.set(n,o),o}}function k(t,n){const e={};for(const r in n)e[r]=t(n[r],r);return e}function x(t,n){const e={};for(const r of t)e[r]=n;return e}function D(t,n,e=Object.create(null)){for(const r of t)e[r]=n[r];return e}function N(t,...n){return(...e)=>t(...n,...e)}function S(){}function j(t){return t[0].toUpperCase()+t.substring(1)}function R(...t){return[].concat(...t).sort()}function A(t){return new RegExp(`^${t}$`,"i")}function B(t){return parseInt(t.padEnd(9,"0"))}function O(t){return t&&"+"!==t?-1:1}function Z(t){return void 0===t?0:parseInt(t)}function H(t,n){return String(n).padStart(t,"0")}const P=N(H,2);function E(t,n){return Math.sign(t-n)}function L(t,n){const e=function(t,n){const e=t/n;return t%n<0n?e-1n:e}(t,n);return[e,t-e*n]}function Y(t,n){return[Math.floor(t/n),$(t,n)]}function $(t,n){return(t%n+n)%n}function T(t,n){return Math.trunc(t/n)||0}const U="iso8601",V="gregory",W={bce:-1,ce:0};function G(t){const n=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return"bc"===n||"b"===n?"bce":"ad"===n||"a"===n?"ce":n}const J=void 0;function F(t){return t===J?"iso8601":0===t?"gregory":t.id}const K=/^M(\d{2})(L?)$/;function Q(t){const n=K.exec(t);return n||I((t=>`Invalid monthCode: ${t}`)(t)),[parseInt(n[1]),Boolean(n[2])]}function X(t,n,e){return t+(n||e&&t>=e?1:0)}const q=Object.keys({nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9}),_=1e3,tt=1e6,nt=1e9,et=6e10,rt=36e11,ot=864e11,it=BigInt(_),at=BigInt(tt),st=BigInt(nt),ct=BigInt(et),ut=BigInt(rt),dt=BigInt(ot),lt=q.slice(0,6),ft=["year"],ht=["day"],mt=["day","month","year"],vt=["era","eraYear"],yt=["era","eraYear","year"],pt=["month","monthCode"],gt=["day","month","monthCode"],bt=R(pt,ft),It=R(["monthCode"],ft),Mt=R(vt,It),wt=R(ht,bt),zt=R(ht,vt,bt),Ct=R(ht,It),kt=R(ht,vt,It);function xt(t){return function(t){const n={};for(const e of lt)n[e]=z(e,t[e],0,Dt[e]||999,1)}(t),t}const Dt={hour:23,minute:59,second:59};function Nt(t){return St(t)*nt+jt(t)}function St(t){return 3600*t.hour+60*t.minute+t.second}function jt(t){return t.millisecond*tt+t.microsecond*_+t.nanosecond}function Rt(t){const[n,e]=Y(t,ot);return[At(e),n]}function At(t){const[n,e]=Y(t,tt),[r,o]=Y(e,_);return function(t,n=0,e=0){const[r,o]=Y(t,36e5),[i,a]=Y(o,6e4),[s,c]=Y(a,1e3);return{hour:r,minute:i,second:s,millisecond:c,microsecond:n,nanosecond:e}}(n,r,o)}function Bt(t){const[n,e]=L(t,st);return[Number(n),Number(e)]}function Ot(t){return BigInt(Zt(t))*dt}function Zt(t){return Ht(t.year,t.month,t.day)}function Ht(t,n=1,e=1){const r=n-1;return t+=Math.floor(r/12),n=$(r,12),Date.UTC(t%400-400,n,0)/864e5+146097*(T(t,400)+1)+e}function Pt(t){const n=new Date(864e5*$(t,146097));return{year:n.getUTCFullYear()+400*Math.floor(t/146097),month:n.getUTCMonth()+1,day:n.getUTCDate()}}function Et(t,n){switch(n){case 2:return Lt(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Lt(t){return t%4==0&&(t%100!=0||t%400==0)}function Yt(t){return $(Ht(t.year,t.month,t.day)+4,7)||7}function $t(t){return Ht(t.year,t.month,t.day)-Ht(t.year)+1}function Tt(t){let n=t.year,e=Math.floor(($t(t)-Yt(t)+10)/7),r=Ut(n);return e<1?e=r=Ut(--n):e>r&&(e=1,r=Ut(++n)),{weekOfYear:e,yearOfWeek:n,Ie:r}}function Ut(t){const n=Yt({year:t,month:1,day:1});return 4===n||3===n&&Lt(t)?53:52}function Vt(t){return function(t){const{year:n}=t,e=w(t,"month",1,12,1);w(t,"day",1,Et(n,e),1)}(t),t}function Wt(t,n){return t?t.ie(n):n}function Gt(t,n,e){return t?t.O(n,e):function(t){return[t,0]}(e)}function Jt(t,n){return 0===t?function({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}(n):t?t.h(n):{}}function Ft(t,n,e,r){return t?t.je(n,e,r):function(t,n,e){return{year:t,month:n,day:e}}(n,e,r)}function Kt(t,n){return t?t.k(n):12}function Qt(t,n,e){return t?t.p(n,e):Et(n,e)}function Xt(t,n){const{year:e,month:r}=Wt(t,n),[o,i]=Gt(t,e,r);return function(t,n){return"M"+P(t)+(n?"L":"")}(o,i)}function qt(t,n){const{year:e}=Wt(t,n);return t?t.u(e):Lt(e)}function _t(t,n){const{year:e}=Wt(t,n);return Kt(t,e)}function tn(t,n){const{year:e,month:r}=Wt(t,n);return Qt(t,e,r)}function nn(t,n){const{year:e}=Wt(t,n);return t?t.j(e):function(t){return Lt(t)?366:365}(e)}const en=q.map((t=>t+"s")),rn=en.slice(6).slice(1),on=x(en,0),an=N(sn,"string");function sn(t,n,e=t){return typeof n!==t&&M(h(e,n)),n}function cn(t,n){return function(t,n="number"){return Number.isInteger(t)||I(((t,n)=>`Non-integer ${t}: ${n}`)(n,t)),t||0}(c(t,n),n)}const un={auto:0,never:1,critical:2,always:3};function dn(t,n,e,r=0){const o=e[t];if(void 0===o)return r;const i=("symbol"==typeof(a=o)&&M("Cannot convert Symbol to string"),String(a));var a;const c=n[i];return void 0===c&&I((u=n,s(t,i)+"; must be "+Object.keys(u).join())),c;var u}const ln=N(dn,"overflow",{constrain:0,reject:1}),fn=N(dn,"calendarName",un);function hn(t){return void 0===t?0:ln(f(t))}const mn=BigInt(1e8)*dt,vn=BigInt(-1e8)*dt,yn=vn-dt,pn=-3261848;function gn(t){const n=12*t.year+t.month;return(n<pn||n>3309129)&&I(p),t}function bn(t,n=1){return In(Ot(t),n),t}function In(t,n=1){(t<(n?yn:vn)||t>mn)&&I(p)}function Mn(t){return(t<vn||t>mn)&&I(p),t}function wn(t,n){return Mn(Ot(t)+BigInt(Nt(t)-n))}function zn(t,n){return D(mt,t,{calendar:n})}function Cn(t,n){return kn(n,1-Wt(t,n).day)}function kn(t,n){return n?Pt(Zt(t)+n):t}function xn(t,n,e,r,o){const i=Wt(t,n);let{year:a,month:s,day:c}=i;if(e){const[n,r]=Gt(t,a,s);a+=e,s=function(t,n,e,r,o){if(e){const e=t?t.m:void 0;return void 0!==r&&(e<0||r===n+1)?r:(1===o&&I(y),e<0?-e:n)}return X(n,0,r)}(t,n,r,t?t.q(a):void 0,o),s=z("month",s,1,Kt(t,a),o)}if(r){const n=t?t.N(a,s,r):function(t,n,e){return t+=T(e,12),(n+=e%12||0)<1?(t--,n+=12):n>12&&(t++,n-=12),{year:t,month:n}}(a,s,r);({year:a,month:s}=n)}return c=z("day",c,1,Qt(t,a,s),o),Ft(t,a,s,c)}function Dn(t,n=en){let e=0;for(const r of n){const n=Math.sign(t[r]);n&&(e&&e!==n&&I("Cannot mix duration signs"),e=n)}return e}function Nn(t){return BigInt(t.hours)*ut+BigInt(t.minutes)*ct+function(t){return BigInt(t.seconds)*st+BigInt(t.milliseconds)*at+BigInt(t.microseconds)*it+BigInt(t.nanoseconds)}(t)}function Sn(t,n){return E(Zt(t),Zt(n))}function jn(t){return 0===t?W:t?t.l:void 0}function Rn(t,n,e=n){return jn(t)?e:n}function An(t,n){const e=t||void 0,r=jn(t);let{era:o,eraYear:i,year:a}=n;if(void 0!==a&&(a=u(a,"year")),void 0!==i&&(i=u(i,"eraYear")),void 0!==o||void 0!==i){void 0!==o&&void 0!==i||M("Mismatching era/eraYear"),r||I("Forbidden era/eraYear");const t=G(o),n=r[t];void 0===n&&I((t=>`Invalid era: ${t}`)(o));const s=e?.te?e.te(i,t,n):function(t,n){return(n+t)*(Math.sign(n)||1)||0}(i,n);void 0!==a&&a!==s&&I("Mismatching year/eraYear"),a=s}else void 0===a&&M(v(r));return a}function Bn(t,n,e,r,o){let{month:i,monthCode:a}=n;if(void 0!==a){const n=((t,n,e,r,o=Q(n))=>{const i=t?t.q(e):void 0,[a,s]=o;let c=X(a,s,i);if(s){const n=t?t.m:void 0;void 0===n&&I(y),n>0?(c>n&&I(y),i!==c&&(1===r&&I(y),c=X(a,0,i))):(c!==-n&&I(y),void 0===i&&1===r&&I(y))}return c})(t,a,e,r,o);void 0!==i&&i!==n&&I("Mismatching month/monthCode"),i=n,r=1}else void 0===i&&M("Missing month/monthCode");return z("month",i,1,Kt(t,e),r)}const On=A("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?"),Zn={era:function(t,n){return l(t)?String(t):an(t,n)},month:d,monthCode:(t,n="monthCode")=>((t,n)=>{if("string"==typeof t)return t;if(t&&"object"==typeof t){const e=t.toString;if("function"==typeof e)return an(e.call(t),n)}return an(t,n)})(t,n),day:d};function Hn(t,n,e,r,o=!r){const i={};let a=0;for(const o of n){let n=t[o];if(void 0!==n){a=1;const t=e[o];t&&(n=t(n,o)),i[o]=n}else r&&r.includes(o)&&M(m(o))}return o&&!a&&M("No valid fields: "+n.join()),i}function Pn(t,n,e){return function(t,n,e,r){const o=e[1],i=Bn(t,n,o,r,e[0]);return zn(bn(Ft(t,o,i,function(t,n,e,r,o){return w(n,"day",1,Qt(t,r,e),o)}(t,n,i,o,r))),t)}(t,n,function(t,n){const e=jn(t);return void 0!==n.year||void 0!==n.era&&void 0!==n.eraYear||M(v(e)),void 0===n.monthCode&&void 0===n.month&&M("Missing month/monthCode"),void 0===n.day&&M(m("day")),[En(n),An(t,n)]}(t,n),hn(e))}function En(t){if(void 0!==t.monthCode)return Q(t.monthCode)}const Ln=Intl.DateTimeFormat,Yn={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},$n=-388152e4;function Tn(t){return fn(function(t){return void 0===t?Object.create(null):f(t)}(t))}function Un(t){return Vn(t)+"-"+P(t.day)}function Vn(t){const{year:n}=t;return(n<0||n>9999?Fn(n)+H(6,Math.abs(n)):H(4,n))+"-"+P(t.month)}function Wn(t,n=0){if(1===n)return"";const[e,r]=Y(Math.abs(t),rt),[o,i]=Y(r,et),[a,s]=Y(i,nt);return Fn(t)+P(e)+":"+P(o)+(a||s?":"+P(a)+function(t){let n=H(9,t);return n=n.replace(Jn,""),n?"."+n:""}(s):"")}function Gn(t,n){return"["+(n?"!":"")+"u-ca="+t+"]"}const Jn=/0+$/;function Fn(t){return t<0?"-":"+"}const Kn=/^(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$/,Qn=/[^\w\/:+-]+/;function Xn(t){const n=t.toUpperCase(),e=(t=>{const n=function(t){const n=On.exec(t);if(n&&(t=>(t=>{"T"!==t[0]&&"t"!==t[0]||(t=t.slice(1));const n=t.search(/[.,]/),e=n<0?t:t.slice(0,n),r=e.split(":");return 1===r.length?/^(?:\d{2}|\d{4}|\d{6})$/i.test(e):(2===r.length||3===r.length)&&r.every((t=>2===t.length&&/^\d{2}$/i.test(t)))})(t.slice(1)))(n[0]))return(t=>{const n=t[4]||t[5];return n&&I(g(n)),e=(Z(t[2])*rt+Z(t[3])*et+Z(t[4])*nt+B(t[5]||""))*O(t[1]),Math.abs(e)>=ot&&I("Out-of-bounds offset"),e;var e})(n)}(t);if(void 0!==n)return{id:Wn(n),_:n,o:n}})(n);if(e)return{kind:"fixed",...e};const r="UTC"===n?"UTC":(t=>(Qn.test(t)&&I(s("TimeZone",t)),Kn.test(t)&&I("Forbidden ICU TimeZone"),t.toLowerCase().split("/").map(((t,n)=>(t.length<=3||/\d/.test(t))&&!/etc|yap/.test(t)?t.toUpperCase():t.replace(/baja|dumont|[a-z]+/g,((t,e)=>t.length<=2&&!n||"in"===t||"chat"===t?t.toUpperCase():t.length>2||!e?j(t).replace(/island|noronha|murdo|rivadavia|urville/,j):t)))).join("/")))(t);return qn(r)}const qn=C((t=>{if("UTC"===t)return{kind:"utc",id:t,o:t};const n=t.toUpperCase(),e=_n(n);return{kind:"named",id:t,format:e,o:e.resolvedOptions().timeZone}})),_n=C((t=>new Ln("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}))),te=C(((t,n)=>"named"===n.kind?new ee(t,n.o,n.format):new ne(t,n.o,"fixed"===n.kind?n._:0)));class ne{constructor(t,n,e){this.id=t,this.o=n,this._=e}C(){return this._}R(t){return[wn(t,this._)]}U(){}}class ee{constructor(t,n,e){this.id=t,this.o=n,this.qe=((t,n)=>{const e=C(t),r=C(oe),o=86400*n;function i(t){const[n,i]=ie(t,o),s=ae(n),c=ae(i),u=e(s),d=e(c);return u===d?u:a(r(s,c),u,d,t)}function a(n,e,r,o){let i,a;for(;(void 0===o||void 0===(i=o<n[0]?e:o>=n[1]?r:void 0))&&(a=n[1]-n[0]);){const e=n[0]+Math.floor(a/2);t(e)===r?n[1]=e:n[0]=e+1}return i}return{Ee(t){const n=i(t-86400),e=i(t+86400),r=t-n,o=t-e;if(n===e)return[r];const a=i(r);return a===i(o)?[t-a]:n>e?[r,o]:[]},De:i,U:function t(n,i){if(i>0&&n>=864e10)return;if(i<0){if(n<=$n)return;const e=re()+94867200;if(n>e)return t(e,-1)}const s=i>0?Math.max(n,$n):n;let[c,u]=ie(s,o);const d=o*i,l=i>0?Math.max(n,re())+94867200:$n;for(;i<0?u>l:c<l;){const t=ae(c),o=ae(u),s=e(t),l=e(o);if(s!==l){const e=r(t,o);a(e,s,l);const c=e[0];if((E(c,n)||1)===i)return c}c+=d,u+=d}}}})((t=>n=>{const e=function(t,n){n<-864e13&&I(p);const e=t.formatToParts(n),r={};for(const t of e)r[t.type]=t.value;return r}(t,1e3*n);return 86400*Ht((t=>{const n=t.relatedYear;if(void 0!==n)return parseInt(n);const e=parseInt(t.year);return void 0!==t.era&&"bce"===G(t.era)?1-e:e})(e),parseInt(e.month),parseInt(e.day))+3600*parseInt(e.hour)+60*parseInt(e.minute)+parseInt(e.second)-n})(e),(t=>{const n=t.split("/").pop();return Yn[n]||60})(t))}C(t){return this.qe.De((t=>Bt(t)[0])(t))*nt}R(t){const n=86400*Zt(t)+St(t),e=jt(t);return this.qe.Ee(n).map((t=>Mn(BigInt(t)*st+BigInt(e))))}U(t,n){const[e,r]=Bt(t),o=this.qe.U(e+(n>0||r?1:0),n);if(void 0!==o)return BigInt(o)*st}}function re(){return Math.floor(Date.now()/1e3)}function oe(t,n){return[t,n]}function ie(t,n){const e=Math.floor(t/n)*n;return[e,e+n]}function ae(t){return b(t,-1e10,864e10)}function se(t){const n=function(t){const n=me.exec(t);return n?(t=>{const n=t[12],e="Z"===(n||"").toUpperCase();return{year:pe(t),month:parseInt(t[5]),day:parseInt(t[6]),...ye(t,7),...ge(t[19]),fe:Boolean(t[7]),F:e,offset:e?void 0:n}})(n):void 0}(t);return n&&!n.F||function(t){I((t=>`Cannot parse: ${t}`)(t))}(t),n}function ce(t,n,e){return n&&"iso8601"===t.calendarId?(Vt(t),t.fe&&xt(t),de(n(t),e)):t.fe?function(t,n){return Vt(o=t),xt(o),function(t){const n=Ot(t);In(n),n!==yn||Nt(t)||I(p)}(t),{...(e=t,r=t,D(mt,e,D(lt,r))),calendar:n(t.calendarId)};var e,r,o}(t,e):de(t,e)}function ue(t){const n=12*t.year+t.month===pn?20:1;return{...t,day:n}}function de(t,n){return Vt(t),bn(t),{calendar:n(t.calendarId),year:t.year,month:t.month,day:t.day}}function le(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}const fe="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+le(8)+"(Z|([+-])"+le(15)+")?)?",he=A("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),me=A(fe+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),ve=new RegExp("\\[(!?)([^\\]]*)\\]","g");function ye(t,n){const e=Z(t[n+3]);return{...Rt(B(t[n+4]||""))[0],hour:Z(t[n]),minute:Z(t[n+2]),second:60===e?59:e}}function pe(t){const n=O(t[1]),e=parseInt(t[2]||t[3]);return n<0&&!e&&I(g(-0)),n*e}function ge(t){let n,e;const r=[];return t.replace(ve,((t,o,i)=>{const a=Boolean(o),[s,c]=i.split("=").reverse();return c?"u-ca"===c?(r.push(s.toLowerCase()),n||(n=a)):(a||/[A-Z]/.test(c))&&I(g(t)):(e&&I(g(t)),e=s),""})),r.length>1&&n&&I(g(t)),{timeZoneId:e,calendarId:r[0]||"iso8601"}}function be(t,n,e,r){let o=0;const i=[];for(const t of e)void 0!==n[t]?o=1:i.push(t);if(Object.assign(t,n),o)for(const n of r||i)delete t[n]}function Ie(t,n,e,r,o){const i=new Set(t),a=new Set(n),s=new Set(e);return(t,n)=>{const e=((t,n,e,r)=>{const o={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(const i of Object.keys(t)){const a=t[i];void 0===a||r.has(i)||(n.has(i)?"dateStyle"===i?o.dateStyle=a:"timeStyle"===i?o.timeStyle=a:o.me[i]=a:"era"===i?o.pe[i]=a:e.has(i)?"dateStyle"===i||"timeStyle"===i?o.ue=1:o.oe=1:o.xe[i]=a)}return o})(t,i,a,s),c=void 0!==e.dateStyle,u=void 0!==e.timeStyle,d=c||u,l=Object.keys(e.me).length>0,f=e.oe||e.ue,h=l||c||u,m=Object.keys(e.pe).length>0;(!n&&f||n&&f&&!h||d&&(l||m||e.oe))&&M("Invalid formatting options");const v={};return d||h||Object.assign(v,r),Object.assign(v,e.me,e.pe,e.xe),c&&(o?Object.assign(v,o[e.dateStyle]):v.dateStyle=e.dateStyle),u&&(v.timeStyle=e.timeStyle),v}}const Me=Ie(["weekday","year","month","day","dateStyle"],["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],["timeZoneName"],{year:"numeric",month:"numeric",day:"numeric"});function we(t,n,e,...r){var o;Object.defineProperties(n,k((t=>({value:t,configurable:1,writable:!1})),{name:t})),Object.defineProperties(n.prototype,(o="Temporal."+t,{[Symbol.toStringTag]:{value:o,configurable:1}}));for(const t of r)ze(n.prototype,e,t);return n}function ze(t,n,e){Object.defineProperties(t,k((t=>({get(){return t(n(this))},configurable:1})),e))}const Ce="noop"===S.name?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:S;function ke(){M("Invalid calling context")}function xe(){M("Cannot use valueOf")}const De={era:t=>Jt(t.calendar,t).era,eraYear:t=>Jt(t.calendar,t).eraYear,year:t=>Wt(t.calendar,t).year,month:t=>Wt(t.calendar,t).month,monthCode:t=>Xt(t.calendar,t)},Ne={era:t=>Jt(t.calendar,t).era,eraYear:t=>Jt(t.calendar,t).eraYear,year:t=>Wt(t.calendar,t).year,month:t=>Wt(t.calendar,t).month,monthCode:t=>Xt(t.calendar,t),day:t=>Wt(t.calendar,t).day},Se={daysInMonth:t=>tn(t.calendar,t),daysInYear:t=>nn(t.calendar,t),monthsInYear:t=>_t(t.calendar,t),inLeapYear:t=>qt(t.calendar,t)},je={dayOfWeek:t=>Yt(t),dayOfYear:t=>function(t,n){if(!t)return $t(n);const{year:e}=Wt(t,n),r=Ft(t,e,1,1);return Zt(n)-Zt(r)+1}(t.calendar,t),weekOfYear:t=>t.calendar===J?Tt(t).weekOfYear:void 0,yearOfWeek:t=>t.calendar===J?Tt(t).yearOfWeek:void 0,daysInWeek:()=>7,daysInMonth:t=>tn(t.calendar,t),daysInYear:t=>nn(t.calendar,t),monthsInYear:t=>_t(t.calendar,t),inLeapYear:t=>qt(t.calendar,t)};function Re(t){return function(t){const n={};for(const e of t)n[e]=t=>t[e];return n}(Object.keys(t))}const Ae=Re(De),Be=Re(Ne);Re(Se),Re(je);const Oe="PlainYearMonthRecord",Ze="PlainDateRecord",He=new WeakMap,Pe=new WeakMap,Ee=new WeakMap;function Le(t){return function(t){return He.get(t)}(t)||ke()}function Ye(t){return function(t){return Pe.get(t)}(t)||ke()}function $e(t,n){Pe.set(t,n)}function Te(t){return Ue(t)||ke()}function Ue(t){return Ee.get(t)}function Ve(t,n){Ee.set(t,n)}const We=we("CalendarRecord",class{toJSON(){return Je(this)}valueOf(){return Je(this)}});function Ge(t,n){const e=Object.create(We.prototype);return((t,n)=>{He.set(t,n)})(e,{id:t,Be:n}),Ce(e),e}function Je(t){return Le(t).id}function Fe(t){const n=Le(t).Be;return n||I(`Unknown calendar ${Je(t)}; might need getExotic or getAny`),n}const Ke=Ge(U,(()=>J)),Qe=Ge(V,(()=>0));function Xe(t){const n=an(t).toLowerCase();return n===U?Ke:n===V?Qe:qe(t)}const qe=C(Ge),_e=globalThis.Temporal;function tr(t,n){nr(n(t))}function nr(t){return Fe(t),Je(t)}const er=Te,rr=we(Oe,class{get calendarId(){return er(this).calendarId}toJSON(){return er(this).toJSON()}valueOf(){return er(this).valueOf()}},er,Ae);function or(t){const n=Object.create(rr.prototype);return Ve(n,t),Ce(n),n}const ir=Ye,ar=we(Ze,class{get calendarId(){return ir(this).calendarId}toJSON(){return ir(this).toJSON()}valueOf(){return ir(this).valueOf()}},ir,Be);function sr(t){const n=Object.create(ar.prototype);return $e(n,t),Ce(n),n}function cr(t){return n=>ur(t(n.toLowerCase()))}function ur(t){return Fe(t)()}const dr=Te,lr=we(Oe,class{get calendarId(){return F(dr(this).calendar)}toJSON(){return function(t){const n=t.calendar;return n!==J?Un(t)+Gn(F(n),0):Vn(t)}(dr(this))}valueOf(){return xe()}},dr,De);function fr(t){const n=Object.create(lr.prototype);return Ve(n,t),Ce(n),n}const hr=Ye,mr=we(Ze,class{get calendarId(){return F(hr(this).calendar)}toJSON(){return Un(t=hr(this))+(t.calendar===J?"":Gn(F(t.calendar),0));var t}valueOf(){return xe()}},hr,Ne);function vr(t){const n=Object.create(mr.prototype);return $e(n,t),Ce(n),n}function yr(t){return bn(t),vr(zn(t,t.calendar))}const pr=_e?function(t){return sr(_e.Now.plainDateISO(t))}:function(t=function(){return(new Ln).resolvedOptions().timeZone}()){return vr(zn(function(t){const n=BigInt(Date.now())*at,e=t.C(n);return function(t){const[n,e]=L(t,dt);return{...Pt(Number(n)),...At(Number(e))}}(n+BigInt(e))}(function(t){const n=Xn(t);return te(n.id,n)}(function(t){return Xn(t).id}(an(t))))))},gr=_e?function(t,n){const e=function(t){if(void 0!==t)return nr(t)}(t.calendar);return sr(_e.PlainDate.from({...t,calendar:e},n))}:function(t,n){var e;return vr(function(t,n,e,r=[]){return Pn(t,Hn(n,Rn(t,wt,zt),Zn,r),e)}(void 0===(e=t.calendar)?J:ur(e),t,n))},br=_e?function(t,n){const e=_e.PlainDate.from(t);return tr(e.calendarId,n),sr(e)}:function(t,n){return vr(function(t,n){const e=ce(se(an(t)),void 0,n);return zn(e,e.calendar)}(t,cr(n)))},Ir=_e?function(t){return ir(t).dayOfWeek}:function(t){return Yt(hr(t))},Mr=_e?function(t,n){const e=ir(t),r=ir(n);return _e.PlainDate.compare(e,r)}:function(t,n){return Sn(hr(t),hr(n))},wr=_e?function(t,n,e){return ir(t).toLocaleString(n,e)}:function(t,n,e={}){const r=hr(t),o=new Ln(n,function(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}(Me(e)));return function(t,n){const e=t.resolvedOptions().calendar;n.calendar===J||F(n.calendar)===e||I("Mismatching Calendars")}(o,r),o.format(864e5*Zt(r))},zr=_e?function(t,n){return ir(t).toString(n)}:function(t,n){return function(t,n){return e=t.calendar,r=t,o=Tn(n),Un(r)+function(t,n){return n>1||0===n&&t!==J?Gn(F(t),2===n):""}(e,o);var e,r,o}(hr(t),n)},Cr=_e?function(t){return or(ir(t).toPlainYearMonth())}:function(t){const n=hr(t),e=Wt(n.calendar,n);return fr(function(t,n){const e=jn(t);void 0!==n.year||void 0!==n.era&&void 0!==n.eraYear||M(v(e)),void 0===n.monthCode&&void 0===n.month&&M("Missing month/monthCode");const r=En(n),o=An(t,n);return zn(gn(Ft(t,o,Bn(t,n,o,hn(void 0),r),1)),t)}(n.calendar,{year:e.year,monthCode:Xt(n.calendar,n)}))},kr=_e?function(t,n,e){return sr(ir(t).add({years:n},e))}:function(t,n,e){const r=hr(t);return yr(zn(function(t,n,e,r){const o=hn(r);return e?xn(t,n,cn(e),0,o):n}(r.calendar,r,n,e),r.calendar))},xr=_e?function(t,n,e){return sr(ir(t).add({months:n},e))}:function(t,n,e){const r=hr(t);return yr(zn(function(t,n,e,r){const o=hn(r);return e?xn(t,n,0,cn(e),o):n}(r.calendar,r,n,e),r.calendar))},Dr=_e?function(t,n){return sr(ir(t).add({days:n}))}:function(t,n){const e=hr(t);return yr(zn(function(t,n,e){return kn(n,cn(e))}(0,e,n),e.calendar))},Nr=_e?function(t,n){const e=_e.PlainYearMonth.from(t);return tr(e.calendarId,n),or(e)}:function(t,n){return fr(function(t,n){const e=function(t){const n=he.exec(t);if(n)return(t=>({year:pe(t),month:parseInt(t[4]),day:1,...ge(t[5])}))(n)}(an(t));if(e)return function(t){"iso8601"!==t.calendarId&&I(g(t.calendarId))}(e),zn(gn(Vt(e)),n(e.calendarId));const r=ce(se(t),ue,n),{calendar:o}=r;return zn(Cn(o,r),o)}(t,cr(n)))},Sr=_e?function(t){return er(t).daysInMonth}:function(t){const n=dr(t);return tn(n.calendar,n)},jr=_e?function(t,n){const e=er(t),r=er(n);return _e.PlainYearMonth.compare(e,r)}:function(t,n){return Sn(dr(t),dr(n))},Rr=_e?function(t,n){return er(t).toString(n)}:function(t,n){return function(t,n){return function(t,n,e,r){const o=r>1||0===r&&t!==J;return 1===r?t===J?n(e):Un(e):o?Un(e)+Gn(F(t),2===r):n(e)}(t.calendar,Vn,t,Tn(n))}(dr(t),n)},Ar=_e?function(t,n){return sr(er(t).toPlainDate(n))}:function(t,n){return vr((e=dr(t).calendar,r=t,o=n,function(t,n,e){const r=Rn(t,Ct,kt);let o=function(t,n,e){const r=Object.assign(Object.create(null),n);return be(r,e,pt),jn(t)&&(be(r,e,yt),t&&t.le&&be(r,e,gt,vt)),r}(t,n,e);return o=Hn(o,r,Zn,[]),Pn(t,o)}(e,D(Rn(e,It,Mt),r),Hn(f(o),ht,Zn,[]))));var e,r,o},Br=_e?function(t,n,e){return or(er(t).add({months:n},e))}:function(t,n,e){const r=dr(t);return fr(zn(function(t,n,e,r,o){const i=hn(o);r.sign&&function(t){let n=9;for(;n>0&&!t[en[n]];n--);return n}(r)<8&&I("Cannot use small units");const a=bn(Cn(n,e));return Cn(n,function(t,n,e,r){let o,{years:i,months:a,weeks:s,days:c}=e;if(c+=Number(Nn(e)/dt),i||a)o=xn(t,n,i,a,r);else{if(!s&&!c)return n;o=n}return(s||c)&&(o=kn(o,7*s+c)),bn(o)}(n,a,r,i))}(0,r.calendar,r,(o=function(t){for(const n of rn)z(n,t[n],-4294967295,4294967295,1);const n=function(t){return BigInt(t.days)*dt+Nn(t)}(t);return e=Number(n/st),Number.isSafeInteger(e)||I("Out-of-bounds duration"),t;var e}({...on,months:cn(n)}),D(en,o,{sign:Dn(o)})),e),r.calendar));var o};function Or(t,n=br){if(t)try{return n(t,Xe)}catch{return}}function Zr(t){return zr(t)}function Hr(t){return Ue(t)?Rr(t):Zr(t).slice(0,7)}function Pr(t,n,e){return!!(n&&Mr(t,n)<0)||!!(e&&Mr(t,e)>0)}const Er={de:{prev:"Vorheriger Monat",next:"Nächster Monat"},"de-CH":{prev:"Vorheriger Monat",next:"Nächster Monat"},"de-AT":{prev:"Vorheriger Monat",next:"Nächster Monat"},"de-DE":{prev:"Vorheriger Monat",next:"Nächster Monat"},en:{prev:"Previous month",next:"Next month"},"en-US":{prev:"Previous month",next:"Next month"},"en-GB":{prev:"Previous month",next:"Next month"},fr:{prev:"Mois précédent",next:"Mois suivant"},"fr-CH":{prev:"Mois précédent",next:"Mois suivant"},it:{prev:"Mese precedente",next:"Mese successivo"},"it-CH":{prev:"Mese precedente",next:"Mese successivo"}},Lr={de:{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"},"de-CH":{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"},"de-AT":{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"},"de-DE":{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"},en:{popoverSuffix:"— Calendar",invalidDateMessage:"Invalid date"},"en-US":{popoverSuffix:"— Calendar",invalidDateMessage:"Invalid date"},"en-GB":{popoverSuffix:"— Calendar",invalidDateMessage:"Invalid date"},fr:{popoverSuffix:"— Calendrier",invalidDateMessage:"Date invalide"},"fr-CH":{popoverSuffix:"— Calendrier",invalidDateMessage:"Date invalide"},it:{popoverSuffix:"— Calendario",invalidDateMessage:"Data non valida"},"it-CH":{popoverSuffix:"— Calendario",invalidDateMessage:"Data non valida"}};function Yr(t){const n=Lr[t];if(n)return n;const e=t.split("-")[0];return(void 0!==e?Lr[e]:void 0)||{popoverSuffix:"— Kalender",invalidDateMessage:"Ungültiges Datum"}}const $r=["yyyy","MM","dd"];function Tr(t){const n=new Date(Date.UTC(2001,10,22));return new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC"}).formatToParts(n).map((t=>{switch(t.type){case"year":return"yyyy";case"month":return"MM";case"day":return"dd";default:return t.value}})).join("")}function Ur(t,n,e){if(!t)return"";const r=Or(t);if(!r)return"";const o=e??Tr(n),i=String(r.year).padStart(4,"0"),a=String(r.month).padStart(2,"0"),s=String(r.day).padStart(2,"0");return o.replace(/yyyy/g,i).replace(/MM/g,a).replace(/dd/g,s)}const Vr=a("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjMzMzQgMjAuMzMzNEw3LjAwMDA4IDEyTDE1LjMzMzQgMy42NjY2MyIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS43NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="),Wr=a("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNjY2NjMgMjAuMzMzNEwxNyAxMkw4LjY2NjYzIDMuNjY2NjMiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K"),Gr=a("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cmVjdCB4PSIzLjUiIHk9IjUiIHdpZHRoPSIxNyIgaGVpZ2h0PSIxNSIgcng9IjIiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiLz4KICAgIDxwYXRoIGQ9Ik0zLjUgOS41SDIwLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEuNzUiLz4KICAgIDxwYXRoIGQ9Ik04IDNWNi41IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik0xNiAzVjYuNSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS43NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPg=="),Jr=class{constructor(e){t(this,e),this.lmvzChange=n(this,"lmvzChange",7),this.lmvzMonthChange=n(this,"lmvzMonthChange",7),this.lmvzOpen=n(this,"lmvzOpen",7),this.lmvzClose=n(this,"lmvzClose",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals)}get el(){return e(this)}monthLabelId=`lmvz-dp-month-${Math.random().toString(36).slice(2,9)}`;internals;visibleDays;inputEl;focusedButtonRef;initialValue;pendingGridFocus=!1;syncOrigin=null;focusedDate;setFocusedDate(t){this.focusedDate===t||this.focusedDate&&t&&0===Mr(this.focusedDate,t)||(this.focusedDate=t)}valueDate;get value(){return this.valueDate?Zr(this.valueDate):void 0}set value(t){this.valueDate=t?Or(t):void 0,this.visibleMonthDate=this.valueDate?Cr(this.valueDate):this.effectiveVisibleMonth,this.setFocusedDate(this.valueDate),this.syncInputTextFromValue(),this.updateFormState()}visibleMonthDate;get visibleMonth(){return this.visibleMonthDate?Hr(this.visibleMonthDate):void 0}set visibleMonth(t){this.visibleMonthDate=t?Nr(t,Xe):void 0,this.initFocusedDate()}min;max;locale="de-CH";firstDayOfWeek=1;disabled=!1;readonly=!1;required=!1;name;label;placeholder;helperText;errorMessage;open=!1;displayFormat;lmvzChange;lmvzMonthChange;lmvzOpen;lmvzClose;componentWillLoad(){this.label||console.warn("[lmvz-datepicker] no `label` provided; the text field will have no accessible name."),this.initialValue=this.value,this.syncInputTextFromValue(),this.updateFormState()}formAssociatedCallback(t){t&&this.updateFormState()}formResetCallback(){this.internals.setValidity?.({}),this.value=this.initialValue}formStateRestoreCallback(t){"string"==typeof t&&(this.value=t||void 0)}async checkValidity(){return this.internals.checkValidity?.()??!0}async reportValidity(){return this.internals.reportValidity?.()??!0}handleValidityRelevantPropChange(){this.updateFormState()}handleDisplayFormatChange(){this.syncInputTextFromValue()}handleDisabledChange(t){t&&(this.open=!1)}handleKeydown(t){if(this.disabled)return;if(!t.composedPath().some((t=>"grid"===t?.getAttribute?.("role"))))return;const n=this.focusedDate;if(!n)return void console.warn("[lmvz-datepicker] any date should be focused but none is.");const e=Or(this.min),r=Or(this.max),o=()=>{t.preventDefault(),t.stopPropagation()};switch(t.key){case"ArrowRight":o(),this.moveFocus(Dr(n,1));break;case"ArrowLeft":o(),this.moveFocus(Dr(n,-1));break;case"ArrowDown":o(),this.moveFocus(Dr(n,7));break;case"ArrowUp":o(),this.moveFocus(Dr(n,-7));break;case"Home":o(),this.moveFocus(function(t,n,e){const r=Sr(t);for(let o=1;o<=r;o++){const r=Ar(t,{day:o});if(!Pr(r,n,e))return r}return null}(this.effectiveVisibleMonth,e,r));break;case"End":o(),this.moveFocus(function(t,n,e){for(let r=Sr(t);r>=1;r--){const o=Ar(t,{day:r});if(!Pr(o,n,e))return o}return null}(this.effectiveVisibleMonth,e,r));break;case"PageUp":o(),this.moveFocus(t.shiftKey?kr(n,-1):xr(n,-1));break;case"PageDown":o(),this.moveFocus(t.shiftKey?kr(n,1):xr(n,1));break;case"Enter":case" ":t.preventDefault(),this.readonly||Pr(n,e,r)||this.selectDate(n,{origin:"calendar",closePopover:!0})}}initFocusedDate(){const t=this.effectiveVisibleMonth;if(this.focusedDate&&0===jr(Cr(this.focusedDate),t))return;const n=this.valueDate;if(n&&0===jr(Cr(n),t))return void this.setFocusedDate(n);const e=pr();0!==jr(Cr(e),t)?this.setFocusedDate(Ar(t,{day:1})):this.setFocusedDate(e)}get effectiveVisibleMonth(){return this.visibleMonthDate?this.visibleMonthDate:Cr(pr())}navigateMonth(t,n=!1){if(0===t)return;const e=Br(this.effectiveVisibleMonth,t);this.visibleMonthDate=e,this.lmvzMonthChange.emit({visibleMonth:Hr(e)}),n&&this.setFocusedDate(Ar(e,{day:1}))}selectDate(t,n={origin:"calendar"}){this.syncOrigin=n.origin,this.valueDate=t,this.setFocusedDate(t),this.lmvzChange.emit({value:Zr(t)}),this.navigateMonth(jr(Cr(t),this.effectiveVisibleMonth)),"input"===n.origin?(this.inputText=Ur(this.value,this.locale,this.displayFormat),this.hasUnparseableInput=!1):this.syncInputTextFromValue(),this.updateFormState(),n.closePopover&&(this.open=!1),this.syncOrigin=null}moveFocus(t){if(!t)return;if(this.setFocusedDate(t),!this.visibleDays?.length)return;let n=this.visibleDays.at(0);return n&&Mr(t,n)<0?this.navigateMonth(-1):(n=this.visibleDays.at(-1),n&&Mr(t,n)>0?this.navigateMonth(1):void 0)}syncInputTextFromValue(){"input"!==this.syncOrigin&&(this.inputText=Ur(this.value,this.locale,this.displayFormat),this.hasUnparseableInput=!1)}inputText="";hasUnparseableInput=!1;handleInputTextChange=t=>{const n=t.detail;if(this.inputText=n,!n.trim())return this.hasUnparseableInput=!1,this.valueDate&&(this.syncOrigin="input",this.valueDate=void 0,this.lmvzChange.emit({value:void 0}),this.syncOrigin=null),void this.updateFormState();const e=function(t,n,e){const r=t.trim();if(!r)return;const o=e??Tr(n),{regex:i,order:a}=function(t){const n=[];let e="",r=0;for(;r<t.length;){const o=$r.find((n=>t.startsWith(n,r)));o?(e+="yyyy"===o?"(\\d{4})":"(\\d{1,2})",n.push(o),r+=o.length):(e+=t[r].replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r+=1)}return{regex:new RegExp(`^${e}$`),order:n}}(o),s=i.exec(r);if(!s)return;const c={};a.forEach(((t,n)=>{c[t]=Number(s[n+1])}));const{yyyy:u,MM:d,dd:l}=c;return void 0!==u&&void 0!==d&&void 0!==l&&function(t,n,e){if(!Number.isInteger(t)||t<1)return!1;if(!Number.isInteger(n)||n<1||n>12)return!1;if(!Number.isInteger(e)||e<1)return!1;try{const r=Nr(`${String(t).padStart(4,"0")}-${String(n).padStart(2,"0")}`,Xe);return e<=Sr(r)}catch{return!1}}(u,d,l)?`${String(u).padStart(4,"0")}-${String(d).padStart(2,"0")}-${String(l).padStart(2,"0")}`:void 0}(n,this.locale,this.displayFormat);if(!e)return this.hasUnparseableInput=!0,void this.updateFormState();this.hasUnparseableInput=!1;const r=Or(e);r&&(this.valueDate&&0===Mr(this.valueDate,r)||this.selectDate(r,{origin:"input"}))};handleInputFocus(t){if(this.disabled||this.readonly)return;const n=t.composedPath()[0];(n===this.inputEl||this.inputEl?.contains(n??null))&&(this.initFocusedDate(),this.open=!0)}handleInputKeydown=t=>{this.disabled||this.readonly||["ArrowDown","ArrowUp"," "].includes(t.key)&&(t.preventDefault(),this.open?this.focusGrid():(this.pendingGridFocus=!0,this.initFocusedDate(),this.open=!0))};focusGrid(){requestAnimationFrame((()=>this.focusedButtonRef?.focus()))}handlePopoverOpen=t=>{t.stopPropagation(),console.log("emitting open event"),this.lmvzOpen.emit(),this.pendingGridFocus&&(this.pendingGridFocus=!1,this.focusGrid())};handlePopoverClose=t=>{console.log("handlePopoverClose",t),t.stopPropagation(),this.open=!1,this.lmvzClose.emit()};updateFormState(){const t=this.value;this.internals.setFormValue?.(t??null);const n={};if(this.required&&!this.valueDate&&(n.valueMissing=!0),this.hasUnparseableInput&&(n.badInput=!0),this.valueDate){const t=Or(this.min),e=Or(this.max);t&&Mr(this.valueDate,t)<0&&(n.rangeUnderflow=!0),e&&Mr(this.valueDate,e)>0&&(n.rangeOverflow=!0)}const e=Object.values(n).some(Boolean);this.isInvalid=e,e||(this.nativeError=!1);const r=Yr(this.locale);this.internals.setValidity?.(n,e?this.errorMessage||r.invalidDateMessage:void 0,e?this.el:void 0)}handleInvalid(){this.nativeError=!0}isInvalid=!1;nativeError=!1;get effectivePlaceholder(){return this.placeholder??Tr(this.locale).toLowerCase()}renderHeader(){const{locale:t}=this,n=this.effectiveVisibleMonth,e=function(t){const n=Er[t];if(n)return n;const e=t.split("-")[0];return(void 0!==e?Er[e]:void 0)||{prev:"Vorheriger Monat",next:"Nächster Monat"}}(t),o=wr(Ar(n,{day:1}),t,{month:"long",year:"numeric"}),i=Br(n,-1),a=Br(n,1),s=this.min?Nr(this.min.slice(0,7),Xe):void 0,c=this.max?Nr(this.max.slice(0,7),Xe):void 0,u=this.disabled||void 0!==s&&jr(i,s)<0,d=this.disabled||void 0!==c&&jr(a,c)>0;return r("div",{part:"header",class:"datepicker-header"},r("lmvz-button",{part:"nav-prev",variant:"tertiary",scale:"small","aria-label":e.prev,disabled:u,onLmvzActivation:()=>this.navigateMonth(-1,!0)},r("lmvz-icon",{icon:Vr,"aria-hidden":"true"})),r("span",{id:this.monthLabelId,part:"month-label",class:"datepicker-month-label"},o),r("lmvz-button",{part:"nav-next",variant:"tertiary",scale:"small","aria-label":e.next,disabled:d,onLmvzActivation:()=>this.navigateMonth(1,!0)},r("lmvz-icon",{icon:Wr,"aria-hidden":"true"})))}renderWeekdayRow(){const{locale:t}=this,n=gr({year:2024,month:1,day:1});return r("div",{part:"weekday-row",role:"row",class:"datepicker-weekday-row"},[1,2,3,4,5,6,7].map((e=>{const o=Dr(n,e-1),i=wr(o,t,{weekday:"short"}),a=wr(o,t,{weekday:"long"});return r("span",{part:"weekday",role:"columnheader","aria-label":a,class:"datepicker-weekday",key:e},r("abbr",{title:a},i))})))}renderGrid(){const{locale:t,focusedDate:n}=this,e=this.effectiveVisibleMonth,o=this.valueDate,i=Or(this.min),a=Or(this.max),s=this.visibleDays=function(t){const n=Ar(t,{day:1}),e=Ir(n),r=Dr(n,-(e-1)),o=[];for(let t=0;t<42;t++)o.push(Dr(r,t));return 0!==jr(t,Cr(o.at(-7)))?o.slice(0,-7):o}(e),c={weekday:"long",day:"numeric",month:"long",year:"numeric"},u=[];for(let t=0;t<6&&s.at(7*t);t++)u.push(s.slice(7*t,7*t+7));return r("div",{part:"grid",role:"grid","aria-labelledby":this.monthLabelId,class:"datepicker-grid"},this.renderWeekdayRow(),u.map(((s,u)=>r("div",{part:"week-row",role:"row",class:"datepicker-week-row",key:u},s.map((s=>{const u=Zr(s),d=0===Mr(s,pr()),l=function(t,n){return!!n&&0===Mr(t,n)}(s,o),f=0!==jr(Cr(s),e),h=this.readonly||Pr(s,i,a),m=void 0!==n&&0===Mr(s,n),v=["day"];d&&v.push("day--today"),l&&v.push("day--selected"),f&&v.push("day--out-of-month"),h&&v.push("day--disabled");const y=wr(s,t,c);let p,g=!1;return m&&requestAnimationFrame((()=>{const t=this.el.shadowRoot?.activeElement;t instanceof HTMLButtonElement&&"gridcell"===t.getAttribute("role")&&(g=!0,p?.focus())})),r("button",{"data-debug-id":u,role:"gridcell",type:"button",part:v.join(" "),tabIndex:m?0:-1,"aria-label":y,"aria-selected":l?"true":void 0,"aria-current":d?"date":void 0,"aria-disabled":h?"true":void 0,onClick:()=>{h||this.disabled||this.selectDate(s,{origin:"calendar",closePopover:!0})},ref:t=>{p=t,m&&(this.focusedButtonRef=t)},onFocus:t=>{console.log("focus event on grid cell",u,t.target),this.el.shadowRoot?.contains(t.target)&&(g?g=!1:this.setFocusedDate(s))},key:u},s.day)}))))))}render(){const t=Yr(this.locale),n=this.label?`${this.label} ${t.popoverSuffix}`:void 0;return r(i,{key:"af9d7f075bf97d7eb58c6557f43cf8a245d5f712"},r("lmvz-input",{key:"eef4be58281b8356d443c65c5cf6451192e70f75",ref:t=>{const n=!this.inputEl;this.inputEl=t,n&&this.inputEl&&o(this)},label:this.label??"",placeholder:this.effectivePlaceholder,helperText:this.helperText,errorMessage:this.errorMessage,error:this.nativeError,disabled:this.disabled,readonly:this.readonly,required:this.required,value:this.inputText,autocomplete:"off",onLmvzInput:this.handleInputTextChange,onKeyDown:this.handleInputKeydown},r("lmvz-icon",{key:"fc39ef14720522a8089d33321b918e5577a36cc2",slot:"after-input",icon:Gr,"aria-hidden":"true"})),r("lmvz-popover",{key:"0076c57da02c7c9d0fcb53584f9dc4127317d6a5",anchor:this.inputEl,open:this.open&&!this.disabled,autoFocus:!1,size:"md",label:n,onLmvzOpen:this.handlePopoverOpen,onLmvzClose:this.handlePopoverClose},r("div",{key:"4c1e716e52a5d9ed75155dded3c2c39649e1e844",part:"panel",class:"datepicker-panel"},this.renderHeader(),this.renderGrid())))}static get delegatesFocus(){return!0}static get formAssociated(){return!0}static get watchers(){return{required:[{handleValidityRelevantPropChange:0}],min:[{handleValidityRelevantPropChange:0}],max:[{handleValidityRelevantPropChange:0}],locale:[{handleDisplayFormatChange:0}],displayFormat:[{handleDisplayFormatChange:0}],disabled:[{handleDisabledChange:0}]}}};Jr.style=" @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); } ";export{Jr as lmvz_datepicker}
@@ -0,0 +1 @@
1
+ import{g as e,r as o,c as r,h as c,H as t}from"./p-DVab4vzV.js";import{c as a}from"./p-DAikapVO.js";import{t as s}from"./p-DjvtQE7c.js";import{A as i}from"./p-Wi9d2-w9.js";import{R as l}from"./p-CICeIanv.js";import"./p-D06Ds9Dh.js";import"./p-BDonpCG8.js";const h=s(a);let n=0;const d=class extends l{get el(){return e(this)}get validationEl(){return this.el}internals;nativeInput;checkboxId="lmvz-checkbox-"+n++;initialChecked=!1;get helperId(){return this.helperText?`${this.checkboxId}-helper`:void 0}get errorId(){return this.errorMessage?`${this.checkboxId}-error`:void 0}get ariaDescribedBy(){const e=[this.errorId,this.helperId].filter(Boolean);return e.length>0?e.join(" "):void 0}label;checked=!1;value="on";name;disabled=!1;required=!1;nativeError=!1;errorFromProp=!1;get error(){return this.errorFromProp||this.nativeError}set error(e){this.errorFromProp=e}errorMessage;helperText;form;autofocus=!1;checkedState=!1;handleCheckedChange(e){this.checkedState=e,this.internals.setFormValue?.(e?this.value??"on":null),this.updateValidity()}handleRequiredChange(){this.updateValidity()}lmvzChange;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}async getValidationMessage(){return this.internals?.validationMessage??""}constructor(e){super(),o(this,e),this.lmvzChange=r(this,"lmvzChange",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.addController(new i(this,{reValidateOnPropChanges:!0}))}componentWillLoad(){this.initialChecked=this.checked,this.checkedState=this.checked,this.internals.setFormValue?.(this.checked?this.value??"on":null),this.updateValidity(),super.componentWillLoad()}componentDidLoad(){this.updateValidity(),super.componentDidLoad()}componentWillRender(){this.errorFromProp&&!this.errorMessage&&console.warn("lmvz-checkbox: error=true set without errorMessage — no visual-only error state is rendered. Provide errorMessage to communicate the error to users."),super.componentWillRender()}formAssociatedCallback(){this.internals.setFormValue?.(this.checked?this.value??"on":null)}formResetCallback(){this.checked=this.initialChecked,this.updateValidity()}formStateRestoreCallback(e){this.checked=e===(this.value??"on")}handleChange=e=>{this.checked=e.target.checked,this.lmvzChange.emit(this.checked)};retargetInnerClicks(){this.nativeInput?.click()}updateValidity(){!this.required||this.checked?(this.internals.setValidity?.({}),this.nativeError=!1):this.internals.setValidity?.({valueMissing:!0},"Please check this box.",this.nativeInput)}handleInvalid(){this.nativeError=!0}render(){return c(t,{key:"089b23f8034fa089f358cc37923182c34f528cd2"},c("div",{key:"0af011ebf062332c330b49fa3076828204433ac4",class:"pill"},c("input",{key:"a483a8c5bbe1d6da3cfab63ce32ad2e6392911ff",type:"checkbox",id:this.checkboxId,checked:this.checkedState,disabled:this.disabled,"aria-required":this.required?"true":"false","aria-invalid":this.error?"true":"false","aria-describedby":this.ariaDescribedBy,"aria-errormessage":this.error&&this.errorId?this.errorId:void 0,ref:e=>this.nativeInput=e,onChange:this.handleChange,autoFocus:this.autofocus}),c("span",{key:"f21d34ab625c7eef23bd2761b399e8770cd62275",class:"box","aria-hidden":"true"},this.checkedState&&c("span",{key:"de2680ea17f34ab0124c529d88d4191c97d0a4c5",class:"indicator",innerHTML:h})),c("span",{key:"1b2d24e43603033a5a77340164e002de326db11a",class:"content"},c("label",{key:"b18f17abb4459b3783dc41d0031f4b26795fdcf5",htmlFor:this.checkboxId},this.label),this.helperText&&c("span",{key:"f32591c55fcc88d130815780a9999fcb235afd88",onClick:this.retargetInnerClicks.bind(this),class:"helper-text",id:this.helperId,role:"status"},this.helperText))),this.errorMessage&&c("span",{key:"076489f5baadab07d95fc787e9ac71bae0a6ab68",onClick:this.retargetInnerClicks.bind(this),class:"error-text",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}}};d.style="@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-checkbox-h { display: inline-block; --checkbox-box-size: var(--lmvz-global-s18, 18px); --checkbox-border-radius: var(--lmvz-global-s4, 4px); --checkbox-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --checkbox-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --checkbox-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --checkbox-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --checkbox-border-color-error: var(--lmvz-semantic-color-status-on-danger, #a31419); --checkbox-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --checkbox-wrapper-bg-checked: var(--lmvz-semantic-color-status-active, #f6fbfe); --checkbox-ripple-bg: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --checkbox-checkmark-color: var(--lmvz-semantic-color-border-active, #0f8acc); --checkbox-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --checkbox-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --checkbox-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #545454); --checkbox-error-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --checkbox-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --checkbox-easing: var(--lmvz-global-easing-default, ease); --checkbox-duration: 0.2s; } .pill.sc-lmvz-checkbox { display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); padding-block: var(--lmvz-dimension-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-10-4, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); text-decoration: none; background-color: transparent; transition: background-color var(--checkbox-duration) var(--checkbox-easing); } input.sc-lmvz-checkbox { position: absolute; opacity: 0; width: var(--checkbox-box-size); height: var(--checkbox-box-size); margin: 0; cursor: pointer; z-index: 1; appearance: none; } .box.sc-lmvz-checkbox { display: flex; align-items: center; justify-content: center; width: var(--checkbox-box-size); height: var(--checkbox-box-size); background-color: var(--checkbox-bg); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--checkbox-border-color); border-radius: var(--checkbox-border-radius); color: var(--checkbox-checkmark-color); cursor: pointer; transition: border-color var(--checkbox-duration) var(--checkbox-easing), background-color var(--checkbox-duration) var(--checkbox-easing); pointer-events: none; flex-shrink: 0; } .indicator.sc-lmvz-checkbox { display: flex; align-items: center; justify-content: center; line-height: 0; } .content.sc-lmvz-checkbox { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; cursor: pointer; } label.sc-lmvz-checkbox { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--checkbox-label-color); transition: color var(--checkbox-duration) var(--checkbox-easing); cursor: pointer; } .helper-text.sc-lmvz-checkbox { font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--checkbox-helper-color); margin-block-start: 2px; } .error-text.sc-lmvz-checkbox { font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--checkbox-error-color); display: block; margin-block-start: 4px; padding-inline: 10px; } @media (hover: hover) { .pill.sc-lmvz-checkbox:hover { background-color: var(--checkbox-wrapper-bg-hover); } .pill.sc-lmvz-checkbox:hover .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-hover); } } [checked].sc-lmvz-checkbox-h .pill.sc-lmvz-checkbox { background-color: var(--checkbox-wrapper-bg-checked); } [checked].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-checked); } [checked].sc-lmvz-checkbox-h label.sc-lmvz-checkbox { color: var(--checkbox-label-color-checked); } [error].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: var(--checkbox-border-color-error); } [error].sc-lmvz-checkbox-h .helper-text.sc-lmvz-checkbox { color: var(--checkbox-error-color); } [disabled].sc-lmvz-checkbox-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; input, label, .box, .content { cursor: not-allowed; } } .sc-lmvz-checkbox-h:has(:focus-visible) .pill.sc-lmvz-checkbox { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } @media (forced-colors: active) { .box.sc-lmvz-checkbox { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-checkbox-h .box.sc-lmvz-checkbox { border-color: Highlight; background-color: Field; } .indicator.sc-lmvz-checkbox { color: ButtonText; } [checked].sc-lmvz-checkbox-h .indicator.sc-lmvz-checkbox { color: HighlightText; } .sc-lmvz-checkbox-h:has(:focus-visible) .pill.sc-lmvz-checkbox { outline-color: Highlight; box-shadow: none; } }";export{d as lmvz_checkbox}