abstra 3.23.10__py3-none-any.whl → 3.23.11__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.
- abstra/ai.py +6 -0
- {abstra-3.23.10.dist-info → abstra-3.23.11.dist-info}/METADATA +1 -1
- {abstra-3.23.10.dist-info → abstra-3.23.11.dist-info}/RECORD +167 -167
- abstra_internals/contracts_generated.py +5677 -4749
- abstra_internals/controllers/sdk/sdk_ai.py +6 -1
- abstra_internals/interface/sdk/ai.py +59 -4
- abstra_internals/repositories/execution_logs.py +3 -13
- abstra_statics/dist/assets/{AbstraButton.vue_vue_type_script_setup_true_lang.ab120641.js → AbstraButton.vue_vue_type_script_setup_true_lang.3fce0fbb.js} +2 -2
- abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.4fb1f88a.js +2 -0
- abstra_statics/dist/assets/{ApiKeys.f5b7fcec.js → ApiKeys.56b97ced.js} +2 -2
- abstra_statics/dist/assets/App.bd5ec032.js +2 -0
- abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.79524273.js +2 -0
- abstra_statics/dist/assets/BaseLayout.ac22ef55.js +2 -0
- abstra_statics/dist/assets/Billing.2c39d133.js +2 -0
- abstra_statics/dist/assets/{Breadcrumb.ef8bd191.js → Breadcrumb.f11a16d0.js} +2 -2
- abstra_statics/dist/assets/{Builds.4efe7d0f.js → Builds.2bf5dad8.js} +2 -2
- abstra_statics/dist/assets/{Card.897ad69d.js → Card.6caecaa4.js} +2 -2
- abstra_statics/dist/assets/{CircularLoading.ea5d27d2.js → CircularLoading.bc88c029.js} +2 -2
- abstra_statics/dist/assets/CloseCircleOutlined.12f63f77.js +2 -0
- abstra_statics/dist/assets/{ConnectorsView.b274568b.js → ConnectorsView.97a8c63b.js} +2 -2
- abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.48b29302.js +2 -0
- abstra_statics/dist/assets/ContentLayout.072b3790.js +2 -0
- abstra_statics/dist/assets/{CrudView.d06da8d4.js → CrudView.79588134.js} +2 -2
- abstra_statics/dist/assets/DocsButton.vue_vue_type_script_setup_true_lang.6566ff97.js +2 -0
- abstra_statics/dist/assets/{EditorLogin.22bca314.js → EditorLogin.e704b2ee.js} +2 -2
- abstra_statics/dist/assets/{EditorsView.367f6a9a.js → EditorsView.987a7eda.js} +2 -2
- abstra_statics/dist/assets/EnvVars.c5e84d82.js +2 -0
- abstra_statics/dist/assets/{Error.c2ad341a.js → Error.f378696f.js} +2 -2
- abstra_statics/dist/assets/ExclamationCircleOutlined.f9a25080.js +2 -0
- abstra_statics/dist/assets/{Files.aba4c92b.js → Files.06a52abd.js} +2 -2
- abstra_statics/dist/assets/Form.4633ab8e.js +2 -0
- abstra_statics/dist/assets/{FormRunner.ce5ad4fd.js → FormRunner.2b75fd4d.js} +2 -2
- abstra_statics/dist/assets/{Home.ee572768.js → Home.a883da25.js} +2 -2
- abstra_statics/dist/assets/Home.d122da63.js +2 -0
- abstra_statics/dist/assets/{Live.c14662db.js → Live.08670b33.js} +2 -2
- abstra_statics/dist/assets/LoadingContainer.b11f052c.js +2 -0
- abstra_statics/dist/assets/LoadingOutlined.659d6aae.js +2 -0
- abstra_statics/dist/assets/{Login.2ef78ae0.js → Login.8491c4b7.js} +2 -2
- abstra_statics/dist/assets/Login.84d39327.js +2 -0
- abstra_statics/dist/assets/{Login.vue_vue_type_script_setup_true_lang.b006d8d3.js → Login.vue_vue_type_script_setup_true_lang.eb94ecc3.js} +2 -2
- abstra_statics/dist/assets/Logo.a32d36e7.js +2 -0
- abstra_statics/dist/assets/{Logs.072f55c6.js → Logs.030c8a19.js} +2 -2
- abstra_statics/dist/assets/{LogsController.395d93f5.js → LogsController.7e2c0c7a.js} +2 -2
- abstra_statics/dist/assets/Main.70db8614.js +2 -0
- abstra_statics/dist/assets/{MockForm.fdc58df0.js → MockForm.8b56fd25.js} +2 -2
- abstra_statics/dist/assets/{Navbar.7add3eb0.js → Navbar.6acd9007.js} +2 -2
- abstra_statics/dist/assets/NewEditor.15e29eac.js +8 -0
- abstra_statics/dist/assets/OidcLoginCallback.b65a6f9f.js +2 -0
- abstra_statics/dist/assets/OidcLogoutCallback.dabd09cf.js +2 -0
- abstra_statics/dist/assets/{OmniChat.de7b834a.js → OmniChat.6ed96f8e.js} +2 -2
- abstra_statics/dist/assets/{OnboardingView.51adcf60.js → OnboardingView.262e82cc.js} +2 -2
- abstra_statics/dist/assets/{Organization.e9e92d40.js → Organization.4f3ccb55.js} +2 -2
- abstra_statics/dist/assets/{Organizations.a6fb836d.js → Organizations.d90dd629.js} +2 -2
- abstra_statics/dist/assets/{PhArrowCounterClockwise.vue.a4f3391b.js → PhArrowCounterClockwise.vue.a1a917b9.js} +2 -2
- abstra_statics/dist/assets/{PhArrowSquareOut.vue.6554aa1c.js → PhArrowSquareOut.vue.eb4455ba.js} +2 -2
- abstra_statics/dist/assets/{PhBookBookmark.vue.c37eb773.js → PhBookBookmark.vue.7bb66888.js} +2 -2
- abstra_statics/dist/assets/{PhChats.vue.1d971c96.js → PhChats.vue.88d84608.js} +2 -2
- abstra_statics/dist/assets/{PhClockCounterClockwise.vue.f3d7a5f0.js → PhClockCounterClockwise.vue.02d85ea5.js} +2 -2
- abstra_statics/dist/assets/{PhCopy.vue.e433af1d.js → PhCopy.vue.5664181e.js} +2 -2
- abstra_statics/dist/assets/{PhCopySimple.vue.b8cedde5.js → PhCopySimple.vue.beb69d1f.js} +2 -2
- abstra_statics/dist/assets/{PhCube.vue.8321d975.js → PhCube.vue.8de1132a.js} +2 -2
- abstra_statics/dist/assets/{PhDotsThreeVertical.vue.377e8248.js → PhDotsThreeVertical.vue.9e306480.js} +2 -2
- abstra_statics/dist/assets/PhDownloadSimple.vue.6192bb0e.js +2 -0
- abstra_statics/dist/assets/{PhFolderPlus.vue.26f4fc08.js → PhFolderPlus.vue.658105d4.js} +2 -2
- abstra_statics/dist/assets/{PhGear.vue.bde6cc31.js → PhGear.vue.68bce043.js} +2 -2
- abstra_statics/dist/assets/{PhKey.vue.6aba158a.js → PhKey.vue.3f5192b6.js} +2 -2
- abstra_statics/dist/assets/{PhPencil.vue.55f0d005.js → PhPencil.vue.ee28fb6e.js} +2 -2
- abstra_statics/dist/assets/{PhPencilSimple.vue.82f128f3.js → PhPencilSimple.vue.148807f6.js} +2 -2
- abstra_statics/dist/assets/{PhPencilSimpleLine.vue.64631777.js → PhPencilSimpleLine.vue.af76e884.js} +2 -2
- abstra_statics/dist/assets/{PhRocket.vue.ff778122.js → PhRocket.vue.7ba12859.js} +2 -2
- abstra_statics/dist/assets/{PhSignOut.vue.8f5bfa41.js → PhSignOut.vue.aa78b6eb.js} +2 -2
- abstra_statics/dist/assets/{PhSparkle.vue.2d12a12f.js → PhSparkle.vue.7820be45.js} +2 -2
- abstra_statics/dist/assets/{PhUserList.vue.5cfe135b.js → PhUserList.vue.04f21cbe.js} +2 -2
- abstra_statics/dist/assets/{PhUsersThree.vue.ddb0f571.js → PhUsersThree.vue.8b11b97d.js} +2 -2
- abstra_statics/dist/assets/{PhWebhooksLogo.vue.f667599c.js → PhWebhooksLogo.vue.9e20d559.js} +2 -2
- abstra_statics/dist/assets/{PlayerConfigProvider.ef1e8f48.js → PlayerConfigProvider.0915b29f.js} +2 -2
- abstra_statics/dist/assets/{PlayerNavbar.ca2f19cb.js → PlayerNavbar.78cf73f2.js} +2 -2
- abstra_statics/dist/assets/{Project.4e2f44e3.js → Project.34c75b7c.js} +2 -2
- abstra_statics/dist/assets/{ProjectLogin.2d8bb827.js → ProjectLogin.9b8cb3d1.js} +2 -2
- abstra_statics/dist/assets/{ProjectSettings.952cec7a.js → ProjectSettings.f9bf9124.js} +2 -2
- abstra_statics/dist/assets/{ProjectsView.67e79ccf.js → ProjectsView.407ea382.js} +2 -2
- abstra_statics/dist/assets/{SaveButton.d14631e9.js → SaveButton.e70cd09e.js} +2 -2
- abstra_statics/dist/assets/{ScrollArea.vue_vue_type_script_setup_true_lang.49642b53.js → ScrollArea.vue_vue_type_script_setup_true_lang.cf352882.js} +2 -2
- abstra_statics/dist/assets/{Sidebar.964fcb1c.js → Sidebar.ce129494.js} +2 -2
- abstra_statics/dist/assets/{Sql.afd70c7f.js → Sql.4e31662a.js} +3 -3
- abstra_statics/dist/assets/Steps.4c850501.js +2 -0
- abstra_statics/dist/assets/{TableEditor.9584d010.js → TableEditor.e7371677.js} +2 -2
- abstra_statics/dist/assets/Tables.f2c23e20.js +2 -0
- abstra_statics/dist/assets/{TablesDiagram.e6ce884d.js → TablesDiagram.8297ec4b.js} +3 -3
- abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.ec94f9e7.js +2 -0
- abstra_statics/dist/assets/{Tasks.f57e239d.js → Tasks.c9ba3095.js} +2 -2
- abstra_statics/dist/assets/{UploadOutlined.68e6d0cf.js → UploadOutlined.c563b054.js} +2 -2
- abstra_statics/dist/assets/{View.f549262c.js → View.4c3c38ba.js} +2 -2
- abstra_statics/dist/assets/{View.vue_vue_type_script_setup_true_lang.8e0a328b.js → View.vue_vue_type_script_setup_true_lang.a00f21c8.js} +2 -2
- abstra_statics/dist/assets/{Watermark.37fe047e.js → Watermark.c71c105b.js} +2 -2
- abstra_statics/dist/assets/{WebEditor.8ff1601b.js → WebEditor.4ef39590.js} +2 -2
- abstra_statics/dist/assets/WidgetPreview.8bd406f7.js +2 -0
- abstra_statics/dist/assets/{ant-design.876f2f8d.js → ant-design.06b818ab.js} +2 -2
- abstra_statics/dist/assets/apiKey.e3aa9e16.js +2 -0
- abstra_statics/dist/assets/asyncComputed.bfb7341c.js +2 -0
- abstra_statics/dist/assets/{build.71b8e04b.js → build.aef51d48.js} +2 -2
- abstra_statics/dist/assets/colorHelpers.e94da383.js +2 -0
- abstra_statics/dist/assets/{console.6a1ae26d.js → console.86947afb.js} +4 -4
- abstra_statics/dist/assets/constants.b75d9567.js +2 -0
- abstra_statics/dist/assets/contracts.generated.7508e893.js +2 -0
- abstra_statics/dist/assets/{cssMode.6a4a4184.js → cssMode.0aa24dcd.js} +2 -2
- abstra_statics/dist/assets/{datetime.2d5b6900.js → datetime.46141396.js} +2 -2
- abstra_statics/dist/assets/dayjs.b4dc8227.js +2 -0
- abstra_statics/dist/assets/editor.4f4b7594.js +2 -0
- abstra_statics/dist/assets/editor.main.340c0a2d.js +2 -0
- abstra_statics/dist/assets/fetch.cfa094a0.js +2 -0
- abstra_statics/dist/assets/{folder.f5b64034.js → folder.fe6adcd2.js} +2 -2
- abstra_statics/dist/assets/{freemarker2.b87986e8.js → freemarker2.8bd96640.js} +2 -2
- abstra_statics/dist/assets/{handlebars.cc213cd7.js → handlebars.e5dd9b19.js} +2 -2
- abstra_statics/dist/assets/{html.77746bba.js → html.7bcef916.js} +2 -2
- abstra_statics/dist/assets/{htmlMode.db862c25.js → htmlMode.ce91c230.js} +2 -2
- abstra_statics/dist/assets/{index.ddb85c9b.js → index.005bab7f.js} +2 -2
- abstra_statics/dist/assets/index.06cad1f2.js +2 -0
- abstra_statics/dist/assets/{index.34fb5fc2.js → index.161ccee5.js} +2 -2
- abstra_statics/dist/assets/{index.045179c5.js → index.16664500.js} +5 -5
- abstra_statics/dist/assets/{index.d928bc3c.js → index.57a61691.js} +2 -2
- abstra_statics/dist/assets/{index.e6c377d2.js → index.a884598f.js} +2 -2
- abstra_statics/dist/assets/{index.3404e7dd.js → index.eb8f01b7.js} +2 -2
- abstra_statics/dist/assets/{index.00fb5b89.js → index.ee218f7a.js} +2 -2
- abstra_statics/dist/assets/{index.09f330ad.js → index.fe015dd3.js} +3 -3
- abstra_statics/dist/assets/{javascript.54e5f980.js → javascript.4d5c0a37.js} +3 -3
- abstra_statics/dist/assets/{jsonMode.fc4496f7.js → jsonMode.0942a255.js} +2 -2
- abstra_statics/dist/assets/{jwt-decode.esm.7fb8faf4.js → jwt-decode.esm.e1e8e181.js} +7 -7
- abstra_statics/dist/assets/{linters.910a9028.js → linters.39cc198f.js} +2 -2
- abstra_statics/dist/assets/{liquid.2595976e.js → liquid.884b015e.js} +3 -3
- abstra_statics/dist/assets/{member.4e942dca.js → member.af05829c.js} +2 -2
- abstra_statics/dist/assets/{metadata.bd2832f8.js → metadata.034775c8.js} +2 -2
- abstra_statics/dist/assets/{omniChatStore.83648f7c.js → omniChatStore.19fcae1a.js} +2 -2
- abstra_statics/dist/assets/{organization.0e5f192f.js → organization.a29009bc.js} +2 -2
- abstra_statics/dist/assets/player.b9e54e21.js +2 -0
- abstra_statics/dist/assets/{plotly.min.8ee43c36.js → plotly.min.df1e817c.js} +2 -2
- abstra_statics/dist/assets/{polling.41905ad0.js → polling.84bf96db.js} +2 -2
- abstra_statics/dist/assets/{project.47800fcd.js → project.a9ad86e9.js} +2 -2
- abstra_statics/dist/assets/{python.adb76dee.js → python.17c791bf.js} +3 -3
- abstra_statics/dist/assets/{razor.8c0f414a.js → razor.4b071c3b.js} +3 -3
- abstra_statics/dist/assets/{record.5fbe6782.js → record.06867f70.js} +2 -2
- abstra_statics/dist/assets/{redirect.0e6a5558.js → redirect.cd158e43.js} +2 -2
- abstra_statics/dist/assets/{repository.f466c79e.js → repository.40cf87c6.js} +2 -2
- abstra_statics/dist/assets/{repository.22769dca.js → repository.ecf19994.js} +2 -2
- abstra_statics/dist/assets/{router.643f183e.js → router.8ccbba96.js} +3 -3
- abstra_statics/dist/assets/router.c00c99d7.js +2 -0
- abstra_statics/dist/assets/string.ea3b2597.js +2 -0
- abstra_statics/dist/assets/{tables.736ccb3d.js → tables.928d4c4a.js} +2 -2
- abstra_statics/dist/assets/{tasksController.4a937a41.js → tasksController.95334db5.js} +2 -2
- abstra_statics/dist/assets/{toggleHighContrast.15446005.js → toggleHighContrast.67a76682.js} +49 -49
- abstra_statics/dist/assets/{tsMode.6e8249dd.js → tsMode.bd4befb2.js} +2 -2
- abstra_statics/dist/assets/{typescript.2c2237b9.js → typescript.b5722de7.js} +3 -3
- abstra_statics/dist/assets/url.62ce842c.js +2 -0
- abstra_statics/dist/assets/{useCodebaseEvents.28978c2b.js → useCodebaseEvents.47e4fcfe.js} +2 -2
- abstra_statics/dist/assets/userStore.51f1e2d0.js +2 -0
- abstra_statics/dist/assets/uuid.f4308f15.js +2 -0
- abstra_statics/dist/assets/{vue-flow-background.b301f87f.js → vue-flow-background.03bf6b4b.js} +2 -2
- abstra_statics/dist/assets/{vue-quill.esm-bundler.b4fd1194.js → vue-quill.esm-bundler.d6a7c536.js} +2 -2
- abstra_statics/dist/assets/{workspaceStore.de299d82.js → workspaceStore.cca10750.js} +2 -2
- abstra_statics/dist/assets/{xml.685038e1.js → xml.0a62ffce.js} +3 -3
- abstra_statics/dist/assets/{yaml.1a2cf10b.js → yaml.1efc213f.js} +3 -3
- abstra_statics/dist/console.html +15 -15
- abstra_statics/dist/editor.html +13 -13
- abstra_statics/dist/player.html +9 -9
- abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.23cf85ee.js +0 -2
- abstra_statics/dist/assets/App.46bd8dd6.js +0 -2
- abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.2264189c.js +0 -2
- abstra_statics/dist/assets/BaseLayout.77f1c4c9.js +0 -2
- abstra_statics/dist/assets/Billing.44a9d31b.js +0 -2
- abstra_statics/dist/assets/CloseCircleOutlined.3d4e81d4.js +0 -2
- abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.99b3af8f.js +0 -2
- abstra_statics/dist/assets/ContentLayout.866d5dde.js +0 -2
- abstra_statics/dist/assets/DocsButton.vue_vue_type_script_setup_true_lang.a3f96825.js +0 -2
- abstra_statics/dist/assets/EnvVars.afb25010.js +0 -2
- abstra_statics/dist/assets/ExclamationCircleOutlined.5510023c.js +0 -2
- abstra_statics/dist/assets/Form.ab1706e4.js +0 -2
- abstra_statics/dist/assets/Home.a001fbb0.js +0 -2
- abstra_statics/dist/assets/LoadingContainer.c883bb34.js +0 -2
- abstra_statics/dist/assets/LoadingOutlined.f4b4629a.js +0 -2
- abstra_statics/dist/assets/Login.efd0eb05.js +0 -2
- abstra_statics/dist/assets/Logo.648566b5.js +0 -2
- abstra_statics/dist/assets/Main.e6027f81.js +0 -2
- abstra_statics/dist/assets/NewEditor.6771ba53.js +0 -8
- abstra_statics/dist/assets/OidcLoginCallback.f56f78fc.js +0 -2
- abstra_statics/dist/assets/OidcLogoutCallback.437c4101.js +0 -2
- abstra_statics/dist/assets/PhDownloadSimple.vue.4c39fa52.js +0 -2
- abstra_statics/dist/assets/Steps.4482ff19.js +0 -2
- abstra_statics/dist/assets/Tables.ea01768b.js +0 -2
- abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.1a057f69.js +0 -2
- abstra_statics/dist/assets/WidgetPreview.bc7a6646.js +0 -2
- abstra_statics/dist/assets/apiKey.1d723817.js +0 -2
- abstra_statics/dist/assets/asyncComputed.7b34952b.js +0 -2
- abstra_statics/dist/assets/colorHelpers.5dd0cb4f.js +0 -2
- abstra_statics/dist/assets/constants.60cb557d.js +0 -2
- abstra_statics/dist/assets/contracts.generated.6e0d1816.js +0 -2
- abstra_statics/dist/assets/dayjs.0eae9c2d.js +0 -2
- abstra_statics/dist/assets/editor.776db77c.js +0 -2
- abstra_statics/dist/assets/editor.main.7f316986.js +0 -2
- abstra_statics/dist/assets/fetch.cbf466d2.js +0 -2
- abstra_statics/dist/assets/index.f04176ea.js +0 -2
- abstra_statics/dist/assets/player.5f97b741.js +0 -2
- abstra_statics/dist/assets/router.71aa46ba.js +0 -2
- abstra_statics/dist/assets/string.d8337a2b.js +0 -2
- abstra_statics/dist/assets/url.4e737b7f.js +0 -2
- abstra_statics/dist/assets/userStore.f3109854.js +0 -2
- abstra_statics/dist/assets/uuid.0f9d5a19.js +0 -2
- {abstra-3.23.10.dist-info → abstra-3.23.11.dist-info}/WHEEL +0 -0
- {abstra-3.23.10.dist-info → abstra-3.23.11.dist-info}/entry_points.txt +0 -0
- {abstra-3.23.10.dist-info → abstra-3.23.11.dist-info}/top_level.txt +0 -0
|
@@ -210,7 +210,12 @@ class AiSDKController:
|
|
|
210
210
|
|
|
211
211
|
return response["content"]
|
|
212
212
|
|
|
213
|
-
def parse_document(
|
|
213
|
+
def parse_document(
|
|
214
|
+
self, document_path: Union[pathlib.Path, str], model: str
|
|
215
|
+
) -> dict:
|
|
216
|
+
if isinstance(document_path, str):
|
|
217
|
+
document_path = pathlib.Path(document_path)
|
|
218
|
+
|
|
214
219
|
if document_path.suffix.lower() == ".pdf":
|
|
215
220
|
mime_type = "application/pdf"
|
|
216
221
|
elif document_path.suffix.lower() in [".jpeg", ".jpg"]:
|
|
@@ -2,8 +2,11 @@ from pathlib import Path
|
|
|
2
2
|
from typing import Dict, List, Optional, TypeVar, Union
|
|
3
3
|
|
|
4
4
|
from abstra_internals.contracts_generated import (
|
|
5
|
+
CloudApiCliModelsBankStatementResponse,
|
|
5
6
|
CloudApiCliModelsBoletoResponse,
|
|
7
|
+
CloudApiCliModelsNfeResponse,
|
|
6
8
|
CloudApiCliModelsNfseResponse,
|
|
9
|
+
CloudApiCliModelsUsDriverLicenseResponse,
|
|
7
10
|
)
|
|
8
11
|
from abstra_internals.controllers.sdk.sdk_ai import Format, Prompt
|
|
9
12
|
from abstra_internals.controllers.sdk.sdk_context import SDKContextStore
|
|
@@ -71,11 +74,11 @@ def prompt(
|
|
|
71
74
|
)
|
|
72
75
|
|
|
73
76
|
|
|
74
|
-
def parse_nfse(document_path: Path) -> CloudApiCliModelsNfseResponse:
|
|
77
|
+
def parse_nfse(document_path: Union[Path, str]) -> CloudApiCliModelsNfseResponse:
|
|
75
78
|
"""
|
|
76
79
|
Parse a Nota Fiscal de Serviço Eletrônica (NFSe) document.
|
|
77
80
|
Args:
|
|
78
|
-
document_path (Path): The path to the NFSe document to be parsed.
|
|
81
|
+
document_path (Union[Path, str]): The path to the NFSe document to be parsed.
|
|
79
82
|
Returns:
|
|
80
83
|
CloudApiCliModelsNfseResponse: The parsed NFSe response.
|
|
81
84
|
Raises:
|
|
@@ -85,11 +88,25 @@ def parse_nfse(document_path: Path) -> CloudApiCliModelsNfseResponse:
|
|
|
85
88
|
return CloudApiCliModelsNfseResponse.from_dict(data)
|
|
86
89
|
|
|
87
90
|
|
|
88
|
-
def
|
|
91
|
+
def parse_nfe(document_path: Union[Path, str]) -> CloudApiCliModelsNfeResponse:
|
|
92
|
+
"""
|
|
93
|
+
Parse a Nota Fiscal Eletrônica (NFe) document.
|
|
94
|
+
Args:
|
|
95
|
+
document_path (Union[Path, str]): The path to the NFe document to be parsed.
|
|
96
|
+
Returns:
|
|
97
|
+
CloudApiCliModelsNfeResponse: The parsed NFe response.
|
|
98
|
+
Raises:
|
|
99
|
+
ValueError: If the document path is invalid or the parsing fails.
|
|
100
|
+
"""
|
|
101
|
+
data = SDKContextStore.get_by_thread().ai_sdk.parse_document(document_path, "nfe")
|
|
102
|
+
return CloudApiCliModelsNfeResponse.from_dict(data)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def parse_boleto(document_path: Union[Path, str]) -> CloudApiCliModelsBoletoResponse:
|
|
89
106
|
"""
|
|
90
107
|
Parse a Boleto document.
|
|
91
108
|
Args:
|
|
92
|
-
document_path (Path): The path to the Boleto document to be parsed.
|
|
109
|
+
document_path (Union[Path, str]): The path to the Boleto document to be parsed.
|
|
93
110
|
Returns:
|
|
94
111
|
dict: The parsed Boleto data.
|
|
95
112
|
Raises:
|
|
@@ -99,3 +116,41 @@ def parse_boleto(document_path: Path) -> CloudApiCliModelsBoletoResponse:
|
|
|
99
116
|
document_path, "boleto"
|
|
100
117
|
)
|
|
101
118
|
return CloudApiCliModelsBoletoResponse.from_dict(data)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def parse_us_driver_license(
|
|
122
|
+
document_path: Union[Path, str],
|
|
123
|
+
) -> CloudApiCliModelsUsDriverLicenseResponse:
|
|
124
|
+
"""
|
|
125
|
+
Parse a US Driver License document.
|
|
126
|
+
Args:
|
|
127
|
+
document_path (Union[Path, str]): The path to the Driver License document to be parsed.
|
|
128
|
+
Returns:
|
|
129
|
+
dict: The parsed Driver License data.
|
|
130
|
+
Raises:
|
|
131
|
+
ValueError: If the document path is invalid or the parsing fails.
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
data = SDKContextStore.get_by_thread().ai_sdk.parse_document(
|
|
135
|
+
document_path, "us-driver-license"
|
|
136
|
+
)
|
|
137
|
+
return CloudApiCliModelsUsDriverLicenseResponse.from_dict(data)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def parse_bank_statement(
|
|
141
|
+
document_path: Union[Path, str],
|
|
142
|
+
) -> CloudApiCliModelsBankStatementResponse:
|
|
143
|
+
"""
|
|
144
|
+
Parse a Bank Statement document.
|
|
145
|
+
Args:
|
|
146
|
+
document_path (Union[Path, str]): The path to the Bank Statement document to be parsed.
|
|
147
|
+
Returns:
|
|
148
|
+
dict: The parsed Bank Statement data.
|
|
149
|
+
Raises:
|
|
150
|
+
ValueError: If the document path is invalid or the parsing fails.
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
data = SDKContextStore.get_by_thread().ai_sdk.parse_document(
|
|
154
|
+
document_path, "bank-statement"
|
|
155
|
+
)
|
|
156
|
+
return CloudApiCliModelsBankStatementResponse.from_dict(data)
|
|
@@ -8,7 +8,6 @@ from typing import Any, Dict, List, Literal, Optional, TypedDict
|
|
|
8
8
|
from abstra_internals.cloud_api.http_client import HTTPClient
|
|
9
9
|
from abstra_internals.consts.filepaths import LOCAL_LOGS_DIR_PATH
|
|
10
10
|
from abstra_internals.logger import AbstraLogger
|
|
11
|
-
from abstra_internals.repositories.serializer import SerializationHelper
|
|
12
11
|
from abstra_internals.utils import serialize
|
|
13
12
|
from abstra_internals.utils.datetime import from_utc_iso_string, to_utc_iso_string
|
|
14
13
|
|
|
@@ -136,18 +135,9 @@ class ProductionExecutionLogsRepository(ExecutionLogsRepository):
|
|
|
136
135
|
self.sequence = 0
|
|
137
136
|
self.client = client
|
|
138
137
|
|
|
139
|
-
def save(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
dto = {
|
|
143
|
-
**log_entry.to_dto(),
|
|
144
|
-
"payload": validated_payload,
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
self.client.async_post(
|
|
148
|
-
endpoint=f"/executions/{log_entry.execution_id}/logs",
|
|
149
|
-
json=dto,
|
|
150
|
-
)
|
|
138
|
+
def save(
|
|
139
|
+
self, log_entry: LogEntry
|
|
140
|
+
) -> None: ... # No-op in production, as logs are saved directly by the cluster.
|
|
151
141
|
|
|
152
142
|
def get(
|
|
153
143
|
self,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as
|
|
2
|
-
//# sourceMappingURL=AbstraButton.vue_vue_type_script_setup_true_lang.
|
|
1
|
+
import{d as f,c as g,o as r,a as d,b as a,f as l,u as n,de as i,a7 as p,h as u,ez as c,eA as b,bR as y,aV as m,e6 as _}from"./jwt-decode.esm.e1e8e181.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="276a0532-366e-4e4d-9258-c52418ecc828",t._sentryDebugIdIdentifier="sentry-dbid-276a0532-366e-4e4d-9258-c52418ecc828")}catch{}})();const h=f({__name:"AbstraButton",props:{disabledTooltip:{},tooltip:{},prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(t){const e=t,s=g(()=>e.disabledTooltip&&e.disabled?e.disabledTooltip:e.tooltip);return(o,k)=>s.value?(r(),d(n(m),{key:0,title:s.value},{default:a(()=>[l(n(y),c(b(o.$props)),{default:a(()=>[l(n(i),{style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},{default:a(()=>[o.loading?u("",!0):p(o.$slots,"default",{key:0})]),_:3})]),_:3},16)]),_:3},8,["title"])):(r(),d(n(y),c(_({key:1},o.$props)),{default:a(()=>[l(n(i),{style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},{default:a(()=>[o.loading?u("",!0):p(o.$slots,"default",{key:0})]),_:3})]),_:3},16))}});export{h as _};
|
|
2
|
+
//# sourceMappingURL=AbstraButton.vue_vue_type_script_setup_true_lang.3fce0fbb.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L as t}from"./Logo.a32d36e7.js";import{d as n,o as r,a as d,u as i}from"./jwt-decode.esm.e1e8e181.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="b49e1866-caa5-4393-a6be-71005d2a7bea",e._sentryDebugIdIdentifier="sentry-dbid-b49e1866-caa5-4393-a6be-71005d2a7bea")}catch{}})();const b="/assets/logo.0faadfa2.svg",u=n({__name:"AbstraLogo",props:{hideText:{type:Boolean},size:{}},setup(e){return(a,o)=>{var s;return r(),d(t,{"image-url":i(b),"brand-name":"Abstra","hide-text":a.hideText,size:(s=a.size)!=null?s:"small"},null,8,["image-url","hide-text","size"])}}});export{u as _};
|
|
2
|
+
//# sourceMappingURL=AbstraLogo.vue_vue_type_script_setup_true_lang.4fb1f88a.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as w}from"./CrudView.
|
|
2
|
-
//# sourceMappingURL=ApiKeys.
|
|
1
|
+
import{C as w}from"./CrudView.79588134.js";import{d as _,r as k,eb as x,c as v,a5 as C,f as l,u as i,b as d,aR as P,o as h,d9 as D,g as y,da as M,ed as j,M as N,ee as K,eq as T}from"./jwt-decode.esm.e1e8e181.js";import{a as V}from"./asyncComputed.bfb7341c.js";import{A as c}from"./apiKey.e3aa9e16.js";import"./router.8ccbba96.js";import{M as B}from"./member.af05829c.js";import{a as E}from"./project.a9ad86e9.js";import"./tables.928d4c4a.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.6566ff97.js";import"./constants.b75d9567.js";import"./url.62ce842c.js";import"./PhDotsThreeVertical.vue.9e306480.js";import"./index.eb8f01b7.js";import"./index.57a61691.js";import"./record.06867f70.js";import"./string.ea3b2597.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="60bcba13-0f7a-4321-85b0-cf608d060fbb",n._sentryDebugIdIdentifier="sentry-dbid-60bcba13-0f7a-4321-85b0-cf608d060fbb")}catch{}})();const ee=_({__name:"ApiKeys",setup(n){const o=k(null),p=[{key:"name",label:"API key name"}],s=x().params.projectId,f=new B,{loading:b,result:g,refetch:u}=V(async()=>Promise.all([c.list(s),E.get(s).then(e=>f.list(e.organizationId))]).then(([e,t])=>e.map(a=>({apiKey:a,member:t.find(r=>r.authorId===a.ownerId)})))),I=async e=>{const t=await c.create({projectId:s,name:e.name});u(),o.value=t.value},A=v(()=>{var e,t;return{columns:[{title:"Name"},{title:"Creation date"},{title:"Owner"},{title:"",align:"right"}],rows:(t=(e=g.value)==null?void 0:e.map(({apiKey:a,member:r})=>{var m;return{key:a.id,cells:[{type:"text",text:a.name},{type:"text",text:K(a.createdAt)},{type:"text",text:(m=r==null?void 0:r.email)!=null?m:"Unknown"},{type:"actions",actions:[{label:"Delete",icon:T,dangerous:!0,onClick:async()=>{await c.delete(s,a.id),u()}}]}]}}))!=null?t:[]}});return(e,t)=>(h(),C(P,null,[l(w,{"entity-name":"API key","create-button-text":"Create API Key",loading:i(b),title:"API Keys",description:"API Keys are used to deploy your project from the local editor.","empty-title":"No API keys here yet",table:A.value,fields:p,create:I},null,8,["loading","table"]),l(i(N),{open:!!o.value,title:"Api key generated",onCancel:t[0]||(t[0]=a=>o.value=null)},{footer:d(()=>[]),default:d(()=>[l(i(D),null,{default:d(()=>[y("Your API key was successfully generated. Use this code to login on your local development environment or deploy using CI")]),_:1}),l(i(M),{code:"",copyable:""},{default:d(()=>[y(j(o.value),1)]),_:1})]),_:1},8,["open"])],64))}});export{ee as default};
|
|
2
|
+
//# sourceMappingURL=ApiKeys.56b97ced.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./App.vue_vue_type_style_index_0_lang.79524273.js";import{_ as u}from"./App.vue_vue_type_style_index_0_lang.79524273.js";import"./userStore.51f1e2d0.js";import"./jwt-decode.esm.e1e8e181.js";import"./PlayerConfigProvider.0915b29f.js";import"./colorHelpers.e94da383.js";import"./workspaceStore.cca10750.js";import"./url.62ce842c.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="531daa7e-75e8-413a-9ca0-6bfd04d01a22",e._sentryDebugIdIdentifier="sentry-dbid-531daa7e-75e8-413a-9ca0-6bfd04d01a22")}catch{}})();export{u as default};
|
|
2
|
+
//# sourceMappingURL=App.bd5ec032.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as r}from"./userStore.51f1e2d0.js";import{W as n}from"./PlayerConfigProvider.0915b29f.js";import{u as c}from"./workspaceStore.cca10750.js";import{d,w as f,i,u as o,a as p,b as u,h as l,o as m,f as _}from"./jwt-decode.esm.e1e8e181.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="ff27d27a-fde7-4da9-84cf-4392dd870967",t._sentryDebugIdIdentifier="sentry-dbid-ff27d27a-fde7-4da9-84cf-4392dd870967")}catch{}})();const v=d({__name:"App",setup(t){const a=r(),e=c();return e.actions.fetch(),f(()=>a.jwt,e.actions.fetch),(w,y)=>{const s=i("RouterView");return o(e).state.workspace?(m(),p(n,{key:0,"main-color":o(e).state.workspace.mainColor,background:o(e).state.workspace.theme,"font-family":o(e).state.workspace.fontFamily,locale:o(e).state.workspace.language},{default:u(()=>[_(s,{style:{height:"100vh",width:"100%"}})]),_:1},8,["main-color","background","font-family","locale"])):l("",!0)}}});export{v as _};
|
|
2
|
+
//# sourceMappingURL=App.vue_vue_type_style_index_0_lang.79524273.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as c,o,a5 as n,a7 as s,e as d,h as a}from"./jwt-decode.esm.e1e8e181.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0723a7cc-ec0a-4f5f-9b1d-cd4f4baa7530",e._sentryDebugIdIdentifier="sentry-dbid-0723a7cc-ec0a-4f5f-9b1d-cd4f4baa7530")}catch{}})();const r={},i={class:"base-layout"},f={class:"base-middle"},_={class:"content"},l={class:"left"},u={key:0,class:"base-footer"},b={key:0};function y(e,t){return o(),n("div",i,[s(e.$slots,"sidebar",{},void 0,!0),d("section",f,[s(e.$slots,"navbar",{},void 0,!0),d("section",_,[d("section",l,[s(e.$slots,"content",{},void 0,!0),e.$slots.footer?(o(),n("section",u,[s(e.$slots,"footer",{},void 0,!0)])):a("",!0)]),e.$slots.chat?(o(),n("section",b,[s(e.$slots,"chat",{},void 0,!0)])):a("",!0)])])])}const g=c(r,[["render",y],["__scopeId","data-v-da85ecdc"]]);export{g as B};
|
|
2
|
+
//# sourceMappingURL=BaseLayout.ac22ef55.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as _}from"./asyncComputed.bfb7341c.js";import{d as b,eb as w,J as h,u as e,a as d,a5 as k,f as o,b as t,h as I,o as n,A as g,g as c,ed as C,bR as x,de as l,e as N}from"./jwt-decode.esm.e1e8e181.js";import{l as f,c as v}from"./router.8ccbba96.js";import{a as z}from"./organization.a29009bc.js";import"./tables.928d4c4a.js";import{L as B}from"./LoadingContainer.b11f052c.js";import"./index.57a61691.js";import"./record.06867f70.js";import"./string.ea3b2597.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="52dccc19-c49b-4b38-b457-78879bde5e96",a._sentryDebugIdIdentifier="sentry-dbid-52dccc19-c49b-4b38-b457-78879bde5e96")}catch{}})();const D={key:1},U=["src"],J=b({__name:"Billing",setup(a){const u=w().params.organizationId,{loading:m,result:r}=_(async()=>{const i=await z.get(u),p=await i.getUsageReportUrl();return{organization:i,reportUrl:p}});h(()=>{location.search.includes("upgrade")&&f.showNewMessage("I want to upgrade my plan")});const y=()=>f.showNewMessage("I want to upgrade my plan");return(i,p)=>e(m)?(n(),d(B,{key:0})):e(r)?(n(),k("div",D,[o(e(l),{justify:"space-between",align:"center"},{default:t(()=>[o(e(g),{level:3},{default:t(()=>[c("Current plan: "+C(e(r).organization.coalescedPlan),1)]),_:1}),o(e(x),{type:"primary",onClick:y},{default:t(()=>[c("Upgrade")]),_:1})]),_:1}),o(e(v),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(n(),d(e(l),{key:0,align:"center",justify:"center"},{default:t(()=>[N("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,U)]),_:1})):(n(),d(e(l),{key:1,align:"center",justify:"center"},{default:t(()=>[o(e(g),{level:4},{default:t(()=>[c("No usage report available")]),_:1})]),_:1}))])):I("",!0)}});export{J as default};
|
|
2
|
+
//# sourceMappingURL=Billing.2c39d133.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{d as O,ag as w,bT as I,f as c,aj as f,av as R,as as A,e4 as D,bn as P,bP as j,ab as X,ac as z,X as B,an as M,dX as E,aD as N,az as H,ce as L,bx as F}from"./jwt-decode.esm.
|
|
1
|
+
import{d as O,ag as w,bT as I,f as c,aj as f,av as R,as as A,e4 as D,bn as P,bP as j,ab as X,ac as z,X as B,an as M,dX as E,aD as N,az as H,ce as L,bx as F}from"./jwt-decode.esm.e1e8e181.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="ed7177db-2517-44e7-b9df-afab35035f78",r._sentryDebugIdIdentifier="sentry-dbid-ed7177db-2517-44e7-b9df-afab35035f78")}catch{}})();var U=globalThis&&globalThis.__rest||function(r,e){var a={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(a[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(r);t<n.length;t++)e.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(r,n[t])&&(a[n[t]]=r[n[t]]);return a};const V=()=>({prefixCls:String,href:String,separator:R.any,dropdownProps:A(),overlay:R.any,onClick:D()}),K=O({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:V(),slots:Object,setup(r,e){let{slots:a,attrs:n,emit:t}=e;const{prefixCls:u}=w("breadcrumb",r),y=(d,h)=>{const b=I(a,r,"overlay");return b?c(j,f(f({},r.dropdownProps),{},{overlay:b,placement:"bottom"}),{default:()=>[c("span",{class:`${h}-overlay-link`},[d,c(P,null,null)])]}):d},_=d=>{t("click",d)};return()=>{var d;const h=(d=I(a,r,"separator"))!==null&&d!==void 0?d:"/",b=I(a,r),{class:l,style:s}=n,o=U(n,["class","style"]);let i;return r.href!==void 0?i=c("a",f({class:`${u.value}-link`,onClick:_},o),[b]):i=c("span",f({class:`${u.value}-link`,onClick:_},o),[b]),i=y(i,u.value),b!=null?c("li",{class:l,style:s},[i,h&&c("span",{class:`${u.value}-separator`},[h])]):null}}}),W=r=>{const{componentCls:e,iconCls:a}=r;return{[e]:B(B({},M(r)),{color:r.breadcrumbBaseColor,fontSize:r.breadcrumbFontSize,[a]:{fontSize:r.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:B({color:r.breadcrumbLinkColor,transition:`color ${r.motionDurationMid}`,padding:`0 ${r.paddingXXS}px`,borderRadius:r.borderRadiusSM,height:r.lineHeight*r.fontSize,display:"inline-block",marginInline:-r.marginXXS,"&:hover":{color:r.breadcrumbLinkColorHover,backgroundColor:r.colorBgTextHover}},E(r)),["li:last-child"]:{color:r.breadcrumbLastItemColor,[`& > ${e}-separator`]:{display:"none"}},[`${e}-separator`]:{marginInline:r.breadcrumbSeparatorMargin,color:r.breadcrumbSeparatorColor},[`${e}-link`]:{[`
|
|
2
2
|
> ${a} + span,
|
|
3
3
|
> ${a} + a
|
|
4
4
|
`]:{marginInlineStart:r.marginXXS}},[`${e}-overlay-link`]:{borderRadius:r.borderRadiusSM,height:r.lineHeight*r.fontSize,display:"inline-block",padding:`0 ${r.paddingXXS}px`,marginInline:-r.marginXXS,[`> ${a}`]:{marginInlineStart:r.marginXXS,fontSize:r.fontSizeIcon},"&:hover":{color:r.breadcrumbLinkColorHover,backgroundColor:r.colorBgTextHover,a:{color:r.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${r.componentCls}-rtl`]:{direction:"rtl"}})}},q=X("Breadcrumb",r=>{const e=z(r,{breadcrumbBaseColor:r.colorTextDescription,breadcrumbFontSize:r.fontSize,breadcrumbIconFontSize:r.fontSize,breadcrumbLinkColor:r.colorTextDescription,breadcrumbLinkColorHover:r.colorText,breadcrumbLastItemColor:r.colorText,breadcrumbSeparatorMargin:r.marginXS,breadcrumbSeparatorColor:r.colorTextDescription});return[W(e)]}),G=()=>({prefixCls:String,routes:{type:Array},params:R.any,separator:R.any,itemRender:{type:Function}});function J(r,e){if(!r.breadcrumbName)return null;const a=Object.keys(e).join("|");return r.breadcrumbName.replace(new RegExp(`:(${a})`,"g"),(t,u)=>e[u]||t)}function $(r){const{route:e,params:a,routes:n,paths:t}=r,u=n.indexOf(e)===n.length-1,y=J(e,a);return u?c("span",null,[y]):c("a",{href:`#/${t.join("/")}`},[y])}const Y=O({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:G(),slots:Object,setup(r,e){let{slots:a,attrs:n}=e;const{prefixCls:t,direction:u}=w("breadcrumb",r),[y,_]=q(t),d=(l,s)=>(l=(l||"").replace(/^\//,""),Object.keys(s).forEach(o=>{l=l.replace(`:${o}`,s[o])}),l),h=(l,s,o)=>{const i=[...l],m=d(s||"",o);return m&&i.push(m),i},b=l=>{let{routes:s=[],params:o={},separator:i,itemRender:m=$}=l;const S=[];return s.map(p=>{const C=d(p.path,o);C&&S.push(C);const g=[...S];let v=null;p.children&&p.children.length&&(v=c(F,{items:p.children.map(x=>({key:x.path||x.breadcrumbName,label:m({route:x,params:o,routes:s,paths:h(g,x.path,o)})}))},null));const T={separator:i};return v&&(T.overlay=v),c(K,f(f({},T),{},{key:C||p.breadcrumbName}),{default:()=>[m({route:p,params:o,routes:s,paths:g})]})})};return()=>{var l;let s;const{routes:o,params:i={}}=r,m=N(I(a,r)),S=(l=I(a,r,"separator"))!==null&&l!==void 0?l:"/",p=r.itemRender||a.itemRender||$;o&&o.length>0?s=b({routes:o,params:i,separator:S,itemRender:p}):m.length&&(s=m.map((g,v)=>(H(typeof g.type=="object"&&(g.type.__ANT_BREADCRUMB_ITEM||g.type.__ANT_BREADCRUMB_SEPARATOR)),L(g,{separator:S,key:v}))));const C={[t.value]:!0,[`${t.value}-rtl`]:u.value==="rtl",[`${n.class}`]:!!n.class,[_.value]:!0};return y(c("nav",f(f({},n),{},{class:C}),[c("ol",null,[s])]))}}});export{K as A,Y as B};
|
|
5
|
-
//# sourceMappingURL=Breadcrumb.
|
|
5
|
+
//# sourceMappingURL=Breadcrumb.f11a16d0.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as H}from"./CrudView.d06da8d4.js";import{d as $,am as P,c as x,o as c,a5 as v,a7 as q,h as _,e6 as U,e as C,f as u,e7 as z,f1 as J,e5 as Q,a as f,b as i,u as r,bP as W,bx as Y,bw as X,da as k,g as y,ed as b,cx as K,eb as ee,J as te,I as re,r as ae,aR as le,aV as ne,cN as oe,d9 as ie,a6 as se,d4 as ue,S as ce,M as de,ee as pe,_ as fe}from"./jwt-decode.esm.7fb8faf4.js";import{a as L}from"./asyncComputed.7b34952b.js";import{g as me}from"./datetime.2d5b6900.js";import{u as ge}from"./polling.41905ad0.js";import{G as ye}from"./PhArrowCounterClockwise.vue.a4f3391b.js";import{H as be}from"./PhCube.vue.8321d975.js";import{G as he}from"./PhDownloadSimple.vue.4c39fa52.js";import{e as ve,d as _e,r as ke}from"./router.643f183e.js";import{a as Ce,B as Ae}from"./build.71b8e04b.js";import{a as Oe}from"./project.47800fcd.js";import"./tables.736ccb3d.js";import{G as we}from"./PhClockCounterClockwise.vue.f3d7a5f0.js";import{F as xe,G as Se,I as Pe}from"./PhUserList.vue.5cfe135b.js";import{G as Ze}from"./PhWebhooksLogo.vue.f667599c.js";import{A as Z}from"./index.3404e7dd.js";import{E as Me}from"./ExclamationCircleOutlined.5510023c.js";import{C as Ie}from"./CloseCircleOutlined.3d4e81d4.js";import{L as j}from"./LoadingOutlined.f4b4629a.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.a3f96825.js";import"./constants.60cb557d.js";import"./url.4e737b7f.js";import"./PhDotsThreeVertical.vue.377e8248.js";import"./index.d928bc3c.js";import"./record.5fbe6782.js";import"./string.d8337a2b.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[e]="bda48949-b0ec-4aef-9648-471c29eeed35",l._sentryDebugIdIdentifier="sentry-dbid-bda48949-b0ec-4aef-9648-471c29eeed35")}catch{}})();var je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const $e=je;var ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"};const De=ze,Be=["width","height","fill","transform"],Ve={key:0},Ne=C("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-16-84a16,16,0,1,1-16-16A16,16,0,0,1,112,128Zm64,0a16,16,0,1,1-16-16A16,16,0,0,1,176,128Z"},null,-1),Le=[Ne],Ee={key:1},Ge=C("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"},null,-1),Te=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm56-88a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Fe=[Ge,Te],Re={key:2},He=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"},null,-1),qe=[He],Ue={key:3},Je=C("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm10-90a10,10,0,1,1-10-10A10,10,0,0,1,138,128Zm-44,0a10,10,0,1,1-10-10A10,10,0,0,1,94,128Zm88,0a10,10,0,1,1-10-10A10,10,0,0,1,182,128Z"},null,-1),Qe=[Je],We={key:4},Ye=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm44,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-88,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Xe=[Ye],Ke={key:5},et=C("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm8-92a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-44,0a8,8,0,1,1-8-8A8,8,0,0,1,92,128Zm88,0a8,8,0,1,1-8-8A8,8,0,0,1,180,128Z"},null,-1),tt=[et],rt={name:"PhDotsThreeCircle"},at=$({...rt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(l){const e=l,a=P("weight","regular"),d=P("size","1em"),s=P("color","currentColor"),S=P("mirrored",!1),p=x(()=>{var m;return(m=e.weight)!=null?m:a}),w=x(()=>{var m;return(m=e.size)!=null?m:d}),h=x(()=>{var m;return(m=e.color)!=null?m:s}),A=x(()=>e.mirrored!==void 0?e.mirrored?"scale(-1, 1)":void 0:S?"scale(-1, 1)":void 0);return(m,M)=>(c(),v("svg",U({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:w.value,height:w.value,fill:h.value,transform:A.value},m.$attrs),[q(m.$slots,"default"),p.value==="bold"?(c(),v("g",Ve,Le)):p.value==="duotone"?(c(),v("g",Ee,Fe)):p.value==="fill"?(c(),v("g",Re,qe)):p.value==="light"?(c(),v("g",Ue,Qe)):p.value==="regular"?(c(),v("g",We,Xe)):p.value==="thin"?(c(),v("g",Ke,tt)):_("",!0)],16,Be))}});function E(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){lt(l,s,a[s])})}return l}function lt(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var D=function(e,a){var d=E({},e,a.attrs);return u(z,E({},d,{icon:J}),null)};D.displayName="CheckCircleOutlined";D.inheritAttrs=!1;const nt=D;function G(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){ot(l,s,a[s])})}return l}function ot(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var B=function(e,a){var d=G({},e,a.attrs);return u(z,G({},d,{icon:$e}),null)};B.displayName="MinusCircleOutlined";B.inheritAttrs=!1;const it=B;function T(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){st(l,s,a[s])})}return l}function st(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var V=function(e,a){var d=T({},e,a.attrs);return u(z,T({},d,{icon:De}),null)};V.displayName="PauseCircleOutlined";V.inheritAttrs=!1;const ut=V,ct={style:{display:"flex","align-items":"center",gap:"5px"}},dt={key:1},pt=$({__name:"BuildInspector",props:{buildSpec:{}},setup(l){const e=l,a=Q(),d=s=>{a.push({name:"logs",params:{projectId:e.buildSpec.projectId},query:s.logQuery})};return(s,S)=>s.buildSpec.runtimes.length>0?(c(),f(r(_e),{key:0,"item-layout":"horizontal","data-source":s.buildSpec.runtimes},{renderItem:i(({item:p})=>[u(r(ve),null,{actions:i(()=>[u(r(W),null,{overlay:i(()=>[u(r(Y),null,{default:i(()=>[u(r(X),{onClick:w=>d(p)},{default:i(()=>[C("div",ct,[u(r(we)),u(r(k),null,{default:i(()=>[y(" View Logs")]),_:1})])]),_:2},1032,["onClick"])]),_:2},1024)]),default:i(()=>[u(r(at),{style:{cursor:"pointer"}})]),_:2},1024)]),default:i(()=>[p.type=="form"?(c(),f(r(Z),{key:0,size:"large"},{default:i(()=>[u(r(xe)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y("/"+b(p.path),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="job"?(c(),f(r(Z),{key:1,size:"large"},{default:i(()=>[u(r(Se)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y(b(p.schedule),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="hook"?(c(),f(r(Z),{key:2,size:"large"},{default:i(()=>[u(r(Ze)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y("/_hooks/"+b(p.path),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="script"?(c(),f(r(Z),{key:3,size:"large"},{default:i(()=>[u(r(Pe)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024)]),_:2},1024)):_("",!0)]),_:2},1024)]),_:1},8,["data-source"])):(c(),v("div",dt,[u(r(K),{description:"No runtimes found. Make sure your project has forms, hooks or jobs before deploying it"})]))}}),ft=$({__name:"Builds",setup(l){const a=ee().params.projectId,{loading:d,result:s,refetch:S}=L(async()=>{const[t,o]=await Promise.all([Ce.list(a),Oe.getStatus(a)]);return{b:t.map(g=>({build:g,status:o.filter(O=>O.buildId==g.id).map(O=>O.status)})),status:o}}),{startPolling:p,endPolling:w}=ge({task:S,interval:1e4});te(()=>p()),re(()=>w());const h=ae(null),A=L(async()=>h.value?await Ae.get(h.value):null),m=()=>{var n;const t=(n=s.value)==null?void 0:n.b.find(g=>g.build.id===h.value);return`Version ${t==null?void 0:t.build.id.slice(0,8)} - ${t==null?void 0:t.build.createdAt.toLocaleString()}`},M=[{text:"Deploying",tagColor:"blue",check:t=>{var o,n;return(n=t.build.latest&&t.status.some(g=>g=="Running")&&((o=s.value)==null?void 0:o.status.some(g=>g.buildId!==t.build.id)))!=null?n:!1},loading:!0},{text:"Deactivating",tagColor:"orange",check:t=>t.build.status==="success"&&!t.build.latest&&t.status.some(o=>o=="Running"),loading:!0},{text:"Live",tagColor:"green",check:t=>t.build.latest&&t.status.some(o=>o=="Running")},{text:"Sleeping",tagColor:"cyan",check:t=>t.build.latest&&t.status.length===0},{text:"Failed",tagColor:"red",check:t=>t.build.latest&&t.status.some(o=>o=="Failed")},{text:"Inactive",tagColor:"default",check:t=>t.build.status==="success"},{text:"Aborted",tagColor:"default",check:t=>t.build.status==="aborted"||t.build.status==="aborted-by-user"},{text:"Failed",tagColor:"orange",check:t=>t.build.status==="failure"},{text:"Deploying",tagColor:"blue",check:t=>t.build.status==="in-progress",loading:!0},{text:"Uploading",tagColor:"yellow",check:t=>t.build.status==="pending"}];function F(t){var o,n,g,O,N;return{text:(n=(o=M.find(I=>I.check(t)))==null?void 0:o.text)!=null?n:"unknown",tagColor:(O=(g=M.find(I=>I.check(t)))==null?void 0:g.tagColor)!=null?O:"default",hover:(N=t.build.log)!=null?N:void 0}}const R=x(()=>{const t=[{title:"Id"},{title:"Date"},{title:"Abstra Version"},{title:"Status"},{title:"",align:"right"}];return s.value?{columns:t,rows:s.value.b.map(o=>{var n;return{key:o.build.id,cells:[{type:"text",text:o.build.id.slice(0,8)},{key:"date",type:"slot",payload:{date:me(o.build.createdAt,{weekday:void 0}),distance:pe(o.build.createdAt)}},{type:"text",text:(n=o.build.abstraVersion)!=null?n:"-"},{key:"status",type:"slot",payload:F(o)},{type:"actions",actions:[{icon:be,label:"Inspect version",onClick:async()=>{h.value=o.build.id,A.refetch()}},{icon:ye,label:"View application logs",onClick:()=>{ke.push({name:"logs",params:{projectId:a},query:{buildId:o.build.id}})}},{icon:he,label:"Download files",onClick:()=>o.build.download()}]}]}})}:{columns:t,rows:[]}});return(t,o)=>(c(),v(le,null,[u(H,{"entity-name":"build",loading:r(d),title:"Version History",description:"You can create a new version by publishing your project from the local editor.","empty-title":"No versions here yet",table:R.value,live:""},{date:i(({payload:n})=>[u(r(ne),null,{title:i(()=>[y(b(n.distance),1)]),default:i(()=>[y(b(n.date)+" ",1)]),_:2},1024)]),status:i(({payload:n})=>[u(r(oe),{open:n.hover?void 0:!1},{content:i(()=>[u(r(ie),{style:{width:"300px",overflow:"auto","font-family":"monospace"},content:n.hover,copyable:""},null,8,["content"])]),default:i(()=>[n.text!=="unknown"?(c(),f(r(ue),{key:0,color:n.tagColor,style:se({cursor:n.hover?"pointer":"default"})},{default:i(()=>[n.text==="Live"?(c(),f(r(nt),{key:0})):n.text==="Inactive"?(c(),f(r(it),{key:1})):n.text==="Failed"?(c(),f(r(Me),{key:2})):n.text==="Aborted"?(c(),f(r(Ie),{key:3})):n.text==="Sleeping"?(c(),f(r(ut),{key:4})):n.text==="Uploading"?(c(),f(r(j),{key:5})):n.text==="Deploying"?(c(),f(r(j),{key:6})):n.text==="Deactivating"?(c(),f(r(j),{key:7})):_("",!0),y(" "+b(n.text),1)]),_:2},1032,["color","style"])):_("",!0)]),_:2},1032,["open"])]),_:1},8,["loading","table"]),h.value?(c(),f(r(de),{key:0,footer:null,open:!!h.value,size:"large",width:"80%",title:m(),onCancel:o[0]||(o[0]=n=>h.value=null)},{default:i(()=>[!r(A).result.value||r(A).loading.value?(c(),f(r(ce),{key:0})):r(A).result.value?(c(),f(pt,{key:1,"build-spec":r(A).result.value},null,8,["build-spec"])):_("",!0)]),_:1},8,["open","title"])):_("",!0)],64))}});const Et=fe(ft,[["__scopeId","data-v-9615f578"]]);export{Et as default};
|
|
2
|
-
//# sourceMappingURL=Builds.
|
|
1
|
+
import{C as H}from"./CrudView.79588134.js";import{d as $,am as P,c as x,o as c,a5 as v,a7 as q,h as _,e6 as U,e as C,f as u,e7 as z,f1 as J,e5 as Q,a as f,b as i,u as r,bP as W,bx as Y,bw as X,da as k,g as y,ed as b,cx as K,eb as ee,J as te,I as re,r as ae,aR as le,aV as ne,cN as oe,d9 as ie,a6 as se,d4 as ue,S as ce,M as de,ee as pe,_ as fe}from"./jwt-decode.esm.e1e8e181.js";import{a as L}from"./asyncComputed.bfb7341c.js";import{g as me}from"./datetime.46141396.js";import{u as ge}from"./polling.84bf96db.js";import{G as ye}from"./PhArrowCounterClockwise.vue.a1a917b9.js";import{H as be}from"./PhCube.vue.8de1132a.js";import{G as he}from"./PhDownloadSimple.vue.6192bb0e.js";import{e as ve,d as _e,r as ke}from"./router.8ccbba96.js";import{a as Ce,B as Ae}from"./build.aef51d48.js";import{a as Oe}from"./project.a9ad86e9.js";import"./tables.928d4c4a.js";import{G as we}from"./PhClockCounterClockwise.vue.02d85ea5.js";import{F as xe,G as Se,I as Pe}from"./PhUserList.vue.04f21cbe.js";import{G as Ze}from"./PhWebhooksLogo.vue.9e20d559.js";import{A as Z}from"./index.eb8f01b7.js";import{E as Me}from"./ExclamationCircleOutlined.f9a25080.js";import{C as Ie}from"./CloseCircleOutlined.12f63f77.js";import{L as j}from"./LoadingOutlined.659d6aae.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.6566ff97.js";import"./constants.b75d9567.js";import"./url.62ce842c.js";import"./PhDotsThreeVertical.vue.9e306480.js";import"./index.57a61691.js";import"./record.06867f70.js";import"./string.ea3b2597.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[e]="4ed42b8c-6741-4bb0-9782-b308a93940e9",l._sentryDebugIdIdentifier="sentry-dbid-4ed42b8c-6741-4bb0-9782-b308a93940e9")}catch{}})();var je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const $e=je;var ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"};const De=ze,Be=["width","height","fill","transform"],Ve={key:0},Ne=C("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-16-84a16,16,0,1,1-16-16A16,16,0,0,1,112,128Zm64,0a16,16,0,1,1-16-16A16,16,0,0,1,176,128Z"},null,-1),Le=[Ne],Ee={key:1},Ge=C("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"},null,-1),Te=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm56-88a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Fe=[Ge,Te],Re={key:2},He=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"},null,-1),qe=[He],Ue={key:3},Je=C("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm10-90a10,10,0,1,1-10-10A10,10,0,0,1,138,128Zm-44,0a10,10,0,1,1-10-10A10,10,0,0,1,94,128Zm88,0a10,10,0,1,1-10-10A10,10,0,0,1,182,128Z"},null,-1),Qe=[Je],We={key:4},Ye=C("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm44,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-88,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Xe=[Ye],Ke={key:5},et=C("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm8-92a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-44,0a8,8,0,1,1-8-8A8,8,0,0,1,92,128Zm88,0a8,8,0,1,1-8-8A8,8,0,0,1,180,128Z"},null,-1),tt=[et],rt={name:"PhDotsThreeCircle"},at=$({...rt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(l){const e=l,a=P("weight","regular"),d=P("size","1em"),s=P("color","currentColor"),S=P("mirrored",!1),p=x(()=>{var m;return(m=e.weight)!=null?m:a}),w=x(()=>{var m;return(m=e.size)!=null?m:d}),h=x(()=>{var m;return(m=e.color)!=null?m:s}),A=x(()=>e.mirrored!==void 0?e.mirrored?"scale(-1, 1)":void 0:S?"scale(-1, 1)":void 0);return(m,M)=>(c(),v("svg",U({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:w.value,height:w.value,fill:h.value,transform:A.value},m.$attrs),[q(m.$slots,"default"),p.value==="bold"?(c(),v("g",Ve,Le)):p.value==="duotone"?(c(),v("g",Ee,Fe)):p.value==="fill"?(c(),v("g",Re,qe)):p.value==="light"?(c(),v("g",Ue,Qe)):p.value==="regular"?(c(),v("g",We,Xe)):p.value==="thin"?(c(),v("g",Ke,tt)):_("",!0)],16,Be))}});function E(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){lt(l,s,a[s])})}return l}function lt(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var D=function(e,a){var d=E({},e,a.attrs);return u(z,E({},d,{icon:J}),null)};D.displayName="CheckCircleOutlined";D.inheritAttrs=!1;const nt=D;function G(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){ot(l,s,a[s])})}return l}function ot(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var B=function(e,a){var d=G({},e,a.attrs);return u(z,G({},d,{icon:$e}),null)};B.displayName="MinusCircleOutlined";B.inheritAttrs=!1;const it=B;function T(l){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),d.forEach(function(s){st(l,s,a[s])})}return l}function st(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var V=function(e,a){var d=T({},e,a.attrs);return u(z,T({},d,{icon:De}),null)};V.displayName="PauseCircleOutlined";V.inheritAttrs=!1;const ut=V,ct={style:{display:"flex","align-items":"center",gap:"5px"}},dt={key:1},pt=$({__name:"BuildInspector",props:{buildSpec:{}},setup(l){const e=l,a=Q(),d=s=>{a.push({name:"logs",params:{projectId:e.buildSpec.projectId},query:s.logQuery})};return(s,S)=>s.buildSpec.runtimes.length>0?(c(),f(r(_e),{key:0,"item-layout":"horizontal","data-source":s.buildSpec.runtimes},{renderItem:i(({item:p})=>[u(r(ve),null,{actions:i(()=>[u(r(W),null,{overlay:i(()=>[u(r(Y),null,{default:i(()=>[u(r(X),{onClick:w=>d(p)},{default:i(()=>[C("div",ct,[u(r(we)),u(r(k),null,{default:i(()=>[y(" View Logs")]),_:1})])]),_:2},1032,["onClick"])]),_:2},1024)]),default:i(()=>[u(r(at),{style:{cursor:"pointer"}})]),_:2},1024)]),default:i(()=>[p.type=="form"?(c(),f(r(Z),{key:0,size:"large"},{default:i(()=>[u(r(xe)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y("/"+b(p.path),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="job"?(c(),f(r(Z),{key:1,size:"large"},{default:i(()=>[u(r(Se)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y(b(p.schedule),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="hook"?(c(),f(r(Z),{key:2,size:"large"},{default:i(()=>[u(r(Ze)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024),u(r(k),{type:"secondary",code:""},{default:i(()=>[y("/_hooks/"+b(p.path),1)]),_:2},1024)]),_:2},1024)):_("",!0),p.type=="script"?(c(),f(r(Z),{key:3,size:"large"},{default:i(()=>[u(r(Pe)),u(r(k),{strong:""},{default:i(()=>[y(b(p.title),1)]),_:2},1024)]),_:2},1024)):_("",!0)]),_:2},1024)]),_:1},8,["data-source"])):(c(),v("div",dt,[u(r(K),{description:"No runtimes found. Make sure your project has forms, hooks or jobs before deploying it"})]))}}),ft=$({__name:"Builds",setup(l){const a=ee().params.projectId,{loading:d,result:s,refetch:S}=L(async()=>{const[t,o]=await Promise.all([Ce.list(a),Oe.getStatus(a)]);return{b:t.map(g=>({build:g,status:o.filter(O=>O.buildId==g.id).map(O=>O.status)})),status:o}}),{startPolling:p,endPolling:w}=ge({task:S,interval:1e4});te(()=>p()),re(()=>w());const h=ae(null),A=L(async()=>h.value?await Ae.get(h.value):null),m=()=>{var n;const t=(n=s.value)==null?void 0:n.b.find(g=>g.build.id===h.value);return`Version ${t==null?void 0:t.build.id.slice(0,8)} - ${t==null?void 0:t.build.createdAt.toLocaleString()}`},M=[{text:"Deploying",tagColor:"blue",check:t=>{var o,n;return(n=t.build.latest&&t.status.some(g=>g=="Running")&&((o=s.value)==null?void 0:o.status.some(g=>g.buildId!==t.build.id)))!=null?n:!1},loading:!0},{text:"Deactivating",tagColor:"orange",check:t=>t.build.status==="success"&&!t.build.latest&&t.status.some(o=>o=="Running"),loading:!0},{text:"Live",tagColor:"green",check:t=>t.build.latest&&t.status.some(o=>o=="Running")},{text:"Sleeping",tagColor:"cyan",check:t=>t.build.latest&&t.status.length===0},{text:"Failed",tagColor:"red",check:t=>t.build.latest&&t.status.some(o=>o=="Failed")},{text:"Inactive",tagColor:"default",check:t=>t.build.status==="success"},{text:"Aborted",tagColor:"default",check:t=>t.build.status==="aborted"||t.build.status==="aborted-by-user"},{text:"Failed",tagColor:"orange",check:t=>t.build.status==="failure"},{text:"Deploying",tagColor:"blue",check:t=>t.build.status==="in-progress",loading:!0},{text:"Uploading",tagColor:"yellow",check:t=>t.build.status==="pending"}];function F(t){var o,n,g,O,N;return{text:(n=(o=M.find(I=>I.check(t)))==null?void 0:o.text)!=null?n:"unknown",tagColor:(O=(g=M.find(I=>I.check(t)))==null?void 0:g.tagColor)!=null?O:"default",hover:(N=t.build.log)!=null?N:void 0}}const R=x(()=>{const t=[{title:"Id"},{title:"Date"},{title:"Abstra Version"},{title:"Status"},{title:"",align:"right"}];return s.value?{columns:t,rows:s.value.b.map(o=>{var n;return{key:o.build.id,cells:[{type:"text",text:o.build.id.slice(0,8)},{key:"date",type:"slot",payload:{date:me(o.build.createdAt,{weekday:void 0}),distance:pe(o.build.createdAt)}},{type:"text",text:(n=o.build.abstraVersion)!=null?n:"-"},{key:"status",type:"slot",payload:F(o)},{type:"actions",actions:[{icon:be,label:"Inspect version",onClick:async()=>{h.value=o.build.id,A.refetch()}},{icon:ye,label:"View application logs",onClick:()=>{ke.push({name:"logs",params:{projectId:a},query:{buildId:o.build.id}})}},{icon:he,label:"Download files",onClick:()=>o.build.download()}]}]}})}:{columns:t,rows:[]}});return(t,o)=>(c(),v(le,null,[u(H,{"entity-name":"build",loading:r(d),title:"Version History",description:"You can create a new version by publishing your project from the local editor.","empty-title":"No versions here yet",table:R.value,live:""},{date:i(({payload:n})=>[u(r(ne),null,{title:i(()=>[y(b(n.distance),1)]),default:i(()=>[y(b(n.date)+" ",1)]),_:2},1024)]),status:i(({payload:n})=>[u(r(oe),{open:n.hover?void 0:!1},{content:i(()=>[u(r(ie),{style:{width:"300px",overflow:"auto","font-family":"monospace"},content:n.hover,copyable:""},null,8,["content"])]),default:i(()=>[n.text!=="unknown"?(c(),f(r(ue),{key:0,color:n.tagColor,style:se({cursor:n.hover?"pointer":"default"})},{default:i(()=>[n.text==="Live"?(c(),f(r(nt),{key:0})):n.text==="Inactive"?(c(),f(r(it),{key:1})):n.text==="Failed"?(c(),f(r(Me),{key:2})):n.text==="Aborted"?(c(),f(r(Ie),{key:3})):n.text==="Sleeping"?(c(),f(r(ut),{key:4})):n.text==="Uploading"?(c(),f(r(j),{key:5})):n.text==="Deploying"?(c(),f(r(j),{key:6})):n.text==="Deactivating"?(c(),f(r(j),{key:7})):_("",!0),y(" "+b(n.text),1)]),_:2},1032,["color","style"])):_("",!0)]),_:2},1032,["open"])]),_:1},8,["loading","table"]),h.value?(c(),f(r(de),{key:0,footer:null,open:!!h.value,size:"large",width:"80%",title:m(),onCancel:o[0]||(o[0]=n=>h.value=null)},{default:i(()=>[!r(A).result.value||r(A).loading.value?(c(),f(r(ce),{key:0})):r(A).result.value?(c(),f(pt,{key:1,"build-spec":r(A).result.value},null,8,["build-spec"])):_("",!0)]),_:1},8,["open","title"])):_("",!0)],64))}});const Et=fe(ft,[["__scopeId","data-v-9615f578"]]);export{Et as default};
|
|
2
|
+
//# sourceMappingURL=Builds.2bf5dad8.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dL as ut,dM as Tt,dN as Gt,dO as Kt,dP as Xt,dQ as jt,dR as Ft,dS as qt,N as q,aq as Qe,a8 as Ae,d as k,r as ne,c as H,f as s,b7 as ae,ah as W,aK as We,X as r,ck as O,J as Ne,w as me,bB as Vt,dT as Yt,bx as Ut,bw as Zt,dU as Jt,av as re,aN as ee,a4 as Qt,am as ea,c1 as ta,bE as aa,ak as vt,aj as D,as as Le,dV as Re,aF as na,aP as oa,dW as pt,ab as et,ac as tt,an as at,ao as nt,dX as _t,ap as Me,aD as Pt,ai as ot,aL as ke,b6 as ia,aM as la,aA as ra,bY as sa,au as da,c8 as ze,ag as ye,b4 as ca,aW as bt,a$ as ua,dY as Ge,aT as va,dZ as Ee,a7 as pa,d_ as ft,dm as ba,d$ as fa}from"./jwt-decode.esm.7fb8faf4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bec85088-5444-4f03-977d-ca68f7f48b7f",e._sentryDebugIdIdentifier="sentry-dbid-bec85088-5444-4f03-977d-ca68f7f48b7f")}catch{}})();function ga(e,t,a,n){if(!ut(e))return e;t=Tt(t,e);for(var o=-1,l=t.length,i=l-1,c=e;c!=null&&++o<l;){var h=Gt(t[o]),f=a;if(h==="__proto__"||h==="constructor"||h==="prototype")return e;if(o!=i){var g=c[h];f=n?n(g,h,c):void 0,f===void 0&&(f=ut(g)?g:Kt(t[o+1])?[]:{})}Xt(c,h,f),c=c[h]}return e}function ha(e,t,a){for(var n=-1,o=t.length,l={};++n<o;){var i=t[n],c=jt(e,i);a(c,i)&&ga(l,Tt(i,e),c)}return l}function $a(e,t){return ha(e,t,function(a,n){return Ft(e,n)})}var ma=qt(function(e,t){return e==null?{}:$a(e,t)});const Bt=ma;function ya(e){const t=q(),a=q(!1);function n(){for(var o=arguments.length,l=new Array(o),i=0;i<o;i++)l[i]=arguments[i];a.value||(Ae.cancel(t.value),t.value=Ae(()=>{e(...l)}))}return Qe(()=>{a.value=!0,Ae.cancel(t.value)}),n}function Sa(e){const t=q([]),a=q(typeof e=="function"?e():e),n=ya(()=>{let l=a.value;t.value.forEach(i=>{l=i(l)}),t.value=[],a.value=l});function o(l){t.value.push(l),n()}return[a,o]}const xa=k({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:a,attrs:n}=t;const o=ne();function l(h){var f;!((f=e.tab)===null||f===void 0)&&f.disabled||e.onClick(h)}a({domRef:o});function i(h){var f;h.preventDefault(),h.stopPropagation(),e.editable.onEdit("remove",{key:(f=e.tab)===null||f===void 0?void 0:f.key,event:h})}const c=H(()=>{var h;return e.editable&&e.closable!==!1&&!(!((h=e.tab)===null||h===void 0)&&h.disabled)});return()=>{var h;const{prefixCls:f,id:g,active:x,tab:{key:b,tab:d,disabled:u,closeIcon:$},renderWrapper:C,removeAriaLabel:S,editable:E,onFocus:L}=e,M=`${f}-tab`,p=s("div",{key:b,ref:o,class:W(M,{[`${M}-with-remove`]:c.value,[`${M}-active`]:x,[`${M}-disabled`]:u}),style:n.style,onClick:l},[s("div",{role:"tab","aria-selected":x,id:g&&`${g}-tab-${b}`,class:`${M}-btn`,"aria-controls":g&&`${g}-panel-${b}`,"aria-disabled":u,tabindex:u?null:0,onClick:y=>{y.stopPropagation(),l(y)},onKeydown:y=>{[ae.SPACE,ae.ENTER].includes(y.which)&&(y.preventDefault(),l(y))},onFocus:L},[typeof d=="function"?d():d]),c.value&&s("button",{type:"button","aria-label":S||"remove",tabindex:0,class:`${M}-remove`,onClick:y=>{y.stopPropagation(),i(y)}},[($==null?void 0:$())||((h=E.removeIcon)===null||h===void 0?void 0:h.call(E))||"\xD7"])]);return C?C(p):p}}}),gt={width:0,height:0,left:0,top:0};function Ca(e,t){const a=ne(new Map);return We(()=>{var n,o;const l=new Map,i=e.value,c=t.value.get((n=i[0])===null||n===void 0?void 0:n.key)||gt,h=c.left+c.width;for(let f=0;f<i.length;f+=1){const{key:g}=i[f];let x=t.value.get(g);x||(x=t.value.get((o=i[f-1])===null||o===void 0?void 0:o.key)||gt);const b=l.get(g)||r({},x);b.right=h-b.left-b.width,l.set(g,b)}a.value=new Map(l)}),a}const It=k({compatConfig:{MODE:3},name:"AddButton",inheritAttrs:!1,props:{prefixCls:String,editable:{type:Object},locale:{type:Object,default:void 0}},setup(e,t){let{expose:a,attrs:n}=t;const o=ne();return a({domRef:o}),()=>{const{prefixCls:l,editable:i,locale:c}=e;return!i||i.showAdd===!1?null:s("button",{ref:o,type:"button",class:`${l}-nav-add`,style:n.style,"aria-label":(c==null?void 0:c.addAriaLabel)||"Add tab",onClick:h=>{i.onEdit("add",{event:h})}},[i.addIcon?i.addIcon():"+"])}}}),wa={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:re.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:ee()},Ta=k({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:wa,emits:["tabClick"],slots:Object,setup(e,t){let{attrs:a,slots:n}=t;const[o,l]=O(!1),[i,c]=O(null),h=d=>{const u=e.tabs.filter(S=>!S.disabled);let $=u.findIndex(S=>S.key===i.value)||0;const C=u.length;for(let S=0;S<C;S+=1){$=($+d+C)%C;const E=u[$];if(!E.disabled){c(E.key);return}}},f=d=>{const{which:u}=d;if(!o.value){[ae.DOWN,ae.SPACE,ae.ENTER].includes(u)&&(l(!0),d.preventDefault());return}switch(u){case ae.UP:h(-1),d.preventDefault();break;case ae.DOWN:h(1),d.preventDefault();break;case ae.ESC:l(!1);break;case ae.SPACE:case ae.ENTER:i.value!==null&&e.onTabClick(i.value,d);break}},g=H(()=>`${e.id}-more-popup`),x=H(()=>i.value!==null?`${g.value}-${i.value}`:null),b=(d,u)=>{d.preventDefault(),d.stopPropagation(),e.editable.onEdit("remove",{key:u,event:d})};return Ne(()=>{me(i,()=>{const d=document.getElementById(x.value);d&&d.scrollIntoView&&d.scrollIntoView(!1)},{flush:"post",immediate:!0})}),me(o,()=>{o.value||c(null)}),Vt({}),()=>{var d;const{prefixCls:u,id:$,tabs:C,locale:S,mobile:E,moreIcon:L=((d=n.moreIcon)===null||d===void 0?void 0:d.call(n))||s(Yt,null,null),moreTransitionName:M,editable:p,tabBarGutter:y,rtl:v,onTabClick:_,popupClassName:R}=e;if(!C.length)return null;const I=`${u}-dropdown`,N=S==null?void 0:S.dropdownAriaLabel,J={[v?"marginRight":"marginLeft"]:y};C.length||(J.visibility="hidden",J.order=1);const te=W({[`${I}-rtl`]:v,[`${R}`]:!0}),oe=E?null:s(Jt,{prefixCls:I,trigger:["hover"],visible:o.value,transitionName:M,onVisibleChange:l,overlayClassName:te,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:e.getPopupContainer},{overlay:()=>s(Ut,{onClick:P=>{let{key:G,domEvent:w}=P;_(G,w),l(!1)},id:g.value,tabindex:-1,role:"listbox","aria-activedescendant":x.value,selectedKeys:[i.value],"aria-label":N!==void 0?N:"expanded dropdown"},{default:()=>[C.map(P=>{var G,w;const Y=p&&P.closable!==!1&&!P.disabled;return s(Zt,{key:P.key,id:`${g.value}-${P.key}`,role:"option","aria-controls":$&&`${$}-panel-${P.key}`,disabled:P.disabled},{default:()=>[s("span",null,[typeof P.tab=="function"?P.tab():P.tab]),Y&&s("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:`${I}-menu-item-remove`,onClick:U=>{U.stopPropagation(),b(U,P.key)}},[((G=P.closeIcon)===null||G===void 0?void 0:G.call(P))||((w=p.removeIcon)===null||w===void 0?void 0:w.call(p))||"\xD7"])]})})]}),default:()=>s("button",{type:"button",class:`${u}-nav-more`,style:J,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":g.value,id:`${$}-more`,"aria-expanded":o.value,onKeydown:f},[L])});return s("div",{class:W(`${u}-nav-operations`,a.class),style:a.style},[oe,s(It,{prefixCls:u,locale:S,editable:p},null)])}}}),Rt=Symbol("tabsContextKey"),Et=e=>{Qt(Rt,e)},At=()=>ea(Rt,{tabs:ne([]),prefixCls:ne()});k({compatConfig:{MODE:3},name:"TabsContextProvider",inheritAttrs:!1,props:{tabs:{type:Object,default:void 0},prefixCls:{type:String,default:void 0}},setup(e,t){let{slots:a}=t;return Et(ta(e)),()=>{var n;return(n=a.default)===null||n===void 0?void 0:n.call(a)}}});const _a=.1,ht=.01,Oe=20,$t=Math.pow(.995,Oe);function Pa(e,t){const[a,n]=O(),[o,l]=O(0),[i,c]=O(0),[h,f]=O(),g=ne();function x(p){const{screenX:y,screenY:v}=p.touches[0];n({x:y,y:v}),clearInterval(g.value)}function b(p){if(!a.value)return;p.preventDefault();const{screenX:y,screenY:v}=p.touches[0],_=y-a.value.x,R=v-a.value.y;t(_,R),n({x:y,y:v});const I=Date.now();c(I-o.value),l(I),f({x:_,y:R})}function d(){if(!a.value)return;const p=h.value;if(n(null),f(null),p){const y=p.x/i.value,v=p.y/i.value,_=Math.abs(y),R=Math.abs(v);if(Math.max(_,R)<_a)return;let I=y,N=v;g.value=setInterval(()=>{if(Math.abs(I)<ht&&Math.abs(N)<ht){clearInterval(g.value);return}I*=$t,N*=$t,t(I*Oe,N*Oe)},Oe)}}const u=ne();function $(p){const{deltaX:y,deltaY:v}=p;let _=0;const R=Math.abs(y),I=Math.abs(v);R===I?_=u.value==="x"?y:v:R>I?(_=y,u.value="x"):(_=v,u.value="y"),t(-_,-_)&&p.preventDefault()}const C=ne({onTouchStart:x,onTouchMove:b,onTouchEnd:d,onWheel:$});function S(p){C.value.onTouchStart(p)}function E(p){C.value.onTouchMove(p)}function L(p){C.value.onTouchEnd(p)}function M(p){C.value.onWheel(p)}Ne(()=>{var p,y;document.addEventListener("touchmove",E,{passive:!1}),document.addEventListener("touchend",L,{passive:!1}),(p=e.value)===null||p===void 0||p.addEventListener("touchstart",S,{passive:!1}),(y=e.value)===null||y===void 0||y.addEventListener("wheel",M,{passive:!1})}),Qe(()=>{document.removeEventListener("touchmove",E),document.removeEventListener("touchend",L)})}function mt(e,t){const a=ne(e);function n(o){const l=typeof o=="function"?o(a.value):o;l!==a.value&&t(l,a.value),a.value=l}return[a,n]}const yt={width:0,height:0,left:0,top:0,right:0},Ba=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:Le(),editable:Le(),moreIcon:re.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:Le(),popupClassName:String,getPopupContainer:ee(),onTabClick:{type:Function},onTabScroll:{type:Function}}),St=k({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:Ba(),slots:Object,emits:["tabClick","tabScroll"],setup(e,t){let{attrs:a,slots:n}=t;const{tabs:o,prefixCls:l}=At(),i=q(),c=q(),h=q(),f=q(),[g,x]=aa(),b=H(()=>e.tabPosition==="top"||e.tabPosition==="bottom"),[d,u]=mt(0,(T,m)=>{b.value&&e.onTabScroll&&e.onTabScroll({direction:T>m?"left":"right"})}),[$,C]=mt(0,(T,m)=>{!b.value&&e.onTabScroll&&e.onTabScroll({direction:T>m?"top":"bottom"})}),[S,E]=O(0),[L,M]=O(0),[p,y]=O(null),[v,_]=O(null),[R,I]=O(0),[N,J]=O(0),[te,oe]=Sa(new Map),P=Ca(o,te),G=H(()=>`${l.value}-nav-operations-hidden`),w=q(0),Y=q(0);We(()=>{b.value?e.rtl?(w.value=0,Y.value=Math.max(0,S.value-p.value)):(w.value=Math.min(0,p.value-S.value),Y.value=0):(w.value=Math.min(0,v.value-L.value),Y.value=0)});const U=T=>T<w.value?w.value:T>Y.value?Y.value:T,se=q(),[K,de]=O(),ce=()=>{de(Date.now())},he=()=>{clearTimeout(se.value)},Se=(T,m)=>{T(B=>U(B+m))};Pa(i,(T,m)=>{if(b.value){if(p.value>=S.value)return!1;Se(u,T)}else{if(v.value>=L.value)return!1;Se(C,m)}return he(),ce(),!0}),me(K,()=>{he(),K.value&&(se.value=setTimeout(()=>{de(0)},100))});const ue=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey;const m=P.value.get(T)||{width:0,height:0,left:0,right:0,top:0};if(b.value){let B=d.value;e.rtl?m.right<d.value?B=m.right:m.right+m.width>d.value+p.value&&(B=m.right+m.width-p.value):m.left<-d.value?B=-m.left:m.left+m.width>-d.value+p.value&&(B=-(m.left+m.width-p.value)),C(0),u(U(B))}else{let B=$.value;m.top<-$.value?B=-m.top:m.top+m.height>-$.value+v.value&&(B=-(m.top+m.height-v.value)),u(0),C(U(B))}},ie=q(0),xe=q(0);We(()=>{let T,m,B,A,j,F;const $e=P.value;["top","bottom"].includes(e.tabPosition)?(T="width",A=p.value,j=S.value,F=R.value,m=e.rtl?"right":"left",B=Math.abs(d.value)):(T="height",A=v.value,j=S.value,F=N.value,m="top",B=-$.value);let Z=A;j+F>A&&j<A&&(Z=A-F);const le=o.value;if(!le.length)return[ie.value,xe.value]=[0,0];const be=le.length;let Ce=be;for(let X=0;X<be;X+=1){const Q=$e.get(le[X].key)||yt;if(Q[m]+Q[T]>B+Z){Ce=X-1;break}}let z=0;for(let X=be-1;X>=0;X-=1)if(($e.get(le[X].key)||yt)[m]<B){z=X+1;break}return[ie.value,xe.value]=[z,Ce]});const ve=()=>{var T,m,B,A,j;const F=((T=i.value)===null||T===void 0?void 0:T.offsetWidth)||0,$e=((m=i.value)===null||m===void 0?void 0:m.offsetHeight)||0,Z=((B=f.value)===null||B===void 0?void 0:B.$el)||{},le=Z.offsetWidth||0,be=Z.offsetHeight||0;y(F),_($e),I(le),J(be);const Ce=(((A=c.value)===null||A===void 0?void 0:A.offsetWidth)||0)-le,z=(((j=c.value)===null||j===void 0?void 0:j.offsetHeight)||0)-be;E(Ce),M(z),oe(()=>{const X=new Map;return o.value.forEach(Q=>{let{key:we}=Q;const fe=x.value.get(we),ge=(fe==null?void 0:fe.$el)||fe;ge&&X.set(we,{width:ge.offsetWidth,height:ge.offsetHeight,left:ge.offsetLeft,top:ge.offsetTop})}),X})},Pe=H(()=>[...o.value.slice(0,ie.value),...o.value.slice(xe.value+1)]),[Be,Ot]=O(),pe=H(()=>P.value.get(e.activeKey)),rt=q(),st=()=>{Ae.cancel(rt.value)};me([pe,b,()=>e.rtl],()=>{const T={};pe.value&&(b.value?(e.rtl?T.right=Re(pe.value.right):T.left=Re(pe.value.left),T.width=Re(pe.value.width)):(T.top=Re(pe.value.top),T.height=Re(pe.value.height))),st(),rt.value=Ae(()=>{Ot(T)})}),me([()=>e.activeKey,pe,P,b],()=>{ue()},{flush:"post"}),me([()=>e.rtl,()=>e.tabBarGutter,()=>e.activeKey,()=>o.value],()=>{ve()},{flush:"post"});const Fe=T=>{let{position:m,prefixCls:B,extra:A}=T;if(!A)return null;const j=A==null?void 0:A({position:m});return j?s("div",{class:`${B}-extra-content`},[j]):null};return Qe(()=>{he(),st()}),()=>{const{id:T,animated:m,activeKey:B,rtl:A,editable:j,locale:F,tabPosition:$e,tabBarGutter:Z,onTabClick:le}=e,{class:be,style:Ce}=a,z=l.value,X=!!Pe.value.length,Q=`${z}-nav-wrap`;let we,fe,ge,dt;b.value?A?(fe=d.value>0,we=d.value+p.value<S.value):(we=d.value<0,fe=-d.value+p.value<S.value):(ge=$.value<0,dt=-$.value+v.value<L.value);const De={};$e==="top"||$e==="bottom"?De[A?"marginRight":"marginLeft"]=typeof Z=="number"?`${Z}px`:Z:De.marginTop=typeof Z=="number"?`${Z}px`:Z;const ct=o.value.map((qe,Wt)=>{const{key:Ie}=qe;return s(xa,{id:T,prefixCls:z,key:Ie,tab:qe,style:Wt===0?void 0:De,closable:qe.closable,editable:j,active:Ie===B,removeAriaLabel:F==null?void 0:F.removeAriaLabel,ref:g(Ie),onClick:Nt=>{le(Ie,Nt)},onFocus:()=>{ue(Ie),ce(),i.value&&(A||(i.value.scrollLeft=0),i.value.scrollTop=0)}},n)});return s("div",{role:"tablist",class:W(`${z}-nav`,be),style:Ce,onKeydown:()=>{ce()}},[s(Fe,{position:"left",prefixCls:z,extra:n.leftExtra},null),s(vt,{onResize:ve},{default:()=>[s("div",{class:W(Q,{[`${Q}-ping-left`]:we,[`${Q}-ping-right`]:fe,[`${Q}-ping-top`]:ge,[`${Q}-ping-bottom`]:dt}),ref:i},[s(vt,{onResize:ve},{default:()=>[s("div",{ref:c,class:`${z}-nav-list`,style:{transform:`translate(${d.value}px, ${$.value}px)`,transition:K.value?"none":void 0}},[ct,s(It,{ref:f,prefixCls:z,locale:F,editable:j,style:r(r({},ct.length===0?void 0:De),{visibility:X?"hidden":null})},null),s("div",{class:W(`${z}-ink-bar`,{[`${z}-ink-bar-animated`]:m.inkBar}),style:Be.value},null)])]})])]}),s(Ta,D(D({},e),{},{removeAriaLabel:F==null?void 0:F.removeAriaLabel,ref:h,prefixCls:z,tabs:Pe.value,class:!X&&G.value}),Bt(n,["moreIcon"])),s(Fe,{position:"right",prefixCls:z,extra:n.rightExtra},null),s(Fe,{position:"right",prefixCls:z,extra:n.tabBarExtraContent},null)])}}}),Ia=k({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(e){const{tabs:t,prefixCls:a}=At();return()=>{const{id:n,activeKey:o,animated:l,tabPosition:i,rtl:c,destroyInactiveTabPane:h}=e,f=l.tabPane,g=a.value,x=t.value.findIndex(b=>b.key===o);return s("div",{class:`${g}-content-holder`},[s("div",{class:[`${g}-content`,`${g}-content-${i}`,{[`${g}-content-animated`]:f}],style:x&&f?{[c?"marginRight":"marginLeft"]:`-${x}00%`}:null},[t.value.map(b=>na(b.node,{key:b.key,prefixCls:g,tabKey:b.key,id:n,animated:f,active:b.key===o,destroyInactiveTabPane:h}))])])}}});var Ra={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Ea=Ra;function xt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable}))),n.forEach(function(o){Aa(e,o,a[o])})}return e}function Aa(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var it=function(t,a){var n=xt({},t,a.attrs);return s(oa,xt({},n,{icon:Ea}),null)};it.displayName="PlusOutlined";it.inheritAttrs=!1;const La=it,Ma=e=>{const{componentCls:t,motionDurationSlow:a}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${a}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${a}`}}}}},[pt(e,"slide-up"),pt(e,"slide-down")]]},Ha=Ma,Da=e=>{const{componentCls:t,tabsCardHorizontalPadding:a,tabsCardHeadBackground:n,tabsCardGutter:o,colorSplit:l}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:a,background:n,border:`${e.lineWidth}px ${e.lineType} ${l}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:e.colorPrimary,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${o}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${o}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},ka=e=>{const{componentCls:t,tabsHoverColor:a,dropdownEdgeChildVerticalPadding:n}=e;return{[`${t}-dropdown`]:r(r({},at(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${n}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":r(r({},nt),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:a}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},za=e=>{const{componentCls:t,margin:a,colorSplit:n}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:`0 0 ${a}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
|
|
1
|
+
import{dL as ut,dM as Tt,dN as Gt,dO as Kt,dP as Xt,dQ as jt,dR as Ft,dS as qt,N as q,aq as Qe,a8 as Ae,d as k,r as ne,c as H,f as s,b7 as ae,ah as W,aK as We,X as r,ck as O,J as Ne,w as me,bB as Vt,dT as Yt,bx as Ut,bw as Zt,dU as Jt,av as re,aN as ee,a4 as Qt,am as ea,c1 as ta,bE as aa,ak as vt,aj as D,as as Le,dV as Re,aF as na,aP as oa,dW as pt,ab as et,ac as tt,an as at,ao as nt,dX as _t,ap as Me,aD as Pt,ai as ot,aL as ke,b6 as ia,aM as la,aA as ra,bY as sa,au as da,c8 as ze,ag as ye,b4 as ca,aW as bt,a$ as ua,dY as Ge,aT as va,dZ as Ee,a7 as pa,d_ as ft,dm as ba,d$ as fa}from"./jwt-decode.esm.e1e8e181.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9156e44f-742a-49fb-abbc-4f22c129f7c7",e._sentryDebugIdIdentifier="sentry-dbid-9156e44f-742a-49fb-abbc-4f22c129f7c7")}catch{}})();function ga(e,t,a,n){if(!ut(e))return e;t=Tt(t,e);for(var o=-1,l=t.length,i=l-1,c=e;c!=null&&++o<l;){var h=Gt(t[o]),f=a;if(h==="__proto__"||h==="constructor"||h==="prototype")return e;if(o!=i){var g=c[h];f=n?n(g,h,c):void 0,f===void 0&&(f=ut(g)?g:Kt(t[o+1])?[]:{})}Xt(c,h,f),c=c[h]}return e}function ha(e,t,a){for(var n=-1,o=t.length,l={};++n<o;){var i=t[n],c=jt(e,i);a(c,i)&&ga(l,Tt(i,e),c)}return l}function $a(e,t){return ha(e,t,function(a,n){return Ft(e,n)})}var ma=qt(function(e,t){return e==null?{}:$a(e,t)});const Bt=ma;function ya(e){const t=q(),a=q(!1);function n(){for(var o=arguments.length,l=new Array(o),i=0;i<o;i++)l[i]=arguments[i];a.value||(Ae.cancel(t.value),t.value=Ae(()=>{e(...l)}))}return Qe(()=>{a.value=!0,Ae.cancel(t.value)}),n}function Sa(e){const t=q([]),a=q(typeof e=="function"?e():e),n=ya(()=>{let l=a.value;t.value.forEach(i=>{l=i(l)}),t.value=[],a.value=l});function o(l){t.value.push(l),n()}return[a,o]}const xa=k({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:a,attrs:n}=t;const o=ne();function l(h){var f;!((f=e.tab)===null||f===void 0)&&f.disabled||e.onClick(h)}a({domRef:o});function i(h){var f;h.preventDefault(),h.stopPropagation(),e.editable.onEdit("remove",{key:(f=e.tab)===null||f===void 0?void 0:f.key,event:h})}const c=H(()=>{var h;return e.editable&&e.closable!==!1&&!(!((h=e.tab)===null||h===void 0)&&h.disabled)});return()=>{var h;const{prefixCls:f,id:g,active:x,tab:{key:b,tab:d,disabled:u,closeIcon:$},renderWrapper:C,removeAriaLabel:S,editable:E,onFocus:L}=e,M=`${f}-tab`,p=s("div",{key:b,ref:o,class:W(M,{[`${M}-with-remove`]:c.value,[`${M}-active`]:x,[`${M}-disabled`]:u}),style:n.style,onClick:l},[s("div",{role:"tab","aria-selected":x,id:g&&`${g}-tab-${b}`,class:`${M}-btn`,"aria-controls":g&&`${g}-panel-${b}`,"aria-disabled":u,tabindex:u?null:0,onClick:y=>{y.stopPropagation(),l(y)},onKeydown:y=>{[ae.SPACE,ae.ENTER].includes(y.which)&&(y.preventDefault(),l(y))},onFocus:L},[typeof d=="function"?d():d]),c.value&&s("button",{type:"button","aria-label":S||"remove",tabindex:0,class:`${M}-remove`,onClick:y=>{y.stopPropagation(),i(y)}},[($==null?void 0:$())||((h=E.removeIcon)===null||h===void 0?void 0:h.call(E))||"\xD7"])]);return C?C(p):p}}}),gt={width:0,height:0,left:0,top:0};function Ca(e,t){const a=ne(new Map);return We(()=>{var n,o;const l=new Map,i=e.value,c=t.value.get((n=i[0])===null||n===void 0?void 0:n.key)||gt,h=c.left+c.width;for(let f=0;f<i.length;f+=1){const{key:g}=i[f];let x=t.value.get(g);x||(x=t.value.get((o=i[f-1])===null||o===void 0?void 0:o.key)||gt);const b=l.get(g)||r({},x);b.right=h-b.left-b.width,l.set(g,b)}a.value=new Map(l)}),a}const It=k({compatConfig:{MODE:3},name:"AddButton",inheritAttrs:!1,props:{prefixCls:String,editable:{type:Object},locale:{type:Object,default:void 0}},setup(e,t){let{expose:a,attrs:n}=t;const o=ne();return a({domRef:o}),()=>{const{prefixCls:l,editable:i,locale:c}=e;return!i||i.showAdd===!1?null:s("button",{ref:o,type:"button",class:`${l}-nav-add`,style:n.style,"aria-label":(c==null?void 0:c.addAriaLabel)||"Add tab",onClick:h=>{i.onEdit("add",{event:h})}},[i.addIcon?i.addIcon():"+"])}}}),wa={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:re.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:ee()},Ta=k({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:wa,emits:["tabClick"],slots:Object,setup(e,t){let{attrs:a,slots:n}=t;const[o,l]=O(!1),[i,c]=O(null),h=d=>{const u=e.tabs.filter(S=>!S.disabled);let $=u.findIndex(S=>S.key===i.value)||0;const C=u.length;for(let S=0;S<C;S+=1){$=($+d+C)%C;const E=u[$];if(!E.disabled){c(E.key);return}}},f=d=>{const{which:u}=d;if(!o.value){[ae.DOWN,ae.SPACE,ae.ENTER].includes(u)&&(l(!0),d.preventDefault());return}switch(u){case ae.UP:h(-1),d.preventDefault();break;case ae.DOWN:h(1),d.preventDefault();break;case ae.ESC:l(!1);break;case ae.SPACE:case ae.ENTER:i.value!==null&&e.onTabClick(i.value,d);break}},g=H(()=>`${e.id}-more-popup`),x=H(()=>i.value!==null?`${g.value}-${i.value}`:null),b=(d,u)=>{d.preventDefault(),d.stopPropagation(),e.editable.onEdit("remove",{key:u,event:d})};return Ne(()=>{me(i,()=>{const d=document.getElementById(x.value);d&&d.scrollIntoView&&d.scrollIntoView(!1)},{flush:"post",immediate:!0})}),me(o,()=>{o.value||c(null)}),Vt({}),()=>{var d;const{prefixCls:u,id:$,tabs:C,locale:S,mobile:E,moreIcon:L=((d=n.moreIcon)===null||d===void 0?void 0:d.call(n))||s(Yt,null,null),moreTransitionName:M,editable:p,tabBarGutter:y,rtl:v,onTabClick:_,popupClassName:R}=e;if(!C.length)return null;const I=`${u}-dropdown`,N=S==null?void 0:S.dropdownAriaLabel,J={[v?"marginRight":"marginLeft"]:y};C.length||(J.visibility="hidden",J.order=1);const te=W({[`${I}-rtl`]:v,[`${R}`]:!0}),oe=E?null:s(Jt,{prefixCls:I,trigger:["hover"],visible:o.value,transitionName:M,onVisibleChange:l,overlayClassName:te,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:e.getPopupContainer},{overlay:()=>s(Ut,{onClick:P=>{let{key:G,domEvent:w}=P;_(G,w),l(!1)},id:g.value,tabindex:-1,role:"listbox","aria-activedescendant":x.value,selectedKeys:[i.value],"aria-label":N!==void 0?N:"expanded dropdown"},{default:()=>[C.map(P=>{var G,w;const Y=p&&P.closable!==!1&&!P.disabled;return s(Zt,{key:P.key,id:`${g.value}-${P.key}`,role:"option","aria-controls":$&&`${$}-panel-${P.key}`,disabled:P.disabled},{default:()=>[s("span",null,[typeof P.tab=="function"?P.tab():P.tab]),Y&&s("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:`${I}-menu-item-remove`,onClick:U=>{U.stopPropagation(),b(U,P.key)}},[((G=P.closeIcon)===null||G===void 0?void 0:G.call(P))||((w=p.removeIcon)===null||w===void 0?void 0:w.call(p))||"\xD7"])]})})]}),default:()=>s("button",{type:"button",class:`${u}-nav-more`,style:J,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":g.value,id:`${$}-more`,"aria-expanded":o.value,onKeydown:f},[L])});return s("div",{class:W(`${u}-nav-operations`,a.class),style:a.style},[oe,s(It,{prefixCls:u,locale:S,editable:p},null)])}}}),Rt=Symbol("tabsContextKey"),Et=e=>{Qt(Rt,e)},At=()=>ea(Rt,{tabs:ne([]),prefixCls:ne()});k({compatConfig:{MODE:3},name:"TabsContextProvider",inheritAttrs:!1,props:{tabs:{type:Object,default:void 0},prefixCls:{type:String,default:void 0}},setup(e,t){let{slots:a}=t;return Et(ta(e)),()=>{var n;return(n=a.default)===null||n===void 0?void 0:n.call(a)}}});const _a=.1,ht=.01,Oe=20,$t=Math.pow(.995,Oe);function Pa(e,t){const[a,n]=O(),[o,l]=O(0),[i,c]=O(0),[h,f]=O(),g=ne();function x(p){const{screenX:y,screenY:v}=p.touches[0];n({x:y,y:v}),clearInterval(g.value)}function b(p){if(!a.value)return;p.preventDefault();const{screenX:y,screenY:v}=p.touches[0],_=y-a.value.x,R=v-a.value.y;t(_,R),n({x:y,y:v});const I=Date.now();c(I-o.value),l(I),f({x:_,y:R})}function d(){if(!a.value)return;const p=h.value;if(n(null),f(null),p){const y=p.x/i.value,v=p.y/i.value,_=Math.abs(y),R=Math.abs(v);if(Math.max(_,R)<_a)return;let I=y,N=v;g.value=setInterval(()=>{if(Math.abs(I)<ht&&Math.abs(N)<ht){clearInterval(g.value);return}I*=$t,N*=$t,t(I*Oe,N*Oe)},Oe)}}const u=ne();function $(p){const{deltaX:y,deltaY:v}=p;let _=0;const R=Math.abs(y),I=Math.abs(v);R===I?_=u.value==="x"?y:v:R>I?(_=y,u.value="x"):(_=v,u.value="y"),t(-_,-_)&&p.preventDefault()}const C=ne({onTouchStart:x,onTouchMove:b,onTouchEnd:d,onWheel:$});function S(p){C.value.onTouchStart(p)}function E(p){C.value.onTouchMove(p)}function L(p){C.value.onTouchEnd(p)}function M(p){C.value.onWheel(p)}Ne(()=>{var p,y;document.addEventListener("touchmove",E,{passive:!1}),document.addEventListener("touchend",L,{passive:!1}),(p=e.value)===null||p===void 0||p.addEventListener("touchstart",S,{passive:!1}),(y=e.value)===null||y===void 0||y.addEventListener("wheel",M,{passive:!1})}),Qe(()=>{document.removeEventListener("touchmove",E),document.removeEventListener("touchend",L)})}function mt(e,t){const a=ne(e);function n(o){const l=typeof o=="function"?o(a.value):o;l!==a.value&&t(l,a.value),a.value=l}return[a,n]}const yt={width:0,height:0,left:0,top:0,right:0},Ba=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:Le(),editable:Le(),moreIcon:re.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:Le(),popupClassName:String,getPopupContainer:ee(),onTabClick:{type:Function},onTabScroll:{type:Function}}),St=k({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:Ba(),slots:Object,emits:["tabClick","tabScroll"],setup(e,t){let{attrs:a,slots:n}=t;const{tabs:o,prefixCls:l}=At(),i=q(),c=q(),h=q(),f=q(),[g,x]=aa(),b=H(()=>e.tabPosition==="top"||e.tabPosition==="bottom"),[d,u]=mt(0,(T,m)=>{b.value&&e.onTabScroll&&e.onTabScroll({direction:T>m?"left":"right"})}),[$,C]=mt(0,(T,m)=>{!b.value&&e.onTabScroll&&e.onTabScroll({direction:T>m?"top":"bottom"})}),[S,E]=O(0),[L,M]=O(0),[p,y]=O(null),[v,_]=O(null),[R,I]=O(0),[N,J]=O(0),[te,oe]=Sa(new Map),P=Ca(o,te),G=H(()=>`${l.value}-nav-operations-hidden`),w=q(0),Y=q(0);We(()=>{b.value?e.rtl?(w.value=0,Y.value=Math.max(0,S.value-p.value)):(w.value=Math.min(0,p.value-S.value),Y.value=0):(w.value=Math.min(0,v.value-L.value),Y.value=0)});const U=T=>T<w.value?w.value:T>Y.value?Y.value:T,se=q(),[K,de]=O(),ce=()=>{de(Date.now())},he=()=>{clearTimeout(se.value)},Se=(T,m)=>{T(B=>U(B+m))};Pa(i,(T,m)=>{if(b.value){if(p.value>=S.value)return!1;Se(u,T)}else{if(v.value>=L.value)return!1;Se(C,m)}return he(),ce(),!0}),me(K,()=>{he(),K.value&&(se.value=setTimeout(()=>{de(0)},100))});const ue=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey;const m=P.value.get(T)||{width:0,height:0,left:0,right:0,top:0};if(b.value){let B=d.value;e.rtl?m.right<d.value?B=m.right:m.right+m.width>d.value+p.value&&(B=m.right+m.width-p.value):m.left<-d.value?B=-m.left:m.left+m.width>-d.value+p.value&&(B=-(m.left+m.width-p.value)),C(0),u(U(B))}else{let B=$.value;m.top<-$.value?B=-m.top:m.top+m.height>-$.value+v.value&&(B=-(m.top+m.height-v.value)),u(0),C(U(B))}},ie=q(0),xe=q(0);We(()=>{let T,m,B,A,j,F;const $e=P.value;["top","bottom"].includes(e.tabPosition)?(T="width",A=p.value,j=S.value,F=R.value,m=e.rtl?"right":"left",B=Math.abs(d.value)):(T="height",A=v.value,j=S.value,F=N.value,m="top",B=-$.value);let Z=A;j+F>A&&j<A&&(Z=A-F);const le=o.value;if(!le.length)return[ie.value,xe.value]=[0,0];const be=le.length;let Ce=be;for(let X=0;X<be;X+=1){const Q=$e.get(le[X].key)||yt;if(Q[m]+Q[T]>B+Z){Ce=X-1;break}}let z=0;for(let X=be-1;X>=0;X-=1)if(($e.get(le[X].key)||yt)[m]<B){z=X+1;break}return[ie.value,xe.value]=[z,Ce]});const ve=()=>{var T,m,B,A,j;const F=((T=i.value)===null||T===void 0?void 0:T.offsetWidth)||0,$e=((m=i.value)===null||m===void 0?void 0:m.offsetHeight)||0,Z=((B=f.value)===null||B===void 0?void 0:B.$el)||{},le=Z.offsetWidth||0,be=Z.offsetHeight||0;y(F),_($e),I(le),J(be);const Ce=(((A=c.value)===null||A===void 0?void 0:A.offsetWidth)||0)-le,z=(((j=c.value)===null||j===void 0?void 0:j.offsetHeight)||0)-be;E(Ce),M(z),oe(()=>{const X=new Map;return o.value.forEach(Q=>{let{key:we}=Q;const fe=x.value.get(we),ge=(fe==null?void 0:fe.$el)||fe;ge&&X.set(we,{width:ge.offsetWidth,height:ge.offsetHeight,left:ge.offsetLeft,top:ge.offsetTop})}),X})},Pe=H(()=>[...o.value.slice(0,ie.value),...o.value.slice(xe.value+1)]),[Be,Ot]=O(),pe=H(()=>P.value.get(e.activeKey)),rt=q(),st=()=>{Ae.cancel(rt.value)};me([pe,b,()=>e.rtl],()=>{const T={};pe.value&&(b.value?(e.rtl?T.right=Re(pe.value.right):T.left=Re(pe.value.left),T.width=Re(pe.value.width)):(T.top=Re(pe.value.top),T.height=Re(pe.value.height))),st(),rt.value=Ae(()=>{Ot(T)})}),me([()=>e.activeKey,pe,P,b],()=>{ue()},{flush:"post"}),me([()=>e.rtl,()=>e.tabBarGutter,()=>e.activeKey,()=>o.value],()=>{ve()},{flush:"post"});const Fe=T=>{let{position:m,prefixCls:B,extra:A}=T;if(!A)return null;const j=A==null?void 0:A({position:m});return j?s("div",{class:`${B}-extra-content`},[j]):null};return Qe(()=>{he(),st()}),()=>{const{id:T,animated:m,activeKey:B,rtl:A,editable:j,locale:F,tabPosition:$e,tabBarGutter:Z,onTabClick:le}=e,{class:be,style:Ce}=a,z=l.value,X=!!Pe.value.length,Q=`${z}-nav-wrap`;let we,fe,ge,dt;b.value?A?(fe=d.value>0,we=d.value+p.value<S.value):(we=d.value<0,fe=-d.value+p.value<S.value):(ge=$.value<0,dt=-$.value+v.value<L.value);const De={};$e==="top"||$e==="bottom"?De[A?"marginRight":"marginLeft"]=typeof Z=="number"?`${Z}px`:Z:De.marginTop=typeof Z=="number"?`${Z}px`:Z;const ct=o.value.map((qe,Wt)=>{const{key:Ie}=qe;return s(xa,{id:T,prefixCls:z,key:Ie,tab:qe,style:Wt===0?void 0:De,closable:qe.closable,editable:j,active:Ie===B,removeAriaLabel:F==null?void 0:F.removeAriaLabel,ref:g(Ie),onClick:Nt=>{le(Ie,Nt)},onFocus:()=>{ue(Ie),ce(),i.value&&(A||(i.value.scrollLeft=0),i.value.scrollTop=0)}},n)});return s("div",{role:"tablist",class:W(`${z}-nav`,be),style:Ce,onKeydown:()=>{ce()}},[s(Fe,{position:"left",prefixCls:z,extra:n.leftExtra},null),s(vt,{onResize:ve},{default:()=>[s("div",{class:W(Q,{[`${Q}-ping-left`]:we,[`${Q}-ping-right`]:fe,[`${Q}-ping-top`]:ge,[`${Q}-ping-bottom`]:dt}),ref:i},[s(vt,{onResize:ve},{default:()=>[s("div",{ref:c,class:`${z}-nav-list`,style:{transform:`translate(${d.value}px, ${$.value}px)`,transition:K.value?"none":void 0}},[ct,s(It,{ref:f,prefixCls:z,locale:F,editable:j,style:r(r({},ct.length===0?void 0:De),{visibility:X?"hidden":null})},null),s("div",{class:W(`${z}-ink-bar`,{[`${z}-ink-bar-animated`]:m.inkBar}),style:Be.value},null)])]})])]}),s(Ta,D(D({},e),{},{removeAriaLabel:F==null?void 0:F.removeAriaLabel,ref:h,prefixCls:z,tabs:Pe.value,class:!X&&G.value}),Bt(n,["moreIcon"])),s(Fe,{position:"right",prefixCls:z,extra:n.rightExtra},null),s(Fe,{position:"right",prefixCls:z,extra:n.tabBarExtraContent},null)])}}}),Ia=k({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(e){const{tabs:t,prefixCls:a}=At();return()=>{const{id:n,activeKey:o,animated:l,tabPosition:i,rtl:c,destroyInactiveTabPane:h}=e,f=l.tabPane,g=a.value,x=t.value.findIndex(b=>b.key===o);return s("div",{class:`${g}-content-holder`},[s("div",{class:[`${g}-content`,`${g}-content-${i}`,{[`${g}-content-animated`]:f}],style:x&&f?{[c?"marginRight":"marginLeft"]:`-${x}00%`}:null},[t.value.map(b=>na(b.node,{key:b.key,prefixCls:g,tabKey:b.key,id:n,animated:f,active:b.key===o,destroyInactiveTabPane:h}))])])}}});var Ra={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Ea=Ra;function xt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable}))),n.forEach(function(o){Aa(e,o,a[o])})}return e}function Aa(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var it=function(t,a){var n=xt({},t,a.attrs);return s(oa,xt({},n,{icon:Ea}),null)};it.displayName="PlusOutlined";it.inheritAttrs=!1;const La=it,Ma=e=>{const{componentCls:t,motionDurationSlow:a}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${a}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${a}`}}}}},[pt(e,"slide-up"),pt(e,"slide-down")]]},Ha=Ma,Da=e=>{const{componentCls:t,tabsCardHorizontalPadding:a,tabsCardHeadBackground:n,tabsCardGutter:o,colorSplit:l}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:a,background:n,border:`${e.lineWidth}px ${e.lineType} ${l}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:e.colorPrimary,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${o}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${o}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},ka=e=>{const{componentCls:t,tabsHoverColor:a,dropdownEdgeChildVerticalPadding:n}=e;return{[`${t}-dropdown`]:r(r({},at(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${n}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":r(r({},nt),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:a}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},za=e=>{const{componentCls:t,margin:a,colorSplit:n}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:`0 0 ${a}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
|
|
2
2
|
right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
|
|
3
3
|
> div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:`${a}px`,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:e.controlHeight*1.25,[`${t}-tab`]:{padding:`${e.paddingXS}px ${e.paddingLG}px`,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:`${e.margin}px 0 0 0`},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${e.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-e.lineWidth},borderRight:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Oa=e=>{const{componentCls:t,padding:a}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px 0`,fontSize:e.fontSize}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${a}px 0`,fontSize:e.fontSizeLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXXS*1.5}px ${a}px`}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${e.borderRadius}px ${e.borderRadius}px`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${e.borderRadius}px ${e.borderRadius}px 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadius}px ${e.borderRadius}px 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadius}px 0 0 ${e.borderRadius}px`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px ${a}px ${e.paddingXXS*1.5}px`}}}}}},Wa=e=>{const{componentCls:t,tabsActiveColor:a,tabsHoverColor:n,iconCls:o,tabsHorizontalGutter:l}=e,i=`${t}-tab`;return{[i]:{position:"relative",display:"inline-flex",alignItems:"center",padding:`${e.paddingSM}px 0`,fontSize:`${e.fontSize}px`,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":r({"&:focus:not(:focus-visible), &:active":{color:a}},_t(e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-e.marginXXS},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},"&:hover":{color:n},[`&${i}-active ${i}-btn`]:{color:e.colorPrimary,textShadow:e.tabsActiveTextShadow},[`&${i}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${i}-disabled ${i}-btn, &${i}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${i}-remove ${o}`]:{margin:0},[o]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${i} + ${i}`]:{margin:{_skip_check_:!0,value:`0 0 0 ${l}px`}}}},Na=e=>{const{componentCls:t,tabsHorizontalGutter:a,iconCls:n,tabsCardGutter:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:`0 0 0 ${a}px`},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[n]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${e.marginSM}px`}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${e.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${e.marginXXS}px`},[n]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:`${o}px`},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Ga=e=>{const{componentCls:t,tabsCardHorizontalPadding:a,tabsCardHeight:n,tabsCardGutter:o,tabsHoverColor:l,tabsActiveColor:i,colorSplit:c}=e;return{[t]:r(r(r(r({},at(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:a,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:r({minWidth:`${n}px`,marginLeft:{_skip_check_:!0,value:`${o}px`},padding:`0 ${e.paddingXS}px`,background:"transparent",border:`${e.lineWidth}px ${e.lineType} ${c}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:l},"&:active, &:focus:not(:focus-visible)":{color:i}},_t(e))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.colorPrimary,pointerEvents:"none"}}),Wa(e)),{[`${t}-content`]:{position:"relative",display:"flex",width:"100%",["&-animated"]:{transition:"margin 0.3s"}},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{outline:"none",flex:"none",width:"100%"}}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},Ka=et("Tabs",e=>{const t=e.controlHeightLG,a=tt(e,{tabsHoverColor:e.colorPrimaryHover,tabsActiveColor:e.colorPrimaryActive,tabsCardHorizontalPadding:`${(t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth}px ${e.padding}px`,tabsCardHeight:t,tabsCardGutter:e.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:e.colorFillAlter,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[Oa(a),Na(a),za(a),ka(a),Da(a),Ga(a),Ha(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));let Ct=0;const Lt=()=>({prefixCls:{type:String},id:{type:String},popupClassName:String,getPopupContainer:ee(),activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:ke(),animated:ia([Boolean,Object]),renderTabBar:ee(),tabBarGutter:{type:Number},tabBarStyle:Le(),tabPosition:ke(),destroyInactiveTabPane:la(),hideAdd:Boolean,type:ke(),size:ke(),centered:Boolean,onEdit:ee(),onChange:ee(),onTabClick:ee(),onTabScroll:ee(),"onUpdate:activeKey":ee(),locale:Le(),onPrevClick:ee(),onNextClick:ee(),tabBarExtraContent:re.any});function Xa(e){return e.map(t=>{if(ra(t)){const a=r({},t.props||{});for(const[b,d]of Object.entries(a))delete a[b],a[sa(b)]=d;const n=t.children||{},o=t.key!==void 0?t.key:void 0,{tab:l=n.tab,disabled:i,forceRender:c,closable:h,animated:f,active:g,destroyInactiveTabPane:x}=a;return r(r({key:o},a),{node:t,closeIcon:n.closeIcon,tab:l,disabled:i===""||i,forceRender:c===""||c,closable:h===""||h,animated:f===""||f,active:g===""||g,destroyInactiveTabPane:x===""||x})}return null}).filter(t=>t)}const ja=k({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:r(r({},Me(Lt(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{tabs:da()}),slots:Object,setup(e,t){let{attrs:a,slots:n}=t;ze(e.onPrevClick===void 0&&e.onNextClick===void 0,"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),ze(e.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),ze(n.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");const{prefixCls:o,direction:l,size:i,rootPrefixCls:c,getPopupContainer:h}=ye("tabs",e),[f,g]=Ka(o),x=H(()=>l.value==="rtl"),b=H(()=>{const{animated:v,tabPosition:_}=e;return v===!1||["left","right"].includes(_)?{inkBar:!1,tabPane:!1}:v===!0?{inkBar:!0,tabPane:!0}:r({inkBar:!0,tabPane:!1},typeof v=="object"?v:{})}),[d,u]=O(!1);Ne(()=>{u(ca())});const[$,C]=bt(()=>{var v;return(v=e.tabs[0])===null||v===void 0?void 0:v.key},{value:H(()=>e.activeKey),defaultValue:e.defaultActiveKey}),[S,E]=O(()=>e.tabs.findIndex(v=>v.key===$.value));We(()=>{var v;let _=e.tabs.findIndex(R=>R.key===$.value);_===-1&&(_=Math.max(0,Math.min(S.value,e.tabs.length-1)),C((v=e.tabs[_])===null||v===void 0?void 0:v.key)),E(_)});const[L,M]=bt(null,{value:H(()=>e.id)}),p=H(()=>d.value&&!["left","right"].includes(e.tabPosition)?"top":e.tabPosition);Ne(()=>{e.id||(M(`rc-tabs-${Ct}`),Ct+=1)});const y=(v,_)=>{var R,I;(R=e.onTabClick)===null||R===void 0||R.call(e,v,_);const N=v!==$.value;C(v),N&&((I=e.onChange)===null||I===void 0||I.call(e,v))};return Et({tabs:H(()=>e.tabs),prefixCls:o}),()=>{const{id:v,type:_,tabBarGutter:R,tabBarStyle:I,locale:N,destroyInactiveTabPane:J,renderTabBar:te=n.renderTabBar,onTabScroll:oe,hideAdd:P,centered:G}=e,w={id:L.value,activeKey:$.value,animated:b.value,tabPosition:p.value,rtl:x.value,mobile:d.value};let Y;_==="editable-card"&&(Y={onEdit:(de,ce)=>{let{key:he,event:Se}=ce;var ue;(ue=e.onEdit)===null||ue===void 0||ue.call(e,de==="add"?Se:he,de)},removeIcon:()=>s(ua,null,null),addIcon:n.addIcon?n.addIcon:()=>s(La,null,null),showAdd:P!==!0});let U;const se=r(r({},w),{moreTransitionName:`${c.value}-slide-up`,editable:Y,locale:N,tabBarGutter:R,onTabClick:y,onTabScroll:oe,style:I,getPopupContainer:h.value,popupClassName:W(e.popupClassName,g.value)});te?U=te(r(r({},se),{DefaultTabBar:St})):U=s(St,se,Bt(n,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));const K=o.value;return f(s("div",D(D({},a),{},{id:v,class:W(K,`${K}-${p.value}`,{[g.value]:!0,[`${K}-${i.value}`]:i.value,[`${K}-card`]:["card","editable-card"].includes(_),[`${K}-editable-card`]:_==="editable-card",[`${K}-centered`]:G,[`${K}-mobile`]:d.value,[`${K}-editable`]:_==="editable-card",[`${K}-rtl`]:x.value},a.class)}),[U,s(Ia,D(D({destroyInactiveTabPane:J},w),{},{animated:b.value}),null)]))}}}),Te=k({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:Me(Lt(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:Object,setup(e,t){let{attrs:a,slots:n,emit:o}=t;const l=i=>{o("update:activeKey",i),o("change",i)};return()=>{var i;const c=Xa(Pt((i=n.default)===null||i===void 0?void 0:i.call(n)));return s(ja,D(D(D({},ot(e,["onUpdate:activeKey"])),a),{},{onChange:l,tabs:c}),n)}}}),Fa=()=>({tab:re.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),Je=k({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:Fa(),slots:Object,setup(e,t){let{attrs:a,slots:n}=t;const o=ne(e.forceRender);me([()=>e.active,()=>e.destroyInactiveTabPane],()=>{e.active?o.value=!0:e.destroyInactiveTabPane&&(o.value=!1)},{immediate:!0});const l=H(()=>e.active?{}:e.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{var i;const{prefixCls:c,forceRender:h,id:f,active:g,tabKey:x}=e;return s("div",{id:f&&`${f}-panel-${x}`,role:"tabpanel",tabindex:g?0:-1,"aria-labelledby":f&&`${f}-tab-${x}`,"aria-hidden":!g,style:[l.value,a.style],class:[`${c}-tabpane`,g&&`${c}-tabpane-active`,a.class]},[(g||o.value||h)&&((i=n.default)===null||i===void 0?void 0:i.call(n))])}}});Te.TabPane=Je;Te.install=function(e){return e.component(Te.name,Te),e.component(Je.name,Je),e};const qa=e=>{const{antCls:t,componentCls:a,cardHeadHeight:n,cardPaddingBase:o,cardHeadTabsMarginBottom:l}=e;return r(r({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:`0 ${o}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},Ge()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":r(r({display:"inline-block",flex:1},nt),{[`
|
|
4
4
|
> ${a}-typography,
|
|
@@ -17,4 +17,4 @@ import{dL as ut,dM as Tt,dN as Gt,dO as Kt,dP as Xt,dQ as jt,dR as Ft,dS as qt,N
|
|
|
17
17
|
${i},
|
|
18
18
|
${c}
|
|
19
19
|
`]:r({},dn(e))}}},He=et("Skeleton",e=>{const{componentCls:t}=e,a=tt(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:e.controlHeight*1.5,skeletonTitleHeight:e.controlHeight/2,skeletonBlockRadius:e.borderRadiusSM,skeletonParagraphLineHeight:e.controlHeight/2,skeletonParagraphMarginTop:e.marginLG+e.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[bn(a)]},e=>{const{colorFillContent:t,colorFill:a}=e;return{color:t,colorGradientEnd:a}}),fn=()=>({active:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},prefixCls:String,avatar:{type:[Boolean,Object],default:void 0},title:{type:[Boolean,Object],default:void 0},paragraph:{type:[Boolean,Object],default:void 0},round:{type:Boolean,default:void 0}});function Ze(e){return e&&typeof e=="object"?e:{}}function gn(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function hn(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function $n(e,t){const a={};return(!e||!t)&&(a.width="61%"),!e&&t?a.rows=3:a.rows=2,a}const mn=k({compatConfig:{MODE:3},name:"ASkeleton",props:Me(fn(),{avatar:!1,title:!0,paragraph:!0}),setup(e,t){let{slots:a}=t;const{prefixCls:n,direction:o}=ye("skeleton",e),[l,i]=He(n);return()=>{var c;const{loading:h,avatar:f,title:g,paragraph:x,active:b,round:d}=e,u=n.value;if(h||e.loading===void 0){const $=!!f||f==="",C=!!g||g==="",S=!!x||x==="";let E;if($){const p=r(r({prefixCls:`${u}-avatar`},gn(C,S)),Ze(f));E=s("div",{class:`${u}-header`},[s(Xe,p,null)])}let L;if(C||S){let p;if(C){const v=r(r({prefixCls:`${u}-title`},hn($,S)),Ze(g));p=s(lt,v,null)}let y;if(S){const v=r(r({prefixCls:`${u}-paragraph`},$n($,C)),Ze(x));y=s(rn,v,null)}L=s("div",{class:`${u}-content`},[p,y])}const M=W(u,{[`${u}-with-avatar`]:$,[`${u}-active`]:b,[`${u}-rtl`]:o.value==="rtl",[`${u}-round`]:d,[i.value]:!0});return l(s("div",{class:M},[E,L]))}return(c=a.default)===null||c===void 0?void 0:c.call(a)}}}),V=mn,yn=()=>r(r({},Ke()),{size:String,block:Boolean}),Sn=k({compatConfig:{MODE:3},name:"ASkeletonButton",props:Me(yn(),{size:"default"}),setup(e){const{prefixCls:t}=ye("skeleton",e),[a,n]=He(t),o=H(()=>W(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},n.value));return()=>a(s("div",{class:o.value},[s(Xe,D(D({},e),{},{prefixCls:`${t.value}-button`}),null)]))}}),Ht=Sn,xn=k({compatConfig:{MODE:3},name:"ASkeletonInput",props:r(r({},ot(Ke(),["shape"])),{size:String,block:Boolean}),setup(e){const{prefixCls:t}=ye("skeleton",e),[a,n]=He(t),o=H(()=>W(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},n.value));return()=>a(s("div",{class:o.value},[s(Xe,D(D({},e),{},{prefixCls:`${t.value}-input`}),null)]))}}),Dt=xn,Cn="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",wn=k({compatConfig:{MODE:3},name:"ASkeletonImage",props:ot(Ke(),["size","shape","active"]),setup(e){const{prefixCls:t}=ye("skeleton",e),[a,n]=He(t),o=H(()=>W(t.value,`${t.value}-element`,n.value));return()=>a(s("div",{class:o.value},[s("div",{class:`${t.value}-image`},[s("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",class:`${t.value}-image-svg`},[s("path",{d:Cn,class:`${t.value}-image-path`},null)])])]))}}),kt=wn,Tn=()=>r(r({},Ke()),{shape:String}),_n=k({compatConfig:{MODE:3},name:"ASkeletonAvatar",props:Me(Tn(),{size:"default",shape:"circle"}),setup(e){const{prefixCls:t}=ye("skeleton",e),[a,n]=He(t),o=H(()=>W(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active},n.value));return()=>a(s("div",{class:o.value},[s(Xe,D(D({},e),{},{prefixCls:`${t.value}-avatar`}),null)]))}}),zt=_n;V.Button=Ht;V.Avatar=zt;V.Input=Dt;V.Image=kt;V.Title=lt;V.install=function(e){return e.component(V.name,V),e.component(V.Button.name,Ht),e.component(V.Avatar.name,zt),e.component(V.Input.name,Dt),e.component(V.Image.name,kt),e.component(V.Title.name,lt),e};const{TabPane:Pn}=Te,Bn=()=>({prefixCls:String,title:re.any,extra:re.any,bordered:{type:Boolean,default:!0},bodyStyle:{type:Object,default:void 0},headStyle:{type:Object,default:void 0},loading:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},type:{type:String},size:{type:String},actions:re.any,tabList:{type:Array},tabBarExtraContent:re.any,activeTabKey:String,defaultActiveTabKey:String,cover:re.any,onTabChange:{type:Function}}),In=k({compatConfig:{MODE:3},name:"ACard",inheritAttrs:!1,props:Bn(),slots:Object,setup(e,t){let{slots:a,attrs:n}=t;const{prefixCls:o,direction:l,size:i}=ye("card",e),[c,h]=tn(o),f=b=>b.map((u,$)=>ft(u)&&!ba(u)||!ft(u)?s("li",{style:{width:`${100/b.length}%`},key:`action-${$}`},[s("span",null,[u])]):null),g=b=>{var d;(d=e.onTabChange)===null||d===void 0||d.call(e,b)},x=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d;return b.forEach(u=>{u&&fa(u.type)&&u.type.__ANT_CARD_GRID&&(d=!0)}),d};return()=>{var b,d,u,$,C,S;const{headStyle:E={},bodyStyle:L={},loading:M,bordered:p=!0,type:y,tabList:v,hoverable:_,activeTabKey:R,defaultActiveTabKey:I,tabBarExtraContent:N=Ee((b=a.tabBarExtraContent)===null||b===void 0?void 0:b.call(a)),title:J=Ee((d=a.title)===null||d===void 0?void 0:d.call(a)),extra:te=Ee((u=a.extra)===null||u===void 0?void 0:u.call(a)),actions:oe=Ee(($=a.actions)===null||$===void 0?void 0:$.call(a)),cover:P=Ee((C=a.cover)===null||C===void 0?void 0:C.call(a))}=e,G=Pt((S=a.default)===null||S===void 0?void 0:S.call(a)),w=o.value,Y={[`${w}`]:!0,[h.value]:!0,[`${w}-loading`]:M,[`${w}-bordered`]:p,[`${w}-hoverable`]:!!_,[`${w}-contain-grid`]:x(G),[`${w}-contain-tabs`]:v&&v.length,[`${w}-${i.value}`]:i.value,[`${w}-type-${y}`]:!!y,[`${w}-rtl`]:l.value==="rtl"},U=s(V,{loading:!0,active:!0,paragraph:{rows:4},title:!1},{default:()=>[G]}),se=R!==void 0,K={size:"large",[se?"activeKey":"defaultActiveKey"]:se?R:I,onChange:g,class:`${w}-head-tabs`};let de;const ce=v&&v.length?s(Te,K,{default:()=>[v.map(ie=>{const{tab:xe,slots:ve}=ie,Pe=ve==null?void 0:ve.tab;ze(!ve,"Card","tabList slots is deprecated, Please use `customTab` instead.");let Be=xe!==void 0?xe:a[Pe]?a[Pe](ie):null;return Be=pa(a,"customTab",ie,()=>[Be]),s(Pn,{tab:Be,key:ie.key,disabled:ie.disabled},null)})],rightExtra:N?()=>N:null}):null;(J||te||ce)&&(de=s("div",{class:`${w}-head`,style:E},[s("div",{class:`${w}-head-wrapper`},[J&&s("div",{class:`${w}-head-title`},[J]),te&&s("div",{class:`${w}-extra`},[te])]),ce]));const he=P?s("div",{class:`${w}-cover`},[P]):null,Se=s("div",{class:`${w}-body`,style:L},[M?U:G]),ue=oe&&oe.length?s("ul",{class:`${w}-actions`},[f(oe)]):null;return c(s("div",D(D({ref:"cardContainerRef"},n),{},{class:[Y,n.class]}),[de,he,G&&G.length?Se:null,ue]))}}}),En=In;export{Je as A,En as C,V as S,Te as T,Ht as a,zt as b,Dt as c,kt as d,lt as e};
|
|
20
|
-
//# sourceMappingURL=Card.
|
|
20
|
+
//# sourceMappingURL=Card.6caecaa4.js.map
|