@happyvertical/smrt-education 0.57.52 → 0.59.0
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/AGENTS.md +18 -8
- package/README.md +36 -2
- package/agents/class-crunchlabs.md +83 -0
- package/agents/course-bundle-import.md +108 -18
- package/agents/course-work-design.md +144 -0
- package/agents/group-sharing.md +5 -1
- package/agents/learner-plan.md +3 -3
- package/agents/learner-service.md +1 -1
- package/agents/lesson-materials.md +52 -0
- package/agents/{workbook-service.md → lesson-work-service.md} +164 -95
- package/agents/{workbook-test-matrix.md → lesson-work-test-matrix.md} +3 -3
- package/agents/photo-intake.md +37 -50
- package/agents/question-records.md +1 -1
- package/agents/submission-service.md +22 -6
- package/dist/catalog-contracts.d.ts +6 -2
- package/dist/catalog-contracts.d.ts.map +1 -1
- package/dist/catalog-materialization-service.d.ts.map +1 -1
- package/dist/catalog-policy.d.ts +11 -1
- package/dist/catalog-policy.d.ts.map +1 -1
- package/dist/catalog-preview.d.ts +6 -1
- package/dist/catalog-preview.d.ts.map +1 -1
- package/dist/catalog-service.d.ts +1 -1
- package/dist/catalog-service.d.ts.map +1 -1
- package/dist/catalog.d.ts +11 -0
- package/dist/catalog.d.ts.map +1 -1
- package/dist/chunks/course-authoring-contracts-C4Hqba-e.js +131 -0
- package/dist/chunks/course-authoring-contracts-C4Hqba-e.js.map +1 -0
- package/dist/chunks/course-bundle-zip-5KUe3C5H.js +323 -0
- package/dist/chunks/course-bundle-zip-5KUe3C5H.js.map +1 -0
- package/dist/chunks/{workbook-photo-service-BtMQsbhq.js → workbook-photo-service-CjcB0y8Y.js} +6151 -5091
- package/dist/chunks/workbook-photo-service-CjcB0y8Y.js.map +1 -0
- package/dist/course-authoring-contracts.d.ts +6 -2
- package/dist/course-authoring-contracts.d.ts.map +1 -1
- package/dist/course-authoring-service.d.ts.map +1 -1
- package/dist/course-bundle-contracts.d.ts +21 -3
- package/dist/course-bundle-contracts.d.ts.map +1 -1
- package/dist/course-bundle-manifest-util.d.ts +15 -0
- package/dist/course-bundle-manifest-util.d.ts.map +1 -0
- package/dist/course-bundle-manifest-v2.d.ts +66 -0
- package/dist/course-bundle-manifest-v2.d.ts.map +1 -0
- package/dist/course-bundle-models.d.ts +29 -1
- package/dist/course-bundle-models.d.ts.map +1 -1
- package/dist/course-bundle-service.d.ts +104 -5
- package/dist/course-bundle-service.d.ts.map +1 -1
- package/dist/course-bundle.d.ts +81 -2
- package/dist/course-bundle.d.ts.map +1 -1
- package/dist/course-work-migration.d.ts +27 -0
- package/dist/course-work-migration.d.ts.map +1 -0
- package/dist/document-converter.d.ts +30 -18
- package/dist/document-converter.d.ts.map +1 -1
- package/dist/group-sharing-contracts.d.ts +3 -3
- package/dist/group-sharing-contracts.d.ts.map +1 -1
- package/dist/group-sharing-policy.d.ts +4 -4
- package/dist/group-sharing-policy.d.ts.map +1 -1
- package/dist/group-sharing-reader.d.ts.map +1 -1
- package/dist/hearth-catalog-providers.d.ts +1 -1
- package/dist/hearth-catalog-providers.d.ts.map +1 -1
- package/dist/hearth-class-crunchlabs.d.ts +94 -0
- package/dist/hearth-class-crunchlabs.d.ts.map +1 -0
- package/dist/index.d.ts +18 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1968 -419
- package/dist/index.js.map +1 -1
- package/dist/ingestion.d.ts +12 -11
- package/dist/ingestion.d.ts.map +1 -1
- package/dist/ingestion.js +63 -56
- package/dist/ingestion.js.map +1 -1
- package/dist/learner-plan-service.d.ts +1 -1
- package/dist/learner-plan-service.d.ts.map +1 -1
- package/dist/learner-service.d.ts +19 -5
- package/dist/learner-service.d.ts.map +1 -1
- package/dist/lesson-assets.d.ts +66 -2
- package/dist/lesson-assets.d.ts.map +1 -1
- package/dist/lesson-pages.d.ts +36 -0
- package/dist/lesson-pages.d.ts.map +1 -0
- package/dist/{workbook-completion.d.ts → lesson-work-completion.d.ts} +10 -10
- package/dist/lesson-work-completion.d.ts.map +1 -0
- package/dist/{workbook-contracts.d.ts → lesson-work-contracts.d.ts} +100 -52
- package/dist/lesson-work-contracts.d.ts.map +1 -0
- package/dist/lesson-work-models.d.ts +118 -0
- package/dist/lesson-work-models.d.ts.map +1 -0
- package/dist/lesson-work-service.d.ts +239 -0
- package/dist/lesson-work-service.d.ts.map +1 -0
- package/dist/manifest.json +6830 -5333
- package/dist/node.d.ts +3 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +134 -0
- package/dist/node.js.map +1 -0
- package/dist/smrt-knowledge.json +2260 -1705
- package/dist/sources/class-crunchlabs-files.d.ts +8 -0
- package/dist/sources/class-crunchlabs-files.d.ts.map +1 -0
- package/dist/sources/class-crunchlabs.d.ts +217 -0
- package/dist/sources/class-crunchlabs.d.ts.map +1 -0
- package/dist/submission-service.d.ts +135 -5
- package/dist/submission-service.d.ts.map +1 -1
- package/dist/submissions.d.ts +2 -0
- package/dist/submissions.d.ts.map +1 -1
- package/dist/work-answer-regions.d.ts +11 -0
- package/dist/work-answer-regions.d.ts.map +1 -0
- package/dist/work-layout.d.ts +13 -0
- package/dist/work-layout.d.ts.map +1 -0
- package/dist/workbook-photo-contracts.d.ts +9 -7
- package/dist/workbook-photo-contracts.d.ts.map +1 -1
- package/dist/workbook-photo-ingestion.d.ts +1 -1
- package/dist/workbook-photo-ingestion.d.ts.map +1 -1
- package/dist/workbook-photo-models.d.ts +5 -5
- package/dist/workbook-photo-models.d.ts.map +1 -1
- package/dist/workbook-photo-service.d.ts +13 -10
- package/dist/workbook-photo-service.d.ts.map +1 -1
- package/package.json +12 -8
- package/dist/chunks/workbook-photo-service-BtMQsbhq.js.map +0 -1
- package/dist/workbook-answer-regions.d.ts +0 -11
- package/dist/workbook-answer-regions.d.ts.map +0 -1
- package/dist/workbook-completion.d.ts.map +0 -1
- package/dist/workbook-contracts.d.ts.map +0 -1
- package/dist/workbook-layout.d.ts +0 -13
- package/dist/workbook-layout.d.ts.map +0 -1
- package/dist/workbook-models.d.ts +0 -129
- package/dist/workbook-models.d.ts.map +0 -1
- package/dist/workbook-service.d.ts +0 -163
- package/dist/workbook-service.d.ts.map +0 -1
package/dist/node.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC"}
|
package/dist/node.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { s as COURSE_BUNDLE_LIMITS, t as crc32 } from "./chunks/course-bundle-zip-5KUe3C5H.js";
|
|
2
|
+
import { open, readFile, readdir } from "node:fs/promises";
|
|
3
|
+
import { basename, join, relative, sep } from "node:path";
|
|
4
|
+
import { lstatSync } from "node:fs";
|
|
5
|
+
import { inflateRawSync } from "node:zlib";
|
|
6
|
+
//#region src/sources/class-crunchlabs-files.ts
|
|
7
|
+
var EOCD = 101010256;
|
|
8
|
+
var CENTRAL = 33639248;
|
|
9
|
+
var LOCAL = 67324752;
|
|
10
|
+
var MAX_CENTRAL_DIRECTORY = 16 * 1024 * 1024;
|
|
11
|
+
var MAX_DEPTH = 8;
|
|
12
|
+
async function readAt(path, position, length) {
|
|
13
|
+
const handle = await open(path, "r");
|
|
14
|
+
try {
|
|
15
|
+
const available = Math.max(0, (await handle.stat()).size - position);
|
|
16
|
+
const buffer = Buffer.alloc(Math.min(length, available));
|
|
17
|
+
const { bytesRead } = await handle.read(buffer, 0, buffer.length, position);
|
|
18
|
+
return buffer.subarray(0, bytesRead);
|
|
19
|
+
} finally {
|
|
20
|
+
await handle.close();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function sizeOf(path) {
|
|
24
|
+
const handle = await open(path, "r");
|
|
25
|
+
try {
|
|
26
|
+
return (await handle.stat()).size;
|
|
27
|
+
} finally {
|
|
28
|
+
await handle.close();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async function listZip(path) {
|
|
32
|
+
const handle = await open(path, "r");
|
|
33
|
+
let total;
|
|
34
|
+
try {
|
|
35
|
+
total = (await handle.stat()).size;
|
|
36
|
+
} finally {
|
|
37
|
+
await handle.close();
|
|
38
|
+
}
|
|
39
|
+
const tailLength = Math.min(total, 65557);
|
|
40
|
+
const tail = await readAt(path, total - tailLength, tailLength);
|
|
41
|
+
let eocd = -1;
|
|
42
|
+
for (let i = tail.length - 22; i >= 0; i--) if (tail.readUInt32LE(i) === EOCD && i + 22 + tail.readUInt16LE(i + 20) === tail.length) {
|
|
43
|
+
eocd = i;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
if (eocd === -1) throw new Error(`${basename(path)} is not a readable zip.`);
|
|
47
|
+
const entries = tail.readUInt16LE(eocd + 10);
|
|
48
|
+
const size = tail.readUInt32LE(eocd + 12);
|
|
49
|
+
const offset = tail.readUInt32LE(eocd + 16);
|
|
50
|
+
if (tail.readUInt16LE(eocd + 4) !== 0 || tail.readUInt16LE(eocd + 6) !== 0 || entries === 65535 || size === 4294967295 || offset === 4294967295) throw new Error(`${basename(path)} is a zip64 or multi-disk archive.`);
|
|
51
|
+
if (size > MAX_CENTRAL_DIRECTORY || offset + size > total) throw new Error(`${basename(path)} has an invalid central directory.`);
|
|
52
|
+
const central = await readAt(path, offset, size);
|
|
53
|
+
const out = [];
|
|
54
|
+
let at = 0;
|
|
55
|
+
for (let n = 0; n < entries; n++) {
|
|
56
|
+
if (at + 46 > central.length || central.readUInt32LE(at) !== CENTRAL) throw new Error(`${basename(path)} has a damaged central directory.`);
|
|
57
|
+
const flags = central.readUInt16LE(at + 8);
|
|
58
|
+
const nameLength = central.readUInt16LE(at + 28);
|
|
59
|
+
const extraLength = central.readUInt16LE(at + 30);
|
|
60
|
+
const commentLength = central.readUInt16LE(at + 32);
|
|
61
|
+
const name = central.toString("utf8", at + 46, at + 46 + nameLength);
|
|
62
|
+
const entry = {
|
|
63
|
+
name,
|
|
64
|
+
method: central.readUInt16LE(at + 10),
|
|
65
|
+
crc: central.readUInt32LE(at + 16),
|
|
66
|
+
compressed: central.readUInt32LE(at + 20),
|
|
67
|
+
size: central.readUInt32LE(at + 24),
|
|
68
|
+
offset: central.readUInt32LE(at + 42)
|
|
69
|
+
};
|
|
70
|
+
at += 46 + nameLength + extraLength + commentLength;
|
|
71
|
+
if (name.endsWith("/") || flags & 1 || entry.method !== 0 && entry.method !== 8) continue;
|
|
72
|
+
if (entry.size === 4294967295 || entry.compressed === 4294967295) continue;
|
|
73
|
+
out.push(entry);
|
|
74
|
+
}
|
|
75
|
+
return out;
|
|
76
|
+
}
|
|
77
|
+
async function readZipEntry(path, entry) {
|
|
78
|
+
if (entry.size > COURSE_BUNDLE_LIMITS.maxEntryBytes) throw new Error(`${entry.name} is larger than a bundle member may be.`);
|
|
79
|
+
const fileSize = await sizeOf(path);
|
|
80
|
+
if (entry.compressed > COURSE_BUNDLE_LIMITS.maxEntryBytes || entry.offset + 30 + entry.compressed > fileSize) throw new Error(`${entry.name} has an implausible compressed size.`);
|
|
81
|
+
const local = await readAt(path, entry.offset, 30);
|
|
82
|
+
if (local.length < 30 || local.readUInt32LE(0) !== LOCAL) throw new Error(`${entry.name} has a damaged local header.`);
|
|
83
|
+
const data = await readAt(path, entry.offset + 30 + local.readUInt16LE(26) + local.readUInt16LE(28), entry.compressed);
|
|
84
|
+
if (data.length !== entry.compressed) throw new Error(`${entry.name} is truncated.`);
|
|
85
|
+
const bytes = entry.method === 0 ? data : inflateRawSync(data, { maxOutputLength: Math.max(entry.size, 1) });
|
|
86
|
+
if (bytes.length !== entry.size || crc32(bytes) !== entry.crc) throw new Error(`${entry.name} failed its size or checksum check.`);
|
|
87
|
+
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
88
|
+
}
|
|
89
|
+
var exportOf = (zipName) => /-(\d{8}T\d{6}Z)-/.exec(zipName)?.[1] ?? "";
|
|
90
|
+
function folderClassCrunchLabsSource(directory) {
|
|
91
|
+
return { async files() {
|
|
92
|
+
const out = [];
|
|
93
|
+
const walk = async (dir, depth) => {
|
|
94
|
+
if (depth > MAX_DEPTH) return;
|
|
95
|
+
const children = await readdir(dir, { withFileTypes: true });
|
|
96
|
+
for (const child of children.sort((a, b) => a.name < b.name ? -1 : 1)) {
|
|
97
|
+
if (child.name.startsWith(".")) continue;
|
|
98
|
+
const full = join(dir, child.name);
|
|
99
|
+
if (child.isSymbolicLink()) continue;
|
|
100
|
+
if (child.isDirectory()) {
|
|
101
|
+
await walk(full, depth + 1);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (!child.isFile()) continue;
|
|
105
|
+
if (/\.zip$/i.test(child.name)) {
|
|
106
|
+
const exportId = exportOf(child.name);
|
|
107
|
+
for (const entry of await listZip(full)) out.push({
|
|
108
|
+
path: entry.name,
|
|
109
|
+
size: entry.size,
|
|
110
|
+
crc32: entry.crc.toString(16).padStart(8, "0"),
|
|
111
|
+
exportId,
|
|
112
|
+
read: () => readZipEntry(full, entry)
|
|
113
|
+
});
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
const size = lstatSync(full).size;
|
|
117
|
+
out.push({
|
|
118
|
+
path: relative(directory, full).split(sep).join("/"),
|
|
119
|
+
size,
|
|
120
|
+
read: async () => {
|
|
121
|
+
if (size > COURSE_BUNDLE_LIMITS.maxEntryBytes) throw new Error(`${child.name} is larger than a bundle member may be.`);
|
|
122
|
+
return new Uint8Array(await readFile(full));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
await walk(directory, 0);
|
|
128
|
+
return out;
|
|
129
|
+
} };
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
export { folderClassCrunchLabsSource };
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=node.js.map
|
package/dist/node.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","names":[],"sources":["../src/sources/class-crunchlabs-files.ts"],"sourcesContent":["/**\n * Node readers for Class CrunchLabs unit downloads on disk (SMRT #4616): a\n * folder, or the zip parts a Drive export splits it into, or both mixed. Zips\n * are read lazily from their central directory, so a multi-gigabyte part that\n * is mostly video costs only the few entries that are actually used. Server\n * only (`node:fs`, `node:zlib`).\n */\nimport { type Dirent, lstatSync } from 'node:fs';\nimport { open, readdir, readFile } from 'node:fs/promises';\nimport { basename, join, relative, sep } from 'node:path';\nimport { inflateRawSync } from 'node:zlib';\nimport { COURSE_BUNDLE_LIMITS } from '../course-bundle-contracts.js';\nimport { crc32 } from '../course-bundle-zip.js';\nimport type {\n ClassCrunchLabsFile,\n ClassCrunchLabsFileSource,\n} from './class-crunchlabs.js';\n\nconst EOCD = 0x06054b50;\nconst CENTRAL = 0x02014b50;\nconst LOCAL = 0x04034b50;\nconst MAX_CENTRAL_DIRECTORY = 16 * 1024 * 1024;\nconst MAX_DEPTH = 8;\n\ninterface ZipEntry {\n name: string;\n method: number;\n crc: number;\n compressed: number;\n size: number;\n offset: number;\n}\n\nasync function readAt(\n path: string,\n position: number,\n length: number,\n): Promise<Buffer> {\n const handle = await open(path, 'r');\n try {\n // Never allocate more than the file can supply, whatever a header claims.\n const available = Math.max(0, (await handle.stat()).size - position);\n const buffer = Buffer.alloc(Math.min(length, available));\n const { bytesRead } = await handle.read(buffer, 0, buffer.length, position);\n return buffer.subarray(0, bytesRead);\n } finally {\n await handle.close();\n }\n}\n\nasync function sizeOf(path: string): Promise<number> {\n const handle = await open(path, 'r');\n try {\n return (await handle.stat()).size;\n } finally {\n await handle.close();\n }\n}\n\n/** The file entries of a zip, from its central directory alone. */\nasync function listZip(path: string): Promise<ZipEntry[]> {\n const handle = await open(path, 'r');\n let total: number;\n try {\n total = (await handle.stat()).size;\n } finally {\n await handle.close();\n }\n const tailLength = Math.min(total, 22 + 0xffff);\n const tail = await readAt(path, total - tailLength, tailLength);\n let eocd = -1;\n for (let i = tail.length - 22; i >= 0; i--) {\n if (\n tail.readUInt32LE(i) === EOCD &&\n i + 22 + tail.readUInt16LE(i + 20) === tail.length\n ) {\n eocd = i;\n break;\n }\n }\n if (eocd === -1) throw new Error(`${basename(path)} is not a readable zip.`);\n const entries = tail.readUInt16LE(eocd + 10);\n const size = tail.readUInt32LE(eocd + 12);\n const offset = tail.readUInt32LE(eocd + 16);\n if (\n tail.readUInt16LE(eocd + 4) !== 0 ||\n tail.readUInt16LE(eocd + 6) !== 0 ||\n entries === 0xffff ||\n size === 0xffffffff ||\n offset === 0xffffffff\n )\n throw new Error(`${basename(path)} is a zip64 or multi-disk archive.`);\n if (size > MAX_CENTRAL_DIRECTORY || offset + size > total)\n throw new Error(`${basename(path)} has an invalid central directory.`);\n const central = await readAt(path, offset, size);\n const out: ZipEntry[] = [];\n let at = 0;\n for (let n = 0; n < entries; n++) {\n if (at + 46 > central.length || central.readUInt32LE(at) !== CENTRAL)\n throw new Error(`${basename(path)} has a damaged central directory.`);\n const flags = central.readUInt16LE(at + 8);\n const nameLength = central.readUInt16LE(at + 28);\n const extraLength = central.readUInt16LE(at + 30);\n const commentLength = central.readUInt16LE(at + 32);\n const name = central.toString('utf8', at + 46, at + 46 + nameLength);\n const entry: ZipEntry = {\n name,\n method: central.readUInt16LE(at + 10),\n crc: central.readUInt32LE(at + 16),\n compressed: central.readUInt32LE(at + 20),\n size: central.readUInt32LE(at + 24),\n offset: central.readUInt32LE(at + 42),\n };\n at += 46 + nameLength + extraLength + commentLength;\n // Directories, encrypted entries and exotic methods are not unit files.\n if (\n name.endsWith('/') ||\n flags & 1 ||\n (entry.method !== 0 && entry.method !== 8)\n )\n continue;\n if (entry.size === 0xffffffff || entry.compressed === 0xffffffff) continue;\n out.push(entry);\n }\n return out;\n}\n\nasync function readZipEntry(\n path: string,\n entry: ZipEntry,\n): Promise<Uint8Array> {\n if (entry.size > COURSE_BUNDLE_LIMITS.maxEntryBytes)\n throw new Error(`${entry.name} is larger than a bundle member may be.`);\n // A hostile header may claim a payload far beyond the member limit or the file.\n const fileSize = await sizeOf(path);\n if (\n entry.compressed > COURSE_BUNDLE_LIMITS.maxEntryBytes ||\n entry.offset + 30 + entry.compressed > fileSize\n )\n throw new Error(`${entry.name} has an implausible compressed size.`);\n const local = await readAt(path, entry.offset, 30);\n if (local.length < 30 || local.readUInt32LE(0) !== LOCAL)\n throw new Error(`${entry.name} has a damaged local header.`);\n const start =\n entry.offset + 30 + local.readUInt16LE(26) + local.readUInt16LE(28);\n const data = await readAt(path, start, entry.compressed);\n if (data.length !== entry.compressed)\n throw new Error(`${entry.name} is truncated.`);\n const bytes =\n entry.method === 0\n ? data\n : inflateRawSync(data, { maxOutputLength: Math.max(entry.size, 1) });\n if (bytes.length !== entry.size || crc32(bytes) !== entry.crc)\n throw new Error(`${entry.name} failed its size or checksum check.`);\n return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n}\n\n/** Drive names parts like `Unit_Class CrunchLabs-20261102T164712Z-1-001.zip`; the timestamp orders exports. */\nconst exportOf = (zipName: string) =>\n /-(\\d{8}T\\d{6}Z)-/.exec(zipName)?.[1] ?? '';\n\n/**\n * Every unit file under `directory`: plain files, and the entries of any `.zip`\n * (a zip is not expanded into the filesystem, and a zip inside a zip is not\n * opened). Symbolic links are skipped; hidden files are ignored.\n */\nexport function folderClassCrunchLabsSource(\n directory: string,\n): ClassCrunchLabsFileSource {\n return {\n async files() {\n const out: ClassCrunchLabsFile[] = [];\n const walk = async (dir: string, depth: number): Promise<void> => {\n if (depth > MAX_DEPTH) return;\n const children: Dirent[] = await readdir(dir, { withFileTypes: true });\n for (const child of children.sort((a, b) =>\n a.name < b.name ? -1 : 1,\n )) {\n if (child.name.startsWith('.')) continue;\n const full = join(dir, child.name);\n if (child.isSymbolicLink()) continue;\n if (child.isDirectory()) {\n await walk(full, depth + 1);\n continue;\n }\n if (!child.isFile()) continue;\n if (/\\.zip$/i.test(child.name)) {\n const exportId = exportOf(child.name);\n for (const entry of await listZip(full))\n out.push({\n path: entry.name,\n size: entry.size,\n crc32: entry.crc.toString(16).padStart(8, '0'),\n exportId,\n read: () => readZipEntry(full, entry),\n });\n continue;\n }\n const size = lstatSync(full).size;\n out.push({\n path: relative(directory, full).split(sep).join('/'),\n size,\n read: async () => {\n if (size > COURSE_BUNDLE_LIMITS.maxEntryBytes)\n throw new Error(\n `${child.name} is larger than a bundle member may be.`,\n );\n return new Uint8Array(await readFile(full));\n },\n });\n }\n };\n await walk(directory, 0);\n return out;\n },\n };\n}\n"],"mappings":";;;;;;AAkBA,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,wBAAwB,KAAK,OAAO;AAC1C,IAAM,YAAY;AAWlB,eAAe,OACb,MACA,UACA,QACiB;CACjB,MAAM,SAAS,MAAM,KAAK,MAAM,GAAG;CACnC,IAAI;EAEF,MAAM,YAAY,KAAK,IAAI,IAAI,MAAM,OAAO,KAAK,EAAA,CAAG,OAAO,QAAQ;EACnE,MAAM,SAAS,OAAO,MAAM,KAAK,IAAI,QAAQ,SAAS,CAAC;EACvD,MAAM,EAAE,cAAc,MAAM,OAAO,KAAK,QAAQ,GAAG,OAAO,QAAQ,QAAQ;EAC1E,OAAO,OAAO,SAAS,GAAG,SAAS;CACrC,UAAE;EACA,MAAM,OAAO,MAAM;CACrB;AACF;AAEA,eAAe,OAAO,MAA+B;CACnD,MAAM,SAAS,MAAM,KAAK,MAAM,GAAG;CACnC,IAAI;EACF,QAAQ,MAAM,OAAO,KAAK,EAAA,CAAG;CAC/B,UAAE;EACA,MAAM,OAAO,MAAM;CACrB;AACF;AAGA,eAAe,QAAQ,MAAmC;CACxD,MAAM,SAAS,MAAM,KAAK,MAAM,GAAG;CACnC,IAAI;CACJ,IAAI;EACF,SAAS,MAAM,OAAO,KAAK,EAAA,CAAG;CAChC,UAAE;EACA,MAAM,OAAO,MAAM;CACrB;CACA,MAAM,aAAa,KAAK,IAAI,OAAO,KAAW;CAC9C,MAAM,OAAO,MAAM,OAAO,MAAM,QAAQ,YAAY,UAAU;C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