@sbb-esta/lyne-elements-dev 5.15.0-dev.1796133415 → 5.15.0-dev.1796137118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/carousel.pure.js +6 -6
- package/clock.pure.js +11 -11
- package/core.js +10 -10
- package/custom-elements.json +282 -99
- package/development/carousel/carousel-list/carousel-list.component.d.ts +1 -0
- package/development/carousel.pure.js +4 -3
- package/development/clock/clock.component.d.ts +1 -0
- package/development/clock.pure.js +14 -16
- package/development/core/controllers/host-styles-controller.d.ts +14 -0
- package/development/core/mixins/dynamic-styleheet-mixin.d.ts +1 -0
- package/development/core.d.ts +2 -1
- package/development/core.js +134 -95
- package/development/flip-card/flip-card/flip-card.component.d.ts +1 -0
- package/development/flip-card.pure.js +3 -2
- package/development/menu/menu/menu.component.d.ts +1 -0
- package/development/menu.pure.js +3 -4
- package/development/mini-calendar/mini-calendar-month/mini-calendar-month.component.d.ts +1 -0
- package/development/mini-calendar.pure.js +3 -2
- package/development/navigation/navigation-marker/navigation-marker.component.d.ts +1 -0
- package/development/navigation.pure.js +3 -2
- package/development/notification/notification.component.d.ts +1 -0
- package/development/notification.pure.js +3 -2
- package/development/popover/popover-base/popover-base.d.ts +1 -0
- package/development/popover.pure.js +3 -5
- package/development/sidebar/sidebar-container/sidebar-container.component.d.ts +2 -1
- package/development/sidebar.pure.js +7 -5
- package/development/slider/slider.component.d.ts +1 -0
- package/development/slider.pure.js +3 -2
- package/development/stepper/stepper/stepper.component.d.ts +1 -0
- package/development/stepper.pure.js +6 -5
- package/development/tabs/tab-group/tab-group.component.d.ts +1 -0
- package/development/tabs/tab-nav-bar/tab-nav-bar.component.d.ts +1 -0
- package/development/tabs.pure.js +8 -6
- package/development/toggle/toggle/toggle.component.d.ts +1 -0
- package/development/toggle.pure.js +4 -4
- package/development/tooltip/tooltip.component.d.ts +2 -1
- package/development/tooltip.pure.js +7 -4
- package/development/train.pure.js +4 -17
- package/flip-card.pure.js +8 -8
- package/menu.pure.js +8 -8
- package/mini-calendar.pure.js +5 -5
- package/navigation.pure.js +12 -12
- package/notification.pure.js +4 -4
- package/package.json +2 -2
- package/popover.pure.js +5 -5
- package/sidebar.pure.js +11 -11
- package/slider.pure.js +3 -3
- package/stepper.pure.js +7 -7
- package/tabs.pure.js +11 -11
- package/toggle.pure.js +4 -4
- package/tooltip.pure.js +2 -2
- package/train.pure.js +24 -29
package/carousel.pure.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{html as e,unsafeCSS as t}from"lit";import{SbbElement as n,
|
|
2
|
-
`,
|
|
3
|
-
`,
|
|
4
|
-
`;let
|
|
1
|
+
import{html as e,unsafeCSS as t}from"lit";import{SbbElement as n,SbbHostStylesController as r,SbbLanguageController as i,forceType as a,i18nCarouselArrowsNavigationHint as o,i18nCarouselItemAriaLabel as s,i18nNextSlide as c,i18nPreviousSlide as l,i18nSlide as u,isArrowKeyPressed as d,screenReaderOnlyStyles as f}from"./core.js";import{IntersectionController as p}from"@lit-labs/observers/intersection-controller.js";import{ResizeController as m}from"@lit-labs/observers/resize-controller.js";import{__esDecorate as h,__runInitializers as g}from"tslib";import{property as _}from"lit/decorators.js";var v=`:host{scroll-snap-align:start;flex-shrink:0;display:flex}
|
|
2
|
+
`,y=class extends Event{get index(){return this._index}constructor(e,{index:t}){super(e,{bubbles:!0,composed:!0}),this._index=t}},b=class extends n{static{this.elementName=`sbb-carousel-item`}static{this.styles=[t(v)]}static{this.events={beforeshow:`beforeshow`,show:`show`}}connectedCallback(){super.connectedCallback(),this.internals.role=`group`,this.internals.ariaRoleDescription=`slide`}render(){return e`<slot></slot>`}},x=`:host{height:var(--sbb-carousel-list-height);width:var(--sbb-carousel-list-width,0);scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;border-radius:var(--sbb-carousel-inherit-border-radius);outline:none;display:flex;overflow-x:auto}:host(:focus-visible):before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width);content:"";height:inherit;width:inherit;border-start-start-radius:var(--sbb-carousel-list-border-radius);border-start-end-radius:var(--sbb-carousel-list-border-radius);border-end-end-radius:var(--sbb-carousel-inherit-border-radius);border-end-start-radius:var(--sbb-carousel-inherit-border-radius);position:absolute}
|
|
3
|
+
`,S=class extends n{static{this.elementName=`sbb-carousel-list`}static{this.styles=[t(x)]}constructor(){super(),this._currentIndex=0,this._language=new i(this),this._hostStyles=new r(this),this._observedCarouselItems=[],this._beforeShowObserver=new p(this,{target:null,callback:e=>{e.filter(e=>e.isIntersecting&&e.target!==this).forEach(e=>{let t=e.target;t.dispatchEvent(new y(`beforeshow`,{index:this._carouselItems().findIndex(e=>e===t)}))})},config:{threshold:.01,root:this,rootMargin:`100% 0% 100% 0%`}}),this._showObserver=new p(this,{target:null,callback:e=>{for(let t of e){if(t.target===this)continue;let e=t.target;t.isIntersecting?(e.ariaHidden=null,this._currentIndex=this._carouselItems().findIndex(t=>t===e),e.dispatchEvent(new y(`show`,{index:this._currentIndex}))):e.ariaHidden=`true`}},config:{threshold:.99,root:this,rootMargin:`100% 0% 100% 0%`}}),this._resizeObserverController=new m(this,{skipInitial:!0,callback:()=>this._readDimensions()}),this.addEventListener?.(`keydown`,e=>this._onKeyDown(e))}_carouselItems(){return Array.from(this.querySelectorAll?.(`sbb-carousel-item`)??[])}_handleSlotchange(){this._observedCarouselItems.forEach(e=>{this._beforeShowObserver.unobserve(e),this._showObserver.unobserve(e)});let e=this._carouselItems();e.forEach((t,n)=>{t.ariaLabel||=s(n+1,e.length)[this._language.current],t.ariaHidden=n===this._currentIndex?null:`true`}),this._readDimensions()}_readDimensions(){let e=this._carouselItems();if(e.length===0)return;let t=e[0];t.clientHeight>0&&this._hostStyles.set(`--sbb-carousel-list-height`,`${t.clientHeight}px`),t.clientWidth>0&&(this._hostStyles.set(`--sbb-carousel-list-width`,`${t.clientWidth}px`),e.forEach(e=>{this._beforeShowObserver.observe(e),this._showObserver.observe(e)}),this._observedCarouselItems=e,this._resizeObserverController.unobserve(this))}_onKeyDown(e){if(!d(e))return;e.preventDefault();let t=this._currentIndex,n=e.key===`ArrowUp`||e.key===`ArrowLeft`,r=e.key===`ArrowDown`||e.key===`ArrowRight`;n?t=Math.max(0,this._currentIndex-1):r&&(t=Math.min(this._carouselItems().length-1,this._currentIndex+1)),t!==this._currentIndex&&(this._currentIndex=t,this.scrollTo({left:this._carouselItems()[this._currentIndex].offsetLeft-this.offsetLeft}))}connectedCallback(){super.connectedCallback(),this.internals.ariaLive=`polite`,this.internals.ariaAtomic=`true`}render(){return e`<slot @slotchange=${this._handleSlotchange}></slot>`}},C=`:host{border-radius:var(--sbb-carousel-border-radius) var(--sbb-carousel-border-radius) 0 0;display:inline-block;overflow:hidden}:host([shadow]){box-shadow:var(--sbb-carousel-box-shadow);border-radius:var(--sbb-carousel-border-radius)}:host(:not([shadow])) ::slotted(sbb-carousel-list){--sbb-carousel-inherit-border-radius:var(--sbb-carousel-border-radius)}.sbb-carousel{background-color:var(--sbb-carousel-background-color);flex-direction:column;justify-content:center;align-items:center;display:flex}::slotted(sbb-compact-paginator){padding:var(--sbb-carousel-paginator-padding)}
|
|
4
|
+
`;let w=(()=>{let r=n,s,d=[],p=[];return class extends r{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;s=[a(),_({reflect:!0,type:Boolean})],h(this,null,s,{kind:`accessor`,name:`shadow`,static:!1,private:!1,access:{has:e=>`shadow`in e,get:e=>e.shadow,set:(e,t)=>{e.shadow=t}},metadata:e},d,p),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementName=`sbb-carousel`}static{this.styles=[f,t(C)]}#e;get shadow(){return this.#e}set shadow(e){this.#e=e}constructor(){super(),this.#e=g(this,d,!1),this._paginator=(g(this,p),null),this._abortController=null,this._language=new i(this),this._requestedPageIndexByPaginator=-1,this.addEventListener?.(`show`,e=>{(this._requestedPageIndexByPaginator===-1||this._requestedPageIndexByPaginator===e.index)&&(this._paginator&&e.index!==this._paginator.pageIndex&&(this._paginator.pageIndex=e.index),this._requestedPageIndexByPaginator=-1)})}connectedCallback(){super.connectedCallback(),this.internals.role=`region`,this.internals.ariaLabel=`carousel`,this._setupPaginator()}firstUpdated(e){super.firstUpdated(e),this.internals.ariaDescribedByElements=[this.shadowRoot.querySelector(`#sbb-carousel-arrows-navigation-hint`)]}disconnectedCallback(){super.disconnectedCallback(),this._abortController?.abort()}_handleSlotchange(){let e=Array.from(this.children).find(e=>e.localName===`sbb-compact-paginator`),t=Array.from(this.children).find(e=>e.localName===`sbb-carousel-list`);if(!e||!t)return;let n=t.querySelectorAll(`sbb-carousel-item`);n&&n.length>0&&(e.length=n.length,e.pageSize=1),e.accessibilityNextPageLabel||=c[this._language.current],e.accessibilityPreviousPageLabel||=l[this._language.current],e.accessibilityPageLabel||=u[this._language.current],e!==this._paginator&&(this._paginator=e,this._setupPaginator())}_setupPaginator(){this._abortController?.abort(),this._paginator&&(this._abortController=new AbortController,this._paginator.addEventListener(`click`,()=>this._scrollAtPaginatorChange(),{signal:this._abortController.signal}))}_scrollAtPaginatorChange(){if(!this._paginator)return;this._requestedPageIndexByPaginator=this._paginator.pageIndex;let e=this.querySelector(`sbb-carousel-list`);if(e){let t=e.querySelectorAll(`sbb-carousel-item`)[this._paginator.pageIndex].offsetLeft-this.offsetLeft;(e.clientWidth<=100||Math.abs(e.scrollLeft-t)>50)&&e.scrollTo({left:t})}}render(){return e`
|
|
5
5
|
<div class="sbb-carousel">
|
|
6
6
|
<span class="sbb-screen-reader-only" id="sbb-carousel-arrows-navigation-hint"
|
|
7
|
-
>${
|
|
7
|
+
>${o[this._language.current]}</span
|
|
8
8
|
>
|
|
9
9
|
<slot @slotchange=${this._handleSlotchange}></slot>
|
|
10
10
|
</div>
|
|
11
|
-
`}}})();export{
|
|
11
|
+
`}}})();export{w as SbbCarouselElement,b as SbbCarouselItemElement,y as SbbCarouselItemShowEvent,S as SbbCarouselListElement};
|
package/clock.pure.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{__esDecorate as e,__runInitializers as t}from"tslib";import{html as n,isServer as r,unsafeCSS as i}from"lit";import{property as a}from"lit/decorators.js";import{ref as o}from"lit/directives/ref.js";import{SbbElement as s}from"./core.js";var
|
|
2
|
-
`,
|
|
3
|
-
`,
|
|
4
|
-
`,
|
|
5
|
-
`,
|
|
6
|
-
`;const
|
|
7
|
-
<span class="sbb-clock__face" .innerHTML=${
|
|
1
|
+
import{__esDecorate as e,__runInitializers as t}from"tslib";import{html as n,isServer as r,unsafeCSS as i}from"lit";import{property as a}from"lit/decorators.js";import{ref as o}from"lit/directives/ref.js";import{SbbElement as s,SbbHostStylesController as c}from"./core.js";var l=`<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><g class="face"><circle fill="var(--sbb-clock-background-color)" cx="52.5" cy="52.5" r="52.5"/><path d="M50.75 4h3.5v12h-3.5zM50.75 89h3.5v12h-3.5zM75.233 9.623l3.03 1.75-6 10.392-3.03-1.75zM32.734 83.233l3.03 1.75-6 10.392-3.03-1.75zM93.628 26.732l1.75 3.031-10.392 6-1.75-3.03zM20.017 69.234l1.75 3.031-10.392 6-1.75-3.03zM101 50.75v3.5H89v-3.5zM16 50.75v3.5H4v-3.5zM95.379 75.232l-1.75 3.031-10.392-6 1.75-3.03zM21.766 32.734l-1.75 3.031-10.392-6 1.75-3.03zM78.267 93.63l-3.03 1.75-6-10.393 3.03-1.75zM35.766 20.015l-3.03 1.75-6-10.392 3.03-1.75z"/><g><path d="M56.873 4.19l1.392.147-.366 3.48-1.392-.145zM47.101 97.177l1.393.146-.366 3.481-1.392-.146zM61.896 4.914l1.37.29-.728 3.424-1.37-.29zM42.458 96.366l1.37.29-.728 3.424-1.37-.291zM66.825 6.157l1.332.432-1.082 3.33-1.331-.434zM37.931 95.085l1.332.432-1.082 3.33-1.331-.433zM71.584 7.906l1.28.569-1.424 3.197-1.28-.57zM33.56 93.32l1.278.569-1.423 3.197-1.28-.57zM80.44 12.852l1.133.823-2.058 2.831-1.132-.823zM25.481 88.494l1.133.822-2.057 2.832-1.133-.823zM84.43 15.986l1.04.937-2.342 2.6-1.04-.936zM21.87 85.469l1.04.936-2.341 2.601-1.04-.937zM88.072 19.522l.937 1.04-2.6 2.343-.937-1.04zM18.593 82.088l.937 1.04-2.601 2.342-.937-1.04zM91.328 23.425l.823 1.133-2.832 2.057-.823-1.132zM15.684 78.385l.823 1.132-2.832 2.058-.822-1.133zM96.52 32.128l.57 1.279-3.198 1.423-.57-1.278zM11.109 70.161l.569 1.279-3.197 1.423-.57-1.279zM98.407 36.85l.433 1.332-3.33 1.081-.432-1.331zM9.483 65.74l.432 1.33-3.329 1.082-.432-1.331zM99.795 41.726l.291 1.37-3.423.727-.29-1.37zM8.34 61.17l.292 1.37-3.424.728-.29-1.37zM100.66 46.73l.146 1.393-3.48.366-.147-1.392zM7.674 56.506l.146 1.392-3.48.366-.147-1.392zM100.811 56.873l-.146 1.392-3.48-.365.145-1.393zM7.821 47.101l-.146 1.392-3.48-.365.145-1.393zM100.09 61.895l-.291 1.369-3.424-.728.291-1.369zM8.631 42.46l-.291 1.37-3.423-.728.29-1.37zM98.84 66.827l-.432 1.331-3.329-1.081.433-1.332zM9.918 37.93l-.433 1.331-3.329-1.082.433-1.331zM97.098 71.585l-.569 1.28-3.197-1.424.57-1.28zM11.677 33.558l-.57 1.28-3.197-1.424.57-1.279zM92.149 80.439l-.823 1.133-2.832-2.058.823-1.132zM16.506 25.482l-.823 1.133-2.831-2.057.823-1.133zM89.017 84.431l-.937 1.04-2.6-2.341.936-1.04zM19.528 21.869l-.936 1.04-2.601-2.342.936-1.04zM85.48 88.076l-1.041.936-2.342-2.6 1.04-.937zM22.91 18.59l-1.04.937-2.341-2.601 1.04-.937zM81.574 91.328l-1.133.823-2.057-2.831 1.132-.823zM26.617 15.684l-1.133.823-2.057-2.832 1.132-.823zM72.873 96.524l-1.279.57-1.423-3.198 1.278-.57zM34.838 11.105l-1.279.57-1.423-3.198 1.279-.57zM68.151 98.405l-1.331.432-1.082-3.329 1.332-.432zM39.259 9.485l-1.332.433-1.081-3.33 1.331-.432zM63.272 99.799l-1.369.29-.728-3.422 1.37-.291zM43.83 8.337l-1.369.291-.727-3.423 1.37-.291zM58.27 100.662l-1.393.146-.366-3.48 1.393-.147zM48.494 7.672l-1.392.147-.366-3.481 1.392-.147z"/></g></g></svg>
|
|
2
|
+
`,u=`<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path id="mod_clock_svg_hours" d="M55.7 64.5h-6.4l.6-44h5.2z"/></svg>
|
|
3
|
+
`,d=`<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M55.1,64.5h-5.2l0.8-58h3.6L55.1,64.5z"/></svg>
|
|
4
|
+
`,f=`<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M57.8,21.3c0-2.9-2.4-5.2-5.2-5.2s-5.3,2.3-5.3,5.2c0,2.7,2,4.8,4.5,5.2V69h1.5V26.5C55.8,26.2,57.8,24,57.8,21.3z"/></svg>
|
|
5
|
+
`,p=`:host{aspect-ratio:1;contain:content;display:block;position:relative;overflow:hidden}.sbb-clock__face,.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds{transform-origin:50%;transform-style:preserve-3d;backface-visibility:hidden;position:absolute;inset:0;transform:rotate(0)}.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__face{fill:var(--sbb-clock-face-color)}.sbb-clock__hand-minutes{transform:var(--sbb-clock-minutes-transform,rotateZ(0deg));transition:transform var(--sbb-disable-animation-duration,.2s) cubic-bezier(.4, 2.08, .55, .44)}@supports not (aspect-ratio:1/1){.sbb-clock__hand-minutes{transform-origin:50% 49.625%}}.sbb-clock__hand-hours{transform:var(--sbb-clock-hours-transform,rotateZ(0deg));animation-name:rotate;animation-duration:43200s;animation-timing-function:linear;animation-iteration-count:infinite;animation-play-state:var(--sbb-clock-animation-play-state,"paused")}.sbb-clock__hand-hours--initial-hour{animation-name:hand-hours-animation-initial-hour;animation-duration:var(--sbb-clock-hours-animation-duration,0s);animation-play-state:var(--sbb-clock-animation-play-state,"paused");animation-iteration-count:1}.sbb-clock__hand-minutes--no-transition{transition:none}.sbb-clock__hand-seconds{animation-name:var(--sbb-clock-seconds-animation-pause,hand-seconds-animation);animation-duration:60s;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state,"paused");fill:var(--sbb-clock-seconds-hand-color);animation-iteration-count:infinite}.sbb-clock__hand-seconds--initial-minute{animation-name:hand-seconds-animation-initial-minute;animation-duration:var(--sbb-clock-seconds-animation-duration,0s);animation-play-state:var(--sbb-clock-animation-play-state,"paused");animation-iteration-count:1}:host(:not(:is(:state(initialized),[state--initialized]))) :is(.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds){display:none}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes hand-hours-animation-initial-hour{0%{transform:rotateZ(var(--sbb-clock-hours-animation-start-angle,0deg))}to{transform:rotate(360deg)}}@keyframes hand-seconds-animation{0%{transform:rotate(0)}97.5%,to{transform:rotate(360deg)}}@keyframes hand-seconds-animation-initial-minute{0%{transform:rotateZ(var(--sbb-clock-seconds-animation-start-angle,0deg))}97.5%,to{transform:rotate(360deg)}}
|
|
6
|
+
`;const m={once:!0,passive:!0};let h=(()=>{let h=s,g,_=[],v=[];return class extends h{constructor(){super(...arguments),this.#e=t(this,_,null),this._state=(t(this,v),`paused`),this._hostStyles=new c(this),this._moveHoursHandFn=()=>this._moveHoursHand(),this._moveMinutesHandFn=()=>this._moveMinutesHand(),this._handlePageVisibilityChange=()=>{this.now||(document.visibilityState===`hidden`?this._stopClock():this._startClock())}}static{let t=typeof Symbol==`function`&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;g=[a()],e(this,null,g,{kind:`accessor`,name:`now`,static:!1,private:!1,access:{has:e=>`now`in e,get:e=>e.now,set:(e,t)=>{e.now=t}},metadata:t},_,v),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static{this.elementName=`sbb-clock`}static{this.styles=[i(p)]}#e;get now(){return this.#e}set now(e){this.#e=e}connectedCallback(){super.connectedCallback(),this._resetIntervalId=setInterval(()=>this._resetClock(),18e5)}willUpdate(e){super.willUpdate(e),!r&&this.hasUpdated&&e.has(`now`)&&this._startOrConfigureClock()}firstUpdated(e){super.firstUpdated(e),r||(document.addEventListener(`visibilitychange`,this._handlePageVisibilityChange,!1),this._startOrConfigureClock())}disconnectedCallback(){super.disconnectedCallback(),this._removeEventListeners(),clearInterval(this._resetIntervalId)}_startOrConfigureClock(){this.now?(this._stopClock(),this._resetSecondsHandAnimation(),this._setHandsStartingPosition()):this._startClock()}_startClock(){this._clockHandHours?.addEventListener(`animationend`,this._moveHoursHandFn,m),this._clockHandSeconds?.addEventListener(`animationend`,this._moveMinutesHandFn,m),this._setHandsStartingPosition(),this._hostStyles.set(`--sbb-clock-animation-play-state`,`running`),this._state=`running`}_stopClock(){clearInterval(this._handMovement),this._removeSecondsAnimationStyles(),this._removeHoursAnimationStyles(),this._clockHandHours?.removeEventListener(`animationend`,this._moveHoursHandFn),this._clockHandSeconds?.removeEventListener(`animationend`,this._moveMinutesHandFn),this._clockHandMinutes?.classList.add(`sbb-clock__hand-minutes--no-transition`),this._hostStyles.set(`--sbb-clock-animation-play-state`,`paused`),this._state=`paused`}async _resetClock(){this._state===`running`&&(this._stopClock(),setTimeout(()=>this._startClock(),50))}_setHandsStartingPosition(){this._assignCurrentTime();let e=60-this._seconds,t=60-this._minutes,n=12-this._hours,r=0,i=0;e>0&&(r+=e,i=1),t>0&&(r+=(t-i)*60,i=1),n>0&&(r+=(n-i)*3600),this._hostStyles.set(`--sbb-clock-hours-animation-start-angle`,`${Math.ceil(this._hours*30+this._minutes/2)}deg`).set(`--sbb-clock-hours-animation-duration`,`${r}s`).set(`--sbb-clock-seconds-animation-start-angle`,`${Math.ceil(this._seconds*6.153846153846154)}deg`).set(`--sbb-clock-seconds-animation-duration`,`${e}s`),this._setMinutesHand(),this._clockHandSeconds?.classList.add(`sbb-clock__hand-seconds--initial-minute`),this._clockHandHours?.classList.add(`sbb-clock__hand-hours--initial-hour`),this.internals.states.add(`initialized`)}_assignCurrentTime(){let e=this.now?null:/* @__PURE__ */ new Date,[t,n,r]=e?[e.getHours(),e.getMinutes(),e.getSeconds()]:this.now.split(`:`).map(e=>+e);this._hours=t%12,this._minutes=n,this._seconds=r}_setMinutesHand(){this._hostStyles.set(`--sbb-clock-minutes-transform`,`rotateZ(${Math.ceil(this._minutes*6)}deg)`)}_moveHoursHand(){this._removeHoursAnimationStyles();let e=Math.ceil(this._hours*30+this._minutes/2);e>=360&&(e-=360),this._hostStyles.set(`--sbb-clock-hours-transform`,`rotateZ(${e}deg)`)}_moveMinutesHand(){this._clockHandSeconds?.removeEventListener(`animationend`,this._moveMinutesHandFn),this._removeSecondsAnimationStyles(),this._addMinutesAndSetHands(),this._handMovement=setInterval(()=>this._addMinutesAndSetHands(),6e4)}_addMinutesAndSetHands(){this._minutes++,this._setMinutesHand()}_resetSecondsHandAnimation(){this._clockHandSeconds&&(this._hostStyles.set(`--sbb-clock-seconds-animation-pause`,``),this._clockHandSeconds.offsetHeight,this._hostStyles.delete(`--sbb-clock-seconds-animation-pause`))}_removeEventListeners(){document?.removeEventListener(`visibilitychange`,this._handlePageVisibilityChange),this._clockHandHours?.removeEventListener(`animationend`,this._moveHoursHandFn),this._clockHandSeconds?.removeEventListener(`animationend`,this._moveMinutesHandFn),clearInterval(this._handMovement)}_removeHoursAnimationStyles(){this._clockHandHours?.classList.remove(`sbb-clock__hand-hours--initial-hour`),this._hostStyles.delete(`--sbb-clock-hours-animation-start-angle`),this._hostStyles.delete(`--sbb-clock-hours-animation-duration`)}_removeSecondsAnimationStyles(){this._clockHandSeconds?.classList.remove(`sbb-clock__hand-seconds--initial-minute`),this._clockHandMinutes?.classList.remove(`sbb-clock__hand-minutes--no-transition`),this._hostStyles.delete(`--sbb-clock-seconds-animation-start-angle`),this._hostStyles.delete(`--sbb-clock-seconds-animation-duration`)}render(){return n`
|
|
7
|
+
<span class="sbb-clock__face" .innerHTML=${l}></span>
|
|
8
8
|
<span
|
|
9
9
|
class="sbb-clock__hand-hours"
|
|
10
|
-
.innerHTML=${
|
|
10
|
+
.innerHTML=${u}
|
|
11
11
|
${o(e=>{this._clockHandHours=e})}
|
|
12
12
|
></span>
|
|
13
13
|
<span
|
|
14
14
|
class="sbb-clock__hand-minutes sbb-clock__hand-minutes--no-transition"
|
|
15
|
-
.innerHTML=${
|
|
15
|
+
.innerHTML=${d}
|
|
16
16
|
${o(e=>{this._clockHandMinutes=e})}
|
|
17
17
|
></span>
|
|
18
18
|
<span
|
|
19
19
|
class="sbb-clock__hand-seconds"
|
|
20
|
-
.innerHTML=${
|
|
20
|
+
.innerHTML=${f}
|
|
21
21
|
${o(e=>{this._clockHandSeconds=e})}
|
|
22
22
|
></span>
|
|
23
|
-
`}}})();export{
|
|
23
|
+
`}}})();export{h as SbbClockElement};
|
package/core.js
CHANGED
|
@@ -40,15 +40,15 @@ let xe=0;var Se=class{constructor(){r||(document.body?this._liveElement=this._cr
|
|
|
40
40
|
`;let Xn=(()=>{let e=V(H(P)),t,r=[],i=[],c,u=[],f=[],p,m=[],h=[];return class extends e{static{let n=typeof Symbol==`function`&&Symbol.metadata?Object.create(e[Symbol.metadata]??null):void 0;t=[l()],c=[l({attribute:`horizontal-from`,reflect:!0})],p=[l({reflect:!0})],o(this,null,t,{kind:`accessor`,name:`size`,static:!1,private:!1,access:{has:e=>`size`in e,get:e=>e.size,set:(e,t)=>{e.size=t}},metadata:n},r,i),o(this,null,c,{kind:`accessor`,name:`horizontalFrom`,static:!1,private:!1,access:{has:e=>`horizontalFrom`in e,get:e=>e.horizontalFrom,set:(e,t)=>{e.horizontalFrom=t}},metadata:n},u,f),o(this,null,p,{kind:`accessor`,name:`orientation`,static:!1,private:!1,access:{has:e=>`orientation`in e,get:e=>e.orientation,set:(e,t)=>{e.orientation=t}},metadata:n},m,h),n&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}static{this.styles=[a(Yn)]}#e=s(this,r,null);get size(){return this.#e}set size(e){this.#e=e}#t=(s(this,i),s(this,u,null));get horizontalFrom(){return this.#t}set horizontalFrom(e){this.#t=e}#n=(s(this,f),s(this,m,`horizontal`));get orientation(){return this.#n}set orientation(e){this.#n=e}get selectionElements(){return Array.from(this.querySelectorAll?.(this.selectionElementSelectors)??[]).filter(e=>e.closest?.(this.localName)===this)}constructor(){super(),s(this,h),this.addController(new d(this,{config:{childList:!0,subtree:!0},callback:()=>this.toggleState(`has-panel`,!!this.querySelector?.(this.panelElementSelector))}))}onSlotChange(){}render(){return n`
|
|
41
41
|
<slot @slotchange=${()=>this.onSlotChange()}></slot>
|
|
42
42
|
<slot name="error"></slot>
|
|
43
|
-
`}}})();var Zn=class{get size(){return this._handlers.size}constructor(e,t){this._host=e,this._property=t,this._handlers=/* @__PURE__ */ new Set,this._hostDefinedPromise=null,r||(customElements.get(this._host.localName)?customElements.upgrade(this._host):this._hostDefinedPromise=customElements.whenDefined(this._host.localName).then(()=>{customElements.upgrade(this._host),this._hostDefinedPromise=null})),this._value=this._host[this._property]}addHandler(e){this._handlers.size||(this._host.addController?this._host.addController(this):this._hostDefinedPromise&&this._hostDefinedPromise.then(()=>this._host.addController(this))),this._handlers.add(e),this._hostDefinedPromise?this._hostDefinedPromise.then(()=>e(this._host)):e(this._host)}removeHandler(e){this._handlers.delete(e),this._handlers.size||(this._host.removeController?this._host.removeController(this):this._hostDefinedPromise&&this._hostDefinedPromise.then(()=>this._host.removeController(this)))}hostUpdate(){let e=this._host[this._property];if(this._value!==e){this._value=e;for(let e of this._handlers)e(this._host)}}};const U=/* @__PURE__ */ new WeakMap;var Qn=class{constructor(e,t,n){this._host=e,this._referenceResolver=t,this._handlers=n,this._host.addController(this)}hostConnected(){this.connect()}hostDisconnected(){this._reference!==this._referenceResolver()&&this.disconnect()}connect(){let e=this._referenceResolver();if(this._reference===e||(this.disconnect(),this._reference=e,!this._reference))return;let t=U.get(this._reference);t||(t=/* @__PURE__ */ new Map,U.set(this._reference,t)),this._watchers=t;for(let[e,t]of Object.entries(this._handlers)){let n=this._watchers.get(e);n||(n=new Zn(this._reference,e),this._watchers.set(e,n)),n.addHandler(t)}}disconnect(){if(this._reference){for(let[e,t]of Object.entries(this._handlers)){let n=this._watchers?.get(e);n&&(n.removeHandler(t),n.size||(this._watchers.delete(e),!this._watchers.size&&this._reference&&U.delete(this._reference)))}this._reference=null}}};const $n=[];r||window.addEventListener(`keydown`,e=>{e.key===`Escape`&&!e.defaultPrevented&&(e.preventDefault(),$n.at(-1)?.escapeStrategy())});var er=class{constructor(e,t=$n){this._host=e,this._overlayStack=t,this._host.addController?.(this)}hostDisconnected(){this.disconnect()}connect(){this.disconnect(),this._overlayStack.push(this._host)}disconnect(){if(this._overlayStack.length){let e=this._overlayStack.findIndex(e=>e===this._host);e!==-1&&this._overlayStack.splice(e,1)}}};const tr=/* @__PURE__ */ new WeakMap;var nr=class{constructor(e,t,n=tr){this._host=e,this._idRef=t,this._observers=n,this._rootNode=null,this._host.addController(this)}hostConnected(){if(r)return;this._rootNode=this._host.getRootNode();let e=this._observers.get(this._rootNode);if(e)e.controllers.add(this);else{let e=/* @__PURE__ */ new Set([this]),t=new MutationObserver(t=>{let n=/* @__PURE__ */ new Set;for(let e of t)if(e.type===`attributes`)n.add(e.oldValue),n.add(e.target.id);else if(e.type===`childList`)for(let t of[...e.addedNodes,...e.removedNodes])t instanceof HTMLElement&&(n.add(t.id),t.querySelectorAll(`[id]`).forEach(e=>n.add(e.id)));for(let t of e){let e=t._host[t._idRef];e&&typeof e==`string`&&n.has(e)&&t._host.requestUpdate()}});t.observe(this._rootNode,{attributeFilter:[`id`],childList:!0,subtree:!0,attributeOldValue:!0}),this._observers.set(this._rootNode,{observer:t,controllers:e})}}hostDisconnected(){if(r||!this._rootNode)return;let e=this._observers.get(this._rootNode);e&&(e.controllers.delete(this),e.controllers.size===0&&(e.observer.disconnect(),this._observers.delete(this._rootNode))),this._rootNode=null}find(){if(r||!this._rootNode)return null;{let e=this._host[this._idRef];return typeof e==`string`?this._rootNode?.getElementById(e):null}}};const rr=[`script`,`head`,`template`,`style`,`link`],ir=/* @__PURE__ */ new Set,ar=/* @__PURE__ */ new Set,or=/* @__PURE__ */ new Set;var sr=class{constructor(e,t=ir,n=or,r=ar){this._host=e,this._inertElements=t,this._inertOverlays=n,this._exemptedElements=r,this._host.addController?.(this)}hostConnected(){this._host.isOpen&&this.activate()}hostDisconnected(){this.isInert()&&this.deactivate()}activate(){this._inertOverlays.size&&this._removeAllInertAttributes(),this._inertOverlays.add(this._host),this._addAllInertAttributes()}deactivate(){this._currentOverlay()===this._host?(this._removeAllInertAttributes(),this._inertOverlays.delete(this._host),this._inertOverlays.size&&this._addAllInertAttributes()):this._inertOverlays.has(this._host)&&this._inertOverlays.delete(this._host)}isInert(){return this._inertOverlays.has(this._host)}exempt(e){this._inertElements.has(e)&&!this._exemptedElements.has(e)&&(this._removeInertAttributes(e),this._inertElements.delete(e),this._exemptedElements.add(e))}restoreAllExempted(){this._exemptedElements.forEach(e=>this._addInertAttributes(e)),this._exemptedElements.clear()}_currentOverlay(){return[...this._inertOverlays].pop()??null}_removeAllInertAttributes(){this._inertElements.forEach(e=>this._removeInertAttributes(e)),this._inertElements.clear()}_removeInertAttributes(e){e&&(e.hasAttribute(`data-sbb-inert`)&&(e.inert=!1,e.removeAttribute(`data-sbb-inert`)),e.hasAttribute(`data-sbb-aria-hidden`)&&(e.removeAttribute(`aria-hidden`),e.removeAttribute(`data-sbb-aria-hidden`)))}_addAllInertAttributes(){let e=this._currentOverlay(),t=e?[e]:[],n=[document.documentElement];for(;n.length>0;)for(let e of n.shift().querySelectorAll(`*`))e.matches(`sbb-toast,.sbb-overlay-outlet,.sbb-live-announcer-element,.cdk-live-announcer-element,.cdk-overlay-container`)&&t.push(e),e.shadowRoot&&n.push(e.shadowRoot);let r=[],i=e=>r.push(...e.composedPath());for(let e of t)e.addEventListener(`ɵinert`,i,{once:!0}),e.dispatchEvent(new Event(`ɵinert`,{composed:!0}));let a=new Set(r),o=/* @__PURE__ */ new Set;for(let e of a)for(let t of e.parentNode?.childNodes??[])t.nodeType===Node.ELEMENT_NODE&&!rr.includes(t.localName)&&!a.has(t)&&o.add(t);for(let e of o)this._addInertAttributes(e)}_addInertAttributes(e){this._inertElements.add(e),e.inert||(e.inert=!0,e.toggleAttribute(`data-sbb-inert`,!0)),e.hasAttribute(`aria-hidden`)||(e.setAttribute(`aria-hidden`,`true`),e.toggleAttribute(`data-sbb-aria-hidden`,!0))}};const cr=`(forced-colors: active)`,W=`(prefers-color-scheme: dark)`,lr=`(any-hover: hover)`,ur=`(pointer: coarse)`,dr=`(min-width: 0rem)`,fr=`(min-width: 37.5rem)`,pr=`(min-width: 64rem)`,mr=`(min-width: 90rem)`,hr=`(max-width: 63.9375rem)`,gr=`(max-width: 89.9375rem)`,G=/* @__PURE__ */ new Map;var _r=class{constructor(e,t){this._queries=t,e.addController(this)}matches(e){return r?null:matchMedia(e).matches}hostConnected(){if(!r)for(let[e,t]of Object.entries(this._queries)){let n=G.get(e);if(n)n.handlers.add(t);else{let n=matchMedia(e),r=/* @__PURE__ */ new Set([t]),i=e=>r.forEach(t=>t(e.matches));n.addEventListener(`change`,i),G.set(e,{mediaQueryList:n,handlers:r,eventHandler:i})}}}hostDisconnected(){for(let[e,t]of Object.entries(this._queries)){let n=G.get(e);n&&(n.handlers.delete(t),n.handlers.size||G.delete(e))}}},vr=class e extends _r{static{this._currentMode=this._readLightDarkClass()}static{this._observer=r?null:new MutationObserver(t=>{if(t[0].oldValue!==document.documentElement.getAttribute(`class`)){let t=this._readLightDarkClass();this._currentMode!==t&&(e.requestUpdate(),this._currentMode=t)}})}static{this._observerConfig={attributeFilter:[`class`],attributeOldValue:!0}}constructor(e,t){let n=()=>{t(this.matches()),this._host.toggleState?.(`dark`,this.matches())};super(e,{[W]:n}),this._host=e,this._onChangeWithStateUpdater=n}static _readLightDarkClass(){if(r)return null;let e=document.documentElement.classList;return[`sbb-light-dark`,`sbb-dark`,`sbb-light`].find(t=>e.contains(t))??null}static requestUpdate(){let e=G.get(W);e&&e.handlers.forEach(t=>t(e.mediaQueryList.matches))}hostConnected(){let t=(G.get(`(prefers-color-scheme: dark)`)?.handlers.size??0)===0;super.hostConnected(),t&&e._observer.observe(document.documentElement,e._observerConfig),this._onChangeWithStateUpdater()}hostDisconnected(){super.hostDisconnected(),(G.get(`(prefers-color-scheme: dark)`)?.handlers.size??0)===0&&e._observer.disconnect()}matches(){if(r)return!1;let e=getComputedStyle(this._host).getPropertyValue(`color-scheme`),t=e.includes(`dark`),n=e.trim()===`dark`;return super.matches(`(prefers-color-scheme: dark)`)&&t||n}};const yr=!r&&CSS.supports(`anchor-name`,`--test`),br=[`top`,`bottom`,`left`,`right`,`top span-left`,`top span-right`,`bottom span-left`,`bottom span-right`,`left span-top`,`left span-bottom`,`right span-top`,`right span-bottom`],xr=[`block-start`,`block-end`,`inline-start`,`inline-end`,`block-start span-inline-start`,`block-start span-inline-end`,`block-end span-inline-start`,`block-end span-inline-end`,`inline-start span-block-start`,`inline-start span-block-end`,`inline-end span-block-start`,`inline-end span-block-end`],Sr={"block-start":`block-start`,"block-end":`block-end`,"inline-start":`inline-end`,"inline-end":`inline-start`,"block-start span-inline-start":`block-start span-inline-end`,"block-start span-inline-end":`block-start span-inline-start`,"block-end span-inline-start":`block-end span-inline-end`,"block-end span-inline-end":`block-end span-inline-start`,"inline-start span-block-start":`inline-end span-block-start`,"inline-start span-block-end":`inline-end span-block-end`,"inline-end span-block-start":`inline-start span-block-start`,"inline-end span-block-end":`inline-start span-block-end`};[...br,...xr];let Cr=0;var wr=class{get currentPosition(){return this._usePolyfill?this._lastPosition??this._positions[0]??``:(this._overlayStyles??=getComputedStyle(this._overlay),this._overlayStyles.getPropertyValue(`position-area`))}constructor(e,t=!yr){this._usePolyfill=t,this._resizeObserver=r?null:new ResizeObserver(()=>this._requestCalculatePosition()),this._anchorName=`--sbb-overlay-anchor-${++Cr}`,this._positions=[],e.addController(this),this._overlay=e}hostConnected(){this._usePolyfill?this._overlay.style.setProperty(`position-area`,`initial`):this._overlay.style.setProperty(`position-anchor`,this._anchorName)}hostUpdate(){r||this._readPositionsFromCss()}connect(e){r||(this._anchor&&this.disconnect(),this._anchor=e,this._usePolyfill||this._anchor.style.setProperty(`anchor-name`,this._anchorName),this._readPositionsFromCss(),this._calculatePosition(),this._abortController?.abort(),this._abortController=new AbortController,document.addEventListener(`scroll`,()=>this._requestCalculatePosition(),{capture:!0,passive:!0,signal:this._abortController.signal}),window.addEventListener(`resize`,()=>this._requestCalculatePosition(),{passive:!0,signal:this._abortController.signal}),this._resizeObserver.observe(e,{box:`border-box`}),this._resizeObserver.observe(this._overlay,{box:`border-box`}))}disconnect(){this._anchor?.style.removeProperty(`anchor-name`),this._anchor=void 0,this._abortController?.abort(),this._resizeObserver.disconnect()}_requestCalculatePosition(){this._frame??=requestAnimationFrame(()=>{this._calculatePosition(),this._frame=void 0})}_calculatePosition(){if(this._anchor){if(this._usePolyfill){let e=this._getOptimalPosition(this._positions);this._applyOverlayPosition(e.position,e.left,e.top)}this._overlay.setAttribute(`data-position`,this.currentPosition)}}_getOptimalPosition(e){let{offsetHeight:t,offsetWidth:n}=this._overlay,{innerHeight:r,innerWidth:i}=window,{top:a,left:o,height:s,width:c}=this._anchor.getBoundingClientRect(),l=this._overlay.matches(`:dir(rtl)`),u=a,d=r-s-a,f=o,p=i-c-o,m=n-c,h=t-s,g=m/2,_=h/2;this._overlay.style.setProperty(`--sbb-overlay-controller-trigger-height`,`${s}px`),this._overlay.style.setProperty(`--sbb-overlay-controller-trigger-width`,`${c}px`);let v={left:0,top:0,position:``},y;for(let r of e){switch(l&&xr.includes(r)?Sr[r]:r){default:case`bottom`:case`block-end`:v={position:r,left:o-g,top:a+s,fits:t<=d&&g<=f&&g<=p};break;case`top`:case`block-start`:v={position:r,left:o-g,top:a-t,fits:t<=u&&g<=f&&g<=p};break;case`right`:case`inline-end`:v={position:r,left:o+c,top:a-_,fits:n<=p&&_<=u&&_<=d};break;case`left`:case`inline-start`:v={position:r,left:o-n,top:a-_,fits:n<=f&&_<=u&&_<=d};break;case`top span-left`:case`block-start span-inline-start`:v={position:r,left:o-m,top:a-t,fits:t<=u&&m<=f};break;case`top span-right`:case`block-start span-inline-end`:v={position:r,left:o,top:a-t,fits:t<=u&&m<=p};break;case`bottom span-left`:case`block-end span-inline-start`:v={position:r,left:o-m,top:a+s,fits:t<=d&&m<=f};break;case`bottom span-right`:case`block-end span-inline-end`:v={position:r,left:o,top:a+s,fits:t<=d&&m<=p};break;case`left span-top`:case`inline-start span-block-start`:v={position:r,left:o-n,top:a+s-t,fits:n<=f&&h<=u};break;case`left span-bottom`:case`inline-start span-block-end`:v={position:r,left:o-n,top:a,fits:n<=f&&h<=d};break;case`right span-top`:case`inline-end span-block-start`:v={position:r,left:o+c,top:a+s-t,fits:n<=p&&h<=u};break;case`right span-bottom`:case`inline-end span-block-end`:v={position:r,left:o+c,top:a,fits:n<=p&&h<=d}}if(v.fits)return v;y??=v}return y}_applyOverlayPosition(e,t,n){this._lastPosition=e,this._overlay.style.left=`${t}px`,this._overlay.style.top=`${n}px`}_readPositionsFromCss(){if(!this._usePolyfill)return;this._overlayStyles??=getComputedStyle(this._overlay);let e=[this._overlayStyles.getPropertyValue(`--sbb-overlay-position-area`)||`block-end`,...this._overlayStyles.getPropertyValue(`--sbb-overlay-position-try-fallbacks`).split(`,`).map(e=>e.trim()).filter(e=>!!e)];this._positions=e,this._lastPosition&&!this._positions.includes(this._lastPosition)&&(this._lastPosition=void 0)}};const Tr=/* @__PURE__ */ new Set;var Er=class{constructor(e,t=Tr){this._host=e,this._lockers=t,this._locked=!1,this._scrollProperties={scrollPosition:0,touchStartY:0},this._touchStart=e=>{this._scrollProperties.touchStartY=e.touches[0]?.clientY??0},this._touchMove=e=>{let t=e.touches[0];if(!t)return;let n=this._findScrollableAncestor(e.composedPath());if(!n){e.preventDefault();return}let r=t.clientY-this._scrollProperties.touchStartY,i=n.scrollTop<=0,a=n.scrollTop+n.clientHeight>=n.scrollHeight;(i&&r>0||a&&r<0)&&e.preventDefault()},this._host.addController?.(this)}_isVerticallyScrollable(e){let t=getComputedStyle(e).overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}_findScrollableAncestor(e){for(let t of e){if(t===document.body||t===document.documentElement)break;if(t instanceof Element&&this._isVerticallyScrollable(t))return t}return null}hostDisconnected(){this.enableScroll()}disableScroll(){if(this._locked)return;this._locked=!0;let e=this._lockers.size===0;if(this._lockers.add(this._host),!e)return;this._scrollProperties.scrollPosition=window.scrollY||document.documentElement.scrollTop,this._scrollProperties.savedPosition=document.body.style.position,this._scrollProperties.savedTop=document.body.style.top,this._scrollProperties.savedInsetInline=document.body.style.insetInline,this._scrollProperties.savedOverflow=document.body.style.overflow,this._scrollProperties.savedMinHeight=document.body.style.minHeight;let t=window.innerWidth-document.documentElement.clientWidth;document.body.style.position=`fixed`,document.body.style.top=`-${this._scrollProperties.scrollPosition}px`,document.body.style.insetInline=`0 ${t}px`,document.body.style.overflow=`hidden`,document.body.style.setProperty(`--sbb-scrollbar-reserved-space`,`${t}px`),document.body.style.minHeight=`100dvh`,document.addEventListener(`touchstart`,this._touchStart,{passive:!0}),document.addEventListener(`touchmove`,this._touchMove,{passive:!1}),document.body.toggleAttribute(`data-sbb-scroll-disabled`,!0)}enableScroll(){this._locked&&(this._locked=!1,this._lockers.delete(this._host),this._lockers.size>0||(document.body.style.position=this._scrollProperties.savedPosition||``,document.body.style.top=this._scrollProperties.savedTop||``,document.body.style.insetInline=this._scrollProperties.savedInsetInline||``,document.body.style.overflow=this._scrollProperties.savedOverflow||``,document.body.style.removeProperty(`--sbb-scrollbar-reserved-space`),document.body.style.minHeight=this._scrollProperties.savedMinHeight||``,document.removeEventListener(`touchstart`,this._touchStart),document.removeEventListener(`touchmove`,this._touchMove),document.body.removeAttribute(`data-sbb-scroll-disabled`),window.scrollTo(0,this._scrollProperties.scrollPosition)))}},Dr=class{constructor(e){this._abortController=new AbortController,this._host=e,e.addController(this),e.tabIndex=-1,e.addEventListener(`blur`,()=>this._purge(),{once:!0,signal:this._abortController.signal})}hostDisconnected(){this._abortController.abort(),this._purge()}_purge(){this._host.removeController(this),this._host.removeAttribute(`tabindex`)}};const Or=/(0?[1-9]|[12][0-9]|3[01])[.,\\/\-\s](0?[1-9]|1[0-2])[.,\\/\-\s]([0-9]{1,4}$)?/,kr=/([0-9]{2})([0-9]{2})([0-9]{4})/,Ar=/^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-3][0-9])$/,jr=1,Mr=2,Nr=3,Pr=4,Fr=5,Ir=6,Lr=0;var K=class{constructor(e=15){this._cutoffYearOffset=e}deserialize(e){return e==null||this.isDateInstance(e)&&this.isValid(e)?e:this.invalid()}parse(e){if(!e)return null;let t=null,n=e.match(Ar);try{t=n?this.createDate(+n[1],+n[2],+n[3]):null}catch{}if(this.isValid(t))return t;let r=e.replace(/\D/g,` `).trim()?.match(Or)??e.match(kr);try{t=r?this.createDate(+r[3],+r[2],+r[1]):null}catch{}if(!r||r.index!==0||r.length<=2||r.some(e=>e===void 0)||!this.isValid(t))return null;let i=+r[3];if(typeof i==`number`&&i<100&&i>=0){let e=this.getYear(this.today())-2e3+this._cutoffYearOffset;i=i<=e?2e3+i:1900+i}return this.createDate(i,+r[2],+r[1])}format(e,t){if(!this.isValid(e))return``;let n=/* @__PURE__ */ new Date(this.toIso8601(e)+`T00:00:00`),r=new Intl.DateTimeFormat(`de-CH`,{day:`2-digit`,month:`2-digit`,year:`numeric`});if(t?.weekdayStyle===`none`)return r.format(n);let i=t?.weekdayStyle??`short`,a=this.getDayOfWeekNames(i)[this.getDayOfWeek(e)];return a=a.charAt(0).toUpperCase()+a.substring(1),i===`short`&&(a=a.substring(0,2)),`${a}, ${r.format(n)}`}toIso8601(e){let t=(e,t=2)=>`${e}`.padStart(t,`0`);return`${t(this.getYear(e),4)}-${t(this.getMonth(e))}-${t(this.getDate(e))}`}getValidDateOrNull(e){return this.isDateInstance(e)&&this.isValid(e)?e:null}getFirstWeekOffset(e){let t=this.createDate(this.getYear(e),this.getMonth(e),1);return(7+this.getDayOfWeek(t)-this.getFirstDayOfWeek())%7}getIsoWeek(e){let t=(this.getDayOfWeek(e)+6)%7,n=this.addCalendarDays(e,3-t),r=this.getYear(n),i=this.getDate(n);for(let e=1;e<this.getMonth(n);e++)i+=this.getNumDaysInMonth(this.createDate(r,e,1));return{week:Math.ceil(i/7),year:r}}compareDate(e,t){return this.getYear(e)-this.getYear(t)||this.getMonth(e)-this.getMonth(t)||this.getDate(e)-this.getDate(t)}sameDate(e,t){if(e&&t){let n=this.isValid(e),r=this.isValid(t);return n&&r?!this.compareDate(e,t):n==r}return e==t}clampDate(e,t,n){return t&&this.compareDate(e,t)<0?t:n&&this.compareDate(e,n)>0?n:e}};const Rr=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;var zr=class extends K{getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()+1}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getAccessibilityFormatDate(e){return new Intl.DateTimeFormat(z.current,{year:`numeric`,month:`long`,day:`numeric`}).format(new Date(e))}getMonthNames(e){let t=new Intl.DateTimeFormat(z.current,{month:e});return this._range(12,e=>t.format(new Date(2017,e,1)))}getDateNames(){let e=new Intl.DateTimeFormat(z.current,{day:`numeric`});return this._range(31,t=>e.format(new Date(2017,0,t+1)))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(z.current,{weekday:e});return this._range(7,e=>t.format(new Date(2017,0,e+1)))}getFirstDayOfWeek(){return 1}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e),0))}today(){return new Date((/* @__PURE__ */ new Date()).setHours(0,0,0,0))}createDate(e,t,n){if(t<1||t>12)throw Error(`Invalid month "${t}". Month has to be between 1 and 12.`);if(n<1)throw Error(`Invalid day "${n}". Day has to be greater than 0.`);let r=this._createDateWithOverflow(e,t-1,n);if(r.getMonth()+1!==t)throw Error(`Invalid day "${n}" for month "${t}".`);return r}isDateInstance(e){return e instanceof Date}isValid(e){return!!e&&!isNaN(e.valueOf())}clone(e){return new Date(e.valueOf())}addCalendarYears(e,t){return this.addCalendarMonths(e,t*12)}addCalendarMonths(e,t){let n=e.getMonth()+t,r=new Date(e.getFullYear(),n,1,0,0,0,0),i=this.getNumDaysInMonth(r);return new Date(this.clone(e).setMonth(n,Math.min(i,e.getDate())))}addCalendarDays(e,t){let n=e.getDate()+t;return new Date(e.getFullYear(),e.getMonth(),n,0,0,0,0)}deserialize(e){if(typeof e==`string`){if(!e)return null;if(Rr.test(e))return this.getValidDateOrNull(new Date(e.includes(`T`)?e:e+`T00:00:00`))}return super.deserialize(e)}invalid(){return/* @__PURE__ */ new Date(NaN)}_range(e,t){return Array.from({length:e},(e,n)=>t(n))}_createDateWithOverflow(e,t,n){let r=new Date(e,t,n);return e>=0&&e<100&&r.setFullYear(this.getYear(r)-1900),r}};const q=new zr,Br=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;var Vr=class extends K{constructor(e){if(super(e),typeof Temporal!=`object`)throw Error(`Temporal is not available in the current environment. Please make sure to include the temporal polyfill.`)}getYear(e){return e.year}getMonth(e){return e.month}getDate(e){return e.day}getDayOfWeek(e){return e.dayOfWeek%7}getAccessibilityFormatDate(e){return this.deserialize(e).toLocaleString(z.current,{year:`numeric`,month:`long`,day:`numeric`})}getMonthNames(e){let t=new Intl.DateTimeFormat(z.current,{month:e});return this._range(12,e=>t.format(Temporal.PlainDate.from({year:2017,month:e+1,day:1})))}getDateNames(){let e=new Intl.DateTimeFormat(z.current,{day:`numeric`});return this._range(31,t=>e.format(Temporal.PlainDate.from({year:2017,month:1,day:t+1})))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(z.current,{weekday:e});return this._range(7,e=>t.format(Temporal.PlainDate.from({year:2017,month:1,day:e+1})))}getFirstDayOfWeek(){return 1}getIsoWeek(e){return{week:e.weekOfYear,year:e.yearOfWeek}}getNumDaysInMonth(e){return e.daysInMonth}today(){return Temporal.Now.plainDateISO()}createDate(e,t,n){if(t<1||t>12)throw Error(`Invalid month "${t}". Month has to be between 1 and 12.`);if(n<1)throw Error(`Invalid day "${n}". Day has to be greater than 0.`);try{return Temporal.PlainDate.from({year:e,month:t,day:n},{overflow:`reject`})}catch{throw Error(`Invalid date "${n}" for month with index "${t}".`)}}isDateInstance(e){return e instanceof Temporal.PlainDate}isValid(e){return this.isDateInstance(e)}clone(e){return Temporal.PlainDate.from(e)}addCalendarYears(e,t){return e.add({years:t})}addCalendarMonths(e,t){return e.add({months:t})}addCalendarDays(e,t){return e.add({days:t})}deserialize(e){if(typeof e==`string`){if(!e)return null;if(Br.test(e))return this.getValidDateOrNull(Temporal.PlainDate.from(e.split(`T`)[0]))}return super.deserialize(e)}invalid(){return null}toIso8601(e){return e.toJSON()}_range(e,t){return Array.from({length:e},(e,n)=>t(n))}};const Hr=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{get(){let n=t.get.call(this);return e(this,n)}};throw Error(`Unsupported decorator location: ${r}`)},Ur=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{set(r){let i=n.access.get(this);t.set.call(this,r);let a=n.access.get(this);a!==i&&e(this,a,i)}};throw Error(`Unsupported decorator location: ${r}`)},J=/* @__PURE__ */ new WeakMap,Y=/* @__PURE__ */ new WeakMap,Wr=()=>(e,t)=>{let{kind:n,metadata:i,name:a}=t;if(n===`accessor`){if(r)return{};let n=globalThis.litPropertyMetadata.get(i)?.get(a)?.attribute,o=typeof n==`string`?n:a;return t.addInitializer(function(){this.addController({host:this,rootNode:null,checkIdReference(e){let n=this.host.getAttribute(o)??Y.get(this.host);if(n&&typeof n==`string`&&(!e||e.has(n))){let e=this.rootNode?.getElementById?.(n)??null;t.access.get(this.host)!==e&&t.access.set(this.host,e)}},hostConnected(){this.rootNode=this.host.getRootNode(),this.checkIdReference();let e=J.get(this.rootNode);if(e)e.controllers.add(this);else{let e=/* @__PURE__ */ new Set([this]),t=new MutationObserver(t=>{let n=/* @__PURE__ */ new Set;for(let e of t)if(e.type===`attributes`)e.oldValue&&n.add(e.oldValue),e.target.id&&n.add(e.target.id);else if(e.type===`childList`)for(let t of[...e.addedNodes,...e.removedNodes])t instanceof HTMLElement&&(t.id&&n.add(t.id),t.querySelectorAll(`[id]`).forEach(e=>{e.id&&n.add(e.id)}));e.forEach(e=>e.checkIdReference(n))});t.observe(this.rootNode,{attributeFilter:[`id`],attributeOldValue:!0,childList:!0,subtree:!0}),J.set(this.rootNode,{observer:t,controllers:e})}},hostDisconnected(){if(r||!this.rootNode)return;let e=J.get(this.rootNode);e&&(e.controllers.delete(this),e.controllers.size===0&&(e.observer.disconnect(),J.delete(this.rootNode))),this.rootNode=null}})}),{set(t){if(typeof t!=`string`)Y.delete(this),t instanceof HTMLElement&&this.hasAttribute(o)&&t.id!==this.getAttribute(o)&&this.removeAttribute(o);else if(this.hasAttribute(o)&&this.getAttribute(o)!==t)return;else{let e=t?this.getRootNode?.()?.getElementById?.(t):null;e?t=e:t&&=(Y.set(this,t),null)}e.set.call(this,t)}}}throw Error(`Unsupported decorator location: ${n}`)},Gr={toAttribute(e,t){let n=R().datetime?.dateAdapter??q;return n.isValid(e)?n.toIso8601(e):null}},Kr=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{set(e){let n=R().datetime?.dateAdapter??q;e=n.getValidDateOrNull(n.deserialize(e)),e=e?n.createDate(n.getYear(e),n.getMonth(e),n.getDate(e)):null,t.set.call(this,e)},get(){let n=R().datetime?.dateAdapter??q,r=t.get.call(this);return n.isValid(r)?n.clone(r):e?.fallback?.(n)}};throw Error(`Unsupported decorator location: ${r}`)};function qr(e,t){if(r||globalThis.disableAnimation)return!0;let n=getComputedStyle(e).getPropertyValue(t);return parseFloat(n)===0}function X(e,t){let n=t;for(;n;){if(n===e)return!0;n=n instanceof ShadowRoot?n.host:n.parentNode}return!1}function Jr(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}function Yr(e){let t=()=>queueMicrotask(e);document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t):t()}function Z(){return document.body.hasAttribute(`data-sbb-scroll-disabled`)}function Xr(e){let t=getComputedStyle(e).overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}function Zr(e){for(let t of e){if(t===document.body||t===document.documentElement)break;if(t instanceof Element&&Xr(t))return t}return null}var Qr=class{constructor(){this._scrollPosition=0,this._touchStartY=0,this._touchStart=e=>{this._touchStartY=e.touches[0]?.clientY??0},this._touchMove=e=>{let t=e.touches[0];if(!t)return;let n=Zr(e.composedPath());if(!n){e.preventDefault();return}let r=t.clientY-this._touchStartY,i=n.scrollTop<=0,a=n.scrollTop+n.clientHeight>=n.scrollHeight;(i&&r>0||a&&r<0)&&e.preventDefault()}}disableScroll(){if(Z())return;this._scrollPosition=window.scrollY||document.documentElement.scrollTop,this._position=document.body.style.position,this._top=document.body.style.top,this._insetInline=document.body.style.insetInline,this._overflow=document.body.style.overflow;let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.position=`fixed`,document.body.style.top=`-${this._scrollPosition}px`,document.body.style.insetInline=`0 ${e}px`,document.body.style.overflow=`hidden`,document.body.style.setProperty(`--sbb-scrollbar-reserved-space`,`${e}px`),document.addEventListener(`touchstart`,this._touchStart,{passive:!0}),document.addEventListener(`touchmove`,this._touchMove,{passive:!1}),document.body.toggleAttribute(`data-sbb-scroll-disabled`,!0)}enableScroll(){Z()&&(document.body.style.position=this._position||``,document.body.style.top=this._top||``,document.body.style.insetInline=this._insetInline||``,document.body.style.overflow=this._overflow||``,document.body.style.removeProperty(`--sbb-scrollbar-reserved-space`),document.removeEventListener(`touchstart`,this._touchStart),document.removeEventListener(`touchmove`,this._touchMove),document.body.removeAttribute(`data-sbb-scroll-disabled`),window.scrollTo(0,this._scrollPosition))}};function $r(e){e.key===` `&&e.preventDefault()}function ei(e,t){let n=new(Object.getPrototypeOf(e)).constructor(e.type,e);t.dispatchEvent(n)}const ti=e=>{class t extends e{constructor(){super(...arguments),this.isAnimating=!1,this._animationPromise=Promise.resolve()}get animationComplete(){return this._animationPromise}disconnectedCallback(){super.disconnectedCallback(),this.stopAnimation()}startAnimation(){this.isAnimating||(this._animationPromise=this._enqueueAnimation())}stopAnimation(){}async _enqueueAnimation(){this.isAnimating=!0;let e=this.stopAnimation,t=new Promise(t=>{this.stopAnimation=()=>{e(),this.isAnimating=!1,t()}});try{await this._animationPromise}catch(e){Promise.reject(e)}return t}}return t},ni=e=>{class t extends e{constructor(){super(...arguments),this._dynamicStyleSheet=null}get dynamicStyleSheet(){return this._dynamicStyleSheet??null}createRenderRoot(){let e=super.createRenderRoot();return r||(this._dynamicStyleSheet=new CSSStyleSheet,e.adoptedStyleSheets?.push(this._dynamicStyleSheet)),e}}return t},ri=e=>(()=>{let n=V(H(L(e))),r=[],i;return class extends n{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0;i=[l({type:Boolean,converter:{...t,fromAttribute:(e,n)=>({value:t.fromAttribute?.(e,n),attribute:!0})}})],o(this,null,i,{kind:`setter`,name:`checked`,static:!1,private:!1,access:{has:e=>`checked`in e,set:(e,t)=>{e.checked=t}},metadata:e},null,r),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`checkbox`}set checked(e){let t=typeof e==`object`&&e.attribute;t&&(e=e.value),this.hasUpdated&&!t&&(this._attributeMutationBlocked=!0),this._checked=!!e,this.updateFormValue()}get checked(){return this._checked}get type(){return`checkbox`}constructor(){super(),this._attributeMutationBlocked=(s(this,r),!1),this._languageController=new z(this),this._checked=!1,this._handleKeyboardInteraction=e=>{e.key===` `&&this._handleUserInteraction()},this._handleUserInteraction=()=>{this.disabled||(this.withUserInteraction?.(),this.checked=!this.checked,this._attributeMutationBlocked=!0,this.dispatchEvent(new InputEvent(`input`,{composed:!0,bubbles:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0})))},this.addEventListener?.(`click`,this._handleUserInteraction),this.addEventListener?.(`keydown`,$r),this.addEventListener?.(`keyup`,this._handleKeyboardInteraction)}connectedCallback(){super.connectedCallback(),this.tabIndex=0}attributeChangedCallback(e,t,n){e===`checked`&&this._attributeMutationBlocked||super.attributeChangedCallback(e,t,n)}formResetCallback(){this.checked=this.hasAttribute(`checked`),this._attributeMutationBlocked=!1}formStateRestoreCallback(e,t){e&&(this.checked=e===`true`)}updateFormValue(){this.checked?super.updateFormValue():this.internals.setFormValue(null)}formState(){return`${this.checked}`}shouldValidate(e){return super.shouldValidate(e)||e===`checked`||e===`required`}validate(){super.validate(),this.required&&!this.checked?this.setValidityFlag(`valueMissing`,pn[this._languageController.current]):this.removeValidityFlag(`valueMissing`)}}})(),ii=e=>(()=>{let t=e,n=[],r;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[l({type:Boolean,attribute:`readonly`})],o(this,null,r,{kind:`setter`,name:`readOnly`,static:!1,private:!1,access:{has:e=>`readOnly`in e,set:(e,t)=>{e.readOnly=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}set readOnly(e){this.#e=!!e,this.toggleAttribute(`readonly`,this.#e)}get readOnly(){return this.#e}#e=(s(this,n),!1)}})(),ai=(()=>{if(r)return!1;let e=document.createElement(`div`);return e.setAttribute(`contenteditable`,`PLAINTEXT-ONLY`),e.contentEditable===`plaintext-only`})(),oi=e=>(()=>{let t=ii(V(H(L(e)))),i=[],a,u,d;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;a=[l()],u=[l({attribute:!1})],d=[c({passive:!0})],o(this,null,a,{kind:`setter`,name:`value`,static:!1,private:!1,access:{has:e=>`value`in e,set:(e,t)=>{e.value=t}},metadata:e},null,i),o(this,null,u,{kind:`setter`,name:`placeholder`,static:!1,private:!1,access:{has:e=>`placeholder`in e,set:(e,t)=>{e.placeholder=t}},metadata:e},null,i),o(this,null,d,{kind:`method`,name:`_cleanChildren`,static:!1,private:!1,access:{has:e=>`_cleanChildren`in e,get:e=>e._cleanChildren},metadata:e},null,i),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`textbox`}static{this.formFieldAssociated=!0}get type(){return`text`}set value(e){this._value=this._cleanText(e),this.hasUpdated&&this._assignValue(this._value),this.dispatchEvent(new Event(`displayvaluechange`,{bubbles:!0,composed:!0}))}get value(){return this._value??``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`),this.internals.ariaPlaceholder=e||null}get placeholder(){return this.getAttribute(`placeholder`)??``}constructor(){super(),this._shouldEmitChange=(s(this,i),!1),this._shouldTriggerSubmit=!1,this.language=new z(this),this._value=``,this.addEventListener?.(`input`,()=>{let e=this._value;this._value=this._cleanText(this.textContent??``),this.requestUpdate(`value`,e),this.internals.states.add(`interacted`),this._shouldEmitChange=!0},{capture:!0}),this.addEventListener?.(`change`,()=>this._shouldEmitChange=!1,{capture:!0}),this.addEventListener?.(`keydown`,e=>{this._requiresEmptyPatch()&&this._assignValue(``);let t=window.getSelection(),n=t?.getRangeAt(0);if(n&&!n.collapsed&&n.startContainer===this&&n.endContainer===this.lastChild&&n.selectNodeContents(this.lastChild),(e.key===`Enter`||e.key===`
|
|
43
|
+
`}}})();const Zn=[];r||window.addEventListener(`keydown`,e=>{e.key===`Escape`&&!e.defaultPrevented&&(e.preventDefault(),Zn.at(-1)?.escapeStrategy())});var Qn=class{constructor(e,t=Zn){this._host=e,this._overlayStack=t,this._host.addController?.(this)}hostDisconnected(){this.disconnect()}connect(){this.disconnect(),this._overlayStack.push(this._host)}disconnect(){if(this._overlayStack.length){let e=this._overlayStack.findIndex(e=>e===this._host);e!==-1&&this._overlayStack.splice(e,1)}}},$n=class extends Map{constructor(e){super(),this._host=e,this._host.addController(this)}hostConnected(){!r&&this._styleSheet&&!this._host.shadowRoot?.adoptedStyleSheets.includes(this._styleSheet)&&this._host.shadowRoot?.adoptedStyleSheets.push(this._styleSheet)}set(e,t){return super.set(e,t),this._updateHostStyles(),this}delete(e){let t=super.delete(e);return this._updateHostStyles(),t}clear(){super.clear(),this._updateHostStyles()}_updateHostStyles(){if(r)return;this._styleSheet||(this._styleSheet=new CSSStyleSheet,this._host.shadowRoot?.adoptedStyleSheets.push(this._styleSheet));let e=this.size?`:host { ${Array.from(this,([e,t])=>`${e}: ${t};`).join(``)} }`:``;this._styleSheet.replaceSync(e)}};const er=/* @__PURE__ */ new WeakMap;var tr=class{constructor(e,t,n=er){this._host=e,this._idRef=t,this._observers=n,this._rootNode=null,this._host.addController(this)}hostConnected(){if(r)return;this._rootNode=this._host.getRootNode();let e=this._observers.get(this._rootNode);if(e)e.controllers.add(this);else{let e=/* @__PURE__ */ new Set([this]),t=new MutationObserver(t=>{let n=/* @__PURE__ */ new Set;for(let e of t)if(e.type===`attributes`)n.add(e.oldValue),n.add(e.target.id);else if(e.type===`childList`)for(let t of[...e.addedNodes,...e.removedNodes])t instanceof HTMLElement&&(n.add(t.id),t.querySelectorAll(`[id]`).forEach(e=>n.add(e.id)));for(let t of e){let e=t._host[t._idRef];e&&typeof e==`string`&&n.has(e)&&t._host.requestUpdate()}});t.observe(this._rootNode,{attributeFilter:[`id`],childList:!0,subtree:!0,attributeOldValue:!0}),this._observers.set(this._rootNode,{observer:t,controllers:e})}}hostDisconnected(){if(r||!this._rootNode)return;let e=this._observers.get(this._rootNode);e&&(e.controllers.delete(this),e.controllers.size===0&&(e.observer.disconnect(),this._observers.delete(this._rootNode))),this._rootNode=null}find(){if(r||!this._rootNode)return null;{let e=this._host[this._idRef];return typeof e==`string`?this._rootNode?.getElementById(e):null}}};const nr=[`script`,`head`,`template`,`style`,`link`],rr=/* @__PURE__ */ new Set,ir=/* @__PURE__ */ new Set,ar=/* @__PURE__ */ new Set;var or=class{constructor(e,t=rr,n=ar,r=ir){this._host=e,this._inertElements=t,this._inertOverlays=n,this._exemptedElements=r,this._host.addController?.(this)}hostConnected(){this._host.isOpen&&this.activate()}hostDisconnected(){this.isInert()&&this.deactivate()}activate(){this._inertOverlays.size&&this._removeAllInertAttributes(),this._inertOverlays.add(this._host),this._addAllInertAttributes()}deactivate(){this._currentOverlay()===this._host?(this._removeAllInertAttributes(),this._inertOverlays.delete(this._host),this._inertOverlays.size&&this._addAllInertAttributes()):this._inertOverlays.has(this._host)&&this._inertOverlays.delete(this._host)}isInert(){return this._inertOverlays.has(this._host)}exempt(e){this._inertElements.has(e)&&!this._exemptedElements.has(e)&&(this._removeInertAttributes(e),this._inertElements.delete(e),this._exemptedElements.add(e))}restoreAllExempted(){this._exemptedElements.forEach(e=>this._addInertAttributes(e)),this._exemptedElements.clear()}_currentOverlay(){return[...this._inertOverlays].pop()??null}_removeAllInertAttributes(){this._inertElements.forEach(e=>this._removeInertAttributes(e)),this._inertElements.clear()}_removeInertAttributes(e){e&&(e.hasAttribute(`data-sbb-inert`)&&(e.inert=!1,e.removeAttribute(`data-sbb-inert`)),e.hasAttribute(`data-sbb-aria-hidden`)&&(e.removeAttribute(`aria-hidden`),e.removeAttribute(`data-sbb-aria-hidden`)))}_addAllInertAttributes(){let e=this._currentOverlay(),t=e?[e]:[],n=[document.documentElement];for(;n.length>0;)for(let e of n.shift().querySelectorAll(`*`))e.matches(`sbb-toast,.sbb-overlay-outlet,.sbb-live-announcer-element,.cdk-live-announcer-element,.cdk-overlay-container`)&&t.push(e),e.shadowRoot&&n.push(e.shadowRoot);let r=[],i=e=>r.push(...e.composedPath());for(let e of t)e.addEventListener(`ɵinert`,i,{once:!0}),e.dispatchEvent(new Event(`ɵinert`,{composed:!0}));let a=new Set(r),o=/* @__PURE__ */ new Set;for(let e of a)for(let t of e.parentNode?.childNodes??[])t.nodeType===Node.ELEMENT_NODE&&!nr.includes(t.localName)&&!a.has(t)&&o.add(t);for(let e of o)this._addInertAttributes(e)}_addInertAttributes(e){this._inertElements.add(e),e.inert||(e.inert=!0,e.toggleAttribute(`data-sbb-inert`,!0)),e.hasAttribute(`aria-hidden`)||(e.setAttribute(`aria-hidden`,`true`),e.toggleAttribute(`data-sbb-aria-hidden`,!0))}};const sr=`(forced-colors: active)`,U=`(prefers-color-scheme: dark)`,cr=`(any-hover: hover)`,lr=`(pointer: coarse)`,ur=`(min-width: 0rem)`,dr=`(min-width: 37.5rem)`,fr=`(min-width: 64rem)`,pr=`(min-width: 90rem)`,mr=`(max-width: 63.9375rem)`,hr=`(max-width: 89.9375rem)`,W=/* @__PURE__ */ new Map;var gr=class{constructor(e,t){this._queries=t,e.addController(this)}matches(e){return r?null:matchMedia(e).matches}hostConnected(){if(!r)for(let[e,t]of Object.entries(this._queries)){let n=W.get(e);if(n)n.handlers.add(t);else{let n=matchMedia(e),r=/* @__PURE__ */ new Set([t]),i=e=>r.forEach(t=>t(e.matches));n.addEventListener(`change`,i),W.set(e,{mediaQueryList:n,handlers:r,eventHandler:i})}}}hostDisconnected(){for(let[e,t]of Object.entries(this._queries)){let n=W.get(e);n&&(n.handlers.delete(t),n.handlers.size||W.delete(e))}}},_r=class e extends gr{static{this._currentMode=this._readLightDarkClass()}static{this._observer=r?null:new MutationObserver(t=>{if(t[0].oldValue!==document.documentElement.getAttribute(`class`)){let t=this._readLightDarkClass();this._currentMode!==t&&(e.requestUpdate(),this._currentMode=t)}})}static{this._observerConfig={attributeFilter:[`class`],attributeOldValue:!0}}constructor(e,t){let n=()=>{t(this.matches()),this._host.toggleState?.(`dark`,this.matches())};super(e,{[U]:n}),this._host=e,this._onChangeWithStateUpdater=n}static _readLightDarkClass(){if(r)return null;let e=document.documentElement.classList;return[`sbb-light-dark`,`sbb-dark`,`sbb-light`].find(t=>e.contains(t))??null}static requestUpdate(){let e=W.get(U);e&&e.handlers.forEach(t=>t(e.mediaQueryList.matches))}hostConnected(){let t=(W.get(`(prefers-color-scheme: dark)`)?.handlers.size??0)===0;super.hostConnected(),t&&e._observer.observe(document.documentElement,e._observerConfig),this._onChangeWithStateUpdater()}hostDisconnected(){super.hostDisconnected(),(W.get(`(prefers-color-scheme: dark)`)?.handlers.size??0)===0&&e._observer.disconnect()}matches(){if(r)return!1;let e=getComputedStyle(this._host).getPropertyValue(`color-scheme`),t=e.includes(`dark`),n=e.trim()===`dark`;return super.matches(`(prefers-color-scheme: dark)`)&&t||n}};const vr=!r&&CSS.supports(`anchor-name`,`--test`),yr=[`top`,`bottom`,`left`,`right`,`top span-left`,`top span-right`,`bottom span-left`,`bottom span-right`,`left span-top`,`left span-bottom`,`right span-top`,`right span-bottom`],br=[`block-start`,`block-end`,`inline-start`,`inline-end`,`block-start span-inline-start`,`block-start span-inline-end`,`block-end span-inline-start`,`block-end span-inline-end`,`inline-start span-block-start`,`inline-start span-block-end`,`inline-end span-block-start`,`inline-end span-block-end`],xr={"block-start":`block-start`,"block-end":`block-end`,"inline-start":`inline-end`,"inline-end":`inline-start`,"block-start span-inline-start":`block-start span-inline-end`,"block-start span-inline-end":`block-start span-inline-start`,"block-end span-inline-start":`block-end span-inline-end`,"block-end span-inline-end":`block-end span-inline-start`,"inline-start span-block-start":`inline-end span-block-start`,"inline-start span-block-end":`inline-end span-block-end`,"inline-end span-block-start":`inline-start span-block-start`,"inline-end span-block-end":`inline-start span-block-end`};[...yr,...br];let Sr=0;var Cr=class{get currentPosition(){return this._usePolyfill?this._lastPosition??this._positions[0]??``:(this._overlayStyles??=getComputedStyle(this._overlay),this._overlayStyles.getPropertyValue(`position-area`))}constructor(e,t=!vr){this._usePolyfill=t,this._resizeObserver=r?null:new ResizeObserver(()=>this._requestCalculatePosition()),this._anchorName=`--sbb-overlay-anchor-${++Sr}`,this._positions=[],e.addController(this),this._overlay=e}hostConnected(){this._usePolyfill?this._overlay.style.setProperty(`position-area`,`initial`):this._overlay.style.setProperty(`position-anchor`,this._anchorName)}hostUpdate(){r||this._readPositionsFromCss()}connect(e){r||(this._anchor&&this.disconnect(),this._anchor=e,this._usePolyfill||this._anchor.style.setProperty(`anchor-name`,this._anchorName),this._readPositionsFromCss(),this._calculatePosition(),this._abortController?.abort(),this._abortController=new AbortController,document.addEventListener(`scroll`,()=>this._requestCalculatePosition(),{capture:!0,passive:!0,signal:this._abortController.signal}),window.addEventListener(`resize`,()=>this._requestCalculatePosition(),{passive:!0,signal:this._abortController.signal}),this._resizeObserver.observe(e,{box:`border-box`}),this._resizeObserver.observe(this._overlay,{box:`border-box`}))}disconnect(){this._anchor?.style.removeProperty(`anchor-name`),this._anchor=void 0,this._abortController?.abort(),this._resizeObserver.disconnect()}_requestCalculatePosition(){this._frame??=requestAnimationFrame(()=>{this._calculatePosition(),this._frame=void 0})}_calculatePosition(){if(this._anchor){if(this._usePolyfill){let e=this._getOptimalPosition(this._positions);this._applyOverlayPosition(e.position,e.left,e.top)}this._overlay.setAttribute(`data-position`,this.currentPosition)}}_getOptimalPosition(e){let{offsetHeight:t,offsetWidth:n}=this._overlay,{innerHeight:r,innerWidth:i}=window,{top:a,left:o,height:s,width:c}=this._anchor.getBoundingClientRect(),l=this._overlay.matches(`:dir(rtl)`),u=a,d=r-s-a,f=o,p=i-c-o,m=n-c,h=t-s,g=m/2,_=h/2;this._overlay.style.setProperty(`--sbb-overlay-controller-trigger-height`,`${s}px`),this._overlay.style.setProperty(`--sbb-overlay-controller-trigger-width`,`${c}px`);let v={left:0,top:0,position:``},y;for(let r of e){switch(l&&br.includes(r)?xr[r]:r){default:case`bottom`:case`block-end`:v={position:r,left:o-g,top:a+s,fits:t<=d&&g<=f&&g<=p};break;case`top`:case`block-start`:v={position:r,left:o-g,top:a-t,fits:t<=u&&g<=f&&g<=p};break;case`right`:case`inline-end`:v={position:r,left:o+c,top:a-_,fits:n<=p&&_<=u&&_<=d};break;case`left`:case`inline-start`:v={position:r,left:o-n,top:a-_,fits:n<=f&&_<=u&&_<=d};break;case`top span-left`:case`block-start span-inline-start`:v={position:r,left:o-m,top:a-t,fits:t<=u&&m<=f};break;case`top span-right`:case`block-start span-inline-end`:v={position:r,left:o,top:a-t,fits:t<=u&&m<=p};break;case`bottom span-left`:case`block-end span-inline-start`:v={position:r,left:o-m,top:a+s,fits:t<=d&&m<=f};break;case`bottom span-right`:case`block-end span-inline-end`:v={position:r,left:o,top:a+s,fits:t<=d&&m<=p};break;case`left span-top`:case`inline-start span-block-start`:v={position:r,left:o-n,top:a+s-t,fits:n<=f&&h<=u};break;case`left span-bottom`:case`inline-start span-block-end`:v={position:r,left:o-n,top:a,fits:n<=f&&h<=d};break;case`right span-top`:case`inline-end span-block-start`:v={position:r,left:o+c,top:a+s-t,fits:n<=p&&h<=u};break;case`right span-bottom`:case`inline-end span-block-end`:v={position:r,left:o+c,top:a,fits:n<=p&&h<=d}}if(v.fits)return v;y??=v}return y}_applyOverlayPosition(e,t,n){this._lastPosition=e,this._overlay.style.left=`${t}px`,this._overlay.style.top=`${n}px`}_readPositionsFromCss(){if(!this._usePolyfill)return;this._overlayStyles??=getComputedStyle(this._overlay);let e=[this._overlayStyles.getPropertyValue(`--sbb-overlay-position-area`)||`block-end`,...this._overlayStyles.getPropertyValue(`--sbb-overlay-position-try-fallbacks`).split(`,`).map(e=>e.trim()).filter(e=>!!e)];this._positions=e,this._lastPosition&&!this._positions.includes(this._lastPosition)&&(this._lastPosition=void 0)}},wr=class{get size(){return this._handlers.size}constructor(e,t){this._host=e,this._property=t,this._handlers=/* @__PURE__ */ new Set,this._hostDefinedPromise=null,r||(customElements.get(this._host.localName)?customElements.upgrade(this._host):this._hostDefinedPromise=customElements.whenDefined(this._host.localName).then(()=>{customElements.upgrade(this._host),this._hostDefinedPromise=null})),this._value=this._host[this._property]}addHandler(e){this._handlers.size||(this._host.addController?this._host.addController(this):this._hostDefinedPromise&&this._hostDefinedPromise.then(()=>this._host.addController(this))),this._handlers.add(e),this._hostDefinedPromise?this._hostDefinedPromise.then(()=>e(this._host)):e(this._host)}removeHandler(e){this._handlers.delete(e),this._handlers.size||(this._host.removeController?this._host.removeController(this):this._hostDefinedPromise&&this._hostDefinedPromise.then(()=>this._host.removeController(this)))}hostUpdate(){let e=this._host[this._property];if(this._value!==e){this._value=e;for(let e of this._handlers)e(this._host)}}};const G=/* @__PURE__ */ new WeakMap;var Tr=class{constructor(e,t,n){this._host=e,this._referenceResolver=t,this._handlers=n,this._host.addController(this)}hostConnected(){this.connect()}hostDisconnected(){this._reference!==this._referenceResolver()&&this.disconnect()}connect(){let e=this._referenceResolver();if(this._reference===e||(this.disconnect(),this._reference=e,!this._reference))return;let t=G.get(this._reference);t||(t=/* @__PURE__ */ new Map,G.set(this._reference,t)),this._watchers=t;for(let[e,t]of Object.entries(this._handlers)){let n=this._watchers.get(e);n||(n=new wr(this._reference,e),this._watchers.set(e,n)),n.addHandler(t)}}disconnect(){if(this._reference){for(let[e,t]of Object.entries(this._handlers)){let n=this._watchers?.get(e);n&&(n.removeHandler(t),n.size||(this._watchers.delete(e),!this._watchers.size&&this._reference&&G.delete(this._reference)))}this._reference=null}}};const Er=/* @__PURE__ */ new Set;var Dr=class{constructor(e,t=Er){this._host=e,this._lockers=t,this._locked=!1,this._scrollProperties={scrollPosition:0,touchStartY:0},this._touchStart=e=>{this._scrollProperties.touchStartY=e.touches[0]?.clientY??0},this._touchMove=e=>{let t=e.touches[0];if(!t)return;let n=this._findScrollableAncestor(e.composedPath());if(!n){e.preventDefault();return}let r=t.clientY-this._scrollProperties.touchStartY,i=n.scrollTop<=0,a=n.scrollTop+n.clientHeight>=n.scrollHeight;(i&&r>0||a&&r<0)&&e.preventDefault()},this._host.addController?.(this)}_isVerticallyScrollable(e){let t=getComputedStyle(e).overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}_findScrollableAncestor(e){for(let t of e){if(t===document.body||t===document.documentElement)break;if(t instanceof Element&&this._isVerticallyScrollable(t))return t}return null}hostDisconnected(){this.enableScroll()}disableScroll(){if(this._locked)return;this._locked=!0;let e=this._lockers.size===0;if(this._lockers.add(this._host),!e)return;this._scrollProperties.scrollPosition=window.scrollY||document.documentElement.scrollTop,this._scrollProperties.savedPosition=document.body.style.position,this._scrollProperties.savedTop=document.body.style.top,this._scrollProperties.savedInsetInline=document.body.style.insetInline,this._scrollProperties.savedOverflow=document.body.style.overflow,this._scrollProperties.savedMinHeight=document.body.style.minHeight;let t=window.innerWidth-document.documentElement.clientWidth;document.body.style.position=`fixed`,document.body.style.top=`-${this._scrollProperties.scrollPosition}px`,document.body.style.insetInline=`0 ${t}px`,document.body.style.overflow=`hidden`,document.body.style.setProperty(`--sbb-scrollbar-reserved-space`,`${t}px`),document.body.style.minHeight=`100dvh`,document.addEventListener(`touchstart`,this._touchStart,{passive:!0}),document.addEventListener(`touchmove`,this._touchMove,{passive:!1}),document.body.toggleAttribute(`data-sbb-scroll-disabled`,!0)}enableScroll(){this._locked&&(this._locked=!1,this._lockers.delete(this._host),this._lockers.size>0||(document.body.style.position=this._scrollProperties.savedPosition||``,document.body.style.top=this._scrollProperties.savedTop||``,document.body.style.insetInline=this._scrollProperties.savedInsetInline||``,document.body.style.overflow=this._scrollProperties.savedOverflow||``,document.body.style.removeProperty(`--sbb-scrollbar-reserved-space`),document.body.style.minHeight=this._scrollProperties.savedMinHeight||``,document.removeEventListener(`touchstart`,this._touchStart),document.removeEventListener(`touchmove`,this._touchMove),document.body.removeAttribute(`data-sbb-scroll-disabled`),window.scrollTo(0,this._scrollProperties.scrollPosition)))}},Or=class{constructor(e){this._abortController=new AbortController,this._host=e,e.addController(this),e.tabIndex=-1,e.addEventListener(`blur`,()=>this._purge(),{once:!0,signal:this._abortController.signal})}hostDisconnected(){this._abortController.abort(),this._purge()}_purge(){this._host.removeController(this),this._host.removeAttribute(`tabindex`)}};const kr=/(0?[1-9]|[12][0-9]|3[01])[.,\\/\-\s](0?[1-9]|1[0-2])[.,\\/\-\s]([0-9]{1,4}$)?/,Ar=/([0-9]{2})([0-9]{2})([0-9]{4})/,jr=/^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-3][0-9])$/,Mr=1,Nr=2,Pr=3,Fr=4,Ir=5,Lr=6,Rr=0;var K=class{constructor(e=15){this._cutoffYearOffset=e}deserialize(e){return e==null||this.isDateInstance(e)&&this.isValid(e)?e:this.invalid()}parse(e){if(!e)return null;let t=null,n=e.match(jr);try{t=n?this.createDate(+n[1],+n[2],+n[3]):null}catch{}if(this.isValid(t))return t;let r=e.replace(/\D/g,` `).trim()?.match(kr)??e.match(Ar);try{t=r?this.createDate(+r[3],+r[2],+r[1]):null}catch{}if(!r||r.index!==0||r.length<=2||r.some(e=>e===void 0)||!this.isValid(t))return null;let i=+r[3];if(typeof i==`number`&&i<100&&i>=0){let e=this.getYear(this.today())-2e3+this._cutoffYearOffset;i=i<=e?2e3+i:1900+i}return this.createDate(i,+r[2],+r[1])}format(e,t){if(!this.isValid(e))return``;let n=/* @__PURE__ */ new Date(this.toIso8601(e)+`T00:00:00`),r=new Intl.DateTimeFormat(`de-CH`,{day:`2-digit`,month:`2-digit`,year:`numeric`});if(t?.weekdayStyle===`none`)return r.format(n);let i=t?.weekdayStyle??`short`,a=this.getDayOfWeekNames(i)[this.getDayOfWeek(e)];return a=a.charAt(0).toUpperCase()+a.substring(1),i===`short`&&(a=a.substring(0,2)),`${a}, ${r.format(n)}`}toIso8601(e){let t=(e,t=2)=>`${e}`.padStart(t,`0`);return`${t(this.getYear(e),4)}-${t(this.getMonth(e))}-${t(this.getDate(e))}`}getValidDateOrNull(e){return this.isDateInstance(e)&&this.isValid(e)?e:null}getFirstWeekOffset(e){let t=this.createDate(this.getYear(e),this.getMonth(e),1);return(7+this.getDayOfWeek(t)-this.getFirstDayOfWeek())%7}getIsoWeek(e){let t=(this.getDayOfWeek(e)+6)%7,n=this.addCalendarDays(e,3-t),r=this.getYear(n),i=this.getDate(n);for(let e=1;e<this.getMonth(n);e++)i+=this.getNumDaysInMonth(this.createDate(r,e,1));return{week:Math.ceil(i/7),year:r}}compareDate(e,t){return this.getYear(e)-this.getYear(t)||this.getMonth(e)-this.getMonth(t)||this.getDate(e)-this.getDate(t)}sameDate(e,t){if(e&&t){let n=this.isValid(e),r=this.isValid(t);return n&&r?!this.compareDate(e,t):n==r}return e==t}clampDate(e,t,n){return t&&this.compareDate(e,t)<0?t:n&&this.compareDate(e,n)>0?n:e}};const zr=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;var Br=class extends K{getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()+1}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getAccessibilityFormatDate(e){return new Intl.DateTimeFormat(z.current,{year:`numeric`,month:`long`,day:`numeric`}).format(new Date(e))}getMonthNames(e){let t=new Intl.DateTimeFormat(z.current,{month:e});return this._range(12,e=>t.format(new Date(2017,e,1)))}getDateNames(){let e=new Intl.DateTimeFormat(z.current,{day:`numeric`});return this._range(31,t=>e.format(new Date(2017,0,t+1)))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(z.current,{weekday:e});return this._range(7,e=>t.format(new Date(2017,0,e+1)))}getFirstDayOfWeek(){return 1}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e),0))}today(){return new Date((/* @__PURE__ */ new Date()).setHours(0,0,0,0))}createDate(e,t,n){if(t<1||t>12)throw Error(`Invalid month "${t}". Month has to be between 1 and 12.`);if(n<1)throw Error(`Invalid day "${n}". Day has to be greater than 0.`);let r=this._createDateWithOverflow(e,t-1,n);if(r.getMonth()+1!==t)throw Error(`Invalid day "${n}" for month "${t}".`);return r}isDateInstance(e){return e instanceof Date}isValid(e){return!!e&&!isNaN(e.valueOf())}clone(e){return new Date(e.valueOf())}addCalendarYears(e,t){return this.addCalendarMonths(e,t*12)}addCalendarMonths(e,t){let n=e.getMonth()+t,r=new Date(e.getFullYear(),n,1,0,0,0,0),i=this.getNumDaysInMonth(r);return new Date(this.clone(e).setMonth(n,Math.min(i,e.getDate())))}addCalendarDays(e,t){let n=e.getDate()+t;return new Date(e.getFullYear(),e.getMonth(),n,0,0,0,0)}deserialize(e){if(typeof e==`string`){if(!e)return null;if(zr.test(e))return this.getValidDateOrNull(new Date(e.includes(`T`)?e:e+`T00:00:00`))}return super.deserialize(e)}invalid(){return/* @__PURE__ */ new Date(NaN)}_range(e,t){return Array.from({length:e},(e,n)=>t(n))}_createDateWithOverflow(e,t,n){let r=new Date(e,t,n);return e>=0&&e<100&&r.setFullYear(this.getYear(r)-1900),r}};const q=new Br,Vr=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;var Hr=class extends K{constructor(e){if(super(e),typeof Temporal!=`object`)throw Error(`Temporal is not available in the current environment. Please make sure to include the temporal polyfill.`)}getYear(e){return e.year}getMonth(e){return e.month}getDate(e){return e.day}getDayOfWeek(e){return e.dayOfWeek%7}getAccessibilityFormatDate(e){return this.deserialize(e).toLocaleString(z.current,{year:`numeric`,month:`long`,day:`numeric`})}getMonthNames(e){let t=new Intl.DateTimeFormat(z.current,{month:e});return this._range(12,e=>t.format(Temporal.PlainDate.from({year:2017,month:e+1,day:1})))}getDateNames(){let e=new Intl.DateTimeFormat(z.current,{day:`numeric`});return this._range(31,t=>e.format(Temporal.PlainDate.from({year:2017,month:1,day:t+1})))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(z.current,{weekday:e});return this._range(7,e=>t.format(Temporal.PlainDate.from({year:2017,month:1,day:e+1})))}getFirstDayOfWeek(){return 1}getIsoWeek(e){return{week:e.weekOfYear,year:e.yearOfWeek}}getNumDaysInMonth(e){return e.daysInMonth}today(){return Temporal.Now.plainDateISO()}createDate(e,t,n){if(t<1||t>12)throw Error(`Invalid month "${t}". Month has to be between 1 and 12.`);if(n<1)throw Error(`Invalid day "${n}". Day has to be greater than 0.`);try{return Temporal.PlainDate.from({year:e,month:t,day:n},{overflow:`reject`})}catch{throw Error(`Invalid date "${n}" for month with index "${t}".`)}}isDateInstance(e){return e instanceof Temporal.PlainDate}isValid(e){return this.isDateInstance(e)}clone(e){return Temporal.PlainDate.from(e)}addCalendarYears(e,t){return e.add({years:t})}addCalendarMonths(e,t){return e.add({months:t})}addCalendarDays(e,t){return e.add({days:t})}deserialize(e){if(typeof e==`string`){if(!e)return null;if(Vr.test(e))return this.getValidDateOrNull(Temporal.PlainDate.from(e.split(`T`)[0]))}return super.deserialize(e)}invalid(){return null}toIso8601(e){return e.toJSON()}_range(e,t){return Array.from({length:e},(e,n)=>t(n))}};const Ur=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{get(){let n=t.get.call(this);return e(this,n)}};throw Error(`Unsupported decorator location: ${r}`)},Wr=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{set(r){let i=n.access.get(this);t.set.call(this,r);let a=n.access.get(this);a!==i&&e(this,a,i)}};throw Error(`Unsupported decorator location: ${r}`)},J=/* @__PURE__ */ new WeakMap,Y=/* @__PURE__ */ new WeakMap,Gr=()=>(e,t)=>{let{kind:n,metadata:i,name:a}=t;if(n===`accessor`){if(r)return{};let n=globalThis.litPropertyMetadata.get(i)?.get(a)?.attribute,o=typeof n==`string`?n:a;return t.addInitializer(function(){this.addController({host:this,rootNode:null,checkIdReference(e){let n=this.host.getAttribute(o)??Y.get(this.host);if(n&&typeof n==`string`&&(!e||e.has(n))){let e=this.rootNode?.getElementById?.(n)??null;t.access.get(this.host)!==e&&t.access.set(this.host,e)}},hostConnected(){this.rootNode=this.host.getRootNode(),this.checkIdReference();let e=J.get(this.rootNode);if(e)e.controllers.add(this);else{let e=/* @__PURE__ */ new Set([this]),t=new MutationObserver(t=>{let n=/* @__PURE__ */ new Set;for(let e of t)if(e.type===`attributes`)e.oldValue&&n.add(e.oldValue),e.target.id&&n.add(e.target.id);else if(e.type===`childList`)for(let t of[...e.addedNodes,...e.removedNodes])t instanceof HTMLElement&&(t.id&&n.add(t.id),t.querySelectorAll(`[id]`).forEach(e=>{e.id&&n.add(e.id)}));e.forEach(e=>e.checkIdReference(n))});t.observe(this.rootNode,{attributeFilter:[`id`],attributeOldValue:!0,childList:!0,subtree:!0}),J.set(this.rootNode,{observer:t,controllers:e})}},hostDisconnected(){if(r||!this.rootNode)return;let e=J.get(this.rootNode);e&&(e.controllers.delete(this),e.controllers.size===0&&(e.observer.disconnect(),J.delete(this.rootNode))),this.rootNode=null}})}),{set(t){if(typeof t!=`string`)Y.delete(this),t instanceof HTMLElement&&this.hasAttribute(o)&&t.id!==this.getAttribute(o)&&this.removeAttribute(o);else if(this.hasAttribute(o)&&this.getAttribute(o)!==t)return;else{let e=t?this.getRootNode?.()?.getElementById?.(t):null;e?t=e:t&&=(Y.set(this,t),null)}e.set.call(this,t)}}}throw Error(`Unsupported decorator location: ${n}`)},Kr={toAttribute(e,t){let n=R().datetime?.dateAdapter??q;return n.isValid(e)?n.toIso8601(e):null}},qr=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{set(e){let n=R().datetime?.dateAdapter??q;e=n.getValidDateOrNull(n.deserialize(e)),e=e?n.createDate(n.getYear(e),n.getMonth(e),n.getDate(e)):null,t.set.call(this,e)},get(){let n=R().datetime?.dateAdapter??q,r=t.get.call(this);return n.isValid(r)?n.clone(r):e?.fallback?.(n)}};throw Error(`Unsupported decorator location: ${r}`)};function Jr(e,t){if(r||globalThis.disableAnimation)return!0;let n=getComputedStyle(e).getPropertyValue(t);return parseFloat(n)===0}function X(e,t){let n=t;for(;n;){if(n===e)return!0;n=n instanceof ShadowRoot?n.host:n.parentNode}return!1}function Yr(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}function Xr(e){let t=()=>queueMicrotask(e);document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t):t()}function Z(){return document.body.hasAttribute(`data-sbb-scroll-disabled`)}function Zr(e){let t=getComputedStyle(e).overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}function Qr(e){for(let t of e){if(t===document.body||t===document.documentElement)break;if(t instanceof Element&&Zr(t))return t}return null}var $r=class{constructor(){this._scrollPosition=0,this._touchStartY=0,this._touchStart=e=>{this._touchStartY=e.touches[0]?.clientY??0},this._touchMove=e=>{let t=e.touches[0];if(!t)return;let n=Qr(e.composedPath());if(!n){e.preventDefault();return}let r=t.clientY-this._touchStartY,i=n.scrollTop<=0,a=n.scrollTop+n.clientHeight>=n.scrollHeight;(i&&r>0||a&&r<0)&&e.preventDefault()}}disableScroll(){if(Z())return;this._scrollPosition=window.scrollY||document.documentElement.scrollTop,this._position=document.body.style.position,this._top=document.body.style.top,this._insetInline=document.body.style.insetInline,this._overflow=document.body.style.overflow;let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.position=`fixed`,document.body.style.top=`-${this._scrollPosition}px`,document.body.style.insetInline=`0 ${e}px`,document.body.style.overflow=`hidden`,document.body.style.setProperty(`--sbb-scrollbar-reserved-space`,`${e}px`),document.addEventListener(`touchstart`,this._touchStart,{passive:!0}),document.addEventListener(`touchmove`,this._touchMove,{passive:!1}),document.body.toggleAttribute(`data-sbb-scroll-disabled`,!0)}enableScroll(){Z()&&(document.body.style.position=this._position||``,document.body.style.top=this._top||``,document.body.style.insetInline=this._insetInline||``,document.body.style.overflow=this._overflow||``,document.body.style.removeProperty(`--sbb-scrollbar-reserved-space`),document.removeEventListener(`touchstart`,this._touchStart),document.removeEventListener(`touchmove`,this._touchMove),document.body.removeAttribute(`data-sbb-scroll-disabled`),window.scrollTo(0,this._scrollPosition))}};function ei(e){e.key===` `&&e.preventDefault()}function ti(e,t){let n=new(Object.getPrototypeOf(e)).constructor(e.type,e);t.dispatchEvent(n)}const ni=e=>{class t extends e{constructor(){super(...arguments),this.isAnimating=!1,this._animationPromise=Promise.resolve()}get animationComplete(){return this._animationPromise}disconnectedCallback(){super.disconnectedCallback(),this.stopAnimation()}startAnimation(){this.isAnimating||(this._animationPromise=this._enqueueAnimation())}stopAnimation(){}async _enqueueAnimation(){this.isAnimating=!0;let e=this.stopAnimation,t=new Promise(t=>{this.stopAnimation=()=>{e(),this.isAnimating=!1,t()}});try{await this._animationPromise}catch(e){Promise.reject(e)}return t}}return t},ri=e=>{class t extends e{constructor(){super(...arguments),this._dynamicStyleSheet=null}get dynamicStyleSheet(){return this._dynamicStyleSheet??null}createRenderRoot(){let e=super.createRenderRoot();return r||(this._dynamicStyleSheet=new CSSStyleSheet,e.adoptedStyleSheets?.push(this._dynamicStyleSheet)),e}}return t},ii=e=>(()=>{let n=V(H(L(e))),r=[],i;return class extends n{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0;i=[l({type:Boolean,converter:{...t,fromAttribute:(e,n)=>({value:t.fromAttribute?.(e,n),attribute:!0})}})],o(this,null,i,{kind:`setter`,name:`checked`,static:!1,private:!1,access:{has:e=>`checked`in e,set:(e,t)=>{e.checked=t}},metadata:e},null,r),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`checkbox`}set checked(e){let t=typeof e==`object`&&e.attribute;t&&(e=e.value),this.hasUpdated&&!t&&(this._attributeMutationBlocked=!0),this._checked=!!e,this.updateFormValue()}get checked(){return this._checked}get type(){return`checkbox`}constructor(){super(),this._attributeMutationBlocked=(s(this,r),!1),this._languageController=new z(this),this._checked=!1,this._handleKeyboardInteraction=e=>{e.key===` `&&this._handleUserInteraction()},this._handleUserInteraction=()=>{this.disabled||(this.withUserInteraction?.(),this.checked=!this.checked,this._attributeMutationBlocked=!0,this.dispatchEvent(new InputEvent(`input`,{composed:!0,bubbles:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0})))},this.addEventListener?.(`click`,this._handleUserInteraction),this.addEventListener?.(`keydown`,ei),this.addEventListener?.(`keyup`,this._handleKeyboardInteraction)}connectedCallback(){super.connectedCallback(),this.tabIndex=0}attributeChangedCallback(e,t,n){e===`checked`&&this._attributeMutationBlocked||super.attributeChangedCallback(e,t,n)}formResetCallback(){this.checked=this.hasAttribute(`checked`),this._attributeMutationBlocked=!1}formStateRestoreCallback(e,t){e&&(this.checked=e===`true`)}updateFormValue(){this.checked?super.updateFormValue():this.internals.setFormValue(null)}formState(){return`${this.checked}`}shouldValidate(e){return super.shouldValidate(e)||e===`checked`||e===`required`}validate(){super.validate(),this.required&&!this.checked?this.setValidityFlag(`valueMissing`,pn[this._languageController.current]):this.removeValidityFlag(`valueMissing`)}}})(),ai=e=>(()=>{let t=e,n=[],r;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[l({type:Boolean,attribute:`readonly`})],o(this,null,r,{kind:`setter`,name:`readOnly`,static:!1,private:!1,access:{has:e=>`readOnly`in e,set:(e,t)=>{e.readOnly=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}set readOnly(e){this.#e=!!e,this.toggleAttribute(`readonly`,this.#e)}get readOnly(){return this.#e}#e=(s(this,n),!1)}})(),oi=(()=>{if(r)return!1;let e=document.createElement(`div`);return e.setAttribute(`contenteditable`,`PLAINTEXT-ONLY`),e.contentEditable===`plaintext-only`})(),si=e=>(()=>{let t=ai(V(H(L(e)))),i=[],a,u,d;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;a=[l()],u=[l({attribute:!1})],d=[c({passive:!0})],o(this,null,a,{kind:`setter`,name:`value`,static:!1,private:!1,access:{has:e=>`value`in e,set:(e,t)=>{e.value=t}},metadata:e},null,i),o(this,null,u,{kind:`setter`,name:`placeholder`,static:!1,private:!1,access:{has:e=>`placeholder`in e,set:(e,t)=>{e.placeholder=t}},metadata:e},null,i),o(this,null,d,{kind:`method`,name:`_cleanChildren`,static:!1,private:!1,access:{has:e=>`_cleanChildren`in e,get:e=>e._cleanChildren},metadata:e},null,i),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`textbox`}static{this.formFieldAssociated=!0}get type(){return`text`}set value(e){this._value=this._cleanText(e),this.hasUpdated&&this._assignValue(this._value),this.dispatchEvent(new Event(`displayvaluechange`,{bubbles:!0,composed:!0}))}get value(){return this._value??``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`),this.internals.ariaPlaceholder=e||null}get placeholder(){return this.getAttribute(`placeholder`)??``}constructor(){super(),this._shouldEmitChange=(s(this,i),!1),this._shouldTriggerSubmit=!1,this.language=new z(this),this._value=``,this.addEventListener?.(`input`,()=>{let e=this._value;this._value=this._cleanText(this.textContent??``),this.requestUpdate(`value`,e),this.internals.states.add(`interacted`),this._shouldEmitChange=!0},{capture:!0}),this.addEventListener?.(`change`,()=>this._shouldEmitChange=!1,{capture:!0}),this.addEventListener?.(`keydown`,e=>{this._requiresEmptyPatch()&&this._assignValue(``);let t=window.getSelection(),n=t?.getRangeAt(0);if(n&&!n.collapsed&&n.startContainer===this&&n.endContainer===this.lastChild&&n.selectNodeContents(this.lastChild),(e.key===`Enter`||e.key===`
|
|
44
44
|
`)&&e.isTrusted)e.preventDefault(),e.stopImmediatePropagation(),this._shouldTriggerSubmit=this.dispatchEvent(new KeyboardEvent(`keydown`,e));else if(A&&this.value&&(e.key===`Backspace`||e.key===`Delete`)&&e.isTrusted){if(e.preventDefault(),e.stopImmediatePropagation(),!this.dispatchEvent(new KeyboardEvent(`keydown`,e)))return;let n=t?.getRangeAt(0);if(!n)return;n.collapsed?e.key===`Backspace`&&n.startOffset>0?(n.setStart(n.startContainer,n.startOffset-1),n.deleteContents(),this._dispatchInputEvent()):e.key===`Delete`&&n.endOffset<this.value.length&&(n.setEnd(n.endContainer,n.endOffset+1),n.deleteContents(),this._dispatchInputEvent()):(n.deleteContents(),this._dispatchInputEvent())}},{capture:!0}),this.addEventListener?.(`keyup`,e=>{e.key===`Enter`||e.key===`
|
|
45
|
-
`?(this._emitChangeIfNecessary(),this._shouldTriggerSubmit&&(this._shouldTriggerSubmit=!1,this.form?.requestSubmit())):this._requiresEmptyPatch()&&this._setCursorAt(0)},{capture:!0}),this.addEventListener?.(`paste`,e=>{e.preventDefault(),this._requiresEmptyPatch()&&this._assignValue(``);let t=this._cleanText(e.clipboardData?.getData(`text/plain`)??``),n=window.getSelection()?.getRangeAt(0);n&&t&&(n.deleteContents(),n.insertNode(document.createTextNode(this.preparePastedText(t))),n.setStart(n.endContainer,n.endOffset),this._dispatchInputEvent())}),this.addEventListener?.(`focus`,()=>{T.mostRecentModality===`keyboard`&&window.getSelection()?.selectAllChildren(this)}),this.addEventListener?.(`touchend`,()=>{this._requiresEmptyPatch()&&(this._assignValue(` `),this._setCursorAt(0))}),this.addEventListener?.(`click`,()=>{this._requiresEmptyPatch()&&T.mostRecentModality===`touch`&&this._setCursorAt(0)}),this.addEventListener?.(`blur`,()=>{window.getSelection()?.removeAllRanges(),this.value===``&&this._assignValue(``),this._emitChangeIfNecessary(),this.scrollLeft=0},{capture:!0})}isDisabledExternally(){return this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals.ariaMultiLine=`false`,this._updateContenteditable(),this._assignValue(this.value)}focus(e){if(super.focus(e),this._canSelect()){let e=window.getSelection();if(!e)return;let t=e.rangeCount>0?e.getRangeAt(0):null;if(t&&t.startOffset!==0)return;this._setCursorAt(this.textContent.length)}}attributeChangedCallback(e,t,n){e===`value`&&this.matches?.(`:is(:state(interacted),[state--interacted])`)||super.attributeChangedCallback(e,t,n)}formResetCallback(){this.internals.states.delete(`interacted`),this.value=this.getAttribute(`value`)??``}formStateRestoreCallback(e,t){e&&typeof e==`string`&&(this.value=e)}select(){window.getSelection()?.selectAllChildren(this)}firstUpdated(e){super.firstUpdated(e),this.value&&!this.innerHTML.length&&this._assignValue(this.value)}requestUpdate(e,t,n){super.requestUpdate(e,t,n),this.isConnected&&(e===`disabled`||e===`formDisabled`||e===`readOnly`)&&this._updateContenteditable()}shouldValidate(e){return super.shouldValidate(e)||e===`value`||e===`required`}validate(){super.validate(),this.required&&!this.value?this.setValidityFlag(`valueMissing`,gn[this.language.current]):this.removeValidityFlag(`valueMissing`)}isSelected(){if(r)return!1;let e=window.getSelection();return!!e&&e.rangeCount>0&&this.contains(e.anchorNode)}preparePastedText(e){return e}_requiresEmptyPatch(){return!r&&k&&this.value===``&&window.matchMedia(`(pointer: coarse)`).matches}_assignValue(e){this.innerHTML=e}_setCursorAt(e){let t=window.getSelection();if(!this.firstChild||!t)return;let n=document.createRange();n.setStart(this.firstChild,e),n.collapse(!0),t.removeAllRanges(),t.addRange(n)}_cleanText(e){return e===null?``:`${e}`.replace(/[\n\r]+/g,``)}_dispatchInputEvent(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}_cleanChildren(){if(this.childElementCount)for(let e of this.children)e.remove()}_updateContenteditable(){if(!r&&this.isConnected){this.internals.ariaReadOnly=this.readOnly?`true`:null,this.internals.ariaDisabled=this.disabled?`true`:null;let e=this.disabled||this.readOnly?`false`:ai?`plaintext-only`:`true`;this.setAttribute(`contenteditable`,e),this.readOnly?this.setAttribute(`tabindex`,`0`):this.removeAttribute(`tabindex`)}}_emitChangeIfNecessary(){this._shouldEmitChange&&(this._shouldEmitChange=!1,this.dispatchEvent(new Event(`change`,{bubbles:!0})))}_canSelect(){return!r&&!this.disabled&&!this.readOnly&&!!this.value}render(){return n`<slot @slotchange=${this._cleanChildren}></slot>`}}})(),Q=/* @__PURE__ */ new WeakMap,si=e=>(()=>{let t=V(H(L(e))),n=[],i,a;return class e extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;i=[l({type:Boolean})],a=[l()],o(this,null,i,{kind:`setter`,name:`checked`,static:!1,private:!1,access:{has:e=>`checked`in e,set:(e,t)=>{e.checked=t}},metadata:e},null,n),o(this,null,a,{kind:`setter`,name:`name`,static:!1,private:!1,access:{has:e=>`name`in e,set:(e,t)=>{e.name=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`radio`}static{this._tabindexState={elements:/* @__PURE__ */ new Set,handleEvent(e){e.key===`Tab`&&Array.from(this.elements,e=>e.associatedRadioButtons).filter((e,t,n)=>!!e&&n.indexOf(e)===t).forEach(e=>e?.values().next().value?.updateFocusableRadios())},add(e){this.elements.size||window.addEventListener(`keydown`,this,{passive:!0}),this.elements.add(e)},delete(e){this.elements.delete(e),this.elements.size||window.removeEventListener(`keydown`,this)}}}set checked(e){this._checked=!!e,this.toggleState(`checked`,this.checked),this.internals.ariaChecked=this.checked.toString(),this.updateFormValue(),this._synchronizeGroupState()}get checked(){return this._checked}set name(e){let t=this.name;e!==t&&(super.name=e,this._disconnectFromRegistry(t),this._connectToRegistry(),this._synchronizeGroupState())}get name(){return super.name}get type(){return`radio`}constructor(){super(),this._checked=(s(this,n),!1),this._languageController=new z(this),this._tabindexState=e._tabindexState,this.addEventListener?.(`keydown`,e=>this._handleArrowKeyDown(e))}focus(e){this.hasAttribute(`tabindex`)||this.addController(new Dr(this)),super.focus(e)}connectedCallback(){super.connectedCallback(),this._connectToRegistry(),this._synchronizeGroupState(),this.updateFocusableRadios()}disconnectedCallback(){super.disconnectedCallback(),this._disconnectFromRegistry(this.name)}formResetCallback(){this.checked=this.hasAttribute(`checked`)}formStateRestoreCallback(e,t){typeof e==`string`||e==null?this.checked=e===this.value:e instanceof FormData&&this._readFormData(e).then(e=>{this.checked=e===this.value})}requestUpdate(e,t,n){super.requestUpdate(e,t,n),(e===`disabled`||e===`formDisabled`||e===`checked`||e===`name`)&&this.updateFocusableRadios()}async _readFormData(e){let t=e.get(this.name);return t instanceof Blob?JSON.parse(await t.text()):t}updateFormValue(){this.checked?super.updateFormValue():this.internals.setFormValue(null)}shouldValidate(e){return super.shouldValidate(e)||e===`checked`||e===`required`}validate(){if(super.validate(),!this.associatedRadioButtons)return;let e=!1,t=!1;for(let n of this.associatedRadioButtons)e||=n.required,t||=n.checked;e&&!t?this.associatedRadioButtons.forEach(e=>e.setValidityFlag(`valueMissing`,mn[this._languageController.current])):this.associatedRadioButtons.forEach(e=>e.removeValidityFlag(`valueMissing`))}updateFocusableRadios(){let e=this._interactableGroupedRadios(),t=e.findIndex(e=>e.checked&&!e.disabled&&!e.formDisabled),n=t===-1?e.findIndex(e=>!e.disabled&&!e.formDisabled):t;n!==-1&&(e[n].tabIndex=0,e.splice(n,1)),e.forEach(e=>e.removeAttribute(`tabindex`))}async navigateByKeyboard(e){e.checked=!0,this.emitChangeEvents(),e.focus()}emitChangeEvents(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,cancelable:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}_synchronizeGroupState(){this.checked&&this._deselectGroupedRadios()}_connectToRegistry(){if(!this.name||r)return;let e=this.form??this.getRootNode();this._radioButtonGroupsMap=Q.get(e),this._radioButtonGroupsMap||(this._radioButtonGroupsMap=/* @__PURE__ */ new Map,Q.set(e,this._radioButtonGroupsMap)),this.associatedRadioButtons=this._radioButtonGroupsMap.get(this.name),this.associatedRadioButtons||(this.associatedRadioButtons=/* @__PURE__ */ new Set,this._radioButtonGroupsMap.set(this.name,this.associatedRadioButtons));let t=Array.from(this.associatedRadioButtons);this.associatedRadioButtons.clear();let n=t.findIndex(e=>this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING);n===-1?t.push(this):t.splice(n,0,this),t.forEach(e=>this.associatedRadioButtons.add(e)),this._tabindexState.add(this),this.validate()}_disconnectFromRegistry(e){this._tabindexState.delete(this),this.associatedRadioButtons?.delete(this),this.associatedRadioButtons?.size===0?this._radioButtonGroupsMap?.delete(e):this.validate(),this.associatedRadioButtons=void 0,this._radioButtonGroupsMap=void 0}_interactableGroupedRadios(){return Array.from(this.associatedRadioButtons??[]).filter(e=>M.isVisible(e))}_deselectGroupedRadios(){Array.from(this.associatedRadioButtons??[]).filter(e=>e!==this).forEach(e=>e.checked=!1)}async _handleArrowKeyDown(e){if(!p(e))return;e.preventDefault();let t=this._interactableGroupedRadios().filter(e=>!e.disabled&&!e.formDisabled),n=y(e,t.indexOf(this),t.length);await this.navigateByKeyboard(t[n])}}})();var ci=`:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:light-dark(color-mix(in srgb, var(--sbb-color-black) 30%, transparent),color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:light-dark(color-mix(in srgb, var(--sbb-color-black) 60%, transparent),color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-button,:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}:is(.sbb-scrollbar-negative,.sbb-scrollbar-thick-negative,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-color:color-mix(in srgb, var(--sbb-color-white) 30%, transparent);--sbb-scrollbar-color-hover:color-mix(in srgb, var(--sbb-color-white) 60%, transparent)}:is(.sbb-scrollbar-thick-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-thumb-width:.5rem;--sbb-scrollbar-thumb-width-hover:var(--sbb-scrollbar-thumb-width);--sbb-scrollbar-width-firefox:auto}:is(.sbb-scrollbar-track-visible,.sbb-scrollbar-thick-track-visible){--sbb-scrollbar-track-color:var(--sbb-background-color-4)}:is(.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-track-color:var(--sbb-background-color-4-negative)}
|
|
46
|
-
`,
|
|
47
|
-
`,
|
|
48
|
-
`,
|
|
49
|
-
`,
|
|
50
|
-
`,
|
|
51
|
-
`;const
|
|
45
|
+
`?(this._emitChangeIfNecessary(),this._shouldTriggerSubmit&&(this._shouldTriggerSubmit=!1,this.form?.requestSubmit())):this._requiresEmptyPatch()&&this._setCursorAt(0)},{capture:!0}),this.addEventListener?.(`paste`,e=>{e.preventDefault(),this._requiresEmptyPatch()&&this._assignValue(``);let t=this._cleanText(e.clipboardData?.getData(`text/plain`)??``),n=window.getSelection()?.getRangeAt(0);n&&t&&(n.deleteContents(),n.insertNode(document.createTextNode(this.preparePastedText(t))),n.setStart(n.endContainer,n.endOffset),this._dispatchInputEvent())}),this.addEventListener?.(`focus`,()=>{T.mostRecentModality===`keyboard`&&window.getSelection()?.selectAllChildren(this)}),this.addEventListener?.(`touchend`,()=>{this._requiresEmptyPatch()&&(this._assignValue(` `),this._setCursorAt(0))}),this.addEventListener?.(`click`,()=>{this._requiresEmptyPatch()&&T.mostRecentModality===`touch`&&this._setCursorAt(0)}),this.addEventListener?.(`blur`,()=>{window.getSelection()?.removeAllRanges(),this.value===``&&this._assignValue(``),this._emitChangeIfNecessary(),this.scrollLeft=0},{capture:!0})}isDisabledExternally(){return this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals.ariaMultiLine=`false`,this._updateContenteditable(),this._assignValue(this.value)}focus(e){if(super.focus(e),this._canSelect()){let e=window.getSelection();if(!e)return;let t=e.rangeCount>0?e.getRangeAt(0):null;if(t&&t.startOffset!==0)return;this._setCursorAt(this.textContent.length)}}attributeChangedCallback(e,t,n){e===`value`&&this.matches?.(`:is(:state(interacted),[state--interacted])`)||super.attributeChangedCallback(e,t,n)}formResetCallback(){this.internals.states.delete(`interacted`),this.value=this.getAttribute(`value`)??``}formStateRestoreCallback(e,t){e&&typeof e==`string`&&(this.value=e)}select(){window.getSelection()?.selectAllChildren(this)}firstUpdated(e){super.firstUpdated(e),this.value&&!this.innerHTML.length&&this._assignValue(this.value)}requestUpdate(e,t,n){super.requestUpdate(e,t,n),this.isConnected&&(e===`disabled`||e===`formDisabled`||e===`readOnly`)&&this._updateContenteditable()}shouldValidate(e){return super.shouldValidate(e)||e===`value`||e===`required`}validate(){super.validate(),this.required&&!this.value?this.setValidityFlag(`valueMissing`,gn[this.language.current]):this.removeValidityFlag(`valueMissing`)}isSelected(){if(r)return!1;let e=window.getSelection();return!!e&&e.rangeCount>0&&this.contains(e.anchorNode)}preparePastedText(e){return e}_requiresEmptyPatch(){return!r&&k&&this.value===``&&window.matchMedia(`(pointer: coarse)`).matches}_assignValue(e){this.innerHTML=e}_setCursorAt(e){let t=window.getSelection();if(!this.firstChild||!t)return;let n=document.createRange();n.setStart(this.firstChild,e),n.collapse(!0),t.removeAllRanges(),t.addRange(n)}_cleanText(e){return e===null?``:`${e}`.replace(/[\n\r]+/g,``)}_dispatchInputEvent(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}_cleanChildren(){if(this.childElementCount)for(let e of this.children)e.remove()}_updateContenteditable(){if(!r&&this.isConnected){this.internals.ariaReadOnly=this.readOnly?`true`:null,this.internals.ariaDisabled=this.disabled?`true`:null;let e=this.disabled||this.readOnly?`false`:oi?`plaintext-only`:`true`;this.setAttribute(`contenteditable`,e),this.readOnly?this.setAttribute(`tabindex`,`0`):this.removeAttribute(`tabindex`)}}_emitChangeIfNecessary(){this._shouldEmitChange&&(this._shouldEmitChange=!1,this.dispatchEvent(new Event(`change`,{bubbles:!0})))}_canSelect(){return!r&&!this.disabled&&!this.readOnly&&!!this.value}render(){return n`<slot @slotchange=${this._cleanChildren}></slot>`}}})(),Q=/* @__PURE__ */ new WeakMap,ci=e=>(()=>{let t=V(H(L(e))),n=[],i,a;return class e extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;i=[l({type:Boolean})],a=[l()],o(this,null,i,{kind:`setter`,name:`checked`,static:!1,private:!1,access:{has:e=>`checked`in e,set:(e,t)=>{e.checked=t}},metadata:e},null,n),o(this,null,a,{kind:`setter`,name:`name`,static:!1,private:!1,access:{has:e=>`name`in e,set:(e,t)=>{e.name=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`radio`}static{this._tabindexState={elements:/* @__PURE__ */ new Set,handleEvent(e){e.key===`Tab`&&Array.from(this.elements,e=>e.associatedRadioButtons).filter((e,t,n)=>!!e&&n.indexOf(e)===t).forEach(e=>e?.values().next().value?.updateFocusableRadios())},add(e){this.elements.size||window.addEventListener(`keydown`,this,{passive:!0}),this.elements.add(e)},delete(e){this.elements.delete(e),this.elements.size||window.removeEventListener(`keydown`,this)}}}set checked(e){this._checked=!!e,this.toggleState(`checked`,this.checked),this.internals.ariaChecked=this.checked.toString(),this.updateFormValue(),this._synchronizeGroupState()}get checked(){return this._checked}set name(e){let t=this.name;e!==t&&(super.name=e,this._disconnectFromRegistry(t),this._connectToRegistry(),this._synchronizeGroupState())}get name(){return super.name}get type(){return`radio`}constructor(){super(),this._checked=(s(this,n),!1),this._languageController=new z(this),this._tabindexState=e._tabindexState,this.addEventListener?.(`keydown`,e=>this._handleArrowKeyDown(e))}focus(e){this.hasAttribute(`tabindex`)||this.addController(new Or(this)),super.focus(e)}connectedCallback(){super.connectedCallback(),this._connectToRegistry(),this._synchronizeGroupState(),this.updateFocusableRadios()}disconnectedCallback(){super.disconnectedCallback(),this._disconnectFromRegistry(this.name)}formResetCallback(){this.checked=this.hasAttribute(`checked`)}formStateRestoreCallback(e,t){typeof e==`string`||e==null?this.checked=e===this.value:e instanceof FormData&&this._readFormData(e).then(e=>{this.checked=e===this.value})}requestUpdate(e,t,n){super.requestUpdate(e,t,n),(e===`disabled`||e===`formDisabled`||e===`checked`||e===`name`)&&this.updateFocusableRadios()}async _readFormData(e){let t=e.get(this.name);return t instanceof Blob?JSON.parse(await t.text()):t}updateFormValue(){this.checked?super.updateFormValue():this.internals.setFormValue(null)}shouldValidate(e){return super.shouldValidate(e)||e===`checked`||e===`required`}validate(){if(super.validate(),!this.associatedRadioButtons)return;let e=!1,t=!1;for(let n of this.associatedRadioButtons)e||=n.required,t||=n.checked;e&&!t?this.associatedRadioButtons.forEach(e=>e.setValidityFlag(`valueMissing`,mn[this._languageController.current])):this.associatedRadioButtons.forEach(e=>e.removeValidityFlag(`valueMissing`))}updateFocusableRadios(){let e=this._interactableGroupedRadios(),t=e.findIndex(e=>e.checked&&!e.disabled&&!e.formDisabled),n=t===-1?e.findIndex(e=>!e.disabled&&!e.formDisabled):t;n!==-1&&(e[n].tabIndex=0,e.splice(n,1)),e.forEach(e=>e.removeAttribute(`tabindex`))}async navigateByKeyboard(e){e.checked=!0,this.emitChangeEvents(),e.focus()}emitChangeEvents(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,cancelable:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}_synchronizeGroupState(){this.checked&&this._deselectGroupedRadios()}_connectToRegistry(){if(!this.name||r)return;let e=this.form??this.getRootNode();this._radioButtonGroupsMap=Q.get(e),this._radioButtonGroupsMap||(this._radioButtonGroupsMap=/* @__PURE__ */ new Map,Q.set(e,this._radioButtonGroupsMap)),this.associatedRadioButtons=this._radioButtonGroupsMap.get(this.name),this.associatedRadioButtons||(this.associatedRadioButtons=/* @__PURE__ */ new Set,this._radioButtonGroupsMap.set(this.name,this.associatedRadioButtons));let t=Array.from(this.associatedRadioButtons);this.associatedRadioButtons.clear();let n=t.findIndex(e=>this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING);n===-1?t.push(this):t.splice(n,0,this),t.forEach(e=>this.associatedRadioButtons.add(e)),this._tabindexState.add(this),this.validate()}_disconnectFromRegistry(e){this._tabindexState.delete(this),this.associatedRadioButtons?.delete(this),this.associatedRadioButtons?.size===0?this._radioButtonGroupsMap?.delete(e):this.validate(),this.associatedRadioButtons=void 0,this._radioButtonGroupsMap=void 0}_interactableGroupedRadios(){return Array.from(this.associatedRadioButtons??[]).filter(e=>M.isVisible(e))}_deselectGroupedRadios(){Array.from(this.associatedRadioButtons??[]).filter(e=>e!==this).forEach(e=>e.checked=!1)}async _handleArrowKeyDown(e){if(!p(e))return;e.preventDefault();let t=this._interactableGroupedRadios().filter(e=>!e.disabled&&!e.formDisabled),n=y(e,t.indexOf(this),t.length);await this.navigateByKeyboard(t[n])}}})();var li=`:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:light-dark(color-mix(in srgb, var(--sbb-color-black) 30%, transparent),color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:light-dark(color-mix(in srgb, var(--sbb-color-black) 60%, transparent),color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-button,:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}:is(.sbb-scrollbar-negative,.sbb-scrollbar-thick-negative,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-color:color-mix(in srgb, var(--sbb-color-white) 30%, transparent);--sbb-scrollbar-color-hover:color-mix(in srgb, var(--sbb-color-white) 60%, transparent)}:is(.sbb-scrollbar-thick-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-thumb-width:.5rem;--sbb-scrollbar-thumb-width-hover:var(--sbb-scrollbar-thumb-width);--sbb-scrollbar-width-firefox:auto}:is(.sbb-scrollbar-track-visible,.sbb-scrollbar-thick-track-visible){--sbb-scrollbar-track-color:var(--sbb-background-color-4)}:is(.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-track-color:var(--sbb-background-color-4-negative)}
|
|
46
|
+
`,ui=`button{appearance:none;box-sizing:border-box;-webkit-tap-highlight-color:transparent;color:inherit;background:0 0;border:none;border-radius:0;outline:none;margin:0;padding:0}
|
|
47
|
+
`,di=`:host{--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:light-dark(color-mix(in srgb, var(--sbb-color-black) 30%, transparent),color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:light-dark(color-mix(in srgb, var(--sbb-color-black) 60%, transparent),color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent}:host::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}:host::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}:host::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}:host::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}:host::-webkit-scrollbar-button,:host::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){:host{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}
|
|
48
|
+
`,fi=`ul,ol{font-size:inherit;margin:0;padding:0;list-style:none}
|
|
49
|
+
`,pi=`:host(:where([popover])),.sbb-popover-reset:where([popover]){width:auto;height:auto;color:inherit;pointer-events:none;background-color:#0000;border:none;margin:0;padding:0}
|
|
50
|
+
`,mi=`.sbb-screen-reader-only{clip-path:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}
|
|
51
|
+
`;const hi=a(ui),gi=a(di),_i=a(fi),vi=a(mi),yi=a(pi),bi=a(li),xi=`data-ssr-child-count`,Si=e=>(()=>{let t=e,r,a=[],c=[];return class extends t{constructor(){super(...arguments),this.#e=s(this,a,[]),this._handleSlotchange=(s(this,c),()=>{let e=Array.from(this.children??[]).filter(e=>this.listChildLocalNames.includes(e.localName));e.length===this.listChildren.length&&this.listChildren.every((t,n)=>e[n]===t)||(this.listChildren.filter(t=>!e.includes(t)).forEach(e=>e.removeAttribute(`slot`)),this.listChildren=e,this.removeAttribute(xi))})}static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[u()],o(this,null,r,{kind:`accessor`,name:`listChildren`,static:!1,private:!1,access:{has:e=>`listChildren`in e,get:e=>e.listChildren,set:(e,t)=>{e.listChildren=t}},metadata:e},a,c),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementDependencies=[]}static{this.styles=[_i,vi]}#e;get listChildren(){return this.#e}set listChildren(e){this.#e=e}connectedCallback(){super.connectedCallback(),this.shadowRoot?.addEventListener(`slotchange`,this._handleSlotchange,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.shadowRoot?.removeEventListener(`slotchange`,this._handleSlotchange)}updated(e){super.updated(e),e.has(`listChildren`)&&this.listChildren.forEach((e,t)=>e.setAttribute(`slot`,`li-${t}`))}renderList(e={},t={}){let r=this.listSlotEntries(t);return r.length>=2?n`
|
|
52
52
|
<ul
|
|
53
53
|
class=${e.class||this.localName}
|
|
54
54
|
aria-label=${e.ariaLabel||i}
|
|
@@ -65,5 +65,5 @@ let xe=0;var Se=class{constructor(){r||(document.body?this._liveElement=this._cr
|
|
|
65
65
|
<span class=${e.class||this.localName}>
|
|
66
66
|
<span><slot name=${r[0].name}></slot></span>
|
|
67
67
|
</span>
|
|
68
|
-
${this.renderHiddenSlot()} `:this.renderHiddenSlot()}listSlotEntries(e){return(this.listChildren.length?this.listChildren:Array.from({length:+(this.getAttribute(
|
|
69
|
-
`;const wi=e=>(()=>{let t=e,n,r=[],i=[],c,u=[],d=[],f,p=[],m=[],h,g=[],_=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[l({reflect:!0})],c=[I(),l({reflect:!0,type:Boolean})],f=[I(),l()],h=[l({reflect:!0}),Hr((e,t)=>e.group?.size??t)],o(this,null,n,{kind:`accessor`,name:`color`,static:!1,private:!1,access:{has:e=>`color`in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:e},r,i),o(this,null,c,{kind:`accessor`,name:`borderless`,static:!1,private:!1,access:{has:e=>`borderless`in e,get:e=>e.borderless,set:(e,t)=>{e.borderless=t}},metadata:e},u,d),o(this,null,f,{kind:`accessor`,name:`expansionState`,static:!1,private:!1,access:{has:e=>`expansionState`in e,get:e=>e.expansionState,set:(e,t)=>{e.expansionState=t}},metadata:e},p,m),o(this,null,h,{kind:`accessor`,name:`size`,static:!1,private:!1,access:{has:e=>`size`in e,get:e=>e.size,set:(e,t)=>{e.size=t}},metadata:e},g,_),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.styles=[a(Ci)]}#e=s(this,r,`white`);get color(){return this.#e}set color(e){this.#e=e}#t=(s(this,i),s(this,u,!1));get borderless(){return this.#t}set borderless(e){this.#t=e}#n=(s(this,d),s(this,p,``));get expansionState(){return this.#n}set expansionState(e){this.#n=e}#r=(s(this,m),s(this,g,null));get size(){return this.#r}set size(e){this.#r=e}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new Event(`panelconnected`,{bubbles:!0}))}constructor(){super(...arguments),s(this,_)}}})(),Ti=e=>{class t extends e{get group(){return this.closest?.(`sbb-radio-button-group, sbb-checkbox-group`)??null}get panel(){return this.querySelector?.(`sbb-radio-button-panel, sbb-checkbox-panel`)??null}constructor(...e){super(e),this._previousSize=null,this._propertyWatcher=new Qn(this,()=>this.panel,{checked:e=>{this.toggleState(`checked`,e.checked),this.onInputStateChange?.()},disabled:e=>{this.toggleState(`disabled`,e.disabled),this.onInputStateChange?.()},size:e=>{this._previousSize&&this.internals.states.delete(`size-${this._previousSize}`),this._previousSize=e.size,this._previousSize&&this.internals.states.add(`size-${this._previousSize}`)},borderless:e=>{this.toggleState(`borderless`,e.borderless)},color:e=>{this._previousColor&&this.internals.states.delete(`color-${this._previousColor}`),this._previousColor=e.color,this._previousColor&&this.internals.states.add(`color-${this._previousColor}`)}}),this.addEventListener?.(`panelconnected`,()=>this._propertyWatcher.connect())}onInputStateChange(){}}return t},Ei=e=>{class t extends e{constructor(){super(...arguments),this._updatePromise=Promise.resolve(),this._updateResolve=()=>{}}startUpdate(){this._updatePromise=new Promise(e=>this._updateResolve=e)}completeUpdate(){this._updateResolve()}async getUpdateComplete(){let e=await super.getUpdateComplete();return await this._updatePromise,e}}return t};function $(e){let t=window.getComputedStyle(e),n=t.display,r=parseInt(t.maxHeight,10).toString();if(n!==`none`&&r!==`0`)return{scrollHeight:e.scrollHeight,clientHeight:e.clientHeight,offsetHeight:e.offsetHeight,scrollWidth:e.scrollWidth,clientWidth:e.clientWidth,offsetWidth:e.offsetWidth};e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.display=`block`;let i=e.scrollHeight,a=e.clientHeight,o=e.offsetHeight,s=e.scrollWidth,c=e.clientWidth,l=e.offsetWidth;return e.style.display=``,e.style.position=``,e.style.visibility=``,{scrollHeight:i,clientHeight:a,offsetHeight:o,scrollWidth:s,clientWidth:c,offsetWidth:l}}function Di(e,t){if(!e||!t)return!1;let n=e.getBoundingClientRect();return n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Oi(e,t,n,r){let i=r?.verticalOffset||0,a=r?.horizontalOffset||0,o=r?.responsiveHeight||!1,s=t.getBoundingClientRect(),c=$(e),l=s.left,u=s.top,d=document.documentElement.clientWidth-(l+s.width),f=u-i,p=document.documentElement.clientHeight-(u+s.height+i),m=l,h=u+s.height+i,g=c.offsetWidth-s.width,_={horizontal:`start`,vertical:`below`},v=`${p-i}px`;r?.centered&&l-16+s.width/2>c.offsetWidth/2&&d-16>g/2&&(m-=g/=2,_.horizontal=`center`),d<g&&l>g&&(m-=g,_.horizontal=`end`),a&&_.horizontal!==`center`&&s.width/2<a&&(m+=a*(_.horizontal===`start`?-1:1)),(l<g&&d<g||document.documentElement.clientWidth<c.offsetWidth)&&(m=document.documentElement.clientWidth/2-c.offsetWidth/2);let y=p-i>=c.scrollHeight,b=f-i>=(o?c.clientHeight:c.scrollHeight),x=!y&&(b||f>p);!r?.forceBelow&&(r?.forceAbove||x)&&(h=f<c.scrollHeight?h-s.height-f-i:u-c.clientHeight-i,v=`${f-i}px`,_.vertical=`above`);let S=n.getBoundingClientRect();return S.left<0&&(m-=S.left),S.top<0&&(h-=S.top),{top:h,left:m,maxHeight:v,alignment:_}}function ki(e,t,n,r){let i=r?.verticalOffset||0,a=r?.horizontalOffset||0,o=t.getBoundingClientRect(),s=$(e),c=t.parentElement.shadowRoot.querySelector(r?.contentSelector??`.${e.className}`).getBoundingClientRect(),l=n.getBoundingClientRect(),u=document.documentElement.clientWidth-c.right,d=document.documentElement.clientHeight-(o.top-i),f=document.documentElement.clientHeight,p=`${f-32}px`,m={horizontal:`end`,vertical:`above`},h=s.offsetWidth+a,g=c.right,_=o.top+i;return u<h&&o.left>h&&(g=g-c.width-s.offsetWidth,m.horizontal=`start`),a&&m.horizontal!==`center`&&(g+=a*(m.horizontal===`start`?-1:1)),d<s.scrollHeight&&(_=f-s.clientHeight-16),l.left<0&&(g-=l.left),l.top<0&&(_-=l.top),{top:_,left:g,maxHeight:p,alignment:m}}function Ai(e,t,n,r,i,a=`auto`){if(!e||!t)return;let o=t.getBoundingClientRect();i.style.setProperty(`--sbb-options-panel-width`,`${t.offsetWidth}px`),i.style.setProperty(`--sbb-options-panel-origin-height`,`${t.offsetHeight}px`),i.style.setProperty(`--sbb-options-panel-origin-position-x`,`${o.left}px`),i.style.setProperty(`--sbb-options-panel-origin-position-y`,`${o.top}px`);let s=Oi(n,t,r,{forceBelow:a===`below`,forceAbove:a===`above`});i.style.setProperty(`--sbb-options-panel-position-x`,`${s.left}px`),i.style.setProperty(`--sbb-options-panel-position-y`,`${s.top}px`),i.style.setProperty(`--sbb-options-panel-max-height-calculated`,s.maxHeight);let c=s.alignment.vertical===`above`;i.toggleState?.(`options-panel-position-above`,c),i.toggleState?.(`options-panel-position-below`,!c),t.setAttribute(`data-options-panel-position`,s.alignment.vertical)}var ji=class{constructor(){this._overlays=/* @__PURE__ */ new Set,this._pointerDownListener=e=>{this._pointerDownEventTarget=e.composedPath()[0]},this._clickListener=e=>{let t=e.composedPath()[0],n=e.type===`click`&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=void 0;for(let e of Array.from(this._overlays).reverse()){if(X(e,t)||X(e,n))break;e.dispatchEvent(new Event(`overlayOutsidePointer`))}}}connect(e){this._overlays.size||(this._addGlobalEventListeners(),j&&(this._cursorOriginalValue=document.body.style.cursor,document.body.style.cursor=`pointer`)),this._overlays.add(e)}disconnect(e){this._overlays.delete(e),this._overlays.size||(this._abortController?.abort(),this._abortController=void 0,this._pointerDownEventTarget=void 0,j&&(document.body.style.cursor=this._cursorOriginalValue))}_addGlobalEventListeners(){let e=document.body;this._abortController=new AbortController;let t={capture:!0,passive:!0,signal:this._abortController.signal};e.addEventListener(`click`,this._clickListener,t),!ie&&!j&&(e.addEventListener(`pointerdown`,this._pointerDownListener,t),e.addEventListener(`auxclick`,this._clickListener,t),e.addEventListener(`contextmenu`,this._clickListener,t))}};const Mi=new ji;function Ni(e,t,n,r){t&&(t.ariaHasPopup=n,t.ariaControlsElements=Oe(t.ariaControlsElements,e),t.ariaExpanded=`${r===`opening`||r===`opened`}`)}function Pi(e){e&&(e.ariaHasPopup=null,e.ariaControlsElements=null,e.ariaExpanded=null)}function Fi(e,t,n,r=`listbox`){e&&(e.setAttribute(`autocomplete`,`off`),e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-haspopup`,r),e.setAttribute(`aria-controls`,t),e.setAttribute(`aria-expanded`,`${n}`))}function Ii(e){e&&(e.removeAttribute(`autocomplete`),e.removeAttribute(`role`),e.removeAttribute(`aria-autocomplete`),e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-expanded`))}export{K as DateAdapter,Or as FORMAT_DATE,Fr as FRIDAY,Ar as ISO8601_FORMAT_DATE,te as IS_FOCUSABLE_QUERY,le as InteractivityChecker,ce as IsFocusableConfig,jr as MONDAY,zr as NativeDateAdapter,Ae as NumberOrNull,Ir as SATURDAY,kr as SEPARATORLESS_FORMAT_DATE,Lr as SUNDAY,F as SbbActionBaseElement,ti as SbbAnimationCompleteMixin,Pe as SbbButtonBaseElement,Ne as SbbButtonLikeBaseElement,vr as SbbDarkModeController,qn as SbbDisabledInteractiveMixin,V as SbbDisabledMixin,Jn as SbbDisabledTabIndexActionMixin,ni as SbbDynamicStylesheetMixin,P as SbbElement,er as SbbEscapableOverlayController,be as SbbFocusTrapController,ee as SbbFocusVisibleWithinController,ri as SbbFormAssociatedCheckboxMixin,oi as SbbFormAssociatedInputMixin,L as SbbFormAssociatedMixin,si as SbbFormAssociatedRadioButtonMixin,nr as SbbIdReferenceController,sr as SbbInertController,z as SbbLanguageController,Gn as SbbLinkBaseElement,Se as SbbLiveAnnouncer,_r as SbbMediaMatcherController,pr as SbbMediaQueryBreakpointLargeAndAbove,gr as SbbMediaQueryBreakpointLargeAndBelow,fr as SbbMediaQueryBreakpointSmallAndAbove,hr as SbbMediaQueryBreakpointSmallAndBelow,mr as SbbMediaQueryBreakpointUltraAndAbove,dr as SbbMediaQueryBreakpointZeroAndAbove,W as SbbMediaQueryDarkMode,cr as SbbMediaQueryForcedColors,lr as SbbMediaQueryHover,ur as SbbMediaQueryPointerCoarse,xi as SbbNamedSlotListMixin,Si as SbbNegativeMixin,Kn as SbbOpenCloseBaseElement,ji as SbbOverlayOutsidePointerEventListener,wr as SbbOverlayPositionController,wi as SbbPanelMixin,Qn as SbbPropertyWatcherController,ii as SbbReadonlyMixin,H as SbbRequiredMixin,Er as SbbScrollController,Qr as SbbScrollHandler,Xn as SbbSelectionGroupBaseElement,Ti as SbbSelectionPanelMixin,N as SbbSlottedChangeEvent,Dr as SbbTemporaryFocusController,Ei as SbbUpdateSchedulerMixin,Pr as THURSDAY,Mr as TUESDAY,Vr as TemporalDateAdapter,Nr as WEDNESDAY,Oe as appendAriaElements,mi as buttonResetStyles,X as containsPierceShadowDom,q as defaultDateAdapter,I as forceType,ei as forwardEvent,Oi as getElementPosition,ki as getElementPositionHorizontal,$ as getElementRectangle,S as getEventTarget,y as getNextElementIndex,Hr as getOverride,Ur as handleDistinctChange,hi as hostScrollbarStyles,$e as i18nAdditionalWagonInformationHeading,Be as i18nAnd,Le as i18nArrival,Wn as i18nAutocompleteActionsHint,Qe as i18nBlockedPassage,Xt as i18nBreadcrumbEllipsisButtonLabel,Un as i18nButton,Pt as i18nCalendarDateSelection,On as i18nCalendarDeselectAll,Nn as i18nCalendarDeselectWeek,jn as i18nCalendarDeselectWeekday,kn as i18nCalendarHeaderNavigationHint,Dn as i18nCalendarSelectAll,Mn as i18nCalendarSelectWeek,An as i18nCalendarSelectWeekday,En as i18nCalendarWeekNumber,In as i18nCarouselArrowsNavigationHint,Fn as i18nCarouselItemAriaLabel,pn as i18nCheckboxRequired,wn as i18nChipDelete,Tn as i18nChipGroupInputDescription,Ve as i18nClass,Zt as i18nClearInput,bt as i18nCloseAlert,Ct as i18nCloseDialog,wt as i18nCloseNavigation,xt as i18nCloseNotification,Et as i18nClosePopover,Tt as i18nCloseSidebar,qe as i18nClosedCompartmentLabel,Jt as i18nCollapsed,Wt as i18nConnectionFrom,Kt as i18nConnectionRoundtrip,Gt as i18nConnectionTo,Xe as i18nCouchetteWagonLabel,Ut as i18nDateChangedTo,_n as i18nDateInvalid,yn as i18nDateMax,vn as i18nDateMin,Ht as i18nDatePickerPlaceholder,et as i18nDeparture,St as i18nDialog,Ie as i18nDirection,nt as i18nDownload,at as i18nDurationDay,it as i18nDurationHour,rt as i18nDurationMinute,qt as i18nExpanded,en as i18nFileSelectorButtonLabel,tn as i18nFileSelectorButtonLabelMultiple,on as i18nFileSelectorCurrentlySelected,an as i18nFileSelectorDeleteFile,nn as i18nFileSelectorSubtitleLabel,rn as i18nFileSelectorSubtitleLabelMultiple,Qt as i18nFlipCard,pt as i18nFromPlatform,Dt as i18nGoBack,gn as i18nInputRequired,un as i18nItemsPerPage,Je as i18nLocomotiveLabel,Vn as i18nLogo125Anniversary,Hn as i18nLogo125AnniversaryYears,Yt as i18nMapContainerButtonLabel,gt as i18nMeansOfTransport,hn as i18nMultipleSelectionPossible,ft as i18nNew,jt as i18nNextDay,kt as i18nNextMonth,sn as i18nNextPage,Ln as i18nNextSlide,Lt as i18nNextYear,Ft as i18nNextYearRange,tt as i18nNonAccessible,ht as i18nOccupancy,ln as i18nPage,fn as i18nPaginatorOf,dn as i18nPaginatorSelected,Mt as i18nPreviousDay,At as i18nPreviousMonth,cn as i18nPreviousPage,Rn as i18nPreviousSlide,Rt as i18nPreviousYear,It as i18nPreviousYearRange,lt as i18nRealTimeInfo,Bn as i18nRemainingCharacters,Ze as i18nRestaurantWagonLabel,$t as i18nReverseCard,Re as i18nSector,ze as i18nSectorShort,zt as i18nSelectNextDay,Bt as i18nSelectPreviousDay,mn as i18nSelectionRequired,Vt as i18nShowCalendar,Ye as i18nSleepingWagonLabel,zn as i18nSlide,mt as i18nSupersaver,_t as i18nTargetOpensInNewWindow,bn as i18nTimeInputChange,xn as i18nTimeInvalid,Sn as i18nTimeMax,Cn as i18nTimeMaxLength,Pn as i18nTimetableFormSwapButtonLabel,Ot as i18nToday,He as i18nTrain,Ue as i18nTrains,ut as i18nTransferProcedure,dt as i18nTransferProcedures,ct as i18nTravelhints,st as i18nTripDuration,ot as i18nTripQuayChange,Ge as i18nWagonLabel,Ke as i18nWagonLabelNumber,We as i18nWagonsLabel,vt as i18nWalkingDistanceArrival,yt as i18nWalkingDistanceDeparture,Nt as i18nYearMonthSelection,Wr as idReference,M as interactivityChecker,ie as isAndroid,g as isArrowKeyOrPageKeysPressed,p as isArrowKeyPressed,k as isBlink,oe as isChromium,D as isEdge,Di as isEventOnElement,je as isEventPrevented,b as isFakeMousedownFromScreenReader,x as isFakeTouchstartFromScreenReader,re as isFirefox,j as isIOS,ne as isMacOS,h as isNextArrowKeyPressed,se as isNextjs,m as isPreviousArrowKeyPressed,ae as isSafari,O as isTrident,A as isWebkit,qr as isZeroAnimationDuration,gi as listResetStyles,Fe as mergeConfig,B as omitEmptyConverter,Z as pageScrollDisabled,Kr as plainDate,Gr as plainDateConverter,vi as popoverResetStyles,$r as preventScrollOnSpacebarPress,Yr as queueDomContentLoaded,Q as radioButtonRegistry,R as readConfig,Ii as removeAriaComboBoxAttributes,ke as removeAriaElements,Pi as removeAriaOverlayTriggerProperties,T as sbbInputModalityDetector,Ce as sbbLiveAnnouncer,Mi as sbbOverlayOutsidePointerEventListener,_i as screenReaderOnlyStyles,yi as scrollbarStyles,Fi as setAriaComboBoxAttributes,Ni as setAriaOverlayTriggerProperties,Jr as setOrRemoveAttribute,Ai as setOverlayPosition,De as ɵstateController};
|
|
68
|
+
${this.renderHiddenSlot()} `:this.renderHiddenSlot()}listSlotEntries(e){return(this.listChildren.length?this.listChildren:Array.from({length:+(this.getAttribute(xi)??0)})).map((t,n)=>({name:`li-${n}`,ariaHidden:e?.localNameVisualOnly?.includes(t.localName)??!1}))}renderHiddenSlot(){return n`<span hidden><slot></slot></span>`}}})(),Ci=e=>(()=>{let t=e,n,r=[],i=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[I(),l({reflect:!0,type:Boolean})],o(this,null,n,{kind:`accessor`,name:`negative`,static:!1,private:!1,access:{has:e=>`negative`in e,get:e=>e.negative,set:(e,t)=>{e.negative=t}},metadata:e},r,i),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=s(this,r,!1);get negative(){return this.#e}set negative(e){this.#e=e}constructor(){super(...arguments),s(this,i)}}})();var wi=`:host{--sbb-selection-panel-background:var(--sbb-selection-panel-inner-background,var(--sbb-selection-panel-background-default));--sbb-selection-panel-border-width:var(--sbb-selection-panel-inner-border-width,var(--sbb-selection-panel-border-width-default));--sbb-selection-panel-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-4x));display:block;outline:none!important}:host([size=xs]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-xs);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-xs) var(--sbb-selection-panel-input-padding-inline-xs)}:host([size=s]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-s);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-s) var(--sbb-selection-panel-input-padding-inline-s)}:host([size=m]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-m);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-m) var(--sbb-selection-panel-input-padding-inline-m)}:host([color=milk]){--sbb-selection-panel-background:var(--sbb-selection-panel-inner-background,var(--sbb-selection-panel-background-milk))}:host([borderless]:not(:is(:state(checked),[state--checked]))){--sbb-selection-panel-border-color:var(--sbb-selection-panel-border-color-borderless)}:host(:is(:state(checked),[state--checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color:var(--sbb-selection-panel-border-color-checked);--sbb-selection-panel-border-width:var(--sbb-selection-panel-inner-border-width,var(--sbb-selection-panel-border-width-checked))}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor:var(--sbb-cursor-default)}.sbb-selection-panel{cursor:var(--sbb-selection-panel-cursor);border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);height:100%;transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow;display:block;position:relative}@media (forced-colors:active){.sbb-selection-panel:after{content:"";pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius);display:block;position:absolute;inset:0}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{user-select:none;pointer-events:none;border-radius:var(--sbb-selection-panel-border-radius);position:absolute;inset:0;overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{color:var(--sbb-selection-panel-subtext-color);padding-inline-start:calc(var(--sbb-selection-panel-checkbox-dimension) + var(--sbb-spacing-fixed-2x));display:block}:host(:not(:is(:state(slotted-subtext),[state--slotted-subtext]))) slot[name=subtext]{display:none}
|
|
69
|
+
`;const Ti=e=>(()=>{let t=e,n,r=[],i=[],c,u=[],d=[],f,p=[],m=[],h,g=[],_=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[l({reflect:!0})],c=[I(),l({reflect:!0,type:Boolean})],f=[I(),l()],h=[l({reflect:!0}),Ur((e,t)=>e.group?.size??t)],o(this,null,n,{kind:`accessor`,name:`color`,static:!1,private:!1,access:{has:e=>`color`in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:e},r,i),o(this,null,c,{kind:`accessor`,name:`borderless`,static:!1,private:!1,access:{has:e=>`borderless`in e,get:e=>e.borderless,set:(e,t)=>{e.borderless=t}},metadata:e},u,d),o(this,null,f,{kind:`accessor`,name:`expansionState`,static:!1,private:!1,access:{has:e=>`expansionState`in e,get:e=>e.expansionState,set:(e,t)=>{e.expansionState=t}},metadata:e},p,m),o(this,null,h,{kind:`accessor`,name:`size`,static:!1,private:!1,access:{has:e=>`size`in e,get:e=>e.size,set:(e,t)=>{e.size=t}},metadata:e},g,_),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.styles=[a(wi)]}#e=s(this,r,`white`);get color(){return this.#e}set color(e){this.#e=e}#t=(s(this,i),s(this,u,!1));get borderless(){return this.#t}set borderless(e){this.#t=e}#n=(s(this,d),s(this,p,``));get expansionState(){return this.#n}set expansionState(e){this.#n=e}#r=(s(this,m),s(this,g,null));get size(){return this.#r}set size(e){this.#r=e}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new Event(`panelconnected`,{bubbles:!0}))}constructor(){super(...arguments),s(this,_)}}})(),Ei=e=>{class t extends e{get group(){return this.closest?.(`sbb-radio-button-group, sbb-checkbox-group`)??null}get panel(){return this.querySelector?.(`sbb-radio-button-panel, sbb-checkbox-panel`)??null}constructor(...e){super(e),this._previousSize=null,this._propertyWatcher=new Tr(this,()=>this.panel,{checked:e=>{this.toggleState(`checked`,e.checked),this.onInputStateChange?.()},disabled:e=>{this.toggleState(`disabled`,e.disabled),this.onInputStateChange?.()},size:e=>{this._previousSize&&this.internals.states.delete(`size-${this._previousSize}`),this._previousSize=e.size,this._previousSize&&this.internals.states.add(`size-${this._previousSize}`)},borderless:e=>{this.toggleState(`borderless`,e.borderless)},color:e=>{this._previousColor&&this.internals.states.delete(`color-${this._previousColor}`),this._previousColor=e.color,this._previousColor&&this.internals.states.add(`color-${this._previousColor}`)}}),this.addEventListener?.(`panelconnected`,()=>this._propertyWatcher.connect())}onInputStateChange(){}}return t},Di=e=>{class t extends e{constructor(){super(...arguments),this._updatePromise=Promise.resolve(),this._updateResolve=()=>{}}startUpdate(){this._updatePromise=new Promise(e=>this._updateResolve=e)}completeUpdate(){this._updateResolve()}async getUpdateComplete(){let e=await super.getUpdateComplete();return await this._updatePromise,e}}return t};function $(e){let t=window.getComputedStyle(e),n=t.display,r=parseInt(t.maxHeight,10).toString();if(n!==`none`&&r!==`0`)return{scrollHeight:e.scrollHeight,clientHeight:e.clientHeight,offsetHeight:e.offsetHeight,scrollWidth:e.scrollWidth,clientWidth:e.clientWidth,offsetWidth:e.offsetWidth};e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.display=`block`;let i=e.scrollHeight,a=e.clientHeight,o=e.offsetHeight,s=e.scrollWidth,c=e.clientWidth,l=e.offsetWidth;return e.style.display=``,e.style.position=``,e.style.visibility=``,{scrollHeight:i,clientHeight:a,offsetHeight:o,scrollWidth:s,clientWidth:c,offsetWidth:l}}function Oi(e,t){if(!e||!t)return!1;let n=e.getBoundingClientRect();return n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function ki(e,t,n,r){let i=r?.verticalOffset||0,a=r?.horizontalOffset||0,o=r?.responsiveHeight||!1,s=t.getBoundingClientRect(),c=$(e),l=s.left,u=s.top,d=document.documentElement.clientWidth-(l+s.width),f=u-i,p=document.documentElement.clientHeight-(u+s.height+i),m=l,h=u+s.height+i,g=c.offsetWidth-s.width,_={horizontal:`start`,vertical:`below`},v=`${p-i}px`;r?.centered&&l-16+s.width/2>c.offsetWidth/2&&d-16>g/2&&(m-=g/=2,_.horizontal=`center`),d<g&&l>g&&(m-=g,_.horizontal=`end`),a&&_.horizontal!==`center`&&s.width/2<a&&(m+=a*(_.horizontal===`start`?-1:1)),(l<g&&d<g||document.documentElement.clientWidth<c.offsetWidth)&&(m=document.documentElement.clientWidth/2-c.offsetWidth/2);let y=p-i>=c.scrollHeight,b=f-i>=(o?c.clientHeight:c.scrollHeight),x=!y&&(b||f>p);!r?.forceBelow&&(r?.forceAbove||x)&&(h=f<c.scrollHeight?h-s.height-f-i:u-c.clientHeight-i,v=`${f-i}px`,_.vertical=`above`);let S=n.getBoundingClientRect();return S.left<0&&(m-=S.left),S.top<0&&(h-=S.top),{top:h,left:m,maxHeight:v,alignment:_}}function Ai(e,t,n,r){let i=r?.verticalOffset||0,a=r?.horizontalOffset||0,o=t.getBoundingClientRect(),s=$(e),c=t.parentElement.shadowRoot.querySelector(r?.contentSelector??`.${e.className}`).getBoundingClientRect(),l=n.getBoundingClientRect(),u=document.documentElement.clientWidth-c.right,d=document.documentElement.clientHeight-(o.top-i),f=document.documentElement.clientHeight,p=`${f-32}px`,m={horizontal:`end`,vertical:`above`},h=s.offsetWidth+a,g=c.right,_=o.top+i;return u<h&&o.left>h&&(g=g-c.width-s.offsetWidth,m.horizontal=`start`),a&&m.horizontal!==`center`&&(g+=a*(m.horizontal===`start`?-1:1)),d<s.scrollHeight&&(_=f-s.clientHeight-16),l.left<0&&(g-=l.left),l.top<0&&(_-=l.top),{top:_,left:g,maxHeight:p,alignment:m}}function ji(e,t,n,r,i,a=`auto`){if(!e||!t)return;let o=t.getBoundingClientRect();i.style.setProperty(`--sbb-options-panel-width`,`${t.offsetWidth}px`),i.style.setProperty(`--sbb-options-panel-origin-height`,`${t.offsetHeight}px`),i.style.setProperty(`--sbb-options-panel-origin-position-x`,`${o.left}px`),i.style.setProperty(`--sbb-options-panel-origin-position-y`,`${o.top}px`);let s=ki(n,t,r,{forceBelow:a===`below`,forceAbove:a===`above`});i.style.setProperty(`--sbb-options-panel-position-x`,`${s.left}px`),i.style.setProperty(`--sbb-options-panel-position-y`,`${s.top}px`),i.style.setProperty(`--sbb-options-panel-max-height-calculated`,s.maxHeight);let c=s.alignment.vertical===`above`;i.toggleState?.(`options-panel-position-above`,c),i.toggleState?.(`options-panel-position-below`,!c),t.setAttribute(`data-options-panel-position`,s.alignment.vertical)}var Mi=class{constructor(){this._overlays=/* @__PURE__ */ new Set,this._pointerDownListener=e=>{this._pointerDownEventTarget=e.composedPath()[0]},this._clickListener=e=>{let t=e.composedPath()[0],n=e.type===`click`&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=void 0;for(let e of Array.from(this._overlays).reverse()){if(X(e,t)||X(e,n))break;e.dispatchEvent(new Event(`overlayOutsidePointer`))}}}connect(e){this._overlays.size||(this._addGlobalEventListeners(),j&&(this._cursorOriginalValue=document.body.style.cursor,document.body.style.cursor=`pointer`)),this._overlays.add(e)}disconnect(e){this._overlays.delete(e),this._overlays.size||(this._abortController?.abort(),this._abortController=void 0,this._pointerDownEventTarget=void 0,j&&(document.body.style.cursor=this._cursorOriginalValue))}_addGlobalEventListeners(){let e=document.body;this._abortController=new AbortController;let t={capture:!0,passive:!0,signal:this._abortController.signal};e.addEventListener(`click`,this._clickListener,t),!ie&&!j&&(e.addEventListener(`pointerdown`,this._pointerDownListener,t),e.addEventListener(`auxclick`,this._clickListener,t),e.addEventListener(`contextmenu`,this._clickListener,t))}};const Ni=new Mi;function Pi(e,t,n,r){t&&(t.ariaHasPopup=n,t.ariaControlsElements=Oe(t.ariaControlsElements,e),t.ariaExpanded=`${r===`opening`||r===`opened`}`)}function Fi(e){e&&(e.ariaHasPopup=null,e.ariaControlsElements=null,e.ariaExpanded=null)}function Ii(e,t,n,r=`listbox`){e&&(e.setAttribute(`autocomplete`,`off`),e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-haspopup`,r),e.setAttribute(`aria-controls`,t),e.setAttribute(`aria-expanded`,`${n}`))}function Li(e){e&&(e.removeAttribute(`autocomplete`),e.removeAttribute(`role`),e.removeAttribute(`aria-autocomplete`),e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-expanded`))}export{K as DateAdapter,kr as FORMAT_DATE,Ir as FRIDAY,jr as ISO8601_FORMAT_DATE,te as IS_FOCUSABLE_QUERY,le as InteractivityChecker,ce as IsFocusableConfig,Mr as MONDAY,Br as NativeDateAdapter,Ae as NumberOrNull,Lr as SATURDAY,Ar as SEPARATORLESS_FORMAT_DATE,Rr as SUNDAY,F as SbbActionBaseElement,ni as SbbAnimationCompleteMixin,Pe as SbbButtonBaseElement,Ne as SbbButtonLikeBaseElement,_r as SbbDarkModeController,qn as SbbDisabledInteractiveMixin,V as SbbDisabledMixin,Jn as SbbDisabledTabIndexActionMixin,ri as SbbDynamicStylesheetMixin,P as SbbElement,Qn as SbbEscapableOverlayController,be as SbbFocusTrapController,ee as SbbFocusVisibleWithinController,ii as SbbFormAssociatedCheckboxMixin,si as SbbFormAssociatedInputMixin,L as SbbFormAssociatedMixin,ci as SbbFormAssociatedRadioButtonMixin,$n as SbbHostStylesController,tr as SbbIdReferenceController,or as SbbInertController,z as SbbLanguageController,Gn as SbbLinkBaseElement,Se as SbbLiveAnnouncer,gr as SbbMediaMatcherController,fr as SbbMediaQueryBreakpointLargeAndAbove,hr as SbbMediaQueryBreakpointLargeAndBelow,dr as SbbMediaQueryBreakpointSmallAndAbove,mr as SbbMediaQueryBreakpointSmallAndBelow,pr as SbbMediaQueryBreakpointUltraAndAbove,ur as SbbMediaQueryBreakpointZeroAndAbove,U as SbbMediaQueryDarkMode,sr as SbbMediaQueryForcedColors,cr as SbbMediaQueryHover,lr as SbbMediaQueryPointerCoarse,Si as SbbNamedSlotListMixin,Ci as SbbNegativeMixin,Kn as SbbOpenCloseBaseElement,Mi as SbbOverlayOutsidePointerEventListener,Cr as SbbOverlayPositionController,Ti as SbbPanelMixin,Tr as SbbPropertyWatcherController,ai as SbbReadonlyMixin,H as SbbRequiredMixin,Dr as SbbScrollController,$r as SbbScrollHandler,Xn as SbbSelectionGroupBaseElement,Ei as SbbSelectionPanelMixin,N as SbbSlottedChangeEvent,Or as SbbTemporaryFocusController,Di as SbbUpdateSchedulerMixin,Fr as THURSDAY,Nr as TUESDAY,Hr as TemporalDateAdapter,Pr as WEDNESDAY,Oe as appendAriaElements,hi as buttonResetStyles,X as containsPierceShadowDom,q as defaultDateAdapter,I as forceType,ti as forwardEvent,ki as getElementPosition,Ai as getElementPositionHorizontal,$ as getElementRectangle,S as getEventTarget,y as getNextElementIndex,Ur as getOverride,Wr as handleDistinctChange,gi as hostScrollbarStyles,$e as i18nAdditionalWagonInformationHeading,Be as i18nAnd,Le as i18nArrival,Wn as i18nAutocompleteActionsHint,Qe as i18nBlockedPassage,Xt as i18nBreadcrumbEllipsisButtonLabel,Un as i18nButton,Pt as i18nCalendarDateSelection,On as i18nCalendarDeselectAll,Nn as i18nCalendarDeselectWeek,jn as i18nCalendarDeselectWeekday,kn as i18nCalendarHeaderNavigationHint,Dn as i18nCalendarSelectAll,Mn as i18nCalendarSelectWeek,An as i18nCalendarSelectWeekday,En as i18nCalendarWeekNumber,In as i18nCarouselArrowsNavigationHint,Fn as i18nCarouselItemAriaLabel,pn as i18nCheckboxRequired,wn as i18nChipDelete,Tn as i18nChipGroupInputDescription,Ve as i18nClass,Zt as i18nClearInput,bt as i18nCloseAlert,Ct as i18nCloseDialog,wt as i18nCloseNavigation,xt as i18nCloseNotification,Et as i18nClosePopover,Tt as i18nCloseSidebar,qe as i18nClosedCompartmentLabel,Jt as i18nCollapsed,Wt as i18nConnectionFrom,Kt as i18nConnectionRoundtrip,Gt as i18nConnectionTo,Xe as i18nCouchetteWagonLabel,Ut as i18nDateChangedTo,_n as i18nDateInvalid,yn as i18nDateMax,vn as i18nDateMin,Ht as i18nDatePickerPlaceholder,et as i18nDeparture,St as i18nDialog,Ie as i18nDirection,nt as i18nDownload,at as i18nDurationDay,it as i18nDurationHour,rt as i18nDurationMinute,qt as i18nExpanded,en as i18nFileSelectorButtonLabel,tn as i18nFileSelectorButtonLabelMultiple,on as i18nFileSelectorCurrentlySelected,an as i18nFileSelectorDeleteFile,nn as i18nFileSelectorSubtitleLabel,rn as i18nFileSelectorSubtitleLabelMultiple,Qt as i18nFlipCard,pt as i18nFromPlatform,Dt as i18nGoBack,gn as i18nInputRequired,un as i18nItemsPerPage,Je as i18nLocomotiveLabel,Vn as i18nLogo125Anniversary,Hn as i18nLogo125AnniversaryYears,Yt as i18nMapContainerButtonLabel,gt as i18nMeansOfTransport,hn as i18nMultipleSelectionPossible,ft as i18nNew,jt as i18nNextDay,kt as i18nNextMonth,sn as i18nNextPage,Ln as i18nNextSlide,Lt as i18nNextYear,Ft as i18nNextYearRange,tt as i18nNonAccessible,ht as i18nOccupancy,ln as i18nPage,fn as i18nPaginatorOf,dn as i18nPaginatorSelected,Mt as i18nPreviousDay,At as i18nPreviousMonth,cn as i18nPreviousPage,Rn as i18nPreviousSlide,Rt as i18nPreviousYear,It as i18nPreviousYearRange,lt as i18nRealTimeInfo,Bn as i18nRemainingCharacters,Ze as i18nRestaurantWagonLabel,$t as i18nReverseCard,Re as i18nSector,ze as i18nSectorShort,zt as i18nSelectNextDay,Bt as i18nSelectPreviousDay,mn as i18nSelectionRequired,Vt as i18nShowCalendar,Ye as i18nSleepingWagonLabel,zn as i18nSlide,mt as i18nSupersaver,_t as i18nTargetOpensInNewWindow,bn as i18nTimeInputChange,xn as i18nTimeInvalid,Sn as i18nTimeMax,Cn as i18nTimeMaxLength,Pn as i18nTimetableFormSwapButtonLabel,Ot as i18nToday,He as i18nTrain,Ue as i18nTrains,ut as i18nTransferProcedure,dt as i18nTransferProcedures,ct as i18nTravelhints,st as i18nTripDuration,ot as i18nTripQuayChange,Ge as i18nWagonLabel,Ke as i18nWagonLabelNumber,We as i18nWagonsLabel,vt as i18nWalkingDistanceArrival,yt as i18nWalkingDistanceDeparture,Nt as i18nYearMonthSelection,Gr as idReference,M as interactivityChecker,ie as isAndroid,g as isArrowKeyOrPageKeysPressed,p as isArrowKeyPressed,k as isBlink,oe as isChromium,D as isEdge,Oi as isEventOnElement,je as isEventPrevented,b as isFakeMousedownFromScreenReader,x as isFakeTouchstartFromScreenReader,re as isFirefox,j as isIOS,ne as isMacOS,h as isNextArrowKeyPressed,se as isNextjs,m as isPreviousArrowKeyPressed,ae as isSafari,O as isTrident,A as isWebkit,Jr as isZeroAnimationDuration,_i as listResetStyles,Fe as mergeConfig,B as omitEmptyConverter,Z as pageScrollDisabled,qr as plainDate,Kr as plainDateConverter,yi as popoverResetStyles,ei as preventScrollOnSpacebarPress,Xr as queueDomContentLoaded,Q as radioButtonRegistry,R as readConfig,Li as removeAriaComboBoxAttributes,ke as removeAriaElements,Fi as removeAriaOverlayTriggerProperties,T as sbbInputModalityDetector,Ce as sbbLiveAnnouncer,Ni as sbbOverlayOutsidePointerEventListener,vi as screenReaderOnlyStyles,bi as scrollbarStyles,Ii as setAriaComboBoxAttributes,Pi as setAriaOverlayTriggerProperties,Yr as setOrRemoveAttribute,ji as setOverlayPosition,De as ɵstateController};
|