Add esbuild instructions as javascript builder

This commit is contained in:
L3D 2023-11-01 14:33:11 +01:00
parent 40a04c631a
commit 7bc89fd21a
No known key found for this signature in database
GPG key ID: AD65B920933B4B20
4 changed files with 116 additions and 158 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
node_modules/
assets/css/default.css assets/css/default.css
assets/css/schedule-aula.css assets/css/schedule-aula.css
assets/css/speaker-info-aula.css assets/css/speaker-info-aula.css

25
README.md Normal file
View file

@ -0,0 +1,25 @@
VOC Info Page
===============
This is a lektor Projekt, more about lektor on [getlektor.com](https://getlektor.com).
Because thsi project is migrated from a hugo project, currently the [esbuild](https://esbuild.github.io/) Javascript builder is not automated and has to be done manually to update scripts.
esbuild instructions
----------------------
prepare esbuild nodejs enviroment
```
pip install nodeenv
nodeenv -p
npm install --save-exact --save-dev esbuild
./node_modules/.bin/esbuild --version
npm install react react-dom
```
build assets
```bash
./node_modules/.bin/esbuild assets/js/custom/nodes/schedule.js --bundle --outfile=assets/rendered_schedule.js
```

View file

@ -3,72 +3,7 @@
// Fake 'now' date time for testing // Fake 'now' date time for testing
const fakeNow = null; const fakeNow = null;
// const fakeNow = Date.parse("2022-09-22T07:30:00"); // const fakeNow = Date.parse("2023-11-04T07:30:00");
// const fakeNow = Date.parse("2022-09-22T07:53:50");
// const fakeNow = Date.parse("2022-09-22T07:55:00");
// const fakeNow = Date.parse("2022-09-22T07:58:50");
// const fakeNow = Date.parse("2022-09-22T07:59:50");
// const fakeNow = Date.parse("2022-09-22T08:00:00");
// const fakeNow = Date.parse("2022-09-22T08:48:50");
// const fakeNow = Date.parse("2022-09-22T08:49:50");
// const fakeNow = Date.parse("2022-09-22T08:50:50");
// const fakeNow = Date.parse("2022-09-22T08:51:50");
// const fakeNow = Date.parse("2022-09-22T08:53:50");
// const fakeNow = Date.parse("2022-09-22T08:58:50");
// const fakeNow = Date.parse("2022-09-22T08:59:50");
// const fakeNow = Date.parse("2022-09-22T09:00:00");
// const fakeNow = Date.parse("2022-09-22T09:00:50");
// const fakeNow = Date.parse("2022-09-22T09:01:50");
// const fakeNow = Date.parse("2022-09-22T09:15:00");
// const fakeNow = Date.parse("2022-09-22T10:00:00");
// const fakeNow = Date.parse("2022-09-22T10:38:50");
// const fakeNow = Date.parse("2022-09-22T10:40:00");
// const fakeNow = Date.parse("2022-09-22T10:33:00");
// const fakeNow = Date.parse("2022-09-22T10:37:00");
// const fakeNow = Date.parse("2022-09-22T10:39:00");
// const fakeNow = Date.parse("2022-09-22T10:59:50");
// const fakeNow = Date.parse("2022-09-22T11:03:00");
// const fakeNow = Date.parse("2022-09-22T11:03:50");
// const fakeNow = Date.parse("2022-09-22T11:04:50");
// const fakeNow = Date.parse("2022-09-22T11:08:50");
// const fakeNow = Date.parse("2022-09-22T11:09:50");
// const fakeNow = Date.parse("2022-09-22T11:10:00");
// const fakeNow = Date.parse("2022-09-22T11:40:00");
// const fakeNow = Date.parse("2022-09-22T12:10:00");
// const fakeNow = Date.parse("2022-09-22T12:38:50");
// const fakeNow = Date.parse("2022-09-22T12:40:00");
// const fakeNow = Date.parse("2022-09-22T13:48:50");
// const fakeNow = Date.parse("2022-09-22T13:53:50");
// const fakeNow = Date.parse("2022-09-22T14:00:00");
// const fakeNow = Date.parse("2022-09-22T14:30:00");
// const fakeNow = Date.parse("2022-09-22T14:53:50");
// const fakeNow = Date.parse("2022-09-22T15:00:00");
// const fakeNow = Date.parse("2022-09-22T15:45:00");
// const fakeNow = Date.parse("2022-09-22T16:15:00");
// const fakeNow = Date.parse("2022-09-22T16:45:00");
// const fakeNow = Date.parse("2022-09-22T16:58:50");
// const fakeNow = Date.parse("2022-09-22T17:00:00");
// const fakeNow = Date.parse("2022-09-22T17:01:00");
// const fakeNow = Date.parse("2022-09-22T19:48:50");
// const fakeNow = Date.parse("2022-09-22T19:49:50");
// const fakeNow = Date.parse("2022-09-22T19:58:50");
// const fakeNow = Date.parse("2022-09-22T20:00:00");
// const fakeNow = Date.parse("2022-09-22T20:02:00");
const fakeTimeDelta = fakeNow === null ? 0 : fakeNow - Date.now(); const fakeTimeDelta = fakeNow === null ? 0 : fakeNow - Date.now();

View file

@ -6,19 +6,16 @@
__defProp(target, name, { get: all[name], enumerable: true }); __defProp(target, name, { get: all[name], enumerable: true });
}; };
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/custom/core/fetcher.js // assets/js/custom/core/fetcher.js
var configure = (configuration, service) => { var configure = (configuration, service) => {
const fetchIt = (storage2) => { const fetchIt = (storage2) => {
if (window.Worker) { if (window.Worker) {
const workerBaseURL = "/js/custom/core"; const workerBaseURL = window.informationProjectorConfig.get("workerBaseURL");
// window.informationProjectorConfig.get("workerBaseURL");
const fetchWorkerCode = workerBaseURL + "/generic_fetch_worker.js"; const fetchWorkerCode = workerBaseURL + "/generic_fetch_worker.js";
const scheduleWorker = new Worker(fetchWorkerCode); const scheduleWorker = new Worker(fetchWorkerCode);
const scheduleType = "Schedule"; const scheduleType = "Schedule";
// const scheduleURL = window.informationProjectorConfig.get("scheduleURL"); const scheduleURL = window.informationProjectorConfig.get("scheduleURL");
const scheduleURL = '/schedule.json' const scheduleFetchInterval = window.informationProjectorConfig.get("scheduleFetchInterval");
// const scheduleFetchInterval = window.informationProjectorConfig.get("scheduleFetchInterval");
const scheduleFetchInterval = 60;
scheduleWorker.postMessage({ scheduleWorker.postMessage({
fetchType: scheduleType, fetchType: scheduleType,
fetchURL: scheduleURL, fetchURL: scheduleURL,
@ -43,7 +40,7 @@
return fetchIt; return fetchIt;
}; };
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/custom/core/time.js // assets/js/custom/core/time.js
var time_exports = {}; var time_exports = {};
__export(time_exports, { __export(time_exports, {
now: () => now now: () => now
@ -53,7 +50,7 @@
var nowJS = () => Date.now() + fakeTimeDelta; var nowJS = () => Date.now() + fakeTimeDelta;
var now = () => luxon.DateTime.fromMillis(nowJS()); var now = () => luxon.DateTime.fromMillis(nowJS());
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/custom/core/screen.js // assets/js/custom/core/screen.js
function configure2(service, view) { function configure2(service, view) {
const update_screen = (storage2, time, config) => { const update_screen = (storage2, time, config) => {
let now3 = time.now(); let now3 = time.now();
@ -66,7 +63,7 @@
return update_screen; return update_screen;
} }
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/custom/services/general.js // assets/js/custom/services/general.js
var general_exports = {}; var general_exports = {};
__export(general_exports, { __export(general_exports, {
fix_dash: () => fix_dash, fix_dash: () => fix_dash,
@ -78,7 +75,7 @@
type_index: () => type_index type_index: () => type_index
}); });
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/luxon/luxon.es6.js // assets/js/luxon/luxon.es6.js
var LuxonError = class extends Error { var LuxonError = class extends Error {
}; };
var InvalidDateTimeError = class extends LuxonError { var InvalidDateTimeError = class extends LuxonError {
@ -607,9 +604,9 @@
FFF: DATETIME_FULL_WITH_SECONDS, FFF: DATETIME_FULL_WITH_SECONDS,
FFFF: DATETIME_HUGE_WITH_SECONDS FFFF: DATETIME_HUGE_WITH_SECONDS
}; };
var Formatter = class { var Formatter = class _Formatter {
static create(locale, opts = {}) { static create(locale, opts = {}) {
return new Formatter(locale, opts); return new _Formatter(locale, opts);
} }
static parseFormat(fmt) { static parseFormat(fmt) {
let current = null, currentFull = "", bracketed = false; let current = null, currentFull = "", bracketed = false;
@ -687,7 +684,7 @@
standalone ? { weekday: length } : { weekday: length, month: "long", day: "numeric" }, standalone ? { weekday: length } : { weekday: length, month: "long", day: "numeric" },
"weekday" "weekday"
), maybeMacro = (token) => { ), maybeMacro = (token) => {
const formatOpts = Formatter.macroTokenToFormatOpts(token); const formatOpts = _Formatter.macroTokenToFormatOpts(token);
if (formatOpts) { if (formatOpts) {
return this.formatWithSystemDefault(dt2, formatOpts); return this.formatWithSystemDefault(dt2, formatOpts);
} else { } else {
@ -812,7 +809,7 @@
return maybeMacro(token); return maybeMacro(token);
} }
}; };
return stringifyTokens(Formatter.parseFormat(fmt), tokenToString); return stringifyTokens(_Formatter.parseFormat(fmt), tokenToString);
} }
formatDurationFromString(dur, fmt) { formatDurationFromString(dur, fmt) {
const tokenToField = (token) => { const tokenToField = (token) => {
@ -843,7 +840,7 @@
} else { } else {
return token; return token;
} }
}, tokens = Formatter.parseFormat(fmt), realTokens = tokens.reduce( }, tokens = _Formatter.parseFormat(fmt), realTokens = tokens.reduce(
(found, { literal, val }) => literal ? found : found.concat(val), (found, { literal, val }) => literal ? found : found.concat(val),
[] []
), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t)); ), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));
@ -942,14 +939,14 @@
} }
}; };
var singleton$1 = null; var singleton$1 = null;
var SystemZone = class extends Zone { var SystemZone = class _SystemZone extends Zone {
/** /**
* Get a singleton instance of the local zone * Get a singleton instance of the local zone
* @return {SystemZone} * @return {SystemZone}
*/ */
static get instance() { static get instance() {
if (singleton$1 === null) { if (singleton$1 === null) {
singleton$1 = new SystemZone(); singleton$1 = new _SystemZone();
} }
return singleton$1; return singleton$1;
} }
@ -1031,14 +1028,14 @@
return filled; return filled;
} }
var ianaZoneCache = {}; var ianaZoneCache = {};
var IANAZone = class extends Zone { var IANAZone = class _IANAZone extends Zone {
/** /**
* @param {string} name - Zone name * @param {string} name - Zone name
* @return {IANAZone} * @return {IANAZone}
*/ */
static create(name) { static create(name) {
if (!ianaZoneCache[name]) { if (!ianaZoneCache[name]) {
ianaZoneCache[name] = new IANAZone(name); ianaZoneCache[name] = new _IANAZone(name);
} }
return ianaZoneCache[name]; return ianaZoneCache[name];
} }
@ -1083,7 +1080,7 @@
constructor(name) { constructor(name) {
super(); super();
this.zoneName = name; this.zoneName = name;
this.valid = IANAZone.isValidZone(name); this.valid = _IANAZone.isValidZone(name);
} }
/** @override **/ /** @override **/
get type() { get type() {
@ -1140,14 +1137,14 @@
} }
}; };
var singleton = null; var singleton = null;
var FixedOffsetZone = class extends Zone { var FixedOffsetZone = class _FixedOffsetZone extends Zone {
/** /**
* Get a singleton instance of UTC * Get a singleton instance of UTC
* @return {FixedOffsetZone} * @return {FixedOffsetZone}
*/ */
static get utcInstance() { static get utcInstance() {
if (singleton === null) { if (singleton === null) {
singleton = new FixedOffsetZone(0); singleton = new _FixedOffsetZone(0);
} }
return singleton; return singleton;
} }
@ -1157,7 +1154,7 @@
* @return {FixedOffsetZone} * @return {FixedOffsetZone}
*/ */
static instance(offset2) { static instance(offset2) {
return offset2 === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset2); return offset2 === 0 ? _FixedOffsetZone.utcInstance : new _FixedOffsetZone(offset2);
} }
/** /**
* Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
@ -1171,7 +1168,7 @@
if (s2) { if (s2) {
const r = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); const r = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
if (r) { if (r) {
return new FixedOffsetZone(signedOffset(r[1], r[2])); return new _FixedOffsetZone(signedOffset(r[1], r[2]));
} }
} }
return null; return null;
@ -1583,16 +1580,16 @@
} }
} }
}; };
var Locale = class { var Locale = class _Locale {
static fromOpts(opts) { static fromOpts(opts) {
return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN); return _Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);
} }
static create(locale, numberingSystem, outputCalendar, defaultToEN = false) { static create(locale, numberingSystem, outputCalendar, defaultToEN = false) {
const specifiedLocale = locale || Settings.defaultLocale; const specifiedLocale = locale || Settings.defaultLocale;
const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()); const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale());
const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem; const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;
const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;
return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale); return new _Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);
} }
static resetCache() { static resetCache() {
sysLocaleCache = null; sysLocaleCache = null;
@ -1601,7 +1598,7 @@
intlRelCache = {}; intlRelCache = {};
} }
static fromObject({ locale, numberingSystem, outputCalendar } = {}) { static fromObject({ locale, numberingSystem, outputCalendar } = {}) {
return Locale.create(locale, numberingSystem, outputCalendar); return _Locale.create(locale, numberingSystem, outputCalendar);
} }
constructor(locale, numbering, outputCalendar, specifiedLocale) { constructor(locale, numbering, outputCalendar, specifiedLocale) {
const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale); const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);
@ -1631,7 +1628,7 @@
if (!alts || Object.getOwnPropertyNames(alts).length === 0) { if (!alts || Object.getOwnPropertyNames(alts).length === 0) {
return this; return this;
} else { } else {
return Locale.create( return _Locale.create(
alts.locale || this.specifiedLocale, alts.locale || this.specifiedLocale,
alts.numberingSystem || this.numberingSystem, alts.numberingSystem || this.numberingSystem,
alts.outputCalendar || this.outputCalendar, alts.outputCalendar || this.outputCalendar,
@ -2071,7 +2068,7 @@
} }
}, null); }, null);
} }
var Duration = class { var Duration = class _Duration {
/** /**
* @private * @private
*/ */
@ -2098,7 +2095,7 @@
* @return {Duration} * @return {Duration}
*/ */
static fromMillis(count, opts) { static fromMillis(count, opts) {
return Duration.fromObject({ milliseconds: count }, opts); return _Duration.fromObject({ milliseconds: count }, opts);
} }
/** /**
* Create a Duration from a JavaScript object with keys like 'years' and 'hours'. * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.
@ -2126,8 +2123,8 @@
`Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}` `Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}`
); );
} }
return new Duration({ return new _Duration({
values: normalizeObject(obj, Duration.normalizeUnit), values: normalizeObject(obj, _Duration.normalizeUnit),
loc: Locale.fromObject(opts), loc: Locale.fromObject(opts),
conversionAccuracy: opts.conversionAccuracy, conversionAccuracy: opts.conversionAccuracy,
matrix: opts.matrix matrix: opts.matrix
@ -2145,11 +2142,11 @@
*/ */
static fromDurationLike(durationLike) { static fromDurationLike(durationLike) {
if (isNumber(durationLike)) { if (isNumber(durationLike)) {
return Duration.fromMillis(durationLike); return _Duration.fromMillis(durationLike);
} else if (Duration.isDuration(durationLike)) { } else if (_Duration.isDuration(durationLike)) {
return durationLike; return durationLike;
} else if (typeof durationLike === "object") { } else if (typeof durationLike === "object") {
return Duration.fromObject(durationLike); return _Duration.fromObject(durationLike);
} else { } else {
throw new InvalidArgumentError( throw new InvalidArgumentError(
`Unknown duration argument ${durationLike} of type ${typeof durationLike}` `Unknown duration argument ${durationLike} of type ${typeof durationLike}`
@ -2173,9 +2170,9 @@
static fromISO(text, opts) { static fromISO(text, opts) {
const [parsed] = parseISODuration(text); const [parsed] = parseISODuration(text);
if (parsed) { if (parsed) {
return Duration.fromObject(parsed, opts); return _Duration.fromObject(parsed, opts);
} else { } else {
return Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
} }
} }
/** /**
@ -2197,9 +2194,9 @@
static fromISOTime(text, opts) { static fromISOTime(text, opts) {
const [parsed] = parseISOTimeOnly(text); const [parsed] = parseISOTimeOnly(text);
if (parsed) { if (parsed) {
return Duration.fromObject(parsed, opts); return _Duration.fromObject(parsed, opts);
} else { } else {
return Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
} }
} }
/** /**
@ -2216,7 +2213,7 @@
if (Settings.throwOnInvalid) { if (Settings.throwOnInvalid) {
throw new InvalidDurationError(invalid); throw new InvalidDurationError(invalid);
} else { } else {
return new Duration({ invalid }); return new _Duration({ invalid });
} }
} }
/** /**
@ -2445,7 +2442,7 @@
plus(duration) { plus(duration) {
if (!this.isValid) if (!this.isValid)
return this; return this;
const dur = Duration.fromDurationLike(duration), result = {}; const dur = _Duration.fromDurationLike(duration), result = {};
for (const k of orderedUnits$1) { for (const k of orderedUnits$1) {
if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {
result[k] = dur.get(k) + this.get(k); result[k] = dur.get(k) + this.get(k);
@ -2461,7 +2458,7 @@
minus(duration) { minus(duration) {
if (!this.isValid) if (!this.isValid)
return this; return this;
const dur = Duration.fromDurationLike(duration); const dur = _Duration.fromDurationLike(duration);
return this.plus(dur.negate()); return this.plus(dur.negate());
} }
/** /**
@ -2489,7 +2486,7 @@
* @return {number} * @return {number}
*/ */
get(unit) { get(unit) {
return this[Duration.normalizeUnit(unit)]; return this[_Duration.normalizeUnit(unit)];
} }
/** /**
* "Set" the values of specified units. Return a newly-constructed Duration. * "Set" the values of specified units. Return a newly-constructed Duration.
@ -2501,7 +2498,7 @@
set(values) { set(values) {
if (!this.isValid) if (!this.isValid)
return this; return this;
const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) }; const mixed = { ...this.values, ...normalizeObject(values, _Duration.normalizeUnit) };
return clone$1(this, { values: mixed }); return clone$1(this, { values: mixed });
} }
/** /**
@ -2549,7 +2546,7 @@
if (units.length === 0) { if (units.length === 0) {
return this; return this;
} }
units = units.map((u) => Duration.normalizeUnit(u)); units = units.map((u) => _Duration.normalizeUnit(u));
const built = {}, accumulated = {}, vals = this.toObject(); const built = {}, accumulated = {}, vals = this.toObject();
let lastUnit; let lastUnit;
for (const k of orderedUnits$1) { for (const k of orderedUnits$1) {
@ -2722,7 +2719,7 @@
return null; return null;
} }
} }
var Interval = class { var Interval = class _Interval {
/** /**
* @private * @private
*/ */
@ -2746,7 +2743,7 @@
if (Settings.throwOnInvalid) { if (Settings.throwOnInvalid) {
throw new InvalidIntervalError(invalid); throw new InvalidIntervalError(invalid);
} else { } else {
return new Interval({ invalid }); return new _Interval({ invalid });
} }
} }
/** /**
@ -2759,7 +2756,7 @@
const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end); const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end);
const validateError = validateStartEnd(builtStart, builtEnd); const validateError = validateStartEnd(builtStart, builtEnd);
if (validateError == null) { if (validateError == null) {
return new Interval({ return new _Interval({
start: builtStart, start: builtStart,
end: builtEnd end: builtEnd
}); });
@ -2775,7 +2772,7 @@
*/ */
static after(start, duration) { static after(start, duration) {
const dur = Duration.fromDurationLike(duration), dt2 = friendlyDateTime(start); const dur = Duration.fromDurationLike(duration), dt2 = friendlyDateTime(start);
return Interval.fromDateTimes(dt2, dt2.plus(dur)); return _Interval.fromDateTimes(dt2, dt2.plus(dur));
} }
/** /**
* Create an Interval from an end DateTime and a Duration to extend backwards to. * Create an Interval from an end DateTime and a Duration to extend backwards to.
@ -2785,7 +2782,7 @@
*/ */
static before(end, duration) { static before(end, duration) {
const dur = Duration.fromDurationLike(duration), dt2 = friendlyDateTime(end); const dur = Duration.fromDurationLike(duration), dt2 = friendlyDateTime(end);
return Interval.fromDateTimes(dt2.minus(dur), dt2); return _Interval.fromDateTimes(dt2.minus(dur), dt2);
} }
/** /**
* Create an Interval from an ISO 8601 string. * Create an Interval from an ISO 8601 string.
@ -2813,21 +2810,21 @@
endIsValid = false; endIsValid = false;
} }
if (startIsValid && endIsValid) { if (startIsValid && endIsValid) {
return Interval.fromDateTimes(start, end); return _Interval.fromDateTimes(start, end);
} }
if (startIsValid) { if (startIsValid) {
const dur = Duration.fromISO(e, opts); const dur = Duration.fromISO(e, opts);
if (dur.isValid) { if (dur.isValid) {
return Interval.after(start, dur); return _Interval.after(start, dur);
} }
} else if (endIsValid) { } else if (endIsValid) {
const dur = Duration.fromISO(s2, opts); const dur = Duration.fromISO(s2, opts);
if (dur.isValid) { if (dur.isValid) {
return Interval.before(end, dur); return _Interval.before(end, dur);
} }
} }
} }
return Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); return _Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
} }
/** /**
* Check if an object is an Interval. Works across context boundaries * Check if an object is an Interval. Works across context boundaries
@ -2948,7 +2945,7 @@
set({ start, end } = {}) { set({ start, end } = {}) {
if (!this.isValid) if (!this.isValid)
return this; return this;
return Interval.fromDateTimes(start || this.s, end || this.e); return _Interval.fromDateTimes(start || this.s, end || this.e);
} }
/** /**
* Split this Interval at each of the specified DateTimes * Split this Interval at each of the specified DateTimes
@ -2962,7 +2959,7 @@
let { s: s2 } = this, i = 0; let { s: s2 } = this, i = 0;
while (s2 < this.e) { while (s2 < this.e) {
const added = sorted[i] || this.e, next = +added > +this.e ? this.e : added; const added = sorted[i] || this.e, next = +added > +this.e ? this.e : added;
results.push(Interval.fromDateTimes(s2, next)); results.push(_Interval.fromDateTimes(s2, next));
s2 = next; s2 = next;
i += 1; i += 1;
} }
@ -2984,7 +2981,7 @@
while (s2 < this.e) { while (s2 < this.e) {
const added = this.start.plus(dur.mapUnits((x) => x * idx)); const added = this.start.plus(dur.mapUnits((x) => x * idx));
next = +added > +this.e ? this.e : added; next = +added > +this.e ? this.e : added;
results.push(Interval.fromDateTimes(s2, next)); results.push(_Interval.fromDateTimes(s2, next));
s2 = next; s2 = next;
idx += 1; idx += 1;
} }
@ -3063,7 +3060,7 @@
if (s2 >= e) { if (s2 >= e) {
return null; return null;
} else { } else {
return Interval.fromDateTimes(s2, e); return _Interval.fromDateTimes(s2, e);
} }
} }
/** /**
@ -3076,7 +3073,7 @@
if (!this.isValid) if (!this.isValid)
return this; return this;
const s2 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e; const s2 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e;
return Interval.fromDateTimes(s2, e); return _Interval.fromDateTimes(s2, e);
} }
/** /**
* Merge an array of Intervals into a equivalent minimal set of Intervals. * Merge an array of Intervals into a equivalent minimal set of Intervals.
@ -3119,12 +3116,12 @@
start = i.time; start = i.time;
} else { } else {
if (start && +start !== +i.time) { if (start && +start !== +i.time) {
results.push(Interval.fromDateTimes(start, i.time)); results.push(_Interval.fromDateTimes(start, i.time));
} }
start = null; start = null;
} }
} }
return Interval.merge(results); return _Interval.merge(results);
} }
/** /**
* Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.
@ -3132,7 +3129,7 @@
* @return {Array} * @return {Array}
*/ */
difference(...intervals) { difference(...intervals) {
return Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty()); return _Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty());
} }
/** /**
* Returns a string representation of this Interval appropriate for debugging. * Returns a string representation of this Interval appropriate for debugging.
@ -3215,7 +3212,7 @@
* @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
*/ */
mapEndpoints(mapFn) { mapEndpoints(mapFn) {
return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); return _Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));
} }
}; };
var Info = class { var Info = class {
@ -4206,7 +4203,7 @@
} }
return [opts, args]; return [opts, args];
} }
var DateTime = class { var DateTime = class _DateTime {
/** /**
* @access private * @access private
*/ */
@ -4244,7 +4241,7 @@
* @return {DateTime} * @return {DateTime}
*/ */
static now() { static now() {
return new DateTime({}); return new _DateTime({});
} }
/** /**
* Create a local DateTime * Create a local DateTime
@ -4310,13 +4307,13 @@
static fromJSDate(date, options = {}) { static fromJSDate(date, options = {}) {
const ts = isDate(date) ? date.valueOf() : NaN; const ts = isDate(date) ? date.valueOf() : NaN;
if (Number.isNaN(ts)) { if (Number.isNaN(ts)) {
return DateTime.invalid("invalid input"); return _DateTime.invalid("invalid input");
} }
const zoneToUse = normalizeZone(options.zone, Settings.defaultZone); const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);
if (!zoneToUse.isValid) { if (!zoneToUse.isValid) {
return DateTime.invalid(unsupportedZone(zoneToUse)); return _DateTime.invalid(unsupportedZone(zoneToUse));
} }
return new DateTime({ return new _DateTime({
ts, ts,
zone: zoneToUse, zone: zoneToUse,
loc: Locale.fromObject(options) loc: Locale.fromObject(options)
@ -4338,9 +4335,9 @@
`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}` `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`
); );
} else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {
return DateTime.invalid("Timestamp out of range"); return _DateTime.invalid("Timestamp out of range");
} else { } else {
return new DateTime({ return new _DateTime({
ts: milliseconds, ts: milliseconds,
zone: normalizeZone(options.zone, Settings.defaultZone), zone: normalizeZone(options.zone, Settings.defaultZone),
loc: Locale.fromObject(options) loc: Locale.fromObject(options)
@ -4361,7 +4358,7 @@
if (!isNumber(seconds)) { if (!isNumber(seconds)) {
throw new InvalidArgumentError("fromSeconds requires a numerical input"); throw new InvalidArgumentError("fromSeconds requires a numerical input");
} else { } else {
return new DateTime({ return new _DateTime({
ts: seconds * 1e3, ts: seconds * 1e3,
zone: normalizeZone(options.zone, Settings.defaultZone), zone: normalizeZone(options.zone, Settings.defaultZone),
loc: Locale.fromObject(options) loc: Locale.fromObject(options)
@ -4400,7 +4397,7 @@
obj = obj || {}; obj = obj || {};
const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone); const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);
if (!zoneToUse.isValid) { if (!zoneToUse.isValid) {
return DateTime.invalid(unsupportedZone(zoneToUse)); return _DateTime.invalid(unsupportedZone(zoneToUse));
} }
const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), normalized = normalizeObject(obj, normalizeUnit), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale.fromObject(opts); const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), normalized = normalizeObject(obj, normalizeUnit), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale.fromObject(opts);
if ((containsGregor || containsOrdinal) && definiteWeekDef) { if ((containsGregor || containsOrdinal) && definiteWeekDef) {
@ -4438,16 +4435,16 @@
} }
const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized); const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized);
if (invalid) { if (invalid) {
return DateTime.invalid(invalid); return _DateTime.invalid(invalid);
} }
const gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new DateTime({ const gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new _DateTime({
ts: tsFinal, ts: tsFinal,
zone: zoneToUse, zone: zoneToUse,
o: offsetFinal, o: offsetFinal,
loc loc
}); });
if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {
return DateTime.invalid( return _DateTime.invalid(
"mismatched weekday", "mismatched weekday",
`you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}` `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`
); );
@ -4534,7 +4531,7 @@
defaultToEN: true defaultToEN: true
}), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt); }), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);
if (invalid) { if (invalid) {
return DateTime.invalid(invalid); return _DateTime.invalid(invalid);
} else { } else {
return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset); return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);
} }
@ -4543,7 +4540,7 @@
* @deprecated use fromFormat instead * @deprecated use fromFormat instead
*/ */
static fromString(text, fmt, opts = {}) { static fromString(text, fmt, opts = {}) {
return DateTime.fromFormat(text, fmt, opts); return _DateTime.fromFormat(text, fmt, opts);
} }
/** /**
* Create a DateTime from a SQL date, time, or datetime * Create a DateTime from a SQL date, time, or datetime
@ -4583,7 +4580,7 @@
if (Settings.throwOnInvalid) { if (Settings.throwOnInvalid) {
throw new InvalidDateTimeError(invalid); throw new InvalidDateTimeError(invalid);
} else { } else {
return new DateTime({ invalid }); return new _DateTime({ invalid });
} }
} }
/** /**
@ -4965,7 +4962,7 @@
if (zone.equals(this.zone)) { if (zone.equals(this.zone)) {
return this; return this;
} else if (!zone.isValid) { } else if (!zone.isValid) {
return DateTime.invalid(unsupportedZone(zone)); return _DateTime.invalid(unsupportedZone(zone));
} else { } else {
let newTS = this.ts; let newTS = this.ts;
if (keepLocalTime || keepCalendarTime) { if (keepLocalTime || keepCalendarTime) {
@ -5439,7 +5436,7 @@
* @return {Duration} * @return {Duration}
*/ */
diffNow(unit = "milliseconds", opts = {}) { diffNow(unit = "milliseconds", opts = {}) {
return this.diff(DateTime.now(), unit, opts); return this.diff(_DateTime.now(), unit, opts);
} }
/** /**
* Return an Interval spanning between this DateTime and another DateTime * Return an Interval spanning between this DateTime and another DateTime
@ -5496,7 +5493,7 @@
toRelative(options = {}) { toRelative(options = {}) {
if (!this.isValid) if (!this.isValid)
return null; return null;
const base = options.base || DateTime.fromObject({}, { zone: this.zone }), padding = options.padding ? this < base ? -options.padding : options.padding : 0; const base = options.base || _DateTime.fromObject({}, { zone: this.zone }), padding = options.padding ? this < base ? -options.padding : options.padding : 0;
let units = ["years", "months", "days", "hours", "minutes", "seconds"]; let units = ["years", "months", "days", "hours", "minutes", "seconds"];
let unit = options.unit; let unit = options.unit;
if (Array.isArray(options.unit)) { if (Array.isArray(options.unit)) {
@ -5526,7 +5523,7 @@
toRelativeCalendar(options = {}) { toRelativeCalendar(options = {}) {
if (!this.isValid) if (!this.isValid)
return null; return null;
return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, { return diffRelative(options.base || _DateTime.fromObject({}, { zone: this.zone }), this, {
...options, ...options,
numeric: "auto", numeric: "auto",
units: ["years", "months", "days"], units: ["years", "months", "days"],
@ -5539,7 +5536,7 @@
* @return {DateTime} the min DateTime, or undefined if called with no argument * @return {DateTime} the min DateTime, or undefined if called with no argument
*/ */
static min(...dateTimes) { static min(...dateTimes) {
if (!dateTimes.every(DateTime.isDateTime)) { if (!dateTimes.every(_DateTime.isDateTime)) {
throw new InvalidArgumentError("min requires all arguments be DateTimes"); throw new InvalidArgumentError("min requires all arguments be DateTimes");
} }
return bestBy(dateTimes, (i) => i.valueOf(), Math.min); return bestBy(dateTimes, (i) => i.valueOf(), Math.min);
@ -5550,7 +5547,7 @@
* @return {DateTime} the max DateTime, or undefined if called with no argument * @return {DateTime} the max DateTime, or undefined if called with no argument
*/ */
static max(...dateTimes) { static max(...dateTimes) {
if (!dateTimes.every(DateTime.isDateTime)) { if (!dateTimes.every(_DateTime.isDateTime)) {
throw new InvalidArgumentError("max requires all arguments be DateTimes"); throw new InvalidArgumentError("max requires all arguments be DateTimes");
} }
return bestBy(dateTimes, (i) => i.valueOf(), Math.max); return bestBy(dateTimes, (i) => i.valueOf(), Math.max);
@ -5575,7 +5572,7 @@
* @deprecated use fromFormatExplain instead * @deprecated use fromFormatExplain instead
*/ */
static fromStringExplain(text, fmt, options = {}) { static fromStringExplain(text, fmt, options = {}) {
return DateTime.fromFormatExplain(text, fmt, options); return _DateTime.fromFormatExplain(text, fmt, options);
} }
// FORMAT PRESETS // FORMAT PRESETS
/** /**
@ -5747,7 +5744,7 @@
} }
} }
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/solight/sol.js // assets/js/solight/sol.js
var optional = (x) => x === null ? void 0 : x; var optional = (x) => x === null ? void 0 : x;
var defined = (x) => x !== void 0; var defined = (x) => x !== void 0;
var withDefined = (x, f) => defined(x) ? f() : void 0; var withDefined = (x, f) => defined(x) ? f() : void 0;
@ -5889,7 +5886,7 @@
var sortEventsByStartDate = (events) => events.sort((e1, e2) => eventStartDate(e1).toMillis() - eventStartDate(e2).toMillis()); var sortEventsByStartDate = (events) => events.sort((e1, e2) => eventStartDate(e1).toMillis() - eventStartDate(e2).toMillis());
var allEvents = (schedule) => conferenceEvents(conference(schedule)); var allEvents = (schedule) => conferenceEvents(conference(schedule));
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/custom/services/general.js // assets/js/custom/services/general.js
var process_data = (scheduleFile) => processScheduleFile(scheduleFile); var process_data = (scheduleFile) => processScheduleFile(scheduleFile);
var trackIndexMap = /* @__PURE__ */ new Map([ var trackIndexMap = /* @__PURE__ */ new Map([
["Main", 0] ["Main", 0]
@ -5918,7 +5915,7 @@
return delta >= 0 && delta <= dt2 * 1e3; return delta >= 0 && delta <= dt2 * 1e3;
}; };
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/custom/dom/schedule.js // assets/js/custom/dom/schedule.js
var schedule_exports = {}; var schedule_exports = {};
__export(schedule_exports, { __export(schedule_exports, {
update_main_slide: () => update_main_slide update_main_slide: () => update_main_slide
@ -5993,7 +5990,7 @@
; ;
}; };
// ns-hugo:/home/l3d/git/voc/aalen-geekend-23-huginfo/assets/js/custom/dom/clock.js // assets/js/custom/dom/clock.js
var clock_exports = {}; var clock_exports = {};
__export(clock_exports, { __export(clock_exports, {
update_main_slide: () => update_main_slide2 update_main_slide: () => update_main_slide2
@ -6009,7 +6006,7 @@
preact.render(inner, el); preact.render(inner, el);
}; };
// <stdin> // assets/js/custom/nodes/schedule.js
var storage = { var storage = {
scheduleData: void 0 scheduleData: void 0
}; };