scb-wc-test 0.1.348 → 0.1.350

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js"])))=>i.map(i=>d[i]);
2
- import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x as r,E as g,t as D}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-list/scb-list.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-link/scb-link.js";import"../scb-avatar/scb-avatar.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-list/scb-list-item.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(n,c,o){try{customElements.get(n)||e(n,c,o)}catch(p){var d=String(p||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var B=Object.defineProperty,N=Object.getOwnPropertyDescriptor,P=t=>{throw TypeError(t)},s=(t,e,n,c)=>{for(var o=c>1?void 0:c?N(e,n):e,d=t.length-1,p;d>=0;d--)(p=t[d])&&(o=(c?p(e,n,o):p(o))||o);return c&&o&&B(e,n,o),o},R=(t,e,n)=>e.has(t)||P("Cannot "+n),W=(t,e,n)=>e.has(t)?P("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),x=(t,e,n)=>(R(t,e,"access private method"),n),f,_,$;const l={fromAttribute:t=>t??"",toAttribute:t=>typeof t!="string"||t.trim()===""?null:t};let i=class extends H{constructor(){super(...arguments),W(this,f),this.__managedSocialAttributes=new Set(["social-comments-text","social-comments","social-comments-href","social-likes-text","social-likes","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href"]),this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size="large",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.href="",this.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.likesText="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.editEnabled=!1,this.deleteEnabled=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=t=>{const e=t.currentTarget.closest(".media");e&&e.classList.add("is-loaded")},this.__onKeyDown=t=>{const e=this.__effectiveHref();(t.key==="Enter"||t.key===" ")&&e&&(t.preventDefault(),this.__navigate(e,t))},this.__handleHrefNavigation=t=>{const e=this.__effectiveHref();e&&(t.target.closest("a")||this.__navigate(e,t))}}attributeChangedCallback(t,e,n){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(t)||super.attributeChangedCallback(t,e,n)}get likeButton(){return this.type!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(t){const e=(t||"").trim();if(!e)return{w:640,h:360};const n=e.includes("/")?e.split("/"):e.includes(":")?e.split(":"):e.includes("x")?e.split("x"):null;if(n&&n.length===2){const o=Number(n[0]),d=Number(n[1]);if(o>0&&d>0)return{w:o,h:d}}const c=Number(e);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:640,h:360}}__noWrapText(t){return(t??"").replace(/ /g," ").replace(/-/g,"‑")}__dispatchLikeEvent(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e})),this.dispatchEvent(new CustomEvent(t.replace("-",""),{bubbles:!0,composed:!0,detail:e}))}__dispatchSocialActionEvent(t,e){this.dispatchEvent(new CustomEvent(`social-${t}`,{bubbles:!0,composed:!0,detail:{action:t,originalEvent:e}}))}__dispatchCardNavigate(t,e){const n={href:t,originalEvent:e},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const o=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(o),!o.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__navigate(t,e){t&&this.__dispatchCardNavigate(t,e)&&window.open(t,"_self")}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return r`
2
+ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x as r,E as g,t as D}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-list/scb-list.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-link/scb-link.js";import"../scb-avatar/scb-avatar.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-list/scb-list-item.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(n,c,o){try{customElements.get(n)||e(n,c,o)}catch(p){var d=String(p||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var B=Object.defineProperty,N=Object.getOwnPropertyDescriptor,P=t=>{throw TypeError(t)},s=(t,e,n,c)=>{for(var o=c>1?void 0:c?N(e,n):e,d=t.length-1,p;d>=0;d--)(p=t[d])&&(o=(c?p(e,n,o):p(o))||o);return c&&o&&B(e,n,o),o},R=(t,e,n)=>e.has(t)||P("Cannot "+n),W=(t,e,n)=>e.has(t)?P("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),x=(t,e,n)=>(R(t,e,"access private method"),n),f,_,$;const l={fromAttribute:t=>t??"",toAttribute:t=>typeof t!="string"||t.trim()===""?null:t};let i=class extends H{constructor(){super(...arguments),W(this,f),this.__managedSocialAttributes=new Set(["social-comments-text","social-comments","social-comments-href","social-likes-text","social-likes","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href"]),this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size="large",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.href="",this.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.likesText="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.editEnabled=!1,this.deleteEnabled=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=t=>{const e=t.currentTarget.closest(".media");e&&e.classList.add("is-loaded")},this.__onKeyDown=t=>{const e=this.__effectiveHref();(t.key==="Enter"||t.key===" ")&&e&&(t.preventDefault(),this.__navigate(e,t))},this.__handleHrefNavigation=t=>{const e=this.__effectiveHref();e&&(t.target.closest("a")||this.__navigate(e,t))}}attributeChangedCallback(t,e,n){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(t)||super.attributeChangedCallback(t,e,n)}get likeButton(){return this.type!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(t){const e=(t||"").trim();if(!e)return{w:600,h:400};const n=e.includes("/")?e.split("/"):e.includes(":")?e.split(":"):e.includes("x")?e.split("x"):null;if(n&&n.length===2){const o=Number(n[0]),d=Number(n[1]);if(o>0&&d>0)return{w:o,h:d}}const c=Number(e);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:600,h:400}}__noWrapText(t){return(t??"").replace(/ /g," ").replace(/-/g,"‑")}__dispatchLikeEvent(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e})),this.dispatchEvent(new CustomEvent(t.replace("-",""),{bubbles:!0,composed:!0,detail:e}))}__dispatchSocialActionEvent(t,e){this.dispatchEvent(new CustomEvent(`social-${t}`,{bubbles:!0,composed:!0,detail:{action:t,originalEvent:e}}))}__dispatchCardNavigate(t,e){const n={href:t,originalEvent:e},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const o=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(o),!o.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__navigate(t,e){t&&this.__dispatchCardNavigate(t,e)&&window.open(t,"_self")}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return r`
3
3
  <div class="media">
4
4
  <slot name="media">
5
5
  <scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
6
6
  </slot>
7
7
  </div>
8
- `;if(this.mediaHref||this.mediaSrcset){let e=Number(this.mediaWidth)||0,n=Number(this.mediaHeight)||0;const c=(this.mediaAspect||"").trim();if(!e||!n){const p=this.__calcAspectWH(c||"16/9");e||(e=p.w),n||(n=p.h)}const o=`aspect-ratio:${c||`${e}/${n}`};`,d=this.mediaPlaceholder?"has-ph":"";return r`
8
+ `;if(this.mediaHref||this.mediaSrcset){let e=Number(this.mediaWidth)||0,n=Number(this.mediaHeight)||0;const c=(this.mediaAspect||"").trim();if(!e||!n){const p=this.__calcAspectWH(c||"3/2");e||(e=p.w),n||(n=p.h)}const o=`aspect-ratio:${c||`${e}/${n}`};`,d=this.mediaPlaceholder?"has-ph":"";return r`
9
9
  <div class="media ${d}" style="${o}">
10
10
  <slot name="media-sources"></slot>
11
11
  <img
@@ -224,7 +224,7 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
224
224
  padding: var(--scb-card-focus-ring-gap, 4px);
225
225
  --scb-card-horizontal-media-max: 176px;
226
226
  --scb-card-horizontal-media-min: 96px;
227
- --scb-card-horizontal-media-aspect: 16 / 9;
227
+ --scb-card-horizontal-media-aspect: 3 / 2;
228
228
 
229
229
  margin-block-start: var(--scb-card-spacing-block-start, 0);
230
230
  margin-block-end: var(--scb-card-spacing-block-end, 0);
@@ -572,6 +572,7 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
572
572
  }
573
573
  .header md-icon {
574
574
  flex: 0 0 auto;
575
+ align-self: start;
575
576
  }
576
577
 
577
578
  .sub-label {
@@ -628,7 +629,7 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
628
629
  .scb-card.horizontal .media img {
629
630
  margin: 0;
630
631
  object-fit: var(--scb-card-media-fit, cover);
631
- aspect-ratio: var(--scb-card-horizontal-media-aspect, 16 / 9);
632
+ aspect-ratio: var(--scb-card-horizontal-media-aspect, 3 / 2);
632
633
  inline-size: 100%;
633
634
  block-size: auto;
634
635
  }
@@ -667,7 +668,7 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
667
668
  .scb-card.dynamic-direction .media img {
668
669
  margin: 0;
669
670
  object-fit: var(--scb-card-media-fit, cover);
670
- aspect-ratio: var(--scb-card-horizontal-media-aspect, 16 / 9);
671
+ aspect-ratio: var(--scb-card-horizontal-media-aspect, 3 / 2);
671
672
  inline-size: 100%;
672
673
  block-size: auto;
673
674
  }
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js","../scb-checkbox/scb-checkbox.js","../scb-checkbox/scb-checkbox-group.js","../scb-switch/scb-switch.js"])))=>i.map(i=>d[i]);
2
- import{_ as w}from"../../vendor/preload-helper.js";import{n as s,t as L,i as T,a as C,E as o,x as n}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,d,c){try{customElements.get(e)||i(e,d,c)}catch(h){var l=String(h||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var D=Object.defineProperty,P=Object.getOwnPropertyDescriptor,E=t=>{throw TypeError(t)},r=(t,i,e,d)=>{for(var c=d>1?void 0:d?P(i,e):i,l=t.length-1,h;l>=0;l--)(h=t[l])&&(c=(d?h(i,e,c):h(c))||c);return d&&c&&D(i,e,c),c},V=(t,i,e)=>i.has(t)||E("Cannot "+e),u=(t,i,e)=>(V(t,i,"read from private field"),e?e.call(t):i.get(t)),g=(t,i,e)=>i.has(t)?E("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),_=(t,i,e,d)=>(V(t,i,"write to private field"),i.set(t,e),e),f=(t,i,e)=>(V(t,i,"access private method"),e),y,b,m,v,x,k,S,$;let a=class extends T{constructor(){super(...arguments),g(this,v),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.trailingSwitchLabel="",this.trailingSwitchSelected=!1,this.density=0,this.noDivider=!1,g(this,y,!1),g(this,b,!1),g(this,m,!1),this.onRowClick=()=>{if(this.type==="link"&&(this.href||this.itemHref))return;const t=this.shadowRoot?.querySelector("scb-checkbox"),i=this.shadowRoot?.querySelector("scb-switch");if(t&&(t.checked=!t.checked),i){const e=!this.trailingSwitchSelected;i.selected=e,f(this,v,k).call(this,e,!0)}},g(this,S,t=>{const i=t.detail?.selected,e=typeof i=="boolean"?i:t.currentTarget?.selected??!1;f(this,v,k).call(this,e,!0)}),g(this,$,t=>{if(!t.defaultPrevented&&(t.key==="Enter"||t.key===" ")){if(this.type==="link"){const i=this.shadowRoot?.querySelector("a[href]");if(i){t.preventDefault(),i.click();return}}t.preventDefault(),this.onRowClick()}})}static get styles(){return C`
2
+ import{_ as w}from"../../vendor/preload-helper.js";import{n as s,t as T,i as W,a as z,E as n,x as l}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,d,c){try{customElements.get(e)||i(e,d,c)}catch(h){var o=String(h||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var C=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=t=>{throw TypeError(t)},r=(t,i,e,d)=>{for(var c=d>1?void 0:d?D(i,e):i,o=t.length-1,h;o>=0;o--)(h=t[o])&&(c=(d?h(i,e,c):h(c))||c);return d&&c&&C(i,e,c),c},V=(t,i,e)=>i.has(t)||E("Cannot "+e),u=(t,i,e)=>(V(t,i,"read from private field"),e?e.call(t):i.get(t)),g=(t,i,e)=>i.has(t)?E("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),_=(t,i,e,d)=>(V(t,i,"write to private field"),i.set(t,e),e),f=(t,i,e)=>(V(t,i,"access private method"),e),y,b,m,v,S,x,k,$;let a=class extends W{constructor(){super(...arguments),g(this,v),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.trailingSwitchLabel="",this.trailingSwitchWidth="",this.trailingSwitchSelected=!1,this.density=0,this.noDivider=!1,g(this,y,!1),g(this,b,!1),g(this,m,!1),this.onRowClick=()=>{if(this.type==="link"&&(this.href||this.itemHref))return;const t=this.shadowRoot?.querySelector("scb-checkbox"),i=this.shadowRoot?.querySelector("scb-switch");if(t&&(t.checked=!t.checked),i){const e=!this.trailingSwitchSelected;i.selected=e,f(this,v,x).call(this,e,!0)}},g(this,k,t=>{const i=t.detail?.selected,e=typeof i=="boolean"?i:t.currentTarget?.selected??!1;f(this,v,x).call(this,e,!0)}),g(this,$,t=>{if(!t.defaultPrevented&&(t.key==="Enter"||t.key===" ")){if(this.type==="link"){const i=this.shadowRoot?.querySelector("a[href]");if(i){t.preventDefault(),i.click();return}}t.preventDefault(),this.onRowClick()}})}static get styles(){return z`
3
3
  :host {
4
4
  border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
5
5
  margin-bottom: calc(var(--stroke-border, 1px) * -1);
@@ -88,6 +88,9 @@ import{_ as w}from"../../vendor/preload-helper.js";import{n as s,t as L,i as T,a
88
88
 
89
89
 
90
90
  .trailing { margin-left: auto; align-self: center; display: flex; }
91
+ .trailing.trailing-switch {
92
+ justify-content: flex-end;
93
+ }
91
94
  .trailing scb-checkbox { margin-inline-end: var(--scb-list-trailing-checkbox-nudge); }
92
95
 
93
96
  :host([trailing-variant="checkbox"]) .row,
@@ -106,7 +109,7 @@ import{_ as w}from"../../vendor/preload-helper.js";import{n as s,t as L,i as T,a
106
109
  width: 100%;
107
110
  gap: 12px;
108
111
  }
109
- `}async firstUpdated(){await f(this,v,x).call(this),this.addEventListener("keydown",u(this,$))}updated(t){super.updated(t),(t.has("leading")||t.has("leadingVariant")||t.has("trailing")||t.has("trailingVariant")||t.has("type")||t.has("target"))&&f(this,v,x).call(this)}render(){const t=this.leading?(()=>{switch(this.leadingVariant){case"icon":return this.leadingIcon?n`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>`:o;case"avatar":return n`
112
+ `}async firstUpdated(){await f(this,v,S).call(this),this.addEventListener("keydown",u(this,$))}updated(t){super.updated(t),(t.has("leading")||t.has("leadingVariant")||t.has("trailing")||t.has("trailingVariant")||t.has("type")||t.has("target"))&&f(this,v,S).call(this)}render(){const t=this.leading?(()=>{switch(this.leadingVariant){case"icon":return this.leadingIcon?l`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>`:n;case"avatar":return l`
110
113
  <div class="leading">
111
114
  <scb-avatar
112
115
  label=${this.avatarLabel}
@@ -117,34 +120,34 @@ import{_ as w}from"../../vendor/preload-helper.js";import{n as s,t as L,i as T,a
117
120
  variant=${this.avatarVariant}
118
121
  ></scb-avatar>
119
122
  </div>
120
- `;case"image":return this.imgHrefImage?n`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:o;default:return o}})():o,i=this.href||this.itemHref||"",e=this.target==="_blank"?"open_in_new":"chevron_right",d=this.label?`Välj ${this.label}`:"Välj",c=this.label?`Växla ${this.label}`:"Växla";let l=o;if(this.trailing)if(this.trailingVariant==="icon"){const p=this.trailingIcon||(this.type==="link"?e:"");l=p?n`<div class="trailing"><md-icon>${p}</md-icon></div>`:o}else this.trailingVariant==="checkbox"?l=n`
123
+ `;case"image":return this.imgHrefImage?l`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:n;default:return n}})():n,i=this.href||this.itemHref||"",e=this.target==="_blank"?"open_in_new":"chevron_right",d=this.label?`Välj ${this.label}`:"Välj",c=this.label?`Växla ${this.label}`:"Växla";let o=n;if(this.trailing){if(this.trailingVariant==="icon"){const p=this.trailingIcon||(this.type==="link"?e:"");o=p?l`<div class="trailing"><md-icon>${p}</md-icon></div>`:n}else if(this.trailingVariant==="checkbox")o=l`
121
124
  <div class="trailing">
122
125
  <scb-checkbox
123
126
  aria-label=${d}
124
127
  @click=${p=>p.stopPropagation()}
125
128
  ></scb-checkbox>
126
- </div>`:this.trailingVariant==="switch"&&(l=n`
127
- <div class="trailing">
129
+ </div>`;else if(this.trailingVariant==="switch"){const p=this.trailingSwitchWidth?`inline-size: ${this.trailingSwitchWidth}; min-inline-size: ${this.trailingSwitchWidth};`:n;o=l`
130
+ <div class="trailing trailing-switch" style=${p}>
128
131
  <scb-switch
129
132
  .selected=${this.trailingSwitchSelected}
130
- label=${this.trailingSwitchLabel||o}
133
+ label=${this.trailingSwitchLabel||n}
131
134
  aria-label=${c}
132
- @click=${p=>p.stopPropagation()}
133
- @change=${u(this,S)}
135
+ @click=${L=>L.stopPropagation()}
136
+ @change=${u(this,k)}
134
137
  ></scb-switch>
135
- </div>`);else this.type==="link"&&(l=n`<div class="trailing"><md-icon>${e}</md-icon></div>`);const h=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":o,I=n`
138
+ </div>`}}else this.type==="link"&&(o=l`<div class="trailing"><md-icon>${e}</md-icon></div>`);const h=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":n,I=l`
136
139
  ${t}
137
140
  <div class="texts">
138
- ${this.overline?n`<div class="overline">${this.overline}</div>`:o}
141
+ ${this.overline?l`<div class="overline">${this.overline}</div>`:n}
139
142
  <div class="label">${this.label}</div>
140
- ${this.supportingText?n`<div class="supporting-text">${this.supportingText}</div>`:o}
143
+ ${this.supportingText?l`<div class="supporting-text">${this.supportingText}</div>`:n}
141
144
  </div>
142
- ${l}
143
- `;return n`
145
+ ${o}
146
+ `;return l`
144
147
  <div class="row" @click=${this.onRowClick} ?inert=${this.disabled} aria-disabled=${this.disabled?"true":"false"}>
145
- ${this.type==="link"&&i?n`<a class="link" href=${i} target=${this.target||o} rel=${h}>${I}</a>`:I}
146
- ${this.type==="link"?n`<md-ripple></md-ripple>`:o}
148
+ ${this.type==="link"&&i?l`<a class="link" href=${i} target=${this.target||n} rel=${h}>${I}</a>`:I}
149
+ ${this.type==="link"?l`<md-ripple></md-ripple>`:n}
147
150
  </div>
148
151
 
149
152
  <md-focus-ring></md-focus-ring>
150
- `}};y=new WeakMap;b=new WeakMap;m=new WeakMap;v=new WeakSet;x=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!u(this,y)&&(await w(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),_(this,y,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!u(this,b)&&(await w(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([2,1,0,3]),import.meta.url),_(this,b,!0)),this.trailing&&this.trailingVariant==="switch"&&!u(this,m)&&(await w(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([4,1,0]),import.meta.url),_(this,m,!0))};k=function(t,i){this.trailingSwitchSelected=t,i&&this.dispatchEvent(new CustomEvent("trailing-switch-change",{detail:{selected:t},bubbles:!0,composed:!0}))};S=new WeakMap;$=new WeakMap;r([s({type:String,reflect:!0,attribute:"type"})],a.prototype,"type",2);r([s({type:String})],a.prototype,"href",2);r([s({type:String,attribute:"item-href"})],a.prototype,"itemHref",2);r([s({type:String,attribute:"target"})],a.prototype,"target",2);r([s({type:Boolean,attribute:"disabled"})],a.prototype,"disabled",2);r([s({type:String,reflect:!0})],a.prototype,"label",2);r([s({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",2);r([s({type:String,attribute:"overline"})],a.prototype,"overline",2);r([s({type:Boolean})],a.prototype,"leading",2);r([s({type:String,attribute:"leading-variant",reflect:!0})],a.prototype,"leadingVariant",2);r([s({type:String,attribute:"leading-icon"})],a.prototype,"leadingIcon",2);r([s({type:String,attribute:"avatar-label"})],a.prototype,"avatarLabel",2);r([s({type:String,attribute:"avatar-alt"})],a.prototype,"avatarAlt",2);r([s({type:String,attribute:"avatar-variant"})],a.prototype,"avatarVariant",2);r([s({type:String,attribute:"avatar-src"})],a.prototype,"avatarSrc",2);r([s({type:String,reflect:!0,attribute:"img-href-image"})],a.prototype,"imgHrefImage",2);r([s({type:Boolean})],a.prototype,"trailing",2);r([s({type:String,attribute:"trailing-variant",reflect:!0})],a.prototype,"trailingVariant",2);r([s({type:String,attribute:"trailing-icon"})],a.prototype,"trailingIcon",2);r([s({type:String,attribute:"trailing-switch-label"})],a.prototype,"trailingSwitchLabel",2);r([s({type:Boolean,attribute:"trailing-switch-selected",reflect:!0})],a.prototype,"trailingSwitchSelected",2);r([s({type:Number,reflect:!0})],a.prototype,"density",2);r([s({type:Boolean,attribute:"no-divider",reflect:!0})],a.prototype,"noDivider",2);a=r([L("scb-list-item")],a);
153
+ `}};y=new WeakMap;b=new WeakMap;m=new WeakMap;v=new WeakSet;S=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!u(this,y)&&(await w(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),_(this,y,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!u(this,b)&&(await w(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([2,1,0,3]),import.meta.url),_(this,b,!0)),this.trailing&&this.trailingVariant==="switch"&&!u(this,m)&&(await w(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([4,1,0]),import.meta.url),_(this,m,!0))};x=function(t,i){this.trailingSwitchSelected=t,i&&this.dispatchEvent(new CustomEvent("trailing-switch-change",{detail:{selected:t},bubbles:!0,composed:!0}))};k=new WeakMap;$=new WeakMap;r([s({type:String,reflect:!0,attribute:"type"})],a.prototype,"type",2);r([s({type:String})],a.prototype,"href",2);r([s({type:String,attribute:"item-href"})],a.prototype,"itemHref",2);r([s({type:String,attribute:"target"})],a.prototype,"target",2);r([s({type:Boolean,attribute:"disabled"})],a.prototype,"disabled",2);r([s({type:String,reflect:!0})],a.prototype,"label",2);r([s({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",2);r([s({type:String,attribute:"overline"})],a.prototype,"overline",2);r([s({type:Boolean})],a.prototype,"leading",2);r([s({type:String,attribute:"leading-variant",reflect:!0})],a.prototype,"leadingVariant",2);r([s({type:String,attribute:"leading-icon"})],a.prototype,"leadingIcon",2);r([s({type:String,attribute:"avatar-label"})],a.prototype,"avatarLabel",2);r([s({type:String,attribute:"avatar-alt"})],a.prototype,"avatarAlt",2);r([s({type:String,attribute:"avatar-variant"})],a.prototype,"avatarVariant",2);r([s({type:String,attribute:"avatar-src"})],a.prototype,"avatarSrc",2);r([s({type:String,reflect:!0,attribute:"img-href-image"})],a.prototype,"imgHrefImage",2);r([s({type:Boolean})],a.prototype,"trailing",2);r([s({type:String,attribute:"trailing-variant",reflect:!0})],a.prototype,"trailingVariant",2);r([s({type:String,attribute:"trailing-icon"})],a.prototype,"trailingIcon",2);r([s({type:String,attribute:"trailing-switch-label"})],a.prototype,"trailingSwitchLabel",2);r([s({type:String,attribute:"trailing-switch-width"})],a.prototype,"trailingSwitchWidth",2);r([s({type:Boolean,attribute:"trailing-switch-selected",reflect:!0})],a.prototype,"trailingSwitchSelected",2);r([s({type:Number,reflect:!0})],a.prototype,"density",2);r([s({type:Boolean,attribute:"no-divider",reflect:!0})],a.prototype,"noDivider",2);a=r([T("scb-list-item")],a);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.348",
3
+ "version": "0.1.350",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -414,5 +414,5 @@
414
414
  },
415
415
  "./mvc/*": "./mvc/*"
416
416
  },
417
- "buildHash": "9BE3B4226A6360E1BC78F046D8638AD8FF050366077245DE8DEFE58B1E2D9D0F"
417
+ "buildHash": "05102215406A454D0DADF69752C8A9BEB1E891DB5FB7585282AA83071E8736B3"
418
418
  }
@@ -55,14 +55,14 @@ let i = class extends E {
55
55
  /* Beräkna fallback-mått från media-aspect. Används endast om width/height saknas. */
56
56
  __calcAspectWH(t) {
57
57
  const e = (t || "").trim();
58
- if (!e) return { w: 640, h: 360 };
58
+ if (!e) return { w: 600, h: 400 };
59
59
  const n = e.includes("/") ? e.split("/") : e.includes(":") ? e.split(":") : e.includes("x") ? e.split("x") : null;
60
60
  if (n && n.length === 2) {
61
61
  const o = Number(n[0]), p = Number(n[1]);
62
62
  if (o > 0 && p > 0) return { w: o, h: p };
63
63
  }
64
64
  const c = Number(e);
65
- return isFinite(c) && c > 0 ? { w: 1e3, h: Math.round(1e3 / c) } : { w: 640, h: 360 };
65
+ return isFinite(c) && c > 0 ? { w: 1e3, h: Math.round(1e3 / c) } : { w: 600, h: 400 };
66
66
  }
67
67
  __noWrapText(t) {
68
68
  return (t ?? "").replace(/ /g, " ").replace(/-/g, "‑");
@@ -114,7 +114,7 @@ let i = class extends E {
114
114
  let e = Number(this.mediaWidth) || 0, n = Number(this.mediaHeight) || 0;
115
115
  const c = (this.mediaAspect || "").trim();
116
116
  if (!e || !n) {
117
- const h = this.__calcAspectWH(c || "16/9");
117
+ const h = this.__calcAspectWH(c || "3/2");
118
118
  e || (e = h.w), n || (n = h.h);
119
119
  }
120
120
  const o = `aspect-ratio:${c || `${e}/${n}`};`, p = this.mediaPlaceholder ? "has-ph" : "";
@@ -435,7 +435,7 @@ i.styles = H`
435
435
  padding: var(--scb-card-focus-ring-gap, 4px);
436
436
  --scb-card-horizontal-media-max: 176px;
437
437
  --scb-card-horizontal-media-min: 96px;
438
- --scb-card-horizontal-media-aspect: 16 / 9;
438
+ --scb-card-horizontal-media-aspect: 3 / 2;
439
439
 
440
440
  margin-block-start: var(--scb-card-spacing-block-start, 0);
441
441
  margin-block-end: var(--scb-card-spacing-block-end, 0);
@@ -783,6 +783,7 @@ i.styles = H`
783
783
  }
784
784
  .header md-icon {
785
785
  flex: 0 0 auto;
786
+ align-self: start;
786
787
  }
787
788
 
788
789
  .sub-label {
@@ -839,7 +840,7 @@ i.styles = H`
839
840
  .scb-card.horizontal .media img {
840
841
  margin: 0;
841
842
  object-fit: var(--scb-card-media-fit, cover);
842
- aspect-ratio: var(--scb-card-horizontal-media-aspect, 16 / 9);
843
+ aspect-ratio: var(--scb-card-horizontal-media-aspect, 3 / 2);
843
844
  inline-size: 100%;
844
845
  block-size: auto;
845
846
  }
@@ -878,7 +879,7 @@ i.styles = H`
878
879
  .scb-card.dynamic-direction .media img {
879
880
  margin: 0;
880
881
  object-fit: var(--scb-card-media-fit, cover);
881
- aspect-ratio: var(--scb-card-horizontal-media-aspect, 16 / 9);
882
+ aspect-ratio: var(--scb-card-horizontal-media-aspect, 3 / 2);
882
883
  inline-size: 100%;
883
884
  block-size: auto;
884
885
  }
@@ -21,6 +21,7 @@ export declare class ScbListItem extends LitElement {
21
21
  trailingVariant: '' | 'icon' | 'checkbox' | 'switch';
22
22
  trailingIcon: string;
23
23
  trailingSwitchLabel: string;
24
+ trailingSwitchWidth: string;
24
25
  trailingSwitchSelected: boolean;
25
26
  density: -4 | -2 | 0;
26
27
  noDivider: boolean;
@@ -1,29 +1,29 @@
1
- import { LitElement as L, css as C, nothing as c, html as o } from "lit";
2
- import { property as s, customElement as z } from "lit/decorators.js";
1
+ import { LitElement as W, css as z, nothing as o, html as c } from "lit";
2
+ import { property as s, customElement as C } from "lit/decorators.js";
3
3
  import "@material/web/focus/md-focus-ring.js";
4
4
  import "@material/web/ripple/ripple.js";
5
5
  var T = Object.defineProperty, H = Object.getOwnPropertyDescriptor, I = (t) => {
6
6
  throw TypeError(t);
7
7
  }, r = (t, i, e, l) => {
8
- for (var n = l > 1 ? void 0 : l ? H(i, e) : i, p = t.length - 1, v; p >= 0; p--)
9
- (v = t[p]) && (n = (l ? v(i, e, n) : v(n)) || n);
8
+ for (var n = l > 1 ? void 0 : l ? H(i, e) : i, h = t.length - 1, v; h >= 0; h--)
9
+ (v = t[h]) && (n = (l ? v(i, e, n) : v(n)) || n);
10
10
  return l && n && T(i, e, n), n;
11
- }, _ = (t, i, e) => i.has(t) || I("Cannot " + e), y = (t, i, e) => (_(t, i, "read from private field"), e ? e.call(t) : i.get(t)), h = (t, i, e) => i.has(t) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), w = (t, i, e, l) => (_(t, i, "write to private field"), i.set(t, e), e), f = (t, i, e) => (_(t, i, "access private method"), e), u, b, m, g, k, x, S, $;
12
- let a = class extends L {
11
+ }, _ = (t, i, e) => i.has(t) || I("Cannot " + e), y = (t, i, e) => (_(t, i, "read from private field"), e ? e.call(t) : i.get(t)), p = (t, i, e) => i.has(t) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), w = (t, i, e, l) => (_(t, i, "write to private field"), i.set(t, e), e), f = (t, i, e) => (_(t, i, "access private method"), e), u, b, m, g, S, k, x, $;
12
+ let a = class extends W {
13
13
  constructor() {
14
- super(...arguments), h(this, g), this.type = "text", this.href = "", this.itemHref = "", this.target = "", this.disabled = !1, this.label = "", this.supportingText = "", this.overline = "", this.leading = !1, this.leadingVariant = "", this.leadingIcon = "", this.avatarLabel = "", this.avatarAlt = "", this.avatarVariant = "icon", this.avatarSrc = "", this.imgHrefImage = "", this.trailing = !1, this.trailingVariant = "", this.trailingIcon = "", this.trailingSwitchLabel = "", this.trailingSwitchSelected = !1, this.density = 0, this.noDivider = !1, h(this, u, !1), h(this, b, !1), h(this, m, !1), this.onRowClick = () => {
14
+ super(...arguments), p(this, g), this.type = "text", this.href = "", this.itemHref = "", this.target = "", this.disabled = !1, this.label = "", this.supportingText = "", this.overline = "", this.leading = !1, this.leadingVariant = "", this.leadingIcon = "", this.avatarLabel = "", this.avatarAlt = "", this.avatarVariant = "icon", this.avatarSrc = "", this.imgHrefImage = "", this.trailing = !1, this.trailingVariant = "", this.trailingIcon = "", this.trailingSwitchLabel = "", this.trailingSwitchWidth = "", this.trailingSwitchSelected = !1, this.density = 0, this.noDivider = !1, p(this, u, !1), p(this, b, !1), p(this, m, !1), this.onRowClick = () => {
15
15
  var e, l;
16
16
  if (this.type === "link" && (this.href || this.itemHref)) return;
17
17
  const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("scb-checkbox"), i = (l = this.shadowRoot) == null ? void 0 : l.querySelector("scb-switch");
18
18
  if (t && (t.checked = !t.checked), i) {
19
19
  const n = !this.trailingSwitchSelected;
20
- i.selected = n, f(this, g, x).call(this, n, !0);
20
+ i.selected = n, f(this, g, k).call(this, n, !0);
21
21
  }
22
- }, h(this, S, (t) => {
22
+ }, p(this, x, (t) => {
23
23
  var l, n;
24
24
  const i = (l = t.detail) == null ? void 0 : l.selected, e = typeof i == "boolean" ? i : ((n = t.currentTarget) == null ? void 0 : n.selected) ?? !1;
25
- f(this, g, x).call(this, e, !0);
26
- }), h(this, $, (t) => {
25
+ f(this, g, k).call(this, e, !0);
26
+ }), p(this, $, (t) => {
27
27
  var i;
28
28
  if (!t.defaultPrevented && (t.key === "Enter" || t.key === " ")) {
29
29
  if (this.type === "link") {
@@ -38,7 +38,7 @@ let a = class extends L {
38
38
  });
39
39
  }
40
40
  static get styles() {
41
- return C`
41
+ return z`
42
42
  :host {
43
43
  border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
44
44
  margin-bottom: calc(var(--stroke-border, 1px) * -1);
@@ -127,6 +127,9 @@ let a = class extends L {
127
127
 
128
128
 
129
129
  .trailing { margin-left: auto; align-self: center; display: flex; }
130
+ .trailing.trailing-switch {
131
+ justify-content: flex-end;
132
+ }
130
133
  .trailing scb-checkbox { margin-inline-end: var(--scb-list-trailing-checkbox-nudge); }
131
134
 
132
135
  :host([trailing-variant="checkbox"]) .row,
@@ -148,18 +151,18 @@ let a = class extends L {
148
151
  `;
149
152
  }
150
153
  async firstUpdated() {
151
- await f(this, g, k).call(this), this.addEventListener("keydown", y(this, $));
154
+ await f(this, g, S).call(this), this.addEventListener("keydown", y(this, $));
152
155
  }
153
156
  updated(t) {
154
- super.updated(t), (t.has("leading") || t.has("leadingVariant") || t.has("trailing") || t.has("trailingVariant") || t.has("type") || t.has("target")) && f(this, g, k).call(this);
157
+ super.updated(t), (t.has("leading") || t.has("leadingVariant") || t.has("trailing") || t.has("trailingVariant") || t.has("type") || t.has("target")) && f(this, g, S).call(this);
155
158
  }
156
159
  render() {
157
160
  const t = this.leading ? (() => {
158
161
  switch (this.leadingVariant) {
159
162
  case "icon":
160
- return this.leadingIcon ? o`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>` : c;
163
+ return this.leadingIcon ? c`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>` : o;
161
164
  case "avatar":
162
- return o`
165
+ return c`
163
166
  <div class="leading">
164
167
  <scb-avatar
165
168
  label=${this.avatarLabel}
@@ -172,46 +175,51 @@ let a = class extends L {
172
175
  </div>
173
176
  `;
174
177
  case "image":
175
- return this.imgHrefImage ? o`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>` : c;
178
+ return this.imgHrefImage ? c`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>` : o;
176
179
  default:
177
- return c;
180
+ return o;
178
181
  }
179
- })() : c, i = this.href || this.itemHref || "", e = this.target === "_blank" ? "open_in_new" : "chevron_right", l = this.label ? `Välj ${this.label}` : "Välj", n = this.label ? `Växla ${this.label}` : "Växla";
180
- let p = c;
181
- if (this.trailing)
182
+ })() : o, i = this.href || this.itemHref || "", e = this.target === "_blank" ? "open_in_new" : "chevron_right", l = this.label ? `Välj ${this.label}` : "Välj", n = this.label ? `Växla ${this.label}` : "Växla";
183
+ let h = o;
184
+ if (this.trailing) {
182
185
  if (this.trailingVariant === "icon") {
183
186
  const d = this.trailingIcon || (this.type === "link" ? e : "");
184
- p = d ? o`<div class="trailing"><md-icon>${d}</md-icon></div>` : c;
185
- } else this.trailingVariant === "checkbox" ? p = o`
187
+ h = d ? c`<div class="trailing"><md-icon>${d}</md-icon></div>` : o;
188
+ } else if (this.trailingVariant === "checkbox")
189
+ h = c`
186
190
  <div class="trailing">
187
191
  <scb-checkbox
188
192
  aria-label=${l}
189
193
  @click=${(d) => d.stopPropagation()}
190
194
  ></scb-checkbox>
191
- </div>` : this.trailingVariant === "switch" && (p = o`
192
- <div class="trailing">
195
+ </div>`;
196
+ else if (this.trailingVariant === "switch") {
197
+ const d = this.trailingSwitchWidth ? `inline-size: ${this.trailingSwitchWidth}; min-inline-size: ${this.trailingSwitchWidth};` : o;
198
+ h = c`
199
+ <div class="trailing trailing-switch" style=${d}>
193
200
  <scb-switch
194
201
  .selected=${this.trailingSwitchSelected}
195
- label=${this.trailingSwitchLabel || c}
202
+ label=${this.trailingSwitchLabel || o}
196
203
  aria-label=${n}
197
- @click=${(d) => d.stopPropagation()}
198
- @change=${y(this, S)}
204
+ @click=${(L) => L.stopPropagation()}
205
+ @change=${y(this, x)}
199
206
  ></scb-switch>
200
- </div>`);
201
- else this.type === "link" && (p = o`<div class="trailing"><md-icon>${e}</md-icon></div>`);
202
- const v = this.type === "link" && this.target === "_blank" ? "noopener noreferrer" : c, V = o`
207
+ </div>`;
208
+ }
209
+ } else this.type === "link" && (h = c`<div class="trailing"><md-icon>${e}</md-icon></div>`);
210
+ const v = this.type === "link" && this.target === "_blank" ? "noopener noreferrer" : o, V = c`
203
211
  ${t}
204
212
  <div class="texts">
205
- ${this.overline ? o`<div class="overline">${this.overline}</div>` : c}
213
+ ${this.overline ? c`<div class="overline">${this.overline}</div>` : o}
206
214
  <div class="label">${this.label}</div>
207
- ${this.supportingText ? o`<div class="supporting-text">${this.supportingText}</div>` : c}
215
+ ${this.supportingText ? c`<div class="supporting-text">${this.supportingText}</div>` : o}
208
216
  </div>
209
- ${p}
217
+ ${h}
210
218
  `;
211
- return o`
219
+ return c`
212
220
  <div class="row" @click=${this.onRowClick} ?inert=${this.disabled} aria-disabled=${this.disabled ? "true" : "false"}>
213
- ${this.type === "link" && i ? o`<a class="link" href=${i} target=${this.target || c} rel=${v}>${V}</a>` : V}
214
- ${this.type === "link" ? o`<md-ripple></md-ripple>` : c}
221
+ ${this.type === "link" && i ? c`<a class="link" href=${i} target=${this.target || o} rel=${v}>${V}</a>` : V}
222
+ ${this.type === "link" ? c`<md-ripple></md-ripple>` : o}
215
223
  </div>
216
224
 
217
225
  <md-focus-ring></md-focus-ring>
@@ -222,18 +230,18 @@ u = /* @__PURE__ */ new WeakMap();
222
230
  b = /* @__PURE__ */ new WeakMap();
223
231
  m = /* @__PURE__ */ new WeakMap();
224
232
  g = /* @__PURE__ */ new WeakSet();
225
- k = async function() {
233
+ S = async function() {
226
234
  const t = this.type === "link" && (!this.trailing || this.trailingVariant === "icon");
227
235
  (this.leading && this.leadingVariant === "icon" || this.trailing && this.trailingVariant === "icon" || t) && !y(this, u) && (await import("@material/web/icon/icon.js"), w(this, u, !0)), this.trailing && this.trailingVariant === "checkbox" && !y(this, b) && (await import("../scb-checkbox/scb-checkbox.js"), w(this, b, !0)), this.trailing && this.trailingVariant === "switch" && !y(this, m) && (await import("../scb-switch/scb-switch.js"), w(this, m, !0));
228
236
  };
229
- x = function(t, i) {
237
+ k = function(t, i) {
230
238
  this.trailingSwitchSelected = t, i && this.dispatchEvent(new CustomEvent("trailing-switch-change", {
231
239
  detail: { selected: t },
232
240
  bubbles: !0,
233
241
  composed: !0
234
242
  }));
235
243
  };
236
- S = /* @__PURE__ */ new WeakMap();
244
+ x = /* @__PURE__ */ new WeakMap();
237
245
  $ = /* @__PURE__ */ new WeakMap();
238
246
  r([
239
247
  s({ type: String, reflect: !0, attribute: "type" })
@@ -295,6 +303,9 @@ r([
295
303
  r([
296
304
  s({ type: String, attribute: "trailing-switch-label" })
297
305
  ], a.prototype, "trailingSwitchLabel", 2);
306
+ r([
307
+ s({ type: String, attribute: "trailing-switch-width" })
308
+ ], a.prototype, "trailingSwitchWidth", 2);
298
309
  r([
299
310
  s({ type: Boolean, attribute: "trailing-switch-selected", reflect: !0 })
300
311
  ], a.prototype, "trailingSwitchSelected", 2);
@@ -305,7 +316,7 @@ r([
305
316
  s({ type: Boolean, attribute: "no-divider", reflect: !0 })
306
317
  ], a.prototype, "noDivider", 2);
307
318
  a = r([
308
- z("scb-list-item")
319
+ C("scb-list-item")
309
320
  ], a);
310
321
  export {
311
322
  a as ScbListItem
@@ -90,7 +90,7 @@
90
90
  * @license
91
91
  * Copyright 2018 Google LLC
92
92
  * SPDX-License-Identifier: BSD-3-Clause
93
- */const ne=Ur(class extends Ma{constructor(e){var t;if(super(e),e.type!==Ii.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var s,r;if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!((s=this.nt)!=null&&s.has(a))&&this.st.add(a);return this.render(t)}const i=e.element.classList;for(const a of this.st)a in t||(i.remove(a),this.st.delete(a));for(const a in t){const o=!!t[a];o===this.st.has(a)||(r=this.nt)!=null&&r.has(a)||(o?(i.add(a),this.st.add(a)):(i.remove(a),this.st.delete(a)))}return At}});/**
93
+ */const le=Ur(class extends Ma{constructor(e){var t;if(super(e),e.type!==Ii.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var s,r;if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!((s=this.nt)!=null&&s.has(a))&&this.st.add(a);return this.render(t)}const i=e.element.classList;for(const a of this.st)a in t||(i.remove(a),this.st.delete(a));for(const a in t){const o=!!t[a];o===this.st.has(a)||(r=this.nt)!=null&&r.has(a)||(o?(i.add(a),this.st.add(a)):(i.remove(a),this.st.delete(a)))}return At}});/**
94
94
  * @license
95
95
  * Copyright 2021 Google LLC
96
96
  * SPDX-License-Identifier: Apache-2.0
@@ -98,7 +98,7 @@
98
98
  * @license
99
99
  * Copyright 2022 Google LLC
100
100
  * SPDX-License-Identifier: Apache-2.0
101
- */const gu=450,ad=225,yu=.2,_u=10,xu=75,wu=.35,ku="::after",Su="forwards";var Qe;(function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"})(Qe||(Qe={}));const $u=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],zu=150,Cn=window.matchMedia("(forced-colors: active)");class jr extends _{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=Qe.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new sd(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const t={hovered:this.hovered,pressed:this.pressed};return c`<div class="surface ${ne(t)}"></div>`}update(t){t.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(t)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.hovered=!1,this.state!==Qe.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state===Qe.HOLDING){this.state=Qe.WAITING_FOR_CLICK;return}if(this.state===Qe.TOUCH_DELAY){this.state=Qe.WAITING_FOR_CLICK,this.startPressAnimation(this.rippleStartEvent);return}}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t)){this.state=Qe.WAITING_FOR_CLICK,this.startPressAnimation(t);return}this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=Qe.TOUCH_DELAY,await new Promise(i=>{setTimeout(i,zu)}),this.state===Qe.TOUCH_DELAY&&(this.state=Qe.HOLDING,this.startPressAnimation(t)))}}handleClick(){if(!this.disabled){if(this.state===Qe.WAITING_FOR_CLICK){this.endPressAnimation();return}this.state===Qe.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation())}}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:t,width:i}=this.getBoundingClientRect(),s=Math.max(t,i),r=Math.max(wu*s,xu),a=Math.floor(s*yu),l=Math.sqrt(i**2+t**2)+_u;this.initialSize=a,this.rippleScale=`${(l+r)/a}`,this.rippleSize=`${a}px`}getNormalizedPointerEventCoords(t){const{scrollX:i,scrollY:s}=window,{left:r,top:a}=this.getBoundingClientRect(),o=i+r,l=s+a,{pageX:d,pageY:p}=t;return{x:d-o,y:p-l}}getTranslationCoordinates(t){const{height:i,width:s}=this.getBoundingClientRect(),r={x:(s-this.initialSize)/2,y:(i-this.initialSize)/2};let a;return t instanceof PointerEvent?a=this.getNormalizedPointerEventCoords(t):a={x:s/2,y:i/2},a={x:a.x-this.initialSize/2,y:a.y-this.initialSize/2},{startPoint:a,endPoint:r}}startPressAnimation(t){var o;if(!this.mdRoot)return;this.pressed=!0,(o=this.growAnimation)==null||o.cancel(),this.determineRippleSize();const{startPoint:i,endPoint:s}=this.getTranslationCoordinates(t),r=`${i.x}px, ${i.y}px`,a=`${s.x}px, ${s.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${r}) scale(1)`,`translate(${a}) scale(${this.rippleScale})`]},{pseudoElement:ku,duration:gu,easing:si.STANDARD,fill:Su})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=Qe.INACTIVE;const t=this.growAnimation;let i=1/0;if(typeof(t==null?void 0:t.currentTime)=="number"?i=t.currentTime:t!=null&&t.currentTime&&(i=t.currentTime.to("ms").value),i>=ad){this.pressed=!1;return}await new Promise(s=>{setTimeout(s,ad-i)}),this.growAnimation===t&&(this.pressed=!1)}shouldReactToEvent(t){if(this.disabled||!t.isPrimary||this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if(t.type==="pointerenter"||t.type==="pointerleave")return!this.isTouch(t);const i=t.buttons===1;return this.isTouch(t)||i}inBounds({x:t,y:i}){const{top:s,left:r,bottom:a,right:o}=this.getBoundingClientRect();return t>=r&&t<=o&&i>=s&&i<=a}isTouch({pointerType:t}){return t==="touch"}async handleEvent(t){if(!(Cn!=null&&Cn.matches))switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t);break}}onControlChange(t,i){for(const s of $u)t==null||t.removeEventListener(s,this),i==null||i.addEventListener(s,this)}}h([n({type:Boolean,reflect:!0})],jr.prototype,"disabled",void 0),h([C()],jr.prototype,"hovered",void 0),h([C()],jr.prototype,"pressed",void 0),h([F(".surface")],jr.prototype,"mdRoot",void 0);/**
101
+ */const gu=450,ad=225,yu=.2,_u=10,xu=75,wu=.35,ku="::after",Su="forwards";var Qe;(function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"})(Qe||(Qe={}));const $u=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],zu=150,Cn=window.matchMedia("(forced-colors: active)");class jr extends _{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=Qe.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new sd(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const t={hovered:this.hovered,pressed:this.pressed};return c`<div class="surface ${le(t)}"></div>`}update(t){t.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(t)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.hovered=!1,this.state!==Qe.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state===Qe.HOLDING){this.state=Qe.WAITING_FOR_CLICK;return}if(this.state===Qe.TOUCH_DELAY){this.state=Qe.WAITING_FOR_CLICK,this.startPressAnimation(this.rippleStartEvent);return}}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t)){this.state=Qe.WAITING_FOR_CLICK,this.startPressAnimation(t);return}this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=Qe.TOUCH_DELAY,await new Promise(i=>{setTimeout(i,zu)}),this.state===Qe.TOUCH_DELAY&&(this.state=Qe.HOLDING,this.startPressAnimation(t)))}}handleClick(){if(!this.disabled){if(this.state===Qe.WAITING_FOR_CLICK){this.endPressAnimation();return}this.state===Qe.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation())}}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:t,width:i}=this.getBoundingClientRect(),s=Math.max(t,i),r=Math.max(wu*s,xu),a=Math.floor(s*yu),l=Math.sqrt(i**2+t**2)+_u;this.initialSize=a,this.rippleScale=`${(l+r)/a}`,this.rippleSize=`${a}px`}getNormalizedPointerEventCoords(t){const{scrollX:i,scrollY:s}=window,{left:r,top:a}=this.getBoundingClientRect(),o=i+r,l=s+a,{pageX:d,pageY:p}=t;return{x:d-o,y:p-l}}getTranslationCoordinates(t){const{height:i,width:s}=this.getBoundingClientRect(),r={x:(s-this.initialSize)/2,y:(i-this.initialSize)/2};let a;return t instanceof PointerEvent?a=this.getNormalizedPointerEventCoords(t):a={x:s/2,y:i/2},a={x:a.x-this.initialSize/2,y:a.y-this.initialSize/2},{startPoint:a,endPoint:r}}startPressAnimation(t){var o;if(!this.mdRoot)return;this.pressed=!0,(o=this.growAnimation)==null||o.cancel(),this.determineRippleSize();const{startPoint:i,endPoint:s}=this.getTranslationCoordinates(t),r=`${i.x}px, ${i.y}px`,a=`${s.x}px, ${s.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${r}) scale(1)`,`translate(${a}) scale(${this.rippleScale})`]},{pseudoElement:ku,duration:gu,easing:si.STANDARD,fill:Su})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=Qe.INACTIVE;const t=this.growAnimation;let i=1/0;if(typeof(t==null?void 0:t.currentTime)=="number"?i=t.currentTime:t!=null&&t.currentTime&&(i=t.currentTime.to("ms").value),i>=ad){this.pressed=!1;return}await new Promise(s=>{setTimeout(s,ad-i)}),this.growAnimation===t&&(this.pressed=!1)}shouldReactToEvent(t){if(this.disabled||!t.isPrimary||this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if(t.type==="pointerenter"||t.type==="pointerleave")return!this.isTouch(t);const i=t.buttons===1;return this.isTouch(t)||i}inBounds({x:t,y:i}){const{top:s,left:r,bottom:a,right:o}=this.getBoundingClientRect();return t>=r&&t<=o&&i>=s&&i<=a}isTouch({pointerType:t}){return t==="touch"}async handleEvent(t){if(!(Cn!=null&&Cn.matches))switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t);break}}onControlChange(t,i){for(const s of $u)t==null||t.removeEventListener(s,this),i==null||i.addEventListener(s,this)}}h([n({type:Boolean,reflect:!0})],jr.prototype,"disabled",void 0),h([C()],jr.prototype,"hovered",void 0),h([C()],jr.prototype,"pressed",void 0),h([F(".surface")],jr.prototype,"mdRoot",void 0);/**
102
102
  * @license
103
103
  * Copyright 2024 Google LLC
104
104
  * SPDX-License-Identifier: Apache-2.0
@@ -263,7 +263,7 @@
263
263
  * @license
264
264
  * Copyright 2019 Google LLC
265
265
  * SPDX-License-Identifier: Apache-2.0
266
- */const Hu=Yr(Ys(ns(_)));class ri extends Hu{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",t=>{!Kr(t)||!this.input||(this.focus(),Oa(this.input))})}update(t){(t.has("checked")||t.has("disabled")||t.has("indeterminate"))&&(this.prevChecked=t.get("checked")??this.checked,this.prevDisabled=t.get("disabled")??this.disabled,this.prevIndeterminate=t.get("indeterminate")??this.indeterminate),super.update(t)}render(){const t=!this.prevChecked&&!this.prevIndeterminate,i=this.prevChecked&&!this.prevIndeterminate,s=this.prevIndeterminate,r=this.checked&&!this.indeterminate,a=this.indeterminate,o=ne({disabled:this.disabled,selected:r||a,unselected:!r&&!a,checked:r,indeterminate:a,"prev-unselected":t,"prev-checked":i,"prev-indeterminate":s,"prev-disabled":this.prevDisabled}),{ariaLabel:l,ariaInvalid:d}=this;return c`
266
+ */const Hu=Yr(Ys(ns(_)));class ri extends Hu{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",t=>{!Kr(t)||!this.input||(this.focus(),Oa(this.input))})}update(t){(t.has("checked")||t.has("disabled")||t.has("indeterminate"))&&(this.prevChecked=t.get("checked")??this.checked,this.prevDisabled=t.get("disabled")??this.disabled,this.prevIndeterminate=t.get("indeterminate")??this.indeterminate),super.update(t)}render(){const t=!this.prevChecked&&!this.prevIndeterminate,i=this.prevChecked&&!this.prevIndeterminate,s=this.prevIndeterminate,r=this.checked&&!this.indeterminate,a=this.indeterminate,o=le({disabled:this.disabled,selected:r||a,unselected:!r&&!a,checked:r,indeterminate:a,"prev-unselected":t,"prev-checked":i,"prev-indeterminate":s,"prev-disabled":this.prevDisabled}),{ariaLabel:l,ariaInvalid:d}=this;return c`
267
267
  <div class="container ${o}">
268
268
  <input
269
269
  type="checkbox"
@@ -301,7 +301,7 @@
301
301
  * Copyright 2023 Google LLC
302
302
  * SPDX-License-Identifier: Apache-2.0
303
303
  */class Di extends _{constructor(){super(...arguments),this.disabled=!1,this.alwaysFocusable=!1,this.label="",this.hasIcon=!1}get rippleDisabled(){return this.disabled}focus(t){this.disabled&&!this.alwaysFocusable||super.focus(t)}render(){return c`
304
- <div class="container ${ne(this.getContainerClasses())}">
304
+ <div class="container ${le(this.getContainerClasses())}">
305
305
  ${this.renderContainerContent()}
306
306
  </div>
307
307
  `}updated(t){t.has("disabled")&&t.get("disabled")!==void 0&&this.dispatchEvent(new Event("update-focus",{bubbles:!0}))}getContainerClasses(){return{disabled:this.disabled,"has-icon":this.hasIcon}}renderContainerContent(){return c`
@@ -519,7 +519,7 @@
519
519
  `,{ariaLabel:a}=this;return c`
520
520
  <div class="scrim"></div>
521
521
  <dialog
522
- class=${ne(i)}
522
+ class=${le(i)}
523
523
  aria-label=${a||m}
524
524
  aria-labelledby=${this.hasHeadline?"headline":m}
525
525
  role=${this.type==="alert"?"alertdialog":m}
@@ -570,7 +570,7 @@
570
570
  * SPDX-License-Identifier: Apache-2.0
571
571
  */class Xs extends _{constructor(){super(...arguments),this.size="medium",this.label="",this.lowered=!1}render(){const{ariaLabel:t}=this;return c`
572
572
  <button
573
- class="fab ${ne(this.getRenderClasses())}"
573
+ class="fab ${le(this.getRenderClasses())}"
574
574
  aria-label=${t||m}>
575
575
  <md-elevation part="elevation"></md-elevation>
576
576
  <md-focus-ring part="focus-ring"></md-focus-ring>
@@ -620,7 +620,7 @@
620
620
  * Copyright 2021 Google LLC
621
621
  * SPDX-License-Identifier: Apache-2.0
622
622
  */class ce extends _{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const t=this.count??-1,i=this.max??-1;return t<0||i<=0?"":`${t} / ${i}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(t){t.has("disabled")&&t.get("disabled")!==void 0&&(this.disableTransitions=!0),this.disabled&&this.focused&&(t.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:t.get("focused"),wasPopulated:t.get("populated")}),super.update(t)}render(){var a,o,l;const t=this.renderLabel(!0),i=this.renderLabel(!1),s=(a=this.renderOutline)==null?void 0:a.call(this,t),r={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return c`
623
- <div class="field ${ne(r)}">
623
+ <div class="field ${le(r)}">
624
624
  <div class="container-overflow">
625
625
  ${(o=this.renderBackground)==null?void 0:o.call(this)} ${(l=this.renderIndicator)==null?void 0:l.call(this)} ${s}
626
626
  <div class="container">
@@ -648,7 +648,7 @@
648
648
  name="aria-describedby"
649
649
  @slotchange=${this.updateSlottedAriaDescribedBy}></slot>
650
650
  `}updateSlottedAriaDescribedBy(){for(const t of this.slottedAriaDescribedBy)kn(c`${this.supportingOrErrorText} ${this.counterText}`,t),t.setAttribute("hidden","")}renderLabel(t){if(!this.label)return m;let i;t?i=this.focused||this.populated||this.isAnimating:i=!this.focused&&!this.populated&&!this.isAnimating;const s={hidden:!i,floating:t,resting:!t},r=`${this.label}${this.required&&!this.noAsterisk?"*":""}`;return c`
651
- <span class="label ${ne(s)}" aria-hidden=${!i}
651
+ <span class="label ${le(s)}" aria-hidden=${!i}
652
652
  >${r}</span
653
653
  >
654
654
  `}animateLabelIfNeeded({wasFocused:t,wasPopulated:i}){var a,o,l;if(!this.label)return;t??(t=this.focused),i??(i=this.populated);const s=t||i,r=this.focused||this.populated;s!==r&&(this.isAnimating=!0,(a=this.labelAnimation)==null||a.cancel(),this.labelAnimation=(o=this.floatingLabelEl)==null?void 0:o.animate(this.getLabelKeyframes(),{duration:150,easing:si.STANDARD}),(l=this.labelAnimation)==null||l.addEventListener("finish",()=>{this.isAnimating=!1}))}getLabelKeyframes(){const{floatingLabelEl:t,restingLabelEl:i}=this;if(!t||!i)return[];const{x:s,y:r,height:a}=t.getBoundingClientRect(),{x:o,y:l,height:d}=i.getBoundingClientRect(),p=t.scrollWidth,b=i.scrollWidth,u=b/p,f=o-s,v=l-r+Math.round((d-a*u)/2),x=`translateX(${f}px) translateY(${v}px) scale(${u})`,k="translateX(0) translateY(0) scale(1)",z=i.clientWidth,S=b>z?`${z/u}px`:"";return this.focused||this.populated?[{transform:x,width:S},{transform:k,width:S}]:[{transform:k,width:S},{transform:x,width:S}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}h([n({type:Boolean})],ce.prototype,"disabled",void 0),h([n({type:Boolean})],ce.prototype,"error",void 0),h([n({type:Boolean})],ce.prototype,"focused",void 0),h([n()],ce.prototype,"label",void 0),h([n({type:Boolean,attribute:"no-asterisk"})],ce.prototype,"noAsterisk",void 0),h([n({type:Boolean})],ce.prototype,"populated",void 0),h([n({type:Boolean})],ce.prototype,"required",void 0),h([n({type:Boolean})],ce.prototype,"resizable",void 0),h([n({attribute:"supporting-text"})],ce.prototype,"supportingText",void 0),h([n({attribute:"error-text"})],ce.prototype,"errorText",void 0),h([n({type:Number})],ce.prototype,"count",void 0),h([n({type:Number})],ce.prototype,"max",void 0),h([n({type:Boolean,attribute:"has-start"})],ce.prototype,"hasStart",void 0),h([n({type:Boolean,attribute:"has-end"})],ce.prototype,"hasEnd",void 0),h([Ge({slot:"aria-describedby"})],ce.prototype,"slottedAriaDescribedBy",void 0),h([C()],ce.prototype,"isAnimating",void 0),h([C()],ce.prototype,"refreshErrorAlert",void 0),h([C()],ce.prototype,"disableTransitions",void 0),h([F(".label.floating")],ce.prototype,"floatingLabelEl",void 0),h([F(".label.resting")],ce.prototype,"restingLabelEl",void 0),h([F(".container")],ce.prototype,"containerEl",void 0);/**
@@ -727,7 +727,7 @@
727
727
  * Copyright 2018 Google LLC
728
728
  * SPDX-License-Identifier: Apache-2.0
729
729
  */const mb=ns(_);class Re extends mb{constructor(){super(...arguments),this.disabled=!1,this.flipIconInRtl=!1,this.href="",this.target="",this.ariaLabelSelected="",this.toggle=!1,this.selected=!1,this.type="submit",this.value="",this.flipIcon=_d(this,this.flipIconInRtl)}get name(){return this.getAttribute("name")??""}set name(t){this.setAttribute("name",t)}get form(){return this[Fe].form}get labels(){return this[Fe].labels}willUpdate(){this.href&&(this.disabled=!1)}render(){const t=this.href?mt`div`:mt`button`,{ariaLabel:i,ariaHasPopup:s,ariaExpanded:r}=this,a=i&&this.ariaLabelSelected,o=this.toggle?this.selected:m;let l=m;return this.href||(l=a&&this.selected?this.ariaLabelSelected:i),Zr`<${t}
730
- class="icon-button ${ne(this.getRenderClasses())}"
730
+ class="icon-button ${le(this.getRenderClasses())}"
731
731
  id="button"
732
732
  aria-label="${l||m}"
733
733
  aria-haspopup="${!this.href&&s||m}"
@@ -868,7 +868,7 @@
868
868
  aria-checked=${this.ariaChecked||m}
869
869
  aria-expanded=${this.ariaExpanded||m}
870
870
  aria-haspopup=${this.ariaHasPopup||m}
871
- class="list-item ${ne(this.getRenderClasses())}"
871
+ class="list-item ${le(this.getRenderClasses())}"
872
872
  href=${this.href||m}
873
873
  target=${a}
874
874
  @focus=${this.onFocus}
@@ -919,7 +919,7 @@
919
919
  * SPDX-License-Identifier: Apache-2.0
920
920
  */const Ld=200,Id=new Set([Be.ArrowDown,Be.ArrowUp,Be.Home,Be.End]),Fb=new Set([Be.ArrowLeft,Be.ArrowRight,...Id]);function Bb(e=document){var i;let t=e.activeElement;for(;t&&((i=t==null?void 0:t.shadowRoot)!=null&&i.activeElement);)t=t.shadowRoot.activeElement;return t}class xe extends _{get openDirection(){return this.menuCorner.split("-")[0]==="start"?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(t){this.currentAnchorElement=t,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=Ld,this.anchorCorner=to.END_START,this.menuCorner=to.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=ai.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=vu(),this.listController=new Cd({isItem:t=>t.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:t=>{t.selected=!1,t.tabIndex=-1},activateItem:t=>{t.selected=!0,t.tabIndex=0},isNavigableKey:t=>{if(!this.isSubmenu)return Fb.has(t);const s=getComputedStyle(this).direction==="rtl"?Be.ArrowLeft:Be.ArrowRight;return t===s?!0:Id.has(t)},wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Ob(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Db(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning==="popover"?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!=="popover"?"move":"resize"})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!=="document"&&this.positioning!=="fixed"&&this.positioning!=="popover"||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async t=>{const i=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(i))return;if(t.relatedTarget){if(el(t.relatedTarget,this)||this.pointerPath.length!==0&&el(t.relatedTarget,i))return}else if(this.pointerPath.includes(this))return;const s=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=s},this.onOpened=async()=>{this.lastFocusedElement=Bb();const t=this.items,i=Js(t);i&&this.defaultFocus!==ai.NONE&&(i.item.tabIndex=-1);let s=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):s=!!await this.animateOpen(),this.defaultFocus){case ai.FIRST_ITEM:const r=Za(t);r&&(r.tabIndex=0,r.focus(),await r.updateComplete);break;case ai.LAST_ITEM:const a=kd(t);a&&(a.tabIndex=0,a.focus(),await a.updateComplete);break;case ai.LIST_ROOT:this.focus();break;default:case ai.NONE:break}s||this.dispatchEvent(new Event("opened"))},this.beforeClose=async()=>{var t,i;this.open=!1,this.skipRestoreFocus||(i=(t=this.lastFocusedElement)==null?void 0:t.focus)==null||i.call(t),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event("closing")),this.dispatchEvent(new Event("closed")))},this.onWindowPointerdown=t=>{this.pointerPath=t.composedPath()},this.onDocumentClick=t=>{if(!this.open)return;const i=t.composedPath();!this.stayOpenOnOutsideClick&&!i.includes(this)&&!i.includes(this.anchorElement)&&(this.open=!1)},this.internals.role="menu",this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keydown",this.captureKeydown,{capture:!0}),this.addEventListener("focusout",this.handleFocusout)}get items(){return this.listController.items}willUpdate(t){if(t.has("open")){if(this.open){this.removeAttribute("aria-hidden");return}this.setAttribute("aria-hidden","true")}}update(t){t.has("open")&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),t.has("positioning")&&this.positioning==="popover"&&!this.showPopover&&(this.positioning="fixed"),super.update(t)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return c`
921
921
  <div
922
- class="menu ${ne(this.getSurfaceClasses())}"
922
+ class="menu ${le(this.getSurfaceClasses())}"
923
923
  style=${Ps(this.menuPositionController.surfaceStyles)}
924
924
  popover=${this.positioning==="popover"?"manual":m}>
925
925
  ${this.renderElevation()}
@@ -971,7 +971,7 @@
971
971
  aria-checked=${this.ariaChecked||m}
972
972
  aria-expanded=${this.ariaExpanded||m}
973
973
  aria-haspopup=${this.ariaHasPopup||m}
974
- class="list-item ${ne(this.getRenderClasses())}"
974
+ class="list-item ${le(this.getRenderClasses())}"
975
975
  href=${this.href||m}
976
976
  target=${r}
977
977
  @click=${this.menuItemController.onClick}
@@ -1032,7 +1032,7 @@
1032
1032
  * SPDX-License-Identifier: Apache-2.0
1033
1033
  */class Ls extends _{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){const{ariaLabel:t}=this;return c`
1034
1034
  <div
1035
- class="progress ${ne(this.getRenderClasses())}"
1035
+ class="progress ${le(this.getRenderClasses())}"
1036
1036
  role="progressbar"
1037
1037
  aria-label="${t||m}"
1038
1038
  aria-valuemin="0"
@@ -1107,7 +1107,7 @@
1107
1107
  * Copyright 2018 Google LLC
1108
1108
  * SPDX-License-Identifier: Apache-2.0
1109
1109
  */var Fd;const nl=Symbol("checked");let Kb=0;const Gb=Yr(Ys(ns(Od(_))));class Qr extends Gb{get checked(){return this[nl]}set checked(t){const i=this.checked;i!==t&&(this[nl]=t,this.requestUpdate("checked",i),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId=`cutout${++Kb}`,this[Fd]=!1,this.required=!1,this.value="on",this.selectionController=new jb(this),this.addController(this.selectionController),this[Fe].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const t={checked:this.checked};return c`
1110
- <div class="container ${ne(t)}" aria-hidden="true">
1110
+ <div class="container ${le(t)}" aria-hidden="true">
1111
1111
  <md-ripple
1112
1112
  part="ripple"
1113
1113
  .control=${this}
@@ -1162,7 +1162,7 @@
1162
1162
  * SPDX-License-Identifier: Apache-2.0
1163
1163
  */var Nd;const ho=Symbol("value"),tm=Bd(Yr(Ys(ns(_))));class Q extends tm{get value(){return this[ho]}set value(t){this.lastUserSetValue=t,this.select(t)}get options(){var t;return((t=this.menu)==null?void 0:t.items)??[]}get selectedIndex(){const[t,i]=(this.getSelectedOptions()??[])[0]??[];return i??-1}set selectedIndex(t){this.lastUserSetSelectedIndex=t,this.selectIndex(t)}get selectedOptions(){return(this.getSelectedOptions()??[]).map(([t])=>t)}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.supportingText="",this.error=!1,this.menuPositioning="popover",this.clampMenuWidth=!1,this.typeaheadDelay=Ld,this.hasLeadingIcon=!1,this.displayText="",this.menuAlign="start",this[Nd]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.defaultFocus=ai.NONE,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener("focus",this.handleFocus.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this))}select(t){const i=this.options.find(s=>s.value===t);i&&this.selectItem(i)}selectIndex(t){const i=this.options[t];i&&this.selectItem(i)}reset(){for(const t of this.options)t.selected=t.hasAttribute("selected");this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=""}[(Nd=ho,oo)](t){var s;t==null||t.preventDefault();const i=this.getErrorText();this.nativeError=!!t,this.nativeErrorText=this.validationMessage,i===this.getErrorText()&&((s=this.field)==null||s.reannounceError())}update(t){if(this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open){const i=this.getBoundingClientRect();this.selectWidth=i.width}this.prevOpen=this.open,super.update(t)}render(){return c`
1164
1164
  <span
1165
- class="select ${ne(this.getRenderClasses())}"
1165
+ class="select ${le(this.getRenderClasses())}"
1166
1166
  @focusout=${this.handleFocusout}>
1167
1167
  ${this.renderField()} ${this.renderMenu()}
1168
1168
  </span>
@@ -1300,7 +1300,7 @@
1300
1300
  aria-checked=${this.ariaChecked||m}
1301
1301
  aria-expanded=${this.ariaExpanded||m}
1302
1302
  aria-haspopup=${this.ariaHasPopup||m}
1303
- class="list-item ${ne(this.getRenderClasses())}"
1303
+ class="list-item ${le(this.getRenderClasses())}"
1304
1304
  @click=${this.selectOptionController.onClick}
1305
1305
  @keydown=${this.selectOptionController.onKeydown}
1306
1306
  >${t}</li
@@ -1337,13 +1337,13 @@
1337
1337
  * Copyright 2023 Google LLC
1338
1338
  * SPDX-License-Identifier: Apache-2.0
1339
1339
  */const dm=Ys(ns(_));class Y extends dm{get nameStart(){return this.getAttribute("name-start")??this.name}set nameStart(t){this.setAttribute("name-start",t)}get nameEnd(){return this.getAttribute("name-end")??this.nameStart}set nameEnd(t){this.setAttribute("name-end",t)}get renderAriaLabelStart(){const{ariaLabel:t}=this;return this.ariaLabelStart||t&&`${t} start`||this.valueLabelStart||String(this.valueStart)}get renderAriaValueTextStart(){return this.ariaValueTextStart||this.valueLabelStart||String(this.valueStart)}get renderAriaLabelEnd(){const{ariaLabel:t}=this;return this.range?this.ariaLabelEnd||t&&`${t} end`||this.valueLabelEnd||String(this.valueEnd):t||this.valueLabel||String(this.value)}get renderAriaValueTextEnd(){if(this.range)return this.ariaValueTextEnd||this.valueLabelEnd||String(this.valueEnd);const{ariaValueText:t}=this;return t||this.valueLabel||String(this.value)}constructor(){super(),this.min=0,this.max=100,this.valueLabel="",this.valueLabelStart="",this.valueLabelEnd="",this.ariaLabelStart="",this.ariaValueTextStart="",this.ariaLabelEnd="",this.ariaValueTextEnd="",this.step=1,this.ticks=!1,this.labeled=!1,this.range=!1,this.handleStartHover=!1,this.handleEndHover=!1,this.startOnTop=!1,this.handlesOverlapping=!1,this.ripplePointerId=1,this.isRedispatchingEvent=!1,this.addEventListener("click",t=>{!Kr(t)||!this.inputEnd||(this.focus(),Oa(this.inputEnd))})}focus(){var t;(t=this.inputEnd)==null||t.focus()}willUpdate(t){var s,r;this.renderValueStart=t.has("valueStart")?this.valueStart:(s=this.inputStart)==null?void 0:s.valueAsNumber;const i=t.has("valueEnd")&&this.range||t.has("value");this.renderValueEnd=i?this.range?this.valueEnd:this.value:(r=this.inputEnd)==null?void 0:r.valueAsNumber,t.get("handleStartHover")!==void 0?this.toggleRippleHover(this.rippleStart,this.handleStartHover):t.get("handleEndHover")!==void 0&&this.toggleRippleHover(this.rippleEnd,this.handleEndHover)}updated(t){var i,s;if(this.range&&(this.renderValueStart=this.inputStart.valueAsNumber),this.renderValueEnd=this.inputEnd.valueAsNumber,this.range){const r=(this.max-this.min)/3;if(this.valueStart===void 0){this.inputStart.valueAsNumber=this.min+r;const a=this.inputStart.valueAsNumber;this.valueStart=this.renderValueStart=a}if(this.valueEnd===void 0){this.inputEnd.valueAsNumber=this.min+2*r;const a=this.inputEnd.valueAsNumber;this.valueEnd=this.renderValueEnd=a}}else this.value??(this.value=this.renderValueEnd);if(t.has("range")||t.has("renderValueStart")||t.has("renderValueEnd")||this.isUpdatePending){const r=(i=this.handleStart)==null?void 0:i.querySelector(".handleNub"),a=(s=this.handleEnd)==null?void 0:s.querySelector(".handleNub");this.handlesOverlapping=pm(r,a)}this.performUpdate()}render(){const t=this.step===0?1:this.step,i=Math.max(this.max-this.min,t),s=this.range?((this.renderValueStart??this.min)-this.min)/i:0,r=((this.renderValueEnd??this.min)-this.min)/i,a={"--_start-fraction":String(s),"--_end-fraction":String(r),"--_tick-count":String(i/t)},o={ranged:this.range},l=this.valueLabelStart||String(this.renderValueStart),d=(this.range?this.valueLabelEnd:this.valueLabel)||String(this.renderValueEnd),p={start:!0,value:this.renderValueStart,ariaLabel:this.renderAriaLabelStart,ariaValueText:this.renderAriaValueTextStart,ariaMin:this.min,ariaMax:this.valueEnd??this.max},b={start:!1,value:this.renderValueEnd,ariaLabel:this.renderAriaLabelEnd,ariaValueText:this.renderAriaValueTextEnd,ariaMin:this.range?this.valueStart??this.min:this.min,ariaMax:this.max},u={start:!0,hover:this.handleStartHover,label:l},f={start:!1,hover:this.handleEndHover,label:d},v={hover:this.handleStartHover||this.handleEndHover};return c` <div
1340
- class="container ${ne(o)}"
1340
+ class="container ${le(o)}"
1341
1341
  style=${Ps(a)}>
1342
1342
  ${ul(this.range,()=>this.renderInput(p))}
1343
1343
  ${this.renderInput(b)} ${this.renderTrack()}
1344
1344
  <div class="handleContainerPadded">
1345
1345
  <div class="handleContainerBlock">
1346
- <div class="handleContainer ${ne(v)}">
1346
+ <div class="handleContainer ${le(v)}">
1347
1347
  ${ul(this.range,()=>this.renderHandle(u))}
1348
1348
  ${this.renderHandle(f)}
1349
1349
  </div>
@@ -1355,7 +1355,7 @@
1355
1355
  `}renderLabel(t){return c`<div class="label" aria-hidden="true">
1356
1356
  <span class="labelContent" part="label">${t}</span>
1357
1357
  </div>`}renderHandle({start:t,hover:i,label:s}){const r=!this.disabled&&t===this.startOnTop,a=!this.disabled&&this.handlesOverlapping,o=t?"start":"end";return c`<div
1358
- class="handle ${ne({[o]:!0,hover:i,onTop:r,isOverlapping:a})}">
1358
+ class="handle ${le({[o]:!0,hover:i,onTop:r,isOverlapping:a})}">
1359
1359
  <md-focus-ring part="focus-ring" for=${o}></md-focus-ring>
1360
1360
  <md-ripple
1361
1361
  for=${o}
@@ -1367,7 +1367,7 @@
1367
1367
  ${ul(this.labeled,()=>this.renderLabel(s))}
1368
1368
  </div>`}renderInput({start:t,value:i,ariaLabel:s,ariaValueText:r,ariaMin:a,ariaMax:o}){const l=t?"start":"end";return c`<input
1369
1369
  type="range"
1370
- class="${ne({start:t,end:!t})}"
1370
+ class="${le({start:t,end:!t})}"
1371
1371
  @focus=${this.handleFocus}
1372
1372
  @pointerdown=${this.handleDown}
1373
1373
  @pointerup=${this.handleUp}
@@ -1406,7 +1406,7 @@
1406
1406
  * Copyright 2021 Google LLC
1407
1407
  * SPDX-License-Identifier: Apache-2.0
1408
1408
  */const mm=Yr(Ys(ns(_)));class Fi extends mm{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value="on",this.addEventListener("click",t=>{!Kr(t)||!this.input||(this.focus(),Oa(this.input))}),bm(this,"keydown"),this.addEventListener("keydown",t=>{um(t,()=>{t.defaultPrevented||t.key!=="Enter"||this.disabled||!this.input||this.input.click()})})}render(){return c`
1409
- <div class="switch ${ne(this.getRenderClasses())}">
1409
+ <div class="switch ${le(this.getRenderClasses())}">
1410
1410
  <input
1411
1411
  id="switch"
1412
1412
  class="touch"
@@ -1426,7 +1426,7 @@
1426
1426
  ${this.renderTouchTarget()}
1427
1427
  <span class="handle-container">
1428
1428
  <md-ripple for="switch" ?disabled="${this.disabled}"></md-ripple>
1429
- <span class="handle ${ne(t)}">
1429
+ <span class="handle ${le(t)}">
1430
1430
  ${this.shouldShowIcons()?this.renderIcons():c``}
1431
1431
  </span>
1432
1432
  </span>
@@ -1470,7 +1470,7 @@
1470
1470
  <md-elevation part="elevation"></md-elevation>
1471
1471
  <md-ripple .control=${this}></md-ripple>
1472
1472
  <div
1473
- class="content ${ne(this.getContentClasses())}"
1473
+ class="content ${le(this.getContentClasses())}"
1474
1474
  role="presentation">
1475
1475
  <slot name="icon" @slotchange=${this.handleIconSlotChange}></slot>
1476
1476
  <slot @slotchange=${this.handleSlotChange}></slot>
@@ -1554,7 +1554,7 @@
1554
1554
  * Copyright 2021 Google LLC
1555
1555
  * SPDX-License-Identifier: Apache-2.0
1556
1556
  */const Am=Bd(Yr(Ys(ns(_))));class H extends Am{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(t){this.getInputOrTextarea().selectionDirection=t}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(t){this.getInputOrTextarea().selectionEnd=t}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(t){this.getInputOrTextarea().selectionStart=t}get valueAsNumber(){const t=this.getInput();return t?t.valueAsNumber:NaN}set valueAsNumber(t){const i=this.getInput();i&&(i.valueAsNumber=t,this.value=i.value)}get valueAsDate(){const t=this.getInput();return t?t.valueAsDate:null}set valueAsDate(t){const i=this.getInput();i&&(i.valueAsDate=t,this.value=i.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...t){this.getInputOrTextarea().setRangeText(...t),this.value=this.getInputOrTextarea().value}setSelectionRange(t,i,s){this.getInputOrTextarea().setSelectionRange(t,i,s)}stepDown(t){const i=this.getInput();i&&(i.stepDown(t),this.value=i.value)}stepUp(t){const i=this.getInput();i&&(i.stepUp(t),this.value=i.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(t,i,s){t==="value"&&this.dirty||super.attributeChangedCallback(t,i,s)}render(){const t={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:this.type==="textarea","no-spinner":this.noSpinner};return c`
1557
- <span class="text-field ${ne(t)}">
1557
+ <span class="text-field ${le(t)}">
1558
1558
  ${this.renderField()}
1559
1559
  </span>
1560
1560
  `}updated(t){const i=this.getInputOrTextarea().value;this.value!==i&&(this.value=i)}renderField(){return Zr`<${this.fieldTag}
@@ -1641,7 +1641,7 @@
1641
1641
  @select=${this.redispatchEvent} />
1642
1642
  ${l}
1643
1643
  </div>
1644
- `}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(t,i){return t?c`<span class="${ne({suffix:i,prefix:!i})}">${t}</span>`:m}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){var t;this.focused=((t=this.inputOrTextarea)==null?void 0:t.matches(":focus"))??!1}handleInput(t){this.dirty=!0,this.value=t.target.value}redispatchEvent(t){ls(this,t)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type==="textarea"?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Ri](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(t){this.value=t}focus(){this.getInputOrTextarea().focus()}[Cs](){return new Tm(()=>({state:this,renderedControl:this.inputOrTextarea}))}[Es](){return this.inputOrTextarea}[oo](t){var s;t==null||t.preventDefault();const i=this.getErrorText();this.nativeError=!!t,this.nativeErrorText=this.validationMessage,i===this.getErrorText()&&((s=this.field)==null||s.reannounceError())}}bt(H),H.shadowRootOptions={..._.shadowRootOptions,delegatesFocus:!0},h([n({type:Boolean,reflect:!0})],H.prototype,"error",void 0),h([n({attribute:"error-text"})],H.prototype,"errorText",void 0),h([n()],H.prototype,"label",void 0),h([n({type:Boolean,attribute:"no-asterisk"})],H.prototype,"noAsterisk",void 0),h([n({type:Boolean,reflect:!0})],H.prototype,"required",void 0),h([n()],H.prototype,"value",void 0),h([n({attribute:"prefix-text"})],H.prototype,"prefixText",void 0),h([n({attribute:"suffix-text"})],H.prototype,"suffixText",void 0),h([n({type:Boolean,attribute:"has-leading-icon"})],H.prototype,"hasLeadingIcon",void 0),h([n({type:Boolean,attribute:"has-trailing-icon"})],H.prototype,"hasTrailingIcon",void 0),h([n({attribute:"supporting-text"})],H.prototype,"supportingText",void 0),h([n({attribute:"text-direction"})],H.prototype,"textDirection",void 0),h([n({type:Number})],H.prototype,"rows",void 0),h([n({type:Number})],H.prototype,"cols",void 0),h([n({reflect:!0})],H.prototype,"inputMode",void 0),h([n()],H.prototype,"max",void 0),h([n({type:Number})],H.prototype,"maxLength",void 0),h([n()],H.prototype,"min",void 0),h([n({type:Number})],H.prototype,"minLength",void 0),h([n({type:Boolean,attribute:"no-spinner"})],H.prototype,"noSpinner",void 0),h([n()],H.prototype,"pattern",void 0),h([n({reflect:!0,converter:Em})],H.prototype,"placeholder",void 0),h([n({type:Boolean,reflect:!0})],H.prototype,"readOnly",void 0),h([n({type:Boolean,reflect:!0})],H.prototype,"multiple",void 0),h([n()],H.prototype,"step",void 0),h([n({reflect:!0})],H.prototype,"type",void 0),h([n({reflect:!0})],H.prototype,"autocomplete",void 0),h([C()],H.prototype,"dirty",void 0),h([C()],H.prototype,"focused",void 0),h([C()],H.prototype,"nativeError",void 0),h([C()],H.prototype,"nativeErrorText",void 0),h([F(".input")],H.prototype,"inputOrTextarea",void 0),h([F(".field")],H.prototype,"field",void 0),h([Ge({slot:"leading-icon"})],H.prototype,"leadingIcons",void 0),h([Ge({slot:"trailing-icon"})],H.prototype,"trailingIcons",void 0);/**
1644
+ `}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(t,i){return t?c`<span class="${le({suffix:i,prefix:!i})}">${t}</span>`:m}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){var t;this.focused=((t=this.inputOrTextarea)==null?void 0:t.matches(":focus"))??!1}handleInput(t){this.dirty=!0,this.value=t.target.value}redispatchEvent(t){ls(this,t)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type==="textarea"?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Ri](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(t){this.value=t}focus(){this.getInputOrTextarea().focus()}[Cs](){return new Tm(()=>({state:this,renderedControl:this.inputOrTextarea}))}[Es](){return this.inputOrTextarea}[oo](t){var s;t==null||t.preventDefault();const i=this.getErrorText();this.nativeError=!!t,this.nativeErrorText=this.validationMessage,i===this.getErrorText()&&((s=this.field)==null||s.reannounceError())}}bt(H),H.shadowRootOptions={..._.shadowRootOptions,delegatesFocus:!0},h([n({type:Boolean,reflect:!0})],H.prototype,"error",void 0),h([n({attribute:"error-text"})],H.prototype,"errorText",void 0),h([n()],H.prototype,"label",void 0),h([n({type:Boolean,attribute:"no-asterisk"})],H.prototype,"noAsterisk",void 0),h([n({type:Boolean,reflect:!0})],H.prototype,"required",void 0),h([n()],H.prototype,"value",void 0),h([n({attribute:"prefix-text"})],H.prototype,"prefixText",void 0),h([n({attribute:"suffix-text"})],H.prototype,"suffixText",void 0),h([n({type:Boolean,attribute:"has-leading-icon"})],H.prototype,"hasLeadingIcon",void 0),h([n({type:Boolean,attribute:"has-trailing-icon"})],H.prototype,"hasTrailingIcon",void 0),h([n({attribute:"supporting-text"})],H.prototype,"supportingText",void 0),h([n({attribute:"text-direction"})],H.prototype,"textDirection",void 0),h([n({type:Number})],H.prototype,"rows",void 0),h([n({type:Number})],H.prototype,"cols",void 0),h([n({reflect:!0})],H.prototype,"inputMode",void 0),h([n()],H.prototype,"max",void 0),h([n({type:Number})],H.prototype,"maxLength",void 0),h([n()],H.prototype,"min",void 0),h([n({type:Number})],H.prototype,"minLength",void 0),h([n({type:Boolean,attribute:"no-spinner"})],H.prototype,"noSpinner",void 0),h([n()],H.prototype,"pattern",void 0),h([n({reflect:!0,converter:Em})],H.prototype,"placeholder",void 0),h([n({type:Boolean,reflect:!0})],H.prototype,"readOnly",void 0),h([n({type:Boolean,reflect:!0})],H.prototype,"multiple",void 0),h([n()],H.prototype,"step",void 0),h([n({reflect:!0})],H.prototype,"type",void 0),h([n({reflect:!0})],H.prototype,"autocomplete",void 0),h([C()],H.prototype,"dirty",void 0),h([C()],H.prototype,"focused",void 0),h([C()],H.prototype,"nativeError",void 0),h([C()],H.prototype,"nativeErrorText",void 0),h([F(".input")],H.prototype,"inputOrTextarea",void 0),h([F(".field")],H.prototype,"field",void 0),h([Ge({slot:"leading-icon"})],H.prototype,"leadingIcons",void 0),h([Ge({slot:"trailing-icon"})],H.prototype,"trailingIcons",void 0);/**
1645
1645
  * @license
1646
1646
  * Copyright 2021 Google LLC
1647
1647
  * SPDX-License-Identifier: Apache-2.0
@@ -2476,7 +2476,7 @@
2476
2476
  md-filled-tonal-icon-button::part(button) {
2477
2477
  border-radius: var(--scb-icon-button-shape-radius) !important;
2478
2478
  }
2479
- `,ye([n({type:String})],de.prototype,"icon",2),ye([n({type:Boolean,reflect:!0})],de.prototype,"filled",1),ye([n({type:Boolean,attribute:"icon-filled",reflect:!0})],de.prototype,"iconFilled",1),ye([n({type:String,attribute:"aria-label"})],de.prototype,"ariaLabel",2),ye([n({type:String})],de.prototype,"variant",2),ye([n({type:String,reflect:!0})],de.prototype,"size",2),ye([n({type:String,reflect:!0})],de.prototype,"shape",2),ye([n({type:Boolean,reflect:!0})],de.prototype,"toggle",2),ye([n({type:Boolean,reflect:!0})],de.prototype,"selected",2),ye([n({type:String})],de.prototype,"toggleofficon",2),ye([n({type:String})],de.prototype,"toggleonicon",2),ye([n({type:Boolean,reflect:!0})],de.prototype,"disabled",2),ye([n({type:String,reflect:!0})],de.prototype,"spacing",2),ye([n({type:String,attribute:"spacing-top",reflect:!0})],de.prototype,"spacingTop",2),ye([n({type:String,attribute:"spacing-bottom",reflect:!0})],de.prototype,"spacingBottom",2),ye([n({type:String,attribute:"spacing-left",reflect:!0})],de.prototype,"spacingLeft",2),ye([n({type:String,attribute:"spacing-right",reflect:!0})],de.prototype,"spacingRight",2),ye([n({type:String})],de.prototype,"href",2),ye([n({type:String})],de.prototype,"target",2),ye([n({type:String})],de.prototype,"rel",2),de=ye([y("scb-icon-button")],de);var Xm=Object.defineProperty,Jm=Object.getOwnPropertyDescriptor,ap=e=>{throw TypeError(e)},le=(e,t,i,s)=>{for(var r=s>1?void 0:s?Jm(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Xm(t,i,r),r},kl=(e,t,i)=>t.has(e)||ap("Cannot "+i),aa=(e,t,i)=>(kl(e,t,"read from private field"),i?i.call(e):t.get(e)),tr=(e,t,i)=>t.has(e)?ap("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Sl=(e,t,i,s)=>(kl(e,t,"write to private field"),t.set(e,i),i),fo=(e,t,i)=>(kl(e,t,"access private method"),i),vo,go,yo,ir,$l,zl,Cl,El;let ae=class extends _{constructor(){super(...arguments),tr(this,ir),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.trailingSwitchLabel="",this.trailingSwitchSelected=!1,this.density=0,this.noDivider=!1,tr(this,vo,!1),tr(this,go,!1),tr(this,yo,!1),this.onRowClick=()=>{var i,s;if(this.type==="link"&&(this.href||this.itemHref))return;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("scb-checkbox"),t=(s=this.shadowRoot)==null?void 0:s.querySelector("scb-switch");if(e&&(e.checked=!e.checked),t){const r=!this.trailingSwitchSelected;t.selected=r,fo(this,ir,zl).call(this,r,!0)}},tr(this,Cl,e=>{var s,r;const t=(s=e.detail)==null?void 0:s.selected,i=typeof t=="boolean"?t:((r=e.currentTarget)==null?void 0:r.selected)??!1;fo(this,ir,zl).call(this,i,!0)}),tr(this,El,e=>{var t;if(!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")){if(this.type==="link"){const i=(t=this.shadowRoot)==null?void 0:t.querySelector("a[href]");if(i){e.preventDefault(),i.click();return}}e.preventDefault(),this.onRowClick()}})}static get styles(){return g`
2479
+ `,ye([n({type:String})],de.prototype,"icon",2),ye([n({type:Boolean,reflect:!0})],de.prototype,"filled",1),ye([n({type:Boolean,attribute:"icon-filled",reflect:!0})],de.prototype,"iconFilled",1),ye([n({type:String,attribute:"aria-label"})],de.prototype,"ariaLabel",2),ye([n({type:String})],de.prototype,"variant",2),ye([n({type:String,reflect:!0})],de.prototype,"size",2),ye([n({type:String,reflect:!0})],de.prototype,"shape",2),ye([n({type:Boolean,reflect:!0})],de.prototype,"toggle",2),ye([n({type:Boolean,reflect:!0})],de.prototype,"selected",2),ye([n({type:String})],de.prototype,"toggleofficon",2),ye([n({type:String})],de.prototype,"toggleonicon",2),ye([n({type:Boolean,reflect:!0})],de.prototype,"disabled",2),ye([n({type:String,reflect:!0})],de.prototype,"spacing",2),ye([n({type:String,attribute:"spacing-top",reflect:!0})],de.prototype,"spacingTop",2),ye([n({type:String,attribute:"spacing-bottom",reflect:!0})],de.prototype,"spacingBottom",2),ye([n({type:String,attribute:"spacing-left",reflect:!0})],de.prototype,"spacingLeft",2),ye([n({type:String,attribute:"spacing-right",reflect:!0})],de.prototype,"spacingRight",2),ye([n({type:String})],de.prototype,"href",2),ye([n({type:String})],de.prototype,"target",2),ye([n({type:String})],de.prototype,"rel",2),de=ye([y("scb-icon-button")],de);var Xm=Object.defineProperty,Jm=Object.getOwnPropertyDescriptor,ap=e=>{throw TypeError(e)},oe=(e,t,i,s)=>{for(var r=s>1?void 0:s?Jm(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Xm(t,i,r),r},kl=(e,t,i)=>t.has(e)||ap("Cannot "+i),aa=(e,t,i)=>(kl(e,t,"read from private field"),i?i.call(e):t.get(e)),tr=(e,t,i)=>t.has(e)?ap("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Sl=(e,t,i,s)=>(kl(e,t,"write to private field"),t.set(e,i),i),fo=(e,t,i)=>(kl(e,t,"access private method"),i),vo,go,yo,ir,$l,zl,Cl,El;let se=class extends _{constructor(){super(...arguments),tr(this,ir),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.trailingSwitchLabel="",this.trailingSwitchWidth="",this.trailingSwitchSelected=!1,this.density=0,this.noDivider=!1,tr(this,vo,!1),tr(this,go,!1),tr(this,yo,!1),this.onRowClick=()=>{var i,s;if(this.type==="link"&&(this.href||this.itemHref))return;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("scb-checkbox"),t=(s=this.shadowRoot)==null?void 0:s.querySelector("scb-switch");if(e&&(e.checked=!e.checked),t){const r=!this.trailingSwitchSelected;t.selected=r,fo(this,ir,zl).call(this,r,!0)}},tr(this,Cl,e=>{var s,r;const t=(s=e.detail)==null?void 0:s.selected,i=typeof t=="boolean"?t:((r=e.currentTarget)==null?void 0:r.selected)??!1;fo(this,ir,zl).call(this,i,!0)}),tr(this,El,e=>{var t;if(!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")){if(this.type==="link"){const i=(t=this.shadowRoot)==null?void 0:t.querySelector("a[href]");if(i){e.preventDefault(),i.click();return}}e.preventDefault(),this.onRowClick()}})}static get styles(){return g`
2480
2480
  :host {
2481
2481
  border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
2482
2482
  margin-bottom: calc(var(--stroke-border, 1px) * -1);
@@ -2565,6 +2565,9 @@
2565
2565
 
2566
2566
 
2567
2567
  .trailing { margin-left: auto; align-self: center; display: flex; }
2568
+ .trailing.trailing-switch {
2569
+ justify-content: flex-end;
2570
+ }
2568
2571
  .trailing scb-checkbox { margin-inline-end: var(--scb-list-trailing-checkbox-nudge); }
2569
2572
 
2570
2573
  :host([trailing-variant="checkbox"]) .row,
@@ -2594,22 +2597,22 @@
2594
2597
  variant=${this.avatarVariant}
2595
2598
  ></scb-avatar>
2596
2599
  </div>
2597
- `;case"image":return this.imgHrefImage?c`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:m;default:return m}})():m,t=this.href||this.itemHref||"",i=this.target==="_blank"?"open_in_new":"chevron_right",s=this.label?`Välj ${this.label}`:"Välj",r=this.label?`Växla ${this.label}`:"Växla";let a=m;if(this.trailing)if(this.trailingVariant==="icon"){const d=this.trailingIcon||(this.type==="link"?i:"");a=d?c`<div class="trailing"><md-icon>${d}</md-icon></div>`:m}else this.trailingVariant==="checkbox"?a=c`
2600
+ `;case"image":return this.imgHrefImage?c`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:m;default:return m}})():m,t=this.href||this.itemHref||"",i=this.target==="_blank"?"open_in_new":"chevron_right",s=this.label?`Välj ${this.label}`:"Välj",r=this.label?`Växla ${this.label}`:"Växla";let a=m;if(this.trailing){if(this.trailingVariant==="icon"){const d=this.trailingIcon||(this.type==="link"?i:"");a=d?c`<div class="trailing"><md-icon>${d}</md-icon></div>`:m}else if(this.trailingVariant==="checkbox")a=c`
2598
2601
  <div class="trailing">
2599
2602
  <scb-checkbox
2600
2603
  aria-label=${s}
2601
2604
  @click=${d=>d.stopPropagation()}
2602
2605
  ></scb-checkbox>
2603
- </div>`:this.trailingVariant==="switch"&&(a=c`
2604
- <div class="trailing">
2606
+ </div>`;else if(this.trailingVariant==="switch"){const d=this.trailingSwitchWidth?`inline-size: ${this.trailingSwitchWidth}; min-inline-size: ${this.trailingSwitchWidth};`:m;a=c`
2607
+ <div class="trailing trailing-switch" style=${d}>
2605
2608
  <scb-switch
2606
2609
  .selected=${this.trailingSwitchSelected}
2607
2610
  label=${this.trailingSwitchLabel||m}
2608
2611
  aria-label=${r}
2609
- @click=${d=>d.stopPropagation()}
2612
+ @click=${p=>p.stopPropagation()}
2610
2613
  @change=${aa(this,Cl)}
2611
2614
  ></scb-switch>
2612
- </div>`);else this.type==="link"&&(a=c`<div class="trailing"><md-icon>${i}</md-icon></div>`);const o=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":m,l=c`
2615
+ </div>`}}else this.type==="link"&&(a=c`<div class="trailing"><md-icon>${i}</md-icon></div>`);const o=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":m,l=c`
2613
2616
  ${e}
2614
2617
  <div class="texts">
2615
2618
  ${this.overline?c`<div class="overline">${this.overline}</div>`:m}
@@ -2624,7 +2627,7 @@
2624
2627
  </div>
2625
2628
 
2626
2629
  <md-focus-ring></md-focus-ring>
2627
- `}};vo=new WeakMap,go=new WeakMap,yo=new WeakMap,ir=new WeakSet,$l=async function(){const e=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||e)&&!aa(this,vo)&&(await Promise.resolve().then(()=>yi),Sl(this,vo,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!aa(this,go)&&(await Promise.resolve().then(()=>Wf),Sl(this,go,!0)),this.trailing&&this.trailingVariant==="switch"&&!aa(this,yo)&&(await Promise.resolve().then(()=>tv),Sl(this,yo,!0))},zl=function(e,t){this.trailingSwitchSelected=e,t&&this.dispatchEvent(new CustomEvent("trailing-switch-change",{detail:{selected:e},bubbles:!0,composed:!0}))},Cl=new WeakMap,El=new WeakMap,le([n({type:String,reflect:!0,attribute:"type"})],ae.prototype,"type",2),le([n({type:String})],ae.prototype,"href",2),le([n({type:String,attribute:"item-href"})],ae.prototype,"itemHref",2),le([n({type:String,attribute:"target"})],ae.prototype,"target",2),le([n({type:Boolean,attribute:"disabled"})],ae.prototype,"disabled",2),le([n({type:String,reflect:!0})],ae.prototype,"label",2),le([n({type:String,attribute:"supporting-text"})],ae.prototype,"supportingText",2),le([n({type:String,attribute:"overline"})],ae.prototype,"overline",2),le([n({type:Boolean})],ae.prototype,"leading",2),le([n({type:String,attribute:"leading-variant",reflect:!0})],ae.prototype,"leadingVariant",2),le([n({type:String,attribute:"leading-icon"})],ae.prototype,"leadingIcon",2),le([n({type:String,attribute:"avatar-label"})],ae.prototype,"avatarLabel",2),le([n({type:String,attribute:"avatar-alt"})],ae.prototype,"avatarAlt",2),le([n({type:String,attribute:"avatar-variant"})],ae.prototype,"avatarVariant",2),le([n({type:String,attribute:"avatar-src"})],ae.prototype,"avatarSrc",2),le([n({type:String,reflect:!0,attribute:"img-href-image"})],ae.prototype,"imgHrefImage",2),le([n({type:Boolean})],ae.prototype,"trailing",2),le([n({type:String,attribute:"trailing-variant",reflect:!0})],ae.prototype,"trailingVariant",2),le([n({type:String,attribute:"trailing-icon"})],ae.prototype,"trailingIcon",2),le([n({type:String,attribute:"trailing-switch-label"})],ae.prototype,"trailingSwitchLabel",2),le([n({type:Boolean,attribute:"trailing-switch-selected",reflect:!0})],ae.prototype,"trailingSwitchSelected",2),le([n({type:Number,reflect:!0})],ae.prototype,"density",2),le([n({type:Boolean,attribute:"no-divider",reflect:!0})],ae.prototype,"noDivider",2),ae=le([y("scb-list-item")],ae);var Zm=Object.defineProperty,Qm=Object.getOwnPropertyDescriptor,op=e=>{throw TypeError(e)},ps=(e,t,i,s)=>{for(var r=s>1?void 0:s?Qm(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Zm(t,i,r),r},np=(e,t,i)=>t.has(e)||op("Cannot "+i),ef=(e,t,i)=>(np(e,t,"read from private field"),t.get(e)),tf=(e,t,i)=>t.has(e)?op("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),sf=(e,t,i,s)=>(np(e,t,"write to private field"),t.set(e,i),i),_o;let wi=class extends _{constructor(){super(...arguments),tf(this,_o,!1),this.noDivider=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onSlotChange=()=>this._setupItems()}async firstUpdated(){ef(this,_o)||(await Promise.resolve().then(()=>Eb),sf(this,_o,!0)),this._setupItems(),this._applySpacing()}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this._applySpacing()}_getItems(){var t;return(((t=this._slotEl)==null?void 0:t.assignedElements({flatten:!0}))??[]).filter(i=>i instanceof HTMLElement)}_setupItems(){var i;this._getItems().forEach((s,r)=>{s.hasAttribute("role")||s.setAttribute("role","listitem"),s.setAttribute("tabindex",r===0?"0":"-1")});const t=(i=this.renderRoot)==null?void 0:i.querySelector("md-list");t&&!t.hasAttribute("data-kbd")&&(t.setAttribute("data-kbd","true"),t.addEventListener("keydown",s=>this._onKeyDown(s)))}_onKeyDown(e){const t=this._getItems();if(!t.length)return;const i=t.findIndex(r=>r.getAttribute("tabindex")==="0"),s=r=>{const a=(r%t.length+t.length)%t.length;t.forEach(l=>l.setAttribute("tabindex","-1"));const o=t[a];o.setAttribute("tabindex","0"),o.focus()};switch(e.key){case"ArrowDown":case"ArrowRight":e.preventDefault(),s(i<0?0:i+1);break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),s(i<0?0:i-1);break;case"Home":e.preventDefault(),s(0);break;case"End":e.preventDefault(),s(t.length-1);break}}_mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){const e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,i=this._mapSpacingToken(this.spacingBottom)??e,s=this._mapSpacingToken(this.spacingLeft),r=this._mapSpacingToken(this.spacingRight);t?this.style.marginBlockStart=t:this.style.removeProperty("margin-block-start"),i?this.style.marginBlockEnd=i:this.style.removeProperty("margin-block-end"),s?this.style.marginInlineStart=s:this.style.removeProperty("margin-inline-start"),r?this.style.marginInlineEnd=r:this.style.removeProperty("margin-inline-end")}render(){return c`
2630
+ `}};vo=new WeakMap,go=new WeakMap,yo=new WeakMap,ir=new WeakSet,$l=async function(){const e=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||e)&&!aa(this,vo)&&(await Promise.resolve().then(()=>yi),Sl(this,vo,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!aa(this,go)&&(await Promise.resolve().then(()=>Wf),Sl(this,go,!0)),this.trailing&&this.trailingVariant==="switch"&&!aa(this,yo)&&(await Promise.resolve().then(()=>tv),Sl(this,yo,!0))},zl=function(e,t){this.trailingSwitchSelected=e,t&&this.dispatchEvent(new CustomEvent("trailing-switch-change",{detail:{selected:e},bubbles:!0,composed:!0}))},Cl=new WeakMap,El=new WeakMap,oe([n({type:String,reflect:!0,attribute:"type"})],se.prototype,"type",2),oe([n({type:String})],se.prototype,"href",2),oe([n({type:String,attribute:"item-href"})],se.prototype,"itemHref",2),oe([n({type:String,attribute:"target"})],se.prototype,"target",2),oe([n({type:Boolean,attribute:"disabled"})],se.prototype,"disabled",2),oe([n({type:String,reflect:!0})],se.prototype,"label",2),oe([n({type:String,attribute:"supporting-text"})],se.prototype,"supportingText",2),oe([n({type:String,attribute:"overline"})],se.prototype,"overline",2),oe([n({type:Boolean})],se.prototype,"leading",2),oe([n({type:String,attribute:"leading-variant",reflect:!0})],se.prototype,"leadingVariant",2),oe([n({type:String,attribute:"leading-icon"})],se.prototype,"leadingIcon",2),oe([n({type:String,attribute:"avatar-label"})],se.prototype,"avatarLabel",2),oe([n({type:String,attribute:"avatar-alt"})],se.prototype,"avatarAlt",2),oe([n({type:String,attribute:"avatar-variant"})],se.prototype,"avatarVariant",2),oe([n({type:String,attribute:"avatar-src"})],se.prototype,"avatarSrc",2),oe([n({type:String,reflect:!0,attribute:"img-href-image"})],se.prototype,"imgHrefImage",2),oe([n({type:Boolean})],se.prototype,"trailing",2),oe([n({type:String,attribute:"trailing-variant",reflect:!0})],se.prototype,"trailingVariant",2),oe([n({type:String,attribute:"trailing-icon"})],se.prototype,"trailingIcon",2),oe([n({type:String,attribute:"trailing-switch-label"})],se.prototype,"trailingSwitchLabel",2),oe([n({type:String,attribute:"trailing-switch-width"})],se.prototype,"trailingSwitchWidth",2),oe([n({type:Boolean,attribute:"trailing-switch-selected",reflect:!0})],se.prototype,"trailingSwitchSelected",2),oe([n({type:Number,reflect:!0})],se.prototype,"density",2),oe([n({type:Boolean,attribute:"no-divider",reflect:!0})],se.prototype,"noDivider",2),se=oe([y("scb-list-item")],se);var Zm=Object.defineProperty,Qm=Object.getOwnPropertyDescriptor,op=e=>{throw TypeError(e)},ps=(e,t,i,s)=>{for(var r=s>1?void 0:s?Qm(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Zm(t,i,r),r},np=(e,t,i)=>t.has(e)||op("Cannot "+i),ef=(e,t,i)=>(np(e,t,"read from private field"),t.get(e)),tf=(e,t,i)=>t.has(e)?op("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),sf=(e,t,i,s)=>(np(e,t,"write to private field"),t.set(e,i),i),_o;let wi=class extends _{constructor(){super(...arguments),tf(this,_o,!1),this.noDivider=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onSlotChange=()=>this._setupItems()}async firstUpdated(){ef(this,_o)||(await Promise.resolve().then(()=>Eb),sf(this,_o,!0)),this._setupItems(),this._applySpacing()}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this._applySpacing()}_getItems(){var t;return(((t=this._slotEl)==null?void 0:t.assignedElements({flatten:!0}))??[]).filter(i=>i instanceof HTMLElement)}_setupItems(){var i;this._getItems().forEach((s,r)=>{s.hasAttribute("role")||s.setAttribute("role","listitem"),s.setAttribute("tabindex",r===0?"0":"-1")});const t=(i=this.renderRoot)==null?void 0:i.querySelector("md-list");t&&!t.hasAttribute("data-kbd")&&(t.setAttribute("data-kbd","true"),t.addEventListener("keydown",s=>this._onKeyDown(s)))}_onKeyDown(e){const t=this._getItems();if(!t.length)return;const i=t.findIndex(r=>r.getAttribute("tabindex")==="0"),s=r=>{const a=(r%t.length+t.length)%t.length;t.forEach(l=>l.setAttribute("tabindex","-1"));const o=t[a];o.setAttribute("tabindex","0"),o.focus()};switch(e.key){case"ArrowDown":case"ArrowRight":e.preventDefault(),s(i<0?0:i+1);break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),s(i<0?0:i-1);break;case"Home":e.preventDefault(),s(0);break;case"End":e.preventDefault(),s(t.length-1);break}}_mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){const e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,i=this._mapSpacingToken(this.spacingBottom)??e,s=this._mapSpacingToken(this.spacingLeft),r=this._mapSpacingToken(this.spacingRight);t?this.style.marginBlockStart=t:this.style.removeProperty("margin-block-start"),i?this.style.marginBlockEnd=i:this.style.removeProperty("margin-block-end"),s?this.style.marginInlineStart=s:this.style.removeProperty("margin-inline-start"),r?this.style.marginInlineEnd=r:this.style.removeProperty("margin-inline-end")}render(){return c`
2628
2631
  <md-list role="list" @slotchange=${this._onSlotChange}>
2629
2632
  <slot></slot>
2630
2633
  </md-list>
@@ -4911,7 +4914,7 @@
4911
4914
  color: var(--md-sys-color-on-surface);
4912
4915
  font-size: var(--md-sys-typescale-body-large-size);
4913
4916
  } */
4914
- `,Ee([n({type:String,reflect:!0})],ge.prototype,"variant",2),Ee([n({type:String})],ge.prototype,"label",2),Ee([n({type:String})],ge.prototype,"icon",2),Ee([n({type:Boolean,reflect:!0})],ge.prototype,"disabled",2),Ee([n({type:Boolean,reflect:!0})],ge.prototype,"elevated",2),Ee([n({type:Boolean,reflect:!0})],ge.prototype,"removable",2),Ee([n({type:Boolean,reflect:!0})],ge.prototype,"selected",2),Ee([n({type:Boolean,reflect:!0,attribute:"disable-toggle"})],ge.prototype,"disableToggle",2),Ee([n({type:String})],ge.prototype,"href",2),Ee([n({type:String})],ge.prototype,"target",2),Ee([n({type:String})],ge.prototype,"name",2),Ee([n({type:String})],ge.prototype,"value",2),Ee([n({type:String,reflect:!0})],ge.prototype,"spacing",2),Ee([n({type:String,reflect:!0,attribute:"spacing-top"})],ge.prototype,"spacingTop",2),Ee([n({type:String,reflect:!0,attribute:"spacing-bottom"})],ge.prototype,"spacingBottom",2),Ee([n({type:String,reflect:!0,attribute:"spacing-left"})],ge.prototype,"spacingLeft",2),Ee([n({type:String,reflect:!0,attribute:"spacing-right"})],ge.prototype,"spacingRight",2),Ee([n({type:String,reflect:!0})],ge.prototype,"size",2),ge=Ee([y("scb-chip")],ge);var ov=Object.defineProperty,nv=Object.getOwnPropertyDescriptor,se=(e,t,i,s)=>{for(var r=s>1?void 0:s?nv(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&ov(t,i,r),r};let ee=class extends _{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__onDocumentClick=e=>{this.__getActionFromEvent(e)==="toggle"&&(this.__setOpen(!this.open),e.stopPropagation())},this.__onDocumentKeydown=e=>{this.open&&e.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{var i,s,r;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("form");e instanceof HTMLFormElement&&(this.__clearGeneratedFormValues(e),e.reset()),(((r=(s=this.shadowRoot)==null?void 0:s.querySelector("slot"))==null?void 0:r.assignedElements({flatten:!0}))??[]).forEach(a=>{const o=a.tagName;o==="SCB-TEXTFIELD"&&(a.value=""),o==="SCB-CHECKBOX"&&(a.checked=!1),o==="SCB-RADIO-BUTTON"&&(a.checked=!1),o==="SCB-SWITCH"&&(a.selected=!1),o==="SCB-CHIP"&&(a.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("form");if(e instanceof HTMLFormElement){if(this.__syncSlottedFormValues(e),!this.__validateFormAndSlottedFields(e))return;e.requestSubmit()}this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=e=>{if(!this.open||e.key!=="Tab")return;const t=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(r=>!r.hasAttribute("disabled"));if(!t.length)return;const i=t[0],s=t[t.length-1];e.shiftKey&&document.activeElement===i?(s.focus(),e.preventDefault()):!e.shiftKey&&document.activeElement===s&&(i.focus(),e.preventDefault())}}__getActionFromEvent(e){if(!this.id)return null;for(const t of e.composedPath())if(t instanceof Element){if(t.getAttribute("data-dialog-toggle")===this.id)return this.__lastTriggerEl=t,"toggle";if(t.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=t,"toggle"}return null}connectedCallback(){super.connectedCallback(),this.__applyZIndex(),this.__applyMaxSize(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}__applyZIndex(){const e=typeof this.zIndex=="number"&&Number.isFinite(this.zIndex)?this.zIndex:void 0;if(e===void 0){this.style.removeProperty("--z-dialog-scrim"),this.style.removeProperty("--z-dialog");return}this.style.setProperty("--z-dialog-scrim",String(e)),this.style.setProperty("--z-dialog",String(e+1))}__applyMaxSize(){const e=(this.maxW??"").trim(),t=(this.maxH??"").trim();e?(this.style.setProperty("--scb-dialog-max-w",e),this.style.setProperty("--scb-dialog-width",`min(${e}, 90vw)`)):(this.style.removeProperty("--scb-dialog-max-w"),this.style.removeProperty("--scb-dialog-width")),t?this.style.setProperty("--scb-dialog-max-h",t):this.style.removeProperty("--scb-dialog-max-h")}updated(e){var t,i;if(e.has("zIndex")&&this.__applyZIndex(),(e.has("maxW")||e.has("maxH"))&&this.__applyMaxSize(),e.has("open")){const s=e.get("open");this.__updateTriggersExpanded(),this.open&&!s?this.updateComplete.then(()=>{var a,o,l;const r=(a=this.shadowRoot)==null?void 0:a.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');r?r.focus():(l=(o=this.shadowRoot)==null?void 0:o.querySelector(".container"))==null||l.focus()}):!this.open&&s&&((i=(t=this.__lastTriggerEl)==null?void 0:t.focus)==null||i.call(t)),this.__toggleScrollLock(this.open)}(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute("aria-controls")&&e.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(e){if(this.inSb)return;const t=document.documentElement,i=document.body;if(e){const s=window.innerWidth-t.clientWidth;t.style.overflow="hidden",i.style.paddingRight=s>0?`${s}px`:"";return}t.style.overflow="",i.style.paddingRight=""}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,i=this.mapSpacingToken(this.spacingBottom)??e,s=this.mapSpacingToken(this.spacingLeft),r=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-dialog-spacing-block-start",t):this.style.removeProperty("--scb-dialog-spacing-block-start"),i?this.style.setProperty("--scb-dialog-spacing-block-end",i):this.style.removeProperty("--scb-dialog-spacing-block-end"),s?this.style.setProperty("--scb-dialog-spacing-inline-start",s):this.style.removeProperty("--scb-dialog-spacing-inline-start"),r?this.style.setProperty("--scb-dialog-spacing-inline-end",r):this.style.removeProperty("--scb-dialog-spacing-inline-end")}__setOpen(e){this.open=e,this.__fire(e?"open":"close")}__fire(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}__getSlottedElements(){var s;const e=(s=this.shadowRoot)==null?void 0:s.querySelector("slot");if(!(e instanceof HTMLSlotElement))return[];const t=e.assignedElements({flatten:!0}),i=[];for(const r of t)i.push(r,...Array.from(r.querySelectorAll("*")));return i}__appendHiddenFormValue(e,t,i){const s=document.createElement("input");s.type="hidden",s.name=t,s.value=i,s.setAttribute("data-scb-dialog-generated","true"),e.append(s)}__clearGeneratedFormValues(e){e.querySelectorAll('input[data-scb-dialog-generated="true"]').forEach(t=>t.remove())}__syncSlottedFormValues(e){this.__clearGeneratedFormValues(e),this.__getSlottedElements().forEach(i=>{if(!(i instanceof HTMLElement))return;const s=(i.getAttribute("name")??"").trim();if(!(!s||i.disabled===!0||i.hasAttribute("disabled"))){if(i instanceof HTMLInputElement){if(i.form===e)return;const a=(i.type||"").toLowerCase();if(a==="checkbox"||a==="radio"){i.checked&&this.__appendHiddenFormValue(e,s,i.value||"on");return}this.__appendHiddenFormValue(e,s,i.value??"");return}if(i instanceof HTMLTextAreaElement){if(i.form===e)return;this.__appendHiddenFormValue(e,s,i.value??"");return}if(i instanceof HTMLSelectElement){if(i.form===e)return;if(i.multiple){Array.from(i.selectedOptions).forEach(a=>{this.__appendHiddenFormValue(e,s,a.value)});return}this.__appendHiddenFormValue(e,s,i.value??"");return}switch(i.tagName){case"SCB-TEXTFIELD":this.__appendHiddenFormValue(e,s,String(i.value??""));return;case"SCB-CHECKBOX":i.checked&&this.__appendHiddenFormValue(e,s,String(i.value??i.getAttribute("value")??"on"));return;case"SCB-RADIO-BUTTON":i.checked&&this.__appendHiddenFormValue(e,s,String(i.value??i.getAttribute("value")??"on"));return;case"SCB-SWITCH":(i.selected||i.checked)&&this.__appendHiddenFormValue(e,s,String(i.value??i.getAttribute("value")??"on"));return;case"SCB-CHIP":i.selected&&this.__appendHiddenFormValue(e,s,String(i.value??i.getAttribute("value")??"on"));return;default:"value"in i&&this.__appendHiddenFormValue(e,s,String(i.value??""))}}})}__validateFormAndSlottedFields(e){const t=o=>o.disabled===!0||o.hasAttribute("disabled");let i=e.reportValidity(),s=null;const r=new Set;return this.__getSlottedElements().forEach(o=>{if(!(o instanceof HTMLElement)||r.has(o)||t(o))return;r.add(o);const l=o;if(o.tagName==="SCB-TEXTFIELD"&&l.error===!0){s||(s=o),i=!1;return}if(typeof l.reportValidity=="function"){const d=!!l.reportValidity();!d&&!s&&(s=o),i=i&&d}}),!i&&s&&s.focus(),i}__slotIsEmpty(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return e?e.assignedElements({flatten:!0}).length===0:!0}renderHeader(e){const t=this.variant==="form"||this.variant==="floating"||this.variant==="iframe";return c`
4917
+ `,Ee([n({type:String,reflect:!0})],ge.prototype,"variant",2),Ee([n({type:String})],ge.prototype,"label",2),Ee([n({type:String})],ge.prototype,"icon",2),Ee([n({type:Boolean,reflect:!0})],ge.prototype,"disabled",2),Ee([n({type:Boolean,reflect:!0})],ge.prototype,"elevated",2),Ee([n({type:Boolean,reflect:!0})],ge.prototype,"removable",2),Ee([n({type:Boolean,reflect:!0})],ge.prototype,"selected",2),Ee([n({type:Boolean,reflect:!0,attribute:"disable-toggle"})],ge.prototype,"disableToggle",2),Ee([n({type:String})],ge.prototype,"href",2),Ee([n({type:String})],ge.prototype,"target",2),Ee([n({type:String})],ge.prototype,"name",2),Ee([n({type:String})],ge.prototype,"value",2),Ee([n({type:String,reflect:!0})],ge.prototype,"spacing",2),Ee([n({type:String,reflect:!0,attribute:"spacing-top"})],ge.prototype,"spacingTop",2),Ee([n({type:String,reflect:!0,attribute:"spacing-bottom"})],ge.prototype,"spacingBottom",2),Ee([n({type:String,reflect:!0,attribute:"spacing-left"})],ge.prototype,"spacingLeft",2),Ee([n({type:String,reflect:!0,attribute:"spacing-right"})],ge.prototype,"spacingRight",2),Ee([n({type:String,reflect:!0})],ge.prototype,"size",2),ge=Ee([y("scb-chip")],ge);var ov=Object.defineProperty,nv=Object.getOwnPropertyDescriptor,re=(e,t,i,s)=>{for(var r=s>1?void 0:s?nv(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&ov(t,i,r),r};let ee=class extends _{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__onDocumentClick=e=>{this.__getActionFromEvent(e)==="toggle"&&(this.__setOpen(!this.open),e.stopPropagation())},this.__onDocumentKeydown=e=>{this.open&&e.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{var i,s,r;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("form");e instanceof HTMLFormElement&&(this.__clearGeneratedFormValues(e),e.reset()),(((r=(s=this.shadowRoot)==null?void 0:s.querySelector("slot"))==null?void 0:r.assignedElements({flatten:!0}))??[]).forEach(a=>{const o=a.tagName;o==="SCB-TEXTFIELD"&&(a.value=""),o==="SCB-CHECKBOX"&&(a.checked=!1),o==="SCB-RADIO-BUTTON"&&(a.checked=!1),o==="SCB-SWITCH"&&(a.selected=!1),o==="SCB-CHIP"&&(a.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("form");if(e instanceof HTMLFormElement){if(this.__syncSlottedFormValues(e),!this.__validateFormAndSlottedFields(e))return;e.requestSubmit()}this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=e=>{if(!this.open||e.key!=="Tab")return;const t=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(r=>!r.hasAttribute("disabled"));if(!t.length)return;const i=t[0],s=t[t.length-1];e.shiftKey&&document.activeElement===i?(s.focus(),e.preventDefault()):!e.shiftKey&&document.activeElement===s&&(i.focus(),e.preventDefault())}}__getActionFromEvent(e){if(!this.id)return null;for(const t of e.composedPath())if(t instanceof Element){if(t.getAttribute("data-dialog-toggle")===this.id)return this.__lastTriggerEl=t,"toggle";if(t.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=t,"toggle"}return null}connectedCallback(){super.connectedCallback(),this.__applyZIndex(),this.__applyMaxSize(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}__applyZIndex(){const e=typeof this.zIndex=="number"&&Number.isFinite(this.zIndex)?this.zIndex:void 0;if(e===void 0){this.style.removeProperty("--z-dialog-scrim"),this.style.removeProperty("--z-dialog");return}this.style.setProperty("--z-dialog-scrim",String(e)),this.style.setProperty("--z-dialog",String(e+1))}__applyMaxSize(){const e=(this.maxW??"").trim(),t=(this.maxH??"").trim();e?(this.style.setProperty("--scb-dialog-max-w",e),this.style.setProperty("--scb-dialog-width",`min(${e}, 90vw)`)):(this.style.removeProperty("--scb-dialog-max-w"),this.style.removeProperty("--scb-dialog-width")),t?this.style.setProperty("--scb-dialog-max-h",t):this.style.removeProperty("--scb-dialog-max-h")}updated(e){var t,i;if(e.has("zIndex")&&this.__applyZIndex(),(e.has("maxW")||e.has("maxH"))&&this.__applyMaxSize(),e.has("open")){const s=e.get("open");this.__updateTriggersExpanded(),this.open&&!s?this.updateComplete.then(()=>{var a,o,l;const r=(a=this.shadowRoot)==null?void 0:a.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');r?r.focus():(l=(o=this.shadowRoot)==null?void 0:o.querySelector(".container"))==null||l.focus()}):!this.open&&s&&((i=(t=this.__lastTriggerEl)==null?void 0:t.focus)==null||i.call(t)),this.__toggleScrollLock(this.open)}(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute("aria-controls")&&e.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(e){if(this.inSb)return;const t=document.documentElement,i=document.body;if(e){const s=window.innerWidth-t.clientWidth;t.style.overflow="hidden",i.style.paddingRight=s>0?`${s}px`:"";return}t.style.overflow="",i.style.paddingRight=""}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,i=this.mapSpacingToken(this.spacingBottom)??e,s=this.mapSpacingToken(this.spacingLeft),r=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-dialog-spacing-block-start",t):this.style.removeProperty("--scb-dialog-spacing-block-start"),i?this.style.setProperty("--scb-dialog-spacing-block-end",i):this.style.removeProperty("--scb-dialog-spacing-block-end"),s?this.style.setProperty("--scb-dialog-spacing-inline-start",s):this.style.removeProperty("--scb-dialog-spacing-inline-start"),r?this.style.setProperty("--scb-dialog-spacing-inline-end",r):this.style.removeProperty("--scb-dialog-spacing-inline-end")}__setOpen(e){this.open=e,this.__fire(e?"open":"close")}__fire(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}__getSlottedElements(){var s;const e=(s=this.shadowRoot)==null?void 0:s.querySelector("slot");if(!(e instanceof HTMLSlotElement))return[];const t=e.assignedElements({flatten:!0}),i=[];for(const r of t)i.push(r,...Array.from(r.querySelectorAll("*")));return i}__appendHiddenFormValue(e,t,i){const s=document.createElement("input");s.type="hidden",s.name=t,s.value=i,s.setAttribute("data-scb-dialog-generated","true"),e.append(s)}__clearGeneratedFormValues(e){e.querySelectorAll('input[data-scb-dialog-generated="true"]').forEach(t=>t.remove())}__syncSlottedFormValues(e){this.__clearGeneratedFormValues(e),this.__getSlottedElements().forEach(i=>{if(!(i instanceof HTMLElement))return;const s=(i.getAttribute("name")??"").trim();if(!(!s||i.disabled===!0||i.hasAttribute("disabled"))){if(i instanceof HTMLInputElement){if(i.form===e)return;const a=(i.type||"").toLowerCase();if(a==="checkbox"||a==="radio"){i.checked&&this.__appendHiddenFormValue(e,s,i.value||"on");return}this.__appendHiddenFormValue(e,s,i.value??"");return}if(i instanceof HTMLTextAreaElement){if(i.form===e)return;this.__appendHiddenFormValue(e,s,i.value??"");return}if(i instanceof HTMLSelectElement){if(i.form===e)return;if(i.multiple){Array.from(i.selectedOptions).forEach(a=>{this.__appendHiddenFormValue(e,s,a.value)});return}this.__appendHiddenFormValue(e,s,i.value??"");return}switch(i.tagName){case"SCB-TEXTFIELD":this.__appendHiddenFormValue(e,s,String(i.value??""));return;case"SCB-CHECKBOX":i.checked&&this.__appendHiddenFormValue(e,s,String(i.value??i.getAttribute("value")??"on"));return;case"SCB-RADIO-BUTTON":i.checked&&this.__appendHiddenFormValue(e,s,String(i.value??i.getAttribute("value")??"on"));return;case"SCB-SWITCH":(i.selected||i.checked)&&this.__appendHiddenFormValue(e,s,String(i.value??i.getAttribute("value")??"on"));return;case"SCB-CHIP":i.selected&&this.__appendHiddenFormValue(e,s,String(i.value??i.getAttribute("value")??"on"));return;default:"value"in i&&this.__appendHiddenFormValue(e,s,String(i.value??""))}}})}__validateFormAndSlottedFields(e){const t=o=>o.disabled===!0||o.hasAttribute("disabled");let i=e.reportValidity(),s=null;const r=new Set;return this.__getSlottedElements().forEach(o=>{if(!(o instanceof HTMLElement)||r.has(o)||t(o))return;r.add(o);const l=o;if(o.tagName==="SCB-TEXTFIELD"&&l.error===!0){s||(s=o),i=!1;return}if(typeof l.reportValidity=="function"){const d=!!l.reportValidity();!d&&!s&&(s=o),i=i&&d}}),!i&&s&&s.focus(),i}__slotIsEmpty(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return e?e.assignedElements({flatten:!0}).length===0:!0}renderHeader(e){const t=this.variant==="form"||this.variant==="floating"||this.variant==="iframe";return c`
4915
4918
  <div class="header">
4916
4919
  <div class="title">
4917
4920
  ${this.icon?c`<md-icon class="dialog-icon">${this.icon}</md-icon>`:m}
@@ -5175,7 +5178,7 @@
5175
5178
  to { opacity: 0; }
5176
5179
  }
5177
5180
 
5178
- `,se([n({type:Boolean,reflect:!0})],ee.prototype,"open",2),se([n({type:String,attribute:"max-w",reflect:!0})],ee.prototype,"maxW",2),se([n({type:String,attribute:"max-h",reflect:!0})],ee.prototype,"maxH",2),se([n({type:Number,attribute:"z-index",reflect:!0})],ee.prototype,"zIndex",2),se([n({type:Boolean,attribute:!1})],ee.prototype,"inSb",2),se([n({type:Boolean,attribute:"scrim-close"})],ee.prototype,"scrimClose",2),se([n({type:String,reflect:!0})],ee.prototype,"spacing",2),se([n({type:String,attribute:"spacing-top",reflect:!0})],ee.prototype,"spacingTop",2),se([n({type:String,attribute:"spacing-bottom",reflect:!0})],ee.prototype,"spacingBottom",2),se([n({type:String,attribute:"spacing-left",reflect:!0})],ee.prototype,"spacingLeft",2),se([n({type:String,attribute:"spacing-right",reflect:!0})],ee.prototype,"spacingRight",2),se([n({type:String})],ee.prototype,"variant",2),se([n({type:String})],ee.prototype,"label",2),se([n({type:String})],ee.prototype,"icon",2),se([n({type:String,attribute:"supporting-text"})],ee.prototype,"supportingText",2),se([n({type:String,attribute:"ok-button"})],ee.prototype,"okButton",2),se([n({type:String,attribute:"cancel-button"})],ee.prototype,"cancelButton",2),se([n({type:String,attribute:"delete-button"})],ee.prototype,"deleteButton",2),se([n({type:String,attribute:"confirm-button"})],ee.prototype,"confirmButton",2),se([n({type:String,attribute:"deny-button"})],ee.prototype,"denyButton",2),se([n({type:String,attribute:"reset-button"})],ee.prototype,"resetButton",2),se([n({type:String,attribute:"submit-button"})],ee.prototype,"submitButton",2),se([n({type:String,attribute:"form-id"})],ee.prototype,"formId",2),se([n({type:String,attribute:"form-action"})],ee.prototype,"formAction",2),se([n({type:String,attribute:"form-method"})],ee.prototype,"formMethod",2),ee=se([y("scb-dialog")],ee);var lv=Object.defineProperty,cv=Object.getOwnPropertyDescriptor,Dp=e=>{throw TypeError(e)},wt=(e,t,i,s)=>{for(var r=s>1?void 0:s?cv(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&lv(t,i,r),r},dv=(e,t,i)=>t.has(e)||Dp("Cannot "+i),pv=(e,t,i)=>t.has(e)?Dp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Op=(e,t,i)=>(dv(e,t,"access private method"),i),No,Jl;let Ze=class extends _{constructor(){super(...arguments),pv(this,No),this._lastActiveDay=null,this.lang="sv",this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate="",this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=e=>{var d,p;const i=Array.from(((d=this.shadowRoot)==null?void 0:d.querySelectorAll(".calendar-day.has-event"))??[]),s=(p=this.shadowRoot)==null?void 0:p.activeElement,r=s&&i.includes(s)?s:document.activeElement,a=i.indexOf(r);if(a===-1)return;let o=a;const l=this.disableWeekend?5:7;switch(e.key){case"ArrowRight":o=a+1<i.length?a+1:a;break;case"ArrowLeft":o=a-1>=0?a-1:a;break;case"ArrowDown":o=a+l<i.length?a+l:a;break;case"ArrowUp":o=a-l>=0?a-l:a;break;default:return}o!==a&&(e.preventDefault(),i[o].focus())},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{var e;(e=this._lastActiveDay)==null||e.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(e){const t=(e??"")+"";t!==this.selectedDate&&(this.selectedDate=t)}static get observedAttributes(){return[...super.observedAttributes??[],"value"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e==="value"&&(this.value=i??"")}connectedCallback(){super.connectedCallback(),Op(this,No,Jl).call(this);const e=Number(this.displayYear),t=Number(this.displayMonth);!Number.isNaN(e)&&!Number.isNaN(t)&&t>=1&&t<=12&&(this._current=new Date(e,t-1,1)),this._syncDisplayFromCurrent(!1),this.addEventListener("change",this._onEventChanged),this._mutationObserver=new MutationObserver(()=>{this.requestUpdate()}),this._mutationObserver.observe(this,{childList:!0}),this.addEventListener("keydown",this._onCalendarKeyDown)}disconnectedCallback(){this.removeEventListener("change",this._onEventChanged),super.disconnectedCallback(),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null),this.removeEventListener("keydown",this._onCalendarKeyDown)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}updated(e){var t;if((t=super.updated)==null||t.call(this,e),e.has("eventsJson")&&(this._eventsJsonLast=void 0,this._eventsFromJson=null),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&Op(this,No,Jl).call(this),!this._syncingDisplay&&(e.has("displayYear")||e.has("displayMonth"))){const i=Number(this.displayYear),s=Number(this.displayMonth);if(!Number.isNaN(i)&&!Number.isNaN(s)&&s>=1&&s<=12){const r=this._current.getFullYear(),a=this._current.getMonth()+1;(r!==i||a!==s)&&(this._current=new Date(i,s-1,1),this._dispatchMonthChange(i,s),this.requestUpdate())}}}_ensureEventsFromJson(){const e=(this.eventsJson??"").trim();if(!e){this._eventsFromJson=null,this._eventsJsonLast=e;return}if(!(this._eventsJsonLast===e&&this._eventsFromJson!==null)){this._eventsJsonLast=e;try{const t=JSON.parse(e);Array.isArray(t)?this._eventsFromJson=t:this._eventsFromJson=[]}catch{this._eventsFromJson=[]}}}_getEventInputs(){return Array.isArray(this.events)?this.events:(this._ensureEventsFromJson(),this._eventsFromJson!==null?this._eventsFromJson:null)}_normalizeEventInput(e){const t=e.title??"",i=e.description??"",s=e.href??"",r=e.startDate??e["start-date"]??e.start??e.date??"",a=e.endDate??e["end-date"]??e.end??"";return{title:t+"",description:i?i+"":void 0,href:s?s+"":void 0,start:r?r+"":void 0,end:a?a+"":void 0}}_toLocalEventDate(e,t){const i=(e??"").trim();if(!i)return null;if(!i.includes("T")){const r=i.split("-").map(d=>Number(d));if(r.length!==3||r.some(d=>Number.isNaN(d)))return null;const[a,o,l]=r;return t?new Date(a,o-1,l,23,59,59,999):new Date(a,o-1,l,0,0,0,0)}const s=new Date(i);return Number.isNaN(s.getTime())?null:s}_toDateKey(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}_buildEventMapFromInputs(e){const t=new Map;for(const i of e){const s=this._normalizeEventInput(i),r=s.start||"",a=s.end||"";if(!(!r||!s.title))if(r&&a){const o=this._toLocalEventDate(r,!1),l=this._toLocalEventDate(a,!0);if(!o||!l)continue;if(l<o){const d=r.split("T")[0],p=t.get(d)||[];p.push({title:s.title,description:s.description,href:s.href,start:r,end:a}),t.set(d,p);continue}for(let d=new Date(o);d<=l;d.setDate(d.getDate()+1)){const p=this._toDateKey(d),b=t.get(p)||[];b.push({title:s.title,description:s.description,href:s.href,start:r,end:a}),t.set(p,b)}}else{const o=r.split("T")[0],l=t.get(o)||[];l.push({title:s.title,description:s.description,href:s.href,start:r}),t.set(o,l)}}return t}_buildEventMapFromChildren(){const e=Array.from(this.querySelectorAll("scb-calendar-event")),t=new Map;for(const i of e){const s=i,r=(s.startDate??s.date??"")+""||i.getAttribute("start-date")||i.getAttribute("date")||"",a=(s.endDate??"")+""||i.getAttribute("end-date")||"";if(r&&a){const o=this._toLocalEventDate(r,!1),l=this._toLocalEventDate(a,!0);if(!o||!l)continue;if(l<o){const d=r.split("T")[0],p=t.get(d)||[];p.push({title:i.title??"",description:i.description,href:s.href||i.getAttribute("href")||void 0,start:r,end:a}),t.set(d,p);continue}for(let d=new Date(o);d<=l;d.setDate(d.getDate()+1)){const p=this._toDateKey(d),b=t.get(p)||[];b.push({title:i.title??"",description:i.description,href:s.href||i.getAttribute("href")||void 0,start:r,end:a}),t.set(p,b)}}else if(r&&i.title){const o=r.split("T")[0],l=t.get(o)||[];l.push({title:i.title,description:i.description,href:s.href||i.getAttribute("href")||void 0,start:r}),t.set(o,l)}}return t}_syncDisplayFromCurrent(e=!0){const t=this._current.getFullYear(),i=this._current.getMonth()+1;this._syncingDisplay=!0;try{this.displayYear=t,this.displayMonth=i}finally{this._syncingDisplay=!1}e&&this._dispatchMonthChange(t,i)}_dispatchMonthChange(e,t){const i={displayYear:e,displayMonth:t};this.dispatchEvent(new CustomEvent("scb-calendar-month-change",{bubbles:!0,composed:!0,detail:i})),this.dispatchEvent(new CustomEvent("scbcalendarmonthchange",{bubbles:!0,composed:!0,detail:i}))}_dispatchSelect(e){const t={selectedDate:e};this.dispatchEvent(new CustomEvent("scb-calendar-select",{bubbles:!0,composed:!0,detail:t})),this.dispatchEvent(new CustomEvent("scbcalendarselect",{bubbles:!0,composed:!0,detail:t}))}_daysInMonth(e,t){return new Date(e,t+1,0).getDate()}_firstDayOfWeek(e,t){const i=new Date(e,t,1).getDay();return i===0?6:i-1}_prevMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()-1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_nextMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()+1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_showEventPopup(e){var t;this._popupEvent=e,this.selectedDate=e.date,this._dispatchSelect(e.date),this._lastActiveDay=((t=this.shadowRoot)==null?void 0:t.activeElement)||document.activeElement,this.requestUpdate(),this.updateComplete.then(()=>{var s;const i=(s=this.shadowRoot)==null?void 0:s.querySelector("scb-dialog");i&&(document.activeElement&&(i.__lastTriggerEl=document.activeElement),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.open=!0})}),i.addEventListener("close",this._handleDialogClose,{once:!0}))})}_addDays(e,t){const i=new Date(e.valueOf());return i.setDate(i.getDate()+t),i}_easterDay(e){if(typeof this._easterDateCalculated["Ar"+e]<"u")return new Date(this._easterDateCalculated["Ar"+e]);let t=e;t<100&&(t=t+1900),t<1950&&(t=t+100);const i=t%19,s=t%4,r=t%7,a=(19*i+24)%30,o=(2*s+4*r+6*a+5)%7;let l=22+a+o,d=0;l==57&&(l-=7),l==56&&a==28&&o==6&&i>10&&(l-=7),l>31?(l-=31,d=4):d=3;const p=new Date(t,d-1,l);return this._easterDateCalculated["Ar"+e]=p,new Date(this._easterDateCalculated["Ar"+e])}_swedishHolidayName(e){const t=e.getMonth();if(t===1||t===6||t===7||t===8)return null;const i=e.getMonth()+1,s=e.getDate(),r=e.getFullYear(),a=this._easterDay(r),o=this.lang==="en",l=[["Nyårsdagen","New Year's Day",i===1&&s===1],["Trettondedag jul","Epiphany",i===1&&s===6],["Långfredag","Good Friday",+e==+this._addDays(a,-2)],["Påskdagen","Easter Sunday",+e==+a],["Annandag påsk","Easter Monday",+e==+this._addDays(a,1)],["Kristi himmelsfärdsdag","Ascension Day",+e==+this._addDays(a,39)],["Pingstdagen","Pentecost",+e==+this._addDays(a,50)&&r<2005],["Första maj","May Day",i===5&&s===1],["Nationaldagen","National Day",i===6&&s===6&&r>=2005],["Midsommarafton","Midsummer's Eve",i===6&&s>=19&&s<=25&&e.getDay()===5],["Midsommardagen","Midsummer's Day",i===6&&s>=20&&s<=26&&e.getDay()===6],["Julafton","Christmas Eve",i===12&&s===24],["Juldagen","Christmas Day",i===12&&s===25],["Annandag jul","Boxing Day",i===12&&s===26],["Alla helgons dag","All Saints' Day",i===10&&s>=31&&e.getDay()===6||i===11&&s<=6&&e.getDay()===6]];for(const d of l){const[p,b,u]=d;if(u)return o?b:p}return null}render(){const e=this._current.getFullYear(),t=this._current.getMonth(),i=this._daysInMonth(e,t),s=this._firstDayOfWeek(e,t),r=this._today,a=this.lang==="en",o=a?["January","February","March","April","May","June","July","August","September","October","November","December"]:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"];let l=a?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(l=l.slice(0,5));const d=this._getEventInputs(),p=d?this._buildEventMapFromInputs(d):this._buildEventMapFromChildren(),b=[];let u=1;for(let f=0;f<6;f++){const v=[],x=this.disableWeekend?[0,1,2,3,4]:[0,1,2,3,4,5,6];let k=u;for(let z=0;z<x.length;z++){const $=x[z];if(f===0&&$<s){if(!this.disableWeekend||$<5){const S=t===0?11:t-1,E=t===0?e-1:e,O=this._daysInMonth(E,S)-(s-$-1);v.push(c`
5181
+ `,re([n({type:Boolean,reflect:!0})],ee.prototype,"open",2),re([n({type:String,attribute:"max-w",reflect:!0})],ee.prototype,"maxW",2),re([n({type:String,attribute:"max-h",reflect:!0})],ee.prototype,"maxH",2),re([n({type:Number,attribute:"z-index",reflect:!0})],ee.prototype,"zIndex",2),re([n({type:Boolean,attribute:!1})],ee.prototype,"inSb",2),re([n({type:Boolean,attribute:"scrim-close"})],ee.prototype,"scrimClose",2),re([n({type:String,reflect:!0})],ee.prototype,"spacing",2),re([n({type:String,attribute:"spacing-top",reflect:!0})],ee.prototype,"spacingTop",2),re([n({type:String,attribute:"spacing-bottom",reflect:!0})],ee.prototype,"spacingBottom",2),re([n({type:String,attribute:"spacing-left",reflect:!0})],ee.prototype,"spacingLeft",2),re([n({type:String,attribute:"spacing-right",reflect:!0})],ee.prototype,"spacingRight",2),re([n({type:String})],ee.prototype,"variant",2),re([n({type:String})],ee.prototype,"label",2),re([n({type:String})],ee.prototype,"icon",2),re([n({type:String,attribute:"supporting-text"})],ee.prototype,"supportingText",2),re([n({type:String,attribute:"ok-button"})],ee.prototype,"okButton",2),re([n({type:String,attribute:"cancel-button"})],ee.prototype,"cancelButton",2),re([n({type:String,attribute:"delete-button"})],ee.prototype,"deleteButton",2),re([n({type:String,attribute:"confirm-button"})],ee.prototype,"confirmButton",2),re([n({type:String,attribute:"deny-button"})],ee.prototype,"denyButton",2),re([n({type:String,attribute:"reset-button"})],ee.prototype,"resetButton",2),re([n({type:String,attribute:"submit-button"})],ee.prototype,"submitButton",2),re([n({type:String,attribute:"form-id"})],ee.prototype,"formId",2),re([n({type:String,attribute:"form-action"})],ee.prototype,"formAction",2),re([n({type:String,attribute:"form-method"})],ee.prototype,"formMethod",2),ee=re([y("scb-dialog")],ee);var lv=Object.defineProperty,cv=Object.getOwnPropertyDescriptor,Dp=e=>{throw TypeError(e)},wt=(e,t,i,s)=>{for(var r=s>1?void 0:s?cv(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&lv(t,i,r),r},dv=(e,t,i)=>t.has(e)||Dp("Cannot "+i),pv=(e,t,i)=>t.has(e)?Dp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Op=(e,t,i)=>(dv(e,t,"access private method"),i),No,Jl;let Ze=class extends _{constructor(){super(...arguments),pv(this,No),this._lastActiveDay=null,this.lang="sv",this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate="",this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=e=>{var d,p;const i=Array.from(((d=this.shadowRoot)==null?void 0:d.querySelectorAll(".calendar-day.has-event"))??[]),s=(p=this.shadowRoot)==null?void 0:p.activeElement,r=s&&i.includes(s)?s:document.activeElement,a=i.indexOf(r);if(a===-1)return;let o=a;const l=this.disableWeekend?5:7;switch(e.key){case"ArrowRight":o=a+1<i.length?a+1:a;break;case"ArrowLeft":o=a-1>=0?a-1:a;break;case"ArrowDown":o=a+l<i.length?a+l:a;break;case"ArrowUp":o=a-l>=0?a-l:a;break;default:return}o!==a&&(e.preventDefault(),i[o].focus())},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{var e;(e=this._lastActiveDay)==null||e.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(e){const t=(e??"")+"";t!==this.selectedDate&&(this.selectedDate=t)}static get observedAttributes(){return[...super.observedAttributes??[],"value"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e==="value"&&(this.value=i??"")}connectedCallback(){super.connectedCallback(),Op(this,No,Jl).call(this);const e=Number(this.displayYear),t=Number(this.displayMonth);!Number.isNaN(e)&&!Number.isNaN(t)&&t>=1&&t<=12&&(this._current=new Date(e,t-1,1)),this._syncDisplayFromCurrent(!1),this.addEventListener("change",this._onEventChanged),this._mutationObserver=new MutationObserver(()=>{this.requestUpdate()}),this._mutationObserver.observe(this,{childList:!0}),this.addEventListener("keydown",this._onCalendarKeyDown)}disconnectedCallback(){this.removeEventListener("change",this._onEventChanged),super.disconnectedCallback(),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null),this.removeEventListener("keydown",this._onCalendarKeyDown)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}updated(e){var t;if((t=super.updated)==null||t.call(this,e),e.has("eventsJson")&&(this._eventsJsonLast=void 0,this._eventsFromJson=null),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&Op(this,No,Jl).call(this),!this._syncingDisplay&&(e.has("displayYear")||e.has("displayMonth"))){const i=Number(this.displayYear),s=Number(this.displayMonth);if(!Number.isNaN(i)&&!Number.isNaN(s)&&s>=1&&s<=12){const r=this._current.getFullYear(),a=this._current.getMonth()+1;(r!==i||a!==s)&&(this._current=new Date(i,s-1,1),this._dispatchMonthChange(i,s),this.requestUpdate())}}}_ensureEventsFromJson(){const e=(this.eventsJson??"").trim();if(!e){this._eventsFromJson=null,this._eventsJsonLast=e;return}if(!(this._eventsJsonLast===e&&this._eventsFromJson!==null)){this._eventsJsonLast=e;try{const t=JSON.parse(e);Array.isArray(t)?this._eventsFromJson=t:this._eventsFromJson=[]}catch{this._eventsFromJson=[]}}}_getEventInputs(){return Array.isArray(this.events)?this.events:(this._ensureEventsFromJson(),this._eventsFromJson!==null?this._eventsFromJson:null)}_normalizeEventInput(e){const t=e.title??"",i=e.description??"",s=e.href??"",r=e.startDate??e["start-date"]??e.start??e.date??"",a=e.endDate??e["end-date"]??e.end??"";return{title:t+"",description:i?i+"":void 0,href:s?s+"":void 0,start:r?r+"":void 0,end:a?a+"":void 0}}_toLocalEventDate(e,t){const i=(e??"").trim();if(!i)return null;if(!i.includes("T")){const r=i.split("-").map(d=>Number(d));if(r.length!==3||r.some(d=>Number.isNaN(d)))return null;const[a,o,l]=r;return t?new Date(a,o-1,l,23,59,59,999):new Date(a,o-1,l,0,0,0,0)}const s=new Date(i);return Number.isNaN(s.getTime())?null:s}_toDateKey(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}_buildEventMapFromInputs(e){const t=new Map;for(const i of e){const s=this._normalizeEventInput(i),r=s.start||"",a=s.end||"";if(!(!r||!s.title))if(r&&a){const o=this._toLocalEventDate(r,!1),l=this._toLocalEventDate(a,!0);if(!o||!l)continue;if(l<o){const d=r.split("T")[0],p=t.get(d)||[];p.push({title:s.title,description:s.description,href:s.href,start:r,end:a}),t.set(d,p);continue}for(let d=new Date(o);d<=l;d.setDate(d.getDate()+1)){const p=this._toDateKey(d),b=t.get(p)||[];b.push({title:s.title,description:s.description,href:s.href,start:r,end:a}),t.set(p,b)}}else{const o=r.split("T")[0],l=t.get(o)||[];l.push({title:s.title,description:s.description,href:s.href,start:r}),t.set(o,l)}}return t}_buildEventMapFromChildren(){const e=Array.from(this.querySelectorAll("scb-calendar-event")),t=new Map;for(const i of e){const s=i,r=(s.startDate??s.date??"")+""||i.getAttribute("start-date")||i.getAttribute("date")||"",a=(s.endDate??"")+""||i.getAttribute("end-date")||"";if(r&&a){const o=this._toLocalEventDate(r,!1),l=this._toLocalEventDate(a,!0);if(!o||!l)continue;if(l<o){const d=r.split("T")[0],p=t.get(d)||[];p.push({title:i.title??"",description:i.description,href:s.href||i.getAttribute("href")||void 0,start:r,end:a}),t.set(d,p);continue}for(let d=new Date(o);d<=l;d.setDate(d.getDate()+1)){const p=this._toDateKey(d),b=t.get(p)||[];b.push({title:i.title??"",description:i.description,href:s.href||i.getAttribute("href")||void 0,start:r,end:a}),t.set(p,b)}}else if(r&&i.title){const o=r.split("T")[0],l=t.get(o)||[];l.push({title:i.title,description:i.description,href:s.href||i.getAttribute("href")||void 0,start:r}),t.set(o,l)}}return t}_syncDisplayFromCurrent(e=!0){const t=this._current.getFullYear(),i=this._current.getMonth()+1;this._syncingDisplay=!0;try{this.displayYear=t,this.displayMonth=i}finally{this._syncingDisplay=!1}e&&this._dispatchMonthChange(t,i)}_dispatchMonthChange(e,t){const i={displayYear:e,displayMonth:t};this.dispatchEvent(new CustomEvent("scb-calendar-month-change",{bubbles:!0,composed:!0,detail:i})),this.dispatchEvent(new CustomEvent("scbcalendarmonthchange",{bubbles:!0,composed:!0,detail:i}))}_dispatchSelect(e){const t={selectedDate:e};this.dispatchEvent(new CustomEvent("scb-calendar-select",{bubbles:!0,composed:!0,detail:t})),this.dispatchEvent(new CustomEvent("scbcalendarselect",{bubbles:!0,composed:!0,detail:t}))}_daysInMonth(e,t){return new Date(e,t+1,0).getDate()}_firstDayOfWeek(e,t){const i=new Date(e,t,1).getDay();return i===0?6:i-1}_prevMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()-1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_nextMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()+1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_showEventPopup(e){var t;this._popupEvent=e,this.selectedDate=e.date,this._dispatchSelect(e.date),this._lastActiveDay=((t=this.shadowRoot)==null?void 0:t.activeElement)||document.activeElement,this.requestUpdate(),this.updateComplete.then(()=>{var s;const i=(s=this.shadowRoot)==null?void 0:s.querySelector("scb-dialog");i&&(document.activeElement&&(i.__lastTriggerEl=document.activeElement),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.open=!0})}),i.addEventListener("close",this._handleDialogClose,{once:!0}))})}_addDays(e,t){const i=new Date(e.valueOf());return i.setDate(i.getDate()+t),i}_easterDay(e){if(typeof this._easterDateCalculated["Ar"+e]<"u")return new Date(this._easterDateCalculated["Ar"+e]);let t=e;t<100&&(t=t+1900),t<1950&&(t=t+100);const i=t%19,s=t%4,r=t%7,a=(19*i+24)%30,o=(2*s+4*r+6*a+5)%7;let l=22+a+o,d=0;l==57&&(l-=7),l==56&&a==28&&o==6&&i>10&&(l-=7),l>31?(l-=31,d=4):d=3;const p=new Date(t,d-1,l);return this._easterDateCalculated["Ar"+e]=p,new Date(this._easterDateCalculated["Ar"+e])}_swedishHolidayName(e){const t=e.getMonth();if(t===1||t===6||t===7||t===8)return null;const i=e.getMonth()+1,s=e.getDate(),r=e.getFullYear(),a=this._easterDay(r),o=this.lang==="en",l=[["Nyårsdagen","New Year's Day",i===1&&s===1],["Trettondedag jul","Epiphany",i===1&&s===6],["Långfredag","Good Friday",+e==+this._addDays(a,-2)],["Påskdagen","Easter Sunday",+e==+a],["Annandag påsk","Easter Monday",+e==+this._addDays(a,1)],["Kristi himmelsfärdsdag","Ascension Day",+e==+this._addDays(a,39)],["Pingstdagen","Pentecost",+e==+this._addDays(a,50)&&r<2005],["Första maj","May Day",i===5&&s===1],["Nationaldagen","National Day",i===6&&s===6&&r>=2005],["Midsommarafton","Midsummer's Eve",i===6&&s>=19&&s<=25&&e.getDay()===5],["Midsommardagen","Midsummer's Day",i===6&&s>=20&&s<=26&&e.getDay()===6],["Julafton","Christmas Eve",i===12&&s===24],["Juldagen","Christmas Day",i===12&&s===25],["Annandag jul","Boxing Day",i===12&&s===26],["Alla helgons dag","All Saints' Day",i===10&&s>=31&&e.getDay()===6||i===11&&s<=6&&e.getDay()===6]];for(const d of l){const[p,b,u]=d;if(u)return o?b:p}return null}render(){const e=this._current.getFullYear(),t=this._current.getMonth(),i=this._daysInMonth(e,t),s=this._firstDayOfWeek(e,t),r=this._today,a=this.lang==="en",o=a?["January","February","March","April","May","June","July","August","September","October","November","December"]:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"];let l=a?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(l=l.slice(0,5));const d=this._getEventInputs(),p=d?this._buildEventMapFromInputs(d):this._buildEventMapFromChildren(),b=[];let u=1;for(let f=0;f<6;f++){const v=[],x=this.disableWeekend?[0,1,2,3,4]:[0,1,2,3,4,5,6];let k=u;for(let z=0;z<x.length;z++){const $=x[z];if(f===0&&$<s){if(!this.disableWeekend||$<5){const S=t===0?11:t-1,E=t===0?e-1:e,O=this._daysInMonth(E,S)-(s-$-1);v.push(c`
5179
5182
  <div class="calendar-day calendar-day--other">
5180
5183
  <span class="calendar-day-number">${O}</span>
5181
5184
  </div>
@@ -5342,7 +5345,7 @@
5342
5345
  gap: var(--spacing-4);
5343
5346
  }
5344
5347
 
5345
- `,wt([n({type:String})],Ze.prototype,"lang",2),wt([n({type:Boolean,attribute:"disable-weekend"})],Ze.prototype,"disableWeekend",2),wt([n({type:Boolean,attribute:"public-holidays"})],Ze.prototype,"publicHolidays",2),wt([n({type:Number,attribute:"display-year",reflect:!0})],Ze.prototype,"displayYear",2),wt([n({type:Number,attribute:"display-month",reflect:!0})],Ze.prototype,"displayMonth",2),wt([n({type:String,attribute:"selected-date",reflect:!0})],Ze.prototype,"selectedDate",2),wt([n({attribute:!1})],Ze.prototype,"events",2),wt([n({type:String,attribute:"events-json"})],Ze.prototype,"eventsJson",2),wt([n({type:String,reflect:!0})],Ze.prototype,"spacing",2),wt([n({type:String,attribute:"spacing-top",reflect:!0})],Ze.prototype,"spacingTop",2),wt([n({type:String,attribute:"spacing-bottom",reflect:!0})],Ze.prototype,"spacingBottom",2),wt([n({type:String,attribute:"spacing-left",reflect:!0})],Ze.prototype,"spacingLeft",2),wt([n({type:String,attribute:"spacing-right",reflect:!0})],Ze.prototype,"spacingRight",2),Ze=wt([y("scb-calendar")],Ze);var hv=Object.defineProperty,uv=Object.getOwnPropertyDescriptor,Fp=e=>{throw TypeError(e)},re=(e,t,i,s)=>{for(var r=s>1?void 0:s?uv(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&hv(t,i,r),r},bv=(e,t,i)=>t.has(e)||Fp("Cannot "+i),mv=(e,t,i)=>t.has(e)?Fp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Zl=(e,t,i)=>(bv(e,t,"access private method"),i),ba,Bp,Ql;let W=class extends _{constructor(){super(...arguments),mv(this,ba),this.variant="default",this.size="medium",this.date=null,this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="stretch",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}async firstUpdated(){W.__iconLoaded||(await Promise.resolve().then(()=>yi),W.__iconLoaded=!0),W.__rippleLoaded||(await Promise.resolve().then(()=>Da),W.__rippleLoaded=!0),this.__applyInnerSizing(),Zl(this,ba,Ql).call(this)}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",t=this.direction?`${this.direction.toLowerCase()}`:"",i=this.cardHref?"clickable":"",{day:s,month:r}=Zl(this,ba,Bp).call(this),a=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",o=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",l=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",d=`${a?`inline-size:${a};`:""}${o?`block-size:${o};`:""}${l?`aspect-ratio:${l};`:""}`;return c`
5348
+ `,wt([n({type:String})],Ze.prototype,"lang",2),wt([n({type:Boolean,attribute:"disable-weekend"})],Ze.prototype,"disableWeekend",2),wt([n({type:Boolean,attribute:"public-holidays"})],Ze.prototype,"publicHolidays",2),wt([n({type:Number,attribute:"display-year",reflect:!0})],Ze.prototype,"displayYear",2),wt([n({type:Number,attribute:"display-month",reflect:!0})],Ze.prototype,"displayMonth",2),wt([n({type:String,attribute:"selected-date",reflect:!0})],Ze.prototype,"selectedDate",2),wt([n({attribute:!1})],Ze.prototype,"events",2),wt([n({type:String,attribute:"events-json"})],Ze.prototype,"eventsJson",2),wt([n({type:String,reflect:!0})],Ze.prototype,"spacing",2),wt([n({type:String,attribute:"spacing-top",reflect:!0})],Ze.prototype,"spacingTop",2),wt([n({type:String,attribute:"spacing-bottom",reflect:!0})],Ze.prototype,"spacingBottom",2),wt([n({type:String,attribute:"spacing-left",reflect:!0})],Ze.prototype,"spacingLeft",2),wt([n({type:String,attribute:"spacing-right",reflect:!0})],Ze.prototype,"spacingRight",2),Ze=wt([y("scb-calendar")],Ze);var hv=Object.defineProperty,uv=Object.getOwnPropertyDescriptor,Fp=e=>{throw TypeError(e)},ae=(e,t,i,s)=>{for(var r=s>1?void 0:s?uv(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&hv(t,i,r),r},bv=(e,t,i)=>t.has(e)||Fp("Cannot "+i),mv=(e,t,i)=>t.has(e)?Fp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Zl=(e,t,i)=>(bv(e,t,"access private method"),i),ba,Bp,Ql;let W=class extends _{constructor(){super(...arguments),mv(this,ba),this.variant="default",this.size="medium",this.date=null,this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="stretch",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}async firstUpdated(){W.__iconLoaded||(await Promise.resolve().then(()=>yi),W.__iconLoaded=!0),W.__rippleLoaded||(await Promise.resolve().then(()=>Da),W.__rippleLoaded=!0),this.__applyInnerSizing(),Zl(this,ba,Ql).call(this)}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",t=this.direction?`${this.direction.toLowerCase()}`:"",i=this.cardHref?"clickable":"",{day:s,month:r}=Zl(this,ba,Bp).call(this),a=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",o=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",l=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",d=`${a?`inline-size:${a};`:""}${o?`block-size:${o};`:""}${l?`aspect-ratio:${l};`:""}`;return c`
5346
5349
  <div
5347
5350
  class="calendar-card ${t} ${i} ${e}"
5348
5351
  role="${this.cardHref?"link":"group"}"
@@ -5683,7 +5686,7 @@
5683
5686
  overflow: visible;
5684
5687
  text-overflow: clip;
5685
5688
  }
5686
- `,re([n({type:String,reflect:!0})],W.prototype,"variant",2),re([n({type:String,reflect:!0})],W.prototype,"size",2),re([n({type:String,attribute:"date"})],W.prototype,"date",2),re([n({type:String,reflect:!0})],W.prototype,"direction",2),re([n({type:String,reflect:!0})],W.prototype,"title",2),re([n({type:String,reflect:!0})],W.prototype,"subtitle",2),re([n({type:String,attribute:"supporting-text",reflect:!0})],W.prototype,"supportingText",2),re([n({type:String,attribute:"card-href"})],W.prototype,"cardHref",2),re([n({type:String,attribute:"card-href-nav"})],W.prototype,"cardHrefNav",2),re([n({type:Boolean,reflect:!0,attribute:"show-media"})],W.prototype,"showMedia",2),re([n({type:String,attribute:"media-width"})],W.prototype,"mediaWidth",2),re([n({type:String,attribute:"media-height"})],W.prototype,"mediaHeight",2),re([n({type:String,attribute:"media-aspect"})],W.prototype,"mediaAspect",2),re([n({type:String,reflect:!0})],W.prototype,"width",2),re([n({type:String,reflect:!0,attribute:"max-width"})],W.prototype,"maxWidth",2),re([n({type:String,attribute:"min-width"})],W.prototype,"minWidth",2),re([n({type:String,reflect:!0})],W.prototype,"height",2),re([n({type:String,reflect:!0,attribute:"max-height"})],W.prototype,"maxHeight",2),re([n({type:String,attribute:"min-height"})],W.prototype,"minHeight",2),re([n({type:String,reflect:!0})],W.prototype,"sizing",2),re([n({type:String,reflect:!0})],W.prototype,"spacing",2),re([n({type:String,attribute:"spacing-top",reflect:!0})],W.prototype,"spacingTop",2),re([n({type:String,attribute:"spacing-bottom",reflect:!0})],W.prototype,"spacingBottom",2),re([n({type:String,attribute:"spacing-left",reflect:!0})],W.prototype,"spacingLeft",2),re([n({type:String,attribute:"spacing-right",reflect:!0})],W.prototype,"spacingRight",2),W=re([y("scb-calendar-card")],W);/**
5689
+ `,ae([n({type:String,reflect:!0})],W.prototype,"variant",2),ae([n({type:String,reflect:!0})],W.prototype,"size",2),ae([n({type:String,attribute:"date"})],W.prototype,"date",2),ae([n({type:String,reflect:!0})],W.prototype,"direction",2),ae([n({type:String,reflect:!0})],W.prototype,"title",2),ae([n({type:String,reflect:!0})],W.prototype,"subtitle",2),ae([n({type:String,attribute:"supporting-text",reflect:!0})],W.prototype,"supportingText",2),ae([n({type:String,attribute:"card-href"})],W.prototype,"cardHref",2),ae([n({type:String,attribute:"card-href-nav"})],W.prototype,"cardHrefNav",2),ae([n({type:Boolean,reflect:!0,attribute:"show-media"})],W.prototype,"showMedia",2),ae([n({type:String,attribute:"media-width"})],W.prototype,"mediaWidth",2),ae([n({type:String,attribute:"media-height"})],W.prototype,"mediaHeight",2),ae([n({type:String,attribute:"media-aspect"})],W.prototype,"mediaAspect",2),ae([n({type:String,reflect:!0})],W.prototype,"width",2),ae([n({type:String,reflect:!0,attribute:"max-width"})],W.prototype,"maxWidth",2),ae([n({type:String,attribute:"min-width"})],W.prototype,"minWidth",2),ae([n({type:String,reflect:!0})],W.prototype,"height",2),ae([n({type:String,reflect:!0,attribute:"max-height"})],W.prototype,"maxHeight",2),ae([n({type:String,attribute:"min-height"})],W.prototype,"minHeight",2),ae([n({type:String,reflect:!0})],W.prototype,"sizing",2),ae([n({type:String,reflect:!0})],W.prototype,"spacing",2),ae([n({type:String,attribute:"spacing-top",reflect:!0})],W.prototype,"spacingTop",2),ae([n({type:String,attribute:"spacing-bottom",reflect:!0})],W.prototype,"spacingBottom",2),ae([n({type:String,attribute:"spacing-left",reflect:!0})],W.prototype,"spacingLeft",2),ae([n({type:String,attribute:"spacing-right",reflect:!0})],W.prototype,"spacingRight",2),W=ae([y("scb-calendar-card")],W);/**
5687
5690
  * @license
5688
5691
  * Copyright 2017 Google LLC
5689
5692
  * SPDX-License-Identifier: BSD-3-Clause
@@ -5878,13 +5881,13 @@
5878
5881
  gap: var(--spacing-3);
5879
5882
  align-self: stretch;
5880
5883
  }
5881
- `,zi([n({type:String,reflect:!0})],Kt.prototype,"variant",2),zi([n({type:Boolean,reflect:!0})],Kt.prototype,"arrow",2),zi([n({type:String,attribute:"supporting-text"})],Kt.prototype,"supportingtext",2),zi([n({type:String})],Kt.prototype,"label",2),zi([n({type:String,reflect:!0})],Kt.prototype,"trigger",2),zi([n({type:String,reflect:!0})],Kt.prototype,"position",2),zi([n({type:Boolean,reflect:!0})],Kt.prototype,"open",2),zi([n({type:Number,reflect:!0})],Kt.prototype,"delay",2),zi([n({type:Number,reflect:!0})],Kt.prototype,"offset",2),Kt=zi([y("scb-tooltip")],Kt);var yv=Object.defineProperty,_v=Object.getOwnPropertyDescriptor,Np=e=>{throw TypeError(e)},L=(e,t,i,s)=>{for(var r=s>1?void 0:s?_v(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&yv(t,i,r),r},xv=(e,t,i)=>t.has(e)||Np("Cannot "+i),wv=(e,t,i)=>t.has(e)?Np("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),qo=(e,t,i)=>(xv(e,t,"access private method"),i),gr,ec,tc;const he={fromAttribute:e=>e??"",toAttribute:e=>typeof e!="string"||e.trim()===""?null:e};let T=class extends _{constructor(){super(...arguments),wv(this,gr),this.__managedSocialAttributes=new Set(["social-comments-text","social-comments","social-comments-href","social-likes-text","social-likes","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href"]),this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size="large",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.href="",this.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.likesText="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.editEnabled=!1,this.deleteEnabled=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=e=>{const t=e.currentTarget.closest(".media");t&&t.classList.add("is-loaded")},this.__onKeyDown=e=>{const t=this.__effectiveHref();(e.key==="Enter"||e.key===" ")&&t&&(e.preventDefault(),this.__navigate(t,e))},this.__handleHrefNavigation=e=>{const t=this.__effectiveHref();t&&(e.target.closest("a")||this.__navigate(t,e))}}attributeChangedCallback(e,t,i){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(e)||super.attributeChangedCallback(e,t,i)}get likeButton(){return this.type!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(e){const t=(e||"").trim();if(!t)return{w:640,h:360};const i=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(i&&i.length===2){const r=Number(i[0]),a=Number(i[1]);if(r>0&&a>0)return{w:r,h:a}}const s=Number(t);return isFinite(s)&&s>0?{w:1e3,h:Math.round(1e3/s)}:{w:640,h:360}}__noWrapText(e){return(e??"").replace(/ /g," ").replace(/-/g,"‑")}__dispatchLikeEvent(e,t){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:t})),this.dispatchEvent(new CustomEvent(e.replace("-",""),{bubbles:!0,composed:!0,detail:t}))}__dispatchSocialActionEvent(e,t){this.dispatchEvent(new CustomEvent(`social-${e}`,{bubbles:!0,composed:!0,detail:{action:e,originalEvent:t}}))}__dispatchCardNavigate(e,t){const i={href:e,originalEvent:t},s=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});if(this.dispatchEvent(s),s.defaultPrevented)return!1;const r=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});return this.dispatchEvent(r),!r.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__navigate(e,t){e&&this.__dispatchCardNavigate(e,t)&&window.open(e,"_self")}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return c`
5884
+ `,zi([n({type:String,reflect:!0})],Kt.prototype,"variant",2),zi([n({type:Boolean,reflect:!0})],Kt.prototype,"arrow",2),zi([n({type:String,attribute:"supporting-text"})],Kt.prototype,"supportingtext",2),zi([n({type:String})],Kt.prototype,"label",2),zi([n({type:String,reflect:!0})],Kt.prototype,"trigger",2),zi([n({type:String,reflect:!0})],Kt.prototype,"position",2),zi([n({type:Boolean,reflect:!0})],Kt.prototype,"open",2),zi([n({type:Number,reflect:!0})],Kt.prototype,"delay",2),zi([n({type:Number,reflect:!0})],Kt.prototype,"offset",2),Kt=zi([y("scb-tooltip")],Kt);var yv=Object.defineProperty,_v=Object.getOwnPropertyDescriptor,Np=e=>{throw TypeError(e)},L=(e,t,i,s)=>{for(var r=s>1?void 0:s?_v(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&yv(t,i,r),r},xv=(e,t,i)=>t.has(e)||Np("Cannot "+i),wv=(e,t,i)=>t.has(e)?Np("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),qo=(e,t,i)=>(xv(e,t,"access private method"),i),gr,ec,tc;const he={fromAttribute:e=>e??"",toAttribute:e=>typeof e!="string"||e.trim()===""?null:e};let T=class extends _{constructor(){super(...arguments),wv(this,gr),this.__managedSocialAttributes=new Set(["social-comments-text","social-comments","social-comments-href","social-likes-text","social-likes","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href"]),this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size="large",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.href="",this.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.likesText="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.editEnabled=!1,this.deleteEnabled=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=e=>{const t=e.currentTarget.closest(".media");t&&t.classList.add("is-loaded")},this.__onKeyDown=e=>{const t=this.__effectiveHref();(e.key==="Enter"||e.key===" ")&&t&&(e.preventDefault(),this.__navigate(t,e))},this.__handleHrefNavigation=e=>{const t=this.__effectiveHref();t&&(e.target.closest("a")||this.__navigate(t,e))}}attributeChangedCallback(e,t,i){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(e)||super.attributeChangedCallback(e,t,i)}get likeButton(){return this.type!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(e){const t=(e||"").trim();if(!t)return{w:600,h:400};const i=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(i&&i.length===2){const r=Number(i[0]),a=Number(i[1]);if(r>0&&a>0)return{w:r,h:a}}const s=Number(t);return isFinite(s)&&s>0?{w:1e3,h:Math.round(1e3/s)}:{w:600,h:400}}__noWrapText(e){return(e??"").replace(/ /g," ").replace(/-/g,"‑")}__dispatchLikeEvent(e,t){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:t})),this.dispatchEvent(new CustomEvent(e.replace("-",""),{bubbles:!0,composed:!0,detail:t}))}__dispatchSocialActionEvent(e,t){this.dispatchEvent(new CustomEvent(`social-${e}`,{bubbles:!0,composed:!0,detail:{action:e,originalEvent:t}}))}__dispatchCardNavigate(e,t){const i={href:e,originalEvent:t},s=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});if(this.dispatchEvent(s),s.defaultPrevented)return!1;const r=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});return this.dispatchEvent(r),!r.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__navigate(e,t){e&&this.__dispatchCardNavigate(e,t)&&window.open(e,"_self")}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return c`
5882
5885
  <div class="media">
5883
5886
  <slot name="media">
5884
5887
  <scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
5885
5888
  </slot>
5886
5889
  </div>
5887
- `;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,i=Number(this.mediaHeight)||0;const s=(this.mediaAspect||"").trim();if(!t||!i){const o=this.__calcAspectWH(s||"16/9");t||(t=o.w),i||(i=o.h)}const r=`aspect-ratio:${s||`${t}/${i}`};`,a=this.mediaPlaceholder?"has-ph":"";return c`
5890
+ `;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,i=Number(this.mediaHeight)||0;const s=(this.mediaAspect||"").trim();if(!t||!i){const o=this.__calcAspectWH(s||"3/2");t||(t=o.w),i||(i=o.h)}const r=`aspect-ratio:${s||`${t}/${i}`};`,a=this.mediaPlaceholder?"has-ph":"";return c`
5888
5891
  <div class="media ${a}" style="${r}">
5889
5892
  <slot name="media-sources"></slot>
5890
5893
  <img
@@ -6103,7 +6106,7 @@
6103
6106
  padding: var(--scb-card-focus-ring-gap, 4px);
6104
6107
  --scb-card-horizontal-media-max: 176px;
6105
6108
  --scb-card-horizontal-media-min: 96px;
6106
- --scb-card-horizontal-media-aspect: 16 / 9;
6109
+ --scb-card-horizontal-media-aspect: 3 / 2;
6107
6110
 
6108
6111
  margin-block-start: var(--scb-card-spacing-block-start, 0);
6109
6112
  margin-block-end: var(--scb-card-spacing-block-end, 0);
@@ -6451,6 +6454,7 @@
6451
6454
  }
6452
6455
  .header md-icon {
6453
6456
  flex: 0 0 auto;
6457
+ align-self: start;
6454
6458
  }
6455
6459
 
6456
6460
  .sub-label {
@@ -6507,7 +6511,7 @@
6507
6511
  .scb-card.horizontal .media img {
6508
6512
  margin: 0;
6509
6513
  object-fit: var(--scb-card-media-fit, cover);
6510
- aspect-ratio: var(--scb-card-horizontal-media-aspect, 16 / 9);
6514
+ aspect-ratio: var(--scb-card-horizontal-media-aspect, 3 / 2);
6511
6515
  inline-size: 100%;
6512
6516
  block-size: auto;
6513
6517
  }
@@ -6546,7 +6550,7 @@
6546
6550
  .scb-card.dynamic-direction .media img {
6547
6551
  margin: 0;
6548
6552
  object-fit: var(--scb-card-media-fit, cover);
6549
- aspect-ratio: var(--scb-card-horizontal-media-aspect, 16 / 9);
6553
+ aspect-ratio: var(--scb-card-horizontal-media-aspect, 3 / 2);
6550
6554
  inline-size: 100%;
6551
6555
  block-size: auto;
6552
6556
  }
@@ -10274,7 +10278,7 @@
10274
10278
  color: var(--md-sys-color-on-secondary-container);
10275
10279
  font-weight: 600;
10276
10280
  }
10277
- `,Dt([n({type:String})],lt.prototype,"label",2),Dt([n({type:String,attribute:"active-href"})],lt.prototype,"activeHref",2),Dt([n({type:Boolean,attribute:"activate-on-click"})],lt.prototype,"activateOnClick",2),Dt([n({type:Boolean,reflect:!0})],lt.prototype,"sticky",2),Dt([n({type:String,attribute:"sticky-top"})],lt.prototype,"stickyTop",2),Dt([n({type:Number,attribute:"sticky-z-index"})],lt.prototype,"stickyZIndex",2),Dt([n({type:String,attribute:"sticky-background"})],lt.prototype,"stickyBackground",2),Dt([n({type:String,reflect:!0})],lt.prototype,"spacing",2),Dt([n({type:String,attribute:"spacing-top",reflect:!0})],lt.prototype,"spacingTop",2),Dt([n({type:String,attribute:"spacing-bottom",reflect:!0})],lt.prototype,"spacingBottom",2),Dt([n({type:String,attribute:"spacing-left",reflect:!0})],lt.prototype,"spacingLeft",2),Dt([n({type:String,attribute:"spacing-right",reflect:!0})],lt.prototype,"spacingRight",2),lt=Dt([y("scb-nav")],lt);var jg=Object.defineProperty,Kg=Object.getOwnPropertyDescriptor,oe=(e,t,i,s)=>{for(var r=s>1?void 0:s?Kg(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&jg(t,i,r),r};let ie=class extends _{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.size="large",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.href="",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._closeNotification=()=>{this.open=!1;const e=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e);const t=new CustomEvent("Close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}__resolveSpacingToken(e){const t=(e??"").trim();return t?/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t:""}__applySpacing(){const e=this.__resolveSpacingToken(this.spacingTop||this.spacing),t=this.__resolveSpacingToken(this.spacingBottom||this.spacing),i=this.__resolveSpacingToken(this.spacingLeft||this.spacing),s=this.__resolveSpacingToken(this.spacingRight||this.spacing);e?this.style.marginBlockStart=e:this.style.removeProperty("margin-block-start"),t?this.style.marginBlockEnd=t:this.style.removeProperty("margin-block-end"),i?this.style.marginInlineStart=i:this.style.removeProperty("margin-inline-start"),s?this.style.marginInlineEnd=s:this.style.removeProperty("margin-inline-end")}updated(e){super.updated(e),e.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}render(){const e=this.direction==="vertical"?"vertical":"horizontal",t=!!(this.title||this.subtitle),i=!!(this.supportingText&&!this.title&&!this.subtitle&&!this.linkText),s=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container, #007041);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container, #942500);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);":"--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);",r=this.linkHref&&this.linkHref!=="#"?this.linkHref:this.href||this.linkHref;return c`
10281
+ `,Dt([n({type:String})],lt.prototype,"label",2),Dt([n({type:String,attribute:"active-href"})],lt.prototype,"activeHref",2),Dt([n({type:Boolean,attribute:"activate-on-click"})],lt.prototype,"activateOnClick",2),Dt([n({type:Boolean,reflect:!0})],lt.prototype,"sticky",2),Dt([n({type:String,attribute:"sticky-top"})],lt.prototype,"stickyTop",2),Dt([n({type:Number,attribute:"sticky-z-index"})],lt.prototype,"stickyZIndex",2),Dt([n({type:String,attribute:"sticky-background"})],lt.prototype,"stickyBackground",2),Dt([n({type:String,reflect:!0})],lt.prototype,"spacing",2),Dt([n({type:String,attribute:"spacing-top",reflect:!0})],lt.prototype,"spacingTop",2),Dt([n({type:String,attribute:"spacing-bottom",reflect:!0})],lt.prototype,"spacingBottom",2),Dt([n({type:String,attribute:"spacing-left",reflect:!0})],lt.prototype,"spacingLeft",2),Dt([n({type:String,attribute:"spacing-right",reflect:!0})],lt.prototype,"spacingRight",2),lt=Dt([y("scb-nav")],lt);var jg=Object.defineProperty,Kg=Object.getOwnPropertyDescriptor,ne=(e,t,i,s)=>{for(var r=s>1?void 0:s?Kg(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&jg(t,i,r),r};let ie=class extends _{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.size="large",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.href="",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._closeNotification=()=>{this.open=!1;const e=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e);const t=new CustomEvent("Close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}__resolveSpacingToken(e){const t=(e??"").trim();return t?/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t:""}__applySpacing(){const e=this.__resolveSpacingToken(this.spacingTop||this.spacing),t=this.__resolveSpacingToken(this.spacingBottom||this.spacing),i=this.__resolveSpacingToken(this.spacingLeft||this.spacing),s=this.__resolveSpacingToken(this.spacingRight||this.spacing);e?this.style.marginBlockStart=e:this.style.removeProperty("margin-block-start"),t?this.style.marginBlockEnd=t:this.style.removeProperty("margin-block-end"),i?this.style.marginInlineStart=i:this.style.removeProperty("margin-inline-start"),s?this.style.marginInlineEnd=s:this.style.removeProperty("margin-inline-end")}updated(e){super.updated(e),e.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}render(){const e=this.direction==="vertical"?"vertical":"horizontal",t=!!(this.title||this.subtitle),i=!!(this.supportingText&&!this.title&&!this.subtitle&&!this.linkText),s=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container, #007041);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container, #942500);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);":"--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);",r=this.linkHref&&this.linkHref!=="#"?this.linkHref:this.href||this.linkHref;return c`
10278
10282
  <div class="notification" type=${this.variant} role="alert" aria-live="assertive" aria-atomic="true">
10279
10283
  <div class="notification-main ${e}">
10280
10284
  ${this.showIcon?c`
@@ -10631,7 +10635,7 @@
10631
10635
  box-shadow: 0 0 0 2px var(--md-sys-color-primary, #1976d2);
10632
10636
  }
10633
10637
  }
10634
- `],oe([n({type:String})],ie.prototype,"variant",2),oe([n({type:String,reflect:!0})],ie.prototype,"direction",2),oe([n({type:String,reflect:!0})],ie.prototype,"size",2),oe([n({type:String})],ie.prototype,"title",2),oe([n({type:String})],ie.prototype,"subtitle",2),oe([n({type:String,attribute:"supporting-text"})],ie.prototype,"supportingText",2),oe([n({type:Boolean,reflect:!0})],ie.prototype,"open",2),oe([n({type:String,attribute:"link-text"})],ie.prototype,"linkText",2),oe([n({type:String,attribute:"link-href"})],ie.prototype,"linkHref",2),oe([n({type:String})],ie.prototype,"href",2),oe([n({type:Boolean,attribute:"show-icon"})],ie.prototype,"showIcon",2),oe([n({type:Boolean,attribute:"show-close-button"})],ie.prototype,"showCloseButton",2),oe([n({type:String,reflect:!0})],ie.prototype,"sizing",2),oe([n({type:String,reflect:!0})],ie.prototype,"width",2),oe([n({type:String,reflect:!0,attribute:"max-width"})],ie.prototype,"maxWidth",2),oe([n({type:String,reflect:!0})],ie.prototype,"height",2),oe([n({type:String,reflect:!0,attribute:"max-height"})],ie.prototype,"maxHeight",2),oe([n({type:Boolean,reflect:!0,attribute:"full-height"})],ie.prototype,"fullHeight",2),oe([n({type:Boolean,reflect:!0,attribute:"full-width"})],ie.prototype,"fullWidth",2),oe([n({type:String})],ie.prototype,"spacing",2),oe([n({type:String,attribute:"spacing-top"})],ie.prototype,"spacingTop",2),oe([n({type:String,attribute:"spacing-bottom"})],ie.prototype,"spacingBottom",2),oe([n({type:String,attribute:"spacing-left"})],ie.prototype,"spacingLeft",2),oe([n({type:String,attribute:"spacing-right"})],ie.prototype,"spacingRight",2),ie=oe([y("scb-notification-card")],ie);var Gg=Object.defineProperty,Yg=Object.getOwnPropertyDescriptor,ct=(e,t,i,s)=>{for(var r=s>1?void 0:s?Yg(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Gg(t,i,r),r};let Ue=class extends _{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="",this.baseUri="",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_emitPageChange(e){const t={page:e};this.dispatchEvent(new CustomEvent("page-change",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("pagechange",{detail:t,bubbles:!0,composed:!0}))}_getPagingHref(e){if(!this.pagingHref)return;const t=(this.baseUri||"").trim(),i=t||window.location.href,s=new URL(i,window.location.href),a=this.pagingHref.trim().replace(/^[?&]/,"").split("=")[0];if(a)return s.searchParams.delete(a),s.searchParams.set(a,String(e)),/^https?:\/\//i.test(t)?s.toString():`${s.pathname}${s.search}${s.hash}`}_handlePageSelection(e,t){!this.pagingHref&&t&&t.preventDefault(),this.page=e,this._emitPageChange(e)}_prevPage(e){if(this.page<=1){!this.pagingHref&&e&&e.preventDefault();return}this._handlePageSelection(this.page-1,e)}_nextPage(e){if(this.page>=this.totalPages){!this.pagingHref&&e&&e.preventDefault();return}this._handlePageSelection(this.page+1,e)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}mapSpacingToken(e){if(e==null)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,i=this.mapSpacingToken(this.spacingBottom)??e,s=this.mapSpacingToken(this.spacingLeft),r=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-pagination-spacing-block-start",t):this.style.removeProperty("--scb-pagination-spacing-block-start"),i?this.style.setProperty("--scb-pagination-spacing-block-end",i):this.style.removeProperty("--scb-pagination-spacing-block-end"),s?this.style.setProperty("--scb-pagination-spacing-inline-start",s):this.style.removeProperty("--scb-pagination-spacing-inline-start"),r?this.style.setProperty("--scb-pagination-spacing-inline-end",r):this.style.removeProperty("--scb-pagination-spacing-inline-end")}firstUpdated(){this.__applySpacing()}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const e=this.variant?`${this.variant.toLowerCase()}`:"",t=[],{page:i,totalPages:s}=this,r=window.innerWidth<=768,a=r?1:2,o=this._getPagingHref(Math.max(1,this.page-1)),l=this._getPagingHref(Math.min(this.totalPages,this.page+1)),d=this.pagingHref?this.variant==="icon"?c`<a
10638
+ `],ne([n({type:String})],ie.prototype,"variant",2),ne([n({type:String,reflect:!0})],ie.prototype,"direction",2),ne([n({type:String,reflect:!0})],ie.prototype,"size",2),ne([n({type:String})],ie.prototype,"title",2),ne([n({type:String})],ie.prototype,"subtitle",2),ne([n({type:String,attribute:"supporting-text"})],ie.prototype,"supportingText",2),ne([n({type:Boolean,reflect:!0})],ie.prototype,"open",2),ne([n({type:String,attribute:"link-text"})],ie.prototype,"linkText",2),ne([n({type:String,attribute:"link-href"})],ie.prototype,"linkHref",2),ne([n({type:String})],ie.prototype,"href",2),ne([n({type:Boolean,attribute:"show-icon"})],ie.prototype,"showIcon",2),ne([n({type:Boolean,attribute:"show-close-button"})],ie.prototype,"showCloseButton",2),ne([n({type:String,reflect:!0})],ie.prototype,"sizing",2),ne([n({type:String,reflect:!0})],ie.prototype,"width",2),ne([n({type:String,reflect:!0,attribute:"max-width"})],ie.prototype,"maxWidth",2),ne([n({type:String,reflect:!0})],ie.prototype,"height",2),ne([n({type:String,reflect:!0,attribute:"max-height"})],ie.prototype,"maxHeight",2),ne([n({type:Boolean,reflect:!0,attribute:"full-height"})],ie.prototype,"fullHeight",2),ne([n({type:Boolean,reflect:!0,attribute:"full-width"})],ie.prototype,"fullWidth",2),ne([n({type:String})],ie.prototype,"spacing",2),ne([n({type:String,attribute:"spacing-top"})],ie.prototype,"spacingTop",2),ne([n({type:String,attribute:"spacing-bottom"})],ie.prototype,"spacingBottom",2),ne([n({type:String,attribute:"spacing-left"})],ie.prototype,"spacingLeft",2),ne([n({type:String,attribute:"spacing-right"})],ie.prototype,"spacingRight",2),ie=ne([y("scb-notification-card")],ie);var Gg=Object.defineProperty,Yg=Object.getOwnPropertyDescriptor,ct=(e,t,i,s)=>{for(var r=s>1?void 0:s?Yg(t,i):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Gg(t,i,r),r};let Ue=class extends _{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="",this.baseUri="",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_emitPageChange(e){const t={page:e};this.dispatchEvent(new CustomEvent("page-change",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("pagechange",{detail:t,bubbles:!0,composed:!0}))}_getPagingHref(e){if(!this.pagingHref)return;const t=(this.baseUri||"").trim(),i=t||window.location.href,s=new URL(i,window.location.href),a=this.pagingHref.trim().replace(/^[?&]/,"").split("=")[0];if(a)return s.searchParams.delete(a),s.searchParams.set(a,String(e)),/^https?:\/\//i.test(t)?s.toString():`${s.pathname}${s.search}${s.hash}`}_handlePageSelection(e,t){!this.pagingHref&&t&&t.preventDefault(),this.page=e,this._emitPageChange(e)}_prevPage(e){if(this.page<=1){!this.pagingHref&&e&&e.preventDefault();return}this._handlePageSelection(this.page-1,e)}_nextPage(e){if(this.page>=this.totalPages){!this.pagingHref&&e&&e.preventDefault();return}this._handlePageSelection(this.page+1,e)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}mapSpacingToken(e){if(e==null)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,i=this.mapSpacingToken(this.spacingBottom)??e,s=this.mapSpacingToken(this.spacingLeft),r=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-pagination-spacing-block-start",t):this.style.removeProperty("--scb-pagination-spacing-block-start"),i?this.style.setProperty("--scb-pagination-spacing-block-end",i):this.style.removeProperty("--scb-pagination-spacing-block-end"),s?this.style.setProperty("--scb-pagination-spacing-inline-start",s):this.style.removeProperty("--scb-pagination-spacing-inline-start"),r?this.style.setProperty("--scb-pagination-spacing-inline-end",r):this.style.removeProperty("--scb-pagination-spacing-inline-end")}firstUpdated(){this.__applySpacing()}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const e=this.variant?`${this.variant.toLowerCase()}`:"",t=[],{page:i,totalPages:s}=this,r=window.innerWidth<=768,a=r?1:2,o=this._getPagingHref(Math.max(1,this.page-1)),l=this._getPagingHref(Math.min(this.totalPages,this.page+1)),d=this.pagingHref?this.variant==="icon"?c`<a
10635
10639
  class="paging-action-link"
10636
10640
  href=${o}
10637
10641
  @click=${this._prevPage}