@jpahd/kalendus 0.1.1 → 0.6.0
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/custom-elements.json +156 -131
- package/dist/components/Day.d.ts +25 -0
- package/dist/components/Day.d.ts.map +1 -1
- package/dist/components/Entry.d.ts +0 -2
- package/dist/components/Entry.d.ts.map +1 -1
- package/dist/components/Header.d.ts.map +1 -1
- package/dist/components/Menu.d.ts.map +1 -1
- package/dist/components/Month.d.ts +2 -1
- package/dist/components/Month.d.ts.map +1 -1
- package/dist/components/Week.d.ts +20 -1
- package/dist/components/Week.d.ts.map +1 -1
- package/dist/components/Year.d.ts.map +1 -1
- package/dist/kalendus.js +407 -237
- package/dist/kalendus.js.map +1 -1
- package/dist/lib/LayoutCalculator.d.ts +1 -1
- package/dist/lib/LayoutCalculator.d.ts.map +1 -1
- package/dist/lib/SlotManager.d.ts +1 -17
- package/dist/lib/SlotManager.d.ts.map +1 -1
- package/dist/lib/colorParser.d.ts +18 -0
- package/dist/lib/colorParser.d.ts.map +1 -0
- package/dist/lib/getColorTextWithContrast.d.ts +1 -1
- package/dist/lib/getColorTextWithContrast.d.ts.map +1 -1
- package/dist/lib/localization.d.ts.map +1 -1
- package/dist/lib/weekDisplayContext.d.ts.map +1 -1
- package/dist/lib/weekStartHelper.d.ts.map +1 -1
- package/dist/lms-calendar.d.ts +11 -3
- package/dist/lms-calendar.d.ts.map +1 -1
- package/dist/themes/brutalist.css +100 -0
- package/dist/themes/default.css +100 -0
- package/dist/themes/ink.css +98 -0
- package/dist/themes/midnight.css +110 -0
- package/dist/themes/soft.css +97 -0
- package/package.json +13 -3
- package/dist/lib/catchError.d.ts +0 -2
- package/dist/lib/catchError.d.ts.map +0 -1
- package/dist/lib/getOverlappingEntitiesIndices.d.ts +0 -8
- package/dist/lib/getOverlappingEntitiesIndices.d.ts.map +0 -1
- package/dist/lib/getSortedGradingsByIndex.d.ts +0 -2
- package/dist/lib/getSortedGradingsByIndex.d.ts.map +0 -1
- package/dist/lib/partitionOverlappingIntervals.d.ts +0 -6
- package/dist/lib/partitionOverlappingIntervals.d.ts.map +0 -1
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=>
|
|
3
|
-
</div>`}};
|
|
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 y(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(p(t,i,e))break;let{isSingle:o}=e.at(-1);a=o?i[0]:i,n+=e.length}return a}function p(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(p(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 k=(e,t)=>e.filter(t),D=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 M(e,t){let a=[...e];return a.sort(t),a}const T=(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),N=e=>e&&!!e[C],R=(e,t,a)=>{if(N(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];N(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)=>R(t,e[r],a))&&n.every((e,t)=>R(e,o[t],a))&&(0===i.length||R(i[0],s,a))}return e.length===t.length&&e.every((e,r)=>R(e,t[r],a))}return Reflect.ownKeys(e).every(r=>{const n=e[r];return(r in t||N(i=n)&&"optional"===i[C]().matcherType)&&R(n,t[r],a);var i})}return Object.is(t,e)},z=e=>{var t,a,r;return I(e)?N(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 W(e){return Object.assign(e,{optional:()=>{return t=e,W({[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:R(t,e,r),selections:a}},getSelectionKeys:()=>z(t),matcherType:"optional"})});var t},and:t=>Y(e,t),or:t=>function(...e){return W({[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=>R(e,t,r)),selections:a}},getSelectionKeys:()=>L(e,z),matcherType:"or"})})}(e,t),select:t=>void 0===t?P(e):P(t,e)})}function Y(...e){return W({[C]:()=>({match:t=>{let a={};const r=(e,t)=>{a[e]=t};return{matched:e.every(e=>R(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 W({[C]:()=>({match:e=>{let r={[null!=t?t:A]:e};return{matched:void 0===a||R(a,e,(e,t)=>{r[e]=t}),selections:r}},getSelectionKeys:()=>[null!=t?t:A].concat(void 0===a?[]:z(a))})})}function F(e){return!0}function H(e){return"number"==typeof e}function B(e){return"string"==typeof e}function U(e){return"bigint"==typeof e}W(j(F)),W(j(F));const V=e=>Object.assign(W(e),{startsWith:t=>{return V(Y(e,(a=t,j(e=>B(e)&&e.startsWith(a)))));var a},endsWith:t=>{return V(Y(e,(a=t,j(e=>B(e)&&e.endsWith(a)))));var a},minLength:t=>{return V(Y(e,(a=t,j(e=>B(e)&&e.length>=a))));var a},length:t=>{return V(Y(e,(a=t,j(e=>B(e)&&e.length===a))));var a},maxLength:t=>{return V(Y(e,(a=t,j(e=>B(e)&&e.length<=a))));var a},includes:t=>{return V(Y(e,(a=t,j(e=>B(e)&&e.includes(a)))));var a},regex:t=>{return V(Y(e,(a=t,j(e=>B(e)&&Boolean(e.match(a))))));var a}});V(j(B));const q=e=>Object.assign(W(e),{between:(t,a)=>{return q(Y(e,(r=t,n=a,j(e=>H(e)&&r<=e&&n>=e))));var r,n},lt:t=>{return q(Y(e,(a=t,j(e=>H(e)&&e<a))));var a},gt:t=>{return q(Y(e,(a=t,j(e=>H(e)&&e>a))));var a},lte:t=>{return q(Y(e,(a=t,j(e=>H(e)&&e<=a))));var a},gte:t=>{return q(Y(e,(a=t,j(e=>H(e)&&e>=a))));var a},int:()=>q(Y(e,j(e=>H(e)&&Number.isInteger(e)))),finite:()=>q(Y(e,j(e=>H(e)&&Number.isFinite(e)))),positive:()=>q(Y(e,j(e=>H(e)&&e>0))),negative:()=>q(Y(e,j(e=>H(e)&&e<0)))}),K=q(j(H)),G=e=>Object.assign(W(e),{between:(t,a)=>{return G(Y(e,(r=t,n=a,j(e=>U(e)&&r<=e&&n>=e))));var r,n},lt:t=>{return G(Y(e,(a=t,j(e=>U(e)&&e<a))));var a},gt:t=>{return G(Y(e,(a=t,j(e=>U(e)&&e>a))));var a},lte:t=>{return G(Y(e,(a=t,j(e=>U(e)&&e<=a))));var a},gte:t=>{return G(Y(e,(a=t,j(e=>U(e)&&e>=a))));var a},positive:()=>G(Y(e,j(e=>U(e)&&e>0))),negative:()=>G(Y(e,j(e=>U(e)&&e<0)))});G(j(U)),W(j(function(e){return"boolean"==typeof e})),W(j(function(e){return"symbol"==typeof e}));const Z=W(j(function(e){return null==e}));W(j(function(e){return null!=e}));var J={__proto__:null,number:K,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=>R(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 ye(e,t){return((e-t)%7+7)%7}function pe(e,t){const a=new Date(e.year,e.month-1,e.day),r=ye(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 ye(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 ke=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>`}};ke.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
|
-
`,
|
|
20
|
-
|
|
19
|
+
`,we([n({type:Number})],ke.prototype,"firstDayOfWeek",2),we([n({type:String})],ke.prototype,"locale",2),ke=we([i("lms-calendar-context")],ke);var De=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&&De(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
|
-
`:
|
|
27
|
-
<div class="container"
|
|
33
|
+
`:r}
|
|
34
|
+
<div class="container">
|
|
28
35
|
<div
|
|
29
|
-
class="main ${
|
|
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=>
|
|
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>`}};
|
|
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: var(--day-label-number-font-weight);
|
|
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
|
-
|
|
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
|
-
|
|
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,42 +226,40 @@ 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"]],Me=/* @__PURE__ */new Map;function Te(e){let t=Me.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),Me.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=Te(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=Te(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?"":
|
|
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?
|
|
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;"
|
|
176
246
|
>
|
|
177
247
|
<div class="text-content">
|
|
178
|
-
<span style="font-weight:
|
|
248
|
+
<span style="font-weight: var(--entry-title-weight);">${this.heading}</span>
|
|
179
249
|
${this._renderTime()}
|
|
180
250
|
</div>
|
|
181
251
|
</div>
|
|
182
|
-
`:
|
|
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.
|
|
259
|
+
${this._renderTime()}
|
|
191
260
|
${this._renderContent()}
|
|
192
261
|
</div>
|
|
193
|
-
`}_displayInterval(e){if(!e)return
|
|
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?Te(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=Te(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
|
|
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:
|
|
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);
|
|
@@ -294,10 +364,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
294
364
|
position: absolute;
|
|
295
365
|
top: var(--entry-text-top, -20px);
|
|
296
366
|
left: var(--entry-text-left, 0);
|
|
297
|
-
background:
|
|
367
|
+
background: var(--float-text-bg);
|
|
298
368
|
padding: 2px 6px;
|
|
299
|
-
border-radius:
|
|
300
|
-
box-shadow:
|
|
369
|
+
border-radius: var(--float-text-border-radius);
|
|
370
|
+
box-shadow: var(--float-text-shadow);
|
|
301
371
|
font-size: 0.7rem;
|
|
302
372
|
z-index: 1000;
|
|
303
373
|
white-space: nowrap;
|
|
@@ -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:
|
|
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:
|
|
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 */
|
|
@@ -377,7 +447,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
377
447
|
|
|
378
448
|
.main[style*='--entry-layout: column'] .title {
|
|
379
449
|
width: 100%;
|
|
380
|
-
font-weight:
|
|
450
|
+
font-weight: var(--title-column-weight);
|
|
381
451
|
line-height: 1.2;
|
|
382
452
|
margin-bottom: 0.1em;
|
|
383
453
|
}
|
|
@@ -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
|
-
`,
|
|
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 Ne=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,ze=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?Re(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&&Ne(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=Te(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
|
-
>${
|
|
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
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
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
|
-
>${
|
|
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()},
|
|
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:
|
|
654
|
+
text-align: left;
|
|
585
655
|
display: grid;
|
|
586
|
-
justify-self:
|
|
656
|
+
justify-self: stretch;
|
|
587
657
|
min-width: 0;
|
|
588
658
|
overflow: hidden;
|
|
589
659
|
}
|
|
@@ -644,33 +714,35 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
644
714
|
font-size: 0.85em;
|
|
645
715
|
color: var(--header-text-color, rgba(0, 0, 0, 0.6));
|
|
646
716
|
cursor: pointer;
|
|
647
|
-
border-radius: var(--border-radius-sm
|
|
717
|
+
border-radius: var(--border-radius-sm);
|
|
648
718
|
transition:
|
|
649
|
-
background-color
|
|
650
|
-
color
|
|
719
|
+
background-color var(--transition-speed) ease,
|
|
720
|
+
color var(--transition-speed) ease;
|
|
651
721
|
}
|
|
652
722
|
|
|
653
723
|
button:hover {
|
|
654
|
-
background: var(--
|
|
724
|
+
background: var(--hover-bg);
|
|
725
|
+
color: var(--hover-color, var(--header-text-color, rgba(0, 0, 0, 0.6)));
|
|
655
726
|
}
|
|
656
727
|
|
|
657
728
|
.context {
|
|
658
729
|
display: flex;
|
|
659
730
|
align-items: center;
|
|
660
731
|
gap: 0;
|
|
661
|
-
background: var(--
|
|
662
|
-
border-radius: var(--border-radius-sm
|
|
732
|
+
background: var(--context-bg);
|
|
733
|
+
border-radius: var(--border-radius-sm);
|
|
663
734
|
padding: 0.15em;
|
|
664
735
|
}
|
|
665
736
|
|
|
666
737
|
.context button {
|
|
667
|
-
border-radius: calc(var(--border-radius-sm
|
|
738
|
+
border-radius: calc(var(--border-radius-sm) - 1px);
|
|
739
|
+
color: var(--context-text-color, var(--header-text-color, rgba(0, 0, 0, 0.6)));
|
|
668
740
|
}
|
|
669
741
|
|
|
670
742
|
.context button[data-active] {
|
|
671
|
-
background: var(--
|
|
743
|
+
background: var(--active-indicator-bg);
|
|
672
744
|
color: var(--separator-dark, rgba(0, 0, 0, 0.7));
|
|
673
|
-
box-shadow:
|
|
745
|
+
box-shadow: var(--active-indicator-shadow);
|
|
674
746
|
}
|
|
675
747
|
|
|
676
748
|
.buttons {
|
|
@@ -687,7 +759,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
687
759
|
background: var(--separator-light, rgba(0, 0, 0, 0.15));
|
|
688
760
|
margin: 0 0.2em;
|
|
689
761
|
}
|
|
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`
|
|
762
|
+
`,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 We=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e])),Ye={action:"ACTION",description:"DESCRIPTION",duration:"DURATION",repeat:"REPEAT",summary:"SUMMARY",trigger:"TRIGGER",attachments:"ATTACH",attendees:"ATTENDEE"};We(Ye);We({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"};We(je);We({id:"TZID",lastModified:"LAST-MODIFIED",url:"TZURL"});We({comment:"COMMENT",name:"TZNAME",offsetFrom:"TZOFFSETFROM",offsetTo:"TZOFFSETTO",recurrenceDate:"RDATE",recurrenceRule:"RRULE",start:"DTSTART"});We({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"});We({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"});We({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"});We({stamp:"DTSTAMP",start:"DTSTART",uid:"UID",url:"URL",organizer:"ORGANIZER",attendees:"ATTENDEE",comment:"COMMENT",end:"DTEND",freeBusy:"FREEBUSY"});var Pe=/\r\n/,Fe=e=>`${e}\r\n`,He=(e,t,a)=>a?null==t?"":Fe(`${e};${a}:${t}`):Fe(`${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 He(t,Ue(e.email),a)},qe=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},Ke=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*Ke)}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 yt(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 pt(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)-+yt(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 kt=["SU","MO","TU","WE","TH","FR","SA"],Dt=(e,t)=>void 0!==t&&e>=t,xt=(e,t,a,r)=>{let n=a.map(({day:e,occurrence:t})=>({occurrence:t,day:kt.indexOf(e)}));return"YEARLY"===e.frequency?e.byYearday||e.byMonthday?t.map(e=>e.filter(e=>n.find(({day:t})=>t===pt(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===pt(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===pt(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===pt(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)))),Mt=(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)))),Tt=(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=Mt(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=Tt(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?kt.indexOf(e.workweekStart):1)%7,s=[[r]];((e,{start:t,end:a},r)=>{if(Dt(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(Dt(r.length,e.count))return;o=st(o,i),r.push([o])}else for(;o<a;){if(Dt(r.length,e.count))return;o=Xe(o,i),r.push([o])}else for(;o<a;){if(Dt(r.length,e.count))return;o=tt(o,i),r.push([o])}else for(;o<a;){if(Dt(r.length,e.count))return;o=it(o,i),r.push([o])}else for(;o<a;){if(Dt(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()},Nt=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},Rt=(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:Nt(a)}}let a=t[t.length-1].offsetTo,n=a.length>5?a.substring(0,5):a;return{offset:n,milliseconds:Nt(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/Ke;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 Wt(e)},Wt=(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"}`},Yt=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},Ft=(e,t)=>{let a=Yt(e),r=t.childComponents,n=r?Yt(r):[],i=t.generateArrayValues,o=i?Yt(i):[],s="";return s+=(e=>Fe(`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}):He(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+=He(jt(e),null==r?void 0:r.toString()));let i=n.generate(r);i&&(a+=He(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=>Fe(`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)},Ht=(e,t)=>He(e,Math.trunc(t).toString()),Bt=(e,t)=>Ft(e,{icsComponent:"VALARM",icsKeyMap:Ye,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?He("TRIGGER",Lt(null==(a=e.value)?void 0:a.date)):"relative"===e.type?He("TRIGGER",qe(e.value),r):void 0})(e),duration:({icsKey:e,value:t})=>He(e,qe(t)),repeat:({icsKey:e,value:t})=>Ht(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 He("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 He("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 Rt(r,t.timezone,a)?Wt(r,!0):Lt(e)})(t.date,t.local,null==r?void 0:r.timezones);return He(e,i,n)},Vt=(e,t,a)=>He(e,(e=>e.replace(/([\\;,])|(\n)/g,(e,t)=>t?`\\${t}`:"\\n"))(t),a?Be(a):void 0),qt=(e,t)=>Ft(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})=>He(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+=He("RRULE",r),a})(e),duration:({icsKey:e,value:t})=>He(e,qe(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 He("ORGANIZER",Ue(e.email),t)})(e),sequence:({icsKey:e,value:t})=>Ht(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}),Kt=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&&Kt(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",qt(c).trim(),"END:VCALENDAR"].join("\r\n"),u=new Blob([h],{type:"text/calendar"}),f=URL.createObjectURL(u),y=document.createElement("a");y.href=f,y.download=`${e||"event"}.ics`,document.body.appendChild(y),y.click(),setTimeout(()=>{document.body.removeChild(y),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=Te(this.locale),t="card"+(this._positioned?" visible":""),n=this.eventDetails.content&&this.eventDetails.content!==e.noContent;return a`
|
|
691
763
|
<div
|
|
692
764
|
class=${t}
|
|
693
765
|
role="dialog"
|
|
@@ -713,10 +785,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
713
785
|
<div class="meta">
|
|
714
786
|
${this.eventDetails.displayTime||e.noTime}
|
|
715
787
|
</div>
|
|
716
|
-
${this.eventDetails.date?
|
|
788
|
+
${this.eventDetails.date?a`<div class="meta">
|
|
717
789
|
${this._formatDate(this.eventDetails.date)}
|
|
718
|
-
</div>`:
|
|
719
|
-
${a
|
|
790
|
+
</div>`:r}
|
|
791
|
+
${n?a`<div class="notes">${this.eventDetails.content}</div>`:r}
|
|
720
792
|
<div class="actions">
|
|
721
793
|
<button
|
|
722
794
|
type="button"
|
|
@@ -728,7 +800,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
728
800
|
</button>
|
|
729
801
|
</div>
|
|
730
802
|
</div>
|
|
731
|
-
`}};
|
|
803
|
+
`}};Jt.styles=e`
|
|
732
804
|
:host {
|
|
733
805
|
position: absolute;
|
|
734
806
|
inset: 0;
|
|
@@ -751,14 +823,14 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
751
823
|
max-width: 22em;
|
|
752
824
|
padding: 0.875em 1em;
|
|
753
825
|
opacity: 0;
|
|
754
|
-
transform:
|
|
826
|
+
transform: var(--menu-transform-origin);
|
|
755
827
|
transition:
|
|
756
|
-
opacity
|
|
757
|
-
transform
|
|
828
|
+
opacity var(--transition-speed) ease,
|
|
829
|
+
transform var(--transition-speed) ease;
|
|
758
830
|
}
|
|
759
831
|
.card.visible {
|
|
760
832
|
opacity: 1;
|
|
761
|
-
transform:
|
|
833
|
+
transform: var(--menu-transform-active);
|
|
762
834
|
}
|
|
763
835
|
.header {
|
|
764
836
|
display: flex;
|
|
@@ -769,7 +841,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
769
841
|
.title {
|
|
770
842
|
flex: 1;
|
|
771
843
|
font-size: 1em;
|
|
772
|
-
font-weight:
|
|
844
|
+
font-weight: var(--menu-title-font-weight);
|
|
773
845
|
color: var(--separator-dark);
|
|
774
846
|
line-height: 1.3;
|
|
775
847
|
word-break: break-word;
|
|
@@ -785,10 +857,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
785
857
|
margin: -0.15em -0.25em 0 0;
|
|
786
858
|
border-radius: var(--border-radius-sm);
|
|
787
859
|
color: var(--header-text-color);
|
|
788
|
-
transition: background-color
|
|
860
|
+
transition: background-color var(--transition-speed);
|
|
789
861
|
}
|
|
790
862
|
.close-btn:hover {
|
|
791
|
-
background-color: var(--
|
|
863
|
+
background-color: var(--hover-bg);
|
|
792
864
|
}
|
|
793
865
|
.meta {
|
|
794
866
|
font-size: 0.8125em;
|
|
@@ -813,32 +885,32 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
813
885
|
cursor: pointer;
|
|
814
886
|
font-family: var(--system-ui);
|
|
815
887
|
font-size: 0.8125em;
|
|
816
|
-
font-weight:
|
|
888
|
+
font-weight: var(--menu-item-font-weight);
|
|
817
889
|
color: var(--primary-color);
|
|
818
890
|
padding: 0;
|
|
819
|
-
transition: opacity
|
|
891
|
+
transition: opacity var(--transition-speed);
|
|
820
892
|
}
|
|
821
893
|
.export-btn:hover {
|
|
822
|
-
opacity:
|
|
894
|
+
opacity: var(--export-hover-opacity);
|
|
823
895
|
}
|
|
824
|
-
`,
|
|
825
|
-
class="indicator ${
|
|
896
|
+
`,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
|
|
897
|
+
class="indicator ${h({current:n})}"
|
|
826
898
|
>
|
|
827
|
-
${1===
|
|
828
|
-
</div>`}render(){return
|
|
899
|
+
${1===r?le(r,t,e,this.locale):r}
|
|
900
|
+
</div>`}render(){return a`
|
|
829
901
|
<div class="month">
|
|
830
|
-
${this._getCalendarArray()?.map(({year:e,month:t,day:
|
|
902
|
+
${this._getCalendarArray()?.map(({year:e,month:t,day:r})=>a`<div
|
|
831
903
|
class="day"
|
|
832
|
-
data-date="${e}-${t}-${
|
|
904
|
+
data-date="${e}-${t}-${r}"
|
|
833
905
|
@click=${this._dispatchExpand}
|
|
834
906
|
@keydown=${this._handleKeydown}
|
|
835
907
|
tabindex="0"
|
|
836
908
|
>
|
|
837
|
-
${this._renderIndicator({year:e,month:t,day:
|
|
838
|
-
<slot name="${e}-${t}-${
|
|
909
|
+
${this._renderIndicator({year:e,month:t,day:r})}
|
|
910
|
+
<slot name="${e}-${t}-${r}"></slot>
|
|
839
911
|
</div>`)}
|
|
840
912
|
</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,
|
|
913
|
+
`}_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
914
|
:host {
|
|
843
915
|
display: block;
|
|
844
916
|
flex: 1;
|
|
@@ -849,6 +921,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
849
921
|
height: 100%;
|
|
850
922
|
display: grid;
|
|
851
923
|
grid-template-columns: repeat(7, 1fr);
|
|
924
|
+
grid-template-rows: repeat(6, 1fr);
|
|
852
925
|
border-top: 1px solid var(--separator-light);
|
|
853
926
|
}
|
|
854
927
|
|
|
@@ -871,9 +944,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
871
944
|
display: flex;
|
|
872
945
|
flex-direction: column;
|
|
873
946
|
overflow-x: hidden;
|
|
874
|
-
overflow-y:
|
|
947
|
+
overflow-y: hidden;
|
|
875
948
|
gap: var(--month-day-gap, 1px);
|
|
876
949
|
min-width: 0;
|
|
950
|
+
min-height: 0;
|
|
877
951
|
/* Let Blink skip layout/paint for off-screen day cells */
|
|
878
952
|
content-visibility: auto;
|
|
879
953
|
contain-intrinsic-size: auto 6em;
|
|
@@ -897,15 +971,15 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
897
971
|
left: 0.25em;
|
|
898
972
|
z-index: 500;
|
|
899
973
|
background: transparent;
|
|
900
|
-
backdrop-filter: var(--indicator-backdrop-filter
|
|
901
|
-
-webkit-backdrop-filter: var(--indicator-backdrop-filter
|
|
974
|
+
backdrop-filter: var(--indicator-backdrop-filter);
|
|
975
|
+
-webkit-backdrop-filter: var(--indicator-backdrop-filter);
|
|
902
976
|
text-align: left;
|
|
903
977
|
min-height: 2em;
|
|
904
978
|
line-height: 2em;
|
|
905
979
|
margin: 0.25em;
|
|
906
|
-
border-radius:
|
|
980
|
+
border-radius: var(--month-indicator-border-radius);
|
|
907
981
|
align-self: flex-start;
|
|
908
|
-
transition: opacity
|
|
982
|
+
transition: opacity var(--transition-speed) ease-in-out;
|
|
909
983
|
opacity: 1;
|
|
910
984
|
padding: 0 0.25em;
|
|
911
985
|
white-space: nowrap;
|
|
@@ -914,53 +988,53 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
914
988
|
.day.scrolled .indicator {
|
|
915
989
|
opacity: 0;
|
|
916
990
|
}
|
|
917
|
-
`,
|
|
991
|
+
`,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 pe(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
992
|
<div class="week-container">
|
|
919
993
|
<div class="week-header">
|
|
920
994
|
<div class="time-header"></div>
|
|
921
|
-
${e.map((e,
|
|
995
|
+
${e.map((e,r)=>{const n=Te(this.locale);return a`
|
|
922
996
|
<div
|
|
923
|
-
class="day-label ${
|
|
997
|
+
class="day-label ${h({current:this._isCurrentDate(e)})}"
|
|
924
998
|
tabindex="0"
|
|
925
999
|
role="button"
|
|
926
|
-
aria-label="${n.switchToDayView} ${
|
|
1000
|
+
aria-label="${n.switchToDayView} ${ce(t[r],this.locale)}, ${e.day}"
|
|
927
1001
|
@click=${()=>this._handleDayLabelClick(e)}
|
|
928
1002
|
@keydown=${t=>this._handleDayLabelKeydown(t,e)}
|
|
929
1003
|
>
|
|
930
|
-
<span class="day-name">${
|
|
1004
|
+
<span class="day-name">${ce(t[r],this.locale)}</span>
|
|
931
1005
|
<span class="day-number">${e.day}</span>
|
|
932
1006
|
</div>
|
|
933
1007
|
`})}
|
|
934
1008
|
</div>
|
|
935
1009
|
|
|
936
1010
|
<!-- Peek indicators for condensed view -->
|
|
937
|
-
${this._isCondensed?(()=>{const e=
|
|
1011
|
+
${this._isCondensed?(()=>{const e=Te(this.locale);return a`
|
|
938
1012
|
<div class="peek-indicators">
|
|
939
1013
|
<span
|
|
940
|
-
class="peek-indicator ${
|
|
1014
|
+
class="peek-indicator ${h({"peek-indicator--hidden":!i})}"
|
|
941
1015
|
role="button"
|
|
942
|
-
tabindex=${
|
|
1016
|
+
tabindex=${i?"0":"-1"}
|
|
943
1017
|
aria-label="${e.showEarlierDays}"
|
|
944
1018
|
@click=${()=>this._handlePeekNavigate("previous")}
|
|
945
1019
|
@keydown=${e=>this._handlePeekKeydown(e,"previous")}
|
|
946
1020
|
>\u2039 ${e.more}</span>
|
|
947
1021
|
<span
|
|
948
|
-
class="peek-indicator ${
|
|
1022
|
+
class="peek-indicator ${h({"peek-indicator--hidden":!o})}"
|
|
949
1023
|
role="button"
|
|
950
|
-
tabindex=${
|
|
1024
|
+
tabindex=${o?"0":"-1"}
|
|
951
1025
|
aria-label="${e.showLaterDays}"
|
|
952
1026
|
@click=${()=>this._handlePeekNavigate("next")}
|
|
953
1027
|
@keydown=${e=>this._handlePeekKeydown(e,"next")}
|
|
954
1028
|
>${e.more} \u203A</span>
|
|
955
1029
|
</div>
|
|
956
|
-
`})():
|
|
1030
|
+
`})():r}
|
|
957
1031
|
|
|
958
1032
|
<!-- All-day events section -->
|
|
959
|
-
${a
|
|
1033
|
+
${n?a`
|
|
960
1034
|
<div class="all-day-wrapper">
|
|
961
1035
|
<div class="all-day-container">
|
|
962
|
-
<div class="all-day-time-header">${
|
|
963
|
-
${e.map(e=>
|
|
1036
|
+
<div class="all-day-time-header">${Te(this.locale).allDay}</div>
|
|
1037
|
+
${e.map(e=>a`
|
|
964
1038
|
<div class="all-day-day-column">
|
|
965
1039
|
<slot
|
|
966
1040
|
name="all-day-${e.year}-${e.month}-${e.day}"
|
|
@@ -969,19 +1043,19 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
969
1043
|
`)}
|
|
970
1044
|
</div>
|
|
971
1045
|
</div>
|
|
972
|
-
`:
|
|
973
|
-
<div class="week-scroll"
|
|
1046
|
+
`:r}
|
|
1047
|
+
<div class="week-scroll">
|
|
974
1048
|
<div class="time-labels">
|
|
975
|
-
${Array.from({length:25}).map((e,t)=>
|
|
1049
|
+
${Array.from({length:25}).map((e,t)=>a`
|
|
976
1050
|
<div
|
|
977
|
-
class="hour-label"
|
|
1051
|
+
class="hour-label${t%12==0?" snap-target":""}"
|
|
978
1052
|
style="top: calc(${t} * var(--hour-height))"
|
|
979
1053
|
>
|
|
980
1054
|
${this._renderIndicatorValue(t)}
|
|
981
1055
|
</div>
|
|
982
1056
|
`)}
|
|
983
1057
|
</div>
|
|
984
|
-
${e.map(e=>
|
|
1058
|
+
${e.map(e=>a`
|
|
985
1059
|
<div class="day-column">
|
|
986
1060
|
<slot
|
|
987
1061
|
name="timed-${e.year}-${e.month}-${e.day}"
|
|
@@ -990,7 +1064,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
990
1064
|
`)}
|
|
991
1065
|
</div>
|
|
992
1066
|
</div>
|
|
993
|
-
`}_renderIndicatorValue(e){return
|
|
1067
|
+
`}_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
1068
|
:host {
|
|
995
1069
|
display: block;
|
|
996
1070
|
height: 100%;
|
|
@@ -1008,12 +1082,13 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1008
1082
|
.week-header {
|
|
1009
1083
|
display: grid;
|
|
1010
1084
|
grid-template-columns: var(--calendar-grid-columns-week);
|
|
1011
|
-
height: var(--day-header-height,
|
|
1085
|
+
height: var(--day-header-height, 2.5em);
|
|
1012
1086
|
flex-shrink: 0;
|
|
1013
1087
|
border-bottom: var(--separator-border);
|
|
1014
1088
|
gap: var(--day-gap, 1px);
|
|
1015
|
-
padding: var(--day-padding, 0.5em);
|
|
1089
|
+
padding: 0 var(--day-padding, 0.5em);
|
|
1016
1090
|
position: relative;
|
|
1091
|
+
overflow: hidden;
|
|
1017
1092
|
}
|
|
1018
1093
|
|
|
1019
1094
|
.time-header {
|
|
@@ -1022,39 +1097,40 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1022
1097
|
|
|
1023
1098
|
.day-label {
|
|
1024
1099
|
text-align: center;
|
|
1025
|
-
padding:
|
|
1100
|
+
padding: 0 0.25em;
|
|
1026
1101
|
font-weight: var(--day-label-font-weight);
|
|
1027
1102
|
border-right: var(--separator-border);
|
|
1028
1103
|
display: flex;
|
|
1029
|
-
flex-direction:
|
|
1104
|
+
flex-direction: row;
|
|
1030
1105
|
justify-content: center;
|
|
1031
1106
|
align-items: center;
|
|
1032
|
-
gap:
|
|
1107
|
+
gap: 0.35em;
|
|
1033
1108
|
cursor: pointer;
|
|
1034
|
-
transition: background-color
|
|
1109
|
+
transition: background-color var(--transition-speed) ease;
|
|
1110
|
+
overflow: hidden;
|
|
1035
1111
|
}
|
|
1036
1112
|
|
|
1037
1113
|
.day-name {
|
|
1038
|
-
font-size:
|
|
1114
|
+
font-size: 0.7em;
|
|
1039
1115
|
text-transform: uppercase;
|
|
1040
1116
|
letter-spacing: 0.03em;
|
|
1041
1117
|
opacity: 0.7;
|
|
1042
1118
|
}
|
|
1043
1119
|
|
|
1044
1120
|
.day-number {
|
|
1045
|
-
font-size:
|
|
1046
|
-
font-weight: var(--day-label-number-font-weight
|
|
1121
|
+
font-size: 0.95em;
|
|
1122
|
+
font-weight: var(--day-label-number-font-weight);
|
|
1047
1123
|
line-height: 1;
|
|
1048
1124
|
}
|
|
1049
1125
|
|
|
1050
1126
|
.day-label:hover {
|
|
1051
|
-
background-color: var(--
|
|
1127
|
+
background-color: var(--hover-bg);
|
|
1052
1128
|
}
|
|
1053
1129
|
|
|
1054
1130
|
.day-label:focus {
|
|
1055
1131
|
outline: 2px solid var(--entry-focus-color, var(--primary-color));
|
|
1056
1132
|
outline-offset: 2px;
|
|
1057
|
-
background-color: var(--
|
|
1133
|
+
background-color: var(--focus-bg);
|
|
1058
1134
|
}
|
|
1059
1135
|
|
|
1060
1136
|
.day-label:last-child {
|
|
@@ -1069,11 +1145,15 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1069
1145
|
.week-scroll {
|
|
1070
1146
|
flex: 1;
|
|
1071
1147
|
overflow-y: auto;
|
|
1148
|
+
scroll-snap-type: y proximity;
|
|
1072
1149
|
display: grid;
|
|
1073
1150
|
grid-template-columns: var(--calendar-grid-columns-week);
|
|
1074
1151
|
grid-template-rows: 1fr;
|
|
1075
1152
|
gap: var(--day-gap, 1px);
|
|
1076
|
-
|
|
1153
|
+
/* Vertical padding gives the first/last hour labels room to
|
|
1154
|
+
render above/below the grid without clipping.
|
|
1155
|
+
Horizontal padding keeps the scrollport flush. */
|
|
1156
|
+
padding: 0.6em var(--day-padding, 0.5em);
|
|
1077
1157
|
min-height: 0;
|
|
1078
1158
|
position: relative;
|
|
1079
1159
|
contain: content;
|
|
@@ -1098,10 +1178,17 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1098
1178
|
pointer-events: none;
|
|
1099
1179
|
}
|
|
1100
1180
|
|
|
1181
|
+
/* Snap at noon: first scroll stop aligns with --half-day-height */
|
|
1182
|
+
.hour-label.snap-target {
|
|
1183
|
+
scroll-snap-align: start;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1101
1186
|
.day-column {
|
|
1102
1187
|
position: relative;
|
|
1103
1188
|
height: var(--day-total-height);
|
|
1104
1189
|
border-right: var(--sidebar-border, 1px solid var(--separator-light));
|
|
1190
|
+
/* Match time-labels clipping */
|
|
1191
|
+
overflow: clip;
|
|
1105
1192
|
background-image: repeating-linear-gradient(
|
|
1106
1193
|
to bottom,
|
|
1107
1194
|
transparent 0,
|
|
@@ -1120,6 +1207,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1120
1207
|
.all-day-wrapper {
|
|
1121
1208
|
display: grid;
|
|
1122
1209
|
grid-template-rows: 1fr;
|
|
1210
|
+
flex-shrink: 0;
|
|
1123
1211
|
border-bottom: var(--separator-border);
|
|
1124
1212
|
background: var(--background-color);
|
|
1125
1213
|
z-index: 2;
|
|
@@ -1167,7 +1255,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1167
1255
|
border-bottom-left-radius: 0 !important;
|
|
1168
1256
|
border-bottom-right-radius: 0 !important;
|
|
1169
1257
|
position: relative !important;
|
|
1170
|
-
border-left:
|
|
1258
|
+
border-left: var(--multi-day-separator) !important;
|
|
1171
1259
|
margin-left: -2px !important;
|
|
1172
1260
|
}
|
|
1173
1261
|
|
|
@@ -1177,7 +1265,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1177
1265
|
border-top-right-radius: var(--entry-border-radius) !important;
|
|
1178
1266
|
border-bottom-right-radius: var(--entry-border-radius) !important;
|
|
1179
1267
|
position: relative !important;
|
|
1180
|
-
border-left:
|
|
1268
|
+
border-left: var(--multi-day-separator) !important;
|
|
1181
1269
|
margin-left: -2px !important;
|
|
1182
1270
|
}
|
|
1183
1271
|
|
|
@@ -1216,81 +1304,106 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1216
1304
|
cursor: pointer;
|
|
1217
1305
|
user-select: none;
|
|
1218
1306
|
padding: 0.1em 0.35em;
|
|
1219
|
-
border-radius: var(--border-radius-sm
|
|
1307
|
+
border-radius: var(--border-radius-sm);
|
|
1220
1308
|
transition:
|
|
1221
|
-
background-color
|
|
1222
|
-
color
|
|
1309
|
+
background-color var(--transition-speed) ease,
|
|
1310
|
+
color var(--transition-speed) ease;
|
|
1223
1311
|
}
|
|
1224
1312
|
|
|
1225
1313
|
.peek-indicator:hover {
|
|
1226
|
-
background-color: var(--
|
|
1314
|
+
background-color: var(--hover-bg);
|
|
1227
1315
|
color: var(--separator-dark, rgba(0, 0, 0, 0.7));
|
|
1228
1316
|
}
|
|
1229
1317
|
|
|
1230
1318
|
.peek-indicator:active {
|
|
1231
|
-
background-color: var(--
|
|
1319
|
+
background-color: var(--peek-active-bg);
|
|
1232
1320
|
}
|
|
1233
1321
|
|
|
1234
1322
|
.peek-indicator--hidden {
|
|
1235
1323
|
visibility: hidden;
|
|
1236
1324
|
pointer-events: none;
|
|
1237
1325
|
}
|
|
1238
|
-
`,
|
|
1239
|
-
<div class="
|
|
1240
|
-
${
|
|
1326
|
+
`,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`
|
|
1327
|
+
<div class="scroll-container">
|
|
1328
|
+
<div class="year-grid" role="grid" aria-label="${Te(this.locale).year} ${e}">
|
|
1329
|
+
${Array.from({length:12},(t,a)=>{const s=a+1;return this._renderMiniMonth(e,s,r,n,i,o)})}
|
|
1330
|
+
</div>
|
|
1241
1331
|
</div>
|
|
1242
|
-
`}_renderMiniMonth(e,t,
|
|
1332
|
+
`}_renderMiniMonth(e,t,r,n,i,o){const s=new Date(e,t,0).getDate(),l=me({year:e,month:t},this.firstDayOfWeek),c=Te(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
1333
|
<div class="mini-month">
|
|
1244
1334
|
<button
|
|
1245
1335
|
type="button"
|
|
1246
1336
|
class="month-label"
|
|
1247
1337
|
@click=${()=>this._handleMonthClick(e,t)}
|
|
1248
1338
|
>
|
|
1249
|
-
${
|
|
1339
|
+
${de(t,this.locale)}
|
|
1250
1340
|
</button>
|
|
1251
1341
|
<div class="weekday-header">
|
|
1252
1342
|
<span></span>
|
|
1253
|
-
${o.map(e=>
|
|
1343
|
+
${o.map(e=>a`<span>${ce(e,this.locale).charAt(0)}</span>`)}
|
|
1254
1344
|
</div>
|
|
1255
1345
|
<div class="day-grid">
|
|
1256
|
-
${
|
|
1257
|
-
${null!==
|
|
1346
|
+
${h.map(o=>{const s=o.find(e=>null!==e),l=s?d.fromObject({year:e,month:t,day:s}).weekNumber:null;return a`
|
|
1347
|
+
${null!==l?a`<button
|
|
1258
1348
|
type="button"
|
|
1259
1349
|
class="cw-label"
|
|
1260
|
-
aria-label="${
|
|
1350
|
+
aria-label="${c.calendarWeek} ${l}"
|
|
1261
1351
|
@click=${()=>this._handleWeekClick(e,t,s)}
|
|
1262
|
-
>${
|
|
1352
|
+
>${l}</button>`:a`
|
|
1263
1353
|
<span class="empty-cell"></span>
|
|
1264
1354
|
`}
|
|
1265
|
-
${o.map(o=>null!==o?this._renderDayCell(e,t,o,o===
|
|
1355
|
+
${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
1356
|
<span class="empty-cell"></span>
|
|
1267
1357
|
`)}
|
|
1268
1358
|
`})}
|
|
1269
1359
|
</div>
|
|
1270
1360
|
</div>
|
|
1271
|
-
`}_renderDayCell(e,t,
|
|
1361
|
+
`}_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
1362
|
<button
|
|
1273
1363
|
type="button"
|
|
1274
1364
|
class=${d.join(" ")}
|
|
1275
|
-
data-density=${l||
|
|
1276
|
-
data-date="${e}-${t}-${
|
|
1277
|
-
@click=${()=>this._handleDayClick(e,t,
|
|
1278
|
-
aria-label="${
|
|
1365
|
+
data-density=${l||r}
|
|
1366
|
+
data-date="${e}-${t}-${n}"
|
|
1367
|
+
@click=${()=>this._handleDayClick(e,t,n)}
|
|
1368
|
+
aria-label="${n} ${de(t,this.locale)} ${e}${s>0?`, ${s} ${Te(this.locale).events}`:""}"
|
|
1279
1369
|
>
|
|
1280
|
-
${
|
|
1281
|
-
${"count"===this.densityMode&&s>0?
|
|
1370
|
+
${n}
|
|
1371
|
+
${"count"===this.densityMode&&s>0?a`<span class="event-count">${s}</span>`:r}
|
|
1282
1372
|
</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}))}};
|
|
1373
|
+
`}_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
1374
|
:host {
|
|
1285
1375
|
display: block;
|
|
1286
|
-
|
|
1287
|
-
|
|
1376
|
+
height: 100%;
|
|
1377
|
+
contain: layout style;
|
|
1378
|
+
/* inline-size only: host participates in parent width calculation
|
|
1379
|
+
while still providing width-based container queries */
|
|
1288
1380
|
container-type: inline-size;
|
|
1289
1381
|
}
|
|
1290
1382
|
|
|
1383
|
+
/* Inner wrapper provides block-axis containment for cqb units
|
|
1384
|
+
and handles scrolling. Its contain: size (implied by container-type: size)
|
|
1385
|
+
is harmless here — it receives dimensions from :host, not the reverse. */
|
|
1386
|
+
.scroll-container {
|
|
1387
|
+
height: 100%;
|
|
1388
|
+
overflow-y: auto;
|
|
1389
|
+
container-type: size;
|
|
1390
|
+
scroll-snap-type: y mandatory;
|
|
1391
|
+
scroll-padding-top: 1em;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1291
1394
|
.year-grid {
|
|
1292
1395
|
display: grid;
|
|
1293
1396
|
grid-template-columns: repeat(var(--year-grid-columns, 3), 1fr);
|
|
1397
|
+
/* 2 visible rows per snap page. minmax allows growth for
|
|
1398
|
+
6-week months. Snap targets on every .mini-month give
|
|
1399
|
+
per-row snapping for any column count. */
|
|
1400
|
+
grid-template-rows: repeat(
|
|
1401
|
+
4,
|
|
1402
|
+
minmax(
|
|
1403
|
+
max(calc((100cqb - 2em - 1.25em) / 2), calc((var(--half-day-height) - 2.25em) / 2)),
|
|
1404
|
+
auto
|
|
1405
|
+
)
|
|
1406
|
+
);
|
|
1294
1407
|
gap: 1.25em 1em;
|
|
1295
1408
|
padding: 1em;
|
|
1296
1409
|
}
|
|
@@ -1299,6 +1412,13 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1299
1412
|
@container (max-width: 400px) {
|
|
1300
1413
|
.year-grid {
|
|
1301
1414
|
grid-template-columns: repeat(var(--year-grid-columns-mobile, 1), 1fr);
|
|
1415
|
+
grid-template-rows: repeat(
|
|
1416
|
+
12,
|
|
1417
|
+
minmax(
|
|
1418
|
+
max(calc((100cqb - 1.5em - 1em) / 2), calc((var(--half-day-height) - 1.75em) / 2)),
|
|
1419
|
+
auto
|
|
1420
|
+
)
|
|
1421
|
+
);
|
|
1302
1422
|
gap: 1em 0.75em;
|
|
1303
1423
|
padding: 0.75em;
|
|
1304
1424
|
}
|
|
@@ -1307,6 +1427,13 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1307
1427
|
@container (min-width: 401px) and (max-width: 700px) {
|
|
1308
1428
|
.year-grid {
|
|
1309
1429
|
grid-template-columns: repeat(var(--year-grid-columns-tablet, 2), 1fr);
|
|
1430
|
+
grid-template-rows: repeat(
|
|
1431
|
+
6,
|
|
1432
|
+
minmax(
|
|
1433
|
+
max(calc((100cqb - 2em - 1.25em) / 2), calc((var(--half-day-height) - 2.25em) / 2)),
|
|
1434
|
+
auto
|
|
1435
|
+
)
|
|
1436
|
+
);
|
|
1310
1437
|
}
|
|
1311
1438
|
}
|
|
1312
1439
|
|
|
@@ -1315,11 +1442,14 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1315
1442
|
flex-direction: column;
|
|
1316
1443
|
gap: 0.15em;
|
|
1317
1444
|
min-width: 0; /* prevent grid blowout */
|
|
1445
|
+
/* Snap target — months sharing a grid row resolve to the
|
|
1446
|
+
same position, so this works for any column count. */
|
|
1447
|
+
scroll-snap-align: start;
|
|
1318
1448
|
}
|
|
1319
1449
|
|
|
1320
1450
|
.month-label {
|
|
1321
1451
|
font-size: var(--year-month-label-font-size, 0.875em);
|
|
1322
|
-
font-weight:
|
|
1452
|
+
font-weight: var(--month-label-font-weight);
|
|
1323
1453
|
color: var(--separator-dark, rgba(0, 0, 0, 0.7));
|
|
1324
1454
|
cursor: pointer;
|
|
1325
1455
|
padding: 0.3em 0;
|
|
@@ -1333,7 +1463,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1333
1463
|
}
|
|
1334
1464
|
|
|
1335
1465
|
.month-label:hover {
|
|
1336
|
-
color: var(--
|
|
1466
|
+
color: var(--year-month-label-hover-color);
|
|
1337
1467
|
}
|
|
1338
1468
|
|
|
1339
1469
|
.weekday-header {
|
|
@@ -1346,7 +1476,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1346
1476
|
font-size: 0.65em;
|
|
1347
1477
|
color: var(--header-text-color, rgba(0, 0, 0, 0.45));
|
|
1348
1478
|
padding: 0.2em 0;
|
|
1349
|
-
font-weight:
|
|
1479
|
+
font-weight: var(--year-weekday-font-weight);
|
|
1350
1480
|
overflow: hidden;
|
|
1351
1481
|
}
|
|
1352
1482
|
|
|
@@ -1367,15 +1497,15 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1367
1497
|
cursor: pointer;
|
|
1368
1498
|
border: none;
|
|
1369
1499
|
background: none;
|
|
1370
|
-
border-radius: var(--border-radius-sm
|
|
1500
|
+
border-radius: var(--border-radius-sm);
|
|
1371
1501
|
font-family: inherit;
|
|
1372
1502
|
padding: 0;
|
|
1373
1503
|
line-height: 1;
|
|
1374
1504
|
}
|
|
1375
1505
|
|
|
1376
1506
|
.cw-label:hover {
|
|
1377
|
-
color: var(--
|
|
1378
|
-
background: var(--
|
|
1507
|
+
color: var(--cw-hover-color);
|
|
1508
|
+
background: var(--cw-hover-bg);
|
|
1379
1509
|
}
|
|
1380
1510
|
|
|
1381
1511
|
.day-cell {
|
|
@@ -1386,7 +1516,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1386
1516
|
font-size: var(--year-day-font-size, 0.7em);
|
|
1387
1517
|
border: none;
|
|
1388
1518
|
background: none;
|
|
1389
|
-
border-radius:
|
|
1519
|
+
border-radius: var(--year-day-cell-border-radius);
|
|
1390
1520
|
cursor: pointer;
|
|
1391
1521
|
position: relative;
|
|
1392
1522
|
width: var(--year-cell-size, 1.8em);
|
|
@@ -1399,21 +1529,21 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1399
1529
|
}
|
|
1400
1530
|
|
|
1401
1531
|
.day-cell:hover {
|
|
1402
|
-
background: var(--
|
|
1532
|
+
background: var(--hover-bg);
|
|
1403
1533
|
}
|
|
1404
1534
|
|
|
1405
1535
|
.day-cell.current {
|
|
1406
|
-
background: var(--
|
|
1407
|
-
color:
|
|
1408
|
-
font-weight:
|
|
1536
|
+
background: var(--current-day-bg);
|
|
1537
|
+
color: var(--current-day-color);
|
|
1538
|
+
font-weight: var(--current-day-font-weight);
|
|
1409
1539
|
}
|
|
1410
1540
|
|
|
1411
1541
|
.day-cell.current:hover {
|
|
1412
|
-
opacity:
|
|
1542
|
+
opacity: var(--current-day-hover-opacity);
|
|
1413
1543
|
}
|
|
1414
1544
|
|
|
1415
1545
|
.day-cell.selected {
|
|
1416
|
-
outline: 2px solid var(--primary-color,
|
|
1546
|
+
outline: 2px solid var(--primary-color, #3b82f6);
|
|
1417
1547
|
outline-offset: -2px;
|
|
1418
1548
|
}
|
|
1419
1549
|
|
|
@@ -1427,30 +1557,30 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1427
1557
|
width: 3px;
|
|
1428
1558
|
height: 3px;
|
|
1429
1559
|
border-radius: 50%;
|
|
1430
|
-
background: var(--year-dot-color, var(--indicator-color, var(--primary-color,
|
|
1560
|
+
background: var(--year-dot-color, var(--indicator-color, var(--primary-color, #3b82f6)));
|
|
1431
1561
|
}
|
|
1432
1562
|
|
|
1433
1563
|
.day-cell.current.has-events::after {
|
|
1434
|
-
background:
|
|
1564
|
+
background: var(--current-dot-bg);
|
|
1435
1565
|
}
|
|
1436
1566
|
|
|
1437
1567
|
/* ── Heatmap density mode ── */
|
|
1438
1568
|
.day-cell[data-density='1'] {
|
|
1439
|
-
background: var(--year-heatmap-1, rgba(
|
|
1569
|
+
background: var(--year-heatmap-1, rgba(59, 130, 246, 0.15));
|
|
1440
1570
|
}
|
|
1441
1571
|
.day-cell[data-density='2'] {
|
|
1442
|
-
background: var(--year-heatmap-2, rgba(
|
|
1572
|
+
background: var(--year-heatmap-2, rgba(59, 130, 246, 0.35));
|
|
1443
1573
|
}
|
|
1444
1574
|
.day-cell[data-density='3'] {
|
|
1445
|
-
background: var(--year-heatmap-3, rgba(
|
|
1575
|
+
background: var(--year-heatmap-3, rgba(59, 130, 246, 0.55));
|
|
1446
1576
|
}
|
|
1447
1577
|
.day-cell[data-density='4'] {
|
|
1448
|
-
background: var(--year-heatmap-4, rgba(
|
|
1449
|
-
color:
|
|
1578
|
+
background: var(--year-heatmap-4, rgba(59, 130, 246, 0.75));
|
|
1579
|
+
color: var(--year-heatmap-4-text);
|
|
1450
1580
|
}
|
|
1451
1581
|
|
|
1452
1582
|
.day-cell.current[data-density] {
|
|
1453
|
-
background: var(--primary-color,
|
|
1583
|
+
background: var(--primary-color, #3b82f6);
|
|
1454
1584
|
}
|
|
1455
1585
|
|
|
1456
1586
|
/* ── Count density mode ── */
|
|
@@ -1465,13 +1595,13 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1465
1595
|
}
|
|
1466
1596
|
|
|
1467
1597
|
.day-cell.current .event-count {
|
|
1468
|
-
color:
|
|
1598
|
+
color: var(--current-day-color);
|
|
1469
1599
|
}
|
|
1470
1600
|
|
|
1471
1601
|
.empty-cell {
|
|
1472
1602
|
/* Grid auto-rows handles height; no explicit size needed */
|
|
1473
1603
|
}
|
|
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`
|
|
1604
|
+
`,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);const ha={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function ua(e){return e.endsWith("deg")?parseFloat(e):e.endsWith("grad")?.9*parseFloat(e):e.endsWith("rad")?180*parseFloat(e)/Math.PI:e.endsWith("turn")?360*parseFloat(e):parseFloat(e)}function fa(e){return e.endsWith("%")?parseFloat(e)/100:parseFloat(e)}function ya(e,t,a){e=(e%360+360)%360,t=Math.max(0,Math.min(1,t)),a=Math.max(0,Math.min(1,a));const r=(1-Math.abs(2*a-1))*t,n=r*(1-Math.abs(e/60%2-1)),i=a-r/2;let o,s,d;return[o,s,d]=e<60?[r,n,0]:e<120?[n,r,0]:e<180?[0,r,n]:e<240?[0,n,r]:e<300?[n,0,r]:[r,0,n],[Math.round(255*(o+i)),Math.round(255*(s+i)),Math.round(255*(d+i))]}function pa(e){const t=e.match(/^hwb\(\s*([^\s,)]+)[\s,]+([^\s,)]+)[\s,]+([^\s,/)]+)/i);if(!t)return;const a=ua(t[1].trim()),r=fa(t[2].trim()),n=fa(t[3].trim());return isNaN(a)||isNaN(r)||isNaN(n)?void 0:function(e,t,a){if(t=Math.max(0,Math.min(1,t)),a=Math.max(0,Math.min(1,a)),t+a>=1){const e=Math.round(t/(t+a)*255);return[e,e,e]}const[r,n,i]=ya(e,1,.5),o=1-t-a;return[Math.round(r/255*o*255+255*t),Math.round(n/255*o*255+255*t),Math.round(i/255*o*255+255*t)]}(a,r,n)}function ma(e,t,a){const r=(e+16)/116,n=t/500+r,i=r-a/200,o=6/29,s=.3457/.3585*(n>o?n**3:3*o*o*(n-4/29)),d=1*(r>o?r**3:3*o*o*(r-4/29)),l=.2958/.3585*(i>o?i**3:3*o*o*(i-4/29)),c=3.1338561*s-1.6168667*d-.4906146*l,h=-.9787684*s+1.9161415*d+.033454*l,u=.0719453*s-.2289914*d+1.4052427*l;return[Da(Math.round(255*ka(c))),Da(Math.round(255*ka(h))),Da(Math.round(255*ka(u)))]}function ba(e,t,a){const r=e+.3963377774*t+.2158037573*a,n=e-.1055613458*t-.0638541728*a,i=e-.0894841775*t-1.291485548*a,o=r*r*r,s=n*n*n,d=i*i*i,l=4.0767416621*o-3.3077115913*s+.2309699292*d,c=-1.2684380046*o+2.6097574011*s-.3413193965*d,h=-.0041960863*o-.7034186147*s+1.707614701*d;return[Da(Math.round(255*ka(l))),Da(Math.round(255*ka(c))),Da(Math.round(255*ka(h)))]}function ga(e){const t=e.match(/^color\(\s*([\w-]+)\s+([^\s,)]+)[\s,]+([^\s,)]+)[\s,]+([^\s,/)]+)/i);if(!t)return;const a=t[1].toLowerCase(),r=va(t[2].trim()),n=va(t[3].trim()),i=va(t[4].trim());return isNaN(r)||isNaN(n)||isNaN(i)?void 0:"srgb"===a?[Da(Math.round(255*r)),Da(Math.round(255*n)),Da(Math.round(255*i))]:"xyz-d50"===a?function(e,t,a){const r=3.1338561*e-1.6168667*t-.4906146*a,n=-.9787684*e+1.9161415*t+.033454*a,i=.0719453*e-.2289914*t+1.4052427*a;return[Da(Math.round(255*ka(r))),Da(Math.round(255*ka(n))),Da(Math.round(255*ka(i)))]}(r,n,i):"xyz-d65"===a||"xyz"===a?function(e,t,a){const r=3.2404542*e-1.5371385*t-.4985314*a,n=-.969266*e+1.8760108*t+.041556*a,i=.0556434*e-.2040259*t+1.0572252*a;return[Da(Math.round(255*ka(r))),Da(Math.round(255*ka(n))),Da(Math.round(255*ka(i)))]}(r,n,i):void 0}function va(e){return e.endsWith("%")?parseFloat(e)/100:parseFloat(e)}function wa(e,t){return e.endsWith("%")?parseFloat(e)/100*t:parseFloat(e)}function ka(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}function Da(e){return Math.max(0,Math.min(255,e))}function xa(e){if(!e||!e.trim())return;const t=e.trim().toLowerCase();if("transparent"===t)return;if(t.startsWith("#")||/^[a-f\d]{3,8}$/i.test(t))return function(e){const t=e.startsWith("#")?e.slice(1):e;let a,r,n;if(/^[a-f\d]{3}$/i.test(t))a=parseInt(t[0]+t[0],16),r=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16);else if(/^[a-f\d]{4}$/i.test(t))a=parseInt(t[0]+t[0],16),r=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16);else if(/^[a-f\d]{6}$/i.test(t))a=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16);else{if(!/^[a-f\d]{8}$/i.test(t))return;a=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16)}if(!(isNaN(a)||isNaN(r)||isNaN(n)))return[a,r,n]}(t);if(t.startsWith("rgb"))return function(e){const t=e.match(/^rgba?\(\s*([^\s,)]+)[\s,]+([^\s,)]+)[\s,]+([^\s,/)]+)/i);if(!t)return;const a=[t[1],t[2],t[3]].map(e=>{const t=e.trim();return t.endsWith("%")?Math.round(parseFloat(t)/100*255):Math.round(parseFloat(t))});return a.some(e=>isNaN(e))?void 0:[Da(a[0]),Da(a[1]),Da(a[2])]}(t);if(t.startsWith("hsl"))return function(e){const t=e.match(/^hsla?\(\s*([^\s,)]+)[\s,]+([^\s,)]+)[\s,]+([^\s,/)]+)/i);if(!t)return;const a=ua(t[1].trim()),r=fa(t[2].trim()),n=fa(t[3].trim());return isNaN(a)||isNaN(r)||isNaN(n)?void 0:ya(a,r,n)}(t);if(t.startsWith("hwb"))return pa(t);if(t.startsWith("oklab"))return function(e){const t=e.match(/^oklab\(\s*([^\s,)]+)[\s,]+([^\s,)]+)[\s,]+([^\s,/)]+)/i);if(!t)return;const a=wa(t[1].trim(),1),r=wa(t[2].trim(),.4),n=wa(t[3].trim(),.4);return isNaN(a)||isNaN(r)||isNaN(n)?void 0:ba(a,r,n)}(t);if(t.startsWith("oklch"))return function(e){const t=e.match(/^oklch\(\s*([^\s,)]+)[\s,]+([^\s,)]+)[\s,]+([^\s,/)]+)/i);if(!t)return;const a=wa(t[1].trim(),1),r=wa(t[2].trim(),.4),n=ua(t[3].trim());if(isNaN(a)||isNaN(r)||isNaN(n))return;const i=n*Math.PI/180;return ba(a,r*Math.cos(i),r*Math.sin(i))}(t);if(t.startsWith("lch"))return function(e){const t=e.match(/^lch\(\s*([^\s,)]+)[\s,]+([^\s,)]+)[\s,]+([^\s,/)]+)/i);if(!t)return;const a=wa(t[1].trim(),100),r=wa(t[2].trim(),150),n=ua(t[3].trim());if(isNaN(a)||isNaN(r)||isNaN(n))return;const i=n*Math.PI/180;return ma(a,r*Math.cos(i),r*Math.sin(i))}(t);if(t.startsWith("lab"))return function(e){const t=e.match(/^lab\(\s*([^\s,)]+)[\s,]+([^\s,)]+)[\s,]+([^\s,/)]+)/i);if(!t)return;const a=wa(t[1].trim(),100),r=wa(t[2].trim(),125),n=wa(t[3].trim(),125);return isNaN(a)||isNaN(r)||isNaN(n)?void 0:ma(a,r,n)}(t);if(t.startsWith("color"))return ga(t);const a=ha[t];return a?[...a]:void 0}const $a=[25,118,210];class Ea{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 Sa=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=pe(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=Te(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 _a{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 Ma(e,t,a){return getComputedStyle(e).getPropertyValue(t).trim()||a}function Ta(e,t,a){return Math.max(t,Math.min(a,e))}function Ca(e,t,a,r){const n=parseInt(Ma(r,"--week-day-count","7"),10),i=Ta(Number.isNaN(n)?7:n,1,7),o=parseInt(Ma(r,"--week-mobile-day-count","3"),10),s=Ta(Number.isNaN(o)?3:o,1,7),d=parseInt(Ma(r,"--week-mobile-breakpoint","768"),10),l=a<(Number.isNaN(d)?768:d)?s:i,c=pe(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 Ta(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 Oa=Object.defineProperty,Aa=Object.getOwnPropertyDescriptor,Ia=(e,t,a,r)=>{for(var n,i=r>1?void 0:r?Aa(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&&Oa(t,a,i),i};let Na=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 _a(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 Ea({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=y(this.entries,function(...e){return u(k,e,D)}(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(M,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=y(this._expandedEntries,function(...e){return g(T,e)}(e=>e.continuation?.has||!1?e.originalIndex-1e3:e.originalIndex),function(...e){return u($,e,E)}(e=>{const[t]=function(e){const t=xa(e);if(!t)return["rgb(255,255,255)","rgb(0,0,0)"];const[a,r,n]=t,i=(299*a+587*r+114*n)/1e3;return[`rgb(${a},${r},${n})`,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
1605
|
<div class="calendar-container">
|
|
1476
1606
|
<header>
|
|
1477
1607
|
<lms-calendar-header
|
|
@@ -1487,8 +1617,8 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1487
1617
|
</lms-calendar-header>
|
|
1488
1618
|
</header>
|
|
1489
1619
|
|
|
1490
|
-
<main role="region" aria-live="polite" aria-label="${
|
|
1491
|
-
${"month"===e?
|
|
1620
|
+
<main role="region" aria-live="polite" aria-label="${Te(this.locale)[e]} ${Te(this.locale).viewLabel}">
|
|
1621
|
+
${"month"===e?a`
|
|
1492
1622
|
<lms-calendar-context
|
|
1493
1623
|
.firstDayOfWeek=${this.firstDayOfWeek}
|
|
1494
1624
|
.locale=${this.locale}
|
|
@@ -1504,36 +1634,38 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1504
1634
|
>
|
|
1505
1635
|
${this._calendarWidth<768?this._renderEntriesSumByDay():this._renderEntries()}
|
|
1506
1636
|
</lms-calendar-month>
|
|
1507
|
-
`:
|
|
1508
|
-
${"week"===e?(()=>{const e=
|
|
1637
|
+
`:r}
|
|
1638
|
+
${"week"===e?(()=>{const e=Ca(t,this.firstDayOfWeek,this._calendarWidth,this),r=this._renderEntriesByDate(e);return a`
|
|
1509
1639
|
<lms-calendar-week
|
|
1510
1640
|
@expand=${this._handleExpand}
|
|
1511
1641
|
@peek-navigate=${this._handlePeekNavigate}
|
|
1512
1642
|
@open-menu=${this._handleOpenMenu}
|
|
1513
1643
|
@clear-other-selections=${this._handleClearOtherSelections}
|
|
1514
1644
|
.activeDate=${t}
|
|
1515
|
-
.allDayRowCount=${
|
|
1645
|
+
.allDayRowCount=${r.allDayRowCount}
|
|
1516
1646
|
.firstDayOfWeek=${this.firstDayOfWeek}
|
|
1517
1647
|
.locale=${this.locale}
|
|
1518
1648
|
.visibleDates=${e.visibleDates}
|
|
1519
1649
|
.visibleStartIndex=${e.visibleStartIndex}
|
|
1520
1650
|
.visibleLength=${e.visibleLength}
|
|
1521
|
-
style=${
|
|
1651
|
+
style=${s({"--calendar-grid-columns-week":e.gridColumns})}
|
|
1522
1652
|
>
|
|
1523
|
-
${
|
|
1653
|
+
${r.elements}
|
|
1524
1654
|
</lms-calendar-week>
|
|
1525
|
-
`})():
|
|
1526
|
-
${"day"===e?(()=>{const e=this._renderEntriesByDate();return
|
|
1655
|
+
`})():r}
|
|
1656
|
+
${"day"===e?(()=>{const e=this._renderEntriesByDate();return a`
|
|
1527
1657
|
<lms-calendar-day
|
|
1528
1658
|
@open-menu=${this._handleOpenMenu}
|
|
1529
1659
|
@clear-other-selections=${this._handleClearOtherSelections}
|
|
1530
1660
|
.allDayRowCount=${e.allDayRowCount}
|
|
1661
|
+
.activeDate=${t}
|
|
1662
|
+
.firstDayOfWeek=${this.firstDayOfWeek}
|
|
1531
1663
|
.locale=${this.locale}
|
|
1532
1664
|
>
|
|
1533
1665
|
${e.elements}
|
|
1534
1666
|
</lms-calendar-day>
|
|
1535
|
-
`})():
|
|
1536
|
-
${"year"===e?
|
|
1667
|
+
`})():r}
|
|
1668
|
+
${"year"===e?a`
|
|
1537
1669
|
<lms-calendar-year
|
|
1538
1670
|
@expand=${this._handleExpand}
|
|
1539
1671
|
.activeDate=${t}
|
|
@@ -1543,7 +1675,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1543
1675
|
.drillTarget=${this.yearDrillTarget}
|
|
1544
1676
|
.densityMode=${this.yearDensityMode}
|
|
1545
1677
|
></lms-calendar-year>
|
|
1546
|
-
`:
|
|
1678
|
+
`:r}
|
|
1547
1679
|
</main>
|
|
1548
1680
|
|
|
1549
1681
|
<lms-menu
|
|
@@ -1554,15 +1686,15 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1554
1686
|
@menu-close=${this._handleMenuClose}
|
|
1555
1687
|
></lms-menu>
|
|
1556
1688
|
</div>
|
|
1557
|
-
`}_handleSwitchDate(e){"next"===e.detail.direction?this._viewState.navigateNext():"previous"===e.detail.direction&&this._viewState.navigatePrevious()}_handleSwitchView(e){return
|
|
1689
|
+
`}_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
1690
|
<lms-calendar-entry
|
|
1559
1691
|
class=${`_${e}${l?` ${l}`:""}`}
|
|
1560
1692
|
slot=${t}
|
|
1561
|
-
style=${
|
|
1693
|
+
style=${r}
|
|
1562
1694
|
.time=${n.time}
|
|
1563
1695
|
.heading=${n.heading??""}
|
|
1564
1696
|
.content=${n.content}
|
|
1565
|
-
.isContinuation=${
|
|
1697
|
+
.isContinuation=${i??!1}
|
|
1566
1698
|
.date=${n.date}
|
|
1567
1699
|
.density=${c}
|
|
1568
1700
|
.displayMode=${s}
|
|
@@ -1571,17 +1703,19 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1571
1703
|
.locale=${this.locale}
|
|
1572
1704
|
>
|
|
1573
1705
|
</lms-calendar-entry>
|
|
1574
|
-
`}_determineDensity(e,t,a){if(!e.time)return"compact";if(t&&void 0!==a&&t[a])return"standard";const
|
|
1706
|
+
`}_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??pe(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??pe(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?Sa.getIndexInDates(a.date.start,o):Sa.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,t=$a){return xa(e)??t}(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=Sa.calculatePosition(u),y=Sa.calculateAccessibility(u),p=l.get(h)??0,m={width:100,x:0,zIndex:100+p,opacity:1},b=Sa.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?Sa.getIndexInDates(a.date.start,o):Sa.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-border: 1px solid rgba(${i}, ${s}, ${d}, 0.25); --entry-border-left: none; --entry-handle-color: ${a.color||"var(--primary-color)"}; --entry-handle-width: 4px; --entry-handle-display: block; --entry-padding-left: calc(4px + 0.35em); order: ${p}; ${b}`,entry:{...a,accessibility:y},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=Sa.calculatePosition(l),h=Sa.calculateAccessibility(l),u={width:o.width,x:o.x,zIndex:o.zIndex,opacity:o.opacity,height:o.height},f=Sa.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: color-mix(in srgb, var(--background-color) 80%, transparent); --entry-border: 1px solid var(--separator-light); --entry-border-left: none; --entry-handle-color: ${e.color||"var(--primary-color)"}; --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} ${Te(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}};Na.styles=e`
|
|
1575
1707
|
:host {
|
|
1576
1708
|
display: block;
|
|
1577
1709
|
contain: layout style paint;
|
|
1578
|
-
|
|
1579
|
-
|
|
1710
|
+
/* Override grid/flex automatic minimum size so that an
|
|
1711
|
+
external height (e.g. height: 100% on a grid item) is
|
|
1712
|
+
the real constraint — not the min-content height. */
|
|
1713
|
+
min-height: 0;
|
|
1580
1714
|
|
|
1581
|
-
--shadow-sm:
|
|
1582
|
-
--shadow-md:
|
|
1583
|
-
--shadow-lg:
|
|
1584
|
-
--shadow-hv:
|
|
1715
|
+
--shadow-sm: none;
|
|
1716
|
+
--shadow-md: none;
|
|
1717
|
+
--shadow-lg: none;
|
|
1718
|
+
--shadow-hv: none;
|
|
1585
1719
|
|
|
1586
1720
|
--breakpoint-xs: 425px;
|
|
1587
1721
|
--breakpoint-sm: 768px;
|
|
@@ -1591,32 +1725,48 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1591
1725
|
--separator-mid: rgba(0, 0, 0, 0.4);
|
|
1592
1726
|
--separator-dark: rgba(0, 0, 0, 0.7);
|
|
1593
1727
|
|
|
1594
|
-
--system-ui:
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
--
|
|
1598
|
-
|
|
1728
|
+
--system-ui: inherit;
|
|
1729
|
+
--monospace-ui: monospace;
|
|
1730
|
+
|
|
1731
|
+
--border-radius-sm: 0;
|
|
1732
|
+
--border-radius-md: 0;
|
|
1733
|
+
--border-radius-lg: 0;
|
|
1599
1734
|
|
|
1600
|
-
--
|
|
1601
|
-
--
|
|
1602
|
-
--border-radius-lg: 12px;
|
|
1735
|
+
--background-color: Canvas;
|
|
1736
|
+
--primary-color: AccentColor;
|
|
1603
1737
|
|
|
1604
|
-
|
|
1605
|
-
--
|
|
1738
|
+
/* Interaction tokens — neutral by default */
|
|
1739
|
+
--transition-speed: 0s;
|
|
1740
|
+
--hover-bg: transparent;
|
|
1741
|
+
--focus-bg: transparent;
|
|
1742
|
+
--peek-active-bg: transparent;
|
|
1743
|
+
--context-bg: transparent;
|
|
1744
|
+
--active-indicator-bg: transparent;
|
|
1745
|
+
--active-indicator-shadow: none;
|
|
1746
|
+
|
|
1747
|
+
/* Float text tokens */
|
|
1748
|
+
--float-text-bg: transparent;
|
|
1749
|
+
--float-text-border-radius: 0;
|
|
1750
|
+
--float-text-shadow: none;
|
|
1751
|
+
|
|
1752
|
+
/* Menu animation tokens */
|
|
1753
|
+
--menu-transform-origin: scale(1);
|
|
1754
|
+
--menu-transform-active: scale(1);
|
|
1755
|
+
--export-hover-opacity: 1;
|
|
1606
1756
|
|
|
1607
1757
|
--height: 100%;
|
|
1608
1758
|
--width: 100%;
|
|
1609
1759
|
|
|
1610
1760
|
/* Entry design tokens - responsive and density-aware */
|
|
1611
|
-
--entry-font-size: 0.
|
|
1612
|
-
--entry-line-height: 1.
|
|
1761
|
+
--entry-font-size: 0.75rem;
|
|
1762
|
+
--entry-line-height: 1.2;
|
|
1613
1763
|
--entry-min-height: 1.2em;
|
|
1614
|
-
--entry-border-radius:
|
|
1615
|
-
--entry-background-color:
|
|
1616
|
-
--entry-color:
|
|
1617
|
-
--entry-highlight-color:
|
|
1764
|
+
--entry-border-radius: 0;
|
|
1765
|
+
--entry-background-color: transparent;
|
|
1766
|
+
--entry-color: inherit;
|
|
1767
|
+
--entry-highlight-color: transparent;
|
|
1618
1768
|
--entry-focus-color: var(--primary-color);
|
|
1619
|
-
--entry-padding: 0.
|
|
1769
|
+
--entry-padding: 0.15em 0.3em;
|
|
1620
1770
|
--entry-font-family: system-ui;
|
|
1621
1771
|
--entry-gap: 0.25em;
|
|
1622
1772
|
|
|
@@ -1624,16 +1774,17 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1624
1774
|
--entry-dot-size: 6px;
|
|
1625
1775
|
--entry-dot-margin: 0.25em;
|
|
1626
1776
|
--entry-month-background: transparent;
|
|
1627
|
-
--entry-month-padding: 0.
|
|
1777
|
+
--entry-month-padding: 0.05em 0.25em 0.05em 0;
|
|
1628
1778
|
--entry-time-font: var(--monospace-ui);
|
|
1629
1779
|
--entry-time-align: right;
|
|
1630
1780
|
--entry-month-text-color: var(--separator-dark);
|
|
1631
1781
|
|
|
1632
1782
|
/* Entry typography tokens */
|
|
1633
|
-
--entry-title-weight:
|
|
1783
|
+
--entry-title-weight: inherit;
|
|
1634
1784
|
--entry-title-wrap: nowrap;
|
|
1635
1785
|
--entry-time-font-size: 0.85em;
|
|
1636
|
-
--entry-time-opacity:
|
|
1786
|
+
--entry-time-opacity: 1;
|
|
1787
|
+
--title-column-weight: inherit;
|
|
1637
1788
|
|
|
1638
1789
|
/* Entry density mode tokens */
|
|
1639
1790
|
--entry-compact-show-time: none;
|
|
@@ -1641,9 +1792,9 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1641
1792
|
--entry-align: flex-start;
|
|
1642
1793
|
|
|
1643
1794
|
/* Responsive scaling for different viewport sizes */
|
|
1644
|
-
--entry-font-size-sm: 0.
|
|
1645
|
-
--entry-font-size-md: 0.
|
|
1646
|
-
--entry-font-size-lg: 0.
|
|
1795
|
+
--entry-font-size-sm: 0.65rem;
|
|
1796
|
+
--entry-font-size-md: 0.7rem;
|
|
1797
|
+
--entry-font-size-lg: 0.75rem;
|
|
1647
1798
|
|
|
1648
1799
|
--context-height: 1.75em;
|
|
1649
1800
|
--context-padding: 0.25em;
|
|
@@ -1651,14 +1802,17 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1651
1802
|
|
|
1652
1803
|
/* Core layout tokens */
|
|
1653
1804
|
--time-column-width: 4em;
|
|
1654
|
-
--view-container-height-offset: 0px;
|
|
1655
|
-
--main-content-height-offset: 1em;
|
|
1656
1805
|
|
|
1657
1806
|
/* Time grid sizing — replaces 1440-row grid */
|
|
1658
1807
|
--minute-height: 0.8px;
|
|
1659
1808
|
--hour-height: calc(60 * var(--minute-height));
|
|
1660
1809
|
--day-total-height: calc(1440 * var(--minute-height));
|
|
1661
1810
|
|
|
1811
|
+
/* Snap section: all views share a half-day rhythm.
|
|
1812
|
+
Day/week snap at noon; year view splits 6+6 months
|
|
1813
|
+
at the same scroll offset. */
|
|
1814
|
+
--half-day-height: calc(var(--day-total-height) / 2);
|
|
1815
|
+
|
|
1662
1816
|
/* Deprecated: kept for consumers who read them, no longer used internally */
|
|
1663
1817
|
--grid-rows-per-day: 1440;
|
|
1664
1818
|
--calendar-grid-rows-time: repeat(var(--grid-rows-per-day), 1fr);
|
|
@@ -1674,12 +1828,10 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1674
1828
|
--calendar-grid-columns-month: repeat(7, 1fr);
|
|
1675
1829
|
|
|
1676
1830
|
/* Calculated heights */
|
|
1677
|
-
--view-container-height:
|
|
1678
|
-
--main-content-height: calc(100% - var(--main-content-height-offset));
|
|
1831
|
+
--view-container-height: 100%;
|
|
1679
1832
|
|
|
1680
|
-
/*
|
|
1681
|
-
--day-header-height:
|
|
1682
|
-
--day-main-offset: var(--main-content-height-offset);
|
|
1833
|
+
/* Day/week view header height */
|
|
1834
|
+
--day-header-height: 2.5em;
|
|
1683
1835
|
--day-gap: 1px;
|
|
1684
1836
|
--day-text-align: center;
|
|
1685
1837
|
--day-padding: 0.5em;
|
|
@@ -1693,23 +1845,25 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1693
1845
|
/* Typography tokens */
|
|
1694
1846
|
--hour-indicator-font-size: 0.8125em;
|
|
1695
1847
|
--hour-indicator-color: var(--header-text-color, rgba(0, 0, 0, 0.6));
|
|
1696
|
-
--day-label-font-weight:
|
|
1848
|
+
--day-label-font-weight: inherit;
|
|
1697
1849
|
--day-label-name-font-size: 0.75em;
|
|
1698
1850
|
--day-label-number-font-size: 1.125em;
|
|
1699
|
-
--day-label-number-font-weight:
|
|
1851
|
+
--day-label-number-font-weight: inherit;
|
|
1700
1852
|
--day-label-gap: 0.15em;
|
|
1701
1853
|
|
|
1702
1854
|
--header-height: 3.5em;
|
|
1703
1855
|
--header-height-mobile: 4.5em;
|
|
1704
1856
|
--header-info-padding-left: 1em;
|
|
1705
|
-
--header-text-color:
|
|
1857
|
+
--header-text-color: inherit;
|
|
1706
1858
|
--header-buttons-padding-right: 1em;
|
|
1707
1859
|
--button-padding: 0.75em;
|
|
1708
1860
|
--button-border-radius: var(--border-radius-sm);
|
|
1709
1861
|
|
|
1710
1862
|
--month-day-gap: 1px;
|
|
1711
|
-
--indicator-color:
|
|
1712
|
-
--indicator-font-weight:
|
|
1863
|
+
--indicator-color: currentColor;
|
|
1864
|
+
--indicator-font-weight: inherit;
|
|
1865
|
+
--indicator-backdrop-filter: none;
|
|
1866
|
+
--month-indicator-border-radius: 0;
|
|
1713
1867
|
--indicator-padding: 0.25em;
|
|
1714
1868
|
--indicator-margin-bottom: 0.25em;
|
|
1715
1869
|
|
|
@@ -1719,11 +1873,11 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1719
1873
|
--menu-content-padding: 1em;
|
|
1720
1874
|
--menu-item-padding: 0.75em;
|
|
1721
1875
|
--menu-item-margin-bottom: 0.75em;
|
|
1722
|
-
--menu-item-font-weight:
|
|
1876
|
+
--menu-item-font-weight: inherit;
|
|
1723
1877
|
--menu-button-size: 2em;
|
|
1724
1878
|
--menu-button-padding: 0.5em;
|
|
1725
1879
|
--menu-title-font-size: 0.875em;
|
|
1726
|
-
--menu-title-font-weight:
|
|
1880
|
+
--menu-title-font-weight: inherit;
|
|
1727
1881
|
--menu-content-font-size: 0.875em;
|
|
1728
1882
|
--menu-detail-label-min-width: 4em;
|
|
1729
1883
|
--menu-detail-label-font-size: 0.8125em;
|
|
@@ -1737,15 +1891,30 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1737
1891
|
--year-day-font-size: 0.7em;
|
|
1738
1892
|
--year-cell-size: 1.8em;
|
|
1739
1893
|
--year-dot-color: var(--indicator-color, var(--primary-color));
|
|
1740
|
-
--year-heatmap-1: rgba(
|
|
1741
|
-
--year-heatmap-2: rgba(
|
|
1742
|
-
--year-heatmap-3: rgba(
|
|
1743
|
-
--year-heatmap-4: rgba(
|
|
1894
|
+
--year-heatmap-1: rgba(59, 130, 246, 0.15);
|
|
1895
|
+
--year-heatmap-2: rgba(59, 130, 246, 0.35);
|
|
1896
|
+
--year-heatmap-3: rgba(59, 130, 246, 0.55);
|
|
1897
|
+
--year-heatmap-4: rgba(59, 130, 246, 0.75);
|
|
1898
|
+
--year-day-cell-border-radius: 0;
|
|
1899
|
+
--year-month-label-hover-color: inherit;
|
|
1900
|
+
--year-weekday-font-weight: inherit;
|
|
1901
|
+
--month-label-font-weight: inherit;
|
|
1902
|
+
--cw-hover-color: inherit;
|
|
1903
|
+
--cw-hover-bg: transparent;
|
|
1904
|
+
--current-day-bg: AccentColor;
|
|
1905
|
+
--current-day-color: Canvas;
|
|
1906
|
+
--current-day-font-weight: inherit;
|
|
1907
|
+
--current-day-hover-opacity: 1;
|
|
1908
|
+
--current-dot-bg: Canvas;
|
|
1909
|
+
--year-heatmap-4-text: inherit;
|
|
1744
1910
|
|
|
1745
1911
|
/* Year view — calendar week column */
|
|
1746
1912
|
--year-cw-width: 1.8em;
|
|
1747
1913
|
--year-cw-font-size: 0.55em;
|
|
1748
1914
|
--year-cw-color: var(--header-text-color, rgba(0, 0, 0, 0.45));
|
|
1915
|
+
|
|
1916
|
+
/* Multi-day separator */
|
|
1917
|
+
--multi-day-separator: none;
|
|
1749
1918
|
}
|
|
1750
1919
|
.calendar-container {
|
|
1751
1920
|
box-sizing: border-box;
|
|
@@ -1755,7 +1924,7 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1755
1924
|
border-radius: var(--calendar-border-radius, var(--border-radius-lg));
|
|
1756
1925
|
border: 1px solid var(--separator-light);
|
|
1757
1926
|
font-family: var(--system-ui);
|
|
1758
|
-
color:
|
|
1927
|
+
color: inherit;
|
|
1759
1928
|
box-shadow: var(--calendar-shadow, none);
|
|
1760
1929
|
contain: layout style;
|
|
1761
1930
|
position: relative;
|
|
@@ -1769,7 +1938,8 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1769
1938
|
main {
|
|
1770
1939
|
flex: 1;
|
|
1771
1940
|
min-height: 0;
|
|
1772
|
-
overflow:
|
|
1941
|
+
overflow-y: auto;
|
|
1942
|
+
overflow-x: hidden;
|
|
1773
1943
|
display: flex;
|
|
1774
1944
|
flex-direction: column;
|
|
1775
1945
|
}
|
|
@@ -1802,5 +1972,5 @@ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as
|
|
|
1802
1972
|
--entry-compact-show-time: inline;
|
|
1803
1973
|
}
|
|
1804
1974
|
}
|
|
1805
|
-
`,
|
|
1975
|
+
`,Ia([n({type:String})],Na.prototype,"heading",2),Ia([n({type:Number,attribute:"first-day-of-week"})],Na.prototype,"firstDayOfWeek",2),Ia([n({type:String})],Na.prototype,"locale",2),Ia([n({type:String,attribute:"year-drill-target"})],Na.prototype,"yearDrillTarget",2),Ia([n({type:String,attribute:"year-density-mode"})],Na.prototype,"yearDensityMode",2),Ia([n({type:Array})],Na.prototype,"entries",2),Ia([n({type:String})],Na.prototype,"color",2),Ia([o()],Na.prototype,"_calendarWidth",2),Ia([o()],Na.prototype,"_menuOpen",2),Ia([o()],Na.prototype,"_menuEventDetails",2),Na=Ia([i("lms-calendar")],Na);export{c as Interval,Na as default};
|
|
1806
1976
|
//# sourceMappingURL=kalendus.js.map
|