scb-wc 0.1.210 → 0.1.211

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 (77) hide show
  1. package/README.md +20 -17
  2. package/all.js +12 -0
  3. package/index.js +97 -85
  4. package/mvc/components/all.js +7 -0
  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/{vendor → components/scb-chevron}/scb-chevron.js +1 -1
  13. package/mvc/components/scb-collapse/scb-collapse.js +10 -4
  14. package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +1 -1
  15. package/mvc/components/scb-datepicker/scb-datepicker.js +143 -0
  16. package/mvc/components/scb-dialog/scb-dialog.js +1 -1
  17. package/mvc/components/scb-drawer/scb-drawer.js +3 -3
  18. package/mvc/components/scb-drop-zone/scb-drop-zone.js +1 -1
  19. package/mvc/components/scb-dropdown/scb-dropdown.js +2 -2
  20. package/mvc/components/scb-fact-card/scb-fact-card.js +1 -1
  21. package/mvc/components/scb-header/scb-header.js +2 -2
  22. package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
  23. package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
  24. package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
  25. package/mvc/components/scb-link/scb-link.js +1 -1
  26. package/mvc/components/scb-link-button/scb-link-button.js +1 -1
  27. package/mvc/components/scb-list/scb-list-item.js +6 -6
  28. package/mvc/components/scb-menu/scb-menu-item.js +1 -1
  29. package/mvc/components/scb-nav/scb-nav.js +1 -1
  30. package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
  31. package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
  32. package/mvc/components/scb-options-menu/scb-options-menu.js +2 -2
  33. package/mvc/components/scb-options-menu/scb-options-sub-menu.js +1 -1
  34. package/mvc/components/scb-overlay/scb-overlay.js +3 -3
  35. package/mvc/components/scb-pagination/scb-pagination.js +1 -1
  36. package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
  37. package/mvc/components/scb-search/scb-search.js +3 -3
  38. package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
  39. package/mvc/components/scb-select/scb-select-option.js +1 -1
  40. package/mvc/components/scb-select/scb-select.js +1 -1
  41. package/mvc/components/scb-snackbar/scb-snackbar.js +1 -1
  42. package/mvc/components/scb-stepper/scb-step.js +1 -1
  43. package/mvc/components/scb-table/scb-table.js +1 -1
  44. package/mvc/components/scb-table-advanced/scb-table-advanced.js +1 -1
  45. package/mvc/components/scb-textfield/scb-textfield.js +33 -175
  46. package/mvc/components/scb-toc/scb-toc-item.js +1 -1
  47. package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
  48. package/mvc/{vendor → components/shared}/component-size-token.js +1 -1
  49. package/mvc/components/shared/lazy-focus-ring.js +2 -0
  50. package/mvc/components/shared/lazy-ripple.js +2 -0
  51. package/mvc/{vendor → components/shared}/manual-popover.js +1 -1
  52. package/mvc/components/shared/scb-icon-svg.js +11 -0
  53. package/package.json +2 -2
  54. package/scb-button/scb-button.js +1 -1
  55. package/scb-collapse/scb-collapse.js +10 -0
  56. package/scb-components/index.d.ts +106 -0
  57. package/scb-components/scb-chevron/scb-chevron.d.ts +11 -0
  58. package/scb-components/scb-datepicker/scb-datepicker.d.ts +47 -0
  59. package/scb-components/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
  60. package/scb-components/scb-viz/scb-viz-print-runtime.d.ts +30 -0
  61. package/scb-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +21 -0
  62. package/scb-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
  63. package/scb-components/scb-viz/scb-viz-table-runtime.d.ts +28 -0
  64. package/scb-components/shared/component-size-token.d.ts +1 -0
  65. package/scb-components/shared/lazy-focus-ring.d.ts +4 -0
  66. package/scb-components/shared/lazy-ripple.d.ts +9 -0
  67. package/scb-components/shared/manual-popover.d.ts +7 -0
  68. package/scb-components/shared/scb-icon-svg.d.ts +3 -0
  69. package/scb-viz/scb-viz-series-differentiation-registry.js +10 -7
  70. package/scb-viz/scb-viz.js +43 -43
  71. package/scb-wc.bundle.js +299 -289
  72. package/scb-wc.d.ts +212 -188
  73. package/shared/scb-icon-svg.js +5 -2
  74. package/mvc/vendor/lazy-focus-ring.js +0 -2
  75. package/mvc/vendor/lazy-ripple.js +0 -2
  76. package/mvc/vendor/scb-icon-svg.js +0 -11
  77. package/scb-wc-public-entry/index.d.ts +0 -94
@@ -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{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 $=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,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 L,O,P={fromAttribute($){if($===null)return!1;const e=$.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="no"}},m=(L=new WeakSet,O=class extends X{constructor(...e){super(...e),te(this,L),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 o=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[]);l=o[o.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(L,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(L,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(d=>Number(d));if(n.length!==3||n.some(d=>Number.isNaN(d)))return null;const[r,l,o]=n;return t?new Date(r,l-1,o,23,59,59,999):new Date(r,l-1,o,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),o=this._toLocalEventDate(r,!0);if(!l||!o)continue;if(o<l){const d=n.split("T")[0],u=t.get(d)||[];u.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),t.set(d,u);continue}for(let d=new Date(l);d<=o;d.setDate(d.getDate()+1)){const u=this._toDateKey(d),E=t.get(u)||[];E.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),t.set(u,E)}}else{const l=n.split("T")[0],o=t.get(l)||[];o.push({title:s.title,description:s.description,href:s.href,start:n}),t.set(l,o)}}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),o=this._toLocalEventDate(r,!0);if(!l||!o)continue;if(o<l){const d=n.split("T")[0],u=t.get(d)||[];u.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),t.set(d,u);continue}for(let d=new Date(l);d<=o;d.setDate(d.getDate()+1)){const u=this._toDateKey(d),E=t.get(u)||[];E.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),t.set(u,E)}}else if(n&&a.title){const l=n.split("T")[0],o=t.get(l)||[];o.push({title:a.title,description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n}),t.set(l,o)}}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 o=this.shadowRoot?.querySelector(`.calendar-day[data-date="${this._rovingDate}"]`);o&&this.__focusCalendarDay(o)})}_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 o=22+r+l,d=0;o==57&&(o-=7),o==56&&r==28&&l==6&&a>10&&(o-=7),o>31?(o-=31,d=4):d=3;const u=new Date(t,d-1,o);return this._easterDateCalculated["Ar"+e]=u,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",o=[["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 d of o){const[u,E,M]=d;if(M)return l?E:u}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 o=r?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(o=o.slice(0,5));const d=this._getEventInputs(),u=d?this._buildEventMapFromInputs(d):this._buildEventMapFromChildren(),E=`${e}-${String(t+1).padStart(2,"0")}-`,M=new Date(e,t,1);if(this.disableWeekend)for(;M.getDay()===0||M.getDay()===6;)M.setDate(M.getDate()+1);const B=this.__formatDateKey(n),U=[...u.keys()].find(i=>{if(!i.startsWith(E))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(M)].find(i=>i?.startsWith(E))??this.__formatDateKey(M),K=[];let N=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 p=N;for(let D=0;D<b.length;D++){const w=b[D];if(i===0&&w<s){if(!this.disableWeekend||w<5){const T=t===0?11:t-1,C=t===0?e-1:e,y=this._daysInMonth(C,T)-(s-w-1),z=new Date(C,T,y);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{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 $=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,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 L,O,P={fromAttribute($){if($===null)return!1;const e=$.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="no"}},m=(L=new WeakSet,O=class extends X{constructor(...e){super(...e),te(this,L),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 o=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[]);l=o[o.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(L,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(L,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(d=>Number(d));if(n.length!==3||n.some(d=>Number.isNaN(d)))return null;const[r,l,o]=n;return t?new Date(r,l-1,o,23,59,59,999):new Date(r,l-1,o,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),o=this._toLocalEventDate(r,!0);if(!l||!o)continue;if(o<l){const d=n.split("T")[0],u=t.get(d)||[];u.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),t.set(d,u);continue}for(let d=new Date(l);d<=o;d.setDate(d.getDate()+1)){const u=this._toDateKey(d),E=t.get(u)||[];E.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),t.set(u,E)}}else{const l=n.split("T")[0],o=t.get(l)||[];o.push({title:s.title,description:s.description,href:s.href,start:n}),t.set(l,o)}}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),o=this._toLocalEventDate(r,!0);if(!l||!o)continue;if(o<l){const d=n.split("T")[0],u=t.get(d)||[];u.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),t.set(d,u);continue}for(let d=new Date(l);d<=o;d.setDate(d.getDate()+1)){const u=this._toDateKey(d),E=t.get(u)||[];E.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),t.set(u,E)}}else if(n&&a.title){const l=n.split("T")[0],o=t.get(l)||[];o.push({title:a.title,description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n}),t.set(l,o)}}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 o=this.shadowRoot?.querySelector(`.calendar-day[data-date="${this._rovingDate}"]`);o&&this.__focusCalendarDay(o)})}_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 o=22+r+l,d=0;o==57&&(o-=7),o==56&&r==28&&l==6&&a>10&&(o-=7),o>31?(o-=31,d=4):d=3;const u=new Date(t,d-1,o);return this._easterDateCalculated["Ar"+e]=u,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",o=[["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 d of o){const[u,E,M]=d;if(M)return l?E:u}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 o=r?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(o=o.slice(0,5));const d=this._getEventInputs(),u=d?this._buildEventMapFromInputs(d):this._buildEventMapFromChildren(),E=`${e}-${String(t+1).padStart(2,"0")}-`,M=new Date(e,t,1);if(this.disableWeekend)for(;M.getDay()===0||M.getDay()===6;)M.setDate(M.getDate()+1);const B=this.__formatDateKey(n),U=[...u.keys()].find(i=>{if(!i.startsWith(E))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(M)].find(i=>i?.startsWith(E))??this.__formatDateKey(M),K=[];let N=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 p=N;for(let D=0;D<b.length;D++){const w=b[D];if(i===0&&w<s){if(!this.disableWeekend||w<5){const T=t===0?11:t-1,C=t===0?e-1:e,y=this._daysInMonth(C,T)-(s-w-1),z=new Date(C,T,y);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=["../../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 r,v as n,y as P}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as H}from"../../vendor/preload-helper.js";import{t as a}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 t=customElements.define.bind(customElements);customElements.define=function(i,d,c){try{customElements.get(i)||t(i,d,c)}catch(o){var s=String(o||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var g,L=new Intl.DateTimeFormat("sv-SE",{month:"short"}),p={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 e=(g=class extends T{constructor(...t){super(...t),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(t){return!!this.querySelector(`[slot="${t}"]`)}__getSlottedText(t){return this.querySelector(`[slot="${t}"]`)?.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(t){if(this.cardHref){if(t&&(this.__pendingRippleEvent=t),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 t=this.renderRoot.querySelector("md-ripple"),i=this.renderRoot.querySelector(".calendar-card"),d=this.__pendingRippleEvent,c=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:s}=await S();await s(t,i,d,c)}render(){const t=this.variant?`${this.variant.toLowerCase()}`:"",i=this.direction?`${this.direction.toLowerCase()}`:"",d=this.cardHref?"clickable":"",c=this.__hasSlottedContent("heading"),s=this.__hasSlottedContent("subtitle"),o=this.__hasSlottedContent("supporting-text"),u=this.calendarCardTitle||this.title,v=this.subtitle,f=this.supportingText,m=c||!!u,y=s||!!v,R=o||!!f,{day:_,month:w}=this.__getDateParts(),z=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",x=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",k=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",$=`${z?`inline-size:${z};`:""}${x?`block-size:${x};`:""}${k?`aspect-ratio:${k};`:""}`;return n`
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 r,v as n,y as P}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as H}from"../../vendor/preload-helper.js";import{t as a}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 t=customElements.define.bind(customElements);customElements.define=function(i,l,c){try{customElements.get(i)||t(i,l,c)}catch(o){var s=String(o||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var g,L=new Intl.DateTimeFormat("sv-SE",{month:"short"}),p={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 e=(g=class extends T{constructor(...t){super(...t),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(t){return!!this.querySelector(`[slot="${t}"]`)}__getSlottedText(t){return this.querySelector(`[slot="${t}"]`)?.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(t){if(this.cardHref){if(t&&(this.__pendingRippleEvent=t),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 t=this.renderRoot.querySelector("md-ripple"),i=this.renderRoot.querySelector(".calendar-card"),l=this.__pendingRippleEvent,c=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:s}=await S();await s(t,i,l,c)}render(){const t=this.variant?`${this.variant.toLowerCase()}`:"",i=this.direction?`${this.direction.toLowerCase()}`:"",l=this.cardHref?"clickable":"",c=this.__hasSlottedContent("heading"),s=this.__hasSlottedContent("subtitle"),o=this.__hasSlottedContent("supporting-text"),u=this.calendarCardTitle||this.title,v=this.subtitle,f=this.supportingText,m=c||!!u,y=s||!!v,R=o||!!f,{day:_,month:w}=this.__getDateParts(),z=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",x=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",k=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",$=`${z?`inline-size:${z};`:""}${x?`block-size:${x};`:""}${k?`aspect-ratio:${k};`:""}`;return n`
3
3
  <div
4
- class="calendar-card ${i} ${d} ${t}"
4
+ class="calendar-card ${i} ${l} ${t}"
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 r,v as n,y as P}from"../../vendor/vendor.js";import"..
38
38
  </div>
39
39
  </div>
40
40
  ${this.cardHref&&this.__focusRingLoaded?n`<md-focus-ring></md-focus-ring>`:""}
41
- `}__getDateParts(){const t={day:1,month:"Jan"};if(!this.date)return t;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 t;const d=i.getDate(),c=L.format(i).replace(".","").trim();return{day:d,month:c.charAt(0).toUpperCase()+c.slice(1)}}__applyInnerSizing(){const t=this.renderRoot.querySelector(".calendar-card");t&&(this.width&&this.width.trim()!==""?(t.style.inlineSize="100%",t.style.maxInlineSize="100%"):(t.style.removeProperty("inline-size"),t.style.removeProperty("max-inline-size")),this.height&&this.height.trim()!==""||this.sizing==="stretch"?t.style.blockSize="100%":t.style.removeProperty("block-size"),this.maxHeight&&this.maxHeight.trim()!==""?t.style.maxBlockSize="100%":t.style.removeProperty("max-block-size"))}_onKeyDown(t){(t.key==="Enter"||t.key===" ")&&this.cardHref&&(t.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(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,d=this.mapSpacingToken(this.spacingBottom)??t,c=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"),c?this.style.setProperty("--scb-calendar-card-spacing-inline-start",c):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(t){t.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("minWidth")&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty("min-inline-size")),t.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),t.has("minHeight")&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty("min-block-size")),(t.has("width")||t.has("height")||t.has("maxHeight")||t.has("sizing"))&&this.__applyInnerSizing(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}},g.styles=P`:host{--scb-cards-title-font-weight-current:var(--scb-cards-title-large-font-weight, var(--scb-cards-title-large-weight, var(--scb-cards-title-font-weight, var(--scb-cards-title-weight))));--scb-cards-title-letter-spacing-current:var(--scb-cards-title-large-letter-spacing, var(--scb-cards-title-large-tracking, var(--scb-cards-title-letter-spacing, var(--scb-cards-title-tracking))));--scb-cards-title-line-height-current:var(--scb-cards-title-large-line-height, var(--scb-cards-title-line-height));--scb-cards-title-tracking-current:var(--scb-cards-title-large-tracking, var(--scb-cards-title-large-letter-spacing, var(--scb-cards-title-tracking, var(--scb-cards-title-letter-spacing))));--scb-cards-title-weight-current:var(--scb-cards-title-large-weight, var(--scb-cards-title-large-font-weight, var(--scb-cards-title-weight, var(--scb-cards-title-font-weight))));--scb-cards-title-size-current:var(--scb-cards-title-large-size, var(--scb-cards-title-size));--scb-cards-title-font-current:var(--scb-cards-title-large-font, var(--scb-cards-title-font));--scb-cards-subtitle-font-weight-current:var(--scb-cards-subtitle-large-font-weight, var(--scb-cards-subtitle-large-weight, var(--scb-cards-subtitle-font-weight, var(--scb-cards-subtitle-weight))));--scb-cards-subtitle-letter-spacing-current:var(--scb-cards-subtitle-large-letter-spacing, var(--scb-cards-subtitle-large-tracking, var(--scb-cards-subtitle-letter-spacing, var(--scb-cards-subtitle-tracking))));--scb-cards-subtitle-line-height-current:var(--scb-cards-subtitle-large-line-height, var(--scb-cards-subtitle-line-height));--scb-cards-subtitle-tracking-current:var(--scb-cards-subtitle-large-tracking, var(--scb-cards-subtitle-large-letter-spacing, var(--scb-cards-subtitle-tracking, var(--scb-cards-subtitle-letter-spacing))));--scb-cards-subtitle-weight-current:var(--scb-cards-subtitle-large-weight, var(--scb-cards-subtitle-large-font-weight, var(--scb-cards-subtitle-weight, var(--scb-cards-subtitle-font-weight))));--scb-cards-subtitle-size-current:var(--scb-cards-subtitle-large-size, var(--scb-cards-subtitle-size));--scb-cards-subtitle-font-current:var(--scb-cards-subtitle-large-font, var(--scb-cards-subtitle-font));--scb-cards-supporting-font-weight-current:var(--scb-cards-supporting-large-font-weight, var(--scb-cards-supporting-large-weight, var(--scb-cards-supporting-font-weight, var(--scb-cards-supporting-weight))));--scb-cards-supporting-letter-spacing-current:var(--scb-cards-supporting-large-letter-spacing, var(--scb-cards-supporting-large-tracking, var(--scb-cards-supporting-letter-spacing, var(--scb-cards-supporting-tracking))));--scb-cards-supporting-line-height-current:var(--scb-cards-supporting-large-line-height, var(--scb-cards-supporting-line-height));--scb-cards-supporting-tracking-current:var(--scb-cards-supporting-large-tracking, var(--scb-cards-supporting-large-letter-spacing, var(--scb-cards-supporting-tracking, var(--scb-cards-supporting-letter-spacing))));--scb-cards-supporting-weight-current:var(--scb-cards-supporting-large-weight, var(--scb-cards-supporting-large-font-weight, var(--scb-cards-supporting-weight, var(--scb-cards-supporting-font-weight))));--scb-cards-supporting-size-current:var(--scb-cards-supporting-large-size, var(--scb-cards-supporting-size));--scb-cards-supporting-font-current:var(--scb-cards-supporting-large-font, var(--scb-cards-supporting-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-cards-content-padding-block-large, var(--spacing-7, 24px)));--scb-calendar-card-padding-inline:var(--scb-calendar-card-padding, var(--scb-cards-content-padding-block-large, var(--spacing-7, 24px)));--scb-calendar-card-surface-radius:var(--scb-cards-surface-radius-large, var(--radius-large, 16px));--scb-calendar-card-border-width:var(--scb-cards-border-width-large, var(--stroke-border, 1px));--scb-calendar-card-gap:var(--scb-cards-calendar-gap-large, var(--spacing-4, 12px));--scb-calendar-card-horizontal-gap:var(--scb-cards-calendar-horizontal-gap-large, var(--spacing-6, 20px));--scb-calendar-card-horizontal-min-block-size:var(--scb-cards-calendar-horizontal-min-block-size-large, 112px);--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-cards-calendar-media-size-large, var(--spacing-11, 64px));--scb-calendar-card-media-radius:var(--scb-cards-calendar-media-radius-large, var(--radius-small, 8px));--scb-calendar-card-media-gap:var(--scb-cards-calendar-media-gap-large, var(--spacing-2, 4px));--scb-calendar-card-day-size:var(--scb-cards-calendar-date-day-size-large, var(--scale-07, 28px));--scb-calendar-card-day-letter-spacing:-0.6px;--scb-calendar-card-month-size:var(--scb-cards-calendar-date-month-size-large, var(--scale-02, 14px));--scb-calendar-card-content-gap:var(--scb-cards-calendar-content-gap-large, var(--spacing-4, 12px));--scb-calendar-card-header-gap:var(--scb-cards-calendar-title-gap-large, var(--spacing-2, 4px));--scb-calendar-card-title-min-block-size:var(--scb-calendar-card-title-line-height);--scb-calendar-card-icon-size:var(--scb-cards-calendar-icon-size-large, var(--icon-size-medium, 24px));--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)}`,g);a([r({type:String,reflect:!0})],e.prototype,"variant",void 0);a([r({type:String,attribute:"date"})],e.prototype,"date",void 0);a([r({type:String,reflect:!0})],e.prototype,"direction",void 0);a([r({type:String,reflect:!0,converter:p})],e.prototype,"title",void 0);a([r({type:String,attribute:"calendar-card-title",reflect:!0,converter:p})],e.prototype,"calendarCardTitle",void 0);a([r({type:String,reflect:!0,converter:p})],e.prototype,"subtitle",void 0);a([r({type:String,attribute:"supporting-text",reflect:!0,converter:p})],e.prototype,"supportingText",void 0);a([r({type:String,attribute:"card-href"})],e.prototype,"cardHref",void 0);a([r({type:String,attribute:"card-href-nav"})],e.prototype,"cardHrefNav",void 0);a([r({type:Boolean,reflect:!0,attribute:"show-media"})],e.prototype,"showMedia",void 0);a([r({type:String,attribute:"date-label-prefix"})],e.prototype,"dateLabelPrefix",void 0);a([r({type:String,attribute:"media-width"})],e.prototype,"mediaWidth",void 0);a([r({type:String,attribute:"media-height"})],e.prototype,"mediaHeight",void 0);a([r({type:String,attribute:"media-aspect"})],e.prototype,"mediaAspect",void 0);a([r({type:String,reflect:!0})],e.prototype,"width",void 0);a([r({type:String,reflect:!0,attribute:"max-width"})],e.prototype,"maxWidth",void 0);a([r({type:String,attribute:"min-width"})],e.prototype,"minWidth",void 0);a([r({type:String,reflect:!0})],e.prototype,"height",void 0);a([r({type:String,reflect:!0,attribute:"max-height"})],e.prototype,"maxHeight",void 0);a([r({type:String,attribute:"min-height"})],e.prototype,"minHeight",void 0);a([r({type:String,reflect:!0,converter:p})],e.prototype,"sizing",void 0);a([r({type:String,reflect:!0})],e.prototype,"spacing",void 0);a([r({type:String,attribute:"spacing-top",reflect:!0})],e.prototype,"spacingTop",void 0);a([r({type:String,attribute:"spacing-bottom",reflect:!0})],e.prototype,"spacingBottom",void 0);a([r({type:String,attribute:"spacing-left",reflect:!0})],e.prototype,"spacingLeft",void 0);a([r({type:String,attribute:"spacing-right",reflect:!0})],e.prototype,"spacingRight",void 0);e=a([C("scb-calendar-card")],e);
41
+ `}__getDateParts(){const t={day:1,month:"Jan"};if(!this.date)return t;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 t;const l=i.getDate(),c=L.format(i).replace(".","").trim();return{day:l,month:c.charAt(0).toUpperCase()+c.slice(1)}}__applyInnerSizing(){const t=this.renderRoot.querySelector(".calendar-card");t&&(this.width&&this.width.trim()!==""?(t.style.inlineSize="100%",t.style.maxInlineSize="100%"):(t.style.removeProperty("inline-size"),t.style.removeProperty("max-inline-size")),this.height&&this.height.trim()!==""||this.sizing==="stretch"?t.style.blockSize="100%":t.style.removeProperty("block-size"),this.maxHeight&&this.maxHeight.trim()!==""?t.style.maxBlockSize="100%":t.style.removeProperty("max-block-size"))}_onKeyDown(t){(t.key==="Enter"||t.key===" ")&&this.cardHref&&(t.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(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,l=this.mapSpacingToken(this.spacingBottom)??t,c=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"),c?this.style.setProperty("--scb-calendar-card-spacing-inline-start",c):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(t){t.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("minWidth")&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty("min-inline-size")),t.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),t.has("minHeight")&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty("min-block-size")),(t.has("width")||t.has("height")||t.has("maxHeight")||t.has("sizing"))&&this.__applyInnerSizing(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}},g.styles=P`:host{--scb-cards-title-font-weight-current:var(--scb-cards-title-large-font-weight, var(--scb-cards-title-large-weight, var(--scb-cards-title-font-weight, var(--scb-cards-title-weight))));--scb-cards-title-letter-spacing-current:var(--scb-cards-title-large-letter-spacing, var(--scb-cards-title-large-tracking, var(--scb-cards-title-letter-spacing, var(--scb-cards-title-tracking))));--scb-cards-title-line-height-current:var(--scb-cards-title-large-line-height, var(--scb-cards-title-line-height));--scb-cards-title-tracking-current:var(--scb-cards-title-large-tracking, var(--scb-cards-title-large-letter-spacing, var(--scb-cards-title-tracking, var(--scb-cards-title-letter-spacing))));--scb-cards-title-weight-current:var(--scb-cards-title-large-weight, var(--scb-cards-title-large-font-weight, var(--scb-cards-title-weight, var(--scb-cards-title-font-weight))));--scb-cards-title-size-current:var(--scb-cards-title-large-size, var(--scb-cards-title-size));--scb-cards-title-font-current:var(--scb-cards-title-large-font, var(--scb-cards-title-font));--scb-cards-subtitle-font-weight-current:var(--scb-cards-subtitle-large-font-weight, var(--scb-cards-subtitle-large-weight, var(--scb-cards-subtitle-font-weight, var(--scb-cards-subtitle-weight))));--scb-cards-subtitle-letter-spacing-current:var(--scb-cards-subtitle-large-letter-spacing, var(--scb-cards-subtitle-large-tracking, var(--scb-cards-subtitle-letter-spacing, var(--scb-cards-subtitle-tracking))));--scb-cards-subtitle-line-height-current:var(--scb-cards-subtitle-large-line-height, var(--scb-cards-subtitle-line-height));--scb-cards-subtitle-tracking-current:var(--scb-cards-subtitle-large-tracking, var(--scb-cards-subtitle-large-letter-spacing, var(--scb-cards-subtitle-tracking, var(--scb-cards-subtitle-letter-spacing))));--scb-cards-subtitle-weight-current:var(--scb-cards-subtitle-large-weight, var(--scb-cards-subtitle-large-font-weight, var(--scb-cards-subtitle-weight, var(--scb-cards-subtitle-font-weight))));--scb-cards-subtitle-size-current:var(--scb-cards-subtitle-large-size, var(--scb-cards-subtitle-size));--scb-cards-subtitle-font-current:var(--scb-cards-subtitle-large-font, var(--scb-cards-subtitle-font));--scb-cards-supporting-font-weight-current:var(--scb-cards-supporting-large-font-weight, var(--scb-cards-supporting-large-weight, var(--scb-cards-supporting-font-weight, var(--scb-cards-supporting-weight))));--scb-cards-supporting-letter-spacing-current:var(--scb-cards-supporting-large-letter-spacing, var(--scb-cards-supporting-large-tracking, var(--scb-cards-supporting-letter-spacing, var(--scb-cards-supporting-tracking))));--scb-cards-supporting-line-height-current:var(--scb-cards-supporting-large-line-height, var(--scb-cards-supporting-line-height));--scb-cards-supporting-tracking-current:var(--scb-cards-supporting-large-tracking, var(--scb-cards-supporting-large-letter-spacing, var(--scb-cards-supporting-tracking, var(--scb-cards-supporting-letter-spacing))));--scb-cards-supporting-weight-current:var(--scb-cards-supporting-large-weight, var(--scb-cards-supporting-large-font-weight, var(--scb-cards-supporting-weight, var(--scb-cards-supporting-font-weight))));--scb-cards-supporting-size-current:var(--scb-cards-supporting-large-size, var(--scb-cards-supporting-size));--scb-cards-supporting-font-current:var(--scb-cards-supporting-large-font, var(--scb-cards-supporting-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-cards-content-padding-block-large, var(--spacing-7, 24px)));--scb-calendar-card-padding-inline:var(--scb-calendar-card-padding, var(--scb-cards-content-padding-block-large, var(--spacing-7, 24px)));--scb-calendar-card-surface-radius:var(--scb-cards-surface-radius-large, var(--radius-large, 16px));--scb-calendar-card-border-width:var(--scb-cards-border-width-large, var(--stroke-border, 1px));--scb-calendar-card-gap:var(--scb-cards-calendar-gap-large, var(--spacing-4, 12px));--scb-calendar-card-horizontal-gap:var(--scb-cards-calendar-horizontal-gap-large, var(--spacing-6, 20px));--scb-calendar-card-horizontal-min-block-size:var(--scb-cards-calendar-horizontal-min-block-size-large, 112px);--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-cards-calendar-media-size-large, var(--spacing-11, 64px));--scb-calendar-card-media-radius:var(--scb-cards-calendar-media-radius-large, var(--radius-small, 8px));--scb-calendar-card-media-gap:var(--scb-cards-calendar-media-gap-large, var(--spacing-2, 4px));--scb-calendar-card-day-size:var(--scb-cards-calendar-date-day-size-large, var(--scale-07, 28px));--scb-calendar-card-day-letter-spacing:-0.6px;--scb-calendar-card-month-size:var(--scb-cards-calendar-date-month-size-large, var(--scale-02, 14px));--scb-calendar-card-content-gap:var(--scb-cards-calendar-content-gap-large, var(--spacing-4, 12px));--scb-calendar-card-header-gap:var(--scb-cards-calendar-title-gap-large, var(--spacing-2, 4px));--scb-calendar-card-title-min-block-size:var(--scb-calendar-card-title-line-height);--scb-calendar-card-icon-size:var(--scb-cards-calendar-icon-size-large, var(--icon-size-medium, 24px));--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)}`,g);a([r({type:String,reflect:!0})],e.prototype,"variant",void 0);a([r({type:String,attribute:"date"})],e.prototype,"date",void 0);a([r({type:String,reflect:!0})],e.prototype,"direction",void 0);a([r({type:String,reflect:!0,converter:p})],e.prototype,"title",void 0);a([r({type:String,attribute:"calendar-card-title",reflect:!0,converter:p})],e.prototype,"calendarCardTitle",void 0);a([r({type:String,reflect:!0,converter:p})],e.prototype,"subtitle",void 0);a([r({type:String,attribute:"supporting-text",reflect:!0,converter:p})],e.prototype,"supportingText",void 0);a([r({type:String,attribute:"card-href"})],e.prototype,"cardHref",void 0);a([r({type:String,attribute:"card-href-nav"})],e.prototype,"cardHrefNav",void 0);a([r({type:Boolean,reflect:!0,attribute:"show-media"})],e.prototype,"showMedia",void 0);a([r({type:String,attribute:"date-label-prefix"})],e.prototype,"dateLabelPrefix",void 0);a([r({type:String,attribute:"media-width"})],e.prototype,"mediaWidth",void 0);a([r({type:String,attribute:"media-height"})],e.prototype,"mediaHeight",void 0);a([r({type:String,attribute:"media-aspect"})],e.prototype,"mediaAspect",void 0);a([r({type:String,reflect:!0})],e.prototype,"width",void 0);a([r({type:String,reflect:!0,attribute:"max-width"})],e.prototype,"maxWidth",void 0);a([r({type:String,attribute:"min-width"})],e.prototype,"minWidth",void 0);a([r({type:String,reflect:!0})],e.prototype,"height",void 0);a([r({type:String,reflect:!0,attribute:"max-height"})],e.prototype,"maxHeight",void 0);a([r({type:String,attribute:"min-height"})],e.prototype,"minHeight",void 0);a([r({type:String,reflect:!0,converter:p})],e.prototype,"sizing",void 0);a([r({type:String,reflect:!0})],e.prototype,"spacing",void 0);a([r({type:String,attribute:"spacing-top",reflect:!0})],e.prototype,"spacingTop",void 0);a([r({type:String,attribute:"spacing-bottom",reflect:!0})],e.prototype,"spacingBottom",void 0);a([r({type:String,attribute:"spacing-left",reflect:!0})],e.prototype,"spacingLeft",void 0);a([r({type:String,attribute:"spacing-right",reflect:!0})],e.prototype,"spacingRight",void 0);e=a([C("scb-calendar-card")],e);
@@ -1,5 +1,5 @@
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 ft,m as f,p as r,v as d,y as yt}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as m}from"../../vendor/preload-helper.js";import{t as zt}from"../../vendor/component-size-token.js";import{t as _t}from"../../vendor/component-defaults.js";import{t as a}from"../../vendor/decorate.js";(function(){try{var p=typeof globalThis<"u"?globalThis:window;if(!p.__scb_ce_guard_installed__){p.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,i,c){try{customElements.get(t)||e(t,i,c)}catch(b){var n=String(b||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw b}}}}catch{}})();var C,xt=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",_="data-scb-card-managed-action-button-size",R="data-scb-card-managed-avatar-size",kt=new Set(["small","medium","large"]),wt=new Set(["small","medium","large","extra-large"]),$,P,I,E,B,D,H,O,V,N;function St(){return O??(O=m(()=>import("../../vendor/lazy-focus-ring.js").then(p=>p.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 At(){return $??($=m(()=>import("../scb-list/scb-list.js"),__vite__mapDeps([4,5,6,7,8,9,2,10]),import.meta.url)),$}function Tt(){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 Lt(){return I??(I=m(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([14,5,6,2,7,8,12,13]),import.meta.url)),I}function Ct(){return E??(E=m(()=>import("../scb-link/scb-link.js"),__vite__mapDeps([15,5,6,0,1,2,8,12,13,16]),import.meta.url)),E}function Rt(){return B??(B=m(()=>import("../scb-chip/scb-chip.js"),__vite__mapDeps([17,5,6,2,8,12,13]),import.meta.url)),B}function $t(){return D??(D=m(()=>import("../scb-avatar/scb-avatar.js"),__vite__mapDeps([18,5,6,2,7,8,12,13]),import.meta.url)),D}function Pt(){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 It(){return N??(N=m(()=>import("../../vendor/scb-card-variants.internal.js"),__vite__mapDeps([22,5,6]),import.meta.url)),N}var o={fromAttribute:p=>p??"",toAttribute:p=>typeof p!="string"||p.trim()===""?null:p},s=(C=class extends ft{constructor(...e){super(...e),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=_t["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=t=>{const i=t.currentTarget.closest(".media");i&&i.classList.add("is-loaded")},this.__ensureRippleOnInteraction=(t,i=!1)=>{if(this.__primaryHref()){if(t&&(this.__pendingRippleEvent=t),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 t=this.renderRoot.querySelector("md-ripple"),i=this.renderRoot.querySelector(".scb-card"),c=this.__pendingRippleEvent,n=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:b}=await U();await b(t,i,c,n)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,St().then(({ensureFocusRingReady:t})=>t()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=t=>{if(t.target!==t.currentTarget)return;const i=this.__primaryHref();(t.key==="Enter"||t.key===" ")&&i&&(t.preventDefault(),this.__ensureRippleOnInteraction(void 0,!0),this.__navigate(i,t))},this.__handleHrefNavigation=t=>{const i=this.__primaryHref();i&&(t.target.closest("a")||this.__navigate(i,t))},this.__handleSlottedCardLinkClick=t=>{const i=t.composedPath().find(c=>c instanceof HTMLAnchorElement&&c.getAttribute("slot")==="card-link")?.getAttribute("href")||this.__primaryHref();i&&(this.__dispatchCardNavigate(i,t)||t.preventDefault())}}attributeChangedCallback(e,t,i){this.__isSyncingManagedSocialAttributes&&xt.has(e)||super.attributeChangedCallback(e,t,i)}get likeButton(){return this.cardType!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(e){const t=(e||"").trim();if(!t)return{w:600,h:400};const i=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(i&&i.length===2){const n=Number(i[0]),b=Number(i[1]);if(n>0&&b>0)return{w:n,h:b}}const c=Number(t);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:600,h:400}}__mediaReserveAspect(e=""){const t=(this.mediaAspect||"").trim();if(t)return t;const i=Number(this.mediaWidth)||0,c=Number(this.mediaHeight)||0;return i>0&&c>0?`${i} / ${c}`:e}__mediaReserveStyle(e=""){const t=this.__mediaReserveAspect(e);return t?`--scb-card-media-aspect:${t};`:""}__slottedMediaAspect(){const e=this.querySelector('[slot="media"]');if(!e)return"";const t=Number(e.getAttribute("width"))||0,i=Number(e.getAttribute("height"))||0;return t>0&&i>0?`${t} / ${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 e=(this.type||"standard").toLowerCase();switch(e){case"standard":case"list":case"social":case"link":case"action":case"container":return e;default:return"standard"}}__ensureVariantRenderer(){return this.cardType==="standard"||this.__variantRenderer?Promise.resolve():It().then(e=>{this.__variantRenderer!==e&&(this.__variantRenderer=e,e.ensureScbCardVariantStyles(this.renderRoot),this.requestUpdate())})}__dispatchCardNavigate(e,t){const i={href:e,originalEvent:t},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const n=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});return this.dispatchEvent(n),!n.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(e,t){e&&this.__dispatchCardNavigate(e,t)&&window.open(e,"_self")}__slotNames(){const e=new Set;for(const t of Array.from(this.children)){const i=t.getAttribute("slot");i&&e.add(i)}return e}__hasSlottedContent(e,t){return t?t.has(e):Array.from(this.children).some(i=>i.getAttribute("slot")===e)}__hasLightDomElement(e){return!!this.querySelector(e)}__syncListCardListSize(){const e=Array.from(this.querySelectorAll("scb-list"));if(this.cardType!=="list"){for(const i of e){const c=i.getAttribute(z);c!==null&&i.getAttribute("size")===c&&i.removeAttribute("size"),i.removeAttribute(z)}return}const t=this.size||"large";for(const i of e){const c=i.getAttribute(z);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(z);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",t),i.setAttribute(z,t))}}__actionCardButtonSize(){const e=getComputedStyle(this).getPropertyValue("--scb-card-size-actions-button-size").trim();return kt.has(e)?e:"medium"}__cardAvatarSize(){const e=getComputedStyle(this).getPropertyValue("--scb-card-size-avatar-component-size").trim();return wt.has(e)?e:"medium"}__syncAvatarSizes(){const e=Array.from(this.querySelectorAll(':scope > scb-avatar[slot="media"]')),t=this.__cardAvatarSize();for(const i of e){const c=i.getAttribute(R);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(R);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",t),i.setAttribute(R,t))}}__socialIconButtonSize(){return zt(this,"--scb-card-size-social-icon-button-component-size",["tiny","extra-small","small","medium","large"],this.size==="small"?"small":"medium")}__syncActionCardButtonSizes(){const e=Array.from(this.querySelectorAll(':scope > [slot="actions"] scb-button, :scope > scb-button[slot="actions"]'));if(this.cardType!=="action"){for(const i of e){const c=i.getAttribute(_);c!==null&&i.getAttribute("size")===c&&i.removeAttribute("size"),i.removeAttribute(_)}return}const t=this.__actionCardButtonSize();for(const i of e){const c=i.getAttribute(_);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(_);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",t),i.setAttribute(_,t))}}__slottedText(e){return(this.querySelector(`:scope > [slot="${e}"]`)?.textContent??"").replace(/\s+/g," ").trim()}__ensureDependenciesReady(){const e=[],t=[],i=this.cardType,c=!!this.vignette?.trim(),n=(v,h)=>{t.push(v),e.push(h())};(i==="list"||this.__hasLightDomElement("scb-list, scb-list-item"))&&n("list",At),i!=="standard"&&n("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"))&&n("icon-button",Tt),this.__hasLightDomElement("scb-button")&&n("button",Lt),this.__hasLightDomElement("scb-link")&&n("link",Ct),(c||this.__hasLightDomElement("scb-chip"))&&n("chip",Rt),((this.mediaType||"").toLowerCase()==="avatar"||this.__hasLightDomElement("scb-avatar"))&&n("avatar",$t),(i==="social"&&this.likesHoverContent||this.__hasLightDomElement("scb-tooltip"))&&n("tooltip",Pt);const b=t.sort().join("|");b!==this.__dependencyKey&&(this.__dependencyKey=b,e.length>0&&Promise.all(e).then(()=>this.requestUpdate()))}__mediaTemplate(e){const t=this.__isAvatarMedia();if(this.__hasSlottedContent("media",e)){const i=t?"":this.__mediaReserveStyle(this.__slottedMediaAspect());return d`
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 ft,m as f,p as r,v as d,y as yt}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as m}from"../../vendor/preload-helper.js";import{componentSizeToken as zt}from"../shared/component-size-token.js";import{t as _t}from"../../vendor/component-defaults.js";import{t as a}from"../../vendor/decorate.js";(function(){try{var p=typeof globalThis<"u"?globalThis:window;if(!p.__scb_ce_guard_installed__){p.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,i,c){try{customElements.get(t)||e(t,i,c)}catch(b){var n=String(b||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw b}}}}catch{}})();var C,xt=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",_="data-scb-card-managed-action-button-size",R="data-scb-card-managed-avatar-size",kt=new Set(["small","medium","large"]),wt=new Set(["small","medium","large","extra-large"]),$,P,I,E,B,D,H,O,V,N;function St(){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 At(){return $??($=m(()=>import("../scb-list/scb-list.js"),__vite__mapDeps([3,4,5,6,7,8,1,9]),import.meta.url)),$}function Tt(){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 Lt(){return I??(I=m(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([13,4,5,1,6,7,11,12]),import.meta.url)),I}function Ct(){return E??(E=m(()=>import("../scb-link/scb-link.js"),__vite__mapDeps([14,4,5,0,1,7,11,12,15]),import.meta.url)),E}function Rt(){return B??(B=m(()=>import("../scb-chip/scb-chip.js"),__vite__mapDeps([16,4,5,1,7,11,12]),import.meta.url)),B}function $t(){return D??(D=m(()=>import("../scb-avatar/scb-avatar.js"),__vite__mapDeps([17,4,5,1,6,7,11,12]),import.meta.url)),D}function Pt(){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 It(){return N??(N=m(()=>import("../../vendor/scb-card-variants.internal.js"),__vite__mapDeps([22,4,5]),import.meta.url)),N}var o={fromAttribute:p=>p??"",toAttribute:p=>typeof p!="string"||p.trim()===""?null:p},s=(C=class extends ft{constructor(...e){super(...e),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=_t["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=t=>{const i=t.currentTarget.closest(".media");i&&i.classList.add("is-loaded")},this.__ensureRippleOnInteraction=(t,i=!1)=>{if(this.__primaryHref()){if(t&&(this.__pendingRippleEvent=t),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 t=this.renderRoot.querySelector("md-ripple"),i=this.renderRoot.querySelector(".scb-card"),c=this.__pendingRippleEvent,n=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;const{syncRippleToControl:b}=await U();await b(t,i,c,n)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,St().then(({ensureFocusRingReady:t})=>t()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=t=>{if(t.target!==t.currentTarget)return;const i=this.__primaryHref();(t.key==="Enter"||t.key===" ")&&i&&(t.preventDefault(),this.__ensureRippleOnInteraction(void 0,!0),this.__navigate(i,t))},this.__handleHrefNavigation=t=>{const i=this.__primaryHref();i&&(t.target.closest("a")||this.__navigate(i,t))},this.__handleSlottedCardLinkClick=t=>{const i=t.composedPath().find(c=>c instanceof HTMLAnchorElement&&c.getAttribute("slot")==="card-link")?.getAttribute("href")||this.__primaryHref();i&&(this.__dispatchCardNavigate(i,t)||t.preventDefault())}}attributeChangedCallback(e,t,i){this.__isSyncingManagedSocialAttributes&&xt.has(e)||super.attributeChangedCallback(e,t,i)}get likeButton(){return this.cardType!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(e){const t=(e||"").trim();if(!t)return{w:600,h:400};const i=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(i&&i.length===2){const n=Number(i[0]),b=Number(i[1]);if(n>0&&b>0)return{w:n,h:b}}const c=Number(t);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:600,h:400}}__mediaReserveAspect(e=""){const t=(this.mediaAspect||"").trim();if(t)return t;const i=Number(this.mediaWidth)||0,c=Number(this.mediaHeight)||0;return i>0&&c>0?`${i} / ${c}`:e}__mediaReserveStyle(e=""){const t=this.__mediaReserveAspect(e);return t?`--scb-card-media-aspect:${t};`:""}__slottedMediaAspect(){const e=this.querySelector('[slot="media"]');if(!e)return"";const t=Number(e.getAttribute("width"))||0,i=Number(e.getAttribute("height"))||0;return t>0&&i>0?`${t} / ${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 e=(this.type||"standard").toLowerCase();switch(e){case"standard":case"list":case"social":case"link":case"action":case"container":return e;default:return"standard"}}__ensureVariantRenderer(){return this.cardType==="standard"||this.__variantRenderer?Promise.resolve():It().then(e=>{this.__variantRenderer!==e&&(this.__variantRenderer=e,e.ensureScbCardVariantStyles(this.renderRoot),this.requestUpdate())})}__dispatchCardNavigate(e,t){const i={href:e,originalEvent:t},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const n=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:i});return this.dispatchEvent(n),!n.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(e,t){e&&this.__dispatchCardNavigate(e,t)&&window.open(e,"_self")}__slotNames(){const e=new Set;for(const t of Array.from(this.children)){const i=t.getAttribute("slot");i&&e.add(i)}return e}__hasSlottedContent(e,t){return t?t.has(e):Array.from(this.children).some(i=>i.getAttribute("slot")===e)}__hasLightDomElement(e){return!!this.querySelector(e)}__syncListCardListSize(){const e=Array.from(this.querySelectorAll("scb-list"));if(this.cardType!=="list"){for(const i of e){const c=i.getAttribute(z);c!==null&&i.getAttribute("size")===c&&i.removeAttribute("size"),i.removeAttribute(z)}return}const t=this.size||"large";for(const i of e){const c=i.getAttribute(z);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(z);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",t),i.setAttribute(z,t))}}__actionCardButtonSize(){const e=getComputedStyle(this).getPropertyValue("--scb-card-size-actions-button-size").trim();return kt.has(e)?e:"medium"}__cardAvatarSize(){const e=getComputedStyle(this).getPropertyValue("--scb-card-size-avatar-component-size").trim();return wt.has(e)?e:"medium"}__syncAvatarSizes(){const e=Array.from(this.querySelectorAll(':scope > scb-avatar[slot="media"]')),t=this.__cardAvatarSize();for(const i of e){const c=i.getAttribute(R);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(R);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",t),i.setAttribute(R,t))}}__socialIconButtonSize(){return zt(this,"--scb-card-size-social-icon-button-component-size",["tiny","extra-small","small","medium","large"],this.size==="small"?"small":"medium")}__syncActionCardButtonSizes(){const e=Array.from(this.querySelectorAll(':scope > [slot="actions"] scb-button, :scope > scb-button[slot="actions"]'));if(this.cardType!=="action"){for(const i of e){const c=i.getAttribute(_);c!==null&&i.getAttribute("size")===c&&i.removeAttribute("size"),i.removeAttribute(_)}return}const t=this.__actionCardButtonSize();for(const i of e){const c=i.getAttribute(_);if(c!==null&&i.getAttribute("size")!==c){i.removeAttribute(_);continue}(!i.hasAttribute("size")||c!==null)&&(i.setAttribute("size",t),i.setAttribute(_,t))}}__slottedText(e){return(this.querySelector(`:scope > [slot="${e}"]`)?.textContent??"").replace(/\s+/g," ").trim()}__ensureDependenciesReady(){const e=[],t=[],i=this.cardType,c=!!this.vignette?.trim(),n=(v,h)=>{t.push(v),e.push(h())};(i==="list"||this.__hasLightDomElement("scb-list, scb-list-item"))&&n("list",At),i!=="standard"&&n("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"))&&n("icon-button",Tt),this.__hasLightDomElement("scb-button")&&n("button",Lt),this.__hasLightDomElement("scb-link")&&n("link",Ct),(c||this.__hasLightDomElement("scb-chip"))&&n("chip",Rt),((this.mediaType||"").toLowerCase()==="avatar"||this.__hasLightDomElement("scb-avatar"))&&n("avatar",$t),(i==="social"&&this.likesHoverContent||this.__hasLightDomElement("scb-tooltip"))&&n("tooltip",Pt);const b=t.sort().join("|");b!==this.__dependencyKey&&(this.__dependencyKey=b,e.length>0&&Promise.all(e).then(()=>this.requestUpdate()))}__mediaTemplate(e){const t=this.__isAvatarMedia();if(this.__hasSlottedContent("media",e)){const i=t?"":this.__mediaReserveStyle(this.__slottedMediaAspect());return d`
3
3
  <div class="media ${t?"avatar-media":""} ${i?"has-reserved-space":""}" style=${i||l}>
4
4
  <slot name="media"></slot>
5
5
  </div>
@@ -1,4 +1,4 @@
1
- import{h,m as v,p as d,v as p,y as f}from"./vendor.js";import"./vendor-lit.js";import{t as c}from"./decorate.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,l){try{customElements.get(o)||r(o,a,l)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var n,t=(n=class extends h{constructor(...r){super(...r),this.open=!1}render(){return p`
1
+ import{h,m as v,p as d,v as p,y as f}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as c}from"../../vendor/decorate.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,l){try{customElements.get(o)||r(o,a,l)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var n,t=(n=class extends h{constructor(...r){super(...r),this.open=!1}render(){return p`
2
2
  <svg
3
3
  class="chevron-icon"
4
4
  viewBox="0 0 24 24"
@@ -1,6 +1,6 @@
1
- import{h as D,m as W,p as h,v as E,y as G}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as c}from"../../vendor/decorate.js";import{t as a}from"../../vendor/assertClassBrand.js";import{t as O}from"../../vendor/classPrivateMethodInitSpec.js";import"../scb-button/scb-button.js";import{n as l,r as b,t as g}from"../../vendor/classPrivateFieldGet2.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,s,n){try{customElements.get(i)||t(i,s,n)}catch(d){var p=String(d||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var o,f,u,v,y,m,_,$,H,r=(o=new WeakSet,f=new WeakMap,u=new WeakMap,v=new WeakMap,y=new WeakMap,m=new WeakMap,_=new WeakMap,$=new WeakMap,H=class extends D{constructor(...t){super(...t),O(this,o),b(this,f,void 0),b(this,u,void 0),b(this,v,void 0),b(this,y,void 0),b(this,m,void 0),b(this,_,void 0),b(this,$,void 0),this._contentId=`scb-collapse-content-${Math.random().toString(36).substr(2,9)}`,this.variant="elements",this.collapsedHeight=40,this.visibleElements=1,this.expanded=!1,this.hideToggle=!1,this.toggleButtonVariant="text",this.toggleButtonSize="medium",this.togglePosition="after",this.toggleLayout="block",this._elementCount=0,this.expandButtonLabel="Mer",this.collapseButtonLabel="Mindre",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.itemsGap=void 0,this._contentHeight=0,l(u,this,0),l(v,this,0),l(m,this,0),l(_,this,0)}get _regionLabel(){return`${this.expanded?this.collapseButtonLabel:this.expandButtonLabel} – ${this._contentId}`}toggle(){this.expanded=!this.expanded}getDefaultSlot(){return this.shadowRoot?.querySelector("slot:not([name])")}getToggleMeasureStyles(){const t=this.toggleButtonSize||"medium",i=t==="large"?"medium":"small",s=t==="large"?"medium":"small",n=`var(--scb-button-text-${t}-font, var(--scb-buttons-text-${t}-font, var(--scb-typography-label-${s}-font, var(--md-sys-typescale-label-${s}-font))))`,p=`var(--scb-button-text-${t}-size, var(--scb-buttons-text-${t}-size, var(--scb-typography-label-${s}-size, var(--md-sys-typescale-label-${s}-size))))`,d=`var(--scb-button-text-${t}-weight, var(--scb-buttons-text-${t}-weight, var(--scb-typography-label-${s}-weight, var(--md-sys-typescale-label-${s}-weight))))`,k=`var(--scb-button-text-${t}-line-height, var(--scb-buttons-text-${t}-line-height, var(--scb-typography-label-${s}-line-height, var(--md-sys-typescale-label-${s}-line-height))))`,S=`var(--scb-button-text-${t}-tracking, var(--scb-buttons-text-${t}-tracking, var(--scb-typography-label-${s}-tracking, var(--md-sys-typescale-label-${s}-tracking))))`,P=`var(--scb-buttons-icon-size-${t}, var(--icon-size-${i}, 20px))`,F=`var(--scb-buttons-gap-${t}, var(--spacing-${t==="medium"||t==="large"?"3":"2"}))`,A=`var(--scb-buttons-padding-inline-${t})`,q=`var(--scb-button-padding-block-${t}, var(--scb-buttons-padding-block-${t}))`,I=`var(--scb-buttons-control-size-${t}, var(--scb-control-size-${t}))`;return[`--scb-collapse-toggle-measure-font-family:${n}`,`--scb-collapse-toggle-measure-font-size:${p}`,`--scb-collapse-toggle-measure-font-weight:${d}`,`--scb-collapse-toggle-measure-line-height:${k}`,`--scb-collapse-toggle-measure-letter-spacing:${S}`,`--scb-collapse-toggle-measure-icon-size:${P}`,`--scb-collapse-toggle-measure-icon-gap:${F}`,`--scb-collapse-toggle-measure-padding-inline:${A}`,`--scb-collapse-toggle-measure-padding-block:${q}`,`--scb-collapse-toggle-measure-block-size:${I}`].join(";")}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}willUpdate(t){t.has("expanded")&&this.variant==="height"&&a(o,this,V).call(this,!!t.get("expanded"),this.expanded),t.has("variant")&&(this._measureContent(!1),this._countElements(!1))}_isFullyCollapsed(){if(this.expanded)return!1;if(this.variant==="height"){const t=typeof this.collapsedHeight=="string"?Number.parseFloat(this.collapsedHeight):this.collapsedHeight;return Number.isFinite(t)&&t<=0}return a(o,this,T).call(this)<=0}firstUpdated(){requestAnimationFrame(()=>{this._measureContent(),this._countElements(),a(o,this,w).call(this),a(o,this,x).call(this)});const t=this.getDefaultSlot();t&&t.addEventListener("slotchange",()=>{requestAnimationFrame(()=>{this._measureContent(),this._countElements(),a(o,this,w).call(this),a(o,this,x).call(this)})}),a(o,this,B).call(this),a(o,this,w).call(this)}updated(t){(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&a(o,this,B).call(this),t.has("itemsGap")&&(a(o,this,w).call(this),this._measureContent()),this.variant==="elements"&&!t.has("expanded")&&(t.has("variant")||t.has("visibleElements")||t.has("itemsGap"))&&(this._countElements(),a(o,this,x).call(this)),t.has("expanded")&&(a(o,this,w).call(this),this.variant==="height"?a(o,this,U).call(this):this.variant==="elements"&&a(o,this,J).call(this,!!t.get("expanded"),this.expanded),this.dispatchEvent(new CustomEvent("expandedchange",{detail:{expanded:this.expanded},bubbles:!0,composed:!0})))}_measureContent(t=!0){if(this.variant==="height"){const i=this.shadowRoot?.querySelector(".collapse-content"),s=this.getDefaultSlot();if(i){const n=i.scrollHeight;n!==this._contentHeight&&(this._contentHeight=n,t&&this.requestUpdate())}else if(s){const n=s.assignedNodes({flatten:!0});let p=0;n.forEach(k=>{if(k.nodeType===Node.ELEMENT_NODE){const S=k;p+=S.offsetHeight||S.scrollHeight||0}});const d=p;d!==this._contentHeight&&(this._contentHeight=d,t&&this.requestUpdate())}}}_countElements(t=!0){if(this.variant==="elements"){const i=this.getDefaultSlot();if(i){const s=i.assignedNodes({flatten:!0}).filter(n=>n.nodeType===Node.ELEMENT_NODE).length;s!==this._elementCount&&(this._elementCount=s,t&&this.requestUpdate())}}}render(){const t=this._isFullyCollapsed();if(this.variant==="height"){const i=this.expanded?"none":`${this.collapsedHeight}px`,s=this._contentHeight>this.collapsedHeight,n=s&&!this.hideToggle?a(o,this,M).call(this):"";return E`
1
+ import{h as D,m as W,p as h,v as E,y as G}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as c}from"../../vendor/decorate.js";import{t as a}from"../../vendor/assertClassBrand.js";import{t as O}from"../../vendor/classPrivateMethodInitSpec.js";import"../scb-button/scb-button.js";import{n,r as b,t as p}from"../../vendor/classPrivateFieldGet2.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,s,l){try{customElements.get(i)||t(i,s,l)}catch(d){var g=String(d||"");if(g.indexOf("already been used")===-1&&g.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var o,f,u,v,y,m,_,$,H,r=(o=new WeakSet,f=new WeakMap,u=new WeakMap,v=new WeakMap,y=new WeakMap,m=new WeakMap,_=new WeakMap,$=new WeakMap,H=class extends D{constructor(...t){super(...t),O(this,o),b(this,f,void 0),b(this,u,void 0),b(this,v,void 0),b(this,y,void 0),b(this,m,void 0),b(this,_,void 0),b(this,$,void 0),this._contentId=`scb-collapse-content-${Math.random().toString(36).substr(2,9)}`,this.variant="elements",this.collapsedHeight=40,this.visibleElements=1,this.expanded=!1,this.hideToggle=!1,this.toggleButtonVariant="text",this.toggleButtonSize="medium",this.togglePosition="after",this.toggleLayout="block",this._elementCount=0,this.expandButtonLabel="Mer",this.collapseButtonLabel="Mindre",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.itemsGap=void 0,this._contentHeight=0,n(u,this,0),n(v,this,0),n(m,this,0),n(_,this,0)}get _regionLabel(){return`${this.expanded?this.collapseButtonLabel:this.expandButtonLabel} – ${this._contentId}`}toggle(){this.expanded=!this.expanded}getDefaultSlot(){return this.shadowRoot?.querySelector("slot:not([name])")}getToggleMeasureStyles(){const t=this.toggleButtonSize||"medium",i=t==="large"?"medium":"small",s=t==="large"?"medium":"small",l=`var(--scb-button-text-${t}-font, var(--scb-buttons-text-${t}-font, var(--scb-typography-label-${s}-font, var(--md-sys-typescale-label-${s}-font))))`,g=`var(--scb-button-text-${t}-size, var(--scb-buttons-text-${t}-size, var(--scb-typography-label-${s}-size, var(--md-sys-typescale-label-${s}-size))))`,d=`var(--scb-button-text-${t}-weight, var(--scb-buttons-text-${t}-weight, var(--scb-typography-label-${s}-weight, var(--md-sys-typescale-label-${s}-weight))))`,k=`var(--scb-button-text-${t}-line-height, var(--scb-buttons-text-${t}-line-height, var(--scb-typography-label-${s}-line-height, var(--md-sys-typescale-label-${s}-line-height))))`,S=`var(--scb-button-text-${t}-tracking, var(--scb-buttons-text-${t}-tracking, var(--scb-typography-label-${s}-tracking, var(--md-sys-typescale-label-${s}-tracking))))`,P=`var(--scb-buttons-icon-size-${t}, var(--icon-size-${i}, 20px))`,F=`var(--scb-buttons-gap-${t}, var(--spacing-${t==="medium"||t==="large"?"3":"2"}))`,A=`var(--scb-buttons-padding-inline-${t})`,q=`var(--scb-button-padding-block-${t}, var(--scb-buttons-padding-block-${t}))`,I=`var(--scb-buttons-control-size-${t}, var(--scb-control-size-${t}))`;return[`--scb-collapse-toggle-measure-font-family:${l}`,`--scb-collapse-toggle-measure-font-size:${g}`,`--scb-collapse-toggle-measure-font-weight:${d}`,`--scb-collapse-toggle-measure-line-height:${k}`,`--scb-collapse-toggle-measure-letter-spacing:${S}`,`--scb-collapse-toggle-measure-icon-size:${P}`,`--scb-collapse-toggle-measure-icon-gap:${F}`,`--scb-collapse-toggle-measure-padding-inline:${A}`,`--scb-collapse-toggle-measure-padding-block:${q}`,`--scb-collapse-toggle-measure-block-size:${I}`].join(";")}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}willUpdate(t){t.has("expanded")&&this.variant==="height"&&a(o,this,V).call(this,!!t.get("expanded"),this.expanded),t.has("variant")&&(this._measureContent(!1),this._countElements(!1))}_isFullyCollapsed(){if(this.expanded)return!1;if(this.variant==="height"){const t=typeof this.collapsedHeight=="string"?Number.parseFloat(this.collapsedHeight):this.collapsedHeight;return Number.isFinite(t)&&t<=0}return a(o,this,T).call(this)<=0}firstUpdated(){requestAnimationFrame(()=>{this._measureContent(),this._countElements(),a(o,this,w).call(this),a(o,this,x).call(this)});const t=this.getDefaultSlot();t&&t.addEventListener("slotchange",()=>{requestAnimationFrame(()=>{this._measureContent(),this._countElements(),a(o,this,w).call(this),a(o,this,x).call(this)})}),a(o,this,B).call(this),a(o,this,w).call(this)}updated(t){(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&a(o,this,B).call(this),t.has("itemsGap")&&(a(o,this,w).call(this),this._measureContent()),this.variant==="elements"&&!t.has("expanded")&&(t.has("variant")||t.has("visibleElements")||t.has("itemsGap"))&&(this._countElements(),a(o,this,x).call(this)),t.has("expanded")&&(a(o,this,w).call(this),this.variant==="height"?a(o,this,U).call(this):this.variant==="elements"&&a(o,this,J).call(this,!!t.get("expanded"),this.expanded),this.dispatchEvent(new CustomEvent("expandedchange",{detail:{expanded:this.expanded},bubbles:!0,composed:!0})))}_measureContent(t=!0){if(this.variant==="height"){const i=this.shadowRoot?.querySelector(".collapse-content"),s=this.getDefaultSlot();if(i){const l=i.scrollHeight;l!==this._contentHeight&&(this._contentHeight=l,t&&this.requestUpdate())}else if(s){const l=s.assignedNodes({flatten:!0});let g=0;l.forEach(k=>{if(k.nodeType===Node.ELEMENT_NODE){const S=k;g+=S.offsetHeight||S.scrollHeight||0}});const d=g;d!==this._contentHeight&&(this._contentHeight=d,t&&this.requestUpdate())}}}_countElements(t=!0){if(this.variant==="elements"){const i=this.getDefaultSlot();if(i){const s=i.assignedNodes({flatten:!0}).filter(l=>l.nodeType===Node.ELEMENT_NODE).length;s!==this._elementCount&&(this._elementCount=s,t&&this.requestUpdate())}}}render(){const t=this._isFullyCollapsed();if(this.variant==="height"){const i=this.expanded?"none":`${this.collapsedHeight}px`,s=this._contentHeight>this.collapsedHeight,l=s&&!this.hideToggle?a(o,this,M).call(this):"";return E`
2
2
  <div class="collapse-layout">
3
- ${this.togglePosition==="before"?n:""}
3
+ ${this.togglePosition==="before"?l:""}
4
4
  <div
5
5
  class="collapse-content collapse-content--height ${this.expanded?"expanded":""} ${s&&!this.expanded?"has-fade":""}"
6
6
  id="${this._contentId}"
@@ -12,7 +12,7 @@ import{h as D,m as W,p as h,v as E,y as G}from"../../vendor/vendor.js";import"..
12
12
  >
13
13
  <slot></slot>
14
14
  </div>
15
- ${this.togglePosition==="after"?n:""}
15
+ ${this.togglePosition==="after"?l:""}
16
16
  </div>
17
17
  `}else{const i=a(o,this,T).call(this),s=this._elementCount>i&&!this.hideToggle?a(o,this,M).call(this):"";return E`
18
18
  <div class="collapse-layout">
@@ -29,7 +29,13 @@ import{h as D,m as W,p as h,v as E,y as G}from"../../vendor/vendor.js";import"..
29
29
  </div>
30
30
  ${this.togglePosition==="after"?s:""}
31
31
  </div>
32
- `}}},H.styles=G`:host{display:block;box-sizing:border-box;margin-block-start:var(--scb-collapse-spacing-block-start, 0);margin-block-end:var(--scb-collapse-spacing-block-end, 0);margin-inline-start:var(--scb-collapse-spacing-inline-start, 0);margin-inline-end:var(--scb-collapse-spacing-inline-end, 0)}.collapse-content{overflow:hidden;display:flow-root;position:relative;transition:max-height var(--motion-duration-medium) var(--motion-easing-standard)}.collapse-content--elements,.collapse-content--height{transition:height var(--motion-duration-medium) var(--motion-easing-standard)}.collapse-content.expanded{max-height:none;overflow:visible}.collapse-content.animating{overflow:hidden}.collapse-content--height.has-fade{--scb-effect-mask-edge-fade-size:var(--scb-collapse-fade-height, 48px);-webkit-mask-image:var(--scb-effect-mask-vertical-bottom);mask-image:var(--scb-effect-mask-vertical-bottom)}.collapse-layout{display:block}.collapse-control-row{display:block;margin-block-start:var(--spacing-3, 8px)}.collapse-control-row--before{margin-block-start:0;margin-block-end:var(--spacing-3, 12px)}.collapse-toggle{display:inline-grid;inline-size:max-content}.collapse-toggle scb-button,.collapse-toggle__measure{grid-area:1/1}.collapse-toggle scb-button{inline-size:100%}.collapse-toggle__measure{box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--scb-collapse-toggle-measure-icon-gap);min-inline-size:64px;min-block-size:var(--scb-collapse-toggle-measure-block-size);block-size:var(--scb-collapse-toggle-measure-block-size);padding-inline:var(--scb-collapse-toggle-measure-padding-inline);padding-block:var(--scb-collapse-toggle-measure-padding-block);border-radius:var(--md-sys-shape-corner-full, 999px);color:transparent;font-family:var(--scb-collapse-toggle-measure-font-family);font-size:var(--scb-collapse-toggle-measure-font-size);font-weight:var(--scb-collapse-toggle-measure-font-weight);line-height:var(--scb-collapse-toggle-measure-line-height);letter-spacing:var(--scb-collapse-toggle-measure-letter-spacing);pointer-events:none;user-select:none;white-space:nowrap;visibility:hidden}.collapse-toggle__measure-icon{display:inline-block;inline-size:var(--scb-collapse-toggle-measure-icon-size);block-size:var(--scb-collapse-toggle-measure-icon-size)}:host([toggle-layout='inline']) .collapse-control-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--spacing-3, 12px)}:host([toggle-layout='inline']) .collapse-toggle{flex:0 0 auto}slot[name=toggle-content]{display:contents}::slotted(.scb-collapsed-hidden){display:none!important}`,H);function B(){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-collapse-spacing-block-start",t):this.style.removeProperty("--scb-collapse-spacing-block-start"),i?this.style.setProperty("--scb-collapse-spacing-block-end",i):this.style.removeProperty("--scb-collapse-spacing-block-end"),s?this.style.setProperty("--scb-collapse-spacing-inline-start",s):this.style.removeProperty("--scb-collapse-spacing-inline-start"),n?this.style.setProperty("--scb-collapse-spacing-inline-end",n):this.style.removeProperty("--scb-collapse-spacing-inline-end")}function w(){const e=this.mapSpacingToken(this.itemsGap);e?this.style.setProperty("--scb-collapse-items-gap",e):this.style.removeProperty("--scb-collapse-items-gap");const t=this.getDefaultSlot();t&&t.assignedNodes({flatten:!0}).filter(i=>i.nodeType===Node.ELEMENT_NODE).forEach((i,s)=>{const n=i;s===0||!e?n.style.removeProperty("margin-block-start"):n.style.setProperty("margin-block-start","var(--scb-collapse-items-gap)")})}function V(e,t){if(e===t){l(f,this,void 0);return}const i=this.shadowRoot?.querySelector(".collapse-content");if(!i){l(f,this,void 0);return}const s=i.getBoundingClientRect().height,n=Math.max(i.scrollHeight,this._contentHeight,s),p=t?n:Math.min(this.collapsedHeight,n);l(f,this,{startHeight:s,endHeight:p,expanded:t})}function N(e){g(u,this)&&(cancelAnimationFrame(g(u,this)),l(u,this,0)),g(v,this)&&(window.clearTimeout(g(v,this)),l(v,this,0));const t=e??this.shadowRoot?.querySelector(".collapse-content");t&&g(y,this)&&t.removeEventListener("transitionend",g(y,this)),l(y,this,void 0)}function z(e,t){a(o,this,N).call(this,e),e.classList.remove("animating"),e.style.removeProperty("height"),e.style.removeProperty("transition"),e.style.setProperty("max-height",t?"none":`${this.collapsedHeight}px`)}function U(){const e=this.shadowRoot?.querySelector(".collapse-content"),t=g(f,this);if(l(f,this,void 0),!e||!t)return;const i=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;if(a(o,this,N).call(this,e),i||Math.abs(t.startHeight-t.endHeight)<1){a(o,this,z).call(this,e,t.expanded);return}e.classList.add("animating"),e.style.transition="none",e.style.setProperty("max-height","none"),e.style.height=`${t.startHeight}px`,e.getBoundingClientRect(),l(y,this,s=>{s.target===e&&s.propertyName==="height"&&a(o,this,z).call(this,e,t.expanded)}),e.addEventListener("transitionend",g(y,this)),l(u,this,requestAnimationFrame(()=>{l(u,this,0),e.style.removeProperty("transition"),e.style.height=`${t.endHeight}px`})),l(v,this,window.setTimeout(()=>{a(o,this,z).call(this,e,t.expanded)},700))}function T(){const e=typeof this.visibleElements=="string"?parseInt(this.visibleElements,10):this.visibleElements;return Number.isFinite(e)?Math.max(0,Math.floor(e)):0}function C(){const e=this.getDefaultSlot();return e?e.assignedNodes({flatten:!0}).filter(t=>t.nodeType===Node.ELEMENT_NODE):[]}function x(e=this.expanded){if(this.variant!=="elements")return;const t=a(o,this,T).call(this);a(o,this,C).call(this).forEach((i,s)=>{i.classList.toggle("scb-collapsed-hidden",!e&&s>=t)})}function j(e){const t=this.shadowRoot?.querySelector(".collapse-content");if(!t)return 0;const i=a(o,this,C).call(this),s=i.map(p=>p.classList.contains("scb-collapsed-hidden"));a(o,this,x).call(this,e);const n=t.scrollHeight;return i.forEach((p,d)=>{p.classList.toggle("scb-collapsed-hidden",s[d])}),n}function R(e){g(m,this)&&(cancelAnimationFrame(g(m,this)),l(m,this,0)),g(_,this)&&(window.clearTimeout(g(_,this)),l(_,this,0));const t=e??this.shadowRoot?.querySelector(".collapse-content");t&&g($,this)&&t.removeEventListener("transitionend",g($,this)),l($,this,void 0)}function L(e,t){a(o,this,R).call(this,e),a(o,this,x).call(this,t),e.classList.remove("animating"),e.style.removeProperty("height"),e.style.removeProperty("transition")}function J(e,t){const i=this.shadowRoot?.querySelector(".collapse-content");if(!i||e===t){a(o,this,x).call(this,t);return}const s=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,n=i.getBoundingClientRect().height,p=a(o,this,j).call(this,t);if(a(o,this,R).call(this,i),s||Math.abs(n-p)<1){a(o,this,L).call(this,i,t);return}i.classList.add("animating"),i.style.transition="none",i.style.height=`${n}px`,t&&a(o,this,x).call(this,!0),i.getBoundingClientRect(),l($,this,d=>{d.target===i&&d.propertyName==="height"&&a(o,this,L).call(this,i,t)}),i.addEventListener("transitionend",g($,this)),l(m,this,requestAnimationFrame(()=>{l(m,this,0),i.style.removeProperty("transition"),i.style.height=`${p}px`})),l(_,this,window.setTimeout(()=>{a(o,this,L).call(this,i,t)},700))}function K(){const e=this.expandButtonLabel.length>=this.collapseButtonLabel.length?this.expandButtonLabel:this.collapseButtonLabel;return E`
32
+ `}}},H.styles=G`:host{display:block;box-sizing:border-box;margin-block-start:var(--scb-collapse-spacing-block-start, 0);margin-block-end:var(--scb-collapse-spacing-block-end, 0);margin-inline-start:var(--scb-collapse-spacing-inline-start, 0);margin-inline-end:var(--scb-collapse-spacing-inline-end, 0)}.collapse-content{overflow:hidden;display:flow-root;position:relative;transition:max-height var(--motion-duration-medium) var(--motion-easing-standard)}.collapse-content--elements,.collapse-content--height{transition:height var(--motion-duration-medium) var(--motion-easing-standard)}.collapse-content.expanded{max-height:none;overflow:visible}.collapse-content.animating{overflow:hidden}.collapse-content--height.has-fade{--scb-effect-mask-edge-fade-size:var(--scb-collapse-fade-height, 48px);-webkit-mask-image:var(--scb-effect-mask-vertical-bottom);mask-image:var(--scb-effect-mask-vertical-bottom)}.collapse-layout{display:block}.collapse-control-row{display:block;margin-block-start:var(--spacing-3, 8px)}.collapse-control-row--before{margin-block-start:0;margin-block-end:var(--spacing-3, 12px)}.collapse-toggle{--_scb-collapse-toggle-color:var(
33
+ --scb-collapse-toggle-color,
34
+ var(--scb-button-low-emphasis-content-color, var(--md-sys-color-primary))
35
+ );--_scb-collapse-toggle-focus-color:var(
36
+ --scb-collapse-toggle-focus-color,
37
+ var(--_scb-collapse-toggle-color)
38
+ );display:inline-grid;inline-size:max-content}.collapse-toggle scb-button,.collapse-toggle__measure{grid-area:1/1}.collapse-toggle scb-button{inline-size:100%;--scb-button-low-emphasis-content-color:var(--_scb-collapse-toggle-color);--md-focus-ring-color:var(--_scb-collapse-toggle-focus-color)}.collapse-toggle__measure{box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--scb-collapse-toggle-measure-icon-gap);min-inline-size:64px;min-block-size:var(--scb-collapse-toggle-measure-block-size);block-size:var(--scb-collapse-toggle-measure-block-size);padding-inline:var(--scb-collapse-toggle-measure-padding-inline);padding-block:var(--scb-collapse-toggle-measure-padding-block);border-radius:var(--md-sys-shape-corner-full, 999px);color:transparent;font-family:var(--scb-collapse-toggle-measure-font-family);font-size:var(--scb-collapse-toggle-measure-font-size);font-weight:var(--scb-collapse-toggle-measure-font-weight);line-height:var(--scb-collapse-toggle-measure-line-height);letter-spacing:var(--scb-collapse-toggle-measure-letter-spacing);pointer-events:none;user-select:none;white-space:nowrap;visibility:hidden}.collapse-toggle__measure-icon{display:inline-block;inline-size:var(--scb-collapse-toggle-measure-icon-size);block-size:var(--scb-collapse-toggle-measure-icon-size)}:host([toggle-layout='inline']) .collapse-control-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--spacing-3, 12px)}:host([toggle-layout='inline']) .collapse-toggle{flex:0 0 auto}slot[name=toggle-content]{display:contents}::slotted(.scb-collapsed-hidden){display:none!important}`,H);function B(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,i=this.mapSpacingToken(this.spacingBottom)??e,s=this.mapSpacingToken(this.spacingLeft),l=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-collapse-spacing-block-start",t):this.style.removeProperty("--scb-collapse-spacing-block-start"),i?this.style.setProperty("--scb-collapse-spacing-block-end",i):this.style.removeProperty("--scb-collapse-spacing-block-end"),s?this.style.setProperty("--scb-collapse-spacing-inline-start",s):this.style.removeProperty("--scb-collapse-spacing-inline-start"),l?this.style.setProperty("--scb-collapse-spacing-inline-end",l):this.style.removeProperty("--scb-collapse-spacing-inline-end")}function w(){const e=this.mapSpacingToken(this.itemsGap);e?this.style.setProperty("--scb-collapse-items-gap",e):this.style.removeProperty("--scb-collapse-items-gap");const t=this.getDefaultSlot();t&&t.assignedNodes({flatten:!0}).filter(i=>i.nodeType===Node.ELEMENT_NODE).forEach((i,s)=>{const l=i;s===0||!e?l.style.removeProperty("margin-block-start"):l.style.setProperty("margin-block-start","var(--scb-collapse-items-gap)")})}function V(e,t){if(e===t){n(f,this,void 0);return}const i=this.shadowRoot?.querySelector(".collapse-content");if(!i){n(f,this,void 0);return}const s=i.getBoundingClientRect().height,l=Math.max(i.scrollHeight,this._contentHeight,s),g=t?l:Math.min(this.collapsedHeight,l);n(f,this,{startHeight:s,endHeight:g,expanded:t})}function N(e){p(u,this)&&(cancelAnimationFrame(p(u,this)),n(u,this,0)),p(v,this)&&(window.clearTimeout(p(v,this)),n(v,this,0));const t=e??this.shadowRoot?.querySelector(".collapse-content");t&&p(y,this)&&t.removeEventListener("transitionend",p(y,this)),n(y,this,void 0)}function z(e,t){a(o,this,N).call(this,e),e.classList.remove("animating"),e.style.removeProperty("height"),e.style.removeProperty("transition"),e.style.setProperty("max-height",t?"none":`${this.collapsedHeight}px`)}function U(){const e=this.shadowRoot?.querySelector(".collapse-content"),t=p(f,this);if(n(f,this,void 0),!e||!t)return;const i=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;if(a(o,this,N).call(this,e),i||Math.abs(t.startHeight-t.endHeight)<1){a(o,this,z).call(this,e,t.expanded);return}e.classList.add("animating"),e.style.transition="none",e.style.setProperty("max-height","none"),e.style.height=`${t.startHeight}px`,e.getBoundingClientRect(),n(y,this,s=>{s.target===e&&s.propertyName==="height"&&a(o,this,z).call(this,e,t.expanded)}),e.addEventListener("transitionend",p(y,this)),n(u,this,requestAnimationFrame(()=>{n(u,this,0),e.style.removeProperty("transition"),e.style.height=`${t.endHeight}px`})),n(v,this,window.setTimeout(()=>{a(o,this,z).call(this,e,t.expanded)},700))}function T(){const e=typeof this.visibleElements=="string"?parseInt(this.visibleElements,10):this.visibleElements;return Number.isFinite(e)?Math.max(0,Math.floor(e)):0}function C(){const e=this.getDefaultSlot();return e?e.assignedNodes({flatten:!0}).filter(t=>t.nodeType===Node.ELEMENT_NODE):[]}function x(e=this.expanded){if(this.variant!=="elements")return;const t=a(o,this,T).call(this);a(o,this,C).call(this).forEach((i,s)=>{i.classList.toggle("scb-collapsed-hidden",!e&&s>=t)})}function j(e){const t=this.shadowRoot?.querySelector(".collapse-content");if(!t)return 0;const i=a(o,this,C).call(this),s=i.map(g=>g.classList.contains("scb-collapsed-hidden"));a(o,this,x).call(this,e);const l=t.scrollHeight;return i.forEach((g,d)=>{g.classList.toggle("scb-collapsed-hidden",s[d])}),l}function R(e){p(m,this)&&(cancelAnimationFrame(p(m,this)),n(m,this,0)),p(_,this)&&(window.clearTimeout(p(_,this)),n(_,this,0));const t=e??this.shadowRoot?.querySelector(".collapse-content");t&&p($,this)&&t.removeEventListener("transitionend",p($,this)),n($,this,void 0)}function L(e,t){a(o,this,R).call(this,e),a(o,this,x).call(this,t),e.classList.remove("animating"),e.style.removeProperty("height"),e.style.removeProperty("transition")}function J(e,t){const i=this.shadowRoot?.querySelector(".collapse-content");if(!i||e===t){a(o,this,x).call(this,t);return}const s=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,l=i.getBoundingClientRect().height,g=a(o,this,j).call(this,t);if(a(o,this,R).call(this,i),s||Math.abs(l-g)<1){a(o,this,L).call(this,i,t);return}i.classList.add("animating"),i.style.transition="none",i.style.height=`${l}px`,t&&a(o,this,x).call(this,!0),i.getBoundingClientRect(),n($,this,d=>{d.target===i&&d.propertyName==="height"&&a(o,this,L).call(this,i,t)}),i.addEventListener("transitionend",p($,this)),n(m,this,requestAnimationFrame(()=>{n(m,this,0),i.style.removeProperty("transition"),i.style.height=`${g}px`})),n(_,this,window.setTimeout(()=>{a(o,this,L).call(this,i,t)},700))}function K(){const e=this.expandButtonLabel.length>=this.collapseButtonLabel.length?this.expandButtonLabel:this.collapseButtonLabel;return E`
33
39
  <div class="collapse-toggle">
34
40
  <span class="collapse-toggle__measure" aria-hidden="true" style="${this.getToggleMeasureStyles()}">
35
41
  <span class="collapse-toggle__measure-icon"></span>
@@ -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 g,m,p as r,v,y}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as f}from"../../vendor/preload-helper.js";import{t as k}from"../../vendor/component-size-token.js";import{t as n}from"../../vendor/decorate.js";import{a as _,t as h}from"../../vendor/manual-popover.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(o,e,i){try{customElements.get(o)||t(o,e,i)}catch(u){var c=String(u||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw u}}}}catch{}})();var p,l,d="data-scb-cookies-consent-managed-button-size";function x(){return!!document.querySelector('script[src*="/scb-button/scb-button.js"],script[src$="scb-button.js"]')}var b={fromAttribute(a){if(a===null)return!1;const t=a.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!=="no"}},s=(p=class extends g{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 o=window.innerWidth<=480,e=this.shadowRoot.querySelector('slot[name="buttons"]');e&&e.assignedElements().forEach(i=>{o?i.setAttribute("full-width",""):i.removeAttribute("full-width")})},this.__onButtonHydrationInteraction=o=>{const e=o.target;e instanceof Element&&e.closest('scb-button[slot="buttons"]')&&this.__ensureSlottedButtonsReady(!0)},this.__onButtonsSlotChange=()=>{this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth()}}__syncButtonSizes(){const t=k(this,"--scb-cookies-consent-action-button-size",["small","medium","large"],"medium"),o=Array.from(this.querySelectorAll(':scope > scb-button[slot="buttons"]'));for(const e of o){const i=e.getAttribute(d);if(i!==null&&e.getAttribute("size")!==i){e.removeAttribute(d);continue}(!e.hasAttribute("size")||i!==null)&&(e.setAttribute("size",t),e.setAttribute(d,t))}}__ensureSlottedButtonsReady(t=!1){if(!(!this.querySelector('scb-button[slot="buttons"]')||customElements.get("scb-button"))){if(x()){customElements.whenDefined("scb-button").then(()=>this.requestUpdate());return}t&&(l??(l=f(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),l.then(()=>this.requestUpdate()))}}mapSpacingToken(t){if(!t)return;const o=String(t).trim();if(o)return/^\d+$/.test(o)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(o,10)))})`:o}applySpacing(){const t=this.mapSpacingToken(this.spacing),o=this.mapSpacingToken(this.spacingTop)??t,e=this.mapSpacingToken(this.spacingBottom)??t,i=this.mapSpacingToken(this.spacingLeft),c=this.mapSpacingToken(this.spacingRight);o?this.style.setProperty("--scb-cookies-consent-spacing-block-start",o):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"),i?this.style.setProperty("--scb-cookies-consent-spacing-inline-start",i):this.style.removeProperty("--scb-cookies-consent-spacing-inline-start"),c?this.style.setProperty("--scb-cookies-consent-spacing-inline-end",c):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",o=>{const e=o.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):h(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(){h(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 o={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent(t,o));const e=t.includes("-")?t.replace(/-/g,""):"";e&&e!==t&&this.dispatchEvent(new CustomEvent(e,o)),this.autoRemove?this.remove():this.open=!1}render(){return this.open?v`
2
+ import{h as g,m,p as r,v,y}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as f}from"../../vendor/preload-helper.js";import{componentSizeToken as k}from"../shared/component-size-token.js";import{t as n}from"../../vendor/decorate.js";import{closeManualPopover as h,openManualPopover as _}from"../shared/manual-popover.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(o,e,i){try{customElements.get(o)||t(o,e,i)}catch(u){var c=String(u||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw u}}}}catch{}})();var p,l,d="data-scb-cookies-consent-managed-button-size";function x(){return!!document.querySelector('script[src*="/scb-button/scb-button.js"],script[src$="scb-button.js"]')}var b={fromAttribute(a){if(a===null)return!1;const t=a.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!=="no"}},s=(p=class extends g{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 o=window.innerWidth<=480,e=this.shadowRoot.querySelector('slot[name="buttons"]');e&&e.assignedElements().forEach(i=>{o?i.setAttribute("full-width",""):i.removeAttribute("full-width")})},this.__onButtonHydrationInteraction=o=>{const e=o.target;e instanceof Element&&e.closest('scb-button[slot="buttons"]')&&this.__ensureSlottedButtonsReady(!0)},this.__onButtonsSlotChange=()=>{this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth()}}__syncButtonSizes(){const t=k(this,"--scb-cookies-consent-action-button-size",["small","medium","large"],"medium"),o=Array.from(this.querySelectorAll(':scope > scb-button[slot="buttons"]'));for(const e of o){const i=e.getAttribute(d);if(i!==null&&e.getAttribute("size")!==i){e.removeAttribute(d);continue}(!e.hasAttribute("size")||i!==null)&&(e.setAttribute("size",t),e.setAttribute(d,t))}}__ensureSlottedButtonsReady(t=!1){if(!(!this.querySelector('scb-button[slot="buttons"]')||customElements.get("scb-button"))){if(x()){customElements.whenDefined("scb-button").then(()=>this.requestUpdate());return}t&&(l??(l=f(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),l.then(()=>this.requestUpdate()))}}mapSpacingToken(t){if(!t)return;const o=String(t).trim();if(o)return/^\d+$/.test(o)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(o,10)))})`:o}applySpacing(){const t=this.mapSpacingToken(this.spacing),o=this.mapSpacingToken(this.spacingTop)??t,e=this.mapSpacingToken(this.spacingBottom)??t,i=this.mapSpacingToken(this.spacingLeft),c=this.mapSpacingToken(this.spacingRight);o?this.style.setProperty("--scb-cookies-consent-spacing-block-start",o):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"),i?this.style.setProperty("--scb-cookies-consent-spacing-inline-start",i):this.style.removeProperty("--scb-cookies-consent-spacing-inline-start"),c?this.style.setProperty("--scb-cookies-consent-spacing-inline-end",c):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",o=>{const e=o.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):h(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(){h(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 o={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent(t,o));const e=t.includes("-")?t.replace(/-/g,""):"";e&&e!==t&&this.dispatchEvent(new CustomEvent(e,o)),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">