@telepath-computer/television 0.1.206 → 0.1.209
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canonical/v1/components.js +1 -258
- package/dist/canonical/v1/styles.css +372 -312
- package/dist/cli.cjs +3749 -3629
- package/dist/onboarding/README.md +17 -12
- package/dist/onboarding/business-ops/about.html +4 -8
- package/dist/onboarding/business-ops/retention-vs-releases.html +0 -9
- package/dist/onboarding/business-ops/revenue-vs-goals.html +0 -11
- package/dist/onboarding/onboarding-channels.json +114 -0
- package/dist/onboarding/productivity/about.html +4 -8
- package/dist/onboarding/productivity/company-todos/index.html +0 -3
- package/dist/onboarding/productivity/company-todos/task.css +3 -3
- package/dist/onboarding/productivity/company-todos/task.js +1 -4
- package/dist/onboarding/productivity/meeting-prep.html +0 -7
- package/dist/onboarding/productivity/priorities-today.html +0 -7
- package/dist/onboarding/productivity/todays-calendar/calendar.js +327 -643
- package/dist/onboarding/productivity/todays-calendar/index.html +0 -4
- package/dist/onboarding/research/about.html +5 -9
- package/dist/onboarding/research/open-model-research.html +0 -9
- package/dist/onboarding/research/todays-news.html +3 -10
- package/dist/onboarding/tv-guide/welcome/index.html +5 -5
- package/dist/skills/television/SKILL.md +180 -136
- package/dist/skills/tv-calendar/calendar.js +327 -643
- package/dist/skills/tv-tasks/SKILL.md +10 -9
- package/dist/skills/tv-tasks/task.css +5 -6
- package/dist/skills/tv-tasks/task.js +2 -5
- package/dist/skills/tv-theme/SKILL.md +293 -193
- package/dist/views/artifact-missing/index.html +125 -60
- package/dist/views/markdown/index.html +22 -45
- package/dist/web/assets/artifact-bridge-BXDhGuL-.js +1 -0
- package/dist/web/assets/{artifactMissing-DY3nzD0p.js → artifactMissing-9rcTXhkH.js} +1 -1
- package/dist/web/assets/main-Blg8fuaV.css +1 -0
- package/dist/web/assets/main-Dlb0E5A4.js +594 -0
- package/dist/web/assets/{urlUnsupported-B2K6eB7H.js → urlUnsupported-kgq7Zh2V.js} +1 -1
- package/dist/web/index.html +4 -3
- package/dist/web/views/artifact-missing/index.html +125 -60
- package/dist/web/views/url-unsupported/index.html +127 -74
- package/package.json +2 -2
- package/dist/onboarding/onboarding-screens.json +0 -167
- package/dist/skills/tv-calendar/THIRD-PARTY-NOTICES.txt +0 -36
- package/dist/web/assets/artifact-bridge-BhiFDvPj.js +0 -1
- package/dist/web/assets/main-5017mprd.css +0 -1
- package/dist/web/assets/main-DdeZRdEy.js +0 -865
- /package/dist/canonical/v1/fonts/{Hind-Variable.woff2 → Hind-Variable.933e9900.woff2} +0 -0
|
@@ -1,716 +1,400 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var St = Object.defineProperty;
|
|
2
|
+
var F = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
for (; t; ) {
|
|
15
|
-
for (const e of Object.getOwnPropertyNames(t)) n.add(e);
|
|
16
|
-
if (t === Node.prototype) break;
|
|
17
|
-
t = Object.getPrototypeOf(t);
|
|
5
|
+
var bt = (e, r, t) => r in e ? St(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
6
|
+
var z = (e, r, t) => bt(e, typeof r != "symbol" ? r + "" : r, t), O = (e, r, t) => r.has(e) || F("Cannot " + t);
|
|
7
|
+
var s = (e, r, t) => (O(e, r, "read from private field"), t ? t.call(e) : r.get(e)), h = (e, r, t) => r.has(e) ? F("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), u = (e, r, t, n) => (O(e, r, "write to private field"), n ? n.call(e, t) : r.set(e, t), t), d = (e, r, t) => (O(e, r, "access private method"), t);
|
|
8
|
+
class vt extends HTMLElement {
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
this.dispatchEvent(new Event("reactive:connect"));
|
|
11
|
+
}
|
|
12
|
+
disconnectedCallback() {
|
|
13
|
+
this.dispatchEvent(new Event("reactive:disconnect"));
|
|
18
14
|
}
|
|
19
|
-
return n;
|
|
20
|
-
})();
|
|
21
|
-
function ne(n, t) {
|
|
22
|
-
if (tt(n))
|
|
23
|
-
return t === null ? void 0 : n.parse(t);
|
|
24
|
-
if (n === Boolean) return t !== null;
|
|
25
|
-
if (t !== null)
|
|
26
|
-
return n === Number ? Number(t) : t;
|
|
27
|
-
}
|
|
28
|
-
function re(n, t) {
|
|
29
|
-
return tt(n) ? t == null ? null : n.serialize(t) : n === Boolean ? t ? "" : null : t == null ? null : String(t);
|
|
30
15
|
}
|
|
31
|
-
|
|
32
|
-
const
|
|
16
|
+
customElements.define("calendar-event", vt);
|
|
17
|
+
const N = 12;
|
|
18
|
+
var K, Q;
|
|
19
|
+
class Pt extends HTMLElement {
|
|
33
20
|
constructor() {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
g(this, f);
|
|
37
|
-
g(this, D, /* @__PURE__ */ new Map());
|
|
38
|
-
g(this, v, /* @__PURE__ */ new Map());
|
|
39
|
-
g(this, M, /* @__PURE__ */ new Map());
|
|
40
|
-
g(this, R, !1);
|
|
41
|
-
g(this, N, !1);
|
|
42
|
-
g(this, L, !1);
|
|
43
|
-
const e = y(r = w, F, ct).call(r, this.constructor), s = this;
|
|
44
|
-
for (const i of e.properties)
|
|
45
|
-
gt.call(s, i) && (a(this, M).set(i, s[i]), delete s[i]);
|
|
46
|
-
}
|
|
47
|
-
static get observedAttributes() {
|
|
48
|
-
var e;
|
|
49
|
-
return y(e = w, F, ct).call(e, this).observedAttributes;
|
|
50
|
-
}
|
|
51
|
-
connected() {
|
|
52
|
-
}
|
|
53
|
-
disconnected() {
|
|
54
|
-
}
|
|
55
|
-
changed(e) {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
h(this, K);
|
|
56
23
|
}
|
|
57
24
|
connectedCallback() {
|
|
58
|
-
|
|
59
|
-
for (const e of y(this, f, U).call(this).properties)
|
|
60
|
-
a(this, v).has(e) || a(this, v).set(e, void 0);
|
|
61
|
-
this.dispatchEvent(new Event("reactive:connect")), this.connected(), y(this, f, J).call(this);
|
|
25
|
+
this.dispatchEvent(new Event("reactive:connect")), d(this, K, Q).call(this);
|
|
62
26
|
}
|
|
63
27
|
disconnectedCallback() {
|
|
64
|
-
this.dispatchEvent(new Event("reactive:disconnect"))
|
|
65
|
-
}
|
|
66
|
-
attributeChangedCallback(e, s, r) {
|
|
67
|
-
if (s === r) return;
|
|
68
|
-
const i = y(this, f, U).call(this).byAttr.get(e);
|
|
69
|
-
i && (a(this, M).has(i.property) || (this[i.property] = ne(i.type, r)));
|
|
28
|
+
this.dispatchEvent(new Event("reactive:disconnect"));
|
|
70
29
|
}
|
|
30
|
+
}
|
|
31
|
+
K = new WeakSet(), Q = function() {
|
|
32
|
+
const t = Array.from({ length: 24 }, (n, a) => {
|
|
33
|
+
const i = document.createElement("div");
|
|
34
|
+
return i.classList.add("hour-label"), i.style.setProperty("--hour-index", String(a)), i.setAttribute("data-hour", String(a)), i.textContent = Dt(a), i;
|
|
35
|
+
});
|
|
36
|
+
this.replaceChildren(...t);
|
|
71
37
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
const c = {
|
|
122
|
-
properties: r,
|
|
123
|
-
observedAttributes: Object.keys(i),
|
|
124
|
-
byAttr: o,
|
|
125
|
-
byProp: l
|
|
126
|
-
};
|
|
127
|
-
return ot.set(e, c), c;
|
|
128
|
-
}, D = new WeakMap(), v = new WeakMap(), M = new WeakMap(), R = new WeakMap(), N = new WeakMap(), L = new WeakMap(), f = new WeakSet(), U = function() {
|
|
129
|
-
return ot.get(this.constructor);
|
|
130
|
-
}, Tt = function(e, s) {
|
|
131
|
-
if (!a(this, L) && a(this, M).has(e)) return;
|
|
132
|
-
const r = a(this, D).get(e);
|
|
133
|
-
y(this, f, Dt).call(this, e, r, s) || (a(this, v).has(e) || a(this, v).set(e, r), a(this, D).set(e, s), a(this, M).delete(e), y(this, f, Nt).call(this, e, s), this.isConnected && y(this, f, J).call(this));
|
|
134
|
-
}, Dt = function(e, s, r) {
|
|
135
|
-
if (Object.is(s, r)) return !0;
|
|
136
|
-
const i = y(this, f, U).call(this).byProp.get(e);
|
|
137
|
-
if (!i || !tt(i.type)) return !1;
|
|
138
|
-
const o = s == null, l = r == null;
|
|
139
|
-
if (o || l) return o && l;
|
|
140
|
-
try {
|
|
141
|
-
return i.type.serialize(s) === i.type.serialize(r);
|
|
142
|
-
} catch {
|
|
143
|
-
return !1;
|
|
144
|
-
}
|
|
145
|
-
}, Nt = function(e, s) {
|
|
146
|
-
const r = y(this, f, U).call(this).byProp.get(e);
|
|
147
|
-
if (!r) return;
|
|
148
|
-
const { attribute: i, type: o } = r;
|
|
149
|
-
if (o === Boolean) {
|
|
150
|
-
const c = this.hasAttribute(i);
|
|
151
|
-
s && !c ? this.setAttribute(i, "") : !s && c && this.removeAttribute(i);
|
|
152
|
-
return;
|
|
38
|
+
customElements.define("calendar-time-axis", Pt);
|
|
39
|
+
function Dt(e) {
|
|
40
|
+
const r = e < N ? "AM" : "PM";
|
|
41
|
+
return `${e % N === 0 ? N : e % N} ${r}`;
|
|
42
|
+
}
|
|
43
|
+
const q = 24, Ct = 8, Mt = 6e4, Z = 23, xt = 59, Tt = 1e3, L = 60, $ = q * L, tt = $ * L * Tt, At = /^(\d{4})-(\d{2})-(\d{2})$/, kt = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})$/, Ht = ["days", "startDate", "startHour"];
|
|
44
|
+
var g, v, y, k, m, b, x, T, M, H, A, P, D, C, w, o, nt, R, I, rt, st, at, it, ot, lt, ct, dt, B, ut, ht, yt, Y, pt, U;
|
|
45
|
+
class et extends HTMLElement {
|
|
46
|
+
constructor() {
|
|
47
|
+
super();
|
|
48
|
+
h(this, o);
|
|
49
|
+
h(this, g, null);
|
|
50
|
+
h(this, v, 0);
|
|
51
|
+
h(this, y, null);
|
|
52
|
+
h(this, k, !1);
|
|
53
|
+
h(this, m, null);
|
|
54
|
+
h(this, b, null);
|
|
55
|
+
h(this, x, !1);
|
|
56
|
+
h(this, T, null);
|
|
57
|
+
h(this, M, /* @__PURE__ */ new Set());
|
|
58
|
+
h(this, H, /* @__PURE__ */ new Map());
|
|
59
|
+
h(this, A, null);
|
|
60
|
+
h(this, P, "");
|
|
61
|
+
h(this, D);
|
|
62
|
+
h(this, C, !1);
|
|
63
|
+
h(this, w, !1);
|
|
64
|
+
const t = this;
|
|
65
|
+
for (const n of Ht)
|
|
66
|
+
Object.hasOwn(this, n) && (s(this, H).set(n, t[n]), delete t[n]);
|
|
67
|
+
}
|
|
68
|
+
get days() {
|
|
69
|
+
return s(this, v);
|
|
70
|
+
}
|
|
71
|
+
set days(t) {
|
|
72
|
+
Object.is(s(this, v), t) || (u(this, v, t), d(this, o, R).call(this, "days"));
|
|
73
|
+
}
|
|
74
|
+
get startDate() {
|
|
75
|
+
return s(this, P);
|
|
76
|
+
}
|
|
77
|
+
set startDate(t) {
|
|
78
|
+
s(this, P) !== t && (u(this, P, t), d(this, o, R).call(this, "start-date"));
|
|
79
|
+
}
|
|
80
|
+
get startHour() {
|
|
81
|
+
return s(this, D);
|
|
82
|
+
}
|
|
83
|
+
set startHour(t) {
|
|
84
|
+
Object.is(s(this, D), t) || (u(this, D, t), d(this, o, R).call(this, "start-hour"));
|
|
153
85
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this.hasAttribute(i) && this.removeAttribute(i);
|
|
157
|
-
return;
|
|
86
|
+
connectedCallback() {
|
|
87
|
+
this.dispatchEvent(new Event("reactive:connect")), u(this, T, setInterval(() => d(this, o, Y).call(this), Mt)), s(this, k) ? (s(this, x) || s(this, C)) && d(this, o, I).call(this) : (u(this, k, !0), s(this, M).add("days"), s(this, M).add("start-date"), d(this, o, nt).call(this), u(this, C, !0), d(this, o, I).call(this));
|
|
158
88
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
for (const r of s.properties) {
|
|
163
|
-
if (!gt.call(e, r)) continue;
|
|
164
|
-
const i = e[r];
|
|
165
|
-
delete e[r], !(a(this, M).has(r) || a(this, D).has(r)) && (e[r] = i);
|
|
89
|
+
disconnectedCallback() {
|
|
90
|
+
var t;
|
|
91
|
+
this.dispatchEvent(new Event("reactive:disconnect")), s(this, T) !== null && (clearInterval(s(this, T)), u(this, T, null)), (t = s(this, b)) == null || t.disconnect();
|
|
166
92
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
for (const [r, i] of a(this, M))
|
|
170
|
-
e[r] = i;
|
|
171
|
-
a(this, M).clear();
|
|
172
|
-
} finally {
|
|
173
|
-
$(this, L, !1);
|
|
93
|
+
attributeChangedCallback(t, n, a) {
|
|
94
|
+
n !== a && d(this, o, at).call(this, t, a) && (u(this, C, !0), d(this, o, I).call(this));
|
|
174
95
|
}
|
|
175
|
-
}, J = function() {
|
|
176
|
-
a(this, R) || !this.isConnected || a(this, N) && a(this, v).size === 0 || ($(this, R, !0), queueMicrotask(() => {
|
|
177
|
-
if ($(this, R, !1), !this.isConnected || a(this, N) && a(this, v).size === 0) return;
|
|
178
|
-
const e = new Map(a(this, v));
|
|
179
|
-
a(this, v).clear(), $(this, N, !0);
|
|
180
|
-
try {
|
|
181
|
-
this.changed(e);
|
|
182
|
-
} catch (s) {
|
|
183
|
-
console.error(s);
|
|
184
|
-
}
|
|
185
|
-
this.isConnected && a(this, v).size > 0 && y(this, f, J).call(this);
|
|
186
|
-
}));
|
|
187
|
-
}, g(w, F), E(w, "properties"), E(w, "attributes");
|
|
188
|
-
let j = w;
|
|
189
|
-
class ie extends j {
|
|
190
96
|
changed() {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
\f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, vt = />/g, C = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
|
201
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, Mt = /"/g, Ut = /^(?:script|style|textarea|title)$/i, le = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), xt = le(1), V = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), Et = /* @__PURE__ */ new WeakMap(), T = O.createTreeWalker(O, 129);
|
|
202
|
-
function Rt(n, t) {
|
|
203
|
-
if (!ft(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
204
|
-
return _t !== void 0 ? _t.createHTML(t) : t;
|
|
205
|
-
}
|
|
206
|
-
const ce = (n, t) => {
|
|
207
|
-
const e = n.length - 1, s = [];
|
|
208
|
-
let r, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = z;
|
|
209
|
-
for (let l = 0; l < e; l++) {
|
|
210
|
-
const c = n[l];
|
|
211
|
-
let h, d, u = -1, b = 0;
|
|
212
|
-
for (; b < c.length && (o.lastIndex = b, d = o.exec(c), d !== null); ) b = o.lastIndex, o === z ? d[1] === "!--" ? o = bt : d[1] !== void 0 ? o = vt : d[2] !== void 0 ? (Ut.test(d[2]) && (r = RegExp("</" + d[2], "g")), o = C) : d[3] !== void 0 && (o = C) : o === C ? d[0] === ">" ? (o = r ?? z, u = -1) : d[1] === void 0 ? u = -2 : (u = o.lastIndex - d[2].length, h = d[1], o = d[3] === void 0 ? C : d[3] === '"' ? Mt : St) : o === Mt || o === St ? o = C : o === bt || o === vt ? o = z : (o = C, r = void 0);
|
|
213
|
-
const P = o === C && n[l + 1].startsWith("/>") ? " " : "";
|
|
214
|
-
i += o === z ? c + oe : u >= 0 ? (s.push(h), c.slice(0, u) + kt + c.slice(u) + H + P) : c + H + (u === -2 ? l : P);
|
|
215
|
-
}
|
|
216
|
-
return [Rt(n, i + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
217
|
-
};
|
|
218
|
-
class Y {
|
|
219
|
-
constructor({ strings: t, _$litType$: e }, s) {
|
|
220
|
-
let r;
|
|
221
|
-
this.parts = [];
|
|
222
|
-
let i = 0, o = 0;
|
|
223
|
-
const l = t.length - 1, c = this.parts, [h, d] = ce(t, e);
|
|
224
|
-
if (this.el = Y.createElement(h, s), T.currentNode = this.el.content, e === 2 || e === 3) {
|
|
225
|
-
const u = this.el.content.firstChild;
|
|
226
|
-
u.replaceWith(...u.childNodes);
|
|
97
|
+
const t = d(this, o, lt).call(this), n = Lt(this.startDate, this.days), a = t.map((c) => ({
|
|
98
|
+
event: c,
|
|
99
|
+
placement: n ? _t(c, n) : null
|
|
100
|
+
})), i = qt(a), l = Kt(this.startHour, a.map(({ placement: c }) => c));
|
|
101
|
+
if (u(this, A, n), this.style.setProperty("--day-count", String((n == null ? void 0 : n.dayCount) ?? 0)), this.style.setProperty("--hour-count", String(q)), this.style.setProperty("--start-hour", String(l)), !n) {
|
|
102
|
+
d(this, o, ut).call(this);
|
|
103
|
+
for (const { event: c } of a)
|
|
104
|
+
W(c), this.append(c);
|
|
105
|
+
return;
|
|
227
106
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
else {
|
|
244
|
-
let u = -1;
|
|
245
|
-
for (; (u = r.data.indexOf(H, u + 1)) !== -1; ) c.push({ type: 7, index: i }), u += H.length - 1;
|
|
246
|
-
}
|
|
247
|
-
i++;
|
|
107
|
+
d(this, o, ht).call(this, n), d(this, o, yt).call(this, a, n, i), d(this, o, Y).call(this), d(this, o, ot).call(this);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
g = new WeakMap(), v = new WeakMap(), y = new WeakMap(), k = new WeakMap(), m = new WeakMap(), b = new WeakMap(), x = new WeakMap(), T = new WeakMap(), M = new WeakMap(), H = new WeakMap(), A = new WeakMap(), P = new WeakMap(), D = new WeakMap(), C = new WeakMap(), w = new WeakMap(), o = new WeakSet(), nt = function() {
|
|
111
|
+
for (const [t, n] of s(this, H))
|
|
112
|
+
switch (t) {
|
|
113
|
+
case "days":
|
|
114
|
+
this.days = n;
|
|
115
|
+
break;
|
|
116
|
+
case "startDate":
|
|
117
|
+
this.startDate = n;
|
|
118
|
+
break;
|
|
119
|
+
case "startHour":
|
|
120
|
+
this.startHour = n;
|
|
121
|
+
break;
|
|
248
122
|
}
|
|
123
|
+
s(this, H).clear();
|
|
124
|
+
}, R = function(t) {
|
|
125
|
+
s(this, M).add(t), u(this, C, !0), d(this, o, I).call(this);
|
|
126
|
+
}, I = function() {
|
|
127
|
+
s(this, w) || (u(this, w, !0), queueMicrotask(() => d(this, o, rt).call(this)));
|
|
128
|
+
}, rt = function() {
|
|
129
|
+
if (u(this, w, !1), !s(this, k)) return;
|
|
130
|
+
const t = s(this, C) || s(this, x);
|
|
131
|
+
if (u(this, C, !1), u(this, x, !1), d(this, o, st).call(this), !this.isConnected) {
|
|
132
|
+
u(this, x, t);
|
|
133
|
+
return;
|
|
249
134
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
constructor(t, e) {
|
|
264
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
265
|
-
}
|
|
266
|
-
get parentNode() {
|
|
267
|
-
return this._$AM.parentNode;
|
|
268
|
-
}
|
|
269
|
-
get _$AU() {
|
|
270
|
-
return this._$AM._$AU;
|
|
271
|
-
}
|
|
272
|
-
u(t) {
|
|
273
|
-
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? O).importNode(e, !0);
|
|
274
|
-
T.currentNode = r;
|
|
275
|
-
let i = T.nextNode(), o = 0, l = 0, c = s[0];
|
|
276
|
-
for (; c !== void 0; ) {
|
|
277
|
-
if (o === c.index) {
|
|
278
|
-
let h;
|
|
279
|
-
c.type === 2 ? h = new Z(i, i.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(i, c.name, c.strings, this, t) : c.type === 6 && (h = new pe(i, this, t)), this._$AV.push(h), c = s[++l];
|
|
280
|
-
}
|
|
281
|
-
o !== (c == null ? void 0 : c.index) && (i = T.nextNode(), o++);
|
|
282
|
-
}
|
|
283
|
-
return T.currentNode = O, r;
|
|
284
|
-
}
|
|
285
|
-
p(t) {
|
|
286
|
-
let e = 0;
|
|
287
|
-
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
class Z {
|
|
291
|
-
get _$AU() {
|
|
292
|
-
var t;
|
|
293
|
-
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
294
|
-
}
|
|
295
|
-
constructor(t, e, s, r) {
|
|
296
|
-
this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
|
|
297
|
-
}
|
|
298
|
-
get parentNode() {
|
|
299
|
-
let t = this._$AA.parentNode;
|
|
300
|
-
const e = this._$AM;
|
|
301
|
-
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
302
|
-
}
|
|
303
|
-
get startNode() {
|
|
304
|
-
return this._$AA;
|
|
305
|
-
}
|
|
306
|
-
get endNode() {
|
|
307
|
-
return this._$AB;
|
|
308
|
-
}
|
|
309
|
-
_$AI(t, e = this) {
|
|
310
|
-
t = K(this, t, e), W(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== V && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ae(t) ? this.k(t) : this._(t);
|
|
311
|
-
}
|
|
312
|
-
O(t) {
|
|
313
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
314
|
-
}
|
|
315
|
-
T(t) {
|
|
316
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
317
|
-
}
|
|
318
|
-
_(t) {
|
|
319
|
-
this._$AH !== m && W(this._$AH) ? this._$AA.nextSibling.data = t : this.T(O.createTextNode(t)), this._$AH = t;
|
|
320
|
-
}
|
|
321
|
-
$(t) {
|
|
322
|
-
var i;
|
|
323
|
-
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Y.createElement(Rt(s.h, s.h[0]), this.options)), s);
|
|
324
|
-
if (((i = this._$AH) == null ? void 0 : i._$AD) === r) this._$AH.p(e);
|
|
325
|
-
else {
|
|
326
|
-
const o = new he(r, this), l = o.u(this.options);
|
|
327
|
-
o.p(e), this.T(l), this._$AH = o;
|
|
135
|
+
t && d(this, o, it).call(this);
|
|
136
|
+
}, st = function() {
|
|
137
|
+
const t = [...s(this, M)];
|
|
138
|
+
s(this, M).clear();
|
|
139
|
+
for (const n of t) {
|
|
140
|
+
const a = n === "days" ? s(this, v) : n === "start-date" ? s(this, P) : s(this, D), i = a === void 0 ? null : String(a);
|
|
141
|
+
i === null ? this.removeAttribute(n) : this.getAttribute(n) !== i && this.setAttribute(n, i);
|
|
142
|
+
}
|
|
143
|
+
}, at = function(t, n) {
|
|
144
|
+
switch (t) {
|
|
145
|
+
case "days": {
|
|
146
|
+
const a = X(n);
|
|
147
|
+
return Object.is(s(this, v), a) ? !1 : (u(this, v, a), !0);
|
|
328
148
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
return e === void 0 && Et.set(t.strings, e = new Y(t)), e;
|
|
333
|
-
}
|
|
334
|
-
k(t) {
|
|
335
|
-
ft(this._$AH) || (this._$AH = [], this._$AR());
|
|
336
|
-
const e = this._$AH;
|
|
337
|
-
let s, r = 0;
|
|
338
|
-
for (const i of t) r === e.length ? e.push(s = new Z(this.O(q()), this.O(q()), this, this.options)) : s = e[r], s._$AI(i), r++;
|
|
339
|
-
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
|
|
340
|
-
}
|
|
341
|
-
_$AR(t = this._$AA.nextSibling, e) {
|
|
342
|
-
var s;
|
|
343
|
-
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t !== this._$AB; ) {
|
|
344
|
-
const r = $t(t).nextSibling;
|
|
345
|
-
$t(t).remove(), t = r;
|
|
149
|
+
case "start-date": {
|
|
150
|
+
const a = n ?? void 0;
|
|
151
|
+
return s(this, P) === a ? !1 : (u(this, P, a), !0);
|
|
346
152
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
class nt {
|
|
354
|
-
get tagName() {
|
|
355
|
-
return this.element.tagName;
|
|
356
|
-
}
|
|
357
|
-
get _$AU() {
|
|
358
|
-
return this._$AM._$AU;
|
|
359
|
-
}
|
|
360
|
-
constructor(t, e, s, r, i) {
|
|
361
|
-
this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = i, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = m;
|
|
362
|
-
}
|
|
363
|
-
_$AI(t, e = this, s, r) {
|
|
364
|
-
const i = this.strings;
|
|
365
|
-
let o = !1;
|
|
366
|
-
if (i === void 0) t = K(this, t, e, 0), o = !W(t) || t !== this._$AH && t !== V, o && (this._$AH = t);
|
|
367
|
-
else {
|
|
368
|
-
const l = t;
|
|
369
|
-
let c, h;
|
|
370
|
-
for (t = i[0], c = 0; c < i.length - 1; c++) h = K(this, l[s + c], e, c), h === V && (h = this._$AH[c]), o || (o = !W(h) || h !== this._$AH[c]), h === m ? t = m : t !== m && (t += (h ?? "") + i[c + 1]), this._$AH[c] = h;
|
|
153
|
+
case "start-hour": {
|
|
154
|
+
const a = X(n);
|
|
155
|
+
return Object.is(s(this, D), a) ? !1 : (u(this, D, a), !0);
|
|
371
156
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
j(t) {
|
|
375
|
-
t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
class de extends nt {
|
|
379
|
-
constructor() {
|
|
380
|
-
super(...arguments), this.type = 3;
|
|
381
|
-
}
|
|
382
|
-
j(t) {
|
|
383
|
-
this.element[this.name] = t === m ? void 0 : t;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
class ue extends nt {
|
|
387
|
-
constructor() {
|
|
388
|
-
super(...arguments), this.type = 4;
|
|
389
|
-
}
|
|
390
|
-
j(t) {
|
|
391
|
-
this.element.toggleAttribute(this.name, !!t && t !== m);
|
|
157
|
+
default:
|
|
158
|
+
return !1;
|
|
392
159
|
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
_$AI(t, e = this) {
|
|
399
|
-
if ((t = K(this, t, e, 0) ?? m) === V) return;
|
|
400
|
-
const s = this._$AH, r = t === m && s !== m || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, i = t !== m && (s === m || r);
|
|
401
|
-
r && this.element.removeEventListener(this.name, this, s), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
402
|
-
}
|
|
403
|
-
handleEvent(t) {
|
|
404
|
-
var e;
|
|
405
|
-
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
class pe {
|
|
409
|
-
constructor(t, e, s) {
|
|
410
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
411
|
-
}
|
|
412
|
-
get _$AU() {
|
|
413
|
-
return this._$AM._$AU;
|
|
414
|
-
}
|
|
415
|
-
_$AI(t) {
|
|
416
|
-
K(this, t);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
const lt = B.litHtmlPolyfillSupport;
|
|
420
|
-
lt == null || lt(Y, Z), (B.litHtmlVersions ?? (B.litHtmlVersions = [])).push("3.3.2");
|
|
421
|
-
const fe = (n, t, e) => {
|
|
422
|
-
const s = t;
|
|
423
|
-
let r = s._$litPart$;
|
|
424
|
-
return r === void 0 && (s._$litPart$ = r = new Z(t.insertBefore(q(), null), null, void 0, {})), r._$AI(n), r;
|
|
425
|
-
}, G = 12;
|
|
426
|
-
class Lt extends j {
|
|
427
|
-
changed() {
|
|
428
|
-
fe(
|
|
429
|
-
xt`${Array.from({ length: 24 }, (t, e) => xt`<div
|
|
430
|
-
class="hour-label"
|
|
431
|
-
style="--hour-index: ${e};"
|
|
432
|
-
data-hour=${e}
|
|
433
|
-
>${me(e)}</div>`)}`,
|
|
434
|
-
this
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
E(Lt, "properties", []);
|
|
439
|
-
customElements.define("calendar-time-axis", Lt);
|
|
440
|
-
function me(n) {
|
|
441
|
-
const t = n < G ? "AM" : "PM";
|
|
442
|
-
return `${n % G === 0 ? G : n % G} ${t}`;
|
|
443
|
-
}
|
|
444
|
-
const ht = 24, Ae = 8, ge = 6e4, Kt = 23, $e = 59, _e = 1e3, rt = 60, dt = ht * rt, zt = dt * rt * _e, be = /^(\d{4})-(\d{2})-(\d{2})$/, ve = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})$/;
|
|
445
|
-
var S, A, _, x, I, k, p, Bt, jt, qt, Wt, yt, Vt, Yt, Ft, pt, Zt, Q;
|
|
446
|
-
class ut extends j {
|
|
447
|
-
constructor() {
|
|
448
|
-
super(...arguments);
|
|
449
|
-
g(this, p);
|
|
450
|
-
E(this, "days", 0);
|
|
451
|
-
E(this, "startDate", "");
|
|
452
|
-
E(this, "startHour");
|
|
453
|
-
g(this, S, null);
|
|
454
|
-
g(this, A, null);
|
|
455
|
-
g(this, _, null);
|
|
456
|
-
g(this, x, null);
|
|
457
|
-
g(this, I, null);
|
|
458
|
-
g(this, k, null);
|
|
459
|
-
}
|
|
460
|
-
connected() {
|
|
461
|
-
$(this, I, setInterval(() => y(this, p, pt).call(this), ge));
|
|
462
|
-
}
|
|
463
|
-
disconnected() {
|
|
464
|
-
var e;
|
|
465
|
-
a(this, I) !== null && (clearInterval(a(this, I)), $(this, I, null)), (e = a(this, x)) == null || e.disconnect();
|
|
466
|
-
}
|
|
467
|
-
changed() {
|
|
468
|
-
const e = y(this, p, jt).call(this), s = we(this.startDate, this.days), r = e.map((l) => ({
|
|
469
|
-
event: l,
|
|
470
|
-
placement: s ? He(l, s) : null
|
|
471
|
-
})), i = De(r), o = Ce(this.startHour, r.map(({ placement: l }) => l));
|
|
472
|
-
if ($(this, k, s), this.style.setProperty("--day-count", String((s == null ? void 0 : s.dayCount) ?? 0)), this.style.setProperty("--hour-count", String(ht)), this.style.setProperty("--start-hour", String(o)), !s) {
|
|
473
|
-
y(this, p, Vt).call(this);
|
|
474
|
-
for (const { event: l } of r)
|
|
475
|
-
Ht(l), this.append(l);
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
y(this, p, Yt).call(this, s), y(this, p, Ft).call(this, r, s, i), y(this, p, pt).call(this), y(this, p, Bt).call(this);
|
|
160
|
+
}, it = function() {
|
|
161
|
+
try {
|
|
162
|
+
this.changed();
|
|
163
|
+
} catch (t) {
|
|
164
|
+
console.error(t);
|
|
479
165
|
}
|
|
480
|
-
}
|
|
481
|
-
S = new WeakMap(), A = new WeakMap(), _ = new WeakMap(), x = new WeakMap(), I = new WeakMap(), k = new WeakMap(), p = new WeakSet(), Bt = function() {
|
|
166
|
+
}, ot = function() {
|
|
482
167
|
requestAnimationFrame(() => {
|
|
483
|
-
var
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
if (!
|
|
487
|
-
const
|
|
488
|
-
if (
|
|
489
|
-
const i = this.scrollTop + (
|
|
490
|
-
this.scrollTop = Math.max(0, Math.min(i,
|
|
168
|
+
var l, c, p;
|
|
169
|
+
d(this, o, U).call(this);
|
|
170
|
+
const t = (l = s(this, y)) == null ? void 0 : l.querySelector(":scope > .start-hour-marker");
|
|
171
|
+
if (!t) return;
|
|
172
|
+
const n = (((c = s(this, m)) == null ? void 0 : c.offsetHeight) ?? 0) + (((p = s(this, g)) == null ? void 0 : p.offsetHeight) ?? 0), a = Math.max(this.scrollHeight - this.clientHeight, 0);
|
|
173
|
+
if (a <= 0) return;
|
|
174
|
+
const i = this.scrollTop + (t.getBoundingClientRect().top - this.getBoundingClientRect().top) - n;
|
|
175
|
+
this.scrollTop = Math.max(0, Math.min(i, a));
|
|
491
176
|
});
|
|
492
|
-
},
|
|
177
|
+
}, lt = function() {
|
|
493
178
|
return Array.from(this.querySelectorAll("calendar-event"));
|
|
494
|
-
},
|
|
495
|
-
|
|
496
|
-
},
|
|
497
|
-
|
|
498
|
-
const
|
|
499
|
-
|
|
500
|
-
},
|
|
501
|
-
var
|
|
502
|
-
(
|
|
503
|
-
},
|
|
504
|
-
var
|
|
505
|
-
(
|
|
506
|
-
},
|
|
507
|
-
|
|
508
|
-
const
|
|
179
|
+
}, ct = function() {
|
|
180
|
+
s(this, m) || (u(this, m, document.createElement("calendar-headers")), this.append(s(this, m))), s(this, y) || (u(this, y, document.createElement("calendar-grid")), this.append(s(this, y)));
|
|
181
|
+
}, dt = function(t) {
|
|
182
|
+
s(this, g) || (u(this, g, document.createElement("calendar-allday")), this.insertBefore(s(this, g), s(this, y)));
|
|
183
|
+
const n = t.days.map((a, i) => wt(a, i + 1));
|
|
184
|
+
s(this, g).replaceChildren(...n);
|
|
185
|
+
}, B = function() {
|
|
186
|
+
var t;
|
|
187
|
+
(t = s(this, g)) == null || t.remove(), u(this, g, null), this.style.removeProperty("--allday-lane-count");
|
|
188
|
+
}, ut = function() {
|
|
189
|
+
var t, n, a;
|
|
190
|
+
(t = s(this, b)) == null || t.disconnect(), (n = s(this, m)) == null || n.remove(), d(this, o, B).call(this), (a = s(this, y)) == null || a.remove(), u(this, m, null), u(this, y, null), this.style.removeProperty("--headers-height"), this.style.removeProperty("--allday-lane-count");
|
|
191
|
+
}, ht = function(t) {
|
|
192
|
+
d(this, o, ct).call(this);
|
|
193
|
+
const n = t.days.map((i, l) => It(i, l + 1)), a = [
|
|
509
194
|
document.createElement("calendar-time-axis"),
|
|
510
|
-
...
|
|
511
|
-
|
|
195
|
+
...t.days.map((i, l) => Nt(i, l + 1)),
|
|
196
|
+
Rt()
|
|
512
197
|
];
|
|
513
|
-
|
|
514
|
-
},
|
|
515
|
-
const i =
|
|
198
|
+
s(this, m).replaceChildren(...n), s(this, y).replaceChildren(...a), d(this, o, pt).call(this);
|
|
199
|
+
}, yt = function(t, n, a) {
|
|
200
|
+
const i = t.filter(Et);
|
|
516
201
|
if (i.length > 0) {
|
|
517
|
-
|
|
518
|
-
for (const { event:
|
|
519
|
-
|
|
202
|
+
d(this, o, dt).call(this, n), this.style.setProperty("--allday-lane-count", String(a));
|
|
203
|
+
for (const { event: l, placement: c } of i)
|
|
204
|
+
V(l, c), s(this, g).append(l);
|
|
520
205
|
} else
|
|
521
|
-
|
|
522
|
-
for (const { event:
|
|
523
|
-
|
|
524
|
-
for (const { event:
|
|
525
|
-
|
|
526
|
-
},
|
|
527
|
-
var
|
|
528
|
-
const
|
|
529
|
-
if (!
|
|
530
|
-
|
|
206
|
+
d(this, o, B).call(this);
|
|
207
|
+
for (const { event: l, placement: c } of t.filter(gt).sort(ft))
|
|
208
|
+
V(l, c), s(this, y).append(l);
|
|
209
|
+
for (const { event: l } of t.filter(({ placement: c }) => c === null))
|
|
210
|
+
W(l), this.append(l);
|
|
211
|
+
}, Y = function() {
|
|
212
|
+
var f, S;
|
|
213
|
+
const t = (f = s(this, y)) == null ? void 0 : f.querySelector(":scope > .now-line"), n = (S = s(this, y)) == null ? void 0 : S.querySelector(":scope > .now-line-faint");
|
|
214
|
+
if (!s(this, y) || !s(this, A)) {
|
|
215
|
+
n == null || n.remove(), t == null || t.remove();
|
|
531
216
|
return;
|
|
532
217
|
}
|
|
533
|
-
const
|
|
534
|
-
if (
|
|
535
|
-
|
|
218
|
+
const a = /* @__PURE__ */ new Date(), l = j(a.getFullYear(), a.getMonth() + 1, a.getDate()) - s(this, A).startDayKey + 1;
|
|
219
|
+
if (l < 1 || l > s(this, A).dayCount) {
|
|
220
|
+
n == null || n.remove(), t == null || t.remove();
|
|
536
221
|
return;
|
|
537
222
|
}
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
},
|
|
543
|
-
var
|
|
544
|
-
if (!
|
|
545
|
-
(
|
|
223
|
+
const c = (a.getHours() + a.getMinutes() / L) / q, p = n ?? document.createElement("div");
|
|
224
|
+
n || (p.classList.add("now-line-faint"), s(this, y).append(p));
|
|
225
|
+
const E = t ?? document.createElement("div");
|
|
226
|
+
t || (E.classList.add("now-line"), s(this, y).append(E)), p.style.setProperty("--y-fraction", String(c)), E.style.setProperty("--day-index", String(l)), E.style.setProperty("--y-fraction", String(c));
|
|
227
|
+
}, pt = function() {
|
|
228
|
+
var t;
|
|
229
|
+
if (!s(this, m)) {
|
|
230
|
+
(t = s(this, b)) == null || t.disconnect(), this.style.removeProperty("--headers-height");
|
|
546
231
|
return;
|
|
547
232
|
}
|
|
548
233
|
if (typeof ResizeObserver != "function") {
|
|
549
|
-
|
|
234
|
+
d(this, o, U).call(this);
|
|
550
235
|
return;
|
|
551
236
|
}
|
|
552
|
-
|
|
553
|
-
},
|
|
554
|
-
var e;
|
|
555
|
-
this.style.setProperty("--headers-height", `${((e = a(this, _)) == null ? void 0 : e.offsetHeight) ?? 0}px`);
|
|
556
|
-
}, E(ut, "properties", ["days", "startDate", "startHour"]), E(ut, "attributes", {
|
|
557
|
-
days: { type: Number },
|
|
558
|
-
"start-date": { type: String, property: "startDate" },
|
|
559
|
-
"start-hour": { type: Number, property: "startHour" }
|
|
560
|
-
});
|
|
561
|
-
customElements.define("calendar-week", ut);
|
|
562
|
-
function Se(n, t) {
|
|
563
|
-
const e = document.createElement("calendar-cell");
|
|
564
|
-
return e.setAttribute("date", n.iso), e.style.setProperty("--day-index", String(t)), e;
|
|
565
|
-
}
|
|
566
|
-
function Me(n, t) {
|
|
567
|
-
const e = document.createElement("calendar-day");
|
|
568
|
-
e.setAttribute("date", n.iso), e.style.setProperty("--day-index", String(t));
|
|
569
|
-
const s = document.createElement("span");
|
|
570
|
-
s.classList.add("weekday"), s.textContent = n.labelWeekday;
|
|
571
|
-
const r = document.createElement("span");
|
|
572
|
-
return r.classList.add("date-num"), r.textContent = n.labelDay, e.append(s, r), e;
|
|
573
|
-
}
|
|
574
|
-
function xe(n, t) {
|
|
575
|
-
const e = document.createElement("calendar-column");
|
|
576
|
-
return e.setAttribute("date", n.iso), e.style.setProperty("--day-index", String(t)), e;
|
|
577
|
-
}
|
|
578
|
-
function Ee() {
|
|
579
|
-
const n = document.createElement("div");
|
|
580
|
-
return n.classList.add("start-hour-marker"), n;
|
|
581
|
-
}
|
|
582
|
-
function Pt(n, t) {
|
|
583
|
-
const e = Pe(n), s = n.getAttribute("title") ?? "";
|
|
584
|
-
if (e.querySelector("h3").textContent = s, t.kind === "all-day") {
|
|
585
|
-
n.style.setProperty("--day-start", String(t.dayStart)), n.style.setProperty("--day-span", String(t.daySpan)), n.style.setProperty("--lane-index", String(t.laneIndex)), n.style.removeProperty("--day-index"), n.style.removeProperty("--y-start"), n.style.removeProperty("--y-end"), n.style.removeProperty("--cascade-depth");
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
n.style.setProperty("--day-index", String(t.dayIndex)), n.style.setProperty("--y-start", String(t.yStart)), n.style.setProperty("--y-end", String(t.yEnd)), n.style.setProperty("--cascade-depth", String(t.cascadeDepth)), n.style.removeProperty("--day-start"), n.style.removeProperty("--day-span"), n.style.removeProperty("--lane-index");
|
|
589
|
-
}
|
|
590
|
-
function Ht(n) {
|
|
237
|
+
s(this, b) || u(this, b, new ResizeObserver(() => d(this, o, U).call(this))), s(this, b).disconnect(), s(this, b).observe(s(this, m));
|
|
238
|
+
}, U = function() {
|
|
591
239
|
var t;
|
|
592
|
-
(t =
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
t
|
|
240
|
+
this.style.setProperty("--headers-height", `${((t = s(this, m)) == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
241
|
+
}, z(et, "observedAttributes", ["days", "start-date", "start-hour"]);
|
|
242
|
+
customElements.define("calendar-week", et);
|
|
243
|
+
function wt(e, r) {
|
|
244
|
+
const t = document.createElement("calendar-cell");
|
|
245
|
+
return t.setAttribute("date", e.iso), t.style.setProperty("--day-index", String(r)), t;
|
|
246
|
+
}
|
|
247
|
+
function It(e, r) {
|
|
248
|
+
const t = document.createElement("calendar-day");
|
|
249
|
+
t.setAttribute("date", e.iso), t.style.setProperty("--day-index", String(r));
|
|
250
|
+
const n = document.createElement("span");
|
|
251
|
+
n.classList.add("weekday"), n.textContent = e.labelWeekday;
|
|
252
|
+
const a = document.createElement("span");
|
|
253
|
+
return a.classList.add("date-num"), a.textContent = e.labelDay, t.append(n, a), t;
|
|
254
|
+
}
|
|
255
|
+
function Nt(e, r) {
|
|
256
|
+
const t = document.createElement("calendar-column");
|
|
257
|
+
return t.setAttribute("date", e.iso), t.style.setProperty("--day-index", String(r)), t;
|
|
258
|
+
}
|
|
259
|
+
function Rt() {
|
|
598
260
|
const e = document.createElement("div");
|
|
599
|
-
e.classList.add("
|
|
600
|
-
const s = document.createElement("h3");
|
|
601
|
-
return e.append(s), t.append(e), n.append(t), t;
|
|
261
|
+
return e.classList.add("start-hour-marker"), e;
|
|
602
262
|
}
|
|
603
|
-
function
|
|
604
|
-
const
|
|
605
|
-
if (
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
263
|
+
function V(e, r) {
|
|
264
|
+
const t = Ut(e), n = e.getAttribute("title") ?? "";
|
|
265
|
+
if (t.querySelector("h3").textContent = n, r.kind === "all-day") {
|
|
266
|
+
e.style.setProperty("--day-start", String(r.dayStart)), e.style.setProperty("--day-span", String(r.daySpan)), e.style.setProperty("--lane-index", String(r.laneIndex)), e.style.removeProperty("--day-index"), e.style.removeProperty("--y-start"), e.style.removeProperty("--y-end"), e.style.removeProperty("--cascade-depth");
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
e.style.setProperty("--day-index", String(r.dayIndex)), e.style.setProperty("--y-start", String(r.yStart)), e.style.setProperty("--y-end", String(r.yEnd)), e.style.setProperty("--cascade-depth", String(r.cascadeDepth)), e.style.removeProperty("--day-start"), e.style.removeProperty("--day-span"), e.style.removeProperty("--lane-index");
|
|
270
|
+
}
|
|
271
|
+
function W(e) {
|
|
272
|
+
var r;
|
|
273
|
+
(r = e.querySelector(":scope > .event-block")) == null || r.remove(), e.style.removeProperty("--day-index"), e.style.removeProperty("--y-start"), e.style.removeProperty("--y-end"), e.style.removeProperty("--day-start"), e.style.removeProperty("--day-span"), e.style.removeProperty("--lane-index"), e.style.removeProperty("--cascade-depth");
|
|
274
|
+
}
|
|
275
|
+
function Ut(e) {
|
|
276
|
+
let r = e.querySelector(":scope > .event-block");
|
|
277
|
+
if (r) return r;
|
|
278
|
+
r = document.createElement("div"), r.classList.add("event-block");
|
|
279
|
+
const t = document.createElement("div");
|
|
280
|
+
t.classList.add("event-block-inner");
|
|
281
|
+
const n = document.createElement("h3");
|
|
282
|
+
return t.append(n), r.append(t), e.append(r), r;
|
|
283
|
+
}
|
|
284
|
+
function _t(e, r) {
|
|
285
|
+
const t = e.getAttribute("title"), n = e.getAttribute("start"), a = e.getAttribute("end");
|
|
286
|
+
if (t === null || n === null || a === null) return null;
|
|
287
|
+
if (e.hasAttribute("all-day")) {
|
|
288
|
+
const p = _(n), E = _(a);
|
|
289
|
+
if (!p || !E || E.dayKey <= p.dayKey) return null;
|
|
290
|
+
const f = Math.max(p.dayKey, r.startDayKey), S = Math.min(E.dayKey, r.endDayKey);
|
|
291
|
+
return S <= f ? null : {
|
|
611
292
|
kind: "all-day",
|
|
612
|
-
daySpan:
|
|
613
|
-
dayStart:
|
|
293
|
+
daySpan: S - f,
|
|
294
|
+
dayStart: f - r.startDayKey + 1,
|
|
614
295
|
laneIndex: 1
|
|
615
296
|
};
|
|
616
297
|
}
|
|
617
|
-
const i =
|
|
618
|
-
if (!i || !
|
|
619
|
-
const
|
|
620
|
-
return
|
|
298
|
+
const i = G(n), l = G(a);
|
|
299
|
+
if (!i || !l || i.dayKey !== l.dayKey || l.totalMinutes <= i.totalMinutes) return null;
|
|
300
|
+
const c = i.dayKey - r.startDayKey + 1;
|
|
301
|
+
return c < 1 || c > r.dayCount ? null : {
|
|
621
302
|
cascadeDepth: 0,
|
|
622
303
|
kind: "timed",
|
|
623
|
-
dayIndex:
|
|
624
|
-
endMinutes:
|
|
304
|
+
dayIndex: c,
|
|
305
|
+
endMinutes: l.totalMinutes,
|
|
625
306
|
startHour: i.hour,
|
|
626
307
|
startMinutes: i.totalMinutes,
|
|
627
|
-
yEnd:
|
|
628
|
-
yStart: i.totalMinutes /
|
|
308
|
+
yEnd: l.totalMinutes / $,
|
|
309
|
+
yStart: i.totalMinutes / $
|
|
629
310
|
};
|
|
630
311
|
}
|
|
631
|
-
function
|
|
632
|
-
if (Number.isInteger(
|
|
633
|
-
return
|
|
634
|
-
const
|
|
635
|
-
return
|
|
312
|
+
function Kt(e, r) {
|
|
313
|
+
if (Number.isInteger(e) && e >= 0 && e <= Z)
|
|
314
|
+
return e;
|
|
315
|
+
const t = r.filter((n) => (n == null ? void 0 : n.kind) === "timed").map((n) => n.startHour);
|
|
316
|
+
return t.length > 0 ? Math.max(Math.min(...t) - 1, 0) : Ct;
|
|
636
317
|
}
|
|
637
|
-
function
|
|
638
|
-
if (!Number.isInteger(
|
|
639
|
-
const
|
|
640
|
-
if (!
|
|
641
|
-
const
|
|
318
|
+
function Lt(e, r) {
|
|
319
|
+
if (typeof r != "number" || !Number.isInteger(r) || r < 1 || e === void 0) return null;
|
|
320
|
+
const t = _(e);
|
|
321
|
+
if (!t) return null;
|
|
322
|
+
const n = Array.from({ length: r }, (a, i) => Ot(t, i));
|
|
642
323
|
return {
|
|
643
|
-
dayCount:
|
|
644
|
-
days:
|
|
645
|
-
endDayKey:
|
|
646
|
-
startDayKey:
|
|
324
|
+
dayCount: r,
|
|
325
|
+
days: n,
|
|
326
|
+
endDayKey: t.dayKey + r,
|
|
327
|
+
startDayKey: t.dayKey
|
|
647
328
|
};
|
|
648
329
|
}
|
|
649
|
-
function
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
330
|
+
function X(e) {
|
|
331
|
+
return e === null ? void 0 : Number(e);
|
|
332
|
+
}
|
|
333
|
+
function _(e) {
|
|
334
|
+
const r = At.exec(e);
|
|
335
|
+
if (!r) return null;
|
|
336
|
+
const [, t, n, a] = r, i = Number(t), l = Number(n), c = Number(a);
|
|
337
|
+
if (!mt(i, l, c)) return null;
|
|
338
|
+
const p = new Date(i, l - 1, c);
|
|
655
339
|
return {
|
|
656
|
-
dayKey:
|
|
657
|
-
iso:
|
|
658
|
-
labelDay: String(
|
|
659
|
-
labelWeekday:
|
|
340
|
+
dayKey: j(i, l, c),
|
|
341
|
+
iso: e,
|
|
342
|
+
labelDay: String(c),
|
|
343
|
+
labelWeekday: p.toLocaleDateString(void 0, { weekday: "short" })
|
|
660
344
|
};
|
|
661
345
|
}
|
|
662
|
-
function
|
|
663
|
-
const
|
|
664
|
-
if (!
|
|
665
|
-
const [,
|
|
666
|
-
return !
|
|
667
|
-
dayKey:
|
|
668
|
-
hour:
|
|
669
|
-
totalMinutes:
|
|
346
|
+
function G(e) {
|
|
347
|
+
const r = kt.exec(e);
|
|
348
|
+
if (!r) return null;
|
|
349
|
+
const [, t, n, a, i, l] = r, c = Number(t), p = Number(n), E = Number(a), f = Number(i), S = Number(l);
|
|
350
|
+
return !mt(c, p, E) || !Number.isInteger(f) || f < 0 || f > Z || !Number.isInteger(S) || S < 0 || S > xt ? null : {
|
|
351
|
+
dayKey: j(c, p, E),
|
|
352
|
+
hour: f,
|
|
353
|
+
totalMinutes: f * L + S
|
|
670
354
|
};
|
|
671
355
|
}
|
|
672
|
-
function
|
|
673
|
-
const
|
|
674
|
-
return
|
|
675
|
-
`${
|
|
356
|
+
function Ot(e, r) {
|
|
357
|
+
const t = new Date((e.dayKey + r) * tt), n = t.getUTCFullYear(), a = t.getUTCMonth() + 1, i = t.getUTCDate();
|
|
358
|
+
return _(
|
|
359
|
+
`${n}-${String(a).padStart(2, "0")}-${String(i).padStart(2, "0")}`
|
|
676
360
|
);
|
|
677
361
|
}
|
|
678
|
-
function
|
|
679
|
-
const
|
|
680
|
-
return
|
|
362
|
+
function mt(e, r, t) {
|
|
363
|
+
const n = new Date(Date.UTC(e, r - 1, t));
|
|
364
|
+
return n.getUTCFullYear() === e && n.getUTCMonth() === r - 1 && n.getUTCDate() === t;
|
|
681
365
|
}
|
|
682
|
-
function
|
|
683
|
-
return Date.UTC(
|
|
366
|
+
function j(e, r, t) {
|
|
367
|
+
return Date.UTC(e, r - 1, t) / tt;
|
|
684
368
|
}
|
|
685
|
-
function
|
|
686
|
-
const
|
|
687
|
-
for (const { placement:
|
|
688
|
-
const
|
|
689
|
-
let i =
|
|
690
|
-
(
|
|
369
|
+
function qt(e) {
|
|
370
|
+
const r = [];
|
|
371
|
+
for (const { placement: n } of e.filter(Et)) {
|
|
372
|
+
const a = n.dayStart + n.daySpan;
|
|
373
|
+
let i = r.findIndex(
|
|
374
|
+
(l) => l.every((c) => !J(c.dayStart, c.dayStart + c.daySpan, n.dayStart, a))
|
|
691
375
|
);
|
|
692
|
-
i === -1 && (
|
|
376
|
+
i === -1 && (r.push([]), i = r.length - 1), n.laneIndex = i + 1, r[i].push(n);
|
|
693
377
|
}
|
|
694
|
-
const
|
|
695
|
-
for (const { placement:
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
(i) => i.startMinutes <
|
|
699
|
-
).length,
|
|
378
|
+
const t = /* @__PURE__ */ new Map();
|
|
379
|
+
for (const { placement: n } of e.filter(gt).sort(ft)) {
|
|
380
|
+
const a = t.get(n.dayIndex) ?? [];
|
|
381
|
+
n.cascadeDepth = a.filter(
|
|
382
|
+
(i) => i.startMinutes < n.startMinutes && J(i.startMinutes, i.endMinutes, n.startMinutes, n.endMinutes)
|
|
383
|
+
).length, a.push(n), t.set(n.dayIndex, a);
|
|
700
384
|
}
|
|
701
|
-
return
|
|
385
|
+
return r.length;
|
|
702
386
|
}
|
|
703
|
-
function
|
|
704
|
-
return
|
|
387
|
+
function ft(e, r) {
|
|
388
|
+
return e.placement.dayIndex - r.placement.dayIndex || e.placement.startMinutes - r.placement.startMinutes || e.placement.endMinutes - r.placement.endMinutes;
|
|
705
389
|
}
|
|
706
|
-
function
|
|
707
|
-
var
|
|
708
|
-
return ((
|
|
390
|
+
function Et(e) {
|
|
391
|
+
var r;
|
|
392
|
+
return ((r = e.placement) == null ? void 0 : r.kind) === "all-day";
|
|
709
393
|
}
|
|
710
|
-
function
|
|
711
|
-
var
|
|
712
|
-
return ((
|
|
394
|
+
function gt(e) {
|
|
395
|
+
var r;
|
|
396
|
+
return ((r = e.placement) == null ? void 0 : r.kind) === "timed";
|
|
713
397
|
}
|
|
714
|
-
function
|
|
715
|
-
return
|
|
398
|
+
function J(e, r, t, n) {
|
|
399
|
+
return e < n && t < r;
|
|
716
400
|
}
|