@jpahd/kalendus 0.1.0 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/kalendus.js CHANGED
@@ -1,6 +1,6 @@
1
- import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as t}from"lit-html/directive.js";import{isServer as a}from"lit-html/is-server.js";import{css as n,LitElement as r,html as i,nothing as o}from"lit";import{property as s,customElement as d,state as l}from"lit/decorators.js";import{ifDefined as c}from"lit/directives/if-defined.js";import{styleMap as h}from"lit/directives/style-map.js";import{DateTime as u,Interval as f}from"luxon";import{Interval as y}from"luxon";import{classMap as p}from"lit/directives/class-map.js";let m=class{constructor(e,{target:t,config:n,callback:r,skipInitial:i}){this.t=/* @__PURE__ */new Set,this.o=!1,this.i=!1,this.h=e,null!==t&&this.t.add(t??e),this.l=n,this.o=i??this.o,this.callback=r,a||(window.ResizeObserver?(this.u=new ResizeObserver(e=>{this.handleChanges(e),this.h.requestUpdate()}),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver."))}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}target(e){return b(this,e)}};const b=t(class extends e{constructor(){super(...arguments),this.observing=!1}render(e,t){}update(e,[t,a]){this.controller=t,this.part=e,this.observe=a,!1===a?(t.unobserve(e.element),this.observing=!1):!1===this.observing&&(t.observe(e.element),this.observing=!0)}disconnected(){this.controller?.unobserve(this.part.element),this.observing=!1}reconnected(){!1!==this.observe&&!1===this.observing&&(this.controller?.observe(this.part.element),this.observing=!0)}});function g(e,t,a){let n=e.length-t.length;if(0===n)return e(...t);if(1===n)return function(e,t,a){let n=a=>e(a,...t);return void 0===a?n:Object.assign(n,{lazy:a,lazyArgs:t})}(e,t,a);throw Error("Wrong number of arguments")}const v={done:!1,hasNext:!1};function w(e,...t){let a=e,n=t.map(e=>"lazy"in e?function(e){let{lazy:t,lazyArgs:a}=e,n=t(...a);return Object.assign(n,{isSingle:t.single??!1,index:0,items:[]})}(e):void 0),r=0;for(;r<t.length;){if(void 0===n[r]||!k(a)){a=(0,t[r])(a),r+=1;continue}let e=[];for(let a=r;a<t.length;a++){let t=n[a];if(void 0===t||(e.push(t),t.isSingle))break}let i=[];for(let t of a)if(D(t,i,e))break;let{isSingle:o}=e.at(-1);a=o?i[0]:i,r+=e.length}return a}function D(e,t,a){if(0===a.length)return t.push(e),!1;let n=e,r=v,i=!1;for(let[o,s]of a.entries()){let{index:e,items:d}=s;if(d.push(n),r=s(n,e,d),s.index+=1,r.hasNext){if(r.hasMany){for(let e of r.next)if(D(e,t,a.slice(o+1)))return!0;return i}n=r.next}if(!r.hasNext)break;r.done&&(i=!0)}return r.hasNext&&t.push(n),i}function k(e){return"string"==typeof e||"object"==typeof e&&!!e&&Symbol.iterator in e}const x={asc:(e,t)=>e>t,desc:(e,t)=>e<t};function $(e,t){let[a,...n]=t;if(!function(e){if(S(e))return!0;if("object"!=typeof e||!Array.isArray(e))return!1;let[t,a,...n]=e;return S(t)&&"string"==typeof a&&a in x&&0===n.length}(a))return e(a,E(...n));let r=E(a,...n);return t=>e(t,r)}function E(e,t,...a){let n="function"==typeof e?e:e[0],r="function"==typeof e?"asc":e[1],{[r]:i}=x,o=void 0===t?void 0:E(t,...a);return(e,t)=>{let a=n(e),r=n(t);return i(a,r)?1:i(r,a)?-1:o?.(e,t)??0}}const S=e=>"function"==typeof e&&1===e.length;const _=(e,t)=>e.filter(t),T=e=>(t,a,n)=>e(t,a,n)?{done:!1,hasNext:!0,next:t}:v;const M=(e,t)=>{let a=/* @__PURE__ */Object.create(null);for(let n=0;n<e.length;n++){let r=e[n],i=t(r,n,e);if(void 0!==i){let e=a[i];void 0===e?a[i]=[r]:e.push(r)}}return Object.setPrototypeOf(a,Object.prototype),a};const C=(e,t)=>e.map(t),A=e=>(t,a,n)=>({done:!1,hasNext:!0,next:e(t,a,n)});function O(...e){return g(I,e)}const I=(e,t)=>({...e,...t});function R(e,t){let a=[...e];return a.sort(t),a}const N=(e,t)=>[...e].sort(t),z=/* @__PURE__ */Symbol.for("@ts-pattern/matcher"),L=/* @__PURE__ */Symbol.for("@ts-pattern/isVariadic"),Y="@ts-pattern/anonymous-select-key",j=e=>Boolean(e&&"object"==typeof e),W=e=>e&&!!e[z],P=(e,t,a)=>{if(W(e)){const n=e[z](),{matched:r,selections:i}=n.match(t);return r&&i&&Object.keys(i).forEach(e=>a(e,i[e])),r}if(j(e)){if(!j(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],r=[],i=[];for(const t of e.keys()){const a=e[t];W(a)&&a[L]?i.push(a):i.length?r.push(a):n.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+r.length)return!1;const e=t.slice(0,n.length),o=0===r.length?[]:t.slice(-r.length),s=t.slice(n.length,0===r.length?1/0:-r.length);return n.every((t,n)=>P(t,e[n],a))&&r.every((e,t)=>P(e,o[t],a))&&(0===i.length||P(i[0],s,a))}return e.length===t.length&&e.every((e,n)=>P(e,t[n],a))}return Reflect.ownKeys(e).every(n=>{const r=e[n];return(n in t||W(i=r)&&"optional"===i[z]().matcherType)&&P(r,t[n],a);var i})}return Object.is(t,e)},F=e=>{var t,a,n;return j(e)?W(e)?null!=(t=null==(a=(n=e[z]()).getSelectionKeys)?void 0:a.call(n))?t:[]:Array.isArray(e)?B(e,F):B(Object.values(e),F):[]},B=(e,t)=>e.reduce((e,a)=>e.concat(t(a)),[]);function H(e){return Object.assign(e,{optional:()=>{return t=e,H({[z]:()=>({match:e=>{let a={};const n=(e,t)=>{a[e]=t};return void 0===e?(F(t).forEach(e=>n(e,void 0)),{matched:!0,selections:a}):{matched:P(t,e,n),selections:a}},getSelectionKeys:()=>F(t),matcherType:"optional"})});var t},and:t=>U(e,t),or:t=>function(...e){return H({[z]:()=>({match:t=>{let a={};const n=(e,t)=>{a[e]=t};return B(e,F).forEach(e=>n(e,void 0)),{matched:e.some(e=>P(e,t,n)),selections:a}},getSelectionKeys:()=>B(e,F),matcherType:"or"})})}(e,t),select:t=>void 0===t?K(e):K(t,e)})}function U(...e){return H({[z]:()=>({match:t=>{let a={};const n=(e,t)=>{a[e]=t};return{matched:e.every(e=>P(e,t,n)),selections:a}},getSelectionKeys:()=>B(e,F),matcherType:"and"})})}function V(e){return{[z]:()=>({match:t=>({matched:Boolean(e(t))})})}}function K(...e){const t="string"==typeof e[0]?e[0]:void 0,a=2===e.length?e[1]:"string"==typeof e[0]?void 0:e[0];return H({[z]:()=>({match:e=>{let n={[null!=t?t:Y]:e};return{matched:void 0===a||P(a,e,(e,t)=>{n[e]=t}),selections:n}},getSelectionKeys:()=>[null!=t?t:Y].concat(void 0===a?[]:F(a))})})}function q(e){return!0}function G(e){return"number"==typeof e}function Z(e){return"string"==typeof e}function J(e){return"bigint"==typeof e}H(V(q)),H(V(q));const X=e=>Object.assign(H(e),{startsWith:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.startsWith(a)))));var a},endsWith:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.endsWith(a)))));var a},minLength:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.length>=a))));var a},length:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.length===a))));var a},maxLength:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.length<=a))));var a},includes:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.includes(a)))));var a},regex:t=>{return X(U(e,(a=t,V(e=>Z(e)&&Boolean(e.match(a))))));var a}});X(V(Z));const Q=e=>Object.assign(H(e),{between:(t,a)=>{return Q(U(e,(n=t,r=a,V(e=>G(e)&&n<=e&&r>=e))));var n,r},lt:t=>{return Q(U(e,(a=t,V(e=>G(e)&&e<a))));var a},gt:t=>{return Q(U(e,(a=t,V(e=>G(e)&&e>a))));var a},lte:t=>{return Q(U(e,(a=t,V(e=>G(e)&&e<=a))));var a},gte:t=>{return Q(U(e,(a=t,V(e=>G(e)&&e>=a))));var a},int:()=>Q(U(e,V(e=>G(e)&&Number.isInteger(e)))),finite:()=>Q(U(e,V(e=>G(e)&&Number.isFinite(e)))),positive:()=>Q(U(e,V(e=>G(e)&&e>0))),negative:()=>Q(U(e,V(e=>G(e)&&e<0)))}),ee=Q(V(G)),te=e=>Object.assign(H(e),{between:(t,a)=>{return te(U(e,(n=t,r=a,V(e=>J(e)&&n<=e&&r>=e))));var n,r},lt:t=>{return te(U(e,(a=t,V(e=>J(e)&&e<a))));var a},gt:t=>{return te(U(e,(a=t,V(e=>J(e)&&e>a))));var a},lte:t=>{return te(U(e,(a=t,V(e=>J(e)&&e<=a))));var a},gte:t=>{return te(U(e,(a=t,V(e=>J(e)&&e>=a))));var a},positive:()=>te(U(e,V(e=>J(e)&&e>0))),negative:()=>te(U(e,V(e=>J(e)&&e<0)))});te(V(J)),H(V(function(e){return"boolean"==typeof e})),H(V(function(e){return"symbol"==typeof e}));const ae=H(V(function(e){return null==e}));H(V(function(e){return null!=e}));var ne={__proto__:null,number:ee,nullish:ae};class re extends Error{constructor(e){let t;try{t=JSON.stringify(e)}catch(a){t=e}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=e}}const ie={matched:!1,value:void 0};function oe(e){return new se(e,ie)}let se=class e{constructor(e,t){this.input=void 0,this.state=void 0,this.input=e,this.state=t}with(...t){if(this.state.matched)return this;const a=t[t.length-1],n=[t[0]];let r;3===t.length&&"function"==typeof t[1]?r=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,o={};const s=(e,t)=>{i=!0,o[e]=t},d=!n.some(e=>P(e,this.input,s))||r&&!Boolean(r(this.input))?ie:{matched:!0,value:a(i?Y in o?o[Y]:o:this.input,this.input)};return new e(this.input,d)}when(t,a){if(this.state.matched)return this;const n=Boolean(t(this.input));return new e(this.input,n?{matched:!0,value:a(this.input,this.input)}:ie)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=de){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function de(e){throw new re(e)}const le={"zh-Hans":"zh-CN","zh-Hant":"zh-TW"};function ce(e){return le[e]||e}const he=/* @__PURE__ */new Map;const ue=/* @__PURE__ */new Map;const fe=/* @__PURE__ */new Map;function ye(e,t="en"){return function(e){const t=ce(e);let a=he.get(t);return a||(a=Object.freeze(Array.from({length:12},(e,a)=>u.local().set({month:a+1}).setLocale(t).toFormat("MMM"))),he.set(t,a)),a}(t)[e-1]}function pe(e,t,a,n="en"){const r=new Date(a,t-1,e);return function(e){const t=ce(e);let a=fe.get(t);return a||(a=new Intl.DateTimeFormat(t,{day:"numeric",month:"short"}),fe.set(t,a)),a}(n).format(r)}function me(e,t="en"){return function(e){const t=ce(e);let a=ue.get(t);return a||(a=Object.freeze(Array.from({length:7},(e,a)=>u.local().set({weekday:a+1}).setLocale(t).toFormat("ccc"))),ue.set(t,a)),a}(t)[e-1]}const be=/* @__PURE__ */new Map;function ge(e,t,a="en"){const n=new Date(2e3,0,1,e,t);return function(e){const t=ce(e);let a=be.get(t);return a||(a=new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}),be.set(t,a)),a}(a).format(n)}function ve(e,t){return((e-t)%7+7)%7}function we(e,t){const a=new Date(e.year,e.month-1,e.day),n=ve(a.getDay(),t),r=new Date(a);return r.setDate(a.getDate()-n),Array.from({length:7},(e,t)=>{const a=new Date(r);return a.setDate(r.getDate()+t),{day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()}})}function De(e,t){return ve(new Date(e.year,e.month-1,1).getDay(),t)}function ke(e){const t=0===e?7:e;return Array.from({length:7},(e,a)=>(t-1+a)%7+1)}var xe=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Ee=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?$e(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&xe(t,a,i),i};let Se=class extends r{constructor(){super(...arguments),this.firstDayOfWeek=1,this.locale="en"}render(){const e=ke(this.firstDayOfWeek);return i` <div>
2
- ${e.map(e=>i`<span>${me(e,this.locale)}</span>`)}
3
- </div>`}};Se.styles=n`
1
+ import{css as e,LitElement as t,html as a,nothing as r}from"lit";import{property as n,customElement as i,state as o}from"lit/decorators.js";import{styleMap as s}from"lit/directives/style-map.js";import{DateTime as d,Interval as l}from"luxon";import{Interval as c}from"luxon";import{classMap as h}from"lit/directives/class-map.js";function u(e,t,a){let r=e.length-t.length;if(0===r)return e(...t);if(1===r)return function(e,t,a){let r=a=>e(a,...t);return void 0===a?r:Object.assign(r,{lazy:a,lazyArgs:t})}(e,t,a);throw Error("Wrong number of arguments")}const f={done:!1,hasNext:!1};function p(e,...t){let a=e,r=t.map(e=>"lazy"in e?function(e){let{lazy:t,lazyArgs:a}=e,r=t(...a);return Object.assign(r,{isSingle:t.single??!1,index:0,items:[]})}(e):void 0),n=0;for(;n<t.length;){if(void 0===r[n]||!m(a)){a=(0,t[n])(a),n+=1;continue}let e=[];for(let a=n;a<t.length;a++){let t=r[a];if(void 0===t||(e.push(t),t.isSingle))break}let i=[];for(let t of a)if(y(t,i,e))break;let{isSingle:o}=e.at(-1);a=o?i[0]:i,n+=e.length}return a}function y(e,t,a){if(0===a.length)return t.push(e),!1;let r=e,n=f,i=!1;for(let[o,s]of a.entries()){let{index:e,items:d}=s;if(d.push(r),n=s(r,e,d),s.index+=1,n.hasNext){if(n.hasMany){for(let e of n.next)if(y(e,t,a.slice(o+1)))return!0;return i}r=n.next}if(!n.hasNext)break;n.done&&(i=!0)}return n.hasNext&&t.push(r),i}function m(e){return"string"==typeof e||"object"==typeof e&&!!e&&Symbol.iterator in e}const b={asc:(e,t)=>e>t,desc:(e,t)=>e<t};function g(e,t){let[a,...r]=t;if(!function(e){if(w(e))return!0;if("object"!=typeof e||!Array.isArray(e))return!1;let[t,a,...r]=e;return w(t)&&"string"==typeof a&&a in b&&0===r.length}(a))return e(a,v(...r));let n=v(a,...r);return t=>e(t,n)}function v(e,t,...a){let r="function"==typeof e?e:e[0],n="function"==typeof e?"asc":e[1],{[n]:i}=b,o=void 0===t?void 0:v(t,...a);return(e,t)=>{let a=r(e),n=r(t);return i(a,n)?1:i(n,a)?-1:o?.(e,t)??0}}const w=e=>"function"==typeof e&&1===e.length;const D=(e,t)=>e.filter(t),k=e=>(t,a,r)=>e(t,a,r)?{done:!1,hasNext:!0,next:t}:f;const x=(e,t)=>{let a=/* @__PURE__ */Object.create(null);for(let r=0;r<e.length;r++){let n=e[r],i=t(n,r,e);if(void 0!==i){let e=a[i];void 0===e?a[i]=[n]:e.push(n)}}return Object.setPrototypeOf(a,Object.prototype),a};const $=(e,t)=>e.map(t),E=e=>(t,a,r)=>({done:!1,hasNext:!0,next:e(t,a,r)});function S(...e){return u(_,e)}const _=(e,t)=>({...e,...t});function T(e,t){let a=[...e];return a.sort(t),a}const M=(e,t)=>[...e].sort(t),C=/* @__PURE__ */Symbol.for("@ts-pattern/matcher"),O=/* @__PURE__ */Symbol.for("@ts-pattern/isVariadic"),A="@ts-pattern/anonymous-select-key",I=e=>Boolean(e&&"object"==typeof e),R=e=>e&&!!e[C],N=(e,t,a)=>{if(R(e)){const r=e[C](),{matched:n,selections:i}=r.match(t);return n&&i&&Object.keys(i).forEach(e=>a(e,i[e])),n}if(I(e)){if(!I(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],n=[],i=[];for(const t of e.keys()){const a=e[t];R(a)&&a[O]?i.push(a):i.length?n.push(a):r.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+n.length)return!1;const e=t.slice(0,r.length),o=0===n.length?[]:t.slice(-n.length),s=t.slice(r.length,0===n.length?1/0:-n.length);return r.every((t,r)=>N(t,e[r],a))&&n.every((e,t)=>N(e,o[t],a))&&(0===i.length||N(i[0],s,a))}return e.length===t.length&&e.every((e,r)=>N(e,t[r],a))}return Reflect.ownKeys(e).every(r=>{const n=e[r];return(r in t||R(i=n)&&"optional"===i[C]().matcherType)&&N(n,t[r],a);var i})}return Object.is(t,e)},z=e=>{var t,a,r;return I(e)?R(e)?null!=(t=null==(a=(r=e[C]()).getSelectionKeys)?void 0:a.call(r))?t:[]:Array.isArray(e)?L(e,z):L(Object.values(e),z):[]},L=(e,t)=>e.reduce((e,a)=>e.concat(t(a)),[]);function Y(e){return Object.assign(e,{optional:()=>{return t=e,Y({[C]:()=>({match:e=>{let a={};const r=(e,t)=>{a[e]=t};return void 0===e?(z(t).forEach(e=>r(e,void 0)),{matched:!0,selections:a}):{matched:N(t,e,r),selections:a}},getSelectionKeys:()=>z(t),matcherType:"optional"})});var t},and:t=>W(e,t),or:t=>function(...e){return Y({[C]:()=>({match:t=>{let a={};const r=(e,t)=>{a[e]=t};return L(e,z).forEach(e=>r(e,void 0)),{matched:e.some(e=>N(e,t,r)),selections:a}},getSelectionKeys:()=>L(e,z),matcherType:"or"})})}(e,t),select:t=>void 0===t?P(e):P(t,e)})}function W(...e){return Y({[C]:()=>({match:t=>{let a={};const r=(e,t)=>{a[e]=t};return{matched:e.every(e=>N(e,t,r)),selections:a}},getSelectionKeys:()=>L(e,z),matcherType:"and"})})}function j(e){return{[C]:()=>({match:t=>({matched:Boolean(e(t))})})}}function P(...e){const t="string"==typeof e[0]?e[0]:void 0,a=2===e.length?e[1]:"string"==typeof e[0]?void 0:e[0];return Y({[C]:()=>({match:e=>{let r={[null!=t?t:A]:e};return{matched:void 0===a||N(a,e,(e,t)=>{r[e]=t}),selections:r}},getSelectionKeys:()=>[null!=t?t:A].concat(void 0===a?[]:z(a))})})}function H(e){return!0}function F(e){return"number"==typeof e}function B(e){return"string"==typeof e}function U(e){return"bigint"==typeof e}Y(j(H)),Y(j(H));const V=e=>Object.assign(Y(e),{startsWith:t=>{return V(W(e,(a=t,j(e=>B(e)&&e.startsWith(a)))));var a},endsWith:t=>{return V(W(e,(a=t,j(e=>B(e)&&e.endsWith(a)))));var a},minLength:t=>{return V(W(e,(a=t,j(e=>B(e)&&e.length>=a))));var a},length:t=>{return V(W(e,(a=t,j(e=>B(e)&&e.length===a))));var a},maxLength:t=>{return V(W(e,(a=t,j(e=>B(e)&&e.length<=a))));var a},includes:t=>{return V(W(e,(a=t,j(e=>B(e)&&e.includes(a)))));var a},regex:t=>{return V(W(e,(a=t,j(e=>B(e)&&Boolean(e.match(a))))));var a}});V(j(B));const K=e=>Object.assign(Y(e),{between:(t,a)=>{return K(W(e,(r=t,n=a,j(e=>F(e)&&r<=e&&n>=e))));var r,n},lt:t=>{return K(W(e,(a=t,j(e=>F(e)&&e<a))));var a},gt:t=>{return K(W(e,(a=t,j(e=>F(e)&&e>a))));var a},lte:t=>{return K(W(e,(a=t,j(e=>F(e)&&e<=a))));var a},gte:t=>{return K(W(e,(a=t,j(e=>F(e)&&e>=a))));var a},int:()=>K(W(e,j(e=>F(e)&&Number.isInteger(e)))),finite:()=>K(W(e,j(e=>F(e)&&Number.isFinite(e)))),positive:()=>K(W(e,j(e=>F(e)&&e>0))),negative:()=>K(W(e,j(e=>F(e)&&e<0)))}),q=K(j(F)),G=e=>Object.assign(Y(e),{between:(t,a)=>{return G(W(e,(r=t,n=a,j(e=>U(e)&&r<=e&&n>=e))));var r,n},lt:t=>{return G(W(e,(a=t,j(e=>U(e)&&e<a))));var a},gt:t=>{return G(W(e,(a=t,j(e=>U(e)&&e>a))));var a},lte:t=>{return G(W(e,(a=t,j(e=>U(e)&&e<=a))));var a},gte:t=>{return G(W(e,(a=t,j(e=>U(e)&&e>=a))));var a},positive:()=>G(W(e,j(e=>U(e)&&e>0))),negative:()=>G(W(e,j(e=>U(e)&&e<0)))});G(j(U)),Y(j(function(e){return"boolean"==typeof e})),Y(j(function(e){return"symbol"==typeof e}));const Z=Y(j(function(e){return null==e}));Y(j(function(e){return null!=e}));var J={__proto__:null,number:q,nullish:Z};class X extends Error{constructor(e){let t;try{t=JSON.stringify(e)}catch(a){t=e}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=e}}const Q={matched:!1,value:void 0};function ee(e){return new te(e,Q)}let te=class e{constructor(e,t){this.input=void 0,this.state=void 0,this.input=e,this.state=t}with(...t){if(this.state.matched)return this;const a=t[t.length-1],r=[t[0]];let n;3===t.length&&"function"==typeof t[1]?n=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let i=!1,o={};const s=(e,t)=>{i=!0,o[e]=t},d=!r.some(e=>N(e,this.input,s))||n&&!Boolean(n(this.input))?Q:{matched:!0,value:a(i?A in o?o[A]:o:this.input,this.input)};return new e(this.input,d)}when(t,a){if(this.state.matched)return this;const r=Boolean(t(this.input));return new e(this.input,r?{matched:!0,value:a(this.input,this.input)}:Q)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=ae){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function ae(e){throw new X(e)}const re={"zh-Hans":"zh-CN","zh-Hant":"zh-TW"};function ne(e){return re[e]||e}const ie=/* @__PURE__ */new Map;const oe=/* @__PURE__ */new Map;const se=/* @__PURE__ */new Map;function de(e,t="en"){return function(e){const t=ne(e);let a=ie.get(t);return a||(a=Object.freeze(Array.from({length:12},(e,a)=>d.local().set({month:a+1}).setLocale(t).toFormat("MMM"))),ie.set(t,a)),a}(t)[e-1]}function le(e,t,a,r="en"){const n=new Date(a,t-1,e);return function(e){const t=ne(e);let a=se.get(t);return a||(a=new Intl.DateTimeFormat(t,{day:"numeric",month:"short"}),se.set(t,a)),a}(r).format(n)}function ce(e,t="en"){return function(e){const t=ne(e);let a=oe.get(t);return a||(a=Object.freeze(Array.from({length:7},(e,a)=>d.local().set({weekday:a+1}).setLocale(t).toFormat("ccc"))),oe.set(t,a)),a}(t)[e-1]}const he=/* @__PURE__ */new Map;function ue(e,t,a="en"){const r=new Date(2e3,0,1,e,t);return function(e){const t=ne(e);let a=he.get(t);return a||(a=new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}),he.set(t,a)),a}(a).format(r)}function fe(e,t,a,r="en"){const n=ne(r),i=new Date(a,t-1,e);return new Intl.DateTimeFormat(n,{day:"numeric",month:"short",year:"numeric"}).format(i)}function pe(e,t){return((e-t)%7+7)%7}function ye(e,t){const a=new Date(e.year,e.month-1,e.day),r=pe(a.getDay(),t),n=new Date(a);return n.setDate(a.getDate()-r),Array.from({length:7},(e,t)=>{const a=new Date(n);return a.setDate(n.getDate()+t),{day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()}})}function me(e,t){return pe(new Date(e.year,e.month-1,1).getDay(),t)}function be(e){const t=0===e?7:e;return Array.from({length:7},(e,a)=>(t-1+a)%7+1)}var ge=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,we=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?ve(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&ge(t,a,i),i};let De=class extends t{constructor(){super(...arguments),this.firstDayOfWeek=1,this.locale="en"}render(){const e=be(this.firstDayOfWeek);return a` <div>
2
+ ${e.map(e=>a`<span>${ce(e,this.locale)}</span>`)}
3
+ </div>`}};De.styles=e`
4
4
  :host {
5
5
  display: block;
6
6
  flex-shrink: 0;
@@ -16,22 +16,29 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
16
16
  padding: var(--context-padding, 0.25em) var(--context-padding-inline, 0.5em);
17
17
  text-align: var(--context-text-align, left);
18
18
  }
19
- `,Ee([s({type:Number})],Se.prototype,"firstDayOfWeek",2),Ee([s({type:String})],Se.prototype,"locale",2),Se=Ee([d("lms-calendar-context")],Se);var _e=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,Me=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?Te(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&_e(t,a,i),i};let Ce=class extends r{constructor(){super(...arguments),this._hours=[...Array(25).keys()],this._hasActiveSidebar=!1,this.allDayRowCount=0,this.locale="en"}_renderIndicatorValue(e){return ge(e,0,this.locale)}render(){const e=this.allDayRowCount>0,t=e?`calc(100% - 3.5em - ${24*this.allDayRowCount}px)`:"100%";return i` <div class="wrapper">
20
- ${e?i`
19
+ `,we([n({type:Number})],De.prototype,"firstDayOfWeek",2),we([n({type:String})],De.prototype,"locale",2),De=we([i("lms-calendar-context")],De);var ke=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,$e=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?xe(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&ke(t,a,i),i};let Ee=class extends t{constructor(){super(...arguments),this._hours=[...Array(25).keys()],this._hasActiveSidebar=!1,this.allDayRowCount=0,this.locale="en",this.activeDate={day:/* @__PURE__ */(new Date).getDate(),month:/* @__PURE__ */(new Date).getMonth()+1,year:/* @__PURE__ */(new Date).getFullYear()},this.firstDayOfWeek=1,this._lastScrollH=0}firstUpdated(){const e=this.renderRoot?.querySelector(".main");e&&(this._applyScrollHeight(e.clientHeight),this._scrollRO=new ResizeObserver(([e])=>{const t=e.contentRect.height;t>0&&Math.abs(t-this._lastScrollH)>.5&&requestAnimationFrame(()=>this._applyScrollHeight(t))}),this._scrollRO.observe(e))}_applyScrollHeight(e){if(e<=0)return;this._lastScrollH=e;const t=e/720;this.style.setProperty("--minute-height",`${t}px`),this.style.setProperty("--hour-height",60*t+"px"),this.style.setProperty("--day-total-height",1440*t+"px"),this.style.setProperty("--half-day-height",`${e}px`)}disconnectedCallback(){super.disconnectedCallback(),this._scrollRO?.disconnect()}_renderIndicatorValue(e){return ue(e,0,this.locale)}_isCurrentDate(){const e=/* @__PURE__ */new Date;return this.activeDate.day===e.getDate()&&this.activeDate.month===e.getMonth()+1&&this.activeDate.year===e.getFullYear()}_getWeekday(){const e=new Date(this.activeDate.year,this.activeDate.month-1,this.activeDate.day).getDay();return 0===e?7:e}render(){const e=this.allDayRowCount>0,t=this._getWeekday();return a` <div class="wrapper">
20
+ <div class="day-header">
21
+ <div class="time-header"></div>
22
+ <div class="day-label ${h({current:this._isCurrentDate()})}">
23
+ <span class="day-name">${ce(t,this.locale)}</span>
24
+ <span class="day-number">${this.activeDate.day}</span>
25
+ </div>
26
+ </div>
27
+ ${e?a`
21
28
  <div class="all-day-wrapper">
22
29
  <div class="all-day">
23
30
  <slot name="all-day" id="all-day" class="entry"></slot>
24
31
  </div>
25
32
  </div>
26
- `:o}
27
- <div class="container" style="height: ${t}">
33
+ `:r}
34
+ <div class="container">
28
35
  <div
29
- class="main ${p({"w-100":!this._hasActiveSidebar,"w-70":this._hasActiveSidebar})}"
36
+ class="main ${h({"w-100":!this._hasActiveSidebar,"w-70":this._hasActiveSidebar})}"
30
37
  >
31
38
  <div class="time-labels">
32
- ${this._hours.map(e=>i`
39
+ ${this._hours.map(e=>a`
33
40
  <div
34
- class="hour-label"
41
+ class="hour-label${e%12==0?" snap-target":""}"
35
42
  style="top: calc(${e} * var(--hour-height))"
36
43
  >
37
44
  <span class="indicator">
@@ -49,7 +56,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
49
56
  ?hidden=${!this._hasActiveSidebar}
50
57
  ></div>
51
58
  </div>
52
- </div>`}};Ce.styles=n`
59
+ </div>`}};Ee.styles=e`
53
60
  :host {
54
61
  display: block;
55
62
  height: 100%;
@@ -64,9 +71,60 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
64
71
  overflow: hidden;
65
72
  }
66
73
 
74
+ /* Matches .week-header height so day/week scroll viewports
75
+ are equal and the noon snap aligns across both views. */
76
+ .day-header {
77
+ display: grid;
78
+ grid-template-columns: var(--day-grid-columns, var(--calendar-grid-columns-day));
79
+ height: var(--day-header-height, 2.5em);
80
+ flex-shrink: 0;
81
+ border-bottom: var(--separator-border);
82
+ gap: var(--day-gap, 1px);
83
+ padding: 0 var(--day-padding, 0.5em);
84
+ overflow: hidden;
85
+ }
86
+
87
+ .day-header .time-header {
88
+ border-right: 1px solid var(--separator-light);
89
+ }
90
+
91
+ .day-header .day-label {
92
+ padding: 0 0.25em;
93
+ font-weight: var(--day-label-font-weight);
94
+ display: flex;
95
+ flex-direction: row;
96
+ justify-content: center;
97
+ align-items: center;
98
+ gap: 0.35em;
99
+ overflow: hidden;
100
+ /* Offset by half the time column so the label visually
101
+ centers across the full calendar width, not just the
102
+ content column */
103
+ padding-right: var(--time-column-width, 4em);
104
+ }
105
+
106
+ .day-header .day-name {
107
+ font-size: 0.7em;
108
+ text-transform: uppercase;
109
+ letter-spacing: 0.03em;
110
+ opacity: 0.7;
111
+ }
112
+
113
+ .day-header .day-number {
114
+ font-size: 0.95em;
115
+ font-weight: 600;
116
+ line-height: 1;
117
+ }
118
+
119
+ .day-label.current {
120
+ color: var(--indicator-color, var(--primary-color));
121
+ font-weight: var(--indicator-font-weight, bold);
122
+ }
123
+
67
124
  .container {
68
125
  display: flex;
69
126
  flex: 1;
127
+ min-height: 0;
70
128
  width: 100%;
71
129
  }
72
130
 
@@ -74,11 +132,16 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
74
132
  display: grid;
75
133
  grid-template-columns: var(--day-grid-columns, var(--calendar-grid-columns-day));
76
134
  grid-template-rows: 1fr;
77
- height: var(--main-content-height);
135
+ /* 100% of .container = wrapper − day-header, matching week-scroll */
136
+ height: 100%;
78
137
  gap: var(--day-gap, 1px);
79
138
  overflow-y: scroll;
139
+ scroll-snap-type: y proximity;
80
140
  text-align: var(--day-text-align, center);
81
- padding: var(--day-padding, 0.5em);
141
+ /* Vertical padding gives the first/last hour labels room to
142
+ render above/below the grid without clipping.
143
+ Horizontal padding keeps the scrollport flush. */
144
+ padding: 0.6em var(--day-padding, 0.5em);
82
145
  position: relative;
83
146
  contain: content;
84
147
  }
@@ -100,6 +163,11 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
100
163
  color: var(--hour-indicator-color);
101
164
  }
102
165
 
166
+ /* Snap at noon: first scroll stop aligns with --half-day-height */
167
+ .hour-label.snap-target {
168
+ scroll-snap-align: start;
169
+ }
170
+
103
171
  .hour-label .indicator {
104
172
  position: relative;
105
173
  top: var(--indicator-top, -0.6em);
@@ -109,6 +177,8 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
109
177
  grid-column: 2;
110
178
  position: relative;
111
179
  height: var(--day-total-height);
180
+ /* Match time-labels clipping */
181
+ overflow: clip;
112
182
  background-image: repeating-linear-gradient(
113
183
  to bottom,
114
184
  transparent 0,
@@ -143,6 +213,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
143
213
  .all-day-wrapper {
144
214
  display: grid;
145
215
  grid-template-rows: 1fr;
216
+ flex-shrink: 0;
146
217
  border-bottom: 1px solid var(--separator-light, rgba(0, 0, 0, 0.1));
147
218
  /* Isolate repaint from the hour-grid scroller beneath */
148
219
  contain: paint;
@@ -155,21 +226,20 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
155
226
  min-height: 0;
156
227
  padding: 0.5em 0;
157
228
  }
158
- `,Me([l()],Ce.prototype,"_hours",2),Me([l()],Ce.prototype,"_hasActiveSidebar",2),Me([s({type:Number})],Ce.prototype,"allDayRowCount",2),Me([s({type:String})],Ce.prototype,"locale",2),Ce=Me([d("lms-calendar-day")],Ce);const Ae={ar:{s005053d82b712e0a:"ملاحظات",s090f2107b5a69a7f:"أ",s15ba5784a11e0b88:"الشهر الحالي",s22380c7fc798a44f:"بدون محتوى",s2bc4d1196bce49dc:"تصدير كملف ICS",s3c44e22d1af5693e:"سنة",s48e186fb300e5464:"الوقت",s58ab939b42a026a6:"طوال اليوم",s5e8250fb85d64c23:"إغلاق",s63d040e37887f17e:"اليوم",s680f01021b5e339d:"أسبوع",s98b32ef4a0856c08:"بدون عنوان",s99f110d27e30b289:"العنوان",sa0fd990c985f24bd:"تفاصيل الحدث",sac8252732f2edb19:"التاريخ",sb47daaf9e1c4a905:"شهر",se0955919920ee87d:"يوم",sfce4bfbe0f911aa7:"بدون وقت",sa1b2c3d4e5f60001:"السابق",sa1b2c3d4e5f60002:"التالي",sa1b2c3d4e5f60003:"أحداث",sa1b2c3d4e5f60004:"حدث تقويمي",sa1b2c3d4e5f60005:"اضغط Enter أو Space لفتح التفاصيل",sa1b2c3d4e5f60006:"إلى",sa1b2c3d4e5f60007:"التبديل إلى عرض اليوم لـ",sa1b2c3d4e5f60008:"عرض الأيام السابقة",sa1b2c3d4e5f60009:"عرض الأيام التالية",sa1b2c3d4e5f60010:"المزيد",sa1b2c3d4e5f60011:"عرض التقويم",sa1b2c3d4e5f60012:"عرض"},bn:{s005053d82b712e0a:"নোট",s090f2107b5a69a7f:"স",s15ba5784a11e0b88:"বর্তমান মাস",s22380c7fc798a44f:"বিষয়বস্তু নেই",s2bc4d1196bce49dc:"ICS হিসাবে রপ্তানি",s3c44e22d1af5693e:"বছর",s48e186fb300e5464:"সময়",s58ab939b42a026a6:"সারাদিন",s5e8250fb85d64c23:"বন্ধ",s63d040e37887f17e:"আজ",s680f01021b5e339d:"সপ্তাহ",s98b32ef4a0856c08:"শিরোনাম নেই",s99f110d27e30b289:"শিরোনাম",sa0fd990c985f24bd:"ইভেন্টের বিবরণ",sac8252732f2edb19:"তারিখ",sb47daaf9e1c4a905:"মাস",se0955919920ee87d:"দিন",sfce4bfbe0f911aa7:"সময় নেই",sa1b2c3d4e5f60001:"আগের",sa1b2c3d4e5f60002:"পরের",sa1b2c3d4e5f60003:"ইভেন্ট",sa1b2c3d4e5f60004:"ক্যালেন্ডার ইভেন্ট",sa1b2c3d4e5f60005:"বিস্তারিত দেখতে Enter বা Space চাপুন",sa1b2c3d4e5f60006:"থেকে",sa1b2c3d4e5f60007:"দিনের ভিউতে যান",sa1b2c3d4e5f60008:"আগের দিনগুলি দেখান",sa1b2c3d4e5f60009:"পরের দিনগুলি দেখান",sa1b2c3d4e5f60010:"আরও",sa1b2c3d4e5f60011:"ক্যালেন্ডার ভিউ",sa1b2c3d4e5f60012:"ভিউ"},de:{s005053d82b712e0a:"Notizen",s090f2107b5a69a7f:"KW",s15ba5784a11e0b88:"Aktueller Monat",s22380c7fc798a44f:"Kein Inhalt",s2bc4d1196bce49dc:"Als ICS exportieren",s3c44e22d1af5693e:"Jahr",s48e186fb300e5464:"Zeit",s58ab939b42a026a6:"Ganztägig",s5e8250fb85d64c23:"Schließen",s63d040e37887f17e:"Heute",s680f01021b5e339d:"Woche",s98b32ef4a0856c08:"Kein Titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Termindetails",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Monat",se0955919920ee87d:"Tag",sfce4bfbe0f911aa7:"Keine Zeit",sa1b2c3d4e5f60001:"Zurück",sa1b2c3d4e5f60002:"Weiter",sa1b2c3d4e5f60003:"Termine",sa1b2c3d4e5f60004:"Kalenderereignis",sa1b2c3d4e5f60005:"Enter oder Leertaste drücken für Details",sa1b2c3d4e5f60006:"bis",sa1b2c3d4e5f60007:"Zur Tagesansicht wechseln für",sa1b2c3d4e5f60008:"Frühere Tage anzeigen",sa1b2c3d4e5f60009:"Spätere Tage anzeigen",sa1b2c3d4e5f60010:"mehr",sa1b2c3d4e5f60011:"Kalenderansicht",sa1b2c3d4e5f60012:"Ansicht"},"de-DE":{s005053d82b712e0a:"Notizen",s090f2107b5a69a7f:"KW",s15ba5784a11e0b88:"Aktueller Monat",s22380c7fc798a44f:"Kein Inhalt",s2bc4d1196bce49dc:"Als ICS exportieren",s3c44e22d1af5693e:"Jahr",s48e186fb300e5464:"Zeit",s58ab939b42a026a6:"Ganztägig",s5e8250fb85d64c23:"Schließen",s63d040e37887f17e:"Heute",s680f01021b5e339d:"Woche",s98b32ef4a0856c08:"Kein Titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Termindetails",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Monat",se0955919920ee87d:"Tag",sfce4bfbe0f911aa7:"Keine Zeit",sa1b2c3d4e5f60001:"Zurück",sa1b2c3d4e5f60002:"Weiter",sa1b2c3d4e5f60003:"Termine",sa1b2c3d4e5f60004:"Kalenderereignis",sa1b2c3d4e5f60005:"Enter oder Leertaste drücken für Details",sa1b2c3d4e5f60006:"bis",sa1b2c3d4e5f60007:"Zur Tagesansicht wechseln für",sa1b2c3d4e5f60008:"Frühere Tage anzeigen",sa1b2c3d4e5f60009:"Spätere Tage anzeigen",sa1b2c3d4e5f60010:"mehr",sa1b2c3d4e5f60011:"Kalenderansicht",sa1b2c3d4e5f60012:"Ansicht"},es:{s005053d82b712e0a:"Notas",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mes actual",s22380c7fc798a44f:"Sin contenido",s2bc4d1196bce49dc:"Exportar como ICS",s3c44e22d1af5693e:"Año",s48e186fb300e5464:"Hora",s58ab939b42a026a6:"Todo el día",s5e8250fb85d64c23:"Cerrar",s63d040e37887f17e:"Hoy",s680f01021b5e339d:"Semana",s98b32ef4a0856c08:"Sin título",s99f110d27e30b289:"Título",sa0fd990c985f24bd:"Detalles del evento",sac8252732f2edb19:"Fecha",sb47daaf9e1c4a905:"Mes",se0955919920ee87d:"Día",sfce4bfbe0f911aa7:"Sin hora",sa1b2c3d4e5f60001:"Anterior",sa1b2c3d4e5f60002:"Siguiente",sa1b2c3d4e5f60003:"eventos",sa1b2c3d4e5f60004:"Evento del calendario",sa1b2c3d4e5f60005:"Pulsa Enter o Espacio para abrir detalles",sa1b2c3d4e5f60006:"a",sa1b2c3d4e5f60007:"Cambiar a vista diaria para",sa1b2c3d4e5f60008:"Mostrar días anteriores",sa1b2c3d4e5f60009:"Mostrar días posteriores",sa1b2c3d4e5f60010:"más",sa1b2c3d4e5f60011:"Vista del calendario",sa1b2c3d4e5f60012:"vista"},fr:{s005053d82b712e0a:"Notes",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mois en cours",s22380c7fc798a44f:"Aucun contenu",s2bc4d1196bce49dc:"Exporter en ICS",s3c44e22d1af5693e:"Année",s48e186fb300e5464:"Heure",s58ab939b42a026a6:"Toute la journée",s5e8250fb85d64c23:"Fermer",s63d040e37887f17e:"Aujourd'hui",s680f01021b5e339d:"Semaine",s98b32ef4a0856c08:"Sans titre",s99f110d27e30b289:"Titre",sa0fd990c985f24bd:"Détails de l'événement",sac8252732f2edb19:"Date",sb47daaf9e1c4a905:"Mois",se0955919920ee87d:"Jour",sfce4bfbe0f911aa7:"Aucune heure",sa1b2c3d4e5f60001:"Précédent",sa1b2c3d4e5f60002:"Suivant",sa1b2c3d4e5f60003:"événements",sa1b2c3d4e5f60004:"Événement du calendrier",sa1b2c3d4e5f60005:"Appuyez sur Entrée ou Espace pour ouvrir les détails",sa1b2c3d4e5f60006:"à",sa1b2c3d4e5f60007:"Passer à la vue journalière pour",sa1b2c3d4e5f60008:"Afficher les jours précédents",sa1b2c3d4e5f60009:"Afficher les jours suivants",sa1b2c3d4e5f60010:"plus",sa1b2c3d4e5f60011:"Vue du calendrier",sa1b2c3d4e5f60012:"vue"},hi:{s005053d82b712e0a:"टिप्पणियाँ",s090f2107b5a69a7f:"स",s15ba5784a11e0b88:"वर्तमान महीना",s22380c7fc798a44f:"कोई सामग्री नहीं",s2bc4d1196bce49dc:"ICS के रूप में निर्यात करें",s3c44e22d1af5693e:"वर्ष",s48e186fb300e5464:"समय",s58ab939b42a026a6:"पूरा दिन",s5e8250fb85d64c23:"बंद करें",s63d040e37887f17e:"आज",s680f01021b5e339d:"सप्ताह",s98b32ef4a0856c08:"कोई शीर्षक नहीं",s99f110d27e30b289:"शीर्षक",sa0fd990c985f24bd:"कार्यक्रम विवरण",sac8252732f2edb19:"तारीख",sb47daaf9e1c4a905:"महीना",se0955919920ee87d:"दिन",sfce4bfbe0f911aa7:"कोई समय नहीं",sa1b2c3d4e5f60001:"पिछला",sa1b2c3d4e5f60002:"अगला",sa1b2c3d4e5f60003:"इवेंट",sa1b2c3d4e5f60004:"कैलेंडर इवेंट",sa1b2c3d4e5f60005:"विवरण खोलने के लिए Enter या Space दबाएं",sa1b2c3d4e5f60006:"से",sa1b2c3d4e5f60007:"दिन दृश्य पर जाएं",sa1b2c3d4e5f60008:"पहले के दिन दिखाएं",sa1b2c3d4e5f60009:"बाद के दिन दिखाएं",sa1b2c3d4e5f60010:"अधिक",sa1b2c3d4e5f60011:"कैलेंडर दृश्य",sa1b2c3d4e5f60012:"दृश्य"},id:{s005053d82b712e0a:"Catatan",s090f2107b5a69a7f:"M",s15ba5784a11e0b88:"Bulan Ini",s22380c7fc798a44f:"Tanpa Konten",s2bc4d1196bce49dc:"Ekspor sebagai ICS",s3c44e22d1af5693e:"Tahun",s48e186fb300e5464:"Waktu",s58ab939b42a026a6:"Sepanjang Hari",s5e8250fb85d64c23:"Tutup",s63d040e37887f17e:"Hari Ini",s680f01021b5e339d:"Minggu",s98b32ef4a0856c08:"Tanpa Judul",s99f110d27e30b289:"Judul",sa0fd990c985f24bd:"Detail Acara",sac8252732f2edb19:"Tanggal",sb47daaf9e1c4a905:"Bulan",se0955919920ee87d:"Hari",sfce4bfbe0f911aa7:"Tanpa Waktu",sa1b2c3d4e5f60001:"Sebelumnya",sa1b2c3d4e5f60002:"Berikutnya",sa1b2c3d4e5f60003:"acara",sa1b2c3d4e5f60004:"Acara kalender",sa1b2c3d4e5f60005:"Tekan Enter atau Spasi untuk membuka detail",sa1b2c3d4e5f60006:"sampai",sa1b2c3d4e5f60007:"Beralih ke tampilan hari untuk",sa1b2c3d4e5f60008:"Tampilkan hari sebelumnya",sa1b2c3d4e5f60009:"Tampilkan hari berikutnya",sa1b2c3d4e5f60010:"lainnya",sa1b2c3d4e5f60011:"Tampilan kalender",sa1b2c3d4e5f60012:"tampilan"},it:{s005053d82b712e0a:"Note",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mese corrente",s22380c7fc798a44f:"Nessun contenuto",s2bc4d1196bce49dc:"Esporta come ICS",s3c44e22d1af5693e:"Anno",s48e186fb300e5464:"Ora",s58ab939b42a026a6:"Tutto il giorno",s5e8250fb85d64c23:"Chiudi",s63d040e37887f17e:"Oggi",s680f01021b5e339d:"Settimana",s98b32ef4a0856c08:"Senza titolo",s99f110d27e30b289:"Titolo",sa0fd990c985f24bd:"Dettagli evento",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Mese",se0955919920ee87d:"Giorno",sfce4bfbe0f911aa7:"Nessun orario",sa1b2c3d4e5f60001:"Precedente",sa1b2c3d4e5f60002:"Successivo",sa1b2c3d4e5f60003:"eventi",sa1b2c3d4e5f60004:"Evento del calendario",sa1b2c3d4e5f60005:"Premi Invio o Spazio per aprire i dettagli",sa1b2c3d4e5f60006:"a",sa1b2c3d4e5f60007:"Passa alla vista giornaliera per",sa1b2c3d4e5f60008:"Mostra giorni precedenti",sa1b2c3d4e5f60009:"Mostra giorni successivi",sa1b2c3d4e5f60010:"altro",sa1b2c3d4e5f60011:"Vista calendario",sa1b2c3d4e5f60012:"vista"},ja:{s005053d82b712e0a:"メモ",s090f2107b5a69a7f:"週",s15ba5784a11e0b88:"今月",s22380c7fc798a44f:"内容なし",s2bc4d1196bce49dc:"ICSとして書き出す",s3c44e22d1af5693e:"年",s48e186fb300e5464:"時間",s58ab939b42a026a6:"終日",s5e8250fb85d64c23:"閉じる",s63d040e37887f17e:"今日",s680f01021b5e339d:"週",s98b32ef4a0856c08:"タイトルなし",s99f110d27e30b289:"タイトル",sa0fd990c985f24bd:"予定の詳細",sac8252732f2edb19:"日付",sb47daaf9e1c4a905:"月",se0955919920ee87d:"日",sfce4bfbe0f911aa7:"時間なし",sa1b2c3d4e5f60001:"前へ",sa1b2c3d4e5f60002:"次へ",sa1b2c3d4e5f60003:"件",sa1b2c3d4e5f60004:"カレンダーイベント",sa1b2c3d4e5f60005:"EnterまたはSpaceキーで詳細を開く",sa1b2c3d4e5f60006:"から",sa1b2c3d4e5f60007:"日表示に切り替え",sa1b2c3d4e5f60008:"前の日を表示",sa1b2c3d4e5f60009:"次の日を表示",sa1b2c3d4e5f60010:"もっと",sa1b2c3d4e5f60011:"カレンダー表示",sa1b2c3d4e5f60012:"表示"},ko:{s005053d82b712e0a:"메모",s090f2107b5a69a7f:"주",s15ba5784a11e0b88:"이번 달",s22380c7fc798a44f:"내용 없음",s2bc4d1196bce49dc:"ICS로 내보내기",s3c44e22d1af5693e:"년",s48e186fb300e5464:"시간",s58ab939b42a026a6:"종일",s5e8250fb85d64c23:"닫기",s63d040e37887f17e:"오늘",s680f01021b5e339d:"주",s98b32ef4a0856c08:"제목 없음",s99f110d27e30b289:"제목",sa0fd990c985f24bd:"일정 상세",sac8252732f2edb19:"날짜",sb47daaf9e1c4a905:"월",se0955919920ee87d:"일",sfce4bfbe0f911aa7:"시간 없음",sa1b2c3d4e5f60001:"이전",sa1b2c3d4e5f60002:"다음",sa1b2c3d4e5f60003:"일정",sa1b2c3d4e5f60004:"캘린더 이벤트",sa1b2c3d4e5f60005:"Enter 또는 Space를 눌러 세부 정보 열기",sa1b2c3d4e5f60006:"부터",sa1b2c3d4e5f60007:"일 보기로 전환",sa1b2c3d4e5f60008:"이전 날 표시",sa1b2c3d4e5f60009:"다음 날 표시",sa1b2c3d4e5f60010:"더보기",sa1b2c3d4e5f60011:"캘린더 보기",sa1b2c3d4e5f60012:"보기"},nl:{s005053d82b712e0a:"Notities",s090f2107b5a69a7f:"W",s15ba5784a11e0b88:"Huidige maand",s22380c7fc798a44f:"Geen inhoud",s2bc4d1196bce49dc:"Exporteren als ICS",s3c44e22d1af5693e:"Jaar",s48e186fb300e5464:"Tijd",s58ab939b42a026a6:"Hele dag",s5e8250fb85d64c23:"Sluiten",s63d040e37887f17e:"Vandaag",s680f01021b5e339d:"Week",s98b32ef4a0856c08:"Geen titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Details evenement",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Maand",se0955919920ee87d:"Dag",sfce4bfbe0f911aa7:"Geen tijd",sa1b2c3d4e5f60001:"Vorige",sa1b2c3d4e5f60002:"Volgende",sa1b2c3d4e5f60003:"evenementen",sa1b2c3d4e5f60004:"Agendagebeurtenis",sa1b2c3d4e5f60005:"Druk op Enter of Spatie om details te openen",sa1b2c3d4e5f60006:"tot",sa1b2c3d4e5f60007:"Naar dagweergave voor",sa1b2c3d4e5f60008:"Eerdere dagen tonen",sa1b2c3d4e5f60009:"Latere dagen tonen",sa1b2c3d4e5f60010:"meer",sa1b2c3d4e5f60011:"Agendaweergave",sa1b2c3d4e5f60012:"weergave"},pl:{s005053d82b712e0a:"Notatki",s090f2107b5a69a7f:"T",s15ba5784a11e0b88:"Bieżący miesiąc",s22380c7fc798a44f:"Brak treści",s2bc4d1196bce49dc:"Eksportuj jako ICS",s3c44e22d1af5693e:"Rok",s48e186fb300e5464:"Czas",s58ab939b42a026a6:"Cały dzień",s5e8250fb85d64c23:"Zamknij",s63d040e37887f17e:"Dziś",s680f01021b5e339d:"Tydzień",s98b32ef4a0856c08:"Brak tytułu",s99f110d27e30b289:"Tytuł",sa0fd990c985f24bd:"Szczegóły wydarzenia",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Miesiąc",se0955919920ee87d:"Dzień",sfce4bfbe0f911aa7:"Brak czasu",sa1b2c3d4e5f60001:"Poprzedni",sa1b2c3d4e5f60002:"Następny",sa1b2c3d4e5f60003:"wydarzeń",sa1b2c3d4e5f60004:"Wydarzenie kalendarza",sa1b2c3d4e5f60005:"Naciśnij Enter lub Spację, aby otworzyć szczegóły",sa1b2c3d4e5f60006:"do",sa1b2c3d4e5f60007:"Przełącz na widok dnia dla",sa1b2c3d4e5f60008:"Pokaż wcześniejsze dni",sa1b2c3d4e5f60009:"Pokaż późniejsze dni",sa1b2c3d4e5f60010:"więcej",sa1b2c3d4e5f60011:"Widok kalendarza",sa1b2c3d4e5f60012:"widok"},pt:{s005053d82b712e0a:"Notas",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mês atual",s22380c7fc798a44f:"Sem conteúdo",s2bc4d1196bce49dc:"Exportar como ICS",s3c44e22d1af5693e:"Ano",s48e186fb300e5464:"Hora",s58ab939b42a026a6:"O dia todo",s5e8250fb85d64c23:"Fechar",s63d040e37887f17e:"Hoje",s680f01021b5e339d:"Semana",s98b32ef4a0856c08:"Sem título",s99f110d27e30b289:"Título",sa0fd990c985f24bd:"Detalhes do evento",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Mês",se0955919920ee87d:"Dia",sfce4bfbe0f911aa7:"Sem horário",sa1b2c3d4e5f60001:"Anterior",sa1b2c3d4e5f60002:"Próximo",sa1b2c3d4e5f60003:"eventos",sa1b2c3d4e5f60004:"Evento do calendário",sa1b2c3d4e5f60005:"Pressione Enter ou Espaço para abrir detalhes",sa1b2c3d4e5f60006:"até",sa1b2c3d4e5f60007:"Mudar para visualização diária de",sa1b2c3d4e5f60008:"Mostrar dias anteriores",sa1b2c3d4e5f60009:"Mostrar dias posteriores",sa1b2c3d4e5f60010:"mais",sa1b2c3d4e5f60011:"Visualização do calendário",sa1b2c3d4e5f60012:"visualização"},ru:{s005053d82b712e0a:"Заметки",s090f2107b5a69a7f:"Н",s15ba5784a11e0b88:"Текущий месяц",s22380c7fc798a44f:"Нет содержимого",s2bc4d1196bce49dc:"Экспорт в ICS",s3c44e22d1af5693e:"Год",s48e186fb300e5464:"Время",s58ab939b42a026a6:"Весь день",s5e8250fb85d64c23:"Закрыть",s63d040e37887f17e:"Сегодня",s680f01021b5e339d:"Неделя",s98b32ef4a0856c08:"Без названия",s99f110d27e30b289:"Название",sa0fd990c985f24bd:"Детали события",sac8252732f2edb19:"Дата",sb47daaf9e1c4a905:"Месяц",se0955919920ee87d:"День",sfce4bfbe0f911aa7:"Нет времени",sa1b2c3d4e5f60001:"Назад",sa1b2c3d4e5f60002:"Вперёд",sa1b2c3d4e5f60003:"событий",sa1b2c3d4e5f60004:"Событие календаря",sa1b2c3d4e5f60005:"Нажмите Enter или Пробел для открытия деталей",sa1b2c3d4e5f60006:"до",sa1b2c3d4e5f60007:"Переключиться на дневной вид для",sa1b2c3d4e5f60008:"Показать предыдущие дни",sa1b2c3d4e5f60009:"Показать следующие дни",sa1b2c3d4e5f60010:"ещё",sa1b2c3d4e5f60011:"Вид календаря",sa1b2c3d4e5f60012:"вид"},th:{s005053d82b712e0a:"บันทึก",s090f2107b5a69a7f:"ส",s15ba5784a11e0b88:"เดือนปัจจุบัน",s22380c7fc798a44f:"ไม่มีเนื้อหา",s2bc4d1196bce49dc:"ส่งออกเป็น ICS",s3c44e22d1af5693e:"ปี",s48e186fb300e5464:"เวลา",s58ab939b42a026a6:"ทั้งวัน",s5e8250fb85d64c23:"ปิด",s63d040e37887f17e:"วันนี้",s680f01021b5e339d:"สัปดาห์",s98b32ef4a0856c08:"ไม่มีชื่อ",s99f110d27e30b289:"ชื่อ",sa0fd990c985f24bd:"รายละเอียดกิจกรรม",sac8252732f2edb19:"วันที่",sb47daaf9e1c4a905:"เดือน",se0955919920ee87d:"วัน",sfce4bfbe0f911aa7:"ไม่มีเวลา",sa1b2c3d4e5f60001:"ก่อนหน้า",sa1b2c3d4e5f60002:"ถัดไป",sa1b2c3d4e5f60003:"กิจกรรม",sa1b2c3d4e5f60004:"กิจกรรมปฏิทิน",sa1b2c3d4e5f60005:"กด Enter หรือ Space เพื่อเปิดรายละเอียด",sa1b2c3d4e5f60006:"ถึง",sa1b2c3d4e5f60007:"สลับไปมุมมองรายวันสำหรับ",sa1b2c3d4e5f60008:"แสดงวันก่อนหน้า",sa1b2c3d4e5f60009:"แสดงวันถัดไป",sa1b2c3d4e5f60010:"เพิ่มเติม",sa1b2c3d4e5f60011:"มุมมองปฏิทิน",sa1b2c3d4e5f60012:"มุมมอง"},tr:{s005053d82b712e0a:"Notlar",s090f2107b5a69a7f:"H",s15ba5784a11e0b88:"Bu Ay",s22380c7fc798a44f:"İçerik Yok",s2bc4d1196bce49dc:"ICS Olarak Dışa Aktar",s3c44e22d1af5693e:"Yıl",s48e186fb300e5464:"Zaman",s58ab939b42a026a6:"Tüm Gün",s5e8250fb85d64c23:"Kapat",s63d040e37887f17e:"Bugün",s680f01021b5e339d:"Hafta",s98b32ef4a0856c08:"Başlıksız",s99f110d27e30b289:"Başlık",sa0fd990c985f24bd:"Etkinlik Detayları",sac8252732f2edb19:"Tarih",sb47daaf9e1c4a905:"Ay",se0955919920ee87d:"Gün",sfce4bfbe0f911aa7:"Zaman Yok",sa1b2c3d4e5f60001:"Önceki",sa1b2c3d4e5f60002:"Sonraki",sa1b2c3d4e5f60003:"etkinlik",sa1b2c3d4e5f60004:"Takvim etkinliği",sa1b2c3d4e5f60005:"Ayrıntıları açmak için Enter veya Boşluk tuşuna basın",sa1b2c3d4e5f60006:"ile",sa1b2c3d4e5f60007:"Gün görünümüne geç",sa1b2c3d4e5f60008:"Önceki günleri göster",sa1b2c3d4e5f60009:"Sonraki günleri göster",sa1b2c3d4e5f60010:"daha fazla",sa1b2c3d4e5f60011:"Takvim görünümü",sa1b2c3d4e5f60012:"görünüm"},uk:{s005053d82b712e0a:"Нотатки",s090f2107b5a69a7f:"Т",s15ba5784a11e0b88:"Поточний місяць",s22380c7fc798a44f:"Без вмісту",s2bc4d1196bce49dc:"Експорт в ICS",s3c44e22d1af5693e:"Рік",s48e186fb300e5464:"Час",s58ab939b42a026a6:"Увесь день",s5e8250fb85d64c23:"Закрити",s63d040e37887f17e:"Сьогодні",s680f01021b5e339d:"Тиждень",s98b32ef4a0856c08:"Без назви",s99f110d27e30b289:"Назва",sa0fd990c985f24bd:"Деталі події",sac8252732f2edb19:"Дата",sb47daaf9e1c4a905:"Місяць",se0955919920ee87d:"День",sfce4bfbe0f911aa7:"Без часу",sa1b2c3d4e5f60001:"Попередній",sa1b2c3d4e5f60002:"Наступний",sa1b2c3d4e5f60003:"подій",sa1b2c3d4e5f60004:"Подія календаря",sa1b2c3d4e5f60005:"Натисніть Enter або Пробіл для відкриття деталей",sa1b2c3d4e5f60006:"до",sa1b2c3d4e5f60007:"Перейти до денного перегляду для",sa1b2c3d4e5f60008:"Показати попередні дні",sa1b2c3d4e5f60009:"Показати наступні дні",sa1b2c3d4e5f60010:"ще",sa1b2c3d4e5f60011:"Перегляд календаря",sa1b2c3d4e5f60012:"перегляд"},vi:{s005053d82b712e0a:"Ghi chú",s090f2107b5a69a7f:"T",s15ba5784a11e0b88:"Tháng hiện tại",s22380c7fc798a44f:"Không có nội dung",s2bc4d1196bce49dc:"Xuất dưới dạng ICS",s3c44e22d1af5693e:"Năm",s48e186fb300e5464:"Thời gian",s58ab939b42a026a6:"Cả ngày",s5e8250fb85d64c23:"Đóng",s63d040e37887f17e:"Hôm nay",s680f01021b5e339d:"Tuần",s98b32ef4a0856c08:"Không có tiêu đề",s99f110d27e30b289:"Tiêu đề",sa0fd990c985f24bd:"Chi tiết sự kiện",sac8252732f2edb19:"Ngày",sb47daaf9e1c4a905:"Tháng",se0955919920ee87d:"Ngày",sfce4bfbe0f911aa7:"Không có thời gian",sa1b2c3d4e5f60001:"Trước",sa1b2c3d4e5f60002:"Sau",sa1b2c3d4e5f60003:"sự kiện",sa1b2c3d4e5f60004:"Sự kiện lịch",sa1b2c3d4e5f60005:"Nhấn Enter hoặc Space để mở chi tiết",sa1b2c3d4e5f60006:"đến",sa1b2c3d4e5f60007:"Chuyển sang xem theo ngày cho",sa1b2c3d4e5f60008:"Hiển thị ngày trước đó",sa1b2c3d4e5f60009:"Hiển thị ngày tiếp theo",sa1b2c3d4e5f60010:"thêm",sa1b2c3d4e5f60011:"Xem lịch",sa1b2c3d4e5f60012:"xem"},"zh-Hans":{s005053d82b712e0a:"备注",s090f2107b5a69a7f:"周",s15ba5784a11e0b88:"本月",s22380c7fc798a44f:"无内容",s2bc4d1196bce49dc:"导出为 ICS",s3c44e22d1af5693e:"年",s48e186fb300e5464:"时间",s58ab939b42a026a6:"全天",s5e8250fb85d64c23:"关闭",s63d040e37887f17e:"今天",s680f01021b5e339d:"周",s98b32ef4a0856c08:"无标题",s99f110d27e30b289:"标题",sa0fd990c985f24bd:"事件详情",sac8252732f2edb19:"日期",sb47daaf9e1c4a905:"月",se0955919920ee87d:"日",sfce4bfbe0f911aa7:"无时间",sa1b2c3d4e5f60001:"上一个",sa1b2c3d4e5f60002:"下一个",sa1b2c3d4e5f60003:"事件",sa1b2c3d4e5f60004:"日历事件",sa1b2c3d4e5f60005:"按 Enter 或空格键打开详情",sa1b2c3d4e5f60006:"至",sa1b2c3d4e5f60007:"切换到日视图",sa1b2c3d4e5f60008:"显示更早的日期",sa1b2c3d4e5f60009:"显示更晚的日期",sa1b2c3d4e5f60010:"更多",sa1b2c3d4e5f60011:"日历视图",sa1b2c3d4e5f60012:"视图"}},Oe=[["day","se0955919920ee87d","Day"],["week","s680f01021b5e339d","Week"],["month","sb47daaf9e1c4a905","Month"],["currentMonth","s15ba5784a11e0b88","Current Month"],["allDay","s58ab939b42a026a6","All Day"],["today","s63d040e37887f17e","Today"],["noTitle","s98b32ef4a0856c08","No Title"],["noContent","s22380c7fc798a44f","No Content"],["noTime","sfce4bfbe0f911aa7","No Time"],["eventDetails","sa0fd990c985f24bd","Event Details"],["exportAsICS","s2bc4d1196bce49dc","Export as ICS"],["title","s99f110d27e30b289","Title"],["time","s48e186fb300e5464","Time"],["date","sac8252732f2edb19","Date"],["notes","s005053d82b712e0a","Notes"],["close","s5e8250fb85d64c23","Close"],["calendarWeek","s090f2107b5a69a7f","CW"],["year","s3c44e22d1af5693e","Year"],["previous","sa1b2c3d4e5f60001","Previous"],["next","sa1b2c3d4e5f60002","Next"],["events","sa1b2c3d4e5f60003","events"],["calendarEvent","sa1b2c3d4e5f60004","Calendar event"],["pressToOpen","sa1b2c3d4e5f60005","Press Enter or Space to open details"],["to","sa1b2c3d4e5f60006","to"],["switchToDayView","sa1b2c3d4e5f60007","Switch to day view for"],["showEarlierDays","sa1b2c3d4e5f60008","Show earlier days"],["showLaterDays","sa1b2c3d4e5f60009","Show later days"],["more","sa1b2c3d4e5f60010","more"],["calendarView","sa1b2c3d4e5f60011","Calendar view"],["viewLabel","sa1b2c3d4e5f60012","view"]],Ie=/* @__PURE__ */new Map;function Re(e){let t=Ie.get(e);if(t)return t;const a=function(e){if("en"!==e)return Ae[e]??Ae[e.split("-")[0]]}(e),n={};for(const[r,i,o]of Oe)n[r]=a?.[i]??o;return t=Object.freeze(n),Ie.set(e,t),t}var Ne=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,Le=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?ze(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&Ne(t,a,i),i};let Ye=class extends r{constructor(){super(),this.heading="",this.isContinuation=!1,this.density="standard",this.displayMode="default",this.floatText=!1,this.locale="en",this._sumReducer=(e,t)=>e+t,this.addEventListener("click",this._handleInteraction),this.addEventListener("keydown",this._handleInteraction),this.addEventListener("focus",this._handleFocus)}_renderTitle(){return oe(this.content).with(ne.nullish,()=>this.heading).otherwise(()=>`${this.heading}: ${this.content}`)}_renderTime(){const e=Re(this.locale);if("month-dot"===this.displayMode){if(this.isContinuation)return i`<span class="time">${e.allDay}</span>`;const t=this._displayInterval(this.time);return t?i`<span class="time">${t}</span>`:o}if("compact"===this.density)return o;if(this.isContinuation)return i`<span class="time">${e.allDay}</span>`;const t=this._displayInterval(this.time);return t?i`<span class="time">${t}</span>`:o}_renderContent(){return"full"===this.density&&this.content?i`<span class="content">${this.content}</span>`:o}_shouldShowTime(){return"compact"!==this.density&&(!!this.isContinuation||("standard"===this.density||"full"===this.density))}_getAriaLabel(){const e=Re(this.locale),t=this.time?`${ge(this.time.start.hour,this.time.start.minute,this.locale)} ${e.to} ${ge(this.time.end.hour,this.time.end.minute,this.locale)}`:e.allDay,a=this.content?`, ${this.content}`:"";return`${e.calendarEvent}: ${this.heading}${a}, ${t}. ${e.pressToOpen}`}updated(){this.floatText||(this.tabIndex=this.accessibility?.tabIndex??0,this.setAttribute("role","button"),this.setAttribute("aria-label",this.accessibility?.ariaLabel??this._getAriaLabel()),this.setAttribute("aria-selected",this._highlighted?"true":"false"))}render(){const e=`main ${this.density}`;if("month-dot"===this.displayMode){const t=this.isContinuation;return i`
229
+ `,$e([o()],Ee.prototype,"_hours",2),$e([o()],Ee.prototype,"_hasActiveSidebar",2),$e([n({type:Number})],Ee.prototype,"allDayRowCount",2),$e([n({type:String})],Ee.prototype,"locale",2),$e([n({attribute:!1})],Ee.prototype,"activeDate",2),$e([n({type:Number})],Ee.prototype,"firstDayOfWeek",2),Ee=$e([i("lms-calendar-day")],Ee);const Se={ar:{s005053d82b712e0a:"ملاحظات",s090f2107b5a69a7f:"أ",s15ba5784a11e0b88:"الشهر الحالي",s22380c7fc798a44f:"بدون محتوى",s2bc4d1196bce49dc:"تصدير كملف ICS",s3c44e22d1af5693e:"سنة",s48e186fb300e5464:"الوقت",s58ab939b42a026a6:"طوال اليوم",s5e8250fb85d64c23:"إغلاق",s63d040e37887f17e:"اليوم",s680f01021b5e339d:"أسبوع",s98b32ef4a0856c08:"بدون عنوان",s99f110d27e30b289:"العنوان",sa0fd990c985f24bd:"تفاصيل الحدث",sac8252732f2edb19:"التاريخ",sb47daaf9e1c4a905:"شهر",se0955919920ee87d:"يوم",sfce4bfbe0f911aa7:"بدون وقت",sa1b2c3d4e5f60001:"السابق",sa1b2c3d4e5f60002:"التالي",sa1b2c3d4e5f60003:"أحداث",sa1b2c3d4e5f60004:"حدث تقويمي",sa1b2c3d4e5f60005:"اضغط Enter أو Space لفتح التفاصيل",sa1b2c3d4e5f60006:"إلى",sa1b2c3d4e5f60007:"التبديل إلى عرض اليوم لـ",sa1b2c3d4e5f60008:"عرض الأيام السابقة",sa1b2c3d4e5f60009:"عرض الأيام التالية",sa1b2c3d4e5f60010:"المزيد",sa1b2c3d4e5f60011:"عرض التقويم",sa1b2c3d4e5f60012:"عرض"},bn:{s005053d82b712e0a:"নোট",s090f2107b5a69a7f:"স",s15ba5784a11e0b88:"বর্তমান মাস",s22380c7fc798a44f:"বিষয়বস্তু নেই",s2bc4d1196bce49dc:"ICS হিসাবে রপ্তানি",s3c44e22d1af5693e:"বছর",s48e186fb300e5464:"সময়",s58ab939b42a026a6:"সারাদিন",s5e8250fb85d64c23:"বন্ধ",s63d040e37887f17e:"আজ",s680f01021b5e339d:"সপ্তাহ",s98b32ef4a0856c08:"শিরোনাম নেই",s99f110d27e30b289:"শিরোনাম",sa0fd990c985f24bd:"ইভেন্টের বিবরণ",sac8252732f2edb19:"তারিখ",sb47daaf9e1c4a905:"মাস",se0955919920ee87d:"দিন",sfce4bfbe0f911aa7:"সময় নেই",sa1b2c3d4e5f60001:"আগের",sa1b2c3d4e5f60002:"পরের",sa1b2c3d4e5f60003:"ইভেন্ট",sa1b2c3d4e5f60004:"ক্যালেন্ডার ইভেন্ট",sa1b2c3d4e5f60005:"বিস্তারিত দেখতে Enter বা Space চাপুন",sa1b2c3d4e5f60006:"থেকে",sa1b2c3d4e5f60007:"দিনের ভিউতে যান",sa1b2c3d4e5f60008:"আগের দিনগুলি দেখান",sa1b2c3d4e5f60009:"পরের দিনগুলি দেখান",sa1b2c3d4e5f60010:"আরও",sa1b2c3d4e5f60011:"ক্যালেন্ডার ভিউ",sa1b2c3d4e5f60012:"ভিউ"},de:{s005053d82b712e0a:"Notizen",s090f2107b5a69a7f:"KW",s15ba5784a11e0b88:"Aktueller Monat",s22380c7fc798a44f:"Kein Inhalt",s2bc4d1196bce49dc:"Als ICS exportieren",s3c44e22d1af5693e:"Jahr",s48e186fb300e5464:"Zeit",s58ab939b42a026a6:"Ganztägig",s5e8250fb85d64c23:"Schließen",s63d040e37887f17e:"Heute",s680f01021b5e339d:"Woche",s98b32ef4a0856c08:"Kein Titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Termindetails",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Monat",se0955919920ee87d:"Tag",sfce4bfbe0f911aa7:"Keine Zeit",sa1b2c3d4e5f60001:"Zurück",sa1b2c3d4e5f60002:"Weiter",sa1b2c3d4e5f60003:"Termine",sa1b2c3d4e5f60004:"Kalenderereignis",sa1b2c3d4e5f60005:"Enter oder Leertaste drücken für Details",sa1b2c3d4e5f60006:"bis",sa1b2c3d4e5f60007:"Zur Tagesansicht wechseln für",sa1b2c3d4e5f60008:"Frühere Tage anzeigen",sa1b2c3d4e5f60009:"Spätere Tage anzeigen",sa1b2c3d4e5f60010:"mehr",sa1b2c3d4e5f60011:"Kalenderansicht",sa1b2c3d4e5f60012:"Ansicht"},"de-DE":{s005053d82b712e0a:"Notizen",s090f2107b5a69a7f:"KW",s15ba5784a11e0b88:"Aktueller Monat",s22380c7fc798a44f:"Kein Inhalt",s2bc4d1196bce49dc:"Als ICS exportieren",s3c44e22d1af5693e:"Jahr",s48e186fb300e5464:"Zeit",s58ab939b42a026a6:"Ganztägig",s5e8250fb85d64c23:"Schließen",s63d040e37887f17e:"Heute",s680f01021b5e339d:"Woche",s98b32ef4a0856c08:"Kein Titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Termindetails",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Monat",se0955919920ee87d:"Tag",sfce4bfbe0f911aa7:"Keine Zeit",sa1b2c3d4e5f60001:"Zurück",sa1b2c3d4e5f60002:"Weiter",sa1b2c3d4e5f60003:"Termine",sa1b2c3d4e5f60004:"Kalenderereignis",sa1b2c3d4e5f60005:"Enter oder Leertaste drücken für Details",sa1b2c3d4e5f60006:"bis",sa1b2c3d4e5f60007:"Zur Tagesansicht wechseln für",sa1b2c3d4e5f60008:"Frühere Tage anzeigen",sa1b2c3d4e5f60009:"Spätere Tage anzeigen",sa1b2c3d4e5f60010:"mehr",sa1b2c3d4e5f60011:"Kalenderansicht",sa1b2c3d4e5f60012:"Ansicht"},es:{s005053d82b712e0a:"Notas",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mes actual",s22380c7fc798a44f:"Sin contenido",s2bc4d1196bce49dc:"Exportar como ICS",s3c44e22d1af5693e:"Año",s48e186fb300e5464:"Hora",s58ab939b42a026a6:"Todo el día",s5e8250fb85d64c23:"Cerrar",s63d040e37887f17e:"Hoy",s680f01021b5e339d:"Semana",s98b32ef4a0856c08:"Sin título",s99f110d27e30b289:"Título",sa0fd990c985f24bd:"Detalles del evento",sac8252732f2edb19:"Fecha",sb47daaf9e1c4a905:"Mes",se0955919920ee87d:"Día",sfce4bfbe0f911aa7:"Sin hora",sa1b2c3d4e5f60001:"Anterior",sa1b2c3d4e5f60002:"Siguiente",sa1b2c3d4e5f60003:"eventos",sa1b2c3d4e5f60004:"Evento del calendario",sa1b2c3d4e5f60005:"Pulsa Enter o Espacio para abrir detalles",sa1b2c3d4e5f60006:"a",sa1b2c3d4e5f60007:"Cambiar a vista diaria para",sa1b2c3d4e5f60008:"Mostrar días anteriores",sa1b2c3d4e5f60009:"Mostrar días posteriores",sa1b2c3d4e5f60010:"más",sa1b2c3d4e5f60011:"Vista del calendario",sa1b2c3d4e5f60012:"vista"},fr:{s005053d82b712e0a:"Notes",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mois en cours",s22380c7fc798a44f:"Aucun contenu",s2bc4d1196bce49dc:"Exporter en ICS",s3c44e22d1af5693e:"Année",s48e186fb300e5464:"Heure",s58ab939b42a026a6:"Toute la journée",s5e8250fb85d64c23:"Fermer",s63d040e37887f17e:"Aujourd'hui",s680f01021b5e339d:"Semaine",s98b32ef4a0856c08:"Sans titre",s99f110d27e30b289:"Titre",sa0fd990c985f24bd:"Détails de l'événement",sac8252732f2edb19:"Date",sb47daaf9e1c4a905:"Mois",se0955919920ee87d:"Jour",sfce4bfbe0f911aa7:"Aucune heure",sa1b2c3d4e5f60001:"Précédent",sa1b2c3d4e5f60002:"Suivant",sa1b2c3d4e5f60003:"événements",sa1b2c3d4e5f60004:"Événement du calendrier",sa1b2c3d4e5f60005:"Appuyez sur Entrée ou Espace pour ouvrir les détails",sa1b2c3d4e5f60006:"à",sa1b2c3d4e5f60007:"Passer à la vue journalière pour",sa1b2c3d4e5f60008:"Afficher les jours précédents",sa1b2c3d4e5f60009:"Afficher les jours suivants",sa1b2c3d4e5f60010:"plus",sa1b2c3d4e5f60011:"Vue du calendrier",sa1b2c3d4e5f60012:"vue"},hi:{s005053d82b712e0a:"टिप्पणियाँ",s090f2107b5a69a7f:"स",s15ba5784a11e0b88:"वर्तमान महीना",s22380c7fc798a44f:"कोई सामग्री नहीं",s2bc4d1196bce49dc:"ICS के रूप में निर्यात करें",s3c44e22d1af5693e:"वर्ष",s48e186fb300e5464:"समय",s58ab939b42a026a6:"पूरा दिन",s5e8250fb85d64c23:"बंद करें",s63d040e37887f17e:"आज",s680f01021b5e339d:"सप्ताह",s98b32ef4a0856c08:"कोई शीर्षक नहीं",s99f110d27e30b289:"शीर्षक",sa0fd990c985f24bd:"कार्यक्रम विवरण",sac8252732f2edb19:"तारीख",sb47daaf9e1c4a905:"महीना",se0955919920ee87d:"दिन",sfce4bfbe0f911aa7:"कोई समय नहीं",sa1b2c3d4e5f60001:"पिछला",sa1b2c3d4e5f60002:"अगला",sa1b2c3d4e5f60003:"इवेंट",sa1b2c3d4e5f60004:"कैलेंडर इवेंट",sa1b2c3d4e5f60005:"विवरण खोलने के लिए Enter या Space दबाएं",sa1b2c3d4e5f60006:"से",sa1b2c3d4e5f60007:"दिन दृश्य पर जाएं",sa1b2c3d4e5f60008:"पहले के दिन दिखाएं",sa1b2c3d4e5f60009:"बाद के दिन दिखाएं",sa1b2c3d4e5f60010:"अधिक",sa1b2c3d4e5f60011:"कैलेंडर दृश्य",sa1b2c3d4e5f60012:"दृश्य"},id:{s005053d82b712e0a:"Catatan",s090f2107b5a69a7f:"M",s15ba5784a11e0b88:"Bulan Ini",s22380c7fc798a44f:"Tanpa Konten",s2bc4d1196bce49dc:"Ekspor sebagai ICS",s3c44e22d1af5693e:"Tahun",s48e186fb300e5464:"Waktu",s58ab939b42a026a6:"Sepanjang Hari",s5e8250fb85d64c23:"Tutup",s63d040e37887f17e:"Hari Ini",s680f01021b5e339d:"Minggu",s98b32ef4a0856c08:"Tanpa Judul",s99f110d27e30b289:"Judul",sa0fd990c985f24bd:"Detail Acara",sac8252732f2edb19:"Tanggal",sb47daaf9e1c4a905:"Bulan",se0955919920ee87d:"Hari",sfce4bfbe0f911aa7:"Tanpa Waktu",sa1b2c3d4e5f60001:"Sebelumnya",sa1b2c3d4e5f60002:"Berikutnya",sa1b2c3d4e5f60003:"acara",sa1b2c3d4e5f60004:"Acara kalender",sa1b2c3d4e5f60005:"Tekan Enter atau Spasi untuk membuka detail",sa1b2c3d4e5f60006:"sampai",sa1b2c3d4e5f60007:"Beralih ke tampilan hari untuk",sa1b2c3d4e5f60008:"Tampilkan hari sebelumnya",sa1b2c3d4e5f60009:"Tampilkan hari berikutnya",sa1b2c3d4e5f60010:"lainnya",sa1b2c3d4e5f60011:"Tampilan kalender",sa1b2c3d4e5f60012:"tampilan"},it:{s005053d82b712e0a:"Note",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mese corrente",s22380c7fc798a44f:"Nessun contenuto",s2bc4d1196bce49dc:"Esporta come ICS",s3c44e22d1af5693e:"Anno",s48e186fb300e5464:"Ora",s58ab939b42a026a6:"Tutto il giorno",s5e8250fb85d64c23:"Chiudi",s63d040e37887f17e:"Oggi",s680f01021b5e339d:"Settimana",s98b32ef4a0856c08:"Senza titolo",s99f110d27e30b289:"Titolo",sa0fd990c985f24bd:"Dettagli evento",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Mese",se0955919920ee87d:"Giorno",sfce4bfbe0f911aa7:"Nessun orario",sa1b2c3d4e5f60001:"Precedente",sa1b2c3d4e5f60002:"Successivo",sa1b2c3d4e5f60003:"eventi",sa1b2c3d4e5f60004:"Evento del calendario",sa1b2c3d4e5f60005:"Premi Invio o Spazio per aprire i dettagli",sa1b2c3d4e5f60006:"a",sa1b2c3d4e5f60007:"Passa alla vista giornaliera per",sa1b2c3d4e5f60008:"Mostra giorni precedenti",sa1b2c3d4e5f60009:"Mostra giorni successivi",sa1b2c3d4e5f60010:"altro",sa1b2c3d4e5f60011:"Vista calendario",sa1b2c3d4e5f60012:"vista"},ja:{s005053d82b712e0a:"メモ",s090f2107b5a69a7f:"週",s15ba5784a11e0b88:"今月",s22380c7fc798a44f:"内容なし",s2bc4d1196bce49dc:"ICSとして書き出す",s3c44e22d1af5693e:"年",s48e186fb300e5464:"時間",s58ab939b42a026a6:"終日",s5e8250fb85d64c23:"閉じる",s63d040e37887f17e:"今日",s680f01021b5e339d:"週",s98b32ef4a0856c08:"タイトルなし",s99f110d27e30b289:"タイトル",sa0fd990c985f24bd:"予定の詳細",sac8252732f2edb19:"日付",sb47daaf9e1c4a905:"月",se0955919920ee87d:"日",sfce4bfbe0f911aa7:"時間なし",sa1b2c3d4e5f60001:"前へ",sa1b2c3d4e5f60002:"次へ",sa1b2c3d4e5f60003:"件",sa1b2c3d4e5f60004:"カレンダーイベント",sa1b2c3d4e5f60005:"EnterまたはSpaceキーで詳細を開く",sa1b2c3d4e5f60006:"から",sa1b2c3d4e5f60007:"日表示に切り替え",sa1b2c3d4e5f60008:"前の日を表示",sa1b2c3d4e5f60009:"次の日を表示",sa1b2c3d4e5f60010:"もっと",sa1b2c3d4e5f60011:"カレンダー表示",sa1b2c3d4e5f60012:"表示"},ko:{s005053d82b712e0a:"메모",s090f2107b5a69a7f:"주",s15ba5784a11e0b88:"이번 달",s22380c7fc798a44f:"내용 없음",s2bc4d1196bce49dc:"ICS로 내보내기",s3c44e22d1af5693e:"년",s48e186fb300e5464:"시간",s58ab939b42a026a6:"종일",s5e8250fb85d64c23:"닫기",s63d040e37887f17e:"오늘",s680f01021b5e339d:"주",s98b32ef4a0856c08:"제목 없음",s99f110d27e30b289:"제목",sa0fd990c985f24bd:"일정 상세",sac8252732f2edb19:"날짜",sb47daaf9e1c4a905:"월",se0955919920ee87d:"일",sfce4bfbe0f911aa7:"시간 없음",sa1b2c3d4e5f60001:"이전",sa1b2c3d4e5f60002:"다음",sa1b2c3d4e5f60003:"일정",sa1b2c3d4e5f60004:"캘린더 이벤트",sa1b2c3d4e5f60005:"Enter 또는 Space를 눌러 세부 정보 열기",sa1b2c3d4e5f60006:"부터",sa1b2c3d4e5f60007:"일 보기로 전환",sa1b2c3d4e5f60008:"이전 날 표시",sa1b2c3d4e5f60009:"다음 날 표시",sa1b2c3d4e5f60010:"더보기",sa1b2c3d4e5f60011:"캘린더 보기",sa1b2c3d4e5f60012:"보기"},nl:{s005053d82b712e0a:"Notities",s090f2107b5a69a7f:"W",s15ba5784a11e0b88:"Huidige maand",s22380c7fc798a44f:"Geen inhoud",s2bc4d1196bce49dc:"Exporteren als ICS",s3c44e22d1af5693e:"Jaar",s48e186fb300e5464:"Tijd",s58ab939b42a026a6:"Hele dag",s5e8250fb85d64c23:"Sluiten",s63d040e37887f17e:"Vandaag",s680f01021b5e339d:"Week",s98b32ef4a0856c08:"Geen titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Details evenement",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Maand",se0955919920ee87d:"Dag",sfce4bfbe0f911aa7:"Geen tijd",sa1b2c3d4e5f60001:"Vorige",sa1b2c3d4e5f60002:"Volgende",sa1b2c3d4e5f60003:"evenementen",sa1b2c3d4e5f60004:"Agendagebeurtenis",sa1b2c3d4e5f60005:"Druk op Enter of Spatie om details te openen",sa1b2c3d4e5f60006:"tot",sa1b2c3d4e5f60007:"Naar dagweergave voor",sa1b2c3d4e5f60008:"Eerdere dagen tonen",sa1b2c3d4e5f60009:"Latere dagen tonen",sa1b2c3d4e5f60010:"meer",sa1b2c3d4e5f60011:"Agendaweergave",sa1b2c3d4e5f60012:"weergave"},pl:{s005053d82b712e0a:"Notatki",s090f2107b5a69a7f:"T",s15ba5784a11e0b88:"Bieżący miesiąc",s22380c7fc798a44f:"Brak treści",s2bc4d1196bce49dc:"Eksportuj jako ICS",s3c44e22d1af5693e:"Rok",s48e186fb300e5464:"Czas",s58ab939b42a026a6:"Cały dzień",s5e8250fb85d64c23:"Zamknij",s63d040e37887f17e:"Dziś",s680f01021b5e339d:"Tydzień",s98b32ef4a0856c08:"Brak tytułu",s99f110d27e30b289:"Tytuł",sa0fd990c985f24bd:"Szczegóły wydarzenia",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Miesiąc",se0955919920ee87d:"Dzień",sfce4bfbe0f911aa7:"Brak czasu",sa1b2c3d4e5f60001:"Poprzedni",sa1b2c3d4e5f60002:"Następny",sa1b2c3d4e5f60003:"wydarzeń",sa1b2c3d4e5f60004:"Wydarzenie kalendarza",sa1b2c3d4e5f60005:"Naciśnij Enter lub Spację, aby otworzyć szczegóły",sa1b2c3d4e5f60006:"do",sa1b2c3d4e5f60007:"Przełącz na widok dnia dla",sa1b2c3d4e5f60008:"Pokaż wcześniejsze dni",sa1b2c3d4e5f60009:"Pokaż późniejsze dni",sa1b2c3d4e5f60010:"więcej",sa1b2c3d4e5f60011:"Widok kalendarza",sa1b2c3d4e5f60012:"widok"},pt:{s005053d82b712e0a:"Notas",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mês atual",s22380c7fc798a44f:"Sem conteúdo",s2bc4d1196bce49dc:"Exportar como ICS",s3c44e22d1af5693e:"Ano",s48e186fb300e5464:"Hora",s58ab939b42a026a6:"O dia todo",s5e8250fb85d64c23:"Fechar",s63d040e37887f17e:"Hoje",s680f01021b5e339d:"Semana",s98b32ef4a0856c08:"Sem título",s99f110d27e30b289:"Título",sa0fd990c985f24bd:"Detalhes do evento",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Mês",se0955919920ee87d:"Dia",sfce4bfbe0f911aa7:"Sem horário",sa1b2c3d4e5f60001:"Anterior",sa1b2c3d4e5f60002:"Próximo",sa1b2c3d4e5f60003:"eventos",sa1b2c3d4e5f60004:"Evento do calendário",sa1b2c3d4e5f60005:"Pressione Enter ou Espaço para abrir detalhes",sa1b2c3d4e5f60006:"até",sa1b2c3d4e5f60007:"Mudar para visualização diária de",sa1b2c3d4e5f60008:"Mostrar dias anteriores",sa1b2c3d4e5f60009:"Mostrar dias posteriores",sa1b2c3d4e5f60010:"mais",sa1b2c3d4e5f60011:"Visualização do calendário",sa1b2c3d4e5f60012:"visualização"},ru:{s005053d82b712e0a:"Заметки",s090f2107b5a69a7f:"Н",s15ba5784a11e0b88:"Текущий месяц",s22380c7fc798a44f:"Нет содержимого",s2bc4d1196bce49dc:"Экспорт в ICS",s3c44e22d1af5693e:"Год",s48e186fb300e5464:"Время",s58ab939b42a026a6:"Весь день",s5e8250fb85d64c23:"Закрыть",s63d040e37887f17e:"Сегодня",s680f01021b5e339d:"Неделя",s98b32ef4a0856c08:"Без названия",s99f110d27e30b289:"Название",sa0fd990c985f24bd:"Детали события",sac8252732f2edb19:"Дата",sb47daaf9e1c4a905:"Месяц",se0955919920ee87d:"День",sfce4bfbe0f911aa7:"Нет времени",sa1b2c3d4e5f60001:"Назад",sa1b2c3d4e5f60002:"Вперёд",sa1b2c3d4e5f60003:"событий",sa1b2c3d4e5f60004:"Событие календаря",sa1b2c3d4e5f60005:"Нажмите Enter или Пробел для открытия деталей",sa1b2c3d4e5f60006:"до",sa1b2c3d4e5f60007:"Переключиться на дневной вид для",sa1b2c3d4e5f60008:"Показать предыдущие дни",sa1b2c3d4e5f60009:"Показать следующие дни",sa1b2c3d4e5f60010:"ещё",sa1b2c3d4e5f60011:"Вид календаря",sa1b2c3d4e5f60012:"вид"},th:{s005053d82b712e0a:"บันทึก",s090f2107b5a69a7f:"ส",s15ba5784a11e0b88:"เดือนปัจจุบัน",s22380c7fc798a44f:"ไม่มีเนื้อหา",s2bc4d1196bce49dc:"ส่งออกเป็น ICS",s3c44e22d1af5693e:"ปี",s48e186fb300e5464:"เวลา",s58ab939b42a026a6:"ทั้งวัน",s5e8250fb85d64c23:"ปิด",s63d040e37887f17e:"วันนี้",s680f01021b5e339d:"สัปดาห์",s98b32ef4a0856c08:"ไม่มีชื่อ",s99f110d27e30b289:"ชื่อ",sa0fd990c985f24bd:"รายละเอียดกิจกรรม",sac8252732f2edb19:"วันที่",sb47daaf9e1c4a905:"เดือน",se0955919920ee87d:"วัน",sfce4bfbe0f911aa7:"ไม่มีเวลา",sa1b2c3d4e5f60001:"ก่อนหน้า",sa1b2c3d4e5f60002:"ถัดไป",sa1b2c3d4e5f60003:"กิจกรรม",sa1b2c3d4e5f60004:"กิจกรรมปฏิทิน",sa1b2c3d4e5f60005:"กด Enter หรือ Space เพื่อเปิดรายละเอียด",sa1b2c3d4e5f60006:"ถึง",sa1b2c3d4e5f60007:"สลับไปมุมมองรายวันสำหรับ",sa1b2c3d4e5f60008:"แสดงวันก่อนหน้า",sa1b2c3d4e5f60009:"แสดงวันถัดไป",sa1b2c3d4e5f60010:"เพิ่มเติม",sa1b2c3d4e5f60011:"มุมมองปฏิทิน",sa1b2c3d4e5f60012:"มุมมอง"},tr:{s005053d82b712e0a:"Notlar",s090f2107b5a69a7f:"H",s15ba5784a11e0b88:"Bu Ay",s22380c7fc798a44f:"İçerik Yok",s2bc4d1196bce49dc:"ICS Olarak Dışa Aktar",s3c44e22d1af5693e:"Yıl",s48e186fb300e5464:"Zaman",s58ab939b42a026a6:"Tüm Gün",s5e8250fb85d64c23:"Kapat",s63d040e37887f17e:"Bugün",s680f01021b5e339d:"Hafta",s98b32ef4a0856c08:"Başlıksız",s99f110d27e30b289:"Başlık",sa0fd990c985f24bd:"Etkinlik Detayları",sac8252732f2edb19:"Tarih",sb47daaf9e1c4a905:"Ay",se0955919920ee87d:"Gün",sfce4bfbe0f911aa7:"Zaman Yok",sa1b2c3d4e5f60001:"Önceki",sa1b2c3d4e5f60002:"Sonraki",sa1b2c3d4e5f60003:"etkinlik",sa1b2c3d4e5f60004:"Takvim etkinliği",sa1b2c3d4e5f60005:"Ayrıntıları açmak için Enter veya Boşluk tuşuna basın",sa1b2c3d4e5f60006:"ile",sa1b2c3d4e5f60007:"Gün görünümüne geç",sa1b2c3d4e5f60008:"Önceki günleri göster",sa1b2c3d4e5f60009:"Sonraki günleri göster",sa1b2c3d4e5f60010:"daha fazla",sa1b2c3d4e5f60011:"Takvim görünümü",sa1b2c3d4e5f60012:"görünüm"},uk:{s005053d82b712e0a:"Нотатки",s090f2107b5a69a7f:"Т",s15ba5784a11e0b88:"Поточний місяць",s22380c7fc798a44f:"Без вмісту",s2bc4d1196bce49dc:"Експорт в ICS",s3c44e22d1af5693e:"Рік",s48e186fb300e5464:"Час",s58ab939b42a026a6:"Увесь день",s5e8250fb85d64c23:"Закрити",s63d040e37887f17e:"Сьогодні",s680f01021b5e339d:"Тиждень",s98b32ef4a0856c08:"Без назви",s99f110d27e30b289:"Назва",sa0fd990c985f24bd:"Деталі події",sac8252732f2edb19:"Дата",sb47daaf9e1c4a905:"Місяць",se0955919920ee87d:"День",sfce4bfbe0f911aa7:"Без часу",sa1b2c3d4e5f60001:"Попередній",sa1b2c3d4e5f60002:"Наступний",sa1b2c3d4e5f60003:"подій",sa1b2c3d4e5f60004:"Подія календаря",sa1b2c3d4e5f60005:"Натисніть Enter або Пробіл для відкриття деталей",sa1b2c3d4e5f60006:"до",sa1b2c3d4e5f60007:"Перейти до денного перегляду для",sa1b2c3d4e5f60008:"Показати попередні дні",sa1b2c3d4e5f60009:"Показати наступні дні",sa1b2c3d4e5f60010:"ще",sa1b2c3d4e5f60011:"Перегляд календаря",sa1b2c3d4e5f60012:"перегляд"},vi:{s005053d82b712e0a:"Ghi chú",s090f2107b5a69a7f:"T",s15ba5784a11e0b88:"Tháng hiện tại",s22380c7fc798a44f:"Không có nội dung",s2bc4d1196bce49dc:"Xuất dưới dạng ICS",s3c44e22d1af5693e:"Năm",s48e186fb300e5464:"Thời gian",s58ab939b42a026a6:"Cả ngày",s5e8250fb85d64c23:"Đóng",s63d040e37887f17e:"Hôm nay",s680f01021b5e339d:"Tuần",s98b32ef4a0856c08:"Không có tiêu đề",s99f110d27e30b289:"Tiêu đề",sa0fd990c985f24bd:"Chi tiết sự kiện",sac8252732f2edb19:"Ngày",sb47daaf9e1c4a905:"Tháng",se0955919920ee87d:"Ngày",sfce4bfbe0f911aa7:"Không có thời gian",sa1b2c3d4e5f60001:"Trước",sa1b2c3d4e5f60002:"Sau",sa1b2c3d4e5f60003:"sự kiện",sa1b2c3d4e5f60004:"Sự kiện lịch",sa1b2c3d4e5f60005:"Nhấn Enter hoặc Space để mở chi tiết",sa1b2c3d4e5f60006:"đến",sa1b2c3d4e5f60007:"Chuyển sang xem theo ngày cho",sa1b2c3d4e5f60008:"Hiển thị ngày trước đó",sa1b2c3d4e5f60009:"Hiển thị ngày tiếp theo",sa1b2c3d4e5f60010:"thêm",sa1b2c3d4e5f60011:"Xem lịch",sa1b2c3d4e5f60012:"xem"},"zh-Hans":{s005053d82b712e0a:"备注",s090f2107b5a69a7f:"周",s15ba5784a11e0b88:"本月",s22380c7fc798a44f:"无内容",s2bc4d1196bce49dc:"导出为 ICS",s3c44e22d1af5693e:"年",s48e186fb300e5464:"时间",s58ab939b42a026a6:"全天",s5e8250fb85d64c23:"关闭",s63d040e37887f17e:"今天",s680f01021b5e339d:"周",s98b32ef4a0856c08:"无标题",s99f110d27e30b289:"标题",sa0fd990c985f24bd:"事件详情",sac8252732f2edb19:"日期",sb47daaf9e1c4a905:"月",se0955919920ee87d:"日",sfce4bfbe0f911aa7:"无时间",sa1b2c3d4e5f60001:"上一个",sa1b2c3d4e5f60002:"下一个",sa1b2c3d4e5f60003:"事件",sa1b2c3d4e5f60004:"日历事件",sa1b2c3d4e5f60005:"按 Enter 或空格键打开详情",sa1b2c3d4e5f60006:"至",sa1b2c3d4e5f60007:"切换到日视图",sa1b2c3d4e5f60008:"显示更早的日期",sa1b2c3d4e5f60009:"显示更晚的日期",sa1b2c3d4e5f60010:"更多",sa1b2c3d4e5f60011:"日历视图",sa1b2c3d4e5f60012:"视图"}},_e=[["day","se0955919920ee87d","Day"],["week","s680f01021b5e339d","Week"],["month","sb47daaf9e1c4a905","Month"],["currentMonth","s15ba5784a11e0b88","Current Month"],["allDay","s58ab939b42a026a6","All Day"],["today","s63d040e37887f17e","Today"],["noTitle","s98b32ef4a0856c08","No Title"],["noContent","s22380c7fc798a44f","No Content"],["noTime","sfce4bfbe0f911aa7","No Time"],["eventDetails","sa0fd990c985f24bd","Event Details"],["exportAsICS","s2bc4d1196bce49dc","Export as ICS"],["title","s99f110d27e30b289","Title"],["time","s48e186fb300e5464","Time"],["date","sac8252732f2edb19","Date"],["notes","s005053d82b712e0a","Notes"],["close","s5e8250fb85d64c23","Close"],["calendarWeek","s090f2107b5a69a7f","CW"],["year","s3c44e22d1af5693e","Year"],["previous","sa1b2c3d4e5f60001","Previous"],["next","sa1b2c3d4e5f60002","Next"],["events","sa1b2c3d4e5f60003","events"],["calendarEvent","sa1b2c3d4e5f60004","Calendar event"],["pressToOpen","sa1b2c3d4e5f60005","Press Enter or Space to open details"],["to","sa1b2c3d4e5f60006","to"],["switchToDayView","sa1b2c3d4e5f60007","Switch to day view for"],["showEarlierDays","sa1b2c3d4e5f60008","Show earlier days"],["showLaterDays","sa1b2c3d4e5f60009","Show later days"],["more","sa1b2c3d4e5f60010","more"],["calendarView","sa1b2c3d4e5f60011","Calendar view"],["viewLabel","sa1b2c3d4e5f60012","view"]],Te=/* @__PURE__ */new Map;function Me(e){let t=Te.get(e);if(t)return t;const a=function(e){if("en"!==e)return Se[e]??Se[e.split("-")[0]]}(e),r={};for(const[n,i,o]of _e)r[n]=a?.[i]??o;return t=Object.freeze(r),Te.set(e,t),t}var Ce=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Ae=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?Oe(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&Ce(t,a,i),i};let Ie=class extends t{constructor(){super(),this.heading="",this.isContinuation=!1,this.density="standard",this.displayMode="default",this.floatText=!1,this.locale="en",this._sumReducer=(e,t)=>e+t,this.addEventListener("click",this._handleInteraction),this.addEventListener("keydown",this._handleInteraction),this.addEventListener("focus",this._handleFocus)}_renderTitle(){return ee(this.content).with(J.nullish,()=>this.heading).otherwise(()=>`${this.heading}: ${this.content}`)}_renderTime(){const e=Me(this.locale);if("month-dot"===this.displayMode){if(this.isContinuation)return a`<span class="time">${e.allDay}</span>`;if(!this.time)return r;const t=ue(this.time.start.hour,this.time.start.minute,this.locale);return t?a`<span class="time">${t}</span>`:r}if("compact"===this.density)return r;if(this.isContinuation)return a`<span class="time">${e.allDay}</span>`;if(!this.time)return r;const{start:t,end:n}=this.time;if(24===n.hour&&(t.hour+t.minute+n.hour+n.minute)%24==0)return a`<span class="time">${e.allDay}</span>`;const i=ue(t.hour,t.minute,this.locale);return i?a`<span class="time">${i}</span>`:r}_renderContent(){return"full"===this.density&&this.content?a`<span class="content">${this.content}</span>`:r}_getAriaLabel(){const e=Me(this.locale),t=this.time?`${ue(this.time.start.hour,this.time.start.minute,this.locale)} ${e.to} ${ue(this.time.end.hour,this.time.end.minute,this.locale)}`:e.allDay,a=this.content?`, ${this.content}`:"";return`${e.calendarEvent}: ${this.heading}${a}, ${t}. ${e.pressToOpen}`}updated(){this.floatText||(this.tabIndex=this.accessibility?.tabIndex??0,this.setAttribute("role","button"),this.setAttribute("aria-label",this.accessibility?.ariaLabel??this._getAriaLabel()),this.setAttribute("aria-selected",this._highlighted?"true":"false"))}render(){const e=`main ${this.density}`;if("month-dot"===this.displayMode){const t=this.isContinuation;return a`
159
230
  <div
160
231
  class=${e}
161
232
  title=${this._renderTitle()}
162
233
  data-full-content=${this.content||""}
163
- ?data-extended=${this._extended}
164
234
  ?data-is-multi-day=${t}
165
235
  >
166
- ${t?"":i`
236
+ ${t?"":a`
167
237
  <span class="color-dot"></span>
168
238
  `}
169
239
  <span class="title">${this.heading}</span>
170
240
  ${this._renderTime()}
171
241
  </div>
172
- `}return this.floatText?i`
242
+ `}return this.floatText?a`
173
243
  <div
174
244
  class=${e}
175
245
  style="background-color: var(--entry-background-color); height: 100%; position: relative; overflow: visible;"
@@ -179,18 +249,17 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
179
249
  ${this._renderTime()}
180
250
  </div>
181
251
  </div>
182
- `:i`
252
+ `:a`
183
253
  <div
184
254
  class=${e}
185
255
  title=${this._renderTitle()}
186
256
  data-full-content=${this.content||""}
187
- ?data-extended=${this._extended}
188
257
  >
189
258
  <span class="title">${this.heading}</span>
190
- ${this._shouldShowTime()?this._renderTime():o}
259
+ ${this._renderTime()}
191
260
  ${this._renderContent()}
192
261
  </div>
193
- `}_displayInterval(e){if(!e)return o;const t=[e.start.hour,e.start.minute,e.end.hour,e.end.minute];return 24===t[2]&&t.reduce(this._sumReducer,0)%24==0?Re(this.locale).allDay:function(e,t,a,n,r="en"){return`${ge(e,t,r)} – ${ge(a,n,r)}`}(e.start.hour,e.start.minute,e.end.hour,e.end.minute,this.locale)}clearSelection(){this._highlighted=!1}_handleFocus(e){const t=new CustomEvent("clear-other-selections",{detail:{exceptEntry:this},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleInteraction(e){if(!(e instanceof KeyboardEvent&&"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),this._highlighted))){if(this._highlighted=!0,!this.date)return;const e=Re(this.locale),t={heading:this.heading||e.noTitle,content:this.content||e.noContent,time:this.time,displayTime:this.time?this._displayInterval(this.time):e.noTime,date:this.date?.start,anchorRect:this.getBoundingClientRect()},a=new CustomEvent("open-menu",{detail:t,bubbles:!0,composed:!0});this.dispatchEvent(a);const n=()=>{this._highlighted=!1,this.removeEventListener("menu-close",n)};this.addEventListener("menu-close",n)}}};Ye.styles=n`
262
+ `}_displayInterval(e){if(!e)return r;const t=[e.start.hour,e.start.minute,e.end.hour,e.end.minute];return 24===t[2]&&t.reduce(this._sumReducer,0)%24==0?Me(this.locale).allDay:function(e,t,a,r,n="en"){return`${ue(e,t,n)} – ${ue(a,r,n)}`}(e.start.hour,e.start.minute,e.end.hour,e.end.minute,this.locale)}clearSelection(){this._highlighted=!1}_handleFocus(e){const t=new CustomEvent("clear-other-selections",{detail:{exceptEntry:this},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleInteraction(e){if(!(e instanceof KeyboardEvent&&"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),this._highlighted))){if(this._highlighted=!0,!this.date)return;const e=Me(this.locale),t={heading:this.heading||e.noTitle,content:this.content||e.noContent,time:this.time,displayTime:this.time?this._displayInterval(this.time):e.noTime,date:this.date?.start,anchorRect:this.getBoundingClientRect()},a=new CustomEvent("open-menu",{detail:t,bubbles:!0,composed:!0});this.dispatchEvent(a);const r=()=>{this._highlighted=!1,this.removeEventListener("menu-close",r)};this.addEventListener("menu-close",r)}}};Ie.styles=e`
194
263
  :host {
195
264
  /* Use shared design tokens from root component */
196
265
  font-size: var(--entry-font-size);
@@ -209,6 +278,9 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
209
278
  background-color: var(--entry-background-color);
210
279
  color: var(--entry-color);
211
280
  border: var(--entry-border, none);
281
+ /* When a handle is present, remove the left border so the
282
+ ::before handle covers the full left edge without bleed */
283
+ border-left: var(--entry-border-left, var(--entry-border, none));
212
284
  /* z-index of separators in day view is 0 */
213
285
  z-index: var(--entry-z-index, 1);
214
286
  opacity: var(--entry-opacity, 1);
@@ -219,7 +291,8 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
219
291
  position: relative;
220
292
  }
221
293
 
222
- /* Color handle indicator on the left - only for day/week views */
294
+ /* Color handle indicator on the left absolutely positioned
295
+ so it doesn't affect content width or title visibility */
223
296
  :host::before {
224
297
  content: '';
225
298
  position: absolute;
@@ -228,7 +301,8 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
228
301
  bottom: 0;
229
302
  width: var(--entry-handle-width, 0px);
230
303
  background-color: var(--entry-handle-color, transparent);
231
- border-radius: var(--entry-border-radius) 0 0 var(--entry-border-radius);
304
+ /* No border-radius — host's overflow:hidden clips to rounded corners */
305
+ border-radius: 0;
232
306
  display: var(--entry-handle-display, none);
233
307
  }
234
308
 
@@ -256,10 +330,6 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
256
330
  z-index: 999 !important;
257
331
  }
258
332
 
259
- :host([data-extended]) {
260
- background: var(--entry-extended-background-color, var(--background-color));
261
- }
262
-
263
333
  .main {
264
334
  padding: var(--entry-padding);
265
335
  padding-top: calc(var(--entry-padding-top, 0) + 0.15em);
@@ -315,7 +385,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
315
385
  /* Standard mode: title + time in various layouts */
316
386
  .main.standard {
317
387
  flex-direction: var(--entry-layout, row);
318
- align-items: flex-start;
388
+ align-items: baseline;
319
389
  gap: 0.25em;
320
390
  }
321
391
 
@@ -346,7 +416,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
346
416
 
347
417
  /* Row layout: optimized for side-by-side content */
348
418
  .main[style*='--entry-layout: row'] {
349
- align-items: center; /* Center align for single-line layout */
419
+ align-items: baseline; /* Baseline-align title and time text */
350
420
  gap: 0.5em; /* Gap between title and time */
351
421
  flex-wrap: nowrap; /* Prevent wrapping */
352
422
  min-height: 1.4em; /* Ensure consistent height */
@@ -484,7 +554,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
484
554
  white-space: normal;
485
555
  word-wrap: break-word;
486
556
  }
487
- `,Le([s({attribute:!1})],Ye.prototype,"time",2),Le([s()],Ye.prototype,"heading",2),Le([s()],Ye.prototype,"content",2),Le([s({type:Boolean})],Ye.prototype,"isContinuation",2),Le([s({type:Object})],Ye.prototype,"date",2),Le([s({type:String,reflect:!0,attribute:"data-density"})],Ye.prototype,"density",2),Le([s({type:String,reflect:!0,attribute:"data-display-mode"})],Ye.prototype,"displayMode",2),Le([s({type:Boolean,reflect:!0,attribute:"data-float-text"})],Ye.prototype,"floatText",2),Le([s({type:Object,attribute:!1})],Ye.prototype,"accessibility",2),Le([s({type:String})],Ye.prototype,"locale",2),Le([l()],Ye.prototype,"_highlighted",2),Le([l()],Ye.prototype,"_extended",2),Ye=Le([d("lms-calendar-entry")],Ye);var je=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Pe=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?We(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&je(t,a,i),i};let Fe=class extends r{constructor(){super(...arguments),this.viewMode="month",this.locale="en"}_getWeekInfo(e){const t=u.fromObject({year:e.year,month:e.month,day:e.day});return{weekNumber:t.weekNumber,weekYear:t.weekYear}}render(){const e=this.activeDate,t=Re(this.locale);return i`<div class="controls">
557
+ `,Ae([n({attribute:!1})],Ie.prototype,"time",2),Ae([n()],Ie.prototype,"heading",2),Ae([n()],Ie.prototype,"content",2),Ae([n({type:Boolean})],Ie.prototype,"isContinuation",2),Ae([n({type:Object})],Ie.prototype,"date",2),Ae([n({type:String,reflect:!0,attribute:"data-density"})],Ie.prototype,"density",2),Ae([n({type:String,reflect:!0,attribute:"data-display-mode"})],Ie.prototype,"displayMode",2),Ae([n({type:Boolean,reflect:!0,attribute:"data-float-text"})],Ie.prototype,"floatText",2),Ae([n({type:Object,attribute:!1})],Ie.prototype,"accessibility",2),Ae([n({type:String})],Ie.prototype,"locale",2),Ae([o()],Ie.prototype,"_highlighted",2),Ie=Ae([i("lms-calendar-entry")],Ie);var Re=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,ze=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?Ne(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&Re(t,a,i),i};let Le=class extends t{constructor(){super(...arguments),this.viewMode="month",this.locale="en"}_getWeekInfo(e){const t=d.fromObject({year:e.year,month:e.month,day:e.day});return{weekNumber:t.weekNumber,weekYear:t.weekYear}}render(){const e=this.activeDate,t=Me(this.locale);return a`<div class="controls">
488
558
  <div class="info">
489
559
  <span>
490
560
  <strong>${this.heading||t.currentMonth}</strong>
@@ -492,25 +562,25 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
492
562
  <div class="view-detail${"day"===this.viewMode?" active":""}">
493
563
  <span class="day">${e.day}</span>
494
564
  <span class="month"
495
- >${ye(e.month,this.locale)}</span
565
+ >${de(e.month,this.locale)}</span
496
566
  >
497
567
  <span class="year">${e.year}</span>
498
568
  </div>
499
569
  <div class="view-detail${"week"===this.viewMode?" active":""}">
500
- <span class="week"
501
- >${t.calendarWeek}
502
- ${this._getWeekInfo(e).weekNumber}</span
503
- >
504
- <span class="month"
505
- >${ye(e.month,this.locale)}</span
506
- >
507
- <span class="year"
508
- >${this._getWeekInfo(e).weekYear}</span
509
- >
570
+ ${(()=>{const{weekNumber:r,weekYear:n}=this._getWeekInfo(e);return a`
571
+ <span class="week"
572
+ >${t.calendarWeek}
573
+ ${r}</span
574
+ >
575
+ <span class="month"
576
+ >${de(e.month,this.locale)}</span
577
+ >
578
+ <span class="year">${n}</span>
579
+ `})()}
510
580
  </div>
511
581
  <div class="view-detail${"month"===this.viewMode?" active":""}">
512
582
  <span class="month"
513
- >${ye(e.month,this.locale)}</span
583
+ >${de(e.month,this.locale)}</span
514
584
  >
515
585
  <span class="year">${e.year}</span>
516
586
  </div>
@@ -564,7 +634,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
564
634
  ${t.today}
565
635
  </button>
566
636
  </div>
567
- </div>`}_handleTodayClick(e){e.stopPropagation();const t=/* @__PURE__ */new Date,a={day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()},n=new CustomEvent("jumptoday",{detail:{date:a},bubbles:!0,composed:!0});this.dispatchEvent(n)}_dispatchSwitchDate(e){const t=e.target;if(!(t instanceof HTMLButtonElement))return;const a=e.target===e.currentTarget?"container":t.name,n=new CustomEvent("switchdate",{detail:{direction:a},bubbles:!0,composed:!0});this.dispatchEvent(n)}_dispatchSwitchView(e){const t=e.target;if(!(t instanceof HTMLElement))return;const a=e.target===e.currentTarget?"container":t.dataset.context,n=new CustomEvent("switchview",{detail:{view:a},bubbles:!0,composed:!0});this.dispatchEvent(n)}};Fe.styles=n`
637
+ </div>`}_handleTodayClick(e){e.stopPropagation();const t=/* @__PURE__ */new Date,a={day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()},r=new CustomEvent("jumptoday",{detail:{date:a},bubbles:!0,composed:!0});this.dispatchEvent(r)}_dispatchSwitchDate(e){const t=e.target;if(!(t instanceof HTMLButtonElement))return;const a=e.target===e.currentTarget?"container":t.name,r=new CustomEvent("switchdate",{detail:{direction:a},bubbles:!0,composed:!0});this.dispatchEvent(r)}_dispatchSwitchView(e){const t=e.target;if(!(t instanceof HTMLElement))return;const a=e.target===e.currentTarget?"container":t.dataset.context,r=new CustomEvent("switchview",{detail:{view:a},bubbles:!0,composed:!0});this.dispatchEvent(r)}};Le.styles=e`
568
638
  :host {
569
639
  display: block;
570
640
  container-type: inline-size;
@@ -581,9 +651,9 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
581
651
 
582
652
  .info {
583
653
  padding-left: var(--header-info-padding-left, 1em);
584
- text-align: right;
654
+ text-align: left;
585
655
  display: grid;
586
- justify-self: start;
656
+ justify-self: stretch;
587
657
  min-width: 0;
588
658
  overflow: hidden;
589
659
  }
@@ -687,7 +757,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
687
757
  background: var(--separator-light, rgba(0, 0, 0, 0.15));
688
758
  margin: 0 0.2em;
689
759
  }
690
- `,Pe([s({type:String})],Fe.prototype,"heading",2),Pe([s({type:Object})],Fe.prototype,"activeDate",2),Pe([s({type:String})],Fe.prototype,"viewMode",2),Pe([s({type:Object})],Fe.prototype,"expandedDate",2),Pe([s({type:String})],Fe.prototype,"locale",2),Fe=Pe([d("lms-calendar-header")],Fe);var Be=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e])),He={action:"ACTION",description:"DESCRIPTION",duration:"DURATION",repeat:"REPEAT",summary:"SUMMARY",trigger:"TRIGGER",attachments:"ATTACH",attendees:"ATTENDEE"};Be(He);Be({method:"METHOD",prodId:"PRODID",version:"VERSION",name:"X-WR-CALNAME"});var Ue={alarms:"ALARM",categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",location:"LOCATION",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",timeTransparent:"TRANSP",url:"URL",end:"DTEND",duration:"DURATION",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",priority:"PRIORITY",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT"};Be(Ue);Be({id:"TZID",lastModified:"LAST-MODIFIED",url:"TZURL"});Be({comment:"COMMENT",name:"TZNAME",offsetFrom:"TZOFFSETFROM",offsetTo:"TZOFFSETTO",recurrenceDate:"RDATE",recurrenceRule:"RRULE",start:"DTSTART"});Be({byDay:"BYDAY",byHour:"BYHOUR",byMinute:"BYMINUTE",byMonth:"BYMONTH",byMonthday:"BYMONTHDAY",bySecond:"BYSECOND",bySetPos:"BYSETPOS",byWeekNo:"BYWEEKNO",byYearday:"BYYEARDAY",count:"COUNT",frequency:"FREQ",interval:"INTERVAL",until:"UNTIL",workweekStart:"WKST"});Be({categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",location:"LOCATION",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",url:"URL",duration:"DURATION",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",priority:"PRIORITY",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT",completed:"COMPLETED",due:"DUE",percentComplete:"PERCENT-COMPLETE"});Be({categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",url:"URL",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT"});Be({stamp:"DTSTAMP",start:"DTSTART",uid:"UID",url:"URL",organizer:"ORGANIZER",attendees:"ATTENDEE",comment:"COMMENT",end:"DTEND",freeBusy:"FREEBUSY"});var Ve=/\r\n/,Ke=e=>`${e}\r\n`,qe=(e,t,a)=>a?null==t?"":Ke(`${e};${a}:${t}`):Ke(`${e}:${t}`),Ge=e=>{if(!(e.length<1))return`${e.map(e=>`${e.key}=${e.value}`).join(";")}`},Ze=(e,t)=>t?`"MAILTO:${e}"`:`MAILTO:${e}`,Je=(e,t)=>{let a=Ge([e.dir&&{key:"DIR",value:`"${e.dir}"`},e.delegatedFrom&&{key:"DELEGATED-FROM",value:Ze(e.delegatedFrom,!0)},e.member&&{key:"MEMBER",value:Ze(e.member,!0)},e.role&&{key:"ROLE",value:e.role},e.name&&{key:"CN",value:e.name},e.partstat&&{key:"PARTSTAT",value:e.partstat},e.sentBy&&{key:"SENT-BY",value:Ze(e.sentBy,!0)},void 0!==e.rsvp&&(!0===e.rsvp||!1===e.rsvp)&&{key:"RSVP",value:!0===e.rsvp?"TRUE":"FALSE"}].filter(e=>!!e));return qe(t,Ze(e.email),a)},Xe=e=>{if(0===Object.values(e).filter(e=>"number"==typeof e).length)return;let t="";return e.before&&(t+="-"),t+="P",void 0!==e.weeks&&(t+=`${e.weeks}W`),void 0!==e.days&&(t+=`${e.days}D`),(void 0!==e.hours||void 0!==e.minutes||void 0!==e.seconds)&&(t+="T",void 0!==e.hours&&(t+=`${e.hours}H`),void 0!==e.minutes&&(t+=`${e.minutes}M`),void 0!==e.seconds&&(t+=`${e.seconds}S`)),t},Qe=36e5,et=/* @__PURE__ */Symbol.for("constructDateFrom");function tt(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&et in e?e[et](t):e instanceof Date?new e.constructor(t):new Date(t)}function at(e,t){return tt(t||e,e)}function nt(e,t,a){let n=at(e,null==a?void 0:a.in);return isNaN(t)?tt((null==a?void 0:a.in)||e,NaN):(t&&n.setDate(n.getDate()+t),n)}function rt(e,t,a){let n=at(e,void 0);if(isNaN(t))return tt(e,NaN);if(!t)return n;let r=n.getDate(),i=tt(e,n.getTime());return i.setMonth(n.getMonth()+t+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function it(e,t,a){return tt(e,+at(e)+t)}function ot(e,t,a){return it(e,t*Qe)}var st={};function dt(){return st}function lt(e,t){var a,n,r,i;let o=dt(),s=(null==t?void 0:t.weekStartsOn)??(null==(n=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:n.weekStartsOn)??o.weekStartsOn??(null==(i=null==(r=o.locale)?void 0:r.options)?void 0:i.weekStartsOn)??0,d=at(e,null==t?void 0:t.in),l=d.getDay(),c=(l<s?7:0)+l-s;return d.setDate(d.getDate()-c),d.setHours(0,0,0,0),d}function ct(e,t,a){let n=at(e,void 0);return n.setTime(n.getTime()+6e4*t),n}function ht(e,t,a){return it(e,1e3*t)}function ut(e,t,a){return nt(e,7*t,a)}function ft(e,t,a){return rt(e,12*t)}function yt(e,t){let a=+at(e)-+at(t);return a<0?-1:a>0?1:a}function pt(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function mt(e,t){let a=at(e,void 0),n=a.getMonth();return a.setFullYear(a.getFullYear(),n+1,0),a.setHours(23,59,59,999),a}function bt(e,t){let[a,n]=function(e,...t){let a=tt.bind(null,t.find(e=>"object"==typeof e));return t.map(a)}(0,t.start,t.end);return{start:a,end:n}}function gt(e,t){let a=at(e,void 0);return a.setDate(1),a.setHours(0,0,0,0),a}function vt(e,t){var a,n,r,i;let o=dt(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(n=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:n.firstWeekContainsDate)??o.firstWeekContainsDate??(null==(i=null==(r=o.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??1,d=function(e,t){var a,n,r,i;let o=at(e,null==t?void 0:t.in),s=o.getFullYear(),d=dt(),l=(null==t?void 0:t.firstWeekContainsDate)??(null==(n=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:n.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(i=null==(r=d.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??1,c=tt((null==t?void 0:t.in)||e,0);c.setFullYear(s+1,0,l),c.setHours(0,0,0,0);let h=lt(c,t),u=tt((null==t?void 0:t.in)||e,0);u.setFullYear(s,0,l),u.setHours(0,0,0,0);let f=lt(u,t);return+o>=+h?s+1:+o>=+f?s:s-1}(e,t),l=tt((null==t?void 0:t.in)||e,0);return l.setFullYear(d,0,s),l.setHours(0,0,0,0),lt(l,t)}function wt(e,t){return at(e,void 0).getDay()}function Dt(e,t){let a=at(e,void 0),n=a.getFullYear(),r=a.getMonth(),i=tt(a,0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function kt(e,t){return at(e,void 0).getMonth()}function xt(e,t,a){let n=at(e,null==a?void 0:a.in),r=function(e,t){let a=at(e,null==t?void 0:t.in),n=+lt(a,t)-+vt(a,t);return Math.round(n/6048e5)+1}(n,a)-t;return n.setDate(n.getDate()-7*r),at(n,null==a?void 0:a.in)}function $t(e,t,a){var n,r,i,o;let s=dt(),d=(null==a?void 0:a.weekStartsOn)??(null==(r=null==(n=null==a?void 0:a.locale)?void 0:n.options)?void 0:r.weekStartsOn)??s.weekStartsOn??(null==(o=null==(i=s.locale)?void 0:i.options)?void 0:o.weekStartsOn)??0,l=at(e,null==a?void 0:a.in),c=l.getDay(),h=7-d;return nt(l,t<0||t>6?t-(c+h)%7:((t%7+7)%7+h)%7-(c+h)%7,a)}function Et(e,t,a){let n=+at(e,void 0),[r,i]=[+at(t.start,void 0),+at(t.end,void 0)].sort((e,t)=>e-t);return n>=r&&n<=i}var St=["SU","MO","TU","WE","TH","FR","SA"],_t=(e,t)=>void 0!==t&&e>=t,Tt=(e,t,a,n)=>{let r=a.map(({day:e,occurrence:t})=>({occurrence:t,day:St.indexOf(e)}));return"YEARLY"===e.frequency?e.byYearday||e.byMonthday?t.map(e=>e.filter(e=>r.find(({day:t})=>t===wt(e)))):e.byWeekNo?t.map(e=>e.flatMap(e=>r.map(({day:t})=>$t(e,t,{weekStartsOn:n})))):e.byMonth?t.map(e=>e.flatMap(e=>r.flatMap(({day:t,occurrence:a})=>Mt(Ct(gt(e)),Ct(mt(e)),t,n,a)))):t.map(e=>e.flatMap(e=>r.flatMap(({day:t,occurrence:a})=>Mt(Ct(function(e){let t=at(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(e)),Ct(function(e){let t=at(e,void 0),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}(e)),t,n,a)))):"MONTHLY"===e.frequency?e.byMonthday?t.map(e=>e.filter(e=>r.find(({day:t})=>t===wt(e)))):t.map(e=>e.flatMap(e=>r.flatMap(({day:t,occurrence:a})=>Mt(Ct(gt(e)),Ct(mt(e)),t,n,a)))):"WEEKLY"===e.frequency?t.map(e=>e.flatMap(e=>r.map(({day:t})=>$t(e,t,{weekStartsOn:n})))):t.map(e=>e.filter(e=>r.find(({day:t})=>t===wt(e))))},Mt=(e,t,a,n,r)=>{if(void 0!==r){if(!(r<0)){let t=$t(e,a,{weekStartsOn:n});return ut(t,(r||1)-1+(e>t?1:0))}let i=$t(t,a,{weekStartsOn:n});return Ct(function(e){let t=at(e,void 0);return t.setHours(0,0,0,0),t}(function(e,t,a){return ut(e,-t,a)}(i,-(r||1)-1+(t<i?1:0))))}return function(e){let{start:t,end:a}=bt(0,e),n=+t>+a,r=n?+t:+a,i=n?a:t;i.setHours(0,0,0,0);let o=[];for(;+i<=r;)o.push(tt(t,i)),i.setDate(i.getDate()+1),i.setHours(0,0,0,0);return n?o.reverse():o}({start:e,end:t}).map(e=>Ct(e)).filter(a=>Et(a,{start:e,end:t})).filter(e=>a===wt(e))},Ct=e=>ct(e,-e.getTimezoneOffset()),At=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0);return a.setHours(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return at(e,void 0).getHours()}(e)))),Ot=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency||"HOURLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0);return a.setMinutes(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return at(e,void 0).getMinutes()}(e)))),It=(e,t,a)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0),n=a.getFullYear(),r=a.getDate(),i=tt(e,0);i.setFullYear(n,t,15),i.setHours(0,0,0,0);let o=Dt(i);return a.setMonth(t,Math.min(r,o)),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(kt(e)))),Rt=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency?t.map(e=>e.flatMap(e=>{let t=Dt(e);return a.map(a=>a>t?void 0:function(e,t){let a=at(e,void 0);return a.setDate(t),a}(e,a)).filter(e=>!!e)})):"WEEKLY"===e.frequency?t:t.map(e=>e.filter(e=>a.includes(kt(e)))),Nt=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency||"HOURLY"===e.frequency||"MINUTELY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0);return a.setSeconds(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return at(e).getSeconds()}(e)))),zt=(e,t,a)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0);return a.setMonth(0),a.setDate(t),a}(e,t)))):"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency?t:t.map(e=>e.filter(e=>a.includes(function(e){return at(e,void 0).getFullYear()}(e)))),Lt=(e,t,a)=>{let n=a;return e.byMonth&&(n=It(e,n,e.byMonth)),e.byWeekNo&&(n=((e,t,a,n)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>xt(e,t,{weekStartsOn:n})))):t)(e,n,e.byWeekNo,t.weekStartsOn)),e.byYearday&&(n=zt(e,n,e.byYearday)),e.byMonthday&&(n=Rt(e,n,e.byMonthday)),e.byDay&&(n=Tt(e,n,e.byDay,t.weekStartsOn)),e.byHour&&(n=At(e,n,e.byHour)),e.byMinute&&(n=Ot(e,n,e.byMinute)),e.bySecond&&(n=Nt(e,n,e.bySecond)),e.bySetPos&&(n=((e,t,a)=>e.byYearday||e.byWeekNo||e.byMonthday||e.byMonth||e.byDay||e.byHour||e.byMinute||e.bySecond?t.map(e=>e.sort(yt).filter((t,n)=>a.some(t=>t>0?0!==n&&n%t===0:0===n?e.length-1+t===0:n%(e.length-1+t)===0))):t)(e,n,e.bySetPos)),n.map(e=>e.sort(yt).filter(e=>!(t.exceptions.length>0&&t.exceptions.some(t=>function(e,t){return+at(e)==+at(t)}(t,e))||!Et(e,{start:t.start,end:t.end}))))},Yt=(e,t)=>{var a;let n=t.start,r=(null==(a=e.until)?void 0:a.date)||(null==t?void 0:t.end)||ft(n,2),i=t.exceptions||[],o=(e.workweekStart?St.indexOf(e.workweekStart):1)%7,s=[[n]];((e,{start:t,end:a},n)=>{if(_t(n.length,e.count))return;let r=e.frequency,i=e.interval||1;if(!r)return;let o=t;if("SECONDLY"!==r)if("MINUTELY"!==r)if("HOURLY"!==r)if("DAILY"!==r)if("WEEKLY"!==r)if("MONTHLY"!==r)if("YEARLY"!==r);else for(;o<a;)o=ft(o,i),n.push([o]);else for(;o<a;)o=rt(o,i),n.push([o]);else for(;o<a;){if(_t(n.length,e.count))return;o=ut(o,i),n.push([o])}else for(;o<a;){if(_t(n.length,e.count))return;o=nt(o,i),n.push([o])}else for(;o<a;){if(_t(n.length,e.count))return;o=ot(o,i),n.push([o])}else for(;o<a;){if(_t(n.length,e.count))return;o=ct(o,i),n.push([o])}else for(;o<a;){if(_t(n.length,e.count))return;o=ht(o,i),n.push([o])}})(e,{start:n,end:r},s);let d=Lt(e,{start:n,end:r,exceptions:i,weekStartsOn:o},s);return e.count?d.flat().splice(0,e.count):d.flat()},jt=e=>{let t="+"===e[0]?1:-1;return 1e3*(60*(60*Number(e.slice(1,3))+(e.length>3?Number(e.slice(3,5)):0))+(e.length>5?Number(e.slice(5,7)):0))*t},Wt=(e,t,a)=>{let n=null==a?void 0:a.find(e=>e.id===t);if(n){let t=((e,t)=>t.flatMap(t=>!t.recurrenceRule||t.recurrenceRule.until&&t.recurrenceRule.until.date<e?t:Yt(t.recurrenceRule,{start:t.start,end:e}).map(e=>({...t,start:e}))))(e,n.props).sort((e,t)=>yt(e.start,t.start));for(let n=0;n<t.length;n+=1)if(e<t[n].start){let e=t[n-1]?t[n-1].offsetTo:t[n].offsetFrom,a=e.length>5?e.substring(0,5):e;return{offset:a,milliseconds:jt(a)}}let a=t[t.length-1].offsetTo,r=a.length>5?a.substring(0,5):a;return{offset:r,milliseconds:jt(r)}}let r=((e,t)=>{let a="en-US",n=new Date(t.toLocaleString(a,{timeZone:"UTC"}));try{return new Date(t.toLocaleString(a,{timeZone:e})).getTime()-n.getTime()}catch{return t.getTime()-n.getTime()}})(t,e);if(!Number.isNaN(r)){let e=r<0,t=Math.abs(function(e){let t=e/Qe;return Math.trunc(t)}(r)),a=Math.abs(function(e){let t=e/6e4;return Math.trunc(t)}(r))-60*t;return{offset:`${e?"-":"+"}${1===t.toString().length?`0${t}`:t.toString()}${1===a.toString().length?`0${a}`:a.toString()}`,milliseconds:r}}},Pt=e=>{if(!pt(e))throw Error(`Incorrect date object: ${e}`);let t=e.toISOString();return`${t.slice(0,4)}${t.slice(5,7)}${t.slice(8,10)}`},Ft=e=>{if(!pt(e))throw Error(`Incorrect date object: ${e}`);return Bt(e)},Bt=(e,t)=>{let a=e.toISOString();return`${a.slice(0,4)}${a.slice(5,7)}${a.slice(8,10)}T${a.slice(11,13)}${a.slice(14,16)}${a.slice(17,19)}${t?"":"Z"}`},Ht=e=>Object.keys(e),Ut=e=>{let t="X-";for(let a of e)a===a.toUpperCase()&&(t+="-"),t+=a.toUpperCase();return t},Vt=(e,t)=>{let a=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i],s="\n"===o?2:1;r+s>t?(a.push(0===a.length?n:` ${n}`),n=o,r=s):(n+=o,r+=s)}return n&&a.push(0===a.length?n:` ${n}`),a},Kt=(e,t)=>{let a=Ht(e),n=t.childComponents,r=n?Ht(n):[],i=t.generateArrayValues,o=i?Ht(i):[],s="";return s+=(e=>Ke(`BEGIN:${e}`))(t.icsComponent),a.forEach(a=>{if(r.includes(a)||o.includes(a)||"nonStandard"===a)return;let n=t.icsKeyMap[a];if(!n)return;let i=e[a];if(null==i)return;let d=t.generateValues[a];s+=d?d({icsKey:n,value:i,key:a}):qe(n,String(i))}),n&&r&&r.length>0&&r.forEach(t=>{let a=e[t];!a||!Array.isArray(a)||0===a.length||a.forEach(e=>{let a=n[t];a&&(s+=a(e))})}),i&&o&&o.length>0&&o.forEach(a=>{let n=i[a];if(!n)return;let r=t.icsKeyMap[a];if(!r)return;let o=e[a];!o||!Array.isArray(o)||0===o.length||o.forEach(e=>{s+=n({icsKey:r,value:e})})}),e.nonStandard&&(s+=((e,t)=>{if(!e)return"";let a="";return Object.entries(e).forEach(([e,n])=>{let r=null==t?void 0:t[e];if(!r)return void(a+=qe(Ut(e),null==n?void 0:n.toString()));let i=r.generate(n);i&&(a+=qe(r.name,i.value,i.options?Ge(Object.entries(i.options).map(([e,t])=>({key:e,value:t}))):void 0))}),a})(e.nonStandard,null==t?void 0:t.nonStandard)),s+=(e=>Ke(`END:${e}`))(t.icsComponent),null!=t&&t.skipFormatLines?s:(e=>{let t=e.split(Ve),a=[];return t.forEach(e=>{(e=>{let t=(e.match(/\n/g)||[]).length;return e.length+t})(e)<75?a.push(e):Vt(e,75).forEach(e=>{a.push(e)})}),a.join("\r\n")})(s)},qt=(e,t)=>qe(e,Math.trunc(t).toString()),Gt=(e,t)=>Kt(e,{icsComponent:"VALARM",icsKeyMap:He,generateValues:{trigger:({value:e})=>(e=>{var t,a;let n=Ge([(null==(t=e.options)?void 0:t.related)&&{key:"RELATED",value:e.options.related}].filter(e=>!!e));return"absolute"===e.type?qe("TRIGGER",Ft(null==(a=e.value)?void 0:a.date)):"relative"===e.type?qe("TRIGGER",Xe(e.value),n):void 0})(e),duration:({icsKey:e,value:t})=>qe(e,Xe(t)),repeat:({icsKey:e,value:t})=>qt(e,t)},generateArrayValues:{attendees:({value:e})=>Je(e,"ATTENDEE"),attachments:({value:e})=>(e=>{if("uri"===e.type){let t=Ge([e.formatType&&{key:"FMTTYPE",value:e.formatType}].filter(e=>!!e));return qe("ATTACH",e.url,t)}if("binary"===e.type){let t=Ge([e.value&&{key:"VALUE",value:e.value},e.encoding&&{key:"ENCODING",value:e.encoding}].filter(e=>!!e));return qe("ATTACH",e.binary,t)}throw Error(`IcsAttachment has no type! ${JSON.stringify(e)}`)})(e)},nonStandard:null==t?void 0:t.nonStandard,skipFormatLines:null==t?void 0:t.skipFormatLines}),Zt=(e,t,a=[],n)=>{let r=Ge([t.type&&{key:"VALUE",value:t.type},t.local&&!(null!=n&&n.forceUtc)&&{key:"TZID",value:t.local.timezone},...a].filter(e=>!!e)),i="DATE"===t.type?Pt(t.date):!t.local||null!=n&&n.forceUtc?Ft(t.date):((e,t,a)=>{let n=t.date;if(!pt(n))throw Error(`Incorrect date object: ${n}`);return Wt(n,t.timezone,a)?Bt(n,!0):Ft(e)})(t.date,t.local,null==n?void 0:n.timezones);return qe(e,i,r)},Jt=(e,t,a)=>qe(e,(e=>e.replace(/([\\;,])|(\n)/g,(e,t)=>t?`\\${t}`:"\\n"))(t),a?Ge(a):void 0),Xt=(e,t)=>Kt(e,{icsComponent:"VEVENT",icsKeyMap:Ue,generateValues:{stamp:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0,forceUtc:!0}),start:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0}),end:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0}),created:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0}),lastModified:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0}),categories:({icsKey:e,value:t})=>qe(e,t.join(",")),description:({icsKey:t,value:a})=>Jt(t,a,e.descriptionAltRep?[{key:"ALTREP",value:`"${e.descriptionAltRep}"`}]:void 0),location:({icsKey:e,value:t})=>Jt(e,t),comment:({icsKey:e,value:t})=>Jt(e,t),summary:({icsKey:e,value:t})=>Jt(e,t),recurrenceRule:({value:e})=>(e=>{var t;let a="",n=Ge([e.frequency&&{key:"FREQ",value:e.frequency},e.byDay&&{key:"BYDAY",value:e.byDay.map(e=>(e=>e.occurrence?`${e.occurrence}${e.day}`:e.day)(e)).join(",")},e.byHour&&{key:"BYHOUR",value:e.byHour.join(",")},e.byMinute&&{key:"BYMINUTE",value:e.byMinute.join(",")},e.byMonth&&{key:"BYMONTH",value:e.byMonth.map(e=>e+1).join(",")},e.byMonthday&&{key:"BYMONTHDAY",value:e.byMonthday.join(",")},e.bySecond&&{key:"BYSECOND",value:e.bySecond.join(",")},e.bySetPos&&{key:"BYSETPOS",value:e.bySetPos.join(",")},e.byWeekNo&&{key:"BYWEEKNO",value:e.byWeekNo.join(",")},e.byYearday&&{key:"BYYEARDAY",value:e.byYearday.join(",")},e.count&&{key:"COUNT",value:e.count.toString()},e.interval&&{key:"INTERVAL",value:e.interval.toString()},e.until&&{key:"UNTIL",value:"DATE"===e.until.type?Pt(e.until.date):Ft((null==(t=e.until.local)?void 0:t.date)||e.until.date)},e.workweekStart&&{key:"WKST",value:e.workweekStart}].filter(e=>!!e));return a+=qe("RRULE",n),a})(e),duration:({icsKey:e,value:t})=>qe(e,Xe(t)),organizer:({value:e})=>(e=>{let t=Ge([e.dir&&{key:"DIR",value:`"${e.dir}"`},e.name&&{key:"CN",value:e.name},e.sentBy&&{key:"SENT-BY",value:Ze(e.sentBy)}].filter(e=>!!e));return qe("ORGANIZER",Ze(e.email),t)})(e),sequence:({icsKey:e,value:t})=>qt(e,t),recurrenceId:({value:e})=>((e,t)=>{let a="";return a+=Zt("RECURRENCE-ID",e.value,e.range?[{key:"RANGE",value:e.range}]:void 0,t),a})(e,{timezones:void 0})},generateArrayValues:{attendees:({value:e})=>Je(e,"ATTENDEE"),exceptionDates:({value:e})=>((e,t,a)=>Zt(t,e,void 0,a))(e,"EXDATE",{timezones:void 0})},childComponents:{alarms:e=>Gt(e,{nonStandard:void 0,skipFormatLines:!0})},nonStandard:void 0,skipFormatLines:void 0}),Qt=Object.defineProperty,ea=Object.getOwnPropertyDescriptor,ta=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?ea(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&Qt(t,a,i),i};let aa=class extends r{constructor(){super(...arguments),this.open=!1,this.eventDetails={heading:"",content:"",displayTime:""},this.locale="en",this._cardTop=0,this._cardLeft=0,this._positioned=!1,this._handleKeydown=e=>{if("Tab"!==e.key)return;const t=Array.from(this.renderRoot.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(0===t.length)return;const a=t[0],n=t[t.length-1],r=this.renderRoot;e.shiftKey?r.activeElement===a&&(e.preventDefault(),n.focus()):r.activeElement===n&&(e.preventDefault(),a.focus())},this._handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("menu-close",{bubbles:!0,composed:!0}))},this._handleExport=()=>{const{heading:e,content:t,time:a,date:n}=this.eventDetails,r=n?.year??2025,i=(n?.month??4)-1,o=n?.day??18;let s,d;a&&(s={date:new Date(r,i,o,a.start.hour,a.start.minute)},d={date:new Date(r,i,o,a.end.hour,a.end.minute)});const l={start:{date:s&&s.date||new Date(r,i,o,0,0)},end:{date:d&&d.date||new Date(r,i,o,23,59)},summary:e,description:t,status:"CONFIRMED",uid:`${Date.now()}@lms-calendar`,stamp:{date:/* @__PURE__ */new Date}},c=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//LMS Calendar//EN",Xt(l).trim(),"END:VCALENDAR"].join("\r\n"),h=new Blob([c],{type:"text/calendar"}),u=URL.createObjectURL(h),f=document.createElement("a");f.href=u,f.download=`${e||"event"}.ics`,document.body.appendChild(f),f.click(),setTimeout(()=>{document.body.removeChild(f),URL.revokeObjectURL(u)},0)}}updated(e){(e.has("open")||e.has("anchorRect"))&&this.open&&this.anchorRect&&(this._positioned=!1,this._computePosition(),requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".close-btn");e?.focus()}))}_computePosition(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".card"),t=this.parentElement;if(!e||!t||!this.anchorRect)return;const a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),r=this.anchorRect.top-a.top,i=this.anchorRect.left-a.left,o=i+this.anchorRect.width,s=r+this.anchorRect.height/2,d=n.width||260,l=n.height||200;let c;c=o+8+d<=a.width?o+8:i-8-d>=0?i-8-d:Math.max(8,(a.width-d)/2);let h=s-l/2;h=Math.max(8,Math.min(h,a.height-l-8)),this._cardTop=h,this._cardLeft=c,this._positioned=!0})}_formatDate(e){return function(e,t,a,n="en"){const r=ce(n),i=new Date(a,t-1,e);return new Intl.DateTimeFormat(r,{day:"numeric",month:"short",year:"numeric"}).format(i)}(e.day,e.month,e.year,this.locale)}render(){const e=Re(this.locale),t="card"+(this._positioned?" visible":""),a=this.eventDetails.content&&this.eventDetails.content!==e.noContent;return i`
760
+ `,ze([n({type:String})],Le.prototype,"heading",2),ze([n({type:Object})],Le.prototype,"activeDate",2),ze([n({type:String})],Le.prototype,"viewMode",2),ze([n({type:Object})],Le.prototype,"expandedDate",2),ze([n({type:String})],Le.prototype,"locale",2),Le=ze([i("lms-calendar-header")],Le);var Ye=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e])),We={action:"ACTION",description:"DESCRIPTION",duration:"DURATION",repeat:"REPEAT",summary:"SUMMARY",trigger:"TRIGGER",attachments:"ATTACH",attendees:"ATTENDEE"};Ye(We);Ye({method:"METHOD",prodId:"PRODID",version:"VERSION",name:"X-WR-CALNAME"});var je={alarms:"ALARM",categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",location:"LOCATION",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",timeTransparent:"TRANSP",url:"URL",end:"DTEND",duration:"DURATION",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",priority:"PRIORITY",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT"};Ye(je);Ye({id:"TZID",lastModified:"LAST-MODIFIED",url:"TZURL"});Ye({comment:"COMMENT",name:"TZNAME",offsetFrom:"TZOFFSETFROM",offsetTo:"TZOFFSETTO",recurrenceDate:"RDATE",recurrenceRule:"RRULE",start:"DTSTART"});Ye({byDay:"BYDAY",byHour:"BYHOUR",byMinute:"BYMINUTE",byMonth:"BYMONTH",byMonthday:"BYMONTHDAY",bySecond:"BYSECOND",bySetPos:"BYSETPOS",byWeekNo:"BYWEEKNO",byYearday:"BYYEARDAY",count:"COUNT",frequency:"FREQ",interval:"INTERVAL",until:"UNTIL",workweekStart:"WKST"});Ye({categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",location:"LOCATION",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",url:"URL",duration:"DURATION",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",priority:"PRIORITY",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT",completed:"COMPLETED",due:"DUE",percentComplete:"PERCENT-COMPLETE"});Ye({categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",url:"URL",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT"});Ye({stamp:"DTSTAMP",start:"DTSTART",uid:"UID",url:"URL",organizer:"ORGANIZER",attendees:"ATTENDEE",comment:"COMMENT",end:"DTEND",freeBusy:"FREEBUSY"});var Pe=/\r\n/,He=e=>`${e}\r\n`,Fe=(e,t,a)=>a?null==t?"":He(`${e};${a}:${t}`):He(`${e}:${t}`),Be=e=>{if(!(e.length<1))return`${e.map(e=>`${e.key}=${e.value}`).join(";")}`},Ue=(e,t)=>t?`"MAILTO:${e}"`:`MAILTO:${e}`,Ve=(e,t)=>{let a=Be([e.dir&&{key:"DIR",value:`"${e.dir}"`},e.delegatedFrom&&{key:"DELEGATED-FROM",value:Ue(e.delegatedFrom,!0)},e.member&&{key:"MEMBER",value:Ue(e.member,!0)},e.role&&{key:"ROLE",value:e.role},e.name&&{key:"CN",value:e.name},e.partstat&&{key:"PARTSTAT",value:e.partstat},e.sentBy&&{key:"SENT-BY",value:Ue(e.sentBy,!0)},void 0!==e.rsvp&&(!0===e.rsvp||!1===e.rsvp)&&{key:"RSVP",value:!0===e.rsvp?"TRUE":"FALSE"}].filter(e=>!!e));return Fe(t,Ue(e.email),a)},Ke=e=>{if(0===Object.values(e).filter(e=>"number"==typeof e).length)return;let t="";return e.before&&(t+="-"),t+="P",void 0!==e.weeks&&(t+=`${e.weeks}W`),void 0!==e.days&&(t+=`${e.days}D`),(void 0!==e.hours||void 0!==e.minutes||void 0!==e.seconds)&&(t+="T",void 0!==e.hours&&(t+=`${e.hours}H`),void 0!==e.minutes&&(t+=`${e.minutes}M`),void 0!==e.seconds&&(t+=`${e.seconds}S`)),t},qe=36e5,Ge=/* @__PURE__ */Symbol.for("constructDateFrom");function Ze(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Ge in e?e[Ge](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return Ze(t||e,e)}function Xe(e,t,a){let r=Je(e,null==a?void 0:a.in);return isNaN(t)?Ze((null==a?void 0:a.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qe(e,t,a){let r=Je(e,void 0);if(isNaN(t))return Ze(e,NaN);if(!t)return r;let n=r.getDate(),i=Ze(e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),n>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),n),r)}function et(e,t,a){return Ze(e,+Je(e)+t)}function tt(e,t,a){return et(e,t*qe)}var at={};function rt(){return at}function nt(e,t){var a,r,n,i;let o=rt(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:r.weekStartsOn)??o.weekStartsOn??(null==(i=null==(n=o.locale)?void 0:n.options)?void 0:i.weekStartsOn)??0,d=Je(e,null==t?void 0:t.in),l=d.getDay(),c=(l<s?7:0)+l-s;return d.setDate(d.getDate()-c),d.setHours(0,0,0,0),d}function it(e,t,a){let r=Je(e,void 0);return r.setTime(r.getTime()+6e4*t),r}function ot(e,t,a){return et(e,1e3*t)}function st(e,t,a){return Xe(e,7*t,a)}function dt(e,t,a){return Qe(e,12*t)}function lt(e,t){let a=+Je(e)-+Je(t);return a<0?-1:a>0?1:a}function ct(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function ht(e,t){let a=Je(e,void 0),r=a.getMonth();return a.setFullYear(a.getFullYear(),r+1,0),a.setHours(23,59,59,999),a}function ut(e,t){let[a,r]=function(e,...t){let a=Ze.bind(null,t.find(e=>"object"==typeof e));return t.map(a)}(0,t.start,t.end);return{start:a,end:r}}function ft(e,t){let a=Je(e,void 0);return a.setDate(1),a.setHours(0,0,0,0),a}function pt(e,t){var a,r,n,i;let o=rt(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:r.firstWeekContainsDate)??o.firstWeekContainsDate??(null==(i=null==(n=o.locale)?void 0:n.options)?void 0:i.firstWeekContainsDate)??1,d=function(e,t){var a,r,n,i;let o=Je(e,null==t?void 0:t.in),s=o.getFullYear(),d=rt(),l=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:r.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(i=null==(n=d.locale)?void 0:n.options)?void 0:i.firstWeekContainsDate)??1,c=Ze((null==t?void 0:t.in)||e,0);c.setFullYear(s+1,0,l),c.setHours(0,0,0,0);let h=nt(c,t),u=Ze((null==t?void 0:t.in)||e,0);u.setFullYear(s,0,l),u.setHours(0,0,0,0);let f=nt(u,t);return+o>=+h?s+1:+o>=+f?s:s-1}(e,t),l=Ze((null==t?void 0:t.in)||e,0);return l.setFullYear(d,0,s),l.setHours(0,0,0,0),nt(l,t)}function yt(e,t){return Je(e,void 0).getDay()}function mt(e,t){let a=Je(e,void 0),r=a.getFullYear(),n=a.getMonth(),i=Ze(a,0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}function bt(e,t){return Je(e,void 0).getMonth()}function gt(e,t,a){let r=Je(e,null==a?void 0:a.in),n=function(e,t){let a=Je(e,null==t?void 0:t.in),r=+nt(a,t)-+pt(a,t);return Math.round(r/6048e5)+1}(r,a)-t;return r.setDate(r.getDate()-7*n),Je(r,null==a?void 0:a.in)}function vt(e,t,a){var r,n,i,o;let s=rt(),d=(null==a?void 0:a.weekStartsOn)??(null==(n=null==(r=null==a?void 0:a.locale)?void 0:r.options)?void 0:n.weekStartsOn)??s.weekStartsOn??(null==(o=null==(i=s.locale)?void 0:i.options)?void 0:o.weekStartsOn)??0,l=Je(e,null==a?void 0:a.in),c=l.getDay(),h=7-d;return Xe(l,t<0||t>6?t-(c+h)%7:((t%7+7)%7+h)%7-(c+h)%7,a)}function wt(e,t,a){let r=+Je(e,void 0),[n,i]=[+Je(t.start,void 0),+Je(t.end,void 0)].sort((e,t)=>e-t);return r>=n&&r<=i}var Dt=["SU","MO","TU","WE","TH","FR","SA"],kt=(e,t)=>void 0!==t&&e>=t,xt=(e,t,a,r)=>{let n=a.map(({day:e,occurrence:t})=>({occurrence:t,day:Dt.indexOf(e)}));return"YEARLY"===e.frequency?e.byYearday||e.byMonthday?t.map(e=>e.filter(e=>n.find(({day:t})=>t===yt(e)))):e.byWeekNo?t.map(e=>e.flatMap(e=>n.map(({day:t})=>vt(e,t,{weekStartsOn:r})))):e.byMonth?t.map(e=>e.flatMap(e=>n.flatMap(({day:t,occurrence:a})=>$t(Et(ft(e)),Et(ht(e)),t,r,a)))):t.map(e=>e.flatMap(e=>n.flatMap(({day:t,occurrence:a})=>$t(Et(function(e){let t=Je(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(e)),Et(function(e){let t=Je(e,void 0),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}(e)),t,r,a)))):"MONTHLY"===e.frequency?e.byMonthday?t.map(e=>e.filter(e=>n.find(({day:t})=>t===yt(e)))):t.map(e=>e.flatMap(e=>n.flatMap(({day:t,occurrence:a})=>$t(Et(ft(e)),Et(ht(e)),t,r,a)))):"WEEKLY"===e.frequency?t.map(e=>e.flatMap(e=>n.map(({day:t})=>vt(e,t,{weekStartsOn:r})))):t.map(e=>e.filter(e=>n.find(({day:t})=>t===yt(e))))},$t=(e,t,a,r,n)=>{if(void 0!==n){if(!(n<0)){let t=vt(e,a,{weekStartsOn:r});return st(t,(n||1)-1+(e>t?1:0))}let i=vt(t,a,{weekStartsOn:r});return Et(function(e){let t=Je(e,void 0);return t.setHours(0,0,0,0),t}(function(e,t,a){return st(e,-t,a)}(i,-(n||1)-1+(t<i?1:0))))}return function(e){let{start:t,end:a}=ut(0,e),r=+t>+a,n=r?+t:+a,i=r?a:t;i.setHours(0,0,0,0);let o=[];for(;+i<=n;)o.push(Ze(t,i)),i.setDate(i.getDate()+1),i.setHours(0,0,0,0);return r?o.reverse():o}({start:e,end:t}).map(e=>Et(e)).filter(a=>wt(a,{start:e,end:t})).filter(e=>a===yt(e))},Et=e=>it(e,-e.getTimezoneOffset()),St=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=Je(e,void 0);return a.setHours(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return Je(e,void 0).getHours()}(e)))),_t=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency||"HOURLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=Je(e,void 0);return a.setMinutes(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return Je(e,void 0).getMinutes()}(e)))),Tt=(e,t,a)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=Je(e,void 0),r=a.getFullYear(),n=a.getDate(),i=Ze(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);let o=mt(i);return a.setMonth(t,Math.min(n,o)),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(bt(e)))),Mt=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency?t.map(e=>e.flatMap(e=>{let t=mt(e);return a.map(a=>a>t?void 0:function(e,t){let a=Je(e,void 0);return a.setDate(t),a}(e,a)).filter(e=>!!e)})):"WEEKLY"===e.frequency?t:t.map(e=>e.filter(e=>a.includes(bt(e)))),Ct=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency||"HOURLY"===e.frequency||"MINUTELY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=Je(e,void 0);return a.setSeconds(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return Je(e).getSeconds()}(e)))),Ot=(e,t,a)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=Je(e,void 0);return a.setMonth(0),a.setDate(t),a}(e,t)))):"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency?t:t.map(e=>e.filter(e=>a.includes(function(e){return Je(e,void 0).getFullYear()}(e)))),At=(e,t,a)=>{let r=a;return e.byMonth&&(r=Tt(e,r,e.byMonth)),e.byWeekNo&&(r=((e,t,a,r)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>gt(e,t,{weekStartsOn:r})))):t)(e,r,e.byWeekNo,t.weekStartsOn)),e.byYearday&&(r=Ot(e,r,e.byYearday)),e.byMonthday&&(r=Mt(e,r,e.byMonthday)),e.byDay&&(r=xt(e,r,e.byDay,t.weekStartsOn)),e.byHour&&(r=St(e,r,e.byHour)),e.byMinute&&(r=_t(e,r,e.byMinute)),e.bySecond&&(r=Ct(e,r,e.bySecond)),e.bySetPos&&(r=((e,t,a)=>e.byYearday||e.byWeekNo||e.byMonthday||e.byMonth||e.byDay||e.byHour||e.byMinute||e.bySecond?t.map(e=>e.sort(lt).filter((t,r)=>a.some(t=>t>0?0!==r&&r%t===0:0===r?e.length-1+t===0:r%(e.length-1+t)===0))):t)(e,r,e.bySetPos)),r.map(e=>e.sort(lt).filter(e=>!(t.exceptions.length>0&&t.exceptions.some(t=>function(e,t){return+Je(e)==+Je(t)}(t,e))||!wt(e,{start:t.start,end:t.end}))))},It=(e,t)=>{var a;let r=t.start,n=(null==(a=e.until)?void 0:a.date)||(null==t?void 0:t.end)||dt(r,2),i=t.exceptions||[],o=(e.workweekStart?Dt.indexOf(e.workweekStart):1)%7,s=[[r]];((e,{start:t,end:a},r)=>{if(kt(r.length,e.count))return;let n=e.frequency,i=e.interval||1;if(!n)return;let o=t;if("SECONDLY"!==n)if("MINUTELY"!==n)if("HOURLY"!==n)if("DAILY"!==n)if("WEEKLY"!==n)if("MONTHLY"!==n)if("YEARLY"!==n);else for(;o<a;)o=dt(o,i),r.push([o]);else for(;o<a;)o=Qe(o,i),r.push([o]);else for(;o<a;){if(kt(r.length,e.count))return;o=st(o,i),r.push([o])}else for(;o<a;){if(kt(r.length,e.count))return;o=Xe(o,i),r.push([o])}else for(;o<a;){if(kt(r.length,e.count))return;o=tt(o,i),r.push([o])}else for(;o<a;){if(kt(r.length,e.count))return;o=it(o,i),r.push([o])}else for(;o<a;){if(kt(r.length,e.count))return;o=ot(o,i),r.push([o])}})(e,{start:r,end:n},s);let d=At(e,{start:r,end:n,exceptions:i,weekStartsOn:o},s);return e.count?d.flat().splice(0,e.count):d.flat()},Rt=e=>{let t="+"===e[0]?1:-1;return 1e3*(60*(60*Number(e.slice(1,3))+(e.length>3?Number(e.slice(3,5)):0))+(e.length>5?Number(e.slice(5,7)):0))*t},Nt=(e,t,a)=>{let r=null==a?void 0:a.find(e=>e.id===t);if(r){let t=((e,t)=>t.flatMap(t=>!t.recurrenceRule||t.recurrenceRule.until&&t.recurrenceRule.until.date<e?t:It(t.recurrenceRule,{start:t.start,end:e}).map(e=>({...t,start:e}))))(e,r.props).sort((e,t)=>lt(e.start,t.start));for(let r=0;r<t.length;r+=1)if(e<t[r].start){let e=t[r-1]?t[r-1].offsetTo:t[r].offsetFrom,a=e.length>5?e.substring(0,5):e;return{offset:a,milliseconds:Rt(a)}}let a=t[t.length-1].offsetTo,n=a.length>5?a.substring(0,5):a;return{offset:n,milliseconds:Rt(n)}}let n=((e,t)=>{let a="en-US",r=new Date(t.toLocaleString(a,{timeZone:"UTC"}));try{return new Date(t.toLocaleString(a,{timeZone:e})).getTime()-r.getTime()}catch{return t.getTime()-r.getTime()}})(t,e);if(!Number.isNaN(n)){let e=n<0,t=Math.abs(function(e){let t=e/qe;return Math.trunc(t)}(n)),a=Math.abs(function(e){let t=e/6e4;return Math.trunc(t)}(n))-60*t;return{offset:`${e?"-":"+"}${1===t.toString().length?`0${t}`:t.toString()}${1===a.toString().length?`0${a}`:a.toString()}`,milliseconds:n}}},zt=e=>{if(!ct(e))throw Error(`Incorrect date object: ${e}`);let t=e.toISOString();return`${t.slice(0,4)}${t.slice(5,7)}${t.slice(8,10)}`},Lt=e=>{if(!ct(e))throw Error(`Incorrect date object: ${e}`);return Yt(e)},Yt=(e,t)=>{let a=e.toISOString();return`${a.slice(0,4)}${a.slice(5,7)}${a.slice(8,10)}T${a.slice(11,13)}${a.slice(14,16)}${a.slice(17,19)}${t?"":"Z"}`},Wt=e=>Object.keys(e),jt=e=>{let t="X-";for(let a of e)a===a.toUpperCase()&&(t+="-"),t+=a.toUpperCase();return t},Pt=(e,t)=>{let a=[],r="",n=0;for(let i=0;i<e.length;i++){let o=e[i],s="\n"===o?2:1;n+s>t?(a.push(0===a.length?r:` ${r}`),r=o,n=s):(r+=o,n+=s)}return r&&a.push(0===a.length?r:` ${r}`),a},Ht=(e,t)=>{let a=Wt(e),r=t.childComponents,n=r?Wt(r):[],i=t.generateArrayValues,o=i?Wt(i):[],s="";return s+=(e=>He(`BEGIN:${e}`))(t.icsComponent),a.forEach(a=>{if(n.includes(a)||o.includes(a)||"nonStandard"===a)return;let r=t.icsKeyMap[a];if(!r)return;let i=e[a];if(null==i)return;let d=t.generateValues[a];s+=d?d({icsKey:r,value:i,key:a}):Fe(r,String(i))}),r&&n&&n.length>0&&n.forEach(t=>{let a=e[t];!a||!Array.isArray(a)||0===a.length||a.forEach(e=>{let a=r[t];a&&(s+=a(e))})}),i&&o&&o.length>0&&o.forEach(a=>{let r=i[a];if(!r)return;let n=t.icsKeyMap[a];if(!n)return;let o=e[a];!o||!Array.isArray(o)||0===o.length||o.forEach(e=>{s+=r({icsKey:n,value:e})})}),e.nonStandard&&(s+=((e,t)=>{if(!e)return"";let a="";return Object.entries(e).forEach(([e,r])=>{let n=null==t?void 0:t[e];if(!n)return void(a+=Fe(jt(e),null==r?void 0:r.toString()));let i=n.generate(r);i&&(a+=Fe(n.name,i.value,i.options?Be(Object.entries(i.options).map(([e,t])=>({key:e,value:t}))):void 0))}),a})(e.nonStandard,null==t?void 0:t.nonStandard)),s+=(e=>He(`END:${e}`))(t.icsComponent),null!=t&&t.skipFormatLines?s:(e=>{let t=e.split(Pe),a=[];return t.forEach(e=>{(e=>{let t=(e.match(/\n/g)||[]).length;return e.length+t})(e)<75?a.push(e):Pt(e,75).forEach(e=>{a.push(e)})}),a.join("\r\n")})(s)},Ft=(e,t)=>Fe(e,Math.trunc(t).toString()),Bt=(e,t)=>Ht(e,{icsComponent:"VALARM",icsKeyMap:We,generateValues:{trigger:({value:e})=>(e=>{var t,a;let r=Be([(null==(t=e.options)?void 0:t.related)&&{key:"RELATED",value:e.options.related}].filter(e=>!!e));return"absolute"===e.type?Fe("TRIGGER",Lt(null==(a=e.value)?void 0:a.date)):"relative"===e.type?Fe("TRIGGER",Ke(e.value),r):void 0})(e),duration:({icsKey:e,value:t})=>Fe(e,Ke(t)),repeat:({icsKey:e,value:t})=>Ft(e,t)},generateArrayValues:{attendees:({value:e})=>Ve(e,"ATTENDEE"),attachments:({value:e})=>(e=>{if("uri"===e.type){let t=Be([e.formatType&&{key:"FMTTYPE",value:e.formatType}].filter(e=>!!e));return Fe("ATTACH",e.url,t)}if("binary"===e.type){let t=Be([e.value&&{key:"VALUE",value:e.value},e.encoding&&{key:"ENCODING",value:e.encoding}].filter(e=>!!e));return Fe("ATTACH",e.binary,t)}throw Error(`IcsAttachment has no type! ${JSON.stringify(e)}`)})(e)},nonStandard:null==t?void 0:t.nonStandard,skipFormatLines:null==t?void 0:t.skipFormatLines}),Ut=(e,t,a=[],r)=>{let n=Be([t.type&&{key:"VALUE",value:t.type},t.local&&!(null!=r&&r.forceUtc)&&{key:"TZID",value:t.local.timezone},...a].filter(e=>!!e)),i="DATE"===t.type?zt(t.date):!t.local||null!=r&&r.forceUtc?Lt(t.date):((e,t,a)=>{let r=t.date;if(!ct(r))throw Error(`Incorrect date object: ${r}`);return Nt(r,t.timezone,a)?Yt(r,!0):Lt(e)})(t.date,t.local,null==r?void 0:r.timezones);return Fe(e,i,n)},Vt=(e,t,a)=>Fe(e,(e=>e.replace(/([\\;,])|(\n)/g,(e,t)=>t?`\\${t}`:"\\n"))(t),a?Be(a):void 0),Kt=(e,t)=>Ht(e,{icsComponent:"VEVENT",icsKeyMap:je,generateValues:{stamp:({icsKey:e,value:t})=>Ut(e,t,void 0,{timezones:void 0,forceUtc:!0}),start:({icsKey:e,value:t})=>Ut(e,t,void 0,{timezones:void 0}),end:({icsKey:e,value:t})=>Ut(e,t,void 0,{timezones:void 0}),created:({icsKey:e,value:t})=>Ut(e,t,void 0,{timezones:void 0}),lastModified:({icsKey:e,value:t})=>Ut(e,t,void 0,{timezones:void 0}),categories:({icsKey:e,value:t})=>Fe(e,t.join(",")),description:({icsKey:t,value:a})=>Vt(t,a,e.descriptionAltRep?[{key:"ALTREP",value:`"${e.descriptionAltRep}"`}]:void 0),location:({icsKey:e,value:t})=>Vt(e,t),comment:({icsKey:e,value:t})=>Vt(e,t),summary:({icsKey:e,value:t})=>Vt(e,t),recurrenceRule:({value:e})=>(e=>{var t;let a="",r=Be([e.frequency&&{key:"FREQ",value:e.frequency},e.byDay&&{key:"BYDAY",value:e.byDay.map(e=>(e=>e.occurrence?`${e.occurrence}${e.day}`:e.day)(e)).join(",")},e.byHour&&{key:"BYHOUR",value:e.byHour.join(",")},e.byMinute&&{key:"BYMINUTE",value:e.byMinute.join(",")},e.byMonth&&{key:"BYMONTH",value:e.byMonth.map(e=>e+1).join(",")},e.byMonthday&&{key:"BYMONTHDAY",value:e.byMonthday.join(",")},e.bySecond&&{key:"BYSECOND",value:e.bySecond.join(",")},e.bySetPos&&{key:"BYSETPOS",value:e.bySetPos.join(",")},e.byWeekNo&&{key:"BYWEEKNO",value:e.byWeekNo.join(",")},e.byYearday&&{key:"BYYEARDAY",value:e.byYearday.join(",")},e.count&&{key:"COUNT",value:e.count.toString()},e.interval&&{key:"INTERVAL",value:e.interval.toString()},e.until&&{key:"UNTIL",value:"DATE"===e.until.type?zt(e.until.date):Lt((null==(t=e.until.local)?void 0:t.date)||e.until.date)},e.workweekStart&&{key:"WKST",value:e.workweekStart}].filter(e=>!!e));return a+=Fe("RRULE",r),a})(e),duration:({icsKey:e,value:t})=>Fe(e,Ke(t)),organizer:({value:e})=>(e=>{let t=Be([e.dir&&{key:"DIR",value:`"${e.dir}"`},e.name&&{key:"CN",value:e.name},e.sentBy&&{key:"SENT-BY",value:Ue(e.sentBy)}].filter(e=>!!e));return Fe("ORGANIZER",Ue(e.email),t)})(e),sequence:({icsKey:e,value:t})=>Ft(e,t),recurrenceId:({value:e})=>((e,t)=>{let a="";return a+=Ut("RECURRENCE-ID",e.value,e.range?[{key:"RANGE",value:e.range}]:void 0,t),a})(e,{timezones:void 0})},generateArrayValues:{attendees:({value:e})=>Ve(e,"ATTENDEE"),exceptionDates:({value:e})=>((e,t,a)=>Ut(t,e,void 0,a))(e,"EXDATE",{timezones:void 0})},childComponents:{alarms:e=>Bt(e,{nonStandard:void 0,skipFormatLines:!0})},nonStandard:void 0,skipFormatLines:void 0}),qt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Zt=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?Gt(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&qt(t,a,i),i};let Jt=class extends t{constructor(){super(...arguments),this.open=!1,this.eventDetails={heading:"",content:"",displayTime:""},this.locale="en",this._cardTop=0,this._cardLeft=0,this._positioned=!1,this._handleKeydown=e=>{if("Escape"===e.key)return e.stopPropagation(),void this._handleClose();if("Tab"!==e.key)return;const t=Array.from(this.renderRoot.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(0===t.length)return;const a=t[0],r=t[t.length-1],n=this.renderRoot;e.shiftKey?n.activeElement===a&&(e.preventDefault(),r.focus()):n.activeElement===r&&(e.preventDefault(),a.focus())},this._handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("menu-close",{bubbles:!0,composed:!0}))},this._handleExport=()=>{const{heading:e,content:t,time:a,date:r}=this.eventDetails,n=/* @__PURE__ */new Date,i=r?.year??n.getFullYear(),o=(r?.month??n.getMonth()+1)-1,s=r?.day??n.getDate();let d,l;a&&(d={date:new Date(i,o,s,a.start.hour,a.start.minute)},l={date:new Date(i,o,s,a.end.hour,a.end.minute)});const c={start:{date:d&&d.date||new Date(i,o,s,0,0)},end:{date:l&&l.date||new Date(i,o,s,23,59)},summary:e,description:t,status:"CONFIRMED",uid:`${Date.now()}@lms-calendar`,stamp:{date:/* @__PURE__ */new Date}},h=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//LMS Calendar//EN",Kt(c).trim(),"END:VCALENDAR"].join("\r\n"),u=new Blob([h],{type:"text/calendar"}),f=URL.createObjectURL(u),p=document.createElement("a");p.href=f,p.download=`${e||"event"}.ics`,document.body.appendChild(p),p.click(),setTimeout(()=>{document.body.removeChild(p),URL.revokeObjectURL(f)},0)}}updated(e){(e.has("open")||e.has("anchorRect"))&&this.open&&this.anchorRect&&(this._positioned=!1,this._computePosition(),requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".close-btn");e?.focus()}))}_computePosition(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".card"),t=this.parentElement;if(!e||!t||!this.anchorRect)return;const a=t.getBoundingClientRect(),r=e.getBoundingClientRect(),n=this.anchorRect.top-a.top,i=this.anchorRect.left-a.left,o=i+this.anchorRect.width,s=n+this.anchorRect.height/2,d=r.width||260,l=r.height||200;let c;c=o+8+d<=a.width?o+8:i-8-d>=0?i-8-d:Math.max(8,(a.width-d)/2);let h=s-l/2;h=Math.max(8,Math.min(h,a.height-l-8)),this._cardTop=h,this._cardLeft=c,this._positioned=!0})}_formatDate(e){return fe(e.day,e.month,e.year,this.locale)}render(){const e=Me(this.locale),t="card"+(this._positioned?" visible":""),n=this.eventDetails.content&&this.eventDetails.content!==e.noContent;return a`
691
761
  <div
692
762
  class=${t}
693
763
  role="dialog"
@@ -713,10 +783,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
713
783
  <div class="meta">
714
784
  ${this.eventDetails.displayTime||e.noTime}
715
785
  </div>
716
- ${this.eventDetails.date?i`<div class="meta">
786
+ ${this.eventDetails.date?a`<div class="meta">
717
787
  ${this._formatDate(this.eventDetails.date)}
718
- </div>`:o}
719
- ${a?i`<div class="notes">${this.eventDetails.content}</div>`:o}
788
+ </div>`:r}
789
+ ${n?a`<div class="notes">${this.eventDetails.content}</div>`:r}
720
790
  <div class="actions">
721
791
  <button
722
792
  type="button"
@@ -728,7 +798,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
728
798
  </button>
729
799
  </div>
730
800
  </div>
731
- `}};aa.styles=n`
801
+ `}};Jt.styles=e`
732
802
  :host {
733
803
  position: absolute;
734
804
  inset: 0;
@@ -821,24 +891,24 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
821
891
  .export-btn:hover {
822
892
  opacity: 0.7;
823
893
  }
824
- `,ta([s({type:Boolean,reflect:!0})],aa.prototype,"open",2),ta([s({type:Object})],aa.prototype,"eventDetails",2),ta([s({attribute:!1})],aa.prototype,"anchorRect",2),ta([s({type:String})],aa.prototype,"locale",2),ta([l()],aa.prototype,"_cardTop",2),ta([l()],aa.prototype,"_cardLeft",2),ta([l()],aa.prototype,"_positioned",2),aa=ta([d("lms-menu")],aa);class na{constructor({date:e,direction:t}){e&&(this.date=e),this._direction=t}set date(e){const t=u.fromObject(e);if(!t.isValid)throw new Error("date couldn't be converted to DateTime object");this._date=t}set direction(e){this._direction=e}_toCalendarDate(e){return{day:e.day,month:e.month,year:e.year}}getDateByDayInDirection(){if(!this._date||!this._date.isValid)throw new Error("date is not set or invalid");if(!this._direction)throw new Error("direction is not set");const e=this._date.plus({days:"next"===this._direction?1:-1});if(!e.isValid)throw new Error("generated date is invalid");return this._date=e,this._toCalendarDate(e)}getDateByMonthInDirection(){if(!this._date||!this._date.isValid)throw new Error("date is not set");if(!this._direction)throw new Error("direction is not set");const e=this._date.plus({months:"next"===this._direction?1:-1});if(!e.isValid)throw new Error("generated date is invalid");return this._date=e,this._toCalendarDate(e)}}var ra=Object.defineProperty,ia=Object.getOwnPropertyDescriptor,oa=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?ia(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&ra(t,a,i),i};let sa=class extends r{constructor(){super(...arguments),this.currentDate=/* @__PURE__ */new Date,this.activeDate={day:this.currentDate.getDate(),month:this.currentDate.getMonth()+1,year:this.currentDate.getFullYear()},this.firstDayOfWeek=1,this.locale="en"}connectedCallback(){super.connectedCallback(),this.addEventListener("open-menu",e=>{const t=e;if(e.target!==this){e.stopPropagation();const a=new CustomEvent("open-menu",{detail:t.detail,bubbles:!0,composed:!0});this.dispatchEvent(a)}}),this._setupScrollDetection()}_setupScrollDetection(){let e=null;this.updateComplete.then(()=>{const t=this.shadowRoot?.querySelectorAll(".day");t?.forEach(t=>{const a=t;a.addEventListener("scroll",()=>(t=>{e||(e=requestAnimationFrame(()=>{t.scrollTop>5?t.classList.add("scrolled"):t.classList.remove("scrolled"),e=null}))})(a),{passive:!0})})})}_isCurrentDate(e){return new Date(e).toDateString()===this.currentDate.toDateString()}_renderIndicator({year:e,month:t,day:a}){const n=this._isCurrentDate(`${e}/${t}/${a}`);return i` <div
825
- class="indicator ${p({current:n})}"
894
+ `,Zt([n({type:Boolean,reflect:!0})],Jt.prototype,"open",2),Zt([n({type:Object})],Jt.prototype,"eventDetails",2),Zt([n({attribute:!1})],Jt.prototype,"anchorRect",2),Zt([n({type:String})],Jt.prototype,"locale",2),Zt([o()],Jt.prototype,"_cardTop",2),Zt([o()],Jt.prototype,"_cardLeft",2),Zt([o()],Jt.prototype,"_positioned",2),Jt=Zt([i("lms-menu")],Jt);class Xt{constructor({date:e,direction:t}){e&&(this.date=e),this._direction=t}set date(e){const t=d.fromObject(e);if(!t.isValid)throw new Error("date couldn't be converted to DateTime object");this._date=t}set direction(e){this._direction=e}_toCalendarDate(e){return{day:e.day,month:e.month,year:e.year}}getDateByDayInDirection(){if(!this._date||!this._date.isValid)throw new Error("date is not set or invalid");if(!this._direction)throw new Error("direction is not set");const e=this._date.plus({days:"next"===this._direction?1:-1});if(!e.isValid)throw new Error("generated date is invalid");return this._date=e,this._toCalendarDate(e)}getDateByMonthInDirection(){if(!this._date||!this._date.isValid)throw new Error("date is not set");if(!this._direction)throw new Error("direction is not set");const e=this._date.plus({months:"next"===this._direction?1:-1});if(!e.isValid)throw new Error("generated date is invalid");return this._date=e,this._toCalendarDate(e)}}var Qt=Object.defineProperty,ea=Object.getOwnPropertyDescriptor,ta=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?ea(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&Qt(t,a,i),i};let aa=class extends t{constructor(){super(...arguments),this.currentDate=/* @__PURE__ */new Date,this.activeDate={day:this.currentDate.getDate(),month:this.currentDate.getMonth()+1,year:this.currentDate.getFullYear()},this.firstDayOfWeek=1,this.locale="en",this._scrollRafId=null}connectedCallback(){super.connectedCallback(),this.addEventListener("open-menu",e=>{const t=e;if(e.target!==this){e.stopPropagation();const a=new CustomEvent("open-menu",{detail:t.detail,bubbles:!0,composed:!0});this.dispatchEvent(a)}}),this._setupDelegatedScrollListener()}_setupDelegatedScrollListener(){this.shadowRoot?.addEventListener("scroll",e=>{const t=e.target;t.classList?.contains("day")&&(this._scrollRafId||(this._scrollRafId=requestAnimationFrame(()=>{t.scrollTop>5?t.classList.add("scrolled"):t.classList.remove("scrolled"),this._scrollRafId=null})))},{capture:!0,passive:!0})}_isCurrentDate(e){return new Date(e).toDateString()===this.currentDate.toDateString()}_renderIndicator({year:e,month:t,day:r}){const n=this._isCurrentDate(`${e}/${t}/${r}`);return a` <div
895
+ class="indicator ${h({current:n})}"
826
896
  >
827
- ${1===a?pe(a,t,e,this.locale):a}
828
- </div>`}render(){return i`
897
+ ${1===r?le(r,t,e,this.locale):r}
898
+ </div>`}render(){return a`
829
899
  <div class="month">
830
- ${this._getCalendarArray()?.map(({year:e,month:t,day:a})=>i`<div
900
+ ${this._getCalendarArray()?.map(({year:e,month:t,day:r})=>a`<div
831
901
  class="day"
832
- data-date="${e}-${t}-${a}"
902
+ data-date="${e}-${t}-${r}"
833
903
  @click=${this._dispatchExpand}
834
904
  @keydown=${this._handleKeydown}
835
905
  tabindex="0"
836
906
  >
837
- ${this._renderIndicator({year:e,month:t,day:a})}
838
- <slot name="${e}-${t}-${a}"></slot>
907
+ ${this._renderIndicator({year:e,month:t,day:r})}
908
+ <slot name="${e}-${t}-${r}"></slot>
839
909
  </div>`)}
840
910
  </div>
841
- `}_dispatchExpand(e){const t=e.target;if(!(t instanceof HTMLElement))return;if(t.closest("lms-calendar-entry"))return;const{date:a}=t.dataset;if(!a)return;const[n,r,i]=a.split("-").map(e=>parseInt(e,10)),o=new CustomEvent("expand",{detail:{date:{day:i,month:r,year:n}},bubbles:!0,composed:!0});this.dispatchEvent(o)}_handleKeydown(e){const t=e.key;"Space"!==t&&"Enter"!==t||this._dispatchExpand(e)}_getDaysInMonth(e){return oe(e).with({year:ne.number,month:ne.number,day:ne.number},({year:e,month:t})=>{const a=new Date(e,t,0).getDate();return a>0?a:0}).otherwise(()=>0)}_getOffsetOfFirstDayInMonth(e){return De(e,this.firstDayOfWeek)}_getDatesInMonthAsArray(e,t){return oe(this._getDaysInMonth(e)).with(0,()=>[]).otherwise(a=>Array.from(Array(a).keys(),(t,a)=>({year:e.year,month:e.month,day:a+1})).slice(...t||[0]))}_getCalendarArray(){if(!this.activeDate)return[];const e=new na({date:this.activeDate});try{e.direction="previous";const t=this._getOffsetOfFirstDayInMonth(this.activeDate),a=t>0?this._getDatesInMonthAsArray(e.getDateByMonthInDirection(),[-t]):[],n=this._getDatesInMonthAsArray(this.activeDate,[]);e.date=this.activeDate,e.direction="next";const r=42-(a.length+n.length),i=r>0?this._getDatesInMonthAsArray(e.getDateByMonthInDirection(),[0,r]):[];return a.concat(n,i)}catch(t){return console.error("Error generating calendar array:",t),[]}}};sa.styles=n`
911
+ `}_dispatchExpand(e){const t=e.target;if(!(t instanceof HTMLElement))return;if(t.closest("lms-calendar-entry"))return;const{date:a}=t.dataset;if(!a)return;const[r,n,i]=a.split("-").map(e=>parseInt(e,10)),o=new CustomEvent("expand",{detail:{date:{day:i,month:n,year:r}},bubbles:!0,composed:!0});this.dispatchEvent(o)}_handleKeydown(e){const t=e.key;"Space"!==t&&"Enter"!==t||this._dispatchExpand(e)}_getDaysInMonth(e){return ee(e).with({year:J.number,month:J.number,day:J.number},({year:e,month:t})=>{const a=new Date(e,t,0).getDate();return a>0?a:0}).otherwise(()=>0)}_getOffsetOfFirstDayInMonth(e){return me(e,this.firstDayOfWeek)}_getDatesInMonthAsArray(e,t){return ee(this._getDaysInMonth(e)).with(0,()=>[]).otherwise(a=>Array.from(Array(a).keys(),(t,a)=>({year:e.year,month:e.month,day:a+1})).slice(...t||[0]))}_getCalendarArray(){if(!this.activeDate)return[];const e=new Xt({date:this.activeDate});try{e.direction="previous";const t=this._getOffsetOfFirstDayInMonth(this.activeDate),a=t>0?this._getDatesInMonthAsArray(e.getDateByMonthInDirection(),[-t]):[],r=this._getDatesInMonthAsArray(this.activeDate,[]);e.date=this.activeDate,e.direction="next";const n=42-(a.length+r.length),i=n>0?this._getDatesInMonthAsArray(e.getDateByMonthInDirection(),[0,n]):[];return a.concat(r,i)}catch(t){return console.error("Error generating calendar array:",t),[]}}};aa.styles=e`
842
912
  :host {
843
913
  display: block;
844
914
  flex: 1;
@@ -849,6 +919,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
849
919
  height: 100%;
850
920
  display: grid;
851
921
  grid-template-columns: repeat(7, 1fr);
922
+ grid-template-rows: repeat(6, 1fr);
852
923
  border-top: 1px solid var(--separator-light);
853
924
  }
854
925
 
@@ -871,9 +942,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
871
942
  display: flex;
872
943
  flex-direction: column;
873
944
  overflow-x: hidden;
874
- overflow-y: auto;
945
+ overflow-y: hidden;
875
946
  gap: var(--month-day-gap, 1px);
876
947
  min-width: 0;
948
+ min-height: 0;
877
949
  /* Let Blink skip layout/paint for off-screen day cells */
878
950
  content-visibility: auto;
879
951
  contain-intrinsic-size: auto 6em;
@@ -914,53 +986,53 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
914
986
  .day.scrolled .indicator {
915
987
  opacity: 0;
916
988
  }
917
- `,oa([s({attribute:!1})],sa.prototype,"activeDate",2),oa([s({type:Number})],sa.prototype,"firstDayOfWeek",2),oa([s({type:String})],sa.prototype,"locale",2),sa=oa([d("lms-calendar-month")],sa);var da=Object.defineProperty,la=Object.getOwnPropertyDescriptor,ca=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?la(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&da(t,a,i),i};let ha=class extends r{constructor(){super(...arguments),this.activeDate={day:/* @__PURE__ */(new Date).getDate(),month:/* @__PURE__ */(new Date).getMonth()+1,year:/* @__PURE__ */(new Date).getFullYear()},this.allDayRowCount=0,this.firstDayOfWeek=1,this.locale="en",this.visibleStartIndex=0,this.visibleLength=7}connectedCallback(){super.connectedCallback()}_getWeekDates(){return we(this.activeDate,this.firstDayOfWeek)}_getDatesToRender(){return this.visibleDates??this._getWeekDates()}_getVisibleWeekdayOrder(){const e=ke(this.firstDayOfWeek);return this.visibleDates&&this.visibleLength<7?e.slice(this.visibleStartIndex,this.visibleStartIndex+this.visibleLength):e}_isCurrentDate(e){const t=/* @__PURE__ */new Date;return e.day===t.getDate()&&e.month===t.getMonth()+1&&e.year===t.getFullYear()}get _isCondensed(){return void 0!==this.visibleDates&&this.visibleLength<7}render(){const e=this._getDatesToRender(),t=this._getVisibleWeekdayOrder(),a=this.allDayRowCount>0,n=a?Math.max(2.5,2*this.allDayRowCount)+1:0,r=a?`calc(var(--main-content-height) - ${n}em)`:"var(--main-content-height)",s=this._isCondensed&&this.visibleStartIndex>0,d=this._isCondensed&&this.visibleStartIndex+this.visibleLength<7;return i`
989
+ `,ta([n({attribute:!1})],aa.prototype,"activeDate",2),ta([n({type:Number})],aa.prototype,"firstDayOfWeek",2),ta([n({type:String})],aa.prototype,"locale",2),aa=ta([i("lms-calendar-month")],aa);var ra=Object.defineProperty,na=Object.getOwnPropertyDescriptor,ia=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?na(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&ra(t,a,i),i};let oa=class extends t{constructor(){super(...arguments),this.activeDate={day:/* @__PURE__ */(new Date).getDate(),month:/* @__PURE__ */(new Date).getMonth()+1,year:/* @__PURE__ */(new Date).getFullYear()},this.allDayRowCount=0,this.firstDayOfWeek=1,this.locale="en",this.visibleStartIndex=0,this.visibleLength=7,this._lastScrollH=0}_getWeekDates(){return ye(this.activeDate,this.firstDayOfWeek)}_getDatesToRender(){return this.visibleDates??this._getWeekDates()}_getVisibleWeekdayOrder(){const e=be(this.firstDayOfWeek);return this.visibleDates&&this.visibleLength<7?e.slice(this.visibleStartIndex,this.visibleStartIndex+this.visibleLength):e}_isCurrentDate(e){const t=/* @__PURE__ */new Date;return e.day===t.getDate()&&e.month===t.getMonth()+1&&e.year===t.getFullYear()}get _isCondensed(){return void 0!==this.visibleDates&&this.visibleLength<7}firstUpdated(){const e=this.renderRoot?.querySelector(".week-scroll");e&&(this._applyScrollHeight(e.clientHeight),this._scrollRO=new ResizeObserver(([e])=>{const t=e.contentRect.height;t>0&&Math.abs(t-this._lastScrollH)>.5&&requestAnimationFrame(()=>this._applyScrollHeight(t))}),this._scrollRO.observe(e))}_applyScrollHeight(e){if(e<=0)return;this._lastScrollH=e;const t=e/720;this.style.setProperty("--minute-height",`${t}px`),this.style.setProperty("--hour-height",60*t+"px"),this.style.setProperty("--day-total-height",1440*t+"px"),this.style.setProperty("--half-day-height",`${e}px`)}disconnectedCallback(){super.disconnectedCallback(),this._scrollRO?.disconnect()}render(){const e=this._getDatesToRender(),t=this._getVisibleWeekdayOrder(),n=this.allDayRowCount>0,i=this._isCondensed&&this.visibleStartIndex>0,o=this._isCondensed&&this.visibleStartIndex+this.visibleLength<7;return a`
918
990
  <div class="week-container">
919
991
  <div class="week-header">
920
992
  <div class="time-header"></div>
921
- ${e.map((e,a)=>{const n=Re(this.locale);return i`
993
+ ${e.map((e,r)=>{const n=Me(this.locale);return a`
922
994
  <div
923
- class="day-label ${p({current:this._isCurrentDate(e)})}"
995
+ class="day-label ${h({current:this._isCurrentDate(e)})}"
924
996
  tabindex="0"
925
997
  role="button"
926
- aria-label="${n.switchToDayView} ${me(t[a],this.locale)}, ${e.day}"
998
+ aria-label="${n.switchToDayView} ${ce(t[r],this.locale)}, ${e.day}"
927
999
  @click=${()=>this._handleDayLabelClick(e)}
928
1000
  @keydown=${t=>this._handleDayLabelKeydown(t,e)}
929
1001
  >
930
- <span class="day-name">${me(t[a],this.locale)}</span>
1002
+ <span class="day-name">${ce(t[r],this.locale)}</span>
931
1003
  <span class="day-number">${e.day}</span>
932
1004
  </div>
933
1005
  `})}
934
1006
  </div>
935
1007
 
936
1008
  <!-- Peek indicators for condensed view -->
937
- ${this._isCondensed?(()=>{const e=Re(this.locale);return i`
1009
+ ${this._isCondensed?(()=>{const e=Me(this.locale);return a`
938
1010
  <div class="peek-indicators">
939
1011
  <span
940
- class="peek-indicator ${p({"peek-indicator--hidden":!s})}"
1012
+ class="peek-indicator ${h({"peek-indicator--hidden":!i})}"
941
1013
  role="button"
942
- tabindex=${s?"0":"-1"}
1014
+ tabindex=${i?"0":"-1"}
943
1015
  aria-label="${e.showEarlierDays}"
944
1016
  @click=${()=>this._handlePeekNavigate("previous")}
945
1017
  @keydown=${e=>this._handlePeekKeydown(e,"previous")}
946
1018
  >\u2039 ${e.more}</span>
947
1019
  <span
948
- class="peek-indicator ${p({"peek-indicator--hidden":!d})}"
1020
+ class="peek-indicator ${h({"peek-indicator--hidden":!o})}"
949
1021
  role="button"
950
- tabindex=${d?"0":"-1"}
1022
+ tabindex=${o?"0":"-1"}
951
1023
  aria-label="${e.showLaterDays}"
952
1024
  @click=${()=>this._handlePeekNavigate("next")}
953
1025
  @keydown=${e=>this._handlePeekKeydown(e,"next")}
954
1026
  >${e.more} \u203A</span>
955
1027
  </div>
956
- `})():o}
1028
+ `})():r}
957
1029
 
958
1030
  <!-- All-day events section -->
959
- ${a?i`
1031
+ ${n?a`
960
1032
  <div class="all-day-wrapper">
961
1033
  <div class="all-day-container">
962
- <div class="all-day-time-header">${Re(this.locale).allDay}</div>
963
- ${e.map(e=>i`
1034
+ <div class="all-day-time-header">${Me(this.locale).allDay}</div>
1035
+ ${e.map(e=>a`
964
1036
  <div class="all-day-day-column">
965
1037
  <slot
966
1038
  name="all-day-${e.year}-${e.month}-${e.day}"
@@ -969,19 +1041,19 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
969
1041
  `)}
970
1042
  </div>
971
1043
  </div>
972
- `:o}
973
- <div class="week-scroll" style="height: ${r}">
1044
+ `:r}
1045
+ <div class="week-scroll">
974
1046
  <div class="time-labels">
975
- ${Array.from({length:25}).map((e,t)=>i`
1047
+ ${Array.from({length:25}).map((e,t)=>a`
976
1048
  <div
977
- class="hour-label"
1049
+ class="hour-label${t%12==0?" snap-target":""}"
978
1050
  style="top: calc(${t} * var(--hour-height))"
979
1051
  >
980
1052
  ${this._renderIndicatorValue(t)}
981
1053
  </div>
982
1054
  `)}
983
1055
  </div>
984
- ${e.map(e=>i`
1056
+ ${e.map(e=>a`
985
1057
  <div class="day-column">
986
1058
  <slot
987
1059
  name="timed-${e.year}-${e.month}-${e.day}"
@@ -990,7 +1062,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
990
1062
  `)}
991
1063
  </div>
992
1064
  </div>
993
- `}_renderIndicatorValue(e){return ge(e,0,this.locale)}_handleDayLabelClick(e){const t=new CustomEvent("expand",{detail:{date:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleDayLabelKeydown(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handleDayLabelClick(t))}_handlePeekNavigate(e){const t=this._getWeekDates();let a;"previous"===e&&this.visibleStartIndex>0?a=t[this.visibleStartIndex-1]:"next"===e&&this.visibleStartIndex+this.visibleLength<7&&(a=t[this.visibleStartIndex+this.visibleLength]),a&&this.dispatchEvent(new CustomEvent("peek-navigate",{detail:{date:a,direction:e},bubbles:!0,composed:!0}))}_handlePeekKeydown(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handlePeekNavigate(t))}};ha.styles=n`
1065
+ `}_renderIndicatorValue(e){return ue(e,0,this.locale)}_handleDayLabelClick(e){const t=new CustomEvent("expand",{detail:{date:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleDayLabelKeydown(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handleDayLabelClick(t))}_handlePeekNavigate(e){const t=this._getWeekDates();let a;"previous"===e&&this.visibleStartIndex>0?a=t[this.visibleStartIndex-1]:"next"===e&&this.visibleStartIndex+this.visibleLength<7&&(a=t[this.visibleStartIndex+this.visibleLength]),a&&this.dispatchEvent(new CustomEvent("peek-navigate",{detail:{date:a,direction:e},bubbles:!0,composed:!0}))}_handlePeekKeydown(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handlePeekNavigate(t))}};oa.styles=e`
994
1066
  :host {
995
1067
  display: block;
996
1068
  height: 100%;
@@ -1008,12 +1080,13 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1008
1080
  .week-header {
1009
1081
  display: grid;
1010
1082
  grid-template-columns: var(--calendar-grid-columns-week);
1011
- height: var(--day-header-height, 3.5em);
1083
+ height: var(--day-header-height, 2.5em);
1012
1084
  flex-shrink: 0;
1013
1085
  border-bottom: var(--separator-border);
1014
1086
  gap: var(--day-gap, 1px);
1015
- padding: var(--day-padding, 0.5em);
1087
+ padding: 0 var(--day-padding, 0.5em);
1016
1088
  position: relative;
1089
+ overflow: hidden;
1017
1090
  }
1018
1091
 
1019
1092
  .time-header {
@@ -1022,28 +1095,29 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1022
1095
 
1023
1096
  .day-label {
1024
1097
  text-align: center;
1025
- padding: var(--day-padding, 0.5em);
1098
+ padding: 0 0.25em;
1026
1099
  font-weight: var(--day-label-font-weight);
1027
1100
  border-right: var(--separator-border);
1028
1101
  display: flex;
1029
- flex-direction: column;
1102
+ flex-direction: row;
1030
1103
  justify-content: center;
1031
1104
  align-items: center;
1032
- gap: var(--day-label-gap, 0.15em);
1105
+ gap: 0.35em;
1033
1106
  cursor: pointer;
1034
1107
  transition: background-color 0.2s ease;
1108
+ overflow: hidden;
1035
1109
  }
1036
1110
 
1037
1111
  .day-name {
1038
- font-size: var(--day-label-name-font-size, 0.75em);
1112
+ font-size: 0.7em;
1039
1113
  text-transform: uppercase;
1040
1114
  letter-spacing: 0.03em;
1041
1115
  opacity: 0.7;
1042
1116
  }
1043
1117
 
1044
1118
  .day-number {
1045
- font-size: var(--day-label-number-font-size, 1.125em);
1046
- font-weight: var(--day-label-number-font-weight, 600);
1119
+ font-size: 0.95em;
1120
+ font-weight: 600;
1047
1121
  line-height: 1;
1048
1122
  }
1049
1123
 
@@ -1069,11 +1143,15 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1069
1143
  .week-scroll {
1070
1144
  flex: 1;
1071
1145
  overflow-y: auto;
1146
+ scroll-snap-type: y proximity;
1072
1147
  display: grid;
1073
1148
  grid-template-columns: var(--calendar-grid-columns-week);
1074
1149
  grid-template-rows: 1fr;
1075
1150
  gap: var(--day-gap, 1px);
1076
- padding: var(--day-padding, 0.5em);
1151
+ /* Vertical padding gives the first/last hour labels room to
1152
+ render above/below the grid without clipping.
1153
+ Horizontal padding keeps the scrollport flush. */
1154
+ padding: 0.6em var(--day-padding, 0.5em);
1077
1155
  min-height: 0;
1078
1156
  position: relative;
1079
1157
  contain: content;
@@ -1098,10 +1176,17 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1098
1176
  pointer-events: none;
1099
1177
  }
1100
1178
 
1179
+ /* Snap at noon: first scroll stop aligns with --half-day-height */
1180
+ .hour-label.snap-target {
1181
+ scroll-snap-align: start;
1182
+ }
1183
+
1101
1184
  .day-column {
1102
1185
  position: relative;
1103
1186
  height: var(--day-total-height);
1104
1187
  border-right: var(--sidebar-border, 1px solid var(--separator-light));
1188
+ /* Match time-labels clipping */
1189
+ overflow: clip;
1105
1190
  background-image: repeating-linear-gradient(
1106
1191
  to bottom,
1107
1192
  transparent 0,
@@ -1120,6 +1205,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1120
1205
  .all-day-wrapper {
1121
1206
  display: grid;
1122
1207
  grid-template-rows: 1fr;
1208
+ flex-shrink: 0;
1123
1209
  border-bottom: var(--separator-border);
1124
1210
  background: var(--background-color);
1125
1211
  z-index: 2;
@@ -1235,62 +1321,87 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1235
1321
  visibility: hidden;
1236
1322
  pointer-events: none;
1237
1323
  }
1238
- `,ca([s({attribute:!1})],ha.prototype,"activeDate",2),ca([s({type:Number})],ha.prototype,"allDayRowCount",2),ca([s({type:Number})],ha.prototype,"firstDayOfWeek",2),ca([s({type:String})],ha.prototype,"locale",2),ca([s({attribute:!1})],ha.prototype,"visibleDates",2),ca([s({type:Number})],ha.prototype,"visibleStartIndex",2),ca([s({type:Number})],ha.prototype,"visibleLength",2),ha=ca([d("lms-calendar-week")],ha);var ua=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,ya=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?fa(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&ua(t,a,i),i};let pa=class extends r{constructor(){super(...arguments),this.activeDate=(()=>{const e=/* @__PURE__ */new Date;return{day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}})(),this.firstDayOfWeek=1,this.locale="en",this.entrySumByDay={},this.drillTarget="month",this.densityMode="dot"}render(){const e=this.activeDate.year,t=/* @__PURE__ */new Date,a=t.getDate(),n=t.getMonth()+1,r=t.getFullYear(),o=ke(this.firstDayOfWeek);return i`
1239
- <div class="year-grid" role="grid" aria-label="${Re(this.locale).year} ${e}">
1240
- ${Array.from({length:12},(t,i)=>{const s=i+1;return this._renderMiniMonth(e,s,a,n,r,o)})}
1324
+ `,ia([n({attribute:!1})],oa.prototype,"activeDate",2),ia([n({type:Number})],oa.prototype,"allDayRowCount",2),ia([n({type:Number})],oa.prototype,"firstDayOfWeek",2),ia([n({type:String})],oa.prototype,"locale",2),ia([n({attribute:!1})],oa.prototype,"visibleDates",2),ia([n({type:Number})],oa.prototype,"visibleStartIndex",2),ia([n({type:Number})],oa.prototype,"visibleLength",2),oa=ia([i("lms-calendar-week")],oa);var sa=Object.defineProperty,da=Object.getOwnPropertyDescriptor,la=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?da(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&sa(t,a,i),i};let ca=class extends t{constructor(){super(...arguments),this.activeDate=(()=>{const e=/* @__PURE__ */new Date;return{day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}})(),this.firstDayOfWeek=1,this.locale="en",this.entrySumByDay={},this.drillTarget="month",this.densityMode="dot"}render(){const e=this.activeDate.year,t=/* @__PURE__ */new Date,r=t.getDate(),n=t.getMonth()+1,i=t.getFullYear(),o=be(this.firstDayOfWeek);return a`
1325
+ <div class="scroll-container">
1326
+ <div class="year-grid" role="grid" aria-label="${Me(this.locale).year} ${e}">
1327
+ ${Array.from({length:12},(t,a)=>{const s=a+1;return this._renderMiniMonth(e,s,r,n,i,o)})}
1328
+ </div>
1241
1329
  </div>
1242
- `}_renderMiniMonth(e,t,a,n,r,o){const s=new Date(e,t,0).getDate(),d=De({year:e,month:t},this.firstDayOfWeek),l=Re(this.locale),c=[];let h=Array.from({length:d},()=>null);for(let i=1;i<=s;i++)h.push(i),7===h.length&&(c.push(h),h=[]);if(h.length>0){for(;h.length<7;)h.push(null);c.push(h)}return i`
1330
+ `}_renderMiniMonth(e,t,r,n,i,o){const s=new Date(e,t,0).getDate(),l=me({year:e,month:t},this.firstDayOfWeek),c=Me(this.locale),h=[];let u=Array.from({length:l},()=>null);for(let a=1;a<=s;a++)u.push(a),7===u.length&&(h.push(u),u=[]);if(u.length>0){for(;u.length<7;)u.push(null);h.push(u)}return a`
1243
1331
  <div class="mini-month">
1244
1332
  <button
1245
1333
  type="button"
1246
1334
  class="month-label"
1247
1335
  @click=${()=>this._handleMonthClick(e,t)}
1248
1336
  >
1249
- ${ye(t,this.locale)}
1337
+ ${de(t,this.locale)}
1250
1338
  </button>
1251
1339
  <div class="weekday-header">
1252
1340
  <span></span>
1253
- ${o.map(e=>i`<span>${me(e,this.locale).charAt(0)}</span>`)}
1341
+ ${o.map(e=>a`<span>${ce(e,this.locale).charAt(0)}</span>`)}
1254
1342
  </div>
1255
1343
  <div class="day-grid">
1256
- ${c.map(o=>{const s=o.find(e=>null!==e),d=s?u.fromObject({year:e,month:t,day:s}).weekNumber:null;return i`
1257
- ${null!==d?i`<button
1344
+ ${h.map(o=>{const s=o.find(e=>null!==e),l=s?d.fromObject({year:e,month:t,day:s}).weekNumber:null;return a`
1345
+ ${null!==l?a`<button
1258
1346
  type="button"
1259
1347
  class="cw-label"
1260
- aria-label="${l.calendarWeek} ${d}"
1348
+ aria-label="${c.calendarWeek} ${l}"
1261
1349
  @click=${()=>this._handleWeekClick(e,t,s)}
1262
- >${d}</button>`:i`
1350
+ >${l}</button>`:a`
1263
1351
  <span class="empty-cell"></span>
1264
1352
  `}
1265
- ${o.map(o=>null!==o?this._renderDayCell(e,t,o,o===a&&t===n&&e===r,o===this.activeDate.day&&t===this.activeDate.month&&e===this.activeDate.year,this.entrySumByDay[`${e}-${t}-${o}`]??0):i`
1353
+ ${o.map(o=>null!==o?this._renderDayCell(e,t,o,o===r&&t===n&&e===i,o===this.activeDate.day&&t===this.activeDate.month&&e===this.activeDate.year,this.entrySumByDay[`${e}-${t}-${o}`]??0):a`
1266
1354
  <span class="empty-cell"></span>
1267
1355
  `)}
1268
1356
  `})}
1269
1357
  </div>
1270
1358
  </div>
1271
- `}_renderDayCell(e,t,a,n,r,s){const d=["day-cell"];n&&d.push("current"),r&&!n&&d.push("selected");let l="";if("dot"===this.densityMode&&s>0)d.push("has-events");else if("heatmap"===this.densityMode&&s>0){l=`${s<=2?1:s<=5?2:s<=9?3:4}`}return i`
1359
+ `}_renderDayCell(e,t,n,i,o,s){const d=["day-cell"];i&&d.push("current"),o&&!i&&d.push("selected");let l="";if("dot"===this.densityMode&&s>0)d.push("has-events");else if("heatmap"===this.densityMode&&s>0){l=`${s<=2?1:s<=5?2:s<=9?3:4}`}return a`
1272
1360
  <button
1273
1361
  type="button"
1274
1362
  class=${d.join(" ")}
1275
- data-density=${l||o}
1276
- data-date="${e}-${t}-${a}"
1277
- @click=${()=>this._handleDayClick(e,t,a)}
1278
- aria-label="${a} ${ye(t,this.locale)} ${e}${s>0?`, ${s} ${Re(this.locale).events}`:""}"
1363
+ data-density=${l||r}
1364
+ data-date="${e}-${t}-${n}"
1365
+ @click=${()=>this._handleDayClick(e,t,n)}
1366
+ aria-label="${n} ${de(t,this.locale)} ${e}${s>0?`, ${s} ${Me(this.locale).events}`:""}"
1279
1367
  >
1280
- ${a}
1281
- ${"count"===this.densityMode&&s>0?i`<span class="event-count">${s}</span>`:o}
1368
+ ${n}
1369
+ ${"count"===this.densityMode&&s>0?a`<span class="event-count">${s}</span>`:r}
1282
1370
  </button>
1283
- `}_handleDayClick(e,t,a){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:a},drillTarget:this.drillTarget},bubbles:!0,composed:!0}))}_handleWeekClick(e,t,a){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:a},drillTarget:"week"},bubbles:!0,composed:!0}))}_handleMonthClick(e,t){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:1},drillTarget:"month"},bubbles:!0,composed:!0}))}};function ma(e){let t=0,a=0,n=0;if(!e||!e.trim())return["rgb(255,255,255)","rgb(0,0,0)"];const r=(e.startsWith("#")?e:`#${e}`).replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,a,n)=>`#${t}${t}${a}${a}${n}${n}`).substring(1).match(/.{2}/g);if(!r||3!==r.length)return["rgb(255,255,255)","rgb(0,0,0)"];try{if([t,a,n]=r.map(e=>parseInt(e,16)),isNaN(t)||isNaN(a)||isNaN(n))return["rgb(255,255,255)","rgb(0,0,0)"]}catch{return["rgb(255,255,255)","rgb(0,0,0)"]}const i=(299*t+587*a+114*n)/1e3;return[`rgb(${t},${a},${n})`,Math.abs(i-255)>Math.abs(i-0)?"rgb(255, 255, 255)":"rgb(0, 0, 0)"]}pa.styles=n`
1371
+ `}_handleDayClick(e,t,a){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:a},drillTarget:this.drillTarget},bubbles:!0,composed:!0}))}_handleWeekClick(e,t,a){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:a},drillTarget:"week"},bubbles:!0,composed:!0}))}_handleMonthClick(e,t){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:1},drillTarget:"month"},bubbles:!0,composed:!0}))}};ca.styles=e`
1284
1372
  :host {
1285
1373
  display: block;
1286
- contain: content;
1287
- overflow-y: auto;
1374
+ height: 100%;
1375
+ contain: layout style;
1376
+ /* inline-size only: host participates in parent width calculation
1377
+ while still providing width-based container queries */
1288
1378
  container-type: inline-size;
1289
1379
  }
1290
1380
 
1381
+ /* Inner wrapper provides block-axis containment for cqb units
1382
+ and handles scrolling. Its contain: size (implied by container-type: size)
1383
+ is harmless here — it receives dimensions from :host, not the reverse. */
1384
+ .scroll-container {
1385
+ height: 100%;
1386
+ overflow-y: auto;
1387
+ container-type: size;
1388
+ scroll-snap-type: y mandatory;
1389
+ scroll-padding-top: 1em;
1390
+ }
1391
+
1291
1392
  .year-grid {
1292
1393
  display: grid;
1293
1394
  grid-template-columns: repeat(var(--year-grid-columns, 3), 1fr);
1395
+ /* 2 visible rows per snap page. minmax allows growth for
1396
+ 6-week months. Snap targets on every .mini-month give
1397
+ per-row snapping for any column count. */
1398
+ grid-template-rows: repeat(
1399
+ 4,
1400
+ minmax(
1401
+ max(calc((100cqb - 2em - 1.25em) / 2), calc((var(--half-day-height) - 2.25em) / 2)),
1402
+ auto
1403
+ )
1404
+ );
1294
1405
  gap: 1.25em 1em;
1295
1406
  padding: 1em;
1296
1407
  }
@@ -1299,6 +1410,13 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1299
1410
  @container (max-width: 400px) {
1300
1411
  .year-grid {
1301
1412
  grid-template-columns: repeat(var(--year-grid-columns-mobile, 1), 1fr);
1413
+ grid-template-rows: repeat(
1414
+ 12,
1415
+ minmax(
1416
+ max(calc((100cqb - 1.5em - 1em) / 2), calc((var(--half-day-height) - 1.75em) / 2)),
1417
+ auto
1418
+ )
1419
+ );
1302
1420
  gap: 1em 0.75em;
1303
1421
  padding: 0.75em;
1304
1422
  }
@@ -1307,6 +1425,13 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1307
1425
  @container (min-width: 401px) and (max-width: 700px) {
1308
1426
  .year-grid {
1309
1427
  grid-template-columns: repeat(var(--year-grid-columns-tablet, 2), 1fr);
1428
+ grid-template-rows: repeat(
1429
+ 6,
1430
+ minmax(
1431
+ max(calc((100cqb - 2em - 1.25em) / 2), calc((var(--half-day-height) - 2.25em) / 2)),
1432
+ auto
1433
+ )
1434
+ );
1310
1435
  }
1311
1436
  }
1312
1437
 
@@ -1315,6 +1440,9 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1315
1440
  flex-direction: column;
1316
1441
  gap: 0.15em;
1317
1442
  min-width: 0; /* prevent grid blowout */
1443
+ /* Snap target — months sharing a grid row resolve to the
1444
+ same position, so this works for any column count. */
1445
+ scroll-snap-align: start;
1318
1446
  }
1319
1447
 
1320
1448
  .month-label {
@@ -1333,7 +1461,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1333
1461
  }
1334
1462
 
1335
1463
  .month-label:hover {
1336
- color: var(--primary-color, dodgerblue);
1464
+ color: var(--primary-color, #3b82f6);
1337
1465
  }
1338
1466
 
1339
1467
  .weekday-header {
@@ -1374,7 +1502,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1374
1502
  }
1375
1503
 
1376
1504
  .cw-label:hover {
1377
- color: var(--primary-color, dodgerblue);
1505
+ color: var(--primary-color, #3b82f6);
1378
1506
  background: var(--separator-light, rgba(0, 0, 0, 0.06));
1379
1507
  }
1380
1508
 
@@ -1403,9 +1531,9 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1403
1531
  }
1404
1532
 
1405
1533
  .day-cell.current {
1406
- background: var(--primary-color, dodgerblue);
1534
+ background: var(--primary-color, #3b82f6);
1407
1535
  color: white;
1408
- font-weight: bold;
1536
+ font-weight: 600;
1409
1537
  }
1410
1538
 
1411
1539
  .day-cell.current:hover {
@@ -1413,7 +1541,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1413
1541
  }
1414
1542
 
1415
1543
  .day-cell.selected {
1416
- outline: 2px solid var(--primary-color, dodgerblue);
1544
+ outline: 2px solid var(--primary-color, #3b82f6);
1417
1545
  outline-offset: -2px;
1418
1546
  }
1419
1547
 
@@ -1427,7 +1555,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1427
1555
  width: 3px;
1428
1556
  height: 3px;
1429
1557
  border-radius: 50%;
1430
- background: var(--year-dot-color, var(--indicator-color, var(--primary-color, dodgerblue)));
1558
+ background: var(--year-dot-color, var(--indicator-color, var(--primary-color, #3b82f6)));
1431
1559
  }
1432
1560
 
1433
1561
  .day-cell.current.has-events::after {
@@ -1436,21 +1564,21 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1436
1564
 
1437
1565
  /* ── Heatmap density mode ── */
1438
1566
  .day-cell[data-density='1'] {
1439
- background: var(--year-heatmap-1, rgba(30, 144, 255, 0.15));
1567
+ background: var(--year-heatmap-1, rgba(59, 130, 246, 0.15));
1440
1568
  }
1441
1569
  .day-cell[data-density='2'] {
1442
- background: var(--year-heatmap-2, rgba(30, 144, 255, 0.35));
1570
+ background: var(--year-heatmap-2, rgba(59, 130, 246, 0.35));
1443
1571
  }
1444
1572
  .day-cell[data-density='3'] {
1445
- background: var(--year-heatmap-3, rgba(30, 144, 255, 0.55));
1573
+ background: var(--year-heatmap-3, rgba(59, 130, 246, 0.55));
1446
1574
  }
1447
1575
  .day-cell[data-density='4'] {
1448
- background: var(--year-heatmap-4, rgba(30, 144, 255, 0.75));
1576
+ background: var(--year-heatmap-4, rgba(59, 130, 246, 0.75));
1449
1577
  color: white;
1450
1578
  }
1451
1579
 
1452
1580
  .day-cell.current[data-density] {
1453
- background: var(--primary-color, dodgerblue);
1581
+ background: var(--primary-color, #3b82f6);
1454
1582
  }
1455
1583
 
1456
1584
  /* ── Count density mode ── */
@@ -1471,7 +1599,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1471
1599
  .empty-cell {
1472
1600
  /* Grid auto-rows handles height; no explicit size needed */
1473
1601
  }
1474
- `,ya([s({type:Object})],pa.prototype,"activeDate",2),ya([s({type:Number})],pa.prototype,"firstDayOfWeek",2),ya([s({type:String})],pa.prototype,"locale",2),ya([s({type:Object})],pa.prototype,"entrySumByDay",2),ya([s({type:String})],pa.prototype,"drillTarget",2),ya([s({type:String})],pa.prototype,"densityMode",2),pa=ya([d("lms-calendar-year")],pa);class ba{constructor(e={}){this.config={minuteHeight:e.minuteHeight??1,eventMinHeight:e.eventMinHeight??20}}calculateLayout(e){const t=this.eventsToIntervals(e),a=this.calculateGrading(t);return{boxes:this.calculateBoxes(e,a)}}eventsToIntervals(e){return e.map(e=>({start:60*e.startTime.hour+e.startTime.minute,end:60*e.endTime.hour+e.endTime.minute}))}calculateGrading(e){const t=[];return this.findOverlapGroups(e).forEach((a,n)=>{if(1===a.length)t.push({index:a[0],depth:0,group:n});else{const r=a.map(t=>({...e[t],originalIndex:t})),i=r.reduce((e,t)=>t.end-t.start>e.end-e.start?t:e);let o=1;r.forEach(e=>{const a=e.originalIndex===i.originalIndex?0:o++;t.push({index:e.originalIndex,depth:a,group:n})})}}),t.sort((e,t)=>e.index-t.index),t}findOverlapGroups(e){const t=[],a=/* @__PURE__ */new Set;return e.forEach((n,r)=>{if(a.has(r))return;const i=[r];a.add(r);let o=!0;for(;o;)o=!1,e.forEach((t,n)=>{if(a.has(n))return;i.some(a=>this.intervalsOverlap(e[a],t))&&(i.push(n),a.add(n),o=!0)});t.push(i)}),t}intervalsOverlap(e,t){return e.start<t.end&&t.start<e.end}calculateBoxes(e,t){const a=/* @__PURE__ */new Map;return e.forEach((e,n)=>{const r=t[n]||{depth:0,group:n};a.has(r.group)||a.set(r.group,[]),a.get(r.group).push({event:e,index:n,grade:r})}),e.map((e,n)=>{const r=t[n]||{depth:0,group:n},i=60*e.startTime.hour+e.startTime.minute,o=60*e.endTime.hour+e.endTime.minute-i,s=a.get(r.group)||[],d=Math.max(...s.map(e=>e.grade.depth));let l,c;if(1===s.length)l=100,c=0;else{const e=100-65;0===r.depth?(c=0,l=100):(c=d>0?r.depth/d*e:0,l=100-c)}const h=100+r.depth;return{id:e.id,x:c,y:i*this.config.minuteHeight,width:l,height:Math.max(o*this.config.minuteHeight,this.config.eventMinHeight),depth:r.depth,group:r.group,opacity:0===r.depth?.95:Math.max(.85,.95-.05*r.depth),zIndex:h}})}}const ga=new class{constructor(){this._weekIndexCache=null}calculatePosition(e){const{viewMode:t,date:a,time:n,isAllDay:r}=e;switch(t){case"day":return this._calculateDayPosition(a,n,r);case"week":return this._calculateWeekPosition(a,e.activeDate,n,r,e.firstDayOfWeek,e.weekDates);case"month":return this._calculateMonthPosition(a);default:throw new Error(`Unsupported view mode: ${t}`)}}generatePositionCSS(e,t,a){if(e.useAbsolutePosition&&a){const e=60*a.start.hour+a.start.minute,n=60*a.end.hour+a.end.minute;return["position: absolute",`top: calc(${e} * var(--minute-height))`,`height: calc(${Math.max(n-e,20)} * var(--minute-height))`,`width: ${t.width}%`,`left: ${t.x}%`,`z-index: ${t.zIndex}`,`opacity: ${t.opacity}`,"margin-left: 0","grid-column: unset","grid-row: unset"].join("; ")}if(e.useDirectGrid)return`grid-column: ${e.gridColumn||2}; grid-row: ${e.gridRow||"1"}; --entry-width: ${t.width}%; --entry-margin-left: ${t.x}%; --entry-z-index: ${t.zIndex}; --entry-opacity: ${t.opacity};`;return`--start-slot: ${a?this._getGridSlotByTime(a):"1"}; --entry-width: ${t.width}%; --entry-margin-left: ${t.x}%; --entry-z-index: ${t.zIndex}; --entry-opacity: ${t.opacity};`}_calculateDayPosition(e,t,a){if(a)return{slotName:"all-day",useDirectGrid:!1};if(!t)throw new Error("Day view entries must have time information");return{slotName:"timed",useDirectGrid:!1,useAbsolutePosition:!0}}_calculateWeekPosition(e,t,a,n,r,i){const o=i?this.getIndexInDates(e,i):this.getWeekDayIndex(e,t,r??1),s=o+2;if(n)return{slotName:`all-day-${e.year}-${e.month}-${e.day}`,gridColumn:s,gridRow:"1 / 60",useDirectGrid:!1,isAllDay:!0,dayIndex:o};if(!a)throw new Error("Week view timed entries must have time information");return{slotName:`timed-${e.year}-${e.month}-${e.day}`,useDirectGrid:!1,useAbsolutePosition:!0,dayIndex:o}}_calculateMonthPosition(e){return{slotName:`${e.year}-${e.month}-${e.day}`,useDirectGrid:!1}}pxToTime(e,t){const a=parseFloat(getComputedStyle(t).getPropertyValue("--minute-height"))||.8,n=Math.round(e/a),r=Math.max(0,Math.min(n,1439));return{hour:Math.floor(r/60),minute:r%60}}getWeekDayIndex(e,t,a=1){const n=`${t.year}-${t.month}-${t.day}-${a}`;if(!this._weekIndexCache||this._weekIndexCache.key!==n){const e=we(t,a),r=/* @__PURE__ */new Map;e.forEach((e,t)=>r.set(`${e.year}-${e.month}-${e.day}`,t)),this._weekIndexCache={key:n,map:r}}return this._weekIndexCache.map.get(`${e.year}-${e.month}-${e.day}`)??0}getIndexInDates(e,t){const a=t.findIndex(t=>t.year===e.year&&t.month===e.month&&t.day===e.day);return a>=0?a:0}_getGridSlotByTime({start:e,end:t}){const a=60*e.hour+(e.minute+1),n=a+(60*t.hour+t.minute-a);return a===n?`${a}/${n+1}`:`${a}/${n}`}calculateAccessibility(e){const{viewMode:t,date:a,time:n,isAllDay:r,firstDayOfWeek:i}=e;let o=0;if("week"===t&&n&&!r){o=1e4+1e4*this.getWeekDayIndex(a,e.activeDate,i??1)+100*n.start.hour+n.start.minute}else if("day"===t&&n&&!r)o=60*n.start.hour+n.start.minute;else if(r)if("week"===t){o=1e3+this.getWeekDayIndex(a,e.activeDate,i??1)}else o=0;return{tabIndex:o,role:"button",ariaLabel:this._generateAriaLabel(e)}}_generateAriaLabel(e){const{date:t,time:a,isAllDay:n}=e;return`Calendar event on ${`${t.month}/${t.day}/${t.year}`}, ${n||!a?"All day":`${String(a.start.hour).padStart(2,"0")}:${String(a.start.minute).padStart(2,"0")} to ${String(a.end.hour).padStart(2,"0")}:${String(a.end.minute).padStart(2,"0")}`}. Press Enter or Space to open details.`}getPositionDescription(e){const t=this.calculatePosition(e);return t.useDirectGrid?`Direct grid: column ${t.gridColumn}, row ${t.gridRow}`:`Slot: "${t.slotName}"`}validatePosition(e){try{return this.calculatePosition(e),{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}}};class va{constructor(e){this._viewMode="month",this._host=e,e.addController(this);const t=/* @__PURE__ */new Date;this._activeDate={day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()}}hostConnected(){}get viewMode(){return this._viewMode}get activeDate(){return this._activeDate}get expandedDate(){return"day"===this._viewMode?this._activeDate:void 0}setViewMode(e){this._viewMode=e,this._host.requestUpdate()}setActiveDate(e){this._activeDate=e,this._host.requestUpdate()}navigateNext(){const e=this._activeDate;if("month"===this._viewMode){const t=new Date(e.year,e.month,1);this.setActiveDate({day:1,month:t.getMonth()+1,year:t.getFullYear()})}else if("week"===this._viewMode){const t=new Date(e.year,e.month-1,e.day);t.setDate(t.getDate()+7),this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("day"===this._viewMode){const t=new Date(e.year,e.month-1,e.day+1);this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("year"===this._viewMode){const t=new Date(e.year+1,e.month-1,1),a=new Date(t.getFullYear(),e.month-1,e.day);a.getMonth()!==e.month-1&&a.setDate(0),this.setActiveDate({day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()})}}navigatePrevious(){const e=this._activeDate;if("month"===this._viewMode){const t=new Date(e.year,e.month-2,1);this.setActiveDate({day:1,month:t.getMonth()+1,year:t.getFullYear()})}else if("week"===this._viewMode){const t=new Date(e.year,e.month-1,e.day);t.setDate(t.getDate()-7),this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("day"===this._viewMode){const t=new Date(e.year,e.month-1,e.day-1);this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("year"===this._viewMode){const t=new Date(e.year-1,e.month-1,1),a=new Date(t.getFullYear(),e.month-1,e.day);a.getMonth()!==e.month-1&&a.setDate(0),this.setActiveDate({day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()})}}jumpToToday(){const e=/* @__PURE__ */new Date;this.setActiveDate({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})}switchToMonthView(){this.setViewMode("month")}switchToWeekView(){this.setViewMode("week")}switchToDayView(){this.setViewMode("day")}switchToYearView(){this.setViewMode("year")}}function wa(e,t,a){return getComputedStyle(e).getPropertyValue(t).trim()||a}function Da(e,t,a){return Math.max(t,Math.min(a,e))}function ka(e,t,a,n){const r=parseInt(wa(n,"--week-day-count","7"),10),i=Da(Number.isNaN(r)?7:r,1,7),o=parseInt(wa(n,"--week-mobile-day-count","3"),10),s=Da(Number.isNaN(o)?3:o,1,7),d=parseInt(wa(n,"--week-mobile-breakpoint","768"),10),l=a<(Number.isNaN(d)?768:d)?s:i,c=we(e,t);if(l>=7)return{weekDates:c,visibleDates:c,visibleStartIndex:0,visibleLength:7,isCondensed:!1,gridColumns:"var(--time-column-width) repeat(7, 1fr)"};const h=function(e,t){const a=e.findIndex(e=>e.year===t.year&&e.month===t.month&&e.day===t.day);return a>=0?a:0}(c,e),u=function(e,t){return Da(e-Math.floor((t-1)/2),0,7-t)}(h,l),f=c.slice(u,u+l);return{weekDates:c,visibleDates:f,visibleStartIndex:u,visibleLength:l,isCondensed:!0,gridColumns:`var(--time-column-width) repeat(${l}, 1fr)`}}var xa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,Ea=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?$a(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&xa(t,a,i),i};let Sa=class extends r{constructor(){super(...arguments),this.firstDayOfWeek=1,this.locale="undefined"!=typeof document&&document.documentElement.lang||"en",this.yearDrillTarget="month",this.yearDensityMode="dot",this._viewState=new va(this),this.entries=[],this.color="#000000",this._calendarWidth="undefined"!=typeof window&&window.innerWidth||1024,this._menuOpen=!1,this._processedEntries=[],this._expandedEntries=[],this._monthViewSorted=[],this._entrySumByDay={},this._expandedByISODate=/* @__PURE__ */new Map,this._layoutCache=/* @__PURE__ */new Map,this._allDayLayoutCache=/* @__PURE__ */new Map,this._layoutCalculator=new ba({timeColumnWidth:80,minuteHeight:1,eventMinHeight:20,cascadeOffset:15,paddingLeft:10}),this._handleResize=e=>{const[t]=e;this._calendarWidth=t.contentRect.width||this._calendarWidth},this._resizeController=new m(this,{target:null,callback:this._handleResize,skipInitial:!0}),this._handleClickOutside=e=>{if(!this._menuOpen)return;const t=e.composedPath(),a=this.shadowRoot?.querySelector("lms-menu"),n=a&&t.includes(a),r=t.some(e=>e instanceof HTMLElement&&"LMS-CALENDAR-ENTRY"===e.tagName);n||r||this._closeMenuAndClearSelections()},this._handleEscape=e=>{"Escape"===e.key&&this._menuOpen&&this._closeMenuAndClearSelections()}}get activeDate(){return this._viewState.activeDate}set activeDate(e){this._viewState.setActiveDate(e)}get _expandedDate(){return this._viewState.expandedDate}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutside,!0),document.removeEventListener("keydown",this._handleEscape)}updated(e){e.has("_menuOpen")&&(this._menuOpen?(document.addEventListener("click",this._handleClickOutside,!0),document.addEventListener("keydown",this._handleEscape)):(document.removeEventListener("click",this._handleClickOutside,!0),document.removeEventListener("keydown",this._handleEscape)))}_closeMenuAndClearSelections(){this._menuOpen=!1,this._menuEventDetails=void 0,this._returnFocusToTrigger(),this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e.clearSelection()})}_returnFocusToTrigger(){this._menuTriggerEntry&&(this._menuTriggerEntry.focus(),this._menuTriggerEntry=void 0)}firstUpdated(e){const t=this.shadowRoot?.firstElementChild;t&&this._resizeController.observe(t)}willUpdate(e){if(e.has("entries")){if(!this.entries.length)return this._processedEntries=[],void this._clearEntryCaches();this._processedEntries=w(this.entries,function(...e){return g(_,e,T)}(e=>!e.time||f.fromDateTimes(u.fromObject(O(e.date.start,e.time.start)),u.fromObject(O(e.date.end,e.time.end))).isValid),function(...e){return g(R,e)}((e,t)=>{const a=e.time?.start.hour??0,n=t.time?.start.hour??0,r=e.time?.start.minute??0,i=t.time?.start.minute??0;return a-n||r-i})),this._computeEntryCaches()}}_clearEntryCaches(){this._expandedEntries=[],this._monthViewSorted=[],this._entrySumByDay={},this._expandedByISODate.clear(),this._layoutCache.clear(),this._allDayLayoutCache.clear()}_computeEntryCaches(){this._expandedEntries=this._processedEntries.flatMap((e,t)=>this._expandEntryMaybe({entry:e,range:this._getDaysRange(e.date),originalIndex:t})),this._expandedByISODate.clear();for(const e of this._expandedEntries){const{year:t,month:a,day:n}=e.date.start,r=`${t}-${String(a).padStart(2,"0")}-${String(n).padStart(2,"0")}`;let i=this._expandedByISODate.get(r);i||(i=[],this._expandedByISODate.set(r,i)),i.push(e)}this._monthViewSorted=w(this._expandedEntries,function(...e){return $(N,e)}(e=>e.continuation?.has||!1?e.originalIndex-1e3:e.originalIndex),function(...e){return g(C,e,A)}(e=>{const[t]=ma(e.color);return{entry:e,background:t,originalIndex:e.originalIndex}})),this._entrySumByDay={};for(const e of this._expandedEntries){const t=`${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`;this._entrySumByDay[t]=(this._entrySumByDay[t]??0)+1}this._layoutCache.clear(),this._allDayLayoutCache.clear()}render(){const e=this._viewState.viewMode,t=this._viewState.activeDate;return i`
1602
+ `,la([n({type:Object})],ca.prototype,"activeDate",2),la([n({type:Number})],ca.prototype,"firstDayOfWeek",2),la([n({type:String})],ca.prototype,"locale",2),la([n({type:Object})],ca.prototype,"entrySumByDay",2),la([n({type:String})],ca.prototype,"drillTarget",2),la([n({type:String})],ca.prototype,"densityMode",2),ca=la([i("lms-calendar-year")],ca);class ha{constructor(e={}){this.config={minuteHeight:e.minuteHeight??1,eventMinHeight:e.eventMinHeight??20}}calculateLayout(e){const t=this.eventsToIntervals(e),a=this.calculateGrading(t);return{boxes:this.calculateBoxes(e,a)}}eventsToIntervals(e){return e.map(e=>({start:60*e.startTime.hour+e.startTime.minute,end:60*e.endTime.hour+e.endTime.minute}))}calculateGrading(e){const t=[];return this.findOverlapGroups(e).forEach((a,r)=>{if(1===a.length)t.push({index:a[0],depth:0,group:r});else{const n=a.map(t=>({...e[t],originalIndex:t})),i=n.reduce((e,t)=>t.end-t.start>e.end-e.start?t:e);let o=1;n.forEach(e=>{const a=e.originalIndex===i.originalIndex?0:o++;t.push({index:e.originalIndex,depth:a,group:r})})}}),t.sort((e,t)=>e.index-t.index),t}findOverlapGroups(e){const t=[],a=/* @__PURE__ */new Set;return e.forEach((r,n)=>{if(a.has(n))return;const i=[n];a.add(n);let o=!0;for(;o;)o=!1,e.forEach((t,r)=>{if(a.has(r))return;i.some(a=>this.intervalsOverlap(e[a],t))&&(i.push(r),a.add(r),o=!0)});t.push(i)}),t}intervalsOverlap(e,t){return e.start<t.end&&t.start<e.end}calculateBoxes(e,t){const a=/* @__PURE__ */new Map;return e.forEach((e,r)=>{const n=t[r]||{depth:0,group:r};a.has(n.group)||a.set(n.group,[]),a.get(n.group).push({event:e,index:r,grade:n})}),e.map((e,r)=>{const n=t[r]||{depth:0,group:r},i=60*e.startTime.hour+e.startTime.minute,o=60*e.endTime.hour+e.endTime.minute-i,s=a.get(n.group)||[],d=Math.max(...s.map(e=>e.grade.depth));let l,c;if(1===s.length)l=100,c=0;else{const e=100-65;0===n.depth?(c=0,l=100):(c=d>0?n.depth/d*e:0,l=100-c)}const h=100+n.depth;return{id:e.id,x:c,y:i*this.config.minuteHeight,width:l,height:Math.max(o*this.config.minuteHeight,this.config.eventMinHeight),depth:n.depth,group:n.group,opacity:0===n.depth?.95:Math.max(.85,.95-.05*n.depth),zIndex:h}})}}const ua=new class{constructor(){this._weekIndexCache=null}calculatePosition(e){const{viewMode:t,date:a,time:r,isAllDay:n}=e;switch(t){case"day":return this._calculateDayPosition(a,r,n);case"week":return this._calculateWeekPosition(a,e.activeDate,r,n,e.firstDayOfWeek,e.weekDates);case"month":return this._calculateMonthPosition(a);default:throw new Error(`Unsupported view mode: ${t}`)}}generatePositionCSS(e,t,a){if(e.useAbsolutePosition&&a){const e=60*a.start.hour+a.start.minute,r=60*a.end.hour+a.end.minute;return["position: absolute",`top: calc(${e} * var(--minute-height))`,`height: calc(${Math.max(r-e,20)} * var(--minute-height))`,`width: ${t.width}%`,`left: ${t.x}%`,`z-index: ${t.zIndex}`,`opacity: ${t.opacity}`,"margin-left: 0","grid-column: unset","grid-row: unset"].join("; ")}if(e.useDirectGrid)return`grid-column: ${e.gridColumn||2}; grid-row: ${e.gridRow||"1"}; --entry-width: ${t.width}%; --entry-margin-left: ${t.x}%; --entry-z-index: ${t.zIndex}; --entry-opacity: ${t.opacity};`;return`--start-slot: ${a?this._getGridSlotByTime(a):"1"}; --entry-width: ${t.width}%; --entry-margin-left: ${t.x}%; --entry-z-index: ${t.zIndex}; --entry-opacity: ${t.opacity};`}_calculateDayPosition(e,t,a){if(a)return{slotName:"all-day",useDirectGrid:!1};if(!t)throw new Error("Day view entries must have time information");return{slotName:"timed",useDirectGrid:!1,useAbsolutePosition:!0}}_calculateWeekPosition(e,t,a,r,n,i){const o=i?this.getIndexInDates(e,i):this.getWeekDayIndex(e,t,n??1),s=o+2;if(r)return{slotName:`all-day-${e.year}-${e.month}-${e.day}`,gridColumn:s,gridRow:"1 / 60",useDirectGrid:!1,isAllDay:!0,dayIndex:o};if(!a)throw new Error("Week view timed entries must have time information");return{slotName:`timed-${e.year}-${e.month}-${e.day}`,useDirectGrid:!1,useAbsolutePosition:!0,dayIndex:o}}_calculateMonthPosition(e){return{slotName:`${e.year}-${e.month}-${e.day}`,useDirectGrid:!1}}pxToTime(e,t){const a=parseFloat(getComputedStyle(t).getPropertyValue("--minute-height"))||.8,r=Math.round(e/a),n=Math.max(0,Math.min(r,1439));return{hour:Math.floor(n/60),minute:n%60}}getWeekDayIndex(e,t,a=1){const r=`${t.year}-${t.month}-${t.day}-${a}`;if(!this._weekIndexCache||this._weekIndexCache.key!==r){const e=ye(t,a),n=/* @__PURE__ */new Map;e.forEach((e,t)=>n.set(`${e.year}-${e.month}-${e.day}`,t)),this._weekIndexCache={key:r,map:n}}return this._weekIndexCache.map.get(`${e.year}-${e.month}-${e.day}`)??0}getIndexInDates(e,t){const a=t.findIndex(t=>t.year===e.year&&t.month===e.month&&t.day===e.day);return a>=0?a:0}_getGridSlotByTime({start:e,end:t}){const a=60*e.hour+(e.minute+1),r=a+(60*t.hour+t.minute-a);return a===r?`${a}/${r+1}`:`${a}/${r}`}calculateAccessibility(e){const{viewMode:t,date:a,time:r,isAllDay:n,firstDayOfWeek:i}=e;let o=0;if("week"===t&&r&&!n){o=1e4+1e4*this.getWeekDayIndex(a,e.activeDate,i??1)+100*r.start.hour+r.start.minute}else if("day"===t&&r&&!n)o=60*r.start.hour+r.start.minute;else if(n)if("week"===t){o=1e3+this.getWeekDayIndex(a,e.activeDate,i??1)}else o=0;return{tabIndex:o,role:"button",ariaLabel:this._generateAriaLabel(e)}}_generateAriaLabel(e){const{date:t,time:a,isAllDay:r,locale:n="en"}=e,i=Me(n),o=fe(t.day,t.month,t.year,n),s=r||!a?i.allDay:`${ue(a.start.hour,a.start.minute,n)} ${i.to} ${ue(a.end.hour,a.end.minute,n)}`;return`${i.calendarEvent}: ${o}, ${s}. ${i.pressToOpen}`}getPositionDescription(e){const t=this.calculatePosition(e);return t.useDirectGrid?`Direct grid: column ${t.gridColumn}, row ${t.gridRow}`:`Slot: "${t.slotName}"`}validatePosition(e){try{return this.calculatePosition(e),{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}}};class fa{constructor(e){this._viewMode="month",this._host=e,e.addController(this);const t=/* @__PURE__ */new Date;this._activeDate={day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()}}hostConnected(){}get viewMode(){return this._viewMode}get activeDate(){return this._activeDate}get expandedDate(){return"day"===this._viewMode?this._activeDate:void 0}setViewMode(e){this._viewMode=e,this._host.requestUpdate()}setActiveDate(e){this._activeDate=e,this._host.requestUpdate()}navigateNext(){const e=this._activeDate;if("month"===this._viewMode){const t=new Date(e.year,e.month,1);this.setActiveDate({day:1,month:t.getMonth()+1,year:t.getFullYear()})}else if("week"===this._viewMode){const t=new Date(e.year,e.month-1,e.day);t.setDate(t.getDate()+7),this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("day"===this._viewMode){const t=new Date(e.year,e.month-1,e.day+1);this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("year"===this._viewMode){const t=new Date(e.year+1,e.month-1,1),a=new Date(t.getFullYear(),e.month-1,e.day);a.getMonth()!==e.month-1&&a.setDate(0),this.setActiveDate({day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()})}}navigatePrevious(){const e=this._activeDate;if("month"===this._viewMode){const t=new Date(e.year,e.month-2,1);this.setActiveDate({day:1,month:t.getMonth()+1,year:t.getFullYear()})}else if("week"===this._viewMode){const t=new Date(e.year,e.month-1,e.day);t.setDate(t.getDate()-7),this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("day"===this._viewMode){const t=new Date(e.year,e.month-1,e.day-1);this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("year"===this._viewMode){const t=new Date(e.year-1,e.month-1,1),a=new Date(t.getFullYear(),e.month-1,e.day);a.getMonth()!==e.month-1&&a.setDate(0),this.setActiveDate({day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()})}}jumpToToday(){const e=/* @__PURE__ */new Date;this.setActiveDate({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})}switchToMonthView(){this.setViewMode("month")}switchToWeekView(){this.setViewMode("week")}switchToDayView(){this.setViewMode("day")}switchToYearView(){this.setViewMode("year")}}function pa(e,t,a){return getComputedStyle(e).getPropertyValue(t).trim()||a}function ya(e,t,a){return Math.max(t,Math.min(a,e))}function ma(e,t,a,r){const n=parseInt(pa(r,"--week-day-count","7"),10),i=ya(Number.isNaN(n)?7:n,1,7),o=parseInt(pa(r,"--week-mobile-day-count","3"),10),s=ya(Number.isNaN(o)?3:o,1,7),d=parseInt(pa(r,"--week-mobile-breakpoint","768"),10),l=a<(Number.isNaN(d)?768:d)?s:i,c=ye(e,t);if(l>=7)return{weekDates:c,visibleDates:c,visibleStartIndex:0,visibleLength:7,isCondensed:!1,gridColumns:"var(--time-column-width) repeat(7, 1fr)"};const h=function(e,t){const a=e.findIndex(e=>e.year===t.year&&e.month===t.month&&e.day===t.day);return a>=0?a:0}(c,e),u=function(e,t){return ya(e-Math.floor((t-1)/2),0,7-t)}(h,l),f=c.slice(u,u+l);return{weekDates:c,visibleDates:f,visibleStartIndex:u,visibleLength:l,isCondensed:!0,gridColumns:`var(--time-column-width) repeat(${l}, 1fr)`}}var ba=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,va=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?ga(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(i=(r?n(t,a,i):n(i))||i);return r&&i&&ba(t,a,i),i};let wa=class extends t{constructor(){super(...arguments),this.firstDayOfWeek=1,this.locale="undefined"!=typeof document&&document.documentElement.lang||"en",this.yearDrillTarget="month",this.yearDensityMode="dot",this._viewState=new fa(this),this.entries=[],this.color="#000000",this._calendarWidth="undefined"!=typeof window&&window.innerWidth||1024,this._menuOpen=!1,this._processedEntries=[],this._expandedEntries=[],this._monthViewSorted=[],this._entrySumByDay={},this._expandedByISODate=/* @__PURE__ */new Map,this._layoutCache=/* @__PURE__ */new Map,this._allDayLayoutCache=/* @__PURE__ */new Map,this._layoutCalculator=new ha({minuteHeight:1,eventMinHeight:20}),this._handleClickOutside=e=>{if(!this._menuOpen)return;const t=e.composedPath(),a=this.shadowRoot?.querySelector("lms-menu"),r=a&&t.includes(a),n=t.some(e=>e instanceof HTMLElement&&"LMS-CALENDAR-ENTRY"===e.tagName);r||n||this._closeMenuAndClearSelections()},this._handleEscape=e=>{"Escape"===e.key&&this._menuOpen&&this._closeMenuAndClearSelections()}}get activeDate(){return this._viewState.activeDate}set activeDate(e){this._viewState.setActiveDate(e)}get _expandedDate(){return this._viewState.expandedDate}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),document.removeEventListener("click",this._handleClickOutside,!0),document.removeEventListener("keydown",this._handleEscape)}updated(e){e.has("_menuOpen")&&(this._menuOpen?(document.addEventListener("click",this._handleClickOutside,!0),document.addEventListener("keydown",this._handleEscape)):(document.removeEventListener("click",this._handleClickOutside,!0),document.removeEventListener("keydown",this._handleEscape)))}_closeMenuAndClearSelections(){this._menuOpen=!1,this._menuEventDetails=void 0,this._returnFocusToTrigger(),this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e.clearSelection()})}_returnFocusToTrigger(){this._menuTriggerEntry&&(this._menuTriggerEntry.focus(),this._menuTriggerEntry=void 0)}firstUpdated(e){const t=this.shadowRoot?.firstElementChild;t&&(this._resizeObserver=new ResizeObserver(([e])=>{const t=e.contentRect.width;t>0&&t!==this._calendarWidth&&(this._calendarWidth=t)}),this._resizeObserver.observe(t))}willUpdate(e){if(e.has("entries")){if(!this.entries.length)return this._processedEntries=[],void this._clearEntryCaches();this._processedEntries=p(this.entries,function(...e){return u(D,e,k)}(e=>!e.time||l.fromDateTimes(d.fromObject(S(e.date.start,e.time.start)),d.fromObject(S(e.date.end,e.time.end))).isValid),function(...e){return u(T,e)}((e,t)=>{const a=e.time?.start.hour??0,r=t.time?.start.hour??0,n=e.time?.start.minute??0,i=t.time?.start.minute??0;return a-r||n-i})),this._computeEntryCaches()}}_clearEntryCaches(){this._expandedEntries=[],this._monthViewSorted=[],this._entrySumByDay={},this._expandedByISODate.clear(),this._layoutCache.clear(),this._allDayLayoutCache.clear()}_computeEntryCaches(){this._expandedEntries=this._processedEntries.flatMap((e,t)=>this._expandEntryMaybe({entry:e,range:this._getDaysRange(e.date),originalIndex:t})),this._expandedByISODate.clear();for(const e of this._expandedEntries){const{year:t,month:a,day:r}=e.date.start,n=`${t}-${String(a).padStart(2,"0")}-${String(r).padStart(2,"0")}`;let i=this._expandedByISODate.get(n);i||(i=[],this._expandedByISODate.set(n,i)),i.push(e)}this._monthViewSorted=p(this._expandedEntries,function(...e){return g(M,e)}(e=>e.continuation?.has||!1?e.originalIndex-1e3:e.originalIndex),function(...e){return u($,e,E)}(e=>{const[t]=function(e){let t=0,a=0,r=0;if(!e||!e.trim())return["rgb(255,255,255)","rgb(0,0,0)"];const n=(e.startsWith("#")?e:`#${e}`).replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,a,r)=>`#${t}${t}${a}${a}${r}${r}`).substring(1).match(/.{2}/g);if(!n||3!==n.length)return["rgb(255,255,255)","rgb(0,0,0)"];try{if([t,a,r]=n.map(e=>parseInt(e,16)),isNaN(t)||isNaN(a)||isNaN(r))return["rgb(255,255,255)","rgb(0,0,0)"]}catch{return["rgb(255,255,255)","rgb(0,0,0)"]}const i=(299*t+587*a+114*r)/1e3;return[`rgb(${t},${a},${r})`,Math.abs(i-255)>Math.abs(i-0)?"rgb(255, 255, 255)":"rgb(0, 0, 0)"]}(e.color);return{entry:e,background:t,originalIndex:e.originalIndex}})),this._entrySumByDay={};for(const e of this._expandedEntries){const t=`${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`;this._entrySumByDay[t]=(this._entrySumByDay[t]??0)+1}this._layoutCache.clear(),this._allDayLayoutCache.clear()}render(){const e=this._viewState.viewMode,t=this._viewState.activeDate;return a`
1475
1603
  <div class="calendar-container">
1476
1604
  <header>
1477
1605
  <lms-calendar-header
@@ -1487,8 +1615,8 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1487
1615
  </lms-calendar-header>
1488
1616
  </header>
1489
1617
 
1490
- <main role="region" aria-live="polite" aria-label="${Re(this.locale)[e]} ${Re(this.locale).viewLabel}" style=${c("year"===e?"overflow-y: auto":void 0)}>
1491
- ${"month"===e?i`
1618
+ <main role="region" aria-live="polite" aria-label="${Me(this.locale)[e]} ${Me(this.locale).viewLabel}">
1619
+ ${"month"===e?a`
1492
1620
  <lms-calendar-context
1493
1621
  .firstDayOfWeek=${this.firstDayOfWeek}
1494
1622
  .locale=${this.locale}
@@ -1504,36 +1632,38 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1504
1632
  >
1505
1633
  ${this._calendarWidth<768?this._renderEntriesSumByDay():this._renderEntries()}
1506
1634
  </lms-calendar-month>
1507
- `:o}
1508
- ${"week"===e?(()=>{const e=ka(t,this.firstDayOfWeek,this._calendarWidth,this),a=this._renderEntriesByDate(e);return i`
1635
+ `:r}
1636
+ ${"week"===e?(()=>{const e=ma(t,this.firstDayOfWeek,this._calendarWidth,this),r=this._renderEntriesByDate(e);return a`
1509
1637
  <lms-calendar-week
1510
1638
  @expand=${this._handleExpand}
1511
1639
  @peek-navigate=${this._handlePeekNavigate}
1512
1640
  @open-menu=${this._handleOpenMenu}
1513
1641
  @clear-other-selections=${this._handleClearOtherSelections}
1514
1642
  .activeDate=${t}
1515
- .allDayRowCount=${a.allDayRowCount}
1643
+ .allDayRowCount=${r.allDayRowCount}
1516
1644
  .firstDayOfWeek=${this.firstDayOfWeek}
1517
1645
  .locale=${this.locale}
1518
1646
  .visibleDates=${e.visibleDates}
1519
1647
  .visibleStartIndex=${e.visibleStartIndex}
1520
1648
  .visibleLength=${e.visibleLength}
1521
- style=${h({"--calendar-grid-columns-week":e.gridColumns})}
1649
+ style=${s({"--calendar-grid-columns-week":e.gridColumns})}
1522
1650
  >
1523
- ${a.elements}
1651
+ ${r.elements}
1524
1652
  </lms-calendar-week>
1525
- `})():o}
1526
- ${"day"===e?(()=>{const e=this._renderEntriesByDate();return i`
1653
+ `})():r}
1654
+ ${"day"===e?(()=>{const e=this._renderEntriesByDate();return a`
1527
1655
  <lms-calendar-day
1528
1656
  @open-menu=${this._handleOpenMenu}
1529
1657
  @clear-other-selections=${this._handleClearOtherSelections}
1530
1658
  .allDayRowCount=${e.allDayRowCount}
1659
+ .activeDate=${t}
1660
+ .firstDayOfWeek=${this.firstDayOfWeek}
1531
1661
  .locale=${this.locale}
1532
1662
  >
1533
1663
  ${e.elements}
1534
1664
  </lms-calendar-day>
1535
- `})():o}
1536
- ${"year"===e?i`
1665
+ `})():r}
1666
+ ${"year"===e?a`
1537
1667
  <lms-calendar-year
1538
1668
  @expand=${this._handleExpand}
1539
1669
  .activeDate=${t}
@@ -1543,7 +1673,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1543
1673
  .drillTarget=${this.yearDrillTarget}
1544
1674
  .densityMode=${this.yearDensityMode}
1545
1675
  ></lms-calendar-year>
1546
- `:o}
1676
+ `:r}
1547
1677
  </main>
1548
1678
 
1549
1679
  <lms-menu
@@ -1554,15 +1684,15 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1554
1684
  @menu-close=${this._handleMenuClose}
1555
1685
  ></lms-menu>
1556
1686
  </div>
1557
- `}_handleSwitchDate(e){"next"===e.detail.direction?this._viewState.navigateNext():"previous"===e.detail.direction&&this._viewState.navigatePrevious()}_handleSwitchView(e){return oe(e.detail.view).with("day",()=>this._viewState.switchToDayView()).with("week",()=>this._viewState.switchToWeekView()).with("month",()=>this._viewState.switchToMonthView()).with("year",()=>this._viewState.switchToYearView()).otherwise(()=>{})}_handleJumpToday(e){this._viewState.jumpToToday()}_handlePeekNavigate(e){this._viewState.setActiveDate(e.detail.date)}_handleExpand(e){this._viewState.setActiveDate(e.detail.date);const t=e.detail.drillTarget||"day";"month"===t?this._viewState.switchToMonthView():"week"===t?this._viewState.switchToWeekView():this._viewState.switchToDayView()}_handleOpenMenu(e){const t=e.target;this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e!==t&&e.clearSelection()}),this._menuTriggerEntry=t,this.openMenu(e.detail)}_handleClearOtherSelections(e){const t=e.detail.exceptEntry;this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e!==t&&e.clearSelection()})}_handleMenuClose(){this._menuOpen=!1,this._menuEventDetails=void 0,this._returnFocusToTrigger()}openMenu(e){this._menuEventDetails=e,this._menuOpen=!0}_composeEntry({index:e,slot:t,inlineStyle:a,entry:n,isContinuation:r=!1,density:o,displayMode:s="default",floatText:d=!1,spanClass:l}){const c=o||this._determineDensity(n,void 0,void 0);return i`
1687
+ `}_handleSwitchDate(e){"next"===e.detail.direction?this._viewState.navigateNext():"previous"===e.detail.direction&&this._viewState.navigatePrevious()}_handleSwitchView(e){return ee(e.detail.view).with("day",()=>this._viewState.switchToDayView()).with("week",()=>this._viewState.switchToWeekView()).with("month",()=>this._viewState.switchToMonthView()).with("year",()=>this._viewState.switchToYearView()).otherwise(()=>{})}_handleJumpToday(e){this._viewState.jumpToToday()}_handlePeekNavigate(e){this._viewState.setActiveDate(e.detail.date)}_handleExpand(e){this._viewState.setActiveDate(e.detail.date);const t=e.detail.drillTarget||"day";"month"===t?this._viewState.switchToMonthView():"week"===t?this._viewState.switchToWeekView():this._viewState.switchToDayView()}_handleOpenMenu(e){const t=e.target;this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e!==t&&e.clearSelection()}),this._menuTriggerEntry=t,this.openMenu(e.detail)}_handleClearOtherSelections(e){const t=e.detail.exceptEntry;this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e!==t&&e.clearSelection()})}_handleMenuClose(){this._menuOpen=!1,this._menuEventDetails=void 0,this._returnFocusToTrigger()}openMenu(e){this._menuEventDetails=e,this._menuOpen=!0}_composeEntry({index:e,slot:t,inlineStyle:r,entry:n,isContinuation:i=!1,density:o,displayMode:s="default",floatText:d=!1,spanClass:l}){const c=o||this._determineDensity(n,void 0,void 0);return a`
1558
1688
  <lms-calendar-entry
1559
1689
  class=${`_${e}${l?` ${l}`:""}`}
1560
1690
  slot=${t}
1561
- style=${a}
1691
+ style=${r}
1562
1692
  .time=${n.time}
1563
1693
  .heading=${n.heading??""}
1564
1694
  .content=${n.content}
1565
- .isContinuation=${r??!1}
1695
+ .isContinuation=${i??!1}
1566
1696
  .date=${n.date}
1567
1697
  .density=${c}
1568
1698
  .displayMode=${s}
@@ -1571,12 +1701,14 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1571
1701
  .locale=${this.locale}
1572
1702
  >
1573
1703
  </lms-calendar-entry>
1574
- `}_determineDensity(e,t,a){if(!e.time)return"compact";if(t&&void 0!==a&&t[a])return"standard";const n=60*(e.time.end.hour-e.time.start.hour)+(e.time.end.minute-e.time.start.minute);return n<30?"compact":n>120&&e.content?"full":"standard"}_expandEntryMaybe({entry:e,range:t,originalIndex:a}){return Array.from({length:t[2]},(n,r)=>{const i=u.fromJSDate(t[0]).plus({days:r}),o=i.plus({days:1}).minus({seconds:1});return{...e,date:{start:i.toObject(),end:o.toObject()},isContinuation:r>0,continuation:{has:t[2]>1,is:r>0,index:r,total:t[2]},originalStartDate:e.date?.start,originalIndex:a}})}_createConsistentEventId(e){const t=e.originalStartDate||e.date?.start;return t?`${e.heading||"unknown"}-${t.year}-${t.month}-${t.day}-${e.time?.start.hour||0}-${e.time?.start.minute||0}`:`${e.heading||"unknown"}-fallback`}_renderEntries(){return this._monthViewSorted.length?this._monthViewSorted.map(({entry:e,background:t,originalIndex:a})=>{const n=e.isContinuation||e.continuation?.has||!1?"all-day-":"";return this._composeEntry({index:a,slot:`${n}${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`,inlineStyle:`--entry-color: ${t}; --entry-background-color: ${t}; z-index: ${100+a}`,entry:{time:e.time,heading:e.heading,content:e.content,date:e.date,isContinuation:e.isContinuation||!1,continuation:e.continuation},density:this._determineDensity({time:e.time,heading:e.heading,content:e.content},void 0,void 0),displayMode:"month-dot"})}):o}_renderEntriesByDate(e){const t=this._viewState.activeDate,a=this._viewState.viewMode;if("day"!==a&&"week"!==a)return{elements:o,allDayRowCount:0};let n;if("day"===a){const e=`${t.year}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`;n=this._expandedByISODate.get(e)??[]}else{n=(e?.visibleDates??we(t,this.firstDayOfWeek)).flatMap(e=>{const t=`${e.year}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`;return this._expandedByISODate.get(t)??[]})}const r=[],i=[];for(const o of n)(this._isEffectivelyAllDay(o)?r:i).push(o);return i.length||r.length?this._renderEntriesWithSlotManager(a,t,r,i,e):{elements:o,allDayRowCount:0}}_renderEntriesWithSlotManager(e,t,a,n,r){const i=[];if(n.length>0){const a=new Map(n.map((e,t)=>[e,t]));if("week"===e){const o=function(...e){return g(M,e)}(n,e=>`${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`),s=r?.isCondensed?r.visibleDates:void 0,d=s??we(t,this.firstDayOfWeek);for(const n of d){const r=o[`${n.year}-${n.month}-${n.day}`];if(!r?.length)continue;const d=this._renderDayEntriesWithSlotManager(r,e,t,a,s);i.push(...d)}}else{const r=this._renderDayEntriesWithSlotManager(n,e,t,a);i.push(...r)}}const o=r?.isCondensed?r.visibleDates:void 0,s="week"===e?`${t.year}-${t.month}-${t.day}-${this.firstDayOfWeek}-${r?.visibleStartIndex??0}-${r?.visibleLength??7}`:`day-${t.year}-${t.month}-${t.day}`;let d=this._allDayLayoutCache.get(s);if(!d){const n=a.map(a=>({id:this._createConsistentEventId(a),days:["week"===e?o?ga.getIndexInDates(a.date.start,o):ga.getWeekDayIndex(a.date.start,t,this.firstDayOfWeek):0],isMultiDay:a.continuation?.is||a.continuation?.has||!1})),r=/* @__PURE__ */new Map;n.forEach(e=>{const t=r.get(e.id);t?t.days.push(...e.days):r.set(e.id,{...e,days:[...e.days]})});const{rowAssignments:i,totalRows:l}=function(e){const t=/* @__PURE__ */new Map;if(0===e.length)return{rowAssignments:t,totalRows:0};const a=[],n=[];e.forEach(e=>{e.isMultiDay?a.push(e):n.push(e)}),a.sort((e,t)=>{const a=Math.min(...e.days),n=Math.min(...t.days);return a!==n?a-n:e.id.localeCompare(t.id)}),n.sort((e,t)=>Math.min(...e.days)-Math.min(...t.days));const r=/* @__PURE__ */new Map;for(let o=0;o<7;o++)r.set(o,/* @__PURE__ */new Set);a.forEach(e=>{let a=0,n=!1;for(;!n;){let i=!0;for(const t of e.days)if(r.get(t)?.has(a)){i=!1;break}if(i){n=!0,t.set(e.id,a);for(const t of e.days)r.get(t)?.add(a)}else a++}}),n.forEach(e=>{const a=e.days[0];let n=0;for(;r.get(a)?.has(n);)n++;t.set(e.id,n),r.get(a)?.add(n)});let i=0;return r.forEach(e=>{i=Math.max(i,e.size)}),{rowAssignments:t,totalRows:i}}(Array.from(r.values()));d={rowAssignments:i,mergedEvents:r,totalRows:l},this._allDayLayoutCache.set(s,d)}const{rowAssignments:l,mergedEvents:c,totalRows:h}=d;return{elements:[...a.map((a,r)=>{const[i,s]=ma(a.color),d=this._createConsistentEventId(a),h={viewMode:e,date:a.date.start,isAllDay:!0,activeDate:t,firstDayOfWeek:this.firstDayOfWeek,weekDates:o},u=ga.calculatePosition(h),f=ga.calculateAccessibility(h),y=l.get(d)??0,p={width:100,x:0,zIndex:100+y,opacity:1},m=ga.generatePositionCSS(u,p),b=a.continuation;let g="single-day";if((b?.has||b?.is||!1)&&b){const n=c.get(d),r=[...n?.days??[]].sort((e,t)=>e-t),i="week"===e?o?ga.getIndexInDates(a.date.start,o):ga.getWeekDayIndex(a.date.start,t,this.firstDayOfWeek):0;g=function(e){const{continuationIndex:t,totalDays:a,visibleStartIndex:n,visibleEndIndex:r}=e;if(a<=1)return"single-day";const i=t===n,o=t===r;return i&&o?"single-day":i?"first-day":o?"last-day":"middle-day"}({continuationIndex:i,totalDays:b.total,visibleStartIndex:r[0]??i,visibleEndIndex:r[r.length-1]??i})}return this._composeEntry({index:r+n.length,slot:u.slotName,inlineStyle:`--entry-background-color: ${i}; --entry-color: ${s}; order: ${y}; ${m}`,entry:{...a,accessibility:f},density:"standard",floatText:!1,spanClass:g})}),...i],allDayRowCount:h}}_renderDayEntriesWithSlotManager(e,t,a,n,r){const i=e[0],o=`${i.date.start.year}-${String(i.date.start.month).padStart(2,"0")}-${String(i.date.start.day).padStart(2,"0")}`;let s=this._layoutCache.get(o);if(!s){const t=e.map((e,t)=>({id:String(t),heading:e.heading||"",startTime:{hour:e.time.start.hour,minute:e.time.start.minute},endTime:{hour:e.time.end.hour,minute:e.time.end.minute},color:e.color||"#1976d2"}));s=this._layoutCalculator.calculateLayout(t),this._layoutCache.set(o,s)}return e.map((e,i)=>{const o=s.boxes[i],d=n.get(e)??i,l={viewMode:t,date:e.date.start,time:e.time,activeDate:a,isAllDay:e.isContinuation||this._isAllDayEvent(e),firstDayOfWeek:this.firstDayOfWeek,weekDates:r},c=ga.calculatePosition(l),h=ga.calculateAccessibility(l),u={width:o.width,x:o.x,zIndex:o.zIndex,opacity:o.opacity,height:o.height},f=ga.generatePositionCSS(c,u,e.time),y=this._getSmartLayout(e,o.height,o.width,{depth:o.depth,opacity:o.opacity});return this._composeEntry({index:d,slot:c.slotName,inlineStyle:`--entry-background-color: rgba(250, 250, 250, 0.8); --entry-color: #333; --entry-border: 1px solid rgba(0, 0, 0, 0.15); --entry-handle-color: ${e.color||"#1976d2"}; --entry-handle-width: 4px; --entry-handle-display: block; --entry-padding-left: calc(4px + 0.35em); --entry-layout: ${y}; ${f}`,entry:{...e,accessibility:h},density:"standard",floatText:!1})})}_renderEntriesSumByDay(){const e=Object.entries(this._entrySumByDay);return e.length?e.map(([e,t],a)=>this._composeEntry({index:a,slot:e,inlineStyle:"--entry-color: var(--separator-mid); text-align: center",entry:{heading:`${t} ${Re(this.locale).events}`},displayMode:"month-dot"})):o}_getSmartLayout(e,t,a,n){if(!e.time)return"row";if(!(n&&n.depth>0))return"row";return t>=40?"column":"row"}_getDaysRange(e){const{start:t,end:a}=e,n=new Date(t.year,t.month-1,t.day),r=new Date(a.year,a.month-1,a.day);return[n,r,(r.getTime()-n.getTime())/864e5+1]}_isEffectivelyAllDay(e){return!e.time||(Number(e.time.end.hour)-Number(e.time.start.hour)>=23||!(!e.continuation?.is&&!e.continuation?.has))}_isAllDayEvent(e){if(!e.time)return!0;const{start:t,end:a}=e.time;return 0===t.hour&&0===t.minute&&23===a.hour&&59===a.minute}};Sa.styles=n`
1704
+ `}_determineDensity(e,t,a){if(!e.time)return"compact";if(t&&void 0!==a&&t[a])return"standard";const r=60*(e.time.end.hour-e.time.start.hour)+(e.time.end.minute-e.time.start.minute);return r<30?"compact":r>120&&e.content?"full":"standard"}_expandEntryMaybe({entry:e,range:t,originalIndex:a}){return Array.from({length:t[2]},(r,n)=>{const i=d.fromJSDate(t[0]).plus({days:n}),o=i.plus({days:1}).minus({seconds:1});return{...e,date:{start:i.toObject(),end:o.toObject()},isContinuation:n>0,continuation:{has:t[2]>1,is:n>0,index:n,total:t[2]},originalStartDate:e.date?.start,originalIndex:a}})}_createConsistentEventId(e){const t=e.originalStartDate||e.date?.start;return t?`${e.heading||"unknown"}-${t.year}-${t.month}-${t.day}-${e.time?.start.hour||0}-${e.time?.start.minute||0}`:`${e.heading||"unknown"}-fallback`}_renderEntries(){return this._monthViewSorted.length?this._monthViewSorted.map(({entry:e,background:t,originalIndex:a})=>{const r=e.isContinuation||e.continuation?.has||!1?"all-day-":"";return this._composeEntry({index:a,slot:`${r}${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`,inlineStyle:`--entry-color: ${t}; --entry-background-color: ${t}; z-index: ${100+a}`,entry:{time:e.time,heading:e.heading,content:e.content,date:e.date,isContinuation:e.isContinuation||!1,continuation:e.continuation},density:this._determineDensity({time:e.time,heading:e.heading,content:e.content},void 0,void 0),displayMode:"month-dot"})}):r}_renderEntriesByDate(e){const t=this._viewState.activeDate,a=this._viewState.viewMode;if("day"!==a&&"week"!==a)return{elements:r,allDayRowCount:0};let n;if("day"===a){const e=`${t.year}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`;n=this._expandedByISODate.get(e)??[]}else{n=(e?.visibleDates??ye(t,this.firstDayOfWeek)).flatMap(e=>{const t=`${e.year}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`;return this._expandedByISODate.get(t)??[]})}const i=[],o=[];for(const r of n)(this._isEffectivelyAllDay(r)?i:o).push(r);return o.length||i.length?this._renderEntriesWithSlotManager(a,t,i,o,e):{elements:r,allDayRowCount:0}}_renderEntriesWithSlotManager(e,t,a,r,n){const i=[];if(r.length>0){const a=new Map(r.map((e,t)=>[e,t]));if("week"===e){const o=function(...e){return u(x,e)}(r,e=>`${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`),s=n?.isCondensed?n.visibleDates:void 0,d=s??ye(t,this.firstDayOfWeek);for(const r of d){const n=o[`${r.year}-${r.month}-${r.day}`];if(!n?.length)continue;const d=this._renderDayEntriesWithSlotManager(n,e,t,a,s);i.push(...d)}}else{const n=this._renderDayEntriesWithSlotManager(r,e,t,a);i.push(...n)}}const o=n?.isCondensed?n.visibleDates:void 0,s="week"===e?`${t.year}-${t.month}-${t.day}-${this.firstDayOfWeek}-${n?.visibleStartIndex??0}-${n?.visibleLength??7}`:`day-${t.year}-${t.month}-${t.day}`;let d=this._allDayLayoutCache.get(s);if(!d){const r=a.map(a=>({id:this._createConsistentEventId(a),days:["week"===e?o?ua.getIndexInDates(a.date.start,o):ua.getWeekDayIndex(a.date.start,t,this.firstDayOfWeek):0],isMultiDay:a.continuation?.is||a.continuation?.has||!1})),n=/* @__PURE__ */new Map;r.forEach(e=>{const t=n.get(e.id);t?t.days.push(...e.days):n.set(e.id,{...e,days:[...e.days]})});const{rowAssignments:i,totalRows:l}=function(e){const t=/* @__PURE__ */new Map;if(0===e.length)return{rowAssignments:t,totalRows:0};const a=[],r=[];e.forEach(e=>{e.isMultiDay?a.push(e):r.push(e)}),a.sort((e,t)=>{const a=Math.min(...e.days),r=Math.min(...t.days);return a!==r?a-r:e.id.localeCompare(t.id)}),r.sort((e,t)=>Math.min(...e.days)-Math.min(...t.days));const n=/* @__PURE__ */new Map;for(let o=0;o<7;o++)n.set(o,/* @__PURE__ */new Set);a.forEach(e=>{let a=0,r=!1;for(;!r;){let i=!0;for(const t of e.days)if(n.get(t)?.has(a)){i=!1;break}if(i){r=!0,t.set(e.id,a);for(const t of e.days)n.get(t)?.add(a)}else a++}}),r.forEach(e=>{const a=e.days[0];let r=0;for(;n.get(a)?.has(r);)r++;t.set(e.id,r),n.get(a)?.add(r)});let i=0;return n.forEach(e=>{i=Math.max(i,e.size)}),{rowAssignments:t,totalRows:i}}(Array.from(n.values()));d={rowAssignments:i,mergedEvents:n,totalRows:l},this._allDayLayoutCache.set(s,d)}const{rowAssignments:l,mergedEvents:c,totalRows:h}=d;return{elements:[...a.map((a,n)=>{const[i,s,d]=function(e){if(!e||!e.trim())return[25,118,210];const t=(e.startsWith("#")?e:`#${e}`).replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,a,r)=>`#${t}${t}${a}${a}${r}${r}`).substring(1).match(/.{2}/g);if(!t||3!==t.length)return[25,118,210];const[a,r,n]=t.map(e=>parseInt(e,16));return isNaN(a)||isNaN(r)||isNaN(n)?[25,118,210]:[a,r,n]}(a.color),h=this._createConsistentEventId(a),u={viewMode:e,date:a.date.start,isAllDay:!0,activeDate:t,firstDayOfWeek:this.firstDayOfWeek,weekDates:o,locale:this.locale},f=ua.calculatePosition(u),p=ua.calculateAccessibility(u),y=l.get(h)??0,m={width:100,x:0,zIndex:100+y,opacity:1},b=ua.generatePositionCSS(f,m),g=a.continuation;let v="single-day";if((g?.has||g?.is||!1)&&g){const r=c.get(h),n=[...r?.days??[]].sort((e,t)=>e-t),i="week"===e?o?ua.getIndexInDates(a.date.start,o):ua.getWeekDayIndex(a.date.start,t,this.firstDayOfWeek):0;v=function(e){const{continuationIndex:t,totalDays:a,visibleStartIndex:r,visibleEndIndex:n}=e;if(a<=1)return"single-day";const i=t===r,o=t===n;return i&&o?"single-day":i?"first-day":o?"last-day":"middle-day"}({continuationIndex:i,totalDays:g.total,visibleStartIndex:n[0]??i,visibleEndIndex:n[n.length-1]??i})}return this._composeEntry({index:n+r.length,slot:f.slotName,inlineStyle:`--entry-background-color: rgba(${i}, ${s}, ${d}, 0.08); --entry-color: #333; --entry-border: 1px solid rgba(${i}, ${s}, ${d}, 0.25); --entry-border-left: none; --entry-handle-color: ${a.color||"#1976d2"}; --entry-handle-width: 4px; --entry-handle-display: block; --entry-padding-left: calc(4px + 0.35em); order: ${y}; ${b}`,entry:{...a,accessibility:p},density:"standard",floatText:!1,spanClass:v})}),...i],allDayRowCount:h}}_renderDayEntriesWithSlotManager(e,t,a,r,n){const i=e[0],o=`${i.date.start.year}-${String(i.date.start.month).padStart(2,"0")}-${String(i.date.start.day).padStart(2,"0")}`;let s=this._layoutCache.get(o);if(!s){const t=e.map((e,t)=>({id:String(t),heading:e.heading||"",startTime:{hour:e.time.start.hour,minute:e.time.start.minute},endTime:{hour:e.time.end.hour,minute:e.time.end.minute},color:e.color||"#1976d2"}));s=this._layoutCalculator.calculateLayout(t),this._layoutCache.set(o,s)}return e.map((e,i)=>{const o=s.boxes[i],d=r.get(e)??i,l={viewMode:t,date:e.date.start,time:e.time,activeDate:a,isAllDay:e.isContinuation||this._isAllDayEvent(e),firstDayOfWeek:this.firstDayOfWeek,weekDates:n,locale:this.locale},c=ua.calculatePosition(l),h=ua.calculateAccessibility(l),u={width:o.width,x:o.x,zIndex:o.zIndex,opacity:o.opacity,height:o.height},f=ua.generatePositionCSS(c,u,e.time),p=this._getSmartLayout(e,o.height,o.width,{depth:o.depth,opacity:o.opacity});return this._composeEntry({index:d,slot:c.slotName,inlineStyle:`--entry-background-color: rgba(250, 250, 250, 0.8); --entry-color: #333; --entry-border: 1px solid rgba(0, 0, 0, 0.15); --entry-border-left: none; --entry-handle-color: ${e.color||"#1976d2"}; --entry-handle-width: 4px; --entry-handle-display: block; --entry-padding-left: calc(4px + 0.35em); --entry-layout: ${p}; ${f}`,entry:{...e,accessibility:h},density:"standard",floatText:!1})})}_renderEntriesSumByDay(){const e=Object.entries(this._entrySumByDay);return e.length?e.map(([e,t],a)=>this._composeEntry({index:a,slot:e,inlineStyle:"--entry-color: var(--separator-mid); text-align: center",entry:{heading:`${t} ${Me(this.locale).events}`},displayMode:"month-dot"})):r}_getSmartLayout(e,t,a,r){if(!e.time)return"row";if(!(r&&r.depth>0))return"row";return t>=40?"column":"row"}_getDaysRange(e){const{start:t,end:a}=e,r=new Date(t.year,t.month-1,t.day),n=new Date(a.year,a.month-1,a.day);return[r,n,(n.getTime()-r.getTime())/864e5+1]}_isEffectivelyAllDay(e){return!e.time||(Number(e.time.end.hour)-Number(e.time.start.hour)>=23||!(!e.continuation?.is&&!e.continuation?.has))}_isAllDayEvent(e){if(!e.time)return!0;const{start:t,end:a}=e.time;return 0===t.hour&&0===t.minute&&23===a.hour&&59===a.minute}};wa.styles=e`
1575
1705
  :host {
1576
1706
  display: block;
1577
1707
  contain: layout style paint;
1578
- content-visibility: auto;
1579
- contain-intrinsic-size: auto 600px 800px;
1708
+ /* Override grid/flex automatic minimum size so that an
1709
+ external height (e.g. height: 100% on a grid item) is
1710
+ the real constraint — not the min-content height. */
1711
+ min-height: 0;
1580
1712
 
1581
1713
  --shadow-sm: rgba(0, 0, 0, 0.18) 0px 2px 4px;
1582
1714
  --shadow-md: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
@@ -1602,21 +1734,21 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1602
1734
  --border-radius-lg: 12px;
1603
1735
 
1604
1736
  --background-color: white;
1605
- --primary-color: dodgerblue;
1737
+ --primary-color: #3b82f6;
1606
1738
 
1607
1739
  --height: 100%;
1608
1740
  --width: 100%;
1609
1741
 
1610
1742
  /* Entry design tokens - responsive and density-aware */
1611
- --entry-font-size: 0.8rem;
1612
- --entry-line-height: 1.3;
1743
+ --entry-font-size: 0.75rem;
1744
+ --entry-line-height: 1.2;
1613
1745
  --entry-min-height: 1.2em;
1614
1746
  --entry-border-radius: var(--border-radius-sm);
1615
1747
  --entry-background-color: var(--background-color);
1616
1748
  --entry-color: var(--primary-color);
1617
1749
  --entry-highlight-color: var(--separator-light);
1618
1750
  --entry-focus-color: var(--primary-color);
1619
- --entry-padding: 0.2em 0.35em;
1751
+ --entry-padding: 0.15em 0.3em;
1620
1752
  --entry-font-family: system-ui;
1621
1753
  --entry-gap: 0.25em;
1622
1754
 
@@ -1624,7 +1756,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1624
1756
  --entry-dot-size: 6px;
1625
1757
  --entry-dot-margin: 0.25em;
1626
1758
  --entry-month-background: transparent;
1627
- --entry-month-padding: 0.1em 0.3em 0.1em 0;
1759
+ --entry-month-padding: 0.05em 0.25em 0.05em 0;
1628
1760
  --entry-time-font: var(--monospace-ui);
1629
1761
  --entry-time-align: right;
1630
1762
  --entry-month-text-color: var(--separator-dark);
@@ -1641,9 +1773,9 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1641
1773
  --entry-align: flex-start;
1642
1774
 
1643
1775
  /* Responsive scaling for different viewport sizes */
1644
- --entry-font-size-sm: 0.7rem;
1645
- --entry-font-size-md: 0.75rem;
1646
- --entry-font-size-lg: 0.8rem;
1776
+ --entry-font-size-sm: 0.65rem;
1777
+ --entry-font-size-md: 0.7rem;
1778
+ --entry-font-size-lg: 0.75rem;
1647
1779
 
1648
1780
  --context-height: 1.75em;
1649
1781
  --context-padding: 0.25em;
@@ -1651,14 +1783,17 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1651
1783
 
1652
1784
  /* Core layout tokens */
1653
1785
  --time-column-width: 4em;
1654
- --view-container-height-offset: 0px;
1655
- --main-content-height-offset: 1em;
1656
1786
 
1657
1787
  /* Time grid sizing — replaces 1440-row grid */
1658
1788
  --minute-height: 0.8px;
1659
1789
  --hour-height: calc(60 * var(--minute-height));
1660
1790
  --day-total-height: calc(1440 * var(--minute-height));
1661
1791
 
1792
+ /* Snap section: all views share a half-day rhythm.
1793
+ Day/week snap at noon; year view splits 6+6 months
1794
+ at the same scroll offset. */
1795
+ --half-day-height: calc(var(--day-total-height) / 2);
1796
+
1662
1797
  /* Deprecated: kept for consumers who read them, no longer used internally */
1663
1798
  --grid-rows-per-day: 1440;
1664
1799
  --calendar-grid-rows-time: repeat(var(--grid-rows-per-day), 1fr);
@@ -1674,12 +1809,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1674
1809
  --calendar-grid-columns-month: repeat(7, 1fr);
1675
1810
 
1676
1811
  /* Calculated heights */
1677
- --view-container-height: calc(100% - var(--view-container-height-offset));
1678
- --main-content-height: calc(100% - var(--main-content-height-offset));
1812
+ --view-container-height: 100%;
1679
1813
 
1680
- /* Legacy tokens (for backward compatibility) */
1681
- --day-header-height: 3.5em;
1682
- --day-main-offset: var(--main-content-height-offset);
1814
+ /* Day/week view header height */
1815
+ --day-header-height: 2.5em;
1683
1816
  --day-gap: 1px;
1684
1817
  --day-text-align: center;
1685
1818
  --day-padding: 0.5em;
@@ -1709,7 +1842,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1709
1842
 
1710
1843
  --month-day-gap: 1px;
1711
1844
  --indicator-color: var(--primary-color);
1712
- --indicator-font-weight: bold;
1845
+ --indicator-font-weight: 600;
1713
1846
  --indicator-padding: 0.25em;
1714
1847
  --indicator-margin-bottom: 0.25em;
1715
1848
 
@@ -1737,10 +1870,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1737
1870
  --year-day-font-size: 0.7em;
1738
1871
  --year-cell-size: 1.8em;
1739
1872
  --year-dot-color: var(--indicator-color, var(--primary-color));
1740
- --year-heatmap-1: rgba(30, 144, 255, 0.15);
1741
- --year-heatmap-2: rgba(30, 144, 255, 0.35);
1742
- --year-heatmap-3: rgba(30, 144, 255, 0.55);
1743
- --year-heatmap-4: rgba(30, 144, 255, 0.75);
1873
+ --year-heatmap-1: rgba(59, 130, 246, 0.15);
1874
+ --year-heatmap-2: rgba(59, 130, 246, 0.35);
1875
+ --year-heatmap-3: rgba(59, 130, 246, 0.55);
1876
+ --year-heatmap-4: rgba(59, 130, 246, 0.75);
1744
1877
 
1745
1878
  /* Year view — calendar week column */
1746
1879
  --year-cw-width: 1.8em;
@@ -1769,7 +1902,8 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1769
1902
  main {
1770
1903
  flex: 1;
1771
1904
  min-height: 0;
1772
- overflow: hidden;
1905
+ overflow-y: auto;
1906
+ overflow-x: hidden;
1773
1907
  display: flex;
1774
1908
  flex-direction: column;
1775
1909
  }
@@ -1802,5 +1936,5 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
1802
1936
  --entry-compact-show-time: inline;
1803
1937
  }
1804
1938
  }
1805
- `,Ea([s({type:String})],Sa.prototype,"heading",2),Ea([s({type:Number,attribute:"first-day-of-week"})],Sa.prototype,"firstDayOfWeek",2),Ea([s({type:String})],Sa.prototype,"locale",2),Ea([s({type:String,attribute:"year-drill-target"})],Sa.prototype,"yearDrillTarget",2),Ea([s({type:String,attribute:"year-density-mode"})],Sa.prototype,"yearDensityMode",2),Ea([s({type:Array})],Sa.prototype,"entries",2),Ea([s({type:String})],Sa.prototype,"color",2),Ea([l()],Sa.prototype,"_calendarWidth",2),Ea([l()],Sa.prototype,"_menuOpen",2),Ea([l()],Sa.prototype,"_menuEventDetails",2),Sa=Ea([d("lms-calendar")],Sa);export{y as Interval,Sa as default};
1939
+ `,va([n({type:String})],wa.prototype,"heading",2),va([n({type:Number,attribute:"first-day-of-week"})],wa.prototype,"firstDayOfWeek",2),va([n({type:String})],wa.prototype,"locale",2),va([n({type:String,attribute:"year-drill-target"})],wa.prototype,"yearDrillTarget",2),va([n({type:String,attribute:"year-density-mode"})],wa.prototype,"yearDensityMode",2),va([n({type:Array})],wa.prototype,"entries",2),va([n({type:String})],wa.prototype,"color",2),va([o()],wa.prototype,"_calendarWidth",2),va([o()],wa.prototype,"_menuOpen",2),va([o()],wa.prototype,"_menuEventDetails",2),wa=va([i("lms-calendar")],wa);export{c as Interval,wa as default};
1806
1940
  //# sourceMappingURL=kalendus.js.map