Add esbuild instructions as javascript builder
This commit is contained in:
parent
40a04c631a
commit
7bc89fd21a
4 changed files with 116 additions and 158 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
node_modules/
|
||||
assets/css/default.css
|
||||
assets/css/schedule-aula.css
|
||||
assets/css/speaker-info-aula.css
|
||||
|
|
25
README.md
Normal file
25
README.md
Normal 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
|
||||
```
|
|
@ -3,72 +3,7 @@
|
|||
// Fake 'now' date time for testing
|
||||
const fakeNow = null;
|
||||
|
||||
// const fakeNow = Date.parse("2022-09-22T07: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 fakeNow = Date.parse("2023-11-04T07:30:00");
|
||||
|
||||
|
||||
const fakeTimeDelta = fakeNow === null ? 0 : fakeNow - Date.now();
|
||||
|
|
|
@ -6,19 +6,16 @@
|
|||
__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) => {
|
||||
const fetchIt = (storage2) => {
|
||||
if (window.Worker) {
|
||||
const workerBaseURL = "/js/custom/core";
|
||||
// window.informationProjectorConfig.get("workerBaseURL");
|
||||
const workerBaseURL = window.informationProjectorConfig.get("workerBaseURL");
|
||||
const fetchWorkerCode = workerBaseURL + "/generic_fetch_worker.js";
|
||||
const scheduleWorker = new Worker(fetchWorkerCode);
|
||||
const scheduleType = "Schedule";
|
||||
// const scheduleURL = window.informationProjectorConfig.get("scheduleURL");
|
||||
const scheduleURL = '/schedule.json'
|
||||
// const scheduleFetchInterval = window.informationProjectorConfig.get("scheduleFetchInterval");
|
||||
const scheduleFetchInterval = 60;
|
||||
const scheduleURL = window.informationProjectorConfig.get("scheduleURL");
|
||||
const scheduleFetchInterval = window.informationProjectorConfig.get("scheduleFetchInterval");
|
||||
scheduleWorker.postMessage({
|
||||
fetchType: scheduleType,
|
||||
fetchURL: scheduleURL,
|
||||
|
@ -43,7 +40,7 @@
|
|||
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 = {};
|
||||
__export(time_exports, {
|
||||
now: () => now
|
||||
|
@ -53,7 +50,7 @@
|
|||
var nowJS = () => Date.now() + fakeTimeDelta;
|
||||
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) {
|
||||
const update_screen = (storage2, time, config) => {
|
||||
let now3 = time.now();
|
||||
|
@ -66,7 +63,7 @@
|
|||
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 = {};
|
||||
__export(general_exports, {
|
||||
fix_dash: () => fix_dash,
|
||||
|
@ -78,7 +75,7 @@
|
|||
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 InvalidDateTimeError = class extends LuxonError {
|
||||
|
@ -607,9 +604,9 @@
|
|||
FFF: DATETIME_FULL_WITH_SECONDS,
|
||||
FFFF: DATETIME_HUGE_WITH_SECONDS
|
||||
};
|
||||
var Formatter = class {
|
||||
var Formatter = class _Formatter {
|
||||
static create(locale, opts = {}) {
|
||||
return new Formatter(locale, opts);
|
||||
return new _Formatter(locale, opts);
|
||||
}
|
||||
static parseFormat(fmt) {
|
||||
let current = null, currentFull = "", bracketed = false;
|
||||
|
@ -687,7 +684,7 @@
|
|||
standalone ? { weekday: length } : { weekday: length, month: "long", day: "numeric" },
|
||||
"weekday"
|
||||
), maybeMacro = (token) => {
|
||||
const formatOpts = Formatter.macroTokenToFormatOpts(token);
|
||||
const formatOpts = _Formatter.macroTokenToFormatOpts(token);
|
||||
if (formatOpts) {
|
||||
return this.formatWithSystemDefault(dt2, formatOpts);
|
||||
} else {
|
||||
|
@ -812,7 +809,7 @@
|
|||
return maybeMacro(token);
|
||||
}
|
||||
};
|
||||
return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);
|
||||
return stringifyTokens(_Formatter.parseFormat(fmt), tokenToString);
|
||||
}
|
||||
formatDurationFromString(dur, fmt) {
|
||||
const tokenToField = (token) => {
|
||||
|
@ -843,7 +840,7 @@
|
|||
} else {
|
||||
return token;
|
||||
}
|
||||
}, tokens = Formatter.parseFormat(fmt), realTokens = tokens.reduce(
|
||||
}, tokens = _Formatter.parseFormat(fmt), realTokens = tokens.reduce(
|
||||
(found, { literal, val }) => literal ? found : found.concat(val),
|
||||
[]
|
||||
), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));
|
||||
|
@ -942,14 +939,14 @@
|
|||
}
|
||||
};
|
||||
var singleton$1 = null;
|
||||
var SystemZone = class extends Zone {
|
||||
var SystemZone = class _SystemZone extends Zone {
|
||||
/**
|
||||
* Get a singleton instance of the local zone
|
||||
* @return {SystemZone}
|
||||
*/
|
||||
static get instance() {
|
||||
if (singleton$1 === null) {
|
||||
singleton$1 = new SystemZone();
|
||||
singleton$1 = new _SystemZone();
|
||||
}
|
||||
return singleton$1;
|
||||
}
|
||||
|
@ -1031,14 +1028,14 @@
|
|||
return filled;
|
||||
}
|
||||
var ianaZoneCache = {};
|
||||
var IANAZone = class extends Zone {
|
||||
var IANAZone = class _IANAZone extends Zone {
|
||||
/**
|
||||
* @param {string} name - Zone name
|
||||
* @return {IANAZone}
|
||||
*/
|
||||
static create(name) {
|
||||
if (!ianaZoneCache[name]) {
|
||||
ianaZoneCache[name] = new IANAZone(name);
|
||||
ianaZoneCache[name] = new _IANAZone(name);
|
||||
}
|
||||
return ianaZoneCache[name];
|
||||
}
|
||||
|
@ -1083,7 +1080,7 @@
|
|||
constructor(name) {
|
||||
super();
|
||||
this.zoneName = name;
|
||||
this.valid = IANAZone.isValidZone(name);
|
||||
this.valid = _IANAZone.isValidZone(name);
|
||||
}
|
||||
/** @override **/
|
||||
get type() {
|
||||
|
@ -1140,14 +1137,14 @@
|
|||
}
|
||||
};
|
||||
var singleton = null;
|
||||
var FixedOffsetZone = class extends Zone {
|
||||
var FixedOffsetZone = class _FixedOffsetZone extends Zone {
|
||||
/**
|
||||
* Get a singleton instance of UTC
|
||||
* @return {FixedOffsetZone}
|
||||
*/
|
||||
static get utcInstance() {
|
||||
if (singleton === null) {
|
||||
singleton = new FixedOffsetZone(0);
|
||||
singleton = new _FixedOffsetZone(0);
|
||||
}
|
||||
return singleton;
|
||||
}
|
||||
|
@ -1157,7 +1154,7 @@
|
|||
* @return {FixedOffsetZone}
|
||||
*/
|
||||
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"
|
||||
|
@ -1171,7 +1168,7 @@
|
|||
if (s2) {
|
||||
const r = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
|
||||
if (r) {
|
||||
return new FixedOffsetZone(signedOffset(r[1], r[2]));
|
||||
return new _FixedOffsetZone(signedOffset(r[1], r[2]));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -1583,16 +1580,16 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
var Locale = class {
|
||||
var Locale = class _Locale {
|
||||
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) {
|
||||
const specifiedLocale = locale || Settings.defaultLocale;
|
||||
const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale());
|
||||
const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;
|
||||
const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;
|
||||
return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);
|
||||
return new _Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);
|
||||
}
|
||||
static resetCache() {
|
||||
sysLocaleCache = null;
|
||||
|
@ -1601,7 +1598,7 @@
|
|||
intlRelCache = {};
|
||||
}
|
||||
static fromObject({ locale, numberingSystem, outputCalendar } = {}) {
|
||||
return Locale.create(locale, numberingSystem, outputCalendar);
|
||||
return _Locale.create(locale, numberingSystem, outputCalendar);
|
||||
}
|
||||
constructor(locale, numbering, outputCalendar, specifiedLocale) {
|
||||
const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);
|
||||
|
@ -1631,7 +1628,7 @@
|
|||
if (!alts || Object.getOwnPropertyNames(alts).length === 0) {
|
||||
return this;
|
||||
} else {
|
||||
return Locale.create(
|
||||
return _Locale.create(
|
||||
alts.locale || this.specifiedLocale,
|
||||
alts.numberingSystem || this.numberingSystem,
|
||||
alts.outputCalendar || this.outputCalendar,
|
||||
|
@ -2071,7 +2068,7 @@
|
|||
}
|
||||
}, null);
|
||||
}
|
||||
var Duration = class {
|
||||
var Duration = class _Duration {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
@ -2098,7 +2095,7 @@
|
|||
* @return {Duration}
|
||||
*/
|
||||
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'.
|
||||
|
@ -2126,8 +2123,8 @@
|
|||
`Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}`
|
||||
);
|
||||
}
|
||||
return new Duration({
|
||||
values: normalizeObject(obj, Duration.normalizeUnit),
|
||||
return new _Duration({
|
||||
values: normalizeObject(obj, _Duration.normalizeUnit),
|
||||
loc: Locale.fromObject(opts),
|
||||
conversionAccuracy: opts.conversionAccuracy,
|
||||
matrix: opts.matrix
|
||||
|
@ -2145,11 +2142,11 @@
|
|||
*/
|
||||
static fromDurationLike(durationLike) {
|
||||
if (isNumber(durationLike)) {
|
||||
return Duration.fromMillis(durationLike);
|
||||
} else if (Duration.isDuration(durationLike)) {
|
||||
return _Duration.fromMillis(durationLike);
|
||||
} else if (_Duration.isDuration(durationLike)) {
|
||||
return durationLike;
|
||||
} else if (typeof durationLike === "object") {
|
||||
return Duration.fromObject(durationLike);
|
||||
return _Duration.fromObject(durationLike);
|
||||
} else {
|
||||
throw new InvalidArgumentError(
|
||||
`Unknown duration argument ${durationLike} of type ${typeof durationLike}`
|
||||
|
@ -2173,9 +2170,9 @@
|
|||
static fromISO(text, opts) {
|
||||
const [parsed] = parseISODuration(text);
|
||||
if (parsed) {
|
||||
return Duration.fromObject(parsed, opts);
|
||||
return _Duration.fromObject(parsed, opts);
|
||||
} 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) {
|
||||
const [parsed] = parseISOTimeOnly(text);
|
||||
if (parsed) {
|
||||
return Duration.fromObject(parsed, opts);
|
||||
return _Duration.fromObject(parsed, opts);
|
||||
} 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) {
|
||||
throw new InvalidDurationError(invalid);
|
||||
} else {
|
||||
return new Duration({ invalid });
|
||||
return new _Duration({ invalid });
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -2445,7 +2442,7 @@
|
|||
plus(duration) {
|
||||
if (!this.isValid)
|
||||
return this;
|
||||
const dur = Duration.fromDurationLike(duration), result = {};
|
||||
const dur = _Duration.fromDurationLike(duration), result = {};
|
||||
for (const k of orderedUnits$1) {
|
||||
if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {
|
||||
result[k] = dur.get(k) + this.get(k);
|
||||
|
@ -2461,7 +2458,7 @@
|
|||
minus(duration) {
|
||||
if (!this.isValid)
|
||||
return this;
|
||||
const dur = Duration.fromDurationLike(duration);
|
||||
const dur = _Duration.fromDurationLike(duration);
|
||||
return this.plus(dur.negate());
|
||||
}
|
||||
/**
|
||||
|
@ -2489,7 +2486,7 @@
|
|||
* @return {number}
|
||||
*/
|
||||
get(unit) {
|
||||
return this[Duration.normalizeUnit(unit)];
|
||||
return this[_Duration.normalizeUnit(unit)];
|
||||
}
|
||||
/**
|
||||
* "Set" the values of specified units. Return a newly-constructed Duration.
|
||||
|
@ -2501,7 +2498,7 @@
|
|||
set(values) {
|
||||
if (!this.isValid)
|
||||
return this;
|
||||
const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };
|
||||
const mixed = { ...this.values, ...normalizeObject(values, _Duration.normalizeUnit) };
|
||||
return clone$1(this, { values: mixed });
|
||||
}
|
||||
/**
|
||||
|
@ -2549,7 +2546,7 @@
|
|||
if (units.length === 0) {
|
||||
return this;
|
||||
}
|
||||
units = units.map((u) => Duration.normalizeUnit(u));
|
||||
units = units.map((u) => _Duration.normalizeUnit(u));
|
||||
const built = {}, accumulated = {}, vals = this.toObject();
|
||||
let lastUnit;
|
||||
for (const k of orderedUnits$1) {
|
||||
|
@ -2722,7 +2719,7 @@
|
|||
return null;
|
||||
}
|
||||
}
|
||||
var Interval = class {
|
||||
var Interval = class _Interval {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
@ -2746,7 +2743,7 @@
|
|||
if (Settings.throwOnInvalid) {
|
||||
throw new InvalidIntervalError(invalid);
|
||||
} else {
|
||||
return new Interval({ invalid });
|
||||
return new _Interval({ invalid });
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -2759,7 +2756,7 @@
|
|||
const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end);
|
||||
const validateError = validateStartEnd(builtStart, builtEnd);
|
||||
if (validateError == null) {
|
||||
return new Interval({
|
||||
return new _Interval({
|
||||
start: builtStart,
|
||||
end: builtEnd
|
||||
});
|
||||
|
@ -2775,7 +2772,7 @@
|
|||
*/
|
||||
static after(start, duration) {
|
||||
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.
|
||||
|
@ -2785,7 +2782,7 @@
|
|||
*/
|
||||
static before(end, duration) {
|
||||
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.
|
||||
|
@ -2813,21 +2810,21 @@
|
|||
endIsValid = false;
|
||||
}
|
||||
if (startIsValid && endIsValid) {
|
||||
return Interval.fromDateTimes(start, end);
|
||||
return _Interval.fromDateTimes(start, end);
|
||||
}
|
||||
if (startIsValid) {
|
||||
const dur = Duration.fromISO(e, opts);
|
||||
if (dur.isValid) {
|
||||
return Interval.after(start, dur);
|
||||
return _Interval.after(start, dur);
|
||||
}
|
||||
} else if (endIsValid) {
|
||||
const dur = Duration.fromISO(s2, opts);
|
||||
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
|
||||
|
@ -2948,7 +2945,7 @@
|
|||
set({ start, end } = {}) {
|
||||
if (!this.isValid)
|
||||
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
|
||||
|
@ -2962,7 +2959,7 @@
|
|||
let { s: s2 } = this, i = 0;
|
||||
while (s2 < this.e) {
|
||||
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;
|
||||
i += 1;
|
||||
}
|
||||
|
@ -2984,7 +2981,7 @@
|
|||
while (s2 < this.e) {
|
||||
const added = this.start.plus(dur.mapUnits((x) => x * idx));
|
||||
next = +added > +this.e ? this.e : added;
|
||||
results.push(Interval.fromDateTimes(s2, next));
|
||||
results.push(_Interval.fromDateTimes(s2, next));
|
||||
s2 = next;
|
||||
idx += 1;
|
||||
}
|
||||
|
@ -3063,7 +3060,7 @@
|
|||
if (s2 >= e) {
|
||||
return null;
|
||||
} else {
|
||||
return Interval.fromDateTimes(s2, e);
|
||||
return _Interval.fromDateTimes(s2, e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -3076,7 +3073,7 @@
|
|||
if (!this.isValid)
|
||||
return this;
|
||||
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.
|
||||
|
@ -3119,12 +3116,12 @@
|
|||
start = i.time;
|
||||
} else {
|
||||
if (start && +start !== +i.time) {
|
||||
results.push(Interval.fromDateTimes(start, i.time));
|
||||
results.push(_Interval.fromDateTimes(start, i.time));
|
||||
}
|
||||
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.
|
||||
|
@ -3132,7 +3129,7 @@
|
|||
* @return {Array}
|
||||
*/
|
||||
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.
|
||||
|
@ -3215,7 +3212,7 @@
|
|||
* @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
|
||||
*/
|
||||
mapEndpoints(mapFn) {
|
||||
return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));
|
||||
return _Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));
|
||||
}
|
||||
};
|
||||
var Info = class {
|
||||
|
@ -4206,7 +4203,7 @@
|
|||
}
|
||||
return [opts, args];
|
||||
}
|
||||
var DateTime = class {
|
||||
var DateTime = class _DateTime {
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
|
@ -4244,7 +4241,7 @@
|
|||
* @return {DateTime}
|
||||
*/
|
||||
static now() {
|
||||
return new DateTime({});
|
||||
return new _DateTime({});
|
||||
}
|
||||
/**
|
||||
* Create a local DateTime
|
||||
|
@ -4310,13 +4307,13 @@
|
|||
static fromJSDate(date, options = {}) {
|
||||
const ts = isDate(date) ? date.valueOf() : NaN;
|
||||
if (Number.isNaN(ts)) {
|
||||
return DateTime.invalid("invalid input");
|
||||
return _DateTime.invalid("invalid input");
|
||||
}
|
||||
const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);
|
||||
if (!zoneToUse.isValid) {
|
||||
return DateTime.invalid(unsupportedZone(zoneToUse));
|
||||
return _DateTime.invalid(unsupportedZone(zoneToUse));
|
||||
}
|
||||
return new DateTime({
|
||||
return new _DateTime({
|
||||
ts,
|
||||
zone: zoneToUse,
|
||||
loc: Locale.fromObject(options)
|
||||
|
@ -4338,9 +4335,9 @@
|
|||
`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`
|
||||
);
|
||||
} else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {
|
||||
return DateTime.invalid("Timestamp out of range");
|
||||
return _DateTime.invalid("Timestamp out of range");
|
||||
} else {
|
||||
return new DateTime({
|
||||
return new _DateTime({
|
||||
ts: milliseconds,
|
||||
zone: normalizeZone(options.zone, Settings.defaultZone),
|
||||
loc: Locale.fromObject(options)
|
||||
|
@ -4361,7 +4358,7 @@
|
|||
if (!isNumber(seconds)) {
|
||||
throw new InvalidArgumentError("fromSeconds requires a numerical input");
|
||||
} else {
|
||||
return new DateTime({
|
||||
return new _DateTime({
|
||||
ts: seconds * 1e3,
|
||||
zone: normalizeZone(options.zone, Settings.defaultZone),
|
||||
loc: Locale.fromObject(options)
|
||||
|
@ -4400,7 +4397,7 @@
|
|||
obj = obj || {};
|
||||
const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);
|
||||
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);
|
||||
if ((containsGregor || containsOrdinal) && definiteWeekDef) {
|
||||
|
@ -4438,16 +4435,16 @@
|
|||
}
|
||||
const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized);
|
||||
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,
|
||||
zone: zoneToUse,
|
||||
o: offsetFinal,
|
||||
loc
|
||||
});
|
||||
if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {
|
||||
return DateTime.invalid(
|
||||
return _DateTime.invalid(
|
||||
"mismatched weekday",
|
||||
`you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`
|
||||
);
|
||||
|
@ -4534,7 +4531,7 @@
|
|||
defaultToEN: true
|
||||
}), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);
|
||||
if (invalid) {
|
||||
return DateTime.invalid(invalid);
|
||||
return _DateTime.invalid(invalid);
|
||||
} else {
|
||||
return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);
|
||||
}
|
||||
|
@ -4543,7 +4540,7 @@
|
|||
* @deprecated use fromFormat instead
|
||||
*/
|
||||
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
|
||||
|
@ -4583,7 +4580,7 @@
|
|||
if (Settings.throwOnInvalid) {
|
||||
throw new InvalidDateTimeError(invalid);
|
||||
} else {
|
||||
return new DateTime({ invalid });
|
||||
return new _DateTime({ invalid });
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -4965,7 +4962,7 @@
|
|||
if (zone.equals(this.zone)) {
|
||||
return this;
|
||||
} else if (!zone.isValid) {
|
||||
return DateTime.invalid(unsupportedZone(zone));
|
||||
return _DateTime.invalid(unsupportedZone(zone));
|
||||
} else {
|
||||
let newTS = this.ts;
|
||||
if (keepLocalTime || keepCalendarTime) {
|
||||
|
@ -5439,7 +5436,7 @@
|
|||
* @return {Duration}
|
||||
*/
|
||||
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
|
||||
|
@ -5496,7 +5493,7 @@
|
|||
toRelative(options = {}) {
|
||||
if (!this.isValid)
|
||||
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 unit = options.unit;
|
||||
if (Array.isArray(options.unit)) {
|
||||
|
@ -5526,7 +5523,7 @@
|
|||
toRelativeCalendar(options = {}) {
|
||||
if (!this.isValid)
|
||||
return null;
|
||||
return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {
|
||||
return diffRelative(options.base || _DateTime.fromObject({}, { zone: this.zone }), this, {
|
||||
...options,
|
||||
numeric: "auto",
|
||||
units: ["years", "months", "days"],
|
||||
|
@ -5539,7 +5536,7 @@
|
|||
* @return {DateTime} the min DateTime, or undefined if called with no argument
|
||||
*/
|
||||
static min(...dateTimes) {
|
||||
if (!dateTimes.every(DateTime.isDateTime)) {
|
||||
if (!dateTimes.every(_DateTime.isDateTime)) {
|
||||
throw new InvalidArgumentError("min requires all arguments be DateTimes");
|
||||
}
|
||||
return bestBy(dateTimes, (i) => i.valueOf(), Math.min);
|
||||
|
@ -5550,7 +5547,7 @@
|
|||
* @return {DateTime} the max DateTime, or undefined if called with no argument
|
||||
*/
|
||||
static max(...dateTimes) {
|
||||
if (!dateTimes.every(DateTime.isDateTime)) {
|
||||
if (!dateTimes.every(_DateTime.isDateTime)) {
|
||||
throw new InvalidArgumentError("max requires all arguments be DateTimes");
|
||||
}
|
||||
return bestBy(dateTimes, (i) => i.valueOf(), Math.max);
|
||||
|
@ -5575,7 +5572,7 @@
|
|||
* @deprecated use fromFormatExplain instead
|
||||
*/
|
||||
static fromStringExplain(text, fmt, options = {}) {
|
||||
return DateTime.fromFormatExplain(text, fmt, options);
|
||||
return _DateTime.fromFormatExplain(text, fmt, options);
|
||||
}
|
||||
// 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 defined = (x) => x !== 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 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 trackIndexMap = /* @__PURE__ */ new Map([
|
||||
["Main", 0]
|
||||
|
@ -5918,7 +5915,7 @@
|
|||
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 = {};
|
||||
__export(schedule_exports, {
|
||||
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 = {};
|
||||
__export(clock_exports, {
|
||||
update_main_slide: () => update_main_slide2
|
||||
|
@ -6009,7 +6006,7 @@
|
|||
preact.render(inner, el);
|
||||
};
|
||||
|
||||
// <stdin>
|
||||
// assets/js/custom/nodes/schedule.js
|
||||
var storage = {
|
||||
scheduleData: void 0
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue