scb-wc 0.1.231 → 0.1.232

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +16 -19
  2. package/all.js +0 -12
  3. package/index.js +85 -97
  4. package/mvc/components/all.js +0 -7
  5. package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
  6. package/mvc/components/scb-accordion/scb-accordion.js +1 -1
  7. package/mvc/components/scb-app-bar/scb-app-bar.js +1 -1
  8. package/mvc/components/scb-button/scb-button.js +3 -3
  9. package/mvc/components/scb-calendar/scb-calendar.js +1 -1
  10. package/mvc/components/scb-calendar-card/scb-calendar-card.js +4 -4
  11. package/mvc/components/scb-card/scb-card.js +2 -2
  12. package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +1 -1
  13. package/mvc/components/scb-dialog/scb-dialog.js +1 -1
  14. package/mvc/components/scb-drawer/scb-drawer.js +3 -3
  15. package/mvc/components/scb-drop-zone/scb-drop-zone.js +1 -1
  16. package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
  17. package/mvc/components/scb-fact-card/scb-fact-card.js +1 -1
  18. package/mvc/components/scb-header/scb-header.js +2 -2
  19. package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
  20. package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
  21. package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
  22. package/mvc/components/scb-link/scb-link.js +1 -1
  23. package/mvc/components/scb-link-button/scb-link-button.js +1 -1
  24. package/mvc/components/scb-list/scb-list-item.js +6 -6
  25. package/mvc/components/scb-menu/scb-menu-item.js +1 -1
  26. package/mvc/components/scb-nav/scb-nav.js +1 -1
  27. package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
  28. package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
  29. package/mvc/components/scb-options-menu/scb-options-menu.js +2 -2
  30. package/mvc/components/scb-options-menu/scb-options-sub-menu.js +1 -1
  31. package/mvc/components/scb-overlay/scb-overlay.js +3 -3
  32. package/mvc/components/scb-pagination/scb-pagination.js +1 -1
  33. package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
  34. package/mvc/components/scb-search/scb-search.js +3 -3
  35. package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
  36. package/mvc/components/scb-select/scb-select-option.js +1 -1
  37. package/mvc/components/scb-select/scb-select.js +1 -1
  38. package/mvc/components/scb-snackbar/scb-snackbar.js +1 -1
  39. package/mvc/components/scb-stepper/scb-step.js +1 -1
  40. package/mvc/components/scb-table/scb-table.js +1 -1
  41. package/mvc/components/scb-table-advanced/scb-table-advanced.js +1 -1
  42. package/mvc/components/scb-textfield/scb-textfield.js +176 -34
  43. package/mvc/components/scb-toc/scb-toc-item.js +1 -1
  44. package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
  45. package/mvc/{components/shared → vendor}/component-size-token.js +1 -1
  46. package/mvc/vendor/lazy-focus-ring.js +2 -0
  47. package/mvc/vendor/lazy-ripple.js +2 -0
  48. package/mvc/{components/shared → vendor}/manual-popover.js +1 -1
  49. package/mvc/{components/scb-chevron → vendor}/scb-chevron.js +1 -1
  50. package/mvc/vendor/scb-icon-svg.js +11 -0
  51. package/package.json +2 -2
  52. package/scb-viz/scb-viz-series-differentiation-registry.js +7 -10
  53. package/scb-viz/scb-viz.js +43 -43
  54. package/scb-wc.bundle.js +287 -287
  55. package/scb-wc.d.ts +188 -212
  56. package/shared/scb-icon-svg.js +2 -5
  57. package/mvc/components/scb-datepicker/scb-datepicker.js +0 -143
  58. package/mvc/components/shared/lazy-focus-ring.js +0 -2
  59. package/mvc/components/shared/lazy-ripple.js +0 -2
  60. package/mvc/components/shared/scb-icon-svg.js +0 -11
@@ -1,4 +1,4 @@
1
- import{g as J,h as X,m as Z,p as _,v as k,y as V}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{addLazyFocusRingListeners as ee}from"../shared/lazy-focus-ring.js";import{componentSizeToken as I}from"../shared/component-size-token.js";import{t as f}from"../../vendor/decorate.js";import{t as W}from"../../vendor/assertClassBrand.js";import{t as te}from"../../vendor/classPrivateMethodInitSpec.js";import"../scb-icon-button/scb-icon-button.js";import"./scb-calendar-event.js";import"../scb-dialog/scb-dialog.js";import"../scb-list/scb-list.js";(function(){try{var E=typeof globalThis<"u"?globalThis:window;if(!E.__scb_ce_guard_installed__){E.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,a,s){try{customElements.get(t)||e(t,a,s)}catch(r){var n=String(r||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var z,O,P={fromAttribute(E){if(E===null)return!1;const e=E.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="no"}},y=(z=new WeakSet,O=class extends X{constructor(...e){super(...e),te(this,z),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=t=>{const a=Array.from(this.shadowRoot?.querySelectorAll(".calendar-day[data-date]")??[]),s=this.shadowRoot?.activeElement,n=s&&a.includes(s)?s:document.activeElement,r=a.indexOf(n);if(r===-1)return;let l;switch(t.key){case"ArrowRight":l=a[r+1];break;case"ArrowLeft":l=a[r-1];break;case"ArrowDown":l=this.__dayOffsetFrom(n,7);break;case"ArrowUp":l=this.__dayOffsetFrom(n,-7);break;case"Home":l=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[])[0];break;case"End":{const d=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[]);l=d[d.length-1];break}case"PageUp":t.preventDefault(),this.__focusAdjacentMonth(n,-1);return;case"PageDown":t.preventDefault(),this.__focusAdjacentMonth(n,1);return;default:return}l&&l!==n&&(t.preventDefault(),this.__focusCalendarDay(l))},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._rovingDate="",this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{this._lastActiveDay?.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,a){super.attributeChangedCallback(e,t,a),e==="value"&&(this.value=a??"")}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=ee(this,this.renderRoot),W(z,this,H).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),this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,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){if(super.updated?.(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"))&&W(z,this,H).call(this),!this._syncingDisplay&&(e.has("displayYear")||e.has("displayMonth"))){const t=Number(this.displayYear),a=Number(this.displayMonth);if(!Number.isNaN(t)&&!Number.isNaN(a)&&a>=1&&a<=12){const s=this._current.getFullYear(),n=this._current.getMonth()+1;(s!==t||n!==a)&&(this._current=new Date(t,a-1,1),this._dispatchMonthChange(t,a),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??"",a=e.description??"",s=e.href??"",n=e.startDate??e["start-date"]??e.start??e.date??"",r=e.endDate??e["end-date"]??e.end??"";return{title:t+"",description:a?a+"":void 0,href:s?s+"":void 0,start:n?n+"":void 0,end:r?r+"":void 0}}_toLocalEventDate(e,t){const a=(e??"").trim();if(!a)return null;if(!a.includes("T")){const n=a.split("-").map(o=>Number(o));if(n.length!==3||n.some(o=>Number.isNaN(o)))return null;const[r,l,d]=n;return t?new Date(r,l-1,d,23,59,59,999):new Date(r,l-1,d,0,0,0,0)}const s=new Date(a);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 a of e){const s=this._normalizeEventInput(a),n=s.start||"",r=s.end||"";if(!(!n||!s.title))if(n&&r){const l=this._toLocalEventDate(n,!1),d=this._toLocalEventDate(r,!0);if(!l||!d)continue;if(d<l){const o=n.split("T")[0],m=t.get(o)||[];m.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),t.set(o,m);continue}for(let o=new Date(l);o<=d;o.setDate(o.getDate()+1)){const m=this._toDateKey(o),T=t.get(m)||[];T.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),t.set(m,T)}}else{const l=n.split("T")[0],d=t.get(l)||[];d.push({title:s.title,description:s.description,href:s.href,start:n}),t.set(l,d)}}return t}_buildEventMapFromChildren(){const e=Array.from(this.querySelectorAll("scb-calendar-event")),t=new Map;for(const a of e){const s=a,n=(s.startDate??s.date??"")+""||a.getAttribute("start-date")||a.getAttribute("date")||"",r=(s.endDate??"")+""||a.getAttribute("end-date")||"";if(n&&r){const l=this._toLocalEventDate(n,!1),d=this._toLocalEventDate(r,!0);if(!l||!d)continue;if(d<l){const o=n.split("T")[0],m=t.get(o)||[];m.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),t.set(o,m);continue}for(let o=new Date(l);o<=d;o.setDate(o.getDate()+1)){const m=this._toDateKey(o),T=t.get(m)||[];T.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),t.set(m,T)}}else if(n&&a.title){const l=n.split("T")[0],d=t.get(l)||[];d.push({title:a.title,description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n}),t.set(l,d)}}return t}_syncDisplayFromCurrent(e=!0){const t=this._current.getFullYear(),a=this._current.getMonth()+1;this._syncingDisplay=!0;try{this.displayYear=t,this.displayMonth=a}finally{this._syncingDisplay=!1}e&&this._dispatchMonthChange(t,a)}_dispatchMonthChange(e,t){const a={displayYear:e,displayMonth:t};this.dispatchEvent(new CustomEvent("scb-calendar-month-change",{bubbles:!0,composed:!0,detail:a})),this.dispatchEvent(new CustomEvent("scbcalendarmonthchange",{bubbles:!0,composed:!0,detail:a}))}_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}))}_formatDayLabel(e){return new Intl.DateTimeFormat(this.lang==="en"?"en-GB":"sv-SE",{day:"numeric",month:"long",year:"numeric"}).format(e)}_formatDayAriaLabel(e,t,a){const s=a.map(r=>`${r.prefix||""}${r.title}`.trim()).filter(Boolean),n=[this._formatDayLabel(e)];return t&&n.push(t),s.length===1?n.push(this.lang==="en"?`1 event: ${s[0]}`:`1 händelse: ${s[0]}`):s.length>1&&n.push(this.lang==="en"?`${s.length} events: ${s.join(", ")}`:`${s.length} händelser: ${s.join(", ")}`),n.join(". ")}__dayOffsetFrom(e,t){const a=e.dataset.date;if(!a)return;const s=new Date(`${a}T12:00:00`);s.setDate(s.getDate()+t);const n=this.__formatDateKey(s);return this.shadowRoot?.querySelector(`.calendar-day[data-date="${n}"]`)??void 0}__formatDateKey(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}__focusCalendarDay(e){this.shadowRoot?.querySelectorAll(".calendar-day[data-date]").forEach(t=>{t.tabIndex=t===e?0:-1}),this._rovingDate=e.dataset.date??"",e.focus()}__focusAdjacentMonth(e,t){const a=e.dataset.date;if(!a)return;const s=new Date(`${a}T12:00:00`),n=new Date(s.getFullYear(),s.getMonth()+t,1),r=Math.min(s.getDate(),this._daysInMonth(n.getFullYear(),n.getMonth())),l=new Date(n.getFullYear(),n.getMonth(),r);this._current=new Date(l.getFullYear(),l.getMonth(),1),this.selectedDate="",this._popupEvent=null,this._rovingDate=this.__formatDateKey(l),this._syncDisplayFromCurrent(),this.requestUpdate(),this.updateComplete.then(()=>{const d=this.shadowRoot?.querySelector(`.calendar-day[data-date="${this._rovingDate}"]`);d&&this.__focusCalendarDay(d)})}_daysInMonth(e,t){return new Date(e,t+1,0).getDate()}_firstDayOfWeek(e,t){const a=new Date(e,t,1).getDay();return a===0?6:a-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){this._popupEvent=e,this.selectedDate=e.date,this._dispatchSelect(e.date),this._lastActiveDay=this.shadowRoot?.activeElement||document.activeElement,this.requestUpdate(),this.updateComplete.then(()=>{const t=this.shadowRoot?.querySelector("scb-dialog");t&&(document.activeElement&&(t.__lastTriggerEl=document.activeElement),requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.open=!0})}),t.addEventListener("close",this._handleDialogClose,{once:!0}))})}_addDays(e,t){const a=new Date(e.valueOf());return a.setDate(a.getDate()+t),a}_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 a=t%19,s=t%4,n=t%7,r=(19*a+24)%30,l=(2*s+4*n+6*r+5)%7;let d=22+r+l,o=0;d==57&&(d-=7),d==56&&r==28&&l==6&&a>10&&(d-=7),d>31?(d-=31,o=4):o=3;const m=new Date(t,o-1,d);return this._easterDateCalculated["Ar"+e]=m,new Date(this._easterDateCalculated["Ar"+e])}_swedishHolidayName(e){const t=e.getMonth();if(t===1||t===6||t===7||t===8)return null;const a=e.getMonth()+1,s=e.getDate(),n=e.getFullYear(),r=this._easterDay(n),l=this.lang==="en",d=[["Nyårsdagen","New Year's Day",a===1&&s===1],["Trettondedag jul","Epiphany",a===1&&s===6],["Långfredag","Good Friday",+e==+this._addDays(r,-2)],["Påskdagen","Easter Sunday",+e==+r],["Annandag påsk","Easter Monday",+e==+this._addDays(r,1)],["Kristi himmelsfärdsdag","Ascension Day",+e==+this._addDays(r,39)],["Pingstdagen","Pentecost",+e==+this._addDays(r,50)&&n<2005],["Första maj","May Day",a===5&&s===1],["Nationaldagen","National Day",a===6&&s===6&&n>=2005],["Midsommarafton","Midsummer's Eve",a===6&&s>=19&&s<=25&&e.getDay()===5],["Midsommardagen","Midsummer's Day",a===6&&s>=20&&s<=26&&e.getDay()===6],["Julafton","Christmas Eve",a===12&&s===24],["Juldagen","Christmas Day",a===12&&s===25],["Annandag jul","Boxing Day",a===12&&s===26],["Alla helgons dag","All Saints' Day",a===10&&s>=31&&e.getDay()===6||a===11&&s<=6&&e.getDay()===6]];for(const o of d){const[m,T,$]=o;if($)return l?T:m}return null}render(){const e=this._current.getFullYear(),t=this._current.getMonth(),a=this._daysInMonth(e,t),s=this._firstDayOfWeek(e,t),n=this._today,r=this.lang==="en",l=r?["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 d=r?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(d=d.slice(0,5));const o=this._getEventInputs(),m=o?this._buildEventMapFromInputs(o):this._buildEventMapFromChildren(),T=`${e}-${String(t+1).padStart(2,"0")}-`,$=new Date(e,t,1);if(this.disableWeekend)for(;$.getDay()===0||$.getDay()===6;)$.setDate($.getDate()+1);const B=this.__formatDateKey(n),U=[...m.keys()].find(i=>{if(!i.startsWith(T))return!1;if(!this.disableWeekend)return!0;const h=new Date(`${i}T12:00:00`);return h.getDay()!==0&&h.getDay()!==6}),G=[this._rovingDate,this.selectedDate,B,U,this.__formatDateKey($)].find(i=>i?.startsWith(T))??this.__formatDateKey($),K=[];let L=1;for(let i=0;i<6;i++){const h=[],b=this.disableWeekend?[0,1,2,3,4]:[0,1,2,3,4,5,6];let g=L;for(let D=0;D<b.length;D++){const w=b[D];if(i===0&&w<s){if(!this.disableWeekend||w<5){const x=t===0?11:t-1,C=t===0?e-1:e,p=this._daysInMonth(C,x)-(s-w-1),N=new Date(C,x,p);h.push(k`
1
+ import{g as J,h as X,m as Z,p as _,v as k,y as V}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as ee}from"../../vendor/lazy-focus-ring.js";import{t as I}from"../../vendor/component-size-token.js";import{t as f}from"../../vendor/decorate.js";import{t as W}from"../../vendor/assertClassBrand.js";import{t as te}from"../../vendor/classPrivateMethodInitSpec.js";import"../scb-icon-button/scb-icon-button.js";import"./scb-calendar-event.js";import"../scb-dialog/scb-dialog.js";import"../scb-list/scb-list.js";(function(){try{var E=typeof globalThis<"u"?globalThis:window;if(!E.__scb_ce_guard_installed__){E.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,a,s){try{customElements.get(t)||e(t,a,s)}catch(r){var n=String(r||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var z,O,P={fromAttribute(E){if(E===null)return!1;const e=E.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="no"}},y=(z=new WeakSet,O=class extends X{constructor(...e){super(...e),te(this,z),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=t=>{const a=Array.from(this.shadowRoot?.querySelectorAll(".calendar-day[data-date]")??[]),s=this.shadowRoot?.activeElement,n=s&&a.includes(s)?s:document.activeElement,r=a.indexOf(n);if(r===-1)return;let l;switch(t.key){case"ArrowRight":l=a[r+1];break;case"ArrowLeft":l=a[r-1];break;case"ArrowDown":l=this.__dayOffsetFrom(n,7);break;case"ArrowUp":l=this.__dayOffsetFrom(n,-7);break;case"Home":l=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[])[0];break;case"End":{const d=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[]);l=d[d.length-1];break}case"PageUp":t.preventDefault(),this.__focusAdjacentMonth(n,-1);return;case"PageDown":t.preventDefault(),this.__focusAdjacentMonth(n,1);return;default:return}l&&l!==n&&(t.preventDefault(),this.__focusCalendarDay(l))},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._rovingDate="",this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{this._lastActiveDay?.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,a){super.attributeChangedCallback(e,t,a),e==="value"&&(this.value=a??"")}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=ee(this,this.renderRoot),W(z,this,H).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),this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,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){if(super.updated?.(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"))&&W(z,this,H).call(this),!this._syncingDisplay&&(e.has("displayYear")||e.has("displayMonth"))){const t=Number(this.displayYear),a=Number(this.displayMonth);if(!Number.isNaN(t)&&!Number.isNaN(a)&&a>=1&&a<=12){const s=this._current.getFullYear(),n=this._current.getMonth()+1;(s!==t||n!==a)&&(this._current=new Date(t,a-1,1),this._dispatchMonthChange(t,a),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??"",a=e.description??"",s=e.href??"",n=e.startDate??e["start-date"]??e.start??e.date??"",r=e.endDate??e["end-date"]??e.end??"";return{title:t+"",description:a?a+"":void 0,href:s?s+"":void 0,start:n?n+"":void 0,end:r?r+"":void 0}}_toLocalEventDate(e,t){const a=(e??"").trim();if(!a)return null;if(!a.includes("T")){const n=a.split("-").map(o=>Number(o));if(n.length!==3||n.some(o=>Number.isNaN(o)))return null;const[r,l,d]=n;return t?new Date(r,l-1,d,23,59,59,999):new Date(r,l-1,d,0,0,0,0)}const s=new Date(a);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 a of e){const s=this._normalizeEventInput(a),n=s.start||"",r=s.end||"";if(!(!n||!s.title))if(n&&r){const l=this._toLocalEventDate(n,!1),d=this._toLocalEventDate(r,!0);if(!l||!d)continue;if(d<l){const o=n.split("T")[0],m=t.get(o)||[];m.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),t.set(o,m);continue}for(let o=new Date(l);o<=d;o.setDate(o.getDate()+1)){const m=this._toDateKey(o),T=t.get(m)||[];T.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),t.set(m,T)}}else{const l=n.split("T")[0],d=t.get(l)||[];d.push({title:s.title,description:s.description,href:s.href,start:n}),t.set(l,d)}}return t}_buildEventMapFromChildren(){const e=Array.from(this.querySelectorAll("scb-calendar-event")),t=new Map;for(const a of e){const s=a,n=(s.startDate??s.date??"")+""||a.getAttribute("start-date")||a.getAttribute("date")||"",r=(s.endDate??"")+""||a.getAttribute("end-date")||"";if(n&&r){const l=this._toLocalEventDate(n,!1),d=this._toLocalEventDate(r,!0);if(!l||!d)continue;if(d<l){const o=n.split("T")[0],m=t.get(o)||[];m.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),t.set(o,m);continue}for(let o=new Date(l);o<=d;o.setDate(o.getDate()+1)){const m=this._toDateKey(o),T=t.get(m)||[];T.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),t.set(m,T)}}else if(n&&a.title){const l=n.split("T")[0],d=t.get(l)||[];d.push({title:a.title,description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n}),t.set(l,d)}}return t}_syncDisplayFromCurrent(e=!0){const t=this._current.getFullYear(),a=this._current.getMonth()+1;this._syncingDisplay=!0;try{this.displayYear=t,this.displayMonth=a}finally{this._syncingDisplay=!1}e&&this._dispatchMonthChange(t,a)}_dispatchMonthChange(e,t){const a={displayYear:e,displayMonth:t};this.dispatchEvent(new CustomEvent("scb-calendar-month-change",{bubbles:!0,composed:!0,detail:a})),this.dispatchEvent(new CustomEvent("scbcalendarmonthchange",{bubbles:!0,composed:!0,detail:a}))}_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}))}_formatDayLabel(e){return new Intl.DateTimeFormat(this.lang==="en"?"en-GB":"sv-SE",{day:"numeric",month:"long",year:"numeric"}).format(e)}_formatDayAriaLabel(e,t,a){const s=a.map(r=>`${r.prefix||""}${r.title}`.trim()).filter(Boolean),n=[this._formatDayLabel(e)];return t&&n.push(t),s.length===1?n.push(this.lang==="en"?`1 event: ${s[0]}`:`1 händelse: ${s[0]}`):s.length>1&&n.push(this.lang==="en"?`${s.length} events: ${s.join(", ")}`:`${s.length} händelser: ${s.join(", ")}`),n.join(". ")}__dayOffsetFrom(e,t){const a=e.dataset.date;if(!a)return;const s=new Date(`${a}T12:00:00`);s.setDate(s.getDate()+t);const n=this.__formatDateKey(s);return this.shadowRoot?.querySelector(`.calendar-day[data-date="${n}"]`)??void 0}__formatDateKey(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}__focusCalendarDay(e){this.shadowRoot?.querySelectorAll(".calendar-day[data-date]").forEach(t=>{t.tabIndex=t===e?0:-1}),this._rovingDate=e.dataset.date??"",e.focus()}__focusAdjacentMonth(e,t){const a=e.dataset.date;if(!a)return;const s=new Date(`${a}T12:00:00`),n=new Date(s.getFullYear(),s.getMonth()+t,1),r=Math.min(s.getDate(),this._daysInMonth(n.getFullYear(),n.getMonth())),l=new Date(n.getFullYear(),n.getMonth(),r);this._current=new Date(l.getFullYear(),l.getMonth(),1),this.selectedDate="",this._popupEvent=null,this._rovingDate=this.__formatDateKey(l),this._syncDisplayFromCurrent(),this.requestUpdate(),this.updateComplete.then(()=>{const d=this.shadowRoot?.querySelector(`.calendar-day[data-date="${this._rovingDate}"]`);d&&this.__focusCalendarDay(d)})}_daysInMonth(e,t){return new Date(e,t+1,0).getDate()}_firstDayOfWeek(e,t){const a=new Date(e,t,1).getDay();return a===0?6:a-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){this._popupEvent=e,this.selectedDate=e.date,this._dispatchSelect(e.date),this._lastActiveDay=this.shadowRoot?.activeElement||document.activeElement,this.requestUpdate(),this.updateComplete.then(()=>{const t=this.shadowRoot?.querySelector("scb-dialog");t&&(document.activeElement&&(t.__lastTriggerEl=document.activeElement),requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.open=!0})}),t.addEventListener("close",this._handleDialogClose,{once:!0}))})}_addDays(e,t){const a=new Date(e.valueOf());return a.setDate(a.getDate()+t),a}_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 a=t%19,s=t%4,n=t%7,r=(19*a+24)%30,l=(2*s+4*n+6*r+5)%7;let d=22+r+l,o=0;d==57&&(d-=7),d==56&&r==28&&l==6&&a>10&&(d-=7),d>31?(d-=31,o=4):o=3;const m=new Date(t,o-1,d);return this._easterDateCalculated["Ar"+e]=m,new Date(this._easterDateCalculated["Ar"+e])}_swedishHolidayName(e){const t=e.getMonth();if(t===1||t===6||t===7||t===8)return null;const a=e.getMonth()+1,s=e.getDate(),n=e.getFullYear(),r=this._easterDay(n),l=this.lang==="en",d=[["Nyårsdagen","New Year's Day",a===1&&s===1],["Trettondedag jul","Epiphany",a===1&&s===6],["Långfredag","Good Friday",+e==+this._addDays(r,-2)],["Påskdagen","Easter Sunday",+e==+r],["Annandag påsk","Easter Monday",+e==+this._addDays(r,1)],["Kristi himmelsfärdsdag","Ascension Day",+e==+this._addDays(r,39)],["Pingstdagen","Pentecost",+e==+this._addDays(r,50)&&n<2005],["Första maj","May Day",a===5&&s===1],["Nationaldagen","National Day",a===6&&s===6&&n>=2005],["Midsommarafton","Midsummer's Eve",a===6&&s>=19&&s<=25&&e.getDay()===5],["Midsommardagen","Midsummer's Day",a===6&&s>=20&&s<=26&&e.getDay()===6],["Julafton","Christmas Eve",a===12&&s===24],["Juldagen","Christmas Day",a===12&&s===25],["Annandag jul","Boxing Day",a===12&&s===26],["Alla helgons dag","All Saints' Day",a===10&&s>=31&&e.getDay()===6||a===11&&s<=6&&e.getDay()===6]];for(const o of d){const[m,T,$]=o;if($)return l?T:m}return null}render(){const e=this._current.getFullYear(),t=this._current.getMonth(),a=this._daysInMonth(e,t),s=this._firstDayOfWeek(e,t),n=this._today,r=this.lang==="en",l=r?["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 d=r?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(d=d.slice(0,5));const o=this._getEventInputs(),m=o?this._buildEventMapFromInputs(o):this._buildEventMapFromChildren(),T=`${e}-${String(t+1).padStart(2,"0")}-`,$=new Date(e,t,1);if(this.disableWeekend)for(;$.getDay()===0||$.getDay()===6;)$.setDate($.getDate()+1);const B=this.__formatDateKey(n),U=[...m.keys()].find(i=>{if(!i.startsWith(T))return!1;if(!this.disableWeekend)return!0;const h=new Date(`${i}T12:00:00`);return h.getDay()!==0&&h.getDay()!==6}),G=[this._rovingDate,this.selectedDate,B,U,this.__formatDateKey($)].find(i=>i?.startsWith(T))??this.__formatDateKey($),K=[];let L=1;for(let i=0;i<6;i++){const h=[],b=this.disableWeekend?[0,1,2,3,4]:[0,1,2,3,4,5,6];let g=L;for(let D=0;D<b.length;D++){const w=b[D];if(i===0&&w<s){if(!this.disableWeekend||w<5){const x=t===0?11:t-1,C=t===0?e-1:e,p=this._daysInMonth(C,x)-(s-w-1),N=new Date(C,x,p);h.push(k`
2
2
  <div
3
3
  class="calendar-day calendar-day--other"
4
4
  role="gridcell"
@@ -1,7 +1,7 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../shared/lazy-focus-ring.js","../../vendor/preload-helper.js","../shared/lazy-ripple.js"])))=>i.map(i=>d[i]);
2
- import{h as T,m as C,p as t,v as c,y as P}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as H}from"../../vendor/preload-helper.js";import{t as r}from"../../vendor/decorate.js";(function(){try{var d=typeof globalThis<"u"?globalThis:window;if(!d.__scb_ce_guard_installed__){d.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(i,l,n){try{customElements.get(i)||e(i,l,n)}catch(o){var s=String(o||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var p,L=new Intl.DateTimeFormat("sv-SE",{month:"short"}),g={fromAttribute:d=>d??"",toAttribute:d=>typeof d!="string"||d.trim()===""?null:d},h,b;function I(){return h??(h=H(()=>import("../shared/lazy-focus-ring.js"),__vite__mapDeps([0,1]),import.meta.url)),h}function S(){return b??(b=H(()=>import("../shared/lazy-ripple.js"),__vite__mapDeps([2,1]),import.meta.url)),b}var a=(p=class extends T{constructor(...e){super(...e),this.variant="default",this.date=null,this.direction="horizontal",this.title="",this.calendarCardTitle="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.dateLabelPrefix="Datum:",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__onPointerInteraction=i=>{this.__ensureRipple(i)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,I().then(({ensureFocusRingReady:i})=>i()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))}}__hasSlottedContent(e){return!!this.querySelector(`[slot="${e}"]`)}__getSlottedText(e){return this.querySelector(`[slot="${e}"]`)?.textContent?.trim()??""}get __resolvedTitle(){return this.__getSlottedText("heading")||this.calendarCardTitle||this.title}get __resolvedSubtitle(){return this.__getSlottedText("subtitle")||this.subtitle}get __resolvedLabel(){return this.__resolvedTitle||this.__resolvedSubtitle||"Kalenderkort"}firstUpdated(){this.__applyInnerSizing(),this.__applySpacing()}__ensureRipple(e){if(this.cardHref){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,S().then(({ensureRippleReady:i})=>i()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}}async __syncRipple(){const e=this.renderRoot.querySelector("md-ripple"),i=this.renderRoot.querySelector(".calendar-card"),l=this.__pendingRippleEvent,n=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:s}=await S();await s(e,i,l,n)}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",i=this.direction?`${this.direction.toLowerCase()}`:"",l=this.cardHref?"clickable":"",n=this.__hasSlottedContent("heading"),s=this.__hasSlottedContent("subtitle"),o=this.__hasSlottedContent("supporting-text"),v=this.calendarCardTitle||this.title,u=this.subtitle,m=this.supportingText,y=n||!!v,f=s||!!u,R=o||!!m,{day:w,month:_}=this.__getDateParts(),x=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",z=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",k=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",$=`${x?`inline-size:${x};`:""}${z?`block-size:${z};`:""}${k?`aspect-ratio:${k};`:""}`;return c`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/lazy-focus-ring.js","../../vendor/rolldown-runtime.js","../../vendor/preload-helper.js","../../vendor/lazy-ripple.js"])))=>i.map(i=>d[i]);
2
+ import{h as T,m as C,p as t,v as c,y as P}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as H}from"../../vendor/preload-helper.js";import{t as r}from"../../vendor/decorate.js";(function(){try{var l=typeof globalThis<"u"?globalThis:window;if(!l.__scb_ce_guard_installed__){l.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(i,d,n){try{customElements.get(i)||e(i,d,n)}catch(o){var s=String(o||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var p,L=new Intl.DateTimeFormat("sv-SE",{month:"short"}),g={fromAttribute:l=>l??"",toAttribute:l=>typeof l!="string"||l.trim()===""?null:l},h,b;function I(){return h??(h=H(()=>import("../../vendor/lazy-focus-ring.js").then(l=>l.i),__vite__mapDeps([0,1,2]),import.meta.url)),h}function S(){return b??(b=H(()=>import("../../vendor/lazy-ripple.js"),__vite__mapDeps([3,2]),import.meta.url)),b}var a=(p=class extends T{constructor(...e){super(...e),this.variant="default",this.date=null,this.direction="horizontal",this.title="",this.calendarCardTitle="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.dateLabelPrefix="Datum:",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__onPointerInteraction=i=>{this.__ensureRipple(i)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,I().then(({ensureFocusRingReady:i})=>i()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))}}__hasSlottedContent(e){return!!this.querySelector(`[slot="${e}"]`)}__getSlottedText(e){return this.querySelector(`[slot="${e}"]`)?.textContent?.trim()??""}get __resolvedTitle(){return this.__getSlottedText("heading")||this.calendarCardTitle||this.title}get __resolvedSubtitle(){return this.__getSlottedText("subtitle")||this.subtitle}get __resolvedLabel(){return this.__resolvedTitle||this.__resolvedSubtitle||"Kalenderkort"}firstUpdated(){this.__applyInnerSizing(),this.__applySpacing()}__ensureRipple(e){if(this.cardHref){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,S().then(({ensureRippleReady:i})=>i()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}}async __syncRipple(){const e=this.renderRoot.querySelector("md-ripple"),i=this.renderRoot.querySelector(".calendar-card"),d=this.__pendingRippleEvent,n=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:s}=await S();await s(e,i,d,n)}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",i=this.direction?`${this.direction.toLowerCase()}`:"",d=this.cardHref?"clickable":"",n=this.__hasSlottedContent("heading"),s=this.__hasSlottedContent("subtitle"),o=this.__hasSlottedContent("supporting-text"),v=this.calendarCardTitle||this.title,u=this.subtitle,m=this.supportingText,y=n||!!v,f=s||!!u,R=o||!!m,{day:w,month:_}=this.__getDateParts(),x=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",z=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",k=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",$=`${x?`inline-size:${x};`:""}${z?`block-size:${z};`:""}${k?`aspect-ratio:${k};`:""}`;return c`
3
3
  <div
4
- class="calendar-card ${i} ${l} ${e}"
4
+ class="calendar-card ${i} ${d} ${e}"
5
5
  role="${this.cardHref?"link":"group"}"
6
6
  aria-label="${this.__resolvedLabel}"
7
7
  tabindex="${this.cardHref?"0":"-1"}"
@@ -38,4 +38,4 @@ import{h as T,m as C,p as t,v as c,y as P}from"../../vendor/vendor.js";import"..
38
38
  </div>
39
39
  </div>
40
40
  ${this.cardHref&&this.__focusRingLoaded?c`<md-focus-ring></md-focus-ring>`:""}
41
- `}__getDateParts(){const e={day:1,month:"Jan"};if(!this.date)return e;const i=this.date instanceof Date?this.date:(()=>{const s=new Date(String(this.date));return Number.isNaN(s.getTime())?null:s})();if(!i)return e;const l=i.getDate(),n=L.format(i).replace(".","").trim();return{day:l,month:n.charAt(0).toUpperCase()+n.slice(1)}}__applyInnerSizing(){const e=this.renderRoot.querySelector(".calendar-card");e&&(this.width&&this.width.trim()!==""?(e.style.inlineSize="100%",e.style.maxInlineSize="100%"):(e.style.removeProperty("inline-size"),e.style.removeProperty("max-inline-size")),this.height&&this.height.trim()!==""||this.sizing==="stretch"?e.style.blockSize="100%":e.style.removeProperty("block-size"),this.maxHeight&&this.maxHeight.trim()!==""?e.style.maxBlockSize="100%":e.style.removeProperty("max-block-size"))}_onKeyDown(e){(e.key==="Enter"||e.key===" ")&&this.cardHref&&(e.preventDefault(),this.__navigate())}_handleHrefNavigation(){this.cardHref&&((!this.__rippleLoaded||this.__pendingRippleEvent)&&(this.__pendingRippleClick=!0,this.__ensureRipple()),this.__navigate())}__navigate(){this.cardHref&&(this.cardHrefNav==="tab"?window.open(this.cardHref,"_blank"):this.cardHrefNav==="window"?window.open(this.cardHref,"_blank","noopener,noreferrer,width=800,height=600"):window.open(this.cardHref,"_self"))}mapSpacingToken(e){if(!e)return;const i=String(e).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i}__applySpacing(){const e=this.mapSpacingToken(this.spacing),i=this.mapSpacingToken(this.spacingTop)??e,l=this.mapSpacingToken(this.spacingBottom)??e,n=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);i?this.style.setProperty("--scb-calendar-card-spacing-block-start",i):this.style.removeProperty("--scb-calendar-card-spacing-block-start"),l?this.style.setProperty("--scb-calendar-card-spacing-block-end",l):this.style.removeProperty("--scb-calendar-card-spacing-block-end"),n?this.style.setProperty("--scb-calendar-card-spacing-inline-start",n):this.style.removeProperty("--scb-calendar-card-spacing-inline-start"),s?this.style.setProperty("--scb-calendar-card-spacing-inline-end",s):this.style.removeProperty("--scb-calendar-card-spacing-inline-end")}updated(e){e.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("minWidth")&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty("min-inline-size")),e.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),e.has("minHeight")&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty("min-block-size")),(e.has("width")||e.has("height")||e.has("maxHeight")||e.has("sizing"))&&this.__applyInnerSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}},p.styles=P`:host{--scb-cards-title-font-weight-current:var(--scb-calendar-card-design-title-large-font-weight);--scb-cards-title-letter-spacing-current:var(--scb-calendar-card-design-title-large-letter-spacing);--scb-cards-title-line-height-current:var(--scb-calendar-card-design-title-large-line-height);--scb-cards-title-tracking-current:var(--scb-calendar-card-design-title-large-tracking);--scb-cards-title-weight-current:var(--scb-calendar-card-design-title-large-weight);--scb-cards-title-size-current:var(--scb-calendar-card-design-title-large-size);--scb-cards-title-font-current:var(--scb-calendar-card-design-title-large-font);--scb-cards-subtitle-font-weight-current:var(--scb-calendar-card-design-subtitle-large-font-weight);--scb-cards-subtitle-letter-spacing-current:var(--scb-calendar-card-design-subtitle-large-letter-spacing);--scb-cards-subtitle-line-height-current:var(--scb-calendar-card-design-subtitle-large-line-height);--scb-cards-subtitle-tracking-current:var(--scb-calendar-card-design-subtitle-large-tracking);--scb-cards-subtitle-weight-current:var(--scb-calendar-card-design-subtitle-large-weight);--scb-cards-subtitle-size-current:var(--scb-calendar-card-design-subtitle-large-size);--scb-cards-subtitle-font-current:var(--scb-calendar-card-design-subtitle-large-font);--scb-cards-supporting-font-weight-current:var(--scb-calendar-card-design-supporting-large-font-weight);--scb-cards-supporting-letter-spacing-current:var(--scb-calendar-card-design-supporting-large-letter-spacing);--scb-cards-supporting-line-height-current:var(--scb-calendar-card-design-supporting-large-line-height);--scb-cards-supporting-tracking-current:var(--scb-calendar-card-design-supporting-large-tracking);--scb-cards-supporting-weight-current:var(--scb-calendar-card-design-supporting-large-weight);--scb-cards-supporting-size-current:var(--scb-calendar-card-design-supporting-large-size);--scb-cards-supporting-font-current:var(--scb-calendar-card-design-supporting-large-font);display:block;position:relative;box-sizing:border-box;inline-size:100%;min-inline-size:0;padding:var(--scb-calendar-card-focus-ring-gap, 4px);margin-block-start:var(--scb-calendar-card-spacing-block-start, 0);margin-block-end:var(--scb-calendar-card-spacing-block-end, 0);margin-inline-start:var(--scb-calendar-card-spacing-inline-start, 0);margin-inline-end:var(--scb-calendar-card-spacing-inline-end, 0);--scb-calendar-card-padding-block:var(--scb-calendar-card-padding, var(--scb-calendar-card-design-content-padding-block-large));--scb-calendar-card-padding-inline:var(--scb-calendar-card-padding, var(--scb-calendar-card-design-content-padding-inline-large));--scb-calendar-card-surface-radius:var(--scb-calendar-card-design-surface-radius-large);--scb-calendar-card-border-width:var(--scb-calendar-card-design-surface-border-width-large);--scb-calendar-card-gap:var(--scb-calendar-card-design-calendar-gap-large);--scb-calendar-card-horizontal-gap:var(--scb-calendar-card-design-calendar-horizontal-gap-large);--scb-calendar-card-horizontal-min-block-size:var(--scb-calendar-card-design-calendar-horizontal-min-height-large);--scb-calendar-card-unframed-state-gap:var(--spacing-2, 4px);--scb-calendar-card-unframed-state-color:color-mix(in srgb, currentColor 8%, transparent);--scb-calendar-card-media-size:var(--scb-calendar-card-design-calendar-media-size-large);--scb-calendar-card-media-radius:var(--scb-calendar-card-design-calendar-media-radius-large);--scb-calendar-card-media-gap:var(--scb-calendar-card-design-calendar-media-gap-large);--scb-calendar-card-day-size:var(--scb-calendar-card-design-calendar-date-day-text-large);--scb-calendar-card-day-letter-spacing:-0.6px;--scb-calendar-card-month-size:var(--scb-calendar-card-design-calendar-date-month-text-large);--scb-calendar-card-content-gap:var(--scb-calendar-card-design-calendar-content-gap-large);--scb-calendar-card-header-gap:var(--scb-calendar-card-design-calendar-title-gap-large);--scb-calendar-card-title-min-block-size:var(--scb-calendar-card-title-line-height);--scb-calendar-card-icon-size:var(--scb-calendar-card-design-calendar-icon-large);--scb-calendar-card-title-font-family:var(--scb-cards-title-font-current, var(--scb-typography-headline-small-font, var(--md-sys-typescale-headline-small-font, var(--brand-font, var(--brand, "Inter"), sans-serif))));--scb-calendar-card-title-font-size:var(--scb-cards-title-size-current, var(--scb-typography-headline-small-size, var(--md-sys-typescale-headline-small-size, 22px)));--scb-calendar-card-title-font-weight:var(--scb-cards-title-font-weight-current, var(--scb-cards-title-weight-current, var(--scb-typography-headline-small-weight, var(--md-sys-typescale-headline-small-weight, var(--weight-bold, 700)))));--scb-calendar-card-title-line-height:var(--scb-cards-title-line-height-current, var(--scb-typography-headline-small-line-height, var(--md-sys-typescale-headline-small-line-height, 28px)));--scb-calendar-card-title-letter-spacing:var(--scb-cards-title-letter-spacing-current, var(--scb-cards-title-tracking-current, var(--scb-typography-headline-small-tracking, var(--md-sys-typescale-headline-small-tracking, -0.5px))));--scb-calendar-card-subtitle-font-family:var(--scb-cards-subtitle-font-current, var(--scb-typography-title-medium-font, var(--md-sys-typescale-title-medium-font, var(--brand-font, var(--brand, "Inter"), sans-serif))));--scb-calendar-card-subtitle-font-size:var(--scb-cards-subtitle-size-current, var(--scb-typography-title-medium-size, var(--md-sys-typescale-title-medium-size, 18px)));--scb-calendar-card-subtitle-font-weight:var(--scb-cards-subtitle-font-weight-current, var(--scb-cards-subtitle-weight-current, var(--scb-typography-title-medium-weight, var(--md-sys-typescale-title-medium-weight, var(--weight-semibold, 600)))));--scb-calendar-card-subtitle-line-height:var(--scb-cards-subtitle-line-height-current, var(--scb-typography-title-medium-line-height, var(--md-sys-typescale-title-medium-line-height, 26px)));--scb-calendar-card-subtitle-letter-spacing:var(--scb-cards-subtitle-letter-spacing-current, var(--scb-cards-subtitle-tracking-current, var(--scb-typography-title-medium-tracking, var(--md-sys-typescale-title-medium-tracking, -0.3px))));--scb-calendar-card-supporting-font-family:var(--scb-cards-supporting-font-current, var(--scb-typography-body-large-font, var(--md-sys-typescale-body-large-font, var(--brand-font, var(--brand, "Inter"), sans-serif))));--scb-calendar-card-supporting-font-size:var(--scb-cards-supporting-size-current, var(--scb-typography-body-large-size, var(--md-sys-typescale-body-large-size, 18px)));--scb-calendar-card-supporting-font-weight:var(--scb-cards-supporting-font-weight-current, var(--scb-cards-supporting-weight-current, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400)))));--scb-calendar-card-supporting-line-height:var(--scb-cards-supporting-line-height-current, var(--scb-typography-body-large-line-height, var(--md-sys-typescale-body-large-line-height, 26px)));--scb-calendar-card-supporting-letter-spacing:var(--scb-cards-supporting-letter-spacing-current, var(--scb-cards-supporting-tracking-current, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, -0.3px))))}:host([sizing='stretch']){inline-size:100%;block-size:100%;max-inline-size:none}:host([sizing='content-width']){display:inline-block;inline-size:auto;block-size:auto}:host([sizing='content-width']) .calendar-card{inline-size:max-content}:host([sizing='content-height']){inline-size:100%;block-size:auto;max-inline-size:none}md-focus-ring{position:absolute;inset:0;pointer-events:none;display:none;border-radius:var(--scb-calendar-card-focus-ring-radius, var(--scb-calendar-card-surface-radius, var(--radius-large, 16px)))}.calendar-card:focus-visible+md-focus-ring{display:block}.calendar-card{box-sizing:border-box;overflow:hidden;position:relative;isolation:isolate;display:flex;color:var(--scb-calendar-card-content-color, var(--scb-cards-content-color, var(--md-sys-color-on-surface, var(--p-20))));font-family:var(--brand-font, var(--brand, "Inter"), sans-serif);font-style:normal;flex-direction:column;align-items:flex-start;gap:var(--scb-calendar-card-gap);align-self:stretch;transition:transform .18s ease,background-color .18s ease,border-color .18s ease;inline-size:100%;max-inline-size:100%}.calendar-card.clickable{cursor:pointer}.calendar-card.clickable.default{overflow:visible}.calendar-card.clickable.default::before{content:"";position:absolute;inset:calc(var(--scb-calendar-card-unframed-state-gap)*-1);border-radius:calc(var(--scb-calendar-card-surface-radius, var(--radius-l, 16px)) + var(--scb-calendar-card-unframed-state-gap));background:var(--scb-calendar-card-unframed-state-color);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:0}.calendar-card.clickable.default:hover::before{opacity:1}.calendar-card.clickable.default>:not(md-ripple){position:relative;z-index:1}.calendar-card,.calendar-card .subtitle,.calendar-card .supporting-text,.calendar-card .title{font-variant-numeric:proportional-nums;font-feature-settings:"tnum"0,"pnum"1}.calendar-card:focus,.calendar-card:focus-visible{outline:0}.calendar-card.horizontal{flex-direction:row;align-items:flex-start;max-width:none;width:100%;gap:var(--scb-calendar-card-horizontal-gap);min-block-size:var(--scb-calendar-card-horizontal-min-block-size)}.calendar-card.outlined{border-radius:var(--scb-calendar-card-surface-radius, var(--radius-large, 16px));border:var(--scb-calendar-card-border-width, 1px) solid var(--scb-cards-outline-color, var(--md-sys-color-outline-variant, var(--n-80)));background:var(--scb-calendar-card-surface-color, var(--scb-cards-surface-color, var(--md-sys-color-surface, var(--nv-100))));padding-block:var(--scb-calendar-card-padding-block);padding-inline:var(--scb-calendar-card-padding-inline)}.calendar-card.filled,.media{background:var(--scb-cards-filled-surface-color, var(--md-sys-color-surface-dim, var(--nv-95)))}.calendar-card.filled{border-radius:var(--scb-calendar-card-surface-radius, var(--radius-large, 16px));padding-block:var(--scb-calendar-card-padding-block);padding-inline:var(--scb-calendar-card-padding-inline)}.calendar-card.filled .media{background:var(--scb-calendar-card-media-surface-color, var(--md-sys-color-surface, var(--nv-100)))}md-ripple{border-radius:var(--scb-calendar-card-surface-radius, var(--radius-l, 16px))}.calendar-card.clickable.default md-ripple{position:absolute;inset:calc(var(--scb-calendar-card-unframed-state-gap)*-1);border-radius:calc(var(--scb-calendar-card-surface-radius, var(--radius-l, 16px)) + var(--scb-calendar-card-unframed-state-gap));z-index:2}.media{width:var(--scb-calendar-card-media-size);min-width:var(--scb-calendar-card-media-size);max-width:var(--scb-calendar-card-media-size);height:var(--scb-calendar-card-media-size);padding:var(--spacing-0, 0)0;justify-content:center;align-items:center;gap:var(--scb-calendar-card-media-gap);border-radius:var(--scb-calendar-card-media-radius, var(--md-sys-shape-corner-small))}.calendar-card.horizontal .media{align-self:flex-start}.media .day{font-size:var(--scb-calendar-card-day-size);font-weight:var(--weight-bold, 700);line-height:100%;letter-spacing:var(--scb-calendar-card-day-letter-spacing);font-variant-numeric:tabular-nums}.media .month{font-size:var(--scb-calendar-card-month-size);font-weight:var(--weight-regular, 400);line-height:100%}.container,.header-container,.media{display:flex;flex-direction:column}.container{flex:1 1 auto;min-width:0;gap:var(--scb-calendar-card-content-gap);width:100%;align-self:flex-start}.header-container{gap:var(--scb-calendar-card-header-gap)}.title-container{width:100%;flex:0 0 auto;display:flex;align-items:center;gap:var(--spacing-3, 8px);color:inherit;text-decoration:none;min-block-size:var(--scb-calendar-card-title-min-block-size)}.title{font-family:var(--scb-calendar-card-title-font-family);font-size:var(--scb-calendar-card-title-font-size);font-weight:var(--scb-calendar-card-title-font-weight);line-height:var(--scb-calendar-card-title-line-height);letter-spacing:var(--scb-calendar-card-title-letter-spacing);flex:1 1 auto;min-inline-size:0;white-space:normal;word-break:normal;overflow-wrap:break-word;hyphens:auto;overflow:visible;text-overflow:clip}.title-container .calendar-card-icon{inline-size:var(--scb-calendar-card-icon-size);block-size:var(--scb-calendar-card-icon-size);flex:0 0 auto}.calendar-card-icon,.icon-container{align-items:center;justify-content:center}.icon-container{display:flex;width:var(--spacing-7, 24px);height:var(--spacing-7, 24px)}.calendar-card-icon{display:inline-flex;overflow:hidden;font-family:"Material Symbols Outlined";font-size:var(--icon-size-medium, 24px);line-height:1;white-space:nowrap;text-transform:none;word-wrap:normal;direction:ltr;font-variation-settings:normal;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.calendar-card-icon.scb-svg-icon{fill:currentColor;font:inherit}.subtitle,.supporting-text{font-family:var(--scb-calendar-card-subtitle-font-family);font-size:var(--scb-calendar-card-subtitle-font-size);font-weight:var(--scb-calendar-card-subtitle-font-weight);line-height:var(--scb-calendar-card-subtitle-line-height);letter-spacing:var(--scb-calendar-card-subtitle-letter-spacing);white-space:normal;word-break:normal;overflow-wrap:break-word;hyphens:manual;overflow:visible;text-overflow:clip}.supporting-text{font-family:var(--scb-calendar-card-supporting-font-family);font-size:var(--scb-calendar-card-supporting-font-size);font-weight:var(--scb-calendar-card-supporting-font-weight);line-height:var(--scb-calendar-card-supporting-line-height);letter-spacing:var(--scb-calendar-card-supporting-letter-spacing)}.title ::slotted(*){margin:0;color:inherit;font-family:var(--scb-calendar-card-title-font-family)!important;font-size:var(--scb-calendar-card-title-font-size)!important;font-weight:var(--scb-calendar-card-title-font-weight)!important;line-height:var(--scb-calendar-card-title-line-height)!important;letter-spacing:var(--scb-calendar-card-title-letter-spacing)!important}.subtitle ::slotted(*){margin:0;color:inherit;font-family:var(--scb-calendar-card-subtitle-font-family)!important;font-size:var(--scb-calendar-card-subtitle-font-size)!important;font-weight:var(--scb-calendar-card-subtitle-font-weight)!important;line-height:var(--scb-calendar-card-subtitle-line-height)!important;letter-spacing:var(--scb-calendar-card-subtitle-letter-spacing)!important}.supporting-text ::slotted(*){margin:0;color:inherit;font-family:var(--scb-calendar-card-supporting-font-family)!important;font-size:var(--scb-calendar-card-supporting-font-size)!important;font-weight:var(--scb-calendar-card-supporting-font-weight)!important;line-height:var(--scb-calendar-card-supporting-line-height)!important;letter-spacing:var(--scb-calendar-card-supporting-letter-spacing)!important}.supporting-text ::slotted(*),.supporting-text ::slotted(scb-link){--scb-link-font-size:var(--scb-calendar-card-supporting-font-size);--scb-link-line-height:var(--scb-calendar-card-supporting-line-height);--scb-link-letter-spacing:var(--scb-calendar-card-supporting-letter-spacing)}:host{--scb-calendar-card-design-content-padding-block-large:var(--scb-cards-content-padding-block-large, var(--spacing-7, 24px));--scb-calendar-card-design-content-padding-inline-large:var(--scb-cards-content-padding-block-large, var(--spacing-7, 24px));--scb-calendar-card-design-surface-radius-large:var(--scb-cards-surface-radius-large, var(--radius-large, 16px));--scb-calendar-card-design-surface-border-width-large:var(--scb-cards-border-width-large, var(--stroke-border, 1px));--scb-calendar-card-design-calendar-gap-large:var(--scb-cards-calendar-gap-large, var(--spacing-4, 12px));--scb-calendar-card-design-calendar-horizontal-gap-large:var(--scb-cards-calendar-horizontal-gap-large, var(--spacing-6, 20px));--scb-calendar-card-design-calendar-horizontal-min-height-large:var(--scb-cards-calendar-horizontal-min-block-size-large, 112px);--scb-calendar-card-design-calendar-media-size-large:var(--scb-cards-calendar-media-size-large, var(--spacing-11, 64px));--scb-calendar-card-design-calendar-media-radius-large:var(--scb-cards-calendar-media-radius-large, var(--radius-small, 8px));--scb-calendar-card-design-calendar-media-gap-large:var(--scb-cards-calendar-media-gap-large, var(--spacing-2, 4px));--scb-calendar-card-design-calendar-date-day-text-large:var(--scb-cards-calendar-date-day-size-large, var(--scale-07, 28px));--scb-calendar-card-design-calendar-date-month-text-large:var(--scb-cards-calendar-date-month-size-large, var(--scale-02, 14px));--scb-calendar-card-design-calendar-content-gap-large:var(--scb-cards-calendar-content-gap-large, var(--spacing-4, 12px));--scb-calendar-card-design-calendar-title-gap-large:var(--scb-cards-calendar-title-gap-large, var(--spacing-2, 4px));--scb-calendar-card-design-calendar-icon-large:var(--scb-cards-calendar-icon-size-large, var(--icon-size-medium, 24px));--scb-calendar-card-design-title-large-font:var(--scb-cards-title-large-font, var(--scb-typography-headline-small-font, var(--md-sys-typescale-headline-small-font, var(--brand))));--scb-calendar-card-design-title-large-size:var(--scb-cards-title-large-size, var(--scb-typography-headline-small-size, var(--md-sys-typescale-headline-small-size, 20px)));--scb-calendar-card-design-title-large-line-height:var(--scb-cards-title-large-line-height, var(--scb-typography-headline-small-line-height, var(--md-sys-typescale-headline-small-line-height, 28px)));--scb-calendar-card-design-title-large-tracking:var(--scb-cards-title-large-tracking, var(--scb-typography-headline-small-tracking, var(--md-sys-typescale-headline-small-tracking, var(--tracking-07, -0.5px))));--scb-calendar-card-design-title-large-weight:var(--scb-cards-title-large-weight, var(--scb-typography-headline-small-weight, var(--md-sys-typescale-headline-small-weight, var(--weight-bold, 700))));--scb-calendar-card-design-title-large-letter-spacing:var(--scb-cards-title-large-letter-spacing, var(--scb-cards-title-large-tracking, var(--scb-typography-headline-small-tracking, var(--md-sys-typescale-headline-small-tracking, var(--tracking-07, -0.5px)))));--scb-calendar-card-design-title-large-font-weight:var(--scb-cards-title-large-font-weight, var(--scb-cards-title-large-weight, var(--scb-typography-headline-small-weight, var(--md-sys-typescale-headline-small-weight, var(--weight-bold, 700)))));--scb-calendar-card-design-subtitle-large-font:var(--scb-cards-subtitle-large-font, var(--scb-typography-title-medium-font, var(--md-sys-typescale-title-medium-font, var(--brand))));--scb-calendar-card-design-subtitle-large-size:var(--scb-cards-subtitle-large-size, var(--scb-typography-title-medium-size, var(--md-sys-typescale-title-medium-size, 18px)));--scb-calendar-card-design-subtitle-large-line-height:var(--scb-cards-subtitle-large-line-height, var(--scb-typography-title-medium-line-height, var(--md-sys-typescale-title-medium-line-height, 26px)));--scb-calendar-card-design-subtitle-large-tracking:var(--scb-cards-subtitle-large-tracking, var(--scb-typography-title-medium-tracking, var(--md-sys-typescale-title-medium-tracking, var(--tracking-05, -0.3px))));--scb-calendar-card-design-subtitle-large-weight:var(--scb-cards-subtitle-large-weight, var(--scb-typography-title-medium-weight, var(--md-sys-typescale-title-medium-weight, var(--weight-semibold, 600))));--scb-calendar-card-design-subtitle-large-letter-spacing:var(--scb-cards-subtitle-large-letter-spacing, var(--scb-cards-subtitle-large-tracking, var(--scb-typography-title-medium-tracking, var(--md-sys-typescale-title-medium-tracking, var(--tracking-05, -0.3px)))));--scb-calendar-card-design-subtitle-large-font-weight:var(--scb-cards-subtitle-large-font-weight, var(--scb-cards-subtitle-large-weight, var(--scb-typography-title-medium-weight, var(--md-sys-typescale-title-medium-weight, var(--weight-semibold, 600)))));--scb-calendar-card-design-supporting-large-font:var(--scb-cards-supporting-large-font, var(--scb-typography-body-large-font, var(--md-sys-typescale-body-large-font, var(--brand))));--scb-calendar-card-design-supporting-large-size:var(--scb-cards-supporting-large-size, var(--scb-typography-body-large-size, var(--md-sys-typescale-body-large-size, 18px)));--scb-calendar-card-design-supporting-large-line-height:var(--scb-cards-supporting-large-line-height, var(--scb-typography-body-large-line-height, var(--md-sys-typescale-body-large-line-height, 26px)));--scb-calendar-card-design-supporting-large-tracking:var(--scb-cards-supporting-large-tracking, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, var(--tracking-05, -0.3px))));--scb-calendar-card-design-supporting-large-weight:var(--scb-cards-supporting-large-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400))));--scb-calendar-card-design-supporting-large-letter-spacing:var(--scb-cards-supporting-large-letter-spacing, var(--scb-cards-supporting-large-tracking, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, var(--tracking-05, -0.3px)))));--scb-calendar-card-design-supporting-large-font-weight:var(--scb-cards-supporting-large-font-weight, var(--scb-cards-supporting-large-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400)))))}`,p);r([t({type:String,reflect:!0})],a.prototype,"variant",void 0);r([t({type:String,attribute:"date"})],a.prototype,"date",void 0);r([t({type:String,reflect:!0})],a.prototype,"direction",void 0);r([t({type:String,reflect:!0,converter:g})],a.prototype,"title",void 0);r([t({type:String,attribute:"calendar-card-title",reflect:!0,converter:g})],a.prototype,"calendarCardTitle",void 0);r([t({type:String,reflect:!0,converter:g})],a.prototype,"subtitle",void 0);r([t({type:String,attribute:"supporting-text",reflect:!0,converter:g})],a.prototype,"supportingText",void 0);r([t({type:String,attribute:"card-href"})],a.prototype,"cardHref",void 0);r([t({type:String,attribute:"card-href-nav"})],a.prototype,"cardHrefNav",void 0);r([t({type:Boolean,reflect:!0,attribute:"show-media"})],a.prototype,"showMedia",void 0);r([t({type:String,attribute:"date-label-prefix"})],a.prototype,"dateLabelPrefix",void 0);r([t({type:String,attribute:"media-width"})],a.prototype,"mediaWidth",void 0);r([t({type:String,attribute:"media-height"})],a.prototype,"mediaHeight",void 0);r([t({type:String,attribute:"media-aspect"})],a.prototype,"mediaAspect",void 0);r([t({type:String,reflect:!0})],a.prototype,"width",void 0);r([t({type:String,reflect:!0,attribute:"max-width"})],a.prototype,"maxWidth",void 0);r([t({type:String,attribute:"min-width"})],a.prototype,"minWidth",void 0);r([t({type:String,reflect:!0})],a.prototype,"height",void 0);r([t({type:String,reflect:!0,attribute:"max-height"})],a.prototype,"maxHeight",void 0);r([t({type:String,attribute:"min-height"})],a.prototype,"minHeight",void 0);r([t({type:String,reflect:!0,converter:g})],a.prototype,"sizing",void 0);r([t({type:String,reflect:!0})],a.prototype,"spacing",void 0);r([t({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",void 0);r([t({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",void 0);r([t({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",void 0);r([t({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",void 0);a=r([C("scb-calendar-card")],a);
41
+ `}__getDateParts(){const e={day:1,month:"Jan"};if(!this.date)return e;const i=this.date instanceof Date?this.date:(()=>{const s=new Date(String(this.date));return Number.isNaN(s.getTime())?null:s})();if(!i)return e;const d=i.getDate(),n=L.format(i).replace(".","").trim();return{day:d,month:n.charAt(0).toUpperCase()+n.slice(1)}}__applyInnerSizing(){const e=this.renderRoot.querySelector(".calendar-card");e&&(this.width&&this.width.trim()!==""?(e.style.inlineSize="100%",e.style.maxInlineSize="100%"):(e.style.removeProperty("inline-size"),e.style.removeProperty("max-inline-size")),this.height&&this.height.trim()!==""||this.sizing==="stretch"?e.style.blockSize="100%":e.style.removeProperty("block-size"),this.maxHeight&&this.maxHeight.trim()!==""?e.style.maxBlockSize="100%":e.style.removeProperty("max-block-size"))}_onKeyDown(e){(e.key==="Enter"||e.key===" ")&&this.cardHref&&(e.preventDefault(),this.__navigate())}_handleHrefNavigation(){this.cardHref&&((!this.__rippleLoaded||this.__pendingRippleEvent)&&(this.__pendingRippleClick=!0,this.__ensureRipple()),this.__navigate())}__navigate(){this.cardHref&&(this.cardHrefNav==="tab"?window.open(this.cardHref,"_blank"):this.cardHrefNav==="window"?window.open(this.cardHref,"_blank","noopener,noreferrer,width=800,height=600"):window.open(this.cardHref,"_self"))}mapSpacingToken(e){if(!e)return;const i=String(e).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i}__applySpacing(){const e=this.mapSpacingToken(this.spacing),i=this.mapSpacingToken(this.spacingTop)??e,d=this.mapSpacingToken(this.spacingBottom)??e,n=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);i?this.style.setProperty("--scb-calendar-card-spacing-block-start",i):this.style.removeProperty("--scb-calendar-card-spacing-block-start"),d?this.style.setProperty("--scb-calendar-card-spacing-block-end",d):this.style.removeProperty("--scb-calendar-card-spacing-block-end"),n?this.style.setProperty("--scb-calendar-card-spacing-inline-start",n):this.style.removeProperty("--scb-calendar-card-spacing-inline-start"),s?this.style.setProperty("--scb-calendar-card-spacing-inline-end",s):this.style.removeProperty("--scb-calendar-card-spacing-inline-end")}updated(e){e.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("minWidth")&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty("min-inline-size")),e.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),e.has("minHeight")&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty("min-block-size")),(e.has("width")||e.has("height")||e.has("maxHeight")||e.has("sizing"))&&this.__applyInnerSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}},p.styles=P`:host{--scb-cards-title-font-weight-current:var(--scb-calendar-card-design-title-large-font-weight);--scb-cards-title-letter-spacing-current:var(--scb-calendar-card-design-title-large-letter-spacing);--scb-cards-title-line-height-current:var(--scb-calendar-card-design-title-large-line-height);--scb-cards-title-tracking-current:var(--scb-calendar-card-design-title-large-tracking);--scb-cards-title-weight-current:var(--scb-calendar-card-design-title-large-weight);--scb-cards-title-size-current:var(--scb-calendar-card-design-title-large-size);--scb-cards-title-font-current:var(--scb-calendar-card-design-title-large-font);--scb-cards-subtitle-font-weight-current:var(--scb-calendar-card-design-subtitle-large-font-weight);--scb-cards-subtitle-letter-spacing-current:var(--scb-calendar-card-design-subtitle-large-letter-spacing);--scb-cards-subtitle-line-height-current:var(--scb-calendar-card-design-subtitle-large-line-height);--scb-cards-subtitle-tracking-current:var(--scb-calendar-card-design-subtitle-large-tracking);--scb-cards-subtitle-weight-current:var(--scb-calendar-card-design-subtitle-large-weight);--scb-cards-subtitle-size-current:var(--scb-calendar-card-design-subtitle-large-size);--scb-cards-subtitle-font-current:var(--scb-calendar-card-design-subtitle-large-font);--scb-cards-supporting-font-weight-current:var(--scb-calendar-card-design-supporting-large-font-weight);--scb-cards-supporting-letter-spacing-current:var(--scb-calendar-card-design-supporting-large-letter-spacing);--scb-cards-supporting-line-height-current:var(--scb-calendar-card-design-supporting-large-line-height);--scb-cards-supporting-tracking-current:var(--scb-calendar-card-design-supporting-large-tracking);--scb-cards-supporting-weight-current:var(--scb-calendar-card-design-supporting-large-weight);--scb-cards-supporting-size-current:var(--scb-calendar-card-design-supporting-large-size);--scb-cards-supporting-font-current:var(--scb-calendar-card-design-supporting-large-font);display:block;position:relative;box-sizing:border-box;inline-size:100%;min-inline-size:0;padding:var(--scb-calendar-card-focus-ring-gap, 4px);margin-block-start:var(--scb-calendar-card-spacing-block-start, 0);margin-block-end:var(--scb-calendar-card-spacing-block-end, 0);margin-inline-start:var(--scb-calendar-card-spacing-inline-start, 0);margin-inline-end:var(--scb-calendar-card-spacing-inline-end, 0);--scb-calendar-card-padding-block:var(--scb-calendar-card-padding, var(--scb-calendar-card-design-content-padding-block-large));--scb-calendar-card-padding-inline:var(--scb-calendar-card-padding, var(--scb-calendar-card-design-content-padding-inline-large));--scb-calendar-card-surface-radius:var(--scb-calendar-card-design-surface-radius-large);--scb-calendar-card-border-width:var(--scb-calendar-card-design-surface-border-width-large);--scb-calendar-card-gap:var(--scb-calendar-card-design-calendar-gap-large);--scb-calendar-card-horizontal-gap:var(--scb-calendar-card-design-calendar-horizontal-gap-large);--scb-calendar-card-horizontal-min-block-size:var(--scb-calendar-card-design-calendar-horizontal-min-height-large);--scb-calendar-card-unframed-state-gap:var(--spacing-2, 4px);--scb-calendar-card-unframed-state-color:color-mix(in srgb, currentColor 8%, transparent);--scb-calendar-card-media-size:var(--scb-calendar-card-design-calendar-media-size-large);--scb-calendar-card-media-radius:var(--scb-calendar-card-design-calendar-media-radius-large);--scb-calendar-card-media-gap:var(--scb-calendar-card-design-calendar-media-gap-large);--scb-calendar-card-day-size:var(--scb-calendar-card-design-calendar-date-day-text-large);--scb-calendar-card-day-letter-spacing:-0.6px;--scb-calendar-card-month-size:var(--scb-calendar-card-design-calendar-date-month-text-large);--scb-calendar-card-content-gap:var(--scb-calendar-card-design-calendar-content-gap-large);--scb-calendar-card-header-gap:var(--scb-calendar-card-design-calendar-title-gap-large);--scb-calendar-card-title-min-block-size:var(--scb-calendar-card-title-line-height);--scb-calendar-card-icon-size:var(--scb-calendar-card-design-calendar-icon-large);--scb-calendar-card-title-font-family:var(--scb-cards-title-font-current, var(--scb-typography-headline-small-font, var(--md-sys-typescale-headline-small-font, var(--brand-font, var(--brand, "Inter"), sans-serif))));--scb-calendar-card-title-font-size:var(--scb-cards-title-size-current, var(--scb-typography-headline-small-size, var(--md-sys-typescale-headline-small-size, 22px)));--scb-calendar-card-title-font-weight:var(--scb-cards-title-font-weight-current, var(--scb-cards-title-weight-current, var(--scb-typography-headline-small-weight, var(--md-sys-typescale-headline-small-weight, var(--weight-bold, 700)))));--scb-calendar-card-title-line-height:var(--scb-cards-title-line-height-current, var(--scb-typography-headline-small-line-height, var(--md-sys-typescale-headline-small-line-height, 28px)));--scb-calendar-card-title-letter-spacing:var(--scb-cards-title-letter-spacing-current, var(--scb-cards-title-tracking-current, var(--scb-typography-headline-small-tracking, var(--md-sys-typescale-headline-small-tracking, -0.5px))));--scb-calendar-card-subtitle-font-family:var(--scb-cards-subtitle-font-current, var(--scb-typography-title-medium-font, var(--md-sys-typescale-title-medium-font, var(--brand-font, var(--brand, "Inter"), sans-serif))));--scb-calendar-card-subtitle-font-size:var(--scb-cards-subtitle-size-current, var(--scb-typography-title-medium-size, var(--md-sys-typescale-title-medium-size, 18px)));--scb-calendar-card-subtitle-font-weight:var(--scb-cards-subtitle-font-weight-current, var(--scb-cards-subtitle-weight-current, var(--scb-typography-title-medium-weight, var(--md-sys-typescale-title-medium-weight, var(--weight-semibold, 600)))));--scb-calendar-card-subtitle-line-height:var(--scb-cards-subtitle-line-height-current, var(--scb-typography-title-medium-line-height, var(--md-sys-typescale-title-medium-line-height, 26px)));--scb-calendar-card-subtitle-letter-spacing:var(--scb-cards-subtitle-letter-spacing-current, var(--scb-cards-subtitle-tracking-current, var(--scb-typography-title-medium-tracking, var(--md-sys-typescale-title-medium-tracking, -0.3px))));--scb-calendar-card-supporting-font-family:var(--scb-cards-supporting-font-current, var(--scb-typography-body-large-font, var(--md-sys-typescale-body-large-font, var(--brand-font, var(--brand, "Inter"), sans-serif))));--scb-calendar-card-supporting-font-size:var(--scb-cards-supporting-size-current, var(--scb-typography-body-large-size, var(--md-sys-typescale-body-large-size, 18px)));--scb-calendar-card-supporting-font-weight:var(--scb-cards-supporting-font-weight-current, var(--scb-cards-supporting-weight-current, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400)))));--scb-calendar-card-supporting-line-height:var(--scb-cards-supporting-line-height-current, var(--scb-typography-body-large-line-height, var(--md-sys-typescale-body-large-line-height, 26px)));--scb-calendar-card-supporting-letter-spacing:var(--scb-cards-supporting-letter-spacing-current, var(--scb-cards-supporting-tracking-current, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, -0.3px))))}:host([sizing='stretch']){inline-size:100%;block-size:100%;max-inline-size:none}:host([sizing='content-width']){display:inline-block;inline-size:auto;block-size:auto}:host([sizing='content-width']) .calendar-card{inline-size:max-content}:host([sizing='content-height']){inline-size:100%;block-size:auto;max-inline-size:none}md-focus-ring{position:absolute;inset:0;pointer-events:none;display:none;border-radius:var(--scb-calendar-card-focus-ring-radius, var(--scb-calendar-card-surface-radius, var(--radius-large, 16px)))}.calendar-card:focus-visible+md-focus-ring{display:block}.calendar-card{box-sizing:border-box;overflow:hidden;position:relative;isolation:isolate;display:flex;color:var(--scb-calendar-card-content-color, var(--scb-cards-content-color, var(--md-sys-color-on-surface, var(--p-20))));font-family:var(--brand-font, var(--brand, "Inter"), sans-serif);font-style:normal;flex-direction:column;align-items:flex-start;gap:var(--scb-calendar-card-gap);align-self:stretch;transition:transform .18s ease,background-color .18s ease,border-color .18s ease;inline-size:100%;max-inline-size:100%}.calendar-card.clickable{cursor:pointer}.calendar-card.clickable.default{overflow:visible}.calendar-card.clickable.default::before{content:"";position:absolute;inset:calc(var(--scb-calendar-card-unframed-state-gap)*-1);border-radius:calc(var(--scb-calendar-card-surface-radius, var(--radius-l, 16px)) + var(--scb-calendar-card-unframed-state-gap));background:var(--scb-calendar-card-unframed-state-color);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:0}.calendar-card.clickable.default:hover::before{opacity:1}.calendar-card.clickable.default>:not(md-ripple){position:relative;z-index:1}.calendar-card,.calendar-card .subtitle,.calendar-card .supporting-text,.calendar-card .title{font-variant-numeric:proportional-nums;font-feature-settings:"tnum"0,"pnum"1}.calendar-card:focus,.calendar-card:focus-visible{outline:0}.calendar-card.horizontal{flex-direction:row;align-items:flex-start;max-width:none;width:100%;gap:var(--scb-calendar-card-horizontal-gap);min-block-size:var(--scb-calendar-card-horizontal-min-block-size)}.calendar-card.outlined{border-radius:var(--scb-calendar-card-surface-radius, var(--radius-large, 16px));border:var(--scb-calendar-card-border-width, 1px) solid var(--scb-cards-outline-color, var(--md-sys-color-outline-variant, var(--n-80)));background:var(--scb-calendar-card-surface-color, var(--scb-cards-surface-color, var(--md-sys-color-surface, var(--nv-100))));padding-block:var(--scb-calendar-card-padding-block);padding-inline:var(--scb-calendar-card-padding-inline)}.calendar-card.filled,.media{background:var(--scb-cards-filled-surface-color, var(--md-sys-color-surface-dim, var(--nv-95)))}.calendar-card.filled{border-radius:var(--scb-calendar-card-surface-radius, var(--radius-large, 16px));padding-block:var(--scb-calendar-card-padding-block);padding-inline:var(--scb-calendar-card-padding-inline)}.calendar-card.filled .media{background:var(--scb-calendar-card-media-surface-color, var(--md-sys-color-surface, var(--nv-100)))}md-ripple{border-radius:var(--scb-calendar-card-surface-radius, var(--radius-l, 16px))}.calendar-card.clickable.default md-ripple{position:absolute;inset:calc(var(--scb-calendar-card-unframed-state-gap)*-1);border-radius:calc(var(--scb-calendar-card-surface-radius, var(--radius-l, 16px)) + var(--scb-calendar-card-unframed-state-gap));z-index:2}.media{width:var(--scb-calendar-card-media-size);min-width:var(--scb-calendar-card-media-size);max-width:var(--scb-calendar-card-media-size);height:var(--scb-calendar-card-media-size);padding:var(--spacing-0, 0)0;justify-content:center;align-items:center;gap:var(--scb-calendar-card-media-gap);border-radius:var(--scb-calendar-card-media-radius, var(--md-sys-shape-corner-small))}.calendar-card.horizontal .media{align-self:flex-start}.media .day{font-size:var(--scb-calendar-card-day-size);font-weight:var(--weight-bold, 700);line-height:100%;letter-spacing:var(--scb-calendar-card-day-letter-spacing);font-variant-numeric:tabular-nums}.media .month{font-size:var(--scb-calendar-card-month-size);font-weight:var(--weight-regular, 400);line-height:100%}.container,.header-container,.media{display:flex;flex-direction:column}.container{flex:1 1 auto;min-width:0;gap:var(--scb-calendar-card-content-gap);width:100%;align-self:flex-start}.header-container{gap:var(--scb-calendar-card-header-gap)}.title-container{width:100%;flex:0 0 auto;display:flex;align-items:center;gap:var(--spacing-3, 8px);color:inherit;text-decoration:none;min-block-size:var(--scb-calendar-card-title-min-block-size)}.title{font-family:var(--scb-calendar-card-title-font-family);font-size:var(--scb-calendar-card-title-font-size);font-weight:var(--scb-calendar-card-title-font-weight);line-height:var(--scb-calendar-card-title-line-height);letter-spacing:var(--scb-calendar-card-title-letter-spacing);flex:1 1 auto;min-inline-size:0;white-space:normal;word-break:normal;overflow-wrap:break-word;hyphens:auto;overflow:visible;text-overflow:clip}.title-container .calendar-card-icon{inline-size:var(--scb-calendar-card-icon-size);block-size:var(--scb-calendar-card-icon-size);flex:0 0 auto}.calendar-card-icon,.icon-container{align-items:center;justify-content:center}.icon-container{display:flex;width:var(--spacing-7, 24px);height:var(--spacing-7, 24px)}.calendar-card-icon{display:inline-flex;overflow:hidden;font-family:"Material Symbols Outlined";font-size:var(--icon-size-medium, 24px);line-height:1;white-space:nowrap;text-transform:none;word-wrap:normal;direction:ltr;font-variation-settings:normal;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.calendar-card-icon.scb-svg-icon{fill:currentColor;font:inherit}.subtitle,.supporting-text{font-family:var(--scb-calendar-card-subtitle-font-family);font-size:var(--scb-calendar-card-subtitle-font-size);font-weight:var(--scb-calendar-card-subtitle-font-weight);line-height:var(--scb-calendar-card-subtitle-line-height);letter-spacing:var(--scb-calendar-card-subtitle-letter-spacing);white-space:normal;word-break:normal;overflow-wrap:break-word;hyphens:manual;overflow:visible;text-overflow:clip}.supporting-text{font-family:var(--scb-calendar-card-supporting-font-family);font-size:var(--scb-calendar-card-supporting-font-size);font-weight:var(--scb-calendar-card-supporting-font-weight);line-height:var(--scb-calendar-card-supporting-line-height);letter-spacing:var(--scb-calendar-card-supporting-letter-spacing)}.title ::slotted(*){margin:0;color:inherit;font-family:var(--scb-calendar-card-title-font-family)!important;font-size:var(--scb-calendar-card-title-font-size)!important;font-weight:var(--scb-calendar-card-title-font-weight)!important;line-height:var(--scb-calendar-card-title-line-height)!important;letter-spacing:var(--scb-calendar-card-title-letter-spacing)!important}.subtitle ::slotted(*){margin:0;color:inherit;font-family:var(--scb-calendar-card-subtitle-font-family)!important;font-size:var(--scb-calendar-card-subtitle-font-size)!important;font-weight:var(--scb-calendar-card-subtitle-font-weight)!important;line-height:var(--scb-calendar-card-subtitle-line-height)!important;letter-spacing:var(--scb-calendar-card-subtitle-letter-spacing)!important}.supporting-text ::slotted(*){margin:0;color:inherit;font-family:var(--scb-calendar-card-supporting-font-family)!important;font-size:var(--scb-calendar-card-supporting-font-size)!important;font-weight:var(--scb-calendar-card-supporting-font-weight)!important;line-height:var(--scb-calendar-card-supporting-line-height)!important;letter-spacing:var(--scb-calendar-card-supporting-letter-spacing)!important}.supporting-text ::slotted(*),.supporting-text ::slotted(scb-link){--scb-link-font-size:var(--scb-calendar-card-supporting-font-size);--scb-link-line-height:var(--scb-calendar-card-supporting-line-height);--scb-link-letter-spacing:var(--scb-calendar-card-supporting-letter-spacing)}:host{--scb-calendar-card-design-content-padding-block-large:var(--scb-cards-content-padding-block-large, var(--spacing-7, 24px));--scb-calendar-card-design-content-padding-inline-large:var(--scb-cards-content-padding-block-large, var(--spacing-7, 24px));--scb-calendar-card-design-surface-radius-large:var(--scb-cards-surface-radius-large, var(--radius-large, 16px));--scb-calendar-card-design-surface-border-width-large:var(--scb-cards-border-width-large, var(--stroke-border, 1px));--scb-calendar-card-design-calendar-gap-large:var(--scb-cards-calendar-gap-large, var(--spacing-4, 12px));--scb-calendar-card-design-calendar-horizontal-gap-large:var(--scb-cards-calendar-horizontal-gap-large, var(--spacing-6, 20px));--scb-calendar-card-design-calendar-horizontal-min-height-large:var(--scb-cards-calendar-horizontal-min-block-size-large, 112px);--scb-calendar-card-design-calendar-media-size-large:var(--scb-cards-calendar-media-size-large, var(--spacing-11, 64px));--scb-calendar-card-design-calendar-media-radius-large:var(--scb-cards-calendar-media-radius-large, var(--radius-small, 8px));--scb-calendar-card-design-calendar-media-gap-large:var(--scb-cards-calendar-media-gap-large, var(--spacing-2, 4px));--scb-calendar-card-design-calendar-date-day-text-large:var(--scb-cards-calendar-date-day-size-large, var(--scale-07, 28px));--scb-calendar-card-design-calendar-date-month-text-large:var(--scb-cards-calendar-date-month-size-large, var(--scale-02, 14px));--scb-calendar-card-design-calendar-content-gap-large:var(--scb-cards-calendar-content-gap-large, var(--spacing-4, 12px));--scb-calendar-card-design-calendar-title-gap-large:var(--scb-cards-calendar-title-gap-large, var(--spacing-2, 4px));--scb-calendar-card-design-calendar-icon-large:var(--scb-cards-calendar-icon-size-large, var(--icon-size-medium, 24px));--scb-calendar-card-design-title-large-font:var(--scb-cards-title-large-font, var(--scb-typography-headline-small-font, var(--md-sys-typescale-headline-small-font, var(--brand))));--scb-calendar-card-design-title-large-size:var(--scb-cards-title-large-size, var(--scb-typography-headline-small-size, var(--md-sys-typescale-headline-small-size, 20px)));--scb-calendar-card-design-title-large-line-height:var(--scb-cards-title-large-line-height, var(--scb-typography-headline-small-line-height, var(--md-sys-typescale-headline-small-line-height, 28px)));--scb-calendar-card-design-title-large-tracking:var(--scb-cards-title-large-tracking, var(--scb-typography-headline-small-tracking, var(--md-sys-typescale-headline-small-tracking, var(--tracking-07, -0.5px))));--scb-calendar-card-design-title-large-weight:var(--scb-cards-title-large-weight, var(--scb-typography-headline-small-weight, var(--md-sys-typescale-headline-small-weight, var(--weight-bold, 700))));--scb-calendar-card-design-title-large-letter-spacing:var(--scb-cards-title-large-letter-spacing, var(--scb-cards-title-large-tracking, var(--scb-typography-headline-small-tracking, var(--md-sys-typescale-headline-small-tracking, var(--tracking-07, -0.5px)))));--scb-calendar-card-design-title-large-font-weight:var(--scb-cards-title-large-font-weight, var(--scb-cards-title-large-weight, var(--scb-typography-headline-small-weight, var(--md-sys-typescale-headline-small-weight, var(--weight-bold, 700)))));--scb-calendar-card-design-subtitle-large-font:var(--scb-cards-subtitle-large-font, var(--scb-typography-title-medium-font, var(--md-sys-typescale-title-medium-font, var(--brand))));--scb-calendar-card-design-subtitle-large-size:var(--scb-cards-subtitle-large-size, var(--scb-typography-title-medium-size, var(--md-sys-typescale-title-medium-size, 18px)));--scb-calendar-card-design-subtitle-large-line-height:var(--scb-cards-subtitle-large-line-height, var(--scb-typography-title-medium-line-height, var(--md-sys-typescale-title-medium-line-height, 26px)));--scb-calendar-card-design-subtitle-large-tracking:var(--scb-cards-subtitle-large-tracking, var(--scb-typography-title-medium-tracking, var(--md-sys-typescale-title-medium-tracking, var(--tracking-05, -0.3px))));--scb-calendar-card-design-subtitle-large-weight:var(--scb-cards-subtitle-large-weight, var(--scb-typography-title-medium-weight, var(--md-sys-typescale-title-medium-weight, var(--weight-semibold, 600))));--scb-calendar-card-design-subtitle-large-letter-spacing:var(--scb-cards-subtitle-large-letter-spacing, var(--scb-cards-subtitle-large-tracking, var(--scb-typography-title-medium-tracking, var(--md-sys-typescale-title-medium-tracking, var(--tracking-05, -0.3px)))));--scb-calendar-card-design-subtitle-large-font-weight:var(--scb-cards-subtitle-large-font-weight, var(--scb-cards-subtitle-large-weight, var(--scb-typography-title-medium-weight, var(--md-sys-typescale-title-medium-weight, var(--weight-semibold, 600)))));--scb-calendar-card-design-supporting-large-font:var(--scb-cards-supporting-large-font, var(--scb-typography-body-large-font, var(--md-sys-typescale-body-large-font, var(--brand))));--scb-calendar-card-design-supporting-large-size:var(--scb-cards-supporting-large-size, var(--scb-typography-body-large-size, var(--md-sys-typescale-body-large-size, 18px)));--scb-calendar-card-design-supporting-large-line-height:var(--scb-cards-supporting-large-line-height, var(--scb-typography-body-large-line-height, var(--md-sys-typescale-body-large-line-height, 26px)));--scb-calendar-card-design-supporting-large-tracking:var(--scb-cards-supporting-large-tracking, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, var(--tracking-05, -0.3px))));--scb-calendar-card-design-supporting-large-weight:var(--scb-cards-supporting-large-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400))));--scb-calendar-card-design-supporting-large-letter-spacing:var(--scb-cards-supporting-large-letter-spacing, var(--scb-cards-supporting-large-tracking, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, var(--tracking-05, -0.3px)))));--scb-calendar-card-design-supporting-large-font-weight:var(--scb-cards-supporting-large-font-weight, var(--scb-cards-supporting-large-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400)))))}`,p);r([t({type:String,reflect:!0})],a.prototype,"variant",void 0);r([t({type:String,attribute:"date"})],a.prototype,"date",void 0);r([t({type:String,reflect:!0})],a.prototype,"direction",void 0);r([t({type:String,reflect:!0,converter:g})],a.prototype,"title",void 0);r([t({type:String,attribute:"calendar-card-title",reflect:!0,converter:g})],a.prototype,"calendarCardTitle",void 0);r([t({type:String,reflect:!0,converter:g})],a.prototype,"subtitle",void 0);r([t({type:String,attribute:"supporting-text",reflect:!0,converter:g})],a.prototype,"supportingText",void 0);r([t({type:String,attribute:"card-href"})],a.prototype,"cardHref",void 0);r([t({type:String,attribute:"card-href-nav"})],a.prototype,"cardHrefNav",void 0);r([t({type:Boolean,reflect:!0,attribute:"show-media"})],a.prototype,"showMedia",void 0);r([t({type:String,attribute:"date-label-prefix"})],a.prototype,"dateLabelPrefix",void 0);r([t({type:String,attribute:"media-width"})],a.prototype,"mediaWidth",void 0);r([t({type:String,attribute:"media-height"})],a.prototype,"mediaHeight",void 0);r([t({type:String,attribute:"media-aspect"})],a.prototype,"mediaAspect",void 0);r([t({type:String,reflect:!0})],a.prototype,"width",void 0);r([t({type:String,reflect:!0,attribute:"max-width"})],a.prototype,"maxWidth",void 0);r([t({type:String,attribute:"min-width"})],a.prototype,"minWidth",void 0);r([t({type:String,reflect:!0})],a.prototype,"height",void 0);r([t({type:String,reflect:!0,attribute:"max-height"})],a.prototype,"maxHeight",void 0);r([t({type:String,attribute:"min-height"})],a.prototype,"minHeight",void 0);r([t({type:String,reflect:!0,converter:g})],a.prototype,"sizing",void 0);r([t({type:String,reflect:!0})],a.prototype,"spacing",void 0);r([t({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",void 0);r([t({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",void 0);r([t({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",void 0);r([t({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",void 0);a=r([C("scb-calendar-card")],a);
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../shared/lazy-focus-ring.js","../../vendor/preload-helper.js","../shared/lazy-ripple.js","../scb-list/scb-list.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../../vendor/component-defaults.js","../../vendor/decorate.js","../scb-list/scb-list-item.js","../shared/component-size-token.js","../scb-icon-button/scb-icon-button.js","../../vendor/assertClassBrand.js","../../vendor/classPrivateMethodInitSpec.js","../scb-button/scb-button.js","../scb-link/scb-link.js","../../vendor/classPrivateFieldGet2.js","../scb-chip/scb-chip.js","../scb-avatar/scb-avatar.js","../scb-tooltip/scb-tooltip.js","../../vendor/icon.js","../../vendor/rolldown-runtime.js","../shared/manual-popover.js","../../vendor/scb-card-variants.internal.js"])))=>i.map(i=>d[i]);
2
- import{g as l,h as ye,m as y,p as r,v as o,y as fe}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as m}from"../../vendor/preload-helper.js";import{componentSizeToken as ze}from"../shared/component-size-token.js";import{t as xe}from"../../vendor/component-defaults.js";import{t as s}from"../../vendor/decorate.js";(function(){try{var g=typeof globalThis<"u"?globalThis:window;if(!g.__scb_ce_guard_installed__){g.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,i,c){try{customElements.get(e)||t(e,i,c)}catch(p){var d=String(p||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var C,ke=new Set(["social-comments-text","social-comments","social-comments-disabled","social-comments-href","social-comments-link-label","social-likes-text","social-like-label","social-likes","social-likes-disabled","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href","social-reply-enabled","social-reply-label","social-edit-enabled","social-edit-label","social-delete-enabled","social-delete-label"]),z="data-scb-card-managed-list-size",x="data-scb-card-managed-action-button-size",R="data-scb-card-managed-avatar-size",we=new Set(["small","medium","large"]),_e=new Set(["small","medium","large","extra-large"]),$,P,E,B,D,I,H,O,V,N;function Se(){return O??(O=m(()=>import("../shared/lazy-focus-ring.js"),__vite__mapDeps([0,1]),import.meta.url)),O}function U(){return V??(V=m(()=>import("../shared/lazy-ripple.js"),__vite__mapDeps([2,1]),import.meta.url)),V}function Ae(){return $??($=m(()=>import("../scb-list/scb-list.js"),__vite__mapDeps([3,4,5,6,7,8,1,9]),import.meta.url)),$}function Te(){return P??(P=m(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([10,4,5,1,6,7,11,12]),import.meta.url)),P}function Le(){return E??(E=m(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([13,4,5,1,6,7,11,12]),import.meta.url)),E}function Ce(){return B??(B=m(()=>import("../scb-link/scb-link.js"),__vite__mapDeps([14,4,5,0,1,7,11,12,15]),import.meta.url)),B}function Re(){return D??(D=m(()=>import("../scb-chip/scb-chip.js"),__vite__mapDeps([16,4,5,1,7,11,12]),import.meta.url)),D}function $e(){return I??(I=m(()=>import("../scb-avatar/scb-avatar.js"),__vite__mapDeps([17,4,5,1,6,7,11,12]),import.meta.url)),I}function Pe(){return H??(H=m(()=>import("../scb-tooltip/scb-tooltip.js"),__vite__mapDeps([18,4,5,19,20,1,9,7,21]),import.meta.url)),H}function Ee(){return N??(N=m(()=>import("../../vendor/scb-card-variants.internal.js"),__vite__mapDeps([22,4,5]),import.meta.url)),N}var n={fromAttribute:g=>g??"",toAttribute:g=>typeof g!="string"||g.trim()===""?null:g},a=(C=class extends ye{constructor(...t){super(...t),this.__dependencyKey="",this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size=xe["scb-card"].size,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.cardTitle="",this.subtitle="",this.vignette="",this.vignetteVariant="filled",this.vignetteSpacing=void 0,this.vignetteSpacingTop=void 0,this.vignetteSpacingBottom=void 0,this.vignetteSpacingLeft=void 0,this.vignetteSpacingRight=void 0,this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.commentsLinkLabel="Gå till kommentarer",this.likesText="",this.likeLabel="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.replyLabel="Svara",this.editEnabled=!1,this.editLabel="Redigera",this.deleteEnabled=!1,this.deleteLabel="Ta bort",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 i=e.currentTarget.closest(".media");i&&i.classList.add("is-loaded")},this.__ensureRippleOnInteraction=(e,i=!1)=>{if(this.__primaryHref()){if(e&&(this.__pendingRippleEvent=e),i&&(this.__pendingRippleClick=!0),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,U().then(({ensureRippleReady:c})=>c()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}},this.__syncRipple=async()=>{const e=this.renderRoot.querySelector("md-ripple"),i=this.renderRoot.querySelector(".scb-card"),c=this.__pendingRippleEvent,d=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:p}=await U();await p(e,i,c,d)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,Se().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=e=>{if(e.target!==e.currentTarget)return;const i=this.__primaryHref();(e.key==="Enter"||e.key===" ")&&i&&(e.preventDefault(),this.__ensureRippleOnInteraction(void 0,!0),this.__navigate(i,e))},this.__handleHrefNavigation=e=>{const i=this.__primaryHref();i&&(e.target.closest("a")||this.__navigate(i,e))},this.__handleSlottedCardLinkClick=e=>{const i=e.composedPath().find(c=>c instanceof HTMLAnchorElement&&c.getAttribute("slot")==="card-link")?.getAttribute("href")||this.__primaryHref();i&&(this.__dispatchCardNavigate(i,e)||e.preventDefault())}}attributeChangedCallback(t,e,i){this.__isSyncingManagedSocialAttributes&&ke.has(t)||super.attributeChangedCallback(t,e,i)}get likeButton(){return this.cardType!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(t){const e=(t||"").trim();if(!e)return{w:600,h:400};const i=e.includes("/")?e.split("/"):e.includes(":")?e.split(":"):e.includes("x")?e.split("x"):null;if(i&&i.length===2){const d=Number(i[0]),p=Number(i[1]);if(d>0&&p>0)return{w:d,h:p}}const c=Number(e);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:600,h:400}}__mediaReserveAspect(t=""){const e=(this.mediaAspect||"").trim();if(e)return e;const i=Number(this.mediaWidth)||0,c=Number(this.mediaHeight)||0;return i>0&&c>0?`${i} / ${c}`:t}__mediaReserveStyle(t=""){const e=this.__mediaReserveAspect(t);return e?`--scb-card-media-aspect:${e};`:""}__slottedMediaAspect(){const t=this.querySelector('[slot="media"]');if(!t)return"";const e=Number(t.getAttribute("width"))||0,i=Number(t.getAttribute("height"))||0;return e>0&&i>0?`${e} / ${i}`:""}__isAvatarMedia(){return(this.mediaType||"").toLowerCase()==="avatar"?!0:this.querySelector(':scope > [slot="media"]')?.localName==="scb-avatar"}get __resolvedTitle(){return this.cardTitle||this.title}get cardType(){const t=(this.type||"standard").toLowerCase();switch(t){case"standard":case"list":case"social":case"link":case"action":case"container":return t;default:return"standard"}}__ensureVariantRenderer(){return this.cardType==="standard"||this.__variantRenderer?Promise.resolve():Ee().then(t=>{this.__variantRenderer!==t&&(this.__variantRenderer=t,t.ensureScbCardVariantStyles(this.renderRoot),this.requestUpdate())})}__dispatchCardNavigate(t,e){const i={href:t,originalEvent:e},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const d=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});return this.dispatchEvent(d),!d.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__slottedCardLink(){return this.querySelector(':scope > a[slot="card-link"]')}__primaryHref(){return this.__effectiveHref()||this.__slottedCardLink()?.getAttribute("href")||""}__navigate(t,e){t&&this.__dispatchCardNavigate(t,e)&&window.open(t,"_self")}__slotNames(){const t=new Set;for(const e of Array.from(this.children)){const i=e.getAttribute("slot");i&&t.add(i)}return t}__hasSlottedContent(t,e){return e?e.has(t):Array.from(this.children).some(i=>i.getAttribute("slot")===t)}__hasLightDomElement(t){return!!this.querySelector(t)}__syncListCardListSize(){const t=Array.from(this.querySelectorAll("scb-list"));if(this.cardType!=="list"){for(const i of t){const c=i.getAttribute(z);c!==null&&i.getAttribute("size")===c&&i.removeAttribute("size"),i.removeAttribute(z)}return}const e=this.size||"large";for(const i of t){const c=i.getAttribute(z);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(z);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",e),i.setAttribute(z,e))}}__actionCardButtonSize(){const t=getComputedStyle(this).getPropertyValue("--scb-card-size-actions-button-size").trim();return we.has(t)?t:"medium"}__cardAvatarSize(){const t=getComputedStyle(this).getPropertyValue("--scb-card-size-avatar-component-size").trim();return _e.has(t)?t:"medium"}__syncAvatarSizes(){const t=Array.from(this.querySelectorAll(':scope > scb-avatar[slot="media"]')),e=this.__cardAvatarSize();for(const i of t){const c=i.getAttribute(R);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(R);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",e),i.setAttribute(R,e))}}__socialIconButtonSize(){return ze(this,"--scb-card-size-social-icon-button-component-size",["tiny","extra-small","small","medium","large"],this.size==="small"?"small":"medium")}__syncActionCardButtonSizes(){const t=Array.from(this.querySelectorAll(':scope > [slot="actions"] scb-button, :scope > scb-button[slot="actions"]'));if(this.cardType!=="action"){for(const i of t){const c=i.getAttribute(x);c!==null&&i.getAttribute("size")===c&&i.removeAttribute("size"),i.removeAttribute(x)}return}const e=this.__actionCardButtonSize();for(const i of t){const c=i.getAttribute(x);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(x);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",e),i.setAttribute(x,e))}}__slottedText(t){return(this.querySelector(`:scope > [slot="${t}"]`)?.textContent??"").replace(/\s+/g," ").trim()}__ensureDependenciesReady(){const t=[],e=[],i=this.cardType,c=!!this.vignette?.trim(),d=(v,h)=>{e.push(v),t.push(h())};(i==="list"||this.__hasLightDomElement("scb-list, scb-list-item"))&&d("list",Ae),i!=="standard"&&d("card-variants",()=>this.__ensureVariantRenderer()),(i==="social"&&(!this.likesDisabled&&this.likesInteractive||!this.commentsDisabled&&this.commentsHref||this.replyEnabled||this.editEnabled||this.deleteEnabled)||this.__hasLightDomElement("scb-icon-button"))&&d("icon-button",Te),this.__hasLightDomElement("scb-button")&&d("button",Le),this.__hasLightDomElement("scb-link")&&d("link",Ce),(c||this.__hasLightDomElement("scb-chip"))&&d("chip",Re),((this.mediaType||"").toLowerCase()==="avatar"||this.__hasLightDomElement("scb-avatar"))&&d("avatar",$e),(i==="social"&&this.likesHoverContent||this.__hasLightDomElement("scb-tooltip"))&&d("tooltip",Pe);const p=e.sort().join("|");p!==this.__dependencyKey&&(this.__dependencyKey=p,t.length>0&&Promise.all(t).then(()=>this.requestUpdate()))}__mediaTemplate(t){const e=this.__isAvatarMedia();if(this.__hasSlottedContent("media",t)){const i=e?"":this.__mediaReserveStyle(this.__slottedMediaAspect());return o`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/lazy-focus-ring.js","../../vendor/rolldown-runtime.js","../../vendor/preload-helper.js","../../vendor/lazy-ripple.js","../scb-list/scb-list.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../../vendor/component-defaults.js","../../vendor/decorate.js","../scb-list/scb-list-item.js","../../vendor/component-size-token.js","../scb-icon-button/scb-icon-button.js","../../vendor/assertClassBrand.js","../../vendor/classPrivateMethodInitSpec.js","../scb-button/scb-button.js","../scb-link/scb-link.js","../../vendor/classPrivateFieldGet2.js","../scb-chip/scb-chip.js","../scb-avatar/scb-avatar.js","../scb-tooltip/scb-tooltip.js","../../vendor/icon.js","../../vendor/manual-popover.js","../../vendor/scb-card-variants.internal.js"])))=>i.map(i=>d[i]);
2
+ import{g as l,h as ye,m as y,p as r,v as o,y as fe}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as m}from"../../vendor/preload-helper.js";import{t as ze}from"../../vendor/component-size-token.js";import{t as xe}from"../../vendor/component-defaults.js";import{t as s}from"../../vendor/decorate.js";(function(){try{var g=typeof globalThis<"u"?globalThis:window;if(!g.__scb_ce_guard_installed__){g.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,i,c){try{customElements.get(e)||t(e,i,c)}catch(p){var d=String(p||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var C,ke=new Set(["social-comments-text","social-comments","social-comments-disabled","social-comments-href","social-comments-link-label","social-likes-text","social-like-label","social-likes","social-likes-disabled","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href","social-reply-enabled","social-reply-label","social-edit-enabled","social-edit-label","social-delete-enabled","social-delete-label"]),z="data-scb-card-managed-list-size",x="data-scb-card-managed-action-button-size",R="data-scb-card-managed-avatar-size",we=new Set(["small","medium","large"]),_e=new Set(["small","medium","large","extra-large"]),$,P,E,B,D,I,H,O,V,N;function Se(){return O??(O=m(()=>import("../../vendor/lazy-focus-ring.js").then(g=>g.i),__vite__mapDeps([0,1,2]),import.meta.url)),O}function U(){return V??(V=m(()=>import("../../vendor/lazy-ripple.js"),__vite__mapDeps([3,2]),import.meta.url)),V}function Ae(){return $??($=m(()=>import("../scb-list/scb-list.js"),__vite__mapDeps([4,5,6,7,8,9,2,10]),import.meta.url)),$}function Te(){return P??(P=m(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([11,5,6,2,7,8,12,13]),import.meta.url)),P}function Le(){return E??(E=m(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([14,5,6,2,7,8,12,13]),import.meta.url)),E}function Ce(){return B??(B=m(()=>import("../scb-link/scb-link.js"),__vite__mapDeps([15,5,6,0,1,2,8,12,13,16]),import.meta.url)),B}function Re(){return D??(D=m(()=>import("../scb-chip/scb-chip.js"),__vite__mapDeps([17,5,6,2,8,12,13]),import.meta.url)),D}function $e(){return I??(I=m(()=>import("../scb-avatar/scb-avatar.js"),__vite__mapDeps([18,5,6,2,7,8,12,13]),import.meta.url)),I}function Pe(){return H??(H=m(()=>import("../scb-tooltip/scb-tooltip.js"),__vite__mapDeps([19,5,6,20,1,2,10,8,21]),import.meta.url)),H}function Ee(){return N??(N=m(()=>import("../../vendor/scb-card-variants.internal.js"),__vite__mapDeps([22,5,6]),import.meta.url)),N}var n={fromAttribute:g=>g??"",toAttribute:g=>typeof g!="string"||g.trim()===""?null:g},a=(C=class extends ye{constructor(...t){super(...t),this.__dependencyKey="",this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size=xe["scb-card"].size,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.cardTitle="",this.subtitle="",this.vignette="",this.vignetteVariant="filled",this.vignetteSpacing=void 0,this.vignetteSpacingTop=void 0,this.vignetteSpacingBottom=void 0,this.vignetteSpacingLeft=void 0,this.vignetteSpacingRight=void 0,this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.commentsLinkLabel="Gå till kommentarer",this.likesText="",this.likeLabel="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.replyLabel="Svara",this.editEnabled=!1,this.editLabel="Redigera",this.deleteEnabled=!1,this.deleteLabel="Ta bort",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 i=e.currentTarget.closest(".media");i&&i.classList.add("is-loaded")},this.__ensureRippleOnInteraction=(e,i=!1)=>{if(this.__primaryHref()){if(e&&(this.__pendingRippleEvent=e),i&&(this.__pendingRippleClick=!0),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,U().then(({ensureRippleReady:c})=>c()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}},this.__syncRipple=async()=>{const e=this.renderRoot.querySelector("md-ripple"),i=this.renderRoot.querySelector(".scb-card"),c=this.__pendingRippleEvent,d=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:p}=await U();await p(e,i,c,d)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,Se().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=e=>{if(e.target!==e.currentTarget)return;const i=this.__primaryHref();(e.key==="Enter"||e.key===" ")&&i&&(e.preventDefault(),this.__ensureRippleOnInteraction(void 0,!0),this.__navigate(i,e))},this.__handleHrefNavigation=e=>{const i=this.__primaryHref();i&&(e.target.closest("a")||this.__navigate(i,e))},this.__handleSlottedCardLinkClick=e=>{const i=e.composedPath().find(c=>c instanceof HTMLAnchorElement&&c.getAttribute("slot")==="card-link")?.getAttribute("href")||this.__primaryHref();i&&(this.__dispatchCardNavigate(i,e)||e.preventDefault())}}attributeChangedCallback(t,e,i){this.__isSyncingManagedSocialAttributes&&ke.has(t)||super.attributeChangedCallback(t,e,i)}get likeButton(){return this.cardType!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(t){const e=(t||"").trim();if(!e)return{w:600,h:400};const i=e.includes("/")?e.split("/"):e.includes(":")?e.split(":"):e.includes("x")?e.split("x"):null;if(i&&i.length===2){const d=Number(i[0]),p=Number(i[1]);if(d>0&&p>0)return{w:d,h:p}}const c=Number(e);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:600,h:400}}__mediaReserveAspect(t=""){const e=(this.mediaAspect||"").trim();if(e)return e;const i=Number(this.mediaWidth)||0,c=Number(this.mediaHeight)||0;return i>0&&c>0?`${i} / ${c}`:t}__mediaReserveStyle(t=""){const e=this.__mediaReserveAspect(t);return e?`--scb-card-media-aspect:${e};`:""}__slottedMediaAspect(){const t=this.querySelector('[slot="media"]');if(!t)return"";const e=Number(t.getAttribute("width"))||0,i=Number(t.getAttribute("height"))||0;return e>0&&i>0?`${e} / ${i}`:""}__isAvatarMedia(){return(this.mediaType||"").toLowerCase()==="avatar"?!0:this.querySelector(':scope > [slot="media"]')?.localName==="scb-avatar"}get __resolvedTitle(){return this.cardTitle||this.title}get cardType(){const t=(this.type||"standard").toLowerCase();switch(t){case"standard":case"list":case"social":case"link":case"action":case"container":return t;default:return"standard"}}__ensureVariantRenderer(){return this.cardType==="standard"||this.__variantRenderer?Promise.resolve():Ee().then(t=>{this.__variantRenderer!==t&&(this.__variantRenderer=t,t.ensureScbCardVariantStyles(this.renderRoot),this.requestUpdate())})}__dispatchCardNavigate(t,e){const i={href:t,originalEvent:e},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const d=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});return this.dispatchEvent(d),!d.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__slottedCardLink(){return this.querySelector(':scope > a[slot="card-link"]')}__primaryHref(){return this.__effectiveHref()||this.__slottedCardLink()?.getAttribute("href")||""}__navigate(t,e){t&&this.__dispatchCardNavigate(t,e)&&window.open(t,"_self")}__slotNames(){const t=new Set;for(const e of Array.from(this.children)){const i=e.getAttribute("slot");i&&t.add(i)}return t}__hasSlottedContent(t,e){return e?e.has(t):Array.from(this.children).some(i=>i.getAttribute("slot")===t)}__hasLightDomElement(t){return!!this.querySelector(t)}__syncListCardListSize(){const t=Array.from(this.querySelectorAll("scb-list"));if(this.cardType!=="list"){for(const i of t){const c=i.getAttribute(z);c!==null&&i.getAttribute("size")===c&&i.removeAttribute("size"),i.removeAttribute(z)}return}const e=this.size||"large";for(const i of t){const c=i.getAttribute(z);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(z);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",e),i.setAttribute(z,e))}}__actionCardButtonSize(){const t=getComputedStyle(this).getPropertyValue("--scb-card-size-actions-button-size").trim();return we.has(t)?t:"medium"}__cardAvatarSize(){const t=getComputedStyle(this).getPropertyValue("--scb-card-size-avatar-component-size").trim();return _e.has(t)?t:"medium"}__syncAvatarSizes(){const t=Array.from(this.querySelectorAll(':scope > scb-avatar[slot="media"]')),e=this.__cardAvatarSize();for(const i of t){const c=i.getAttribute(R);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(R);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",e),i.setAttribute(R,e))}}__socialIconButtonSize(){return ze(this,"--scb-card-size-social-icon-button-component-size",["tiny","extra-small","small","medium","large"],this.size==="small"?"small":"medium")}__syncActionCardButtonSizes(){const t=Array.from(this.querySelectorAll(':scope > [slot="actions"] scb-button, :scope > scb-button[slot="actions"]'));if(this.cardType!=="action"){for(const i of t){const c=i.getAttribute(x);c!==null&&i.getAttribute("size")===c&&i.removeAttribute("size"),i.removeAttribute(x)}return}const e=this.__actionCardButtonSize();for(const i of t){const c=i.getAttribute(x);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(x);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",e),i.setAttribute(x,e))}}__slottedText(t){return(this.querySelector(`:scope > [slot="${t}"]`)?.textContent??"").replace(/\s+/g," ").trim()}__ensureDependenciesReady(){const t=[],e=[],i=this.cardType,c=!!this.vignette?.trim(),d=(v,h)=>{e.push(v),t.push(h())};(i==="list"||this.__hasLightDomElement("scb-list, scb-list-item"))&&d("list",Ae),i!=="standard"&&d("card-variants",()=>this.__ensureVariantRenderer()),(i==="social"&&(!this.likesDisabled&&this.likesInteractive||!this.commentsDisabled&&this.commentsHref||this.replyEnabled||this.editEnabled||this.deleteEnabled)||this.__hasLightDomElement("scb-icon-button"))&&d("icon-button",Te),this.__hasLightDomElement("scb-button")&&d("button",Le),this.__hasLightDomElement("scb-link")&&d("link",Ce),(c||this.__hasLightDomElement("scb-chip"))&&d("chip",Re),((this.mediaType||"").toLowerCase()==="avatar"||this.__hasLightDomElement("scb-avatar"))&&d("avatar",$e),(i==="social"&&this.likesHoverContent||this.__hasLightDomElement("scb-tooltip"))&&d("tooltip",Pe);const p=e.sort().join("|");p!==this.__dependencyKey&&(this.__dependencyKey=p,t.length>0&&Promise.all(t).then(()=>this.requestUpdate()))}__mediaTemplate(t){const e=this.__isAvatarMedia();if(this.__hasSlottedContent("media",t)){const i=e?"":this.__mediaReserveStyle(this.__slottedMediaAspect());return o`
3
3
  <div class="media ${e?"avatar-media":""} ${i?"has-reserved-space":""}" style=${i||l}>
4
4
  <slot name="media"></slot>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../scb-button/scb-button.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../../vendor/preload-helper.js","../../vendor/component-defaults.js","../../vendor/decorate.js","../../vendor/assertClassBrand.js","../../vendor/classPrivateMethodInitSpec.js"])))=>i.map(i=>d[i]);
2
- import{h as b,m as h,p as c,v,y}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as k}from"../../vendor/preload-helper.js";import{componentSizeToken as f}from"../shared/component-size-token.js";import{t as n}from"../../vendor/decorate.js";import{closeManualPopover as g,openManualPopover as _}from"../shared/manual-popover.js";(function(){try{var r=typeof globalThis<"u"?globalThis:window;if(!r.__scb_ce_guard_installed__){r.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,e,o){try{customElements.get(i)||t(i,e,o)}catch(l){var a=String(l||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var d,p,u="data-scb-cookies-consent-managed-button-size";function w(){return!!document.querySelector('script[src*="/scb-button/scb-button.js"],script[src$="scb-button.js"]')}var m={fromAttribute(r){if(r===null)return!1;const t=r.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!=="no"}},s=(d=class extends b{constructor(...t){super(...t),this.open=!0,this.autoRemove=!0,this.title="",this.supportingText="",this.ariaLabel="Cookie-inställningar",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._updateButtonWidth=()=>{const i=window.innerWidth<=480,e=this.shadowRoot.querySelector('slot[name="buttons"]');e&&e.assignedElements().forEach(o=>{i?o.setAttribute("full-width",""):o.removeAttribute("full-width")})},this.__onButtonHydrationInteraction=i=>{const e=i.target;e instanceof Element&&e.closest('scb-button[slot="buttons"]')&&this.__ensureSlottedButtonsReady(!0)},this.__onButtonsSlotChange=()=>{this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth()}}__syncButtonSizes(){const t=f(this,"--scb-cookies-consent-design-actions-button-size-medium",["small","medium","large"],"medium"),i=Array.from(this.querySelectorAll(':scope > scb-button[slot="buttons"]'));for(const e of i){const o=e.getAttribute(u);if(o!==null&&e.getAttribute("size")!==o){e.removeAttribute(u);continue}(!e.hasAttribute("size")||o!==null)&&(e.setAttribute("size",t),e.setAttribute(u,t))}}__ensureSlottedButtonsReady(t=!1){if(!(!this.querySelector('scb-button[slot="buttons"]')||customElements.get("scb-button"))){if(w()){customElements.whenDefined("scb-button").then(()=>this.requestUpdate());return}t&&(p??(p=k(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),p.then(()=>this.requestUpdate()))}}mapSpacingToken(t){if(!t)return;const i=String(t).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i}applySpacing(){const t=this.mapSpacingToken(this.spacing),i=this.mapSpacingToken(this.spacingTop)??t,e=this.mapSpacingToken(this.spacingBottom)??t,o=this.mapSpacingToken(this.spacingLeft),a=this.mapSpacingToken(this.spacingRight);i?this.style.setProperty("--scb-cookies-consent-spacing-block-start",i):this.style.removeProperty("--scb-cookies-consent-spacing-block-start"),e?this.style.setProperty("--scb-cookies-consent-spacing-block-end",e):this.style.removeProperty("--scb-cookies-consent-spacing-block-end"),o?this.style.setProperty("--scb-cookies-consent-spacing-inline-start",o):this.style.removeProperty("--scb-cookies-consent-spacing-inline-start"),a?this.style.setProperty("--scb-cookies-consent-spacing-inline-end",a):this.style.removeProperty("--scb-cookies-consent-spacing-inline-end")}firstUpdated(t){this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth(),window.addEventListener("resize",this._updateButtonWidth),this.addEventListener("pointerover",this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener("focusin",this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener("pointerdown",this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener("keydown",this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener("click",i=>{const e=i.target;e.slot==="buttons"&&(e.id==="accept-btn"?this.closeAndRemove("cookies-accept"):e.id==="decline-btn"?this.closeAndRemove("cookies-decline"):e.id==="handle-btn"&&this.closeAndRemove("cookies-handle"))}),this.applySpacing(),this.__syncTopLayer()}__syncTopLayer(){this.open&&getComputedStyle(this).position==="fixed"?_(this):g(this)}updated(t){super.updated(t),this.__syncButtonSizes(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.applySpacing(),t.has("open")&&(this.__syncTopLayer(),t.get("open")!==void 0&&(this.open&&this._updateButtonWidth(),this.dispatchEvent(new CustomEvent("openchange",{bubbles:!0,composed:!0,detail:{open:this.open}}))))}connectedCallback(){super.connectedCallback(),this.id||(this.id="cookie-consent")}disconnectedCallback(){g(this),super.disconnectedCallback(),window.removeEventListener("resize",this._updateButtonWidth),this.removeEventListener("pointerover",this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener("focusin",this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener("pointerdown",this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener("keydown",this.__onButtonHydrationInteraction,{capture:!0})}closeAndRemove(t){const i={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent(t,i));const e=t.includes("-")?t.replace(/-/g,""):"";e&&e!==t&&this.dispatchEvent(new CustomEvent(e,i)),this.autoRemove?this.remove():this.open=!1}render(){return this.open?v`
2
+ import{h as b,m as h,p as c,v,y}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as k}from"../../vendor/preload-helper.js";import{t as f}from"../../vendor/component-size-token.js";import{t as n}from"../../vendor/decorate.js";import{a as _,t as g}from"../../vendor/manual-popover.js";(function(){try{var r=typeof globalThis<"u"?globalThis:window;if(!r.__scb_ce_guard_installed__){r.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,e,o){try{customElements.get(i)||t(i,e,o)}catch(l){var a=String(l||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var d,p,u="data-scb-cookies-consent-managed-button-size";function w(){return!!document.querySelector('script[src*="/scb-button/scb-button.js"],script[src$="scb-button.js"]')}var m={fromAttribute(r){if(r===null)return!1;const t=r.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!=="no"}},s=(d=class extends b{constructor(...t){super(...t),this.open=!0,this.autoRemove=!0,this.title="",this.supportingText="",this.ariaLabel="Cookie-inställningar",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._updateButtonWidth=()=>{const i=window.innerWidth<=480,e=this.shadowRoot.querySelector('slot[name="buttons"]');e&&e.assignedElements().forEach(o=>{i?o.setAttribute("full-width",""):o.removeAttribute("full-width")})},this.__onButtonHydrationInteraction=i=>{const e=i.target;e instanceof Element&&e.closest('scb-button[slot="buttons"]')&&this.__ensureSlottedButtonsReady(!0)},this.__onButtonsSlotChange=()=>{this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth()}}__syncButtonSizes(){const t=f(this,"--scb-cookies-consent-design-actions-button-size-medium",["small","medium","large"],"medium"),i=Array.from(this.querySelectorAll(':scope > scb-button[slot="buttons"]'));for(const e of i){const o=e.getAttribute(u);if(o!==null&&e.getAttribute("size")!==o){e.removeAttribute(u);continue}(!e.hasAttribute("size")||o!==null)&&(e.setAttribute("size",t),e.setAttribute(u,t))}}__ensureSlottedButtonsReady(t=!1){if(!(!this.querySelector('scb-button[slot="buttons"]')||customElements.get("scb-button"))){if(w()){customElements.whenDefined("scb-button").then(()=>this.requestUpdate());return}t&&(p??(p=k(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),p.then(()=>this.requestUpdate()))}}mapSpacingToken(t){if(!t)return;const i=String(t).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i}applySpacing(){const t=this.mapSpacingToken(this.spacing),i=this.mapSpacingToken(this.spacingTop)??t,e=this.mapSpacingToken(this.spacingBottom)??t,o=this.mapSpacingToken(this.spacingLeft),a=this.mapSpacingToken(this.spacingRight);i?this.style.setProperty("--scb-cookies-consent-spacing-block-start",i):this.style.removeProperty("--scb-cookies-consent-spacing-block-start"),e?this.style.setProperty("--scb-cookies-consent-spacing-block-end",e):this.style.removeProperty("--scb-cookies-consent-spacing-block-end"),o?this.style.setProperty("--scb-cookies-consent-spacing-inline-start",o):this.style.removeProperty("--scb-cookies-consent-spacing-inline-start"),a?this.style.setProperty("--scb-cookies-consent-spacing-inline-end",a):this.style.removeProperty("--scb-cookies-consent-spacing-inline-end")}firstUpdated(t){this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth(),window.addEventListener("resize",this._updateButtonWidth),this.addEventListener("pointerover",this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener("focusin",this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener("pointerdown",this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener("keydown",this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener("click",i=>{const e=i.target;e.slot==="buttons"&&(e.id==="accept-btn"?this.closeAndRemove("cookies-accept"):e.id==="decline-btn"?this.closeAndRemove("cookies-decline"):e.id==="handle-btn"&&this.closeAndRemove("cookies-handle"))}),this.applySpacing(),this.__syncTopLayer()}__syncTopLayer(){this.open&&getComputedStyle(this).position==="fixed"?_(this):g(this)}updated(t){super.updated(t),this.__syncButtonSizes(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.applySpacing(),t.has("open")&&(this.__syncTopLayer(),t.get("open")!==void 0&&(this.open&&this._updateButtonWidth(),this.dispatchEvent(new CustomEvent("openchange",{bubbles:!0,composed:!0,detail:{open:this.open}}))))}connectedCallback(){super.connectedCallback(),this.id||(this.id="cookie-consent")}disconnectedCallback(){g(this),super.disconnectedCallback(),window.removeEventListener("resize",this._updateButtonWidth),this.removeEventListener("pointerover",this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener("focusin",this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener("pointerdown",this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener("keydown",this.__onButtonHydrationInteraction,{capture:!0})}closeAndRemove(t){const i={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent(t,i));const e=t.includes("-")?t.replace(/-/g,""):"";e&&e!==t&&this.dispatchEvent(new CustomEvent(e,i)),this.autoRemove?this.remove():this.open=!1}render(){return this.open?v`
3
3
  <div role="dialog" class="cookies-consent" aria-modal="true" aria-label=${this.ariaLabel}>
4
4
  <h2><slot name="title">${this.title}</slot></h2>
5
5
  <div class="supporting-text">
@@ -1,4 +1,4 @@
1
- import{g,h as x,m as w,p as c,v as d,y as E}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{componentSizeToken as _}from"../shared/component-size-token.js";import{t as l}from"../../vendor/decorate.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import{closeManualPopover as v,closeManualPopoverAfterAnimations as T,closeNestedPopupSurfaces as z,isManualPopoverOpen as C,openManualPopover as F}from"../shared/manual-popover.js";import"../scb-textfield/scb-textfield.js";import"../scb-checkbox/scb-checkbox.js";import"../scb-radio-button/scb-radio-button.js";import"../scb-switch/scb-switch.js";import"../scb-chip/scb-chip.js";(function(){try{var h=typeof globalThis<"u"?globalThis:window;if(!h.__scb_ce_guard_installed__){h.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,i,s){try{customElements.get(t)||e(t,i,s)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var m,a,k={fromAttribute(h){if(h===null)return!1;const e=h.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="no"}},b=new Set,y="",S="",r=(m=class extends x{constructor(...e){super(...e),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.closeLabel="Stäng dialog",this.formId="",this.formAction="",this.formMethod="",this.formEnctype="",this.__lastTriggerEl=null,this.__focusBeforeOpen=null,this.__stackInactive=!1,this.__submitting=!1,this.__redirectingFocus=!1,this.__scrollLocked=!1,this.__initialControlStates=new Map,this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())},this.__onDocumentKeydown=t=>{if(!this.open||t.key!=="Escape")return;const i=a.__getTopmostOpenDialog();i&&i!==this||this.__hasOpenNestedOverlay(t)||(t.preventDefault(),t.stopPropagation(),this.__fireCancelable("esc")&&this.__setOpen(!1))},this.__onDocumentFocusIn=t=>{this.__redirectingFocus||a.__getTopmostOpenDialog()!==this||t.composedPath().includes(this)||(this.__redirectingFocus=!0,queueMicrotask(()=>{this.__focusInitial(),this.__redirectingFocus=!1}))},this.__rememberInitialControlStates=()=>{for(const t of this.__getSlottedElements()){if(!(t instanceof HTMLElement)||this.__initialControlStates.has(t))continue;const i={},s=t;"value"in s&&(i.value=s.value),"checked"in s&&(i.checked=s.checked),"selected"in s&&(i.selected=s.selected),Object.keys(i).length>0&&this.__initialControlStates.set(t,i)}},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=()=>{const t=this.shadowRoot?.querySelector("form");t instanceof HTMLFormElement&&(this.__clearGeneratedFormValues(t),t.reset()),this.__rememberInitialControlStates();for(const[i,s]of this.__initialControlStates){if(!i.isConnected)continue;if(i instanceof HTMLInputElement){i.type==="file"?i.value="":i.value=i.defaultValue,i.checked=i.defaultChecked;continue}if(i instanceof HTMLTextAreaElement){i.value=i.defaultValue;continue}if(i instanceof HTMLSelectElement){for(const o of Array.from(i.options))o.selected=o.defaultSelected;continue}const n=i;n.formResetCallback?.(),"value"in s&&(n.value=s.value),"checked"in s&&(n.checked=s.checked),"selected"in s&&(n.selected=s.selected),n.requestUpdate?.()}this.__fire("reset")},this.__onSubmit=()=>{if(this.__submitting)return;const t=this.shadowRoot?.querySelector("form");if(t instanceof HTMLFormElement){if(!this.__validateFormAndSlottedFields(t))return;t.requestSubmit()}},this.__onFormSubmit=async t=>{const i=t.currentTarget;if(!(i instanceof HTMLFormElement)||(t.preventDefault(),t.stopPropagation(),this.__submitting)||!this.__validateFormAndSlottedFields(i))return;const s=this.__createFormData(i),n=this.__getFormMethod(),o=i.action;if(this.__fireCancelable("submit",{form:i,formData:s,method:n,action:o})){if(this.formAction.trim()&&(n==="PUT"||n==="DELETE")){const p=new AbortController;this.__submitAbortController=p,this.__submitting=!0,this.setAttribute("aria-busy","true");try{const u=await fetch(o,{method:n,body:s,credentials:"same-origin",signal:p.signal}),f={form:i,formData:s,method:n,action:o,response:u,status:u.status};if(!u.ok){this.__fire("submit-error",f);return}this.__fire("submit-success",f),this.open&&this.__setOpen(!1)}catch(u){u instanceof DOMException&&u.name==="AbortError"&&!this.isConnected||this.__fire("submit-error",{form:i,formData:s,method:n,action:o,error:u})}finally{this.__submitAbortController===p&&(this.__submitAbortController=void 0,this.__submitting=!1,this.removeAttribute("aria-busy"))}return}if(this.formAction.trim()){const p=f=>{this.__appendSlottedFiles(i,f.formData)},u=i.getAttribute("enctype");Array.from(s.values()).some(f=>f instanceof File)&&!this.formEnctype.trim()&&(i.enctype="multipart/form-data"),i.addEventListener("formdata",p,{once:!0});try{this.__setOpen(!1),HTMLFormElement.prototype.submit.call(i)}finally{i.removeEventListener("formdata",p),u===null?i.removeAttribute("enctype"):i.setAttribute("enctype",u)}return}this.__setOpen(!1)}},this.__onKeydownTrap=t=>{if(!this.open||t.key!=="Tab"||a.__getTopmostOpenDialog()&&a.__getTopmostOpenDialog()!==this)return;const i=this.__collectFocusableElements();if(!i.length)return;const s=i[0],n=i[i.length-1],o=this.__currentFocusableFromEvent(t,i);!o||!i.includes(o)?((t.shiftKey?n:s).focus(),t.preventDefault()):t.shiftKey&&o===s?(n.focus(),t.preventDefault()):!t.shiftKey&&o===n&&(s.focus(),t.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}__hasOpenNestedOverlay(e){const t="scb-options-menu, scb-dropdown, scb-select",i=s=>s instanceof Element&&s!==this&&s.matches(t)&&!!s.open;return e.composedPath().some(i)?!0:Array.from(this.querySelectorAll(t)).some(s=>!!s.open)}__isModalOverlay(){return!this.inSb&&!this.__usesInPlaceLayout()}static __getTopmostOpenDialog(){return[...a.__openDialogs].reverse().find(e=>e.open&&e.isConnected&&e.__isModalOverlay())}static __restoreBackgroundInert(){for(const[e,t]of a.__backgroundInertSnapshot)e.inert=t;a.__backgroundInertSnapshot.clear()}static __setBackgroundInert(e){if(a.__restoreBackgroundInert(),!e)return;let t=e;for(;;){const i=t.parentNode;if(i instanceof Element||i instanceof ShadowRoot)for(const s of Array.from(i.children))s===t||!(s instanceof HTMLElement)||(a.__backgroundInertSnapshot.set(s,s.inert),s.inert=!0);if(i instanceof ShadowRoot){t=i.host;continue}if(i instanceof Element){t=i;continue}break}}__getRequestedZIndex(){if(typeof this.zIndex=="number"&&Number.isFinite(this.zIndex))return Math.trunc(this.zIndex);const e=Number.parseInt(getComputedStyle(this).getPropertyValue("--scb-layer-dialog-scrim"),10);return Number.isFinite(e)?e:1e3}__setStackLayer(e){this.style.setProperty("--z-dialog-scrim",String(e)),this.style.setProperty("--z-dialog",String(e+1))}__setStackInactive(e){this.__stackInactive!==e&&(this.__stackInactive=e,this.requestUpdate())}static __syncModalStack(){a.__openDialogs=a.__openDialogs.filter(s=>s.open&&s.isConnected&&s.__isModalOverlay());const e=a.__getTopmostOpenDialog(),t=a.__openDialogs.map(s=>s.__getRequestedZIndex()),i=t.length?Math.max(...t):1e3;a.__openDialogs.forEach((s,n)=>{s.__setStackInactive(s!==e),s.__setStackLayer(i+n*2)}),a.__setBackgroundInert(e)}__registerOpenDialog(){this.__isModalOverlay()&&(a.__openDialogs=a.__openDialogs.filter(e=>e!==this),a.__openDialogs.push(this),a.__syncModalStack())}__unregisterOpenDialog(){const e=[...a.__openDialogs].reverse().find(t=>t===this||t.open&&t.isConnected)===this;return a.__openDialogs=a.__openDialogs.filter(t=>t!==this),this.__setStackInactive(!1),a.__syncModalStack(),this.__applyZIndex(),e}__getDeepActiveElement(){let e=this.ownerDocument.activeElement;for(;e instanceof HTMLElement&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e instanceof HTMLElement?e:null}__isInsideDialog(e){let t=e;for(;t;){if(t===this)return!0;t instanceof ShadowRoot?t=t.host:t=t.parentNode}return!1}__focusInitial(){if(!this.open||this.__stackInactive||a.__getTopmostOpenDialog()!==this)return;const e=this.__collectFocusableElements()[0];if(e){e.focus();return}this.shadowRoot?.querySelector(".container")?.focus()}__clearSavedFocus(){this.__lastTriggerEl=null,this.__focusBeforeOpen=null}async __restoreFocusAfterClose(){const e=this.__lastTriggerEl?.isConnected?this.__lastTriggerEl:this.__focusBeforeOpen?.isConnected?this.__focusBeforeOpen:null;this.__clearSavedFocus(),await Promise.resolve();const t=a.__getTopmostOpenDialog();if(t){await t.updateComplete,e&&t.__isInsideDialog(e)&&e.focus();const i=t.__getDeepActiveElement();(!i||!t.__isInsideDialog(i))&&t.__focusInitial();return}e?.focus()}connectedCallback(){super.connectedCallback(),this.__applyZIndex(),this.__applyMaxSize(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),document.addEventListener("focusin",this.__onDocumentFocusIn,!0),this.addEventListener("keydown",this.__onKeydownTrap),this.open&&this.hasUpdated&&(this.__focusBeforeOpen=this.__getDeepActiveElement(),this.__registerOpenDialog(),this.__toggleScrollLock(!0),this.__isModalOverlay()&&this.updateComplete.then(()=>this.__focusInitial()))}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),document.removeEventListener("focusin",this.__onDocumentFocusIn,!0),this.removeEventListener("keydown",this.__onKeydownTrap),this.__submitAbortController?.abort(),v(this.shadowRoot?.querySelector(".layer"));const e=this.__unregisterOpenDialog();this.__toggleScrollLock(!1),e?this.__restoreFocusAfterClose():this.__clearSavedFocus(),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){if(e.has("zIndex")&&(this.open&&this.__isModalOverlay()?a.__syncModalStack():this.__applyZIndex()),(e.has("maxW")||e.has("maxH"))&&this.__applyMaxSize(),e.has("open")){const t=e.get("open");this.__updateTriggersExpanded(),this.open&&!t?(this.__focusBeforeOpen=this.__getDeepActiveElement(),this.__registerOpenDialog(),this.__isModalOverlay()&&this.updateComplete.then(()=>this.__focusInitial())):!this.open&&t&&(this.__unregisterOpenDialog()?this.__restoreFocusAfterClose():this.__clearSavedFocus()),this.__toggleScrollLock(this.open)}if(e.has("inSb")&&this.open&&(this.__unregisterOpenDialog(),this.__registerOpenDialog(),this.__toggleScrollLock(!1),this.__toggleScrollLock(!0)),e.has("open")||e.has("inSb")){const t=this.shadowRoot?.querySelector(".layer");if(this.open&&this.__isModalOverlay())F(t);else if(this.open||z(this),!this.open&&C(t)){const i=this.shadowRoot?.querySelector(".container");T(t,void 0,i??t??void 0)}else v(t)}(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))})}__usesInPlaceLayout(){const e=getComputedStyle(this);return e.getPropertyValue("--scb-dialog-scrim-position").trim()==="relative"||e.getPropertyValue("--scb-dialog-container-position").trim()==="absolute"}__toggleScrollLock(e){const t=document.documentElement,i=document.body;if(e){if(this.__scrollLocked||this.inSb||this.__usesInPlaceLayout())return;if(b.size===0){y=t.style.overflow,S=i.style.paddingRight;const s=window.innerWidth-t.clientWidth;if(t.style.overflow="hidden",s>0){const n=Number.parseFloat(getComputedStyle(i).paddingRight)||0;i.style.paddingRight=`${n+s}px`}}b.add(this),this.__scrollLocked=!0;return}this.__scrollLocked&&(b.delete(this),b.size===0&&(t.style.overflow=y,i.style.paddingRight=S),this.__scrollLocked=!1)}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),n=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"),n?this.style.setProperty("--scb-dialog-spacing-inline-end",n):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}))}__fireCancelable(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0,cancelable:!0}))}__getFormMethod(){const e=String(this.formMethod||"GET").trim().toUpperCase();return e==="POST"||e==="PUT"||e==="DELETE"?e:"GET"}__getSlottedElements(){const e=this.shadowRoot?.querySelector("slot");if(!(e instanceof HTMLSlotElement))return[];const t=e.assignedElements({flatten:!0}),i=[];for(const s of t)i.push(s,...Array.from(s.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(t=>{if(!(t instanceof HTMLElement))return;const i=(t.getAttribute("name")??"").trim();if(i&&!(t.disabled===!0||t.hasAttribute("disabled"))){if(t instanceof HTMLInputElement){if(t.form===e)return;const s=(t.type||"").toLowerCase();if(s==="file")return;if(s==="checkbox"||s==="radio"){t.checked&&this.__appendHiddenFormValue(e,i,t.value||"on");return}this.__appendHiddenFormValue(e,i,t.value??"");return}if(t instanceof HTMLTextAreaElement){if(t.form===e)return;this.__appendHiddenFormValue(e,i,t.value??"");return}if(t instanceof HTMLSelectElement){if(t.form===e)return;if(t.multiple){Array.from(t.selectedOptions).forEach(s=>{this.__appendHiddenFormValue(e,i,s.value)});return}this.__appendHiddenFormValue(e,i,t.value??"");return}switch(t.tagName){case"SCB-TEXTFIELD":if(String(t.type??"").toLowerCase()==="file")return;this.__appendHiddenFormValue(e,i,String(t.value??""));return;case"SCB-CHECKBOX":t.checked&&this.__appendHiddenFormValue(e,i,String(t.value??t.getAttribute("value")??"on"));return;case"SCB-RADIO-BUTTON":t.checked&&this.__appendHiddenFormValue(e,i,String(t.value??t.getAttribute("value")??"on"));return;case"SCB-SWITCH":(t.selected||t.checked)&&this.__appendHiddenFormValue(e,i,String(t.value??t.getAttribute("value")??"on"));return;case"SCB-CHIP":t.selected&&this.__appendHiddenFormValue(e,i,String(t.value??t.getAttribute("value")??"on"));return;default:"value"in t&&this.__appendHiddenFormValue(e,i,String(t.value??""))}}})}__appendSlottedFiles(e,t){for(const i of this.__getSlottedElements()){if(!(i instanceof HTMLElement))continue;const s=(i.getAttribute("name")??"").trim();if(!(!s||i.disabled===!0||i.hasAttribute("disabled"))){if(i instanceof HTMLInputElement&&i.type==="file"){if(i.form===e)continue;for(const n of Array.from(i.files??[]))t.append(s,n);continue}if(i.tagName==="SCB-TEXTFIELD"&&String(i.type??"").toLowerCase()==="file"){const n=i.files;for(const o of Array.from(n??[]))t.append(s,o)}}}}__createFormData(e){this.__syncSlottedFormValues(e);const t=new FormData(e);return this.__appendSlottedFiles(e,t),t}__validateFormAndSlottedFields(e){const t=o=>o.disabled===!0||o.hasAttribute("disabled");let i=e.reportValidity(),s=null;const n=new Set;return this.__getSlottedElements().forEach(o=>{if(!(o instanceof HTMLElement)||n.has(o)||t(o))return;n.add(o);const p=o;if(o.tagName==="SCB-TEXTFIELD"&&p.error===!0){s||(s=o),i=!1;return}if(typeof p.reportValidity=="function"){const u=!!p.reportValidity();!u&&!s&&(s=o),i=i&&u}}),!i&&s&&s.focus(),i}__isFocusableElement(e){if(!(e instanceof HTMLElement)||!e.matches(a.__focusableSelector)||e.disabled||e.getAttribute("aria-hidden")==="true")return!1;const t=getComputedStyle(e);return t.display!=="none"&&t.visibility!=="hidden"}__collectAssignedFocusableElements(e){const t=[];return this.__isFocusableElement(e)&&t.push(e),t.push(...Array.from(e.querySelectorAll(a.__focusableSelector)).filter(i=>this.__isFocusableElement(i))),t}__collectFocusableElements(){const e=this.shadowRoot;if(!e)return[];const t=[],i=new Set,s=o=>{i.has(o)||(i.add(o),t.push(o))},n=o=>{if(o instanceof HTMLSlotElement){o.assignedElements({flatten:!0}).flatMap(p=>this.__collectAssignedFocusableElements(p)).forEach(s);return}o instanceof HTMLElement&&this.__isFocusableElement(o)&&s(o),o.childNodes.forEach(n)};return e.childNodes.forEach(n),t}__currentFocusableFromEvent(e,t){const i=e.composedPath();return t.find(s=>i.includes(s))??(this.shadowRoot?.activeElement instanceof HTMLElement?this.shadowRoot.activeElement:null)??(document.activeElement instanceof HTMLElement?document.activeElement:null)}__slotIsEmpty(){const e=this.shadowRoot?.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 d`
1
+ import{g,h as x,m as w,p as c,v as d,y as E}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{t as _}from"../../vendor/component-size-token.js";import{t as l}from"../../vendor/decorate.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import{a as T,i as z,n as C,r as F,t as v}from"../../vendor/manual-popover.js";import"../scb-textfield/scb-textfield.js";import"../scb-checkbox/scb-checkbox.js";import"../scb-radio-button/scb-radio-button.js";import"../scb-switch/scb-switch.js";import"../scb-chip/scb-chip.js";(function(){try{var h=typeof globalThis<"u"?globalThis:window;if(!h.__scb_ce_guard_installed__){h.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,i,s){try{customElements.get(t)||e(t,i,s)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var m,a,k={fromAttribute(h){if(h===null)return!1;const e=h.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="no"}},b=new Set,y="",S="",r=(m=class extends x{constructor(...e){super(...e),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.closeLabel="Stäng dialog",this.formId="",this.formAction="",this.formMethod="",this.formEnctype="",this.__lastTriggerEl=null,this.__focusBeforeOpen=null,this.__stackInactive=!1,this.__submitting=!1,this.__redirectingFocus=!1,this.__scrollLocked=!1,this.__initialControlStates=new Map,this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())},this.__onDocumentKeydown=t=>{if(!this.open||t.key!=="Escape")return;const i=a.__getTopmostOpenDialog();i&&i!==this||this.__hasOpenNestedOverlay(t)||(t.preventDefault(),t.stopPropagation(),this.__fireCancelable("esc")&&this.__setOpen(!1))},this.__onDocumentFocusIn=t=>{this.__redirectingFocus||a.__getTopmostOpenDialog()!==this||t.composedPath().includes(this)||(this.__redirectingFocus=!0,queueMicrotask(()=>{this.__focusInitial(),this.__redirectingFocus=!1}))},this.__rememberInitialControlStates=()=>{for(const t of this.__getSlottedElements()){if(!(t instanceof HTMLElement)||this.__initialControlStates.has(t))continue;const i={},s=t;"value"in s&&(i.value=s.value),"checked"in s&&(i.checked=s.checked),"selected"in s&&(i.selected=s.selected),Object.keys(i).length>0&&this.__initialControlStates.set(t,i)}},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=()=>{const t=this.shadowRoot?.querySelector("form");t instanceof HTMLFormElement&&(this.__clearGeneratedFormValues(t),t.reset()),this.__rememberInitialControlStates();for(const[i,s]of this.__initialControlStates){if(!i.isConnected)continue;if(i instanceof HTMLInputElement){i.type==="file"?i.value="":i.value=i.defaultValue,i.checked=i.defaultChecked;continue}if(i instanceof HTMLTextAreaElement){i.value=i.defaultValue;continue}if(i instanceof HTMLSelectElement){for(const o of Array.from(i.options))o.selected=o.defaultSelected;continue}const n=i;n.formResetCallback?.(),"value"in s&&(n.value=s.value),"checked"in s&&(n.checked=s.checked),"selected"in s&&(n.selected=s.selected),n.requestUpdate?.()}this.__fire("reset")},this.__onSubmit=()=>{if(this.__submitting)return;const t=this.shadowRoot?.querySelector("form");if(t instanceof HTMLFormElement){if(!this.__validateFormAndSlottedFields(t))return;t.requestSubmit()}},this.__onFormSubmit=async t=>{const i=t.currentTarget;if(!(i instanceof HTMLFormElement)||(t.preventDefault(),t.stopPropagation(),this.__submitting)||!this.__validateFormAndSlottedFields(i))return;const s=this.__createFormData(i),n=this.__getFormMethod(),o=i.action;if(this.__fireCancelable("submit",{form:i,formData:s,method:n,action:o})){if(this.formAction.trim()&&(n==="PUT"||n==="DELETE")){const p=new AbortController;this.__submitAbortController=p,this.__submitting=!0,this.setAttribute("aria-busy","true");try{const u=await fetch(o,{method:n,body:s,credentials:"same-origin",signal:p.signal}),f={form:i,formData:s,method:n,action:o,response:u,status:u.status};if(!u.ok){this.__fire("submit-error",f);return}this.__fire("submit-success",f),this.open&&this.__setOpen(!1)}catch(u){u instanceof DOMException&&u.name==="AbortError"&&!this.isConnected||this.__fire("submit-error",{form:i,formData:s,method:n,action:o,error:u})}finally{this.__submitAbortController===p&&(this.__submitAbortController=void 0,this.__submitting=!1,this.removeAttribute("aria-busy"))}return}if(this.formAction.trim()){const p=f=>{this.__appendSlottedFiles(i,f.formData)},u=i.getAttribute("enctype");Array.from(s.values()).some(f=>f instanceof File)&&!this.formEnctype.trim()&&(i.enctype="multipart/form-data"),i.addEventListener("formdata",p,{once:!0});try{this.__setOpen(!1),HTMLFormElement.prototype.submit.call(i)}finally{i.removeEventListener("formdata",p),u===null?i.removeAttribute("enctype"):i.setAttribute("enctype",u)}return}this.__setOpen(!1)}},this.__onKeydownTrap=t=>{if(!this.open||t.key!=="Tab"||a.__getTopmostOpenDialog()&&a.__getTopmostOpenDialog()!==this)return;const i=this.__collectFocusableElements();if(!i.length)return;const s=i[0],n=i[i.length-1],o=this.__currentFocusableFromEvent(t,i);!o||!i.includes(o)?((t.shiftKey?n:s).focus(),t.preventDefault()):t.shiftKey&&o===s?(n.focus(),t.preventDefault()):!t.shiftKey&&o===n&&(s.focus(),t.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}__hasOpenNestedOverlay(e){const t="scb-options-menu, scb-dropdown, scb-select",i=s=>s instanceof Element&&s!==this&&s.matches(t)&&!!s.open;return e.composedPath().some(i)?!0:Array.from(this.querySelectorAll(t)).some(s=>!!s.open)}__isModalOverlay(){return!this.inSb&&!this.__usesInPlaceLayout()}static __getTopmostOpenDialog(){return[...a.__openDialogs].reverse().find(e=>e.open&&e.isConnected&&e.__isModalOverlay())}static __restoreBackgroundInert(){for(const[e,t]of a.__backgroundInertSnapshot)e.inert=t;a.__backgroundInertSnapshot.clear()}static __setBackgroundInert(e){if(a.__restoreBackgroundInert(),!e)return;let t=e;for(;;){const i=t.parentNode;if(i instanceof Element||i instanceof ShadowRoot)for(const s of Array.from(i.children))s===t||!(s instanceof HTMLElement)||(a.__backgroundInertSnapshot.set(s,s.inert),s.inert=!0);if(i instanceof ShadowRoot){t=i.host;continue}if(i instanceof Element){t=i;continue}break}}__getRequestedZIndex(){if(typeof this.zIndex=="number"&&Number.isFinite(this.zIndex))return Math.trunc(this.zIndex);const e=Number.parseInt(getComputedStyle(this).getPropertyValue("--scb-layer-dialog-scrim"),10);return Number.isFinite(e)?e:1e3}__setStackLayer(e){this.style.setProperty("--z-dialog-scrim",String(e)),this.style.setProperty("--z-dialog",String(e+1))}__setStackInactive(e){this.__stackInactive!==e&&(this.__stackInactive=e,this.requestUpdate())}static __syncModalStack(){a.__openDialogs=a.__openDialogs.filter(s=>s.open&&s.isConnected&&s.__isModalOverlay());const e=a.__getTopmostOpenDialog(),t=a.__openDialogs.map(s=>s.__getRequestedZIndex()),i=t.length?Math.max(...t):1e3;a.__openDialogs.forEach((s,n)=>{s.__setStackInactive(s!==e),s.__setStackLayer(i+n*2)}),a.__setBackgroundInert(e)}__registerOpenDialog(){this.__isModalOverlay()&&(a.__openDialogs=a.__openDialogs.filter(e=>e!==this),a.__openDialogs.push(this),a.__syncModalStack())}__unregisterOpenDialog(){const e=[...a.__openDialogs].reverse().find(t=>t===this||t.open&&t.isConnected)===this;return a.__openDialogs=a.__openDialogs.filter(t=>t!==this),this.__setStackInactive(!1),a.__syncModalStack(),this.__applyZIndex(),e}__getDeepActiveElement(){let e=this.ownerDocument.activeElement;for(;e instanceof HTMLElement&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e instanceof HTMLElement?e:null}__isInsideDialog(e){let t=e;for(;t;){if(t===this)return!0;t instanceof ShadowRoot?t=t.host:t=t.parentNode}return!1}__focusInitial(){if(!this.open||this.__stackInactive||a.__getTopmostOpenDialog()!==this)return;const e=this.__collectFocusableElements()[0];if(e){e.focus();return}this.shadowRoot?.querySelector(".container")?.focus()}__clearSavedFocus(){this.__lastTriggerEl=null,this.__focusBeforeOpen=null}async __restoreFocusAfterClose(){const e=this.__lastTriggerEl?.isConnected?this.__lastTriggerEl:this.__focusBeforeOpen?.isConnected?this.__focusBeforeOpen:null;this.__clearSavedFocus(),await Promise.resolve();const t=a.__getTopmostOpenDialog();if(t){await t.updateComplete,e&&t.__isInsideDialog(e)&&e.focus();const i=t.__getDeepActiveElement();(!i||!t.__isInsideDialog(i))&&t.__focusInitial();return}e?.focus()}connectedCallback(){super.connectedCallback(),this.__applyZIndex(),this.__applyMaxSize(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),document.addEventListener("focusin",this.__onDocumentFocusIn,!0),this.addEventListener("keydown",this.__onKeydownTrap),this.open&&this.hasUpdated&&(this.__focusBeforeOpen=this.__getDeepActiveElement(),this.__registerOpenDialog(),this.__toggleScrollLock(!0),this.__isModalOverlay()&&this.updateComplete.then(()=>this.__focusInitial()))}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),document.removeEventListener("focusin",this.__onDocumentFocusIn,!0),this.removeEventListener("keydown",this.__onKeydownTrap),this.__submitAbortController?.abort(),v(this.shadowRoot?.querySelector(".layer"));const e=this.__unregisterOpenDialog();this.__toggleScrollLock(!1),e?this.__restoreFocusAfterClose():this.__clearSavedFocus(),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){if(e.has("zIndex")&&(this.open&&this.__isModalOverlay()?a.__syncModalStack():this.__applyZIndex()),(e.has("maxW")||e.has("maxH"))&&this.__applyMaxSize(),e.has("open")){const t=e.get("open");this.__updateTriggersExpanded(),this.open&&!t?(this.__focusBeforeOpen=this.__getDeepActiveElement(),this.__registerOpenDialog(),this.__isModalOverlay()&&this.updateComplete.then(()=>this.__focusInitial())):!this.open&&t&&(this.__unregisterOpenDialog()?this.__restoreFocusAfterClose():this.__clearSavedFocus()),this.__toggleScrollLock(this.open)}if(e.has("inSb")&&this.open&&(this.__unregisterOpenDialog(),this.__registerOpenDialog(),this.__toggleScrollLock(!1),this.__toggleScrollLock(!0)),e.has("open")||e.has("inSb")){const t=this.shadowRoot?.querySelector(".layer");if(this.open&&this.__isModalOverlay())T(t);else if(this.open||F(this),!this.open&&z(t)){const i=this.shadowRoot?.querySelector(".container");C(t,void 0,i??t??void 0)}else v(t)}(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))})}__usesInPlaceLayout(){const e=getComputedStyle(this);return e.getPropertyValue("--scb-dialog-scrim-position").trim()==="relative"||e.getPropertyValue("--scb-dialog-container-position").trim()==="absolute"}__toggleScrollLock(e){const t=document.documentElement,i=document.body;if(e){if(this.__scrollLocked||this.inSb||this.__usesInPlaceLayout())return;if(b.size===0){y=t.style.overflow,S=i.style.paddingRight;const s=window.innerWidth-t.clientWidth;if(t.style.overflow="hidden",s>0){const n=Number.parseFloat(getComputedStyle(i).paddingRight)||0;i.style.paddingRight=`${n+s}px`}}b.add(this),this.__scrollLocked=!0;return}this.__scrollLocked&&(b.delete(this),b.size===0&&(t.style.overflow=y,i.style.paddingRight=S),this.__scrollLocked=!1)}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),n=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"),n?this.style.setProperty("--scb-dialog-spacing-inline-end",n):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}))}__fireCancelable(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0,cancelable:!0}))}__getFormMethod(){const e=String(this.formMethod||"GET").trim().toUpperCase();return e==="POST"||e==="PUT"||e==="DELETE"?e:"GET"}__getSlottedElements(){const e=this.shadowRoot?.querySelector("slot");if(!(e instanceof HTMLSlotElement))return[];const t=e.assignedElements({flatten:!0}),i=[];for(const s of t)i.push(s,...Array.from(s.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(t=>{if(!(t instanceof HTMLElement))return;const i=(t.getAttribute("name")??"").trim();if(i&&!(t.disabled===!0||t.hasAttribute("disabled"))){if(t instanceof HTMLInputElement){if(t.form===e)return;const s=(t.type||"").toLowerCase();if(s==="file")return;if(s==="checkbox"||s==="radio"){t.checked&&this.__appendHiddenFormValue(e,i,t.value||"on");return}this.__appendHiddenFormValue(e,i,t.value??"");return}if(t instanceof HTMLTextAreaElement){if(t.form===e)return;this.__appendHiddenFormValue(e,i,t.value??"");return}if(t instanceof HTMLSelectElement){if(t.form===e)return;if(t.multiple){Array.from(t.selectedOptions).forEach(s=>{this.__appendHiddenFormValue(e,i,s.value)});return}this.__appendHiddenFormValue(e,i,t.value??"");return}switch(t.tagName){case"SCB-TEXTFIELD":if(String(t.type??"").toLowerCase()==="file")return;this.__appendHiddenFormValue(e,i,String(t.value??""));return;case"SCB-CHECKBOX":t.checked&&this.__appendHiddenFormValue(e,i,String(t.value??t.getAttribute("value")??"on"));return;case"SCB-RADIO-BUTTON":t.checked&&this.__appendHiddenFormValue(e,i,String(t.value??t.getAttribute("value")??"on"));return;case"SCB-SWITCH":(t.selected||t.checked)&&this.__appendHiddenFormValue(e,i,String(t.value??t.getAttribute("value")??"on"));return;case"SCB-CHIP":t.selected&&this.__appendHiddenFormValue(e,i,String(t.value??t.getAttribute("value")??"on"));return;default:"value"in t&&this.__appendHiddenFormValue(e,i,String(t.value??""))}}})}__appendSlottedFiles(e,t){for(const i of this.__getSlottedElements()){if(!(i instanceof HTMLElement))continue;const s=(i.getAttribute("name")??"").trim();if(!(!s||i.disabled===!0||i.hasAttribute("disabled"))){if(i instanceof HTMLInputElement&&i.type==="file"){if(i.form===e)continue;for(const n of Array.from(i.files??[]))t.append(s,n);continue}if(i.tagName==="SCB-TEXTFIELD"&&String(i.type??"").toLowerCase()==="file"){const n=i.files;for(const o of Array.from(n??[]))t.append(s,o)}}}}__createFormData(e){this.__syncSlottedFormValues(e);const t=new FormData(e);return this.__appendSlottedFiles(e,t),t}__validateFormAndSlottedFields(e){const t=o=>o.disabled===!0||o.hasAttribute("disabled");let i=e.reportValidity(),s=null;const n=new Set;return this.__getSlottedElements().forEach(o=>{if(!(o instanceof HTMLElement)||n.has(o)||t(o))return;n.add(o);const p=o;if(o.tagName==="SCB-TEXTFIELD"&&p.error===!0){s||(s=o),i=!1;return}if(typeof p.reportValidity=="function"){const u=!!p.reportValidity();!u&&!s&&(s=o),i=i&&u}}),!i&&s&&s.focus(),i}__isFocusableElement(e){if(!(e instanceof HTMLElement)||!e.matches(a.__focusableSelector)||e.disabled||e.getAttribute("aria-hidden")==="true")return!1;const t=getComputedStyle(e);return t.display!=="none"&&t.visibility!=="hidden"}__collectAssignedFocusableElements(e){const t=[];return this.__isFocusableElement(e)&&t.push(e),t.push(...Array.from(e.querySelectorAll(a.__focusableSelector)).filter(i=>this.__isFocusableElement(i))),t}__collectFocusableElements(){const e=this.shadowRoot;if(!e)return[];const t=[],i=new Set,s=o=>{i.has(o)||(i.add(o),t.push(o))},n=o=>{if(o instanceof HTMLSlotElement){o.assignedElements({flatten:!0}).flatMap(p=>this.__collectAssignedFocusableElements(p)).forEach(s);return}o instanceof HTMLElement&&this.__isFocusableElement(o)&&s(o),o.childNodes.forEach(n)};return e.childNodes.forEach(n),t}__currentFocusableFromEvent(e,t){const i=e.composedPath();return t.find(s=>i.includes(s))??(this.shadowRoot?.activeElement instanceof HTMLElement?this.shadowRoot.activeElement:null)??(document.activeElement instanceof HTMLElement?document.activeElement:null)}__slotIsEmpty(){const e=this.shadowRoot?.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 d`
2
2
  <div class="header">
3
3
  <div class="title">
4
4
  ${this.icon?d`<md-icon class="dialog-icon">${this.icon}</md-icon>`:g}
@@ -1,4 +1,4 @@
1
- import{g as f,h as y,m as b,p as c,v as m,y as g}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as l}from"../../vendor/decorate.js";import{closeManualPopover as h,closeManualPopoverAfterAnimations as v,closeNestedPopupSurfaces as w,isManualPopoverOpen as E,openManualPopover as p}from"../shared/manual-popover.js";import"../scb-divider/scb-divider.js";(function(){try{var _=typeof globalThis<"u"?globalThis:window;if(!_.__scb_ce_guard_installed__){_.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,r,s){try{customElements.get(t)||e(t,r,s)}catch(a){var u=String(a||"");if(u.indexOf("already been used")===-1&&u.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var n,o,d={fromAttribute(_){if(_===null)return!1;const e=_.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="no"}},i=(n=class extends y{constructor(...e){super(...e),this.floating=!0,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.ariaLabel="Sidopanel",this.__effectiveSide="left",this.__lastTriggerEl=null,this.__scrollLockHeld=!1,this.__lastTriggerWasAriaControls=!1,this.__onDocumentClick=t=>{const r=this.__getActionFromEvent(t);if(r){r==="open"&&this.__setOpen(!0),r==="close"&&this.__setOpen(!1),r==="toggle"&&this.__setOpen(!this.open),t.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(t.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=t=>{if(this.open){if(t.key==="Escape"){if(this.__hasOpenNestedOverlay(t))return;t.preventDefault(),t.stopPropagation(),this.__setOpen(!1);return}if(this.overlay&&t.key==="Tab"){const r=this.__getFocusable();if(r.length===0)return;const s=r[0],u=r[r.length-1],a=this.__currentFocusableFromEvent(t,r);t.shiftKey?(a===s||!a)&&(t.preventDefault(),u.focus()):(a===u||!a)&&(t.preventDefault(),s.focus())}}}}static __ensureOverlayStyles(){if(typeof document>"u"||document.getElementById("scb-drawer-overlay-styles"))return;const e=document.createElement("style");e.id="scb-drawer-overlay-styles",e.textContent=`
1
+ import{g as f,h as y,m as b,p as c,v as m,y as g}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as l}from"../../vendor/decorate.js";import{a as h,i as w,n as v,r as E,t as p}from"../../vendor/manual-popover.js";import"../scb-divider/scb-divider.js";(function(){try{var _=typeof globalThis<"u"?globalThis:window;if(!_.__scb_ce_guard_installed__){_.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,r,s){try{customElements.get(t)||e(t,r,s)}catch(a){var u=String(a||"");if(u.indexOf("already been used")===-1&&u.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var n,o,d={fromAttribute(_){if(_===null)return!1;const e=_.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="no"}},i=(n=class extends y{constructor(...e){super(...e),this.floating=!0,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.ariaLabel="Sidopanel",this.__effectiveSide="left",this.__lastTriggerEl=null,this.__scrollLockHeld=!1,this.__lastTriggerWasAriaControls=!1,this.__onDocumentClick=t=>{const r=this.__getActionFromEvent(t);if(r){r==="open"&&this.__setOpen(!0),r==="close"&&this.__setOpen(!1),r==="toggle"&&this.__setOpen(!this.open),t.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(t.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=t=>{if(this.open){if(t.key==="Escape"){if(this.__hasOpenNestedOverlay(t))return;t.preventDefault(),t.stopPropagation(),this.__setOpen(!1);return}if(this.overlay&&t.key==="Tab"){const r=this.__getFocusable();if(r.length===0)return;const s=r[0],u=r[r.length-1],a=this.__currentFocusableFromEvent(t,r);t.shiftKey?(a===s||!a)&&(t.preventDefault(),u.focus()):(a===u||!a)&&(t.preventDefault(),s.focus())}}}}static __ensureOverlayStyles(){if(typeof document>"u"||document.getElementById("scb-drawer-overlay-styles"))return;const e=document.createElement("style");e.id="scb-drawer-overlay-styles",e.textContent=`
2
2
  .scb-drawer-global-overlay {
3
3
  position: fixed;
4
4
  inset: 0;
@@ -27,7 +27,7 @@ import{g as f,h as y,m as b,p as c,v as m,y as g}from"../../vendor/vendor.js";im
27
27
  @media (prefers-reduced-motion: reduce) {
28
28
  .scb-drawer-global-overlay { transition: none; }
29
29
  }
30
- `,document.head.appendChild(e)}static __ensureOverlay(){if(typeof document>"u"||o.__overlayEl)return;o.__ensureOverlayStyles();const e=document.createElement("div");e.className="scb-drawer-global-overlay",e.addEventListener("pointerdown",()=>{const t=o.__overlayStack[o.__overlayStack.length-1];t&&t.closeOnOverlay&&t.__setOpen(!1)},{passive:!0}),document.body.appendChild(e),o.__overlayEl=e}static __showOverlay(e){o.__ensureOverlay(),o.__overlayEl&&(o.__overlayStack.includes(e)||o.__overlayStack.push(e),o.__syncOverlayColors(e),p(o.__overlayEl),o.__overlayEl.classList.add("is-visible"))}static __hideOverlay(e){const t=o.__overlayStack.indexOf(e);t>=0&&o.__overlayStack.splice(t,1);const r=o.__overlayStack[o.__overlayStack.length-1];r&&o.__syncOverlayColors(r),o.__overlayStack.length===0&&o.__overlayEl&&(o.__overlayEl.classList.remove("is-visible"),v(o.__overlayEl),o.__overlayEl.style.removeProperty("--scb-drawer-overlay-color"),o.__overlayEl.style.removeProperty("--scb-drawer-scrim-color"))}static __syncOverlayColors(e){if(!o.__overlayEl||typeof getComputedStyle!="function")return;const t=getComputedStyle(e);for(const r of["--scb-drawer-overlay-color","--scb-drawer-scrim-color"]){const s=t.getPropertyValue(r).trim();s?o.__overlayEl.style.setProperty(r,s):o.__overlayEl.style.removeProperty(r)}}static __lockScrollEnable(){if(!(typeof document>"u")){if(o.__lockedCount===0){o.__prevDocOverflow=document.documentElement.style.overflow||"",o.__prevBodyOverflow=document.body.style.overflow||"",o.__prevBodyPaddingRight=document.body.style.paddingRight||"";const e=Math.max(0,window.innerWidth-document.documentElement.clientWidth);if(e>0){const t=Number.parseFloat(getComputedStyle(document.body).paddingRight||"0");document.body.style.paddingRight=`${t+e}px`}document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden"}o.__lockedCount++}}static __lockScrollDisable(){typeof document>"u"||(o.__lockedCount=Math.max(0,o.__lockedCount-1),o.__lockedCount===0&&(document.documentElement.style.overflow=o.__prevDocOverflow??"",document.body.style.overflow=o.__prevBodyOverflow??"",document.body.style.paddingRight=o.__prevBodyPaddingRight??""))}render(){const e=this.modal&&this.overlay&&this.floating;return m`
30
+ `,document.head.appendChild(e)}static __ensureOverlay(){if(typeof document>"u"||o.__overlayEl)return;o.__ensureOverlayStyles();const e=document.createElement("div");e.className="scb-drawer-global-overlay",e.addEventListener("pointerdown",()=>{const t=o.__overlayStack[o.__overlayStack.length-1];t&&t.closeOnOverlay&&t.__setOpen(!1)},{passive:!0}),document.body.appendChild(e),o.__overlayEl=e}static __showOverlay(e){o.__ensureOverlay(),o.__overlayEl&&(o.__overlayStack.includes(e)||o.__overlayStack.push(e),o.__syncOverlayColors(e),h(o.__overlayEl),o.__overlayEl.classList.add("is-visible"))}static __hideOverlay(e){const t=o.__overlayStack.indexOf(e);t>=0&&o.__overlayStack.splice(t,1);const r=o.__overlayStack[o.__overlayStack.length-1];r&&o.__syncOverlayColors(r),o.__overlayStack.length===0&&o.__overlayEl&&(o.__overlayEl.classList.remove("is-visible"),v(o.__overlayEl),o.__overlayEl.style.removeProperty("--scb-drawer-overlay-color"),o.__overlayEl.style.removeProperty("--scb-drawer-scrim-color"))}static __syncOverlayColors(e){if(!o.__overlayEl||typeof getComputedStyle!="function")return;const t=getComputedStyle(e);for(const r of["--scb-drawer-overlay-color","--scb-drawer-scrim-color"]){const s=t.getPropertyValue(r).trim();s?o.__overlayEl.style.setProperty(r,s):o.__overlayEl.style.removeProperty(r)}}static __lockScrollEnable(){if(!(typeof document>"u")){if(o.__lockedCount===0){o.__prevDocOverflow=document.documentElement.style.overflow||"",o.__prevBodyOverflow=document.body.style.overflow||"",o.__prevBodyPaddingRight=document.body.style.paddingRight||"";const e=Math.max(0,window.innerWidth-document.documentElement.clientWidth);if(e>0){const t=Number.parseFloat(getComputedStyle(document.body).paddingRight||"0");document.body.style.paddingRight=`${t+e}px`}document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden"}o.__lockedCount++}}static __lockScrollDisable(){typeof document>"u"||(o.__lockedCount=Math.max(0,o.__lockedCount-1),o.__lockedCount===0&&(document.documentElement.style.overflow=o.__prevDocOverflow??"",document.body.style.overflow=o.__prevBodyOverflow??"",document.body.style.paddingRight=o.__prevBodyPaddingRight??""))}render(){const e=this.modal&&this.overlay&&this.floating;return m`
31
31
  <div
32
32
  class="root"
33
33
  role=${e?"dialog":f}
@@ -36,6 +36,6 @@ import{g as f,h as y,m as b,p as c,v as m,y as g}from"../../vendor/vendor.js";im
36
36
  >
37
37
  <div class="panel"><slot></slot></div>
38
38
  </div>
39
- `}connectedCallback(){super.connectedCallback(),this.__syncEffectiveSide(new Map),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.overlay&&(o.__hideOverlay(this),this.__releaseScrollLock()),h(this),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;const t=e.composedPath();for(const r of t)if(r instanceof Element){if(r.getAttribute("data-drawer-open")===this.id)return this.__lastTriggerEl=r,this.__lastTriggerWasAriaControls=!1,"open";if(r.getAttribute("data-drawer-close")===this.id)return this.contains(r)||(this.__lastTriggerEl=r,this.__lastTriggerWasAriaControls=!1),"close";if(r.getAttribute("data-drawer-toggle")===this.id)return this.__lastTriggerEl=r,this.__lastTriggerWasAriaControls=!1,"toggle";if(r.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=r,this.__lastTriggerWasAriaControls=!0,"toggle"}return null}__hasOpenNestedOverlay(e){const t="scb-options-menu, scb-dropdown, scb-select",r=s=>s instanceof Element&&s!==this&&s.matches(t)&&!!s.open;return e.composedPath().some(r)?!0:Array.from(this.querySelectorAll(t)).some(s=>!!s.open)}__getFocusable(){const e=["button","[href]","input","select","textarea",'[tabindex]:not([tabindex="-1"])',"scb-button","scb-icon-button","scb-textfield","scb-checkbox","scb-radio-button","scb-switch","scb-chip","scb-menu-item"].join(", "),t=new Set,r=s=>{s.querySelectorAll(e).forEach(u=>{const a=this.__resolveFocusable(u);a&&t.add(a)})};return r(this),r(this.renderRoot),Array.from(t).filter(s=>!this.__isDisabledOrHidden(s))}__resolveFocusable(e){return this.__isDisabledOrHidden(e)?null:e.tagName==="SCB-BUTTON"||e.tagName==="SCB-ICON-BUTTON"?e.shadowRoot?.querySelector(".native-button, button, a")??e:e.tagName==="SCB-MENU-ITEM"?e.shadowRoot?.querySelector(".scb-menu-label-text")??e:e}__isDisabledOrHidden(e){if(e.disabled||e.getAttribute("aria-hidden")==="true")return!0;const t=getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"}__currentFocusableFromEvent(e,t){const r=e.composedPath();return t.find(s=>r.includes(s))??(this.shadowRoot?.activeElement instanceof HTMLElement?this.shadowRoot.activeElement:null)??(document.activeElement instanceof HTMLElement?document.activeElement:null)}__setOpen(e){this.open=e}async __focusFirstControl(){await this.updateComplete;for(let e=0;e<4;e+=1){await new Promise(r=>requestAnimationFrame(()=>r()));const t=this.__getFocusable()[0];if(t?.focus?.({preventScroll:!0}),t&&this.__isFocused(t))return}}__isFocused(e){if(document.activeElement===e)return!0;const t=e.getRootNode();return t instanceof ShadowRoot&&t.activeElement===e}__syncLastTriggerExpanded(e){this.__lastTriggerEl&&this.__lastTriggerWasAriaControls&&this.__lastTriggerEl.getAttribute("aria-controls")===this.id&&this.__lastTriggerEl.setAttribute("aria-expanded",String(e))}__syncEffectiveSide(e){const t=this.left&&this.right;let r;t?e.has("left")&&this.left&&!e.has("right")?r="left":r="right":this.right?r="right":r="left",this.__effectiveSide!==r&&(this.__effectiveSide=r),this.getAttribute("data-side")!==r&&this.setAttribute("data-side",r)}willUpdate(e){this.__syncEffectiveSide(e)}updated(e){if(this.open&&this.floating&&this.overlay&&o.__syncOverlayColors(this),e.has("open")){const t=!!e.get("open");this.__applyOpenSideEffects(t,this.open)}(e.has("open")||e.has("floating"))&&(this.open&&this.floating?p(this):(this.open||w(this),!this.open&&(E(this)||this.__scrollLockHeld)?v(this,this.__scrollLockHeld?()=>this.__releaseScrollLock():void 0):h(this)))}__applyOpenSideEffects(e,t){if(t&&!e)this.__syncLastTriggerExpanded(!0),this.floating&&this.overlay&&(o.__showOverlay(this),this.lockScroll&&this.__acquireScrollLock()),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.__focusFirstControl(),this.dispatchEvent(new CustomEvent("scb-drawer-opened",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("scbdraweropened",{bubbles:!0,composed:!0}));else if(!t&&e){this.__syncLastTriggerExpanded(!1),this.floating&&this.overlay&&o.__hideOverlay(this),document.removeEventListener("keydown",this.__onDocumentKeydown,!0);const r=this.__lastTriggerEl;requestAnimationFrame(()=>{this.open||r?.focus?.({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("scb-drawer-closed",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("scbdrawerclosed",{bubbles:!0,composed:!0}))}}__acquireScrollLock(){this.__scrollLockHeld||(o.__lockScrollEnable(),this.__scrollLockHeld=!0)}__releaseScrollLock(){this.__scrollLockHeld&&(this.__scrollLockHeld=!1,o.__lockScrollDisable())}},o=n,n.__overlayEl=null,n.__overlayStack=[],n.__lockedCount=0,n.__prevDocOverflow=null,n.__prevBodyOverflow=null,n.__prevBodyPaddingRight=null,n.styles=g`:host{display:block;color:var(--scb-drawer-content-color, var(--md-sys-color-on-surface));padding:var(--scb-drawer-design-surface-padding-medium);background:var(--scb-drawer-background,
39
+ `}connectedCallback(){super.connectedCallback(),this.__syncEffectiveSide(new Map),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.overlay&&(o.__hideOverlay(this),this.__releaseScrollLock()),p(this),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;const t=e.composedPath();for(const r of t)if(r instanceof Element){if(r.getAttribute("data-drawer-open")===this.id)return this.__lastTriggerEl=r,this.__lastTriggerWasAriaControls=!1,"open";if(r.getAttribute("data-drawer-close")===this.id)return this.contains(r)||(this.__lastTriggerEl=r,this.__lastTriggerWasAriaControls=!1),"close";if(r.getAttribute("data-drawer-toggle")===this.id)return this.__lastTriggerEl=r,this.__lastTriggerWasAriaControls=!1,"toggle";if(r.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=r,this.__lastTriggerWasAriaControls=!0,"toggle"}return null}__hasOpenNestedOverlay(e){const t="scb-options-menu, scb-dropdown, scb-select",r=s=>s instanceof Element&&s!==this&&s.matches(t)&&!!s.open;return e.composedPath().some(r)?!0:Array.from(this.querySelectorAll(t)).some(s=>!!s.open)}__getFocusable(){const e=["button","[href]","input","select","textarea",'[tabindex]:not([tabindex="-1"])',"scb-button","scb-icon-button","scb-textfield","scb-checkbox","scb-radio-button","scb-switch","scb-chip","scb-menu-item"].join(", "),t=new Set,r=s=>{s.querySelectorAll(e).forEach(u=>{const a=this.__resolveFocusable(u);a&&t.add(a)})};return r(this),r(this.renderRoot),Array.from(t).filter(s=>!this.__isDisabledOrHidden(s))}__resolveFocusable(e){return this.__isDisabledOrHidden(e)?null:e.tagName==="SCB-BUTTON"||e.tagName==="SCB-ICON-BUTTON"?e.shadowRoot?.querySelector(".native-button, button, a")??e:e.tagName==="SCB-MENU-ITEM"?e.shadowRoot?.querySelector(".scb-menu-label-text")??e:e}__isDisabledOrHidden(e){if(e.disabled||e.getAttribute("aria-hidden")==="true")return!0;const t=getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"}__currentFocusableFromEvent(e,t){const r=e.composedPath();return t.find(s=>r.includes(s))??(this.shadowRoot?.activeElement instanceof HTMLElement?this.shadowRoot.activeElement:null)??(document.activeElement instanceof HTMLElement?document.activeElement:null)}__setOpen(e){this.open=e}async __focusFirstControl(){await this.updateComplete;for(let e=0;e<4;e+=1){await new Promise(r=>requestAnimationFrame(()=>r()));const t=this.__getFocusable()[0];if(t?.focus?.({preventScroll:!0}),t&&this.__isFocused(t))return}}__isFocused(e){if(document.activeElement===e)return!0;const t=e.getRootNode();return t instanceof ShadowRoot&&t.activeElement===e}__syncLastTriggerExpanded(e){this.__lastTriggerEl&&this.__lastTriggerWasAriaControls&&this.__lastTriggerEl.getAttribute("aria-controls")===this.id&&this.__lastTriggerEl.setAttribute("aria-expanded",String(e))}__syncEffectiveSide(e){const t=this.left&&this.right;let r;t?e.has("left")&&this.left&&!e.has("right")?r="left":r="right":this.right?r="right":r="left",this.__effectiveSide!==r&&(this.__effectiveSide=r),this.getAttribute("data-side")!==r&&this.setAttribute("data-side",r)}willUpdate(e){this.__syncEffectiveSide(e)}updated(e){if(this.open&&this.floating&&this.overlay&&o.__syncOverlayColors(this),e.has("open")){const t=!!e.get("open");this.__applyOpenSideEffects(t,this.open)}(e.has("open")||e.has("floating"))&&(this.open&&this.floating?h(this):(this.open||E(this),!this.open&&(w(this)||this.__scrollLockHeld)?v(this,this.__scrollLockHeld?()=>this.__releaseScrollLock():void 0):p(this)))}__applyOpenSideEffects(e,t){if(t&&!e)this.__syncLastTriggerExpanded(!0),this.floating&&this.overlay&&(o.__showOverlay(this),this.lockScroll&&this.__acquireScrollLock()),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.__focusFirstControl(),this.dispatchEvent(new CustomEvent("scb-drawer-opened",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("scbdraweropened",{bubbles:!0,composed:!0}));else if(!t&&e){this.__syncLastTriggerExpanded(!1),this.floating&&this.overlay&&o.__hideOverlay(this),document.removeEventListener("keydown",this.__onDocumentKeydown,!0);const r=this.__lastTriggerEl;requestAnimationFrame(()=>{this.open||r?.focus?.({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("scb-drawer-closed",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("scbdrawerclosed",{bubbles:!0,composed:!0}))}}__acquireScrollLock(){this.__scrollLockHeld||(o.__lockScrollEnable(),this.__scrollLockHeld=!0)}__releaseScrollLock(){this.__scrollLockHeld&&(this.__scrollLockHeld=!1,o.__lockScrollDisable())}},o=n,n.__overlayEl=null,n.__overlayStack=[],n.__lockedCount=0,n.__prevDocOverflow=null,n.__prevBodyOverflow=null,n.__prevBodyPaddingRight=null,n.styles=g`:host{display:block;color:var(--scb-drawer-content-color, var(--md-sys-color-on-surface));padding:var(--scb-drawer-design-surface-padding-medium);background:var(--scb-drawer-background,
40
40
  var(--md-sys-color-surface-container)
41
41
  );font-family:var(--brand-font)}:host([popover]){inset:auto;margin:0;border:0}:host([floating]){box-sizing:border-box;position:fixed;top:0;height:100vh;height:100dvh;width:clamp(var(--scb-drawer-min-width, 280px),var(--scb-drawer-fluid-width, 70vw),var(--scb-drawer-max-width, 360px));--scb-drawer-background:var(--scb-drawer-surface-color, var(--md-sys-color-surface-container-lowest));box-shadow:var(--scb-drawer-elevation, var(--scb-shadow-drawer-start));border-radius:var(--scb-drawer-design-surface-radius-medium);z-index:var(--scb-drawer-z, var(--scb-layer-drawer, 1000));transition:transform .3s ease,opacity .3s ease,visibility .3s;opacity:0;visibility:hidden;pointer-events:none;will-change:transform;font-family:var(--brand-font);overflow:hidden}@media (prefers-reduced-motion:reduce){:host([floating]){transition:none}}:host([floating][data-side="left"]){left:0;transform:translateX(-100%)}:host([floating][data-side="left"][open]){transform:translateX(0);opacity:1;visibility:visible;pointer-events:auto}:host([floating][data-side="right"]){right:0;transform:translateX(100%);box-shadow:var(--scb-drawer-elevation, var(--scb-shadow-drawer-end))}:host([floating][data-side="right"][open]){transform:translateX(0);opacity:1;visibility:visible;pointer-events:auto}::slotted(scb-menu){background:var(--scb-drawer-surface-color, var(--md-sys-color-surface-container-lowest));--scb-menu-background:var(--scb-drawer-surface-color, var(--md-sys-color-surface-container-lowest))}.root{height:100%;display:flex;flex-direction:column;min-height:0}.panel{contain:layout paint style;flex:1 1 auto;min-height:0;overflow:auto;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}:host([floating]:not([open])) .panel{content-visibility:auto;contain-intrinsic-size:0 600px}@supports not (scrollbar-gutter:stable){.panel{overflow-y:scroll}}:host{--scb-drawer-design-surface-padding-medium:var(--scb-drawer-padding, var(--spacing-4, 12px));--scb-drawer-design-surface-radius-medium:var(--scb-drawer-surface-radius, var(--radius-none, 0px))}`,n);l([c({type:Boolean,reflect:!0,converter:d})],i.prototype,"floating",void 0);l([c({type:Boolean,reflect:!0,converter:d})],i.prototype,"left",void 0);l([c({type:Boolean,reflect:!0,converter:d})],i.prototype,"right",void 0);l([c({type:Boolean,reflect:!0,converter:d})],i.prototype,"open",void 0);l([c({type:Boolean,reflect:!0,converter:d})],i.prototype,"overlay",void 0);l([c({type:Boolean,reflect:!0,attribute:"lock-scroll",converter:d})],i.prototype,"lockScroll",void 0);l([c({type:Boolean,reflect:!0,attribute:"close-on-overlay",converter:d})],i.prototype,"closeOnOverlay",void 0);l([c({type:Boolean,reflect:!0,converter:d})],i.prototype,"modal",void 0);l([c({type:String,reflect:!0,attribute:"aria-label"})],i.prototype,"ariaLabel",void 0);i=o=l([b("scb-drawer")],i);export{i as ScbDrawer};