@hiai-gg/docsmint 2.0.4 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -5
- package/dist/backend/index.js +94475 -92073
- package/dist/backend-account-runtime-cleanup.js +293 -292
- package/dist/backend-api-key-facade.js +6 -5
- package/dist/backend-pipeline-cancellation.js +287 -286
- package/dist/client.d.ts +33 -7
- package/dist/client.js +55 -1
- package/dist/frontend/CategoryDialog-CVJi5PJu.js +602 -0
- package/dist/frontend/{ConfirmDialog-B1MjKlVQ.js → ConfirmDialog-0JwB8mKN.js} +5 -8
- package/dist/frontend/{CreateSnapshotDialog-BTMoPFdj.js → CreateSnapshotDialog-BLrtuYs5.js} +63 -68
- package/dist/frontend/{DatePicker-Bmjko3X7.js → DatePicker-BwSb8TRv.js} +17 -29
- package/dist/frontend/{DeleteDialog-BkfIeKXO.js → DeleteDialog-s7Dr6bXg.js} +51 -56
- package/dist/frontend/{FolderNode-Do8pIfyA.js → FolderNode-Y7cV9xeX.js} +105 -106
- package/dist/frontend/{FolderTreeSelector-FyxhcHjr.js → FolderTreeSelector-BR3lYmPU.js} +18 -20
- package/dist/frontend/HiAiEditor-BQERr-cd.js +3077 -0
- package/dist/frontend/{HiaiDocsExtensionProvider-Cc3yzW5I.js → HiaiDocsExtensionProvider-A2nGddUR.js} +2 -3
- package/dist/frontend/{Icon-3EYzvNyk.js → Icon-CiHcxcpv.js} +1 -2
- package/dist/frontend/SettingsDialog-BvS74JZu.js +978 -0
- package/dist/frontend/{ShareDialog-Ddvl7xvb.js → ShareDialog-Bo50h_Oe.js} +23 -25
- package/dist/frontend/Sidebar-i0kbanpg.js +2123 -0
- package/dist/frontend/{TagCreateDialog-DQmMJe_E.js → TagCreateDialog-DhKfsfv3.js} +78 -86
- package/dist/frontend/action_cancel-BdsWzQKU.js +4 -0
- package/dist/frontend/action_close-CVhfLPRQ.js +4 -0
- package/dist/frontend/action_create-ByaroO1_.js +4 -0
- package/dist/frontend/action_delete-SRloglWY.js +4 -0
- package/dist/frontend/action_go_to-DO1bicF-.js +4 -0
- package/dist/frontend/action_loading-iQ0KsN6i.js +4 -0
- package/dist/frontend/action_save-DeqrZQwV.js +4 -0
- package/dist/frontend/api/attachments.js +1 -2
- package/dist/frontend/api/categories.js +1 -2
- package/dist/frontend/api/documents.js +1 -2
- package/dist/frontend/api/folders.js +1 -2
- package/dist/frontend/api/settings.js +1 -2
- package/dist/frontend/api/share.js +1 -2
- package/dist/frontend/api/tags.js +1 -2
- package/dist/frontend/{api-keys-DIwAdYkg.js → api-keys-B63imiLr.js} +2 -3
- package/dist/frontend/app-shell.js +55 -79
- package/dist/frontend/{attachments-C225gTA7.js → attachments-Bfly-sam.js} +2 -3
- package/dist/frontend/{auth-client-CXR-7mIO.js → auth-client-Dx7d9Tzo.js} +409 -343
- package/dist/frontend/{bundle-mjs-CZ3g1Uzr.js → bundle-mjs-clTO1WW-.js} +5 -23
- package/dist/frontend/{camera-DtgHzfVI.js → camera-DsdOPOcD.js} +2 -3
- package/dist/frontend/{categories-C8AAkhCR.js → categories-CusvHb5Y.js} +3 -4
- package/dist/frontend/{categories_update_error-4aSI8PTr.js → categories_update_error-Cn8DBBHv.js} +2 -3
- package/dist/frontend/{check-DVx65aSv.js → check-DiMZRkKS.js} +2 -3
- package/dist/frontend/{chevron-down-C2tbZ8Ol.js → chevron-down-CxFrMFDJ.js} +2 -3
- package/dist/frontend/{circle-check-BAN-D7yg.js → circle-check-B4F_qgPx.js} +2 -3
- package/dist/frontend/{client-GbtOH90i.js → client-BDdDd84W.js} +1 -2
- package/dist/frontend/{clipboard-Cgzxc0_R.js → clipboard-Dt1oW6nm.js} +1 -2
- package/dist/frontend/{clock-ByiB0SwQ.js → clock-dcpueRk-.js} +2 -3
- package/dist/frontend/collaboration.js +6 -12
- package/dist/frontend/components/category-dialog.js +1 -2
- package/dist/frontend/components/create-snapshot-dialog.js +1 -2
- package/dist/frontend/components/delete-dialog.js +1 -2
- package/dist/frontend/components/editor/compact-editor.js +2 -3
- package/dist/frontend/components/editor/document-editor.js +1 -2
- package/dist/frontend/components/editor/document-title.js +3 -4
- package/dist/frontend/components/editor/docx-serializer.js +123 -167
- package/dist/frontend/components/editor/extensions.js +1 -2
- package/dist/frontend/components/editor/markdown-toggle.js +5 -6
- package/dist/frontend/components/editor/markdown.js +1 -2
- package/dist/frontend/components/folder-node.js +1 -2
- package/dist/frontend/components/folder-tree-selector.js +1 -2
- package/dist/frontend/components/save-as-dialog.js +86 -90
- package/dist/frontend/components/settings.js +1 -2
- package/dist/frontend/components/share-dialog.js +1 -2
- package/dist/frontend/components/sidebar.js +1 -2
- package/dist/frontend/components/tag-create-dialog.js +1 -2
- package/dist/frontend/components/version-history.js +177 -180
- package/dist/frontend/{context-D0zPFXZ4.js → context-BguSRnCt.js} +1 -2
- package/dist/frontend/{copy-CRzvfZGb.js → copy-Bag46YaR.js} +2 -3
- package/dist/frontend/dashboard.js +666 -690
- package/dist/frontend/{db-Dya0HRhS.js → db-B1ZV452J.js} +22 -39
- package/dist/frontend/{dialog-a_ZcpEC5.js → dialog-C0Bpok1d.js} +10 -18
- package/dist/frontend/{dist-CcHOStsA.js → dist-BlcV_BOY.js} +2 -3
- package/dist/frontend/{dist-qd_OnyUC.js → dist-DjId3RKL.js} +8 -21
- package/dist/frontend/dist-Dl9qg10h.js +301 -0
- package/dist/frontend/{dndzone-CDhrbpTg.js → dndzone-C62yjeG3.js} +38 -53
- package/dist/frontend/doc-tabs.js +1 -2
- package/dist/frontend/doc_title_label-BOuZzvqv.js +4 -0
- package/dist/frontend/doc_title_placeholder-ZxpdWWEn.js +4 -0
- package/dist/frontend/{document-drop-coordinator-Da7HcXgv.js → document-drop-coordinator-C_o93kKW.js} +3 -4
- package/dist/frontend/document-drop-coordinator.js +1 -2
- package/dist/frontend/{documents-CwCs1rA7.js → documents-CDJb8dv-.js} +4 -8
- package/dist/frontend/{dropdown-menu-DrHYReIC.js → dropdown-menu-B3nk2aM-.js} +13 -24
- package/dist/frontend/{editor-content-sanitizer-CWjqiz0T.js → editor-content-sanitizer-5MjSVPVn.js} +1 -2
- package/dist/frontend/editor-preferences.js +1 -2
- package/dist/frontend/{editor-preferences.svelte-Bt_A9k7n.js → editor-preferences.svelte-BpTE4mbz.js} +3 -5
- package/dist/frontend/{editorExtensions-DPR-CjMu.js → editorExtensions-DbiFj4tn.js} +3 -4
- package/dist/frontend/{editor_markdown_placeholder-BIWDUF1E.js → editor_markdown_placeholder-BztIY9Ci.js} +2 -3
- package/dist/frontend/{ellipsis-vertical-qxNgoXu-.js → ellipsis-vertical-Oymsv1R4.js} +2 -3
- package/dist/frontend/{error_dismiss-Dx_JbRjs.js → error_dismiss-C651ZdWI.js} +2 -3
- package/dist/frontend/error_generic-BlWqOE-a.js +4 -0
- package/dist/frontend/extension.js +1 -2
- package/dist/frontend/{folder-D74E-Kdp.js → folder-BpmB_sAy.js} +3 -5
- package/dist/frontend/folder-refresh.js +1 -2
- package/dist/frontend/{folders-CC0UWkZH.js → folders-DgKSovXa.js} +2 -3
- package/dist/frontend/{folders_rename-BJo4Gipq.js → folders_rename-Cxbg5GIw.js} +2 -3
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/i18n.js +144 -145
- package/dist/frontend/{identity-BOA7Jejv.js → identity-B7HeOzDJ.js} +4 -5
- package/dist/frontend/{input-Q_7qCfnU.js → input-CbeB9220.js} +2 -3
- package/dist/frontend/keyboard.js +1 -2
- package/dist/frontend/{keyboard.svelte-CApmX0vl.js → keyboard.svelte-BBUdhTsM.js} +2 -3
- package/dist/frontend/{label-Dj8FDEhf.js → label-CfBWf3gI.js} +2 -3
- package/dist/frontend/{lib-aUbBbIW2.js → lib-CITdCbKa.js} +176 -365
- package/dist/frontend/{loader-circle-D3t5NkvC.js → loader-circle-skKwfRCB.js} +2 -3
- package/dist/frontend/markdown-6E9TWC6V.js +11 -0
- package/dist/frontend/offline/identity.js +1 -2
- package/dist/frontend/{popper-layer-force-mount-CNtiLgbV.js → popper-layer-force-mount-BG0eyrCk.js} +112 -284
- package/dist/frontend/{resolve-BG4HgzpN.js → resolve-DbT-KhGZ.js} +2 -3
- package/dist/frontend/{rolldown-runtime-DArdT4gl.js → rolldown-runtime-CwxnZyOB.js} +2 -3
- package/dist/frontend/{rotate-ccw-B1ybQ8oQ.js → rotate-ccw-DAUX7np7.js} +2 -3
- package/dist/frontend/{route-context-DYQlUfzL.js → route-context-6OHiGtfb.js} +2 -4
- package/dist/frontend/{runtime-CwWSo6c9.js → runtime-CGUiMzK6.js} +1 -2
- package/dist/frontend/{schemas-1Na35n71.js → schemas-YXxhj5o8.js} +850 -880
- package/dist/frontend/scroll_to_top_aria-lJc2RSx_.js +4 -0
- package/dist/frontend/{search-preferences-B1GdbdUc.js → search-preferences-DuLDczRu.js} +1 -2
- package/dist/frontend/search.js +277 -292
- package/dist/frontend/{search_title-DOC0cPlQ.js → search_title-BETwQYJq.js} +2 -3
- package/dist/frontend/{select-value-BkI1W1bn.js → select-value-BY5Hw6Rl.js} +28 -65
- package/dist/frontend/{settings-BRcYFQa_.js → settings-DyePuqjp.js} +3 -4
- package/dist/frontend/{share-D5yo0JOh.js → share-3gWTTYvH.js} +2 -3
- package/dist/frontend/{share-context-BJ4GF4yT.js → share-context-C2xyVP9M.js} +29 -37
- package/dist/frontend/{share_copied-DPxVzfWh.js → share_copied-BuAnmpbz.js} +2 -3
- package/dist/frontend/{share_toggle_password-DdxfIjj1.js → share_toggle_password-LEYUeHWr.js} +2 -3
- package/dist/frontend/shared-document.js +27 -36
- package/dist/frontend/{sidebar_uncategorized-qJ2_Aonf.js → sidebar_uncategorized-C5PGOflV.js} +2 -3
- package/dist/frontend/{sort_relevance-DwYX5MO9.js → sort_relevance-DpCVLby_.js} +2 -3
- package/dist/frontend/{subfolders-refresh-store.svelte-DxP21a1c.js → subfolders-refresh-store.svelte-CeyqvNpu.js} +1 -2
- package/dist/frontend/{tag-qbTBLj-g.js → tag-Wdfe0rKU.js} +3 -5
- package/dist/frontend/{tag-store.svelte-ogVCMCbv.js → tag-store.svelte-C9VYWqLQ.js} +2 -3
- package/dist/frontend/{tags-CF_cqzSV.js → tags-DlDVothf.js} +3 -4
- package/dist/frontend/{tags_load_error-BKjA1pI0.js → tags_load_error-BINNpPPV.js} +2 -3
- package/dist/frontend/{tags_new-BiNAJ9Bx.js → tags_new-Dw0Uy43-.js} +2 -3
- package/dist/frontend/{textarea-BNK0LFUK.js → textarea-D6emvAwM.js} +2 -3
- package/dist/frontend/theme.js +2 -3
- package/dist/frontend/{theme.svelte-BRdxXd-B.js → theme.svelte-BiXvrqwh.js} +7 -23
- package/dist/frontend/{theme_system-BBNUhYKh.js → theme_system-YIfa_2Xt.js} +2 -3
- package/dist/frontend/utils/clipboard.js +1 -2
- package/dist/frontend/utils/dndzone.js +1 -2
- package/dist/frontend/{utils-BovMJHdA.js → utils-CnAmIMwr.js} +2 -3
- package/dist/frontend/utils-DH0uqK40.js +6 -0
- package/dist/frontend/utils.js +1 -2
- package/dist/frontend/version_create_snapshot-D8xjbuCq.js +4 -0
- package/dist/frontend/{version_restored_from-dVRN3Zdk.js → version_restored_from-DYFFSuQj.js} +2 -3
- package/dist/frontend/{version_snapshot_label_placeholder-DrMikux0.js → version_snapshot_label_placeholder-BhKq1NQ7.js} +2 -3
- package/dist/frontend/{weekday_we-C5H_M-df.js → weekday_we-BxbzNVWR.js} +2 -3
- package/dist/frontend/{x-CvSSnrjl.js → x-CBUgPygC.js} +2 -3
- package/dist/frontend/{yjs-VUcKqaKW.js → yjs-BbwnvxgY.js} +9 -23
- package/dist/frontend-ssr/api/attachments.js +2 -3
- package/dist/frontend-ssr/api/categories.js +1 -2
- package/dist/frontend-ssr/api/documents.js +1 -2
- package/dist/frontend-ssr/api/folders.js +1 -2
- package/dist/frontend-ssr/api/settings.js +1 -2
- package/dist/frontend-ssr/api/share.js +2 -3
- package/dist/frontend-ssr/api/tags.js +1 -2
- package/dist/frontend-ssr/app-shell.js +19 -28
- package/dist/frontend-ssr/assets/{CategoryDialog-DuZLLlt7.js → CategoryDialog-2CCX508O.js} +17 -20
- package/dist/frontend-ssr/assets/{ConfirmDialog-0WVu9BCE.js → ConfirmDialog-Cc6lcY1N.js} +8 -14
- package/dist/frontend-ssr/assets/{CreateSnapshotDialog-3vhDTFNu.js → CreateSnapshotDialog-BB8fXF9W.js} +9 -10
- package/dist/frontend-ssr/assets/{DatePicker-t12leL2Y.js → DatePicker-CfzKzipR.js} +9 -15
- package/dist/frontend-ssr/assets/{DeleteDialog-B0AU1fJR.js → DeleteDialog-DRU4UgOW.js} +4 -5
- package/dist/frontend-ssr/assets/{FolderNode-C-B-s8x1.js → FolderNode-Dg_5-orQ.js} +11 -12
- package/dist/frontend-ssr/assets/{FolderTreeSelector-DdQuEcj0.js → FolderTreeSelector-D0reTdFS.js} +5 -7
- package/dist/frontend-ssr/assets/{HiAiEditor-Bj6tiE97.js → HiAiEditor-DeHWAIj-.js} +44 -69
- package/dist/frontend-ssr/assets/{HiaiDocsExtensionProvider-BRKWmcDd.js → HiaiDocsExtensionProvider-D6cGL-9s.js} +2 -3
- package/dist/frontend-ssr/assets/{Icon-DE_3EnuF.js → Icon-CrIRbT5O.js} +4 -8
- package/dist/frontend-ssr/assets/{SettingsDialog-h4SFwpUa.js → SettingsDialog-BpHY3IMb.js} +29 -40
- package/dist/frontend-ssr/assets/{ShareDialog-CpE9zd_f.js → ShareDialog-CY40nWZJ.js} +7 -9
- package/dist/frontend-ssr/assets/{Sidebar-BFBpsd3L.js → Sidebar-fpYk5MGO.js} +55 -63
- package/dist/frontend-ssr/assets/{TagCreateDialog-DBHO1DPU.js → TagCreateDialog-C2tpdEuj.js} +13 -14
- package/dist/frontend-ssr/assets/{action_cancel-OVgQDP5Q.js → action_cancel-CsBbxW0m.js} +2 -3
- package/dist/frontend-ssr/assets/{action_close-DagDyMXk.js → action_close-lFKBqBwg.js} +2 -3
- package/dist/frontend-ssr/assets/{action_create-hqJWjyqh.js → action_create-BV4ZOcQW.js} +2 -3
- package/dist/frontend-ssr/assets/{action_delete-B1-16jSo.js → action_delete-CNmRhKQP.js} +2 -3
- package/dist/frontend-ssr/assets/{action_go_to-DQScgw7P.js → action_go_to-tN5I26xM.js} +2 -3
- package/dist/frontend-ssr/assets/{action_save-Bx7vlLZI.js → action_save-YCfMiKb4.js} +2 -3
- package/dist/frontend-ssr/assets/{api-keys-CHOrbU-Q.js → api-keys-G6oimJIv.js} +2 -3
- package/dist/frontend-ssr/assets/{auth-client-BC4hSFKF.js → auth-client-BnnnJDAb.js} +368 -256
- package/dist/frontend-ssr/assets/{camera-B6ldo_Js.js → camera-OYNSMvMd.js} +2 -3
- package/dist/frontend-ssr/assets/{categories-C_dxFoHi.js → categories-bBPviKjl.js} +2 -3
- package/dist/frontend-ssr/assets/{categories_update_error-DkKgsqdD.js → categories_update_error-Bfx5vtvt.js} +11 -21
- package/dist/frontend-ssr/assets/{chevron-down-DQcr6JUc.js → chevron-down-DB6YsSbQ.js} +2 -3
- package/dist/frontend-ssr/assets/{chevron-right-9szrliZx.js → chevron-right-DOt2uY6b.js} +2 -3
- package/dist/frontend-ssr/assets/{circle-check-BgP9MRRv.js → circle-check-DQhTm9YR.js} +2 -3
- package/dist/frontend-ssr/assets/{client-rfwQYYHY.js → client-B2AniXwV.js} +1 -2
- package/dist/frontend-ssr/assets/{clipboard-CXOaoz2W.js → clipboard-CXKnyYba.js} +1 -2
- package/dist/frontend-ssr/assets/{clock-roNtGlT6.js → clock-B08dVWtf.js} +2 -3
- package/dist/frontend-ssr/assets/{context-Bi_mO-NS.js → context-C_xxvxnR.js} +1 -2
- package/dist/frontend-ssr/assets/{copy-BYqYnBIQ.js → copy-2jsznHar.js} +2 -3
- package/dist/frontend-ssr/assets/{db-C3rFdTZa.js → db-BEKLU5Fc.js} +2 -3
- package/dist/frontend-ssr/assets/{dialog-SqCnTT43.js → dialog-C6U-DqLr.js} +9 -17
- package/dist/frontend-ssr/assets/{dist-CaZQ1FhA.js → dist-DqXTz_zE.js} +9 -12
- package/dist/frontend-ssr/assets/{dist-CqxHwOlp.js → dist-ip9bPdma.js} +3 -6
- package/dist/frontend-ssr/assets/{dndzone-CnTCMhPd.js → dndzone-Dx3jt_e4.js} +4 -6
- package/dist/frontend-ssr/assets/{doc_title_label-Ev_ltlh3.js → doc_title_label-CE_l-Gum.js} +2 -3
- package/dist/frontend-ssr/assets/{doc_title_placeholder-DSHpUb7w.js → doc_title_placeholder-7_i7PtG6.js} +2 -3
- package/dist/frontend-ssr/assets/{document-drop-coordinator-CEaYACsC.js → document-drop-coordinator-BVytYy2K.js} +1 -2
- package/dist/frontend-ssr/assets/{documents-CEuA1V6N.js → documents-B_wpQFTh.js} +2 -3
- package/dist/frontend-ssr/assets/{dropdown-menu-CE6U0f1b.js → dropdown-menu-BS5fcN9l.js} +12 -23
- package/dist/frontend-ssr/assets/{editor-content-sanitizer-Gjm93iR-.js → editor-content-sanitizer-CIdFjBSC.js} +1 -2
- package/dist/frontend-ssr/assets/{editor-preferences.svelte-iI5jJM1x.js → editor-preferences.svelte-CdAXTd-I.js} +2 -4
- package/dist/frontend-ssr/assets/{editorExtensions-rhletNji.js → editorExtensions-2O7O2Nhv.js} +2 -3
- package/dist/frontend-ssr/assets/{editor_markdown_placeholder-BpezdkOr.js → editor_markdown_placeholder-CAeLJjFT.js} +3 -5
- package/dist/frontend-ssr/assets/{editor_toolbar_undo-CKJAOqv2.js → editor_toolbar_undo-CVCfQIS1.js} +29 -57
- package/dist/frontend-ssr/assets/{ellipsis-vertical-Cg1MrZsl.js → ellipsis-vertical-IFHt2NM1.js} +2 -3
- package/dist/frontend-ssr/assets/{error_generic-DTK0kwxT.js → error_generic-BB80i0Vk.js} +3 -5
- package/dist/frontend-ssr/assets/{folder-DHB-CEcQ.js → folder-CXa1_bm5.js} +2 -3
- package/dist/frontend-ssr/assets/{folders-BOXeb9hz.js → folders-CTLqWbMm.js} +2 -3
- package/dist/frontend-ssr/assets/{folders_rename-DvciOb6K.js → folders_rename-ydbfwQlj.js} +7 -13
- package/dist/frontend-ssr/assets/{identity-DNIo1bgc.js → identity-DTz1SQwC.js} +2 -3
- package/dist/frontend-ssr/assets/{input-DVrBVPgs.js → input-Bxw9sFF0.js} +2 -3
- package/dist/frontend-ssr/assets/{keyboard.svelte-BgF47N3L.js → keyboard.svelte-njehUCm3.js} +1 -2
- package/dist/frontend-ssr/assets/{label-vtCK3pTp.js → label-CMWedjs6.js} +2 -3
- package/dist/frontend-ssr/assets/{loader-circle-D3NWhCif.js → loader-circle-zbKj9Qb-.js} +2 -3
- package/dist/frontend-ssr/assets/{markdown-Co31-Tl2.js → markdown-BmIhDQp7.js} +2 -3
- package/dist/frontend-ssr/assets/{popper-layer-force-mount-C4dMMt-f.js → popper-layer-force-mount-CSHZsG2E.js} +78 -156
- package/dist/frontend-ssr/assets/{resolve-BqHozBXl.js → resolve-Wqdff4CL.js} +1 -2
- package/dist/frontend-ssr/assets/{rotate-ccw-DNf3nwMD.js → rotate-ccw-B7SaTFWf.js} +2 -3
- package/dist/frontend-ssr/assets/{route-context-BPRerEtZ.js → route-context-BsqLFt5Y.js} +2 -4
- package/dist/frontend-ssr/assets/{runtime-O78RzRqx.js → runtime-BX6-jTn_.js} +1 -2
- package/dist/frontend-ssr/assets/{scroll_to_top_aria-BN4ZfOnM.js → scroll_to_top_aria-CAYSiGHO.js} +2 -3
- package/dist/frontend-ssr/assets/{search_title-CKUsQDT0.js → search_title-C7NVXXq3.js} +2 -3
- package/dist/frontend-ssr/assets/{search_toggle_filters-hS9rvQhC.js → search_toggle_filters-Bq_YVD8s.js} +15 -29
- package/dist/frontend-ssr/assets/{select-value-Ce5c_fuA.js → select-value-TgslfiUB.js} +18 -34
- package/dist/frontend-ssr/assets/{settings-DWCpfCPj.js → settings-B1MA_FjO.js} +3 -4
- package/dist/frontend-ssr/assets/{share-context-B4UpvTSw.js → share-context-RVh8AExX.js} +17 -22
- package/dist/frontend-ssr/assets/{share_copied-BxU9rjXG.js → share_copied-CrwEwkb3.js} +31 -61
- package/dist/frontend-ssr/assets/{share_toggle_password-C6OmroqR.js → share_toggle_password-Co56z0Ha.js} +11 -21
- package/dist/frontend-ssr/assets/{sidebar_uncategorized-Dx-LTd5w.js → sidebar_uncategorized-COWdmZ3d.js} +6 -11
- package/dist/frontend-ssr/assets/{subfolders-refresh-store.svelte-CXHxQWKh.js → subfolders-refresh-store.svelte-LxG18U0n.js} +1 -2
- package/dist/frontend-ssr/assets/{tag-Cqv0fWVG.js → tag-BGhtDKpP.js} +3 -5
- package/dist/frontend-ssr/assets/{tag-store.svelte-QRysvGKe.js → tag-store.svelte-CUUgAaDD.js} +2 -3
- package/dist/frontend-ssr/assets/{tags-BBCoFYro.js → tags-C7u-LBsl.js} +2 -3
- package/dist/frontend-ssr/assets/{tags_load_error-CPrc6Gzs.js → tags_load_error-DW4FbHvr.js} +19 -37
- package/dist/frontend-ssr/assets/{tags_new-VmMr9v2V.js → tags_new-Dr3ByMPZ.js} +4 -7
- package/dist/frontend-ssr/assets/{textarea-BdjOJJVb.js → textarea-Bz5Tz4rw.js} +2 -3
- package/dist/frontend-ssr/assets/{theme.svelte-D6bbaJ9m.js → theme.svelte-CdHah46l.js} +3 -5
- package/dist/frontend-ssr/assets/{theme_system-BucaNntV.js → theme_system-E97FASeq.js} +19 -37
- package/dist/frontend-ssr/assets/{utils-DvZnctjz.js → utils-085zSPe5.js} +1 -2
- package/dist/frontend-ssr/assets/{utils-D3X7I8nz.js → utils-DF6CmRDX.js} +1 -2
- package/dist/frontend-ssr/assets/{version_create_snapshot-COHzwjle.js → version_create_snapshot-DeeYB7bb.js} +2 -3
- package/dist/frontend-ssr/assets/{version_restored_from-CertjFDl.js → version_restored_from-CTt2LM4A.js} +13 -25
- package/dist/frontend-ssr/assets/{version_snapshot_label_placeholder-Cy_rMCij.js → version_snapshot_label_placeholder-BbGD9YuN.js} +12 -23
- package/dist/frontend-ssr/assets/{weekday_we-DrI3U230.js → weekday_we-BzGQ-iFc.js} +22 -43
- package/dist/frontend-ssr/collaboration.js +2 -4
- package/dist/frontend-ssr/components/category-dialog.js +1 -2
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -2
- package/dist/frontend-ssr/components/delete-dialog.js +1 -2
- package/dist/frontend-ssr/components/editor/compact-editor.js +2 -3
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -2
- package/dist/frontend-ssr/components/editor/document-title.js +3 -4
- package/dist/frontend-ssr/components/editor/docx-serializer.js +1 -2
- package/dist/frontend-ssr/components/editor/extensions.js +1 -2
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +4 -5
- package/dist/frontend-ssr/components/editor/markdown.js +1 -2
- package/dist/frontend-ssr/components/folder-node.js +1 -2
- package/dist/frontend-ssr/components/folder-tree-selector.js +1 -2
- package/dist/frontend-ssr/components/save-as-dialog.js +12 -13
- package/dist/frontend-ssr/components/settings.js +1 -2
- package/dist/frontend-ssr/components/share-dialog.js +1 -2
- package/dist/frontend-ssr/components/sidebar.js +1 -2
- package/dist/frontend-ssr/components/tag-create-dialog.js +1 -2
- package/dist/frontend-ssr/components/version-history.js +18 -21
- package/dist/frontend-ssr/dashboard.js +64 -88
- package/dist/frontend-ssr/doc-tabs.js +1 -2
- package/dist/frontend-ssr/document-drop-coordinator.js +1 -2
- package/dist/frontend-ssr/editor-preferences.js +1 -2
- package/dist/frontend-ssr/extension.js +1 -2
- package/dist/frontend-ssr/folder-refresh.js +1 -2
- package/dist/frontend-ssr/i18n.js +315 -603
- package/dist/frontend-ssr/keyboard.js +1 -2
- package/dist/frontend-ssr/offline/identity.js +1 -2
- package/dist/frontend-ssr/search.js +17 -20
- package/dist/frontend-ssr/shared-document.js +5 -8
- package/dist/frontend-ssr/theme.js +2 -3
- package/dist/frontend-ssr/utils/clipboard.js +1 -2
- package/dist/frontend-ssr/utils/dndzone.js +1 -2
- package/dist/frontend-ssr/utils.js +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lifecycle-runtime.js +3998 -17872
- package/dist/mcp-cli.js +357 -78
- package/dist/mcp-server.d.ts +92 -23
- package/dist/mcp-server.js +525 -78
- package/dist/types.d.ts +68 -1
- package/package.json +5 -5
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +3 -1
- package/server.json +2 -2
- package/dist/frontend/CategoryDialog-CJeAYxcd.js +0 -630
- package/dist/frontend/HiAiEditor-DDpfdQEg.js +0 -3129
- package/dist/frontend/SettingsDialog-DzlYW50I.js +0 -991
- package/dist/frontend/Sidebar-rFiVen96.js +0 -2149
- package/dist/frontend/action_cancel-Cuxsznzz.js +0 -5
- package/dist/frontend/action_close-BJm_52wm.js +0 -5
- package/dist/frontend/action_create-CtBQrRuj.js +0 -5
- package/dist/frontend/action_delete-BXBIzvn0.js +0 -5
- package/dist/frontend/action_go_to-VmK5jmEk.js +0 -5
- package/dist/frontend/action_loading-BLCGJVA9.js +0 -5
- package/dist/frontend/action_save-BRN2Z_GP.js +0 -5
- package/dist/frontend/dist-DcHl92QO.js +0 -316
- package/dist/frontend/doc_title_label-DS9jSIh2.js +0 -5
- package/dist/frontend/doc_title_placeholder-DBQpM1aH.js +0 -5
- package/dist/frontend/error_generic-CzNtmBT4.js +0 -5
- package/dist/frontend/markdown-O9YJA70S.js +0 -12
- package/dist/frontend/scroll_to_top_aria-CvkNF_Hu.js +0 -5
- package/dist/frontend/utils-BlHvR6OL.js +0 -7
- package/dist/frontend/version_create_snapshot-3bu-0qzH.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/broadcast-channel.mjs
|
|
2
2
|
var e = Symbol.for("better-auth:broadcast-channel"), t = () => Math.floor(Date.now() / 1e3), n = class {
|
|
3
3
|
listeners = /* @__PURE__ */ new Set();
|
|
4
4
|
name;
|
|
@@ -11,7 +11,7 @@ var e = Symbol.for("better-auth:broadcast-channel"), t = () => Math.floor(Date.n
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
post(e) {
|
|
14
|
-
if (
|
|
14
|
+
if (typeof window < "u") try {
|
|
15
15
|
localStorage.setItem(this.name, JSON.stringify({
|
|
16
16
|
...e,
|
|
17
17
|
timestamp: t()
|
|
@@ -23,7 +23,7 @@ var e = Symbol.for("better-auth:broadcast-channel"), t = () => Math.floor(Date.n
|
|
|
23
23
|
let e = (e) => {
|
|
24
24
|
if (e.key !== this.name) return;
|
|
25
25
|
let t = JSON.parse(e.newValue ?? "{}");
|
|
26
|
-
t?.event
|
|
26
|
+
t?.event === "session" && t?.data && this.listeners.forEach((e) => e(t));
|
|
27
27
|
};
|
|
28
28
|
return window.addEventListener("storage", e), () => {
|
|
29
29
|
window.removeEventListener("storage", e);
|
|
@@ -33,8 +33,7 @@ var e = Symbol.for("better-auth:broadcast-channel"), t = () => Math.floor(Date.n
|
|
|
33
33
|
function r(t = "better-auth.message") {
|
|
34
34
|
return globalThis[e] || (globalThis[e] = new n(t)), globalThis[e];
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
//#region ../node_modules/.bun/nanostores@1.4.0/node_modules/nanostores/clean-stores/index.js
|
|
36
|
+
// ../node_modules/.bun/nanostores@1.4.0/node_modules/nanostores/clean-stores/index.js
|
|
38
37
|
var i = Symbol("clean"), a = [], o = 0, s = null, c = 4, l = globalThis.nanostoresGlobal ||= { epoch: 0 }, u = () => {
|
|
39
38
|
for (o = 0; o < a.length; o += c) a[o](a[o + 1].value, a[o + 2], a[o + 3]);
|
|
40
39
|
a.length = 0;
|
|
@@ -131,8 +130,7 @@ var i = Symbol("clean"), a = [], o = 0, s = null, c = 4, l = globalThis.nanostor
|
|
|
131
130
|
e.listen = n, e.off = r;
|
|
132
131
|
};
|
|
133
132
|
});
|
|
134
|
-
|
|
135
|
-
//#region ../node_modules/.bun/better-auth@1.7.2+7ee5f890295c53f0/node_modules/better-auth/dist/client/equality.mjs
|
|
133
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/equality.mjs
|
|
136
134
|
function b(e) {
|
|
137
135
|
if (typeof e != "object" || !e) return !1;
|
|
138
136
|
let t = Object.getPrototypeOf(e);
|
|
@@ -158,9 +156,8 @@ function S(e, t) {
|
|
|
158
156
|
t(e.value, n) && r();
|
|
159
157
|
});
|
|
160
158
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
var C = Symbol.for("better-auth:focus-manager"), ee = class {
|
|
159
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/focus-manager.mjs
|
|
160
|
+
var C = Symbol.for("better-auth:focus-manager"), w = class {
|
|
164
161
|
listeners = /* @__PURE__ */ new Set();
|
|
165
162
|
subscribe(e) {
|
|
166
163
|
return this.listeners.add(e), () => {
|
|
@@ -180,11 +177,10 @@ var C = Symbol.for("better-auth:focus-manager"), ee = class {
|
|
|
180
177
|
};
|
|
181
178
|
}
|
|
182
179
|
};
|
|
183
|
-
function
|
|
184
|
-
return globalThis[C] || (globalThis[C] = new
|
|
180
|
+
function ee() {
|
|
181
|
+
return globalThis[C] || (globalThis[C] = new w()), globalThis[C];
|
|
185
182
|
}
|
|
186
|
-
|
|
187
|
-
//#region ../node_modules/.bun/better-auth@1.7.2+7ee5f890295c53f0/node_modules/better-auth/dist/client/online-manager.mjs
|
|
183
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/online-manager.mjs
|
|
188
184
|
var T = Symbol.for("better-auth:online-manager"), te = class {
|
|
189
185
|
listeners = /* @__PURE__ */ new Set();
|
|
190
186
|
isOnline = typeof navigator < "u" ? navigator.onLine : !0;
|
|
@@ -207,14 +203,8 @@ var T = Symbol.for("better-auth:online-manager"), te = class {
|
|
|
207
203
|
function E() {
|
|
208
204
|
return globalThis[T] || (globalThis[T] = new te()), globalThis[T];
|
|
209
205
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
var ne = {
|
|
213
|
-
proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
|
|
214
|
-
constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
|
|
215
|
-
protoShort: /"__proto__"\s*:/,
|
|
216
|
-
constructorShort: /"constructor"\s*:/
|
|
217
|
-
}, re = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, D = {
|
|
206
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/parser.mjs
|
|
207
|
+
var ne = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, D = {
|
|
218
208
|
true: !0,
|
|
219
209
|
false: !1,
|
|
220
210
|
null: null,
|
|
@@ -222,76 +212,70 @@ var ne = {
|
|
|
222
212
|
nan: NaN,
|
|
223
213
|
infinity: Infinity,
|
|
224
214
|
"-infinity": -Infinity
|
|
225
|
-
},
|
|
226
|
-
function
|
|
215
|
+
}, re = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;
|
|
216
|
+
function ie(e) {
|
|
227
217
|
return e instanceof Date && !isNaN(e.getTime());
|
|
228
218
|
}
|
|
229
|
-
function
|
|
230
|
-
let t =
|
|
219
|
+
function ae(e) {
|
|
220
|
+
let t = re.exec(e);
|
|
231
221
|
if (!t) return null;
|
|
232
222
|
let [, n, r, i, a, o, s, c, l, u, d] = t, f = new Date(Date.UTC(parseInt(n, 10), parseInt(r, 10) - 1, parseInt(i, 10), parseInt(a, 10), parseInt(o, 10), parseInt(s, 10), c ? parseInt(c.padEnd(3, "0"), 10) : 0));
|
|
233
223
|
if (l) {
|
|
234
224
|
let e = (parseInt(u, 10) * 60 + parseInt(d, 10)) * (l === "+" ? -1 : 1);
|
|
235
225
|
f.setUTCMinutes(f.getUTCMinutes() + e);
|
|
236
226
|
}
|
|
237
|
-
return
|
|
227
|
+
return ie(f) ? f : null;
|
|
238
228
|
}
|
|
239
|
-
function
|
|
229
|
+
function oe(e, t = {}) {
|
|
240
230
|
let { strict: n = !1, warnings: r = !1, reviver: i, parseDates: a = !0 } = t;
|
|
241
231
|
if (typeof e != "string") return e;
|
|
242
232
|
let o = e.trim(), s = o.toLowerCase();
|
|
243
233
|
if (s.length <= 9 && s in D) return D[s];
|
|
244
|
-
if (!
|
|
234
|
+
if (!ne.test(o)) {
|
|
245
235
|
if (n) throw SyntaxError("[better-json] Invalid JSON");
|
|
246
236
|
return e;
|
|
247
237
|
}
|
|
248
|
-
if (Object.entries(ne).some(([e, t]) => {
|
|
249
|
-
let n = t.test(o);
|
|
250
|
-
return n && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`), n;
|
|
251
|
-
}) && n) throw Error("[better-json] Potential prototype pollution attempt detected");
|
|
252
238
|
try {
|
|
253
239
|
return JSON.parse(o, (e, t) => {
|
|
254
240
|
if (e === "__proto__" || e === "constructor" && t && typeof t == "object" && "prototype" in t) {
|
|
241
|
+
if (n) throw Error("[better-json] Potential prototype pollution attempt detected");
|
|
255
242
|
r && console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
243
|
+
} else {
|
|
244
|
+
if (a && typeof t == "string") {
|
|
245
|
+
let e = ae(t);
|
|
246
|
+
if (e) return e;
|
|
247
|
+
}
|
|
248
|
+
return i ? i(e, t) : t;
|
|
261
249
|
}
|
|
262
|
-
return i ? i(e, t) : t;
|
|
263
250
|
});
|
|
264
251
|
} catch (t) {
|
|
265
252
|
if (n) throw t;
|
|
266
253
|
return e;
|
|
267
254
|
}
|
|
268
255
|
}
|
|
269
|
-
function
|
|
270
|
-
return
|
|
256
|
+
function se(e, t = { strict: !0 }) {
|
|
257
|
+
return oe(e, t);
|
|
271
258
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
259
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/query-atom.mjs
|
|
260
|
+
var ce = Symbol.for("better-auth:auth-query");
|
|
261
|
+
function le(e) {
|
|
262
|
+
let t = /* @__PURE__ */ d(e);
|
|
263
|
+
return Object.defineProperty(t, ce, { value: !0 }), t;
|
|
264
|
+
}
|
|
265
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/session-refresh.mjs
|
|
266
|
+
var O = () => Math.floor(Date.now() / 1e3), ue = 5;
|
|
267
|
+
function de(e) {
|
|
276
268
|
let { fetchSession: t, shouldPollSession: n = () => !0, sessionSignal: i, options: a = {} } = e, o = a.sessionOptions?.refetchInterval ?? 0, s = a.sessionOptions?.refetchOnWindowFocus ?? !0, c = a.sessionOptions?.refetchWhenOffline ?? !1, l = {
|
|
277
269
|
isInitialized: !1,
|
|
278
270
|
lastSessionRequest: 0
|
|
279
271
|
}, u = () => c || E().isOnline, d = (e) => {
|
|
280
272
|
if (u()) {
|
|
281
|
-
if (e?.event === "storage")
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
if (e?.event === "poll") {
|
|
286
|
-
l.lastSessionRequest = O(), t();
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
if (e?.event === "visibilitychange") {
|
|
290
|
-
if (O() - l.lastSessionRequest < le) return;
|
|
273
|
+
if (e?.event === "storage") t();
|
|
274
|
+
else if (e?.event === "poll") l.lastSessionRequest = O(), t();
|
|
275
|
+
else if (e?.event === "visibilitychange") {
|
|
276
|
+
if (O() - l.lastSessionRequest < ue) return;
|
|
291
277
|
l.lastSessionRequest = O(), t();
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
t();
|
|
278
|
+
} else t();
|
|
295
279
|
}
|
|
296
280
|
}, f = (e) => {
|
|
297
281
|
r().post({
|
|
@@ -308,7 +292,7 @@ function ue(e) {
|
|
|
308
292
|
d({ event: "storage" });
|
|
309
293
|
});
|
|
310
294
|
}, h = () => {
|
|
311
|
-
s && (l.unsubscribeFocus =
|
|
295
|
+
s && (l.unsubscribeFocus = ee().subscribe(() => {
|
|
312
296
|
d({ event: "visibilitychange" });
|
|
313
297
|
}));
|
|
314
298
|
}, g = () => {
|
|
@@ -322,7 +306,7 @@ function ue(e) {
|
|
|
322
306
|
};
|
|
323
307
|
return {
|
|
324
308
|
init: () => {
|
|
325
|
-
l.isInitialized || (l.isInitialized = !0, p(), m(), h(), g(), _(), l.cleanupBroadcastSetup = r().setup(), l.cleanupFocusSetup =
|
|
309
|
+
l.isInitialized || (l.isInitialized = !0, p(), m(), h(), g(), _(), l.cleanupBroadcastSetup = r().setup(), l.cleanupFocusSetup = ee().setup(), l.cleanupOnlineSetup = E().setup());
|
|
326
310
|
},
|
|
327
311
|
cleanup: () => {
|
|
328
312
|
l.isInitialized && (l.pollInterval &&= (clearInterval(l.pollInterval), void 0), l.unsubscribeBroadcast &&= (l.unsubscribeBroadcast(), void 0), l.unsubscribeFocus &&= (l.unsubscribeFocus(), void 0), l.unsubscribeOnline &&= (l.unsubscribeOnline(), void 0), l.unsubscribeSignal &&= (l.unsubscribeSignal(), void 0), l.cleanupBroadcastSetup &&= (l.cleanupBroadcastSetup(), void 0), l.cleanupFocusSetup &&= (l.cleanupFocusSetup(), void 0), l.cleanupOnlineSetup &&= (l.cleanupOnlineSetup(), void 0), l.isInitialized = !1, l.lastSessionRequest = 0);
|
|
@@ -331,8 +315,7 @@ function ue(e) {
|
|
|
331
315
|
broadcastSessionUpdate: f
|
|
332
316
|
};
|
|
333
317
|
}
|
|
334
|
-
|
|
335
|
-
//#region ../node_modules/.bun/@better-auth+core@1.7.2+da38424592555d4d/node_modules/@better-auth/core/dist/env/env-impl.mjs
|
|
318
|
+
// ../node_modules/.bun/@better-auth+core@1.7.15+1bcdd7fa41f3b4db/node_modules/@better-auth/core/dist/env/env-impl.mjs
|
|
336
319
|
var k = Object.create(null), A = (e) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? k : globalThis), j = new Proxy(k, {
|
|
337
320
|
get(e, t) {
|
|
338
321
|
return A()[t] ?? k[t];
|
|
@@ -381,26 +364,25 @@ Object.freeze({
|
|
|
381
364
|
return M("BETTER_AUTH_TELEMETRY_ENDPOINT", "");
|
|
382
365
|
}
|
|
383
366
|
});
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
function de() {
|
|
367
|
+
// ../node_modules/.bun/better-call@1.4.4+969a6d035afea0f4/node_modules/better-call/dist/error.mjs
|
|
368
|
+
function fe() {
|
|
387
369
|
let e = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
388
370
|
return e === void 0 ? Object.isExtensible(Error) : Object.prototype.hasOwnProperty.call(e, "writable") ? e.writable : e.set !== void 0;
|
|
389
371
|
}
|
|
390
|
-
function
|
|
372
|
+
function pe(e) {
|
|
391
373
|
let t = e.split("\n at ");
|
|
392
374
|
return t.length <= 1 ? e : (t.splice(1, 1), t.join("\n at "));
|
|
393
375
|
}
|
|
394
|
-
function
|
|
376
|
+
function me(e, t) {
|
|
395
377
|
class n extends e {
|
|
396
378
|
#e;
|
|
397
379
|
constructor(...e) {
|
|
398
|
-
if (
|
|
380
|
+
if (fe()) {
|
|
399
381
|
let t = Error.stackTraceLimit;
|
|
400
382
|
Error.stackTraceLimit = 0, super(...e), Error.stackTraceLimit = t;
|
|
401
383
|
} else super(...e);
|
|
402
384
|
let t = (/* @__PURE__ */ Error()).stack;
|
|
403
|
-
t && (this.#e =
|
|
385
|
+
t && (this.#e = pe(t.replace(/^Error/, this.name)));
|
|
404
386
|
}
|
|
405
387
|
get errorStack() {
|
|
406
388
|
return this.#e;
|
|
@@ -414,7 +396,7 @@ function pe(e, t) {
|
|
|
414
396
|
configurable: !0
|
|
415
397
|
}), n;
|
|
416
398
|
}
|
|
417
|
-
var
|
|
399
|
+
var he = {
|
|
418
400
|
OK: 200,
|
|
419
401
|
CREATED: 201,
|
|
420
402
|
ACCEPTED: 202,
|
|
@@ -466,35 +448,41 @@ var me = {
|
|
|
466
448
|
NOT_EXTENDED: 510,
|
|
467
449
|
NETWORK_AUTHENTICATION_REQUIRED: 511
|
|
468
450
|
};
|
|
469
|
-
|
|
451
|
+
me(class extends Error {
|
|
470
452
|
status;
|
|
471
453
|
body;
|
|
472
454
|
headers;
|
|
473
455
|
statusCode;
|
|
474
|
-
constructor(e = "INTERNAL_SERVER_ERROR", t = void 0, n = {}, r = typeof e == "number" ? e :
|
|
475
|
-
super(t?.message, t
|
|
456
|
+
constructor(e = "INTERNAL_SERVER_ERROR", t = void 0, n = {}, r = typeof e == "number" ? e : he[e]) {
|
|
457
|
+
if (super(t?.message, t && "cause" in t ? { cause: t.cause } : void 0), this.status = e, this.body = t, this.headers = n, this.statusCode = r, this.name = "APIError", this.status = e, this.headers = n, this.statusCode = r, t && "cause" in t) {
|
|
458
|
+
let { cause: e, ...n } = t;
|
|
459
|
+
this.body = Object.defineProperty(n, "cause", {
|
|
460
|
+
value: e,
|
|
461
|
+
writable: !0,
|
|
462
|
+
configurable: !0
|
|
463
|
+
});
|
|
464
|
+
} else this.body = t;
|
|
476
465
|
}
|
|
477
466
|
}, Error);
|
|
478
|
-
|
|
479
|
-
//#region ../node_modules/.bun/@better-auth+core@1.7.2+da38424592555d4d/node_modules/@better-auth/core/dist/error/index.mjs
|
|
467
|
+
// ../node_modules/.bun/@better-auth+core@1.7.15+1bcdd7fa41f3b4db/node_modules/@better-auth/core/dist/error/index.mjs
|
|
480
468
|
var N = class extends Error {
|
|
481
469
|
constructor(e, t) {
|
|
482
470
|
super(e, t), this.name = "BetterAuthError", this.message = e, this.stack = "";
|
|
483
471
|
}
|
|
484
|
-
},
|
|
472
|
+
}, ge = 47;
|
|
485
473
|
function P(e) {
|
|
486
474
|
let t = e.length;
|
|
487
|
-
for (; t > 0 && e.charCodeAt(t - 1) ===
|
|
475
|
+
for (; t > 0 && e.charCodeAt(t - 1) === ge;) t--;
|
|
488
476
|
return t === e.length ? e : e.slice(0, t);
|
|
489
477
|
}
|
|
490
|
-
function
|
|
478
|
+
function _e(e) {
|
|
491
479
|
try {
|
|
492
480
|
return (P(new URL(e).pathname) || "/") !== "/";
|
|
493
481
|
} catch {
|
|
494
482
|
throw new N(`Invalid base URL: ${e}. Please provide a valid base URL.`);
|
|
495
483
|
}
|
|
496
484
|
}
|
|
497
|
-
function
|
|
485
|
+
function ve(e) {
|
|
498
486
|
try {
|
|
499
487
|
let t = new URL(e);
|
|
500
488
|
if (t.protocol !== "http:" && t.protocol !== "https:") throw new N(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`);
|
|
@@ -503,7 +491,7 @@ function _e(e) {
|
|
|
503
491
|
}
|
|
504
492
|
}
|
|
505
493
|
function F(e, t = "/api/auth") {
|
|
506
|
-
if (
|
|
494
|
+
if (ve(e), _e(e)) return e;
|
|
507
495
|
let n = P(e);
|
|
508
496
|
return !t || t === "/" ? n : (t = t.startsWith("/") ? t : `/${t}`, `${n}${t}`);
|
|
509
497
|
}
|
|
@@ -519,7 +507,7 @@ function I(e, t) {
|
|
|
519
507
|
/data:/i
|
|
520
508
|
].some((t) => t.test(e)) ? !1 : /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e) || /^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e) || /^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e) || /^localhost(:[0-9]{1,5})?$/i.test(e) : !1;
|
|
521
509
|
}
|
|
522
|
-
function
|
|
510
|
+
function ye(e, t, n, r, i) {
|
|
523
511
|
if (e) return F(e, t);
|
|
524
512
|
if (r !== !1) {
|
|
525
513
|
let e = j.BETTER_AUTH_URL || j.NEXT_PUBLIC_BETTER_AUTH_URL || j.PUBLIC_BETTER_AUTH_URL || j.NUXT_PUBLIC_BETTER_AUTH_URL || j.NUXT_PUBLIC_AUTH_URL || (j.BASE_URL === "/" ? void 0 : j.BASE_URL);
|
|
@@ -530,13 +518,13 @@ function ve(e, t, n, r, i) {
|
|
|
530
518
|
return F(`${o}://${a}`, t);
|
|
531
519
|
} catch {}
|
|
532
520
|
if (n) {
|
|
533
|
-
let e =
|
|
521
|
+
let e = be(n.url);
|
|
534
522
|
if (!e) throw new N("Could not get origin from request. Please provide a valid base URL.");
|
|
535
523
|
return F(e, t);
|
|
536
524
|
}
|
|
537
525
|
if (typeof window < "u" && window.location) return F(window.location.origin, t);
|
|
538
526
|
}
|
|
539
|
-
function
|
|
527
|
+
function be(e) {
|
|
540
528
|
try {
|
|
541
529
|
let t = new URL(e);
|
|
542
530
|
return t.origin === "null" ? null : t.origin;
|
|
@@ -544,34 +532,32 @@ function ye(e) {
|
|
|
544
532
|
return null;
|
|
545
533
|
}
|
|
546
534
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
var be = [
|
|
535
|
+
// ../node_modules/.bun/@better-auth+core@1.7.15+1bcdd7fa41f3b4db/node_modules/@better-auth/core/dist/utils/url.mjs
|
|
536
|
+
var xe = [
|
|
550
537
|
"javascript:",
|
|
551
538
|
"data:",
|
|
552
539
|
"vbscript:"
|
|
553
540
|
];
|
|
554
|
-
function
|
|
541
|
+
function Se(e) {
|
|
555
542
|
let t;
|
|
556
543
|
try {
|
|
557
544
|
t = new URL(e);
|
|
558
545
|
} catch {
|
|
559
546
|
return !0;
|
|
560
547
|
}
|
|
561
|
-
return !
|
|
548
|
+
return !xe.includes(t.protocol);
|
|
562
549
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
var Se = {
|
|
550
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/fetch-plugins.mjs
|
|
551
|
+
var Ce = {
|
|
566
552
|
id: "redirect",
|
|
567
553
|
name: "Redirect",
|
|
568
554
|
hooks: { onSuccess(e) {
|
|
569
|
-
if (e.data?.url && e.data?.redirect &&
|
|
555
|
+
if (e.data?.url && e.data?.redirect && Se(e.data.url) && typeof window < "u" && window.location && window.location) try {
|
|
570
556
|
window.location.href = e.data.url;
|
|
571
557
|
} catch {}
|
|
572
558
|
} }
|
|
573
|
-
},
|
|
574
|
-
function
|
|
559
|
+
}, we = () => typeof window > "u", Te = v;
|
|
560
|
+
function Ee(e, t) {
|
|
575
561
|
if (typeof window > "u") return;
|
|
576
562
|
let n = e.get();
|
|
577
563
|
n.data === null && t !== null && e.set({
|
|
@@ -587,25 +573,25 @@ function L(e) {
|
|
|
587
573
|
error: null
|
|
588
574
|
};
|
|
589
575
|
}
|
|
590
|
-
function
|
|
576
|
+
function De(e) {
|
|
591
577
|
return !e || e.session === null && e.user === null ? null : e;
|
|
592
578
|
}
|
|
593
|
-
function
|
|
579
|
+
function Oe(e, t) {
|
|
594
580
|
return x(e.data, t.data) && e.error === t.error && e.isPending === t.isPending && e.isRefetching === t.isRefetching && e.refetch === t.refetch;
|
|
595
581
|
}
|
|
596
|
-
function
|
|
582
|
+
function ke(e, t) {
|
|
597
583
|
let n = /* @__PURE__ */ d(!1), r, i = 0, a = 0;
|
|
598
584
|
n.listen(() => {
|
|
599
585
|
a++, i = 0;
|
|
600
586
|
});
|
|
601
|
-
let o = (e) => u(e), s =
|
|
587
|
+
let o = (e) => u(e), s = le({
|
|
602
588
|
data: null,
|
|
603
589
|
error: null,
|
|
604
590
|
isPending: !0,
|
|
605
591
|
isRefetching: !1,
|
|
606
592
|
refetch: o
|
|
607
593
|
});
|
|
608
|
-
S(s,
|
|
594
|
+
S(s, Oe);
|
|
609
595
|
let c = async (t, n) => {
|
|
610
596
|
let r = s.value;
|
|
611
597
|
if (s.set({
|
|
@@ -644,7 +630,7 @@ function Oe(e, t) {
|
|
|
644
630
|
refetch: o
|
|
645
631
|
}), "failed";
|
|
646
632
|
}
|
|
647
|
-
let l =
|
|
633
|
+
let l = De(i), u = s.value, d = u.data != null && l != null && x(u.data, l) ? u.data : l;
|
|
648
634
|
return s.set({
|
|
649
635
|
data: d,
|
|
650
636
|
error: null,
|
|
@@ -665,7 +651,7 @@ function Oe(e, t) {
|
|
|
665
651
|
}
|
|
666
652
|
}, l = () => {
|
|
667
653
|
let e = s.value.data?.session?.expiresAt, t = e instanceof Date ? e.getTime() : Infinity;
|
|
668
|
-
return Math.min(Date.now() +
|
|
654
|
+
return Math.min(Date.now() + Te, t);
|
|
669
655
|
}, u = (e) => {
|
|
670
656
|
i = 0, r?.cancel();
|
|
671
657
|
let t = new AbortController(), n = {
|
|
@@ -681,10 +667,10 @@ function Oe(e, t) {
|
|
|
681
667
|
}, f = () => r?.revision === a ? r.promise.then(() => void 0) : Date.now() < i ? Promise.resolve() : u(), p = () => {};
|
|
682
668
|
return y(s, () => {
|
|
683
669
|
let e;
|
|
684
|
-
|
|
670
|
+
we() || (e = setTimeout(() => {
|
|
685
671
|
f();
|
|
686
672
|
}, 0));
|
|
687
|
-
let r =
|
|
673
|
+
let r = de({
|
|
688
674
|
fetchSession: u,
|
|
689
675
|
shouldPollSession: () => s.value.data != null,
|
|
690
676
|
sessionSignal: n,
|
|
@@ -699,8 +685,7 @@ function Oe(e, t) {
|
|
|
699
685
|
broadcastSessionUpdate: (e) => p(e)
|
|
700
686
|
};
|
|
701
687
|
}
|
|
702
|
-
|
|
703
|
-
//#region ../node_modules/.bun/defu@6.1.7/node_modules/defu/dist/defu.mjs
|
|
688
|
+
// ../node_modules/.bun/defu@6.1.7/node_modules/defu/dist/defu.mjs
|
|
704
689
|
function R(e) {
|
|
705
690
|
if (typeof e != "object" || !e) return !1;
|
|
706
691
|
let t = Object.getPrototypeOf(e);
|
|
@@ -716,23 +701,14 @@ function z(e, t, n = ".", r) {
|
|
|
716
701
|
}
|
|
717
702
|
return i;
|
|
718
703
|
}
|
|
719
|
-
function
|
|
704
|
+
function Ae(e) {
|
|
720
705
|
return (...t) => t.reduce((t, n) => z(t, n, "", e), {});
|
|
721
706
|
}
|
|
722
|
-
var
|
|
723
|
-
enumerable: !0,
|
|
724
|
-
configurable: !0,
|
|
725
|
-
writable: !0,
|
|
726
|
-
value: n
|
|
727
|
-
}) : e[t] = n, H = (e, t) => {
|
|
728
|
-
for (var n in t ||= {}) Pe.call(t, n) && V(e, n, t[n]);
|
|
729
|
-
if (B) for (var n of B(t)) Fe.call(t, n) && V(e, n, t[n]);
|
|
730
|
-
return e;
|
|
731
|
-
}, U = (e, t) => Me(e, Ne(t)), Ie = class extends Error {
|
|
707
|
+
var je = Ae(), Me = class extends Error {
|
|
732
708
|
constructor(e, t, n) {
|
|
733
709
|
super(t || e.toString(), { cause: n }), this.status = e, this.statusText = t, this.error = n, Error.captureStackTrace(this, this.constructor);
|
|
734
710
|
}
|
|
735
|
-
},
|
|
711
|
+
}, Ne = async (e, t) => {
|
|
736
712
|
let n = t || {}, r = {
|
|
737
713
|
onRequest: [t?.onRequest],
|
|
738
714
|
onResponse: [t?.onResponse],
|
|
@@ -747,8 +723,8 @@ var Ae = ke(), je = Object.defineProperty, Me = Object.defineProperties, Ne = Ob
|
|
|
747
723
|
};
|
|
748
724
|
for (let i of t?.plugins || []) {
|
|
749
725
|
if (i.init) {
|
|
750
|
-
let
|
|
751
|
-
n =
|
|
726
|
+
let t = await i.init?.call(i, e.toString(), n);
|
|
727
|
+
n = t.options || n, e = t.url;
|
|
752
728
|
}
|
|
753
729
|
r.onRequest.push(i.hooks?.onRequest), r.onResponse.push(i.hooks?.onResponse), r.onSuccess.push(i.hooks?.onSuccess), r.onError.push(i.hooks?.onError), r.onRetry.push(i.hooks?.onRetry);
|
|
754
730
|
}
|
|
@@ -757,7 +733,7 @@ var Ae = ke(), je = Object.defineProperty, Me = Object.defineProperties, Ne = Ob
|
|
|
757
733
|
options: n,
|
|
758
734
|
hooks: r
|
|
759
735
|
};
|
|
760
|
-
},
|
|
736
|
+
}, B = class {
|
|
761
737
|
constructor(e) {
|
|
762
738
|
this.options = e;
|
|
763
739
|
}
|
|
@@ -767,7 +743,7 @@ var Ae = ke(), je = Object.defineProperty, Me = Object.defineProperties, Ne = Ob
|
|
|
767
743
|
getDelay() {
|
|
768
744
|
return this.options.delay;
|
|
769
745
|
}
|
|
770
|
-
},
|
|
746
|
+
}, Pe = class {
|
|
771
747
|
constructor(e) {
|
|
772
748
|
this.options = e;
|
|
773
749
|
}
|
|
@@ -778,19 +754,106 @@ var Ae = ke(), je = Object.defineProperty, Me = Object.defineProperties, Ne = Ob
|
|
|
778
754
|
return Math.min(this.options.maxDelay, this.options.baseDelay * 2 ** e);
|
|
779
755
|
}
|
|
780
756
|
};
|
|
781
|
-
function
|
|
782
|
-
if (typeof e == "number") return new
|
|
757
|
+
function Fe(e) {
|
|
758
|
+
if (typeof e == "number") return new B({
|
|
783
759
|
type: "linear",
|
|
784
760
|
attempts: e,
|
|
785
761
|
delay: 1e3
|
|
786
762
|
});
|
|
787
763
|
switch (e.type) {
|
|
788
|
-
case "linear": return new
|
|
789
|
-
case "exponential": return new
|
|
764
|
+
case "linear": return new B(e);
|
|
765
|
+
case "exponential": return new Pe(e);
|
|
790
766
|
default: throw Error("Invalid retry strategy");
|
|
791
767
|
}
|
|
792
768
|
}
|
|
793
|
-
var
|
|
769
|
+
var Ie = [
|
|
770
|
+
"get",
|
|
771
|
+
"post",
|
|
772
|
+
"put",
|
|
773
|
+
"patch",
|
|
774
|
+
"delete"
|
|
775
|
+
];
|
|
776
|
+
function V(e) {
|
|
777
|
+
if (!e.startsWith("@")) return {
|
|
778
|
+
method: void 0,
|
|
779
|
+
path: e
|
|
780
|
+
};
|
|
781
|
+
let t = e.indexOf("/"), n = e.slice(1, t === -1 ? void 0 : t);
|
|
782
|
+
return Ie.includes(n) ? {
|
|
783
|
+
method: n,
|
|
784
|
+
path: t === -1 ? e : e.slice(t + 1)
|
|
785
|
+
} : {
|
|
786
|
+
method: void 0,
|
|
787
|
+
path: e
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
var H = /^[a-z][a-z\d+.-]*:\/\/[^/?#]+/i, Le = /^\/+/;
|
|
791
|
+
function U(e) {
|
|
792
|
+
let t = e.length;
|
|
793
|
+
for (; t > 0 && e[t - 1] === "/";) t--;
|
|
794
|
+
return e.slice(0, t);
|
|
795
|
+
}
|
|
796
|
+
function W(e, t) {
|
|
797
|
+
let n = e.indexOf(t);
|
|
798
|
+
return n === -1 ? [e, void 0] : [e.slice(0, n), e.slice(n + 1)];
|
|
799
|
+
}
|
|
800
|
+
var Re = (e) => e === "." || e === "..", ze = (e) => e.split(":").map((e) => encodeURIComponent(e)).join(":");
|
|
801
|
+
function Be(e, t) {
|
|
802
|
+
let n = t.get(e);
|
|
803
|
+
if (n === void 0) return ze(e);
|
|
804
|
+
if (Re(n)) throw TypeError("Path parameters cannot be reserved path segments");
|
|
805
|
+
return encodeURIComponent(n);
|
|
806
|
+
}
|
|
807
|
+
function Ve(e, t) {
|
|
808
|
+
let n = /* @__PURE__ */ new Map();
|
|
809
|
+
if (t) {
|
|
810
|
+
if (Array.isArray(t)) {
|
|
811
|
+
let r = e.split("/").filter((e) => e.startsWith(":"));
|
|
812
|
+
for (let [e, i] of r.entries()) {
|
|
813
|
+
let r = t[e];
|
|
814
|
+
n.set(i, String(r));
|
|
815
|
+
}
|
|
816
|
+
} else for (let [e, r] of Object.entries(t)) n.set(`:${e}`, String(r));
|
|
817
|
+
}
|
|
818
|
+
return n;
|
|
819
|
+
}
|
|
820
|
+
function He(e, t) {
|
|
821
|
+
let n = Ve(e, t);
|
|
822
|
+
return e.split("/").map((e) => Be(e, n)).join("/");
|
|
823
|
+
}
|
|
824
|
+
function Ue(e, t) {
|
|
825
|
+
let n = new URLSearchParams(e);
|
|
826
|
+
for (let [e, r] of Object.entries(t || {})) {
|
|
827
|
+
if (r == null) continue;
|
|
828
|
+
let t;
|
|
829
|
+
if (typeof r == "string") t = r;
|
|
830
|
+
else if (Array.isArray(r)) {
|
|
831
|
+
for (let t of r) n.append(e, t);
|
|
832
|
+
continue;
|
|
833
|
+
} else t = JSON.stringify(r);
|
|
834
|
+
n.set(e, t);
|
|
835
|
+
}
|
|
836
|
+
let r = n.toString();
|
|
837
|
+
return r.length > 0 ? `?${r}`.replace(/\+/g, "%20") : "";
|
|
838
|
+
}
|
|
839
|
+
function We(e, t) {
|
|
840
|
+
if (!t) return e;
|
|
841
|
+
let n = `${U(t)}/`;
|
|
842
|
+
return e.startsWith(n) ? e.slice(n.length) : e;
|
|
843
|
+
}
|
|
844
|
+
function Ge(e, t, n, r) {
|
|
845
|
+
let [i] = W(e, "#"), [a, o = ""] = W(i, "?"), s = t.replace(Le, ""), c = Ue(`${o}&${n ?? ""}`, r), l = `${U(a)}/${s}${c}`;
|
|
846
|
+
return H.test(l) ? new URL(l) : l;
|
|
847
|
+
}
|
|
848
|
+
function Ke(e, t) {
|
|
849
|
+
let { baseURL: n, params: r, query: i } = t || {
|
|
850
|
+
query: {},
|
|
851
|
+
params: {},
|
|
852
|
+
baseURL: ""
|
|
853
|
+
}, { path: a } = V(e), o = a === e ? e : `/${a}`, s = o.match(H)?.[0], [c, l] = W(s ? o.slice(s.length) : We(o, n), "?"), u = He(c, r);
|
|
854
|
+
return Ge(s ?? n ?? "", u, l, i);
|
|
855
|
+
}
|
|
856
|
+
var qe = async (e) => {
|
|
794
857
|
let t = {}, n = async (e) => typeof e == "function" ? await e() : e;
|
|
795
858
|
if (e?.auth) {
|
|
796
859
|
if (e.auth.type === "Bearer") {
|
|
@@ -808,8 +871,8 @@ var Be = async (e) => {
|
|
|
808
871
|
}
|
|
809
872
|
}
|
|
810
873
|
return t;
|
|
811
|
-
},
|
|
812
|
-
function
|
|
874
|
+
}, Je = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
|
|
875
|
+
function Ye(e) {
|
|
813
876
|
let t = e.headers.get("content-type"), n = /* @__PURE__ */ new Set([
|
|
814
877
|
"image/svg",
|
|
815
878
|
"application/xml",
|
|
@@ -818,9 +881,9 @@ function He(e) {
|
|
|
818
881
|
]);
|
|
819
882
|
if (!t) return "json";
|
|
820
883
|
let r = t.split(";").shift() || "";
|
|
821
|
-
return
|
|
884
|
+
return Je.test(r) ? "json" : n.has(r) || r.startsWith("text/") ? "text" : "blob";
|
|
822
885
|
}
|
|
823
|
-
function
|
|
886
|
+
function Xe(e) {
|
|
824
887
|
try {
|
|
825
888
|
return JSON.parse(e), !0;
|
|
826
889
|
} catch {
|
|
@@ -842,7 +905,7 @@ function K(e) {
|
|
|
842
905
|
function q(e) {
|
|
843
906
|
return typeof e == "function";
|
|
844
907
|
}
|
|
845
|
-
function
|
|
908
|
+
function Ze(e) {
|
|
846
909
|
if (e?.customFetchImpl) return e.customFetchImpl;
|
|
847
910
|
if (typeof globalThis < "u" && q(globalThis.fetch)) return globalThis.fetch;
|
|
848
911
|
if (typeof window < "u" && q(window.fetch)) return window.fetch;
|
|
@@ -861,34 +924,31 @@ function J(...e) {
|
|
|
861
924
|
}
|
|
862
925
|
return t;
|
|
863
926
|
}
|
|
864
|
-
async function
|
|
865
|
-
let t = new Headers(J(e?.headers, await
|
|
927
|
+
async function Qe(e) {
|
|
928
|
+
let t = new Headers(J(e?.headers, await qe(e)));
|
|
866
929
|
if (!t.has("content-type")) {
|
|
867
|
-
let n =
|
|
930
|
+
let n = $e(e?.body);
|
|
868
931
|
n && t.set("content-type", n);
|
|
869
932
|
}
|
|
870
933
|
return t;
|
|
871
934
|
}
|
|
872
|
-
function
|
|
935
|
+
function $e(e) {
|
|
873
936
|
return G(e) ? "application/json" : null;
|
|
874
937
|
}
|
|
875
|
-
function
|
|
938
|
+
function et(e) {
|
|
876
939
|
let t = e.get("content-type");
|
|
877
940
|
return t ? t.split(";")[0].trim().toLowerCase() : null;
|
|
878
941
|
}
|
|
879
|
-
function
|
|
942
|
+
function tt(e, t) {
|
|
880
943
|
let { body: n } = e;
|
|
881
|
-
return n ? !G(n) || typeof n == "string" ? n :
|
|
944
|
+
return n ? !G(n) || typeof n == "string" ? n : et(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
|
|
882
945
|
}
|
|
883
|
-
function
|
|
946
|
+
function nt(e, t) {
|
|
884
947
|
if (t?.method) return t.method.toUpperCase();
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
return X.includes(n) ? n.toUpperCase() : t?.body ? "POST" : "GET";
|
|
888
|
-
}
|
|
889
|
-
return t?.body ? "POST" : "GET";
|
|
948
|
+
let { method: n } = V(e);
|
|
949
|
+
return n ? n.toUpperCase() : t?.body ? "POST" : "GET";
|
|
890
950
|
}
|
|
891
|
-
function
|
|
951
|
+
function rt(e, t) {
|
|
892
952
|
let n;
|
|
893
953
|
return !e?.signal && e?.timeout && (n = setTimeout(() => t?.abort(), e?.timeout)), {
|
|
894
954
|
abortTimeout: n,
|
|
@@ -897,78 +957,204 @@ function Xe(e, t) {
|
|
|
897
957
|
}
|
|
898
958
|
};
|
|
899
959
|
}
|
|
900
|
-
var
|
|
960
|
+
var it = class e extends Error {
|
|
901
961
|
constructor(t, n) {
|
|
902
962
|
super(n || JSON.stringify(t, null, 2)), this.issues = t, Object.setPrototypeOf(this, e.prototype);
|
|
903
963
|
}
|
|
904
964
|
};
|
|
905
965
|
async function Y(e, t) {
|
|
906
966
|
let n = await e["~standard"].validate(t);
|
|
907
|
-
if (n.issues) throw new
|
|
967
|
+
if (n.issues) throw new it(n.issues);
|
|
908
968
|
return n.value;
|
|
909
969
|
}
|
|
910
|
-
|
|
911
|
-
"
|
|
912
|
-
"
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
970
|
+
function X(e) {
|
|
971
|
+
"@babel/helpers - typeof";
|
|
972
|
+
return X = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
973
|
+
return typeof e;
|
|
974
|
+
} : function(e) {
|
|
975
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
976
|
+
}, X(e);
|
|
977
|
+
}
|
|
978
|
+
function at(e, t) {
|
|
979
|
+
if (X(e) != "object" || !e) return e;
|
|
980
|
+
var n = e[Symbol.toPrimitive];
|
|
981
|
+
if (n !== void 0) {
|
|
982
|
+
var r = n.call(e, t || "default");
|
|
983
|
+
if (X(r) != "object") return r;
|
|
984
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
985
|
+
}
|
|
986
|
+
return (t === "string" ? String : Number)(e);
|
|
987
|
+
}
|
|
988
|
+
function ot(e) {
|
|
989
|
+
var t = at(e, "string");
|
|
990
|
+
return X(t) == "symbol" ? t : t + "";
|
|
991
|
+
}
|
|
992
|
+
function st(e, t, n) {
|
|
993
|
+
return (t = ot(t)) in e ? Object.defineProperty(e, t, {
|
|
994
|
+
value: n,
|
|
995
|
+
enumerable: !0,
|
|
996
|
+
configurable: !0,
|
|
997
|
+
writable: !0
|
|
998
|
+
}) : e[t] = n, e;
|
|
999
|
+
}
|
|
1000
|
+
function ct(e, t) {
|
|
1001
|
+
var n = Object.keys(e);
|
|
1002
|
+
if (Object.getOwnPropertySymbols) {
|
|
1003
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
1004
|
+
t && (r = r.filter(function(t) {
|
|
1005
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
1006
|
+
})), n.push.apply(n, r);
|
|
1007
|
+
}
|
|
1008
|
+
return n;
|
|
1009
|
+
}
|
|
1010
|
+
function Z(e) {
|
|
1011
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1012
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
1013
|
+
t % 2 ? ct(Object(n), !0).forEach(function(t) {
|
|
1014
|
+
st(e, t, n[t]);
|
|
1015
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ct(Object(n)).forEach(function(t) {
|
|
1016
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
return e;
|
|
1020
|
+
}
|
|
1021
|
+
var Q = async (e, t) => {
|
|
1022
|
+
var n;
|
|
1023
|
+
let { hooks: r, url: i, options: a } = await Ne(e, t), o = Ze(a), s = new AbortController(), c = a.signal ?? s.signal, l = Ke(i, a), u = await Qe(a), d = tt(a, u), f = nt(i, a), p = Z(Z({}, a), {}, {
|
|
1024
|
+
url: l,
|
|
1025
|
+
headers: u,
|
|
1026
|
+
body: d,
|
|
1027
|
+
method: f,
|
|
1028
|
+
signal: c
|
|
1029
|
+
});
|
|
1030
|
+
for (let e of r.onRequest) if (e) {
|
|
1031
|
+
let t = await e(p);
|
|
1032
|
+
typeof t == "object" && t && Object.assign(p, t);
|
|
1033
|
+
}
|
|
1034
|
+
("pipeTo" in p && typeof p.pipeTo == "function" || typeof (t == null || (n = t.body) == null ? void 0 : n.pipe) == "function") && ("duplex" in p || (p.duplex = "half"));
|
|
1035
|
+
let { clearTimeout: m } = rt(a, s), h = await o(p.url, p);
|
|
1036
|
+
m();
|
|
1037
|
+
let g = {
|
|
1038
|
+
response: h,
|
|
1039
|
+
request: p
|
|
1040
|
+
};
|
|
1041
|
+
for (let e of r.onResponse) if (e) {
|
|
1042
|
+
var _;
|
|
1043
|
+
let n = await e(Z(Z({}, g), {}, { response: t != null && (_ = t.hookOptions) != null && _.cloneResponse ? h.clone() : h }));
|
|
1044
|
+
n instanceof Response ? h = n : typeof n == "object" && n && (h = n.response);
|
|
1045
|
+
}
|
|
1046
|
+
if (h.ok) {
|
|
1047
|
+
if (p.method === "HEAD") return {
|
|
1048
|
+
data: "",
|
|
1049
|
+
error: null
|
|
1050
|
+
};
|
|
1051
|
+
let e = Ye(h), n = {
|
|
1052
|
+
data: null,
|
|
1053
|
+
response: h,
|
|
1054
|
+
request: p
|
|
1055
|
+
};
|
|
1056
|
+
if (e === "json" || e === "text") {
|
|
1057
|
+
let e = await h.text();
|
|
1058
|
+
n.data = await (p.jsonParser ?? K)(e);
|
|
1059
|
+
} else n.data = await h[e]();
|
|
1060
|
+
p?.output && p.output && !p.disableValidation && (n.data = await Y(p.output, n.data));
|
|
1061
|
+
for (let e of r.onSuccess) if (e) {
|
|
1062
|
+
var v;
|
|
1063
|
+
await e(Z(Z({}, n), {}, { response: t != null && (v = t.hookOptions) != null && v.cloneResponse ? h.clone() : h }));
|
|
1064
|
+
}
|
|
1065
|
+
return t?.throw ? n.data : {
|
|
1066
|
+
data: n.data,
|
|
1067
|
+
error: null
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
let y = t?.jsonParser ?? K, b = await h.text(), x = Xe(b), S = x ? await y(b) : null, C = {
|
|
1071
|
+
response: h,
|
|
1072
|
+
responseText: b,
|
|
1073
|
+
request: p,
|
|
1074
|
+
error: Z(Z({}, S), {}, {
|
|
1075
|
+
status: h.status,
|
|
1076
|
+
statusText: h.statusText
|
|
1077
|
+
})
|
|
1078
|
+
};
|
|
1079
|
+
for (let e of r.onError) if (e) {
|
|
1080
|
+
var w;
|
|
1081
|
+
await e(Z(Z({}, C), {}, { response: t != null && (w = t.hookOptions) != null && w.cloneResponse ? h.clone() : h }));
|
|
1082
|
+
}
|
|
1083
|
+
if (t?.retry) {
|
|
1084
|
+
let n = Fe(t.retry), i = t.retryAttempt ?? 0;
|
|
1085
|
+
if (await n.shouldAttemptRetry(i, h)) {
|
|
1086
|
+
for (let e of r.onRetry) e && await e(g);
|
|
1087
|
+
let a = n.getDelay(i);
|
|
1088
|
+
return await new Promise((e) => setTimeout(e, a)), await Q(e, Z(Z({}, t), {}, { retryAttempt: i + 1 }));
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
if (t?.throw) throw new Me(h.status, h.statusText, x ? S : b);
|
|
1092
|
+
return {
|
|
1093
|
+
data: null,
|
|
1094
|
+
error: Z(Z({}, S), {}, {
|
|
1095
|
+
status: h.status,
|
|
1096
|
+
statusText: h.statusText
|
|
1097
|
+
})
|
|
1098
|
+
};
|
|
1099
|
+
}, lt = (e) => ({
|
|
917
1100
|
id: "apply-schema",
|
|
918
1101
|
name: "Apply Schema",
|
|
919
1102
|
version: "1.0.0",
|
|
920
1103
|
async init(t, n) {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
1104
|
+
var r;
|
|
1105
|
+
let i = Z(Z({}, n), e.query !== void 0 && { query: Z(Z({}, e.query), n?.query) }), a = ((r = e.plugins) == null || (r = r.find((e) => e.schema?.config ? t.startsWith(e.schema.config.baseURL || "") || t.startsWith(e.schema.config.prefix || "") : !1)) == null ? void 0 : r.schema) || e.schema;
|
|
1106
|
+
if (a) {
|
|
1107
|
+
let r = t;
|
|
1108
|
+
a.config?.prefix && r.startsWith(a.config.prefix) && (r = r.replace(a.config.prefix, ""), a.config.baseURL && (t = t.replace(a.config.prefix, a.config.baseURL))), a.config?.baseURL && r.startsWith(a.config.baseURL) && (r = r.replace(a.config.baseURL, "")), r.startsWith("/") && r.charAt(1) === "@" && (r = r.substring(1));
|
|
1109
|
+
let o = a.schema[r];
|
|
1110
|
+
if (o) {
|
|
1111
|
+
let { method: a, path: s } = V(r);
|
|
1112
|
+
a && (t = t.slice(0, t.length - r.length) + s);
|
|
1113
|
+
let c = n?.headers;
|
|
1114
|
+
if (o.headers && !n?.disableValidation) {
|
|
1115
|
+
let e = {};
|
|
930
1116
|
if (n?.headers) {
|
|
931
|
-
if (n.headers instanceof Headers) n.headers.forEach((
|
|
932
|
-
|
|
1117
|
+
if (n.headers instanceof Headers) n.headers.forEach((t, n) => {
|
|
1118
|
+
e[n.toLowerCase()] = t;
|
|
933
1119
|
});
|
|
934
|
-
else if (typeof n.headers == "object") for (let [
|
|
1120
|
+
else if (typeof n.headers == "object") for (let [t, r] of Object.entries(n.headers)) r != null && (e[t.toLowerCase()] = r);
|
|
935
1121
|
}
|
|
936
|
-
let
|
|
937
|
-
for (let [e,
|
|
938
|
-
|
|
1122
|
+
let t = await Y(o.headers, e), r = {};
|
|
1123
|
+
for (let [e, n] of Object.entries(t)) r[e.toLowerCase()] = n;
|
|
1124
|
+
c = r;
|
|
939
1125
|
}
|
|
940
|
-
let
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
1126
|
+
let l = o.method ?? a;
|
|
1127
|
+
if (i = Z(Z(Z(Z({}, i), l !== void 0 && { method: l }), o.output !== void 0 && { output: o.output }), c !== void 0 && { headers: c }), !n?.disableValidation) {
|
|
1128
|
+
if (o.query && (i.query = await Y(o.query, n?.query), i.query !== null && typeof i.query == "object")) {
|
|
1129
|
+
let t = Z({}, e.query);
|
|
1130
|
+
for (let e of Object.keys(t)) n?.query && Object.prototype.hasOwnProperty.call(n.query, e) && (t[e] = n.query[e]);
|
|
1131
|
+
i.query = Z(Z({}, t), i.query);
|
|
1132
|
+
}
|
|
1133
|
+
i = Z(Z({}, i), {}, {
|
|
1134
|
+
body: o.input ? await Y(o.input, n?.body) : n?.body,
|
|
1135
|
+
params: o.params ? await Y(o.params, n?.params) : n?.params
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
return {
|
|
950
1139
|
url: t,
|
|
951
|
-
options:
|
|
1140
|
+
options: i
|
|
952
1141
|
};
|
|
953
1142
|
}
|
|
954
1143
|
}
|
|
955
|
-
return {
|
|
956
|
-
url: t,
|
|
957
|
-
options: n
|
|
958
|
-
};
|
|
1144
|
+
return Z({ url: t }, (n !== void 0 || e.query !== void 0) && { options: i });
|
|
959
1145
|
}
|
|
960
|
-
}),
|
|
1146
|
+
}), ut = (e) => {
|
|
961
1147
|
async function t(t, n) {
|
|
962
|
-
let r =
|
|
1148
|
+
let r = Z(Z(Z({}, e), n), {}, {
|
|
963
1149
|
headers: J(e?.headers, n?.headers),
|
|
964
1150
|
plugins: [
|
|
965
1151
|
...e?.plugins || [],
|
|
966
|
-
|
|
1152
|
+
lt(e || {}),
|
|
967
1153
|
...n?.plugins || []
|
|
968
1154
|
]
|
|
969
1155
|
});
|
|
970
1156
|
if (e?.catchAllError) try {
|
|
971
|
-
return await
|
|
1157
|
+
return await Q(t, r);
|
|
972
1158
|
} catch (e) {
|
|
973
1159
|
return {
|
|
974
1160
|
data: null,
|
|
@@ -980,123 +1166,10 @@ var X = [
|
|
|
980
1166
|
}
|
|
981
1167
|
};
|
|
982
1168
|
}
|
|
983
|
-
return await
|
|
1169
|
+
return await Q(t, r);
|
|
984
1170
|
}
|
|
985
1171
|
return t;
|
|
986
|
-
},
|
|
987
|
-
function tt(e, t) {
|
|
988
|
-
let n = e;
|
|
989
|
-
for (let [e, r] of t) n = n.replace(e, r);
|
|
990
|
-
if (et(n)) throw TypeError("Path parameters cannot be reserved path segments");
|
|
991
|
-
return encodeURIComponent(n);
|
|
992
|
-
}
|
|
993
|
-
function nt(e, t) {
|
|
994
|
-
let { baseURL: n, params: r, query: i } = t || {
|
|
995
|
-
query: {},
|
|
996
|
-
params: {},
|
|
997
|
-
baseURL: ""
|
|
998
|
-
}, a = e.startsWith("http") ? e.split("/").slice(0, 3).join("/") : n || "";
|
|
999
|
-
if (e.startsWith("@")) {
|
|
1000
|
-
let t = e.toString().split("@")[1].split("/")[0];
|
|
1001
|
-
X.includes(t) && (e = e.replace(`@${t}/`, "/"));
|
|
1002
|
-
}
|
|
1003
|
-
a.endsWith("/") || (a += "/");
|
|
1004
|
-
let [o, s] = e.replace(a, "").split("?"), c = new URLSearchParams(s);
|
|
1005
|
-
for (let [e, t] of Object.entries(i || {})) {
|
|
1006
|
-
if (t == null) continue;
|
|
1007
|
-
let n;
|
|
1008
|
-
if (typeof t == "string") n = t;
|
|
1009
|
-
else if (Array.isArray(t)) {
|
|
1010
|
-
for (let n of t) c.append(e, n);
|
|
1011
|
-
continue;
|
|
1012
|
-
} else n = JSON.stringify(t);
|
|
1013
|
-
c.set(e, n);
|
|
1014
|
-
}
|
|
1015
|
-
let l = /* @__PURE__ */ new Map();
|
|
1016
|
-
if (r) {
|
|
1017
|
-
if (Array.isArray(r)) {
|
|
1018
|
-
let e = o.split("/").filter((e) => e.startsWith(":"));
|
|
1019
|
-
for (let [t, n] of e.entries()) {
|
|
1020
|
-
let e = r[t];
|
|
1021
|
-
l.set(n, String(e));
|
|
1022
|
-
}
|
|
1023
|
-
} else for (let [e, t] of Object.entries(r)) l.set(`:${e}`, String(t));
|
|
1024
|
-
}
|
|
1025
|
-
o = o.split("/").map((e) => tt(e, l)).join("/"), o = o.replace(/^\/+/, "");
|
|
1026
|
-
let u = c.toString();
|
|
1027
|
-
return u = u.length > 0 ? `?${u}`.replace(/\+/g, "%20") : "", a.startsWith("http") ? new URL(`${o}${u}`, a) : `${a}${o}${u}`;
|
|
1028
|
-
}
|
|
1029
|
-
var Z = async (e, t) => {
|
|
1030
|
-
let { hooks: n, url: r, options: i } = await Le(e, t), a = We(i), o = new AbortController(), s = i.signal ?? o.signal, c = nt(r, i), l = await Ge(i), u = Je(i, l), d = Ye(r, i), f = U(H({}, i), {
|
|
1031
|
-
url: c,
|
|
1032
|
-
headers: l,
|
|
1033
|
-
body: u,
|
|
1034
|
-
method: d,
|
|
1035
|
-
signal: s
|
|
1036
|
-
});
|
|
1037
|
-
for (let e of n.onRequest) if (e) {
|
|
1038
|
-
let t = await e(f);
|
|
1039
|
-
typeof t == "object" && t && Object.assign(f, t);
|
|
1040
|
-
}
|
|
1041
|
-
("pipeTo" in f && typeof f.pipeTo == "function" || typeof t?.body?.pipe == "function") && ("duplex" in f || (f.duplex = "half"));
|
|
1042
|
-
let { clearTimeout: p } = Xe(i, o), m = await a(f.url, f);
|
|
1043
|
-
p();
|
|
1044
|
-
let h = {
|
|
1045
|
-
response: m,
|
|
1046
|
-
request: f
|
|
1047
|
-
};
|
|
1048
|
-
for (let e of n.onResponse) if (e) {
|
|
1049
|
-
let n = await e(U(H({}, h), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
|
|
1050
|
-
n instanceof Response ? m = n : typeof n == "object" && n && (m = n.response);
|
|
1051
|
-
}
|
|
1052
|
-
if (m.ok) {
|
|
1053
|
-
if (f.method === "HEAD") return {
|
|
1054
|
-
data: "",
|
|
1055
|
-
error: null
|
|
1056
|
-
};
|
|
1057
|
-
let e = He(m), r = {
|
|
1058
|
-
data: null,
|
|
1059
|
-
response: m,
|
|
1060
|
-
request: f
|
|
1061
|
-
};
|
|
1062
|
-
if (e === "json" || e === "text") {
|
|
1063
|
-
let e = await m.text();
|
|
1064
|
-
r.data = await (f.jsonParser ?? K)(e);
|
|
1065
|
-
} else r.data = await m[e]();
|
|
1066
|
-
f?.output && f.output && !f.disableValidation && (r.data = await Y(f.output, r.data));
|
|
1067
|
-
for (let e of n.onSuccess) e && await e(U(H({}, r), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
|
|
1068
|
-
return t?.throw ? r.data : {
|
|
1069
|
-
data: r.data,
|
|
1070
|
-
error: null
|
|
1071
|
-
};
|
|
1072
|
-
}
|
|
1073
|
-
let g = t?.jsonParser ?? K, _ = await m.text(), v = Ue(_), y = v ? await g(_) : null, b = {
|
|
1074
|
-
response: m,
|
|
1075
|
-
responseText: _,
|
|
1076
|
-
request: f,
|
|
1077
|
-
error: U(H({}, y), {
|
|
1078
|
-
status: m.status,
|
|
1079
|
-
statusText: m.statusText
|
|
1080
|
-
})
|
|
1081
|
-
};
|
|
1082
|
-
for (let e of n.onError) e && await e(U(H({}, b), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
|
|
1083
|
-
if (t?.retry) {
|
|
1084
|
-
let r = ze(t.retry), i = t.retryAttempt ?? 0;
|
|
1085
|
-
if (await r.shouldAttemptRetry(i, m)) {
|
|
1086
|
-
for (let e of n.onRetry) e && await e(h);
|
|
1087
|
-
let a = r.getDelay(i);
|
|
1088
|
-
return await new Promise((e) => setTimeout(e, a)), await Z(e, U(H({}, t), { retryAttempt: i + 1 }));
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
if (t?.throw) throw new Ie(m.status, m.statusText, v ? y : _);
|
|
1092
|
-
return {
|
|
1093
|
-
data: null,
|
|
1094
|
-
error: U(H({}, y), {
|
|
1095
|
-
status: m.status,
|
|
1096
|
-
statusText: m.statusText
|
|
1097
|
-
})
|
|
1098
|
-
};
|
|
1099
|
-
}, Q = (e) => {
|
|
1172
|
+
}, dt = (e) => {
|
|
1100
1173
|
if (typeof process > "u") return;
|
|
1101
1174
|
let t = e ?? "/api/auth";
|
|
1102
1175
|
if (process.env.NEXT_PUBLIC_AUTH_URL) return process.env.NEXT_PUBLIC_AUTH_URL;
|
|
@@ -1109,8 +1182,8 @@ var Z = async (e, t) => {
|
|
|
1109
1182
|
return `${new URL(`${e}${process.env.VERCEL_URL}`).origin}${t}`;
|
|
1110
1183
|
} catch {}
|
|
1111
1184
|
}
|
|
1112
|
-
},
|
|
1113
|
-
let n = "credentials" in Request.prototype, r =
|
|
1185
|
+
}, ft = (e) => e === "/sign-out" || e === "/update-user" || e === "/update-session" || e === "/sign-up/email" || e === "/sign-in/email" || e === "/delete-user" || e === "/verify-email" || e === "/revoke-sessions" || e === "/revoke-session" || e === "/revoke-other-sessions" || e === "/change-email" || e === "/change-password", pt = (e, t) => {
|
|
1186
|
+
let n = "credentials" in Request.prototype, r = ye(e?.baseURL, e?.basePath, void 0, t) ?? dt(e?.basePath) ?? "/api/auth", i = e?.plugins?.flatMap((e) => e.fetchPlugins).filter((e) => e !== void 0) || [], a = {
|
|
1114
1187
|
id: "lifecycle-hooks",
|
|
1115
1188
|
name: "lifecycle-hooks",
|
|
1116
1189
|
hooks: {
|
|
@@ -1119,23 +1192,23 @@ var Z = async (e, t) => {
|
|
|
1119
1192
|
onRequest: e?.fetchOptions?.onRequest,
|
|
1120
1193
|
onResponse: e?.fetchOptions?.onResponse
|
|
1121
1194
|
}
|
|
1122
|
-
}, { onSuccess: o, onError: s, onRequest: c, onResponse: l, ...u } = e?.fetchOptions || {}, d =
|
|
1195
|
+
}, { onSuccess: o, onError: s, onRequest: c, onResponse: l, ...u } = e?.fetchOptions || {}, d = ut({
|
|
1123
1196
|
baseURL: r,
|
|
1124
1197
|
...n ? { credentials: "include" } : {},
|
|
1125
1198
|
method: "GET",
|
|
1126
1199
|
jsonParser(e) {
|
|
1127
|
-
return e ?
|
|
1200
|
+
return e ? se(e, { strict: !1 }) : null;
|
|
1128
1201
|
},
|
|
1129
1202
|
customFetchImpl: fetch,
|
|
1130
1203
|
...u,
|
|
1131
1204
|
plugins: [
|
|
1132
1205
|
a,
|
|
1133
1206
|
...u.plugins || [],
|
|
1134
|
-
...e?.disableDefaultFetchPlugins ? [] : [
|
|
1207
|
+
...e?.disableDefaultFetchPlugins ? [] : [Ce],
|
|
1135
1208
|
...i
|
|
1136
1209
|
]
|
|
1137
|
-
}), { $sessionSignal: f, session: p, broadcastSessionUpdate: m } =
|
|
1138
|
-
h || e === null || (h = !0,
|
|
1210
|
+
}), { $sessionSignal: f, session: p, broadcastSessionUpdate: m } = ke(d, e), h = !1, g = (e) => {
|
|
1211
|
+
h || e === null || (h = !0, Ee(p, e));
|
|
1139
1212
|
}, _ = e?.plugins || [], v = {}, y = {
|
|
1140
1213
|
$sessionSignal: f,
|
|
1141
1214
|
session: p
|
|
@@ -1146,9 +1219,7 @@ var Z = async (e, t) => {
|
|
|
1146
1219
|
"/delete-user": "POST"
|
|
1147
1220
|
}, x = [{
|
|
1148
1221
|
signal: "$sessionSignal",
|
|
1149
|
-
matcher
|
|
1150
|
-
return e === "/sign-out" || e === "/update-user" || e === "/update-session" || e === "/sign-up/email" || e === "/sign-in/email" || e === "/delete-user" || e === "/verify-email" || e === "/revoke-sessions" || e === "/revoke-session" || e === "/revoke-other-sessions" || e === "/change-email" || e === "/change-password";
|
|
1151
|
-
},
|
|
1222
|
+
matcher: ft,
|
|
1152
1223
|
callback(e) {
|
|
1153
1224
|
e === "/sign-out" ? m("signout") : (e === "/update-user" || e === "/update-session") && m("updateUser");
|
|
1154
1225
|
}
|
|
@@ -1163,7 +1234,7 @@ var Z = async (e, t) => {
|
|
|
1163
1234
|
},
|
|
1164
1235
|
atoms: y
|
|
1165
1236
|
};
|
|
1166
|
-
for (let t of _) t.getActions && (v =
|
|
1237
|
+
for (let t of _) t.getActions && (v = je(t.getActions?.(d, S, e) ?? {}, v));
|
|
1167
1238
|
return {
|
|
1168
1239
|
get baseURL() {
|
|
1169
1240
|
return r;
|
|
@@ -1173,34 +1244,32 @@ var Z = async (e, t) => {
|
|
|
1173
1244
|
pluginPathMethods: b,
|
|
1174
1245
|
atomListeners: x,
|
|
1175
1246
|
hydrateSession: g,
|
|
1247
|
+
$sessionSignal: f,
|
|
1176
1248
|
$fetch: d,
|
|
1177
1249
|
$store: S
|
|
1178
1250
|
};
|
|
1179
1251
|
};
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
function it(e) {
|
|
1252
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/utils/is-atom.mjs
|
|
1253
|
+
function mt(e) {
|
|
1183
1254
|
return typeof e == "object" && !!e && "get" in e && typeof e.get == "function" && "lc" in e && typeof e.lc == "number";
|
|
1184
1255
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
function at(e) {
|
|
1256
|
+
// ../node_modules/.bun/@better-auth+core@1.7.15+1bcdd7fa41f3b4db/node_modules/@better-auth/core/dist/utils/string.mjs
|
|
1257
|
+
function ht(e) {
|
|
1188
1258
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1189
1259
|
}
|
|
1190
|
-
var
|
|
1191
|
-
function
|
|
1192
|
-
return e.replace(
|
|
1260
|
+
var gt = /[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu, _t = /['\u2019]/g;
|
|
1261
|
+
function vt(e) {
|
|
1262
|
+
return e.replace(_t, "").match(gt) ?? [];
|
|
1193
1263
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return
|
|
1264
|
+
function yt(e) {
|
|
1265
|
+
return vt(e).map((e) => e.toLowerCase()).join("-");
|
|
1196
1266
|
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
function ut(e, t, n) {
|
|
1267
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/proxy.mjs
|
|
1268
|
+
function bt(e, t, n) {
|
|
1200
1269
|
let r = t[e], { fetchOptions: i, query: a, ...o } = n || {};
|
|
1201
1270
|
return r || (i?.method ? i.method : o && Object.keys(o).length > 0 ? "POST" : "GET");
|
|
1202
1271
|
}
|
|
1203
|
-
function
|
|
1272
|
+
function xt(e, t, n, r, i) {
|
|
1204
1273
|
function a(o = []) {
|
|
1205
1274
|
return new Proxy(function() {}, {
|
|
1206
1275
|
get(t, n) {
|
|
@@ -1211,13 +1280,13 @@ function dt(e, t, n, r, i) {
|
|
|
1211
1280
|
i = void 0;
|
|
1212
1281
|
break;
|
|
1213
1282
|
}
|
|
1214
|
-
return typeof i == "function" ||
|
|
1283
|
+
return typeof i == "function" || mt(i) ? i : a(r);
|
|
1215
1284
|
},
|
|
1216
1285
|
apply: async (e, a, s) => {
|
|
1217
|
-
let c = "/" + o.map(
|
|
1286
|
+
let c = "/" + o.map(yt).join("/"), l = s[0] || {}, u = s[1] || {}, { query: d, fetchOptions: f, ...p } = l, m = {
|
|
1218
1287
|
...u,
|
|
1219
1288
|
...f
|
|
1220
|
-
}, h =
|
|
1289
|
+
}, h = bt(c, n, l);
|
|
1221
1290
|
return await t(c, {
|
|
1222
1291
|
...m,
|
|
1223
1292
|
body: h === "GET" ? void 0 : {
|
|
@@ -1248,12 +1317,11 @@ function dt(e, t, n, r, i) {
|
|
|
1248
1317
|
}
|
|
1249
1318
|
return a();
|
|
1250
1319
|
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
let
|
|
1255
|
-
|
|
1256
|
-
return dt({
|
|
1320
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/vanilla.mjs
|
|
1321
|
+
function St(e) {
|
|
1322
|
+
let { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, hydrateSession: i, $fetch: a, atomListeners: o, $store: s } = pt(e), c = {};
|
|
1323
|
+
for (let [e, t] of Object.entries(r)) c[`use${ht(e)}`] = t;
|
|
1324
|
+
return xt({
|
|
1257
1325
|
...n,
|
|
1258
1326
|
...c,
|
|
1259
1327
|
hydrateSession: i,
|
|
@@ -1261,8 +1329,6 @@ function ft(e) {
|
|
|
1261
1329
|
$store: s
|
|
1262
1330
|
}, a, t, r, o);
|
|
1263
1331
|
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
//#endregion
|
|
1268
|
-
export { gt as n, ht as r, $ as t };
|
|
1332
|
+
// src/lib/auth-client.ts
|
|
1333
|
+
var $ = St({ baseURL: typeof window < "u" ? window.location.origin : "" }), { signIn: Ct, signUp: wt, signOut: Tt, getSession: Et } = $;
|
|
1334
|
+
export { Et as n, Tt as r, $ as t };
|