prefect 3.6.16.dev4__py3-none-any.whl → 3.6.16.dev5__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.
Files changed (121) hide show
  1. prefect/__init__.py +5 -4
  2. prefect/_build_info.py +3 -3
  3. prefect/_experimental/plugins/__init__.py +1 -1
  4. prefect/cli/deploy/_core.py +8 -1
  5. prefect/client/orchestration/routes.py +0 -3
  6. prefect/server/api/admin.py +0 -60
  7. prefect/server/api/deployments.py +267 -1
  8. prefect/server/api/flow_runs.py +139 -0
  9. prefect/server/api/flows.py +49 -1
  10. prefect/server/models/deployments.py +53 -0
  11. prefect/server/models/flow_runs.py +42 -0
  12. prefect/server/models/flows.py +40 -1
  13. prefect/server/schemas/filters.py +5 -0
  14. prefect/server/schemas/responses.py +50 -0
  15. prefect/server/ui/assets/404-DG3AGnT0.js +2 -0
  16. prefect/server/ui/assets/{404-K6PaZiye.js.map → 404-DG3AGnT0.js.map} +1 -1
  17. prefect/server/ui/assets/{AppRouterView-DwDQtyvQ.js → AppRouterView-C0FcJnhj.js} +2 -2
  18. prefect/server/ui/assets/{AppRouterView-DwDQtyvQ.js.map → AppRouterView-C0FcJnhj.js.map} +1 -1
  19. prefect/server/ui/assets/{Artifact-C7r-iu_n.js → Artifact-sGuFYSde.js} +2 -2
  20. prefect/server/ui/assets/{Artifact-C7r-iu_n.js.map → Artifact-sGuFYSde.js.map} +1 -1
  21. prefect/server/ui/assets/{ArtifactKey-BEMo4yoK.js → ArtifactKey-9Q9Vx-fc.js} +2 -2
  22. prefect/server/ui/assets/{ArtifactKey-BEMo4yoK.js.map → ArtifactKey-9Q9Vx-fc.js.map} +1 -1
  23. prefect/server/ui/assets/{Artifacts-jFQdgIdh.js → Artifacts-B53vn988.js} +2 -2
  24. prefect/server/ui/assets/{Artifacts-jFQdgIdh.js.map → Artifacts-B53vn988.js.map} +1 -1
  25. prefect/server/ui/assets/{Automation-CoPk3WhK.js → Automation-BaE0He4N.js} +2 -2
  26. prefect/server/ui/assets/{Automation-CoPk3WhK.js.map → Automation-BaE0He4N.js.map} +1 -1
  27. prefect/server/ui/assets/{AutomationCreate-DC7QapQA.js → AutomationCreate-CYfB5QDE.js} +2 -2
  28. prefect/server/ui/assets/{AutomationCreate-DC7QapQA.js.map → AutomationCreate-CYfB5QDE.js.map} +1 -1
  29. prefect/server/ui/assets/{AutomationEdit-DEqdGB6r.js → AutomationEdit-CUrFmfaN.js} +2 -2
  30. prefect/server/ui/assets/{AutomationEdit-DEqdGB6r.js.map → AutomationEdit-CUrFmfaN.js.map} +1 -1
  31. prefect/server/ui/assets/{AutomationWizard.vue_vue_type_script_setup_true_lang-Cx_Qey3p.js → AutomationWizard.vue_vue_type_script_setup_true_lang-CRRm91Zq.js} +2 -2
  32. prefect/server/ui/assets/{AutomationWizard.vue_vue_type_script_setup_true_lang-Cx_Qey3p.js.map → AutomationWizard.vue_vue_type_script_setup_true_lang-CRRm91Zq.js.map} +1 -1
  33. prefect/server/ui/assets/{Automations-BSljFu5U.js → Automations--PyqO2IS.js} +2 -2
  34. prefect/server/ui/assets/{Automations-BSljFu5U.js.map → Automations--PyqO2IS.js.map} +1 -1
  35. prefect/server/ui/assets/{BlockEdit-PBHxWs2I.js → BlockEdit-BnyuldVn.js} +2 -2
  36. prefect/server/ui/assets/{BlockEdit-PBHxWs2I.js.map → BlockEdit-BnyuldVn.js.map} +1 -1
  37. prefect/server/ui/assets/{BlockView-D0GWTwFv.js → BlockView-B2WHGgyQ.js} +2 -2
  38. prefect/server/ui/assets/{BlockView-D0GWTwFv.js.map → BlockView-B2WHGgyQ.js.map} +1 -1
  39. prefect/server/ui/assets/{Blocks-D_9GkxFk.js → Blocks-CCtj7wrz.js} +2 -2
  40. prefect/server/ui/assets/{Blocks-D_9GkxFk.js.map → Blocks-CCtj7wrz.js.map} +1 -1
  41. prefect/server/ui/assets/{BlocksCatalog-kqMThRld.js → BlocksCatalog-CMTvZPfa.js} +2 -2
  42. prefect/server/ui/assets/{BlocksCatalog-kqMThRld.js.map → BlocksCatalog-CMTvZPfa.js.map} +1 -1
  43. prefect/server/ui/assets/{BlocksCatalogCreate-DMhVoHqt.js → BlocksCatalogCreate-BvAnp5Nv.js} +2 -2
  44. prefect/server/ui/assets/{BlocksCatalogCreate-DMhVoHqt.js.map → BlocksCatalogCreate-BvAnp5Nv.js.map} +1 -1
  45. prefect/server/ui/assets/{BlocksCatalogView-30zvf2Zf.js → BlocksCatalogView-dqnPzpRL.js} +2 -2
  46. prefect/server/ui/assets/{BlocksCatalogView-30zvf2Zf.js.map → BlocksCatalogView-dqnPzpRL.js.map} +1 -1
  47. prefect/server/ui/assets/{ConcurrencyLimit-BW7Bnl17.js → ConcurrencyLimit-ontTM1oT.js} +2 -2
  48. prefect/server/ui/assets/{ConcurrencyLimit-BW7Bnl17.js.map → ConcurrencyLimit-ontTM1oT.js.map} +1 -1
  49. prefect/server/ui/assets/{ConcurrencyLimits-Ct9fPcPd.js → ConcurrencyLimits-Ctczt53J.js} +2 -2
  50. prefect/server/ui/assets/{ConcurrencyLimits-Ct9fPcPd.js.map → ConcurrencyLimits-Ctczt53J.js.map} +1 -1
  51. prefect/server/ui/assets/{Dashboard-C9HbsW9C.js → Dashboard-o-S3xTqz.js} +2 -2
  52. prefect/server/ui/assets/{Dashboard-C9HbsW9C.js.map → Dashboard-o-S3xTqz.js.map} +1 -1
  53. prefect/server/ui/assets/{Deployment-BnhoLgTP.js → Deployment-DY8bGLAc.js} +2 -2
  54. prefect/server/ui/assets/{Deployment-BnhoLgTP.js.map → Deployment-DY8bGLAc.js.map} +1 -1
  55. prefect/server/ui/assets/{DeploymentDuplicate-B8_LrQLl.js → DeploymentDuplicate-CMMz8lrd.js} +2 -2
  56. prefect/server/ui/assets/{DeploymentDuplicate-B8_LrQLl.js.map → DeploymentDuplicate-CMMz8lrd.js.map} +1 -1
  57. prefect/server/ui/assets/{DeploymentEdit-B4W9AHKw.js → DeploymentEdit-BlRSxdKn.js} +2 -2
  58. prefect/server/ui/assets/{DeploymentEdit-B4W9AHKw.js.map → DeploymentEdit-BlRSxdKn.js.map} +1 -1
  59. prefect/server/ui/assets/Deployments-lcIIbm1i.js +2 -0
  60. prefect/server/ui/assets/Deployments-lcIIbm1i.js.map +1 -0
  61. prefect/server/ui/assets/{Event-DQwLIzdd.js → Event-0j-HIfsu.js} +2 -2
  62. prefect/server/ui/assets/{Event-DQwLIzdd.js.map → Event-0j-HIfsu.js.map} +1 -1
  63. prefect/server/ui/assets/{Events-D62-llVt.js → Events-UuQjwz0L.js} +2 -2
  64. prefect/server/ui/assets/{Events-D62-llVt.js.map → Events-UuQjwz0L.js.map} +1 -1
  65. prefect/server/ui/assets/{Flow-Cq4u3Hyv.js → Flow-RmpH3LjK.js} +2 -2
  66. prefect/server/ui/assets/{Flow-Cq4u3Hyv.js.map → Flow-RmpH3LjK.js.map} +1 -1
  67. prefect/server/ui/assets/{FlowRun-3dhHtN2i.js → FlowRun-C3yAz7L4.js} +2 -2
  68. prefect/server/ui/assets/{FlowRun-3dhHtN2i.js.map → FlowRun-C3yAz7L4.js.map} +1 -1
  69. prefect/server/ui/assets/{FlowRunCreate-BwLIWkPS.js → FlowRunCreate-UNkalFWW.js} +2 -2
  70. prefect/server/ui/assets/{FlowRunCreate-BwLIWkPS.js.map → FlowRunCreate-UNkalFWW.js.map} +1 -1
  71. prefect/server/ui/assets/{Flows-DDhFukcU.js → Flows-BrSJzZzX.js} +2 -2
  72. prefect/server/ui/assets/{Flows-DDhFukcU.js.map → Flows-BrSJzZzX.js.map} +1 -1
  73. prefect/server/ui/assets/{Runs-CAwq35x9.js → Runs-DlwKZ4nz.js} +2 -2
  74. prefect/server/ui/assets/{Runs-CAwq35x9.js.map → Runs-DlwKZ4nz.js.map} +1 -1
  75. prefect/server/ui/assets/{RunsPageWithDefaultFilter-VUJP7e64-CnkYar0q.js → RunsPageWithDefaultFilter-VUJP7e64-C4FVTl9j.js} +2 -2
  76. prefect/server/ui/assets/{RunsPageWithDefaultFilter-VUJP7e64-CnkYar0q.js.map → RunsPageWithDefaultFilter-VUJP7e64-C4FVTl9j.js.map} +1 -1
  77. prefect/server/ui/assets/{Settings-DBdmXrdg.js → Settings-CrsUm3c9.js} +2 -2
  78. prefect/server/ui/assets/{Settings-DBdmXrdg.js.map → Settings-CrsUm3c9.js.map} +1 -1
  79. prefect/server/ui/assets/{TaskRun-DWfpXthA.js → TaskRun-BPnbcZPW.js} +2 -2
  80. prefect/server/ui/assets/{TaskRun-DWfpXthA.js.map → TaskRun-BPnbcZPW.js.map} +1 -1
  81. prefect/server/ui/assets/{Unauthenticated-C8GRLLPD.js → Unauthenticated-2pBvXwGA.js} +2 -2
  82. prefect/server/ui/assets/{Unauthenticated-C8GRLLPD.js.map → Unauthenticated-2pBvXwGA.js.map} +1 -1
  83. prefect/server/ui/assets/{Variables-EylxYrv9.js → Variables-Bjlboyhp.js} +2 -2
  84. prefect/server/ui/assets/{Variables-EylxYrv9.js.map → Variables-Bjlboyhp.js.map} +1 -1
  85. prefect/server/ui/assets/{WorkPool-CfgEuRe7.js → WorkPool-lRyupHlB.js} +2 -2
  86. prefect/server/ui/assets/{WorkPool-CfgEuRe7.js.map → WorkPool-lRyupHlB.js.map} +1 -1
  87. prefect/server/ui/assets/{WorkPoolCreate-C4DC7Wtp.js → WorkPoolCreate-_lyGs-1E.js} +2 -2
  88. prefect/server/ui/assets/{WorkPoolCreate-C4DC7Wtp.js.map → WorkPoolCreate-_lyGs-1E.js.map} +1 -1
  89. prefect/server/ui/assets/{WorkPoolEdit-D1PFei0l.js → WorkPoolEdit-FAAVeANy.js} +2 -2
  90. prefect/server/ui/assets/{WorkPoolEdit-D1PFei0l.js.map → WorkPoolEdit-FAAVeANy.js.map} +1 -1
  91. prefect/server/ui/assets/{WorkPoolQueue-CisaZ0pF.js → WorkPoolQueue-CRctEElk.js} +2 -2
  92. prefect/server/ui/assets/{WorkPoolQueue-CisaZ0pF.js.map → WorkPoolQueue-CRctEElk.js.map} +1 -1
  93. prefect/server/ui/assets/{WorkPoolQueueCreate-30kVnfeo.js → WorkPoolQueueCreate-BDTuIRGA.js} +2 -2
  94. prefect/server/ui/assets/{WorkPoolQueueCreate-30kVnfeo.js.map → WorkPoolQueueCreate-BDTuIRGA.js.map} +1 -1
  95. prefect/server/ui/assets/{WorkPoolQueueEdit-DBsgToTG.js → WorkPoolQueueEdit-qqk5OXB2.js} +2 -2
  96. prefect/server/ui/assets/{WorkPoolQueueEdit-DBsgToTG.js.map → WorkPoolQueueEdit-qqk5OXB2.js.map} +1 -1
  97. prefect/server/ui/assets/{WorkPools-Dt8Bj0YS.js → WorkPools-CLW1U3iu.js} +2 -2
  98. prefect/server/ui/assets/{WorkPools-Dt8Bj0YS.js.map → WorkPools-CLW1U3iu.js.map} +1 -1
  99. prefect/server/ui/assets/{WorkQueueToWorkPoolQueueRedirect-DJZTvjVT-D9qSz7kl.js → WorkQueueToWorkPoolQueueRedirect-DJZTvjVT-B__6dQYl.js} +2 -2
  100. prefect/server/ui/assets/{WorkQueueToWorkPoolQueueRedirect-DJZTvjVT-D9qSz7kl.js.map → WorkQueueToWorkPoolQueueRedirect-DJZTvjVT-B__6dQYl.js.map} +1 -1
  101. prefect/server/ui/assets/{index-C9FkjDpZ.js → index-DS86r6aC.js} +4 -4
  102. prefect/server/ui/assets/{index-C9FkjDpZ.js.map → index-DS86r6aC.js.map} +1 -1
  103. prefect/server/ui/assets/{mapper-NwaeXCHc.js → mapper-Bm5aN_dh.js} +2 -2
  104. prefect/server/ui/assets/{mapper-NwaeXCHc.js.map → mapper-Bm5aN_dh.js.map} +1 -1
  105. prefect/server/ui/assets/useCan-DzvhQ1fT.js +2 -0
  106. prefect/server/ui/assets/{useCan-DDmEnNFg.js.map → useCan-DzvhQ1fT.js.map} +1 -1
  107. prefect/server/ui/assets/{usePageTitle-B0Hz_El0.js → usePageTitle-BXVkHaWQ.js} +2 -2
  108. prefect/server/ui/assets/{usePageTitle-B0Hz_El0.js.map → usePageTitle-BXVkHaWQ.js.map} +1 -1
  109. prefect/server/ui/assets/{usePrefectApi-B2fKZYDa.js → usePrefectApi-Cn-hX9ms.js} +2 -2
  110. prefect/server/ui/assets/{usePrefectApi-B2fKZYDa.js.map → usePrefectApi-Cn-hX9ms.js.map} +1 -1
  111. prefect/server/ui/index.html +1 -1
  112. prefect/utilities/collections.py +5 -1
  113. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/METADATA +1 -1
  114. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/RECORD +117 -117
  115. prefect/server/ui/assets/404-K6PaZiye.js +0 -2
  116. prefect/server/ui/assets/Deployments-DAHDVCIs.js +0 -2
  117. prefect/server/ui/assets/Deployments-DAHDVCIs.js.map +0 -1
  118. prefect/server/ui/assets/useCan-DDmEnNFg.js +0 -2
  119. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/WHEEL +0 -0
  120. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/entry_points.txt +0 -0
  121. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/licenses/LICENSE +0 -0
@@ -1,2 +1,2 @@
1
- import{cT as n,cU as a,cV as i,cW as o}from"./index-C9FkjDpZ.js";class s extends n{trigger;actions;constructor(e){super(e),this.trigger=e.trigger,this.actions=e.actions}}function l(t){return!!t.trigger}const r=function(t){return new s({id:t.id,name:t.name,description:t.description,enabled:t.enabled,trigger:this.map("AutomationTriggerResponse",t.trigger,"AutomationTrigger"),actions:this.map("AutomationActionResponse",t.actions,"AutomationAction")})},g=function(t){return{name:t.name,description:t.description,enabled:t.enabled,trigger:this.map("AutomationTrigger",t.trigger,"AutomationTriggerRequest"),actions:this.map("AutomationAction",t.actions,"AutomationActionRequest")}},m=function(t){return{token:t.token,expiration:this.map("string",t.expiration,"Date"),issued:new Date}},p=t=>{switch(t){case"workers":return"access:workers";case"artifacts":return"access:artifacts";default:return null}},c=function(t){return{apiUrl:t.api_url,csrfEnabled:t.csrf_enabled,auth:t.auth,flags:this.map("FlagResponse",t.flags,"FeatureFlag").filter(a)}},u={...i,FlagResponse:{FeatureFlag:p},SettingsResponse:{Settings:c},CsrfTokenResponse:{CsrfToken:m},AutomationResponse:{Automation:r},AutomationCreate:{AutomationCreateRequest:g}},f=new o(u);export{s as A,l as i,f as m};
2
- //# sourceMappingURL=mapper-NwaeXCHc.js.map
1
+ import{cT as n,cU as a,cV as i,cW as o}from"./index-DS86r6aC.js";class s extends n{trigger;actions;constructor(e){super(e),this.trigger=e.trigger,this.actions=e.actions}}function l(t){return!!t.trigger}const r=function(t){return new s({id:t.id,name:t.name,description:t.description,enabled:t.enabled,trigger:this.map("AutomationTriggerResponse",t.trigger,"AutomationTrigger"),actions:this.map("AutomationActionResponse",t.actions,"AutomationAction")})},g=function(t){return{name:t.name,description:t.description,enabled:t.enabled,trigger:this.map("AutomationTrigger",t.trigger,"AutomationTriggerRequest"),actions:this.map("AutomationAction",t.actions,"AutomationActionRequest")}},m=function(t){return{token:t.token,expiration:this.map("string",t.expiration,"Date"),issued:new Date}},p=t=>{switch(t){case"workers":return"access:workers";case"artifacts":return"access:artifacts";default:return null}},c=function(t){return{apiUrl:t.api_url,csrfEnabled:t.csrf_enabled,auth:t.auth,flags:this.map("FlagResponse",t.flags,"FeatureFlag").filter(a)}},u={...i,FlagResponse:{FeatureFlag:p},SettingsResponse:{Settings:c},CsrfTokenResponse:{CsrfToken:m},AutomationResponse:{Automation:r},AutomationCreate:{AutomationCreateRequest:g}},f=new o(u);export{s as A,l as i,f as m};
2
+ //# sourceMappingURL=mapper-Bm5aN_dh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapper-NwaeXCHc.js","sources":["../../src/types/automation.ts","../../src/maps/automation.ts","../../src/maps/csrfToken.ts","../../src/maps/featureFlag.ts","../../src/maps/uiSettings.ts","../../src/maps/index.ts","../../src/services/mapper.ts"],"sourcesContent":["import { AutomationAction, AutomationTrigger, Automation as BaseAutomation, IAutomation as BaseIAutomation } from '@prefecthq/prefect-ui-library'\n\nexport interface IAutomation extends BaseIAutomation {\n trigger: AutomationTrigger,\n actions: AutomationAction[],\n}\n\nexport class Automation extends BaseAutomation {\n public trigger: AutomationTrigger\n public actions: AutomationAction[]\n\n public constructor(automation: IAutomation) {\n super(automation)\n this.trigger = automation.trigger\n this.actions = automation.actions\n }\n}\n\nexport type AutomationFormValues = {\n id?: string,\n name?: string,\n description?: string,\n trigger?: AutomationTrigger,\n actions?: AutomationAction[],\n enabled?: boolean,\n}\n\nexport type AutomationActionFormValues = AutomationFormValues & {\n trigger: AutomationTrigger,\n}\n\nexport function isAutomationActionFormValues(value: AutomationFormValues): value is AutomationActionFormValues {\n return Boolean(value.trigger)\n}","import { MapFunction } from '@/services/mapper'\nimport { Automation } from '@/types/automation'\nimport { AutomationCreate } from '@/types/automationCreate'\nimport { AutomationCreateRequest } from '@/types/automationCreateRequest'\nimport { AutomationResponse } from '@/types/automationResponse'\n\nexport const mapAutomationResponseToAutomation: MapFunction<AutomationResponse, Automation> = function(source) {\n return new Automation({\n id: source.id,\n name: source.name,\n description: source.description,\n enabled: source.enabled,\n trigger: this.map('AutomationTriggerResponse', source.trigger, 'AutomationTrigger'),\n actions: this.map('AutomationActionResponse', source.actions, 'AutomationAction'),\n })\n}\n\nexport const mapAutomationCreateToAutomationCreateRequest: MapFunction<AutomationCreate, AutomationCreateRequest> = function(source) {\n return {\n name: source.name,\n description: source.description,\n enabled: source.enabled,\n trigger: this.map('AutomationTrigger', source.trigger, 'AutomationTriggerRequest'),\n actions: this.map('AutomationAction', source.actions, 'AutomationActionRequest'),\n }\n}","import { CsrfToken } from '@/models/CsrfToken'\nimport { MapFunction } from '@/services/mapper'\nimport { CsrfTokenResponse } from '@/types/csrfTokenResponse'\n\nexport const mapCsrfTokenResponseToCsrfToken: MapFunction<CsrfTokenResponse, CsrfToken> = function(source) {\n return {\n token: source.token,\n expiration: this.map('string', source.expiration, 'Date'),\n issued: new Date(),\n }\n}\n\n","import { WorkspaceFeatureFlag } from '@prefecthq/prefect-ui-library'\nimport { MapFunction } from '@/services/mapper'\nimport { FlagResponse } from '@/types/flagResponse'\nimport { FeatureFlag } from '@/utilities/permissions'\n\nexport const mapFlagResponseToFeatureFlag: MapFunction<FlagResponse, FeatureFlag | WorkspaceFeatureFlag | null> = (source) => {\n switch (source) {\n case 'workers':\n return 'access:workers'\n case 'artifacts':\n return 'access:artifacts'\n default:\n // we want to have a ts error here but we don't want to break the app so returning null rather than throwing an error\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const exhaustiveCheck: never = source\n return null\n }\n}\n","import { isNotNullish } from '@prefecthq/prefect-ui-library'\nimport { MapFunction } from '@/services/mapper'\nimport { Settings } from '@/services/uiSettings'\nimport { SettingsResponse } from '@/types/settingsResponse'\n\nexport const mapSettingsResponseToSettings: MapFunction<SettingsResponse, Settings> = function(source) {\n return {\n apiUrl: source.api_url,\n csrfEnabled: source.csrf_enabled,\n auth: source.auth,\n flags: this.map('FlagResponse', source.flags, 'FeatureFlag').filter(isNotNullish),\n }\n}","import { maps as designMaps } from '@prefecthq/prefect-ui-library'\nimport { mapAutomationCreateToAutomationCreateRequest, mapAutomationResponseToAutomation } from '@/maps/automation'\nimport { mapCsrfTokenResponseToCsrfToken } from '@/maps/csrfToken'\nimport { mapFlagResponseToFeatureFlag } from '@/maps/featureFlag'\nimport { mapSettingsResponseToSettings } from '@/maps/uiSettings'\n\nexport const maps = {\n ...designMaps,\n FlagResponse: { FeatureFlag: mapFlagResponseToFeatureFlag },\n SettingsResponse: { Settings: mapSettingsResponseToSettings },\n CsrfTokenResponse: { CsrfToken: mapCsrfTokenResponseToCsrfToken },\n AutomationResponse: { Automation: mapAutomationResponseToAutomation },\n AutomationCreate: { AutomationCreateRequest: mapAutomationCreateToAutomationCreateRequest },\n}\n","import { Mapper } from '@prefecthq/prefect-ui-library'\nimport { maps } from '@/maps'\n\nexport const mapper = new Mapper(maps)\n\nexport type MapFunction<S, D> = (this: typeof mapper, source: S) => D"],"names":["Automation","BaseAutomation","automation","isAutomationActionFormValues","value","mapAutomationResponseToAutomation","source","mapAutomationCreateToAutomationCreateRequest","mapCsrfTokenResponseToCsrfToken","mapFlagResponseToFeatureFlag","mapSettingsResponseToSettings","isNotNullish","maps","designMaps","mapper","Mapper"],"mappings":"iEAOO,MAAMA,UAAmBC,CAAe,CACtC,QACA,QAEA,YAAYC,EAAyB,CAC1C,MAAMA,CAAU,EAChB,KAAK,QAAUA,EAAW,QAC1B,KAAK,QAAUA,EAAW,OAC5B,CACF,CAeO,SAASC,EAA6BC,EAAkE,CAC7G,MAAO,EAAQA,EAAM,OACvB,CC3BO,MAAMC,EAAiF,SAASC,EAAQ,CAC7G,OAAO,IAAIN,EAAW,CACpB,GAAIM,EAAO,GACX,KAAMA,EAAO,KACb,YAAaA,EAAO,YACpB,QAASA,EAAO,QAChB,QAAS,KAAK,IAAI,4BAA6BA,EAAO,QAAS,mBAAmB,EAClF,QAAS,KAAK,IAAI,2BAA4BA,EAAO,QAAS,kBAAkB,CAAA,CACjF,CACH,EAEaC,EAAuG,SAASD,EAAQ,CACnI,MAAO,CACL,KAAMA,EAAO,KACb,YAAaA,EAAO,YACpB,QAASA,EAAO,QAChB,QAAS,KAAK,IAAI,oBAAqBA,EAAO,QAAS,0BAA0B,EACjF,QAAS,KAAK,IAAI,mBAAoBA,EAAO,QAAS,yBAAyB,CAAA,CAEnF,ECrBaE,EAA6E,SAASF,EAAQ,CACzG,MAAO,CACL,MAAOA,EAAO,MACd,WAAY,KAAK,IAAI,SAAUA,EAAO,WAAY,MAAM,EACxD,WAAY,IAAK,CAErB,ECLaG,EAAsGH,GAAW,CAC5H,OAAQA,EAAA,CACN,IAAK,UACH,MAAO,iBACT,IAAK,YACH,MAAO,mBACT,QAIE,OAAO,IAAA,CAEb,ECZaI,EAAyE,SAASJ,EAAQ,CACrG,MAAO,CACL,OAAQA,EAAO,QACf,YAAaA,EAAO,aACpB,KAAMA,EAAO,KACb,MAAO,KAAK,IAAI,eAAgBA,EAAO,MAAO,aAAa,EAAE,OAAOK,CAAY,CAAA,CAEpF,ECNaC,EAAO,CAClB,GAAGC,EACH,aAAc,CAAE,YAAaJ,CAAA,EAC7B,iBAAkB,CAAE,SAAUC,CAAA,EAC9B,kBAAmB,CAAE,UAAWF,CAAA,EAChC,mBAAoB,CAAE,WAAYH,CAAA,EAClC,iBAAkB,CAAE,wBAAyBE,CAAA,CAC/C,ECVaO,EAAS,IAAIC,EAAOH,CAAI"}
1
+ {"version":3,"file":"mapper-Bm5aN_dh.js","sources":["../../src/types/automation.ts","../../src/maps/automation.ts","../../src/maps/csrfToken.ts","../../src/maps/featureFlag.ts","../../src/maps/uiSettings.ts","../../src/maps/index.ts","../../src/services/mapper.ts"],"sourcesContent":["import { AutomationAction, AutomationTrigger, Automation as BaseAutomation, IAutomation as BaseIAutomation } from '@prefecthq/prefect-ui-library'\n\nexport interface IAutomation extends BaseIAutomation {\n trigger: AutomationTrigger,\n actions: AutomationAction[],\n}\n\nexport class Automation extends BaseAutomation {\n public trigger: AutomationTrigger\n public actions: AutomationAction[]\n\n public constructor(automation: IAutomation) {\n super(automation)\n this.trigger = automation.trigger\n this.actions = automation.actions\n }\n}\n\nexport type AutomationFormValues = {\n id?: string,\n name?: string,\n description?: string,\n trigger?: AutomationTrigger,\n actions?: AutomationAction[],\n enabled?: boolean,\n}\n\nexport type AutomationActionFormValues = AutomationFormValues & {\n trigger: AutomationTrigger,\n}\n\nexport function isAutomationActionFormValues(value: AutomationFormValues): value is AutomationActionFormValues {\n return Boolean(value.trigger)\n}","import { MapFunction } from '@/services/mapper'\nimport { Automation } from '@/types/automation'\nimport { AutomationCreate } from '@/types/automationCreate'\nimport { AutomationCreateRequest } from '@/types/automationCreateRequest'\nimport { AutomationResponse } from '@/types/automationResponse'\n\nexport const mapAutomationResponseToAutomation: MapFunction<AutomationResponse, Automation> = function(source) {\n return new Automation({\n id: source.id,\n name: source.name,\n description: source.description,\n enabled: source.enabled,\n trigger: this.map('AutomationTriggerResponse', source.trigger, 'AutomationTrigger'),\n actions: this.map('AutomationActionResponse', source.actions, 'AutomationAction'),\n })\n}\n\nexport const mapAutomationCreateToAutomationCreateRequest: MapFunction<AutomationCreate, AutomationCreateRequest> = function(source) {\n return {\n name: source.name,\n description: source.description,\n enabled: source.enabled,\n trigger: this.map('AutomationTrigger', source.trigger, 'AutomationTriggerRequest'),\n actions: this.map('AutomationAction', source.actions, 'AutomationActionRequest'),\n }\n}","import { CsrfToken } from '@/models/CsrfToken'\nimport { MapFunction } from '@/services/mapper'\nimport { CsrfTokenResponse } from '@/types/csrfTokenResponse'\n\nexport const mapCsrfTokenResponseToCsrfToken: MapFunction<CsrfTokenResponse, CsrfToken> = function(source) {\n return {\n token: source.token,\n expiration: this.map('string', source.expiration, 'Date'),\n issued: new Date(),\n }\n}\n\n","import { WorkspaceFeatureFlag } from '@prefecthq/prefect-ui-library'\nimport { MapFunction } from '@/services/mapper'\nimport { FlagResponse } from '@/types/flagResponse'\nimport { FeatureFlag } from '@/utilities/permissions'\n\nexport const mapFlagResponseToFeatureFlag: MapFunction<FlagResponse, FeatureFlag | WorkspaceFeatureFlag | null> = (source) => {\n switch (source) {\n case 'workers':\n return 'access:workers'\n case 'artifacts':\n return 'access:artifacts'\n default:\n // we want to have a ts error here but we don't want to break the app so returning null rather than throwing an error\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const exhaustiveCheck: never = source\n return null\n }\n}\n","import { isNotNullish } from '@prefecthq/prefect-ui-library'\nimport { MapFunction } from '@/services/mapper'\nimport { Settings } from '@/services/uiSettings'\nimport { SettingsResponse } from '@/types/settingsResponse'\n\nexport const mapSettingsResponseToSettings: MapFunction<SettingsResponse, Settings> = function(source) {\n return {\n apiUrl: source.api_url,\n csrfEnabled: source.csrf_enabled,\n auth: source.auth,\n flags: this.map('FlagResponse', source.flags, 'FeatureFlag').filter(isNotNullish),\n }\n}","import { maps as designMaps } from '@prefecthq/prefect-ui-library'\nimport { mapAutomationCreateToAutomationCreateRequest, mapAutomationResponseToAutomation } from '@/maps/automation'\nimport { mapCsrfTokenResponseToCsrfToken } from '@/maps/csrfToken'\nimport { mapFlagResponseToFeatureFlag } from '@/maps/featureFlag'\nimport { mapSettingsResponseToSettings } from '@/maps/uiSettings'\n\nexport const maps = {\n ...designMaps,\n FlagResponse: { FeatureFlag: mapFlagResponseToFeatureFlag },\n SettingsResponse: { Settings: mapSettingsResponseToSettings },\n CsrfTokenResponse: { CsrfToken: mapCsrfTokenResponseToCsrfToken },\n AutomationResponse: { Automation: mapAutomationResponseToAutomation },\n AutomationCreate: { AutomationCreateRequest: mapAutomationCreateToAutomationCreateRequest },\n}\n","import { Mapper } from '@prefecthq/prefect-ui-library'\nimport { maps } from '@/maps'\n\nexport const mapper = new Mapper(maps)\n\nexport type MapFunction<S, D> = (this: typeof mapper, source: S) => D"],"names":["Automation","BaseAutomation","automation","isAutomationActionFormValues","value","mapAutomationResponseToAutomation","source","mapAutomationCreateToAutomationCreateRequest","mapCsrfTokenResponseToCsrfToken","mapFlagResponseToFeatureFlag","mapSettingsResponseToSettings","isNotNullish","maps","designMaps","mapper","Mapper"],"mappings":"iEAOO,MAAMA,UAAmBC,CAAe,CACtC,QACA,QAEA,YAAYC,EAAyB,CAC1C,MAAMA,CAAU,EAChB,KAAK,QAAUA,EAAW,QAC1B,KAAK,QAAUA,EAAW,OAC5B,CACF,CAeO,SAASC,EAA6BC,EAAkE,CAC7G,MAAO,EAAQA,EAAM,OACvB,CC3BO,MAAMC,EAAiF,SAASC,EAAQ,CAC7G,OAAO,IAAIN,EAAW,CACpB,GAAIM,EAAO,GACX,KAAMA,EAAO,KACb,YAAaA,EAAO,YACpB,QAASA,EAAO,QAChB,QAAS,KAAK,IAAI,4BAA6BA,EAAO,QAAS,mBAAmB,EAClF,QAAS,KAAK,IAAI,2BAA4BA,EAAO,QAAS,kBAAkB,CAAA,CACjF,CACH,EAEaC,EAAuG,SAASD,EAAQ,CACnI,MAAO,CACL,KAAMA,EAAO,KACb,YAAaA,EAAO,YACpB,QAASA,EAAO,QAChB,QAAS,KAAK,IAAI,oBAAqBA,EAAO,QAAS,0BAA0B,EACjF,QAAS,KAAK,IAAI,mBAAoBA,EAAO,QAAS,yBAAyB,CAAA,CAEnF,ECrBaE,EAA6E,SAASF,EAAQ,CACzG,MAAO,CACL,MAAOA,EAAO,MACd,WAAY,KAAK,IAAI,SAAUA,EAAO,WAAY,MAAM,EACxD,WAAY,IAAK,CAErB,ECLaG,EAAsGH,GAAW,CAC5H,OAAQA,EAAA,CACN,IAAK,UACH,MAAO,iBACT,IAAK,YACH,MAAO,mBACT,QAIE,OAAO,IAAA,CAEb,ECZaI,EAAyE,SAASJ,EAAQ,CACrG,MAAO,CACL,OAAQA,EAAO,QACf,YAAaA,EAAO,aACpB,KAAMA,EAAO,KACb,MAAO,KAAK,IAAI,eAAgBA,EAAO,MAAO,aAAa,EAAE,OAAOK,CAAY,CAAA,CAEpF,ECNaC,EAAO,CAClB,GAAGC,EACH,aAAc,CAAE,YAAaJ,CAAA,EAC7B,iBAAkB,CAAE,SAAUC,CAAA,EAC9B,kBAAmB,CAAE,UAAWF,CAAA,EAChC,mBAAoB,CAAE,WAAYH,CAAA,EAClC,iBAAkB,CAAE,wBAAyBE,CAAA,CAC/C,ECVaO,EAAS,IAAIC,EAAOH,CAAI"}
@@ -0,0 +1,2 @@
1
+ import{cS as n}from"./index-DS86r6aC.js";const c=Symbol("canInjectionKey");function a(){return n(c)}export{c,a as u};
2
+ //# sourceMappingURL=useCan-DzvhQ1fT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCan-DDmEnNFg.js","sources":["../../src/utilities/permissions.ts","../../src/compositions/useCan.ts"],"sourcesContent":["import { Can, WorkspacePermission, WorkspaceFeatureFlag } from '@prefecthq/prefect-ui-library'\nimport { InjectionKey } from 'vue'\n\nconst featureFlags = [\n 'access:workers',\n 'access:artifacts',\n] as const\n\nexport type FeatureFlag = typeof featureFlags[number] | WorkspaceFeatureFlag\n\nexport type Permission = FeatureFlag | WorkspacePermission\n\nexport const canKey: InjectionKey<Can<Permission>> = Symbol('canInjectionKey')\n","import { Can, inject } from '@prefecthq/prefect-ui-library'\nimport { Permission, canKey } from '@/utilities/permissions'\n\nexport function useCan(): Can<Permission> {\n return inject(canKey)\n}\n"],"names":["canKey","useCan","inject"],"mappings":"yCAYO,MAAMA,EAAwC,OAAO,iBAAiB,ECTtE,SAASC,GAA0B,CACxC,OAAOC,EAAOF,CAAM,CACtB"}
1
+ {"version":3,"file":"useCan-DzvhQ1fT.js","sources":["../../src/utilities/permissions.ts","../../src/compositions/useCan.ts"],"sourcesContent":["import { Can, WorkspacePermission, WorkspaceFeatureFlag } from '@prefecthq/prefect-ui-library'\nimport { InjectionKey } from 'vue'\n\nconst featureFlags = [\n 'access:workers',\n 'access:artifacts',\n] as const\n\nexport type FeatureFlag = typeof featureFlags[number] | WorkspaceFeatureFlag\n\nexport type Permission = FeatureFlag | WorkspacePermission\n\nexport const canKey: InjectionKey<Can<Permission>> = Symbol('canInjectionKey')\n","import { Can, inject } from '@prefecthq/prefect-ui-library'\nimport { Permission, canKey } from '@/utilities/permissions'\n\nexport function useCan(): Can<Permission> {\n return inject(canKey)\n}\n"],"names":["canKey","useCan","inject"],"mappings":"yCAYO,MAAMA,EAAwC,OAAO,iBAAiB,ECTtE,SAASC,GAA0B,CACxC,OAAOC,EAAOF,CAAM,CACtB"}
@@ -1,2 +1,2 @@
1
- import{g as a,m as c,by as n}from"./index-C9FkjDpZ.js";function i(...t){const r=[...t,"Prefect Server"],o=a(()=>r.map(e=>c(e)).filter(e=>e!==null).join(" • "));n(()=>document.title=o.value)}export{i as u};
2
- //# sourceMappingURL=usePageTitle-B0Hz_El0.js.map
1
+ import{g as a,m as c,by as n}from"./index-DS86r6aC.js";function i(...t){const r=[...t,"Prefect Server"],o=a(()=>r.map(e=>c(e)).filter(e=>e!==null).join(" • "));n(()=>document.title=o.value)}export{i as u};
2
+ //# sourceMappingURL=usePageTitle-BXVkHaWQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePageTitle-B0Hz_El0.js","sources":["../../src/compositions/usePageTitle.ts"],"sourcesContent":["import { computed, Ref, unref, watchEffect } from 'vue'\n\nexport function usePageTitle(...pages: (string | Ref<string | null>)[]): void {\n\n const pagesWithProject = [...pages, 'Prefect Server']\n\n const title = computed<string>(() => {\n return pagesWithProject\n .map(page => unref(page))\n .filter(page => page !== null)\n .join(' • ')\n })\n\n watchEffect(() => document.title = title.value)\n}"],"names":["usePageTitle","pages","pagesWithProject","title","computed","page","unref","watchEffect"],"mappings":"uDAEO,SAASA,KAAgBC,EAA8C,CAE5E,MAAMC,EAAmB,CAAC,GAAGD,EAAO,gBAAgB,EAE9CE,EAAQC,EAAiB,IACtBF,EACJ,IAAIG,GAAQC,EAAMD,CAAI,CAAC,EACvB,OAAOA,GAAQA,IAAS,IAAI,EAC5B,KAAK,KAAK,CACd,EAEDE,EAAY,IAAM,SAAS,MAAQJ,EAAM,KAAK,CAChD"}
1
+ {"version":3,"file":"usePageTitle-BXVkHaWQ.js","sources":["../../src/compositions/usePageTitle.ts"],"sourcesContent":["import { computed, Ref, unref, watchEffect } from 'vue'\n\nexport function usePageTitle(...pages: (string | Ref<string | null>)[]): void {\n\n const pagesWithProject = [...pages, 'Prefect Server']\n\n const title = computed<string>(() => {\n return pagesWithProject\n .map(page => unref(page))\n .filter(page => page !== null)\n .join(' • ')\n })\n\n watchEffect(() => document.title = title.value)\n}"],"names":["usePageTitle","pages","pagesWithProject","title","computed","page","unref","watchEffect"],"mappings":"uDAEO,SAASA,KAAgBC,EAA8C,CAE5E,MAAMC,EAAmB,CAAC,GAAGD,EAAO,gBAAgB,EAE9CE,EAAQC,EAAiB,IACtBF,EACJ,IAAIG,GAAQC,EAAMD,CAAI,CAAC,EACvB,OAAOA,GAAQA,IAAS,IAAI,EAC5B,KAAK,KAAK,CACd,EAEDE,EAAY,IAAM,SAAS,MAAQJ,EAAM,KAAK,CAChD"}
@@ -1,7 +1,7 @@
1
- import{cJ as xt,cK as et,d as Pt,g as kt,n as de,o as he,k as Ue,i as Le,B as Be,m as De,cL as Nt,F as _t,l as je,cM as Ft,ae as Ut,J as Lt,cN as Bt,cO as Dt,cP as jt,cQ as pe,cR as qt,cS as It}from"./index-C9FkjDpZ.js";import{m as L}from"./mapper-NwaeXCHc.js";function tt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ht}=Object.prototype,{getPrototypeOf:Ae}=Object,{iterator:oe,toStringTag:nt}=Symbol,ie=(e=>t=>{const n=Ht.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),k=e=>(e=e.toLowerCase(),t=>ie(t)===e),ae=e=>t=>typeof t===e,{isArray:$}=Array,M=ae("undefined");function V(e){return e!==null&&!M(e)&&e.constructor!==null&&!M(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rt=k("ArrayBuffer");function Mt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rt(e.buffer),t}const $t=ae("string"),A=ae("function"),st=ae("number"),K=e=>e!==null&&typeof e=="object",zt=e=>e===!0||e===!1,ee=e=>{if(ie(e)!=="object")return!1;const t=Ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(nt in e)&&!(oe in e)},vt=e=>{if(!K(e)||V(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Jt=k("Date"),Vt=k("File"),Kt=k("Blob"),Wt=k("FileList"),Xt=e=>K(e)&&A(e.pipe),Gt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||A(e.append)&&((t=ie(e))==="formdata"||t==="object"&&A(e.toString)&&e.toString()==="[object FormData]"))},Qt=k("URLSearchParams"),[Zt,Yt,en,tn]=["ReadableStream","Request","Response","Headers"].map(k),nn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function W(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),$(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(V(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function ot(e,t){if(V(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,it=e=>!M(e)&&e!==j;function be(){const{caseless:e,skipUndefined:t}=it(this)&&this||{},n={},r=(s,i)=>{const o=e&&ot(n,i)||i;ee(n[o])&&ee(s)?n[o]=be(n[o],s):ee(s)?n[o]=be({},s):$(s)?n[o]=s.slice():(!t||!M(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&W(arguments[s],r);return n}const rn=(e,t,n,{allOwnKeys:r}={})=>(W(t,(s,i)=>{n&&A(s)?e[i]=tt(s,n):e[i]=s},{allOwnKeys:r}),e),sn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),on=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},an=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},cn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},un=e=>{if(!e)return null;if($(e))return e;let t=e.length;if(!st(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ln=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ae(Uint8Array)),fn=(e,t)=>{const r=(e&&e[oe]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},dn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hn=k("HTMLFormElement"),pn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),qe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mn=k("RegExp"),at=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};W(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},yn=e=>{at(e,(t,n)=>{if(A(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wn=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return $(e)?r(e):r(String(e).split(t)),n},gn=()=>{},bn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Rn(e){return!!(e&&A(e.append)&&e[nt]==="FormData"&&e[oe])}const En=e=>{const t=new Array(10),n=(r,s)=>{if(K(r)){if(t.indexOf(r)>=0)return;if(V(r))return r;if(!("toJSON"in r)){t[s]=r;const i=$(r)?[]:{};return W(r,(o,c)=>{const d=n(o,s+1);!M(d)&&(i[c]=d)}),t[s]=void 0,i}}return r};return n(e,0)},Sn=k("AsyncFunction"),Tn=e=>e&&(K(e)||A(e))&&A(e.then)&&A(e.catch),ct=((e,t)=>e?setImmediate:t?((n,r)=>(j.addEventListener("message",({source:s,data:i})=>{s===j&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),j.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",A(j.postMessage)),An=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||ct,On=e=>e!=null&&A(e[oe]),a={isArray:$,isArrayBuffer:rt,isBuffer:V,isFormData:Gt,isArrayBufferView:Mt,isString:$t,isNumber:st,isBoolean:zt,isObject:K,isPlainObject:ee,isEmptyObject:vt,isReadableStream:Zt,isRequest:Yt,isResponse:en,isHeaders:tn,isUndefined:M,isDate:Jt,isFile:Vt,isBlob:Kt,isRegExp:mn,isFunction:A,isStream:Xt,isURLSearchParams:Qt,isTypedArray:ln,isFileList:Wt,forEach:W,merge:be,extend:rn,trim:nn,stripBOM:sn,inherits:on,toFlatObject:an,kindOf:ie,kindOfTest:k,endsWith:cn,toArray:un,forEachEntry:fn,matchAll:dn,isHTMLForm:hn,hasOwnProperty:qe,hasOwnProp:qe,reduceDescriptors:at,freezeMethods:yn,toObjectSet:wn,toCamelCase:pn,noop:gn,toFiniteNumber:bn,findKey:ot,global:j,isContextDefined:it,isSpecCompliantForm:Rn,toJSONObject:En,isAsyncFn:Sn,isThenable:Tn,setImmediate:ct,asap:An,isIterable:On};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const ut=y.prototype,lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{lt[e]={value:e}});Object.defineProperties(y,lt);Object.defineProperty(ut,"isAxiosError",{value:!0});y.from=(e,t,n,r,s,i)=>{const o=Object.create(ut);a.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return y.call(o,c,d,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const Cn=null;function Re(e){return a.isPlainObject(e)||a.isArray(e)}function ft(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ie(e,t,n){return e?e.concat(t).map(function(s,i){return s=ft(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function xn(e){return a.isArray(e)&&!e.some(Re)}const Pn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ce(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!a.isUndefined(h[m])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(a.isBoolean(f))return f.toString();if(!d&&a.isBlob(f))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?d&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,h){let b=f;if(f&&!h&&typeof f=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&xn(f)||(a.isFileList(f)||a.endsWith(m,"[]"))&&(b=a.toArray(f)))return m=ft(m),b.forEach(function(R,T){!(a.isUndefined(R)||R===null)&&t.append(o===!0?Ie([m],T,i):o===null?m:m+"[]",l(R))}),!1}return Re(f)?!0:(t.append(Ie(h,m,i),l(f)),!1)}const p=[],w=Object.assign(Pn,{defaultVisitor:u,convertValue:l,isVisitable:Re});function E(f,m){if(!a.isUndefined(f)){if(p.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(f),a.forEach(f,function(b,C){(!(a.isUndefined(b)||b===null)&&s.call(t,b,a.isString(C)?C.trim():C,m,w))===!0&&E(b,m?m.concat(C):[C])}),p.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function He(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Oe(e,t){this._pairs=[],e&&ce(e,this,t)}const dt=Oe.prototype;dt.append=function(t,n){this._pairs.push([t,n])};dt.toString=function(t){const n=t?function(r){return t.call(this,r,He)}:He;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function kn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ht(e,t,n){if(!t)return e;const r=n&&n.encode||kn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new Oe(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Me{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nn=typeof URLSearchParams<"u"?URLSearchParams:Oe,_n=typeof FormData<"u"?FormData:null,Fn=typeof Blob<"u"?Blob:null,Un={isBrowser:!0,classes:{URLSearchParams:Nn,FormData:_n,Blob:Fn},protocols:["http","https","file","blob","url","data"]},Ce=typeof window<"u"&&typeof document<"u",Ee=typeof navigator=="object"&&navigator||void 0,Ln=Ce&&(!Ee||["ReactNative","NativeScript","NS"].indexOf(Ee.product)<0),Bn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dn=Ce&&window.location.href||"http://localhost",jn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ce,hasStandardBrowserEnv:Ln,hasStandardBrowserWebWorkerEnv:Bn,navigator:Ee,origin:Dn},Symbol.toStringTag,{value:"Module"})),S={...jn,...Un};function qn(e,t){return ce(e,new S.classes.URLSearchParams,{visitor:function(n,r,s,i){return S.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function In(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function mt(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),d=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,d?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=Hn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(In(r),s,n,0)}),n}return null}function Mn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const X={transitional:pt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(mt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return qn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ce(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Mn(t)):t}],transformResponse:[function(t){const n=this.transitional||X.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{X.headers[e]={}});const $n=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zn=e=>{const t={};let n,r,s;return e&&e.split(`
1
+ import{cJ as xt,cK as et,d as Pt,g as kt,n as de,o as he,k as Ue,i as Le,B as Be,m as De,cL as Nt,F as _t,l as je,cM as Ft,ae as Ut,J as Lt,cN as Bt,cO as Dt,cP as jt,cQ as pe,cR as qt,cS as It}from"./index-DS86r6aC.js";import{m as L}from"./mapper-Bm5aN_dh.js";function tt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ht}=Object.prototype,{getPrototypeOf:Ae}=Object,{iterator:oe,toStringTag:nt}=Symbol,ie=(e=>t=>{const n=Ht.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),k=e=>(e=e.toLowerCase(),t=>ie(t)===e),ae=e=>t=>typeof t===e,{isArray:$}=Array,M=ae("undefined");function V(e){return e!==null&&!M(e)&&e.constructor!==null&&!M(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rt=k("ArrayBuffer");function Mt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rt(e.buffer),t}const $t=ae("string"),A=ae("function"),st=ae("number"),K=e=>e!==null&&typeof e=="object",zt=e=>e===!0||e===!1,ee=e=>{if(ie(e)!=="object")return!1;const t=Ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(nt in e)&&!(oe in e)},vt=e=>{if(!K(e)||V(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Jt=k("Date"),Vt=k("File"),Kt=k("Blob"),Wt=k("FileList"),Xt=e=>K(e)&&A(e.pipe),Gt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||A(e.append)&&((t=ie(e))==="formdata"||t==="object"&&A(e.toString)&&e.toString()==="[object FormData]"))},Qt=k("URLSearchParams"),[Zt,Yt,en,tn]=["ReadableStream","Request","Response","Headers"].map(k),nn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function W(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),$(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(V(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function ot(e,t){if(V(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,it=e=>!M(e)&&e!==j;function be(){const{caseless:e,skipUndefined:t}=it(this)&&this||{},n={},r=(s,i)=>{const o=e&&ot(n,i)||i;ee(n[o])&&ee(s)?n[o]=be(n[o],s):ee(s)?n[o]=be({},s):$(s)?n[o]=s.slice():(!t||!M(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&W(arguments[s],r);return n}const rn=(e,t,n,{allOwnKeys:r}={})=>(W(t,(s,i)=>{n&&A(s)?e[i]=tt(s,n):e[i]=s},{allOwnKeys:r}),e),sn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),on=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},an=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},cn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},un=e=>{if(!e)return null;if($(e))return e;let t=e.length;if(!st(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ln=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ae(Uint8Array)),fn=(e,t)=>{const r=(e&&e[oe]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},dn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hn=k("HTMLFormElement"),pn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),qe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mn=k("RegExp"),at=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};W(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},yn=e=>{at(e,(t,n)=>{if(A(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wn=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return $(e)?r(e):r(String(e).split(t)),n},gn=()=>{},bn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Rn(e){return!!(e&&A(e.append)&&e[nt]==="FormData"&&e[oe])}const En=e=>{const t=new Array(10),n=(r,s)=>{if(K(r)){if(t.indexOf(r)>=0)return;if(V(r))return r;if(!("toJSON"in r)){t[s]=r;const i=$(r)?[]:{};return W(r,(o,c)=>{const d=n(o,s+1);!M(d)&&(i[c]=d)}),t[s]=void 0,i}}return r};return n(e,0)},Sn=k("AsyncFunction"),Tn=e=>e&&(K(e)||A(e))&&A(e.then)&&A(e.catch),ct=((e,t)=>e?setImmediate:t?((n,r)=>(j.addEventListener("message",({source:s,data:i})=>{s===j&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),j.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",A(j.postMessage)),An=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||ct,On=e=>e!=null&&A(e[oe]),a={isArray:$,isArrayBuffer:rt,isBuffer:V,isFormData:Gt,isArrayBufferView:Mt,isString:$t,isNumber:st,isBoolean:zt,isObject:K,isPlainObject:ee,isEmptyObject:vt,isReadableStream:Zt,isRequest:Yt,isResponse:en,isHeaders:tn,isUndefined:M,isDate:Jt,isFile:Vt,isBlob:Kt,isRegExp:mn,isFunction:A,isStream:Xt,isURLSearchParams:Qt,isTypedArray:ln,isFileList:Wt,forEach:W,merge:be,extend:rn,trim:nn,stripBOM:sn,inherits:on,toFlatObject:an,kindOf:ie,kindOfTest:k,endsWith:cn,toArray:un,forEachEntry:fn,matchAll:dn,isHTMLForm:hn,hasOwnProperty:qe,hasOwnProp:qe,reduceDescriptors:at,freezeMethods:yn,toObjectSet:wn,toCamelCase:pn,noop:gn,toFiniteNumber:bn,findKey:ot,global:j,isContextDefined:it,isSpecCompliantForm:Rn,toJSONObject:En,isAsyncFn:Sn,isThenable:Tn,setImmediate:ct,asap:An,isIterable:On};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const ut=y.prototype,lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{lt[e]={value:e}});Object.defineProperties(y,lt);Object.defineProperty(ut,"isAxiosError",{value:!0});y.from=(e,t,n,r,s,i)=>{const o=Object.create(ut);a.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return y.call(o,c,d,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const Cn=null;function Re(e){return a.isPlainObject(e)||a.isArray(e)}function ft(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ie(e,t,n){return e?e.concat(t).map(function(s,i){return s=ft(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function xn(e){return a.isArray(e)&&!e.some(Re)}const Pn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ce(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!a.isUndefined(h[m])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(a.isBoolean(f))return f.toString();if(!d&&a.isBlob(f))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?d&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,h){let b=f;if(f&&!h&&typeof f=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&xn(f)||(a.isFileList(f)||a.endsWith(m,"[]"))&&(b=a.toArray(f)))return m=ft(m),b.forEach(function(R,T){!(a.isUndefined(R)||R===null)&&t.append(o===!0?Ie([m],T,i):o===null?m:m+"[]",l(R))}),!1}return Re(f)?!0:(t.append(Ie(h,m,i),l(f)),!1)}const p=[],w=Object.assign(Pn,{defaultVisitor:u,convertValue:l,isVisitable:Re});function E(f,m){if(!a.isUndefined(f)){if(p.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(f),a.forEach(f,function(b,C){(!(a.isUndefined(b)||b===null)&&s.call(t,b,a.isString(C)?C.trim():C,m,w))===!0&&E(b,m?m.concat(C):[C])}),p.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function He(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Oe(e,t){this._pairs=[],e&&ce(e,this,t)}const dt=Oe.prototype;dt.append=function(t,n){this._pairs.push([t,n])};dt.toString=function(t){const n=t?function(r){return t.call(this,r,He)}:He;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function kn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ht(e,t,n){if(!t)return e;const r=n&&n.encode||kn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new Oe(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Me{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nn=typeof URLSearchParams<"u"?URLSearchParams:Oe,_n=typeof FormData<"u"?FormData:null,Fn=typeof Blob<"u"?Blob:null,Un={isBrowser:!0,classes:{URLSearchParams:Nn,FormData:_n,Blob:Fn},protocols:["http","https","file","blob","url","data"]},Ce=typeof window<"u"&&typeof document<"u",Ee=typeof navigator=="object"&&navigator||void 0,Ln=Ce&&(!Ee||["ReactNative","NativeScript","NS"].indexOf(Ee.product)<0),Bn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dn=Ce&&window.location.href||"http://localhost",jn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ce,hasStandardBrowserEnv:Ln,hasStandardBrowserWebWorkerEnv:Bn,navigator:Ee,origin:Dn},Symbol.toStringTag,{value:"Module"})),S={...jn,...Un};function qn(e,t){return ce(e,new S.classes.URLSearchParams,{visitor:function(n,r,s,i){return S.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function In(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function mt(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),d=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,d?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=Hn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(In(r),s,n,0)}),n}return null}function Mn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const X={transitional:pt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(mt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return qn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ce(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Mn(t)):t}],transformResponse:[function(t){const n=this.transitional||X.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{X.headers[e]={}});const $n=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zn=e=>{const t={};let n,r,s;return e&&e.split(`
2
2
  `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&$n[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$e=Symbol("internals");function J(e){return e&&String(e).trim().toLowerCase()}function te(e){return e===!1||e==null?e:a.isArray(e)?e.map(te):String(e)}function vn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Jn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function me(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Vn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Kn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let O=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,d,l){const u=J(d);if(!u)throw new Error("header name must be a non-empty string");const p=a.findKey(s,u);(!p||s[p]===void 0||l===!0||l===void 0&&s[p]!==!1)&&(s[p||d]=te(c))}const o=(c,d)=>a.forEach(c,(l,u)=>i(l,u,d));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!Jn(t))o(zn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,l;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(d=c[l])?a.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=J(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return vn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=J(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||me(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=J(o),o){const c=a.findKey(r,o);c&&(!n||me(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||me(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=te(s),delete n[i];return}const c=t?Vn(i):String(i).trim();c!==i&&delete n[i],n[c]=te(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
3
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[$e]=this[$e]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=J(o);r[c]||(Kn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(O.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(O);function ye(e,t){const n=this||X,r=t||n,s=O.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function yt(e){return!!(e&&e.__CANCEL__)}function z(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(z,y,{__CANCEL__:!0});function wt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Wn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Xn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(d){const l=Date.now(),u=r[i];o||(o=l),n[s]=d,r[s]=l;let p=i,w=0;for(;p!==s;)w+=n[p++],p=p%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const E=u&&l-u;return E?Math.round(w*1e3/E):void 0}}function Gn(e,t){let n=0,r=1e3/t,s,i;const o=(l,u=Date.now())=>{n=u,s=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const u=Date.now(),p=u-n;p>=r?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},r-p)))},()=>s&&o(s)]}const re=(e,t,n=3)=>{let r=0;const s=Xn(50,250);return Gn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,d=o-r,l=s(d),u=o<=c;r=o;const p={loaded:o,total:c,progress:c?o/c:void 0,bytes:d,rate:l||void 0,estimated:l&&c&&u?(c-o)/l:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},ze=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ve=e=>(...t)=>a.asap(()=>e(...t)),Qn=S.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,S.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(S.origin),S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent)):()=>!0,Zn=S.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(r)&&o.push("path="+r),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Yn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function er(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function gt(e,t,n){let r=!Yn(t);return e&&(r||n==!1)?er(e,t):t}const Je=e=>e instanceof O?{...e}:e;function I(e,t){t=t||{};const n={};function r(l,u,p,w){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:w},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,p,w){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l,p,w)}else return r(l,u,p,w)}function i(l,u){if(!a.isUndefined(u))return r(void 0,u)}function o(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,p){if(p in t)return r(l,u);if(p in e)return r(void 0,l)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,u,p)=>s(Je(l),Je(u),p,!0)};return a.forEach(Object.keys({...e,...t}),function(u){const p=d[u]||s,w=p(e[u],t[u],u);a.isUndefined(w)&&p!==c||(n[u]=w)}),n}const bt=e=>{const t=I({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;if(t.headers=o=O.from(o),t.url=ht(gt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const d=n.getHeaders(),l=["content-type","content-length"];Object.entries(d).forEach(([u,p])=>{l.includes(u.toLowerCase())&&o.set(u,p)})}}if(S.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&Qn(t.url))){const d=s&&i&&Zn.read(i);d&&o.set(s,d)}return t},tr=typeof XMLHttpRequest<"u",nr=tr&&function(e){return new Promise(function(n,r){const s=bt(e);let i=s.data;const o=O.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:l}=s,u,p,w,E,f;function m(){E&&E(),f&&f(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function b(){if(!h)return;const R=O.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),P={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:R,config:e,request:h};wt(function(x){n(x),m()},function(x){r(x),m()},P),h=null}"onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(b)},h.onabort=function(){h&&(r(new y("Request aborted",y.ECONNABORTED,e,h)),h=null)},h.onerror=function(T){const P=T&&T.message?T.message:"Network Error",B=new y(P,y.ERR_NETWORK,e,h);B.event=T||null,r(B),h=null},h.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||pt;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new y(T,P.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,h)),h=null},i===void 0&&o.setContentType(null),"setRequestHeader"in h&&a.forEach(o.toJSON(),function(T,P){h.setRequestHeader(P,T)}),a.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),l&&([w,f]=re(l,!0),h.addEventListener("progress",w)),d&&h.upload&&([p,E]=re(d),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(u=R=>{h&&(r(!R||R.type?new z(null,e,h):R),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const C=Wn(s.url);if(C&&S.protocols.indexOf(C)===-1){r(new y("Unsupported protocol "+C+":",y.ERR_BAD_REQUEST,e));return}h.send(i||null)})},rr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof y?u:new z(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},sr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},or=async function*(e,t){for await(const n of ir(e))yield*sr(n,t)},ir=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Ve=(e,t,n,r)=>{const s=or(e,t);let i=0,o,c=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:l,value:u}=await s.next();if(l){c(),d.close();return}let p=u.byteLength;if(n){let w=i+=p;n(w)}d.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},Ke=64*1024,{isFunction:Y}=a,ar=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:We,TextEncoder:Xe}=a.global,Ge=(e,...t)=>{try{return!!e(...t)}catch{return!1}},cr=e=>{e=a.merge.call({skipUndefined:!0},ar,e);const{fetch:t,Request:n,Response:r}=e,s=t?Y(t):typeof fetch=="function",i=Y(n),o=Y(r);if(!s)return!1;const c=s&&Y(We),d=s&&(typeof Xe=="function"?(f=>m=>f.encode(m))(new Xe):async f=>new Uint8Array(await new n(f).arrayBuffer())),l=i&&c&&Ge(()=>{let f=!1;const m=new n(S.origin,{body:new We,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),u=o&&c&&Ge(()=>a.isReadableStream(new r("").body)),p={stream:u&&(f=>f.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!p[f]&&(p[f]=(m,h)=>{let b=m&&m[f];if(b)return b.call(m);throw new y(`Response type '${f}' is not supported`,y.ERR_NOT_SUPPORT,h)})});const w=async f=>{if(f==null)return 0;if(a.isBlob(f))return f.size;if(a.isSpecCompliantForm(f))return(await new n(S.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(a.isArrayBufferView(f)||a.isArrayBuffer(f))return f.byteLength;if(a.isURLSearchParams(f)&&(f=f+""),a.isString(f))return(await d(f)).byteLength},E=async(f,m)=>{const h=a.toFiniteNumber(f.getContentLength());return h??w(m)};return async f=>{let{url:m,method:h,data:b,signal:C,cancelToken:R,timeout:T,onDownloadProgress:P,onUploadProgress:B,responseType:x,headers:le,withCredentials:G="same-origin",fetchOptions:xe}=bt(f),Pe=t||fetch;x=x?(x+"").toLowerCase():"text";let Q=rr([C,R&&R.toAbortSignal()],T),v=null;const D=Q&&Q.unsubscribe&&(()=>{Q.unsubscribe()});let ke;try{if(B&&l&&h!=="get"&&h!=="head"&&(ke=await E(le,b))!==0){let U=new n(m,{method:"POST",body:b,duplex:"half"}),H;if(a.isFormData(b)&&(H=U.headers.get("content-type"))&&le.setContentType(H),U.body){const[fe,Z]=ze(ke,re(ve(B)));b=Ve(U.body,Ke,fe,Z)}}a.isString(G)||(G=G?"include":"omit");const N=i&&"credentials"in n.prototype,Ne={...xe,signal:Q,method:h.toUpperCase(),headers:le.normalize().toJSON(),body:b,duplex:"half",credentials:N?G:void 0};v=i&&new n(m,Ne);let F=await(i?Pe(v,xe):Pe(m,Ne));const _e=u&&(x==="stream"||x==="response");if(u&&(P||_e&&D)){const U={};["status","statusText","headers"].forEach(Fe=>{U[Fe]=F[Fe]});const H=a.toFiniteNumber(F.headers.get("content-length")),[fe,Z]=P&&ze(H,re(ve(P),!0))||[];F=new r(Ve(F.body,Ke,fe,()=>{Z&&Z(),D&&D()}),U)}x=x||"text";let Ct=await p[a.findKey(p,x)||"text"](F,f);return!_e&&D&&D(),await new Promise((U,H)=>{wt(U,H,{data:Ct,headers:O.from(F.headers),status:F.status,statusText:F.statusText,config:f,request:v})})}catch(N){throw D&&D(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,f,v),{cause:N.cause||N}):y.from(N,N&&N.code,f,v)}}},ur=new Map,Rt=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,c=o,d,l,u=ur;for(;c--;)d=i[c],l=u.get(d),l===void 0&&u.set(d,l=c?new Map:cr(t)),u=l;return l};Rt();const Se={http:Cn,xhr:nr,fetch:{get:Rt}};a.forEach(Se,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Qe=e=>`- ${e}`,lr=e=>a.isFunction(e)||e===null||e===!1,Et={getAdapter:(e,t)=>{e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let c;if(s=r,!lr(r)&&(s=Se[(c=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;i[c||"#"+o]=s}if(!s){const o=Object.entries(i).map(([d,l])=>`adapter ${d} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since :
4
4
  `+o.map(Qe).join(`
5
5
  `):" "+Qe(o[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s},adapters:Se};function we(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new z(null,e)}function Ze(e){return we(e),e.headers=O.from(e.headers),e.data=ye.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Et.getAdapter(e.adapter||X.adapter,e)(e).then(function(r){return we(e),r.data=ye.call(e,e.transformResponse,r),r.headers=O.from(r.headers),r},function(r){return yt(r)||(we(e),r&&r.response&&(r.response.data=ye.call(e,e.transformResponse,r.response),r.response.headers=O.from(r.response.headers))),Promise.reject(r)})}const St="1.12.2",ue={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ue[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ye={};ue.transitional=function(t,n,r){function s(i,o){return"[Axios v"+St+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!Ye[o]&&(Ye[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};ue.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function fr(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],d=c===void 0||o(c,i,e);if(d!==!0)throw new y("option "+i+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const ne={assertOptions:fr,validators:ue},_=ne.validators;let q=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Me,response:new Me}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
6
  `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=I(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ne.assertOptions(r,{silentJSONParsing:_.transitional(_.boolean),forcedJSONParsing:_.transitional(_.boolean),clarifyTimeoutError:_.transitional(_.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:ne.assertOptions(s,{encode:_.function,serialize:_.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ne.assertOptions(n,{baseUrl:_.spelling("baseURL"),withXsrfToken:_.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),n.headers=O.concat(o,i);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,p=0,w;if(!d){const f=[Ze.bind(this),void 0];for(f.unshift(...c),f.push(...l),w=f.length,u=Promise.resolve(n);p<w;)u=u.then(f[p++],f[p++]);return u}w=c.length;let E=n;for(;p<w;){const f=c[p++],m=c[p++];try{E=f(E)}catch(h){m.call(this,h);break}}try{u=Ze.call(this,E)}catch(f){return Promise.reject(f)}for(p=0,w=l.length;p<w;)u=u.then(l[p++],l[p++]);return u}getUri(t){t=I(this.defaults,t);const n=gt(t.baseURL,t.url,t.allowAbsoluteUrls);return ht(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){q.prototype[t]=function(n,r){return this.request(I(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(I(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}q.prototype[t]=n(),q.prototype[t+"Form"]=n(!0)});let dr=class Tt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new z(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Tt(function(s){t=s}),cancel:t}}};function hr(e){return function(n){return e.apply(null,n)}}function pr(e){return a.isObject(e)&&e.isAxiosError===!0}const Te={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Te).forEach(([e,t])=>{Te[t]=e});function At(e){const t=new q(e),n=tt(q.prototype.request,t);return a.extend(n,q.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return At(I(e,s))},n}const g=At(X);g.Axios=q;g.CanceledError=z;g.CancelToken=dr;g.isCancel=yt;g.VERSION=St;g.toFormData=ce;g.AxiosError=y;g.Cancel=g.CanceledError;g.all=function(t){return Promise.all(t)};g.spread=hr;g.isAxiosError=pr;g.mergeConfig=I;g.AxiosHeaders=O;g.formToJSON=e=>mt(a.isHTMLForm(e)?new FormData(e):e);g.getAdapter=Et.getAdapter;g.HttpStatusCode=Te;g.default=g;const{Axios:Ur,AxiosError:Lr,CanceledError:Br,isCancel:Dr,CancelToken:jr,VERSION:qr,all:Ir,Cancel:Hr,isAxiosError:Ot,spread:Mr,toFormData:$r,AxiosHeaders:zr,HttpStatusCode:vr,formToJSON:Jr,getAdapter:Vr,mergeConfig:Kr}=g;class se{static settings=null;static promise=null;static baseUrl=xt();static async load(){if(this.settings!==null)return this.settings;if(this.promise!==null)return this.promise;this.promise=new Promise(n=>g.get("/ui-settings",{baseURL:this.baseUrl}).then(({data:r})=>L.map("SettingsResponse",r,"Settings")).then(n));const t=await this.promise;return this.settings=t}static async get(t,n){await this.load();const r=this.settings?.[t];if(r===void 0){if(n)return n;throw`UI setting "${t}" does not exist and no default was provided.`}return r}}const Wr={getFeatureFlags:()=>se.get("flags")};class mr extends et{routePrefix="/admin";getSettings(){return this.get("/settings").then(({data:t})=>t)}async getVersion(){return await this.get("/version").then(({data:t})=>t)}async authCheck(){if(!await se.get("auth"))return 200;try{return(await this.get("/version")).status}catch(n){return n.response?n.response.status:500}}}const yr={class:"flex flex-col gap-2"},wr={key:1},gr=Pt({__name:"ApiStatusToast",setup(e){const t=localStorage.getItem("prefect-show-promotional-content"),n=kt(()=>t!=="false");return(r,s)=>(he(),de("div",yr,[Ue(De(Nt),{heading:6},{default:Le(()=>[...s[0]||(s[0]=[Be(" Oops. Something went wrong. ",-1)])]),_:1}),n.value?(he(),de(_t,{key:0},[s[2]||(s[2]=je("div",null," You can use Prefect Cloud for free, anytime. ",-1)),je("div",null,[Ue(De(Ft),{to:"https://app.prefect.cloud/auth/sign-up?utm_source=prefect-oss&utm_medium=toast",variant:"default",target:"_blank"},{default:Le(()=>[...s[1]||(s[1]=[Be(" Try it now ",-1)])]),_:1})])],64)):(he(),de("div",wr," Please check your connection and try again. "))]))}}),br=[500],Rr=[401,403],Er=["ERR_NETWORK"],ge=Ut(!1);function Sr(e){if(ge.value)return;const t=e.interceptors.response.use(void 0,r);function n(i){if(!Ot(i)||!i.code)return!1;const o=i.response?.status;return typeof o=="number"?Rr.includes(o)||br.some(c=>o>=c&&o<c+100):Er.includes(i.code)}function r(i){return n(i)&&!ge.value&&(ge.value=!0,Lt(gr,"error",{dismissible:!0,timeout:!1}),s()),Promise.reject(i)}function s(){e.interceptors.response.eject(t)}}class Tr extends Bt{async getAutomation(t){const{data:n}=await this.get(`/${t}`);return L.map("AutomationResponse",n,"Automation")}async getAutomations(t={}){const{data:n}=await this.post("/filter",t);return L.map("AutomationResponse",n,"Automation")}async createAutomation(t){const n=L.map("AutomationCreate",t,"AutomationCreateRequest"),{data:r}=await this.post("/",n);return L.map("AutomationResponse",r,"Automation")}updateAutomation(t,n){const r=L.map("AutomationCreate",n,"AutomationCreateRequest");return this.put(`/${t}`,r)}async getResourceAutomations(t){const{data:n}=await this.get(`related-to/${t}`);return L.map("AutomationResponse",n,"Automation")}}const Ar=1;class Or extends et{csrfToken;clientId=Dt();refreshTimeout=null;ongoingRefresh=null;constructor(t,n=null){super(t,n),this.startBackgroundTokenRefresh()}async addCsrfHeaders(t){if(!await se.get("csrfEnabled"))return;const r=await this.getCsrfToken();t.headers["Prefect-Csrf-Token"]=r.token,t.headers["Prefect-Csrf-Client"]=this.clientId,t.headers["Prefect-Csrf-Retry-Count"]=t.headers["Prefect-Csrf-Retry-Count"]??"0"}async getCsrfToken(){if(this.shouldRefreshToken()&&await this.refreshCsrfToken(),!this.csrfToken)throw new Error("CSRF token not available");return this.csrfToken}refreshCsrfToken(t=!1){if(!t&&!this.shouldRefreshToken())return this.ongoingRefresh??Promise.resolve();if(this.ongoingRefresh)return this.ongoingRefresh;const n=async()=>{try{const r=localStorage.getItem("prefect-password"),s=await this.get(`/csrf-token?client=${this.clientId}`,{headers:r?{Authorization:`Basic ${r}`}:void 0});this.csrfToken=L.map("CsrfTokenResponse",s.data,"CsrfToken"),this.ongoingRefresh=null}catch(r){throw this.ongoingRefresh=null,r}};return this.ongoingRefresh=n(),this.ongoingRefresh}shouldRefreshToken(){return this.csrfToken?new Date>this.csrfToken.expiration:!0}async startBackgroundTokenRefresh(){if(!await se.get("csrfEnabled"))return;const n=()=>{if(this.csrfToken){const s=new Date,i=new Date(this.csrfToken.expiration),o=this.csrfToken.issued,c=i.getTime()-o.getTime();return o.getTime()+c*.75-s.getTime()}return 0},r=async()=>{await this.refreshCsrfToken(!0),this.refreshTimeout=setTimeout(r,n())};this.refreshTimeout=setTimeout(r,n())}}function Cr(e){return jt(e)?e.response.status===403&&e.response.data.detail.includes("Invalid CSRF token"):!1}function xr(e,t){t.interceptors.request.use(async n=>{const r=n.method?.toLowerCase();r&&["post","patch","put","delete"].includes(r)&&await e.addCsrfHeaders(n);const s=localStorage.getItem("prefect-password");return s&&(n.headers.Authorization=`Basic ${s}`),n}),t.interceptors.response.use(void 0,async n=>{if(Ot(n)&&Cr(n)){const{config:r}=n;if(r?.headers["Prefect-Csrf-Retry-Count"]){const s=parseInt(r.headers["Prefect-Csrf-Retry-Count"],10);if(s<Ar)return await e.addCsrfHeaders(r),r.headers["Prefect-Csrf-Retry-Count"]=(s+1).toString(),t(r)}}return Promise.reject(n)})}function Xr(e){const t=pe(new Or(e));function n(s){Sr(s),xr(t,s);const i=localStorage.getItem("prefect-password");i&&(s.defaults.headers.common.Authorization=`Basic ${i}`)}return{...qt(e,n),csrf:t,admin:pe(new mr(e,n)),automations:pe(new Tr(e,n))}}const Pr=Symbol("PrefectApi");function Gr(){return It(Pr)}export{se as U,Wr as a,Xr as c,Pr as p,Gr as u};
7
- //# sourceMappingURL=usePrefectApi-B2fKZYDa.js.map
7
+ //# sourceMappingURL=usePrefectApi-Cn-hX9ms.js.map