@vue-skuilder/db 0.2.29 → 0.2.31
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/{contentSource-CqJmbOZN.d.ts → contentSource-DMduBjDC.d.ts} +19 -4
- package/dist/{contentSource-B6FrSihy.d.cts → contentSource-Doh1aVBJ.d.cts} +19 -4
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +128 -82
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +80 -33
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-DUxDqMtZ.d.cts → dataLayerProvider-BW1CBAbb.d.cts} +1 -1
- package/dist/{dataLayerProvider-B9_UCvkR.d.ts → dataLayerProvider-Cxfe4nSK.d.ts} +1 -1
- package/dist/diagnostics/index.d.cts +18 -3
- package/dist/diagnostics/index.d.ts +18 -3
- package/dist/diagnostics/index.js +159 -135
- package/dist/diagnostics/index.js.map +1 -1
- package/dist/diagnostics/index.mjs +156 -135
- package/dist/diagnostics/index.mjs.map +1 -1
- package/dist/impl/couch/index.d.cts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js +132 -86
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +80 -33
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js +119 -73
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +80 -33
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +181 -116
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -39
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/navigators/PipelineDebugger.ts +42 -23
- package/src/core/navigators/filters/eloDistance.ts +79 -21
- package/src/core/navigators/generators/elo.ts +8 -2
- package/src/core/navigators/generators/prescribed.ts +7 -5
- package/src/core/types/studySession.ts +12 -1
- package/src/diagnostics/derive.ts +5 -2
- package/src/diagnostics/pipeline.ts +28 -0
- package/src/diagnostics/text.ts +11 -4
- package/src/study/SessionController.ts +3 -1
- package/src/study/services/EloService.ts +33 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as ClassroomDBInterface, A as AdminDBInterface } from '../../classroomDB-DLTtLZct.cjs';
|
|
2
|
-
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, k as CourseInfo, l as StudySessionItem, D as DataLayerResult, b as ContentNavigationStrategyData, m as ContentNavigator, n as ReplanHints, G as GeneratorResult } from '../../contentSource-
|
|
3
|
-
import { D as DataLayerProvider } from '../../dataLayerProvider-
|
|
2
|
+
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, k as CourseInfo, l as StudySessionItem, D as DataLayerResult, b as ContentNavigationStrategyData, m as ContentNavigator, n as ReplanHints, G as GeneratorResult } from '../../contentSource-Doh1aVBJ.cjs';
|
|
3
|
+
import { D as DataLayerProvider } from '../../dataLayerProvider-BW1CBAbb.cjs';
|
|
4
4
|
import { S as StaticCourseManifest } from '../../types-D0oQeJAi.cjs';
|
|
5
5
|
import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
|
|
6
6
|
import { S as SkuilderCourseData, d as QualifiedCardID, e as TagStub, T as Tag } from '../../types-legacy-BkOYOR6U.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as ClassroomDBInterface, A as AdminDBInterface } from '../../classroomDB-DLTtLZct.js';
|
|
2
|
-
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, k as CourseInfo, l as StudySessionItem, D as DataLayerResult, b as ContentNavigationStrategyData, m as ContentNavigator, n as ReplanHints, G as GeneratorResult } from '../../contentSource-
|
|
3
|
-
import { D as DataLayerProvider } from '../../dataLayerProvider-
|
|
2
|
+
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, k as CourseInfo, l as StudySessionItem, D as DataLayerResult, b as ContentNavigationStrategyData, m as ContentNavigator, n as ReplanHints, G as GeneratorResult } from '../../contentSource-DMduBjDC.js';
|
|
3
|
+
import { D as DataLayerProvider } from '../../dataLayerProvider-Cxfe4nSK.js';
|
|
4
4
|
import { S as StaticCourseManifest } from '../../types-dXWfyz9B.js';
|
|
5
5
|
import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
|
|
6
6
|
import { S as SkuilderCourseData, d as QualifiedCardID, e as TagStub, T as Tag } from '../../types-legacy-BkOYOR6U.js';
|
|
@@ -504,13 +504,12 @@ function clearRunHistory() {
|
|
|
504
504
|
_pendingRuns = [];
|
|
505
505
|
}
|
|
506
506
|
function getOrigin(card) {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
return "unknown";
|
|
507
|
+
return card.reviewID ? "review" : "new";
|
|
508
|
+
}
|
|
509
|
+
function requiredBy(card) {
|
|
510
|
+
return card.provenance.find(
|
|
511
|
+
(p) => p.strategy === "ephemeralHint" && p.score === Number.POSITIVE_INFINITY
|
|
512
|
+
)?.strategyName;
|
|
514
513
|
}
|
|
515
514
|
function captureRun(report) {
|
|
516
515
|
const fullReport = {
|
|
@@ -534,17 +533,23 @@ function parseCardElo(provenance) {
|
|
|
534
533
|
}
|
|
535
534
|
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints, scoredCards, regulators) {
|
|
536
535
|
const selectedIds = new Set(selectedCards.map((c) => c.cardId));
|
|
537
|
-
const toReport = (card) =>
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
536
|
+
const toReport = (card) => {
|
|
537
|
+
const required = requiredBy(card);
|
|
538
|
+
const first = card.provenance[0];
|
|
539
|
+
const generator = first && first.strategy !== "ephemeralHint" ? first.strategyName || first.strategy : void 0;
|
|
540
|
+
return {
|
|
541
|
+
cardId: card.cardId,
|
|
542
|
+
courseId: card.courseId,
|
|
543
|
+
origin: getOrigin(card),
|
|
544
|
+
...generator ? { generator } : {},
|
|
545
|
+
...required ? { required } : {},
|
|
546
|
+
finalScore: card.score,
|
|
547
|
+
cardElo: card.cardElo ?? parseCardElo(card.provenance),
|
|
548
|
+
provenance: card.provenance,
|
|
549
|
+
tags: card.tags,
|
|
550
|
+
selected: selectedIds.has(card.cardId)
|
|
551
|
+
};
|
|
552
|
+
};
|
|
548
553
|
const selectedReported = [];
|
|
549
554
|
const nearMissReported = [];
|
|
550
555
|
const discardedTailCards = [];
|
|
@@ -1673,10 +1678,14 @@ var init_elo = __esm({
|
|
|
1673
1678
|
const userElo = (0, import_common5.toCourseElo)(courseReg.elo);
|
|
1674
1679
|
userGlobalElo = userElo.global.score;
|
|
1675
1680
|
}
|
|
1676
|
-
const activeCards = await
|
|
1681
|
+
const [activeCards, seenCards] = await Promise.all([
|
|
1682
|
+
this.user.getActiveCards(),
|
|
1683
|
+
this.user.getSeenCards(this.course.getCourseID()).catch(() => [])
|
|
1684
|
+
]);
|
|
1685
|
+
const notNew = /* @__PURE__ */ new Set([...activeCards.map((ac) => ac.cardID), ...seenCards]);
|
|
1677
1686
|
const newCards = (await this.course.getCardsCenteredAtELO(
|
|
1678
1687
|
{ limit, elo: "user" },
|
|
1679
|
-
(c) => !
|
|
1688
|
+
(c) => !notNew.has(c.cardID)
|
|
1680
1689
|
)).map((c) => ({ ...c, status: "new" }));
|
|
1681
1690
|
const scored = newCards.map((c) => {
|
|
1682
1691
|
const cardElo = c.elo ?? 1e3;
|
|
@@ -1769,11 +1778,11 @@ function formatAge(ms) {
|
|
|
1769
1778
|
}
|
|
1770
1779
|
function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
1771
1780
|
if (minCount <= 0) return [];
|
|
1772
|
-
const exposeTags = new Set(tags.filter((tag) =>
|
|
1781
|
+
const exposeTags = new Set(tags.filter((tag) => (0, import_common6.tagRole)(tag) === "expose"));
|
|
1773
1782
|
for (const tag of tags) {
|
|
1774
|
-
if (
|
|
1775
|
-
const
|
|
1776
|
-
if (
|
|
1783
|
+
if ((0, import_common6.tagRole)(tag) !== "intro") continue;
|
|
1784
|
+
const expose = (0, import_common6.withTagRole)(tag, "expose");
|
|
1785
|
+
if (expose) exposeTags.add(expose);
|
|
1777
1786
|
}
|
|
1778
1787
|
return [...exposeTags].filter((tag) => {
|
|
1779
1788
|
const tagElo = userTagElo[tag];
|
|
@@ -1783,10 +1792,11 @@ function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
|
1783
1792
|
function pickTopByScore(cards, limit) {
|
|
1784
1793
|
return [...cards].sort((a, b) => b.score - a.score || a.cardId.localeCompare(b.cardId)).slice(0, limit);
|
|
1785
1794
|
}
|
|
1786
|
-
var DEFAULT_FRESHNESS_WINDOW, DEFAULT_MAX_DIRECT_PER_RUN, DEFAULT_MAX_SUPPORT_PER_RUN, DEFAULT_HIERARCHY_DEPTH, DEFAULT_MIN_COUNT, DEFAULT_PRACTICE_MIN_COUNT, DEFAULT_MAX_PRACTICE_PER_RUN, BASE_TARGET_SCORE, BASE_SUPPORT_SCORE, DISCOVERED_SUPPORT_SCORE, BASE_PRACTICE_SCORE, PRACTICE_BASE_MULT, MAX_PRACTICE_MULTIPLIER, PRACTICE_STALENESS_BUMP_PER_DAY, MAX_TARGET_MULTIPLIER, MAX_SUPPORT_MULTIPLIER, PRESCRIBED_DEBUG_VERSION, PrescribedCardsGenerator;
|
|
1795
|
+
var import_common6, DEFAULT_FRESHNESS_WINDOW, DEFAULT_MAX_DIRECT_PER_RUN, DEFAULT_MAX_SUPPORT_PER_RUN, DEFAULT_HIERARCHY_DEPTH, DEFAULT_MIN_COUNT, DEFAULT_PRACTICE_MIN_COUNT, DEFAULT_MAX_PRACTICE_PER_RUN, BASE_TARGET_SCORE, BASE_SUPPORT_SCORE, DISCOVERED_SUPPORT_SCORE, BASE_PRACTICE_SCORE, PRACTICE_BASE_MULT, MAX_PRACTICE_MULTIPLIER, PRACTICE_STALENESS_BUMP_PER_DAY, MAX_TARGET_MULTIPLIER, MAX_SUPPORT_MULTIPLIER, PRESCRIBED_DEBUG_VERSION, PrescribedCardsGenerator;
|
|
1787
1796
|
var init_prescribed = __esm({
|
|
1788
1797
|
"src/core/navigators/generators/prescribed.ts"() {
|
|
1789
1798
|
"use strict";
|
|
1799
|
+
import_common6 = require("@vue-skuilder/common");
|
|
1790
1800
|
init_navigators();
|
|
1791
1801
|
init_StrategyPressureDebugger();
|
|
1792
1802
|
init_logger();
|
|
@@ -2972,6 +2982,7 @@ __export(eloDistance_exports, {
|
|
|
2972
2982
|
DEFAULT_ELO_DISTANCE_CONFIG: () => DEFAULT_ELO_DISTANCE_CONFIG,
|
|
2973
2983
|
createEloDistanceFilter: () => createEloDistanceFilter,
|
|
2974
2984
|
default: () => EloDistanceFilter,
|
|
2985
|
+
mountMultiDimEloToggle: () => mountMultiDimEloToggle,
|
|
2975
2986
|
tagAwareGap: () => tagAwareGap
|
|
2976
2987
|
});
|
|
2977
2988
|
function computeMultiplier(distance, halfLife, minMultiplier, maxMultiplier) {
|
|
@@ -2982,12 +2993,43 @@ function computeMultiplier(distance, halfLife, minMultiplier, maxMultiplier) {
|
|
|
2982
2993
|
function resolveConfig(config) {
|
|
2983
2994
|
return { ...DEFAULT_ELO_DISTANCE_CONFIG, ...config };
|
|
2984
2995
|
}
|
|
2996
|
+
function readMultiDimElo() {
|
|
2997
|
+
try {
|
|
2998
|
+
return typeof localStorage !== "undefined" && localStorage.getItem(MULTI_DIM_ELO_KEY) === "true";
|
|
2999
|
+
} catch {
|
|
3000
|
+
return false;
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
function mountMultiDimEloToggle() {
|
|
3004
|
+
if (typeof window === "undefined") return;
|
|
3005
|
+
const win = window;
|
|
3006
|
+
win.skuilder = win.skuilder || {};
|
|
3007
|
+
Object.defineProperty(win.skuilder, "multiDimElo", {
|
|
3008
|
+
configurable: true,
|
|
3009
|
+
enumerable: true,
|
|
3010
|
+
get: () => multiDimElo,
|
|
3011
|
+
set: (on) => {
|
|
3012
|
+
multiDimElo = on === true;
|
|
3013
|
+
try {
|
|
3014
|
+
if (multiDimElo) localStorage.setItem(MULTI_DIM_ELO_KEY, "true");
|
|
3015
|
+
else localStorage.removeItem(MULTI_DIM_ELO_KEY);
|
|
3016
|
+
} catch (e) {
|
|
3017
|
+
logger.warn(`[EloDistance] multiDimElo not persisted (localStorage unavailable): ${e}`);
|
|
3018
|
+
}
|
|
3019
|
+
logger.info(
|
|
3020
|
+
`[EloDistance] multiDimElo ${multiDimElo ? "on: tag-aware" : "off: per strategy config"} ELO distance from the next replan`
|
|
3021
|
+
);
|
|
3022
|
+
}
|
|
3023
|
+
});
|
|
3024
|
+
}
|
|
2985
3025
|
function tagAwareGap(cardTags, cardElo, userElo, minTagCount) {
|
|
2986
3026
|
const globalGap = cardElo.global.score - userElo.global.score;
|
|
2987
3027
|
const tags = [];
|
|
2988
3028
|
for (const tag of cardTags) {
|
|
2989
3029
|
const user = userElo.tags[tag];
|
|
2990
|
-
if (!user || user.score ===
|
|
3030
|
+
if ((0, import_common7.isCountOnlyTag)(tag) || !user || user.score === import_common7.COUNT_ONLY_SCORE || user.count < minTagCount) {
|
|
3031
|
+
continue;
|
|
3032
|
+
}
|
|
2991
3033
|
const card = cardElo.tags[tag]?.score ?? cardElo.global.score;
|
|
2992
3034
|
tags.push({
|
|
2993
3035
|
tag,
|
|
@@ -3009,7 +3051,7 @@ function tagReason(tags, globalGap) {
|
|
|
3009
3051
|
async function applyEloDistance(cards, context, config, source) {
|
|
3010
3052
|
const { course, userElo, userCourseElo } = context;
|
|
3011
3053
|
const { halfLife, minMultiplier, maxMultiplier } = config;
|
|
3012
|
-
const tagAware = config.tagAware && userCourseElo !== void 0;
|
|
3054
|
+
const tagAware = (config.tagAware || multiDimElo) && userCourseElo !== void 0;
|
|
3013
3055
|
const missing = cards.filter((c) => tagAware || c.cardElo === void 0).map((c) => c.cardId);
|
|
3014
3056
|
const fetched = /* @__PURE__ */ new Map();
|
|
3015
3057
|
if (missing.length > 0) {
|
|
@@ -3023,10 +3065,10 @@ async function applyEloDistance(cards, context, config, source) {
|
|
|
3023
3065
|
const cardElo = full?.global?.score ?? card.cardElo ?? DEFAULT_CARD_ELO;
|
|
3024
3066
|
let distance = Math.abs(cardElo - userElo);
|
|
3025
3067
|
let how = "";
|
|
3026
|
-
if (tagAware
|
|
3027
|
-
const t = tagAwareGap(card.tags ?? [], full, userCourseElo, config.minTagCount);
|
|
3028
|
-
distance = Math.abs(t.gap);
|
|
3029
|
-
|
|
3068
|
+
if (tagAware) {
|
|
3069
|
+
const t = full ? tagAwareGap(card.tags ?? [], full, userCourseElo, config.minTagCount) : void 0;
|
|
3070
|
+
if (t) distance = Math.abs(t.gap);
|
|
3071
|
+
how = t?.tags.length ? `, tag-aware${tagReason(t.tags, t.globalGap)}` : ", tag-aware: global (no shared tags)";
|
|
3030
3072
|
}
|
|
3031
3073
|
const multiplier = computeMultiplier(distance, halfLife, minMultiplier, maxMultiplier);
|
|
3032
3074
|
const newScore = card.score * multiplier;
|
|
@@ -3059,21 +3101,25 @@ function createEloDistanceFilter(config) {
|
|
|
3059
3101
|
transform: (cards, context) => applyEloDistance(cards, context, resolved, source)
|
|
3060
3102
|
};
|
|
3061
3103
|
}
|
|
3062
|
-
var DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF,
|
|
3104
|
+
var import_common7, DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF, DEFAULT_CARD_ELO, MULTI_DIM_ELO_KEY, multiDimElo, EloDistanceFilter;
|
|
3063
3105
|
var init_eloDistance = __esm({
|
|
3064
3106
|
"src/core/navigators/filters/eloDistance.ts"() {
|
|
3065
3107
|
"use strict";
|
|
3066
3108
|
init_navigators();
|
|
3109
|
+
import_common7 = require("@vue-skuilder/common");
|
|
3110
|
+
init_logger();
|
|
3067
3111
|
DEFAULT_ELO_DISTANCE_CONFIG = {
|
|
3068
3112
|
halfLife: 300,
|
|
3069
3113
|
minMultiplier: 0.05,
|
|
3070
3114
|
maxMultiplier: 1,
|
|
3071
|
-
tagAware:
|
|
3115
|
+
tagAware: false,
|
|
3072
3116
|
minTagCount: 3
|
|
3073
3117
|
};
|
|
3074
3118
|
TAG_CONFIDENCE_HALF = 10;
|
|
3075
|
-
COUNT_ONLY_SENTINEL = -1;
|
|
3076
3119
|
DEFAULT_CARD_ELO = 1e3;
|
|
3120
|
+
MULTI_DIM_ELO_KEY = "skuilder:multiDimElo";
|
|
3121
|
+
multiDimElo = readMultiDimElo();
|
|
3122
|
+
mountMultiDimEloToggle();
|
|
3077
3123
|
EloDistanceFilter = class _EloDistanceFilter extends ContentNavigator {
|
|
3078
3124
|
name;
|
|
3079
3125
|
/** See CardFilter.kind. Static, so the pipeline plan can read it without an instance. */
|
|
@@ -3112,12 +3158,12 @@ var hierarchyDefinition_exports = {};
|
|
|
3112
3158
|
__export(hierarchyDefinition_exports, {
|
|
3113
3159
|
default: () => HierarchyDefinitionNavigator
|
|
3114
3160
|
});
|
|
3115
|
-
var
|
|
3161
|
+
var import_common8, DEFAULT_MIN_COUNT2, HierarchyDefinitionNavigator;
|
|
3116
3162
|
var init_hierarchyDefinition = __esm({
|
|
3117
3163
|
"src/core/navigators/filters/hierarchyDefinition.ts"() {
|
|
3118
3164
|
"use strict";
|
|
3119
3165
|
init_navigators();
|
|
3120
|
-
|
|
3166
|
+
import_common8 = require("@vue-skuilder/common");
|
|
3121
3167
|
init_logger();
|
|
3122
3168
|
DEFAULT_MIN_COUNT2 = 3;
|
|
3123
3169
|
HierarchyDefinitionNavigator = class _HierarchyDefinitionNavigator extends ContentNavigator {
|
|
@@ -3167,7 +3213,7 @@ var init_hierarchyDefinition = __esm({
|
|
|
3167
3213
|
const mastered = /* @__PURE__ */ new Set();
|
|
3168
3214
|
try {
|
|
3169
3215
|
const courseReg = await context.user.getCourseRegDoc(context.course.getCourseID());
|
|
3170
|
-
const userElo = (0,
|
|
3216
|
+
const userElo = (0, import_common8.toCourseElo)(courseReg.elo);
|
|
3171
3217
|
for (const prereqs of Object.values(this.config.prerequisites)) {
|
|
3172
3218
|
for (const prereq of prereqs) {
|
|
3173
3219
|
const tagElo = userElo.tags[prereq.tag];
|
|
@@ -3539,12 +3585,12 @@ var interferenceMitigator_exports = {};
|
|
|
3539
3585
|
__export(interferenceMitigator_exports, {
|
|
3540
3586
|
default: () => InterferenceMitigatorNavigator
|
|
3541
3587
|
});
|
|
3542
|
-
var
|
|
3588
|
+
var import_common9, DEFAULT_MIN_COUNT3, DEFAULT_MIN_ELAPSED_DAYS, DEFAULT_INTERFERENCE_DECAY, InterferenceMitigatorNavigator;
|
|
3543
3589
|
var init_interferenceMitigator = __esm({
|
|
3544
3590
|
"src/core/navigators/filters/interferenceMitigator.ts"() {
|
|
3545
3591
|
"use strict";
|
|
3546
3592
|
init_navigators();
|
|
3547
|
-
|
|
3593
|
+
import_common9 = require("@vue-skuilder/common");
|
|
3548
3594
|
DEFAULT_MIN_COUNT3 = 10;
|
|
3549
3595
|
DEFAULT_MIN_ELAPSED_DAYS = 3;
|
|
3550
3596
|
DEFAULT_INTERFERENCE_DECAY = 0.8;
|
|
@@ -3629,7 +3675,7 @@ var init_interferenceMitigator = __esm({
|
|
|
3629
3675
|
const immature = /* @__PURE__ */ new Set();
|
|
3630
3676
|
try {
|
|
3631
3677
|
const courseReg = await context.user.getCourseRegDoc(context.course.getCourseID());
|
|
3632
|
-
const userElo = (0,
|
|
3678
|
+
const userElo = (0, import_common9.toCourseElo)(courseReg.elo);
|
|
3633
3679
|
const minCount = this.config.maturityThreshold?.minCount ?? DEFAULT_MIN_COUNT3;
|
|
3634
3680
|
const minElo = this.config.maturityThreshold?.minElo;
|
|
3635
3681
|
const minElapsedDays = this.config.maturityThreshold?.minElapsedDays ?? DEFAULT_MIN_ELAPSED_DAYS;
|
|
@@ -4174,11 +4220,11 @@ function logCardProvenance(cards, maxCards = 3) {
|
|
|
4174
4220
|
}
|
|
4175
4221
|
}
|
|
4176
4222
|
}
|
|
4177
|
-
var
|
|
4223
|
+
var import_common10, VERBOSE_RESULTS, Pipeline;
|
|
4178
4224
|
var init_Pipeline = __esm({
|
|
4179
4225
|
"src/core/navigators/Pipeline.ts"() {
|
|
4180
4226
|
"use strict";
|
|
4181
|
-
|
|
4227
|
+
import_common10 = require("@vue-skuilder/common");
|
|
4182
4228
|
init_navigators();
|
|
4183
4229
|
init_logger();
|
|
4184
4230
|
init_orchestration();
|
|
@@ -4667,7 +4713,7 @@ var init_Pipeline = __esm({
|
|
|
4667
4713
|
let userCourseElo;
|
|
4668
4714
|
try {
|
|
4669
4715
|
const courseReg = await this.user.getCourseRegDoc(this.course.getCourseID());
|
|
4670
|
-
userCourseElo = (0,
|
|
4716
|
+
userCourseElo = (0, import_common10.toCourseElo)(courseReg.elo);
|
|
4671
4717
|
userElo = userCourseElo.global.score;
|
|
4672
4718
|
} catch (e) {
|
|
4673
4719
|
logger.debug(`[Pipeline] Could not get user ELO, using default: ${e}`);
|
|
@@ -4729,7 +4775,7 @@ var init_Pipeline = __esm({
|
|
|
4729
4775
|
*/
|
|
4730
4776
|
async getTagEloStatus(tagFilter) {
|
|
4731
4777
|
const courseReg = await this.user.getCourseRegDoc(this.course.getCourseID());
|
|
4732
|
-
const courseElo = (0,
|
|
4778
|
+
const courseElo = (0, import_common10.toCourseElo)(courseReg.elo);
|
|
4733
4779
|
const result = {};
|
|
4734
4780
|
if (!tagFilter) {
|
|
4735
4781
|
for (const [tag, data] of Object.entries(courseElo.tags)) {
|
|
@@ -5555,11 +5601,11 @@ var init_navigators = __esm({
|
|
|
5555
5601
|
});
|
|
5556
5602
|
|
|
5557
5603
|
// src/impl/couch/courseDB.ts
|
|
5558
|
-
var
|
|
5604
|
+
var import_common11;
|
|
5559
5605
|
var init_courseDB = __esm({
|
|
5560
5606
|
"src/impl/couch/courseDB.ts"() {
|
|
5561
5607
|
"use strict";
|
|
5562
|
-
|
|
5608
|
+
import_common11 = require("@vue-skuilder/common");
|
|
5563
5609
|
init_couch();
|
|
5564
5610
|
init_updateQueue();
|
|
5565
5611
|
init_types_legacy();
|
|
@@ -5622,14 +5668,14 @@ var init_auth = __esm({
|
|
|
5622
5668
|
});
|
|
5623
5669
|
|
|
5624
5670
|
// src/impl/couch/CouchDBSyncStrategy.ts
|
|
5625
|
-
var
|
|
5671
|
+
var import_common12;
|
|
5626
5672
|
var init_CouchDBSyncStrategy = __esm({
|
|
5627
5673
|
"src/impl/couch/CouchDBSyncStrategy.ts"() {
|
|
5628
5674
|
"use strict";
|
|
5629
5675
|
init_factory();
|
|
5630
5676
|
init_types_legacy();
|
|
5631
5677
|
init_logger();
|
|
5632
|
-
|
|
5678
|
+
import_common12 = require("@vue-skuilder/common");
|
|
5633
5679
|
init_common();
|
|
5634
5680
|
init_pouchdb_setup();
|
|
5635
5681
|
init_couch();
|
|
@@ -5703,13 +5749,13 @@ function getStreak(records) {
|
|
|
5703
5749
|
function getLapses(records) {
|
|
5704
5750
|
return records.filter((r) => r.isCorrect === false).length;
|
|
5705
5751
|
}
|
|
5706
|
-
var import_moment4,
|
|
5752
|
+
var import_moment4, import_common14, duration;
|
|
5707
5753
|
var init_SpacedRepetition = __esm({
|
|
5708
5754
|
"src/study/SpacedRepetition.ts"() {
|
|
5709
5755
|
"use strict";
|
|
5710
5756
|
init_util();
|
|
5711
5757
|
import_moment4 = __toESM(require("moment"), 1);
|
|
5712
|
-
|
|
5758
|
+
import_common14 = require("@vue-skuilder/common");
|
|
5713
5759
|
init_logger();
|
|
5714
5760
|
duration = import_moment4.default.duration;
|
|
5715
5761
|
}
|
|
@@ -5728,42 +5774,42 @@ var init_SrsService = __esm({
|
|
|
5728
5774
|
});
|
|
5729
5775
|
|
|
5730
5776
|
// src/study/services/tagRecent.ts
|
|
5731
|
-
var
|
|
5777
|
+
var import_common15;
|
|
5732
5778
|
var init_tagRecent = __esm({
|
|
5733
5779
|
"src/study/services/tagRecent.ts"() {
|
|
5734
5780
|
"use strict";
|
|
5735
|
-
|
|
5781
|
+
import_common15 = require("@vue-skuilder/common");
|
|
5736
5782
|
}
|
|
5737
5783
|
});
|
|
5738
5784
|
|
|
5739
5785
|
// src/study/services/EloService.ts
|
|
5740
|
-
var
|
|
5786
|
+
var import_common16;
|
|
5741
5787
|
var init_EloService = __esm({
|
|
5742
5788
|
"src/study/services/EloService.ts"() {
|
|
5743
5789
|
"use strict";
|
|
5744
|
-
|
|
5790
|
+
import_common16 = require("@vue-skuilder/common");
|
|
5745
5791
|
init_logger();
|
|
5746
5792
|
init_tagRecent();
|
|
5747
5793
|
}
|
|
5748
5794
|
});
|
|
5749
5795
|
|
|
5750
5796
|
// src/study/services/ResponseProcessor.ts
|
|
5751
|
-
var
|
|
5797
|
+
var import_common17;
|
|
5752
5798
|
var init_ResponseProcessor = __esm({
|
|
5753
5799
|
"src/study/services/ResponseProcessor.ts"() {
|
|
5754
5800
|
"use strict";
|
|
5755
5801
|
init_core();
|
|
5756
5802
|
init_logger();
|
|
5757
|
-
|
|
5803
|
+
import_common17 = require("@vue-skuilder/common");
|
|
5758
5804
|
}
|
|
5759
5805
|
});
|
|
5760
5806
|
|
|
5761
5807
|
// src/study/services/CardHydrationService.ts
|
|
5762
|
-
var
|
|
5808
|
+
var import_common18;
|
|
5763
5809
|
var init_CardHydrationService = __esm({
|
|
5764
5810
|
"src/study/services/CardHydrationService.ts"() {
|
|
5765
5811
|
"use strict";
|
|
5766
|
-
|
|
5812
|
+
import_common18 = require("@vue-skuilder/common");
|
|
5767
5813
|
init_logger();
|
|
5768
5814
|
}
|
|
5769
5815
|
});
|
|
@@ -7696,11 +7742,11 @@ var init_SessionController = __esm({
|
|
|
7696
7742
|
});
|
|
7697
7743
|
|
|
7698
7744
|
// src/study/TagFilteredContentSource.ts
|
|
7699
|
-
var
|
|
7745
|
+
var import_common19;
|
|
7700
7746
|
var init_TagFilteredContentSource = __esm({
|
|
7701
7747
|
"src/study/TagFilteredContentSource.ts"() {
|
|
7702
7748
|
"use strict";
|
|
7703
|
-
|
|
7749
|
+
import_common19 = require("@vue-skuilder/common");
|
|
7704
7750
|
init_courseDB();
|
|
7705
7751
|
init_logger();
|
|
7706
7752
|
}
|
|
@@ -8039,13 +8085,13 @@ async function dropUserFromClassroom(user, classID) {
|
|
|
8039
8085
|
async function getUserClassrooms(user) {
|
|
8040
8086
|
return getOrCreateClassroomRegistrationsDoc(user);
|
|
8041
8087
|
}
|
|
8042
|
-
var
|
|
8088
|
+
var import_common20, import_moment8, log3, HYDRATION_TIMEOUT_MS, BaseUser, userCoursesDoc, userClassroomsDoc;
|
|
8043
8089
|
var init_BaseUserDB = __esm({
|
|
8044
8090
|
"src/impl/common/BaseUserDB.ts"() {
|
|
8045
8091
|
"use strict";
|
|
8046
8092
|
init_core();
|
|
8047
8093
|
init_util();
|
|
8048
|
-
|
|
8094
|
+
import_common20 = require("@vue-skuilder/common");
|
|
8049
8095
|
import_moment8 = __toESM(require("moment"), 1);
|
|
8050
8096
|
init_types_legacy();
|
|
8051
8097
|
init_logger();
|
|
@@ -8148,7 +8194,7 @@ Currently logged-in as ${this._username}.`
|
|
|
8148
8194
|
);
|
|
8149
8195
|
}
|
|
8150
8196
|
const result = await this.syncStrategy.createAccount(username, password);
|
|
8151
|
-
if (result.status ===
|
|
8197
|
+
if (result.status === import_common20.Status.ok) {
|
|
8152
8198
|
log3(`Account created successfully, updating username to ${username}`);
|
|
8153
8199
|
this._username = username;
|
|
8154
8200
|
try {
|
|
@@ -8224,7 +8270,7 @@ Currently logged-in as ${this._username}.`
|
|
|
8224
8270
|
async resetUserData() {
|
|
8225
8271
|
if (this.syncStrategy.canAuthenticate()) {
|
|
8226
8272
|
return {
|
|
8227
|
-
status:
|
|
8273
|
+
status: import_common20.Status.error,
|
|
8228
8274
|
error: "Reset user data is only available for local-only mode. Use logout instead for remote sync."
|
|
8229
8275
|
};
|
|
8230
8276
|
}
|
|
@@ -8246,11 +8292,11 @@ Currently logged-in as ${this._username}.`
|
|
|
8246
8292
|
await localDB.bulkDocs(docsToDelete);
|
|
8247
8293
|
}
|
|
8248
8294
|
await this.init();
|
|
8249
|
-
return { status:
|
|
8295
|
+
return { status: import_common20.Status.ok };
|
|
8250
8296
|
} catch (error) {
|
|
8251
8297
|
logger.error("Failed to reset user data:", error);
|
|
8252
8298
|
return {
|
|
8253
|
-
status:
|
|
8299
|
+
status: import_common20.Status.error,
|
|
8254
8300
|
error: error instanceof Error ? error.message : "Unknown error during reset"
|
|
8255
8301
|
};
|
|
8256
8302
|
}
|
|
@@ -9180,13 +9226,13 @@ var init_factory = __esm({
|
|
|
9180
9226
|
});
|
|
9181
9227
|
|
|
9182
9228
|
// src/core/interfaces/contentSource.ts
|
|
9183
|
-
var
|
|
9229
|
+
var import_common22;
|
|
9184
9230
|
var init_contentSource = __esm({
|
|
9185
9231
|
"src/core/interfaces/contentSource.ts"() {
|
|
9186
9232
|
"use strict";
|
|
9187
9233
|
init_factory();
|
|
9188
9234
|
init_classroomDB2();
|
|
9189
|
-
|
|
9235
|
+
import_common22 = require("@vue-skuilder/common");
|
|
9190
9236
|
init_TagFilteredContentSource();
|
|
9191
9237
|
}
|
|
9192
9238
|
});
|
|
@@ -9259,11 +9305,11 @@ var init_hydration = __esm({
|
|
|
9259
9305
|
});
|
|
9260
9306
|
|
|
9261
9307
|
// src/core/bulkImport/cardProcessor.ts
|
|
9262
|
-
var
|
|
9308
|
+
var import_common23;
|
|
9263
9309
|
var init_cardProcessor = __esm({
|
|
9264
9310
|
"src/core/bulkImport/cardProcessor.ts"() {
|
|
9265
9311
|
"use strict";
|
|
9266
|
-
|
|
9312
|
+
import_common23 = require("@vue-skuilder/common");
|
|
9267
9313
|
init_logger();
|
|
9268
9314
|
}
|
|
9269
9315
|
});
|
|
@@ -10055,11 +10101,11 @@ var init_StaticDataUnpacker = __esm({
|
|
|
10055
10101
|
});
|
|
10056
10102
|
|
|
10057
10103
|
// src/impl/static/courseDB.ts
|
|
10058
|
-
var
|
|
10104
|
+
var import_common24, StaticCourseDB;
|
|
10059
10105
|
var init_courseDB3 = __esm({
|
|
10060
10106
|
"src/impl/static/courseDB.ts"() {
|
|
10061
10107
|
"use strict";
|
|
10062
|
-
|
|
10108
|
+
import_common24 = require("@vue-skuilder/common");
|
|
10063
10109
|
init_types_legacy();
|
|
10064
10110
|
init_logger();
|
|
10065
10111
|
init_defaults();
|
|
@@ -10320,7 +10366,7 @@ var init_courseDB3 = __esm({
|
|
|
10320
10366
|
}
|
|
10321
10367
|
async addNote(_codeCourse, _shape, _data, _author, _tags, _uploads, _elo) {
|
|
10322
10368
|
return {
|
|
10323
|
-
status:
|
|
10369
|
+
status: import_common24.Status.error,
|
|
10324
10370
|
message: "Cannot add notes in static mode"
|
|
10325
10371
|
};
|
|
10326
10372
|
}
|