wrong-notebook 2026.11.4-2 → 2026.11.4-3
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/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 +8 -6
- package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js +14 -13
- 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 -6
- 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 +6 -5
- package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/migrate-tags/route.js +5 -3
- package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/system-reset/route.js +5 -5
- package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/detail/route.js +14 -13
- 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 +7 -5
- package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/route.js +8 -7
- package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/models/route.js +14 -13
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +15 -13
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +16 -16
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +18 -17
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/delete/route.js +5 -5
- 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 -12
- 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 +14 -13
- 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 +20 -18
- 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 +6 -5
- 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 +8 -5
- 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 +5 -4
- 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 +16 -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 +19 -18
- 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 +9 -6
- 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 +16 -14
- 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 +16 -14
- 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 +6 -6
- 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 +8 -5
- package/.next/server/app/api/error-items/batch-delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/clear/route.js +5 -5
- package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/list/route.js +8 -8
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +20 -20
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/short/[shortId]/route.js +5 -4
- 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 +4 -3
- package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +18 -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 +17 -17
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +17 -17
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +18 -17
- 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 +9 -8
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +17 -16
- 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 +23 -22
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +25 -24
- 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 +19 -19
- 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 +24 -23
- 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 +25 -24
- 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 +24 -23
- 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 +24 -23
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +24 -23
- 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 -22
- 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 -22
- 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 +24 -23
- 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 -22
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +24 -23
- package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/initialize/route.js +1 -1
- package/.next/server/app/api/initialize/route.js.nft.json +1 -1
- package/.next/server/app/api/logs/frontend/route.js +6 -4
- package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/checkin/route.js +6 -5
- 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 -5
- package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/route.js +7 -6
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +16 -16
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/route.js +8 -4
- package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/route.js +8 -6
- package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +19 -18
- package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/[id]/route.js +5 -4
- package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/route.js +4 -3
- package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +18 -17
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +14 -13
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +15 -14
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +17 -16
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +18 -17
- package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/register/route.js +5 -5
- package/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/server/app/api/register/status/route.js +5 -5
- package/.next/server/app/api/register/status/route.js.nft.json +1 -1
- package/.next/server/app/api/requests/[id]/route.js +5 -4
- package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js +15 -14
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +8 -7
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js +7 -6
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/activity/route.js +7 -6
- package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js +5 -5
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js +7 -6
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/repeated-mistakes/route.js +16 -16
- package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/weak-tags/route.js +16 -16
- package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js +7 -4
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js +1 -1
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js +5 -4
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/[id]/route.js +9 -8
- package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/batch/route.js +10 -9
- package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/route.js +9 -8
- 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/route.js +15 -15
- package/.next/server/app/api/user/route.js.nft.json +1 -1
- package/.next/server/app/api/version/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/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/[externals]__1j5vgk-wr4vpe._.js +3 -0
- package/.next/server/chunks/[externals]_fs_0pplqgcyv2l7l._.js +3 -0
- package/.next/server/chunks/[externals]_fs_1d5jh8vp8y6zt._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__05tyrbfzivoeq._.js → [root-of-the-server]__0-5ex-1jwf2so._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__01-14hxale6jz._.js → [root-of-the-server]__000xbr1s0pxwr._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00_59ioz3-clx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__00cl_lnn-40t3._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__01rm65xnqj0z-._.js → [root-of-the-server]__00cvwb7xtihiy._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00g0do0mkiaol._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__02nbzp-n9g9_o._.js → [root-of-the-server]__00u81uwtn433h._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__09pkxauucdf_0._.js → [root-of-the-server]__02osgjesv2sc1._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0z0knsep33lsx._.js → [root-of-the-server]__02rd5j6up78m2._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__02t-_4nuz92ls._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0384w26qgo9xm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04ofq5esp33on._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04rit3x7n87ku._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__006u92h_madgn._.js → [root-of-the-server]__05d81asaxsts8._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__06dvthqk5vh87._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0n5l60oyv1n-1._.js → [root-of-the-server]__06i2kswg2zb80._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1eu_g0k_nr3i-._.js → [root-of-the-server]__0702vmlo8jrsa._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__075pb7_pb654o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0k4cyyyh6z6_p._.js → [root-of-the-server]__08wi504al-t3f._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0bmczgpuggwki._.js → [root-of-the-server]__0_gf1ay3sa41e._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0_zz_zj6cp7hy._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0bgi7pc7dogwe._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0cjj_9c_1d-eb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0d315c1v02ny0._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0eba9rni-2_tw._.js → [root-of-the-server]__0dyqmjzl1b_1f._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ehph__dmu6pf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0evv12a34qcy6._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__0fdvaccw9slrb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0fr_y2a0149cd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0fscx2v333vm8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0g9zoc0653-fw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0h-qm7nop9330._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0hcbw1sliw973._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0hsl0y0knqi-1._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__029n0r2v92pcc._.js → [root-of-the-server]__0htnw-q6r_ple._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0lqv0n5j2fg24._.js → [root-of-the-server]__0i3k26mx8ndsy._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0ifmgp3wd_za_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0joi1yae2ehm4._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0imuc7gi1ii-e._.js → [root-of-the-server]__0k0dc64mmh6m3._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0kehix4ojdnhw._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0l104gjwyuf1b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0l5ybk_p285gl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lm6l50r5n5di._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lsvd81f6kf59._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0oh43a4yzv1os._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0si2-m5an9zl7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0svdqovwfpro2._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0fx0s5_6sjw-d._.js → [root-of-the-server]__0tn4z733mbm06._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0torie7kq-_7m._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tvp4sm4zx3wt._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0geynfn2xmdle._.js → [root-of-the-server]__0tzkw11a1tdju._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0uhfq-cs0r44u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0unr-g_-8kx90._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0v6kysx0rq-1m._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrag-4p6eznc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrs8pd3vzslw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wfpx1grz3ds6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0x-02x70-ewqa._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ya2x1q-h3scx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zhm5smhb-gdm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zmnn5ww2etgw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10_9ca38kz5au._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1kiolpvl5u4e-._.js → [root-of-the-server]__10gw_yrtllol4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__11d2q9o0f28s0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11oto6h82pnhn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12wn_ef3w7f8l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__132-2tja1hzjw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13aq01o_yamyz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13x167nrb3y6w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1438_x9vkg2ow._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__14qqa5fifm2rn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16jaf2eom1mlc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16pezaw35f9j1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16qwprn5u6gjt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__176zyagwjex4i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__180yz6lfwyg1x._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__197qvpegys2sj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19cfobnhf4rgh._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19r0-5tk-zh9i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_sr40zcjsx6y._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1c_nbrrytj02e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dgb5al4upb9v._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dkmclmcfr_o2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e8_j43j1t1m3._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__1fmsngpmgt-p-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1frkpeaqco77c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gfpzuz6qe78x._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gvappei6o8kd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1h0tye6lfskvl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hc_s6bb3tqn2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hy_enkxk2q7n._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1icr5yq0kmxsk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1j92hfszx6_cs._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jd9zchusdb14._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jey4pj050ie1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ji7iwt_w00lv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1okwln3g2ifvb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1oy49h1nfcsne._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1p4_cgasfcy73._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1s21nmek1dpsc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1sk7ctcxmkco3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1sl3foar6w087._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ui10_ypv4qrw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1v5o1ch2vz7iw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vm13gnfyoh6u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vrtsz6125q__._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wnuzqkneu1ws._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xv0q7bppzr-w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1yzqi7jexvvzc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1zq5g6-uodrek._.js +3 -0
- package/.next/server/chunks/_0-ne-bwuvd_6w._.js +1 -1
- package/.next/server/chunks/_011-ll5i30j2e._.js +1 -1
- package/.next/server/chunks/_01bayc6kg7upi._.js +1 -1
- package/.next/server/chunks/_029zt0rilrwvt._.js +1 -1
- package/.next/server/chunks/_03ovgh1-4xf3f._.js +1 -1
- package/.next/server/chunks/_03wxfgqq6wpf_._.js +3 -0
- package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
- package/.next/server/chunks/_05ans30vcd4s-._.js +1 -1
- package/.next/server/chunks/{_04rjm4ctjqrba._.js → _06pseal2zu-71._.js} +2 -2
- package/.next/server/chunks/_076-jjzrfdsdk._.js +1 -1
- package/.next/server/chunks/_07amw8ha9rney._.js +1 -1
- package/.next/server/chunks/_0819wmh2_bgt-._.js +3 -0
- package/.next/server/chunks/{_1fki7pamd4s-7._.js → _087uva8dkvxwz._.js} +2 -2
- package/.next/server/chunks/_08i9pskmlafnp._.js +1 -1
- package/.next/server/chunks/_09o9zamz75n5d._.js +1 -1
- package/.next/server/chunks/_0_3_65z6ak-5i._.js +1 -1
- package/.next/server/chunks/_0_5s2mrhxb3-u._.js +3 -0
- package/.next/server/chunks/_0_e736ff6uhew._.js +1 -1
- package/.next/server/chunks/_0anbzuivml30d._.js +1 -1
- package/.next/server/chunks/{_0edfmbz_jbxsu._.js → _0b9gke5b17vzh._.js} +2 -2
- package/.next/server/chunks/_0d66myj_8567o._.js +1 -1
- package/.next/server/chunks/_0gxi3zrkhyvx_._.js +1 -1
- package/.next/server/chunks/_0h1rbua_hqkox._.js +1 -1
- package/.next/server/chunks/_0hk9z9rqga4x-._.js +1 -1
- package/.next/server/chunks/_0kjatc7pcrkvz._.js +1 -1
- package/.next/server/chunks/_0kreo-8xn80hb._.js +1 -1
- package/.next/server/chunks/_0l2j3br2g32zp._.js +1 -1
- package/.next/server/chunks/_0lepv-j_r8kfv._.js +3 -0
- package/.next/server/chunks/_0lmh33cdt_1fr._.js +1 -1
- package/.next/server/chunks/_0lob14xk0ko5z._.js +1 -1
- package/.next/server/chunks/_0mt2ctbvzfero._.js +1 -1
- package/.next/server/chunks/_0p-sas2zxy3iv._.js +1 -1
- package/.next/server/chunks/_0po48rvqz03dg._.js +1 -1
- package/.next/server/chunks/_0pzdohc1mz5ts._.js +1 -1
- package/.next/server/chunks/_0qaoat396e0_3._.js +1 -1
- package/.next/server/chunks/_0r8u30vd4lix4._.js +3 -0
- package/.next/server/chunks/_0r9ejvgz0l0-0._.js +1 -1
- package/.next/server/chunks/_0rnn090b4_3pb._.js +3 -0
- package/.next/server/chunks/_0suqhfy3e5sv6._.js +1 -1
- package/.next/server/chunks/{_03dn7v_h3d-v8._.js → _0tkov27xr068i._.js} +8 -7
- package/.next/server/chunks/_0tl0cy5j96d7h._.js +1 -1
- package/.next/server/chunks/_0tz5wpjdgntj3._.js +1 -1
- package/.next/server/chunks/_0wegi_sv1s4wx._.js +1 -1
- package/.next/server/chunks/_0xv7-7d6dyo9-._.js +1 -1
- package/.next/server/chunks/_0xx4y9tk1qclc._.js +1 -1
- package/.next/server/chunks/_0zs7jfzzshbfq._.js +1 -1
- package/.next/server/chunks/_11w6ynlxuzl55._.js +1 -1
- package/.next/server/chunks/_12fz_vwm9jemi._.js +3 -0
- package/.next/server/chunks/_12i51zlq-xxrl._.js +1 -1
- package/.next/server/chunks/_12w5k19rc45j_._.js +1 -1
- package/.next/server/chunks/_12xi_xqvtrn3k._.js +3 -0
- package/.next/server/chunks/_13ffmxv8qrwi0._.js +1 -1
- package/.next/server/chunks/_14w9nrdlajz24._.js +1 -1
- package/.next/server/chunks/_15fpgekhvv214._.js +1 -1
- package/.next/server/chunks/{_043-r529chcri._.js → _1638xaazsmf2m._.js} +8 -7
- package/.next/server/chunks/_1647rfjflw_iq._.js +1 -1
- package/.next/server/chunks/_1654ui1ph-3x8._.js +3 -0
- package/.next/server/chunks/_16jdov0rxh99d._.js +1 -1
- package/.next/server/chunks/_17zw8m241gfs3._.js +1 -1
- package/.next/server/chunks/_18amra5328v90._.js +1 -1
- package/.next/server/chunks/_18hm5aaxkr500._.js +1 -1
- package/.next/server/chunks/_1_273cgnpyl9j._.js +1 -1
- package/.next/server/chunks/_1a1aqmie1d3u_._.js +1 -1
- package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
- package/.next/server/chunks/_1ab7h8-how0le._.js +3 -0
- package/.next/server/chunks/_1ahefh9733vmk._.js +3 -0
- package/.next/server/chunks/_1ahi8466v1b3l._.js +1 -1
- package/.next/server/chunks/_1almac7c09mp4._.js +3 -0
- package/.next/server/chunks/_1b-7g4thtxfnp._.js +3 -0
- package/.next/server/chunks/_1b0269xt-c8f7._.js +1 -1
- package/.next/server/chunks/_1b7qjlv0nxovi._.js +1 -1
- package/.next/server/chunks/_1be-y660a8z-q._.js +1 -1
- package/.next/server/chunks/_1cydcmia78z15._.js +1 -1
- package/.next/server/chunks/_1e8w9uuebtrcb._.js +1 -1
- package/.next/server/chunks/_1ev3hw7jrpp8r._.js +3 -0
- package/.next/server/chunks/_1ex6ovo_j2jzv._.js +1 -1
- package/.next/server/chunks/_1gdet1v2zk2gy._.js +1 -1
- package/.next/server/chunks/_1hj7iit2u6xez._.js +1 -1
- package/.next/server/chunks/_1hp9mnz19v199._.js +1 -1
- package/.next/server/chunks/_1j10upti9l6da._.js +1 -1
- package/.next/server/chunks/_1j8kqz21_i728._.js +1 -1
- package/.next/server/chunks/_1muwmr6j76v3m._.js +1 -1
- package/.next/server/chunks/_1pvqo-qnv-nqm._.js +1 -1
- package/.next/server/chunks/_1q65ai1_dwgjp._.js +1 -1
- package/.next/server/chunks/_1s5-ldt8xhtpp._.js +1 -1
- package/.next/server/chunks/_1s55l1bx-1cxp._.js +1 -1
- package/.next/server/chunks/_1sp0xk1c5jx5r._.js +1 -1
- package/.next/server/chunks/_1srq5kxah38r6._.js +1 -1
- package/.next/server/chunks/_1t632kndbc0tj._.js +3 -0
- package/.next/server/chunks/_1tahh9ric8la3._.js +1 -1
- package/.next/server/chunks/_1tvl0cm629nyc._.js +1 -1
- package/.next/server/chunks/_1u6r2cuueltfn._.js +3 -0
- package/.next/server/chunks/{_1-6i59jd1zhly._.js → _1vddun9dxzaqo._.js} +8 -7
- package/.next/server/chunks/_1xpj9uk-9zhl8._.js +1 -1
- package/.next/server/chunks/_1z_ujac_e_65s._.js +1 -1
- package/.next/server/chunks/_1zbkha-v5mkk0._.js +3 -0
- package/.next/server/chunks/_1zvf_gki7-g0n._.js +1 -1
- package/.next/server/chunks/{_0r0hnbjdq-k9-._.js → _20snsd6f1xc63._.js} +2 -2
- package/.next/server/chunks/_20tjujotvor53._.js +1 -1
- package/.next/server/chunks/node_modules_@anthropic-ai_sdk_1ulo822751toa._.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_0qoqh-q5drsgn.js +4 -4
- package/.next/server/chunks/node_modules_zod_v4_classic_external_14kwlambv9opd.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_17gmk506tz413.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1exeae-p81c94.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1giv406od1whf.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1wq100x5o7-hi.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1x8fhte3frhrw.js +3 -0
- package/.next/server/chunks/src_lib_0cmg152v4yi6o._.js +3 -0
- package/.next/server/chunks/src_lib_0dxltm34zaclb._.js +3 -0
- package/.next/server/chunks/src_lib_0g4wu08m-gibu._.js +3 -0
- package/.next/server/chunks/src_lib_0l0j89xrerf8m._.js +3 -0
- package/.next/server/chunks/src_lib_0osgsup3n2ypg._.js +3 -0
- package/.next/server/chunks/src_lib_0so-2topfosjo._.js +3 -0
- package/.next/server/chunks/src_lib_0whd_w99i5vmm._.js +3 -0
- package/.next/server/chunks/src_lib_0zeksho3data7._.js +3 -0
- package/.next/server/chunks/src_lib_15op6xa369-51._.js +3 -0
- package/.next/server/chunks/src_lib_1_m3-y2t3e4xi._.js +131 -131
- package/.next/server/chunks/src_lib_1d0nldjpxxl8t._.js +3 -0
- package/.next/server/chunks/src_lib_1d99xj4d-pofa._.js +3 -0
- package/.next/server/chunks/src_lib_1v5vdsc8-zp2z._.js +3 -0
- package/.next/server/chunks/src_lib_ai_index_ts_0m0hlq4d9zy9i._.js +1 -1
- package/.next/server/chunks/{src_lib_exam_ts_0d3a4q4r41hcf._.js → src_lib_exam_exam_ts_18c3t7bnr1z5k._.js} +2 -2
- package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +3 -0
- package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +3 -0
- package/.next/server/chunks/src_lib_mastery-status_ts_0e9jnp-14tby5._.js +3 -0
- package/.next/server/chunks/src_lib_minimax-code_checkin_ts_1j1mpuxc1vgoz._.js +1 -1
- package/.next/server/chunks/src_lib_notebook-scope_ts_06eipvr6xztlf._.js +3 -0
- package/.next/server/chunks/src_lib_question_0uw17e6at-i_h._.js +3 -0
- package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +3 -0
- package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +3 -0
- package/.next/server/chunks/src_lib_recoverable-response_ts_00y54idhlj_0e._.js +3 -0
- package/.next/server/chunks/src_lib_schemas_error-items_ts_0vdof4417rd3y._.js +3 -0
- package/.next/server/chunks/src_lib_short-id_0adg7-htn2dq_._.js +3 -0
- package/.next/server/chunks/src_lib_tags_retag_ts_09s5xwrzcy144._.js +3 -0
- package/.next/server/chunks/src_lib_tags_seed_1_ej3w-2450a0._.js +3 -0
- package/.next/server/chunks/src_lib_tts_19zri-v8-l_4u._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0sb3jhytba2xr._.js → [root-of-the-server]__01epe_65_8e8r._.js} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0ht0nkzazbnl9._.js → [root-of-the-server]__0iqnvufl6qrve._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0mqo18mv_ooyq._.js → [root-of-the-server]__0xjcdrflb40xr._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0x_ihemma9171._.js → [root-of-the-server]__0z7upqzuqtse6._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__03208_liub81h._.js → [root-of-the-server]__1babe6vdwxbtq._.js} +2 -2
- package/.next/server/chunks/ssr/_0gsk7ce3mjc-h._.js +3 -0
- package/.next/server/chunks/ssr/_0haie2cnycj6w._.js +32 -0
- package/.next/server/chunks/ssr/{_01qu892bisrf0._.js → _0j-r3zhz2ucmg._.js} +2 -2
- package/.next/server/chunks/ssr/{_0zacgi5-qgqwr._.js → _0mfy8kk0_omxw._.js} +1 -1
- package/.next/server/chunks/ssr/_0mvuvawj5-r--._.js +1 -1
- package/.next/server/chunks/ssr/_0rd-teluypcd2._.js +1 -1
- package/.next/server/chunks/ssr/_0svbyo-zufys9._.js +3 -0
- package/.next/server/chunks/ssr/{_186fwf-hcr_ua._.js → _101w__e2w9gr0._.js} +2 -2
- package/.next/server/chunks/ssr/_19hxsrrruepym._.js +1 -1
- package/.next/server/chunks/ssr/_1qgg_ll5hkjaf._.js +1 -1
- package/.next/server/chunks/ssr/{_1xv0q8o3g3r5d._.js → _1s3gqrczubor-._.js} +2 -2
- package/.next/server/chunks/ssr/{_1a4u3f5sc05kb._.js → _1th-xa6ci3ryc._.js} +2 -2
- package/.next/server/chunks/ssr/_1ux6eqqkupo6v._.js +1 -1
- package/.next/server/chunks/ssr/{_1pdnzaad7hk0d._.js → _1x_zn17exkc4t._.js} +2 -2
- package/.next/server/chunks/ssr/{_0w83jztp72o20._.js → _20593q3u-y025._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_02k42jp0_uoqr._.js → node_modules_16_nl7nawmp3n._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_0byqh-lbfcigr.js → node_modules_heic-to_dist_csp_heic-to_0i0ydbk94w-r3.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_19_dv9gdzg_e7.js → node_modules_heic-to_dist_csp_heic-to_1h62imz_ct0w_.js} +1 -1
- package/.next/server/chunks/ssr/src_0_qzoo_03n_v-._.js +3 -0
- package/.next/server/chunks/ssr/src_1gayunqs8u2e2._.js +1 -1
- package/.next/server/chunks/ssr/{src_0z149pjrheeb7._.js → src_1iewbwi2267a1._.js} +2 -2
- package/.next/server/chunks/ssr/{src_1jhctayt9gxoc._.js → src_1o5f_wr8vv-x0._.js} +2 -2
- package/.next/server/chunks/ssr/src_app_error-items_[id]_page_tsx_04xwwdmyh7_9q._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_print_page_tsx_1i-xvhk8ul1l1._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_page_tsx_17_d4_gy2i1ds._.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_import-tasks_page_tsx_01983hytm-x08._.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_notebooks_page_tsx_1p9src5gnz_40._.js +1 -1
- package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +1 -1
- package/.next/server/chunks/ssr/src_app_print-preview_page_tsx_001yt-fzrj7tf._.js +1 -1
- package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +2 -2
- package/.next/server/chunks/ssr/src_components_error-list_error-item-card_tsx_1zsiqsrj-jjd7._.js +1 -1
- package/.next/server/chunks/ssr/src_components_import-tasks_import-task-card_tsx_01r47qh8ryspb._.js +1 -1
- package/.next/server/chunks/ssr/src_components_print-preview_answer-space-control_tsx_02kuswyxklzp_._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +10 -10
- package/.next/server/chunks/ssr/{src_lib_1vv0-aje_e-zh._.js → src_lib_0773v8b5gb93o._.js} +2 -2
- package/.next/server/chunks/ssr/{src_lib_0-wirad5ziskp._.js → src_lib_1qhs590-z9xnh._.js} +2 -2
- package/.next/server/chunks/ssr/src_lib_api-client_ts_04r2_ex-gua5i._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +3 -0
- package/.next/server/chunks/ssr/src_lib_short-id_short-id-client_ts_03nnd3s0tat3l._.js +3 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{1pdlii0oox0-7.js → 037g92rz3qjm_.js} +1 -1
- package/.next/static/chunks/{2cfz0fumc6ghe.js → 045cs_rolnmjd.js} +1 -1
- package/.next/static/chunks/077y4nms_vzwe.js +1 -0
- package/.next/static/chunks/{1746y345zti-9.js → 0eize8lf2hp4i.js} +2 -2
- package/.next/static/chunks/{3tv07cyoo_hat.js → 0gxr8rcvy4zzg.js} +1 -1
- package/.next/static/chunks/0njrl9jn2yde_.js +1 -0
- package/.next/static/chunks/{02wft51kf3t9f.js → 0ovv_fq59i4y4.js} +1 -1
- package/.next/static/chunks/{1uaqnxl-xshw6.js → 0uay0bmznf3g-.js} +1 -1
- package/.next/static/chunks/{0wcwopwk4us6h.js → 0vlsab1wxbcnl.js} +2 -2
- package/.next/static/chunks/{31-r0kqqw-wfd.js → 0xwz3h9d_e7kb.js} +1 -1
- package/.next/static/chunks/{17-num1x7o1m2.js → 1-dh1gads_tda.js} +1 -1
- package/.next/static/chunks/{0_xcjg47jv3ur.js → 1-qu_z3i5b8ul.js} +1 -1
- package/.next/static/chunks/164mvykuvwd-0.js +1 -0
- package/.next/static/chunks/{3oz37kz8n7y3b.js → 18bumc8ezaiy4.js} +1 -1
- package/.next/static/chunks/{42rupczfyygo1.js → 1ado9no6s8r2t.js} +1 -1
- package/.next/static/chunks/{2r5aeenvfl93p.js → 1j8eduwold2uf.js} +1 -1
- package/.next/static/chunks/{3fh32b9da9l_5.js → 1k2m_f0nu22fb.js} +1 -1
- package/.next/static/chunks/{3s_fq__cff-ps.js → 1pw6djqafgpo7.js} +2 -2
- package/.next/static/chunks/{2ebh36q8lvor_.js → 1xpxy-ja2ym0o.js} +1 -1
- package/.next/static/chunks/2jt0139jd2-i3.js +12 -0
- package/.next/static/chunks/2qjb14pd2n3x_.js +1 -0
- package/.next/static/chunks/2s6ae7khf13mi.js +12 -0
- package/.next/static/chunks/33fakli20_bmk.js +1 -0
- package/.next/static/chunks/{1egd1e1483_lj.js → 34dstd5pyqifj.js} +1 -1
- package/.next/static/chunks/{2924d0kl-68z7.js → 39lbv0arntrnf.js} +10 -10
- package/.next/static/chunks/3_w-p8241f5rv.js +1 -0
- package/.next/static/chunks/{3wch6vphcivq5.js → 3j92h-4k4_o_f.js} +1 -1
- package/.next/static/chunks/{4441xuc3i-yb7.js → 3rnbnqcge4lza.js} +1 -1
- package/.next/static/chunks/{2qqyq-iqkv_oa.js → 3snn9aaz5n95k.js} +2 -2
- package/.next/static/chunks/{1o_q928xcfjs3.js → 43btem6mtf_gh.js} +1 -1
- package/dist-scripts/scripts/rebuild-system-tags.js +11 -107
- package/dist-scripts/scripts/seed-chinese-primary.js +1 -1
- package/dist-scripts/src/lib/logger.js +1 -0
- package/dist-scripts/src/lib/tags/seed/rebuild.js +103 -0
- package/dist-scripts/src/lib/{seed-chinese-tags.js → tags/seed/seed-chinese-tags.js} +2 -1
- package/package.json +1 -1
- package/prisma/seed.db +0 -0
- package/.next/server/chunks/[root-of-the-server]__012pau7crikop._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01jc87mm42cex._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01newhoirvvb2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__02oqd6w58wymi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__057qz9ucs7lib._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06_pvs6rg70ri._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06jad9cnzeci-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0_uvtfu0yr-na._.js +0 -27
- package/.next/server/chunks/[root-of-the-server]__0_vinl1oembls._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ahni9caaouya._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0aq01totjzgkp._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b5mh_vi6e246._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b5qyqwq6mk5v._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b79cd6lae7ep._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b_zf20owrv7l._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0cel4yig3zcho._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0cu5jz9b3f0i1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0d818ux928r5h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0dclcdg0hwxxj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0e13o3ny66zb3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fg20m1i6x4y9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fhy87hr0_glw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fnte1x8xdn5o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0glupa52ge074._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0gphporvvjc0d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0gs7-3gi0pdws._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0i2mt6zjxbq--._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ijq_d0gr5zo8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0iqp1f0-yvbhw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jk-9m6ra-_um._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jvusk64khb-a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0k0c90ih7n0te._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0maxg52nxqrzi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ml-m3il4unb6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nkrql6or-tf_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nujsu6qbn-8o._.js +0 -27
- package/.next/server/chunks/[root-of-the-server]__0ovdiut1h8kkt._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0p5_lv_pjxr5f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0p8wlug4uvmvi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ptn9j1rleieh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0r7f34_38kmvk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0u3m78xhq8b3l._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ualui9b50ufh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ujfft7untkmq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0vw7u-y__gk7p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0w53aflmo1keg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wdjzoxwwh6bn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wx65sza19ou-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0xj_313186tqc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0yv_kznxz5qzn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0zldj8zxo-hvc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-djdd7tnb-n7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__109pj952qxtan._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__10gp75p89v9a2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__111jxitdjhuoj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__112w8xm57okk5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12h4ckd6f76pb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12ig6-5hpb7s-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__13_k7w8nrx7ie._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14c50fhuh_abo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14jpfgwnpc9gl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14m8fewwq1xs6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__15qkqztuygnfg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__166997w1su5wq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16xl11-irmhu3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19i64i9v32y8o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19jqc7tzna13p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1asgy7sah0mo6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1av1l48rnghpa._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1azaa45m60iqm._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1d159cxbdta68._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dmp3ynxbcyjz._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dom1le7wqh7d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1e5tjfwab0exu._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1f-7-l2abs15s._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fe2v2mv5-rgo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fepss7g57apj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ff3h7ockrpdf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1g11271g0z55n._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1g6jrwm72xr8a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1he8kk4382-0h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1hk5kgctlp2wn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1j44_t992y-1-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1k4f33-z95_7c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1k4pnhbw4rgzs._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1kx3a0dm7l2wl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1lea5m7hl1n7f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1m7pja8jp27eh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1m_y4afrn94oy._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ruzcenko2gi1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1sf2oa2wkqf_0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1t6aypqxgjkg_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1tffqae521gxo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1to25zgnk7xk-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1u5c7agj_phnb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1vbof6uu4he_-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1wfhdwfdvc6j3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1y0n2tg-0l636._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1zc0bmdyn1lg4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1zqfz2rc4i280._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__207c97dbcdb0z._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20cdqectwle3j._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20dy4zclqbnw8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__212aaltyh6kc2._.js +0 -3
- package/.next/server/chunks/_01y7-j4vx6cu5._.js +0 -3
- package/.next/server/chunks/_0_rhee7wb6tcg._.js +0 -3
- package/.next/server/chunks/_0at03z7sgwdv3._.js +0 -3
- package/.next/server/chunks/_0ge95_bkwrkmc._.js +0 -3
- package/.next/server/chunks/_0lj59y-ytysr5._.js +0 -3
- package/.next/server/chunks/_0v762_h-sp94d._.js +0 -3
- package/.next/server/chunks/_0vshwghrjetxu._.js +0 -3
- package/.next/server/chunks/_0z0zrluul2idw._.js +0 -3
- package/.next/server/chunks/_1a1oatugfke1p._.js +0 -3
- package/.next/server/chunks/_1fgb9ve_nfat4._.js +0 -3
- package/.next/server/chunks/_1fsfy4c3rj36b._.js +0 -3
- package/.next/server/chunks/_1hc_es1a3cl6a._.js +0 -3
- package/.next/server/chunks/_1m-yyz-pl9-03._.js +0 -3
- package/.next/server/chunks/_1ns6y6y2tq8sh._.js +0 -3
- package/.next/server/chunks/_1yujnc0thk8ab._.js +0 -3
- package/.next/server/chunks/_211va-dk9519v._.js +0 -3
- package/.next/server/chunks/src_lib_0_g_0q-n01g-x._.js +0 -3
- package/.next/server/chunks/src_lib_0au5a9-5rxkab._.js +0 -3
- package/.next/server/chunks/src_lib_0d7kmnt7v2np8._.js +0 -3
- package/.next/server/chunks/src_lib_0fedb0fkc3km1._.js +0 -3
- package/.next/server/chunks/src_lib_0okewfjk6p2ci._.js +0 -3
- package/.next/server/chunks/src_lib_0ptvn4_15zxu0._.js +0 -3
- package/.next/server/chunks/src_lib_0rb6u4i7kn30r._.js +0 -3
- package/.next/server/chunks/src_lib_0svj7bkzyw9oc._.js +0 -3
- package/.next/server/chunks/src_lib_10is5pyogge95._.js +0 -3
- package/.next/server/chunks/src_lib_12j7n__96zd0q._.js +0 -3
- package/.next/server/chunks/src_lib_13hd5uoi-53hn._.js +0 -3
- package/.next/server/chunks/src_lib_1chbt4n9_vpoj._.js +0 -3
- package/.next/server/chunks/src_lib_1geq39r7va9gy._.js +0 -3
- package/.next/server/chunks/src_lib_1h4xeb9lyx31r._.js +0 -3
- package/.next/server/chunks/src_lib_1qvj-3jt4jbq7._.js +0 -3
- package/.next/server/chunks/src_lib_1smlosz37xitx._.js +0 -3
- package/.next/server/chunks/src_lib_1squodf4swo_a._.js +0 -3
- package/.next/server/chunks/src_lib_1uei_xjjj3g7_._.js +0 -3
- package/.next/server/chunks/src_lib_1vt5vsj108u_q._.js +0 -3
- package/.next/server/chunks/src_lib_api-errors_ts_1gfd4ojz7efro._.js +0 -3
- package/.next/server/chunks/src_lib_figure-scale_ts_215n0ebzz7mr7._.js +0 -3
- package/.next/server/chunks/src_lib_import-batches_ts_0aekmggdwo_9-._.js +0 -3
- package/.next/server/chunks/src_lib_import-tasks_ts_1f4ejsy00-v1t._.js +0 -3
- package/.next/server/chunks/src_lib_question-analysis_ts_15_8r_pxmtd06._.js +0 -3
- package/.next/server/chunks/src_lib_question-deduplication_ts_1p1bik-vwl9ue._.js +0 -3
- package/.next/server/chunks/src_lib_retag_ts_0eu8ld_86kt3a._.js +0 -3
- package/.next/server/chunks/ssr/_01rfvhncgnpvl._.js +0 -3
- package/.next/server/chunks/ssr/_11820i-k62560._.js +0 -3
- package/.next/server/chunks/ssr/_1ujx-n3muyaxs._.js +0 -32
- package/.next/server/chunks/ssr/src_1vhiktxz2_jj3._.js +0 -3
- package/.next/server/chunks/ssr/src_lib_short-id-client_ts_1v7n6pg50kguj._.js +0 -3
- package/.next/static/chunks/0-hqh6zs3hidn.js +0 -12
- package/.next/static/chunks/02xikk3wlibg1.js +0 -1
- package/.next/static/chunks/0e6ximjg-pqgt.js +0 -1
- package/.next/static/chunks/0y5zywo-ll2w3.js +0 -1
- package/.next/static/chunks/17dk_oppf9-hv.js +0 -12
- package/.next/static/chunks/38vt_4ntvy02e.js +0 -1
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → P3mJPGERki1060-s7tC9h}/_buildManifest.js +0 -0
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → P3mJPGERki1060-s7tC9h}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → P3mJPGERki1060-s7tC9h}/_ssgManifest.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/biology.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/chemistry.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/chinese.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/english.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/geography.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/history.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/index.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/math-gaosi.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/math.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/physics.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/politics.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,842727,e=>{var t=e.i(271645),r=e.i(981140),n=e.i(75830),o=e.i(820783),a=e.i(30030),i=e.i(610772),s=e.i(248425),l=e.i(30207),u=e.i(369340),f=e.i(586318),c=e.i(934620),d=Object.defineProperty,p=(e,t)=>d(e,"name",{value:t,configurable:!0}),h=!1;function g(){let[e,r]=t.useState(h);return t.useEffect(()=>{h||(h=!0,r(!0))},[]),e}p(g,"useIsHydrated");var m=t[" useSyncExternalStore ".trim().toString()];function y(){return()=>{}}function v(){return m(y,()=>!0,()=>!1)}p(y,"subscribe"),p(v,"useIsHydratedModern");var b="function"==typeof m?v:g,x=e.i(843476),w=Object.defineProperty,k=(e,t)=>w(e,"name",{value:t,configurable:!0}),j="rovingFocusGroup.onEntryFocus",M={bubbles:!1,cancelable:!0},R="RovingFocusGroup",[D,C,P]=(0,n.f)(R),[N,I]=(0,a.f)(R,[P]),[E,T]=N(R),A=t.forwardRef(k(function(e,t){return(0,x.jsx)(D.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,x.jsx)(D.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,x.jsx)(S,{...e,ref:t})})})},"RovingFocusGroup")),S=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:a,orientation:i,loop:c=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:m,preventScrollOnEntryFocus:y=!1,...v}=e,b=t.useRef(null),w=(0,o.f)(n,b),k=(0,f.f)(d),[D,P]=(0,u.f)({prop:p,defaultProp:h??null,onChange:g,caller:R}),[N,I]=t.useState(!1),T=(0,l.f)(m),A=C(a),S=t.useRef(!1),[F,z]=t.useState(0);return t.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(j,T),()=>e.removeEventListener(j,T)},[T]),(0,x.jsx)(E,{scope:a,orientation:i,dir:k,loop:c,currentTabStopId:D,onItemFocus:t.useCallback(e=>P(e),[P]),onItemShiftTab:t.useCallback(()=>I(!0),[]),onFocusableItemAdd:t.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>z(e=>e-1),[]),children:(0,x.jsx)(s.V.div,{tabIndex:N||0===F?-1:0,"data-orientation":i,...v,ref:w,style:{outline:"none",...e.style},onMouseDown:(0,r.f)(e.onMouseDown,()=>{S.current=!0}),onFocus:(0,r.f)(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent(j,M);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=A().filter(e=>e.focusable);U([e.find(e=>e.active),e.find(e=>e.id===D),...e].filter(Boolean).map(e=>e.ref.current),y)}}S.current=!1}),onBlur:(0,r.f)(e.onBlur,()=>I(!1))})})},"RovingFocusGroupImpl")),F=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:o,focusable:a=!0,active:l=!1,tabStopId:u,children:f,...d}=e,p=(0,i.f)(),h=u||p,g=T("RovingFocusGroupItem",o),m=g.currentTabStopId===h,y=C(o),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:k}=g,j=b();return(0,c.f)(()=>{if(j&&a)return v(),()=>w()},[j,a,v,w]),t.useEffect(()=>{if(!j&&a)return v(),()=>w()},[j,a,v,w]),(0,x.jsx)(D.ItemSlot,{scope:o,id:h,focusable:a,active:l,children:(0,x.jsx)(s.V.span,{tabIndex:m?0:-1,"data-orientation":g.orientation,...d,ref:n,onMouseDown:(0,r.f)(e.onMouseDown,e=>{a?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.f)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,r.f)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=_(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=g.loop?L(r,n+1):r.slice(n+1)}setTimeout(()=>U(r))}}),children:"function"==typeof f?f({isCurrentTabStop:m,hasTabStop:null!=k}):f})})},"RovingFocusGroupItem")),z={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function O(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function _(e,t,r){let n=O(e.key,r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return z[n]}function U(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function L(e,t){return e.map((r,n)=>e[(t+n)%e.length])}k(O,"getDirectionAwareKey"),k(_,"getFocusIntent"),k(U,"focusFirst"),k(L,"wrapArray"),e.s(["M",0,F,"F",0,A,"B",0,I],842727)},975153,e=>{var t=e.i(456420);let r={name:"calendar-check",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],975153)},749803,e=>{var t=e.i(456420);let r={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],749803)},716327,456539,e=>{var t=e.i(456420);let r={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],716327);let o={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};o.node;let a=(0,t.f)(o);e.s(["f",0,a],456539)},867927,e=>{var t=e.i(456420);let r={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],867927)},548161,e=>{var t=e.i(456420);let r={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],548161)},583967,e=>{var t=e.i(456420);let r={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],583967)},762368,e=>{var t=e.i(456420);let r={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],762368)},580860,e=>{var t=e.i(456420);let r={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],580860)},226091,e=>{var t=e.i(456420);let r={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],226091)},999092,e=>{var t=e.i(456420);let r={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],999092)},
|
|
2
|
-
${e}`;function c(e,t,r,n){return o.k.post("/api/tts/batch",{texts:e,language:t,...r?{regenerate:r}:{},...n?{errorItemId:n}:{}},{timeout:6e5,recoverable:!0}).then(({items:e})=>e.map(({id:e,version:t})=>`/api/tts/${e}?v=${t}`))}async function d(e,t,r){let n=await c(e,t,!0,r);e.forEach((e,r)=>u.set(f(e,t),Promise.resolve(n[r])))}e.s(["l",0,l,"v",0,function(){return a??=o.k.get("/api/tts").then(e=>"cloud"===e.mode?"cloud":"browser").catch(()=>"browser")},"h",0,function(){return s},"z",0,function(e,t){return o.k.post("/api/tts/status",{texts:e,language:t}).then(e=>!0===e.ready).catch(()=>!1)},"w",0,function(e,t,r){let n=[...new Set(e)].filter(e=>!u.has(f(e,t)));if(!n.length)return Promise.resolve();let o=c(n,t,!1,r);return n.forEach((e,r)=>{let n=f(e,t),a=o.then(e=>e[r]);a.catch(()=>u.delete(n)),u.set(n,a)}),o.then(()=>void 0)},"H",0,d,"U",0,function(e,t){let r=f(e,t),n=u.get(r);!n&&((n=o.k.post("/api/tts",{text:e,language:t},{timeout:12e4,recoverable:!0}).then(({id:e,version:t})=>`/api/tts/${e}?v=${t}`)).catch(()=>u.delete(r)),u.set(r,n));return n},"p",0,function(){let e=l();if(e&&!s){let t,r,n;s=!0,t=new DataView(new ArrayBuffer(1644)),(r=(e,r)=>[...r].forEach((r,n)=>t.setUint8(e+n,r.charCodeAt(0))))(0,"RIFF"),t.setUint32(4,1636,!0),r(8,"WAVE"),r(12,"fmt "),t.setUint32(16,16,!0),t.setUint16(20,1,!0),t.setUint16(22,1,!0),t.setUint32(24,8e3,!0),t.setUint32(28,16e3,!0),t.setUint16(32,2,!0),t.setUint16(34,16,!0),r(36,"data"),t.setUint32(40,1600,!0),n="",new Uint8Array(t.buffer).forEach(e=>{n+=String.fromCharCode(e)}),e.src=`data:audio/wav;base64,${btoa(n)}`,e.play().catch(()=>{s=!1})}}],79058)},77071,e=>{var t=e.i(456420);let r={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],77071)},741120,e=>{var t=e.i(456420);let r={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],741120)},980105,e=>{var t=e.i(456420);let r={name:"scan-text",size:24,node:[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],980105)},901279,e=>{var t=e.i(456420);let r={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],901279)},534693,e=>{var t=e.i(456420);let r={name:"wand-sparkles",size:24,node:[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],aliases:["wand-2"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n])},994533,e=>{var t=e.i(534693);e.s(["f",()=>t.f])},263676,e=>{var t=e.i(456420);let r={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};r.node;let n=(0,t.f)(r);e.s(["X",0,n],263676)},522016,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(190809),i=e.r(843476),s=a._(e.r(271645)),l=e.r(195057),u=e.r(8372),f=e.r(818581),c=e.r(718967),d=e.r(405550),p=e.r(388540),h=e.r(91949),g=e.r(573668),m=e.r(509396);function y(t){var r;let n,o,a,[y,b]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),x=(0,s.useRef)(null),{href:w,as:k,children:j,prefetch:M=null,passHref:R,replace:D,shallow:C,scroll:P,onClick:N,onMouseEnter:I,onTouchStart:E,legacyBehavior:T=!1,onNavigate:A,transitionTypes:S,ref:F,unstable_dynamicOnHover:z,...O}=t;n=j,T&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let _=s.default.useContext(u.AppRouterContext),U=!1!==M,L=!1===M?"none":!0===M?"full":"auto",$="none"!==L?"auto"===L?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,V="string"==typeof(r=k||w)?r:(0,l.formatUrl)(r);if(T){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=s.default.Children.only(n)}let K=T?o&&"object"==typeof o&&o.ref:F,B,H=s.default.useCallback(e=>(null!==_&&(x.current=(0,h.mountLinkInstance)(e,V,_,$,U,b,B)),()=>{x.current&&((0,h.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,h.unmountPrefetchableInstance)(e)}),[U,V,_,$,b,B]),q={ref:(0,f.useMergedRef)(H,K),onClick(t){T||"function"!=typeof N||N(t),T&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!_||t.defaultPrevented||function(t,r,n,o,a,i,s,l="none"){if("u">typeof window){let u,{nodeName:f}=t.currentTarget;if("A"===f.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:c}=e.r(132916);c(r,o?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s,l)}}(t,V,x,D,P,A,S,L)},onMouseEnter(e){T||"function"!=typeof I||I(e),T&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),_&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){T||"function"!=typeof E||E(e),T&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),_&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,c.isAbsoluteUrl)(V)?q.href=V:T&&!R&&("a"!==o.type||"href"in o.props)||(q.href=(0,d.addBasePath)(V)),a=T?s.default.cloneElement(o,q):(0,i.jsx)("a",{...O,...q,children:n}),(0,i.jsx)(v.Provider,{value:y,children:a})}let v=(0,s.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},818581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(271645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},195057,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(190809)._(e.r(998183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let f=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),f&&"?"!==f[0]&&(f="?"+f),o=o.replace(/[?#]/g,encodeURIComponent),f=f.replace("#","%23"),`${n}${u}${o}${f}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},573668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(718967),o=e.r(652817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},718967,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return c},getLocationOrigin:function(){return u},getURL:function(){return f},isAbsoluteUrl:function(){return l},isResSent:function(){return d},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return k}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function f(){let{href:e}=window.location,t=u();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}},772325,e=>{var t=e.i(722219);e.s(["z",0,t])},978056,e=>{var t=e.i(722219);e.s(["z",0,t])},411382,e=>{var t=e.i(722219);e.s(["z",0,t])},54105,e=>{var t=e.i(722219);e.s(["z",0,t])},515288,e=>{var t=e.i(843476),r=e.i(975157);e.s(["N",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,r.f)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...n})},"O",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.f)("px-6",e),...n})},"u",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.f)("text-muted-foreground text-sm",e),...n})},"Y",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.f)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...n})},"v",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.f)("leading-none font-semibold",e),...n})}])},776639,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(981140),o=e.i(820783),a=e.i(30030),i=e.i(610772),s=e.i(369340),l=e.i(726330),u=e.i(765491),f=e.i(774606),c=e.i(296626),d=e.i(248425),p=e.i(303536),h=e.i(934620),g=e.i(985369),m=e.i(186312),y=e.i(991918),v=Object.defineProperty,b=(e,t)=>v(e,"name",{value:t,configurable:!0}),x="Dialog",[w,k]=(0,a.f)(x),[j,M]=w(x),R=b(e=>{let{__scopeDialog:n,children:o,open:a,defaultOpen:l,onOpenChange:f,modal:c=!0}=e,d=r.useRef(null),p=r.useRef(null),{nodes:h,registry:g}=(0,u.D)(),[m,y]=(0,s.f)({prop:a,defaultProp:l??!1,onChange:f,caller:x}),[v,b]=r.useState(0),[w,k]=r.useState(0);return(0,t.jsx)(j,{scope:n,triggerRef:d,contentRef:p,contentId:(0,i.f)(),titleId:(0,i.f)(),descriptionId:(0,i.f)(),titlePresent:v>0,descriptionPresent:w>0,setTitleCount:b,setDescriptionCount:k,open:m,onOpenChange:y,onOpenToggle:r.useCallback(()=>y(e=>!e),[y]),modal:c,branchNodes:h,branchRegistry:g,children:o})},"Dialog"),D=r.forwardRef(b(function(e,r){let{__scopeDialog:a,...i}=e,s=M("DialogTrigger",a),l=(0,o.f)(r,s.triggerRef);return(0,t.jsx)(d.V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":B(s.open),...i,ref:l,onClick:(0,n.f)(e.onClick,s.onOpenToggle)})},"DialogTrigger")),C="DialogPortal",[P,N]=w(C,{forceMount:void 0}),I=b(e=>{let{__scopeDialog:n,forceMount:o,children:a,container:i}=e,s=M(C,n);return(0,t.jsx)(P,{scope:n,forceMount:o,children:r.Children.map(a,e=>(0,t.jsx)(c.f,{present:o||s.open,children:(0,t.jsx)(f.f,{asChild:!0,container:i,children:e})}))})},"DialogPortal"),E="DialogOverlay",T=r.forwardRef(b(function(e,r){let n=N(E,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=M(E,e.__scopeDialog);return i.modal?(0,t.jsx)(c.f,{present:o||i.open,children:(0,t.jsx)(S,{...a,ref:r})}):null},"DialogOverlay")),A=(0,y.B)("DialogOverlay.RemoveScroll"),S=r.forwardRef(b(function(e,n){let{__scopeDialog:a,...i}=e,s=M(E,a),u=(0,l.y)(),f=(0,o.f)(n,u);return(0,t.jsx)(g.f,{as:A,allowPinchZoom:!0,shards:r.useMemo(()=>[s.contentRef,...s.branchNodes.map(e=>({current:e}))],[s.contentRef,s.branchNodes]),children:(0,t.jsx)(d.V.div,{"data-state":B(s.open),...i,ref:f,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),F="DialogContent",z=r.forwardRef(b(function(e,r){let n=N(F,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=M(F,e.__scopeDialog);return(0,t.jsx)(c.f,{present:o||i.open,children:i.modal?(0,t.jsx)(O,{...a,ref:r}):(0,t.jsx)(_,{...a,ref:r})})},"DialogContent")),O=r.forwardRef(b(function(e,a){let i=M(F,e.__scopeDialog),s=r.useRef(null),l=(0,o.f)(a,i.contentRef,s);return r.useEffect(()=>{let e=s.current;if(e)return(0,m.f)(e)},[]),(0,t.jsx)(U,{...e,ref:l,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:(0,n.f)(e.onCloseAutoFocus,e=>{e.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:(0,n.f)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,n.f)(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),_=r.forwardRef(b(function(e,n){let o=M(F,e.__scopeDialog),a=r.useRef(!1),i=r.useRef(!1);return(0,t.jsx)(U,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||o.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let r=t.target;o.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})},"DialogContentNonModal")),U=r.forwardRef(b(function(e,r){let{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,"aria-describedby":s,children:f,...c}=e,d=M(F,n);return(0,p.f)(),(0,t.jsx)(u.l,{registry:d.branchRegistry,children:(0,t.jsx)(u.v,{asChild:!0,loop:!0,trapped:o,branches:d.branchNodes,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,t.jsx)(l.V,{role:"dialog",id:d.contentId,"aria-labelledby":d.titlePresent?d.titleId:void 0,"aria-describedby":d.descriptionPresent?K(s,d.descriptionId):s,"data-state":B(d.open),...c,ref:r,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1),children:f})})})},"DialogContentImpl")),L=r.forwardRef(b(function(e,r){let{__scopeDialog:n,...o}=e,a=M("DialogTitle",n),{setTitleCount:i}=a;return(0,h.f)(()=>(i(e=>e+1),()=>i(e=>e-1)),[i]),(0,t.jsx)(d.V.h2,{id:a.titleId,...o,ref:r})},"DialogTitle")),$=r.forwardRef(b(function(e,r){let{__scopeDialog:n,...o}=e,a=M("DialogDescription",n),{setDescriptionCount:i}=a;return(0,h.f)(()=>(i(e=>e+1),()=>i(e=>e-1)),[i]),(0,t.jsx)(d.V.p,{id:a.descriptionId,...o,ref:r})},"DialogDescription")),V=r.forwardRef(b(function(e,r){let{__scopeDialog:o,...a}=e,i=M("DialogClose",o);return(0,t.jsx)(d.V.button,{type:"button",...a,ref:r,onClick:(0,n.f)(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function K(...e){let t=new Set;for(let r of e)if("string"==typeof r)for(let e of String(r).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(" "):void 0}function B(e){return e?"open":"closed"}b(K,"concatAriaDescribedby"),b(B,"getState");var H=e.i(263676),q=e.i(975157);let G=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(T,{ref:n,className:(0,q.f)("fixed inset-0 z-50 bg-black/50 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}));G.displayName=T.displayName;let W=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(I,{children:[(0,t.jsx)(G,{}),(0,t.jsxs)(z,{ref:o,onPointerDownOutside:e=>{e.preventDefault()},className:(0,q.f)("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-card p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...n,children:[r,(0,t.jsxs)(V,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(H.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));W.displayName=z.displayName;let X=({className:e,...r})=>(0,t.jsx)("div",{className:(0,q.f)("flex flex-col space-y-1.5 text-center sm:text-left",e),...r});X.displayName="DialogHeader";let Z=({className:e,...r})=>(0,t.jsx)("div",{className:(0,q.f)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});Z.displayName="DialogFooter";let J=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(L,{ref:n,className:(0,q.f)("text-lg font-semibold leading-none tracking-tight",e),...r}));J.displayName=L.displayName;let Q=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)($,{ref:n,className:(0,q.f)("text-sm text-muted-foreground",e),...r}));Q.displayName=$.displayName,e.s(["N",0,R,"d",0,W,"C",0,Q,"c",0,Z,"s",0,X,"F",0,J,"a",0,D],776639)},793479,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({className:e,type:n,...o}){return(0,t.jsx)("input",{type:n,"data-slot":"input",className:(0,r.f)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...o})}])},677572,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(981140),o=e.i(30030),a=e.i(842727),i=e.i(296626),s=e.i(248425),l=e.i(586318),u=e.i(369340),f=e.i(610772),c=Object.defineProperty,d=(e,t)=>c(e,"name",{value:t,configurable:!0}),p="Tabs",[h,g]=(0,o.f)(p,[a.B]),m=(0,a.B)(),[y,v]=h(p),b=r.forwardRef(d(function(e,r){let{__scopeTabs:n,value:o,onValueChange:a,defaultValue:i,orientation:c="horizontal",dir:d,activationMode:h="automatic",...g}=e,m=(0,l.f)(d),[v,b]=(0,u.f)({prop:o,onChange:a,defaultProp:i??"",caller:p});return(0,t.jsx)(y,{scope:n,baseId:(0,f.f)(),value:v,onValueChange:b,orientation:c,dir:m,activationMode:h,children:(0,t.jsx)(s.V.div,{dir:m,"data-orientation":c,...g,ref:r})})},"Tabs")),x=r.forwardRef(d(function(e,r){let{__scopeTabs:n,loop:o=!0,...i}=e,l=v("TabsList",n),u=m(n);return(0,t.jsx)(a.F,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:o,children:(0,t.jsx)(s.V.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:r})})},"TabsList")),w=r.forwardRef(d(function(e,r){let{__scopeTabs:o,value:i,disabled:l=!1,...u}=e,f=v("TabsTrigger",o),c=m(o),d=j(f.baseId,i),p=M(f.baseId,i),h=i===f.value;return(0,t.jsx)(a.M,{asChild:!0,...c,focusable:!l,active:h,children:(0,t.jsx)(s.V.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":p,"data-state":h?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:d,...u,ref:r,onMouseDown:(0,n.f)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():(e.currentTarget.focus(),f.onValueChange(i))}),onKeyDown:(0,n.f)(e.onKeyDown,e=>{!l&&e.target===e.currentTarget&&[" ","Enter"].includes(e.key)&&f.onValueChange(i)}),onFocus:(0,n.f)(e.onFocus,()=>{let e="manual"!==f.activationMode;h||l||!e||f.onValueChange(i)})})})},"TabsTrigger")),k=r.forwardRef(d(function(e,n){let{__scopeTabs:o,value:a,forceMount:l,children:u,...f}=e,c=v("TabsContent",o),d=j(c.baseId,a),p=M(c.baseId,a),h=a===c.value,g=r.useRef(h);return r.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(i.f,{present:l||h,children:({present:r})=>(0,t.jsx)(s.V.div,{"data-state":h?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!r,id:p,tabIndex:0,...f,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:r&&u})})},"TabsContent"));function j(e,t){return`${e}-trigger-${t}`}function M(e,t){return`${e}-content-${t}`}d(j,"makeTriggerId"),d(M,"makeContentId");var R=e.i(975157);let D=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(x,{ref:n,className:(0,R.f)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...r}));D.displayName=x.displayName;let C=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(w,{ref:n,className:(0,R.f)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...r}));C.displayName=w.displayName;let P=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(k,{ref:n,className:(0,R.f)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r}));P.displayName=k.displayName,e.s(["i",0,b,"S",0,P,"U",0,D,"k",0,C],677572)},81968,e=>{e.s(["f",0,function(){return window.WrongNotebookAndroid??null}])},637691,e=>{e.s(["f",0,"https://github.com/margrop/wrong-notebook"])},905110,e=>{let t=["new","reviewing","mastered"];e.s(["z",0,50,"o",0,100,"P",0,1,"m",0,function(e,t=50){return"number"==typeof e&&e>=t/100},"A",0,function(e){return"string"==typeof e&&t.includes(e)}])}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,842727,e=>{var t=e.i(271645),r=e.i(981140),n=e.i(75830),o=e.i(820783),a=e.i(30030),i=e.i(610772),s=e.i(248425),l=e.i(30207),u=e.i(369340),f=e.i(586318),c=e.i(934620),d=Object.defineProperty,p=(e,t)=>d(e,"name",{value:t,configurable:!0}),h=!1;function g(){let[e,r]=t.useState(h);return t.useEffect(()=>{h||(h=!0,r(!0))},[]),e}p(g,"useIsHydrated");var m=t[" useSyncExternalStore ".trim().toString()];function y(){return()=>{}}function v(){return m(y,()=>!0,()=>!1)}p(y,"subscribe"),p(v,"useIsHydratedModern");var b="function"==typeof m?v:g,x=e.i(843476),w=Object.defineProperty,k=(e,t)=>w(e,"name",{value:t,configurable:!0}),j="rovingFocusGroup.onEntryFocus",M={bubbles:!1,cancelable:!0},R="RovingFocusGroup",[D,C,P]=(0,n.f)(R),[N,I]=(0,a.f)(R,[P]),[E,T]=N(R),A=t.forwardRef(k(function(e,t){return(0,x.jsx)(D.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,x.jsx)(D.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,x.jsx)(S,{...e,ref:t})})})},"RovingFocusGroup")),S=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:a,orientation:i,loop:c=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:m,preventScrollOnEntryFocus:y=!1,...v}=e,b=t.useRef(null),w=(0,o.f)(n,b),k=(0,f.f)(d),[D,P]=(0,u.f)({prop:p,defaultProp:h??null,onChange:g,caller:R}),[N,I]=t.useState(!1),T=(0,l.f)(m),A=C(a),S=t.useRef(!1),[F,z]=t.useState(0);return t.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(j,T),()=>e.removeEventListener(j,T)},[T]),(0,x.jsx)(E,{scope:a,orientation:i,dir:k,loop:c,currentTabStopId:D,onItemFocus:t.useCallback(e=>P(e),[P]),onItemShiftTab:t.useCallback(()=>I(!0),[]),onFocusableItemAdd:t.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>z(e=>e-1),[]),children:(0,x.jsx)(s.V.div,{tabIndex:N||0===F?-1:0,"data-orientation":i,...v,ref:w,style:{outline:"none",...e.style},onMouseDown:(0,r.f)(e.onMouseDown,()=>{S.current=!0}),onFocus:(0,r.f)(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent(j,M);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=A().filter(e=>e.focusable);U([e.find(e=>e.active),e.find(e=>e.id===D),...e].filter(Boolean).map(e=>e.ref.current),y)}}S.current=!1}),onBlur:(0,r.f)(e.onBlur,()=>I(!1))})})},"RovingFocusGroupImpl")),F=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:o,focusable:a=!0,active:l=!1,tabStopId:u,children:f,...d}=e,p=(0,i.f)(),h=u||p,g=T("RovingFocusGroupItem",o),m=g.currentTabStopId===h,y=C(o),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:k}=g,j=b();return(0,c.f)(()=>{if(j&&a)return v(),()=>w()},[j,a,v,w]),t.useEffect(()=>{if(!j&&a)return v(),()=>w()},[j,a,v,w]),(0,x.jsx)(D.ItemSlot,{scope:o,id:h,focusable:a,active:l,children:(0,x.jsx)(s.V.span,{tabIndex:m?0:-1,"data-orientation":g.orientation,...d,ref:n,onMouseDown:(0,r.f)(e.onMouseDown,e=>{a?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.f)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,r.f)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=_(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=g.loop?L(r,n+1):r.slice(n+1)}setTimeout(()=>U(r))}}),children:"function"==typeof f?f({isCurrentTabStop:m,hasTabStop:null!=k}):f})})},"RovingFocusGroupItem")),z={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function O(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function _(e,t,r){let n=O(e.key,r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return z[n]}function U(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function L(e,t){return e.map((r,n)=>e[(t+n)%e.length])}k(O,"getDirectionAwareKey"),k(_,"getFocusIntent"),k(U,"focusFirst"),k(L,"wrapArray"),e.s(["M",0,F,"F",0,A,"B",0,I],842727)},975153,e=>{var t=e.i(456420);let r={name:"calendar-check",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],975153)},749803,e=>{var t=e.i(456420);let r={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],749803)},716327,456539,e=>{var t=e.i(456420);let r={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],716327);let o={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};o.node;let a=(0,t.f)(o);e.s(["f",0,a],456539)},867927,e=>{var t=e.i(456420);let r={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],867927)},548161,e=>{var t=e.i(456420);let r={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],548161)},583967,e=>{var t=e.i(456420);let r={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],583967)},762368,e=>{var t=e.i(456420);let r={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],762368)},580860,e=>{var t=e.i(456420);let r={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],580860)},226091,e=>{var t=e.i(456420);let r={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],226091)},999092,e=>{var t=e.i(456420);let r={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],999092)},21357,79058,e=>{var t=e.i(456420);let r={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],21357);var o=e.i(41931);let a=null,i=null,s=!1;function l(){return"u"<typeof Audio?null:i??=new Audio}let u=new Map,f=(e,t)=>`${t}
|
|
2
|
+
${e}`;function c(e,t,r,n){return o.k.post("/api/tts/batch",{texts:e,language:t,...r?{regenerate:r}:{},...n?{errorItemId:n}:{}},{timeout:6e5,recoverable:!0}).then(({items:e})=>e.map(({id:e,version:t})=>`/api/tts/${e}?v=${t}`))}async function d(e,t,r){let n=await c(e,t,!0,r);e.forEach((e,r)=>u.set(f(e,t),Promise.resolve(n[r])))}e.s(["l",0,l,"v",0,function(){return a??=o.k.get("/api/tts").then(e=>"cloud"===e.mode?"cloud":"browser").catch(()=>"browser")},"h",0,function(){return s},"z",0,function(e,t){return o.k.post("/api/tts/status",{texts:e,language:t}).then(e=>!0===e.ready).catch(()=>!1)},"w",0,function(e,t,r){let n=[...new Set(e)].filter(e=>!u.has(f(e,t)));if(!n.length)return Promise.resolve();let o=c(n,t,!1,r);return n.forEach((e,r)=>{let n=f(e,t),a=o.then(e=>e[r]);a.catch(()=>u.delete(n)),u.set(n,a)}),o.then(()=>void 0)},"H",0,d,"U",0,function(e,t){let r=f(e,t),n=u.get(r);!n&&((n=o.k.post("/api/tts",{text:e,language:t},{timeout:12e4,recoverable:!0}).then(({id:e,version:t})=>`/api/tts/${e}?v=${t}`)).catch(()=>u.delete(r)),u.set(r,n));return n},"p",0,function(){let e=l();if(e&&!s){let t,r,n;s=!0,t=new DataView(new ArrayBuffer(1644)),(r=(e,r)=>[...r].forEach((r,n)=>t.setUint8(e+n,r.charCodeAt(0))))(0,"RIFF"),t.setUint32(4,1636,!0),r(8,"WAVE"),r(12,"fmt "),t.setUint32(16,16,!0),t.setUint16(20,1,!0),t.setUint16(22,1,!0),t.setUint32(24,8e3,!0),t.setUint32(28,16e3,!0),t.setUint16(32,2,!0),t.setUint16(34,16,!0),r(36,"data"),t.setUint32(40,1600,!0),n="",new Uint8Array(t.buffer).forEach(e=>{n+=String.fromCharCode(e)}),e.src=`data:audio/wav;base64,${btoa(n)}`,e.play().catch(()=>{s=!1})}}],79058)},77071,e=>{var t=e.i(456420);let r={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],77071)},741120,e=>{var t=e.i(456420);let r={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],741120)},980105,e=>{var t=e.i(456420);let r={name:"scan-text",size:24,node:[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],980105)},901279,e=>{var t=e.i(456420);let r={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],901279)},534693,e=>{var t=e.i(456420);let r={name:"wand-sparkles",size:24,node:[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],aliases:["wand-2"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n])},994533,e=>{var t=e.i(534693);e.s(["f",()=>t.f])},263676,e=>{var t=e.i(456420);let r={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};r.node;let n=(0,t.f)(r);e.s(["X",0,n],263676)},522016,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(190809),i=e.r(843476),s=a._(e.r(271645)),l=e.r(195057),u=e.r(8372),f=e.r(818581),c=e.r(718967),d=e.r(405550),p=e.r(388540),h=e.r(91949),g=e.r(573668),m=e.r(509396);function y(t){var r;let n,o,a,[y,b]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),x=(0,s.useRef)(null),{href:w,as:k,children:j,prefetch:M=null,passHref:R,replace:D,shallow:C,scroll:P,onClick:N,onMouseEnter:I,onTouchStart:E,legacyBehavior:T=!1,onNavigate:A,transitionTypes:S,ref:F,unstable_dynamicOnHover:z,...O}=t;n=j,T&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let _=s.default.useContext(u.AppRouterContext),U=!1!==M,L=!1===M?"none":!0===M?"full":"auto",$="none"!==L?"auto"===L?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,V="string"==typeof(r=k||w)?r:(0,l.formatUrl)(r);if(T){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=s.default.Children.only(n)}let K=T?o&&"object"==typeof o&&o.ref:F,B,H=s.default.useCallback(e=>(null!==_&&(x.current=(0,h.mountLinkInstance)(e,V,_,$,U,b,B)),()=>{x.current&&((0,h.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,h.unmountPrefetchableInstance)(e)}),[U,V,_,$,b,B]),q={ref:(0,f.useMergedRef)(H,K),onClick(t){T||"function"!=typeof N||N(t),T&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!_||t.defaultPrevented||function(t,r,n,o,a,i,s,l="none"){if("u">typeof window){let u,{nodeName:f}=t.currentTarget;if("A"===f.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:c}=e.r(132916);c(r,o?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s,l)}}(t,V,x,D,P,A,S,L)},onMouseEnter(e){T||"function"!=typeof I||I(e),T&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),_&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){T||"function"!=typeof E||E(e),T&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),_&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,c.isAbsoluteUrl)(V)?q.href=V:T&&!R&&("a"!==o.type||"href"in o.props)||(q.href=(0,d.addBasePath)(V)),a=T?s.default.cloneElement(o,q):(0,i.jsx)("a",{...O,...q,children:n}),(0,i.jsx)(v.Provider,{value:y,children:a})}let v=(0,s.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},818581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(271645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},195057,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(190809)._(e.r(998183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let f=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),f&&"?"!==f[0]&&(f="?"+f),o=o.replace(/[?#]/g,encodeURIComponent),f=f.replace("#","%23"),`${n}${u}${o}${f}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},573668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(718967),o=e.r(652817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},718967,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return c},getLocationOrigin:function(){return u},getURL:function(){return f},isAbsoluteUrl:function(){return l},isResSent:function(){return d},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return k}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function f(){let{href:e}=window.location,t=u();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}},772325,e=>{var t=e.i(722219);e.s(["z",0,t])},978056,e=>{var t=e.i(722219);e.s(["z",0,t])},411382,e=>{var t=e.i(722219);e.s(["z",0,t])},54105,e=>{var t=e.i(722219);e.s(["z",0,t])},515288,e=>{var t=e.i(843476),r=e.i(975157);e.s(["N",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,r.f)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...n})},"O",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.f)("px-6",e),...n})},"u",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.f)("text-muted-foreground text-sm",e),...n})},"Y",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.f)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...n})},"v",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.f)("leading-none font-semibold",e),...n})}])},776639,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(981140),o=e.i(820783),a=e.i(30030),i=e.i(610772),s=e.i(369340),l=e.i(726330),u=e.i(765491),f=e.i(774606),c=e.i(296626),d=e.i(248425),p=e.i(303536),h=e.i(934620),g=e.i(985369),m=e.i(186312),y=e.i(991918),v=Object.defineProperty,b=(e,t)=>v(e,"name",{value:t,configurable:!0}),x="Dialog",[w,k]=(0,a.f)(x),[j,M]=w(x),R=b(e=>{let{__scopeDialog:n,children:o,open:a,defaultOpen:l,onOpenChange:f,modal:c=!0}=e,d=r.useRef(null),p=r.useRef(null),{nodes:h,registry:g}=(0,u.D)(),[m,y]=(0,s.f)({prop:a,defaultProp:l??!1,onChange:f,caller:x}),[v,b]=r.useState(0),[w,k]=r.useState(0);return(0,t.jsx)(j,{scope:n,triggerRef:d,contentRef:p,contentId:(0,i.f)(),titleId:(0,i.f)(),descriptionId:(0,i.f)(),titlePresent:v>0,descriptionPresent:w>0,setTitleCount:b,setDescriptionCount:k,open:m,onOpenChange:y,onOpenToggle:r.useCallback(()=>y(e=>!e),[y]),modal:c,branchNodes:h,branchRegistry:g,children:o})},"Dialog"),D=r.forwardRef(b(function(e,r){let{__scopeDialog:a,...i}=e,s=M("DialogTrigger",a),l=(0,o.f)(r,s.triggerRef);return(0,t.jsx)(d.V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":B(s.open),...i,ref:l,onClick:(0,n.f)(e.onClick,s.onOpenToggle)})},"DialogTrigger")),C="DialogPortal",[P,N]=w(C,{forceMount:void 0}),I=b(e=>{let{__scopeDialog:n,forceMount:o,children:a,container:i}=e,s=M(C,n);return(0,t.jsx)(P,{scope:n,forceMount:o,children:r.Children.map(a,e=>(0,t.jsx)(c.f,{present:o||s.open,children:(0,t.jsx)(f.f,{asChild:!0,container:i,children:e})}))})},"DialogPortal"),E="DialogOverlay",T=r.forwardRef(b(function(e,r){let n=N(E,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=M(E,e.__scopeDialog);return i.modal?(0,t.jsx)(c.f,{present:o||i.open,children:(0,t.jsx)(S,{...a,ref:r})}):null},"DialogOverlay")),A=(0,y.B)("DialogOverlay.RemoveScroll"),S=r.forwardRef(b(function(e,n){let{__scopeDialog:a,...i}=e,s=M(E,a),u=(0,l.y)(),f=(0,o.f)(n,u);return(0,t.jsx)(g.f,{as:A,allowPinchZoom:!0,shards:r.useMemo(()=>[s.contentRef,...s.branchNodes.map(e=>({current:e}))],[s.contentRef,s.branchNodes]),children:(0,t.jsx)(d.V.div,{"data-state":B(s.open),...i,ref:f,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),F="DialogContent",z=r.forwardRef(b(function(e,r){let n=N(F,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=M(F,e.__scopeDialog);return(0,t.jsx)(c.f,{present:o||i.open,children:i.modal?(0,t.jsx)(O,{...a,ref:r}):(0,t.jsx)(_,{...a,ref:r})})},"DialogContent")),O=r.forwardRef(b(function(e,a){let i=M(F,e.__scopeDialog),s=r.useRef(null),l=(0,o.f)(a,i.contentRef,s);return r.useEffect(()=>{let e=s.current;if(e)return(0,m.f)(e)},[]),(0,t.jsx)(U,{...e,ref:l,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:(0,n.f)(e.onCloseAutoFocus,e=>{e.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:(0,n.f)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,n.f)(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),_=r.forwardRef(b(function(e,n){let o=M(F,e.__scopeDialog),a=r.useRef(!1),i=r.useRef(!1);return(0,t.jsx)(U,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||o.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let r=t.target;o.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})},"DialogContentNonModal")),U=r.forwardRef(b(function(e,r){let{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,"aria-describedby":s,children:f,...c}=e,d=M(F,n);return(0,p.f)(),(0,t.jsx)(u.l,{registry:d.branchRegistry,children:(0,t.jsx)(u.v,{asChild:!0,loop:!0,trapped:o,branches:d.branchNodes,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,t.jsx)(l.V,{role:"dialog",id:d.contentId,"aria-labelledby":d.titlePresent?d.titleId:void 0,"aria-describedby":d.descriptionPresent?K(s,d.descriptionId):s,"data-state":B(d.open),...c,ref:r,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1),children:f})})})},"DialogContentImpl")),L=r.forwardRef(b(function(e,r){let{__scopeDialog:n,...o}=e,a=M("DialogTitle",n),{setTitleCount:i}=a;return(0,h.f)(()=>(i(e=>e+1),()=>i(e=>e-1)),[i]),(0,t.jsx)(d.V.h2,{id:a.titleId,...o,ref:r})},"DialogTitle")),$=r.forwardRef(b(function(e,r){let{__scopeDialog:n,...o}=e,a=M("DialogDescription",n),{setDescriptionCount:i}=a;return(0,h.f)(()=>(i(e=>e+1),()=>i(e=>e-1)),[i]),(0,t.jsx)(d.V.p,{id:a.descriptionId,...o,ref:r})},"DialogDescription")),V=r.forwardRef(b(function(e,r){let{__scopeDialog:o,...a}=e,i=M("DialogClose",o);return(0,t.jsx)(d.V.button,{type:"button",...a,ref:r,onClick:(0,n.f)(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function K(...e){let t=new Set;for(let r of e)if("string"==typeof r)for(let e of String(r).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(" "):void 0}function B(e){return e?"open":"closed"}b(K,"concatAriaDescribedby"),b(B,"getState");var H=e.i(263676),q=e.i(975157);let G=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(T,{ref:n,className:(0,q.f)("fixed inset-0 z-50 bg-black/50 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}));G.displayName=T.displayName;let W=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(I,{children:[(0,t.jsx)(G,{}),(0,t.jsxs)(z,{ref:o,onPointerDownOutside:e=>{e.preventDefault()},className:(0,q.f)("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-card p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...n,children:[r,(0,t.jsxs)(V,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(H.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));W.displayName=z.displayName;let X=({className:e,...r})=>(0,t.jsx)("div",{className:(0,q.f)("flex flex-col space-y-1.5 text-center sm:text-left",e),...r});X.displayName="DialogHeader";let Z=({className:e,...r})=>(0,t.jsx)("div",{className:(0,q.f)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});Z.displayName="DialogFooter";let J=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(L,{ref:n,className:(0,q.f)("text-lg font-semibold leading-none tracking-tight",e),...r}));J.displayName=L.displayName;let Q=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)($,{ref:n,className:(0,q.f)("text-sm text-muted-foreground",e),...r}));Q.displayName=$.displayName,e.s(["N",0,R,"d",0,W,"C",0,Q,"c",0,Z,"s",0,X,"F",0,J,"a",0,D],776639)},793479,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({className:e,type:n,...o}){return(0,t.jsx)("input",{type:n,"data-slot":"input",className:(0,r.f)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...o})}])},677572,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(981140),o=e.i(30030),a=e.i(842727),i=e.i(296626),s=e.i(248425),l=e.i(586318),u=e.i(369340),f=e.i(610772),c=Object.defineProperty,d=(e,t)=>c(e,"name",{value:t,configurable:!0}),p="Tabs",[h,g]=(0,o.f)(p,[a.B]),m=(0,a.B)(),[y,v]=h(p),b=r.forwardRef(d(function(e,r){let{__scopeTabs:n,value:o,onValueChange:a,defaultValue:i,orientation:c="horizontal",dir:d,activationMode:h="automatic",...g}=e,m=(0,l.f)(d),[v,b]=(0,u.f)({prop:o,onChange:a,defaultProp:i??"",caller:p});return(0,t.jsx)(y,{scope:n,baseId:(0,f.f)(),value:v,onValueChange:b,orientation:c,dir:m,activationMode:h,children:(0,t.jsx)(s.V.div,{dir:m,"data-orientation":c,...g,ref:r})})},"Tabs")),x=r.forwardRef(d(function(e,r){let{__scopeTabs:n,loop:o=!0,...i}=e,l=v("TabsList",n),u=m(n);return(0,t.jsx)(a.F,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:o,children:(0,t.jsx)(s.V.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:r})})},"TabsList")),w=r.forwardRef(d(function(e,r){let{__scopeTabs:o,value:i,disabled:l=!1,...u}=e,f=v("TabsTrigger",o),c=m(o),d=j(f.baseId,i),p=M(f.baseId,i),h=i===f.value;return(0,t.jsx)(a.M,{asChild:!0,...c,focusable:!l,active:h,children:(0,t.jsx)(s.V.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":p,"data-state":h?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:d,...u,ref:r,onMouseDown:(0,n.f)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():(e.currentTarget.focus(),f.onValueChange(i))}),onKeyDown:(0,n.f)(e.onKeyDown,e=>{!l&&e.target===e.currentTarget&&[" ","Enter"].includes(e.key)&&f.onValueChange(i)}),onFocus:(0,n.f)(e.onFocus,()=>{let e="manual"!==f.activationMode;h||l||!e||f.onValueChange(i)})})})},"TabsTrigger")),k=r.forwardRef(d(function(e,n){let{__scopeTabs:o,value:a,forceMount:l,children:u,...f}=e,c=v("TabsContent",o),d=j(c.baseId,a),p=M(c.baseId,a),h=a===c.value,g=r.useRef(h);return r.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(i.f,{present:l||h,children:({present:r})=>(0,t.jsx)(s.V.div,{"data-state":h?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!r,id:p,tabIndex:0,...f,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:r&&u})})},"TabsContent"));function j(e,t){return`${e}-trigger-${t}`}function M(e,t){return`${e}-content-${t}`}d(j,"makeTriggerId"),d(M,"makeContentId");var R=e.i(975157);let D=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(x,{ref:n,className:(0,R.f)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...r}));D.displayName=x.displayName;let C=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(w,{ref:n,className:(0,R.f)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...r}));C.displayName=w.displayName;let P=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(k,{ref:n,className:(0,R.f)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r}));P.displayName=k.displayName,e.s(["i",0,b,"S",0,P,"U",0,D,"k",0,C],677572)},81968,446513,e=>{e.s(["f",0,function(){return window.WrongNotebookAndroid??null}],81968);var t=e.i(456420);let r={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],446513)},637691,e=>{e.s(["f",0,"https://github.com/margrop/wrong-notebook"])},905110,e=>{let t=["new","reviewing","mastered"];e.s(["z",0,50,"o",0,100,"P",0,1,"m",0,function(e,t=50){return"number"==typeof e&&e>=t/100},"A",0,function(e){return"string"==typeof e&&t.includes(e)}])}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,314381,3198,e=>{var t=e.i(456420);let r={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],314381);var i=e.i(843476),a=e.i(271645),o=e.i(632781);let s={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};s.node;let l=(0,t.f)(s),h={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};h.node;let c=(0,t.f)(h);var d=e.i(395925),u=e.i(741120),m=e.i(759659),g=e.i(519455),p=e.i(111110),f=e.i(294114),w=e.i(201276),x=e.i(113381);let y=null;function b(e,t,r){let n=e?.firstElementChild;n&&(n.style.width="100%",n.style.height=`${r}px`,t?.setSize(e?.offsetWidth||n.offsetWidth||800,r))}function v(e,t){let r=(0,x.L)(e,t);for(let e of r)w.V.warn("[GGB]","命令执行失败",{...e});return r.map(e=>e.command+":"+e.message).join("\n")||void 0}e.s(["f",0,function({commands:e,height:t=700,showToolBar:r=!1,showAlgebraInput:n=!1,showMenuBar:s=!1,className:h="",onRegenerate:C,onDelete:j}){let{t:k}=(0,p.b)(),D=(0,a.useRef)(null),E=(0,a.useRef)(null),M=(0,a.useRef)(void 0),N=(0,a.useId)(),R=(0,a.useRef)(`ggb-${N.replace(/[^a-zA-Z0-9_-]/g,"")}`),[S,L]=(0,a.useState)(!0),[I,_]=(0,a.useState)(null),[P,$]=(0,a.useState)(!0),[H,A]=(0,a.useState)(!1),[z,B]=(0,a.useState)(!1),Y=(0,a.useMemo)(()=>(0,x.i)(e),[e]);(0,a.useEffect)(()=>{if(0===Y.length)return;let e=!1,i=R.current,a=D.current;return(y||(y=new Promise((e,t)=>{if(window.GGBApplet)return void e();let r=document.createElement("script");r.src="https://www.geogebra.org/apps/deployggb.js",r.async=!0,r.onload=()=>e(),r.onerror=()=>{y=null,t(Error("Failed to load GeoGebra"))},document.head.appendChild(r)}))).then(()=>{if(e)return;let o=window.GGBApplet;if(!o){_(k.geogebra.notLoaded),L(!1);return}if(a){a.innerHTML=`<div id="${i}" style="width:100%;height:${t}px"></div>`;try{new o({appName:"classic",width:"100%",height:t,showToolBar:r,showAlgebraInput:n,showMenuBar:s,showResetIcon:!0,enableRightClick:!0,enableShiftDragZoom:!0,language:"zh",appletOnLoad:r=>{e||(E.current=r,b(a,r,t),M.current=v(r,Y),L(!1))}},!0).inject(i)}catch(t){w.V.error("[GGB]","Init failed",{error:t}),e||(_(k.geogebra.initFailed),L(!1))}}}).catch(t=>{w.V.error("[GGB]","Script load failed",{error:t}),e||(_(k.geogebra.scriptFailed),L(!1))}),()=>{e=!0;try{let e=E.current;e?.remove&&e.remove()}catch(e){w.V.warn("[GGB]","Cleanup failed",{error:e})}E.current=null,a&&(a.innerHTML="")}},[Y,r,n,s]),(0,a.useEffect)(()=>{b(D.current,E.current,P?700:t)},[P,t]);let X=(0,a.useCallback)(()=>{let e=E.current;if(e)try{e.resetConstruction(),setTimeout(()=>{E.current&&(M.current=v(E.current,Y))},300)}catch(e){w.V.warn("[GGB]","Reset failed",{error:e})}},[Y]),O=(0,a.useCallback)(async()=>{if(C&&!H){A(!0);try{await C(M.current)}finally{A(!1)}}},[C,H]),U=(0,a.useCallback)(async()=>{if(j&&!z&&await (0,f.u)(k.geogebra.confirmDelete,{destructive:!0})){B(!0);try{await j()}catch{f.c.error(k.geogebra.deleteFailed)}finally{B(!1)}}},[j,z,k]);return 0===Y.length?null:(0,i.jsxs)("div",{className:`relative rounded-lg border bg-card ${h}`,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-muted/30",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:k.geogebra.title}),S&&(0,i.jsx)(o.f,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[C&&(0,i.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:O,title:k.geogebra.regenerate,disabled:H||S,children:[H?(0,i.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,i.jsx)(u.f,{className:"h-3.5 w-3.5"}),(0,i.jsx)("span",{children:k.geogebra.regenerate})]}),j&&(0,i.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1 text-destructive hover:text-destructive",onClick:U,title:k.geogebra.delete,disabled:z||H,children:[z?(0,i.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,i.jsx)(m.f,{className:"h-3.5 w-3.5"}),(0,i.jsx)("span",{children:k.geogebra.delete})]}),(0,i.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:X,title:k.geogebra.reset,disabled:S,children:(0,i.jsx)(d.f,{className:"h-3.5 w-3.5"})}),(0,i.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>$(e=>!e),title:P?k.geogebra.shrink:k.geogebra.enlarge,children:P?(0,i.jsx)(c,{className:"h-3.5 w-3.5"}):(0,i.jsx)(l,{className:"h-3.5 w-3.5"})})]})]}),(0,i.jsx)("div",{ref:D,style:{width:"100%"}}),S&&(0,i.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/80 rounded-b-lg",style:{top:37},children:(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,i.jsx)(o.f,{className:"h-6 w-6 animate-spin text-primary"}),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:k.geogebra.loading})]})}),I&&(0,i.jsx)("div",{className:"flex items-center justify-center text-sm text-destructive",style:{minHeight:t},children:I})]})}],3198)},856522,e=>{var t=e.i(456420);let r={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],856522)},786563,e=>{var t=e.i(456420);let r={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],786563)},232660,213761,e=>{var t=e.i(271645),r={x:0,y:0,width:0,height:0,unit:"px"},n=(e,t,r)=>Math.min(Math.max(e,t),r),i=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function a(e,t,n){return"%"===e.unit?{...r,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function o(e,t,n){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...r,...e,unit:"px"}}function s(e,t,r,n,i,a=0,o=0,l=n,h=i){let c={...e},d=Math.min(a,n),u=Math.min(o,i),m=Math.min(l,n),g=Math.min(h,i);t&&(t>1?(u=(d=o?o*t:d)/t,m=l*t):(d=(u=a?a/t:u)*t,g=h/t)),c.y<0&&(c.height=Math.max(c.height+c.y,u),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,d),c.x=0);let p=n-(c.x+c.width);p<0&&(c.x=Math.min(c.x,n-d),c.width+=p);let f=i-(c.y+c.height);if(f<0&&(c.y=Math.min(c.y,i-u),c.height+=f),c.width<d&&(("sw"===r||"nw"==r)&&(c.x-=d-c.width),c.width=d),c.height<u&&(("nw"===r||"ne"==r)&&(c.y-=u-c.height),c.height=u),c.width>m&&(("sw"===r||"nw"==r)&&(c.x-=m-c.width),c.width=m),c.height>g&&(("nw"===r||"ne"==r)&&(c.y-=g-c.height),c.height=g),t){let e=c.width/c.height;if(e<t){let e=Math.max(c.width/t,u);("nw"===r||"ne"==r)&&(c.y-=e-c.height),c.height=e}else if(e>t){let e=Math.max(c.height*t,d);("sw"===r||"nw"==r)&&(c.x-=e-c.width),c.width=e}}return c}var l={capture:!0,passive:!1},h=0,c=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${h++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:r,width:n,height:i}=e.getBoundingClientRect();return{x:t,y:r,width:n,height:i}}componentDidUpdate(e){let{crop:t,onComplete:r}=this.props;if(r&&!e.crop&&t){let{width:e,height:n}=this.getBox();e&&n&&r(o(t,e,n),a(t,e,n))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,l),this.document.addEventListener("pointerup",this.onDocPointerDone,l),this.document.addEventListener("pointercancel",this.onDocPointerDone,l),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,l),this.document.removeEventListener("pointerup",this.onDocPointerDone,l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,l),!1)}onCropPointerDown=e=>{let{crop:t,disabled:r}=this.props,n=this.getBox();if(!t)return;let i=o(t,n.width,n.height);if(r)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,s=e.clientX,l=e.clientY,h=i.x,c=i.y;if(a){let t=e.clientX-n.x,r=e.clientY-n.y,o=0,d=0;"ne"===a||"e"==a?(o=t-(i.x+i.width),d=r-i.y,h=i.x,c=i.y+i.height):"se"===a||"s"===a?(o=t-(i.x+i.width),d=r-(i.y+i.height),h=i.x,c=i.y):"sw"===a||"w"==a?(o=t-i.x,d=r-(i.y+i.height),h=i.x+i.width,c=i.y):("nw"===a||"n"==a)&&(o=t-i.x,d=r-i.y,h=i.x+i.width,c=i.y+i.height),s=h+n.x+o,l=c+n.y+d}this.evData={startClientX:s,startClientY:l,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!!a,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:r,locked:n,keepSelection:i,onChange:s}=this.props,l=this.getBox();if(r||n||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.clientX-l.x,c=e.clientY-l.y,d={unit:"px",x:h,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,s(o(d,l.width,l.height),a(d,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:r,disabled:n,onChange:s,onDragStart:l}=this.props,h=this.getBox();if(n||!r||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,l&&l(e));let{evData:c}=this;c.clientX=e.clientX,c.clientY=e.clientY,i(r,t=c.isResize?this.resizeCrop():this.dragCrop())||s(o(t,h.width,h.height),a(t,h.width,h.height))};onComponentKeyDown=t=>{let{crop:r,disabled:i,onChange:s,onComplete:l}=this.props;if(i)return;let h=t.key,c=!1;if(!r)return;let d=this.getBox(),u=this.makePixelCrop(d),m=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===h?(u.x-=m,c=!0):"ArrowRight"===h?(u.x+=m,c=!0):"ArrowUp"===h?(u.y-=m,c=!0):"ArrowDown"===h&&(u.y+=m,c=!0),c){t.cancelable&&t.preventDefault(),u.x=n(u.x,0,d.width-u.width),u.y=n(u.y,0,d.height-u.height);let e=o(u,d.width,d.height),r=a(u,d.width,d.height);s(e,r),l&&l(e,r)}};onHandlerKeyDown=(t,r)=>{var n,l;let h,{aspect:c=0,crop:d,disabled:u,minWidth:m=0,minHeight:g=0,maxWidth:p,maxHeight:f,onChange:w,onComplete:x}=this.props,y=this.getBox();if(u||!d||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let b=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,v=s((n=o(d,y.width,y.height),l=t.key,h={...n},"ArrowLeft"===l?"nw"===r?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"w"===r?(h.x-=b,h.width+=b):"sw"===r?(h.x-=b,h.width+=b,h.height+=b):"ne"===r?(h.y+=b,h.width-=b,h.height-=b):"e"===r?h.width-=b:"se"===r&&(h.width-=b,h.height-=b):"ArrowRight"===l&&("nw"===r?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"w"===r?(h.x+=b,h.width-=b):"sw"===r?(h.x+=b,h.width-=b,h.height-=b):"ne"===r?(h.y-=b,h.width+=b,h.height+=b):"e"===r?h.width+=b:"se"===r&&(h.width+=b,h.height+=b)),"ArrowUp"===l?"nw"===r?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"n"===r?(h.y-=b,h.height+=b):"ne"===r?(h.y-=b,h.width+=b,h.height+=b):"sw"===r?(h.x+=b,h.width-=b,h.height-=b):"s"===r?h.height-=b:"se"===r&&(h.width-=b,h.height-=b):"ArrowDown"===l&&("nw"===r?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"n"===r?(h.y+=b,h.height-=b):"ne"===r?(h.y+=b,h.width-=b,h.height-=b):"sw"===r?(h.x-=b,h.width+=b,h.height+=b):"s"===r?h.height+=b:"se"===r&&(h.width+=b,h.height+=b)),h),c,r,y.width,y.height,m,g,p,f);if(!i(d,v)){let e=a(v,y.width,y.height);w(v,e),x&&x(v,e)}};onDocPointerDone=e=>{let{crop:t,disabled:r,onComplete:n,onDragEnd:i}=this.props,s=this.getBox();this.unbindDocMove(),!(r||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),n&&n(o(t,s.width,s.height),a(t,s.width,s.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),r=this.makePixelCrop(t),i=e.clientX-e.startClientX,a=e.clientY-e.startClientY;return r.x=n(e.startCropX+i,0,t.width-r.width),r.y=n(e.startCropY+a,0,t.height-r.height),r}getPointRegion(e,t,r,n){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;return s=n&&t?"nw"===t||"n"===t||"ne"===t:o<i.startCropY,(r&&t?"nw"===t||"w"===t||"sw"===t:a<i.startCropX)?s?"nw":"sw":s?"ne":"se"}resolveMinDimensions(e,t,r=0,n=0){let i=Math.min(r,e.width),a=Math.min(n,e.height);return t&&(i||a)?t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]:[i,a]}resizeCrop(){let{evData:t}=this,{aspect:r=0,maxWidth:i,maxHeight:a}=this.props,o=this.getBox(),[l,h]=this.resolveMinDimensions(o,r,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(o),d=this.getPointRegion(o,t.ord,l,h),u=t.ord||d,m=t.clientX-t.startClientX,g=t.clientY-t.startClientY;(l&&"nw"===u||"w"===u||"sw"===u)&&(m=Math.min(m,-l)),(h&&"nw"===u||"n"===u||"ne"===u)&&(g=Math.min(g,-h));let p={unit:"px",x:0,y:0,width:0,height:0};"ne"===d?(p.x=t.startCropX,p.width=m,r?p.height=p.width/r:p.height=Math.abs(g),p.y=t.startCropY-p.height):"se"===d?(p.x=t.startCropX,p.y=t.startCropY,p.width=m,r?p.height=p.width/r:p.height=g):"sw"===d?(p.x=t.startCropX+m,p.y=t.startCropY,p.width=Math.abs(m),r?p.height=p.width/r:p.height=g):"nw"===d&&(p.x=t.startCropX+m,p.width=Math.abs(m),r?(p.height=p.width/r,p.y=t.startCropY-p.height):(p.height=Math.abs(g),p.y=t.startCropY+g));let f=s(p,r,d,o.width,o.height,l,h,i,a);return r||e.xyOrds.indexOf(u)>-1?c=f:e.xOrds.indexOf(u)>-1?(c.x=f.x,c.width=f.width):e.yOrds.indexOf(u)>-1&&(c.y=f.y,c.height=f.height),c.x=n(c.x,0,o.width-c.width),c.y=n(c.y,0,o.height-c.height),c}renderCropSelection(){let{ariaLabels:r=e.defaultProps.ariaLabels,disabled:n,locked:i,renderSelectionAddon:a,ruleOfThirds:o,crop:s}=this.props,l=this.getCropStyle();if(s)return t.default.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":r.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!i&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":r.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":r.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":r.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":r.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":r.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":r.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":r.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":r.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),a&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},a(this.state)),o&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return o({...r,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:r,circularCrop:n,className:i,crop:a,disabled:o,locked:s,style:l,ruleOfThirds:h}=this.props,{cropIsActive:c,newCropIsBeingDrawn:d}=this.state,u=a?this.renderCropSelection():null,m=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",i,c&&"ReactCrop--active",o&&"ReactCrop--disabled",s&&"ReactCrop--locked",d&&"ReactCrop--new-crop",a&&e&&"ReactCrop--fixed-aspect",a&&n&&"ReactCrop--circular-crop",a&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&a&&!a.width&&!a.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:m,style:l},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},r),a?t.default.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.default.createElement("defs",null,t.default.createElement("mask",{id:`hole-${this.instanceId}`},t.default.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?t.default.createElement("ellipse",{cx:`${a.x+a.width/2}${a.unit}`,cy:`${a.y+a.height/2}${a.unit}`,rx:`${a.width/2}${a.unit}`,ry:`${a.height/2}${a.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${a.x}${a.unit}`,y:`${a.y}${a.unit}`,width:`${a.width}${a.unit}`,height:`${a.height}${a.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};e.s(["f",0,c],232660);let d={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class u extends Error{code;format;constructor(e,t,r){super(e,void 0===r?void 0:{cause:r}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let m=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),g=new Set(["mif1","msf1","mif2"]),p=new Set(["avif","avis"]);function f(e,t,r=d){let n=Math.min(1,r.maxLongEdge/Math.max(e,t),Math.sqrt(r.maxPixels/Math.max(1,e*t)));return{width:Math.max(1,Math.floor(e*n)),height:Math.max(1,Math.floor(t*n)),scale:n}}async function w(e){let t,r;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let n=await (t=URL.createObjectURL(e),(r=new Image).decoding="async",new Promise((e,n)=>{r.onload=()=>e(r),r.onerror=()=>n(Error("IMAGE_ELEMENT_DECODE_FAILED")),r.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!n.naturalWidth||!n.naturalHeight)throw Error("IMAGE_EMPTY");return n}async function x(t){let{heicTo:r}=await e.A(462684);return r({blob:t,type:"image/jpeg",quality:.95})}function y(e,t){return new Promise((r,n)=>{e.toBlob(e=>e?r(e):n(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function b(e,t,r,n,i,a,o){let s,l=((s=document.createElement("canvas")).width=a,s.height=o,s),h=l.getContext("2d");if(!h)throw Error("CANVAS_UNSUPPORTED");return h.fillStyle="#ffffff",h.fillRect(0,0,a,o),h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(e,t,r,n,i,0,0,a,o),l}async function v(e,t){var r;let n,i=performance.now(),a=await e.arrayBuffer(),o=performance.now()-i,s=function(e){let t=(t,r)=>String.fromCharCode(...e.subarray(t,r));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let r=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),n=[t(8,12)];for(let e=16;e+4<=r;e+=4)n.push(t(e,e+4));if(n.some(e=>m.has(e)))return"heic";if(n.some(e=>p.has(e)))return"avif";if(n.some(e=>g.has(e)))return"heic"}return"unknown"}(new Uint8Array(a,0,Math.min(a.byteLength,64))),l=e.type||"",h=performance.now(),c="native",d=new Blob([a],{type:l||"application/octet-stream"});try{n=await w(d)}catch(e){if("heic"!==s)throw new u("unknown"===s?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",s,e);t?.();try{n=await w(await x(d)),c="heic"}catch(e){throw new u("HEIC_DECODE_FAILED",s,e)}}let{width:v,height:C}=(r=n)instanceof HTMLImageElement?{width:r.naturalWidth,height:r.naturalHeight}:{width:r.width,height:r.height};if(!v||!C)throw new u("IMAGE_DECODE_FAILED",s);let j=f(v,C,{maxLongEdge:1600,maxPixels:1/0}),k=await y(b(n,0,0,v,C,j.width,j.height),.85),D=URL.createObjectURL(k),E=performance.now()-h;return{source:n,width:v,height:C,format:s,decoder:c,previewUrl:D,sourceType:l,sourceBytes:e.size,timings:{read:Math.round(o),convert:Math.round(E)},dispose:()=>{URL.revokeObjectURL(D),n instanceof HTMLImageElement||n.close()}}}let C={x:0,y:0,width:1,height:1};async function j(e,t=C,r=d){var n;let i=performance.now(),a=e=>Math.min(1,Math.max(0,e)),o=Math.round(a(t.x)*e.width),s=Math.round(a(t.y)*e.height),l=Math.max(1,Math.min(e.width-o,Math.round(a(t.width)*e.width))),h=Math.max(1,Math.min(e.height-s,Math.round(a(t.height)*e.height))),c=f(l,h,r),u=b(e.source,o,s,l,h,c.width,c.height),m=performance.now()-i,g=performance.now(),p=r.startQuality,w=await y(u,p);for(let t=0;w.size>r.maxBytes&&t<12;t++)p-.05>=r.minQuality-1e-9?p=Math.round((p-.05)*100)/100:(c={width:Math.max(1,Math.floor(.85*c.width)),height:Math.max(1,Math.floor(.85*c.height)),scale:.85*c.scale},u=b(e.source,o,s,l,h,c.width,c.height)),w=await y(u,p);return{dataUrl:await (n=w,new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=()=>t(r.error??Error("READ_FAILED")),r.readAsDataURL(n)})),width:c.width,height:c.height,bytes:w.size,quality:p,timings:{crop:Math.round(m),compress:Math.round(performance.now()-g)}}}e.s(["o",0,u,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,v,"X",0,j],213761)},469937,e=>{var t=e.i(843476),r=e.i(786563),n=e.i(111110),i=e.i(975157);let a=[1,2,3,4,5];e.s(["f",0,function({value:e,onChange:o,disabled:s,size:l="sm",showUnrated:h=!0,className:c}){let{t:d}=(0,n.b)(),u=e??0,m="sm"===l?"h-3.5 w-3.5":"h-5 w-5",g=u?d.difficulty.starsLabel.replace("{n}",String(u)):d.difficulty.unrated;return o?(0,t.jsxs)("span",{className:(0,i.f)("inline-flex items-center gap-0.5",c),role:"group","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:d.difficulty.clearHint,children:[a.map(e=>(0,t.jsx)("button",{type:"button",disabled:s,onClick:()=>o(e===u?null:e),"aria-label":d.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=u,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(r.f,{className:(0,i.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!u&&h&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:d.difficulty.unrated})]}):u?(0,t.jsx)("span",{className:(0,i.f)("inline-flex items-center",c),role:"img","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:g,children:a.map(e=>(0,t.jsx)(r.f,{className:(0,i.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):h?(0,t.jsx)("span",{className:(0,i.f)("text-xs text-muted-foreground",c),children:d.difficulty.unrated}):null}])},12130,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(232660),i=e.i(519455),a=e.i(776639),o=e.i(263676),s=e.i(111110);async function l(e,t){let{naturalWidth:r,naturalHeight:n}=e;return Promise.all(t.map(t=>new Promise((i,a)=>{let o=document.createElement("canvas"),s=Math.round(t.x*r),l=Math.round(t.y*n);o.width=Math.max(1,Math.round(t.width*r)),o.height=Math.max(1,Math.round(t.height*n));let h=o.getContext("2d");h?(h.drawImage(e,s,l,o.width,o.height,0,0,o.width,o.height),o.toBlob(e=>e?i(e):a(Error("Canvas is empty")),"image/jpeg",.95)):a(Error("Canvas is not supported"))})))}let h={maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},c=(0,r.forwardRef)(function({imageSrc:e,regions:n,onChange:i,imageStyle:a=h,onImageLoad:l},c){let{t:d}=(0,s.b)(),u=(0,r.useRef)(null),m=(0,r.useRef)(null),[g,p]=(0,r.useState)(null),f=e=>{let t=u.current.getBoundingClientRect();return{x:(e.clientX-t.left)/t.width,y:(e.clientY-t.top)/t.height}},w=()=>{g&&g.width>=.02&&g.height>=.02&&i([...n,g]),m.current=null,p(null)},x=e=>({left:`${100*e.x}%`,top:`${100*e.y}%`,width:`${100*e.width}%`,height:`${100*e.height}%`});return(0,t.jsxs)("div",{className:"relative inline-block select-none",children:[(0,t.jsx)("img",{ref:c,src:e,alt:"",draggable:!1,style:a,onLoad:l,className:"block"}),(0,t.jsxs)("div",{ref:u,className:"absolute inset-0 cursor-crosshair",style:{touchAction:"none"},onPointerDown:e=>{0===e.button&&(u.current?.setPointerCapture(e.pointerId),m.current=f(e),p(null))},onPointerMove:e=>{var t,r,n,i;let a,o,s;if(!m.current)return;let l=f(e);p((t=m.current.x,r=m.current.y,n=l.x,i=l.y,o=(a=e=>Math.min(1,Math.max(0,e)))(Math.min(t,n)),s=a(Math.min(r,i)),{x:o,y:s,width:a(Math.max(t,n))-o,height:a(Math.max(r,i))-s}))},onPointerUp:w,onPointerCancel:w,children:[n.map((e,r)=>(0,t.jsxs)("div",{className:"absolute border-2 border-sky-400 bg-sky-400/15",style:x(e),children:[(0,t.jsx)("span",{className:"absolute left-0 top-0 bg-sky-500 px-1.5 text-xs font-bold text-white",children:r+1}),(0,t.jsx)("button",{type:"button",className:"absolute -right-3 -top-3 flex h-6 w-6 items-center justify-center rounded-full bg-red-500 text-white shadow","aria-label":d.batchImport.removeRegion.replace("{index}",String(r+1)),onPointerDown:e=>e.stopPropagation(),onClick:()=>i(n.filter((e,t)=>t!==r)),children:(0,t.jsx)(o.X,{className:"h-3 w-3"})})]},r)),g&&(0,t.jsx)("div",{className:"absolute border-2 border-dashed border-yellow-300 bg-yellow-300/10",style:x(g)})]})]})});var d=e.i(456420);let u={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};u.node;let m=(0,d.f)(u),g={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};g.node;let p=(0,d.f)(g);function f({zoom:e,onZoomIn:r,onZoomOut:n,onReset:i}){let{t:a}=(0,s.b)(),o="outline-none focus-visible:ring-2 focus-visible:ring-white/70",l=`flex h-9 w-9 items-center justify-center rounded-full text-white transition-colors hover:bg-white/20 disabled:opacity-40 disabled:hover:bg-transparent ${o}`;return(0,t.jsxs)("div",{className:"flex items-center gap-0.5 rounded-full bg-black/60 p-1 shadow-lg backdrop-blur-sm",children:[(0,t.jsx)("button",{type:"button",className:l,onClick:n,disabled:e<=1,"aria-label":a.common.cropper.zoomOut,title:a.common.cropper.zoomOut,children:(0,t.jsx)(p,{className:"h-4 w-4"})}),(0,t.jsxs)("button",{type:"button",className:`h-9 min-w-14 rounded-full px-2 text-center text-xs font-medium tabular-nums text-white hover:bg-white/20 ${o}`,onClick:i,"aria-label":a.common.cropper.resetZoom,title:a.common.cropper.resetZoom,children:[Math.round(100*e),"%"]}),(0,t.jsx)("button",{type:"button",className:l,onClick:r,disabled:e>=5,"aria-label":a.common.cropper.zoomIn,title:a.common.cropper.zoomIn,children:(0,t.jsx)(m,{className:"h-4 w-4"})})]})}var w=e.i(201276);let x={single:{maxHeight:"70vh",maxWidth:"100%",objectFit:"contain"},auto:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},multi:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"}};e.s(["f",0,function({imageSrc:e,open:o,onClose:h,onCropComplete:d,onMultiCropComplete:u,onRegionsSelected:m,allowMulti:g=!0,onAutoSplit:p,onAddPart:y,partCount:b=0}){let{t:v}=(0,s.b)(),C=/^(blob:|data:image\/)/i.test(e)?e:void 0,[j,k]=(0,r.useState)(),D=(0,r.useRef)(null),[E,M]=(0,r.useState)("single"),{containerRef:N,zoom:R,imageStyle:S,measureImage:L,zoomIn:I,zoomOut:_,reset:P}=function(e){let[t,n]=(0,r.useState)(null),i=(0,r.useRef)(null),a=(0,r.useCallback)(e=>{i.current=e,n(e)},[]),[o,s]=(0,r.useState)(1),l=(0,r.useRef)(1),[h,c]=(0,r.useState)(null),d=(0,r.useRef)(null),u=(0,r.useRef)(!1),m=(0,r.useCallback)((e,t,r)=>{let n=i.current,a=l.current,o=Math.min(5,Math.max(1,e));if(!n||o===a)return;if(1===a){let e=n.querySelector("img");e&&c(e.clientWidth)}let h=n.getBoundingClientRect(),u=(t??h.left+h.width/2)-h.left,m=(r??h.top+h.height/2)-h.top;d.current={viewX:u,viewY:m,contentX:n.scrollLeft+u,contentY:n.scrollTop+m,ratio:o/a},l.current=o,s(o)},[]);(0,r.useLayoutEffect)(()=>{let e=i.current,t=d.current;e&&t&&(e.scrollLeft=t.contentX*t.ratio-t.viewX,e.scrollTop=t.contentY*t.ratio-t.viewY,d.current=null)},[o]),(0,r.useEffect)(()=>{if(!t)return;let e=e=>{e.preventDefault(),m(l.current*Math.exp(-(.0015*e.deltaY)),e.clientX,e.clientY)},r=null,n=e=>{let[t,r]=[e[0],e[1]];return{distance:Math.hypot(t.clientX-r.clientX,t.clientY-r.clientY),centerX:(t.clientX+r.clientX)/2,centerY:(t.clientY+r.clientY)/2}},i=e=>{2===e.touches.length&&(r={distance:n(e.touches).distance,zoom:l.current},u.current=!0)},a=e=>{if(!r||2!==e.touches.length)return;e.preventDefault();let{distance:t,centerX:i,centerY:a}=n(e.touches);r.distance>0&&m(r.zoom*(t/r.distance),i,a)},o=e=>{e.touches.length<2&&(r=null,u.current=!1)},s=e=>{u.current&&e.stopPropagation()};return t.addEventListener("wheel",e,{passive:!1}),t.addEventListener("touchstart",i,{passive:!0}),t.addEventListener("touchmove",a,{passive:!1}),t.addEventListener("touchend",o),t.addEventListener("touchcancel",o),t.addEventListener("pointermove",s,{capture:!0}),()=>{t.removeEventListener("wheel",e),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",a),t.removeEventListener("touchend",o),t.removeEventListener("touchcancel",o),t.removeEventListener("pointermove",s,{capture:!0})}},[t,m]);let g=(0,r.useCallback)(e=>{e&&1===l.current&&c(e.clientWidth)},[]),p=(0,r.useCallback)(()=>m(1.25*l.current),[m]),f=(0,r.useCallback)(()=>m(l.current/1.25),[m]),w=(0,r.useCallback)(()=>{l.current=1,d.current=null,s(1)},[]),x=1!==o&&h?{...e,width:h*o,height:"auto",maxWidth:"none",maxHeight:"none"}:e;return{containerRef:a,zoom:o,imageStyle:x,measureImage:g,zoomIn:p,zoomOut:f,reset:w}}(x[E]);(0,r.useEffect)(()=>{P()},[e,P]);let[$,H]=(0,r.useState)({src:e,regions:[]}),A=$.src===e?$.regions:[],z=t=>H({src:e,regions:t}),B=(0,r.useRef)(null),Y=["single",...p?["auto"]:[],...u||m&&g?["multi"]:[]],X={single:v.batchImport.singleMode,auto:v.batchImport.autoMode,multi:v.batchImport.multiMode},O=async()=>{if(0!==A.length){if(m){m(A,!0),z([]);return}if(B.current&&u)try{u(await l(B.current,A)),z([])}catch(e){w.V.error("[ImageCropper]","Multi-image crop failed",{error:e})}}},U=()=>j&&j.width>0&&j.height>0?{x:j.x/100,y:j.y/100,width:j.width/100,height:j.height/100}:{x:0,y:0,width:1,height:1},K=async()=>{let e=U();if("auto"===E&&p)return void p(e);if(m)return void m([e],!1);if(D.current&&d)try{let[t]=await l(D.current,[e]);d(t)}catch(e){w.V.error("[ImageCropper]","Crop failed",{error:e})}};return(0,t.jsx)(a.N,{open:o,onOpenChange:e=>!e&&h(),children:(0,t.jsxs)(a.d,{className:"max-w-3xl h-[90vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)(a.s,{className:"p-4 border-b shrink-0",children:(0,t.jsx)(a.F,{children:v.common.cropper?.title||"Crop Image"})}),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1 bg-black",children:[(0,t.jsx)("div",{ref:N,className:"flex h-full w-full overflow-auto p-4",children:(0,t.jsx)("div",{className:"m-auto",children:"multi"===E?(0,t.jsx)(c,{ref:B,imageSrc:C,regions:A,onChange:z,imageStyle:S,onImageLoad:e=>L(e.currentTarget)}):(0,t.jsx)(n.f,{crop:j,onChange:(e,t)=>k(t),children:(0,t.jsx)("img",{ref:D,alt:"Crop me",src:C,onLoad:function(e){k({unit:"%",x:0,y:0,width:100,height:100}),L(e.currentTarget)},style:S})})})}),(0,t.jsx)("div",{className:"absolute right-3 top-3",children:(0,t.jsx)(f,{zoom:R,onZoomIn:I,onZoomOut:_,onReset:P})})]}),(0,t.jsxs)("div",{className:"p-4 border-t bg-background shrink-0 space-y-3",children:[Y.length>1&&(0,t.jsx)("div",{className:`grid gap-1 rounded-md bg-muted p-1 ${3===Y.length?"grid-cols-3 sm:w-[28rem]":"grid-cols-2 sm:w-80"}`,children:Y.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":E===e,onClick:()=>{P(),M(e)},className:`rounded px-2 py-1.5 text-sm font-medium transition-colors ${E===e?"bg-background shadow-sm":"text-muted-foreground"}`,children:X[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"multi"===E?`${v.batchImport.hint} ${v.batchImport.regionCount.replace("{count}",String(A.length))}`:"auto"===E?v.batchImport.autoHint:b>0?v.upload.parts.cropHint.replace("{n}",String(b+1)):v.common.cropper?.hint||"💡 Drag to adjust crop area"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 justify-end",children:["multi"===E&&A.length>0&&(0,t.jsx)(i.f,{variant:"ghost",onClick:()=>z([]),children:v.batchImport.clear}),(0,t.jsx)(i.f,{variant:"outline",onClick:h,children:v.common.cancel||"Cancel"}),"multi"===E?(0,t.jsx)(i.f,{onClick:O,disabled:0===A.length,children:v.batchImport.start.replace("{count}",String(A.length))}):(0,t.jsxs)(t.Fragment,{children:["single"===E&&y&&(0,t.jsx)(i.f,{variant:"secondary",onClick:()=>y(U()),"data-testid":"crop-add-part",children:v.upload.parts.addNext}),(0,t.jsx)(i.f,{onClick:K,children:"auto"===E?v.batchImport.autoStart:b>0?v.upload.parts.confirm.replace("{count}",String(b+1)):v.common.confirm||"Confirm"})]})]})]})]})]})})}],12130)},141176,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(456420);let i={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};i.node;let a=(0,n.f)(i);var o=e.i(772382),s=e.i(511445),l=e.i(624687),h=e.i(111110),c=e.i(975157);e.s(["f",0,function({value:e,onChange:n,className:i,...d}){let{t:u}=(0,h.b)(),[m,g]=(0,r.useState)("source"),p=(0,r.useId)(),f=[{mode:"source",label:u.markdownEditor.source,icon:a},{mode:"preview",label:u.markdownEditor.preview,icon:o.f}];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("div",{role:"tablist","aria-label":u.markdownEditor.modeLabel,className:"flex justify-end",children:(0,t.jsx)("div",{className:"inline-flex rounded-md border bg-muted/40 p-0.5",children:f.map(({mode:e,label:r,icon:n})=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":m===e,"aria-controls":p,onClick:()=>g(e),className:(0,c.f)("flex items-center gap-1 rounded px-2.5 py-1 text-xs transition-colors",m===e?"bg-background font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(n,{className:"h-3.5 w-3.5"}),r]},e))})}),(0,t.jsx)("div",{id:p,role:"tabpanel",children:"source"===m?(0,t.jsx)(l.f,{value:e,onChange:e=>n(e.target.value),className:i,...d}):(0,t.jsx)("div",{className:"min-h-24 cursor-text rounded-md border bg-muted/20 px-3 py-2",onDoubleClick:()=>g("source"),title:u.markdownEditor.doubleClickToEdit,children:e.trim()?(0,t.jsx)(s.f,{content:e}):(0,t.jsx)("p",{className:"text-sm italic text-muted-foreground",children:u.markdownEditor.empty})})})]})}],141176)},438465,674166,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(967489),i=e.i(856423),a=e.i(41931),o=e.i(201276),s=e.i(111110);e.s(["f",0,function({value:e,onChange:l,className:h}){let[c,d]=(0,r.useState)([]),{t:u}=(0,s.b)();return(0,r.useEffect)(()=>{(async()=>{try{let e=await a.k.get("/api/notebooks");d(e)}catch(e){o.V.error("[NotebookSelector]","Failed to fetch notebooks",{error:e})}})()},[]),(0,t.jsxs)(n.d,{value:e,onValueChange:l,children:[(0,t.jsx)(n.P,{className:h,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.f,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)(n.U,{placeholder:u.notebooks?.selector?.placeholder||"Select Notebook"})]})}),(0,t.jsx)(n.r,{children:0===c.length?(0,t.jsx)("div",{className:"p-2 text-sm text-muted-foreground text-center",children:u.notebooks?.selector?.empty||"No notebooks available"}):c.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],438465);var l=e.i(664030);e.s(["f",0,function({value:e,onChange:r,disabled:i}){let{groups:a,loading:o}=(0,l.f)(),s=a.filter(e=>e.isActive);return(0,t.jsxs)(n.d,{value:e,onValueChange:r,disabled:i||o,children:[(0,t.jsx)(n.P,{children:(0,t.jsx)(n.U,{placeholder:"选择卷别"})}),(0,t.jsx)(n.r,{children:s.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],674166)},149704,e=>{var t=e.i(843476),r=e.i(111110),n=e.i(398019),i=e.i(184110),a=e.i(975157);let o={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:s,align:l,className:h}){let{t:c}=(0,r.b)();if(!e)return null;let d=(0,i.V)(s),u=(0,i.o)(l);return(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",h),children:(0,t.jsx)("img",{src:(0,n.f)(e),alt:c.figure.alt,className:(0,a.f)(o[u],"block h-auto max-w-full rounded border bg-white p-2"),style:{..."left"===u?{marginLeft:0,marginRight:"auto"}:"right"===u?{marginLeft:"auto",marginRight:0}:{},maxHeight:360,zoom:d/100,maxWidth:`${Math.min(d,100)}%`}})})}])},574041,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(263676),i=e.i(487486),a=e.i(793479),o=e.i(41931),s=e.i(201276);e.s(["f",0,function({value:e=[],onChange:l,placeholder:h="Enter tags...",className:c="",enterHint:d,subject:u,gradeStage:m}){let[g,p]=(0,r.useState)(""),[f,w]=(0,r.useState)([]),[x,y]=(0,r.useState)(!1),[b,v]=(0,r.useState)(0),C=(0,r.useRef)(null),j=(0,r.useRef)(null),k=(0,r.useCallback)(async t=>{try{let r=new URLSearchParams({q:t});u&&r.append("subject",u),m&&r.append("stage",m);let n=((await o.k.get(`/api/tags/suggestions?${r.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));w(n.slice(0,20)),y(n.length>0),v(0)}catch(e){s.V.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[u,m,e]);(0,r.useEffect)(()=>{g.trim()&&k(g)},[g,k]);let D=t=>{t.trim()&&!e.includes(t.trim())&&(l([...e,t.trim()]),p(""),w([]),y(!1),v(0))},E=t=>{l(e.filter(e=>e!==t))};return(0,r.useEffect)(()=>{let e=e=>{!j.current||j.current.contains(e.target)||C.current?.contains(e.target)||y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${c}`,children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 p-2 border rounded-lg bg-background min-h-[42px]",children:[e.map(e=>(0,t.jsxs)(i.f,{variant:"secondary",className:"flex items-center gap-1 px-2 py-1",children:[e,(0,t.jsx)("button",{type:"button",onClick:()=>E(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(n.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(a.f,{ref:C,type:"text",value:g,onChange:e=>{p(e.target.value),e.target.value.trim()||(w([]),y(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),b>=0&&f[b]?D(f[b]):g.trim()&&D(g)):"ArrowDown"===t.key?(t.preventDefault(),v(e=>Math.min(e+1,f.length-1))):"ArrowUp"===t.key?(t.preventDefault(),v(e=>Math.max(e-1,0))):"Escape"===t.key?(y(!1),v(0)):"Backspace"===t.key&&!g&&e.length>0&&E(e[e.length-1])},onFocus:()=>{f.length>0&&y(!0)},placeholder:0===e.length?h:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),x&&f.length>0&&(0,t.jsx)("div",{ref:j,className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-md max-h-48 overflow-y-auto",children:f.map((e,r)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${r===b?"bg-accent":""}`,onClick:()=>D(e),onMouseEnter:()=>v(r),children:e},e))}),g&&!x&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:d?`${d} "${g}"`:`Press Enter to create "${g}"`})]})}])},184110,e=>{let t=["left","center","right"],r="center";function n(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,r,"n",0,100,"j",0,t,"a",0,200,"_",0,10,"x",0,n,"o",0,function(e){return"string"==typeof e&&t.includes(e)?e:r},"V",0,function(e){return n(e)?e:100}])},398019,e=>{e.s(["f",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},952122,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])},62825,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,r="zh"){return("en"===r?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,r){return(r||"").trim()?"wrong_attempt":t(e)}])}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,314381,3198,e=>{var t=e.i(456420);let r={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],314381);var i=e.i(843476),a=e.i(271645),o=e.i(632781);let s={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};s.node;let l=(0,t.f)(s),h={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};h.node;let c=(0,t.f)(h);var d=e.i(395925),u=e.i(741120),m=e.i(759659),g=e.i(519455),p=e.i(111110),f=e.i(294114),w=e.i(201276),x=e.i(113381);let y=null;function b(e,t,r){let n=e?.firstElementChild;n&&(n.style.width="100%",n.style.height=`${r}px`,t?.setSize(e?.offsetWidth||n.offsetWidth||800,r))}function v(e,t){let r=(0,x.L)(e,t);for(let e of r)w.V.warn("[GGB]","命令执行失败",{...e});return r.map(e=>e.command+":"+e.message).join("\n")||void 0}e.s(["f",0,function({commands:e,height:t=700,showToolBar:r=!1,showAlgebraInput:n=!1,showMenuBar:s=!1,className:h="",onRegenerate:C,onDelete:j}){let{t:k}=(0,p.b)(),D=(0,a.useRef)(null),E=(0,a.useRef)(null),M=(0,a.useRef)(void 0),N=(0,a.useId)(),R=(0,a.useRef)(`ggb-${N.replace(/[^a-zA-Z0-9_-]/g,"")}`),[S,L]=(0,a.useState)(!0),[I,_]=(0,a.useState)(null),[P,$]=(0,a.useState)(!0),[H,A]=(0,a.useState)(!1),[z,B]=(0,a.useState)(!1),Y=(0,a.useMemo)(()=>(0,x.i)(e),[e]);(0,a.useEffect)(()=>{if(0===Y.length)return;let e=!1,i=R.current,a=D.current;return(y||(y=new Promise((e,t)=>{if(window.GGBApplet)return void e();let r=document.createElement("script");r.src="https://www.geogebra.org/apps/deployggb.js",r.async=!0,r.onload=()=>e(),r.onerror=()=>{y=null,t(Error("Failed to load GeoGebra"))},document.head.appendChild(r)}))).then(()=>{if(e)return;let o=window.GGBApplet;if(!o){_(k.geogebra.notLoaded),L(!1);return}if(a){a.innerHTML=`<div id="${i}" style="width:100%;height:${t}px"></div>`;try{new o({appName:"classic",width:"100%",height:t,showToolBar:r,showAlgebraInput:n,showMenuBar:s,showResetIcon:!0,enableRightClick:!0,enableShiftDragZoom:!0,language:"zh",appletOnLoad:r=>{e||(E.current=r,b(a,r,t),M.current=v(r,Y),L(!1))}},!0).inject(i)}catch(t){w.V.error("[GGB]","Init failed",{error:t}),e||(_(k.geogebra.initFailed),L(!1))}}}).catch(t=>{w.V.error("[GGB]","Script load failed",{error:t}),e||(_(k.geogebra.scriptFailed),L(!1))}),()=>{e=!0;try{let e=E.current;e?.remove&&e.remove()}catch(e){w.V.warn("[GGB]","Cleanup failed",{error:e})}E.current=null,a&&(a.innerHTML="")}},[Y,r,n,s]),(0,a.useEffect)(()=>{b(D.current,E.current,P?700:t)},[P,t]);let X=(0,a.useCallback)(()=>{let e=E.current;if(e)try{e.resetConstruction(),setTimeout(()=>{E.current&&(M.current=v(E.current,Y))},300)}catch(e){w.V.warn("[GGB]","Reset failed",{error:e})}},[Y]),O=(0,a.useCallback)(async()=>{if(C&&!H){A(!0);try{await C(M.current)}finally{A(!1)}}},[C,H]),U=(0,a.useCallback)(async()=>{if(j&&!z&&await (0,f.u)(k.geogebra.confirmDelete,{destructive:!0})){B(!0);try{await j()}catch{f.c.error(k.geogebra.deleteFailed)}finally{B(!1)}}},[j,z,k]);return 0===Y.length?null:(0,i.jsxs)("div",{className:`relative rounded-lg border bg-card ${h}`,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-muted/30",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:k.geogebra.title}),S&&(0,i.jsx)(o.f,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[C&&(0,i.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:O,title:k.geogebra.regenerate,disabled:H||S,children:[H?(0,i.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,i.jsx)(u.f,{className:"h-3.5 w-3.5"}),(0,i.jsx)("span",{children:k.geogebra.regenerate})]}),j&&(0,i.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1 text-destructive hover:text-destructive",onClick:U,title:k.geogebra.delete,disabled:z||H,children:[z?(0,i.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,i.jsx)(m.f,{className:"h-3.5 w-3.5"}),(0,i.jsx)("span",{children:k.geogebra.delete})]}),(0,i.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:X,title:k.geogebra.reset,disabled:S,children:(0,i.jsx)(d.f,{className:"h-3.5 w-3.5"})}),(0,i.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>$(e=>!e),title:P?k.geogebra.shrink:k.geogebra.enlarge,children:P?(0,i.jsx)(c,{className:"h-3.5 w-3.5"}):(0,i.jsx)(l,{className:"h-3.5 w-3.5"})})]})]}),(0,i.jsx)("div",{ref:D,style:{width:"100%"}}),S&&(0,i.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/80 rounded-b-lg",style:{top:37},children:(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,i.jsx)(o.f,{className:"h-6 w-6 animate-spin text-primary"}),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:k.geogebra.loading})]})}),I&&(0,i.jsx)("div",{className:"flex items-center justify-center text-sm text-destructive",style:{minHeight:t},children:I})]})}],3198)},856522,e=>{var t=e.i(456420);let r={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],856522)},786563,e=>{var t=e.i(456420);let r={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],786563)},232660,213761,e=>{var t=e.i(271645),r={x:0,y:0,width:0,height:0,unit:"px"},n=(e,t,r)=>Math.min(Math.max(e,t),r),i=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function a(e,t,n){return"%"===e.unit?{...r,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function o(e,t,n){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...r,...e,unit:"px"}}function s(e,t,r,n,i,a=0,o=0,l=n,h=i){let c={...e},d=Math.min(a,n),u=Math.min(o,i),m=Math.min(l,n),g=Math.min(h,i);t&&(t>1?(u=(d=o?o*t:d)/t,m=l*t):(d=(u=a?a/t:u)*t,g=h/t)),c.y<0&&(c.height=Math.max(c.height+c.y,u),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,d),c.x=0);let p=n-(c.x+c.width);p<0&&(c.x=Math.min(c.x,n-d),c.width+=p);let f=i-(c.y+c.height);if(f<0&&(c.y=Math.min(c.y,i-u),c.height+=f),c.width<d&&(("sw"===r||"nw"==r)&&(c.x-=d-c.width),c.width=d),c.height<u&&(("nw"===r||"ne"==r)&&(c.y-=u-c.height),c.height=u),c.width>m&&(("sw"===r||"nw"==r)&&(c.x-=m-c.width),c.width=m),c.height>g&&(("nw"===r||"ne"==r)&&(c.y-=g-c.height),c.height=g),t){let e=c.width/c.height;if(e<t){let e=Math.max(c.width/t,u);("nw"===r||"ne"==r)&&(c.y-=e-c.height),c.height=e}else if(e>t){let e=Math.max(c.height*t,d);("sw"===r||"nw"==r)&&(c.x-=e-c.width),c.width=e}}return c}var l={capture:!0,passive:!1},h=0,c=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${h++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:r,width:n,height:i}=e.getBoundingClientRect();return{x:t,y:r,width:n,height:i}}componentDidUpdate(e){let{crop:t,onComplete:r}=this.props;if(r&&!e.crop&&t){let{width:e,height:n}=this.getBox();e&&n&&r(o(t,e,n),a(t,e,n))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,l),this.document.addEventListener("pointerup",this.onDocPointerDone,l),this.document.addEventListener("pointercancel",this.onDocPointerDone,l),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,l),this.document.removeEventListener("pointerup",this.onDocPointerDone,l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,l),!1)}onCropPointerDown=e=>{let{crop:t,disabled:r}=this.props,n=this.getBox();if(!t)return;let i=o(t,n.width,n.height);if(r)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,s=e.clientX,l=e.clientY,h=i.x,c=i.y;if(a){let t=e.clientX-n.x,r=e.clientY-n.y,o=0,d=0;"ne"===a||"e"==a?(o=t-(i.x+i.width),d=r-i.y,h=i.x,c=i.y+i.height):"se"===a||"s"===a?(o=t-(i.x+i.width),d=r-(i.y+i.height),h=i.x,c=i.y):"sw"===a||"w"==a?(o=t-i.x,d=r-(i.y+i.height),h=i.x+i.width,c=i.y):("nw"===a||"n"==a)&&(o=t-i.x,d=r-i.y,h=i.x+i.width,c=i.y+i.height),s=h+n.x+o,l=c+n.y+d}this.evData={startClientX:s,startClientY:l,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!!a,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:r,locked:n,keepSelection:i,onChange:s}=this.props,l=this.getBox();if(r||n||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.clientX-l.x,c=e.clientY-l.y,d={unit:"px",x:h,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,s(o(d,l.width,l.height),a(d,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:r,disabled:n,onChange:s,onDragStart:l}=this.props,h=this.getBox();if(n||!r||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,l&&l(e));let{evData:c}=this;c.clientX=e.clientX,c.clientY=e.clientY,i(r,t=c.isResize?this.resizeCrop():this.dragCrop())||s(o(t,h.width,h.height),a(t,h.width,h.height))};onComponentKeyDown=t=>{let{crop:r,disabled:i,onChange:s,onComplete:l}=this.props;if(i)return;let h=t.key,c=!1;if(!r)return;let d=this.getBox(),u=this.makePixelCrop(d),m=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===h?(u.x-=m,c=!0):"ArrowRight"===h?(u.x+=m,c=!0):"ArrowUp"===h?(u.y-=m,c=!0):"ArrowDown"===h&&(u.y+=m,c=!0),c){t.cancelable&&t.preventDefault(),u.x=n(u.x,0,d.width-u.width),u.y=n(u.y,0,d.height-u.height);let e=o(u,d.width,d.height),r=a(u,d.width,d.height);s(e,r),l&&l(e,r)}};onHandlerKeyDown=(t,r)=>{var n,l;let h,{aspect:c=0,crop:d,disabled:u,minWidth:m=0,minHeight:g=0,maxWidth:p,maxHeight:f,onChange:w,onComplete:x}=this.props,y=this.getBox();if(u||!d||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let b=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,v=s((n=o(d,y.width,y.height),l=t.key,h={...n},"ArrowLeft"===l?"nw"===r?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"w"===r?(h.x-=b,h.width+=b):"sw"===r?(h.x-=b,h.width+=b,h.height+=b):"ne"===r?(h.y+=b,h.width-=b,h.height-=b):"e"===r?h.width-=b:"se"===r&&(h.width-=b,h.height-=b):"ArrowRight"===l&&("nw"===r?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"w"===r?(h.x+=b,h.width-=b):"sw"===r?(h.x+=b,h.width-=b,h.height-=b):"ne"===r?(h.y-=b,h.width+=b,h.height+=b):"e"===r?h.width+=b:"se"===r&&(h.width+=b,h.height+=b)),"ArrowUp"===l?"nw"===r?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"n"===r?(h.y-=b,h.height+=b):"ne"===r?(h.y-=b,h.width+=b,h.height+=b):"sw"===r?(h.x+=b,h.width-=b,h.height-=b):"s"===r?h.height-=b:"se"===r&&(h.width-=b,h.height-=b):"ArrowDown"===l&&("nw"===r?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"n"===r?(h.y+=b,h.height-=b):"ne"===r?(h.y+=b,h.width-=b,h.height-=b):"sw"===r?(h.x-=b,h.width+=b,h.height+=b):"s"===r?h.height+=b:"se"===r&&(h.width+=b,h.height+=b)),h),c,r,y.width,y.height,m,g,p,f);if(!i(d,v)){let e=a(v,y.width,y.height);w(v,e),x&&x(v,e)}};onDocPointerDone=e=>{let{crop:t,disabled:r,onComplete:n,onDragEnd:i}=this.props,s=this.getBox();this.unbindDocMove(),!(r||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),n&&n(o(t,s.width,s.height),a(t,s.width,s.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),r=this.makePixelCrop(t),i=e.clientX-e.startClientX,a=e.clientY-e.startClientY;return r.x=n(e.startCropX+i,0,t.width-r.width),r.y=n(e.startCropY+a,0,t.height-r.height),r}getPointRegion(e,t,r,n){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;return s=n&&t?"nw"===t||"n"===t||"ne"===t:o<i.startCropY,(r&&t?"nw"===t||"w"===t||"sw"===t:a<i.startCropX)?s?"nw":"sw":s?"ne":"se"}resolveMinDimensions(e,t,r=0,n=0){let i=Math.min(r,e.width),a=Math.min(n,e.height);return t&&(i||a)?t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]:[i,a]}resizeCrop(){let{evData:t}=this,{aspect:r=0,maxWidth:i,maxHeight:a}=this.props,o=this.getBox(),[l,h]=this.resolveMinDimensions(o,r,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(o),d=this.getPointRegion(o,t.ord,l,h),u=t.ord||d,m=t.clientX-t.startClientX,g=t.clientY-t.startClientY;(l&&"nw"===u||"w"===u||"sw"===u)&&(m=Math.min(m,-l)),(h&&"nw"===u||"n"===u||"ne"===u)&&(g=Math.min(g,-h));let p={unit:"px",x:0,y:0,width:0,height:0};"ne"===d?(p.x=t.startCropX,p.width=m,r?p.height=p.width/r:p.height=Math.abs(g),p.y=t.startCropY-p.height):"se"===d?(p.x=t.startCropX,p.y=t.startCropY,p.width=m,r?p.height=p.width/r:p.height=g):"sw"===d?(p.x=t.startCropX+m,p.y=t.startCropY,p.width=Math.abs(m),r?p.height=p.width/r:p.height=g):"nw"===d&&(p.x=t.startCropX+m,p.width=Math.abs(m),r?(p.height=p.width/r,p.y=t.startCropY-p.height):(p.height=Math.abs(g),p.y=t.startCropY+g));let f=s(p,r,d,o.width,o.height,l,h,i,a);return r||e.xyOrds.indexOf(u)>-1?c=f:e.xOrds.indexOf(u)>-1?(c.x=f.x,c.width=f.width):e.yOrds.indexOf(u)>-1&&(c.y=f.y,c.height=f.height),c.x=n(c.x,0,o.width-c.width),c.y=n(c.y,0,o.height-c.height),c}renderCropSelection(){let{ariaLabels:r=e.defaultProps.ariaLabels,disabled:n,locked:i,renderSelectionAddon:a,ruleOfThirds:o,crop:s}=this.props,l=this.getCropStyle();if(s)return t.default.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":r.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!i&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":r.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":r.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":r.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":r.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":r.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":r.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":r.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":r.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),a&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},a(this.state)),o&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return o({...r,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:r,circularCrop:n,className:i,crop:a,disabled:o,locked:s,style:l,ruleOfThirds:h}=this.props,{cropIsActive:c,newCropIsBeingDrawn:d}=this.state,u=a?this.renderCropSelection():null,m=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",i,c&&"ReactCrop--active",o&&"ReactCrop--disabled",s&&"ReactCrop--locked",d&&"ReactCrop--new-crop",a&&e&&"ReactCrop--fixed-aspect",a&&n&&"ReactCrop--circular-crop",a&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&a&&!a.width&&!a.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:m,style:l},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},r),a?t.default.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.default.createElement("defs",null,t.default.createElement("mask",{id:`hole-${this.instanceId}`},t.default.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?t.default.createElement("ellipse",{cx:`${a.x+a.width/2}${a.unit}`,cy:`${a.y+a.height/2}${a.unit}`,rx:`${a.width/2}${a.unit}`,ry:`${a.height/2}${a.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${a.x}${a.unit}`,y:`${a.y}${a.unit}`,width:`${a.width}${a.unit}`,height:`${a.height}${a.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};e.s(["f",0,c],232660);let d={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class u extends Error{code;format;constructor(e,t,r){super(e,void 0===r?void 0:{cause:r}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let m=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),g=new Set(["mif1","msf1","mif2"]),p=new Set(["avif","avis"]);function f(e,t,r=d){let n=Math.min(1,r.maxLongEdge/Math.max(e,t),Math.sqrt(r.maxPixels/Math.max(1,e*t)));return{width:Math.max(1,Math.floor(e*n)),height:Math.max(1,Math.floor(t*n)),scale:n}}async function w(e){let t,r;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let n=await (t=URL.createObjectURL(e),(r=new Image).decoding="async",new Promise((e,n)=>{r.onload=()=>e(r),r.onerror=()=>n(Error("IMAGE_ELEMENT_DECODE_FAILED")),r.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!n.naturalWidth||!n.naturalHeight)throw Error("IMAGE_EMPTY");return n}async function x(t){let{heicTo:r}=await e.A(462684);return r({blob:t,type:"image/jpeg",quality:.95})}function y(e,t){return new Promise((r,n)=>{e.toBlob(e=>e?r(e):n(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function b(e,t,r,n,i,a,o){let s,l=((s=document.createElement("canvas")).width=a,s.height=o,s),h=l.getContext("2d");if(!h)throw Error("CANVAS_UNSUPPORTED");return h.fillStyle="#ffffff",h.fillRect(0,0,a,o),h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(e,t,r,n,i,0,0,a,o),l}async function v(e,t){var r;let n,i=performance.now(),a=await e.arrayBuffer(),o=performance.now()-i,s=function(e){let t=(t,r)=>String.fromCharCode(...e.subarray(t,r));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let r=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),n=[t(8,12)];for(let e=16;e+4<=r;e+=4)n.push(t(e,e+4));if(n.some(e=>m.has(e)))return"heic";if(n.some(e=>p.has(e)))return"avif";if(n.some(e=>g.has(e)))return"heic"}return"unknown"}(new Uint8Array(a,0,Math.min(a.byteLength,64))),l=e.type||"",h=performance.now(),c="native",d=new Blob([a],{type:l||"application/octet-stream"});try{n=await w(d)}catch(e){if("heic"!==s)throw new u("unknown"===s?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",s,e);t?.();try{n=await w(await x(d)),c="heic"}catch(e){throw new u("HEIC_DECODE_FAILED",s,e)}}let{width:v,height:C}=(r=n)instanceof HTMLImageElement?{width:r.naturalWidth,height:r.naturalHeight}:{width:r.width,height:r.height};if(!v||!C)throw new u("IMAGE_DECODE_FAILED",s);let j=f(v,C,{maxLongEdge:1600,maxPixels:1/0}),k=await y(b(n,0,0,v,C,j.width,j.height),.85),D=URL.createObjectURL(k),E=performance.now()-h;return{source:n,width:v,height:C,format:s,decoder:c,previewUrl:D,sourceType:l,sourceBytes:e.size,timings:{read:Math.round(o),convert:Math.round(E)},dispose:()=>{URL.revokeObjectURL(D),n instanceof HTMLImageElement||n.close()}}}let C={x:0,y:0,width:1,height:1};async function j(e,t=C,r=d){var n;let i=performance.now(),a=e=>Math.min(1,Math.max(0,e)),o=Math.round(a(t.x)*e.width),s=Math.round(a(t.y)*e.height),l=Math.max(1,Math.min(e.width-o,Math.round(a(t.width)*e.width))),h=Math.max(1,Math.min(e.height-s,Math.round(a(t.height)*e.height))),c=f(l,h,r),u=b(e.source,o,s,l,h,c.width,c.height),m=performance.now()-i,g=performance.now(),p=r.startQuality,w=await y(u,p);for(let t=0;w.size>r.maxBytes&&t<12;t++)p-.05>=r.minQuality-1e-9?p=Math.round((p-.05)*100)/100:(c={width:Math.max(1,Math.floor(.85*c.width)),height:Math.max(1,Math.floor(.85*c.height)),scale:.85*c.scale},u=b(e.source,o,s,l,h,c.width,c.height)),w=await y(u,p);return{dataUrl:await (n=w,new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=()=>t(r.error??Error("READ_FAILED")),r.readAsDataURL(n)})),width:c.width,height:c.height,bytes:w.size,quality:p,timings:{crop:Math.round(m),compress:Math.round(performance.now()-g)}}}e.s(["o",0,u,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,v,"X",0,j],213761)},469937,e=>{var t=e.i(843476),r=e.i(786563),n=e.i(111110),i=e.i(975157);let a=[1,2,3,4,5];e.s(["f",0,function({value:e,onChange:o,disabled:s,size:l="sm",showUnrated:h=!0,className:c}){let{t:d}=(0,n.b)(),u=e??0,m="sm"===l?"h-3.5 w-3.5":"h-5 w-5",g=u?d.difficulty.starsLabel.replace("{n}",String(u)):d.difficulty.unrated;return o?(0,t.jsxs)("span",{className:(0,i.f)("inline-flex items-center gap-0.5",c),role:"group","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:d.difficulty.clearHint,children:[a.map(e=>(0,t.jsx)("button",{type:"button",disabled:s,onClick:()=>o(e===u?null:e),"aria-label":d.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=u,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(r.f,{className:(0,i.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!u&&h&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:d.difficulty.unrated})]}):u?(0,t.jsx)("span",{className:(0,i.f)("inline-flex items-center",c),role:"img","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:g,children:a.map(e=>(0,t.jsx)(r.f,{className:(0,i.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):h?(0,t.jsx)("span",{className:(0,i.f)("text-xs text-muted-foreground",c),children:d.difficulty.unrated}):null}])},12130,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(232660),i=e.i(519455),a=e.i(776639),o=e.i(263676),s=e.i(111110);async function l(e,t){let{naturalWidth:r,naturalHeight:n}=e;return Promise.all(t.map(t=>new Promise((i,a)=>{let o=document.createElement("canvas"),s=Math.round(t.x*r),l=Math.round(t.y*n);o.width=Math.max(1,Math.round(t.width*r)),o.height=Math.max(1,Math.round(t.height*n));let h=o.getContext("2d");h?(h.drawImage(e,s,l,o.width,o.height,0,0,o.width,o.height),o.toBlob(e=>e?i(e):a(Error("Canvas is empty")),"image/jpeg",.95)):a(Error("Canvas is not supported"))})))}let h={maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},c=(0,r.forwardRef)(function({imageSrc:e,regions:n,onChange:i,imageStyle:a=h,onImageLoad:l},c){let{t:d}=(0,s.b)(),u=(0,r.useRef)(null),m=(0,r.useRef)(null),[g,p]=(0,r.useState)(null),f=e=>{let t=u.current.getBoundingClientRect();return{x:(e.clientX-t.left)/t.width,y:(e.clientY-t.top)/t.height}},w=()=>{g&&g.width>=.02&&g.height>=.02&&i([...n,g]),m.current=null,p(null)},x=e=>({left:`${100*e.x}%`,top:`${100*e.y}%`,width:`${100*e.width}%`,height:`${100*e.height}%`});return(0,t.jsxs)("div",{className:"relative inline-block select-none",children:[(0,t.jsx)("img",{ref:c,src:e,alt:"",draggable:!1,style:a,onLoad:l,className:"block"}),(0,t.jsxs)("div",{ref:u,className:"absolute inset-0 cursor-crosshair",style:{touchAction:"none"},onPointerDown:e=>{0===e.button&&(u.current?.setPointerCapture(e.pointerId),m.current=f(e),p(null))},onPointerMove:e=>{var t,r,n,i;let a,o,s;if(!m.current)return;let l=f(e);p((t=m.current.x,r=m.current.y,n=l.x,i=l.y,o=(a=e=>Math.min(1,Math.max(0,e)))(Math.min(t,n)),s=a(Math.min(r,i)),{x:o,y:s,width:a(Math.max(t,n))-o,height:a(Math.max(r,i))-s}))},onPointerUp:w,onPointerCancel:w,children:[n.map((e,r)=>(0,t.jsxs)("div",{className:"absolute border-2 border-sky-400 bg-sky-400/15",style:x(e),children:[(0,t.jsx)("span",{className:"absolute left-0 top-0 bg-sky-500 px-1.5 text-xs font-bold text-white",children:r+1}),(0,t.jsx)("button",{type:"button",className:"absolute -right-3 -top-3 flex h-6 w-6 items-center justify-center rounded-full bg-red-500 text-white shadow","aria-label":d.batchImport.removeRegion.replace("{index}",String(r+1)),onPointerDown:e=>e.stopPropagation(),onClick:()=>i(n.filter((e,t)=>t!==r)),children:(0,t.jsx)(o.X,{className:"h-3 w-3"})})]},r)),g&&(0,t.jsx)("div",{className:"absolute border-2 border-dashed border-yellow-300 bg-yellow-300/10",style:x(g)})]})]})});var d=e.i(456420);let u={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};u.node;let m=(0,d.f)(u),g={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};g.node;let p=(0,d.f)(g);function f({zoom:e,onZoomIn:r,onZoomOut:n,onReset:i}){let{t:a}=(0,s.b)(),o="outline-none focus-visible:ring-2 focus-visible:ring-white/70",l=`flex h-9 w-9 items-center justify-center rounded-full text-white transition-colors hover:bg-white/20 disabled:opacity-40 disabled:hover:bg-transparent ${o}`;return(0,t.jsxs)("div",{className:"flex items-center gap-0.5 rounded-full bg-black/60 p-1 shadow-lg backdrop-blur-sm",children:[(0,t.jsx)("button",{type:"button",className:l,onClick:n,disabled:e<=1,"aria-label":a.common.cropper.zoomOut,title:a.common.cropper.zoomOut,children:(0,t.jsx)(p,{className:"h-4 w-4"})}),(0,t.jsxs)("button",{type:"button",className:`h-9 min-w-14 rounded-full px-2 text-center text-xs font-medium tabular-nums text-white hover:bg-white/20 ${o}`,onClick:i,"aria-label":a.common.cropper.resetZoom,title:a.common.cropper.resetZoom,children:[Math.round(100*e),"%"]}),(0,t.jsx)("button",{type:"button",className:l,onClick:r,disabled:e>=5,"aria-label":a.common.cropper.zoomIn,title:a.common.cropper.zoomIn,children:(0,t.jsx)(m,{className:"h-4 w-4"})})]})}var w=e.i(201276);let x={single:{maxHeight:"70vh",maxWidth:"100%",objectFit:"contain"},auto:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},multi:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"}};e.s(["f",0,function({imageSrc:e,open:o,onClose:h,onCropComplete:d,onMultiCropComplete:u,onRegionsSelected:m,allowMulti:g=!0,onAutoSplit:p,onAddPart:y,partCount:b=0}){let{t:v}=(0,s.b)(),C=/^(blob:|data:image\/)/i.test(e)?e:void 0,[j,k]=(0,r.useState)(),D=(0,r.useRef)(null),[E,M]=(0,r.useState)("single"),{containerRef:N,zoom:R,imageStyle:S,measureImage:L,zoomIn:I,zoomOut:_,reset:P}=function(e){let[t,n]=(0,r.useState)(null),i=(0,r.useRef)(null),a=(0,r.useCallback)(e=>{i.current=e,n(e)},[]),[o,s]=(0,r.useState)(1),l=(0,r.useRef)(1),[h,c]=(0,r.useState)(null),d=(0,r.useRef)(null),u=(0,r.useRef)(!1),m=(0,r.useCallback)((e,t,r)=>{let n=i.current,a=l.current,o=Math.min(5,Math.max(1,e));if(!n||o===a)return;if(1===a){let e=n.querySelector("img");e&&c(e.clientWidth)}let h=n.getBoundingClientRect(),u=(t??h.left+h.width/2)-h.left,m=(r??h.top+h.height/2)-h.top;d.current={viewX:u,viewY:m,contentX:n.scrollLeft+u,contentY:n.scrollTop+m,ratio:o/a},l.current=o,s(o)},[]);(0,r.useLayoutEffect)(()=>{let e=i.current,t=d.current;e&&t&&(e.scrollLeft=t.contentX*t.ratio-t.viewX,e.scrollTop=t.contentY*t.ratio-t.viewY,d.current=null)},[o]),(0,r.useEffect)(()=>{if(!t)return;let e=e=>{e.preventDefault(),m(l.current*Math.exp(-(.0015*e.deltaY)),e.clientX,e.clientY)},r=null,n=e=>{let[t,r]=[e[0],e[1]];return{distance:Math.hypot(t.clientX-r.clientX,t.clientY-r.clientY),centerX:(t.clientX+r.clientX)/2,centerY:(t.clientY+r.clientY)/2}},i=e=>{2===e.touches.length&&(r={distance:n(e.touches).distance,zoom:l.current},u.current=!0)},a=e=>{if(!r||2!==e.touches.length)return;e.preventDefault();let{distance:t,centerX:i,centerY:a}=n(e.touches);r.distance>0&&m(r.zoom*(t/r.distance),i,a)},o=e=>{e.touches.length<2&&(r=null,u.current=!1)},s=e=>{u.current&&e.stopPropagation()};return t.addEventListener("wheel",e,{passive:!1}),t.addEventListener("touchstart",i,{passive:!0}),t.addEventListener("touchmove",a,{passive:!1}),t.addEventListener("touchend",o),t.addEventListener("touchcancel",o),t.addEventListener("pointermove",s,{capture:!0}),()=>{t.removeEventListener("wheel",e),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",a),t.removeEventListener("touchend",o),t.removeEventListener("touchcancel",o),t.removeEventListener("pointermove",s,{capture:!0})}},[t,m]);let g=(0,r.useCallback)(e=>{e&&1===l.current&&c(e.clientWidth)},[]),p=(0,r.useCallback)(()=>m(1.25*l.current),[m]),f=(0,r.useCallback)(()=>m(l.current/1.25),[m]),w=(0,r.useCallback)(()=>{l.current=1,d.current=null,s(1)},[]),x=1!==o&&h?{...e,width:h*o,height:"auto",maxWidth:"none",maxHeight:"none"}:e;return{containerRef:a,zoom:o,imageStyle:x,measureImage:g,zoomIn:p,zoomOut:f,reset:w}}(x[E]);(0,r.useEffect)(()=>{P()},[e,P]);let[$,H]=(0,r.useState)({src:e,regions:[]}),A=$.src===e?$.regions:[],z=t=>H({src:e,regions:t}),B=(0,r.useRef)(null),Y=["single",...p?["auto"]:[],...u||m&&g?["multi"]:[]],X={single:v.batchImport.singleMode,auto:v.batchImport.autoMode,multi:v.batchImport.multiMode},O=async()=>{if(0!==A.length){if(m){m(A,!0),z([]);return}if(B.current&&u)try{u(await l(B.current,A)),z([])}catch(e){w.V.error("[ImageCropper]","Multi-image crop failed",{error:e})}}},U=()=>j&&j.width>0&&j.height>0?{x:j.x/100,y:j.y/100,width:j.width/100,height:j.height/100}:{x:0,y:0,width:1,height:1},K=async()=>{let e=U();if("auto"===E&&p)return void p(e);if(m)return void m([e],!1);if(D.current&&d)try{let[t]=await l(D.current,[e]);d(t)}catch(e){w.V.error("[ImageCropper]","Crop failed",{error:e})}};return(0,t.jsx)(a.N,{open:o,onOpenChange:e=>!e&&h(),children:(0,t.jsxs)(a.d,{className:"max-w-3xl h-[90vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)(a.s,{className:"p-4 border-b shrink-0",children:(0,t.jsx)(a.F,{children:v.common.cropper?.title||"Crop Image"})}),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1 bg-black",children:[(0,t.jsx)("div",{ref:N,className:"flex h-full w-full overflow-auto p-4",children:(0,t.jsx)("div",{className:"m-auto",children:"multi"===E?(0,t.jsx)(c,{ref:B,imageSrc:C,regions:A,onChange:z,imageStyle:S,onImageLoad:e=>L(e.currentTarget)}):(0,t.jsx)(n.f,{crop:j,onChange:(e,t)=>k(t),children:(0,t.jsx)("img",{ref:D,alt:"Crop me",src:C,onLoad:function(e){k({unit:"%",x:0,y:0,width:100,height:100}),L(e.currentTarget)},style:S})})})}),(0,t.jsx)("div",{className:"absolute right-3 top-3",children:(0,t.jsx)(f,{zoom:R,onZoomIn:I,onZoomOut:_,onReset:P})})]}),(0,t.jsxs)("div",{className:"p-4 border-t bg-background shrink-0 space-y-3",children:[Y.length>1&&(0,t.jsx)("div",{className:`grid gap-1 rounded-md bg-muted p-1 ${3===Y.length?"grid-cols-3 sm:w-[28rem]":"grid-cols-2 sm:w-80"}`,children:Y.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":E===e,onClick:()=>{P(),M(e)},className:`rounded px-2 py-1.5 text-sm font-medium transition-colors ${E===e?"bg-background shadow-sm":"text-muted-foreground"}`,children:X[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"multi"===E?`${v.batchImport.hint} ${v.batchImport.regionCount.replace("{count}",String(A.length))}`:"auto"===E?v.batchImport.autoHint:b>0?v.upload.parts.cropHint.replace("{n}",String(b+1)):v.common.cropper?.hint||"💡 Drag to adjust crop area"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 justify-end",children:["multi"===E&&A.length>0&&(0,t.jsx)(i.f,{variant:"ghost",onClick:()=>z([]),children:v.batchImport.clear}),(0,t.jsx)(i.f,{variant:"outline",onClick:h,children:v.common.cancel||"Cancel"}),"multi"===E?(0,t.jsx)(i.f,{onClick:O,disabled:0===A.length,children:v.batchImport.start.replace("{count}",String(A.length))}):(0,t.jsxs)(t.Fragment,{children:["single"===E&&y&&(0,t.jsx)(i.f,{variant:"secondary",onClick:()=>y(U()),"data-testid":"crop-add-part",children:v.upload.parts.addNext}),(0,t.jsx)(i.f,{onClick:K,children:"auto"===E?v.batchImport.autoStart:b>0?v.upload.parts.confirm.replace("{count}",String(b+1)):v.common.confirm||"Confirm"})]})]})]})]})]})})}],12130)},141176,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(456420);let i={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};i.node;let a=(0,n.f)(i);var o=e.i(772382),s=e.i(511445),l=e.i(624687),h=e.i(111110),c=e.i(975157);e.s(["f",0,function({value:e,onChange:n,className:i,...d}){let{t:u}=(0,h.b)(),[m,g]=(0,r.useState)("source"),p=(0,r.useId)(),f=[{mode:"source",label:u.markdownEditor.source,icon:a},{mode:"preview",label:u.markdownEditor.preview,icon:o.f}];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("div",{role:"tablist","aria-label":u.markdownEditor.modeLabel,className:"flex justify-end",children:(0,t.jsx)("div",{className:"inline-flex rounded-md border bg-muted/40 p-0.5",children:f.map(({mode:e,label:r,icon:n})=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":m===e,"aria-controls":p,onClick:()=>g(e),className:(0,c.f)("flex items-center gap-1 rounded px-2.5 py-1 text-xs transition-colors",m===e?"bg-background font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(n,{className:"h-3.5 w-3.5"}),r]},e))})}),(0,t.jsx)("div",{id:p,role:"tabpanel",children:"source"===m?(0,t.jsx)(l.f,{value:e,onChange:e=>n(e.target.value),className:i,...d}):(0,t.jsx)("div",{className:"min-h-24 cursor-text rounded-md border bg-muted/20 px-3 py-2",onDoubleClick:()=>g("source"),title:u.markdownEditor.doubleClickToEdit,children:e.trim()?(0,t.jsx)(s.f,{content:e}):(0,t.jsx)("p",{className:"text-sm italic text-muted-foreground",children:u.markdownEditor.empty})})})]})}],141176)},438465,674166,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(967489),i=e.i(856423),a=e.i(41931),o=e.i(201276),s=e.i(111110);e.s(["f",0,function({value:e,onChange:l,className:h}){let[c,d]=(0,r.useState)([]),{t:u}=(0,s.b)();return(0,r.useEffect)(()=>{(async()=>{try{let e=await a.k.get("/api/notebooks");d(e)}catch(e){o.V.error("[NotebookSelector]","Failed to fetch notebooks",{error:e})}})()},[]),(0,t.jsxs)(n.d,{value:e,onValueChange:l,children:[(0,t.jsx)(n.P,{className:h,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.f,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)(n.U,{placeholder:u.notebooks?.selector?.placeholder||"Select Notebook"})]})}),(0,t.jsx)(n.r,{children:0===c.length?(0,t.jsx)("div",{className:"p-2 text-sm text-muted-foreground text-center",children:u.notebooks?.selector?.empty||"No notebooks available"}):c.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],438465);var l=e.i(470279);e.s(["f",0,function({value:e,onChange:r,disabled:i}){let{groups:a,loading:o}=(0,l.f)(),s=a.filter(e=>e.isActive);return(0,t.jsxs)(n.d,{value:e,onValueChange:r,disabled:i||o,children:[(0,t.jsx)(n.P,{children:(0,t.jsx)(n.U,{placeholder:"选择卷别"})}),(0,t.jsx)(n.r,{children:s.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],674166)},149704,e=>{var t=e.i(843476),r=e.i(111110),n=e.i(398019),i=e.i(184110),a=e.i(975157);let o={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:s,align:l,className:h}){let{t:c}=(0,r.b)();if(!e)return null;let d=(0,i.V)(s),u=(0,i.o)(l);return(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",h),children:(0,t.jsx)("img",{src:(0,n.f)(e),alt:c.figure.alt,className:(0,a.f)(o[u],"block h-auto max-w-full rounded border bg-white p-2"),style:{..."left"===u?{marginLeft:0,marginRight:"auto"}:"right"===u?{marginLeft:"auto",marginRight:0}:{},maxHeight:360,zoom:d/100,maxWidth:`${Math.min(d,100)}%`}})})}])},574041,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(263676),i=e.i(487486),a=e.i(793479),o=e.i(41931),s=e.i(201276);e.s(["f",0,function({value:e=[],onChange:l,placeholder:h="Enter tags...",className:c="",enterHint:d,subject:u,gradeStage:m}){let[g,p]=(0,r.useState)(""),[f,w]=(0,r.useState)([]),[x,y]=(0,r.useState)(!1),[b,v]=(0,r.useState)(0),C=(0,r.useRef)(null),j=(0,r.useRef)(null),k=(0,r.useCallback)(async t=>{try{let r=new URLSearchParams({q:t});u&&r.append("subject",u),m&&r.append("stage",m);let n=((await o.k.get(`/api/tags/suggestions?${r.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));w(n.slice(0,20)),y(n.length>0),v(0)}catch(e){s.V.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[u,m,e]);(0,r.useEffect)(()=>{g.trim()&&k(g)},[g,k]);let D=t=>{t.trim()&&!e.includes(t.trim())&&(l([...e,t.trim()]),p(""),w([]),y(!1),v(0))},E=t=>{l(e.filter(e=>e!==t))};return(0,r.useEffect)(()=>{let e=e=>{!j.current||j.current.contains(e.target)||C.current?.contains(e.target)||y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${c}`,children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 p-2 border rounded-lg bg-background min-h-[42px]",children:[e.map(e=>(0,t.jsxs)(i.f,{variant:"secondary",className:"flex items-center gap-1 px-2 py-1",children:[e,(0,t.jsx)("button",{type:"button",onClick:()=>E(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(n.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(a.f,{ref:C,type:"text",value:g,onChange:e=>{p(e.target.value),e.target.value.trim()||(w([]),y(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),b>=0&&f[b]?D(f[b]):g.trim()&&D(g)):"ArrowDown"===t.key?(t.preventDefault(),v(e=>Math.min(e+1,f.length-1))):"ArrowUp"===t.key?(t.preventDefault(),v(e=>Math.max(e-1,0))):"Escape"===t.key?(y(!1),v(0)):"Backspace"===t.key&&!g&&e.length>0&&E(e[e.length-1])},onFocus:()=>{f.length>0&&y(!0)},placeholder:0===e.length?h:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),x&&f.length>0&&(0,t.jsx)("div",{ref:j,className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-md max-h-48 overflow-y-auto",children:f.map((e,r)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${r===b?"bg-accent":""}`,onClick:()=>D(e),onMouseEnter:()=>v(r),children:e},e))}),g&&!x&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:d?`${d} "${g}"`:`Press Enter to create "${g}"`})]})}])},184110,e=>{let t=["left","center","right"],r="center";function n(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,r,"n",0,100,"j",0,t,"a",0,200,"_",0,10,"x",0,n,"o",0,function(e){return"string"==typeof e&&t.includes(e)?e:r},"V",0,function(e){return n(e)?e:100}])},398019,e=>{e.s(["f",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},991722,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,r="zh"){return("en"===r?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,r){return(r||"").trim()?"wrong_attempt":t(e)}])},597138,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])}])})();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,399847,e=>{var t=e.i(456420);let r={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};r.node;let s=(0,t.f)(r);e.s(["f",0,s],399847)},13285,e=>{var t=e.i(456420);let r={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};r.node;let s=(0,t.f)(r);e.s(["f",0,s],13285)},615568,168148,e=>{var t=e.i(456420);let r={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};r.node;let s=(0,t.f)(r);e.s(["f",0,s],615568);var a=e.i(843476),n=e.i(271645),i=e.i(30030),l=e.i(248425),o=Object.defineProperty,d=(e,t)=>o(e,"name",{value:t,configurable:!0}),c="Progress",[u,m]=(0,i.f)(c),[f,h]=u(c),p=n.forwardRef(d(function(e,t){let{__scopeProgress:r,value:s=null,max:n,getValueLabel:i=x,...o}=e;(n||0===n)&&!y(n)&&console.error(b(`${n}`,"Progress"));let d=y(n)?n:100;null===s||j(s,d)||console.error(k(`${s}`,"Progress"));let c=j(s,d)?s:null,u=w(c)?i(c,d):void 0;return(0,a.jsx)(f,{scope:r,value:c,max:d,children:(0,a.jsx)(l.V.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":w(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":v(c,d),"data-value":c??void 0,"data-max":d,...o,ref:t})})},"Progress")),g=n.forwardRef(d(function(e,t){let{__scopeProgress:r,...s}=e,n=h("ProgressIndicator",r);return(0,a.jsx)(l.V.div,{"data-state":v(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...s,ref:t})},"ProgressIndicator"));function x(e,t){return`${Math.round(e/t*100)}%`}function v(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function w(e){return"number"==typeof e}function y(e){return w(e)&&!isNaN(e)&&e>0}function j(e,t){return w(e)&&!isNaN(e)&&e<=t&&e>=0}function b(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}function k(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
|
+
- a positive number
|
|
3
|
+
- less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
|
|
4
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
|
+
|
|
6
|
+
Defaulting to \`null\`.`}d(x,"defaultGetValueLabel"),d(v,"getProgressState"),d(w,"isNumber"),d(y,"isValidMaxNumber"),d(j,"isValidValueNumber"),d(b,"getInvalidMaxError"),d(k,"getInvalidValueError");var S=e.i(975157);let N=n.forwardRef(({className:e,value:t,...r},s)=>(0,a.jsx)(p,{ref:s,value:t,className:(0,S.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:(0,a.jsx)(g,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));N.displayName=p.displayName,e.s(["f",0,N],168148)},866531,497346,183444,e=>{var t=e.i(843476),r=e.i(271645),s=e.i(632781),a=e.i(741120),n=e.i(856522),i=e.i(314381),l=e.i(3198),o=e.i(519455),d=e.i(111110),c=e.i(41931),u=e.i(294114),m=e.i(201276);function f({data:e,onChange:a}){let{t:n}=(0,d.b)(),[h,p]=(0,r.useState)(!1),[g,x]=(0,r.useState)(null),v=async()=>{if(!e.questionText.trim())return void u.c.warning(n.editor.enterQuestionFirst||"Please enter question text first");if(!e.answerText.trim())return void u.c.warning(n.geogebra.answerRequired);p(!0),x(null);try{let t=await c.k.post("/api/geogebra-analyze",{questionText:e.questionText,answerText:e.answerText,analysis:e.analysis},{timeout:18e4,recoverable:!0});t.suitable&&t.commands&&t.commands.length>0?a({geogebraCommands:JSON.stringify(t.commands)}):x(t.description||n.geogebra.notSuitable)}catch(e){m.V.error("[CorrectionEditor]","GeoGebra analysis failed",{error:e}),x(n.geogebra.analyzeFailed)}finally{p(!1)}};return e.geogebraCommands?(0,t.jsx)(l.f,{commands:e.geogebraCommands,height:350,onRegenerate:v,onDelete:async()=>a({geogebraCommands:void 0})}):e.questionText.trim()&&e.answerText.trim()?(0,t.jsxs)("div",{className:"rounded-lg border border-dashed p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(i.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:n.geogebra.title})]}),(0,t.jsx)(o.f,{variant:"outline",size:"sm",onClick:v,disabled:h,children:h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.f,{className:"mr-2 h-4 w-4 animate-spin"}),n.geogebra.analyzing]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.f,{className:"mr-2 h-4 w-4"}),n.geogebra.generate]})})]}),g&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:g}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:n.geogebra.hint})]}):null}var h=e.i(469937),p=e.i(28342),g=e.i(438465),x=e.i(674166),v=e.i(110204);function w({data:e,paperLevel:r,onChange:s}){let{t:a}=(0,d.b)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:a.editor.selectNotebook||"Select Notebook"}),(0,t.jsx)(g.f,{value:e.subjectId,onChange:e=>s({subjectId:e})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{htmlFor:"correction-grade-semester",children:a.editor.gradeSemester||"Grade/Semester"}),(0,t.jsx)(p.f,{id:"correction-grade-semester",value:e.gradeSemester||"",onChange:e=>s({gradeSemester:e})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:a.editor.paperLevel||"Paper Level"}),(0,t.jsx)(x.f,{value:r,onChange:e=>s({paperLevel:e})})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:a.difficulty.label}),(0,t.jsx)("div",{children:(0,t.jsx)(h.f,{size:"md",value:e.difficultyStars,onChange:e=>s({difficultyStars:e})})})]})]})}var y=e.i(141176),j=e.i(515288),b=e.i(967489);function k({data:e,onChange:r}){let{t:s}=(0,d.b)();return(0,t.jsxs)(j.N,{children:[(0,t.jsx)(j.Y,{children:(0,t.jsx)(j.v,{children:s.editor.mistakeAnalysisTitle||"Mistake Analysis"})}),(0,t.jsxs)(j.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:s.editor.mistakeStatus||"Attempt Status"}),(0,t.jsxs)(b.d,{value:e.mistakeStatus||"unknown",onValueChange:e=>r({mistakeStatus:e}),children:[(0,t.jsx)(b.P,{children:(0,t.jsx)(b.U,{})}),(0,t.jsxs)(b.r,{children:[(0,t.jsx)(b.T,{value:"not_attempted",children:s.editor.mistakeStatuses?.notAttempted||"Not attempted"}),(0,t.jsx)(b.T,{value:"wrong_attempt",children:s.editor.mistakeStatuses?.wrongAttempt||"Wrong attempt"}),(0,t.jsx)(b.T,{value:"unknown",children:s.editor.mistakeStatuses?.unknown||"Unknown"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:s.editor.wrongAnswerText||"Wrong Answer / Work"}),(0,t.jsx)(y.f,{value:e.wrongAnswerText||"",onChange:t=>r({wrongAnswerText:t,mistakeStatus:t.trim()?"wrong_attempt":e.mistakeStatus}),className:"min-h-[100px] font-mono text-sm",placeholder:s.editor.wrongAnswerPlaceholder||"Leave blank if no wrong answer is visible"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:s.editor.mistakeAnalysis||"Mistake Cause Analysis"}),(0,t.jsx)(y.f,{value:e.mistakeAnalysis||"",onChange:e=>r({mistakeAnalysis:e}),className:"min-h-[140px] font-mono text-sm",placeholder:s.editor.mistakeAnalysisPlaceholder||"Explain where and why the mistake happened"})]})]})]})}var S=e.i(511445),N=e.i(149704);function A({title:e,children:r,className:s}){return(0,t.jsxs)(j.N,{children:[(0,t.jsx)(j.Y,{children:(0,t.jsx)(j.v,{children:e})}),(0,t.jsx)(j.O,{className:s,children:r})]})}function T({data:e,children:r}){let{t:s}=(0,d.b)(),a={wrong_attempt:s.editor.mistakeStatuses?.wrongAttempt||"Wrong attempt",not_attempted:s.editor.mistakeStatuses?.notAttempted||"Not attempted",unknown:s.editor.mistakeStatuses?.unknown||"Unknown"};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(A,{title:s.editor.preview?.question||"Question Preview",children:[(0,t.jsx)(S.f,{content:e.questionText}),(0,t.jsx)(N.f,{svg:e.figureSvg})]}),r,(0,t.jsx)(A,{title:s.editor.preview?.answer||"Answer Preview",children:(0,t.jsx)(S.f,{content:e.answerText})}),(0,t.jsx)(A,{title:s.editor.preview?.analysis||"Analysis Preview",children:(0,t.jsx)(S.f,{content:e.analysis})}),(0,t.jsxs)(A,{title:s.editor.preview?.mistakeAnalysis||"Mistake Analysis Preview",className:"space-y-3 text-sm",children:[(0,t.jsxs)("div",{className:"text-muted-foreground",children:[s.editor.mistakeStatus||"Attempt Status",s.common.colon,a[e.mistakeStatus]??a.unknown]}),e.wrongAnswerText&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:s.editor.wrongAnswerText||"Wrong Answer / Work"}),(0,t.jsx)(S.f,{content:e.wrongAnswerText})]}),e.mistakeAnalysis&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:s.editor.mistakeAnalysis||"Mistake Cause Analysis"}),(0,t.jsx)(S.f,{content:e.mistakeAnalysis})]})]})]})}var I=e.i(574041),E=e.i(215519),_=e.i(306831);e.i(676167);var C=e.i(597138),R=e.i(991722),M=e.i(470279),O=e.i(303163);e.s(["f",0,function({initialData:e,onSave:i,onCancel:l,imagePreview:h,initialSubjectId:p,aiTimeout:g}){let{timeZone:x}=(0,E.M)(),{t:b,language:S}=(0,d.b)(),[N,A]=(0,r.useState)({...e,wrongAnswerText:e.wrongAnswerText||"",mistakeAnalysis:e.mistakeAnalysis||"",mistakeStatus:e.mistakeStatus||"unknown",subjectId:p,gradeSemester:e.gradeSemester||""}),P=(0,r.useRef)(!1),$=e=>{"gradeSemester"in e&&(P.current=!0),A(t=>({...t,...e}))},{groups:U}=(0,M.f)(),L=(()=>{if(N.paperLevel)return N.paperLevel;let e="number"==typeof N.difficultyStars&&N.difficultyStars>=4?"b":"a";return U.find(t=>t.key===e&&t.isActive)?.id||""})(),V=N.paperLevel??L,[q,F]=(0,r.useState)(!1),[z,D]=(0,r.useState)(!1),[G,H]=(0,r.useState)(!1),[Q,W]=(0,r.useState)(void 0),[B,J]=(0,r.useState)([]);(0,r.useEffect)(()=>{c.k.get("/api/notebooks").then(J).catch(e=>m.V.error("[CorrectionEditor]","Failed to fetch notebooks",{error:e})),c.k.get("/api/user").then(e=>{if(H(!!e?.enableGeogebra),e){let t=function(e,t=_.J){return"ai"===e.gradeRecognitionMode?null:e.fixedGradeSemester?e.fixedGradeSemester:e.educationStage&&e.enrollmentYear?function(e,t,r=new Date,s="en",a=_.J){let n=(0,_.c)(r,a),i=n.getFullYear(),l=n.getMonth()+1,o=i-t,d="2nd";l>=9?(o+=1,d="1st"):d=l<2?"1st":"2nd";let c="zh"===s,u=c?"1st"===d?"上期":"下期":"1st"===d?"1st Semester":"2nd Semester",m=(c?{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=`${o}`;if(f=o>0&&o<=m.length?m[o-1]:o>m.length?c?"已毕业":"Graduated":c?"学前":"Pre-school",!c)return`${f}, ${u}`;{let e="1st"===d?"上":"下";return`${f}${e}`}}(e.educationStage,e.enrollmentYear,new Date,"zh",t):null}(e,x);A(e=>e.gradeSemester||P.current?e:{...e,gradeSemester:t||""}),W(e.educationStage||void 0)}}).catch(e=>m.V.error("[CorrectionEditor]","Failed to fetch user info for grade calculation",{error:e}))},[S,x]);let X=async()=>{if(!N.questionText.trim())return void u.c.warning(b.editor.enterQuestionFirst||"Please enter question text first");F(!0);try{let e=function({questionText:e,language:t,subject:r,imagePreview:s,gradeSemester:a,subjectId:n}){let i={questionText:e,language:t,subject:r};return s&&(i.imageBase64=s),a&&(i.gradeSemester=a),n&&(i.subjectId=n),i}({questionText:N.questionText,language:S,subject:N.subject,imagePreview:h,gradeSemester:N.gradeSemester??void 0,subjectId:N.subjectId});m.V.info("[Reanswer]",e.imageBase64?"Sending image + text (image available for mistake analysis)":"Sending text only (no image available)",{timeout:g});let t=await c.k.post("/api/reanswer",e,{timeout:g||18e4,recoverable:!0});A(e=>({...e,answerText:t.answerText,analysis:t.analysis,knowledgePoints:t.knowledgePoints,wrongAnswerText:t.wrongAnswerText||"",mistakeAnalysis:t.mistakeAnalysis||"",mistakeStatus:(0,R.x)(t.mistakeStatus,t.wrongAnswerText),difficultyStars:t.difficultyStars??e.difficultyStars})),u.c.success(b.editor.reanswerSuccess||"✅ Answer and analysis updated!")}catch(s){let e,t,r;m.V.error("[CorrectionEditor]","Reanswer failed",{error:s}),u.c.error((e=(0,O.d)(s)||"",r=(t=b.errors?.reanswer||{}).default||"Reanswer failed",e.includes("AI_AUTH_ERROR")?t.authError||b.errors?.AI_AUTH_ERROR||r:e.includes("AI_CONNECTION_FAILED")?t.connectionFailed||b.errors?.AI_CONNECTION_FAILED||r:e.includes("AI_RESPONSE_ERROR")&&(t.responseError||b.errors?.AI_RESPONSE_ERROR)||r))}finally{F(!1)}},Y=async()=>{if(!N.subjectId)return void u.c.warning(b.editor.messages?.selectNotebook||"Please select a notebook");if(!z){D(!0);try{await i({...N,paperLevel:V,mistakeStatus:(0,R.x)(N.mistakeStatus,N.wrongAnswerText)})}finally{D(!1)}}},Z=b.editor.placeholder||"Supports Markdown and LaTeX...",K=(0,C.f)(B.find(e=>e.id===N.subjectId)?.name||null)||(0,C.f)(N.subject||null)||void 0;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:b.editor.title}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(o.f,{variant:"outline",onClick:l,children:b.editor.cancel}),(0,t.jsxs)(o.f,{onClick:Y,disabled:z,children:[z?(0,t.jsx)(s.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(n.f,{className:"mr-2 h-4 w-4"}),z?b.common?.pleaseWait||"Please wait...":b.editor.save]})]})]}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[h&&(0,t.jsx)(j.N,{children:(0,t.jsx)(j.O,{className:"p-4",children:(0,t.jsx)("img",{src:h,alt:"Original",className:"w-full rounded-md"})})}),(0,t.jsx)(w,{data:N,paperLevel:V,onChange:$}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:b.editor.question}),(0,t.jsx)(y.f,{value:N.questionText,onChange:e=>$({questionText:e}),className:"min-h-[150px] font-mono text-sm",placeholder:Z}),(0,t.jsx)(o.f,{variant:"default",size:"sm",onClick:X,disabled:q||!N.questionText.trim(),className:"w-full bg-gradient-to-r from-indigo-600 to-violet-500 hover:from-indigo-700 hover:to-violet-600 text-white font-medium",children:q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.f,{className:"mr-2 h-4 w-4 animate-spin"}),b.editor.reanswering||"AI solving..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.f,{className:"mr-2 h-4 w-4"}),b.editor.reanswer||"🔄 Reanswer (based on corrected question)"]})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:b.editor.reanswerHint||"💡 If the question was misrecognized, correct it and click to regenerate answer"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:b.editor.tags}),(0,t.jsx)(I.f,{value:N.knowledgePoints,onChange:e=>$({knowledgePoints:e}),placeholder:b.editor.tagsPlaceholder||"Enter knowledge tags...",enterHint:b.editor.createTagHint,subject:K,gradeStage:Q}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:b.editor.tagsHint||"💡 Tag suggestions will appear as you type"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:b.editor.answer}),(0,t.jsx)(y.f,{value:N.answerText,onChange:e=>$({answerText:e}),className:"min-h-[100px] font-mono text-sm",placeholder:Z})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.f,{children:b.editor.analysis}),(0,t.jsx)(y.f,{value:N.analysis,onChange:e=>$({analysis:e}),className:"min-h-[200px] font-mono text-sm",placeholder:Z})]}),(0,t.jsx)(k,{data:N,onChange:$})]}),(0,t.jsx)(T,{data:N,children:G&&(0,t.jsx)(f,{data:N,onChange:$})})]})]})}],866531);var P=e.i(853138),$=e.i(263676);e.s(["f",0,function({message:e,onDismiss:r}){let{t:s}=(0,d.b)();return e?(0,t.jsxs)("div",{role:"alert",className:"flex items-start gap-3 rounded-xl border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive",children:[(0,t.jsx)(P.f,{"aria-hidden":"true",className:"mt-0.5 h-4 w-4 shrink-0"}),(0,t.jsx)("p",{className:"min-w-0 flex-1 whitespace-pre-line break-words leading-relaxed",children:e}),(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":s.common.close,className:"shrink-0 rounded p-1 hover:bg-destructive/10",children:(0,t.jsx)($.X,{"aria-hidden":"true",className:"h-4 w-4"})})]}):null}],497346);var U=e.i(618566);function L(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}function V(e,t){if("string"!=typeof e||!/^(QUESTION_SAVE_|AI_)[A-Z_]+$/.test(e))return;let r=t.errors[e];return"string"==typeof r?r:void 0}e.s(["f",0,function(e){let{t}=(0,d.b)(),s=(0,U.useRouter)(),[a,n]=(0,r.useState)(null),i=async(r,a,i=!0)=>{n(null);try{let e=await r();return u.c.success(e.duplicate?t.importFlow.duplicate:t.common.messages.saveSuccess),i&&(e.duplicate?s.push(`/error-items/${e.id}`):a&&s.push(`/notebooks/${a}`)),!0}catch(s){m.V.error(e,"Save failed",{errorMessage:(0,O.d)(s)??(0,O.Z)(s)});let r=function(e,t){let r=L(e),s=L(r?.data),a="number"==typeof r?.status?r.status:void 0,n=(0,O.d)(e),i=V(n,t)??V(s?.code,t),l={400:t.errors.QUESTION_SAVE_INVALID_INPUT,401:t.errors.QUESTION_SAVE_UNAUTHORIZED,403:t.errors.QUESTION_SAVE_FORBIDDEN,408:t.errors.QUESTION_SAVE_TIMEOUT,409:t.errors.QUESTION_SAVE_CONFLICT,413:t.errors.QUESTION_SAVE_TOO_LARGE,429:t.errors.QUESTION_SAVE_RATE_LIMITED,502:t.errors.QUESTION_SAVE_SERVER_UNAVAILABLE,503:t.errors.QUESTION_SAVE_SERVER_UNAVAILABLE,504:t.errors.QUESTION_SAVE_TIMEOUT},o=i??(a?l[a]:void 0)??t.errors.QUESTION_SAVE_FAILED;!a&&(e instanceof TypeError||/fetch|network|load failed/i.test((0,O.Z)(e)))&&(o=t.errors.QUESTION_SAVE_NETWORK_ERROR);let d=L(s?.details);if("QUESTION_SAVE_GRADE_FAILED"===n){let e=V(d?.reason,t);e&&(o+=`
|
|
7
|
+
${e}`)}return 400===a&&(o+=(function(e,t){if(!Array.isArray(e))return[];let r={questionText:t.editor.question,answerText:t.editor.answer,analysis:t.editor.analysis,wrongAnswerText:t.editor.wrongAnswerText,mistakeAnalysis:t.editor.mistakeAnalysis,knowledgePoints:t.editor.tags,subjectId:t.editor.selectNotebook,gradeSemester:t.editor.gradeSemester,paperLevel:t.editor.paperLevel};return e.slice(0,3).flatMap(e=>{let s=L(e),a=s?.path,n=Array.isArray(a)&&"string"==typeof a[0]?r[a[0]]:void 0;if(!n)return[];let i=s?.maximum,l=t.questionSave.invalidField;return s?.code==="too_big"&&"number"==typeof i&&Number.isSafeInteger(i)&&i>=0&&(l="array"===s.origin?t.questionSave.tooMany:t.questionSave.tooLong),[l.replace("{field}",n).replace("{maximum}",String(i))]})})(s?.details,t).map(e=>`
|
|
8
|
+
${e}`).join("")),"string"==typeof d?.databaseCode&&/^P\d{4}$/.test(d.databaseCode)&&(o+=`
|
|
9
|
+
${t.questionSave.databaseCode.replace("{code}",d.databaseCode)}`),a&&(o+=` (HTTP ${a})`),o}(s,t);return n(r),"AI_DAILY_LIMIT_EXCEEDED"!==(0,O.d)(s)&&u.c.error(r),!1}};return{saveError:a,setSaveError:n,dismissSaveError:()=>n(null),run:i}}],183444)},731335,532377,339501,e=>{var t=e.i(843476),r=e.i(399847),s=e.i(551757),a=e.i(456420);let n={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};n.node;let i=(0,a.f)(n);var l=e.i(632781),o=e.i(615568),d=e.i(487486),c=e.i(519455),u=e.i(168148),m=e.i(111110),f=e.i(215519),h=e.i(306831);let p=["read","convert","crop","compress","upload"],g=["receive","analyze","save"];function x(e){if(!Number.isFinite(e)||e<0)return"-";if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(+(t<10))}s`;let r=Math.round(t);return`${Math.floor(r/60)}:${String(r%60).padStart(2,"0")}`}var v=e.i(975157);let w={analyzing:50,saving:90},y={analyzing:l.f,saving:l.f,review:o.f,saved:s.f,failed:r.f};e.s(["f",0,function({task:e,now:r,onReview:s,onViewItem:a,onRetry:n,onDiscard:l}){let{t:o}=(0,m.b)(),{timeZone:j}=(0,f.M)(),b=y[e.status],k="analyzing"===e.status||"saving"===e.status,S=o.errors,N=e.error?"string"==typeof S[e.error]?S[e.error]:e.error:null,A=function(e){let t=[];for(let r of p){let s=e?.client?.[r];"number"==typeof s&&t.push({stage:r,ms:s})}for(let r of g){let s=e?.server?.[r];"number"==typeof s&&t.push({stage:r,ms:s})}return t}(e.timings),T=k&&r?r-Date.parse(e.createdAt):null;return(0,t.jsxs)("div",{className:(0,v.f)("space-y-2 rounded-lg border p-3 text-sm",e.unread&&"border-primary/50 bg-primary/5"),"data-testid":"import-task-card","data-status":e.status,children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(b,{className:(0,v.f)("mt-0.5 h-4 w-4 shrink-0",k&&"animate-spin text-primary","saved"===e.status&&"text-green-600","failed"===e.status&&"text-destructive","review"===e.status&&"text-primary")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:o.importTasks.status[e.status]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o.importTasks.mode[e.mode]}),e.unread&&(0,t.jsx)(d.f,{children:o.importTasks.unread})]}),k&&(0,t.jsx)(u.f,{value:w[e.status],"aria-label":o.importTasks.stageEstimate,"aria-valuetext":o.common.progress.estimated.replace("{percent}",String(w[e.status])),className:"h-1.5"}),e.excerpt&&(0,t.jsx)("p",{className:"break-words text-muted-foreground",children:e.excerpt}),"saved"===e.status&&!e.errorItemId&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o.importTasks.itemDeleted}),"saved"===e.status&&e.errorItemId&&(0,t.jsx)("p",{className:"text-xs text-green-700 dark:text-green-300",children:e.duplicate?o.importTasks.duplicateSaved:o.importTasks.savedTo.replace("{notebook}",e.notebookName||"-").replace("{id}",e.errorItemShortId||"-")}),N&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:N}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(i,{className:"h-3 w-3"}),o.importTasks.createdAt.replace("{time}",(0,h.r)(e.createdAt,"MM-dd HH:mm",j))]}),null!==T&&(0,t.jsx)("span",{children:o.importTasks.elapsed.replace("{time}",x(T))}),e.attempts>1&&(0,t.jsx)("span",{children:o.importTasks.attempts.replace("{count}",String(e.attempts))})]}),A.length>0&&(0,t.jsx)("ul",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums","aria-label":"timings",children:A.map(({stage:e,ms:r})=>(0,t.jsxs)("li",{children:[o.importTasks.timings[e]," ",x(r)]},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:["review"===e.status&&s&&(0,t.jsx)(c.f,{size:"sm",onClick:s,children:o.importTasks.continueReview}),"saved"===e.status&&e.errorItemId&&a&&(0,t.jsx)(c.f,{size:"sm",variant:"outline",onClick:a,children:o.importTasks.viewItem}),"failed"===e.status&&n&&(0,t.jsx)(c.f,{size:"sm",onClick:n,children:o.importTasks.retry}),"saving"!==e.status&&"saved"!==e.status&&l&&(0,t.jsx)(c.f,{size:"sm",variant:"ghost",onClick:l,children:o.importTasks.discard})]})]})}],731335);var j=e.i(618566),b=e.i(767077),k=e.i(294114),S=e.i(201276),N=e.i(127175);e.s(["f",0,function(e){let{t}=(0,m.b)(),r=(0,j.useRouter)(),s=e=>{e.unread&&(0,N.N)(e.id).catch(e=>S.V.warn("[ImportTasks]","Mark read failed",{error:e}))};return{openReview:e=>{s(e),r.push(`/import-tasks/${e.id}`)},viewItem:e=>{e.errorItemId&&(s(e),r.push(`/error-items/${e.errorItemId}`))},markRead:s,retry:async r=>{try{await (0,N.R)(r.id),k.c.info(t.importTasks.retried)}catch(e){k.c.error((0,b.f)(e,t))}e?.()},discard:async r=>{if(!await (0,k.u)(t.importTasks.discardConfirm))return!1;let s=!1;try{await (0,N.x)(r.id),k.c.success(t.importTasks.discarded),s=!0}catch(e){k.c.error((0,b.f)(e,t))}return e?.(),s}}}],532377);var A=e.i(271645);e.s(["f",0,function(e,t=1e3){let[r,s]=(0,A.useState)(()=>Date.now());return(0,A.useEffect)(()=>{if(!e)return;let r=setInterval(()=>s(Date.now()),t);return()=>clearInterval(r)},[e,t]),r}],339501)},499930,e=>{var t=e.i(213761);function r(e,t=.008){let s=Math.max(0,e.x-t),a=Math.max(0,e.y-t);return{x:s,y:a,width:Math.min(1,e.x+e.width+t)-s,height:Math.min(1,e.y+e.height+t)-a}}async function s(e){let t=new Image;if(t.decoding="async",t.src=e,await t.decode(),!t.naturalWidth||!t.naturalHeight)throw Error("IMAGE_EMPTY");return t}async function a(e,r){let s=function(e,t=16,r=!1){let s=Math.max(...e.map(e=>e.width)),a=0,n=e.map(e=>{let n=r?s/e.width:e.scale??1,i={x:0,y:a,width:Math.round(e.width*n),height:Math.round(e.height*n)};return a+=i.height+t,i});return{width:Math.max(...n.map(e=>e.width)),height:a-t,rects:n}}(e.map(e=>({width:e.sw,height:e.sh,scale:e.scale})),16,r),a=document.createElement("canvas");a.width=s.width,a.height=s.height;let n=a.getContext("2d");if(!n)throw Error("CANVAS_UNSUPPORTED");n.fillStyle="#ffffff",n.fillRect(0,0,a.width,a.height),e.forEach((e,t)=>{let r=s.rects[t];n.drawImage(e.source,e.sx,e.sy,e.sw,e.sh,r.x,r.y,r.width,r.height)});let i=await createImageBitmap(a);try{return await (0,t.X)({source:i,width:a.width,height:a.height})}finally{i.close()}}async function n(e,s){let n=e.naturalWidth,i=e.naturalHeight,l=s.map(e=>r(e));return 1===l.length?(0,t.X)({source:e,width:n,height:i},l[0]):a(l.map(t=>({source:e,sx:Math.round(t.x*n),sy:Math.round(t.y*i),sw:Math.max(1,Math.round(t.width*n)),sh:Math.max(1,Math.round(t.height*i))})),!1)}async function i(e){return a((await Promise.all(e.map(s))).map(e=>({source:e,sx:0,sy:0,sw:e.naturalWidth,sh:e.naturalHeight})),!0)}async function l(e,t,s){let n=e.naturalWidth,i=e.naturalHeight,l=s.width/n,o=t.map(e=>r(e)).map(t=>({source:e,sx:Math.round(t.x*n),sy:Math.round(t.y*i),sw:Math.max(1,Math.round(t.width*n)),sh:Math.max(1,Math.round(t.height*i)),scale:l}));return o.push({source:s.source,sx:0,sy:0,sw:s.width,sh:s.height}),a(o,!1)}e.s(["y",0,s,"k",0,l,"M",0,n,"v",0,i])},119472,e=>{var t=e.i(41931),r=e.i(127175);async function s(e){let t;for(let r=0;r<3;r++)try{return await e()}catch(e){if(t=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===r)break;await new Promise(e=>setTimeout(e,1e3*(r+1)))}throw t}async function a(e,n=(0,r.c)()){let{batch:i}=await s(()=>t.k.post("/api/import-batches",{...e,clientRequestId:n,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0},{timeout:12e4}));return(0,r.P)(),i}async function n(e,r={}){let s=r.image?"?include=image":"",{batch:a}=await t.k.get(`/api/import-batches/${encodeURIComponent(e)}${s}`);return a}async function i(e,r,s){let{batch:a}=await t.k.patch(`/api/import-batches/${encodeURIComponent(e)}`,{version:r,draft:s});return a}async function l(e,a,n){let{batch:i}=await s(()=>t.k.post(`/api/import-batches/${encodeURIComponent(e)}/start`,{version:a,images:n},{timeout:12e4}));return(0,r.P)(),i}async function o(e){let{batch:s}=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/retry`,{});return(0,r.P)(),s}async function d(e){let s=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/confirm-all`,{});return(0,r.P)(),s}async function c(e){await t.k.delete(`/api/import-batches/${encodeURIComponent(e)}`),(0,r.P)()}async function u(e){await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/read`,{}),(0,r.P)()}async function m(e,r){return t.k.post(`/api/import-batches/${encodeURIComponent(e)}/fix-text`,{items:r},{timeout:6e5,recoverable:!0})}e.s(["J",0,d,"n",0,function(e){return e?.status===409?e.data?.details?.batch??null:null},"v",0,a,"o",0,c,"w",0,n,"$",0,m,"f",0,u,"s",0,o,"S",0,i,"g",0,l])},25197,e=>{var t=e.i(41931);async function r(){try{return!!(await t.k.get("/api/user")).confirmBeforeImport}catch{return!1}}async function s(e,r){let s=await t.k.post("/api/error-items",{questionText:e.questionText,answerText:e.answerText,analysis:e.analysis,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",knowledgePoints:e.knowledgePoints||[],difficultyStars:e.difficultyStars??null,recognizedGradeSemester:e.gradeSemester??null,hasFigure:e.hasFigure??!1,figureSvg:e.figureSvg??null,subjectId:r.subjectId||void 0,subjectName:r.subjectId?void 0:e.subject,originalImageUrl:r.imageUrl||"",paperLevel:r.paperLevel||void 0});return{id:s.id,shortId:s.shortId??null,subjectId:s.subjectId??null,notebookName:s.subject?.name??null,duplicate:s.duplicate}}e.i(201276),e.s(["x",0,r,"a",0,s],25197)},35209,e=>{var t=e.i(271645),r=e.i(111110);e.s(["f",0,function(...e){let{t:s}=(0,r.b)(),a=[s.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=a},[a])}])},825624,e=>{let t=/^[\s ]+/,r="一二三四五六七八九十",s=[{family:"dot",pattern:/^(\d{1,3})\s*[..](?!\d)\s*/},{family:"comma",pattern:/^(\d{1,3})\s*[、,,](?!\d)\s*/},{family:"paren",pattern:/^(\d{1,3})\s*[))]\s*/},{family:"colon",pattern:/^(\d{1,3})\s*[::](?!\d)\s*/},{family:"ti",pattern:/^第\s*(\d{1,3}|[一二三四五六七八九十]{1,3})\s*题\s*[..、::]?\s*/},{family:"example",pattern:/^(?:例题?|练习|习题)\s*(\d{1,3})\s*[..、::]?\s*/},{family:"q",pattern:/^(?:Q|Question|Problem|Exercise)\s*(\d{1,3})\s*[..::)]?\s+/i},{family:"cn",pattern:/^([一二三四五六七八九十]{1,3})\s*[、..]\s*/}];function a(e){let a=e.replace(t,"");for(let{family:e,pattern:t}of s){let s=a.match(t);if(!s||a.length<=s[0].length)continue;let n=function(e){if(/^\d+$/.test(e))return Number(e);if("十"===e)return 10;let t=e.indexOf("十");return -1===t?r.indexOf(e)+1:10*(0===t?1:r.indexOf(e[0])+1)+(t===e.length-1?0:r.indexOf(e[t+1])+1)}(s[1]);if(Number.isFinite(n)&&!(n<=0))return{value:n,family:e,prefixLength:s[0].length,label:s[1]}}return null}function n(e){let t=[];for(let r of e)(r||0!==t.length&&""!==t[t.length-1])&&t.push(r);for(;t.length>0&&""===t[t.length-1];)t.pop();return t.join("\n")}let i=/(姓名|班级|学号|日期|得分|分数|评分|考号|座位号|家长签字|用时|Name\s*[::_]|Class\s*[::_]|Date\s*[::_]|Score\s*[::_])|_{3,}|共\s*\d+\s*(道|题|小题)|做完|答案(见|在)|最后一页|满分\s*\d+\s*分/i,l=/(阅读|材料|短文|文章|选文|诗歌|古诗|文言文|下[面列]的?(表格|图表|统计|信息)|根据.{0,20}(回答|完成)|passage|read the|according to the)/i,o=/^(参考答案|答案与解析|答案|Answers?|Answer Key)\s*[::]?$/i,d=/^(第[一二三四五六七八九十]+(部分|大题|节)|(Part|Section)\s+[A-Z0-9IVX]+\b)/i,c=/(选择|填空|判断|计算|解答|应用|解决问题|操作|作图|阅读|写作|作文|综合|口算|听力|单项|完形|题)/,u=/(\d{1,3})\s*[~~\-—–至到]\s*(\d{1,3})\s*(?:小?题|questions?)/i,m=/(小问|小题|下列问题|以下问题|下列各题|下面各题|完成下列|回答下列|回答以下|following questions|answer the following)/i;function f(e){let t=[],r=[];for(let s of e)s?r.push(s):r.length&&(t.push(r.join("\n")),r=[]);return r.length&&t.push(r.join("\n")),t}function h(e,t){let r=[];for(let s=0;s<e.length;s++){let a=e[s],n=[a];for(let r=s+1;r<e.length;r++){let s=e[r],i=n[n.length-1];if(s.family!==a.family)continue;let l=1===s.value&&[...t].some(e=>e>i.line&&e<s.line);(s.value===i.value+1||l)&&n.push(s)}n.length>r.length&&(r=n)}return r}function p(e,t,r){return!!d.test(e)||!!t&&"cn"===t.family&&"cn"!==r&&null!==r&&(e.length<=40||c.test(e.slice(0,20)))}function g(e){let t=e.match(u);if(!t)return null;let r=Number(t[1]),s=Number(t[2]);return r<=s?{from:r,to:s}:null}e.s(["S",0,60,"i",0,2e4,"J",0,function(e,r={}){let s=e.length>2e4,c=e.slice(0,2e4).replace(/\r\n?/g,"\n").split("\n").map(e=>e.replace(t,"").replace(/[\s ]+$/,"")),x=c.map(e=>e?a(e):null),v=c.length;for(let e=0;e<c.length;e++)if(o.test(c[e])){v=e;break}let w=[],y=[];for(let e=0;e<v;e++){let t=x[e];t&&("cn"===t.family?y:w).push({...t,line:e})}let j=new Set;for(let e=0;e<v;e++)(d.test(c[e])||x[e]?.family==="cn")&&j.add(e);let b=h(w,j);if(b.length<2){let e=h(y,new Set);e.length>=2&&(b=e)}let k=n(c.slice(0,v)),S=v<c.length?f(c.slice(v)):[],N=e=>({questions:k?[{label:null,text:k,material:null,section:null}]:[],ignored:S,detected:!1,ambiguous:e,candidateCount:e?b.length:+!!k,overflow:0,tooLong:s});if(b.length<2)return N(!1);let A=b[0].family;if(!r.forceNumbered&&function(e,t,r,s){let a=null;for(let n=t-1;n>=0;n--)if(e[n]){a=p(e[n],s[n],r)?null:e[n];break}return!(!a||i.test(a)||u.test(a))&&("paren"===r?a.length>=15||/[。?!?!::,,;;]$/.test(a):/[::]$/.test(a)&&m.test(a))}(c,b[0].line,A,x))return N(!0);let T=new Set(b.map(e=>e.line)),I=[],E=[],_=null,C=[],R=[],M=(e,t)=>{for(let r of f(e))(!i.test(r)||!(r.length<80))&&(l.test(r)||r.length>=80&&/[。!?.!?;;]/.test(r))?C.push({text:r,range:g(r)}):t?I.push(r):_&&!E.some(e=>e.section===_)?_=`${_}
|
|
10
|
+
${r}`:I.push(r)},O=b[0].line,P=[];for(let e=0;e<O;e++)c[e]&&p(c[e],x[e],A)?(M(P.splice(0),!0),_=c[e],R=[]):P.push(c[e]);M(P,!0);for(let e=0;e<b.length;e++){let r=b[e].line,s=e+1<b.length?b[e+1].line:v;C.length&&(R=[...R.filter(e=>e.range),...C],C=[]);let i=s,o=null;for(let e=r+1;e<s;e++)if(c[e]&&!T.has(e)&&p(c[e],x[e],A)){i=e,o=c[e];break}let d=c.slice(r,i),u=f(d),m=[];for(;u.length>1&&l.test(u[u.length-1].slice(0,30));)m.unshift(u.pop());let h=m.length?u.join("\n"):n(d),w=b[e].value,y=R.filter(e=>!e.range||w>=e.range.from&&w<=e.range.to);for(let r of(E.push({label:b[e].label,text:function(e){let r=e.split("\n"),s=r[0]?.replace(t,"")??"",n=a(s);return n&&"cn"!==n.family&&(r[0]=s.slice(n.prefixLength)),r.join("\n")}(h),material:y.length?y.map(e=>e.text).join("\n\n"):null,section:_}),m))C.push({text:r,range:g(r)});null!==o&&(_=o,R=[],M(c.slice(i+1,s),!1))}let $=E.slice(60);return{questions:E.slice(0,60),ignored:[...I,...S,...$.map(e=>{var t;let r,s;return r=(t=e).text.trim(),(s=t.material?.trim())?`${s}
|
|
11
|
+
|
|
12
|
+
${r}`:r})],detected:!0,ambiguous:!1,candidateCount:E.length,overflow:$.length,tooLong:s}}])},767077,e=>{var t=e.i(303163);e.s(["f",0,function(e,r){let s=r.common?.messages?.analysisFailed||"Analysis failed, please try again",a=(0,t.d)(e);if(a){let e=r.errors??{};if(!(a in e))return a;let t=e[a];return"string"==typeof t?t:s}let n=(0,t.Z)(e);if(n.includes("fetch")||n.includes("network"))return r.errors?.AI_CONNECTION_FAILED||"网络连接失败";if("object"==typeof e&&null!==e&&"data"in e&&"string"==typeof e.data){let t="status"in e&&"number"==typeof e.status?e.status:"Error";return`${s} (${t})`}return s}])}])})();
|