wrong-notebook 2026.11.9 → 2026.11.10-1
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
- package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/admin/cnm-tags/route.js +4 -4
- package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js +15 -14
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/export/route.js +7 -7
- package/.next/server/app/api/admin/debug-logs/export/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/route.js +8 -8
- package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/eula/accept/route.js +7 -7
- package/.next/server/app/api/admin/eula/accept/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/system-reset/route.js +8 -8
- package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/telemetry/route.js +7 -7
- package/.next/server/app/api/admin/telemetry/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/detail/route.js +15 -14
- package/.next/server/app/api/admin/users/[id]/detail/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/route.js +9 -9
- package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/route.js +4 -4
- package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +7 -7
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +14 -14
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +14 -14
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/delete/route.js +6 -6
- package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/figure/route.js +13 -13
- package/.next/server/app/api/error-items/[id]/figure/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/fix-latex/route.js +15 -15
- package/.next/server/app/api/error-items/[id]/fix-latex/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/geogebra/route.js +15 -15
- package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/image/route.js +9 -9
- package/.next/server/app/api/error-items/[id]/image/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/notes/route.js +7 -7
- package/.next/server/app/api/error-items/[id]/notes/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/practice-records/route.js +10 -10
- package/.next/server/app/api/error-items/[id]/practice-records/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/reanswer/route.js +14 -14
- package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/retag/route.js +20 -20
- package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/route.js +11 -11
- package/.next/server/app/api/error-items/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +13 -13
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js +13 -13
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/answer-space/route.js +9 -8
- package/.next/server/app/api/error-items/answer-space/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/batch-delete/route.js +7 -7
- package/.next/server/app/api/error-items/batch-delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/batch-move/route.js +7 -7
- package/.next/server/app/api/error-items/batch-move/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/clear/route.js +6 -6
- package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/export-questions/route.js +7 -7
- package/.next/server/app/api/error-items/export-questions/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/list/route.js +7 -7
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +15 -15
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/short/[shortId]/route.js +10 -10
- package/.next/server/app/api/error-items/short/[shortId]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/similarity/route.js +7 -6
- package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
- package/.next/server/app/api/eula/status/route.js +4 -4
- package/.next/server/app/api/eula/status/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +17 -17
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/results/route.js +19 -18
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +15 -15
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +19 -19
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +17 -17
- package/.next/server/app/api/exams/route.js.nft.json +1 -1
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +12 -12
- package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/import/route.js +15 -15
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +22 -22
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/fix-text/route.js +17 -17
- package/.next/server/app/api/import-batches/[id]/fix-text/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/read/route.js +19 -19
- package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/retry/route.js +22 -22
- package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/route.js +19 -19
- package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/start/route.js +19 -19
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +19 -19
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +23 -23
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/read/route.js +23 -23
- package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/retry/route.js +20 -20
- package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/route.js +23 -23
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +19 -19
- package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/initialize/route.js.nft.json +1 -1
- package/.next/server/app/api/logs/frontend/route.js +7 -7
- package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/checkin/route.js +9 -8
- package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/login/route.js +6 -6
- package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/route.js +9 -8
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +18 -18
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/route.js +7 -7
- package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/route.js +7 -7
- package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +16 -16
- package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/[id]/route.js +8 -8
- package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/route.js +8 -8
- package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +12 -12
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +13 -13
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +12 -11
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +15 -14
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +16 -16
- package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/server/app/api/register/status/route.js.nft.json +1 -1
- package/.next/server/app/api/requests/[id]/route.js +10 -9
- package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js +14 -14
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +6 -6
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js +4 -4
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/activity/route.js +7 -7
- package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js +9 -9
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js +8 -7
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/repeated-mistakes/route.js +13 -13
- package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/weak-tags/route.js +13 -13
- package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js +6 -6
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js +6 -6
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/suggestions/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js +6 -6
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/telemetry/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/[id]/route.js +6 -6
- package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/batch/route.js +5 -5
- package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/route.js +7 -6
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js +9 -9
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- package/.next/server/app/api/user/ai-consent/route.js +4 -4
- package/.next/server/app/api/user/ai-consent/route.js.nft.json +1 -1
- package/.next/server/app/api/user/route.js +18 -18
- package/.next/server/app/api/user/route.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/eula/page.js.nft.json +1 -1
- package/.next/server/app/eula/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/page.js.nft.json +1 -1
- package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/initialize/page.js.nft.json +1 -1
- package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/practice/page.js.nft.json +1 -1
- package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
- package/.next/server/app/print-preview/page.js.nft.json +1 -1
- package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/register/page.js.nft.json +1 -1
- package/.next/server/app/register/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js.nft.json +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/stats/page.js.nft.json +1 -1
- package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tags/page.js.nft.json +1 -1
- package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0b-dbtjjuyqh7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0eu-sj70e2vc_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0re-_v5h69w84._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0w9f5-xtpane-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10ql7etwm_88-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12u2irl6e293j._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__00qar_0vt8v5r._.js → [root-of-the-server]__13cki3v6cufcx._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1_1_1tvp-qw4m._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1d6_-dqu878pe._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0yk3ow36t_w2_._.js → [root-of-the-server]__1gkabltrjg-t4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1i70uvkdts-q1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1i_tefn2lhztv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ii2yvizq9zx8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jwd70xukhvz4._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1-i8tof72l68m._.js → [root-of-the-server]__1jwj83lfyd4sd._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1kxlw9suxnfs2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ld7m10shogtt._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0ms1rulcx_yuq._.js → [root-of-the-server]__1pdsfjtgtncsg._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1v3kta6bd_kv9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vg4na3a-hvwi._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1vngkcd8tjzqw._.js → [root-of-the-server]__1w6vhjjteqg1c._.js} +2 -2
- package/.next/server/chunks/_00uecgrfe4u3v._.js +3 -0
- package/.next/server/chunks/_00vu1-junzbq-._.js +1 -1
- package/.next/server/chunks/_020v6nmfgswzk._.js +3 -0
- package/.next/server/chunks/_02qwqg9i39x4_._.js +1 -1
- package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
- package/.next/server/chunks/_06b8raa_4t5sh._.js +3 -0
- package/.next/server/chunks/_07lsh-avsfs95._.js +3 -0
- package/.next/server/chunks/_08znit_7g_ij-._.js +3 -0
- package/.next/server/chunks/_0b6eoc8pstjna._.js +3 -0
- package/.next/server/chunks/_0f13poypqhhoi._.js +3 -0
- package/.next/server/chunks/_0lefxjtzxvqe3._.js +3 -0
- package/.next/server/chunks/_0po48rvqz03dg._.js +1 -1
- package/.next/server/chunks/_0sodl2zlxpsl3._.js +3 -0
- package/.next/server/chunks/_0ta62b-tktnk8._.js +1 -1
- package/.next/server/chunks/_0xlf42pjv7whr._.js +3 -0
- package/.next/server/chunks/_0xrmor_-l-mb7._.js +1 -1
- package/.next/server/chunks/_0zs7jfzzshbfq._.js +1 -1
- package/.next/server/chunks/_1-nifxdtdpf_3._.js +3 -0
- package/.next/server/chunks/_101n94i9f9jx_._.js +3 -0
- package/.next/server/chunks/_10iqdc8-yics0._.js +3 -0
- package/.next/server/chunks/_12w5k19rc45j_._.js +1 -1
- package/.next/server/chunks/_12xi_xqvtrn3k._.js +1 -1
- package/.next/server/chunks/_14l8uqb__fhx_._.js +1 -1
- package/.next/server/chunks/_17dkyjg1d51kw._.js +3 -0
- package/.next/server/chunks/_1beds3k7qxfby._.js +3 -0
- package/.next/server/chunks/_1csx8ckltgali._.js +1 -1
- package/.next/server/chunks/_1efoql5qkyxx7._.js +3 -0
- package/.next/server/chunks/_1eqnx6dcz6a03._.js +1 -1
- package/.next/server/chunks/_1feimqjhlznj8._.js +3 -0
- package/.next/server/chunks/_1gtuhmdu6udof._.js +1 -1
- package/.next/server/chunks/_1lxrt-tu_a2ul._.js +3 -0
- package/.next/server/chunks/_1ooq1_fguyb4w._.js +1 -1
- package/.next/server/chunks/_1t19v24mb3ia0._.js +3 -0
- package/.next/server/chunks/_1vrjtg-0hy-bz._.js +3 -0
- package/.next/server/chunks/_1wdbh7n2egysd._.js +3 -0
- package/.next/server/chunks/_1yk4m2dpf3g7z._.js +1 -1
- package/.next/server/chunks/_1yvd01woddaxt._.js +1 -1
- package/.next/server/chunks/src_lib_078zldkqc-a67._.js +3 -0
- package/.next/server/chunks/src_lib_08ikp0ctr29c7._.js +3 -0
- package/.next/server/chunks/src_lib_08pkzyxoaihvr._.js +3 -0
- package/.next/server/chunks/src_lib_0dqw33jb3ka8g._.js +3 -0
- package/.next/server/chunks/src_lib_0h-tponh1-7j6._.js +3 -0
- package/.next/server/chunks/src_lib_0j02yeqekyrst._.js +3 -0
- package/.next/server/chunks/src_lib_0lmersyim_y14._.js +3 -0
- package/.next/server/chunks/src_lib_0tg0r917l7yn-._.js +3 -0
- package/.next/server/chunks/src_lib_0ugn3ny6rrd7v._.js +3 -0
- package/.next/server/chunks/src_lib_0wnimconywq6b._.js +3 -0
- package/.next/server/chunks/src_lib_1-q39dava8lyt._.js +3 -0
- package/.next/server/chunks/src_lib_10ykmf7h-50q1._.js +3 -0
- package/.next/server/chunks/src_lib_14vlkix_t4jf2._.js +3 -0
- package/.next/server/chunks/src_lib_1ejhz5p1wt0op._.js +3 -0
- package/.next/server/chunks/src_lib_1gxlmye98myql._.js +3 -0
- package/.next/server/chunks/src_lib_1hq7hqwsh9h5t._.js +3 -0
- package/.next/server/chunks/src_lib_1lhg90rnfvakd._.js +3 -0
- package/.next/server/chunks/src_lib_1o3tjd1o5cimp._.js +3 -0
- package/.next/server/chunks/{src_lib_11y241q--pwf_._.js → src_lib_1sq92-zezp0_w._.js} +1 -1
- package/.next/server/chunks/src_lib_1z4t4i-xke74u._.js +3 -0
- package/.next/server/chunks/src_lib_2019ko5qy0_13._.js +3 -0
- package/.next/server/chunks/src_lib_api-handler_ts_1hzoxowg0vckl._.js +3 -0
- package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +2 -2
- package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +1 -1
- package/.next/server/chunks/src_lib_question_0uw17e6at-i_h._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +1 -1
- package/.next/server/chunks/src_lib_schemas_error-items_ts_0vdof4417rd3y._.js +1 -1
- package/.next/server/chunks/{src_lib_telemetry_server_ts_04s9gvl8y_-5j._.js → src_lib_telemetry_server_ts_02pcxs3asq5uc._.js} +1 -1
- package/.next/server/chunks/{src_lib_telemetry_server_ts_0hbu8_zacpzfj._.js → src_lib_telemetry_server_ts_03-yhnattpl91._.js} +1 -1
- package/.next/server/chunks/{src_lib_telemetry_server_ts_0k44kaxm3s7b7._.js → src_lib_telemetry_server_ts_03b98rv_b2seb._.js} +1 -1
- package/.next/server/chunks/{src_lib_telemetry_server_ts_0ptn-gkeht1dg._.js → src_lib_telemetry_server_ts_121v_vzqx287h._.js} +1 -1
- package/.next/server/chunks/src_lib_telemetry_server_ts_1cd1qcjm2imrt._.js +3 -0
- package/.next/server/chunks/src_lib_telemetry_server_ts_1n-wydymc9ayv._.js +3 -0
- package/.next/server/chunks/src_lib_telemetry_server_ts_1nwnpm99c4ae8._.js +3 -0
- package/.next/server/chunks/ssr/_05k02824g2tpo._.js +1 -1
- package/.next/server/chunks/ssr/{_12x0l20ysatxn._.js → _090e6vf_k0pe9._.js} +2 -2
- package/.next/server/chunks/ssr/{_1m8y_pv3jak70._.js → _0is6rtsx_9ka7._.js} +1 -1
- package/.next/server/chunks/ssr/_0p3bqrojxwfs0._.js +1 -1
- package/.next/server/chunks/ssr/_0xlbgtld9_r3o._.js +1 -1
- package/.next/server/chunks/ssr/_1ctycpq4tb8xw._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_0r81ft4mt93or._.js → node_modules_1i644g-kqgnm_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_03m-1das3a4fz.js → node_modules_heic-to_dist_csp_heic-to_0sz_snu3yd_63.js} +1 -1
- package/.next/server/chunks/ssr/src_app_error-items_[id]_page_tsx_04xwwdmyh7_9q._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-batches_[id]_page_tsx_0mhg_vriwmkkw._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-tasks_[id]_page_tsx_0_grj11-jdqqc._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_add_page_tsx_179tow1ql6vc_._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_page_tsx_08njm-5-txm8_._.js +1 -1
- package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +2 -2
- package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +3 -3
- package/.next/server/chunks/ssr/src_components_image-cropper_tsx_0pcp8-ifruyx-._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +2 -2
- package/.next/server/chunks/ssr/src_contexts_LanguageContext_tsx_0r6xucmeu1k5z._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_0773v8b5gb93o._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_1qhs590-z9xnh._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_1z8akixo3j8ti._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/server/preview-props.json +3 -3
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{321kq8xr7a6_r.js → 0_ysyni00uuve.js} +1 -1
- package/.next/static/chunks/0alfkmfoq-e76.js +1 -0
- package/.next/static/chunks/0f9-00nh1upvn.js +8 -0
- package/.next/static/chunks/0gs3bacq7z36z.js +1 -0
- package/.next/static/chunks/{1_lxyr04qvsxk.js → 1-p-0kczwnip9.js} +4 -4
- package/.next/static/chunks/13aykr4b9nzmt.js +9 -0
- package/.next/static/chunks/14zevcjua-k8z.js +1 -0
- package/.next/static/chunks/1_4nz7m2jathb.js +1 -0
- package/.next/static/chunks/1rlw59dtd-wn9.js +6 -0
- package/.next/static/chunks/26is31yphg3a0.css +3 -0
- package/.next/static/chunks/28qc_d51g0z--.js +9 -0
- package/.next/static/chunks/2s65brxj4r_r8.js +1 -0
- package/.next/static/chunks/2wrdjh0-kibv1.js +1 -0
- package/.next/static/chunks/{172dko4hv3xbk.js → 315-5a18eawtj.js} +3 -3
- package/.next/static/chunks/3h3a7lg3-9cbn.js +1 -0
- package/.next/static/chunks/{3z7dqcxfd75wa.js → 3keaieh9lgnr3.js} +2 -2
- package/.next/static/chunks/{0ocb49htmlhl5.js → 3ls9d-zeu8xdr.js} +2 -2
- package/.next/static/chunks/3ywx02bmgr0jm.js +1 -0
- package/.next/static/chunks/42kbpcy0oxrc-.js +1 -0
- package/.next/static/chunks/431ssxm5rrwz9.js +1 -0
- package/.next/static/chunks/44v-w00lig6l4.js +1 -0
- package/package.json +1 -1
- package/prisma/migrations/20261110000000_default_review_before_import/migration.sql +33 -0
- package/prisma/migrations/20261110000001_import_task_source/migration.sql +2 -0
- package/prisma/schema.prisma +2 -1
- package/prisma/seed.db +0 -0
- package/.next/server/chunks/[root-of-the-server]__0ar2vbvo840d-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ifivl2todel2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0n9xugvjq0zol._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0w6c1msz1xtdu._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0w_dr_s2zzqcd._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0xh5bb2c_6c9c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0yf1e2v3dwhh5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0z6act451-e8y._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__17o5ki60ndwjg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19iyo44u41f6y._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1bd0rsh28altd._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1nasewrsaxrlv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1pvdepfrlr1-e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1r2swm8swgb8u._.js +0 -3
- package/.next/server/chunks/_0-cbnx3g3djb0._.js +0 -3
- package/.next/server/chunks/_0dnqbyfo7_68d._.js +0 -3
- package/.next/server/chunks/_0euocr-coaqik._.js +0 -3
- package/.next/server/chunks/_0fvn09pm56f5c._.js +0 -3
- package/.next/server/chunks/_0l_1b3meaox2k._.js +0 -3
- package/.next/server/chunks/_0ljzic33s4u5j._.js +0 -3
- package/.next/server/chunks/_0msz759j3_j49._.js +0 -3
- package/.next/server/chunks/_0nw90thm3bo4l._.js +0 -3
- package/.next/server/chunks/_0qabe5g22z5te._.js +0 -3
- package/.next/server/chunks/_0t2z6hqe_64cx._.js +0 -3
- package/.next/server/chunks/_0tktp4y6lb9uv._.js +0 -3
- package/.next/server/chunks/_0vl9yb309ero1._.js +0 -3
- package/.next/server/chunks/_12dxzk9gyci2a._.js +0 -3
- package/.next/server/chunks/_1ds1oiznivdbk._.js +0 -3
- package/.next/server/chunks/_1eixvuh0vryjo._.js +0 -3
- package/.next/server/chunks/_1iqu8im2_w245._.js +0 -3
- package/.next/server/chunks/_1llkon9veg476._.js +0 -3
- package/.next/server/chunks/_1op7hx6zu6ybj._.js +0 -3
- package/.next/server/chunks/_1pzo4q3yg5f57._.js +0 -3
- package/.next/server/chunks/_1z1uutzmdk81m._.js +0 -3
- package/.next/server/chunks/src_lib_01gngn1m9i35_._.js +0 -3
- package/.next/server/chunks/src_lib_0oxhoj8rkufoe._.js +0 -3
- package/.next/server/chunks/src_lib_0uv8inw48qq9_._.js +0 -3
- package/.next/server/chunks/src_lib_1-9hy2bx_0k7z._.js +0 -3
- package/.next/server/chunks/src_lib_1-tyfr__vw2-e._.js +0 -3
- package/.next/server/chunks/src_lib_112p9x7kbw8a7._.js +0 -3
- package/.next/server/chunks/src_lib_11ce6iw15f7y2._.js +0 -3
- package/.next/server/chunks/src_lib_17ww8fw26k_5c._.js +0 -3
- package/.next/server/chunks/src_lib_19wyrgsqc6869._.js +0 -3
- package/.next/server/chunks/src_lib_1bzw3hjm_9u2p._.js +0 -3
- package/.next/server/chunks/src_lib_1je9q_qxmd-z0._.js +0 -3
- package/.next/server/chunks/src_lib_1x_55q3hwt0z5._.js +0 -3
- package/.next/server/chunks/src_lib_1yw_vc01va60_._.js +0 -3
- package/.next/server/chunks/src_lib_1z24jdjfkbdxm._.js +0 -3
- package/.next/server/chunks/src_lib_telemetry_server_ts_0rul_098wmjn7._.js +0 -3
- package/.next/server/chunks/src_lib_telemetry_server_ts_10dl7t48m7u9e._.js +0 -3
- package/.next/server/chunks/src_lib_telemetry_server_ts_12x72t_dxd7w6._.js +0 -3
- package/.next/server/chunks/src_lib_telemetry_server_ts_15p258rq4wt4n._.js +0 -3
- package/.next/server/chunks/src_lib_telemetry_server_ts_15u7_y30fkz4t._.js +0 -3
- package/.next/server/chunks/src_lib_telemetry_server_ts_19h24quae1zdn._.js +0 -3
- package/.next/server/chunks/src_lib_telemetry_server_ts_1gl12ssni1itx._.js +0 -3
- package/.next/server/chunks/src_lib_telemetry_server_ts_20_hb8la0053f._.js +0 -3
- package/.next/static/chunks/0-3d2l_vcliz4.js +0 -6
- package/.next/static/chunks/032xzuhi_gy7t.js +0 -1
- package/.next/static/chunks/0b_bdug9u1cxw.js +0 -1
- package/.next/static/chunks/0xo3qpipk_k3u.js +0 -1
- package/.next/static/chunks/135mrn0ll7pgh.js +0 -1
- package/.next/static/chunks/142ggarrxy3ku.js +0 -9
- package/.next/static/chunks/1v01oqugf1j5g.js +0 -1
- package/.next/static/chunks/2-9lp8_rdefk8.js +0 -9
- package/.next/static/chunks/23h7edvgzvaoi.js +0 -8
- package/.next/static/chunks/2secy011jtksr.js +0 -1
- package/.next/static/chunks/2xn7pbo1omgg1.css +0 -3
- package/.next/static/chunks/32hvb4b-e4jpa.js +0 -1
- package/.next/static/chunks/3hft-37m4c_s4.js +0 -1
- package/.next/static/chunks/3rnbnqcge4lza.js +0 -1
- package/.next/static/chunks/3zg1w_3pn3z75.js +0 -1
- /package/.next/static/{0JoSoS7R5eSRY6Mqjl1Tb → 1heBxJAn8W1zrb_ATqYyw}/_buildManifest.js +0 -0
- /package/.next/static/{0JoSoS7R5eSRY6Mqjl1Tb → 1heBxJAn8W1zrb_ATqYyw}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{0JoSoS7R5eSRY6Mqjl1Tb → 1heBxJAn8W1zrb_ATqYyw}/_ssgManifest.js +0 -0
|
@@ -52,6 +52,6 @@ ${t.join("\n")}
|
|
|
52
52
|
|
|
53
53
|
`)}return i.write("payload.value = newResult;"),i.write("return payload;"),i.compile()})(t.shape)),c=n(c,d),l)?rk([],f,c,d,r,e,d?.abortEarly===!0):c:i(c,d):(c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c)}});function rS(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter(e=>!eg(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>e$(e,r,e1())))}),t)}let rx=eq("$ZodUnion",(e,t)=>{nN.init(e,t),eK(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),eK(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),eK(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),eK(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>P(e.source)).join("|")})$`)}});let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>rS(t,r,e,i)):rS(a,r,e,i)}});function rP(e,t,n,r){let i=[];for(let t=0;t<e.length;t++)0===e[t].issues.length&&i.push(t);return 1===i.length?t.value=e[i[0]].value:0===i.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>e$(e,r,e1())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t}(e,t)=>{rx.init(e,t),t.inclusive=!1;let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(a.push(t),o=!0):a.push(t)}return o?Promise.all(a).then(t=>rP(t,r,e,i)):rP(a,r,e,i)}};let rA=eq("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,rx.init(e,t);let n=e._zod.parse;eK(e,"propValues",e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);for(let[r,o]of(i[e.def.discriminator]?.has(void 0)&&n++,Object.entries(i)))for(let e of(Object.prototype.hasOwnProperty.call(t,r)||T(t,r,new Set),o))t[r].add(e)}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=N(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=S(()=>(function(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||0===r.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t})(t));e._zod.parse=(i,o)=>{let a=i.value;if(!W(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let s=a?.[t.discriminator],u=r.value.get(s);return u&&(void 0!==s||"backward"!==o.direction)?u._zod.run(i,o):t.unionFallback||"backward"===o.direction?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>null!==r.value.get(e)),input:a,path:[t.discriminator],inst:e}),i)}}),rj=eq("$ZodIntersection",(e,t)=>{nN.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,n])=>rE(e,t,n)):rE(e,i,o)}});function rE(e,t,n){let r,i=new Map,o=new Map,a=(e,t)=>{let n;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);o.has(t)||o.set(t,e),n=[t]}else r??(r=e),n=e.keys;for(let e of n)i.has(e)||i.set(e,{}),i.get(e)[t]=!0;return!0};for(let n of t.issues)a(n,"l")||e.issues.push(n);for(let t of n.issues)a(t,"r")||e.issues.push(t);let s=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=r?s.filter(e=>r.keys.includes(e)):[];for(let n of(t.length&&e.issues.push({...r,keys:t}),s))!t.includes(n)&&o.has(n)&&e.issues.push(o.get(n))}let u=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(X(t)&&X(n)){let r=Object.keys(n),i=Object.keys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of(Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__,i)){if("__proto__"===r)continue;let i=e(t[r],n[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};o[r]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let o=e(t[i],n[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!u.valid){if(eg(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}let rZ=eq("$ZodTuple",(e,t)=>{nN.init(e,t);let n=t.items,r=e0.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=r?r.alloc(e,i,[],o):[];let s=[],u=rT(n,"optin"),l=rT(n,"optout");if(!t.rest){if(a.length<u)return i.issues.push({code:"too_small",minimum:u,inclusive:!0,input:a,inst:e,origin:"array"}),i;a.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:a,inst:e,origin:"array"})}let c=Array(n.length),d=t.rest?o?.abortEarly:void 0,f=!1;for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},o);t instanceof Promise?s.push(t.then(t=>{c[e]=t})):(c[e]=t,d&&!f&&t.issues.length&&(f=eg(t)))}if(t.rest&&!f){let e=n.length-1,r=a.slice(n.length),u=i.issues.length;for(let n of r){if(d&&i.issues.length!==u){if(eg(i,u))break;u=i.issues.length}e++;let r=t.rest._zod.run({value:n,issues:[]},o);r instanceof Promise?s.push(r.then(t=>rN(t,i,e))):rN(r,i,e)}}return s.length?Promise.all(s).then(()=>rI(c,i,n,a,l)):rI(c,i,n,a,l)}});function rT(e,t){for(let n=e.length-1;n>=0;n--)if(!("optin"===t?void 0!==e[n]._zod.optin:"optional"===e[n]._zod.optout))return n+1;return 0}function rN(e,t,n){e.issues.length&&t.issues.push(...eb(n,e.issues)),t.value[n]=e.value}function rI(e,t,n,r,i){for(let o=0;o<n.length;o++){let a=e[o],s=o<r.length;if(!s&&o>=i&&"optional"===n[o]._zod.optin){t.value.length=o;break}if(a.issues.length){if(!s&&o>=i){t.value.length=o;break}t.issues.push(...eb(o,a.issues))}t.value[o]=a.value}for(let e=t.value.length-1;e>=r.length;e--)if("optional"===n[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}let rD=eq("$ZodRecord",(e,t)=>{nN.init(e,t);let n=e0.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let o=r.value;if(!X(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let u;r.value=n?n.alloc(e,r,{},i):{};let l=new Set;for(let n of s)if("string"==typeof n||"number"==typeof n||"symbol"==typeof n){if(l.add("number"==typeof n?n.toString():n),"__proto__"===n)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>e$(e,i,e1())),input:n,path:[n],inst:e});continue}let u=s.value;if("__proto__"===u)continue;let c=t.valueType._zod.run({value:o[n],issues:[]},i);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&r.issues.push(...eb(n,e.issues)),r.value[u]=e.value})):(c.issues.length&&r.issues.push(...eb(n,c.issues)),r.value[u]=c.value)}for(let e in o)if(!l.has(e))if("loose"===t.mode){if("__proto__"===e)continue;r.value[e]=o[e]}else(u=u??[]).push(e);u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}else{let u;for(let l of(r.value=n?n.alloc(e,r,{},i):{},Reflect.ownKeys(o))){if("__proto__"===l||!Object.prototype.propertyIsEnumerable.call(o,l))continue;let n=t.keyType._zod.run({value:l,issues:[]},i);if(n instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof l&&tR.test(l)&&n.issues.length){let e=t.keyType._zod.run({value:Number(l),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(n=e)}if(n.issues.length){"loose"===t.mode?r.value[l]=o[l]:s?(u=u??[]).push(l):r.issues.push({code:"invalid_key",origin:"record",issues:n.issues.map(e=>e$(e,i,e1())),input:l,path:[l],inst:e});continue}let c=n.value;if("__proto__"===c)continue;let d=t.valueType._zod.run({value:o[l],issues:[]},i);d instanceof Promise?a.push(d.then(e=>{e.issues.length&&r.issues.push(...eb(l,e.issues)),r.value[c]=e.value})):(d.issues.length&&r.issues.push(...eb(l,d.issues)),r.value[c]=d.value)}u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}return a.length?Promise.all(a).then(()=>r):r}});function rR(e,t,n,r,i,o,a){e.issues.length&&(Q.has(typeof r)?n.issues.push(...eb(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(e=>e$(e,a,e1()))})),t.issues.length&&(Q.has(typeof r)?n.issues.push(...eb(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:t.issues.map(e=>e$(e,a,e1()))})),n.value.set(e.value,t.value)}function rF(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}(e,t)=>{nN.init(e,t);let n=e0.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let o=r.value;if(!(o instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),r;let a=[];r.value=n?n.alloc(e,r,new Map,i):new Map;let s=i?.abortEarly,u=r.issues.length;for(let[n,l]of o){if(s&&r.issues.length!==u){if(eg(r,u))break;u=r.issues.length}let c=t.keyType._zod.run({value:n,issues:[]},i),d=t.valueType._zod.run({value:l,issues:[]},i);c instanceof Promise||d instanceof Promise?a.push(Promise.all([c,d]).then(([t,a])=>{rR(t,a,r,n,o,e,i)})):rR(c,d,r,n,o,e,i)}return a.length?Promise.all(a).then(()=>r):r},rh(e,rv)},(e,t)=>{nN.init(e,t);let n=e0.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let o=r.value;if(!(o instanceof Set))return r.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];r.value=n?n.alloc(e,r,new Set,i):new Set;let s=i?.abortEarly,u=r.issues.length;for(let e of o){if(s&&r.issues.length!==u){if(eg(r,u))break;u=r.issues.length}let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?a.push(n.then(e=>rF(e,r))):rF(n,r)}return a.length?Promise.all(a).then(()=>r):r},rh(e,ry)};let rC=eq("$ZodEnum",(e,t)=>{nN.init(e,t);let n=w(t.entries),r=new Set(n);e._zod.values=r,eK(e,"pattern",e=>{let t=w(e.def.entries).filter(e=>Q.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>et(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,i)=>{let o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),rM=eq("$ZodLiteral",(e,t)=>{nN.init(e,t);let n=new Set(t.values);e._zod.values=n,eK(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?et(e):e?et(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),rU=((e,t)=>{nN.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),t}},eq("$ZodTransform",(e,t)=>{nN.init(e,t),e._zod.optin="optional",e0.memoizer?.guard(e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new eQ(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new eY;return n.value=i,n}}));function rJ(e,t){return e.value=t.issues.length?void 0:t.value,e}let rL=eq("$ZodOptional",(e,t)=>{nN.init(e,t),eK(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",eK(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),eK(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${P(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>rJ(e,t)):rJ(e,r)}return t.innerType._zod.run(e,n)}}),rB=eq("$ZodExactOptional",(e,t)=>{rL.init(e,t),eK(e,"values",e=>e.def.innerType._zod.values),eK(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),rK=eq("$ZodNullable",(e,t)=>{nN.init(e,t),eK(e,"optin",e=>e.def.innerType._zod.optin),eK(e,"optout",e=>e.def.innerType._zod.optout),eK(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${P(t.source)}|null)$`):void 0}),eK(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),rV=eq("$ZodDefault",(e,t)=>{nN.init(e,t),e._zod.optin="defaulted",eK(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>rW(e,t)):rW(r,t)}});function rW(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let rG=eq("$ZodPrefault",(e,t)=>{nN.init(e,t),e._zod.optin="defaulted",eK(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),rX=eq("$ZodNonOptional",(e,t)=>{nN.init(e,t),eK(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>rH(t,e)):rH(i,e)}});function rH(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function rq(e,t,n,r){return t.issues.length?e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>e$(e,r,e1()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}(e,t)=>{nN.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new eQ("ZodSuccess");let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===r.issues.length,e)}};let rY=eq("$ZodCatch",(e,t)=>{nN.init(e,t),eK(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),eK(e,"optout",e=>e.def.innerType._zod.optout),eK(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>rq(e,r,t,n)):rq(e,r,t,n)}}),rQ=((e,t)=>{nN.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)},eq("$ZodPipe",(e,t)=>{nN.init(e,t),eK(e,"values",e=>e.def.in._zod.values),eK(e,"optin",e=>e.def.in._zod.optin),eK(e,"optout",e=>e.def.out._zod.optout),eK(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>r0(e,t.in,n)):r0(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>r0(e,t.out,n)):r0(r,t.out,n)}}));function r0(e,t,n){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function r1(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>r4(e,r,t.out,n)):r4(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>r4(e,r,t.in,n)):r4(e,r,t.in,n)}}function r4(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}(e,t)=>{nN.init(e,t),eK(e,"values",e=>e.def.in._zod.values),eK(e,"optin",e=>e.def.in._zod.optin),eK(e,"optout",e=>e.def.out._zod.optout),eK(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>r1(e,t,n)):r1(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>r1(e,t,n)):r1(r,t,n)}}},(e,t)=>{rQ.init(e,t)};let r2=eq("$ZodReadonly",(e,t)=>{nN.init(e,t),eK(e,"propValues",e=>e.def.innerType._zod.propValues),eK(e,"values",e=>e.def.innerType._zod.values),eK(e,"optin",e=>e.def.innerType?._zod?.optin),eK(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r9):r9(r)}});function r9(e){return e.memo||(e.value=Object.freeze(e.value)),e}(e,t)=>{nN.init(e,t);let n=[];for(let e of t.parts)if("object"==typeof e&&null!==e){let t=function e(t){let n=t._zod.def,r=t._zod.pattern?.source,i=n.innerType??t._zod.innerType;if(i){let t=i._zod.pattern?.source,n=e(i);return r&&t&&n&&n!==t?r.replace(P(t),()=>P(n)):r}if(n.options){let t=n.options.map(e);if(t.every(Boolean))return`^(${t.map(e=>P(e)).join("|")})$`}return function(e){let t,n,r=e._zod.def,i=r.pattern,o=!!r.format?.includes("int");for(let e of r.checks??[]){let r=e._zod.def;r.pattern&&(i=r.pattern),o||(o=!!r.format?.includes("int"));let a=r.minimum??r.length,s=r.maximum??r.length;void 0!==a&&(void 0===t||a>t)&&(t=a),void 0!==s&&(void 0===n||s<n)&&(n=s)}if(i)return i.source;if(void 0!==t&&void 0!==n&&t>n)return"(?!)";if(void 0!==t||void 0!==n)return tN({minimum:t,maximum:n}).source;let a=e._zod.pattern;return(o&&a===tR?tD:a)?.source}(t)}(e);if(!t)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);n.push(P(t))}else if(null===e||ee.has(typeof e))n.push(et(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join("")}$`),e._zod.parse=(n,r)=>("string"!=typeof n.value?n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source})),n)},(e,t)=>{nN.init(e,t),E(e._zod,"innerType",()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner)),eK(e,"pattern",e=>e.innerType?._zod?.pattern),eK(e,"propValues",e=>e.innerType?._zod?.propValues),eK(e,"optin",e=>e.innerType?._zod?.optin??void 0),eK(e,"optout",e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)};let r6=eq("$ZodCustom",(e,t)=>{t1.init(e,t),nN.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>r3(t,n,r,e));r3(i,n,r,e)}});function r3(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ej(e))}}function r5(e){return e.checks&&(e.checks=[...e.checks]),e}function r7(e,t){return new t6({check:"less_than",...er(t),value:e,inclusive:!1})}function r8(e,t){return new t6({check:"less_than",...er(t),value:e,inclusive:!0})}function ie(e,t){return new t3({check:"greater_than",...er(t),value:e,inclusive:!1})}function it(e,t){return new t3({check:"greater_than",...er(t),value:e,inclusive:!0})}function ir(e,t){return new t5({check:"multiple_of",...er(t),value:e})}function ii(e,t){return new nr({check:"max_length",...er(t),maximum:e})}function io(e,t){return new ni({check:"min_length",...er(t),minimum:e})}function ia(e,t){return new no({check:"length_equals",...er(t),length:e})}function is(e){return new nh({check:"overwrite",tx:e})}e.i(804819);var iu=e.i(23640),iu=iu,il=iu,ic=iu,id=iu,ip=iu,ih=iu,im=iu,iv=iu,iy=iu,ig=iu,i_=iu,ib=iu,iz=iu,iw=iu,ik=iu,i$=iu;function iO(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&T(e,t,n[t]);return e}function iS(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??te,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function ix(e,t,n,r,i){let o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw Error(i);return Object.assign(n,o),!0}function iP(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,r);else{let n=a.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,n,r)}let o=e._zod.parent;o&&(a.ref||(a.ref=o),iP(o,t,r),t.seen.get(o).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&iO(a.schema,u),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,r);if("set"===i.type)return e(i.valueType,r);if("lazy"===i.type)return e(i.getter(),r);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type||"catch"===i.type)return e(i.innerType,r);if("intersection"===i.type)return e(i.left,r)||e(i.right,r);if("record"===i.type||"map"===i.type)return e(i.keyType,r)||e(i.valueType,r);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,r)||e(i.out,r);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],r))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,r))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,r))return!0;if(i.rest&&e(i.rest,r))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function iA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function ij(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:i,defId:o}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${iA(o)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:"#"};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+iA(o)}})(t);r.def={...r.schema},o&&(r.defId=o);let a=r.schema;for(let e in a)delete a[e];a.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
|
|
54
54
|
|
|
55
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle){i(n);continue}r.count>1&&"ref"===e.reused&&i(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}let iE=new Set(["type","properties","required","additionalProperties"]),iZ=["oneOf","anyOf"];function iT(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function iN(e){let t=[];for(let n of e){if("object"!=typeof n||"object"!==n.type)return null;for(let e in n)if(!iE.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??iT(n);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}T(n,r,1===e.length?e[0]:iN(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=iT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function iI(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,o={...i},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):iO(i,s),iO(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let n=t.anyOf;if(!Array.isArray(n)||0===n.length||void 0!==t.type)return;let r=[];for(let t of n){if(!t||"object"!=typeof t)return;e(t);let n=Object.keys(t);if(1!==n.length||"type"!==n[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;r.includes(e)||r.push(e)}}delete t.anyOf,t.type=1===r.length?r[0]:r}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of iE)if(t in e)return;let n=t.filter(e=>iZ.some(t=>Array.isArray(e[t]))),r=null;if(n.length){let e=n[0],i=iZ.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>iN([...o,e]));if(a.some(e=>!e))return;r={[i]:a}}else r=iN(t);r&&(delete e.allOf,iO(e,r))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}iO(i,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,T(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:iD(t,"input",e.processors),output:iD(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let iD=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=iS({...i??{},target:o,io:t,processors:n});return iP(e,a),ij(a,e),iI(a,e)},iR=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},iF=(e,t,n)=>{(void 0===e[t]||n<e[t])&&(e[t]=n)},iC=(e,t)=>{iR(e,"minimum",t),iF(e,"maximum",t)},iM=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},iU=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},iJ=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},iL=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},iB=(e,t)=>iR(e,"minimum",t.minimum),iK=(e,t)=>iF(e,"maximum",t.maximum),iV=e=>(t,n)=>{iL(t,n.format);let[r,i]=e[n.format];iR(t,"minimum",r),iF(t,"maximum",i)},iW={greater_than:(e,t)=>iR(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>iF(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>iM(e,t.value),number_format:iV(es),bigint_format:iV(eu),min_length:iB,max_length:iK,length_equals:(e,t)=>iC(e,t.length),min_size:iB,max_size:iK,size_equals:(e,t)=>iC(e,t.size),string_format:(e,t)=>{iL(e,t.format),t.pattern&&iU(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>iJ(e,t.mime)};function iG(e){let t={},n=e._zod.def;for(let r of e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[])iW[r._zod.def.check]?.(t,r._zod.def);let r=e._zod.bag;for(let e of(void 0!==r.minimum&&iR(t,"minimum",r.minimum),void 0!==r.exclusiveMinimum&&iR(t,"exclusiveMinimum",r.exclusiveMinimum),void 0!==r.maximum&&iF(t,"maximum",r.maximum),void 0!==r.exclusiveMaximum&&iF(t,"exclusiveMaximum",r.exclusiveMaximum),void 0!==r.multipleOf&&iM(t,r.multipleOf),void 0!==r.format&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&iJ(t,r.mime),r.patterns??[]))iU(t,e);return t}let iX={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},iH=new Map([[rt,tw],[rr,tk]]),iq=e=>iH.get(e)??e;function iY(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?iY(t.out):"catch"===t.type?iY(t.innerType):e._zod.optin}let iQ=new WeakMap,i0=Symbol();function i1(e,t,n,r,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(ix(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),i0):JSON.parse(a)}let i4=(e,t,n,r)=>{let i=e._zod.def;iP(i.innerType,t,r),t.seen.get(e).ref=i.innerType},i2=new WeakSet([Object.prototype,Error.prototype]);function i9(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let i6=eq("ZodError",(e,t)=>{nb.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);i2.has(n)||(i2.add(n),i9(n,"format",e=>t=>(function(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;i<e.length;){let n=e[i],a=i===e.length-1;if("_errors"===n){a&&r._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];a&&s._errors.push(t(o)),r=s,i++}}}};return r(e),n})(e,t)),i9(n,"flatten",e=>t=>(function(e,t=e=>e.message){let n={},r=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(n,i)&&("__proto__"===i?Object.defineProperty(n,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):n[i]=o()),n[i]).push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}})(e,t)),i9(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,$,2)}),i9(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,$,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error});e.s(["ZodRealError",0,i6],32055);let i3=nk(i6),i5=nO(i6),i7=nx(i6),i8=nA(i6),oe=(r=nk(i6),i=(e,t,n,o)=>r(e,t,n?{...n,direction:"backward"}:{direction:"backward"},nw(i,o))),ot=(o=nk(i6),a=(e,t,n,r)=>o(e,t,n,nw(a,r))),on=(s=nO(i6),u=async(e,t,n,r)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return await s(e,t,i,nw(u,r))}),or=(l=nO(i6),c=async(e,t,n,r)=>await l(e,t,n,nw(c,r))),oi=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return nx(i6)(e,t,r)},oo=(e,t,n)=>nx(i6)(e,t,n),oa=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return nA(i6)(e,t,r)},os=async(e,t,n)=>nA(i6)(e,t,n);function ou(){e0.memoizer||e1({memoizer:e8})}let ol=eq("ZodType",(e,t)=>(e0.localeError||e1({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function r(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?n[e]??e:String(t)}return n=>{switch(n.code){case"invalid_type":{let e=r(n.expected),t=r(eA(n.input),n.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===n.values.length)return`Invalid input: expected ${eo(n.values[0])}`;return`Invalid option: expected one of ${k(n.values,"|")}`;case"too_big":{let t=n.exact?"exactly ":n.inclusive?"<=":"<",r=e[n.origin]??null;if(r)return`Too big: expected ${n.origin??"value"} to have ${t}${n.maximum.toString()} ${r.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${t}${n.maximum.toString()}`}case"too_small":{let t=n.exact?"exactly ":n.inclusive?">=":">",r=e[n.origin]??null;if(r)return`Too small: expected ${n.origin} to have ${t}${n.minimum.toString()} ${r.unit}`;return`Too small: expected ${n.origin} to be ${t}${n.minimum.toString()}`}case"invalid_format":if("starts_with"===n.format)return`Invalid string: must start with "${n.prefix}"`;if("ends_with"===n.format)return`Invalid string: must end with "${n.suffix}"`;if("includes"===n.format)return`Invalid string: must include "${n.includes}"`;if("regex"===n.format)return`Invalid string: must match pattern ${n.pattern}`;return`Invalid ${t[n.format]??n.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${k(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0){let e=n.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===n.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}})()}),nN.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(il.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return en(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new af({type:"custom",check:"custom",fn:e,...er(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var n;let r,i;return n=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(ej(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(ej(e)))},e(t.value,t)),(i=new t1({check:"custom",...er(t)}))._zod.check=n,r=i}(e,t))},overwrite(e){return this.check(is(e))},optional(){return at(this)},exactOptional(){var e;return e=this,new an({type:"optional",innerType:e})},nullable(){return ai(this)},nullish(){return at(ai(this))},nonoptional(e){var t,n;return t=this,n=e,new as({type:"nonoptional",innerType:t,...ih.normalizeParams(n)})},array(){return oG(this)},or(e){return oQ([this,e])},and(e){var t;return t=this,new o4({type:"intersection",left:t,right:e})},transform(e){return ac(this,new o8({type:"transform",transform:e}))},default(e){var t,n;return t=this,n=e,new ao({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():i$.shallowClone(n)}})},prefault(e){var t,n;return t=this,n=e,new aa({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():i$.shallowClone(n)}})},catch(e){var t,n;return t=this,new au({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:iu.constantCatch(n)})},pipe(e){return ac(this,e)},readonly(){var e;return e=this,new ad({type:"readonly",innerType:e})},describe(e){let t=this.clone();return te.add(t,{description:e}),t},meta(...e){if(0===e.length)return te.get(this);let t=this.clone();return te.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return ic.hide(this,"~standard",{...nR(this),jsonSchema:{input:iD(this,"input"),output:iD(this,"output")}})},set"~standard"(e){id.own(this,"~standard",e)},parse:function e(t,n){return i3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await i5(this,t,n,{callee:e})},safeParse(e,t){return i7(this,e,t)},async safeParseAsync(e,t){return i8(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){id.own(this,"spa",e)},validate(e,t){let n=this._zod.bag.validator;if(void 0!==n){if(n(e)!==nj)return!0;if(!0===n.definite&&void 0===t)return!1}return function(e,t,n){let r,i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[nE]=!0,r=o({value:t,issues:[]},i)):r=e._zod.run({value:t,issues:[]},i),r instanceof Promise)throw new eY;return 0===r.issues.length}(this,e,t)},validateAsync(e,t){return nZ(this,e,t)},encode:function e(t,n){return oe(this,t,n,{callee:e})},decode:function e(t,n){return ot(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await on(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await or(this,t,n,{callee:e})},safeEncode(e,t){return oi(this,e,t)},safeDecode(e,t){return oo(this,e,t)},async safeEncodeAsync(e,t){return oa(this,e,t)},async safeDecodeAsync(e,t){return os(this,e,t)},toJSONSchema(e){return((e,t={})=>n=>{let r=iS({...n,processors:t});return iP(e,r),ij(r,e),iI(r,e)})(this,{})(e)},get description(){return te.get(this)?.description},get _def(){return this._zod.def}}),oc=eq("_ZodString",(e,t)=>{nF.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{n.type="string";let{minimum:r,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:u}=iG(e);if("number"==typeof r&&(n.minLength=r),"number"==typeof i&&(n.maxLength=i),o&&(n.format=iX[o]??o,""===n.format&&delete n.format,("time"===o||u)&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a].map(iq);1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n)},ip.derived({format:e=>iG(e).format??null,minLength:e=>iG(e).minimum??null,maxLength:e=>iG(e).maximum??null},{regex(...e){return this.check(function(e,t){return new ns({check:"string_format",format:"regex",...er(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new nc({check:"string_format",format:"includes",...er(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new nd({check:"string_format",format:"starts_with",...er(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new nf({check:"string_format",format:"ends_with",...er(t),suffix:e})}(...e))},min(...e){return this.check(io(...e))},max(...e){return this.check(ii(...e))},length(...e){return this.check(ia(...e))},nonempty(...e){return this.check(io(1,...e))},lowercase(e){return this.check(new nu({check:"string_format",format:"lowercase",...er(e)}))},uppercase(e){return this.check(new nl({check:"string_format",format:"uppercase",...er(e)}))},trim(){return this.check(is(e=>e.trim()))},normalize(...e){return this.check(function(e){return is(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(is(e=>e.toLowerCase()))},toUpperCase(){return this.check(is(e=>e.toUpperCase()))},slugify(){return this.check(is(e=>K(e)))}})),od=eq("ZodString",(e,t)=>{nF.init(e,t),oc.init(e,t)},{email(e){return this.check(new og({type:"string",format:"email",check:"string_format",abort:!1,...er(e)}))},url(e){return this.check(new oz({type:"string",format:"url",check:"string_format",abort:!1,...er(e)}))},jwt(e){return this.check(new oD({type:"string",format:"jwt",check:"string_format",abort:!1,...er(e)}))},emoji(e){return this.check(new ow({type:"string",format:"emoji",check:"string_format",abort:!1,...er(e)}))},guid(e){return this.check(new o_({type:"string",format:"guid",check:"string_format",abort:!1,...er(e)}))},uuid(e){return this.check(new ob({type:"string",format:"uuid",check:"string_format",abort:!1,...er(e)}))},uuidv4(e){return this.check(new ob({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...er(e)}))},uuidv6(e){return this.check(new ob({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...er(e)}))},uuidv7(e){return this.check(new ob({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...er(e)}))},nanoid(e){return this.check(new ok({type:"string",format:"nanoid",check:"string_format",abort:!1,...er(e)}))},cuid(e){return this.check(new o$({type:"string",format:"cuid",check:"string_format",abort:!1,...er(e)}))},cuid2(e){return this.check(new oO({type:"string",format:"cuid2",check:"string_format",abort:!1,...er(e)}))},ulid(e){return this.check(new oS({type:"string",format:"ulid",check:"string_format",abort:!1,...er(e)}))},base64(e){return this.check(new oT({type:"string",format:"base64",check:"string_format",abort:!1,...er(e)}))},base64url(e){return this.check(new oN({type:"string",format:"base64url",check:"string_format",abort:!1,...er(e)}))},xid(e){return this.check(new ox({type:"string",format:"xid",check:"string_format",abort:!1,...er(e)}))},ksuid(e){return this.check(new oP({type:"string",format:"ksuid",check:"string_format",abort:!1,...er(e)}))},ipv4(e){return this.check(new oA({type:"string",format:"ipv4",check:"string_format",abort:!1,...er(e)}))},ipv6(e){return this.check(new oj({type:"string",format:"ipv6",check:"string_format",abort:!1,...er(e)}))},cidrv4(e){return this.check(new oE({type:"string",format:"cidrv4",check:"string_format",abort:!1,...er(e)}))},cidrv6(e){return this.check(new oZ({type:"string",format:"cidrv6",check:"string_format",abort:!1,...er(e)}))},e164(e){return this.check(new oI({type:"string",format:"e164",check:"string_format",abort:!1,...er(e)}))},datetime(e){return this.check(new oh({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...er(e)}))},date(e){return this.check(new om({type:"string",format:"date",check:"string_format",...er(e)}))},time(e){return this.check(new ov({type:"string",format:"time",check:"string_format",precision:null,...er(e)}))},duration(e){return this.check(new oy({type:"string",format:"duration",check:"string_format",...er(e)}))}});function of(e){return new od(r5({type:"string",...er(e)}))}let op=eq("ZodStringFormat",(e,t)=>{nC.init(e,t),oc.init(e,t)}),oh=eq("ZodISODateTime",(e,t)=>{n0.init(e,t),op.init(e,t)}),om=eq("ZodISODate",(e,t)=>{n1.init(e,t),op.init(e,t)}),ov=eq("ZodISOTime",(e,t)=>{n4.init(e,t),op.init(e,t)}),oy=eq("ZodISODuration",(e,t)=>{n2.init(e,t),op.init(e,t)}),og=eq("ZodEmail",(e,t)=>{nJ.init(e,t),op.init(e,t)}),o_=eq("ZodGUID",(e,t)=>{nM.init(e,t),op.init(e,t)}),ob=eq("ZodUUID",(e,t)=>{nU.init(e,t),op.init(e,t)}),oz=eq("ZodURL",(e,t)=>{nV.init(e,t),op.init(e,t)}),ow=eq("ZodEmoji",(e,t)=>{nW.init(e,t),op.init(e,t)}),ok=eq("ZodNanoID",(e,t)=>{nG.init(e,t),op.init(e,t)}),o$=eq("ZodCUID",(e,t)=>{nX.init(e,t),op.init(e,t)}),oO=eq("ZodCUID2",(e,t)=>{nH.init(e,t),op.init(e,t)}),oS=eq("ZodULID",(e,t)=>{nq.init(e,t),op.init(e,t)}),ox=eq("ZodXID",(e,t)=>{nY.init(e,t),op.init(e,t)}),oP=eq("ZodKSUID",(e,t)=>{nQ.init(e,t),op.init(e,t)}),oA=eq("ZodIPv4",(e,t)=>{n9.init(e,t),op.init(e,t)}),oj=eq("ZodIPv6",(e,t)=>{n5.init(e,t),op.init(e,t)}),oE=eq("ZodCIDRv4",(e,t)=>{n7.init(e,t),op.init(e,t)}),oZ=eq("ZodCIDRv6",(e,t)=>{n8.init(e,t),op.init(e,t)}),oT=eq("ZodBase64",(e,t)=>{rn.init(e,t),op.init(e,t)}),oN=eq("ZodBase64URL",(e,t)=>{ri.init(e,t),op.init(e,t)}),oI=eq("ZodE164",(e,t)=>{ro.init(e,t),op.init(e,t)}),oD=eq("ZodJWT",(e,t)=>{rs.init(e,t),op.init(e,t)}),oR=eq("ZodNumber",(e,t)=>{ru.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let{minimum:i,maximum:o,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:u,isInt:l}=iG(e);n.type=l?"integer":"number";let c="number"==typeof u&&u>=(i??-1/0),d="number"==typeof s&&s<=(o??1/0),f="draft-04"===t.target||"openapi-3.0"===t.target;if(c?f?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u:"number"==typeof i&&(n.minimum=i),d?f?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s:"number"==typeof o&&(n.maximum=o),a){let i=new Set;for(let o of a)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):ix(e,t,n,r,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...s]=i;void 0!==o&&(n.multipleOf=o),s.length&&(n.allOf=[...n.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,n,r),e.isFinite=!0},ip.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=iG(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=iG(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=iG(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>iG(e).format??null},{gt(e,t){return this.check(ie(e,t))},gte(e,t){return this.check(it(e,t))},min(e,t){return this.check(it(e,t))},lt(e,t){return this.check(r7(e,t))},lte(e,t){return this.check(r8(e,t))},max(e,t){return this.check(r8(e,t))},int(e){return this.check(oM(e))},safe(e){return this.check(oM(e))},positive(e){return this.check(ie(0,e))},nonnegative(e){return this.check(it(0,e))},negative(e){return this.check(r7(0,e))},nonpositive(e){return this.check(r8(0,e))},multipleOf(e,t){return this.check(ir(e,t))},step(e,t){return this.check(ir(e,t))},finite(){return this}}));function oF(e){return new oR(r5({type:"number",checks:[],...er(e)}))}let oC=eq("ZodNumberFormat",(e,t)=>{rl.init(e,t),oR.init(e,t)});function oM(e){return new oC({type:"number",check:"number_format",abort:!1,format:"safeint",...er(e)})}let oU=eq("ZodBoolean",(e,t)=>{rc.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function oJ(e){return new oU({type:"boolean",...er(e)})}(e,t)=>{rd.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{ix(e,t,n,r,"BigInt cannot be represented in JSON Schema")}};let oL=eq("ZodUnknown",(e,t)=>{rf.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function oB(){return new oL({type:"unknown"})}let oK=eq("ZodNever",(e,t)=>{rp.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}});function oV(e){return new oK({type:"never",...er(e)})}let oW=eq("ZodArray",(e,t)=>{ou(),r_.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,{minimum:o,maximum:a}=iG(e);"number"==typeof o&&(n.minItems=o),"number"==typeof a&&(n.maxItems=a),n.type="array",n.items=iP(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element},{min(e,t){return this.check(io(e,t))},nonempty(e){return this.check(io(1,e))},max(e,t){return this.check(ii(e,t))},length(e,t){return this.check(ia(e,t))},unwrap(){return this.element}});function oG(e,t){return new oW({type:"array",element:e,...er(t)})}let oX=eq("ZodObject",(e,t)=>{ou(),rO.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&ix(e,t,n,r,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in n.type="object",n.properties={},o)T(n.properties,e,iP(o[e],t,{...r,path:[...r.path,"properties",e]}));let a=[];for(let e of Object.keys(o)){let n=i.shape[e];("input"===t.io?void 0===iY(n):void 0===n._zod.optout)&&a.push(e)}a.length>0&&(n.required=a),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=iP(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),iw.installLazyProp(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return o3(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(il.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(il.mergeDefs(this._zod.def,{catchall:oB()}))},loose(){return this.clone(il.mergeDefs(this._zod.def,{catchall:oB()}))},strict(){return this.clone(il.mergeDefs(this._zod.def,{catchall:oV()}))},strip(){return this.clone(il.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return im.extend(this,e)},safeExtend(e){return iv.safeExtend(this,e)},merge(e){return iy.merge(this,e)},pick(e){return ig.pick(this,e)},omit(e){return i_.omit(this,e)},partial(...e){return ib.partial(ae,this,e[0])},exactPartial(...e){return ib.partial(an,this,e[0],"exactPartial")},required(...e){return iz.required(as,this,e[0])}});function oH(e,t){return new oX({type:"object",shape:e??{},...ih.normalizeParams(t)})}function oq(e,t){return new oX({type:"object",shape:e,catchall:oV(),...ih.normalizeParams(t)})}let oY=eq("ZodUnion",(e,t)=>{rx.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{var i,o,a,s;let u,l,c;return i=e,o=t,a=n,s=r,l=!1===(u=i._zod.def).inclusive,c=u.options.map((e,t)=>iP(e,o,{...s,path:[...s.path,l?"oneOf":"anyOf",t]})),void(l?a.oneOf=c:a.anyOf=c)},e.options=t.options});function oQ(e,t){return new oY({type:"union",options:e,...ih.normalizeParams(t)})}let o0=eq("ZodDiscriminatedUnion",(e,t)=>{oY.init(e,t),rA.init(e,t)});function o1(e,t,n){return new o0({type:"union",options:t,discriminator:e,...ih.normalizeParams(n)})}let o4=eq("ZodIntersection",(e,t)=>{rj.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a,s,u;return o=iP((i=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),a=iP(i.right,t,{...r,path:[...r.path,"allOf",1]}),void(n.allOf=u=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(u))}}),o2=eq("ZodRecord",(e,t)=>{ou(),rD.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="object";let o=i.keyType,a=iG(o).patterns;if("loose"===i.mode&&a&&a.size>0){let e=iP(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},a))T(n.patternProperties,iq(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){n.propertyNames=iP(i.keyType,t,{...r,path:[...r.path,"propertyNames"]});let o=iQ.get(t);o||(o=[],iQ.set(t,o),t.deferred.push(()=>(function(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of iQ.get(e)??[]){let i=e.seen.get(r),o=(i?.def??i?.schema)?.propertyNames;if(!o||!0===o||n.has(o))continue;let a=function e(t,n,r){if(n.$ref){if(r.has(n))return n;r.add(n);let i=t.get(n)?.def;if(!i)return n;let o=e(t,i,r);return o===i?n:o}for(let i of["anyOf","oneOf"]){let o=n[i];if(!Array.isArray(o))continue;let a=o.map(n=>e(t,n,r));a.some((e,t)=>e!==o[t])&&(n={...n,[i]:a})}let i=Array.isArray(n.type)?n.type:[n.type],o=!i.includes("string")&&i.some(e=>"number"===e||"integer"===e),a=n.enum??(void 0!==n.const?[n.const]:void 0);if(!o&&!a?.some(e=>"number"==typeof e))return n;let{minimum:s,maximum:u,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:f,id:p,...h}=n;return h.enum?h.enum=h.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof h.const&&(h.const=String(h.const)),o&&(h.type="string",a||(h.pattern=(i.includes("number")?tR:tD).source)),h}(t,o,new Set);a!==o&&n.set(o,a)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),o.push(e)}n.additionalProperties=iP(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let s=o._zod.values,u="input"===t.io&&void 0!==iY(i.valueType);if(s&&!i.partial&&!u){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e.map(String))}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function o9(e,t,n){return new o2(t&&t._zod?{type:"record",keyType:e,valueType:t,...ih.normalizeParams(n)}:{type:"record",keyType:of(),valueType:e,...ih.normalizeParams(t)})}let o6=eq("ZodEnum",(e,t)=>{rC.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t)=>{let n=w(e._zod.def.entries);if(0===n.length){t.not={};return}n.every(e=>"number"==typeof e)&&(t.type="number"),n.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=n})(e,n),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new o6({...t,checks:[],...ih.normalizeParams(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new o6({...t,checks:[],...ih.normalizeParams(r),entries:i})}});function o3(e,t){return new o6({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...ih.normalizeParams(t)})}let o5=eq("ZodLiteral",(e,t)=>{rM.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(0===i.values.length){n.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(ix(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(ix(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function o7(e,t){return new o5({type:"literal",values:Array.isArray(e)?e:[e],...ih.normalizeParams(t)})}let o8=eq("ZodTransform",(e,t)=>{ou(),rU.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{ix(e,t,n,r,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new eQ(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(ik.issue(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=n.value),r.inst??(r.inst=e),n.issues.push(ik.issue(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),ae=eq("ZodOptional",(e,t)=>{rL.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function at(e){return new ae({type:"optional",innerType:e})}let an=eq("ZodExactOptional",(e,t)=>{rB.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ar=eq("ZodNullable",(e,t)=>{rK.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=iP((i=e._zod.def).innerType,t,r),a=t.seen.get(e),void("openapi-3.0"===t.target?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function ai(e){return new ar({type:"nullable",innerType:e})}let ao=eq("ZodDefault",(e,t)=>{rV.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o;return iP((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,void((o=i1(i.defaultValue,e,t,n,r))!==i0&&(n.default=o))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),aa=eq("ZodPrefault",(e,t)=>{rG.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(iP(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=i1(i.defaultValue,e,t,n,r);o!==i0&&(n._prefault=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),as=eq("ZodNonOptional",(e,t)=>{rX.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iP((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),au=eq("ZodCatch",(e,t)=>{rY.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,o=e._zod.def;iP(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{ix(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),al=eq("ZodPipe",(e,t)=>{rQ.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(iP(a="input"===t.io?o?i.out:i.in:i.out,t,r),t.seen.get(e).ref=a)},e.in=t.in,e.out=t.out});function ac(e,t){return new al({type:"pipe",in:e,out:t})}let ad=eq("ZodReadonly",(e,t)=>{r2.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iP((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),af=eq("ZodCustom",(e,t)=>{r6.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{ix(e,t,n,r,"Custom types cannot be represented in JSON Schema")}});e.s(["array",0,oG,"boolean",0,oJ,"discriminatedUnion",0,o1,"enum",0,o3,"literal",0,o7,"number",0,oF,"object",0,oH,"record",0,o9,"strictObject",0,oq,"string",0,of,"union",0,oQ,"unknown",0,oB],749906),e.i(749906),e.s([],790530),e.i(790530),e.i(32055),e.s([],926406),e.i(926406),e.s([],855143),e.i(855143),e.s(["array",0,oG,"boolean",0,oJ,"discriminatedUnion",0,o1,"enum",0,o3,"literal",0,o7,"number",0,oF,"object",0,oH,"record",0,o9,"strictObject",0,oq,"string",0,of,"union",0,oQ,"unknown",0,oB],794588)},677432,e=>{e.s(["f",0,"v1"])},776182,e=>{var t=e.i(79322),n=e.i(246517),r=e.i(107239),i=e.i(492973),o=e.i(113678),a=e.i(720966);let s=["gemini","openai","azure","anthropic","minimax-code",...o.U],u=["docker","npm","desktop","fnos","android","other"],l=["1","2-5","6-20",">20"],c=["0","1-50","51-500",">500"],d=t.z.enum(s),f=n.z.boolean(),p={app_installed:r.z.strictObject({method:t.z.enum(["setup-token","preset-admin"])}),eula_accepted:r.z.strictObject({version:i.z.string().regex(/^v\d{1,4}$/),trigger:t.z.enum(["install","upgrade","settings"])}),instance_alive:r.z.strictObject({platform:t.z.enum(u),aiConfigured:n.z.boolean()}),app_opened:r.z.strictObject({client:t.z.enum(["browser","pwa","desktop","android"])}),page_viewed:r.z.strictObject({page:t.z.enum(["home","notebooks","error_detail","practice","review","stats","tags","exams","settings","admin","other"])}),ai_analyze_started:r.z.strictObject({provider:d}),ai_analyze_result:r.z.strictObject({ok:f,provider:d,duration:t.z.enum(["<3s","3-10s","10-30s",">30s"])}),ai_reanswer:r.z.strictObject({ok:f,provider:d}),ai_practice_grading:r.z.strictObject({ok:f,count:t.z.enum(l)}),exam_paper_generation:r.z.strictObject({ok:f,count:t.z.enum(l)}),data_exported:r.z.strictObject({scope:t.z.enum(["user","all"]),rows:t.z.enum(c)}),data_imported:r.z.strictObject({rows:t.z.enum(c)}),tts_used:r.z.strictObject({mode:t.z.enum(a.l)}),settings_changed:r.z.strictObject({section:t.z.enum(["general","ai","tts","prompts","telemetry"])})};Object.keys(p),e.s(["F",0,u,"k",0,1,"r",0,function(e,t){let n=p[e].safeParse(t??{});return n.success?n.data:null}])},212139,735418,e=>{e.i(666680);var t=e.i(231069),n=e.i(437848),r=e.i(50667),i=e.i(776182);e.i(75764);var o=e.i(241920),a=e.i(677432);function s(){return function(e,t=process.env.TELEMETRY_DISABLED?.trim().toLowerCase()==="true"){let n=e.telemetry??{},r=e.eula?.acceptedVersion,i=!!r&&r!==a.f,o=n.endpoint?.trim()||"https://wrong-notebook-telemetry.margrop.net/api/v1/ingest",s=n.retentionDays??30;if(t)return{recording:!1,errors:!1,forwarding:!1,forwardingConfigured:!1,endpoint:o,retentionDays:s,lockedByEnv:t,consentPending:i,consentGiven:!!r};let u=!0===n.forwarding;return{recording:!0===n.recording,errors:!1!==n.errors,forwarding:u&&!!r&&!i,forwardingConfigured:u,endpoint:o,retentionDays:s,lockedByEnv:t,consentPending:i,consentGiven:!!r}}((0,o.b)())}e.s(["f",0,s],735418);let u=(0,n.f)("telemetry");async function l(e,n,o){try{var a;let l={write:(a=o??s()).recording||a.forwarding,local:a.recording};if(!l.write)return!1;let c=(0,i.r)(e,n);if(!c)return u.warn({name:e},"Dropped telemetry event with invalid payload"),!1;return await r.f.telemetryEvent.create({data:{name:e,payload:JSON.stringify(c),version:(0,t.f)(),local:l.local}}),!0}catch(e){return u.warn({error:e},"Failed to record telemetry event"),!1}}async function c(e=new Date,t=s()){let n={OR:[{local:!0,createdAt:{lt:new Date(e.getTime()-864e5*t.retentionDays)}},{local:!1,createdAt:{lt:new Date(e.getTime()-6048e5)}},{local:!1,forwardedAt:{not:null}}]};try{let[e,t]=await r.f.$transaction([r.f.telemetryEvent.deleteMany({where:n}),r.f.telemetryError.deleteMany({where:n})]);return e.count+t.count}catch(e){return u.warn({error:e},"Failed to purge telemetry"),0}}e.s(["D",0,7,"t",0,c,"d",0,l],212139)}],993133,(e,t,n)=>{t.exports={name:"wrong-notebook",version:"2026.10.19",private:!0,license:"MIT",scripts:{predev:"node scripts/copy-pdfjs-assets.mjs",dev:"next dev -H 0.0.0.0",prebuild:"node scripts/copy-pdfjs-assets.mjs",build:"next build",start:"next start",lint:"eslint src --max-warnings=0",test:"vitest run","test:unit":"vitest run src/__tests__/unit","test:integration":"vitest run src/__tests__/integration","test:watch":"vitest","test:coverage":"vitest run --coverage","test:e2e":"node scripts/run-e2e.mjs","test:report":"playwright show-report --host 0.0.0.0"},dependencies:{"@anthropic-ai/sdk":"^1.3.0","@breezystack/lamejs":"1.2.7","@google/genai":"^2.32.0","@next-auth/prisma-adapter":"^1.0.7","@prisma/client":"5.22.0","@radix-ui/react-checkbox":"^1.3.3","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-label":"^2.1.8","@radix-ui/react-progress":"^1.1.8","@radix-ui/react-select":"^2.2.6","@radix-ui/react-slider":"^1.3.6","@radix-ui/react-slot":"^1.2.4","@radix-ui/react-switch":"^1.2.6","@radix-ui/react-tabs":"^1.1.13",bcryptjs:"^3.0.3","date-fns":"^4.1.0","date-fns-tz":"^3.2.0",docx:"^9.13.0",dotenv:"^18.0.9",fflate:"^0.8.3","global-agent":"^4.1.3","heic-to":"1.6.6",katex:"^0.19.0",next:"~16.4.3","next-auth":"^4.24.15",openai:"^7.46.0","pdfjs-dist":"^6.4.299",react:"19.3.1","react-dom":"19.3.1","react-dropzone":"^20.1.4","react-image-crop":"^11.0.10","react-markdown":"^10.1.0","read-excel-file":"^9.3.12",recharts:"^3.5.0","rehype-katex":"^7.0.1",remark:"^15.0.1","remark-gfm":"^4.0.1","remark-math":"^6.0.0","server-only":"^0.0.1","strip-markdown":"^6.0.0",undici:"^7.16.0","write-excel-file":"^4.1.1",zod:"^4.6.7"},devDependencies:{"@playwright/test":"^1.57.0","@tailwindcss/postcss":"^4","@types/bcryptjs":"^2.4.6","@types/node":"^24.19.2","@types/react":"^19","@types/react-dom":"^19","@vitejs/plugin-react":"^6.1.2","@vitest/coverage-v8":"^5.0.5","baseline-browser-mapping":"^2.8.32","class-variance-authority":"^0.7.1",clsx:"^2.1.1",eslint:"^9","eslint-config-next":"16.4.3",jsdom:"^30.1.3","lucide-react":"^1.65.0",prisma:"5.22.0","tailwind-merge":"^3.4.0",tailwindcss:"^4","ts-node":"^10.9.2","tw-animate-css":"^1.4.0",typescript:"^5",vitest:"^5.0.5"},prisma:{seed:'ts-node --compiler-options {"module":"CommonJS"} prisma/seed.ts'},overrides:{katex:"$katex",minimatch:"^11.0.3"}}}];
|
|
55
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle){i(n);continue}r.count>1&&"ref"===e.reused&&i(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}let iE=new Set(["type","properties","required","additionalProperties"]),iZ=["oneOf","anyOf"];function iT(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function iN(e){let t=[];for(let n of e){if("object"!=typeof n||"object"!==n.type)return null;for(let e in n)if(!iE.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??iT(n);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}T(n,r,1===e.length?e[0]:iN(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=iT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function iI(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,o={...i},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):iO(i,s),iO(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let n=t.anyOf;if(!Array.isArray(n)||0===n.length||void 0!==t.type)return;let r=[];for(let t of n){if(!t||"object"!=typeof t)return;e(t);let n=Object.keys(t);if(1!==n.length||"type"!==n[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;r.includes(e)||r.push(e)}}delete t.anyOf,t.type=1===r.length?r[0]:r}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of iE)if(t in e)return;let n=t.filter(e=>iZ.some(t=>Array.isArray(e[t]))),r=null;if(n.length){let e=n[0],i=iZ.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>iN([...o,e]));if(a.some(e=>!e))return;r={[i]:a}}else r=iN(t);r&&(delete e.allOf,iO(e,r))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}iO(i,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,T(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:iD(t,"input",e.processors),output:iD(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let iD=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=iS({...i??{},target:o,io:t,processors:n});return iP(e,a),ij(a,e),iI(a,e)},iR=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},iF=(e,t,n)=>{(void 0===e[t]||n<e[t])&&(e[t]=n)},iC=(e,t)=>{iR(e,"minimum",t),iF(e,"maximum",t)},iM=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},iU=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},iJ=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},iL=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},iB=(e,t)=>iR(e,"minimum",t.minimum),iK=(e,t)=>iF(e,"maximum",t.maximum),iV=e=>(t,n)=>{iL(t,n.format);let[r,i]=e[n.format];iR(t,"minimum",r),iF(t,"maximum",i)},iW={greater_than:(e,t)=>iR(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>iF(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>iM(e,t.value),number_format:iV(es),bigint_format:iV(eu),min_length:iB,max_length:iK,length_equals:(e,t)=>iC(e,t.length),min_size:iB,max_size:iK,size_equals:(e,t)=>iC(e,t.size),string_format:(e,t)=>{iL(e,t.format),t.pattern&&iU(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>iJ(e,t.mime)};function iG(e){let t={},n=e._zod.def;for(let r of e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[])iW[r._zod.def.check]?.(t,r._zod.def);let r=e._zod.bag;for(let e of(void 0!==r.minimum&&iR(t,"minimum",r.minimum),void 0!==r.exclusiveMinimum&&iR(t,"exclusiveMinimum",r.exclusiveMinimum),void 0!==r.maximum&&iF(t,"maximum",r.maximum),void 0!==r.exclusiveMaximum&&iF(t,"exclusiveMaximum",r.exclusiveMaximum),void 0!==r.multipleOf&&iM(t,r.multipleOf),void 0!==r.format&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&iJ(t,r.mime),r.patterns??[]))iU(t,e);return t}let iX={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},iH=new Map([[rt,tw],[rr,tk]]),iq=e=>iH.get(e)??e;function iY(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?iY(t.out):"catch"===t.type?iY(t.innerType):e._zod.optin}let iQ=new WeakMap,i0=Symbol();function i1(e,t,n,r,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(ix(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),i0):JSON.parse(a)}let i4=(e,t,n,r)=>{let i=e._zod.def;iP(i.innerType,t,r),t.seen.get(e).ref=i.innerType},i2=new WeakSet([Object.prototype,Error.prototype]);function i9(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let i6=eq("ZodError",(e,t)=>{nb.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);i2.has(n)||(i2.add(n),i9(n,"format",e=>t=>(function(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;i<e.length;){let n=e[i],a=i===e.length-1;if("_errors"===n){a&&r._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];a&&s._errors.push(t(o)),r=s,i++}}}};return r(e),n})(e,t)),i9(n,"flatten",e=>t=>(function(e,t=e=>e.message){let n={},r=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(n,i)&&("__proto__"===i?Object.defineProperty(n,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):n[i]=o()),n[i]).push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}})(e,t)),i9(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,$,2)}),i9(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,$,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error});e.s(["ZodRealError",0,i6],32055);let i3=nk(i6),i5=nO(i6),i7=nx(i6),i8=nA(i6),oe=(r=nk(i6),i=(e,t,n,o)=>r(e,t,n?{...n,direction:"backward"}:{direction:"backward"},nw(i,o))),ot=(o=nk(i6),a=(e,t,n,r)=>o(e,t,n,nw(a,r))),on=(s=nO(i6),u=async(e,t,n,r)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return await s(e,t,i,nw(u,r))}),or=(l=nO(i6),c=async(e,t,n,r)=>await l(e,t,n,nw(c,r))),oi=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return nx(i6)(e,t,r)},oo=(e,t,n)=>nx(i6)(e,t,n),oa=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return nA(i6)(e,t,r)},os=async(e,t,n)=>nA(i6)(e,t,n);function ou(){e0.memoizer||e1({memoizer:e8})}let ol=eq("ZodType",(e,t)=>(e0.localeError||e1({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function r(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?n[e]??e:String(t)}return n=>{switch(n.code){case"invalid_type":{let e=r(n.expected),t=r(eA(n.input),n.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===n.values.length)return`Invalid input: expected ${eo(n.values[0])}`;return`Invalid option: expected one of ${k(n.values,"|")}`;case"too_big":{let t=n.exact?"exactly ":n.inclusive?"<=":"<",r=e[n.origin]??null;if(r)return`Too big: expected ${n.origin??"value"} to have ${t}${n.maximum.toString()} ${r.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${t}${n.maximum.toString()}`}case"too_small":{let t=n.exact?"exactly ":n.inclusive?">=":">",r=e[n.origin]??null;if(r)return`Too small: expected ${n.origin} to have ${t}${n.minimum.toString()} ${r.unit}`;return`Too small: expected ${n.origin} to be ${t}${n.minimum.toString()}`}case"invalid_format":if("starts_with"===n.format)return`Invalid string: must start with "${n.prefix}"`;if("ends_with"===n.format)return`Invalid string: must end with "${n.suffix}"`;if("includes"===n.format)return`Invalid string: must include "${n.includes}"`;if("regex"===n.format)return`Invalid string: must match pattern ${n.pattern}`;return`Invalid ${t[n.format]??n.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${k(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0){let e=n.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===n.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}})()}),nN.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(il.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return en(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new af({type:"custom",check:"custom",fn:e,...er(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var n;let r,i;return n=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(ej(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(ej(e)))},e(t.value,t)),(i=new t1({check:"custom",...er(t)}))._zod.check=n,r=i}(e,t))},overwrite(e){return this.check(is(e))},optional(){return at(this)},exactOptional(){var e;return e=this,new an({type:"optional",innerType:e})},nullable(){return ai(this)},nullish(){return at(ai(this))},nonoptional(e){var t,n;return t=this,n=e,new as({type:"nonoptional",innerType:t,...ih.normalizeParams(n)})},array(){return oG(this)},or(e){return oQ([this,e])},and(e){var t;return t=this,new o4({type:"intersection",left:t,right:e})},transform(e){return ac(this,new o8({type:"transform",transform:e}))},default(e){var t,n;return t=this,n=e,new ao({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():i$.shallowClone(n)}})},prefault(e){var t,n;return t=this,n=e,new aa({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():i$.shallowClone(n)}})},catch(e){var t,n;return t=this,new au({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:iu.constantCatch(n)})},pipe(e){return ac(this,e)},readonly(){var e;return e=this,new ad({type:"readonly",innerType:e})},describe(e){let t=this.clone();return te.add(t,{description:e}),t},meta(...e){if(0===e.length)return te.get(this);let t=this.clone();return te.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return ic.hide(this,"~standard",{...nR(this),jsonSchema:{input:iD(this,"input"),output:iD(this,"output")}})},set"~standard"(e){id.own(this,"~standard",e)},parse:function e(t,n){return i3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await i5(this,t,n,{callee:e})},safeParse(e,t){return i7(this,e,t)},async safeParseAsync(e,t){return i8(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){id.own(this,"spa",e)},validate(e,t){let n=this._zod.bag.validator;if(void 0!==n){if(n(e)!==nj)return!0;if(!0===n.definite&&void 0===t)return!1}return function(e,t,n){let r,i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[nE]=!0,r=o({value:t,issues:[]},i)):r=e._zod.run({value:t,issues:[]},i),r instanceof Promise)throw new eY;return 0===r.issues.length}(this,e,t)},validateAsync(e,t){return nZ(this,e,t)},encode:function e(t,n){return oe(this,t,n,{callee:e})},decode:function e(t,n){return ot(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await on(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await or(this,t,n,{callee:e})},safeEncode(e,t){return oi(this,e,t)},safeDecode(e,t){return oo(this,e,t)},async safeEncodeAsync(e,t){return oa(this,e,t)},async safeDecodeAsync(e,t){return os(this,e,t)},toJSONSchema(e){return((e,t={})=>n=>{let r=iS({...n,processors:t});return iP(e,r),ij(r,e),iI(r,e)})(this,{})(e)},get description(){return te.get(this)?.description},get _def(){return this._zod.def}}),oc=eq("_ZodString",(e,t)=>{nF.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{n.type="string";let{minimum:r,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:u}=iG(e);if("number"==typeof r&&(n.minLength=r),"number"==typeof i&&(n.maxLength=i),o&&(n.format=iX[o]??o,""===n.format&&delete n.format,("time"===o||u)&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a].map(iq);1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n)},ip.derived({format:e=>iG(e).format??null,minLength:e=>iG(e).minimum??null,maxLength:e=>iG(e).maximum??null},{regex(...e){return this.check(function(e,t){return new ns({check:"string_format",format:"regex",...er(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new nc({check:"string_format",format:"includes",...er(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new nd({check:"string_format",format:"starts_with",...er(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new nf({check:"string_format",format:"ends_with",...er(t),suffix:e})}(...e))},min(...e){return this.check(io(...e))},max(...e){return this.check(ii(...e))},length(...e){return this.check(ia(...e))},nonempty(...e){return this.check(io(1,...e))},lowercase(e){return this.check(new nu({check:"string_format",format:"lowercase",...er(e)}))},uppercase(e){return this.check(new nl({check:"string_format",format:"uppercase",...er(e)}))},trim(){return this.check(is(e=>e.trim()))},normalize(...e){return this.check(function(e){return is(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(is(e=>e.toLowerCase()))},toUpperCase(){return this.check(is(e=>e.toUpperCase()))},slugify(){return this.check(is(e=>K(e)))}})),od=eq("ZodString",(e,t)=>{nF.init(e,t),oc.init(e,t)},{email(e){return this.check(new og({type:"string",format:"email",check:"string_format",abort:!1,...er(e)}))},url(e){return this.check(new oz({type:"string",format:"url",check:"string_format",abort:!1,...er(e)}))},jwt(e){return this.check(new oD({type:"string",format:"jwt",check:"string_format",abort:!1,...er(e)}))},emoji(e){return this.check(new ow({type:"string",format:"emoji",check:"string_format",abort:!1,...er(e)}))},guid(e){return this.check(new o_({type:"string",format:"guid",check:"string_format",abort:!1,...er(e)}))},uuid(e){return this.check(new ob({type:"string",format:"uuid",check:"string_format",abort:!1,...er(e)}))},uuidv4(e){return this.check(new ob({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...er(e)}))},uuidv6(e){return this.check(new ob({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...er(e)}))},uuidv7(e){return this.check(new ob({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...er(e)}))},nanoid(e){return this.check(new ok({type:"string",format:"nanoid",check:"string_format",abort:!1,...er(e)}))},cuid(e){return this.check(new o$({type:"string",format:"cuid",check:"string_format",abort:!1,...er(e)}))},cuid2(e){return this.check(new oO({type:"string",format:"cuid2",check:"string_format",abort:!1,...er(e)}))},ulid(e){return this.check(new oS({type:"string",format:"ulid",check:"string_format",abort:!1,...er(e)}))},base64(e){return this.check(new oT({type:"string",format:"base64",check:"string_format",abort:!1,...er(e)}))},base64url(e){return this.check(new oN({type:"string",format:"base64url",check:"string_format",abort:!1,...er(e)}))},xid(e){return this.check(new ox({type:"string",format:"xid",check:"string_format",abort:!1,...er(e)}))},ksuid(e){return this.check(new oP({type:"string",format:"ksuid",check:"string_format",abort:!1,...er(e)}))},ipv4(e){return this.check(new oA({type:"string",format:"ipv4",check:"string_format",abort:!1,...er(e)}))},ipv6(e){return this.check(new oj({type:"string",format:"ipv6",check:"string_format",abort:!1,...er(e)}))},cidrv4(e){return this.check(new oE({type:"string",format:"cidrv4",check:"string_format",abort:!1,...er(e)}))},cidrv6(e){return this.check(new oZ({type:"string",format:"cidrv6",check:"string_format",abort:!1,...er(e)}))},e164(e){return this.check(new oI({type:"string",format:"e164",check:"string_format",abort:!1,...er(e)}))},datetime(e){return this.check(new oh({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...er(e)}))},date(e){return this.check(new om({type:"string",format:"date",check:"string_format",...er(e)}))},time(e){return this.check(new ov({type:"string",format:"time",check:"string_format",precision:null,...er(e)}))},duration(e){return this.check(new oy({type:"string",format:"duration",check:"string_format",...er(e)}))}});function of(e){return new od(r5({type:"string",...er(e)}))}let op=eq("ZodStringFormat",(e,t)=>{nC.init(e,t),oc.init(e,t)}),oh=eq("ZodISODateTime",(e,t)=>{n0.init(e,t),op.init(e,t)}),om=eq("ZodISODate",(e,t)=>{n1.init(e,t),op.init(e,t)}),ov=eq("ZodISOTime",(e,t)=>{n4.init(e,t),op.init(e,t)}),oy=eq("ZodISODuration",(e,t)=>{n2.init(e,t),op.init(e,t)}),og=eq("ZodEmail",(e,t)=>{nJ.init(e,t),op.init(e,t)}),o_=eq("ZodGUID",(e,t)=>{nM.init(e,t),op.init(e,t)}),ob=eq("ZodUUID",(e,t)=>{nU.init(e,t),op.init(e,t)}),oz=eq("ZodURL",(e,t)=>{nV.init(e,t),op.init(e,t)}),ow=eq("ZodEmoji",(e,t)=>{nW.init(e,t),op.init(e,t)}),ok=eq("ZodNanoID",(e,t)=>{nG.init(e,t),op.init(e,t)}),o$=eq("ZodCUID",(e,t)=>{nX.init(e,t),op.init(e,t)}),oO=eq("ZodCUID2",(e,t)=>{nH.init(e,t),op.init(e,t)}),oS=eq("ZodULID",(e,t)=>{nq.init(e,t),op.init(e,t)}),ox=eq("ZodXID",(e,t)=>{nY.init(e,t),op.init(e,t)}),oP=eq("ZodKSUID",(e,t)=>{nQ.init(e,t),op.init(e,t)}),oA=eq("ZodIPv4",(e,t)=>{n9.init(e,t),op.init(e,t)}),oj=eq("ZodIPv6",(e,t)=>{n5.init(e,t),op.init(e,t)}),oE=eq("ZodCIDRv4",(e,t)=>{n7.init(e,t),op.init(e,t)}),oZ=eq("ZodCIDRv6",(e,t)=>{n8.init(e,t),op.init(e,t)}),oT=eq("ZodBase64",(e,t)=>{rn.init(e,t),op.init(e,t)}),oN=eq("ZodBase64URL",(e,t)=>{ri.init(e,t),op.init(e,t)}),oI=eq("ZodE164",(e,t)=>{ro.init(e,t),op.init(e,t)}),oD=eq("ZodJWT",(e,t)=>{rs.init(e,t),op.init(e,t)}),oR=eq("ZodNumber",(e,t)=>{ru.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let{minimum:i,maximum:o,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:u,isInt:l}=iG(e);n.type=l?"integer":"number";let c="number"==typeof u&&u>=(i??-1/0),d="number"==typeof s&&s<=(o??1/0),f="draft-04"===t.target||"openapi-3.0"===t.target;if(c?f?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u:"number"==typeof i&&(n.minimum=i),d?f?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s:"number"==typeof o&&(n.maximum=o),a){let i=new Set;for(let o of a)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):ix(e,t,n,r,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...s]=i;void 0!==o&&(n.multipleOf=o),s.length&&(n.allOf=[...n.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,n,r),e.isFinite=!0},ip.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=iG(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=iG(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=iG(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>iG(e).format??null},{gt(e,t){return this.check(ie(e,t))},gte(e,t){return this.check(it(e,t))},min(e,t){return this.check(it(e,t))},lt(e,t){return this.check(r7(e,t))},lte(e,t){return this.check(r8(e,t))},max(e,t){return this.check(r8(e,t))},int(e){return this.check(oM(e))},safe(e){return this.check(oM(e))},positive(e){return this.check(ie(0,e))},nonnegative(e){return this.check(it(0,e))},negative(e){return this.check(r7(0,e))},nonpositive(e){return this.check(r8(0,e))},multipleOf(e,t){return this.check(ir(e,t))},step(e,t){return this.check(ir(e,t))},finite(){return this}}));function oF(e){return new oR(r5({type:"number",checks:[],...er(e)}))}let oC=eq("ZodNumberFormat",(e,t)=>{rl.init(e,t),oR.init(e,t)});function oM(e){return new oC({type:"number",check:"number_format",abort:!1,format:"safeint",...er(e)})}let oU=eq("ZodBoolean",(e,t)=>{rc.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function oJ(e){return new oU({type:"boolean",...er(e)})}(e,t)=>{rd.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{ix(e,t,n,r,"BigInt cannot be represented in JSON Schema")}};let oL=eq("ZodUnknown",(e,t)=>{rf.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function oB(){return new oL({type:"unknown"})}let oK=eq("ZodNever",(e,t)=>{rp.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}});function oV(e){return new oK({type:"never",...er(e)})}let oW=eq("ZodArray",(e,t)=>{ou(),r_.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,{minimum:o,maximum:a}=iG(e);"number"==typeof o&&(n.minItems=o),"number"==typeof a&&(n.maxItems=a),n.type="array",n.items=iP(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element},{min(e,t){return this.check(io(e,t))},nonempty(e){return this.check(io(1,e))},max(e,t){return this.check(ii(e,t))},length(e,t){return this.check(ia(e,t))},unwrap(){return this.element}});function oG(e,t){return new oW({type:"array",element:e,...er(t)})}let oX=eq("ZodObject",(e,t)=>{ou(),rO.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&ix(e,t,n,r,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in n.type="object",n.properties={},o)T(n.properties,e,iP(o[e],t,{...r,path:[...r.path,"properties",e]}));let a=[];for(let e of Object.keys(o)){let n=i.shape[e];("input"===t.io?void 0===iY(n):void 0===n._zod.optout)&&a.push(e)}a.length>0&&(n.required=a),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=iP(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),iw.installLazyProp(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return o3(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(il.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(il.mergeDefs(this._zod.def,{catchall:oB()}))},loose(){return this.clone(il.mergeDefs(this._zod.def,{catchall:oB()}))},strict(){return this.clone(il.mergeDefs(this._zod.def,{catchall:oV()}))},strip(){return this.clone(il.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return im.extend(this,e)},safeExtend(e){return iv.safeExtend(this,e)},merge(e){return iy.merge(this,e)},pick(e){return ig.pick(this,e)},omit(e){return i_.omit(this,e)},partial(...e){return ib.partial(ae,this,e[0])},exactPartial(...e){return ib.partial(an,this,e[0],"exactPartial")},required(...e){return iz.required(as,this,e[0])}});function oH(e,t){return new oX({type:"object",shape:e??{},...ih.normalizeParams(t)})}function oq(e,t){return new oX({type:"object",shape:e,catchall:oV(),...ih.normalizeParams(t)})}let oY=eq("ZodUnion",(e,t)=>{rx.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{var i,o,a,s;let u,l,c;return i=e,o=t,a=n,s=r,l=!1===(u=i._zod.def).inclusive,c=u.options.map((e,t)=>iP(e,o,{...s,path:[...s.path,l?"oneOf":"anyOf",t]})),void(l?a.oneOf=c:a.anyOf=c)},e.options=t.options});function oQ(e,t){return new oY({type:"union",options:e,...ih.normalizeParams(t)})}let o0=eq("ZodDiscriminatedUnion",(e,t)=>{oY.init(e,t),rA.init(e,t)});function o1(e,t,n){return new o0({type:"union",options:t,discriminator:e,...ih.normalizeParams(n)})}let o4=eq("ZodIntersection",(e,t)=>{rj.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a,s,u;return o=iP((i=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),a=iP(i.right,t,{...r,path:[...r.path,"allOf",1]}),void(n.allOf=u=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(u))}}),o2=eq("ZodRecord",(e,t)=>{ou(),rD.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="object";let o=i.keyType,a=iG(o).patterns;if("loose"===i.mode&&a&&a.size>0){let e=iP(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},a))T(n.patternProperties,iq(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){n.propertyNames=iP(i.keyType,t,{...r,path:[...r.path,"propertyNames"]});let o=iQ.get(t);o||(o=[],iQ.set(t,o),t.deferred.push(()=>(function(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of iQ.get(e)??[]){let i=e.seen.get(r),o=(i?.def??i?.schema)?.propertyNames;if(!o||!0===o||n.has(o))continue;let a=function e(t,n,r){if(n.$ref){if(r.has(n))return n;r.add(n);let i=t.get(n)?.def;if(!i)return n;let o=e(t,i,r);return o===i?n:o}for(let i of["anyOf","oneOf"]){let o=n[i];if(!Array.isArray(o))continue;let a=o.map(n=>e(t,n,r));a.some((e,t)=>e!==o[t])&&(n={...n,[i]:a})}let i=Array.isArray(n.type)?n.type:[n.type],o=!i.includes("string")&&i.some(e=>"number"===e||"integer"===e),a=n.enum??(void 0!==n.const?[n.const]:void 0);if(!o&&!a?.some(e=>"number"==typeof e))return n;let{minimum:s,maximum:u,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:f,id:p,...h}=n;return h.enum?h.enum=h.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof h.const&&(h.const=String(h.const)),o&&(h.type="string",a||(h.pattern=(i.includes("number")?tR:tD).source)),h}(t,o,new Set);a!==o&&n.set(o,a)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),o.push(e)}n.additionalProperties=iP(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let s=o._zod.values,u="input"===t.io&&void 0!==iY(i.valueType);if(s&&!i.partial&&!u){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e.map(String))}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function o9(e,t,n){return new o2(t&&t._zod?{type:"record",keyType:e,valueType:t,...ih.normalizeParams(n)}:{type:"record",keyType:of(),valueType:e,...ih.normalizeParams(t)})}let o6=eq("ZodEnum",(e,t)=>{rC.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t)=>{let n=w(e._zod.def.entries);if(0===n.length){t.not={};return}n.every(e=>"number"==typeof e)&&(t.type="number"),n.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=n})(e,n),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new o6({...t,checks:[],...ih.normalizeParams(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new o6({...t,checks:[],...ih.normalizeParams(r),entries:i})}});function o3(e,t){return new o6({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...ih.normalizeParams(t)})}let o5=eq("ZodLiteral",(e,t)=>{rM.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(0===i.values.length){n.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(ix(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(ix(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function o7(e,t){return new o5({type:"literal",values:Array.isArray(e)?e:[e],...ih.normalizeParams(t)})}let o8=eq("ZodTransform",(e,t)=>{ou(),rU.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{ix(e,t,n,r,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new eQ(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(ik.issue(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=n.value),r.inst??(r.inst=e),n.issues.push(ik.issue(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),ae=eq("ZodOptional",(e,t)=>{rL.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function at(e){return new ae({type:"optional",innerType:e})}let an=eq("ZodExactOptional",(e,t)=>{rB.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ar=eq("ZodNullable",(e,t)=>{rK.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=iP((i=e._zod.def).innerType,t,r),a=t.seen.get(e),void("openapi-3.0"===t.target?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function ai(e){return new ar({type:"nullable",innerType:e})}let ao=eq("ZodDefault",(e,t)=>{rV.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o;return iP((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,void((o=i1(i.defaultValue,e,t,n,r))!==i0&&(n.default=o))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),aa=eq("ZodPrefault",(e,t)=>{rG.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(iP(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=i1(i.defaultValue,e,t,n,r);o!==i0&&(n._prefault=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),as=eq("ZodNonOptional",(e,t)=>{rX.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iP((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),au=eq("ZodCatch",(e,t)=>{rY.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,o=e._zod.def;iP(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{ix(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),al=eq("ZodPipe",(e,t)=>{rQ.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(iP(a="input"===t.io?o?i.out:i.in:i.out,t,r),t.seen.get(e).ref=a)},e.in=t.in,e.out=t.out});function ac(e,t){return new al({type:"pipe",in:e,out:t})}let ad=eq("ZodReadonly",(e,t)=>{r2.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iP((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),af=eq("ZodCustom",(e,t)=>{r6.init(e,t),ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{ix(e,t,n,r,"Custom types cannot be represented in JSON Schema")}});e.s(["array",0,oG,"boolean",0,oJ,"discriminatedUnion",0,o1,"enum",0,o3,"literal",0,o7,"number",0,oF,"object",0,oH,"record",0,o9,"strictObject",0,oq,"string",0,of,"union",0,oQ,"unknown",0,oB],749906),e.i(749906),e.s([],790530),e.i(790530),e.i(32055),e.s([],926406),e.i(926406),e.s([],855143),e.i(855143),e.s(["array",0,oG,"boolean",0,oJ,"discriminatedUnion",0,o1,"enum",0,o3,"literal",0,o7,"number",0,oF,"object",0,oH,"record",0,o9,"strictObject",0,oq,"string",0,of,"union",0,oQ,"unknown",0,oB],794588)},677432,e=>{e.s(["f",0,"v1"])},776182,e=>{var t=e.i(79322),n=e.i(246517),r=e.i(107239),i=e.i(492973),o=e.i(113678),a=e.i(720966);let s=["gemini","openai","azure","anthropic","minimax-code",...o.U],u=["docker","npm","desktop","fnos","android","other"],l=["1","2-5","6-20",">20"],c=["0","1-50","51-500",">500"],d=t.z.enum(s),f=n.z.boolean(),p={app_installed:r.z.strictObject({method:t.z.enum(["setup-token","preset-admin"])}),eula_accepted:r.z.strictObject({version:i.z.string().regex(/^v\d{1,4}$/),trigger:t.z.enum(["install","upgrade","settings"])}),instance_alive:r.z.strictObject({platform:t.z.enum(u),aiConfigured:n.z.boolean()}),app_opened:r.z.strictObject({client:t.z.enum(["browser","pwa","desktop","android"])}),page_viewed:r.z.strictObject({page:t.z.enum(["home","notebooks","error_detail","practice","review","stats","tags","exams","settings","admin","imports","print","auth","setup","other"])}),ai_analyze_started:r.z.strictObject({provider:d}),ai_analyze_result:r.z.strictObject({ok:f,provider:d,duration:t.z.enum(["<3s","3-10s","10-30s",">30s"])}),ai_reanswer:r.z.strictObject({ok:f,provider:d}),ai_practice_grading:r.z.strictObject({ok:f,count:t.z.enum(l)}),exam_paper_generation:r.z.strictObject({ok:f,count:t.z.enum(l)}),data_exported:r.z.strictObject({scope:t.z.enum(["user","all"]),rows:t.z.enum(c)}),data_imported:r.z.strictObject({rows:t.z.enum(c)}),tts_used:r.z.strictObject({mode:t.z.enum(a.l)}),settings_changed:r.z.strictObject({section:t.z.enum(["general","ai","tts","prompts","telemetry"])})};Object.keys(p),e.s(["F",0,u,"k",0,1,"r",0,function(e,t){let n=p[e].safeParse(t??{});return n.success?n.data:null}])},212139,735418,e=>{e.i(666680);var t=e.i(231069),n=e.i(437848),r=e.i(50667),i=e.i(776182);e.i(75764);var o=e.i(241920),a=e.i(677432);function s(){return function(e,t=process.env.TELEMETRY_DISABLED?.trim().toLowerCase()==="true"){let n=e.telemetry??{},r=e.eula?.acceptedVersion,i=!!r&&r!==a.f,o=n.endpoint?.trim()||"https://wrong-notebook-telemetry.margrop.net/api/v1/ingest",s=n.retentionDays??30;if(t)return{recording:!1,errors:!1,forwarding:!1,forwardingConfigured:!1,endpoint:o,retentionDays:s,lockedByEnv:t,consentPending:i,consentGiven:!!r};let u=!0===n.forwarding;return{recording:!0===n.recording,errors:!1!==n.errors,forwarding:u&&!!r&&!i,forwardingConfigured:u,endpoint:o,retentionDays:s,lockedByEnv:t,consentPending:i,consentGiven:!!r}}((0,o.b)())}e.s(["f",0,s],735418);let u=(0,n.f)("telemetry");async function l(e,n,o){try{var a;let l={write:(a=o??s()).recording||a.forwarding,local:a.recording};if(!l.write)return!1;let c=(0,i.r)(e,n);if(!c)return u.warn({name:e},"Dropped telemetry event with invalid payload"),!1;return await r.f.telemetryEvent.create({data:{name:e,payload:JSON.stringify(c),version:(0,t.f)(),local:l.local}}),!0}catch(e){return u.warn({error:e},"Failed to record telemetry event"),!1}}async function c(e=new Date,t=s()){let n={OR:[{local:!0,createdAt:{lt:new Date(e.getTime()-864e5*t.retentionDays)}},{local:!1,createdAt:{lt:new Date(e.getTime()-6048e5)}},{local:!1,forwardedAt:{not:null}}]};try{let[e,t]=await r.f.$transaction([r.f.telemetryEvent.deleteMany({where:n}),r.f.telemetryError.deleteMany({where:n})]);return e.count+t.count}catch(e){return u.warn({error:e},"Failed to purge telemetry"),0}}e.s(["D",0,7,"t",0,c,"d",0,l],212139)}],993133,(e,t,n)=>{t.exports={name:"wrong-notebook",version:"2026.10.19",private:!0,license:"MIT",scripts:{predev:"node scripts/copy-pdfjs-assets.mjs",dev:"next dev -H 0.0.0.0",prebuild:"node scripts/copy-pdfjs-assets.mjs",build:"next build",start:"next start",lint:"eslint src --max-warnings=0",test:"vitest run","test:unit":"vitest run src/__tests__/unit","test:integration":"vitest run src/__tests__/integration","test:watch":"vitest","test:coverage":"vitest run --coverage","test:e2e":"node scripts/run-e2e.mjs","test:report":"playwright show-report --host 0.0.0.0"},dependencies:{"@anthropic-ai/sdk":"^1.3.0","@breezystack/lamejs":"1.2.7","@google/genai":"^2.32.0","@next-auth/prisma-adapter":"^1.0.7","@prisma/client":"5.22.0","@radix-ui/react-checkbox":"^1.3.3","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-label":"^2.1.8","@radix-ui/react-progress":"^1.1.8","@radix-ui/react-select":"^2.2.6","@radix-ui/react-slider":"^1.3.6","@radix-ui/react-slot":"^1.2.4","@radix-ui/react-switch":"^1.2.6","@radix-ui/react-tabs":"^1.1.13",bcryptjs:"^3.0.3","date-fns":"^4.1.0","date-fns-tz":"^3.2.0",docx:"^9.13.0",dotenv:"^18.0.9",fflate:"^0.8.3","global-agent":"^4.1.3","heic-to":"1.6.6",katex:"^0.19.0",next:"~16.4.3","next-auth":"^4.24.15",openai:"^7.46.0","pdfjs-dist":"^6.4.299",react:"19.3.1","react-dom":"19.3.1","react-dropzone":"^20.1.4","react-image-crop":"^11.0.10","react-markdown":"^10.1.0","read-excel-file":"^9.3.12",recharts:"^3.5.0","rehype-katex":"^7.0.1",remark:"^15.0.1","remark-gfm":"^4.0.1","remark-math":"^6.0.0","server-only":"^0.0.1","strip-markdown":"^6.0.0",undici:"^7.16.0","write-excel-file":"^4.1.1",zod:"^4.6.7"},devDependencies:{"@playwright/test":"^1.57.0","@tailwindcss/postcss":"^4","@types/bcryptjs":"^2.4.6","@types/node":"^24.19.2","@types/react":"^19","@types/react-dom":"^19","@vitejs/plugin-react":"^6.1.2","@vitest/coverage-v8":"^5.0.5","baseline-browser-mapping":"^2.8.32","class-variance-authority":"^0.7.1",clsx:"^2.1.1",eslint:"^9","eslint-config-next":"16.4.3",jsdom:"^30.1.3","lucide-react":"^1.65.0",prisma:"5.22.0","tailwind-merge":"^3.4.0",tailwindcss:"^4","ts-node":"^10.9.2","tw-animate-css":"^1.4.0",typescript:"^5",vitest:"^5.0.5"},prisma:{seed:'ts-node --compiler-options {"module":"CommonJS"} prisma/seed.ts'},overrides:{katex:"$katex",minimatch:"^11.0.3"}}}];
|
|
56
56
|
|
|
57
57
|
//# sourceMappingURL=_1eqnx6dcz6a03._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[971724,e=>{"use strict";var t=e.i(562810);e.s(["z",0,t])},163510,e=>{"use strict";e.i(332116);var t=e.i(557354),c=e.i(871244),r=e.i(50377),a=e.i(126542);let n=(0,r.f)("eula");function i(e=(0,t.b)().eula){return!!e?.acceptedVersion&&e.acceptedVersion!==c.j}async function s(e){let r=e.version??c.j;(0,t.r)({eula:{acceptedVersion:r,acceptedAt:new Date().toISOString(),acceptedBy:e.acceptedBy},...e.enableForwarding?{telemetry:{forwarding:!0}}:{}}),n.info({version:r,acceptedBy:e.acceptedBy},"EULA accepted"),await (0,a.d)("eula_accepted",{version:r,trigger:e.trigger})}e.s(["K",0,s,"_",0,function(e){let r=(0,t.b)().eula;return{pending:e&&i(r),current:c.j,accepted:r?.acceptedVersion??null,acceptedAt:r?.acceptedAt??null,changes:c.o[c.j]??{zh:[],en:[]}}},"L",0,i])},66292,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_telemetry_server_ts_0f78qhte267bg._.js"].map(t=>e.l(t))).then(()=>t(475478)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_1feimqjhlznj8._.js.map
|
|
@@ -11,6 +11,6 @@ ${t}`:t,s=[];return(e.answer?.trim()&&s.push(`参考答案:${e.answer.trim()}`
|
|
|
11
11
|
|
|
12
12
|
${s.join("\n\n")}`:r}e.s(["S",0,60,"i",0,2e4,"$",0,function(e){let t=[];for(let i of g(e))(i||0!==t.length&&""!==t[t.length-1])&&t.push(i);for(;t.length>0&&""===t[t.length-1];)t.pop();return t},"T",0,j,"C",0,m,"J",0,function(e,t={}){let i,r,s=void 0===t.maxLength?2e4:Math.min(Math.max(t.maxLength,1e3),1e6),n=void 0===t.maxQuestions?60:Math.min(Math.max(t.maxQuestions,2),2e3),a=e.length>s,o=g(e.slice(0,s)),l=o.map(e=>e?_(e):null),c=o.length;for(let e=0;e<o.length;e++)if(y.test(o[e])){c=e;break}let u=[],h=[];for(let e=0;e<c;e++){let t=l[e];t&&("cn"===t.family?h:u).push({...t,line:e})}let d=new Set;for(let e=0;e<c;e++)(w.test(o[e])||l[e]?.family==="cn"||V(o[e],o.slice(e+1,e+5)))&&d.add(e);let p=[],k=A(u,d);if(k.length<2){let e=A(h,new Set);e.length>=2&&(p=[{chain:e,sectionHeading:null}])}else p=function(e,t,i,r){if(e.length<2)return[];let s=e[0].family,n=[0];for(let t=1;t<e.length;t++)1===e[t].value&&n.push(t);if(n.length<2){let n=q(e[0].line,t,i,s,r);return null!==n?[{chain:e,sectionHeading:n}]:[]}let a=[];for(let o=0;o<n.length;o++){let l=n[o],c=o+1<n.length?n[o+1]:e.length,u=e.slice(l,c),h=0===o?q(e[0].line,t,i,s,r):function(e,t,i,r,s,n){for(let a=e+1;a<t;a++)if(i[a]&&(n.has(a)||I(i[a],r[a],s)||V(i[a])))return i[a];return null}(e[l-1].line,e[l].line,t,i,s,r);if(null===h&&o>0){a[a.length-1].chain.push(...u);continue}a.push({chain:u,sectionHeading:h})}return a.filter(e=>e.chain.length>0)}(k,o,l,d);let $=p.length?p.flatMap(e=>e.chain):k,T=m(o.slice(0,c)),P=c<o.length?S(o.slice(c)):[],O=(r=_(o[$[0]?.line??0]??""))?r.label:null,M=e=>({questions:T?[{label:O,text:T,material:null,section:null,lineRange:{from:0,to:c}}]:[],ignored:P,detected:!1,ambiguous:e,candidateCount:e?$.length:+!!T,overflow:0,tooLong:a});if($.length<2){if(!T)return M(!1);let e=E(T.split("\n")),t=M(!1);if(t.questions.length>0&&Object.keys(e.fields).length>0&&(t.questions[0]={...t.questions[0],text:f(e.text),...e.fields}),t.questions.length>0&&P.length){let[e,i]=C(P,t.questions);t.ignored=e,i||(t.ignored=P)}return t}let D=$[0].family;if(!t.forceNumbered&&function(e,t,i,r){let s=null;for(let n=t-1;n>=0;n--)if(e[n]){s=I(e[n],r[n],i)?null:e[n];break}return!(!s||v.test(s)||z.test(s))&&("paren"===i?s.length>=15||/[。?!?!::,,;;]$/.test(s):/[::]$/.test(s)&&x.test(s))}(o,$[0].line,D,l)){let e=M(!0);if(e.questions.length>0&&T){let t=E(T.split("\n"));Object.keys(t.fields).length>0&&(e.questions[0]={...e.questions[0],text:f(t.text),...t.fields})}return e}let U=new Set($.map(e=>e.line)),W=[],F=[],H=null,B=[],K=[],J=(e,t)=>{for(let i of S(e))(!v.test(i)||!(i.length<80))&&(b.test(i)||i.length>=80&&/[。!?.!?;;]/.test(i))?B.push({text:i,range:R(i)}):t?W.push(i):H&&!F.some(e=>e.section===H)?H=`${H}
|
|
13
13
|
${i}`:W.push(i)},G=$[0].line,X=[];for(let e=0;e<G;e++)o[e]&&(I(o[e],l[e],D)||V(o[e],o.slice(e+1,e+5)))?(J(X.splice(0),!0),H=o[e],K=[]):X.push(o[e]);J(X,!0);let Q=p.length>1,Y=e=>{if(!Q)return -1;let t=0;for(let i=0;i<p.length;i++)if(e<(t+=p[i].chain.length))return i;return p.length-1};for(let e=0;e<$.length;e++){let t=$[e].line,i=e+1<$.length?$[e+1].line:c,r=Y(e);if(Q&&r>=0){let e=p[r].sectionHeading;null!==e&&(H=e,K=[])}B.length&&(K=[...K.filter(e=>e.range),...B],B=[]);let s=i,n=null;for(let e=t+1;e<i;e++)if(o[e]&&!U.has(e)&&I(o[e],l[e],D)){s=e,n=o[e];break}let a=o.slice(t,s),u=S(a),h=[];for(;u.length>1&&b.test(u[u.length-1].slice(0,30));)h.unshift(u.pop());let d=h.length?u.join("\n"):m(a),_=$[e].value,g=K.filter(e=>!e.range||_>=e.range.from&&_<=e.range.to),v=E(f(d).split("\n"));for(let r of(F.push({label:$[e].label,text:v.text,material:g.length?g.map(e=>e.text).join("\n\n"):null,section:H,lineRange:{from:t,to:i},...v.fields}),h))B.push({text:r,range:R(r)});null!==n&&(H=n,K=[],J(o.slice(s+1,i),!1))}if(Q&&P.length){let e=p.map(e=>e.sectionHeading).filter(e=>null!==e),t=P.join("\n");i=e.some(e=>t.includes(e))?function(e,t,i){let r=[],s=0,n=t.map(e=>{let t=i.slice(s,s+e.chain.length);return s+=e.chain.length,t}),a=-1;for(let s of e){let e=s.split("\n"),o=[],l=!1;for(let r of e){let e=r.trim();if(!e){o.push(r);continue}let s=t.findIndex(t=>t.sectionHeading&&e.includes(t.sectionHeading));if(s>=0){a=s;continue}let c=L(e);if(!c){o.push(r);continue}let u=a>=0?n[a]:i,h=!1;for(let e of c){let t=u.find(t=>t.label===e.label);if(!t){o.push(r);break}h=!0,l=!0;let i=N(e.text);i.answer&&!t.answer&&(t.answer=i.answer),i.analysis&&(t.analysis=t.analysis?`${t.analysis}
|
|
14
|
-
${i.analysis}`:i.analysis)}h||o.includes(r)||o.push(r)}l?o.length&&r.push(o.join("\n")):r.push(s)}return r}(P,p,F):P}else i=C(P,F)[0];let Z=F.slice(n);return{questions:F.slice(0,n),ignored:[...W,...i,...Z.map(e=>j(e))],detected:!0,ambiguous:!1,candidateCount:F.length,overflow:Z.length,tooLong:a}},"N",0,f],843716);var D=e.i(604147),U=e.i(377807);let W=r.z.object({x:a.z.number().min(0).max(1),y:a.z.number().min(0).max(1),width:a.z.number().min(.01).max(1),height:a.z.number().min(.01).max(1)}).refine(e=>e.x+e.width<=1.0001&&e.y+e.height<=1.0001,{message:"REGION_OUT_OF_BOUNDS"}),F=["unclear","partial","unlocated"],H=n.z.string().max(1572864,"DRAFT_IMAGE_TOO_LARGE").regex(/^data:image\/(?:jpeg|png|webp);base64,[A-Za-z0-9+/]+=*$/,"DRAFT_IMAGE_INVALID"),B=r.z.object({original:n.z.string().max(2e4),text:n.z.string().max(2e4),uncertain:o.z.array(n.z.string().max(200)).max(20)}),K=r.z.object({key:n.z.string().regex(/^[A-Za-z0-9_-]{1,40}$/),label:n.z.string().max(20).nullable(),text:n.z.string().max(2e4),material:n.z.string().max(2e4).nullable(),section:n.z.string().max(500).nullable(),selected:c.z.boolean(),regions:o.z.array(W).max(4),hasFigure:c.z.boolean(),flags:o.z.array(D.z.enum(F)).max(F.length),fix:B.nullish(),answer:n.z.string().max(2e4).nullish(),analysis:n.z.string().max(2e4).nullish(),knowledgePoints:o.z.array(n.z.string().max(200)).max(100).optional(),difficultyStars:a.z.number().int().min(1).max(5).nullish(),questionType:n.z.string().max(200).nullish(),wrongAnswer:n.z.string().max(2e4).nullish(),image:H.nullish()}),J=["blurry","partial","truncated","tooMany"],G=r.z.object({items:o.z.array(K).max(60),ignored:o.z.array(n.z.string().max(2e4)).max(200),warnings:o.z.array(D.z.enum(J)).max(J.length)}).superRefine((e,t)=>{let i=new Set;for(let r of e.items)i.has(r.key)&&t.addIssue({code:"custom",message:"DUPLICATE_ITEM_KEY"}),i.add(r.key)});function X(e=[]){let t=new Set(e);for(;;){let e=`q${Math.random().toString(36).slice(2,10)}`;if(!t.has(e))return e}}e.s(["O",0,2e4,"w",0,100,"y",0,4,"k",0,.01,"Z",0,G,"d",0,function(e,t,i=0){let r=[];return{items:e.slice(0,60).map(e=>{let t=X(r);return r.push(t),{key:t,label:e.label?.slice(0,20)??null,text:e.text.slice(0,2e4),material:e.material?.slice(0,2e4)??null,section:e.section?.slice(0,500)??null,selected:e.text.trim().length>0,regions:[],hasFigure:!1,flags:[],answer:e.answer??null,analysis:e.analysis??null,knowledgePoints:e.knowledgePoints?.slice(0,100),difficultyStars:e.difficultyStars??null,questionType:(0,U.P)(e.questionType),wrongAnswer:e.wrongAnswer??null}}),ignored:t.slice(0,200),warnings:i>0||e.length>60?["tooMany"]:[]}},"n",0,H,"q",0,X,"c",0,function(e,t){return e.items.filter(e=>e.selected&&("image"===t?e.regions.length>0:e.text.trim().length>0))}],276041);let Q=t.z.tuple([i.z.coerce.number().int(),i.z.coerce.number().int()]),Y=r.z.object({x:i.z.coerce.number(),y:i.z.coerce.number(),w:i.z.coerce.number(),h:i.z.coerce.number()}),Z=r.z.object({label:s.z.union([n.z.string(),a.z.number()]).nullish(),lines:Q.nullish(),material:Q.nullish(),section:n.z.string().nullish(),text:n.z.string().nullish(),regions:o.z.array(l.z.unknown()).nullish(),hasFigure:c.z.boolean().nullish(),unclear:c.z.boolean().nullish(),partial:c.z.boolean().nullish()}).passthrough(),ee=r.z.object({quality:n.z.string().nullish(),questions:o.z.array(l.z.unknown())});function et(e){return null==e?null:String(e).trim().replace(/[..、::))]+$/,"").slice(0,20)||null}function ei(e){let t=Y.safeParse(e);if(!t.success)return null;let{x:i,y:r,w:s,h:n}=t.data;if(![i,r,s,n].every(Number.isFinite))return null;let a=Math.max(0,Math.min(1e3,i)),o=Math.max(0,Math.min(1e3,r)),l=(Math.max(0,Math.min(1e3,i+s))-a)/1e3,c=(Math.max(0,Math.min(1e3,r+n))-o)/1e3;if(l<.01||c<.01)return null;let u=e=>Math.round(1e4*e)/1e4;return{x:u(a/1e3),y:u(o/1e3),width:u(l),height:u(c)}}function er(e,t){if(!e)return null;let[i,r]=e;return i>=1&&r>=i&&r<=t?[i,r]:null}e.s(["b",0,"AI_IMAGE_NOT_SUPPORTED","W",0,1e3,"F",0,function(e){let t=(e instanceof Error?e.message:String(e)).toLowerCase();return/(image|vision|multimodal|multi-modal|图片|图像|视觉|多模态)/.test(t)&&/(not support|unsupported|does not accept|cannot|invalid content type|not allowed|不支持|无法处理)/.test(t)},"z",0,function(e,t){let{value:i,truncated:r}=function(e){let t=(0,u.Q)(e),i=t.match(/```(?:json)?\s*([\s\S]*?)```/);i&&(t=i[1]);let r=t.indexOf("{"),s=t.lastIndexOf("}");if(-1!==r&&s>r)try{let e=ee.safeParse(JSON.parse(t.slice(r,s+1)));if(e.success)return{value:e.data,truncated:!1}}catch{}let n=function(e){let t=e.search(/"questions"\s*:\s*\[/);if(-1===t)return[];let i=[],r=e.indexOf("[",t)+1,s=0,n=!1,a=!1,o=-1;for(;r<e.length;r++){let t=e[r];if(n){a?a=!1:"\\"===t?a=!0:'"'===t&&(n=!1);continue}if('"'===t)n=!0;else if("{"===t)0===s&&(o=r),s++;else if("}"===t){if(0==--s&&-1!==o){try{i.push(JSON.parse(e.slice(o,r+1)))}catch{}o=-1}}else if("]"===t&&0===s)break}return i}(t);if(0===n.length)throw Error("AI_RESPONSE_ERROR: invalid question split output");return{value:{questions:n},truncated:!0}}(e),s="text"===t.kind?function(e,t){let i=Array(t.length).fill(!1),r=[],s=[],n=[];for(let a of e){let e=Z.safeParse(a);if(!e.success)continue;let o=er(e.data.lines,t.length);if(!o||r.some(([e,t])=>o[0]<=t&&o[1]>=e))continue;let l=f(m(t.slice(o[0]-1,o[1])));if(!l.trim())continue;let c=er(e.data.material,t.length),u=c&&(c[1]<o[0]||c[0]>o[1])?c:null;r.push(o),s.push(u);for(let e=o[0]-1;e<o[1];e++)i[e]=!0;if(u)for(let e=u[0]-1;e<u[1];e++)i[e]=!0;n.push({label:et(e.data.label),text:l,material:u&&m(t.slice(u[0]-1,u[1]))||null,section:e.data.section?.trim().slice(0,500)||null,regions:[],hasFigure:!1,flags:[]})}s.forEach((e,t)=>{e&&r.some(([t,i])=>e[0]<=i&&e[1]>=t)&&(n[t].material=null)});let a=n.map((e,t)=>({question:e,start:r[t][0]})).sort((e,t)=>e.start-t.start),o=[],l=[];for(let e=0;e<t.length;e++)!i[e]&&t[e].trim()?l.push(t[e]):l.length&&(o.push(l.join("\n")),l=[]);return l.length&&o.push(l.join("\n")),{questions:a.map(({question:e})=>e),ignored:o,warnings:[]}}(i.questions,t.lines):function(e,t){let i=[];for(let t of e){let e=Z.safeParse(t);if(!e.success)continue;let r=(e.data.text||"").trim().slice(0,4e3),s=(e.data.regions||[]).map(ei).filter(e=>null!==e).slice(0,4);if(!r&&0===s.length)continue;let n=[];e.data.unclear&&n.push("unclear"),e.data.partial&&n.push("partial"),0===s.length&&n.push("unlocated"),i.push({label:et(e.data.label),text:r,material:null,section:e.data.section?.trim().slice(0,500)||null,regions:s,hasFigure:!0===e.data.hasFigure,flags:n})}let r=[];return"blurry"===t&&r.push("blurry"),"partial"===t&&r.push("partial"),{questions:i,ignored:[],warnings:r}}(i.questions,i.quality),n=[...s.warnings];r&&n.push("truncated");let a=s.questions.slice(60);a.length&&n.push("tooMany");let o=[...s.ignored,...a.map(e=>[e.material,e.text].filter(Boolean).join("\n\n")).filter(Boolean)];return{...s,questions:s.questions.slice(0,60),ignored:o,warnings:n}}],80435)},999617,e=>{var t=e.i(971724),i=e.i(105954),r=e.i(604147),s=e.i(455744),n=e.i(180473),a=e.i(206033),o=e.i(588107),l=e.i(140561),c=e.i(469755),u=e.i(819428),h=e.i(357189),d=e.i(377807);let p=t.z.object({questionText:i.z.string().min(1,"题目文本不能为空"),answerText:i.z.string().min(1,"答案不能为空"),analysis:i.z.string().min(1,"解析不能为空"),wrongAnswerText:i.z.string().optional().default(""),mistakeAnalysis:i.z.string().optional().default(""),mistakeStatus:r.z.enum(["not_attempted","wrong_attempt","unknown"]).optional().default("unknown"),subject:r.z.enum(["数学","物理","化学","生物","英语","语文","历史","地理","政治","其他"]),knowledgePoints:s.z.array(i.z.string()).max(5,"知识点最多 5 个"),requiresImage:n.z.boolean().optional().default(!1),difficultyStars:a.z.number().int().min(1).max(5).nullable().optional(),questionType:i.z.string().nullable().optional(),gradeSemester:i.z.string().max(100).nullable().optional(),hasFigure:n.z.boolean().optional(),figureSvg:i.z.string().nullable().optional()}),_=t.z.object({probability:o.z.coerce.number().min(0).max(100),reason:i.z.string().trim().min(1).max(500)});function f(e){return e.replace(/<(think|thinking)\b[^>]*>[\s\S]*?<\/\1>/gi,"").trim()}function g(e){let t=f(e),i=t.match(/```(?:json)?\s*([\s\S]*?)```/);i&&(t=i[1].trim());let r=t.indexOf("{"),s=t.lastIndexOf("}");return -1!==r&&s>r&&(t=t.substring(r,s+1)),JSON.parse(t)}let m=t.z.object({correct:l.z.union([n.z.boolean(),r.z.enum(["true","false"]).transform(e=>"true"===e)]),reason:i.z.string().trim().min(1).max(500)});function v(e){return(0,d.P)(e)}function b(e){let t;if("number"==typeof e)t=e;else{if("string"!=typeof e)return null;let i=e.trim(),r=(i.match(/[★⭐]/gu)||[]).length,s=i.match(/\d+(\.\d+)?/);t=r>0&&!s?r:s?Number(s[0]):0/0}if(!Number.isFinite(t))return null;let i=Math.round(t);return i>=1&&i<=5?i:null}e.s(["e",0,5,"U",0,p,"F",0,function(e){let t=p.shape.subject.safeParse(e?.trim());return t.success?t.data:void 0},"o",0,function(e){return m.parse(g(e))},"B",0,b,"t",0,function(e,t){let i=(0,u.W)(t);return{hasFigure:e?.trim().toLowerCase()==="true"||null!==i,figureSvg:i}},"b",0,function(e){let r=t.z.object({gradeSemester:i.z.string().nullable()}).parse(g(e));return(0,h.X)(r.gradeSemester)},"r",0,function(e){let t=_.parse(g(e));return{probability:Math.round(t.probability)/100,reason:t.reason}},"w",0,v,"K",0,function(e,r,n=!1){let a=t.z.object({tags:s.z.array(i.z.string()),difficultyStars:c.z.unknown().optional(),questionType:c.z.unknown().optional()}).parse(g(e)),o=new Set(r),l=[],u=[];for(let e of a.tags.map(e=>e.trim()))!(!e||l.includes(e)||u.includes(e))&&(o.has(e)?l.push(e):n&&u.push(e));return{tags:(n?[...l,...u]:l).slice(0,5),difficultyStars:b(a.difficultyStars),questionType:v(a.questionType)}},"u",0,function(e){return p.safeParse(e)},"Q",0,f])},459398,e=>{var t=e.i(698043),i=e.i(50377),r=e.i(668426);let s=(0,i.f)("ai:tag-service");async function n(e,i="default"){let r={1:["一年级"],2:["二年级"],3:["三年级"],4:["四年级"],5:["五年级"],6:["六年级"],7:["七年级上","七年级下"],8:["八年级上","八年级下"],9:["九年级上","九年级下"],10:["高一上","高一下"],11:["高二上","高二下"],12:["高三上","高三下","高三"]},a=[];if(e)if(e<=6)for(let t=1;t<=e;t++)a.push(...r[t]);else if(e>=7&&e<=9)for(let t=7;t<=e;t++)a.push(...r[t]||[]);else for(let t=10;t<=e;t++)a.push(...r[t]||[]);else for(let e=7;e<=12;e++)a.push(...r[e]);try{let e=(await t.f.knowledgeTag.findMany({where:{subject:"math",parentId:null,tagSet:i,name:{in:a}},select:{id:!0}})).map(e=>e.id),r=await t.f.knowledgeTag.findMany({where:{subject:"math",isSystem:!0,tagSet:i},select:{id:!0,name:!0,parentId:!0}}),s=new Map;r.forEach(e=>{if(e.parentId){let t=s.get(e.parentId)||[];t.push(e.id),s.set(e.parentId,t)}});let n=e=>{let t=s.get(e)||[];return 0===t.length?[e]:t.flatMap(e=>n(e))},o=new Set;e.forEach(e=>{n(e).forEach(e=>o.add(e))});let l=new Map(r.map(e=>[e.id,e.name]));return Array.from(o).map(e=>l.get(e)).filter(e=>!!e)}catch(e){return s.error({error:e},"getMathTagsFromDB error"),[]}}async function a(e,i="default"){try{return(await t.f.knowledgeTag.findMany({where:{subject:e,isSystem:!0,tagSet:i,children:{none:{}}},select:{name:!0},orderBy:{order:"asc"}})).map(e=>e.name)}catch(e){return s.error({error:e},"getTagsFromDB error"),[]}}async function o(e,i,n="default"){try{let s=await t.f.knowledgeTag.findMany({where:{subject:e,isSystem:!0,tagSet:n},select:{id:!0,name:!0,parentId:!0},orderBy:[{order:"asc"},{createdAt:"asc"}]}),a=new Map;for(let e of s)if(e.parentId){let t=a.get(e.parentId)||[];t.push(e),a.set(e.parentId,t)}let o=new Set,l=e=>{let t=a.get(e.id);t?.length?t.forEach(l):o.add(e.name)};return s.filter(e=>!e.parentId&&(0,r.U)(e.name,i)&&a.has(e.id)).forEach(l),Array.from(o)}catch(t){return s.error({error:t,subject:e,stage:i,tagSet:n},"getScopeTagsFromDB error"),[]}}async function l(e,i,n,a){try{let s=await t.f.knowledgeTag.findMany({where:{subject:e,tagSet:n,OR:[{isSystem:!0},{userId:a}]},select:{id:!0,name:!0,parentId:!0,isSystem:!0},orderBy:[{order:"asc"},{createdAt:"asc"}]}),o=new Map(s.map(e=>[e.id,e])),l=new Set(s.flatMap(e=>e.parentId?[e.parentId]:[])),c=new Set;for(let e of s){if(e.isSystem||l.has(e.id))continue;let t=e,s=new Set([e.id]);for(;t.parentId&&o.has(t.parentId)&&!s.has(t.parentId);)t=o.get(t.parentId),s.add(t.id);(t.id===e.id||(0,r.U)(t.name,i))&&c.add(e.name)}return Array.from(c)}catch(t){return s.error({error:t,subject:e,stage:i,tagSet:n},"getUserScopeTagsFromDB error"),[]}}async function c(e,t="default",i){if(!e.subject)return;let s=await o(e.subject,e.stage,t),n=0===s.length,a=n&&i?await l(e.subject,e.stage,t,i):s;return{subjectName:r.L[e.subject],tags:a,...n?{allowCustom:!0}:{}}}async function u(e,t,i="default"){return{prefetchedMathTags:"数学"!==e&&e?[]:await n(t||null,i),prefetchedPhysicsTags:"物理"!==e&&e?[]:await a("physics",i),prefetchedChemistryTags:"化学"!==e&&e?[]:await a("chemistry",i),prefetchedBiologyTags:"生物"!==e&&e?[]:await a("biology",i),prefetchedEnglishTags:"英语"!==e&&e?[]:await a("english",i),prefetchedChineseTags:"语文"!==e&&e?[]:await a("chinese",i),prefetchedHistoryTags:"历史"!==e&&e?[]:await a("history",i),prefetchedGeographyTags:"地理"!==e&&e?[]:await a("geography",i),prefetchedPoliticsTags:"政治"!==e&&e?[]:await a("politics",i)}}e.s(["v",0,n,"K",0,c,"e",0,o,"C",0,l,"i",0,u])},357189,539811,e=>{var t=e.i(376025);function i(e,r,s=new Date,n="en",a=t.J){let o=(0,t.c)(s,a),l=o.getFullYear(),c=o.getMonth()+1,u=l-r,h="2nd";c>=9?(u+=1,h="1st"):h=c<2?"1st":"2nd";let d="zh"===n,p=d?"1st"===h?"上期":"下期":"1st"===h?"1st Semester":"2nd Semester",_=(d?{primary:["一年级","二年级","三年级","四年级","五年级","六年级"],junior_high:["初一","初二","初三"],senior_high:["高一","高二","高三"],university:["大一","大二","大三","大四"]}:{primary:["Grade 1","Grade 2","Grade 3","Grade 4","Grade 5","Grade 6"],junior_high:["Junior High Grade 1","Junior High Grade 2","Junior High Grade 3"],senior_high:["Senior High Grade 1","Senior High Grade 2","Senior High Grade 3"],university:["Freshman","Sophomore","Junior","Senior"]})[e]||[],f=`${u}`;if(f=u>0&&u<=_.length?_[u-1]:u>_.length?d?"已毕业":"Graduated":d?"学前":"Pre-school",!d)return`${f}, ${p}`;{let e="1st"===h?"上":"下";return`${f}${e}`}}e.s(["f",0,i],539811);var r=e.i(411706);function s(e){if("string"!=typeof e)return null;let t=e.trim();return r.H.includes(t)?t:null}function n(e,r=t.J){return"ai"===e.gradeRecognitionMode?null:e.fixedGradeSemester?e.fixedGradeSemester:e.educationStage&&e.enrollmentYear?i(e.educationStage,e.enrollmentYear,new Date,"zh",r):null}e.s(["K",0,["fixed","ai"],"L",0,n,"Z",0,function(e,i=t.J){let s=n(e,i),a=s?r.T.findIndex(e=>s.startsWith(e)):-1;return{grade:a>=0&&a<12?a+1:null,gradeSemester:s}},"P",0,function(e,t){return"ai"===e.gradeRecognitionMode&&void 0===t.gradeSemester&&void 0===t.recognizedGradeSemester&&!!t.questionText?.trim()},"X",0,s,"S",0,function(e,i,r=t.J){return void 0!==i.gradeSemester?i.gradeSemester?.trim()||null:"ai"===e.gradeRecognitionMode?s(i.recognizedGradeSemester):n(e,r)}],357189)},481183,e=>{function t(e){let t=e.length;for(;t>0&&"/"===e[t-1];)t--;return e.slice(0,t)}e.s(["$",0,function(e){let i;try{i=new URL(e)}catch{throw Error(`Invalid base URL: ${e}`)}if("http:"!==i.protocol&&"https:"!==i.protocol)throw Error(`Base URL must use http or https: ${e}`);return t(i.toString())},"z",0,t])}],426900,(e,t,i)=>{!function(i,r){var s={};r(s);var n=s.default;for(var a in s)n[a]=s[a];if("object"==typeof t.exports)t.exports=n;else if("function"==typeof define&&define.amd)e.r,void 0!==n&&e.v(n);else i.sha256=n}(e.e,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]);function i(e,i,r,s,n){for(var a,o,l,c,u,h,d,p,_,f,g,m,v;n>=64;){for(a=i[0],o=i[1],l=i[2],c=i[3],u=i[4],h=i[5],d=i[6],p=i[7],f=0;f<16;f++)g=s+4*f,e[f]=(255&r[g])<<24|(255&r[g+1])<<16|(255&r[g+2])<<8|255&r[g+3];for(f=16;f<64;f++)m=((_=e[f-2])>>>17|_<<15)^(_>>>19|_<<13)^_>>>10,v=((_=e[f-15])>>>7|_<<25)^(_>>>18|_<<14)^_>>>3,e[f]=(m+e[f-7]|0)+(v+e[f-16]|0);for(f=0;f<64;f++)m=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&h^~u&d)|0)+(p+(t[f]+e[f]|0)|0)|0,v=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&o^a&l^o&l)|0,p=d,d=h,h=u,u=c+m|0,c=l,l=o,o=a,a=m+v|0;i[0]+=a,i[1]+=o,i[2]+=l,i[3]+=c,i[4]+=u,i[5]+=h,i[6]+=d,i[7]+=p,s+=64,n-=64}return s}var r=function(){function t(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return t.prototype.reset=function(){return this.state[0]=0x6a09e667,this.state[1]=0xbb67ae85,this.state[2]=0x3c6ef372,this.state[3]=0xa54ff53a,this.state[4]=0x510e527f,this.state[5]=0x9b05688c,this.state[6]=0x1f83d9ab,this.state[7]=0x5be0cd19,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},t.prototype.clean=function(){for(var e=0;e<this.buffer.length;e++)this.buffer[e]=0;for(var e=0;e<this.temp.length;e++)this.temp[e]=0;this.reset()},t.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this.finished)throw Error("SHA256: can't update because hash was finished.");var r=0;if(this.bytesHashed+=t,this.bufferLength>0){for(;this.bufferLength<64&&t>0;)this.buffer[this.bufferLength++]=e[r++],t--;64===this.bufferLength&&(i(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(t>=64&&(r=i(this.temp,this.state,e,r,t),t%=64);t>0;)this.buffer[this.bufferLength++]=e[r++],t--;return this},t.prototype.finish=function(e){if(!this.finished){var t=this.bytesHashed,r=this.bufferLength,s=t/0x20000000|0,n=t<<3,a=t%64<56?64:128;this.buffer[r]=128;for(var o=r+1;o<a-8;o++)this.buffer[o]=0;this.buffer[a-8]=s>>>24&255,this.buffer[a-7]=s>>>16&255,this.buffer[a-6]=s>>>8&255,this.buffer[a-5]=s>>>0&255,this.buffer[a-4]=n>>>24&255,this.buffer[a-3]=n>>>16&255,this.buffer[a-2]=n>>>8&255,this.buffer[a-1]=n>>>0&255,i(this.temp,this.state,this.buffer,0,a),this.finished=!0}for(var o=0;o<8;o++)e[4*o+0]=this.state[o]>>>24&255,e[4*o+1]=this.state[o]>>>16&255,e[4*o+2]=this.state[o]>>>8&255,e[4*o+3]=this.state[o]>>>0&255;return this},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype._saveState=function(e){for(var t=0;t<this.state.length;t++)e[t]=this.state[t]},t.prototype._restoreState=function(e,t){for(var i=0;i<this.state.length;i++)this.state[i]=e[i];this.bytesHashed=t,this.finished=!1,this.bufferLength=0},t}();e.Hash=r;var s=function(){function e(e){this.inner=new r,this.outer=new r,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var t=new Uint8Array(this.blockSize);if(e.length>this.blockSize)new r().update(e).finish(t).clean();else for(var i=0;i<e.length;i++)t[i]=e[i];for(var i=0;i<t.length;i++)t[i]^=54;this.inner.update(t);for(var i=0;i<t.length;i++)t[i]^=106;this.outer.update(t),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var i=0;i<t.length;i++)t[i]=0}return e.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},e.prototype.clean=function(){for(var e=0;e<this.istate.length;e++)this.ostate[e]=this.istate[e]=0;this.inner.clean(),this.outer.clean()},e.prototype.update=function(e){return this.inner.update(e),this},e.prototype.finish=function(e){return this.outer.finished?this.outer.finish(e):(this.inner.finish(e),this.outer.update(e,this.digestLength).finish(e)),this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e}();function n(e){var t=new r().update(e),i=t.digest();return t.clean(),i}function a(e,t){var i=new s(e).update(t),r=i.digest();return i.clean(),r}e.HMAC=s,e.hash=n,e.default=n,e.hmac=a;var o=new Uint8Array(e.digestLength);e.hkdf=function(e,t,i,r){void 0===t&&(t=o),void 0===r&&(r=32);for(var n=new Uint8Array([1]),l=new s(a(t,e)),c=new Uint8Array(l.digestLength),u=c.length,h=new Uint8Array(r),d=0;d<r;d++)u===c.length&&(!function(e,t,i,r){var s=r[0];if(0===s)throw Error("hkdf: cannot expand more");t.reset(),s>1&&t.update(e),i&&t.update(i),t.update(r),t.finish(e),r[0]++}(c,l,i,n),u=0),h[d]=c[u++];return l.clean(),c.fill(0),n.fill(0),h},e.pbkdf2=function(e,t,i,r){for(var n=new s(e),a=n.digestLength,o=new Uint8Array(4),l=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(r),h=0;h*a<r;h++){var d=h+1;o[0]=d>>>24&255,o[1]=d>>>16&255,o[2]=d>>>8&255,o[3]=d>>>0&255,n.reset(),n.update(t),n.update(o),n.finish(c);for(var p=0;p<a;p++)l[p]=c[p];for(var p=2;p<=i;p++){n.reset(),n.update(c).finish(c);for(var _=0;_<a;_++)l[_]^=c[_]}for(var p=0;p<a&&h*a+p<r;p++)u[h*a+p]=l[p]}for(var h=0;h<a;h++)l[h]=c[h]=0;for(var h=0;h<4;h++)o[h]=0;return n.clean(),u}})}];
|
|
14
|
+
${i.analysis}`:i.analysis)}h||o.includes(r)||o.push(r)}l?o.length&&r.push(o.join("\n")):r.push(s)}return r}(P,p,F):P}else i=C(P,F)[0];let Z=F.slice(n);return{questions:F.slice(0,n),ignored:[...W,...i,...Z.map(e=>j(e))],detected:!0,ambiguous:!1,candidateCount:F.length,overflow:Z.length,tooLong:a}},"N",0,f],843716);var D=e.i(604147),U=e.i(377807);let W=r.z.object({x:a.z.number().min(0).max(1),y:a.z.number().min(0).max(1),width:a.z.number().min(.01).max(1),height:a.z.number().min(.01).max(1)}).refine(e=>e.x+e.width<=1.0001&&e.y+e.height<=1.0001,{message:"REGION_OUT_OF_BOUNDS"}),F=["unclear","partial","unlocated"],H=n.z.string().max(1572864,"DRAFT_IMAGE_TOO_LARGE").regex(/^data:image\/(?:jpeg|png|webp);base64,[A-Za-z0-9+/]+=*$/,"DRAFT_IMAGE_INVALID"),B=r.z.object({original:n.z.string().max(2e4),text:n.z.string().max(2e4),uncertain:o.z.array(n.z.string().max(200)).max(20)}),K=r.z.object({key:n.z.string().regex(/^[A-Za-z0-9_-]{1,40}$/),label:n.z.string().max(20).nullable(),text:n.z.string().max(2e4),material:n.z.string().max(2e4).nullable(),section:n.z.string().max(500).nullable(),selected:c.z.boolean(),regions:o.z.array(W).max(4),hasFigure:c.z.boolean(),flags:o.z.array(D.z.enum(F)).max(F.length),fix:B.nullish(),answer:n.z.string().max(2e4).nullish(),analysis:n.z.string().max(2e4).nullish(),knowledgePoints:o.z.array(n.z.string().max(200)).max(100).optional(),difficultyStars:a.z.number().int().min(1).max(5).nullish(),questionType:n.z.string().max(200).nullish(),wrongAnswer:n.z.string().max(2e4).nullish(),source:n.z.string().trim().max(200).nullish(),image:H.nullish()}),J=["blurry","partial","truncated","tooMany"],G=r.z.object({items:o.z.array(K).max(60),ignored:o.z.array(n.z.string().max(2e4)).max(200),warnings:o.z.array(D.z.enum(J)).max(J.length)}).superRefine((e,t)=>{let i=new Set;for(let r of e.items)i.has(r.key)&&t.addIssue({code:"custom",message:"DUPLICATE_ITEM_KEY"}),i.add(r.key)});function X(e=[]){let t=new Set(e);for(;;){let e=`q${Math.random().toString(36).slice(2,10)}`;if(!t.has(e))return e}}e.s(["O",0,2e4,"w",0,100,"y",0,4,"k",0,.01,"h",0,function(e,t){let i=t?.trim();return i?{...e,items:e.items.map(e=>e.source?.trim()?e:{...e,source:i})}:e},"Z",0,G,"d",0,function(e,t,i=0){let r=[];return{items:e.slice(0,60).map(e=>{let t=X(r);return r.push(t),{key:t,label:e.label?.slice(0,20)??null,text:e.text.slice(0,2e4),material:e.material?.slice(0,2e4)??null,section:e.section?.slice(0,500)??null,selected:e.text.trim().length>0,regions:[],hasFigure:!1,flags:[],answer:e.answer??null,analysis:e.analysis??null,knowledgePoints:e.knowledgePoints?.slice(0,100),difficultyStars:e.difficultyStars??null,questionType:(0,U.P)(e.questionType),wrongAnswer:e.wrongAnswer??null,source:null}}),ignored:t.slice(0,200),warnings:i>0||e.length>60?["tooMany"]:[]}},"n",0,H,"q",0,X,"c",0,function(e,t){return e.items.filter(e=>e.selected&&("image"===t?e.regions.length>0:e.text.trim().length>0))}],276041);let Q=t.z.tuple([i.z.coerce.number().int(),i.z.coerce.number().int()]),Y=r.z.object({x:i.z.coerce.number(),y:i.z.coerce.number(),w:i.z.coerce.number(),h:i.z.coerce.number()}),Z=r.z.object({label:s.z.union([n.z.string(),a.z.number()]).nullish(),lines:Q.nullish(),material:Q.nullish(),section:n.z.string().nullish(),text:n.z.string().nullish(),regions:o.z.array(l.z.unknown()).nullish(),hasFigure:c.z.boolean().nullish(),unclear:c.z.boolean().nullish(),partial:c.z.boolean().nullish()}).passthrough(),ee=r.z.object({quality:n.z.string().nullish(),questions:o.z.array(l.z.unknown())});function et(e){return null==e?null:String(e).trim().replace(/[..、::))]+$/,"").slice(0,20)||null}function ei(e){let t=Y.safeParse(e);if(!t.success)return null;let{x:i,y:r,w:s,h:n}=t.data;if(![i,r,s,n].every(Number.isFinite))return null;let a=Math.max(0,Math.min(1e3,i)),o=Math.max(0,Math.min(1e3,r)),l=(Math.max(0,Math.min(1e3,i+s))-a)/1e3,c=(Math.max(0,Math.min(1e3,r+n))-o)/1e3;if(l<.01||c<.01)return null;let u=e=>Math.round(1e4*e)/1e4;return{x:u(a/1e3),y:u(o/1e3),width:u(l),height:u(c)}}function er(e,t){if(!e)return null;let[i,r]=e;return i>=1&&r>=i&&r<=t?[i,r]:null}e.s(["b",0,"AI_IMAGE_NOT_SUPPORTED","W",0,1e3,"F",0,function(e){let t=(e instanceof Error?e.message:String(e)).toLowerCase();return/(image|vision|multimodal|multi-modal|图片|图像|视觉|多模态)/.test(t)&&/(not support|unsupported|does not accept|cannot|invalid content type|not allowed|不支持|无法处理)/.test(t)},"z",0,function(e,t){let{value:i,truncated:r}=function(e){let t=(0,u.Q)(e),i=t.match(/```(?:json)?\s*([\s\S]*?)```/);i&&(t=i[1]);let r=t.indexOf("{"),s=t.lastIndexOf("}");if(-1!==r&&s>r)try{let e=ee.safeParse(JSON.parse(t.slice(r,s+1)));if(e.success)return{value:e.data,truncated:!1}}catch{}let n=function(e){let t=e.search(/"questions"\s*:\s*\[/);if(-1===t)return[];let i=[],r=e.indexOf("[",t)+1,s=0,n=!1,a=!1,o=-1;for(;r<e.length;r++){let t=e[r];if(n){a?a=!1:"\\"===t?a=!0:'"'===t&&(n=!1);continue}if('"'===t)n=!0;else if("{"===t)0===s&&(o=r),s++;else if("}"===t){if(0==--s&&-1!==o){try{i.push(JSON.parse(e.slice(o,r+1)))}catch{}o=-1}}else if("]"===t&&0===s)break}return i}(t);if(0===n.length)throw Error("AI_RESPONSE_ERROR: invalid question split output");return{value:{questions:n},truncated:!0}}(e),s="text"===t.kind?function(e,t){let i=Array(t.length).fill(!1),r=[],s=[],n=[];for(let a of e){let e=Z.safeParse(a);if(!e.success)continue;let o=er(e.data.lines,t.length);if(!o||r.some(([e,t])=>o[0]<=t&&o[1]>=e))continue;let l=f(m(t.slice(o[0]-1,o[1])));if(!l.trim())continue;let c=er(e.data.material,t.length),u=c&&(c[1]<o[0]||c[0]>o[1])?c:null;r.push(o),s.push(u);for(let e=o[0]-1;e<o[1];e++)i[e]=!0;if(u)for(let e=u[0]-1;e<u[1];e++)i[e]=!0;n.push({label:et(e.data.label),text:l,material:u&&m(t.slice(u[0]-1,u[1]))||null,section:e.data.section?.trim().slice(0,500)||null,regions:[],hasFigure:!1,flags:[]})}s.forEach((e,t)=>{e&&r.some(([t,i])=>e[0]<=i&&e[1]>=t)&&(n[t].material=null)});let a=n.map((e,t)=>({question:e,start:r[t][0]})).sort((e,t)=>e.start-t.start),o=[],l=[];for(let e=0;e<t.length;e++)!i[e]&&t[e].trim()?l.push(t[e]):l.length&&(o.push(l.join("\n")),l=[]);return l.length&&o.push(l.join("\n")),{questions:a.map(({question:e})=>e),ignored:o,warnings:[]}}(i.questions,t.lines):function(e,t){let i=[];for(let t of e){let e=Z.safeParse(t);if(!e.success)continue;let r=(e.data.text||"").trim().slice(0,4e3),s=(e.data.regions||[]).map(ei).filter(e=>null!==e).slice(0,4);if(!r&&0===s.length)continue;let n=[];e.data.unclear&&n.push("unclear"),e.data.partial&&n.push("partial"),0===s.length&&n.push("unlocated"),i.push({label:et(e.data.label),text:r,material:null,section:e.data.section?.trim().slice(0,500)||null,regions:s,hasFigure:!0===e.data.hasFigure,flags:n})}let r=[];return"blurry"===t&&r.push("blurry"),"partial"===t&&r.push("partial"),{questions:i,ignored:[],warnings:r}}(i.questions,i.quality),n=[...s.warnings];r&&n.push("truncated");let a=s.questions.slice(60);a.length&&n.push("tooMany");let o=[...s.ignored,...a.map(e=>[e.material,e.text].filter(Boolean).join("\n\n")).filter(Boolean)];return{...s,questions:s.questions.slice(0,60),ignored:o,warnings:n}}],80435)},999617,e=>{var t=e.i(971724),i=e.i(105954),r=e.i(604147),s=e.i(455744),n=e.i(180473),a=e.i(206033),o=e.i(588107),l=e.i(140561),c=e.i(469755),u=e.i(819428),h=e.i(357189),d=e.i(377807);let p=t.z.object({questionText:i.z.string().min(1,"题目文本不能为空"),answerText:i.z.string().min(1,"答案不能为空"),analysis:i.z.string().min(1,"解析不能为空"),wrongAnswerText:i.z.string().optional().default(""),mistakeAnalysis:i.z.string().optional().default(""),mistakeStatus:r.z.enum(["not_attempted","wrong_attempt","unknown"]).optional().default("unknown"),subject:r.z.enum(["数学","物理","化学","生物","英语","语文","历史","地理","政治","其他"]),knowledgePoints:s.z.array(i.z.string()).max(5,"知识点最多 5 个"),requiresImage:n.z.boolean().optional().default(!1),difficultyStars:a.z.number().int().min(1).max(5).nullable().optional(),questionType:i.z.string().nullable().optional(),gradeSemester:i.z.string().max(100).nullable().optional(),hasFigure:n.z.boolean().optional(),figureSvg:i.z.string().nullable().optional(),source:i.z.string().trim().max(200).nullish()}),_=t.z.object({probability:o.z.coerce.number().min(0).max(100),reason:i.z.string().trim().min(1).max(500)});function f(e){return e.replace(/<(think|thinking)\b[^>]*>[\s\S]*?<\/\1>/gi,"").trim()}function g(e){let t=f(e),i=t.match(/```(?:json)?\s*([\s\S]*?)```/);i&&(t=i[1].trim());let r=t.indexOf("{"),s=t.lastIndexOf("}");return -1!==r&&s>r&&(t=t.substring(r,s+1)),JSON.parse(t)}let m=t.z.object({correct:l.z.union([n.z.boolean(),r.z.enum(["true","false"]).transform(e=>"true"===e)]),reason:i.z.string().trim().min(1).max(500)});function v(e){return(0,d.P)(e)}function b(e){let t;if("number"==typeof e)t=e;else{if("string"!=typeof e)return null;let i=e.trim(),r=(i.match(/[★⭐]/gu)||[]).length,s=i.match(/\d+(\.\d+)?/);t=r>0&&!s?r:s?Number(s[0]):0/0}if(!Number.isFinite(t))return null;let i=Math.round(t);return i>=1&&i<=5?i:null}e.s(["e",0,5,"U",0,p,"F",0,function(e){let t=p.shape.subject.safeParse(e?.trim());return t.success?t.data:void 0},"o",0,function(e){return m.parse(g(e))},"B",0,b,"t",0,function(e,t){let i=(0,u.W)(t);return{hasFigure:e?.trim().toLowerCase()==="true"||null!==i,figureSvg:i}},"b",0,function(e){let r=t.z.object({gradeSemester:i.z.string().nullable()}).parse(g(e));return(0,h.X)(r.gradeSemester)},"r",0,function(e){let t=_.parse(g(e));return{probability:Math.round(t.probability)/100,reason:t.reason}},"w",0,v,"K",0,function(e,r,n=!1){let a=t.z.object({tags:s.z.array(i.z.string()),difficultyStars:c.z.unknown().optional(),questionType:c.z.unknown().optional()}).parse(g(e)),o=new Set(r),l=[],u=[];for(let e of a.tags.map(e=>e.trim()))!(!e||l.includes(e)||u.includes(e))&&(o.has(e)?l.push(e):n&&u.push(e));return{tags:(n?[...l,...u]:l).slice(0,5),difficultyStars:b(a.difficultyStars),questionType:v(a.questionType)}},"u",0,function(e){return p.safeParse(e)},"Q",0,f])},459398,e=>{var t=e.i(698043),i=e.i(50377),r=e.i(668426);let s=(0,i.f)("ai:tag-service");async function n(e,i="default"){let r={1:["一年级"],2:["二年级"],3:["三年级"],4:["四年级"],5:["五年级"],6:["六年级"],7:["七年级上","七年级下"],8:["八年级上","八年级下"],9:["九年级上","九年级下"],10:["高一上","高一下"],11:["高二上","高二下"],12:["高三上","高三下","高三"]},a=[];if(e)if(e<=6)for(let t=1;t<=e;t++)a.push(...r[t]);else if(e>=7&&e<=9)for(let t=7;t<=e;t++)a.push(...r[t]||[]);else for(let t=10;t<=e;t++)a.push(...r[t]||[]);else for(let e=7;e<=12;e++)a.push(...r[e]);try{let e=(await t.f.knowledgeTag.findMany({where:{subject:"math",parentId:null,tagSet:i,name:{in:a}},select:{id:!0}})).map(e=>e.id),r=await t.f.knowledgeTag.findMany({where:{subject:"math",isSystem:!0,tagSet:i},select:{id:!0,name:!0,parentId:!0}}),s=new Map;r.forEach(e=>{if(e.parentId){let t=s.get(e.parentId)||[];t.push(e.id),s.set(e.parentId,t)}});let n=e=>{let t=s.get(e)||[];return 0===t.length?[e]:t.flatMap(e=>n(e))},o=new Set;e.forEach(e=>{n(e).forEach(e=>o.add(e))});let l=new Map(r.map(e=>[e.id,e.name]));return Array.from(o).map(e=>l.get(e)).filter(e=>!!e)}catch(e){return s.error({error:e},"getMathTagsFromDB error"),[]}}async function a(e,i="default"){try{return(await t.f.knowledgeTag.findMany({where:{subject:e,isSystem:!0,tagSet:i,children:{none:{}}},select:{name:!0},orderBy:{order:"asc"}})).map(e=>e.name)}catch(e){return s.error({error:e},"getTagsFromDB error"),[]}}async function o(e,i,n="default"){try{let s=await t.f.knowledgeTag.findMany({where:{subject:e,isSystem:!0,tagSet:n},select:{id:!0,name:!0,parentId:!0},orderBy:[{order:"asc"},{createdAt:"asc"}]}),a=new Map;for(let e of s)if(e.parentId){let t=a.get(e.parentId)||[];t.push(e),a.set(e.parentId,t)}let o=new Set,l=e=>{let t=a.get(e.id);t?.length?t.forEach(l):o.add(e.name)};return s.filter(e=>!e.parentId&&(0,r.U)(e.name,i)&&a.has(e.id)).forEach(l),Array.from(o)}catch(t){return s.error({error:t,subject:e,stage:i,tagSet:n},"getScopeTagsFromDB error"),[]}}async function l(e,i,n,a){try{let s=await t.f.knowledgeTag.findMany({where:{subject:e,tagSet:n,OR:[{isSystem:!0},{userId:a}]},select:{id:!0,name:!0,parentId:!0,isSystem:!0},orderBy:[{order:"asc"},{createdAt:"asc"}]}),o=new Map(s.map(e=>[e.id,e])),l=new Set(s.flatMap(e=>e.parentId?[e.parentId]:[])),c=new Set;for(let e of s){if(e.isSystem||l.has(e.id))continue;let t=e,s=new Set([e.id]);for(;t.parentId&&o.has(t.parentId)&&!s.has(t.parentId);)t=o.get(t.parentId),s.add(t.id);(t.id===e.id||(0,r.U)(t.name,i))&&c.add(e.name)}return Array.from(c)}catch(t){return s.error({error:t,subject:e,stage:i,tagSet:n},"getUserScopeTagsFromDB error"),[]}}async function c(e,t="default",i){if(!e.subject)return;let s=await o(e.subject,e.stage,t),n=0===s.length,a=n&&i?await l(e.subject,e.stage,t,i):s;return{subjectName:r.L[e.subject],tags:a,...n?{allowCustom:!0}:{}}}async function u(e,t,i="default"){return{prefetchedMathTags:"数学"!==e&&e?[]:await n(t||null,i),prefetchedPhysicsTags:"物理"!==e&&e?[]:await a("physics",i),prefetchedChemistryTags:"化学"!==e&&e?[]:await a("chemistry",i),prefetchedBiologyTags:"生物"!==e&&e?[]:await a("biology",i),prefetchedEnglishTags:"英语"!==e&&e?[]:await a("english",i),prefetchedChineseTags:"语文"!==e&&e?[]:await a("chinese",i),prefetchedHistoryTags:"历史"!==e&&e?[]:await a("history",i),prefetchedGeographyTags:"地理"!==e&&e?[]:await a("geography",i),prefetchedPoliticsTags:"政治"!==e&&e?[]:await a("politics",i)}}e.s(["v",0,n,"K",0,c,"e",0,o,"C",0,l,"i",0,u])},357189,539811,e=>{var t=e.i(376025);function i(e,r,s=new Date,n="en",a=t.J){let o=(0,t.c)(s,a),l=o.getFullYear(),c=o.getMonth()+1,u=l-r,h="2nd";c>=9?(u+=1,h="1st"):h=c<2?"1st":"2nd";let d="zh"===n,p=d?"1st"===h?"上期":"下期":"1st"===h?"1st Semester":"2nd Semester",_=(d?{primary:["一年级","二年级","三年级","四年级","五年级","六年级"],junior_high:["初一","初二","初三"],senior_high:["高一","高二","高三"],university:["大一","大二","大三","大四"]}:{primary:["Grade 1","Grade 2","Grade 3","Grade 4","Grade 5","Grade 6"],junior_high:["Junior High Grade 1","Junior High Grade 2","Junior High Grade 3"],senior_high:["Senior High Grade 1","Senior High Grade 2","Senior High Grade 3"],university:["Freshman","Sophomore","Junior","Senior"]})[e]||[],f=`${u}`;if(f=u>0&&u<=_.length?_[u-1]:u>_.length?d?"已毕业":"Graduated":d?"学前":"Pre-school",!d)return`${f}, ${p}`;{let e="1st"===h?"上":"下";return`${f}${e}`}}e.s(["f",0,i],539811);var r=e.i(411706);function s(e){if("string"!=typeof e)return null;let t=e.trim();return r.H.includes(t)?t:null}function n(e,r=t.J){return"ai"===e.gradeRecognitionMode?null:e.fixedGradeSemester?e.fixedGradeSemester:e.educationStage&&e.enrollmentYear?i(e.educationStage,e.enrollmentYear,new Date,"zh",r):null}e.s(["K",0,["fixed","ai"],"L",0,n,"Z",0,function(e,i=t.J){let s=n(e,i),a=s?r.T.findIndex(e=>s.startsWith(e)):-1;return{grade:a>=0&&a<12?a+1:null,gradeSemester:s}},"P",0,function(e,t){return"ai"===e.gradeRecognitionMode&&void 0===t.gradeSemester&&void 0===t.recognizedGradeSemester&&!!t.questionText?.trim()},"X",0,s,"S",0,function(e,i,r=t.J){return void 0!==i.gradeSemester?i.gradeSemester?.trim()||null:"ai"===e.gradeRecognitionMode?s(i.recognizedGradeSemester):n(e,r)}],357189)},481183,e=>{function t(e){let t=e.length;for(;t>0&&"/"===e[t-1];)t--;return e.slice(0,t)}e.s(["$",0,function(e){let i;try{i=new URL(e)}catch{throw Error(`Invalid base URL: ${e}`)}if("http:"!==i.protocol&&"https:"!==i.protocol)throw Error(`Base URL must use http or https: ${e}`);return t(i.toString())},"z",0,t])}],426900,(e,t,i)=>{!function(i,r){var s={};r(s);var n=s.default;for(var a in s)n[a]=s[a];if("object"==typeof t.exports)t.exports=n;else if("function"==typeof define&&define.amd)e.r,void 0!==n&&e.v(n);else i.sha256=n}(e.e,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]);function i(e,i,r,s,n){for(var a,o,l,c,u,h,d,p,_,f,g,m,v;n>=64;){for(a=i[0],o=i[1],l=i[2],c=i[3],u=i[4],h=i[5],d=i[6],p=i[7],f=0;f<16;f++)g=s+4*f,e[f]=(255&r[g])<<24|(255&r[g+1])<<16|(255&r[g+2])<<8|255&r[g+3];for(f=16;f<64;f++)m=((_=e[f-2])>>>17|_<<15)^(_>>>19|_<<13)^_>>>10,v=((_=e[f-15])>>>7|_<<25)^(_>>>18|_<<14)^_>>>3,e[f]=(m+e[f-7]|0)+(v+e[f-16]|0);for(f=0;f<64;f++)m=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&h^~u&d)|0)+(p+(t[f]+e[f]|0)|0)|0,v=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&o^a&l^o&l)|0,p=d,d=h,h=u,u=c+m|0,c=l,l=o,o=a,a=m+v|0;i[0]+=a,i[1]+=o,i[2]+=l,i[3]+=c,i[4]+=u,i[5]+=h,i[6]+=d,i[7]+=p,s+=64,n-=64}return s}var r=function(){function t(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return t.prototype.reset=function(){return this.state[0]=0x6a09e667,this.state[1]=0xbb67ae85,this.state[2]=0x3c6ef372,this.state[3]=0xa54ff53a,this.state[4]=0x510e527f,this.state[5]=0x9b05688c,this.state[6]=0x1f83d9ab,this.state[7]=0x5be0cd19,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},t.prototype.clean=function(){for(var e=0;e<this.buffer.length;e++)this.buffer[e]=0;for(var e=0;e<this.temp.length;e++)this.temp[e]=0;this.reset()},t.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this.finished)throw Error("SHA256: can't update because hash was finished.");var r=0;if(this.bytesHashed+=t,this.bufferLength>0){for(;this.bufferLength<64&&t>0;)this.buffer[this.bufferLength++]=e[r++],t--;64===this.bufferLength&&(i(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(t>=64&&(r=i(this.temp,this.state,e,r,t),t%=64);t>0;)this.buffer[this.bufferLength++]=e[r++],t--;return this},t.prototype.finish=function(e){if(!this.finished){var t=this.bytesHashed,r=this.bufferLength,s=t/0x20000000|0,n=t<<3,a=t%64<56?64:128;this.buffer[r]=128;for(var o=r+1;o<a-8;o++)this.buffer[o]=0;this.buffer[a-8]=s>>>24&255,this.buffer[a-7]=s>>>16&255,this.buffer[a-6]=s>>>8&255,this.buffer[a-5]=s>>>0&255,this.buffer[a-4]=n>>>24&255,this.buffer[a-3]=n>>>16&255,this.buffer[a-2]=n>>>8&255,this.buffer[a-1]=n>>>0&255,i(this.temp,this.state,this.buffer,0,a),this.finished=!0}for(var o=0;o<8;o++)e[4*o+0]=this.state[o]>>>24&255,e[4*o+1]=this.state[o]>>>16&255,e[4*o+2]=this.state[o]>>>8&255,e[4*o+3]=this.state[o]>>>0&255;return this},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype._saveState=function(e){for(var t=0;t<this.state.length;t++)e[t]=this.state[t]},t.prototype._restoreState=function(e,t){for(var i=0;i<this.state.length;i++)this.state[i]=e[i];this.bytesHashed=t,this.finished=!1,this.bufferLength=0},t}();e.Hash=r;var s=function(){function e(e){this.inner=new r,this.outer=new r,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var t=new Uint8Array(this.blockSize);if(e.length>this.blockSize)new r().update(e).finish(t).clean();else for(var i=0;i<e.length;i++)t[i]=e[i];for(var i=0;i<t.length;i++)t[i]^=54;this.inner.update(t);for(var i=0;i<t.length;i++)t[i]^=106;this.outer.update(t),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var i=0;i<t.length;i++)t[i]=0}return e.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},e.prototype.clean=function(){for(var e=0;e<this.istate.length;e++)this.ostate[e]=this.istate[e]=0;this.inner.clean(),this.outer.clean()},e.prototype.update=function(e){return this.inner.update(e),this},e.prototype.finish=function(e){return this.outer.finished?this.outer.finish(e):(this.inner.finish(e),this.outer.update(e,this.digestLength).finish(e)),this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e}();function n(e){var t=new r().update(e),i=t.digest();return t.clean(),i}function a(e,t){var i=new s(e).update(t),r=i.digest();return i.clean(),r}e.HMAC=s,e.hash=n,e.default=n,e.hmac=a;var o=new Uint8Array(e.digestLength);e.hkdf=function(e,t,i,r){void 0===t&&(t=o),void 0===r&&(r=32);for(var n=new Uint8Array([1]),l=new s(a(t,e)),c=new Uint8Array(l.digestLength),u=c.length,h=new Uint8Array(r),d=0;d<r;d++)u===c.length&&(!function(e,t,i,r){var s=r[0];if(0===s)throw Error("hkdf: cannot expand more");t.reset(),s>1&&t.update(e),i&&t.update(i),t.update(r),t.finish(e),r[0]++}(c,l,i,n),u=0),h[d]=c[u++];return l.clean(),c.fill(0),n.fill(0),h},e.pbkdf2=function(e,t,i,r){for(var n=new s(e),a=n.digestLength,o=new Uint8Array(4),l=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(r),h=0;h*a<r;h++){var d=h+1;o[0]=d>>>24&255,o[1]=d>>>16&255,o[2]=d>>>8&255,o[3]=d>>>0&255,n.reset(),n.update(t),n.update(o),n.finish(c);for(var p=0;p<a;p++)l[p]=c[p];for(var p=2;p<=i;p++){n.reset(),n.update(c).finish(c);for(var _=0;_<a;_++)l[_]^=c[_]}for(var p=0;p<a&&h*a+p<r;p++)u[h*a+p]=l[p]}for(var h=0;h<a;h++)l[h]=c[h]=0;for(var h=0;h<4;h++)o[h]=0;return n.clean(),u}})}];
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=_1gtuhmdu6udof._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[971724,e=>{"use strict";var t=e.i(562810);e.s(["z",0,t])},163510,e=>{"use strict";e.i(332116);var t=e.i(557354),c=e.i(871244),r=e.i(50377),a=e.i(126542);let n=(0,r.f)("eula");function i(e=(0,t.b)().eula){return!!e?.acceptedVersion&&e.acceptedVersion!==c.j}async function s(e){let r=e.version??c.j;(0,t.r)({eula:{acceptedVersion:r,acceptedAt:new Date().toISOString(),acceptedBy:e.acceptedBy},...e.enableForwarding?{telemetry:{forwarding:!0}}:{}}),n.info({version:r,acceptedBy:e.acceptedBy},"EULA accepted"),await (0,a.d)("eula_accepted",{version:r,trigger:e.trigger})}e.s(["K",0,s,"_",0,function(e){let r=(0,t.b)().eula;return{pending:e&&i(r),current:c.j,accepted:r?.acceptedVersion??null,acceptedAt:r?.acceptedAt??null,changes:c.o[c.j]??{zh:[],en:[]}}},"L",0,i])},66292,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_telemetry_server_ts_0f78qhte267bg._.js"].map(t=>e.l(t))).then(()=>t(475478)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_1lxrt-tu_a2ul._.js.map
|