@vue-skuilder/db 0.2.30 → 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 +88 -76
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +40 -27
- 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 +92 -80
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +40 -27
- 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 +79 -67
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +40 -27
- 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 +141 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -33
- 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 +7 -8
- 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
|
@@ -582,8 +582,12 @@ interface FilterImpact {
|
|
|
582
582
|
interface RunReportCard {
|
|
583
583
|
cardId: string;
|
|
584
584
|
courseId: string;
|
|
585
|
-
|
|
585
|
+
/** `'review'`: a scheduled review. `'new'`: anything else. */
|
|
586
|
+
origin: 'new' | 'review';
|
|
587
|
+
/** The strategy that produced the card (first provenance entry). Absent if a hint injected it. */
|
|
586
588
|
generator?: string;
|
|
589
|
+
/** The hint that made the card mandatory, if one did. Its source, over `generator`. */
|
|
590
|
+
required?: string;
|
|
587
591
|
finalScore: number;
|
|
588
592
|
/** Card's ELO (parsed from ELO generator provenance, if available) */
|
|
589
593
|
cardElo?: number;
|
|
@@ -629,7 +633,7 @@ interface PipelineRunReport {
|
|
|
629
633
|
/**
|
|
630
634
|
* The two unselected non-review cards most worth explaining when a run
|
|
631
635
|
* picks no new content. Non-review means no `reviewID`, so prescribed and
|
|
632
|
-
* required cards count
|
|
636
|
+
* required cards count.
|
|
633
637
|
*
|
|
634
638
|
* - `nextInLine`: highest final score. How close new content came.
|
|
635
639
|
* - `topGenerated`: highest generator score, zero-scored cards included.
|
|
@@ -889,9 +893,20 @@ interface StudySessionRunSummary {
|
|
|
889
893
|
/** A card as persisted on a run. `origin` is as counted in `newSelected`/`reviewsSelected`. */
|
|
890
894
|
interface StudySessionRunCard {
|
|
891
895
|
cardId: string;
|
|
896
|
+
/**
|
|
897
|
+
* `'review'`: a scheduled review. `'new'`: anything else. `'unknown'` only on
|
|
898
|
+
* older runs, which counted prescribed and hint-required cards as neither.
|
|
899
|
+
*/
|
|
892
900
|
origin: 'new' | 'review' | 'unknown';
|
|
901
|
+
/**
|
|
902
|
+
* The strategy that produced the card. Absent if a hint injected it (older
|
|
903
|
+
* runs name the hint here instead).
|
|
904
|
+
*/
|
|
893
905
|
generator?: string;
|
|
894
|
-
|
|
906
|
+
/** The hint that made the card mandatory, if one did. Its source, over `generator`. */
|
|
907
|
+
required?: string;
|
|
908
|
+
/** Final score; null for a mandatory (required) card, whose score is infinite. */
|
|
909
|
+
score: number | null;
|
|
895
910
|
selected: boolean;
|
|
896
911
|
}
|
|
897
912
|
/**
|
|
@@ -1967,4 +1982,4 @@ interface StudyContentSource {
|
|
|
1967
1982
|
}
|
|
1968
1983
|
declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
|
|
1969
1984
|
|
|
1970
|
-
export { type HydrationMarker as $, type UserDBWriter as A, type UserDBAuthenticator as B, type CourseDBInterface as C, type DataLayerResult as D, type UserCourseSettings as E, type FilterKind as F, type GeneratorResult as G, type UserCourseSetting as H, type UsrCrsDataInterface as I, type ClassroomRegistrationDesignation as J, type ClassroomRegistration as K, type ClassroomRegistrationDoc as L, type SessionTrackingData as M, NavigatorRole as N, type UserConfig as O, type ActivityRecord as P, type CourseRegistration as Q, type RegulatorReading as R, type StudySessionDoc as S, type UserOutcomeRecord as T, type UserDBInterface as U, makeStudySessionId as V, type WeightedCard as W, newSessionId as X, type UserHydrationState as Y, type UserHydrationStatus as Z, HYDRATION_MARKER_ID as _, type CoursesDBInterface as a, type NavigatorConstructor as a0, registerNavigator as a1, getRegisteredNavigator as a2, hasRegisteredNavigator as a3, getRegisteredNavigatorRole as a4, getRegisteredFilterKind as a5, getRegisteredNavigatorNames as a6, initializeNavigatorRegistry as a7, type StrategyContribution as a8, getCardOrigin as a9, createOrchestrationContext as aA, DEFAULT_REGULATOR_CONFIG as aB, reviewWeight as aC, reviewMassReading as aD, type IntakeClockState as aE, INTAKE_CLOCK_KEY as aF, resetIntakeClock as aG, frozenMsAt as aH, intakeHours as aI, stepIntakeClock as aJ, intakeReading as aK, applyReading as aL, type DocumentUpdater as aM, newInterval as aN, getStreak as aO, getLapses as aP, Navigators as aa, NavigatorRoles as ab, isGenerator as ac, isFilter as ad, type CardFilter as ae, type FilterContext as af, type CardFilterFactory as ag, type CardGenerator as ah, type GeneratorContext as ai, type CardGeneratorFactory as aj, pipelineDebugAPI as ak, mountPipelineDebugger as al, getActivePipeline as am, setDebugSessionId as an, getRunsForSession as ao, drainCapturedRuns as ap, type PipelineRunReport as aq, type RunReportCard as ar, type GeneratorSummary as as, type FilterImpact as at, type PipelineForecaster as au, type LearnableWeight as av, type OrchestrationContext as aw, computeDeviation as ax, computeSpread as ay, computeEffectiveWeight as az, type ContentNavigationStrategyData as b, type ScheduledCard as c, type CourseRegistrationDoc as d, type SessionStateSnapshot as e, type StudySessionRunSummary as f, type
|
|
1985
|
+
export { type HydrationMarker as $, type UserDBWriter as A, type UserDBAuthenticator as B, type CourseDBInterface as C, type DataLayerResult as D, type UserCourseSettings as E, type FilterKind as F, type GeneratorResult as G, type UserCourseSetting as H, type UsrCrsDataInterface as I, type ClassroomRegistrationDesignation as J, type ClassroomRegistration as K, type ClassroomRegistrationDoc as L, type SessionTrackingData as M, NavigatorRole as N, type UserConfig as O, type ActivityRecord as P, type CourseRegistration as Q, type RegulatorReading as R, type StudySessionDoc as S, type UserOutcomeRecord as T, type UserDBInterface as U, makeStudySessionId as V, type WeightedCard as W, newSessionId as X, type UserHydrationState as Y, type UserHydrationStatus as Z, HYDRATION_MARKER_ID as _, type CoursesDBInterface as a, type NavigatorConstructor as a0, registerNavigator as a1, getRegisteredNavigator as a2, hasRegisteredNavigator as a3, getRegisteredNavigatorRole as a4, getRegisteredFilterKind as a5, getRegisteredNavigatorNames as a6, initializeNavigatorRegistry as a7, type StrategyContribution as a8, getCardOrigin as a9, createOrchestrationContext as aA, DEFAULT_REGULATOR_CONFIG as aB, reviewWeight as aC, reviewMassReading as aD, type IntakeClockState as aE, INTAKE_CLOCK_KEY as aF, resetIntakeClock as aG, frozenMsAt as aH, intakeHours as aI, stepIntakeClock as aJ, intakeReading as aK, applyReading as aL, type DocumentUpdater as aM, newInterval as aN, getStreak as aO, getLapses as aP, Navigators as aa, NavigatorRoles as ab, isGenerator as ac, isFilter as ad, type CardFilter as ae, type FilterContext as af, type CardFilterFactory as ag, type CardGenerator as ah, type GeneratorContext as ai, type CardGeneratorFactory as aj, pipelineDebugAPI as ak, mountPipelineDebugger as al, getActivePipeline as am, setDebugSessionId as an, getRunsForSession as ao, drainCapturedRuns as ap, type PipelineRunReport as aq, type RunReportCard as ar, type GeneratorSummary as as, type FilterImpact as at, type PipelineForecaster as au, type LearnableWeight as av, type OrchestrationContext as aw, computeDeviation as ax, computeSpread as ay, computeEffectiveWeight as az, type ContentNavigationStrategyData as b, type ScheduledCard as c, type CourseRegistrationDoc as d, type SessionStateSnapshot as e, type StudySessionRunSummary as f, type StudySessionRunCard as g, type RegulatorName as h, type SessionEloEvent as i, type StudySessionRunCardTrail as j, type CourseInfo as k, type StudySessionItem as l, ContentNavigator as m, type ReplanHints as n, type StudyContentSource as o, type StudySessionFailedItem as p, type StudySessionFailedNewItem as q, type StudySessionFailedReviewItem as r, type StudySessionNewItem as s, type StudySessionReviewItem as t, isReview as u, type ContentSourceID as v, getStudySource as w, type SessionStateSnapshotProvider as x, type RegulatorConfig as y, type UserDBReader as z };
|
|
@@ -582,8 +582,12 @@ interface FilterImpact {
|
|
|
582
582
|
interface RunReportCard {
|
|
583
583
|
cardId: string;
|
|
584
584
|
courseId: string;
|
|
585
|
-
|
|
585
|
+
/** `'review'`: a scheduled review. `'new'`: anything else. */
|
|
586
|
+
origin: 'new' | 'review';
|
|
587
|
+
/** The strategy that produced the card (first provenance entry). Absent if a hint injected it. */
|
|
586
588
|
generator?: string;
|
|
589
|
+
/** The hint that made the card mandatory, if one did. Its source, over `generator`. */
|
|
590
|
+
required?: string;
|
|
587
591
|
finalScore: number;
|
|
588
592
|
/** Card's ELO (parsed from ELO generator provenance, if available) */
|
|
589
593
|
cardElo?: number;
|
|
@@ -629,7 +633,7 @@ interface PipelineRunReport {
|
|
|
629
633
|
/**
|
|
630
634
|
* The two unselected non-review cards most worth explaining when a run
|
|
631
635
|
* picks no new content. Non-review means no `reviewID`, so prescribed and
|
|
632
|
-
* required cards count
|
|
636
|
+
* required cards count.
|
|
633
637
|
*
|
|
634
638
|
* - `nextInLine`: highest final score. How close new content came.
|
|
635
639
|
* - `topGenerated`: highest generator score, zero-scored cards included.
|
|
@@ -889,9 +893,20 @@ interface StudySessionRunSummary {
|
|
|
889
893
|
/** A card as persisted on a run. `origin` is as counted in `newSelected`/`reviewsSelected`. */
|
|
890
894
|
interface StudySessionRunCard {
|
|
891
895
|
cardId: string;
|
|
896
|
+
/**
|
|
897
|
+
* `'review'`: a scheduled review. `'new'`: anything else. `'unknown'` only on
|
|
898
|
+
* older runs, which counted prescribed and hint-required cards as neither.
|
|
899
|
+
*/
|
|
892
900
|
origin: 'new' | 'review' | 'unknown';
|
|
901
|
+
/**
|
|
902
|
+
* The strategy that produced the card. Absent if a hint injected it (older
|
|
903
|
+
* runs name the hint here instead).
|
|
904
|
+
*/
|
|
893
905
|
generator?: string;
|
|
894
|
-
|
|
906
|
+
/** The hint that made the card mandatory, if one did. Its source, over `generator`. */
|
|
907
|
+
required?: string;
|
|
908
|
+
/** Final score; null for a mandatory (required) card, whose score is infinite. */
|
|
909
|
+
score: number | null;
|
|
895
910
|
selected: boolean;
|
|
896
911
|
}
|
|
897
912
|
/**
|
|
@@ -1967,4 +1982,4 @@ interface StudyContentSource {
|
|
|
1967
1982
|
}
|
|
1968
1983
|
declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
|
|
1969
1984
|
|
|
1970
|
-
export { type HydrationMarker as $, type UserDBWriter as A, type UserDBAuthenticator as B, type CourseDBInterface as C, type DataLayerResult as D, type UserCourseSettings as E, type FilterKind as F, type GeneratorResult as G, type UserCourseSetting as H, type UsrCrsDataInterface as I, type ClassroomRegistrationDesignation as J, type ClassroomRegistration as K, type ClassroomRegistrationDoc as L, type SessionTrackingData as M, NavigatorRole as N, type UserConfig as O, type ActivityRecord as P, type CourseRegistration as Q, type RegulatorReading as R, type StudySessionDoc as S, type UserOutcomeRecord as T, type UserDBInterface as U, makeStudySessionId as V, type WeightedCard as W, newSessionId as X, type UserHydrationState as Y, type UserHydrationStatus as Z, HYDRATION_MARKER_ID as _, type CoursesDBInterface as a, type NavigatorConstructor as a0, registerNavigator as a1, getRegisteredNavigator as a2, hasRegisteredNavigator as a3, getRegisteredNavigatorRole as a4, getRegisteredFilterKind as a5, getRegisteredNavigatorNames as a6, initializeNavigatorRegistry as a7, type StrategyContribution as a8, getCardOrigin as a9, createOrchestrationContext as aA, DEFAULT_REGULATOR_CONFIG as aB, reviewWeight as aC, reviewMassReading as aD, type IntakeClockState as aE, INTAKE_CLOCK_KEY as aF, resetIntakeClock as aG, frozenMsAt as aH, intakeHours as aI, stepIntakeClock as aJ, intakeReading as aK, applyReading as aL, type DocumentUpdater as aM, newInterval as aN, getStreak as aO, getLapses as aP, Navigators as aa, NavigatorRoles as ab, isGenerator as ac, isFilter as ad, type CardFilter as ae, type FilterContext as af, type CardFilterFactory as ag, type CardGenerator as ah, type GeneratorContext as ai, type CardGeneratorFactory as aj, pipelineDebugAPI as ak, mountPipelineDebugger as al, getActivePipeline as am, setDebugSessionId as an, getRunsForSession as ao, drainCapturedRuns as ap, type PipelineRunReport as aq, type RunReportCard as ar, type GeneratorSummary as as, type FilterImpact as at, type PipelineForecaster as au, type LearnableWeight as av, type OrchestrationContext as aw, computeDeviation as ax, computeSpread as ay, computeEffectiveWeight as az, type ContentNavigationStrategyData as b, type ScheduledCard as c, type CourseRegistrationDoc as d, type SessionStateSnapshot as e, type StudySessionRunSummary as f, type
|
|
1985
|
+
export { type HydrationMarker as $, type UserDBWriter as A, type UserDBAuthenticator as B, type CourseDBInterface as C, type DataLayerResult as D, type UserCourseSettings as E, type FilterKind as F, type GeneratorResult as G, type UserCourseSetting as H, type UsrCrsDataInterface as I, type ClassroomRegistrationDesignation as J, type ClassroomRegistration as K, type ClassroomRegistrationDoc as L, type SessionTrackingData as M, NavigatorRole as N, type UserConfig as O, type ActivityRecord as P, type CourseRegistration as Q, type RegulatorReading as R, type StudySessionDoc as S, type UserOutcomeRecord as T, type UserDBInterface as U, makeStudySessionId as V, type WeightedCard as W, newSessionId as X, type UserHydrationState as Y, type UserHydrationStatus as Z, HYDRATION_MARKER_ID as _, type CoursesDBInterface as a, type NavigatorConstructor as a0, registerNavigator as a1, getRegisteredNavigator as a2, hasRegisteredNavigator as a3, getRegisteredNavigatorRole as a4, getRegisteredFilterKind as a5, getRegisteredNavigatorNames as a6, initializeNavigatorRegistry as a7, type StrategyContribution as a8, getCardOrigin as a9, createOrchestrationContext as aA, DEFAULT_REGULATOR_CONFIG as aB, reviewWeight as aC, reviewMassReading as aD, type IntakeClockState as aE, INTAKE_CLOCK_KEY as aF, resetIntakeClock as aG, frozenMsAt as aH, intakeHours as aI, stepIntakeClock as aJ, intakeReading as aK, applyReading as aL, type DocumentUpdater as aM, newInterval as aN, getStreak as aO, getLapses as aP, Navigators as aa, NavigatorRoles as ab, isGenerator as ac, isFilter as ad, type CardFilter as ae, type FilterContext as af, type CardFilterFactory as ag, type CardGenerator as ah, type GeneratorContext as ai, type CardGeneratorFactory as aj, pipelineDebugAPI as ak, mountPipelineDebugger as al, getActivePipeline as am, setDebugSessionId as an, getRunsForSession as ao, drainCapturedRuns as ap, type PipelineRunReport as aq, type RunReportCard as ar, type GeneratorSummary as as, type FilterImpact as at, type PipelineForecaster as au, type LearnableWeight as av, type OrchestrationContext as aw, computeDeviation as ax, computeSpread as ay, computeEffectiveWeight as az, type ContentNavigationStrategyData as b, type ScheduledCard as c, type CourseRegistrationDoc as d, type SessionStateSnapshot as e, type StudySessionRunSummary as f, type StudySessionRunCard as g, type RegulatorName as h, type SessionEloEvent as i, type StudySessionRunCardTrail as j, type CourseInfo as k, type StudySessionItem as l, ContentNavigator as m, type ReplanHints as n, type StudyContentSource as o, type StudySessionFailedItem as p, type StudySessionFailedNewItem as q, type StudySessionFailedReviewItem as r, type StudySessionNewItem as s, type StudySessionReviewItem as t, isReview as u, type ContentSourceID as v, getStudySource as w, type SessionStateSnapshotProvider as x, type RegulatorConfig as y, type UserDBReader as z };
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as AdminDBInterface, d as AssignedCard, a as AssignedContent, c as AssignedCourse, b as AssignedTag, C as ClassroomDBInterface, S as StudentClassroomDBInterface, T as TeacherClassroomDBInterface } from '../classroomDB-DLTtLZct.cjs';
|
|
2
|
-
import { av as LearnableWeight, T as UserOutcomeRecord, aw as OrchestrationContext, W as WeightedCard, C as CourseDBInterface } from '../contentSource-
|
|
3
|
-
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc, b as ContentNavigationStrategyData, m as ContentNavigator, v as ContentSourceID, k as CourseInfo, Q as CourseRegistration, d as CourseRegistrationDoc, a as CoursesDBInterface, af as FilterContext, at as FilterImpact, F as FilterKind, ai as GeneratorContext, G as GeneratorResult, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, a0 as NavigatorConstructor, N as NavigatorRole, ab as NavigatorRoles, aa as Navigators, au as PipelineForecaster, aq as PipelineRunReport, n as ReplanHints, ar as RunReportCard, c as ScheduledCard,
|
|
4
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-
|
|
2
|
+
import { av as LearnableWeight, T as UserOutcomeRecord, aw as OrchestrationContext, W as WeightedCard, C as CourseDBInterface } from '../contentSource-Doh1aVBJ.cjs';
|
|
3
|
+
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc, b as ContentNavigationStrategyData, m as ContentNavigator, v as ContentSourceID, k as CourseInfo, Q as CourseRegistration, d as CourseRegistrationDoc, a as CoursesDBInterface, af as FilterContext, at as FilterImpact, F as FilterKind, ai as GeneratorContext, G as GeneratorResult, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, a0 as NavigatorConstructor, N as NavigatorRole, ab as NavigatorRoles, aa as Navigators, au as PipelineForecaster, aq as PipelineRunReport, n as ReplanHints, ar as RunReportCard, c as ScheduledCard, i as SessionEloEvent, e as SessionStateSnapshot, x as SessionStateSnapshotProvider, M as SessionTrackingData, a8 as StrategyContribution, o as StudyContentSource, S as StudySessionDoc, p as StudySessionFailedItem, q as StudySessionFailedNewItem, r as StudySessionFailedReviewItem, l as StudySessionItem, s as StudySessionNewItem, t as StudySessionReviewItem, g as StudySessionRunCard, j as StudySessionRunCardTrail, f as StudySessionRunSummary, O as UserConfig, H as UserCourseSetting, E as UserCourseSettings, B as UserDBAuthenticator, U as UserDBInterface, z as UserDBReader, A as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, I as UsrCrsDataInterface, ax as computeDeviation, az as computeEffectiveWeight, ay as computeSpread, aA as createOrchestrationContext, ap as drainCapturedRuns, am as getActivePipeline, a9 as getCardOrigin, a5 as getRegisteredFilterKind, a2 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, ao as getRunsForSession, w as getStudySource, a3 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, ad as isFilter, ac as isGenerator, u as isReview, V as makeStudySessionId, al as mountPipelineDebugger, X as newSessionId, ak as pipelineDebugAPI, a1 as registerNavigator, an as setDebugSessionId } from '../contentSource-Doh1aVBJ.cjs';
|
|
4
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-BW1CBAbb.cjs';
|
|
5
5
|
import { D as DocType, Q as QuestionRecord, f as DocTypePrefixes, c as CardHistory, b as CardRecord } from '../types-legacy-BkOYOR6U.cjs';
|
|
6
6
|
export { C as CardData, g as CourseListData, h as DataShapeData, a as DisplayableData, F as Field, G as GuestUsername, d as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, T as Tag, e as TagStub, l as log } from '../types-legacy-BkOYOR6U.cjs';
|
|
7
7
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as AdminDBInterface, d as AssignedCard, a as AssignedContent, c as AssignedCourse, b as AssignedTag, C as ClassroomDBInterface, S as StudentClassroomDBInterface, T as TeacherClassroomDBInterface } from '../classroomDB-DLTtLZct.js';
|
|
2
|
-
import { av as LearnableWeight, T as UserOutcomeRecord, aw as OrchestrationContext, W as WeightedCard, C as CourseDBInterface } from '../contentSource-
|
|
3
|
-
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc, b as ContentNavigationStrategyData, m as ContentNavigator, v as ContentSourceID, k as CourseInfo, Q as CourseRegistration, d as CourseRegistrationDoc, a as CoursesDBInterface, af as FilterContext, at as FilterImpact, F as FilterKind, ai as GeneratorContext, G as GeneratorResult, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, a0 as NavigatorConstructor, N as NavigatorRole, ab as NavigatorRoles, aa as Navigators, au as PipelineForecaster, aq as PipelineRunReport, n as ReplanHints, ar as RunReportCard, c as ScheduledCard,
|
|
4
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-
|
|
2
|
+
import { av as LearnableWeight, T as UserOutcomeRecord, aw as OrchestrationContext, W as WeightedCard, C as CourseDBInterface } from '../contentSource-DMduBjDC.js';
|
|
3
|
+
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc, b as ContentNavigationStrategyData, m as ContentNavigator, v as ContentSourceID, k as CourseInfo, Q as CourseRegistration, d as CourseRegistrationDoc, a as CoursesDBInterface, af as FilterContext, at as FilterImpact, F as FilterKind, ai as GeneratorContext, G as GeneratorResult, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, a0 as NavigatorConstructor, N as NavigatorRole, ab as NavigatorRoles, aa as Navigators, au as PipelineForecaster, aq as PipelineRunReport, n as ReplanHints, ar as RunReportCard, c as ScheduledCard, i as SessionEloEvent, e as SessionStateSnapshot, x as SessionStateSnapshotProvider, M as SessionTrackingData, a8 as StrategyContribution, o as StudyContentSource, S as StudySessionDoc, p as StudySessionFailedItem, q as StudySessionFailedNewItem, r as StudySessionFailedReviewItem, l as StudySessionItem, s as StudySessionNewItem, t as StudySessionReviewItem, g as StudySessionRunCard, j as StudySessionRunCardTrail, f as StudySessionRunSummary, O as UserConfig, H as UserCourseSetting, E as UserCourseSettings, B as UserDBAuthenticator, U as UserDBInterface, z as UserDBReader, A as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, I as UsrCrsDataInterface, ax as computeDeviation, az as computeEffectiveWeight, ay as computeSpread, aA as createOrchestrationContext, ap as drainCapturedRuns, am as getActivePipeline, a9 as getCardOrigin, a5 as getRegisteredFilterKind, a2 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, ao as getRunsForSession, w as getStudySource, a3 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, ad as isFilter, ac as isGenerator, u as isReview, V as makeStudySessionId, al as mountPipelineDebugger, X as newSessionId, ak as pipelineDebugAPI, a1 as registerNavigator, an as setDebugSessionId } from '../contentSource-DMduBjDC.js';
|
|
4
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-Cxfe4nSK.js';
|
|
5
5
|
import { D as DocType, Q as QuestionRecord, f as DocTypePrefixes, c as CardHistory, b as CardRecord } from '../types-legacy-BkOYOR6U.js';
|
|
6
6
|
export { C as CardData, g as CourseListData, h as DataShapeData, a as DisplayableData, F as Field, G as GuestUsername, d as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, T as Tag, e as TagStub, l as log } from '../types-legacy-BkOYOR6U.js';
|
|
7
7
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
package/dist/core/index.js
CHANGED
|
@@ -695,13 +695,12 @@ function clearRunHistory() {
|
|
|
695
695
|
_pendingRuns = [];
|
|
696
696
|
}
|
|
697
697
|
function getOrigin(card) {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
return "unknown";
|
|
698
|
+
return card.reviewID ? "review" : "new";
|
|
699
|
+
}
|
|
700
|
+
function requiredBy(card) {
|
|
701
|
+
return card.provenance.find(
|
|
702
|
+
(p) => p.strategy === "ephemeralHint" && p.score === Number.POSITIVE_INFINITY
|
|
703
|
+
)?.strategyName;
|
|
705
704
|
}
|
|
706
705
|
function captureRun(report) {
|
|
707
706
|
const fullReport = {
|
|
@@ -725,17 +724,23 @@ function parseCardElo(provenance) {
|
|
|
725
724
|
}
|
|
726
725
|
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints, scoredCards, regulators) {
|
|
727
726
|
const selectedIds = new Set(selectedCards.map((c) => c.cardId));
|
|
728
|
-
const toReport = (card) =>
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
727
|
+
const toReport = (card) => {
|
|
728
|
+
const required = requiredBy(card);
|
|
729
|
+
const first = card.provenance[0];
|
|
730
|
+
const generator = first && first.strategy !== "ephemeralHint" ? first.strategyName || first.strategy : void 0;
|
|
731
|
+
return {
|
|
732
|
+
cardId: card.cardId,
|
|
733
|
+
courseId: card.courseId,
|
|
734
|
+
origin: getOrigin(card),
|
|
735
|
+
...generator ? { generator } : {},
|
|
736
|
+
...required ? { required } : {},
|
|
737
|
+
finalScore: card.score,
|
|
738
|
+
cardElo: card.cardElo ?? parseCardElo(card.provenance),
|
|
739
|
+
provenance: card.provenance,
|
|
740
|
+
tags: card.tags,
|
|
741
|
+
selected: selectedIds.has(card.cardId)
|
|
742
|
+
};
|
|
743
|
+
};
|
|
739
744
|
const selectedReported = [];
|
|
740
745
|
const nearMissReported = [];
|
|
741
746
|
const discardedTailCards = [];
|
|
@@ -1864,10 +1869,14 @@ var init_elo = __esm({
|
|
|
1864
1869
|
const userElo = (0, import_common5.toCourseElo)(courseReg.elo);
|
|
1865
1870
|
userGlobalElo = userElo.global.score;
|
|
1866
1871
|
}
|
|
1867
|
-
const activeCards = await
|
|
1872
|
+
const [activeCards, seenCards] = await Promise.all([
|
|
1873
|
+
this.user.getActiveCards(),
|
|
1874
|
+
this.user.getSeenCards(this.course.getCourseID()).catch(() => [])
|
|
1875
|
+
]);
|
|
1876
|
+
const notNew = /* @__PURE__ */ new Set([...activeCards.map((ac) => ac.cardID), ...seenCards]);
|
|
1868
1877
|
const newCards = (await this.course.getCardsCenteredAtELO(
|
|
1869
1878
|
{ limit, elo: "user" },
|
|
1870
|
-
(c) => !
|
|
1879
|
+
(c) => !notNew.has(c.cardID)
|
|
1871
1880
|
)).map((c) => ({ ...c, status: "new" }));
|
|
1872
1881
|
const scored = newCards.map((c) => {
|
|
1873
1882
|
const cardElo = c.elo ?? 1e3;
|
|
@@ -1960,11 +1969,11 @@ function formatAge(ms) {
|
|
|
1960
1969
|
}
|
|
1961
1970
|
function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
1962
1971
|
if (minCount <= 0) return [];
|
|
1963
|
-
const exposeTags = new Set(tags.filter((tag) =>
|
|
1972
|
+
const exposeTags = new Set(tags.filter((tag) => (0, import_common6.tagRole)(tag) === "expose"));
|
|
1964
1973
|
for (const tag of tags) {
|
|
1965
|
-
if (
|
|
1966
|
-
const
|
|
1967
|
-
if (
|
|
1974
|
+
if ((0, import_common6.tagRole)(tag) !== "intro") continue;
|
|
1975
|
+
const expose = (0, import_common6.withTagRole)(tag, "expose");
|
|
1976
|
+
if (expose) exposeTags.add(expose);
|
|
1968
1977
|
}
|
|
1969
1978
|
return [...exposeTags].filter((tag) => {
|
|
1970
1979
|
const tagElo = userTagElo[tag];
|
|
@@ -1974,10 +1983,11 @@ function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
|
1974
1983
|
function pickTopByScore(cards, limit) {
|
|
1975
1984
|
return [...cards].sort((a, b) => b.score - a.score || a.cardId.localeCompare(b.cardId)).slice(0, limit);
|
|
1976
1985
|
}
|
|
1977
|
-
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;
|
|
1986
|
+
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;
|
|
1978
1987
|
var init_prescribed = __esm({
|
|
1979
1988
|
"src/core/navigators/generators/prescribed.ts"() {
|
|
1980
1989
|
"use strict";
|
|
1990
|
+
import_common6 = require("@vue-skuilder/common");
|
|
1981
1991
|
init_navigators();
|
|
1982
1992
|
init_StrategyPressureDebugger();
|
|
1983
1993
|
init_logger();
|
|
@@ -3208,7 +3218,9 @@ function tagAwareGap(cardTags, cardElo, userElo, minTagCount) {
|
|
|
3208
3218
|
const tags = [];
|
|
3209
3219
|
for (const tag of cardTags) {
|
|
3210
3220
|
const user = userElo.tags[tag];
|
|
3211
|
-
if (!user || user.score ===
|
|
3221
|
+
if ((0, import_common7.isCountOnlyTag)(tag) || !user || user.score === import_common7.COUNT_ONLY_SCORE || user.count < minTagCount) {
|
|
3222
|
+
continue;
|
|
3223
|
+
}
|
|
3212
3224
|
const card = cardElo.tags[tag]?.score ?? cardElo.global.score;
|
|
3213
3225
|
tags.push({
|
|
3214
3226
|
tag,
|
|
@@ -3280,11 +3292,12 @@ function createEloDistanceFilter(config) {
|
|
|
3280
3292
|
transform: (cards, context) => applyEloDistance(cards, context, resolved, source)
|
|
3281
3293
|
};
|
|
3282
3294
|
}
|
|
3283
|
-
var DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF,
|
|
3295
|
+
var import_common7, DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF, DEFAULT_CARD_ELO, MULTI_DIM_ELO_KEY, multiDimElo, EloDistanceFilter;
|
|
3284
3296
|
var init_eloDistance = __esm({
|
|
3285
3297
|
"src/core/navigators/filters/eloDistance.ts"() {
|
|
3286
3298
|
"use strict";
|
|
3287
3299
|
init_navigators();
|
|
3300
|
+
import_common7 = require("@vue-skuilder/common");
|
|
3288
3301
|
init_logger();
|
|
3289
3302
|
DEFAULT_ELO_DISTANCE_CONFIG = {
|
|
3290
3303
|
halfLife: 300,
|
|
@@ -3294,7 +3307,6 @@ var init_eloDistance = __esm({
|
|
|
3294
3307
|
minTagCount: 3
|
|
3295
3308
|
};
|
|
3296
3309
|
TAG_CONFIDENCE_HALF = 10;
|
|
3297
|
-
COUNT_ONLY_SENTINEL = -1;
|
|
3298
3310
|
DEFAULT_CARD_ELO = 1e3;
|
|
3299
3311
|
MULTI_DIM_ELO_KEY = "skuilder:multiDimElo";
|
|
3300
3312
|
multiDimElo = readMultiDimElo();
|
|
@@ -3337,12 +3349,12 @@ var hierarchyDefinition_exports = {};
|
|
|
3337
3349
|
__export(hierarchyDefinition_exports, {
|
|
3338
3350
|
default: () => HierarchyDefinitionNavigator
|
|
3339
3351
|
});
|
|
3340
|
-
var
|
|
3352
|
+
var import_common8, DEFAULT_MIN_COUNT2, HierarchyDefinitionNavigator;
|
|
3341
3353
|
var init_hierarchyDefinition = __esm({
|
|
3342
3354
|
"src/core/navigators/filters/hierarchyDefinition.ts"() {
|
|
3343
3355
|
"use strict";
|
|
3344
3356
|
init_navigators();
|
|
3345
|
-
|
|
3357
|
+
import_common8 = require("@vue-skuilder/common");
|
|
3346
3358
|
init_logger();
|
|
3347
3359
|
DEFAULT_MIN_COUNT2 = 3;
|
|
3348
3360
|
HierarchyDefinitionNavigator = class _HierarchyDefinitionNavigator extends ContentNavigator {
|
|
@@ -3392,7 +3404,7 @@ var init_hierarchyDefinition = __esm({
|
|
|
3392
3404
|
const mastered = /* @__PURE__ */ new Set();
|
|
3393
3405
|
try {
|
|
3394
3406
|
const courseReg = await context.user.getCourseRegDoc(context.course.getCourseID());
|
|
3395
|
-
const userElo = (0,
|
|
3407
|
+
const userElo = (0, import_common8.toCourseElo)(courseReg.elo);
|
|
3396
3408
|
for (const prereqs of Object.values(this.config.prerequisites)) {
|
|
3397
3409
|
for (const prereq of prereqs) {
|
|
3398
3410
|
const tagElo = userElo.tags[prereq.tag];
|
|
@@ -3764,12 +3776,12 @@ var interferenceMitigator_exports = {};
|
|
|
3764
3776
|
__export(interferenceMitigator_exports, {
|
|
3765
3777
|
default: () => InterferenceMitigatorNavigator
|
|
3766
3778
|
});
|
|
3767
|
-
var
|
|
3779
|
+
var import_common9, DEFAULT_MIN_COUNT3, DEFAULT_MIN_ELAPSED_DAYS, DEFAULT_INTERFERENCE_DECAY, InterferenceMitigatorNavigator;
|
|
3768
3780
|
var init_interferenceMitigator = __esm({
|
|
3769
3781
|
"src/core/navigators/filters/interferenceMitigator.ts"() {
|
|
3770
3782
|
"use strict";
|
|
3771
3783
|
init_navigators();
|
|
3772
|
-
|
|
3784
|
+
import_common9 = require("@vue-skuilder/common");
|
|
3773
3785
|
DEFAULT_MIN_COUNT3 = 10;
|
|
3774
3786
|
DEFAULT_MIN_ELAPSED_DAYS = 3;
|
|
3775
3787
|
DEFAULT_INTERFERENCE_DECAY = 0.8;
|
|
@@ -3854,7 +3866,7 @@ var init_interferenceMitigator = __esm({
|
|
|
3854
3866
|
const immature = /* @__PURE__ */ new Set();
|
|
3855
3867
|
try {
|
|
3856
3868
|
const courseReg = await context.user.getCourseRegDoc(context.course.getCourseID());
|
|
3857
|
-
const userElo = (0,
|
|
3869
|
+
const userElo = (0, import_common9.toCourseElo)(courseReg.elo);
|
|
3858
3870
|
const minCount = this.config.maturityThreshold?.minCount ?? DEFAULT_MIN_COUNT3;
|
|
3859
3871
|
const minElo = this.config.maturityThreshold?.minElo;
|
|
3860
3872
|
const minElapsedDays = this.config.maturityThreshold?.minElapsedDays ?? DEFAULT_MIN_ELAPSED_DAYS;
|
|
@@ -4645,11 +4657,11 @@ function logCardProvenance(cards, maxCards = 3) {
|
|
|
4645
4657
|
}
|
|
4646
4658
|
}
|
|
4647
4659
|
}
|
|
4648
|
-
var
|
|
4660
|
+
var import_common10, VERBOSE_RESULTS, Pipeline;
|
|
4649
4661
|
var init_Pipeline = __esm({
|
|
4650
4662
|
"src/core/navigators/Pipeline.ts"() {
|
|
4651
4663
|
"use strict";
|
|
4652
|
-
|
|
4664
|
+
import_common10 = require("@vue-skuilder/common");
|
|
4653
4665
|
init_navigators();
|
|
4654
4666
|
init_logger();
|
|
4655
4667
|
init_orchestration();
|
|
@@ -5138,7 +5150,7 @@ var init_Pipeline = __esm({
|
|
|
5138
5150
|
let userCourseElo;
|
|
5139
5151
|
try {
|
|
5140
5152
|
const courseReg = await this.user.getCourseRegDoc(this.course.getCourseID());
|
|
5141
|
-
userCourseElo = (0,
|
|
5153
|
+
userCourseElo = (0, import_common10.toCourseElo)(courseReg.elo);
|
|
5142
5154
|
userElo = userCourseElo.global.score;
|
|
5143
5155
|
} catch (e) {
|
|
5144
5156
|
logger.debug(`[Pipeline] Could not get user ELO, using default: ${e}`);
|
|
@@ -5200,7 +5212,7 @@ var init_Pipeline = __esm({
|
|
|
5200
5212
|
*/
|
|
5201
5213
|
async getTagEloStatus(tagFilter) {
|
|
5202
5214
|
const courseReg = await this.user.getCourseRegDoc(this.course.getCourseID());
|
|
5203
|
-
const courseElo = (0,
|
|
5215
|
+
const courseElo = (0, import_common10.toCourseElo)(courseReg.elo);
|
|
5204
5216
|
const result = {};
|
|
5205
5217
|
if (!tagFilter) {
|
|
5206
5218
|
for (const [tag, data] of Object.entries(courseElo.tags)) {
|
|
@@ -6101,11 +6113,11 @@ ${JSON.stringify(config)}
|
|
|
6101
6113
|
function isSuccessRow(row) {
|
|
6102
6114
|
return "doc" in row && row.doc !== null && row.doc !== void 0;
|
|
6103
6115
|
}
|
|
6104
|
-
var
|
|
6116
|
+
var import_common11, CourseDB;
|
|
6105
6117
|
var init_courseDB = __esm({
|
|
6106
6118
|
"src/impl/couch/courseDB.ts"() {
|
|
6107
6119
|
"use strict";
|
|
6108
|
-
|
|
6120
|
+
import_common11 = require("@vue-skuilder/common");
|
|
6109
6121
|
init_couch();
|
|
6110
6122
|
init_updateQueue();
|
|
6111
6123
|
init_types_legacy();
|
|
@@ -6209,14 +6221,14 @@ var init_courseDB = __esm({
|
|
|
6209
6221
|
docs.rows.forEach((r) => {
|
|
6210
6222
|
if (isSuccessRow(r)) {
|
|
6211
6223
|
if (r.doc && r.doc.elo) {
|
|
6212
|
-
ret.push((0,
|
|
6224
|
+
ret.push((0, import_common11.toCourseElo)(r.doc.elo));
|
|
6213
6225
|
} else {
|
|
6214
6226
|
logger.warn("no elo data for card: " + r.id);
|
|
6215
|
-
ret.push((0,
|
|
6227
|
+
ret.push((0, import_common11.blankCourseElo)());
|
|
6216
6228
|
}
|
|
6217
6229
|
} else {
|
|
6218
6230
|
logger.warn("no elo data for card: " + JSON.stringify(r));
|
|
6219
|
-
ret.push((0,
|
|
6231
|
+
ret.push((0, import_common11.blankCourseElo)());
|
|
6220
6232
|
}
|
|
6221
6233
|
});
|
|
6222
6234
|
return ret;
|
|
@@ -6419,7 +6431,7 @@ ${above.rows.map((r) => ` ${r.id}-${r.key}
|
|
|
6419
6431
|
async getCourseTagStubs() {
|
|
6420
6432
|
return getCourseTagStubs(this.id);
|
|
6421
6433
|
}
|
|
6422
|
-
async addNote(codeCourse, shape, data, author, tags, uploads, elo = (0,
|
|
6434
|
+
async addNote(codeCourse, shape, data, author, tags, uploads, elo = (0, import_common11.blankCourseElo)()) {
|
|
6423
6435
|
try {
|
|
6424
6436
|
const resp = await addNote55(this.id, codeCourse, shape, data, author, tags, uploads, elo);
|
|
6425
6437
|
if (resp.ok) {
|
|
@@ -6428,19 +6440,19 @@ ${above.rows.map((r) => ` ${r.id}-${r.key}
|
|
|
6428
6440
|
`[courseDB.addNote] Note added but card creation failed: ${resp.cardCreationError}`
|
|
6429
6441
|
);
|
|
6430
6442
|
return {
|
|
6431
|
-
status:
|
|
6443
|
+
status: import_common11.Status.error,
|
|
6432
6444
|
message: `Note was added but no cards were created: ${resp.cardCreationError}`,
|
|
6433
6445
|
id: resp.id
|
|
6434
6446
|
};
|
|
6435
6447
|
}
|
|
6436
6448
|
return {
|
|
6437
|
-
status:
|
|
6449
|
+
status: import_common11.Status.ok,
|
|
6438
6450
|
message: "",
|
|
6439
6451
|
id: resp.id
|
|
6440
6452
|
};
|
|
6441
6453
|
} else {
|
|
6442
6454
|
return {
|
|
6443
|
-
status:
|
|
6455
|
+
status: import_common11.Status.error,
|
|
6444
6456
|
message: "Unexpected error adding note"
|
|
6445
6457
|
};
|
|
6446
6458
|
}
|
|
@@ -6452,7 +6464,7 @@ ${above.rows.map((r) => ` ${r.id}-${r.key}
|
|
|
6452
6464
|
message: ${err.message}`
|
|
6453
6465
|
);
|
|
6454
6466
|
return {
|
|
6455
|
-
status:
|
|
6467
|
+
status: import_common11.Status.error,
|
|
6456
6468
|
message: `Error adding note to course. ${e.reason || err.message}`
|
|
6457
6469
|
};
|
|
6458
6470
|
}
|
|
@@ -6646,7 +6658,7 @@ ${e.stack}` : JSON.stringify(e);
|
|
|
6646
6658
|
const courseDoc = (await u.getCourseRegistrationsDoc()).courses.find((c) => {
|
|
6647
6659
|
return c.courseID === this.id;
|
|
6648
6660
|
});
|
|
6649
|
-
targetElo = (0,
|
|
6661
|
+
targetElo = (0, import_common11.EloToNumber)(courseDoc.elo);
|
|
6650
6662
|
} catch {
|
|
6651
6663
|
targetElo = 1e3;
|
|
6652
6664
|
}
|
|
@@ -7010,14 +7022,14 @@ var init_auth = __esm({
|
|
|
7010
7022
|
});
|
|
7011
7023
|
|
|
7012
7024
|
// src/impl/couch/CouchDBSyncStrategy.ts
|
|
7013
|
-
var
|
|
7025
|
+
var import_common12;
|
|
7014
7026
|
var init_CouchDBSyncStrategy = __esm({
|
|
7015
7027
|
"src/impl/couch/CouchDBSyncStrategy.ts"() {
|
|
7016
7028
|
"use strict";
|
|
7017
7029
|
init_factory();
|
|
7018
7030
|
init_types_legacy();
|
|
7019
7031
|
init_logger();
|
|
7020
|
-
|
|
7032
|
+
import_common12 = require("@vue-skuilder/common");
|
|
7021
7033
|
init_common();
|
|
7022
7034
|
init_pouchdb_setup();
|
|
7023
7035
|
init_couch();
|
|
@@ -7115,13 +7127,13 @@ function getStreak(records) {
|
|
|
7115
7127
|
function getLapses(records) {
|
|
7116
7128
|
return records.filter((r) => r.isCorrect === false).length;
|
|
7117
7129
|
}
|
|
7118
|
-
var import_moment4,
|
|
7130
|
+
var import_moment4, import_common14, duration;
|
|
7119
7131
|
var init_SpacedRepetition = __esm({
|
|
7120
7132
|
"src/study/SpacedRepetition.ts"() {
|
|
7121
7133
|
"use strict";
|
|
7122
7134
|
init_util();
|
|
7123
7135
|
import_moment4 = __toESM(require("moment"), 1);
|
|
7124
|
-
|
|
7136
|
+
import_common14 = require("@vue-skuilder/common");
|
|
7125
7137
|
init_logger();
|
|
7126
7138
|
duration = import_moment4.default.duration;
|
|
7127
7139
|
}
|
|
@@ -7140,42 +7152,42 @@ var init_SrsService = __esm({
|
|
|
7140
7152
|
});
|
|
7141
7153
|
|
|
7142
7154
|
// src/study/services/tagRecent.ts
|
|
7143
|
-
var
|
|
7155
|
+
var import_common15;
|
|
7144
7156
|
var init_tagRecent = __esm({
|
|
7145
7157
|
"src/study/services/tagRecent.ts"() {
|
|
7146
7158
|
"use strict";
|
|
7147
|
-
|
|
7159
|
+
import_common15 = require("@vue-skuilder/common");
|
|
7148
7160
|
}
|
|
7149
7161
|
});
|
|
7150
7162
|
|
|
7151
7163
|
// src/study/services/EloService.ts
|
|
7152
|
-
var
|
|
7164
|
+
var import_common16;
|
|
7153
7165
|
var init_EloService = __esm({
|
|
7154
7166
|
"src/study/services/EloService.ts"() {
|
|
7155
7167
|
"use strict";
|
|
7156
|
-
|
|
7168
|
+
import_common16 = require("@vue-skuilder/common");
|
|
7157
7169
|
init_logger();
|
|
7158
7170
|
init_tagRecent();
|
|
7159
7171
|
}
|
|
7160
7172
|
});
|
|
7161
7173
|
|
|
7162
7174
|
// src/study/services/ResponseProcessor.ts
|
|
7163
|
-
var
|
|
7175
|
+
var import_common17;
|
|
7164
7176
|
var init_ResponseProcessor = __esm({
|
|
7165
7177
|
"src/study/services/ResponseProcessor.ts"() {
|
|
7166
7178
|
"use strict";
|
|
7167
7179
|
init_core();
|
|
7168
7180
|
init_logger();
|
|
7169
|
-
|
|
7181
|
+
import_common17 = require("@vue-skuilder/common");
|
|
7170
7182
|
}
|
|
7171
7183
|
});
|
|
7172
7184
|
|
|
7173
7185
|
// src/study/services/CardHydrationService.ts
|
|
7174
|
-
var
|
|
7186
|
+
var import_common18;
|
|
7175
7187
|
var init_CardHydrationService = __esm({
|
|
7176
7188
|
"src/study/services/CardHydrationService.ts"() {
|
|
7177
7189
|
"use strict";
|
|
7178
|
-
|
|
7190
|
+
import_common18 = require("@vue-skuilder/common");
|
|
7179
7191
|
init_logger();
|
|
7180
7192
|
}
|
|
7181
7193
|
});
|
|
@@ -9114,11 +9126,11 @@ var init_SessionController = __esm({
|
|
|
9114
9126
|
});
|
|
9115
9127
|
|
|
9116
9128
|
// src/study/TagFilteredContentSource.ts
|
|
9117
|
-
var
|
|
9129
|
+
var import_common19, TagFilteredContentSource;
|
|
9118
9130
|
var init_TagFilteredContentSource = __esm({
|
|
9119
9131
|
"src/study/TagFilteredContentSource.ts"() {
|
|
9120
9132
|
"use strict";
|
|
9121
|
-
|
|
9133
|
+
import_common19 = require("@vue-skuilder/common");
|
|
9122
9134
|
init_courseDB();
|
|
9123
9135
|
init_logger();
|
|
9124
9136
|
TagFilteredContentSource = class {
|
|
@@ -9204,7 +9216,7 @@ var init_TagFilteredContentSource = __esm({
|
|
|
9204
9216
|
* @returns Cards sorted by score descending (all scores = 1.0)
|
|
9205
9217
|
*/
|
|
9206
9218
|
async getWeightedCards(limit) {
|
|
9207
|
-
if (!(0,
|
|
9219
|
+
if (!(0, import_common19.hasActiveFilter)(this.filter)) {
|
|
9208
9220
|
logger.warn("[TagFilteredContentSource] getWeightedCards called with no active filter");
|
|
9209
9221
|
return { cards: [] };
|
|
9210
9222
|
}
|
|
@@ -9535,13 +9547,13 @@ async function dropUserFromClassroom(user, classID) {
|
|
|
9535
9547
|
async function getUserClassrooms(user) {
|
|
9536
9548
|
return getOrCreateClassroomRegistrationsDoc(user);
|
|
9537
9549
|
}
|
|
9538
|
-
var
|
|
9550
|
+
var import_common20, import_moment8, log3, HYDRATION_TIMEOUT_MS, BaseUser, userCoursesDoc, userClassroomsDoc;
|
|
9539
9551
|
var init_BaseUserDB = __esm({
|
|
9540
9552
|
"src/impl/common/BaseUserDB.ts"() {
|
|
9541
9553
|
"use strict";
|
|
9542
9554
|
init_core();
|
|
9543
9555
|
init_util();
|
|
9544
|
-
|
|
9556
|
+
import_common20 = require("@vue-skuilder/common");
|
|
9545
9557
|
import_moment8 = __toESM(require("moment"), 1);
|
|
9546
9558
|
init_types_legacy();
|
|
9547
9559
|
init_logger();
|
|
@@ -9644,7 +9656,7 @@ Currently logged-in as ${this._username}.`
|
|
|
9644
9656
|
);
|
|
9645
9657
|
}
|
|
9646
9658
|
const result = await this.syncStrategy.createAccount(username, password);
|
|
9647
|
-
if (result.status ===
|
|
9659
|
+
if (result.status === import_common20.Status.ok) {
|
|
9648
9660
|
log3(`Account created successfully, updating username to ${username}`);
|
|
9649
9661
|
this._username = username;
|
|
9650
9662
|
try {
|
|
@@ -9720,7 +9732,7 @@ Currently logged-in as ${this._username}.`
|
|
|
9720
9732
|
async resetUserData() {
|
|
9721
9733
|
if (this.syncStrategy.canAuthenticate()) {
|
|
9722
9734
|
return {
|
|
9723
|
-
status:
|
|
9735
|
+
status: import_common20.Status.error,
|
|
9724
9736
|
error: "Reset user data is only available for local-only mode. Use logout instead for remote sync."
|
|
9725
9737
|
};
|
|
9726
9738
|
}
|
|
@@ -9742,11 +9754,11 @@ Currently logged-in as ${this._username}.`
|
|
|
9742
9754
|
await localDB.bulkDocs(docsToDelete);
|
|
9743
9755
|
}
|
|
9744
9756
|
await this.init();
|
|
9745
|
-
return { status:
|
|
9757
|
+
return { status: import_common20.Status.ok };
|
|
9746
9758
|
} catch (error) {
|
|
9747
9759
|
logger.error("Failed to reset user data:", error);
|
|
9748
9760
|
return {
|
|
9749
|
-
status:
|
|
9761
|
+
status: import_common20.Status.error,
|
|
9750
9762
|
error: error instanceof Error ? error.message : "Unknown error during reset"
|
|
9751
9763
|
};
|
|
9752
9764
|
}
|
|
@@ -10684,19 +10696,19 @@ async function getStudySource(source, user) {
|
|
|
10684
10696
|
if (source.type === "classroom") {
|
|
10685
10697
|
return await StudentClassroomDB.factory(source.id, user);
|
|
10686
10698
|
} else {
|
|
10687
|
-
if ((0,
|
|
10699
|
+
if ((0, import_common22.hasActiveFilter)(source.tagFilter)) {
|
|
10688
10700
|
return new TagFilteredContentSource(source.id, source.tagFilter, user);
|
|
10689
10701
|
}
|
|
10690
10702
|
return getDataLayer().getCourseDB(source.id);
|
|
10691
10703
|
}
|
|
10692
10704
|
}
|
|
10693
|
-
var
|
|
10705
|
+
var import_common22;
|
|
10694
10706
|
var init_contentSource = __esm({
|
|
10695
10707
|
"src/core/interfaces/contentSource.ts"() {
|
|
10696
10708
|
"use strict";
|
|
10697
10709
|
init_factory();
|
|
10698
10710
|
init_classroomDB2();
|
|
10699
|
-
|
|
10711
|
+
import_common22 = require("@vue-skuilder/common");
|
|
10700
10712
|
init_TagFilteredContentSource();
|
|
10701
10713
|
}
|
|
10702
10714
|
});
|
|
@@ -10836,7 +10848,7 @@ elo: ${elo}`;
|
|
|
10836
10848
|
misc: {}
|
|
10837
10849
|
} : void 0
|
|
10838
10850
|
);
|
|
10839
|
-
if (result.status ===
|
|
10851
|
+
if (result.status === import_common23.Status.ok) {
|
|
10840
10852
|
return {
|
|
10841
10853
|
originalText,
|
|
10842
10854
|
status: "success",
|
|
@@ -10880,11 +10892,11 @@ function validateProcessorConfig(config) {
|
|
|
10880
10892
|
}
|
|
10881
10893
|
return { isValid: true };
|
|
10882
10894
|
}
|
|
10883
|
-
var
|
|
10895
|
+
var import_common23;
|
|
10884
10896
|
var init_cardProcessor = __esm({
|
|
10885
10897
|
"src/core/bulkImport/cardProcessor.ts"() {
|
|
10886
10898
|
"use strict";
|
|
10887
|
-
|
|
10899
|
+
import_common23 = require("@vue-skuilder/common");
|
|
10888
10900
|
init_logger();
|
|
10889
10901
|
}
|
|
10890
10902
|
});
|