dmart 1.4.40.post32__py3-none-any.whl → 1.4.41.post34__py3-none-any.whl
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.
- dmart/alembic/__pycache__/__init__.cpython-314.pyc +0 -0
- dmart/alembic/__pycache__/env.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/0f3d2b1a7c21_add_authz_materialized_views.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/10d2041b94d4_last_checksum_history.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/26bfe19b49d4_rm_failedloginattempts.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/3c8bca2219cc_add_otp_table.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/6675fd9dfe42_remove_unique_from_sessions_table.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/71bc1df82e6a_adding_user_last_login_at.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/74288ccbd3b5_initial.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/7520a89a8467_rm_activesession_table.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/848b623755a4_make_created_nd_updated_at_required.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/8640dcbebf85_add_notes_to_users.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/91c94250232a_adding_fk_on_owner_shortname.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/98ecd6f56f9a_ext_meta_with_owner_group_shortname.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/9aae9138c4ef_indexing_created_at_updated_at.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/b53f916b3f6d_json_to_jsonb.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/eb5f1ec65156_adding_user_locked_to_device.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/f7a4949eed19_adding_query_policies_to_meta.cpython-314.pyc +0 -0
- dmart/api/managed/utils.py +2 -2
- dmart/api/user/router.py +1 -1
- dmart/config.env.sample +5 -22
- dmart/cxb/assets/@codemirror-prKQ1WbH.js +10 -0
- dmart/cxb/assets/@edraj-D-9hi9vU.js +1 -0
- dmart/cxb/assets/@jsonquerylang-CFfSvstT.js +12 -0
- dmart/cxb/assets/@lezer-Bz8YN7GE.js +1 -0
- dmart/cxb/assets/{@replit--ERk53eB.js → @replit-27NbNvJz.js} +1 -1
- dmart/cxb/assets/{@roxi-CGMFK4i8.js → @roxi-Bw7qXphd.js} +1 -1
- dmart/cxb/assets/{@zerodevx-BlBZjKxu.js → @zerodevx-z992vLW9.js} +1 -1
- dmart/cxb/assets/{BreadCrumbLite-ClLCZ5eT.js → BreadCrumbLite-28-Sst8b.js} +1 -1
- dmart/cxb/assets/{EntryRenderer-9GXyhIWz.js → EntryRenderer-gOGY0M8V.js} +1 -1
- dmart/cxb/assets/{ListView-DZFUWyVb.js → ListView-Ctq2bVYW.js} +2 -2
- dmart/cxb/assets/{Prism--hMplq-p.js → Prism-DbpuKlij.js} +1 -1
- dmart/cxb/assets/Table2Cols-IRZ18UvF.js +1 -0
- dmart/cxb/assets/{_...404_-fuLH_rX9.js → _...404_-lSd1jtj4.js} +1 -1
- dmart/cxb/assets/_...fallback_-De94gS6U.js +1 -0
- dmart/cxb/assets/{_module-BwgDn_st.js → _module-CPGJEbyo.js} +1 -1
- dmart/cxb/assets/{_module-BTyKyzwE.js → _module-CRNnKJ_Y.js} +3 -3
- dmart/cxb/assets/{_module-DBPRg0LH.js → _module-ziANIEpM.js} +1 -1
- dmart/cxb/assets/{codemirror-wrapped-line-indent-DPhKvljI.js → codemirror-wrapped-line-indent-CCR8a-tt.js} +1 -1
- dmart/cxb/assets/{compare-C3AjiGFR.js → compare-C3mJz3fJ.js} +1 -1
- dmart/cxb/assets/{dmart_services-AL6-IdDE.js → dmart_services-BTWOtb9Z.js} +1 -1
- dmart/cxb/assets/export-C-4WE2nV.js +1 -0
- dmart/cxb/assets/flowbite-svelte-Caf58qKG.js +1 -0
- dmart/cxb/assets/{flowbite-svelte-icons-D8uFOOjS.js → flowbite-svelte-icons-DXemwXNH.js} +1 -1
- dmart/cxb/assets/{global-igKv-1g9.js → global-CF7LWRdS.js} +1 -1
- dmart/cxb/assets/import-BMOPDoXp.js +1 -0
- dmart/cxb/assets/{index-DtiCmB4o.js → index-BAsZYsRz.js} +1 -1
- dmart/cxb/assets/{index-CC-A1ipE.js → index-BBCAZYiv.js} +1 -1
- dmart/cxb/assets/{index-BWN92sjI.js → index-BJ8k452_.js} +4 -4
- dmart/cxb/assets/{index-xuuZoPt8.js → index-BUIZc0eo.js} +1 -1
- dmart/cxb/assets/{index-BejgdGl7.js → index-Ba1QyM6b.js} +1 -1
- dmart/cxb/assets/{index-Du1Yp_ew.js → index-BhRFcH0w.js} +1 -1
- dmart/cxb/assets/{index-UMAHQJV7.js → index-C2qX9HoV.js} +1 -1
- dmart/cxb/assets/{index-DTfhnhwd.js → index-CDaVHY1H.js} +1 -1
- dmart/cxb/assets/{index-BdeNM69f.js → index-C_qmKy7R.js} +1 -1
- dmart/cxb/assets/index-CbbMUQaM.css +2 -0
- dmart/cxb/assets/{index-CJk5Ul2Q.js → index-CsFEfUT6.js} +1 -1
- dmart/cxb/assets/{index-CIUfy6RC.js → index-DVbd0rhr.js} +1 -1
- dmart/cxb/assets/index-DtR8jRRM.js +1 -0
- dmart/cxb/assets/{index-DQmwVe-X.js → index-Eaqb7YHm.js} +1 -1
- dmart/cxb/assets/{info-Dd-l-jS9.js → info-B3CPbnSo.js} +1 -1
- dmart/cxb/assets/{jsonrepair-B30Dx381.js → jsonrepair-DJT3kRBj.js} +6 -6
- dmart/cxb/assets/{pagination-svelte-D5CyoiE_.js → pagination-svelte-D8AVMXcz.js} +1 -1
- dmart/cxb/assets/{profile-BUf-tKMe.js → profile-uY5zsYbu.js} +1 -1
- dmart/cxb/assets/{query-BSLdkT80.js → query-Ck7rjPsV.js} +1 -1
- dmart/cxb/assets/spaces-5QYuv6aM.js +1 -0
- dmart/cxb/assets/svelte-B9Ye91X-.js +4 -0
- dmart/cxb/assets/{svelte-awesome-DhnMA6Q_.js → svelte-awesome-DpV9QpGy.js} +1 -1
- dmart/cxb/assets/{svelte-datatables-net-CY7LBj6I.js → svelte-datatables-net-PrmrsOQE.js} +1 -1
- dmart/cxb/assets/{svelte-floating-ui-BlS3sOAQ.js → svelte-floating-ui-BWukrOq5.js} +1 -1
- dmart/cxb/assets/{svelte-i18n-CT2KkQaN.js → svelte-i18n-CZ4cFDVx.js} +1 -1
- dmart/cxb/assets/{svelte-jsoneditor-BzfX6Usi.css → svelte-jsoneditor-6jH6h6zi.css} +1 -1
- dmart/cxb/assets/{svelte-jsoneditor-CUGSvWId.js → svelte-jsoneditor-BdDDhQGI.js} +1 -1
- dmart/cxb/assets/{svelte-select-CjHAt_85.js → svelte-select-BDtNxMKN.js} +2 -2
- dmart/cxb/assets/toast-nP_bUL2P.js +1 -0
- dmart/cxb/assets/{typewriter-editor-DkTVIJdm.js → typewriter-editor-Do-KAaNp.js} +1 -1
- dmart/cxb/assets/{user-DeK_NB5v.js → user-BQpJ6b6h.js} +1 -1
- dmart/cxb/config.json +1 -2
- dmart/cxb/index.html +6 -6
- dmart/data_adapters/sql/adapter.py +19 -2
- dmart/dmart.py +106 -46
- dmart/fast.py +6 -0
- dmart/info.json +1 -1
- dmart/main.py +5 -0
- dmart/my.py +11 -0
- dmart/publish.sh +2 -2
- dmart/sample/spaces/applications/.dm/meta.space.json +24 -29
- dmart/sample/spaces/applications/api/.dm/meta.folder.json +18 -1
- dmart/sample/spaces/applications/api/.dm/query_all_applications/meta.content.json +17 -1
- dmart/sample/spaces/applications/api/.dm/test_by_saad/attachments.media/meta.warframe.json +16 -1
- dmart/sample/spaces/applications/api/.dm/test_by_saad/meta.content.json +16 -1
- dmart/sample/spaces/applications/api/.dm/user_profile/meta.content.json +17 -1
- dmart/sample/spaces/applications/api/applications/.dm/create_log/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/applications/.dm/create_public_logs/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/applications/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/applications/api/applications/.dm/query_all_translated_data/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/applications/.dm/query_logs/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/applications/.dm/query_translated_enums/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/applications/.dm/query_translated_others/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/applications/.dm/query_translated_resolution/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/applications/create_log.json +46 -1
- dmart/sample/spaces/applications/api/applications/create_public_logs.json +22 -1
- dmart/sample/spaces/applications/api/applications/query_all_translated_data.json +14 -1
- dmart/sample/spaces/applications/api/applications/query_logs.json +11 -1
- dmart/sample/spaces/applications/api/applications/query_translated_enums.json +14 -1
- dmart/sample/spaces/applications/api/applications/query_translated_others.json +14 -1
- dmart/sample/spaces/applications/api/applications/query_translated_resolution.json +13 -1
- dmart/sample/spaces/applications/api/applications.json +16 -1
- dmart/sample/spaces/applications/api/management/.dm/create_subaccount/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/management/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/applications/api/management/.dm/update_password/meta.content.json +15 -1
- dmart/sample/spaces/applications/api/management/create_subaccount.json +29 -29
- dmart/sample/spaces/applications/api/management/update_password.json +19 -1
- dmart/sample/spaces/applications/api/management.json +16 -1
- dmart/sample/spaces/applications/api/query_all_applications.json +5 -6
- dmart/sample/spaces/applications/api/test_by_saad.json +4 -1
- dmart/sample/spaces/applications/api/user/.dm/meta.folder.json +9 -1
- dmart/sample/spaces/applications/api/user/.dm/test_by_saad/meta.content.json +16 -1
- dmart/sample/spaces/applications/api/user/.dm/user_profile/meta.content.json +17 -1
- dmart/sample/spaces/applications/api/user/test_by_saad.json +4 -1
- dmart/sample/spaces/applications/api/user/user_profile.json +4 -1
- dmart/sample/spaces/applications/api/user_profile.json +4 -1
- dmart/sample/spaces/applications/api.json +33 -1
- dmart/sample/spaces/applications/collections/.dm/meta.folder.json +11 -10
- dmart/sample/spaces/applications/collections.json +20 -1
- dmart/sample/spaces/applications/configurations/.dm/meta.folder.json +17 -1
- dmart/sample/spaces/applications/configurations.json +8 -8
- dmart/sample/spaces/applications/logs/.dm/meta.folder.json +12 -1
- dmart/sample/spaces/applications/queries/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/applications/queries/.dm/order/meta.content.json +17 -1
- dmart/sample/spaces/applications/queries/order.json +15 -1
- dmart/sample/spaces/applications/queries.json +16 -1
- dmart/sample/spaces/applications/schema/.dm/api/meta.schema.json +17 -1
- dmart/sample/spaces/applications/schema/.dm/configuration/meta.schema.json +14 -1
- dmart/sample/spaces/applications/schema/.dm/error/meta.schema.json +14 -1
- dmart/sample/spaces/applications/schema/.dm/log/meta.schema.json +15 -1
- dmart/sample/spaces/applications/schema/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/applications/schema/.dm/query/meta.schema.json +15 -14
- dmart/sample/spaces/applications/schema/.dm/translation/meta.schema.json +14 -1
- dmart/sample/spaces/applications/schema/api.json +24 -18
- dmart/sample/spaces/applications/schema/configuration.json +26 -1
- dmart/sample/spaces/applications/schema/error.json +22 -22
- dmart/sample/spaces/applications/schema/log.json +57 -1
- dmart/sample/spaces/applications/schema/query.json +56 -58
- dmart/sample/spaces/applications/schema/translation.json +4 -4
- dmart/sample/spaces/applications/schema.json +16 -1
- dmart/sample/spaces/applications/translations/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/applications/translations.json +22 -1
- dmart/sample/spaces/archive/.dm/meta.space.json +19 -26
- dmart/sample/spaces/custom_plugins/dummy/__pycache__/plugin.cpython-314.pyc +0 -0
- dmart/sample/spaces/custom_plugins/own_changed_notification/__pycache__/plugin.cpython-314.pyc +0 -0
- dmart/sample/spaces/dummy/.dm/myfolder/history.jsonl +3 -0
- dmart/sample/spaces/dummy/.dm/posts/history.jsonl +3 -0
- dmart/sample/spaces/dummy/.dm/workflows/history.jsonl +3 -0
- dmart/sample/spaces/dummy/myfolder/.dm/an_example/history.jsonl +4 -0
- dmart/sample/spaces/dummy/myfolder/.dm/buyer_123/history.jsonl +2 -0
- dmart/sample/spaces/dummy/posts/.dm/97326c47/history.jsonl +3 -0
- dmart/sample/spaces/dummymyfolder/.dm/an_example/history.jsonl +2 -0
- dmart/sample/spaces/dummymyfolder/.dm/buyer_123/history.jsonl +2 -0
- dmart/sample/spaces/dummymyfolder/buyer_123/.dm/receipt/history.jsonl +2 -0
- dmart/sample/spaces/dummyschema/.dm/test_schema/history.jsonl +2 -0
- dmart/sample/spaces/dummyschema/.dm/ticket_workflows/history.jsonl +2 -0
- dmart/sample/spaces/dummyworkflows/.dm/myworkflow/history.jsonl +2 -0
- dmart/sample/spaces/management/.dm/meta.space.json +24 -27
- dmart/sample/spaces/management/.dm/notifications/attachments.view.json/admin.json +31 -32
- dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.admin.json +15 -1
- dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.system.json +15 -1
- dmart/sample/spaces/management/.dm/notifications/attachments.view.json/system.json +27 -28
- dmart/sample/spaces/management/collections/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/management/collections.json +26 -1
- dmart/sample/spaces/management/groups/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/management/groups.json +14 -1
- dmart/sample/spaces/management/health_check/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/management/health_check.json +13 -1
- dmart/sample/spaces/management/notifications/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/management/notifications/admin/.dm/meta.folder.json +6 -6
- dmart/sample/spaces/management/notifications/system/.dm/meta.folder.json +6 -6
- dmart/sample/spaces/management/notifications.json +46 -1
- dmart/sample/spaces/management/permissions/.dm/access_applications/meta.permission.json +4 -5
- dmart/sample/spaces/management/permissions/.dm/access_applications_world/meta.permission.json +23 -24
- dmart/sample/spaces/management/permissions/.dm/access_messages/meta.permission.json +14 -8
- dmart/sample/spaces/management/permissions/.dm/access_personal/meta.permission.json +12 -7
- dmart/sample/spaces/management/permissions/.dm/access_protected/meta.permission.json +12 -8
- dmart/sample/spaces/management/permissions/.dm/access_public/meta.permission.json +12 -8
- dmart/sample/spaces/management/permissions/.dm/browse_all_folders/meta.permission.json +5 -6
- dmart/sample/spaces/management/permissions/.dm/create_log/meta.permission.json +9 -8
- dmart/sample/spaces/management/permissions/.dm/interviewer/meta.permission.json +34 -1
- dmart/sample/spaces/management/permissions/.dm/manage_applications/meta.permission.json +35 -1
- dmart/sample/spaces/management/permissions/.dm/manage_debug/meta.permission.json +9 -7
- dmart/sample/spaces/management/permissions/.dm/manage_spaces/meta.permission.json +5 -6
- dmart/sample/spaces/management/permissions/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/management/permissions/.dm/rules_management_default/meta.permission.json +10 -7
- dmart/sample/spaces/management/permissions/.dm/super_manager/meta.permission.json +4 -7
- dmart/sample/spaces/management/permissions/.dm/view_activity_log/meta.permission.json +10 -7
- dmart/sample/spaces/management/permissions/.dm/view_collections/meta.permission.json +6 -6
- dmart/sample/spaces/management/permissions/.dm/view_logs/meta.permission.json +9 -8
- dmart/sample/spaces/management/permissions/.dm/view_roles/meta.permission.json +10 -11
- dmart/sample/spaces/management/permissions/.dm/view_users/meta.permission.json +10 -7
- dmart/sample/spaces/management/permissions/.dm/view_world/meta.permission.json +10 -12
- dmart/sample/spaces/management/permissions/.dm/world/meta.permission.json +15 -10
- dmart/sample/spaces/management/permissions.json +10 -1
- dmart/sample/spaces/management/roles/.dm/dummy/meta.role.json +6 -6
- dmart/sample/spaces/management/roles/.dm/logged_in/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/manager/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/management/roles/.dm/moderator/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/super_admin/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/test_role/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/world/meta.role.json +7 -7
- dmart/sample/spaces/management/roles.json +11 -1
- dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/meta.ui_schema.json +15 -9
- dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/ui_schema.json +4 -4
- dmart/sample/spaces/management/schema/.dm/admin_notification_request/meta.schema.json +17 -1
- dmart/sample/spaces/management/schema/.dm/api/meta.schema.json +15 -1
- dmart/sample/spaces/management/schema/.dm/folder_rendering/meta.schema.json +17 -1
- dmart/sample/spaces/management/schema/.dm/health_check/meta.schema.json +8 -8
- dmart/sample/spaces/management/schema/.dm/meta.folder.json +15 -1
- dmart/sample/spaces/management/schema/.dm/meta_schema/meta.schema.json +14 -1
- dmart/sample/spaces/management/schema/.dm/metafile/meta.schema.json +14 -13
- dmart/sample/spaces/management/schema/.dm/notification/meta.schema.json +17 -1
- dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/meta.ui_schema.json +15 -9
- dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/ui_schema.json +1 -1
- dmart/sample/spaces/management/schema/.dm/system_notification_request/meta.schema.json +17 -1
- dmart/sample/spaces/management/schema/.dm/view/meta.schema.json +17 -1
- dmart/sample/spaces/management/schema/.dm/workflow/meta.schema.json +17 -1
- dmart/sample/spaces/management/schema/admin_notification_request.json +85 -88
- dmart/sample/spaces/management/schema/api.json +35 -1
- dmart/sample/spaces/management/schema/folder_rendering.json +166 -174
- dmart/sample/spaces/management/schema/health_check.json +1 -4
- dmart/sample/spaces/management/schema/meta_schema.json +48 -48
- dmart/sample/spaces/management/schema/metafile.json +73 -76
- dmart/sample/spaces/management/schema/notification.json +15 -10
- dmart/sample/spaces/management/schema/system_notification_request.json +49 -38
- dmart/sample/spaces/management/schema/view.json +11 -11
- dmart/sample/spaces/management/schema/workflow.json +51 -53
- dmart/sample/spaces/management/schema.json +16 -1
- dmart/sample/spaces/management/users/.dm/alibaba/meta.user.json +14 -15
- dmart/sample/spaces/management/users/.dm/anonymous/meta.user.json +17 -17
- dmart/sample/spaces/management/users/.dm/distributor/history.jsonl +6 -0
- dmart/sample/spaces/management/users/.dm/dmart/meta.user.json +30 -18
- dmart/sample/spaces/management/users/.dm/meta.folder.json +7 -7
- dmart/sample/spaces/management/workflows/.dm/channel/meta.content.json +16 -1
- dmart/sample/spaces/management/workflows/.dm/meta.folder.json +17 -1
- dmart/sample/spaces/management/workflows/channel.json +40 -40
- dmart/sample/spaces/management/workflows.json +13 -1
- dmart/sample/spaces/managementusers/.dm/distributor/history.jsonl +3 -0
- dmart/sample/spaces/managementusers/.dm/dmart/history.jsonl +11 -0
- dmart/sample/spaces/maqola/.dm/meta.space.json +19 -23
- dmart/sample/spaces/personal/.dm/meta.space.json +24 -18
- dmart/sample/spaces/personal/people/.dm/meta.folder.json +9 -1
- dmart/sample/spaces/personal/people/distributor/.dm/meta.folder.json +9 -0
- dmart/sample/spaces/personal/people/distributor/inbox/.dm/meta.folder.json +9 -0
- dmart/sample/spaces/personal/people/distributor/notifications/.dm/meta.folder.json +9 -0
- dmart/sample/spaces/personal/people/distributor/private/.dm/meta.folder.json +9 -0
- dmart/sample/spaces/personal/people/distributor/protected/.dm/meta.folder.json +9 -0
- dmart/sample/spaces/personal/people/distributor/public/.dm/meta.folder.json +9 -0
- dmart/sample/spaces/personal/people/dmart/.dm/meta.folder.json +9 -1
- dmart/sample/spaces/personal/people/dmart/messages/.dm/0b5f7e7f/meta.content.json +14 -1
- dmart/sample/spaces/personal/people/dmart/messages/.dm/meta.folder.json +9 -1
- dmart/sample/spaces/personal/people/dmart/messages/.dm/mytest/meta.content.json +14 -1
- dmart/sample/spaces/personal/people/dmart/messages/0b5f7e7f.json +3 -1
- dmart/sample/spaces/personal/people/dmart/messages/mytest.json +4 -1
- dmart/sample/spaces/personal/people/dmart/notifications/.dm/meta.folder.json +9 -1
- dmart/sample/spaces/personal/people/dmart/private/.dm/inner/meta.content.json +14 -1
- dmart/sample/spaces/personal/people/dmart/private/.dm/meta.folder.json +9 -1
- dmart/sample/spaces/personal/people/dmart/private/inner.json +3 -1
- dmart/sample/spaces/personal/people/dmart/protected/.dm/avatar/meta.content.json +14 -1
- dmart/sample/spaces/personal/people/dmart/protected/.dm/meta.folder.json +9 -1
- dmart/sample/spaces/personal/people/dmart/public/.dm/meta.folder.json +9 -1
- dmart/sample/test/.gitignore +0 -1
- dmart/utils/settings.py +0 -31
- {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/METADATA +1 -1
- {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/RECORD +277 -236
- dmart/cxb/assets/@codemirror-Rn7_6DkE.js +0 -10
- dmart/cxb/assets/@edraj-CS4NwVbD.js +0 -1
- dmart/cxb/assets/@jsonquerylang-laKNoFFq.js +0 -12
- dmart/cxb/assets/@lezer-za4Q-8Ew.js +0 -1
- dmart/cxb/assets/Table2Cols-BsbwicQm.js +0 -1
- dmart/cxb/assets/_...fallback_-Ba_NLmAE.js +0 -1
- dmart/cxb/assets/export-OF_rTiXu.js +0 -1
- dmart/cxb/assets/flowbite-svelte-BLvjb-sa.js +0 -1
- dmart/cxb/assets/import-BiJTp7Zs.js +0 -1
- dmart/cxb/assets/index-DOCBh6PM.js +0 -1
- dmart/cxb/assets/index-NBrXBlLA.css +0 -2
- dmart/cxb/assets/spaces-0oyGvpii.js +0 -1
- dmart/cxb/assets/svelte-B2XmcTi_.js +0 -4
- dmart/cxb/assets/toast-B9WDyfyI.js +0 -1
- dmart/sample/spaces/management/.dm/events.jsonl +0 -32
- {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/WHEEL +0 -0
- {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/entry_points.txt +0 -0
- {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a5 as lt,k as v,
|
|
1
|
+
import{a5 as lt,k as v,aE as Nl,p as Ul,as as Jl,b as r,aF as Ml,A as Pl,x as Wl,c as a,m as k,r as f,t as i,e as _,P as Ee,u as zl,i as Gl,B as E,S,aw as Vt,j as L,E as C,F as j,q as D,C as Rl,D as $e,y as X,ay as He,aA as se,N as Ve,R,ap as Kl,aD as Bt,l as Yl,ax as he,h as P,f as K,at as Be,O as qt,ak as Nt,ai as et,a6 as xe,U as we,ae as Ql,V as Xl,_ as Zl}from"./svelte-B9Ye91X-.js";import{o as $l,f as ea,s as ta}from"./@floating-ui-BwwcF-xh.js";import{c as la}from"./svelte-floating-ui-BWukrOq5.js";function aa({loadOptions:H,filterText:n,items:A,multiple:W,value:p,itemId:Z,groupBy:Oe,filterSelectedItems:ke,itemFilter:Se,convertStringItemsToObjects:c,filterGroupedItems:ge,label:Ce}){if(A&&H)return A;if(!A)return[];A&&A.length>0&&typeof A[0]!="object"&&(A=c(A));let w=A.filter(_e=>{let oe=Se(_e[Ce],n,_e);return oe&&W&&(p!=null&&p.length)&&(oe=!p.some(qe=>ke?qe[Z]===_e[Z]:!1)),oe});return Oe&&(w=ge(w)),w}async function na({dispatch:H,loadOptions:n,convertStringItemsToObjects:A,filterText:W}){let p=await n(W).catch(Z=>{console.warn("svelte-select loadOptions error :>> ",Z),H("error",{type:"loadOptions",details:Z})});if(p&&!p.cancelled)return p?(p&&p.length>0&&typeof p[0]!="object"&&(p=A(p)),H("loaded",{items:p})):p=[],{filteredItems:p,loading:!1,focused:!0,listOpen:!0}}var ia=lt(`<svg width="100%" height="100%" viewBox="0 0 20 20" focusable="false" aria-hidden="true" class="svelte-1kxu7be"><path fill="currentColor" d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747
|
|
2
2
|
3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0
|
|
3
3
|
1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502
|
|
4
4
|
0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0
|
|
5
5
|
0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>`);function ra(H){var n=ia();v(H,n)}var sa=lt(`<svg width="100%" height="100%" viewBox="-2 -2 50 50" focusable="false" aria-hidden="true" role="presentation" class="svelte-1hraxrc"><path fill="currentColor" d="M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124
|
|
6
|
-
l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"></path></svg>`);function tt(H){var n=sa();v(H,n)}var oa=lt('<svg class="loading svelte-y9fi5p" viewBox="25 25 50 50"><circle class="circle_path svelte-y9fi5p" cx="50" cy="50" r="20" fill="none" stroke="currentColor" stroke-width="5" stroke-miterlimit="10"></circle></svg>');function ua(H){var n=oa();v(H,n)}var ca=E('<div class="list-item svelte-1ul7oo4" tabindex="-1" role="none"><div><!></div></div>'),fa=E('<div class="empty svelte-1ul7oo4">No options</div>'),da=E('<div role="none"><!> <!> <!></div>'),va=E('<span id="aria-selection" class="svelte-1ul7oo4"> </span> <span id="aria-context" class="svelte-1ul7oo4"> </span>',1),ha=E('<div class="multi-item-clear svelte-1ul7oo4"><!></div>'),ga=E('<div role="none"><span class="multi-item-text svelte-1ul7oo4"><!></span> <!></div>'),_a=E("<div><!></div>"),ma=E('<div class="icon loading svelte-1ul7oo4" aria-hidden="true"><!></div>'),ba=E('<button type="button" class="icon clear-select svelte-1ul7oo4"><!></button>'),ya=E('<div class="icon chevron svelte-1ul7oo4" aria-hidden="true"><!></div>'),pa=E('<input type="hidden" class="svelte-1ul7oo4"/>'),Ia=E('<select class="required svelte-1ul7oo4" required tabindex="-1" aria-hidden="true"></select>'),xa=E('<div role="none"><!> <span aria-live="polite" aria-atomic="false" aria-relevant="additions text" class="a11y-text svelte-1ul7oo4"><!></span> <div class="prepend svelte-1ul7oo4"><!></div> <div class="value-container svelte-1ul7oo4"><!> <input/></div> <div class="indicators svelte-1ul7oo4"><!> <!> <!></div> <!> <!></div>');function Sa(H,n){const A=Nl(n);Ul(n,!1);const G=k(),p=k(),Z=k(),Oe=k(),ke=k(),Se=k(),c=k(),ge=k(),Ce=k(),w=Jl();let _e=r(n,"justValue",12,null),oe=r(n,"filter",8,aa),qe=r(n,"getItems",8,na),at=r(n,"id",8,null),Ut=r(n,"name",8,null),U=r(n,"container",12,void 0),J=r(n,"input",12,void 0),s=r(n,"multiple",8,!1),nt=r(n,"multiFullItemClearable",8,!1),ae=r(n,"disabled",8,!1),I=r(n,"focused",12,!1),t=r(n,"value",12,null),x=r(n,"filterText",12,""),Ae=r(n,"placeholder",8,"Please select"),it=r(n,"placeholderAlwaysShow",8,!1),Y=r(n,"items",12,null),V=r(n,"label",8,"label"),rt=r(n,"itemFilter",8,(e,l,o)=>`${e}`.toLowerCase().includes(l.toLowerCase())),me=r(n,"groupBy",8,void 0),Jt=r(n,"groupFilter",8,e=>e),Mt=r(n,"groupHeaderSelectable",8,!1),h=r(n,"itemId",8,"value"),be=r(n,"loadOptions",8,void 0),zt=r(n,"containerStyles",8,""),Gt=r(n,"hasError",8,!1),st=r(n,"filterSelectedItems",8,!0),ot=r(n,"required",8,!1),Pt=r(n,"closeListOnChange",8,!0),Wt=r(n,"clearFilterTextOnBlur",8,!0),Rt=r(n,"createGroupHeaderItem",8,(e,l)=>({value:e,[V()]:e}));const ut=()=>a(c);let Fe=r(n,"searchable",8,!0),Kt=r(n,"inputStyles",8,""),ct=r(n,"clearable",8,!0),ue=r(n,"loading",12,!1),u=r(n,"listOpen",12,!1),ft,Yt=r(n,"debounce",8,(e,l=1)=>{clearTimeout(ft),ft=setTimeout(e,l)}),Qt=r(n,"debounceWait",8,300),Xt=r(n,"hideEmptyState",8,!1),Ne=r(n,"inputAttributes",24,()=>({})),Zt=r(n,"listAutoWidth",8,!0),dt=r(n,"showChevron",8,!1),$t=r(n,"listOffset",8,5),g=r(n,"hoverItemIndex",12,0),ye=r(n,"floatingConfig",24,()=>({})),el=r(n,"class",8,""),m=k(),$=k(),Ue=k(),Je=k();function tl(){if(typeof t()=="string"){let e=(Y()||[]).find(l=>l[h()]===t());t(e||{[h()]:t(),label:t()})}else s()&&Array.isArray(t())&&t().length>0&&t(t().map(e=>typeof e=="string"?{value:e,label:e}:e))}let ce=k();function ll(){_(ce,Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},Ne())),at()&&Ee(ce,a(ce).id=at()),Fe()||Ee(ce,a(ce).readonly=!0)}function vt(e){return e.map((l,o)=>({index:o,value:l,label:`${l}`}))}function ht(e){const l=[],o={};e.forEach(T=>{const y=me()(T);l.includes(y)||(l.push(y),o[y]=[],y&&o[y].push(Object.assign(Rt()(y,T),{id:y,groupHeader:!0,selectable:Mt()}))),o[y].push(Object.assign({groupItem:!!y},T))});const b=[];return Jt()(l).forEach(T=>{o[T]&&b.push(...o[T])}),b}function al(){if(s()){JSON.stringify(t())!==JSON.stringify(a($))&&_t()&&w("input",t());return}(!a($)||JSON.stringify(t()[h()])!==JSON.stringify(a($)[h()]))&&w("input",t())}function nl(){t()&&(Array.isArray(t())?t([...t()]):t([t()]))}function il(){t()&&t(null)}function rl(){const e=a(c).findIndex(l=>l[h()]===t()[h()]);gt(e,!0)}function sl(e){w("hoverItem",e)}function gt(e=0,l){g(e<0?0:e),!l&&me()&&a(c)[g()]&&!a(c)[g()].selectable&&Te(1)}function ol(){!be()&&x().length===0||(be()?Yt()(async function(){ue(!0);let e=await qe()({dispatch:w,loadOptions:be(),convertStringItemsToObjects:vt,filterText:x()});e?(ue(e.loading),u(u()?e.listOpen:x().length>0),I(u()&&e.focused),Y(me()?ht(e.filteredItems):e.filteredItems)):(ue(!1),I(!0),u(!0))},Qt()):(u(!0),s()&&_(m,void 0)))}function ul(e){u()&&w("filter",e)}Ml(async()=>{_($,t()),_(Ue,x()),_(Je,s())});function cl(){return s()?t()?t().map(e=>e[h()]):null:t()?t()[h()]:t()}function _t(){let e=!0;if(t()){const l=[],o=[];t().forEach(b=>{l.includes(b[h()])?e=!1:(l.push(b[h()]),o.push(b))}),e||t(o)}return e}function mt(e){let l=e?e[h()]:t()[h()];return Y().find(o=>o[h()]===l)}function fl(e){!e||e.length===0||e.some(l=>typeof l!="object")||!t()||(s()?t().some(l=>!l||!l[h()]):!t()[h()])||(Array.isArray(t())?t(t().map(l=>mt(l)||l)):t(mt()||t()))}async function Me(e){const l=t()[e];t().length===1?t(void 0):t(t().filter(o=>o!==l)),w("clear",l)}function bt(e){if(I())switch(e.stopPropagation(),e.key){case"Escape":e.preventDefault(),Q();break;case"Enter":if(e.preventDefault(),u()){if(a(c).length===0)break;const l=a(c)[g()];if(t()&&!s()&&t()[h()]===l[h()]){Q();break}else We(a(c)[g()])}break;case"ArrowDown":e.preventDefault(),u()?Te(1):(u(!0),_(m,void 0));break;case"ArrowUp":e.preventDefault(),u()?Te(-1):(u(!0),_(m,void 0));break;case"Tab":if(u()&&I()){if(a(c).length===0||t()&&t()[h()]===a(c)[g()][h()])return Q();e.preventDefault(),We(a(c)[g()]),Q()}break;case"Backspace":if(!s()||x().length>0)return;if(s()&&t()&&t().length>0){if(Me(a(m)!==void 0?a(m):t().length-1),a(m)===0||a(m)===void 0)break;_(m,t().length>a(m)?a(m)-1:void 0)}break;case"ArrowLeft":if(!t()||!s()||x().length>0)return;a(m)===void 0?_(m,t().length-1):t().length>a(m)&&a(m)!==0&&_(m,a(m)-1);break;case"ArrowRight":if(!t()||!s()||x().length>0||a(m)===void 0)return;a(m)===t().length-1?_(m,void 0):a(m)<t().length-1&&_(m,a(m)+1);break}}function ze(e){var l;I()&&J()===(document==null?void 0:document.activeElement)||(e&&w("focus",e),(l=J())==null||l.focus(),I(!0))}async function yt(e){var l;Pe||(u()||I())&&(w("blur",e),Q(),I(!1),_(m,void 0),(l=J())==null||l.blur())}function dl(){if(!ae()){if(x().length>0)return u(!0);u(!u())}}function Ge(){w("clear",t()),t(void 0),Q(),ze()}zl(()=>{u()&&I(!0),I()&&J()&&J().focus()});function vl(e){if(e){x("");const l=Object.assign({},e);if(l.groupHeader&&!l.selectable)return;t(s()?t()?t().concat([l]):[l]:t(l)),setTimeout(()=>{Pt()&&Q(),_(m,void 0),w("change",t()),w("select",e)})}}function Q(){Wt()&&x(""),u(!1)}let hl=r(n,"ariaValues",8,e=>`Option ${e}, selected.`),gl=r(n,"ariaListOpen",8,(e,l)=>`You are currently focused on option ${e}. There are ${l} results available.`),_l=r(n,"ariaFocused",8,()=>"Select is focused, type to refine list, press down to open the menu.");function ml(e){let l;return e&&t().length>0?l=t().map(o=>o[V()]).join(", "):l=t()[V()],hl()(l)}function bl(){if(!a(c)||a(c).length===0)return"";let e=a(c)[g()];if(u()&&e){let l=a(c)?a(c).length:0;return gl()(e[V()],l)}else return _l()()}let B=k(null),pt;function It(){clearTimeout(pt),pt=setTimeout(()=>{Pe=!1},100)}function yl(e){var l;!u()&&!I()&&U()&&!U().contains(e.target)&&!((l=a(B))!=null&&l.contains(e.target))&&yt()}Gl(()=>{var e;(e=a(B))==null||e.remove()});let Pe=!1;function We(e){!e||e.selectable===!1||vl(e)}function xt(e){Pe||g(e)}function pl(e){const{item:l,i:o}=e;if((l==null?void 0:l.selectable)!==!1){if(t()&&!s()&&t()[h()]===l[h()])return Q();xl(l)&&(g(o),We(l))}}function Te(e){if(a(c).filter(b=>!Object.hasOwn(b,"selectable")||b.selectable===!0).length===0)return g(0);e>0&&g()===a(c).length-1?g(0):e<0&&g()===0?g(a(c).length-1):g(g()+e);const o=a(c)[g()];if(o&&o.selectable===!1){(e===1||e===-1)&&Te(e);return}}function wt(e,l,o){if(!s())return l&&l[o]===e[o]}function Il(e){return e===0}function xl(e){return e.groupHeader&&e.selectable||e.selectable||!e.hasOwnProperty("selectable")}const Re=Ot,Ke=Ot;function Ot(e){return{update(l){l.scroll&&(It(),e.scrollIntoView({behavior:"auto",block:"nearest"}))}}}function wl(){const{width:e}=U().getBoundingClientRect();Ee(B,a(B).style.width=Zt()?e+"px":"auto")}let pe=k({strategy:"absolute",placement:"bottom-start",middleware:[$l($t()),ea(),ta()],autoUpdate:!1});const[Ye,Qe,Ol]=la(a(pe));let Xe=k(!0);function kl(e,l){if(!e||!l)return _(Xe,!0);setTimeout(()=>{_(Xe,!1)},0)}f(()=>(i(Y()),i(t())),()=>{Y(),t()&&tl()}),f(()=>(i(Ne()),i(Fe())),()=>{(Ne()||!Fe())&&ll()}),f(()=>i(s()),()=>{s()&&nl()}),f(()=>(a(Je),i(s())),()=>{a(Je)&&!s()&&il()}),f(()=>(i(s()),i(t())),()=>{s()&&t()&&t().length>1&&_t()}),f(()=>i(t()),()=>{t()&&al()}),f(()=>(i(t()),i(s()),a($)),()=>{!t()&&s()&&a($)&&w("input",t())}),f(()=>(i(I()),i(J())),()=>{!I()&&J()&&Q()}),f(()=>(i(x()),a(Ue)),()=>{x()!==a(Ue)&&ol()}),f(()=>(i(oe()),i(be()),i(x()),i(Y()),i(s()),i(t()),i(h()),i(me()),i(V()),i(st()),i(rt())),()=>{_(c,oe()({loadOptions:be(),filterText:x(),items:Y(),multiple:s(),value:t(),itemId:h(),groupBy:me(),label:V(),filterSelectedItems:st(),itemFilter:rt(),convertStringItemsToObjects:vt,filterGroupedItems:ht}))}),f(()=>(i(s()),i(u()),i(t()),a(c)),()=>{!s()&&u()&&t()&&a(c)&&rl()}),f(()=>(i(u()),i(s())),()=>{u()&&s()&&g(0)}),f(()=>i(x()),()=>{x()&&g(0)}),f(()=>i(g()),()=>{sl(g())}),f(()=>(i(s()),i(t())),()=>{_(G,s()?t()&&t().length>0:t())}),f(()=>(a(G),i(x())),()=>{_(p,a(G)&&x().length>0)}),f(()=>(a(G),i(ct()),i(ae()),i(ue())),()=>{_(Z,a(G)&&ct()&&!ae()&&!ue())}),f(()=>(i(it()),i(s()),i(Ae()),i(t())),()=>{var e;_(Oe,it()&&s()||s()&&((e=t())==null?void 0:e.length)===0?Ae():t()?"":Ae())}),f(()=>(i(t()),i(s())),()=>{_(ke,t()?ml(s()):"")}),f(()=>(a(c),i(g()),i(I()),i(u())),()=>{_(Se,bl({filteredItems:a(c),hoverItemIndex:g(),focused:I(),listOpen:u()}))}),f(()=>i(Y()),()=>{fl(Y())}),f(()=>(i(s()),i(t()),i(h())),()=>{_e(cl(s(),t(),h()))}),f(()=>(i(s()),a($),i(t())),()=>{!s()&&a($)&&!t()&&w("input",t())}),f(()=>(i(u()),a(c),i(s()),i(t())),()=>{u()&&a(c)&&!s()&&!t()&>()}),f(()=>a(c),()=>{ul(a(c))}),f(()=>(i(U()),i(ye()),a(pe)),()=>{U()&&ye()&&Ol(Object.assign(a(pe),ye()))}),f(()=>a(B),()=>{_(ge,!!a(B))}),f(()=>(a(B),i(u())),()=>{kl(a(B),u())}),f(()=>(i(u()),i(U()),a(B)),()=>{u()&&U()&&a(B)&&wl()}),f(()=>i(g()),()=>{_(Ce,g())}),f(()=>(i(J()),i(u()),i(I())),()=>{J()&&u()&&!I()&&ze()}),f(()=>(i(U()),i(ye())),()=>{var e;U()&&((e=ye())==null?void 0:e.autoUpdate)===void 0&&Ee(pe,a(pe).autoUpdate=!0)}),Pl();var Sl={getFilteredItems:ut,handleClear:Ge};Wl();var ne=xa();S("click",Vt,yl),S("keydown",Vt,bt);let kt;var St=C(ne);{var Cl=e=>{var l=da();let o;var b=C(l);{var T=d=>{var O=K(),P=z(O);D(P,n,"list-prepend",{},null),v(d,O)};L(b,d=>{X(()=>A["list-prepend"])&&d(T)})}var y=j(b,2);{var ee=d=>{var O=K(),P=z(O);D(P,n,"list",{get filteredItems(){return a(c)}},null),v(d,O)},de=d=>{var O=K(),P=z(O);{var Le=te=>{var re=K(),M=z(re);qt(M,1,()=>a(c),Nt,(W,F,q)=>{var le=ca(),ve=C(le);let De;var ql=C(ve);D(ql,n,"item",{get item(){return a(F)},index:q},N=>{var je=et();R(()=>xe(je,(a(F),i(V()),X(()=>{var Ht;return(Ht=a(F))==null?void 0:Ht[V()]})))),v(N,je)}),Ve(ve,(N,je)=>Re==null?void 0:Re(N),()=>({scroll:wt(a(F),t(),h()),listDom:a(ge)})),Ve(ve,(N,je)=>Ke==null?void 0:Ke(N),()=>({scroll:a(Ce)===q,listDom:a(ge)})),R(N=>De=we(ve,1,"item svelte-1ul7oo4",null,De,N),[()=>{var N;return{"list-group-title":a(F).groupHeader,active:wt(a(F),t(),h()),first:Il(q),hover:g()===q,"group-item":a(F).groupItem,"not-selectable":((N=a(F))==null?void 0:N.selectable)===!1}}]),S("mouseover",le,()=>xt(q)),S("focus",le,()=>xt(q)),S("click",le,he(()=>pl({item:a(F),i:q}))),S("keydown",le,se(he(function(N){Be.call(this,n,N)}))),v(W,le)}),v(te,re)},Ze=te=>{var re=K(),M=z(re);{var W=F=>{var q=K(),le=z(q);D(le,n,"empty",{},ve=>{var De=fa();v(ve,De)}),v(F,q)};L(M,F=>{Xt()||F(W)},!0)}v(te,re)};L(P,te=>{a(c),X(()=>a(c).length>0)?te(Le):te(Ze,!1)},!0)}v(d,O)};L(y,d=>{X(()=>A.list)?d(ee):d(de,!1)})}var Ie=j(y,2);{var ie=d=>{var O=K(),P=z(O);D(P,n,"list-append",{},null),v(d,O)};L(Ie,d=>{X(()=>A["list-append"])&&d(ie)})}Ve(l,d=>Qe==null?void 0:Qe(d)),$e(l,d=>_(B,d),()=>a(B)),He(()=>S("scroll",l,It)),He(()=>S("pointerup",l,se(he(function(d){Be.call(this,n,d)})))),He(()=>S("mousedown",l,se(he(function(d){Be.call(this,n,d)})))),R(()=>o=we(l,1,"svelte-select-list svelte-1ul7oo4",null,o,{prefloat:a(Xe)})),v(e,l)};L(St,e=>{u()&&e(Cl)})}var Ct=j(St,2),Al=C(Ct);{var Fl=e=>{var l=va(),o=z(l),b=C(o),T=j(o,2),y=C(T);R(()=>{xe(b,a(ke)),xe(y,a(Se))}),v(e,l)};L(Al,e=>{I()&&e(Fl)})}var At=j(Ct,2),Tl=C(At);D(Tl,n,"prepend",{},null);var Ft=j(At,2),Tt=C(Ft);{var Ll=e=>{var l=K(),o=z(l);{var b=y=>{var ee=K(),de=z(ee);qt(de,1,t,Nt,(Ie,ie,d)=>{var O=ga();let P;var Le=C(O),Ze=C(Le);D(Ze,n,"selection",{get selection(){return a(ie)},index:d},M=>{var W=et();R(()=>xe(W,(a(ie),i(V()),X(()=>a(ie)[V()])))),v(M,W)});var te=j(Le,2);{var re=M=>{var W=ha(),F=C(W);D(F,n,"multi-clear-icon",{},q=>{tt(q)}),S("pointerup",W,se(he(()=>Me(d)))),v(M,W)};L(te,M=>{!ae()&&!nt()&&tt&&M(re)})}R(()=>P=we(O,1,"multi-item svelte-1ul7oo4",null,P,{active:a(m)===d,disabled:ae()})),S("click",O,se(()=>nt()?Me(d):{})),S("keydown",O,se(he(function(M){Be.call(this,n,M)}))),v(Ie,O)}),v(y,ee)},T=y=>{var ee=_a();let de;var Ie=C(ee);D(Ie,n,"selection",{get selection(){return t()}},ie=>{var d=et();R(()=>xe(d,(i(t()),i(V()),X(()=>t()[V()])))),v(ie,d)}),R(()=>de=we(ee,1,"selected-item svelte-1ul7oo4",null,de,{"hide-selected-item":a(p)})),v(y,ee)};L(o,y=>{s()?y(b):y(T,!1)})}v(e,l)};L(Tt,e=>{a(G)&&e(Ll)})}var fe=j(Tt,2);Rl(fe,()=>({readOnly:!Fe(),...a(ce),placeholder:a(Oe),style:Kt(),disabled:ae()}),void 0,void 0,void 0,"svelte-1ul7oo4",!0),$e(fe,e=>J(e),()=>J());var Lt=j(Ft,2),Dt=C(Lt);{var Dl=e=>{var l=ma(),o=C(l);D(o,n,"loading-icon",{},b=>{ua(b)}),v(e,l)};L(Dt,e=>{ue()&&e(Dl)})}var jt=j(Dt,2);{var jl=e=>{var l=ba(),o=C(l);D(o,n,"clear-icon",{},b=>{tt(b)}),S("click",l,Ge),v(e,l)};L(jt,e=>{a(Z)&&e(jl)})}var El=j(jt,2);{var Hl=e=>{var l=ya(),o=C(l);D(o,n,"chevron-icon",{get listOpen(){return u()}},b=>{ra(b)}),v(e,l)};L(El,e=>{dt()&&e(Hl)})}var Et=j(Lt,2);D(Et,n,"input-hidden",{get value(){return t()}},e=>{var l=pa();R(o=>{Ql(l,"name",Ut()),Xl(l,o)},[()=>(i(t()),X(()=>t()?JSON.stringify(t()):null))]),v(e,l)});var Vl=j(Et,2);{var Bl=e=>{var l=K(),o=z(l);D(o,n,"required",{get value(){return t()}},b=>{var T=Ia();v(b,T)}),v(e,l)};L(Vl,e=>{i(ot()),i(t()),X(()=>ot()&&(!t()||t().length===0))&&e(Bl)})}return He(()=>S("pointerup",ne,se(dl))),$e(ne,e=>U(e),()=>U()),Ve(ne,e=>Ye==null?void 0:Ye(e)),R(()=>{kt=we(ne,1,`svelte-select ${el()??""}`,"svelte-1ul7oo4",kt,{multi:s(),disabled:ae(),focused:I(),"list-open":u(),"show-chevron":dt(),error:Gt()}),Zl(ne,zt())}),S("keydown",fe,bt),S("blur",fe,yt),S("focus",fe,ze),Kl(fe,x),v(H,ne),Bt(n,"getFilteredItems",ut),Bt(n,"handleClear",Ge),Yl(Sl)}export{Sa as S};
|
|
6
|
+
l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"></path></svg>`);function tt(H){var n=sa();v(H,n)}var oa=lt('<svg class="loading svelte-y9fi5p" viewBox="25 25 50 50"><circle class="circle_path svelte-y9fi5p" cx="50" cy="50" r="20" fill="none" stroke="currentColor" stroke-width="5" stroke-miterlimit="10"></circle></svg>');function ua(H){var n=oa();v(H,n)}var ca=E('<div class="list-item svelte-1ul7oo4" tabindex="-1" role="none"><div><!></div></div>'),fa=E('<div class="empty svelte-1ul7oo4">No options</div>'),da=E('<div role="none"><!> <!> <!></div>'),va=E('<span id="aria-selection" class="svelte-1ul7oo4"> </span> <span id="aria-context" class="svelte-1ul7oo4"> </span>',1),ha=E('<div class="multi-item-clear svelte-1ul7oo4"><!></div>'),ga=E('<div role="none"><span class="multi-item-text svelte-1ul7oo4"><!></span> <!></div>'),_a=E("<div><!></div>"),ma=E('<div class="icon loading svelte-1ul7oo4" aria-hidden="true"><!></div>'),ba=E('<button type="button" class="icon clear-select svelte-1ul7oo4"><!></button>'),ya=E('<div class="icon chevron svelte-1ul7oo4" aria-hidden="true"><!></div>'),pa=E('<input type="hidden" class="svelte-1ul7oo4"/>'),Ia=E('<select class="required svelte-1ul7oo4" required tabindex="-1" aria-hidden="true"></select>'),xa=E('<div role="none"><!> <span aria-live="polite" aria-atomic="false" aria-relevant="additions text" class="a11y-text svelte-1ul7oo4"><!></span> <div class="prepend svelte-1ul7oo4"><!></div> <div class="value-container svelte-1ul7oo4"><!> <input/></div> <div class="indicators svelte-1ul7oo4"><!> <!> <!></div> <!> <!></div>');function Sa(H,n){const A=Nl(n);Ul(n,!1);const W=k(),p=k(),Z=k(),Oe=k(),ke=k(),Se=k(),c=k(),ge=k(),Ce=k(),w=Jl();let _e=r(n,"justValue",12,null),oe=r(n,"filter",8,aa),qe=r(n,"getItems",8,na),at=r(n,"id",8,null),Ut=r(n,"name",8,null),U=r(n,"container",12,void 0),J=r(n,"input",12,void 0),s=r(n,"multiple",8,!1),nt=r(n,"multiFullItemClearable",8,!1),ae=r(n,"disabled",8,!1),I=r(n,"focused",12,!1),t=r(n,"value",12,null),x=r(n,"filterText",12,""),Ae=r(n,"placeholder",8,"Please select"),it=r(n,"placeholderAlwaysShow",8,!1),Y=r(n,"items",12,null),V=r(n,"label",8,"label"),rt=r(n,"itemFilter",8,(e,l,o)=>`${e}`.toLowerCase().includes(l.toLowerCase())),me=r(n,"groupBy",8,void 0),Jt=r(n,"groupFilter",8,e=>e),Mt=r(n,"groupHeaderSelectable",8,!1),h=r(n,"itemId",8,"value"),be=r(n,"loadOptions",8,void 0),Pt=r(n,"containerStyles",8,""),Wt=r(n,"hasError",8,!1),st=r(n,"filterSelectedItems",8,!0),ot=r(n,"required",8,!1),zt=r(n,"closeListOnChange",8,!0),Gt=r(n,"clearFilterTextOnBlur",8,!0),Rt=r(n,"createGroupHeaderItem",8,(e,l)=>({value:e,[V()]:e}));const ut=()=>a(c);let Fe=r(n,"searchable",8,!0),Kt=r(n,"inputStyles",8,""),ct=r(n,"clearable",8,!0),ue=r(n,"loading",12,!1),u=r(n,"listOpen",12,!1),ft,Yt=r(n,"debounce",8,(e,l=1)=>{clearTimeout(ft),ft=setTimeout(e,l)}),Qt=r(n,"debounceWait",8,300),Xt=r(n,"hideEmptyState",8,!1),Ne=r(n,"inputAttributes",24,()=>({})),Zt=r(n,"listAutoWidth",8,!0),dt=r(n,"showChevron",8,!1),$t=r(n,"listOffset",8,5),g=r(n,"hoverItemIndex",12,0),ye=r(n,"floatingConfig",24,()=>({})),el=r(n,"class",8,""),m=k(),$=k(),Ue=k(),Je=k();function tl(){if(typeof t()=="string"){let e=(Y()||[]).find(l=>l[h()]===t());t(e||{[h()]:t(),label:t()})}else s()&&Array.isArray(t())&&t().length>0&&t(t().map(e=>typeof e=="string"?{value:e,label:e}:e))}let ce=k();function ll(){_(ce,Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},Ne())),at()&&Ee(ce,a(ce).id=at()),Fe()||Ee(ce,a(ce).readonly=!0)}function vt(e){return e.map((l,o)=>({index:o,value:l,label:`${l}`}))}function ht(e){const l=[],o={};e.forEach(T=>{const y=me()(T);l.includes(y)||(l.push(y),o[y]=[],y&&o[y].push(Object.assign(Rt()(y,T),{id:y,groupHeader:!0,selectable:Mt()}))),o[y].push(Object.assign({groupItem:!!y},T))});const b=[];return Jt()(l).forEach(T=>{o[T]&&b.push(...o[T])}),b}function al(){if(s()){JSON.stringify(t())!==JSON.stringify(a($))&&_t()&&w("input",t());return}(!a($)||JSON.stringify(t()[h()])!==JSON.stringify(a($)[h()]))&&w("input",t())}function nl(){t()&&(Array.isArray(t())?t([...t()]):t([t()]))}function il(){t()&&t(null)}function rl(){const e=a(c).findIndex(l=>l[h()]===t()[h()]);gt(e,!0)}function sl(e){w("hoverItem",e)}function gt(e=0,l){g(e<0?0:e),!l&&me()&&a(c)[g()]&&!a(c)[g()].selectable&&Te(1)}function ol(){!be()&&x().length===0||(be()?Yt()(async function(){ue(!0);let e=await qe()({dispatch:w,loadOptions:be(),convertStringItemsToObjects:vt,filterText:x()});e?(ue(e.loading),u(u()?e.listOpen:x().length>0),I(u()&&e.focused),Y(me()?ht(e.filteredItems):e.filteredItems)):(ue(!1),I(!0),u(!0))},Qt()):(u(!0),s()&&_(m,void 0)))}function ul(e){u()&&w("filter",e)}Ml(async()=>{_($,t()),_(Ue,x()),_(Je,s())});function cl(){return s()?t()?t().map(e=>e[h()]):null:t()?t()[h()]:t()}function _t(){let e=!0;if(t()){const l=[],o=[];t().forEach(b=>{l.includes(b[h()])?e=!1:(l.push(b[h()]),o.push(b))}),e||t(o)}return e}function mt(e){let l=e?e[h()]:t()[h()];return Y().find(o=>o[h()]===l)}function fl(e){!e||e.length===0||e.some(l=>typeof l!="object")||!t()||(s()?t().some(l=>!l||!l[h()]):!t()[h()])||(Array.isArray(t())?t(t().map(l=>mt(l)||l)):t(mt()||t()))}async function Me(e){const l=t()[e];t().length===1?t(void 0):t(t().filter(o=>o!==l)),w("clear",l)}function bt(e){if(I())switch(e.stopPropagation(),e.key){case"Escape":e.preventDefault(),Q();break;case"Enter":if(e.preventDefault(),u()){if(a(c).length===0)break;const l=a(c)[g()];if(t()&&!s()&&t()[h()]===l[h()]){Q();break}else Ge(a(c)[g()])}break;case"ArrowDown":e.preventDefault(),u()?Te(1):(u(!0),_(m,void 0));break;case"ArrowUp":e.preventDefault(),u()?Te(-1):(u(!0),_(m,void 0));break;case"Tab":if(u()&&I()){if(a(c).length===0||t()&&t()[h()]===a(c)[g()][h()])return Q();e.preventDefault(),Ge(a(c)[g()]),Q()}break;case"Backspace":if(!s()||x().length>0)return;if(s()&&t()&&t().length>0){if(Me(a(m)!==void 0?a(m):t().length-1),a(m)===0||a(m)===void 0)break;_(m,t().length>a(m)?a(m)-1:void 0)}break;case"ArrowLeft":if(!t()||!s()||x().length>0)return;a(m)===void 0?_(m,t().length-1):t().length>a(m)&&a(m)!==0&&_(m,a(m)-1);break;case"ArrowRight":if(!t()||!s()||x().length>0||a(m)===void 0)return;a(m)===t().length-1?_(m,void 0):a(m)<t().length-1&&_(m,a(m)+1);break}}function Pe(e){var l;I()&&J()===(document==null?void 0:document.activeElement)||(e&&w("focus",e),(l=J())==null||l.focus(),I(!0))}async function yt(e){var l;ze||(u()||I())&&(w("blur",e),Q(),I(!1),_(m,void 0),(l=J())==null||l.blur())}function dl(){if(!ae()){if(x().length>0)return u(!0);u(!u())}}function We(){w("clear",t()),t(void 0),Q(),Pe()}Pl(()=>{u()&&I(!0),I()&&J()&&J().focus()});function vl(e){if(e){x("");const l=Object.assign({},e);if(l.groupHeader&&!l.selectable)return;t(s()?t()?t().concat([l]):[l]:t(l)),setTimeout(()=>{zt()&&Q(),_(m,void 0),w("change",t()),w("select",e)})}}function Q(){Gt()&&x(""),u(!1)}let hl=r(n,"ariaValues",8,e=>`Option ${e}, selected.`),gl=r(n,"ariaListOpen",8,(e,l)=>`You are currently focused on option ${e}. There are ${l} results available.`),_l=r(n,"ariaFocused",8,()=>"Select is focused, type to refine list, press down to open the menu.");function ml(e){let l;return e&&t().length>0?l=t().map(o=>o[V()]).join(", "):l=t()[V()],hl()(l)}function bl(){if(!a(c)||a(c).length===0)return"";let e=a(c)[g()];if(u()&&e){let l=a(c)?a(c).length:0;return gl()(e[V()],l)}else return _l()()}let B=k(null),pt;function It(){clearTimeout(pt),pt=setTimeout(()=>{ze=!1},100)}function yl(e){var l;!u()&&!I()&&U()&&!U().contains(e.target)&&!((l=a(B))!=null&&l.contains(e.target))&&yt()}Wl(()=>{var e;(e=a(B))==null||e.remove()});let ze=!1;function Ge(e){!e||e.selectable===!1||vl(e)}function xt(e){ze||g(e)}function pl(e){const{item:l,i:o}=e;if((l==null?void 0:l.selectable)!==!1){if(t()&&!s()&&t()[h()]===l[h()])return Q();xl(l)&&(g(o),Ge(l))}}function Te(e){if(a(c).filter(b=>!Object.hasOwn(b,"selectable")||b.selectable===!0).length===0)return g(0);e>0&&g()===a(c).length-1?g(0):e<0&&g()===0?g(a(c).length-1):g(g()+e);const o=a(c)[g()];if(o&&o.selectable===!1){(e===1||e===-1)&&Te(e);return}}function wt(e,l,o){if(!s())return l&&l[o]===e[o]}function Il(e){return e===0}function xl(e){return e.groupHeader&&e.selectable||e.selectable||!e.hasOwnProperty("selectable")}const Re=Ot,Ke=Ot;function Ot(e){return{update(l){l.scroll&&(It(),e.scrollIntoView({behavior:"auto",block:"nearest"}))}}}function wl(){const{width:e}=U().getBoundingClientRect();Ee(B,a(B).style.width=Zt()?e+"px":"auto")}let pe=k({strategy:"absolute",placement:"bottom-start",middleware:[$l($t()),ea(),ta()],autoUpdate:!1});const[Ye,Qe,Ol]=la(a(pe));let Xe=k(!0);function kl(e,l){if(!e||!l)return _(Xe,!0);setTimeout(()=>{_(Xe,!1)},0)}f(()=>(i(Y()),i(t())),()=>{Y(),t()&&tl()}),f(()=>(i(Ne()),i(Fe())),()=>{(Ne()||!Fe())&&ll()}),f(()=>i(s()),()=>{s()&&nl()}),f(()=>(a(Je),i(s())),()=>{a(Je)&&!s()&&il()}),f(()=>(i(s()),i(t())),()=>{s()&&t()&&t().length>1&&_t()}),f(()=>i(t()),()=>{t()&&al()}),f(()=>(i(t()),i(s()),a($)),()=>{!t()&&s()&&a($)&&w("input",t())}),f(()=>(i(I()),i(J())),()=>{!I()&&J()&&Q()}),f(()=>(i(x()),a(Ue)),()=>{x()!==a(Ue)&&ol()}),f(()=>(i(oe()),i(be()),i(x()),i(Y()),i(s()),i(t()),i(h()),i(me()),i(V()),i(st()),i(rt())),()=>{_(c,oe()({loadOptions:be(),filterText:x(),items:Y(),multiple:s(),value:t(),itemId:h(),groupBy:me(),label:V(),filterSelectedItems:st(),itemFilter:rt(),convertStringItemsToObjects:vt,filterGroupedItems:ht}))}),f(()=>(i(s()),i(u()),i(t()),a(c)),()=>{!s()&&u()&&t()&&a(c)&&rl()}),f(()=>(i(u()),i(s())),()=>{u()&&s()&&g(0)}),f(()=>i(x()),()=>{x()&&g(0)}),f(()=>i(g()),()=>{sl(g())}),f(()=>(i(s()),i(t())),()=>{_(W,s()?t()&&t().length>0:t())}),f(()=>(a(W),i(x())),()=>{_(p,a(W)&&x().length>0)}),f(()=>(a(W),i(ct()),i(ae()),i(ue())),()=>{_(Z,a(W)&&ct()&&!ae()&&!ue())}),f(()=>(i(it()),i(s()),i(Ae()),i(t())),()=>{var e;_(Oe,it()&&s()||s()&&((e=t())==null?void 0:e.length)===0?Ae():t()?"":Ae())}),f(()=>(i(t()),i(s())),()=>{_(ke,t()?ml(s()):"")}),f(()=>(a(c),i(g()),i(I()),i(u())),()=>{_(Se,bl({filteredItems:a(c),hoverItemIndex:g(),focused:I(),listOpen:u()}))}),f(()=>i(Y()),()=>{fl(Y())}),f(()=>(i(s()),i(t()),i(h())),()=>{_e(cl(s(),t(),h()))}),f(()=>(i(s()),a($),i(t())),()=>{!s()&&a($)&&!t()&&w("input",t())}),f(()=>(i(u()),a(c),i(s()),i(t())),()=>{u()&&a(c)&&!s()&&!t()&>()}),f(()=>a(c),()=>{ul(a(c))}),f(()=>(i(U()),i(ye()),a(pe)),()=>{U()&&ye()&&Ol(Object.assign(a(pe),ye()))}),f(()=>a(B),()=>{_(ge,!!a(B))}),f(()=>(a(B),i(u())),()=>{kl(a(B),u())}),f(()=>(i(u()),i(U()),a(B)),()=>{u()&&U()&&a(B)&&wl()}),f(()=>i(g()),()=>{_(Ce,g())}),f(()=>(i(J()),i(u()),i(I())),()=>{J()&&u()&&!I()&&Pe()}),f(()=>(i(U()),i(ye())),()=>{var e;U()&&((e=ye())==null?void 0:e.autoUpdate)===void 0&&Ee(pe,a(pe).autoUpdate=!0)}),zl();var Sl={getFilteredItems:ut,handleClear:We};Gl();var ne=xa();S("click",Vt,yl),S("keydown",Vt,bt);let kt;var St=C(ne);{var Cl=e=>{var l=da();let o;var b=C(l);{var T=d=>{var O=K(),z=P(O);D(z,n,"list-prepend",{},null),v(d,O)};L(b,d=>{X(()=>A["list-prepend"])&&d(T)})}var y=j(b,2);{var ee=d=>{var O=K(),z=P(O);D(z,n,"list",{get filteredItems(){return a(c)}},null),v(d,O)},de=d=>{var O=K(),z=P(O);{var Le=te=>{var re=K(),M=P(re);qt(M,1,()=>a(c),Nt,(G,F,q)=>{var le=ca(),ve=C(le);let De;var ql=C(ve);D(ql,n,"item",{get item(){return a(F)},index:q},N=>{var je=et();R(()=>xe(je,(a(F),i(V()),X(()=>{var Ht;return(Ht=a(F))==null?void 0:Ht[V()]})))),v(N,je)}),Ve(ve,(N,je)=>Re==null?void 0:Re(N),()=>({scroll:wt(a(F),t(),h()),listDom:a(ge)})),Ve(ve,(N,je)=>Ke==null?void 0:Ke(N),()=>({scroll:a(Ce)===q,listDom:a(ge)})),R(N=>De=we(ve,1,"item svelte-1ul7oo4",null,De,N),[()=>{var N;return{"list-group-title":a(F).groupHeader,active:wt(a(F),t(),h()),first:Il(q),hover:g()===q,"group-item":a(F).groupItem,"not-selectable":((N=a(F))==null?void 0:N.selectable)===!1}}]),S("mouseover",le,()=>xt(q)),S("focus",le,()=>xt(q)),S("click",le,he(()=>pl({item:a(F),i:q}))),S("keydown",le,se(he(function(N){Be.call(this,n,N)}))),v(G,le)}),v(te,re)},Ze=te=>{var re=K(),M=P(re);{var G=F=>{var q=K(),le=P(q);D(le,n,"empty",{},ve=>{var De=fa();v(ve,De)}),v(F,q)};L(M,F=>{Xt()||F(G)},!0)}v(te,re)};L(z,te=>{a(c),X(()=>a(c).length>0)?te(Le):te(Ze,!1)},!0)}v(d,O)};L(y,d=>{X(()=>A.list)?d(ee):d(de,!1)})}var Ie=j(y,2);{var ie=d=>{var O=K(),z=P(O);D(z,n,"list-append",{},null),v(d,O)};L(Ie,d=>{X(()=>A["list-append"])&&d(ie)})}Ve(l,d=>Qe==null?void 0:Qe(d)),$e(l,d=>_(B,d),()=>a(B)),He(()=>S("scroll",l,It)),He(()=>S("pointerup",l,se(he(function(d){Be.call(this,n,d)})))),He(()=>S("mousedown",l,se(he(function(d){Be.call(this,n,d)})))),R(()=>o=we(l,1,"svelte-select-list svelte-1ul7oo4",null,o,{prefloat:a(Xe)})),v(e,l)};L(St,e=>{u()&&e(Cl)})}var Ct=j(St,2),Al=C(Ct);{var Fl=e=>{var l=va(),o=P(l),b=C(o),T=j(o,2),y=C(T);R(()=>{xe(b,a(ke)),xe(y,a(Se))}),v(e,l)};L(Al,e=>{I()&&e(Fl)})}var At=j(Ct,2),Tl=C(At);D(Tl,n,"prepend",{},null);var Ft=j(At,2),Tt=C(Ft);{var Ll=e=>{var l=K(),o=P(l);{var b=y=>{var ee=K(),de=P(ee);qt(de,1,t,Nt,(Ie,ie,d)=>{var O=ga();let z;var Le=C(O),Ze=C(Le);D(Ze,n,"selection",{get selection(){return a(ie)},index:d},M=>{var G=et();R(()=>xe(G,(a(ie),i(V()),X(()=>a(ie)[V()])))),v(M,G)});var te=j(Le,2);{var re=M=>{var G=ha(),F=C(G);D(F,n,"multi-clear-icon",{},q=>{tt(q)}),S("pointerup",G,se(he(()=>Me(d)))),v(M,G)};L(te,M=>{!ae()&&!nt()&&tt&&M(re)})}R(()=>z=we(O,1,"multi-item svelte-1ul7oo4",null,z,{active:a(m)===d,disabled:ae()})),S("click",O,se(()=>nt()?Me(d):{})),S("keydown",O,se(he(function(M){Be.call(this,n,M)}))),v(Ie,O)}),v(y,ee)},T=y=>{var ee=_a();let de;var Ie=C(ee);D(Ie,n,"selection",{get selection(){return t()}},ie=>{var d=et();R(()=>xe(d,(i(t()),i(V()),X(()=>t()[V()])))),v(ie,d)}),R(()=>de=we(ee,1,"selected-item svelte-1ul7oo4",null,de,{"hide-selected-item":a(p)})),v(y,ee)};L(o,y=>{s()?y(b):y(T,!1)})}v(e,l)};L(Tt,e=>{a(W)&&e(Ll)})}var fe=j(Tt,2);Rl(fe,()=>({readOnly:!Fe(),...a(ce),placeholder:a(Oe),style:Kt(),disabled:ae()}),void 0,void 0,void 0,"svelte-1ul7oo4",!0),$e(fe,e=>J(e),()=>J());var Lt=j(Ft,2),Dt=C(Lt);{var Dl=e=>{var l=ma(),o=C(l);D(o,n,"loading-icon",{},b=>{ua(b)}),v(e,l)};L(Dt,e=>{ue()&&e(Dl)})}var jt=j(Dt,2);{var jl=e=>{var l=ba(),o=C(l);D(o,n,"clear-icon",{},b=>{tt(b)}),S("click",l,We),v(e,l)};L(jt,e=>{a(Z)&&e(jl)})}var El=j(jt,2);{var Hl=e=>{var l=ya(),o=C(l);D(o,n,"chevron-icon",{get listOpen(){return u()}},b=>{ra(b)}),v(e,l)};L(El,e=>{dt()&&e(Hl)})}var Et=j(Lt,2);D(Et,n,"input-hidden",{get value(){return t()}},e=>{var l=pa();R(o=>{Ql(l,"name",Ut()),Xl(l,o)},[()=>(i(t()),X(()=>t()?JSON.stringify(t()):null))]),v(e,l)});var Vl=j(Et,2);{var Bl=e=>{var l=K(),o=P(l);D(o,n,"required",{get value(){return t()}},b=>{var T=Ia();v(b,T)}),v(e,l)};L(Vl,e=>{i(ot()),i(t()),X(()=>ot()&&(!t()||t().length===0))&&e(Bl)})}return He(()=>S("pointerup",ne,se(dl))),$e(ne,e=>U(e),()=>U()),Ve(ne,e=>Ye==null?void 0:Ye(e)),R(()=>{kt=we(ne,1,`svelte-select ${el()??""}`,"svelte-1ul7oo4",kt,{multi:s(),disabled:ae(),focused:I(),"list-open":u(),"show-chevron":dt(),error:Wt()}),Zl(ne,Pt())}),S("keydown",fe,bt),S("blur",fe,yt),S("focus",fe,Pe),Kl(fe,x),v(H,ne),Bt(n,"getFilteredItems",ut),Bt(n,"handleClear",We),Yl(Sl)}export{Sa as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./svelte-B9Ye91X-.js";import{t as s}from"./@zerodevx-z992vLW9.js";var t=(o=>(o.info="info",o.warn="warn",o))(t||{});function f(o,i=void 0,r={}){i===void 0&&(i=o=="info"?"Success":"Failed"),s.push(i,{classes:[o],...r})}export{t as L,f as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var bt=Object.defineProperty;var Et=(e,n,t)=>n in e?bt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var b=(e,n,t)=>Et(e,typeof n!="symbol"?n+"":n,t);import{T as I,D as x,i as R,n as C,a as P,L as ye,A as fe,h as Lt}from"./@typewriter-cCzskkIv.js";import{d as J}from"./fast-diff-C-IidNf4.js";import"./easy-signal-BiPFIK3O.js";import"./svelte-B2XmcTi_.js";const be=new WeakMap,wt=new WeakMap;class Nt{on(n,t,s){this.addEventListener(n,t,s)}off(n,t,s){this.removeEventListener(n,t,s)}addEventListener(n,t,s){s!=null&&s.once&&(t=Te(this,n,t,!0)),V(this,n,!0).add(t)}removeEventListener(n,t,s){if(s!=null&&s.once&&(t=Te(this,n,t)),!t)return;const r=V(this,n);r&&r.delete(t)}dispatchEvent(n,t){let s=!1;n.bubbles&&(n.stopImmediatePropagation=n.stopPropagation=()=>s=!0);const r=V(this,n.type);if(r)for(let o of r){if(t)try{o.call(this,n)}catch(i){try{this.dispatchEvent(new ErrorEvent("error",{error:i}))}catch{}}else o.call(this,n);if(s)break}}}function V(e,n,t=!1){let s=be.get(e);return!s&&t&&be.set(e,s=Object.create(null)),s&&s[n]||t&&(s[n]=new Set)}function Te(e,n,t,s=!1){let r=wt.get(e);!r&&s&&be.set(e,r=Object.create(null));const o=r&&r[n]||s&&(r[n]=new Map);if(!o.has(t)&&s){const i=a=>{const c=V(e,n);c&&c.delete(t),t.call(e,a)};o.set(t,i)}return o&&o.get(t)}var D;(function(e){e.api="api",e.user="user",e.history="history",e.input="input",e.paste="paste"})(D||(D={}));const vt="http://www.w3.org/2000/svg",At=new Set(["value","selected","checked","contentEditable"]),k=e=>e==null?e:e.key,Ze=(e,n)=>{n&&n!==e.key&&(e.key=n),!n&&e.key&&delete e.key},De=e=>{e.currentTarget.events[e.type](e)},Ge=(e,n,t,s,r)=>{n==="key"||(n[0]==="o"&&n[1]==="n"?((e.events||(e.events={}))[n=n.slice(2)]=s)?t||e.addEventListener(n,De):e.removeEventListener(n,De):s==null?e.removeAttribute(n):!r&&n!=="list"&&n!=="form"&&n in e?e[n]=s??"":e.setAttribute(n,s))},ne=(e,n)=>{if(typeof e=="string")return document.createTextNode(e);var t=e.props,s=(n=n||e.type==="svg")?document.createElementNS(vt,e.type,{is:t.is}):document.createElement(e.type,{is:t.is});for(var r in t)Ge(s,r,null,t[r],n);return Ze(s,k(e)),e.children.forEach(o=>s.appendChild(ne(W(o),n))),s},Ft=(e,n)=>{const t={};for(let s=0;s<e.attributes.length;s++){const{name:r,value:o}=e.attributes[s];r in e&&r!=="list"&&!n?t[r]=e[r]:t[r]=o===""?!0:o}return t},B=(e,n,t,s,r)=>{if(typeof s=="string")t!=null&&t.nodeType===Node.TEXT_NODE?t.nodeValue!==s&&(n.nodeValue=s):(n=e.insertBefore(ne(s,r),n),t!=null&&e.removeChild(t));else if(t==null||t.nodeName.toLowerCase()!==s.type)n=e.insertBefore(ne(W(s),r),n),t!=null&&e.removeChild(t);else{var o=Ft(t,r),i=s.props;r=r||s.type==="svg";for(var a in{...o,...i})(At.has(a)?n[a]:o[a])!==i[a]&&Ge(n,a,o[a],i[a],r);Ze(n,s.key),Qe(n,s.children,r)}return n},Qe=(e,n,t,s=Array.from(e.childNodes))=>{for(var r,o,i,a,c=0,h=0,l=s.length-1,d=n.length-1;h<=d&&c<=l&&!((i=k(s[c]))==null||i!==k(n[h]));)B(e,s[c],s[c++],n[h]=W(n[h++]),t);for(;h<=d&&c<=l&&!((i=k(s[l]))==null||i!==k(n[d]));)s[l]=B(e,s[l],s[l--],n[d]=W(n[d--]),t);if(c>l){const f=s[c]||s[c-1]&&s[c-1].nextSibling||null;for(;h<=d;)e.insertBefore(ne(n[h]=W(n[h++]),t),f)}else if(h>d)for(;c<=l;)e.removeChild(s[c++]);else{const f=new Map,m=new Set;for(let u=c;u<=l;u++)(i=k(s[u]))!=null&&f.set(i,s[u]);for(;h<=d;){if(i=k(o=s[c]),a=k(n[h]=W(n[h])),m.has(i)||a!=null&&a===k(s[c+1])){i==null&&e.removeChild(o),c++;continue}a==null?(i==null&&(B(e,o,o,n[h],t),h++),c++):(i===a?(B(e,o,o,n[h],t),m.add(a),c++):(r=f.get(a))!=null?(B(e,e.insertBefore(r,o),r,n[h],t),m.add(a)):B(e,o,null,n[h],t),h++)}for(;c<=l;)k(o=s[c++])==null&&e.removeChild(o);for(const[u,g]of f)m.has(u)||e.removeChild(g)}return e},W=e=>e!==!0&&e!==!1&&e?e:"",Tt=(e,n,t,s)=>({type:e,props:n,children:t,key:s}),A=(e,n,t)=>typeof e=="function"?e(n||{},t):Tt(e,n||{},Array.isArray(t)?t:t==null?[]:[t],n==null?void 0:n.key),le=(e,n,t)=>(Array.isArray(n)?e=Qe(e,n,e instanceof window.SVGElement,t):e=B(e.parentNode,e,e,n),e),Dt=/;\s*$/,xt={name:"decoration",selector:"span.format.decoration",fromDom:!1,render:(e,n)=>we(A("span",{},n),e,["format","decoration"])},kt={name:"decoration",selector:".embed.decoration",fromDom:!1,noFill:!0,render:(e,n)=>{const t="embed decoration",{name:s,...r}=e.decoration;return r.class=r.class?t+" "+r.class:t,A(s||"span",r,n)}};class Ct extends Event{constructor(t,s){super(t,s);b(this,"old");b(this,"doc");b(this,"change");b(this,"changedLines");this.old=s.old,this.doc=s.doc,this.change=s.change,this.changedLines=s.changedLines}}function St(e){e.typeset.formats.add(xt),e.typeset.embeds.add(kt);const n=new Map;let t=e.doc,s=t,r=t,o=!1;e.on("change",l),e.on("render",f);function i(m){if(!m)throw new TypeError("A decoration name is required");const u=n.get(m);return new Mt(m,e.doc,u,h,a)}function a(m){var p,y;if(!m)throw new TypeError("A decoration name is required");const u=n.get(m);if(!u)return!1;const g=Ke(m,u,t);return n.delete(m),n.size?r=r.apply(g):r=t,o||((p=e.modules.rendering)==null||p.render({old:s,doc:r}),(y=e.modules.selection)==null||y.renderSelection()),!0}function c(){n.size&&n.clear(),r=t}function h(m,u){var y,L;const g=n.get(m),p=g?g.compose(u,!0):u;R(p,g)||!g&&!p.ops.length||(p.ops.length?n.set(m,p):n.delete(m),r=n.size?r.apply(u,null):t,o||((y=e.modules.rendering)==null||y.render({old:s,doc:r}),(L=e.modules.selection)==null||L.renderSelection()))}function l(m){const{change:u,changedLines:g}=m;if(t=m.doc,u){if(u.contentChanged){for(let[p,y]of n)y=u.delta.transform(y,!0),y.ops.length?n.set(p,y):n.delete(p);r=n.size?r.apply(u.delta,null):t,n.size&&r.lines.forEach((p,y)=>{const L=t.lines[y];p!==L&&p.id!==L.id&&(p.id=L.id)})}}else c();d(u,g)}function d(m,u){const g={old:s,doc:t,change:m,changedLines:u};o=!0,e.dispatchEvent(new Ct("decorate",g)),o=!1}function f(){s=r}return{get old(){return s},get doc(){return r},getDecorator:i,removeDecorations:a,clearDecorations:c,gatherDecorations:d,init(){d()},destroy(){e.off("change",l),e.off("render",f)}}}class Mt{constructor(n,t,s,r,o){b(this,"change");b(this,"_name");b(this,"_doc");b(this,"_decoration");b(this,"_apply");b(this,"_remove");this._name=n,this._doc=t,this.change=new I(t),this._decoration=s,this._apply=r,this._remove=o}hasDecorations(){return!!this._decoration&&this._decoration.ops.length>0||this.change.delta.ops.length>0}getDecoration(){return this._decoration?this._decoration.compose(this.change.delta):this.change.delta}apply(){return this._apply(this._name,this.change.delta)}remove(){return this._remove(this._name)}clear(n){return this.hasDecorations()?(n?this.change.setDelta(this.change.delta.compose(this.invert(n))):this.change.setDelta(this.invert()),this):this}clearLines(n){if(!n.length)return this;const t=this._doc,s=[t.getLineRange(n[0])[0],t.getLineRange(n[n.length-1])[1]];if(n.length===1||n.every((c,h)=>!h||t.getLineRange(n[h-1])[1]===t.getLineRange(c)[0]))return this.clear(s);const o=this.invert(s),i=new x;let a=0;return n.forEach(c=>{const[h,l]=t.getLineRange(c);i.retain(h-a).concat(o.slice(h,l)),a=l}),this.change.setDelta(this.change.delta.compose(i)),this}clearLine(n){const t=this._doc,s=typeof n=="number"?t.getLineAt(n):typeof n=="string"?t.getLineBy(n):n;return this.clearLines([s])}invert(n){return this._decoration?Ke(this._name,this._decoration,this._doc,n):new x}decorateText(n,t={class:this._name}){return this.change.formatText(n,{decoration:{[this._name]:t}}),this}decorateLine(n,t={class:this._name}){return this.change.formatLine(n,{decoration:{[this._name]:t}},!0),this}insertDecoration(n,t={class:this._name}){if(typeof t=="string")throw new Error("You may only insert embed decorations");return this.change.insert(n,{decoration:t}),this}}function we(e,n,t){if(!n||!n.decoration)return e;const s=new Set(t);let r="",o=e.props;Object.values(n.decoration).forEach(a=>{const{class:c,style:h,...l}=a;c&&s.add(c.trim()),h&&(r+=h.trim()),r&&!Dt.test(r)&&(r+=";"),o={...l,...o}});const i=Array.from(s).join(" ").trim();return i&&(o.class=o.class?o.class+" "+i:i),r&&(o.style=o.style?o.style+";"+r:r),e.props=o,e}function Ke(e,n,t,s){let r=t.toDelta();return s&&(r=r.slice(s[0],s[1]),n=n.slice(s[0],s[1])),n=n.invert(r),n.ops.forEach(o=>{var i;((i=o.attributes)==null?void 0:i.decoration)===null&&(o.attributes.decoration={[e]:null})}),s&&(n=new x().retain(s[0]).concat(n)),n}const _t=[],xe=A("br",{}),ee=new WeakMap,ke=new WeakMap,Ce=new WeakMap,Se=new WeakMap,Ne=new WeakMap;function S(e,n){var t,s;return(s=(t=Ne.get(e))==null?void 0:t.get(n))==null?void 0:s[0]}function se(e,n){var t,s;return(s=(t=Ne.get(e))==null?void 0:t.get(n))==null?void 0:s[1]}function Ve(e){const{root:n,doc:t}=e,s=re(e,t.lines),r=new WeakMap;for(let i=0;i<n.children.length;i++){const a=n.children[i];if(!a.key)continue;const c=s.byKey[a.key];if(c)if(Array.isArray(c)){r.set(a,[t.getLineRange(c[0])[0],t.getLineRange(c[c.length-1])[1]]);const h=a.querySelectorAll(e.typeset.lines.selector);for(let l=0;l<h.length;l++){const d=h[l],f=t.getLineBy(d.key);f&&r.set(d,t.getLineRange(f))}}else r.set(a,t.getLineRange(c))}const o=n.querySelectorAll(e.typeset.lines.selector);for(let i=0;i<o.length;i++){const a=o[i];if(r.has(a)||!a.key)continue;const c=t.getLineBy(a.key);r.set(a,t.getLineRange(c))}Ne.set(n,r)}function Ee(e,n){const{root:t}=e;e.dispatchEvent(new Event("rendering")),le(t,et(e,n)),Ve(e),e.dispatchEvent(new Event("render")),e.dispatchEvent(new Event("rendered"))}function Me(e,n,t){const{root:s}=e,r=re(e,n.lines).combined,o=re(e,t.lines).combined,[i,a]=Pt(r,o);R(i,a)||(i[0]=Math.max(0,i[0]-1),a[0]=Math.max(0,a[0]-1),i[1]=Math.min(r.length,i[1]+1),a[1]=Math.min(o.length,a[1]+1),s.childNodes.length!==r.length&&(i[1]+=s.childNodes.length-r.length));const c=Array.from(s.childNodes).slice(i[0],i[1]),h=o.slice(a[0],a[1]);if(!c.length&&!h.length)return Ee(e,t);e.dispatchEvent(new Event("rendering")),le(s,tt(e,h),c),Ve(e),e.dispatchEvent(new Event("render")),e.dispatchEvent(new Event("rendered"))}function et(e,n,t){return tt(e,re(e,n.lines).combined,t)}function tt(e,n,t){return n.map(s=>Rt(e,s,t)).filter(Boolean)}function Rt(e,n,t){return Array.isArray(n)?Bt(e,n,t):Ot(e,n,t)}function Ot(e,n,t){const s=oe(e,n);if(!s.render)throw new Error("No render method defined for line");const r=s.render(n.attributes,ve(e,n),n,e,t);return we(r,n.attributes),r.key=n.id,r}function Bt(e,n,t){const s=oe(e,n[0]);if(!s.renderMultiple)throw new Error("No render method defined for line");const r=s.renderMultiple(n.map(o=>[o.attributes,ve(e,o),o.id]),e,t);return r.key=n[0].id,r}function re(e,n){const t=Se.get(n);if(t)return t;const s=[],r={};let o=[];n.forEach((a,c)=>{const h=oe(e,a);if(h.shouldCombine){o.push(a);const l=n[c+1];if(!l||oe(e,l)!==h||!h.shouldCombine(o[0].attributes,l.attributes)){const d=Ce.get(o[0]);d&&d.length===o.length&&o.every((f,m)=>d[m]===f)?o=d:Ce.set(o[0],o),s.push(o),r[o[0].id]=o,o=[]}}else h.render&&(s.push(a),r[a.id]=a)});const i={combined:s,byKey:r};return Se.set(n,i),i}function Pt(e,n){const t=e.length,s=n.length,r=Math.min(t,s);let o=0,i=0,a=0,c=0;for(let h=0;h<r;h++)if(!_e(e[h],n[h])){o=a=h;break}for(let h=0;h<r;h++)if(!_e(e[t-h-1],n[s-h-1])){i=t-h,c=s-h;break}return[[o,i],[a,c]]}function ve(e,n,t){const{lines:s,formats:r,embeds:o}=e.typeset;let i=[],a=[],c=!0,h;return n.content.ops.forEach((l,d,f)=>{let m=[];if(l.insert===" "&&l.attributes&&(h=s.findByAttributes(l.attributes))&&h.child){h.render&&(i=ie(i),c&&i.push(xe),a.push(h.render(l.attributes,i,n,e,t)),i=[]);return}if(typeof l.insert=="string"){const u=f[d-1],g=f[d+1];let p=l.insert.replace(/ /g," ").replace(/ /g," ");(!u||typeof u.insert=="object")&&(p=p.replace(/^ /," ")),(!g||typeof g.insert=="object"||Wt(g))&&(p=p.replace(/ $/," ")),c=!1,m.push(p)}else if(l.insert){const u=o.findByAttributes(l.insert);u!=null&&u.render&&(m.push(u.render(l.insert,_t,n,e,t)),u.name==="br"?c=!0:u.noFill||(c=!1))}l.attributes&&Object.keys(l.attributes).sort((u,g)=>r.priority(g)-r.priority(u)).forEach(u=>{const g=r.get(u);if(g!=null&&g.render){const p=g.render(l.attributes,m,n,e,t);p&&(ee.set(p,g),m=[p])}}),i.push.apply(i,m)}),i=ie(i),c&&i.push(xe),a.length?a:i}function _e(e,n){return e===n?!0:Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,s)=>t===n[s])}function oe(e,n){let t=ke.get(n.attributes);return t||(t=e.typeset.lines.findByAttributes(n.attributes,!0),ke.set(n.attributes,t)),t}function ie(e){const n=[];if(e.forEach((t,s)=>{const r=n.length-1,o=n[r];o&&typeof o!="string"&&typeof t!="string"&&ee.has(o)&&ee.get(o)===ee.get(t)&&It(o.props,t.props)?o.children=o.children.concat(t.children):o&&typeof o=="string"&&typeof t=="string"?n[r]+=t:(n.push(t),o&&typeof o!="string"&&o.children&&(o.children=ie(o.children)))}),n.length){const t=n[n.length-1];t&&typeof t!="string"&&t.children&&(t.children=ie(t.children))}return n}function It(e,n){return Object.keys({...e,...n}).every(t=>t.slice(0,2)==="on"||e[t]===n[t])}function Wt(e){return typeof e.insert=="string"&&e.insert[0]===" "}function zt(e){e.on("change",t);function n(s){if(s){const{doc:r,old:o}=s;o&&r?Me(e,o,r):r&&Ee(e,r)}else{const{doc:r}=e.modules.decorations||e;Ee(e,r)}}function t(s){const{doc:r,old:o}=e.modules.decorations||s;o.lines!==r.lines&&Me(e,o,r)}return{render:n,destroy(){e.off("change",t)}}}const he=[],nt={},st={},rt={},Ht=(e,n)=>!0;class te{constructor(n){b(this,"lines");b(this,"formats");b(this,"embeds");var o,i,a;const t=(o=n.lines)==null?void 0:o.map(c=>typeof c=="string"?nt[c]:c).filter(Boolean),s=(i=n.formats)==null?void 0:i.map(c=>typeof c=="string"?st[c]:c).filter(Boolean),r=(a=n.embeds)==null?void 0:a.map(c=>typeof c=="string"?rt[c]:c).filter(Boolean);this.lines=new de(t||he),this.formats=new de(s||he),this.embeds=new de(r||he)}}b(te,"line",O),b(te,"format",Y),b(te,"embed",Ae);function O(e){return e.renderMultiple&&!e.shouldCombine&&(e.shouldCombine=Ht),nt[e.name]=e}function Y(e){return st[e.name]=e}function Ae(e){return rt[e.name]=e}class de{constructor(n){b(this,"list");b(this,"selector");b(this,"types");b(this,"priorities");this.list=n,this.init()}get default(){return this.list[0]}init(){this.selector=this.list.map(n=>n.selector||"").filter(Boolean).join(", "),this.types=this.list.reduce((n,t)=>(n[t.name]=t,n),{}),this.priorities=this.list.reduce((n,t,s)=>(n[t.name]=s,n),{})}add(n){this.list.push(n),this.init()}remove(n){const t=typeof n=="string"?n:n.name;this.list=this.list.filter(s=>s.name!==t),this.init()}get(n){return this.types[n]}priority(n){const t=this.priorities[n];return t!==void 0?t:-1}matches(n){if(!n)return!1;if(!n.nodeType)throw new Error("Cannot match against "+n);if(n.nodeType===Node.ELEMENT_NODE)return this.selector?n.matches(this.selector):!1}findByNode(n,t=!1){if(n.nodeType!==Node.ELEMENT_NODE)return;let s=this.list.length;for(;s--;){let r=this.list[s];if(n.matches(r.selector))return r}if(t)return this.default}findByAttributes(n,t=!1){const s=n&&Object.keys(n);let r;return s&&s.every(o=>!(r=this.get(o))),r||(t?this.default:void 0)}}Ae({name:"image",selector:"img",commands:e=>(n,t)=>e.insert({image:n,...t}),fromDom:e=>{const n={};return["src","alt","width","height"].forEach(t=>{if(!e.hasAttribute(t))return;const s=e.getAttribute(t);t==="src"&&(t="image"),n[t]=s}),n},render:e=>{const{image:n,...t}=e;return t.src=n,A("img",t)}});Ae({name:"br",selector:"br",commands:e=>()=>e.insert({br:!0}),render:()=>A("br")});Y({name:"bold",selector:"strong, b",styleSelector:'[style*="font-weight:bold"], [style*="font-weight: bold"]',commands:e=>()=>e.toggleTextFormat({bold:!0}),shortcuts:"Mod+B",render:(e,n)=>A("strong",null,n)});Y({name:"italic",selector:"em, i",styleSelector:'[style*="font-style:italic"], [style*="font-style: italic"]',commands:e=>()=>e.toggleTextFormat({italic:!0}),shortcuts:"Mod+I",render:(e,n)=>A("em",null,n)});Y({name:"code",selector:"code",commands:e=>()=>e.toggleTextFormat({code:!0}),render:(e,n)=>A("code",null,n)});Y({name:"link",selector:"a[href]",greedy:!1,commands:e=>n=>e.toggleTextFormat({link:typeof n=="string"?n:!!n}),fromDom:e=>e.href,render:(e,n)=>A("a",{href:e.link,target:"_blank"},n)});O({name:"paragraph",selector:"p",commands:e=>()=>e.formatLine({}),shortcuts:"Mod+0",render:(e,n)=>A("p",null,n)});O({name:"header",selector:"h1, h2, h3, h4, h5, h6",defaultFollows:!0,commands:e=>({header:n=>e.toggleLineFormat({header:n}),header1:()=>e.toggleLineFormat({header:1}),header2:()=>e.toggleLineFormat({header:2}),header3:()=>e.toggleLineFormat({header:3}),header4:()=>e.toggleLineFormat({header:4}),header5:()=>e.toggleLineFormat({header:5}),header6:()=>e.toggleLineFormat({header:6})}),shortcuts:{"Mod+1":"header1","Mod+2":"header2","Mod+3":"header3","Mod+4":"header4","Mod+5":"header5","Mod+6":"header6"},fromDom:e=>({header:parseInt(e.nodeName.replace("H",""))}),render:(e,n)=>A(`h${e.header}`,null,n)});O({name:"list",selector:"ul > li, ol > li",indentable:!0,commands:e=>({bulletList:()=>e.toggleLineFormat({list:"bullet"}),orderedList:()=>e.toggleLineFormat({list:"ordered"}),checkList:()=>e.toggleLineFormat({list:"check"}),indent:()=>e.indent(),outdent:()=>e.outdent(),toggleCheck:n=>{const t=typeof n=="string"?e.doc.getLineBy(n):e.doc.selection?e.doc.getLineAt(e.doc.selection[0]):null;if(!t)return!1;const[s]=e.doc.getLineRange(t),r={list:"check"};t.attributes.checked||(r.checked=!0),e.formatLine(r,s)}}),shortcuts:{"Mod+Space":"toggleCheck"},fromDom(e){let n=-1,t=e.parentNode,s=t&&t.getAttribute("type");const r=e.hasAttribute("data-checked")?"check":t&&t.nodeName==="OL"?"ordered":"bullet";for(;t;){if(/^UL|OL$/.test(t.nodeName))n++;else if(t.nodeName!=="LI")break;t=t.parentNode}!n&&e.className.startsWith("ql-indent-")&&(n=parseInt(e.className.replace("ql-indent-","")));const o={list:r};return n&&(o.indent=n),s&&(o.type=s),e.getAttribute("data-checked")==="true"&&(o.checked=!0),o},nextLineAttributes(e){const{start:n,...t}=e;return t},shouldCombine:(e,n)=>e.list===n.list&&!n.start&&e.type===n.type||n.indent,renderMultiple:(e,n,t)=>{const s=[],r=[];e.forEach(([i,a,c])=>{const h=i.list==="ordered"?"ol":"ul",l=i.indent||0;let d={key:c};if(i.list==="check"){let m=function(g){n.enabled&&(g.preventDefault(),n.commands.toggleCheck(c))};const u=A("button",{class:"check-list-check",onmousedown:m,ontouchstart:m});a.length===1&&a[0].type==="br"?a.push(u):a.unshift(u),d={...d,class:"check-list-item","data-checked":""+(i.checked||!1)}}const f=we(A("li",d,a),i);for(;l>=r.length;){const m=A(h,{start:i.start,type:i.type,key:`${c}-outer`}),u=r.length?r[r.length-1].children:s,g=u[u.length-1];typeof g=="object"&&g.type==="li"&&t?g.children.push(m):u.push(m),r.push(m)}if(!o(r[l],h,i)){const m=A(h,{start:i.start,type:i.type});(l?r[l-1].children:s).push(m),r[l]=m}r[l].children.push(f),r.length=l+1});function o(i,a,c){return i.type===a&&(i.props.start===c.start||i.props.start&&!c.start)&&i.props.type===c.type}return s[0]}});O({name:"blockquote",selector:"blockquote p",commands:e=>(n=!0)=>{typeof n!="string"&&(n=!0),e.toggleLineFormat({blockquote:n})},fromDom(e){const{className:n}=e.parentNode,t=n.match(/quote-(\S+)/);return{blockquote:t&&t[1]!=="true"&&t[1]||!0}},shouldCombine:(e,n)=>e.blockquote===n.blockquote,renderMultiple:e=>{const n=e[0][0].blockquote,t=typeof n=="string"?{className:`quote-${n}`}:null,s=e.map(([r,o,i])=>A("p",{key:i},o));return A("blockquote",t,s)}});O({name:"code-block",selector:"pre code",contained:!0,commands:e=>()=>e.toggleLineFormat({"code-block":!0}),renderMultiple:e=>{const n=[];return e.forEach(([t,s,r])=>{s.length&&s[s.length-1].type==="br"&&s.pop(),n.push(A("code",{key:r},s)),n.push(`
|
|
1
|
+
var bt=Object.defineProperty;var Et=(e,n,t)=>n in e?bt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var b=(e,n,t)=>Et(e,typeof n!="symbol"?n+"":n,t);import{T as I,D as x,i as R,n as C,a as P,L as ye,A as fe,h as Lt}from"./@typewriter-cCzskkIv.js";import{d as J}from"./fast-diff-C-IidNf4.js";import"./easy-signal-BiPFIK3O.js";import"./svelte-B9Ye91X-.js";const be=new WeakMap,wt=new WeakMap;class Nt{on(n,t,s){this.addEventListener(n,t,s)}off(n,t,s){this.removeEventListener(n,t,s)}addEventListener(n,t,s){s!=null&&s.once&&(t=Te(this,n,t,!0)),V(this,n,!0).add(t)}removeEventListener(n,t,s){if(s!=null&&s.once&&(t=Te(this,n,t)),!t)return;const r=V(this,n);r&&r.delete(t)}dispatchEvent(n,t){let s=!1;n.bubbles&&(n.stopImmediatePropagation=n.stopPropagation=()=>s=!0);const r=V(this,n.type);if(r)for(let o of r){if(t)try{o.call(this,n)}catch(i){try{this.dispatchEvent(new ErrorEvent("error",{error:i}))}catch{}}else o.call(this,n);if(s)break}}}function V(e,n,t=!1){let s=be.get(e);return!s&&t&&be.set(e,s=Object.create(null)),s&&s[n]||t&&(s[n]=new Set)}function Te(e,n,t,s=!1){let r=wt.get(e);!r&&s&&be.set(e,r=Object.create(null));const o=r&&r[n]||s&&(r[n]=new Map);if(!o.has(t)&&s){const i=a=>{const c=V(e,n);c&&c.delete(t),t.call(e,a)};o.set(t,i)}return o&&o.get(t)}var D;(function(e){e.api="api",e.user="user",e.history="history",e.input="input",e.paste="paste"})(D||(D={}));const vt="http://www.w3.org/2000/svg",At=new Set(["value","selected","checked","contentEditable"]),k=e=>e==null?e:e.key,Ze=(e,n)=>{n&&n!==e.key&&(e.key=n),!n&&e.key&&delete e.key},De=e=>{e.currentTarget.events[e.type](e)},Ge=(e,n,t,s,r)=>{n==="key"||(n[0]==="o"&&n[1]==="n"?((e.events||(e.events={}))[n=n.slice(2)]=s)?t||e.addEventListener(n,De):e.removeEventListener(n,De):s==null?e.removeAttribute(n):!r&&n!=="list"&&n!=="form"&&n in e?e[n]=s??"":e.setAttribute(n,s))},ne=(e,n)=>{if(typeof e=="string")return document.createTextNode(e);var t=e.props,s=(n=n||e.type==="svg")?document.createElementNS(vt,e.type,{is:t.is}):document.createElement(e.type,{is:t.is});for(var r in t)Ge(s,r,null,t[r],n);return Ze(s,k(e)),e.children.forEach(o=>s.appendChild(ne(W(o),n))),s},Ft=(e,n)=>{const t={};for(let s=0;s<e.attributes.length;s++){const{name:r,value:o}=e.attributes[s];r in e&&r!=="list"&&!n?t[r]=e[r]:t[r]=o===""?!0:o}return t},B=(e,n,t,s,r)=>{if(typeof s=="string")t!=null&&t.nodeType===Node.TEXT_NODE?t.nodeValue!==s&&(n.nodeValue=s):(n=e.insertBefore(ne(s,r),n),t!=null&&e.removeChild(t));else if(t==null||t.nodeName.toLowerCase()!==s.type)n=e.insertBefore(ne(W(s),r),n),t!=null&&e.removeChild(t);else{var o=Ft(t,r),i=s.props;r=r||s.type==="svg";for(var a in{...o,...i})(At.has(a)?n[a]:o[a])!==i[a]&&Ge(n,a,o[a],i[a],r);Ze(n,s.key),Qe(n,s.children,r)}return n},Qe=(e,n,t,s=Array.from(e.childNodes))=>{for(var r,o,i,a,c=0,h=0,l=s.length-1,d=n.length-1;h<=d&&c<=l&&!((i=k(s[c]))==null||i!==k(n[h]));)B(e,s[c],s[c++],n[h]=W(n[h++]),t);for(;h<=d&&c<=l&&!((i=k(s[l]))==null||i!==k(n[d]));)s[l]=B(e,s[l],s[l--],n[d]=W(n[d--]),t);if(c>l){const f=s[c]||s[c-1]&&s[c-1].nextSibling||null;for(;h<=d;)e.insertBefore(ne(n[h]=W(n[h++]),t),f)}else if(h>d)for(;c<=l;)e.removeChild(s[c++]);else{const f=new Map,m=new Set;for(let u=c;u<=l;u++)(i=k(s[u]))!=null&&f.set(i,s[u]);for(;h<=d;){if(i=k(o=s[c]),a=k(n[h]=W(n[h])),m.has(i)||a!=null&&a===k(s[c+1])){i==null&&e.removeChild(o),c++;continue}a==null?(i==null&&(B(e,o,o,n[h],t),h++),c++):(i===a?(B(e,o,o,n[h],t),m.add(a),c++):(r=f.get(a))!=null?(B(e,e.insertBefore(r,o),r,n[h],t),m.add(a)):B(e,o,null,n[h],t),h++)}for(;c<=l;)k(o=s[c++])==null&&e.removeChild(o);for(const[u,g]of f)m.has(u)||e.removeChild(g)}return e},W=e=>e!==!0&&e!==!1&&e?e:"",Tt=(e,n,t,s)=>({type:e,props:n,children:t,key:s}),A=(e,n,t)=>typeof e=="function"?e(n||{},t):Tt(e,n||{},Array.isArray(t)?t:t==null?[]:[t],n==null?void 0:n.key),le=(e,n,t)=>(Array.isArray(n)?e=Qe(e,n,e instanceof window.SVGElement,t):e=B(e.parentNode,e,e,n),e),Dt=/;\s*$/,xt={name:"decoration",selector:"span.format.decoration",fromDom:!1,render:(e,n)=>we(A("span",{},n),e,["format","decoration"])},kt={name:"decoration",selector:".embed.decoration",fromDom:!1,noFill:!0,render:(e,n)=>{const t="embed decoration",{name:s,...r}=e.decoration;return r.class=r.class?t+" "+r.class:t,A(s||"span",r,n)}};class Ct extends Event{constructor(t,s){super(t,s);b(this,"old");b(this,"doc");b(this,"change");b(this,"changedLines");this.old=s.old,this.doc=s.doc,this.change=s.change,this.changedLines=s.changedLines}}function St(e){e.typeset.formats.add(xt),e.typeset.embeds.add(kt);const n=new Map;let t=e.doc,s=t,r=t,o=!1;e.on("change",l),e.on("render",f);function i(m){if(!m)throw new TypeError("A decoration name is required");const u=n.get(m);return new Mt(m,e.doc,u,h,a)}function a(m){var p,y;if(!m)throw new TypeError("A decoration name is required");const u=n.get(m);if(!u)return!1;const g=Ke(m,u,t);return n.delete(m),n.size?r=r.apply(g):r=t,o||((p=e.modules.rendering)==null||p.render({old:s,doc:r}),(y=e.modules.selection)==null||y.renderSelection()),!0}function c(){n.size&&n.clear(),r=t}function h(m,u){var y,L;const g=n.get(m),p=g?g.compose(u,!0):u;R(p,g)||!g&&!p.ops.length||(p.ops.length?n.set(m,p):n.delete(m),r=n.size?r.apply(u,null):t,o||((y=e.modules.rendering)==null||y.render({old:s,doc:r}),(L=e.modules.selection)==null||L.renderSelection()))}function l(m){const{change:u,changedLines:g}=m;if(t=m.doc,u){if(u.contentChanged){for(let[p,y]of n)y=u.delta.transform(y,!0),y.ops.length?n.set(p,y):n.delete(p);r=n.size?r.apply(u.delta,null):t,n.size&&r.lines.forEach((p,y)=>{const L=t.lines[y];p!==L&&p.id!==L.id&&(p.id=L.id)})}}else c();d(u,g)}function d(m,u){const g={old:s,doc:t,change:m,changedLines:u};o=!0,e.dispatchEvent(new Ct("decorate",g)),o=!1}function f(){s=r}return{get old(){return s},get doc(){return r},getDecorator:i,removeDecorations:a,clearDecorations:c,gatherDecorations:d,init(){d()},destroy(){e.off("change",l),e.off("render",f)}}}class Mt{constructor(n,t,s,r,o){b(this,"change");b(this,"_name");b(this,"_doc");b(this,"_decoration");b(this,"_apply");b(this,"_remove");this._name=n,this._doc=t,this.change=new I(t),this._decoration=s,this._apply=r,this._remove=o}hasDecorations(){return!!this._decoration&&this._decoration.ops.length>0||this.change.delta.ops.length>0}getDecoration(){return this._decoration?this._decoration.compose(this.change.delta):this.change.delta}apply(){return this._apply(this._name,this.change.delta)}remove(){return this._remove(this._name)}clear(n){return this.hasDecorations()?(n?this.change.setDelta(this.change.delta.compose(this.invert(n))):this.change.setDelta(this.invert()),this):this}clearLines(n){if(!n.length)return this;const t=this._doc,s=[t.getLineRange(n[0])[0],t.getLineRange(n[n.length-1])[1]];if(n.length===1||n.every((c,h)=>!h||t.getLineRange(n[h-1])[1]===t.getLineRange(c)[0]))return this.clear(s);const o=this.invert(s),i=new x;let a=0;return n.forEach(c=>{const[h,l]=t.getLineRange(c);i.retain(h-a).concat(o.slice(h,l)),a=l}),this.change.setDelta(this.change.delta.compose(i)),this}clearLine(n){const t=this._doc,s=typeof n=="number"?t.getLineAt(n):typeof n=="string"?t.getLineBy(n):n;return this.clearLines([s])}invert(n){return this._decoration?Ke(this._name,this._decoration,this._doc,n):new x}decorateText(n,t={class:this._name}){return this.change.formatText(n,{decoration:{[this._name]:t}}),this}decorateLine(n,t={class:this._name}){return this.change.formatLine(n,{decoration:{[this._name]:t}},!0),this}insertDecoration(n,t={class:this._name}){if(typeof t=="string")throw new Error("You may only insert embed decorations");return this.change.insert(n,{decoration:t}),this}}function we(e,n,t){if(!n||!n.decoration)return e;const s=new Set(t);let r="",o=e.props;Object.values(n.decoration).forEach(a=>{const{class:c,style:h,...l}=a;c&&s.add(c.trim()),h&&(r+=h.trim()),r&&!Dt.test(r)&&(r+=";"),o={...l,...o}});const i=Array.from(s).join(" ").trim();return i&&(o.class=o.class?o.class+" "+i:i),r&&(o.style=o.style?o.style+";"+r:r),e.props=o,e}function Ke(e,n,t,s){let r=t.toDelta();return s&&(r=r.slice(s[0],s[1]),n=n.slice(s[0],s[1])),n=n.invert(r),n.ops.forEach(o=>{var i;((i=o.attributes)==null?void 0:i.decoration)===null&&(o.attributes.decoration={[e]:null})}),s&&(n=new x().retain(s[0]).concat(n)),n}const _t=[],xe=A("br",{}),ee=new WeakMap,ke=new WeakMap,Ce=new WeakMap,Se=new WeakMap,Ne=new WeakMap;function S(e,n){var t,s;return(s=(t=Ne.get(e))==null?void 0:t.get(n))==null?void 0:s[0]}function se(e,n){var t,s;return(s=(t=Ne.get(e))==null?void 0:t.get(n))==null?void 0:s[1]}function Ve(e){const{root:n,doc:t}=e,s=re(e,t.lines),r=new WeakMap;for(let i=0;i<n.children.length;i++){const a=n.children[i];if(!a.key)continue;const c=s.byKey[a.key];if(c)if(Array.isArray(c)){r.set(a,[t.getLineRange(c[0])[0],t.getLineRange(c[c.length-1])[1]]);const h=a.querySelectorAll(e.typeset.lines.selector);for(let l=0;l<h.length;l++){const d=h[l],f=t.getLineBy(d.key);f&&r.set(d,t.getLineRange(f))}}else r.set(a,t.getLineRange(c))}const o=n.querySelectorAll(e.typeset.lines.selector);for(let i=0;i<o.length;i++){const a=o[i];if(r.has(a)||!a.key)continue;const c=t.getLineBy(a.key);r.set(a,t.getLineRange(c))}Ne.set(n,r)}function Ee(e,n){const{root:t}=e;e.dispatchEvent(new Event("rendering")),le(t,et(e,n)),Ve(e),e.dispatchEvent(new Event("render")),e.dispatchEvent(new Event("rendered"))}function Me(e,n,t){const{root:s}=e,r=re(e,n.lines).combined,o=re(e,t.lines).combined,[i,a]=Pt(r,o);R(i,a)||(i[0]=Math.max(0,i[0]-1),a[0]=Math.max(0,a[0]-1),i[1]=Math.min(r.length,i[1]+1),a[1]=Math.min(o.length,a[1]+1),s.childNodes.length!==r.length&&(i[1]+=s.childNodes.length-r.length));const c=Array.from(s.childNodes).slice(i[0],i[1]),h=o.slice(a[0],a[1]);if(!c.length&&!h.length)return Ee(e,t);e.dispatchEvent(new Event("rendering")),le(s,tt(e,h),c),Ve(e),e.dispatchEvent(new Event("render")),e.dispatchEvent(new Event("rendered"))}function et(e,n,t){return tt(e,re(e,n.lines).combined,t)}function tt(e,n,t){return n.map(s=>Rt(e,s,t)).filter(Boolean)}function Rt(e,n,t){return Array.isArray(n)?Bt(e,n,t):Ot(e,n,t)}function Ot(e,n,t){const s=oe(e,n);if(!s.render)throw new Error("No render method defined for line");const r=s.render(n.attributes,ve(e,n),n,e,t);return we(r,n.attributes),r.key=n.id,r}function Bt(e,n,t){const s=oe(e,n[0]);if(!s.renderMultiple)throw new Error("No render method defined for line");const r=s.renderMultiple(n.map(o=>[o.attributes,ve(e,o),o.id]),e,t);return r.key=n[0].id,r}function re(e,n){const t=Se.get(n);if(t)return t;const s=[],r={};let o=[];n.forEach((a,c)=>{const h=oe(e,a);if(h.shouldCombine){o.push(a);const l=n[c+1];if(!l||oe(e,l)!==h||!h.shouldCombine(o[0].attributes,l.attributes)){const d=Ce.get(o[0]);d&&d.length===o.length&&o.every((f,m)=>d[m]===f)?o=d:Ce.set(o[0],o),s.push(o),r[o[0].id]=o,o=[]}}else h.render&&(s.push(a),r[a.id]=a)});const i={combined:s,byKey:r};return Se.set(n,i),i}function Pt(e,n){const t=e.length,s=n.length,r=Math.min(t,s);let o=0,i=0,a=0,c=0;for(let h=0;h<r;h++)if(!_e(e[h],n[h])){o=a=h;break}for(let h=0;h<r;h++)if(!_e(e[t-h-1],n[s-h-1])){i=t-h,c=s-h;break}return[[o,i],[a,c]]}function ve(e,n,t){const{lines:s,formats:r,embeds:o}=e.typeset;let i=[],a=[],c=!0,h;return n.content.ops.forEach((l,d,f)=>{let m=[];if(l.insert===" "&&l.attributes&&(h=s.findByAttributes(l.attributes))&&h.child){h.render&&(i=ie(i),c&&i.push(xe),a.push(h.render(l.attributes,i,n,e,t)),i=[]);return}if(typeof l.insert=="string"){const u=f[d-1],g=f[d+1];let p=l.insert.replace(/ /g," ").replace(/ /g," ");(!u||typeof u.insert=="object")&&(p=p.replace(/^ /," ")),(!g||typeof g.insert=="object"||Wt(g))&&(p=p.replace(/ $/," ")),c=!1,m.push(p)}else if(l.insert){const u=o.findByAttributes(l.insert);u!=null&&u.render&&(m.push(u.render(l.insert,_t,n,e,t)),u.name==="br"?c=!0:u.noFill||(c=!1))}l.attributes&&Object.keys(l.attributes).sort((u,g)=>r.priority(g)-r.priority(u)).forEach(u=>{const g=r.get(u);if(g!=null&&g.render){const p=g.render(l.attributes,m,n,e,t);p&&(ee.set(p,g),m=[p])}}),i.push.apply(i,m)}),i=ie(i),c&&i.push(xe),a.length?a:i}function _e(e,n){return e===n?!0:Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,s)=>t===n[s])}function oe(e,n){let t=ke.get(n.attributes);return t||(t=e.typeset.lines.findByAttributes(n.attributes,!0),ke.set(n.attributes,t)),t}function ie(e){const n=[];if(e.forEach((t,s)=>{const r=n.length-1,o=n[r];o&&typeof o!="string"&&typeof t!="string"&&ee.has(o)&&ee.get(o)===ee.get(t)&&It(o.props,t.props)?o.children=o.children.concat(t.children):o&&typeof o=="string"&&typeof t=="string"?n[r]+=t:(n.push(t),o&&typeof o!="string"&&o.children&&(o.children=ie(o.children)))}),n.length){const t=n[n.length-1];t&&typeof t!="string"&&t.children&&(t.children=ie(t.children))}return n}function It(e,n){return Object.keys({...e,...n}).every(t=>t.slice(0,2)==="on"||e[t]===n[t])}function Wt(e){return typeof e.insert=="string"&&e.insert[0]===" "}function zt(e){e.on("change",t);function n(s){if(s){const{doc:r,old:o}=s;o&&r?Me(e,o,r):r&&Ee(e,r)}else{const{doc:r}=e.modules.decorations||e;Ee(e,r)}}function t(s){const{doc:r,old:o}=e.modules.decorations||s;o.lines!==r.lines&&Me(e,o,r)}return{render:n,destroy(){e.off("change",t)}}}const he=[],nt={},st={},rt={},Ht=(e,n)=>!0;class te{constructor(n){b(this,"lines");b(this,"formats");b(this,"embeds");var o,i,a;const t=(o=n.lines)==null?void 0:o.map(c=>typeof c=="string"?nt[c]:c).filter(Boolean),s=(i=n.formats)==null?void 0:i.map(c=>typeof c=="string"?st[c]:c).filter(Boolean),r=(a=n.embeds)==null?void 0:a.map(c=>typeof c=="string"?rt[c]:c).filter(Boolean);this.lines=new de(t||he),this.formats=new de(s||he),this.embeds=new de(r||he)}}b(te,"line",O),b(te,"format",Y),b(te,"embed",Ae);function O(e){return e.renderMultiple&&!e.shouldCombine&&(e.shouldCombine=Ht),nt[e.name]=e}function Y(e){return st[e.name]=e}function Ae(e){return rt[e.name]=e}class de{constructor(n){b(this,"list");b(this,"selector");b(this,"types");b(this,"priorities");this.list=n,this.init()}get default(){return this.list[0]}init(){this.selector=this.list.map(n=>n.selector||"").filter(Boolean).join(", "),this.types=this.list.reduce((n,t)=>(n[t.name]=t,n),{}),this.priorities=this.list.reduce((n,t,s)=>(n[t.name]=s,n),{})}add(n){this.list.push(n),this.init()}remove(n){const t=typeof n=="string"?n:n.name;this.list=this.list.filter(s=>s.name!==t),this.init()}get(n){return this.types[n]}priority(n){const t=this.priorities[n];return t!==void 0?t:-1}matches(n){if(!n)return!1;if(!n.nodeType)throw new Error("Cannot match against "+n);if(n.nodeType===Node.ELEMENT_NODE)return this.selector?n.matches(this.selector):!1}findByNode(n,t=!1){if(n.nodeType!==Node.ELEMENT_NODE)return;let s=this.list.length;for(;s--;){let r=this.list[s];if(n.matches(r.selector))return r}if(t)return this.default}findByAttributes(n,t=!1){const s=n&&Object.keys(n);let r;return s&&s.every(o=>!(r=this.get(o))),r||(t?this.default:void 0)}}Ae({name:"image",selector:"img",commands:e=>(n,t)=>e.insert({image:n,...t}),fromDom:e=>{const n={};return["src","alt","width","height"].forEach(t=>{if(!e.hasAttribute(t))return;const s=e.getAttribute(t);t==="src"&&(t="image"),n[t]=s}),n},render:e=>{const{image:n,...t}=e;return t.src=n,A("img",t)}});Ae({name:"br",selector:"br",commands:e=>()=>e.insert({br:!0}),render:()=>A("br")});Y({name:"bold",selector:"strong, b",styleSelector:'[style*="font-weight:bold"], [style*="font-weight: bold"]',commands:e=>()=>e.toggleTextFormat({bold:!0}),shortcuts:"Mod+B",render:(e,n)=>A("strong",null,n)});Y({name:"italic",selector:"em, i",styleSelector:'[style*="font-style:italic"], [style*="font-style: italic"]',commands:e=>()=>e.toggleTextFormat({italic:!0}),shortcuts:"Mod+I",render:(e,n)=>A("em",null,n)});Y({name:"code",selector:"code",commands:e=>()=>e.toggleTextFormat({code:!0}),render:(e,n)=>A("code",null,n)});Y({name:"link",selector:"a[href]",greedy:!1,commands:e=>n=>e.toggleTextFormat({link:typeof n=="string"?n:!!n}),fromDom:e=>e.href,render:(e,n)=>A("a",{href:e.link,target:"_blank"},n)});O({name:"paragraph",selector:"p",commands:e=>()=>e.formatLine({}),shortcuts:"Mod+0",render:(e,n)=>A("p",null,n)});O({name:"header",selector:"h1, h2, h3, h4, h5, h6",defaultFollows:!0,commands:e=>({header:n=>e.toggleLineFormat({header:n}),header1:()=>e.toggleLineFormat({header:1}),header2:()=>e.toggleLineFormat({header:2}),header3:()=>e.toggleLineFormat({header:3}),header4:()=>e.toggleLineFormat({header:4}),header5:()=>e.toggleLineFormat({header:5}),header6:()=>e.toggleLineFormat({header:6})}),shortcuts:{"Mod+1":"header1","Mod+2":"header2","Mod+3":"header3","Mod+4":"header4","Mod+5":"header5","Mod+6":"header6"},fromDom:e=>({header:parseInt(e.nodeName.replace("H",""))}),render:(e,n)=>A(`h${e.header}`,null,n)});O({name:"list",selector:"ul > li, ol > li",indentable:!0,commands:e=>({bulletList:()=>e.toggleLineFormat({list:"bullet"}),orderedList:()=>e.toggleLineFormat({list:"ordered"}),checkList:()=>e.toggleLineFormat({list:"check"}),indent:()=>e.indent(),outdent:()=>e.outdent(),toggleCheck:n=>{const t=typeof n=="string"?e.doc.getLineBy(n):e.doc.selection?e.doc.getLineAt(e.doc.selection[0]):null;if(!t)return!1;const[s]=e.doc.getLineRange(t),r={list:"check"};t.attributes.checked||(r.checked=!0),e.formatLine(r,s)}}),shortcuts:{"Mod+Space":"toggleCheck"},fromDom(e){let n=-1,t=e.parentNode,s=t&&t.getAttribute("type");const r=e.hasAttribute("data-checked")?"check":t&&t.nodeName==="OL"?"ordered":"bullet";for(;t;){if(/^UL|OL$/.test(t.nodeName))n++;else if(t.nodeName!=="LI")break;t=t.parentNode}!n&&e.className.startsWith("ql-indent-")&&(n=parseInt(e.className.replace("ql-indent-","")));const o={list:r};return n&&(o.indent=n),s&&(o.type=s),e.getAttribute("data-checked")==="true"&&(o.checked=!0),o},nextLineAttributes(e){const{start:n,...t}=e;return t},shouldCombine:(e,n)=>e.list===n.list&&!n.start&&e.type===n.type||n.indent,renderMultiple:(e,n,t)=>{const s=[],r=[];e.forEach(([i,a,c])=>{const h=i.list==="ordered"?"ol":"ul",l=i.indent||0;let d={key:c};if(i.list==="check"){let m=function(g){n.enabled&&(g.preventDefault(),n.commands.toggleCheck(c))};const u=A("button",{class:"check-list-check",onmousedown:m,ontouchstart:m});a.length===1&&a[0].type==="br"?a.push(u):a.unshift(u),d={...d,class:"check-list-item","data-checked":""+(i.checked||!1)}}const f=we(A("li",d,a),i);for(;l>=r.length;){const m=A(h,{start:i.start,type:i.type,key:`${c}-outer`}),u=r.length?r[r.length-1].children:s,g=u[u.length-1];typeof g=="object"&&g.type==="li"&&t?g.children.push(m):u.push(m),r.push(m)}if(!o(r[l],h,i)){const m=A(h,{start:i.start,type:i.type});(l?r[l-1].children:s).push(m),r[l]=m}r[l].children.push(f),r.length=l+1});function o(i,a,c){return i.type===a&&(i.props.start===c.start||i.props.start&&!c.start)&&i.props.type===c.type}return s[0]}});O({name:"blockquote",selector:"blockquote p",commands:e=>(n=!0)=>{typeof n!="string"&&(n=!0),e.toggleLineFormat({blockquote:n})},fromDom(e){const{className:n}=e.parentNode,t=n.match(/quote-(\S+)/);return{blockquote:t&&t[1]!=="true"&&t[1]||!0}},shouldCombine:(e,n)=>e.blockquote===n.blockquote,renderMultiple:e=>{const n=e[0][0].blockquote,t=typeof n=="string"?{className:`quote-${n}`}:null,s=e.map(([r,o,i])=>A("p",{key:i},o));return A("blockquote",t,s)}});O({name:"code-block",selector:"pre code",contained:!0,commands:e=>()=>e.toggleLineFormat({"code-block":!0}),renderMultiple:e=>{const n=[];return e.forEach(([t,s,r])=>{s.length&&s[s.length-1].type==="br"&&s.pop(),n.push(A("code",{key:r},s)),n.push(`
|
|
2
2
|
`)}),A("pre",{spellcheck:!1},n)}});O({name:"hr",selector:"hr",frozen:!0,commands:e=>()=>{const{doc:n}=e,{selection:t}=n;if(!t)return;const s=C(t),r=e.change.delete(s);if(s[0]===s[1]&&n.getLineAt(s[0]).length===1)r.insert(s[0],`
|
|
3
3
|
`,{...n.getLineFormat(s[0])}).formatLine(s[0],{hr:!0});else{const o=new x().insert(`
|
|
4
4
|
`,n.getLineAt(s[0]).attributes).insert(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as f}from"./svelte-
|
|
1
|
+
import{w as f}from"./svelte-B9Ye91X-.js";import{D as u}from"./@edraj-D-9hi9vU.js";import{g as d}from"./svelte-i18n-CZ4cFDVx.js";const S=f(typeof localStorage<"u"&&localStorage.getItem("authToken")||"");var s=(e=>(e.ar="ar",e.en="en",e))(s||{});const a="user",p="ar";function y(){const e=d();return e&&e in s?s[e]:p}let t={signedin:!1,locale:y()},n;const I=typeof localStorage<"u"&&localStorage.getItem(a)||JSON.stringify(t);n=f(JSON.parse(I)||t);async function J(e,m){var l,i;const r=await u.login(e,m);if(r.status=="success"&&r.records.length>0){const o=r.records[0],c=o.attributes.access_token;S.set(c),typeof localStorage<"u"&&localStorage.setItem("authToken",c);const g={signedin:!0,locale:"ar",shortname:o.shortname,localized_displayname:(i=(l=o.attributes)==null?void 0:l.displayname)==null?void 0:i.en,account:o};n.set(g),typeof localStorage<"u"&&(localStorage.setItem(a,JSON.stringify(g)),localStorage.setItem("rowPerPage","15"))}else n.set(t),typeof localStorage<"u"&&localStorage.setItem(a,JSON.stringify(t))}async function O(){var e;typeof localStorage<"u"&&((e=JSON.parse(localStorage.getItem(a)))!=null&&e.signedin)&&(localStorage.removeItem("rowPerPage"),n.set(t),localStorage.removeItem(a),await u.logout())}export{J as a,O as s,n as u};
|
dmart/cxb/config.json
CHANGED
dmart/cxb/index.html
CHANGED
|
@@ -5,22 +5,22 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/cxb/favicon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>CXB</title>
|
|
8
|
-
<script type="module" crossorigin src="/cxb/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/cxb/assets/index-BJ8k452_.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/cxb/assets/clsx-B-dksMZM.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/cxb/assets/esm-env-rsSWfq8L.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/cxb/assets/svelte-
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/cxb/assets/svelte-B9Ye91X-.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/cxb/assets/hookar-BMRD9G9H.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/cxb/assets/consolite-DlCuI0F9.js">
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/cxb/assets/@roxi-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/cxb/assets/@zerodevx-
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/cxb/assets/@roxi-Bw7qXphd.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/cxb/assets/@zerodevx-z992vLW9.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/cxb/assets/ajv-Cpj98o6Y.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/cxb/assets/deepmerge-rn4rBaHU.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/cxb/assets/tslib-pJfR_DrR.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/cxb/assets/@formatjs-yKEsAtjs.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/cxb/assets/intl-messageformat-Dc5UU-HB.js">
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/cxb/assets/svelte-i18n-
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/cxb/assets/svelte-i18n-CZ4cFDVx.js">
|
|
22
22
|
<link rel="stylesheet" crossorigin href="/cxb/assets/@zerodevx-CVEpe6WZ.css">
|
|
23
|
-
<link rel="stylesheet" crossorigin href="/cxb/assets/index-
|
|
23
|
+
<link rel="stylesheet" crossorigin href="/cxb/assets/index-CbbMUQaM.css">
|
|
24
24
|
</head>
|
|
25
25
|
<body>
|
|
26
26
|
<div id="app"></div>
|
|
@@ -2766,9 +2766,19 @@ class SQLAdapter(BaseDataAdapter):
|
|
|
2766
2766
|
folder_meta.payload.body.get("unique_fields", None), list): # type: ignore
|
|
2767
2767
|
return True
|
|
2768
2768
|
|
|
2769
|
+
current_record = None
|
|
2770
|
+
if action is api.RequestType.update:
|
|
2771
|
+
try:
|
|
2772
|
+
resource_class = getattr(
|
|
2773
|
+
sys_modules["models.core"], camel_case(record.resource_type)
|
|
2774
|
+
)
|
|
2775
|
+
current_record = await self.load(space_name, record.subpath, record.shortname, resource_class)
|
|
2776
|
+
except Exception:
|
|
2777
|
+
current_record = None
|
|
2778
|
+
|
|
2769
2779
|
current_user = None
|
|
2770
2780
|
if action is api.RequestType.update and record.resource_type is ResourceType.user:
|
|
2771
|
-
current_user =
|
|
2781
|
+
current_user = current_record
|
|
2772
2782
|
|
|
2773
2783
|
for compound in folder_meta.payload.body["unique_fields"]: # type: ignore
|
|
2774
2784
|
query_string = ""
|
|
@@ -2809,7 +2819,14 @@ class SQLAdapter(BaseDataAdapter):
|
|
|
2809
2819
|
search=query_string
|
|
2810
2820
|
)
|
|
2811
2821
|
owner = record.attributes.get("owner_shortname", None) if user_shortname is None else user_shortname
|
|
2812
|
-
total,
|
|
2822
|
+
total, records = await self.query(q, owner)
|
|
2823
|
+
|
|
2824
|
+
if action is api.RequestType.update and current_record is not None:
|
|
2825
|
+
records = [r for r in records if not (r.shortname == record.shortname and r.subpath == record.subpath)]
|
|
2826
|
+
if total == 1:
|
|
2827
|
+
total = 0
|
|
2828
|
+
else:
|
|
2829
|
+
total = len(records)
|
|
2813
2830
|
|
|
2814
2831
|
if total != 0:
|
|
2815
2832
|
raise API_Exception(
|
dmart/dmart.py
CHANGED
|
@@ -9,8 +9,10 @@ import ssl
|
|
|
9
9
|
import subprocess
|
|
10
10
|
import sys
|
|
11
11
|
import os
|
|
12
|
+
import secrets
|
|
12
13
|
sys.path.append(os.path.dirname(__file__))
|
|
13
14
|
|
|
15
|
+
from utils.settings import settings
|
|
14
16
|
import time
|
|
15
17
|
import warnings
|
|
16
18
|
import webbrowser
|
|
@@ -20,7 +22,6 @@ from pathlib import Path
|
|
|
20
22
|
|
|
21
23
|
from hypercorn.config import Config
|
|
22
24
|
from hypercorn.run import run
|
|
23
|
-
from utils.settings import settings
|
|
24
25
|
|
|
25
26
|
# freeze_support()
|
|
26
27
|
|
|
@@ -46,6 +47,108 @@ commands = """
|
|
|
46
47
|
|
|
47
48
|
sentinel = object()
|
|
48
49
|
|
|
50
|
+
def ensure_dmart_home():
|
|
51
|
+
dmart_home = Path.home() / ".dmart"
|
|
52
|
+
dmart_home.mkdir(parents=True, exist_ok=True)
|
|
53
|
+
|
|
54
|
+
config_env = dmart_home / "config.env"
|
|
55
|
+
if not config_env.exists():
|
|
56
|
+
try:
|
|
57
|
+
(dmart_home / "logs").mkdir(parents=True, exist_ok=True)
|
|
58
|
+
(dmart_home / "spaces").mkdir(parents=True, exist_ok=True)
|
|
59
|
+
(dmart_home / "spaces" / "custom_plugins").mkdir(parents=True, exist_ok=True)
|
|
60
|
+
|
|
61
|
+
jwt_secret = secrets.token_urlsafe(32)
|
|
62
|
+
|
|
63
|
+
config_content = f"""# dmart configuration
|
|
64
|
+
JWT_SECRET="{jwt_secret}"
|
|
65
|
+
JWT_ALGORITHM="HS256"
|
|
66
|
+
LOG_FILE="{dmart_home / 'logs' / 'dmart.ljson.log'}"
|
|
67
|
+
WS_LOG_FILE="{dmart_home / 'logs' / 'websocket.ljson.log'}"
|
|
68
|
+
|
|
69
|
+
# Database configuration
|
|
70
|
+
ACTIVE_DATA_DB="file"
|
|
71
|
+
SPACES_FOLDER="{dmart_home / 'spaces'}"
|
|
72
|
+
DATABASE_DRIVER="sqlite+pysqlite"
|
|
73
|
+
DATABASE_NAME="{dmart_home / 'dmart.db'}"
|
|
74
|
+
|
|
75
|
+
# Server configuration
|
|
76
|
+
LISTENING_HOST="0.0.0.0"
|
|
77
|
+
LISTENING_PORT=8282
|
|
78
|
+
"""
|
|
79
|
+
config_env.write_text(config_content)
|
|
80
|
+
print(f"Created default config.env at {config_env}")
|
|
81
|
+
except Exception as e:
|
|
82
|
+
print(f"Warning: Failed to create default config.env at {config_env}: {e}")
|
|
83
|
+
|
|
84
|
+
cli_ini = dmart_home / "cli.ini"
|
|
85
|
+
if not cli_ini.exists():
|
|
86
|
+
try:
|
|
87
|
+
default_config = ""
|
|
88
|
+
sample_path = Path(__file__).resolve().parent / "config.ini.sample"
|
|
89
|
+
if sample_path.exists():
|
|
90
|
+
with open(sample_path, "r") as f:
|
|
91
|
+
default_config = f.read()
|
|
92
|
+
else:
|
|
93
|
+
default_config = (
|
|
94
|
+
'url = "http://localhost:8282"\n'
|
|
95
|
+
'shortname = "dmart"\n'
|
|
96
|
+
'password = "xxxx"\n'
|
|
97
|
+
'query_limit = 50\n'
|
|
98
|
+
'retrieve_json_payload = True\n'
|
|
99
|
+
'default_space = "management"\n'
|
|
100
|
+
'pagination = 50\n'
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
login_creds_path = dmart_home / "login_creds.sh"
|
|
104
|
+
if login_creds_path.exists():
|
|
105
|
+
try:
|
|
106
|
+
with open(login_creds_path, "r") as f:
|
|
107
|
+
creds_content = f.read()
|
|
108
|
+
|
|
109
|
+
match = re.search(r"export SUPERMAN='(.*?)'", creds_content)
|
|
110
|
+
if match:
|
|
111
|
+
creds_json = match.group(1)
|
|
112
|
+
creds = json.loads(creds_json)
|
|
113
|
+
if "shortname" in creds:
|
|
114
|
+
default_config = re.sub(r'shortname = ".*"', f'shortname = "{creds["shortname"]}"', default_config)
|
|
115
|
+
if "password" in creds:
|
|
116
|
+
default_config = re.sub(r'password = ".*"', f'password = "{creds["password"]}"', default_config)
|
|
117
|
+
except Exception as e:
|
|
118
|
+
print(f"Warning: Failed to parse login_creds.sh: {e}")
|
|
119
|
+
|
|
120
|
+
with open(cli_ini, "w") as f:
|
|
121
|
+
f.write(default_config)
|
|
122
|
+
print(f"Created default cli.ini at {cli_ini}")
|
|
123
|
+
except Exception as e:
|
|
124
|
+
print(f"Warning: Failed to create default cli.ini at {cli_ini}: {e}")
|
|
125
|
+
|
|
126
|
+
cxb_config = dmart_home / "config.json"
|
|
127
|
+
if not cxb_config.exists():
|
|
128
|
+
try:
|
|
129
|
+
sample_cxb_path = Path(__file__).resolve().parent / "cxb" / "config.sample.json"
|
|
130
|
+
if sample_cxb_path.exists():
|
|
131
|
+
shutil.copy2(sample_cxb_path, cxb_config)
|
|
132
|
+
print(f"Created default config.json at {cxb_config}")
|
|
133
|
+
else:
|
|
134
|
+
default_cxb_config = {
|
|
135
|
+
"title": "DMART Unified Data Platform",
|
|
136
|
+
"footer": "dmart.cc unified data platform",
|
|
137
|
+
"short_name": "dmart",
|
|
138
|
+
"display_name": "dmart",
|
|
139
|
+
"description": "dmart unified data platform",
|
|
140
|
+
"default_language": "en",
|
|
141
|
+
"languages": { "ar": "العربية", "en": "English" },
|
|
142
|
+
"backend": "http://localhost:8282",
|
|
143
|
+
"websocket": "ws://0.0.0.0:8484/ws"
|
|
144
|
+
}
|
|
145
|
+
with open(cxb_config, "w") as f:
|
|
146
|
+
json.dump(default_cxb_config, f, indent=2)
|
|
147
|
+
print(f"Created default config.json at {cxb_config}")
|
|
148
|
+
except Exception as e:
|
|
149
|
+
print(f"Warning: Failed to create default config.json at {cxb_config}: {e}")
|
|
150
|
+
|
|
151
|
+
ensure_dmart_home()
|
|
49
152
|
|
|
50
153
|
def hypercorn_main() -> int:
|
|
51
154
|
parser = argparse.ArgumentParser()
|
|
@@ -433,49 +536,6 @@ def main():
|
|
|
433
536
|
home_config = Path.home() / ".dmart" / "cli.ini"
|
|
434
537
|
if home_config.exists():
|
|
435
538
|
config_file = str(home_config)
|
|
436
|
-
else:
|
|
437
|
-
try:
|
|
438
|
-
home_config.parent.mkdir(parents=True, exist_ok=True)
|
|
439
|
-
|
|
440
|
-
default_config = ""
|
|
441
|
-
sample_path = Path(__file__).resolve().parent / "config.ini.sample"
|
|
442
|
-
if sample_path.exists():
|
|
443
|
-
with open(sample_path, "r") as f:
|
|
444
|
-
default_config = f.read()
|
|
445
|
-
else:
|
|
446
|
-
default_config = (
|
|
447
|
-
'url = "http://localhost:8282"\n'
|
|
448
|
-
'shortname = "dmart"\n'
|
|
449
|
-
'password = "xxxx"\n'
|
|
450
|
-
'query_limit = 50\n'
|
|
451
|
-
'retrieve_json_payload = True\n'
|
|
452
|
-
'default_space = "management"\n'
|
|
453
|
-
'pagination = 50\n'
|
|
454
|
-
)
|
|
455
|
-
|
|
456
|
-
login_creds_path = Path.home() / ".dmart" / "login_creds.sh"
|
|
457
|
-
if login_creds_path.exists():
|
|
458
|
-
try:
|
|
459
|
-
with open(login_creds_path, "r") as f:
|
|
460
|
-
creds_content = f.read()
|
|
461
|
-
|
|
462
|
-
match = re.search(r"export SUPERMAN='(.*?)'", creds_content)
|
|
463
|
-
if match:
|
|
464
|
-
creds_json = match.group(1)
|
|
465
|
-
creds = json.loads(creds_json)
|
|
466
|
-
if "shortname" in creds:
|
|
467
|
-
default_config = re.sub(r'shortname = ".*"', f'shortname = "{creds["shortname"]}"', default_config)
|
|
468
|
-
if "password" in creds:
|
|
469
|
-
default_config = re.sub(r'password = ".*"', f'password = "{creds["password"]}"', default_config)
|
|
470
|
-
except Exception as e:
|
|
471
|
-
print(f"Warning: Failed to parse login_creds.sh: {e}")
|
|
472
|
-
|
|
473
|
-
with open(home_config, "w") as f:
|
|
474
|
-
f.write(default_config)
|
|
475
|
-
print(f"Created default config at {home_config}")
|
|
476
|
-
config_file = str(home_config)
|
|
477
|
-
except Exception as e:
|
|
478
|
-
print(f"Warning: Failed to create default config at {home_config}: {e}")
|
|
479
539
|
|
|
480
540
|
if config_file:
|
|
481
541
|
os.environ["BACKEND_ENV"] = config_file
|
|
@@ -723,9 +783,9 @@ def main():
|
|
|
723
783
|
if not sample_spaces_path.exists():
|
|
724
784
|
print("Error: Sample spaces not found in the package.")
|
|
725
785
|
sys.exit(1)
|
|
726
|
-
|
|
786
|
+
|
|
727
787
|
target_path = Path.home() / ".dmart" / "spaces"
|
|
728
|
-
|
|
788
|
+
|
|
729
789
|
try:
|
|
730
790
|
if target_path.exists():
|
|
731
791
|
shutil.rmtree(target_path)
|
dmart/fast.py
ADDED
dmart/info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"branch": "
|
|
1
|
+
{"branch": "master", "version": "b7904d7d", "tag": "v1.4.0-125-gb7904d7d", "version_date": "'Sun Feb 1 14:11:35 2026 +0300'"}
|
dmart/main.py
CHANGED
|
@@ -41,6 +41,7 @@ from api.public.router import router as public
|
|
|
41
41
|
from api.user.router import router as user
|
|
42
42
|
from api.info.router import router as info, git_info
|
|
43
43
|
from utils.internal_error_code import InternalErrorCode
|
|
44
|
+
from pathlib import Path
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
class SPAStaticFiles(StaticFiles):
|
|
@@ -503,6 +504,10 @@ if os.path.isdir(cxb_path):
|
|
|
503
504
|
if user_config.exists():
|
|
504
505
|
return FileResponse(user_config)
|
|
505
506
|
|
|
507
|
+
home_config = Path.home() / ".dmart" / "config.json"
|
|
508
|
+
if home_config.exists():
|
|
509
|
+
return FileResponse(home_config)
|
|
510
|
+
|
|
506
511
|
bundled_config = os.path.join(cxb_path, "config.json")
|
|
507
512
|
if os.path.exists(bundled_config):
|
|
508
513
|
return FileResponse(bundled_config)
|
dmart/my.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/python3
|
|
2
|
+
#coding: utf-8
|
|
3
|
+
|
|
4
|
+
from pygments import highlight, lexers, formatters
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
d = {"test": [1, 2, 3, 4], "hello": "world"}
|
|
8
|
+
|
|
9
|
+
formatted_json = json.dumps(d, indent=4)
|
|
10
|
+
colorful_json = highlight(formatted_json, lexers.JsonLexer(), formatters.TerminalFormatter())
|
|
11
|
+
print(colorful_json)
|
dmart/publish.sh
CHANGED
|
@@ -30,8 +30,8 @@ else
|
|
|
30
30
|
fi
|
|
31
31
|
|
|
32
32
|
echo "Installing dependencies..."
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
uv pip install --upgrade pip build twine
|
|
34
|
+
uv pip install .
|
|
35
35
|
|
|
36
36
|
echo "Creating standalone bundle..."
|
|
37
37
|
python3 bundler.py
|
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"redis_db_update",
|
|
27
|
-
"system_notification_sender"
|
|
28
|
-
],
|
|
29
|
-
"ordinal": 1
|
|
30
|
-
}
|
|
2
|
+
"is_active": true,
|
|
3
|
+
"active_plugins": [
|
|
4
|
+
"action_log",
|
|
5
|
+
"redis_db_update",
|
|
6
|
+
"system_notification_sender"
|
|
7
|
+
],
|
|
8
|
+
"ordinal": 1,
|
|
9
|
+
"displayname": {
|
|
10
|
+
"en": "Applications"
|
|
11
|
+
},
|
|
12
|
+
"languages": [
|
|
13
|
+
"english"
|
|
14
|
+
],
|
|
15
|
+
"shortname": "applications",
|
|
16
|
+
"tags": [],
|
|
17
|
+
"mirrors": [],
|
|
18
|
+
"created_at": "2023-04-09T12:55:00.899747",
|
|
19
|
+
"subpath": "/",
|
|
20
|
+
"updated_at": "2023-04-09T12:55:00.906988",
|
|
21
|
+
"uuid": "1ef1131f-53f7-45d8-9565-4c884b1eac71",
|
|
22
|
+
"owner_shortname": "dmart",
|
|
23
|
+
"indexing_enabled": true,
|
|
24
|
+
"hide_space": true
|
|
25
|
+
}
|