@ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.1 → 1.0.0-beta.11

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 (307) hide show
  1. package/README.md +19 -752
  2. package/dist/browser/ezreeport-sdk-js.mjs +1054 -891
  3. package/dist/browser/ezreeport-sdk-js.mjs.map +1 -1
  4. package/dist/browser/ezreeport-sdk-js.umd.js +5 -3
  5. package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -1
  6. package/dist/dist/browser/ezreeport-sdk-js.mjs +2426 -0
  7. package/dist/dist/browser/ezreeport-sdk-js.mjs.map +1 -0
  8. package/dist/dist/browser/ezreeport-sdk-js.umd.js +6 -0
  9. package/dist/dist/browser/ezreeport-sdk-js.umd.js.map +1 -0
  10. package/dist/dist/dist/browser/ezreeport-sdk-js.mjs +2426 -0
  11. package/dist/dist/dist/browser/ezreeport-sdk-js.mjs.map +1 -0
  12. package/dist/dist/dist/browser/ezreeport-sdk-js.umd.js +6 -0
  13. package/dist/dist/dist/browser/ezreeport-sdk-js.umd.js.map +1 -0
  14. package/dist/dist/dist/node/package.json +58 -0
  15. package/dist/dist/dist/node/src/index.js +43 -0
  16. package/dist/dist/dist/node/src/index.js.map +1 -0
  17. package/dist/dist/dist/node/src/lib/axios.js +95 -0
  18. package/dist/dist/dist/node/src/lib/axios.js.map +1 -0
  19. package/dist/dist/dist/node/src/lib/promises.js +41 -0
  20. package/dist/dist/dist/node/src/lib/promises.js.map +1 -0
  21. package/dist/dist/dist/node/src/lib/utils.js +24 -0
  22. package/dist/dist/dist/node/src/lib/utils.js.map +1 -0
  23. package/dist/dist/dist/node/src/modules/auth.js +111 -0
  24. package/dist/dist/dist/node/src/modules/auth.js.map +1 -0
  25. package/dist/dist/dist/node/src/modules/auth.public.js +11 -0
  26. package/dist/dist/dist/node/src/modules/auth.public.js.map +1 -0
  27. package/dist/dist/dist/node/src/modules/crons.js +128 -0
  28. package/dist/dist/dist/node/src/modules/crons.js.map +1 -0
  29. package/dist/dist/dist/node/src/modules/crons.public.js +11 -0
  30. package/dist/dist/dist/node/src/modules/crons.public.js.map +1 -0
  31. package/dist/dist/dist/node/src/modules/elastic.js +31 -0
  32. package/dist/dist/dist/node/src/modules/elastic.js.map +1 -0
  33. package/dist/dist/dist/node/src/modules/elastic.public.js +7 -0
  34. package/dist/dist/dist/node/src/modules/elastic.public.js.map +1 -0
  35. package/dist/dist/dist/node/src/modules/health.js +60 -0
  36. package/dist/dist/dist/node/src/modules/health.js.map +1 -0
  37. package/dist/dist/dist/node/src/modules/health.public.js +9 -0
  38. package/dist/dist/dist/node/src/modules/health.public.js.map +1 -0
  39. package/dist/dist/dist/node/src/modules/history.js +62 -0
  40. package/dist/dist/dist/node/src/modules/history.js.map +1 -0
  41. package/dist/dist/dist/node/src/modules/history.public.js +6 -0
  42. package/dist/dist/dist/node/src/modules/history.public.js.map +1 -0
  43. package/dist/dist/dist/node/src/modules/namespaces.js +15 -0
  44. package/dist/dist/dist/node/src/modules/namespaces.js.map +1 -0
  45. package/dist/dist/dist/node/src/modules/namespaces.public.js +3 -0
  46. package/dist/dist/dist/node/src/modules/namespaces.public.js.map +1 -0
  47. package/dist/dist/dist/node/src/modules/queues.js +179 -0
  48. package/dist/dist/dist/node/src/modules/queues.js.map +1 -0
  49. package/dist/dist/dist/node/src/modules/queues.public.js +13 -0
  50. package/dist/dist/dist/node/src/modules/queues.public.js.map +1 -0
  51. package/dist/dist/dist/node/src/modules/reports.js +267 -0
  52. package/dist/dist/dist/node/src/modules/reports.js.map +1 -0
  53. package/dist/dist/dist/node/src/modules/reports.public.js +13 -0
  54. package/dist/dist/dist/node/src/modules/reports.public.js.map +1 -0
  55. package/dist/dist/dist/node/src/modules/setup.js +35 -0
  56. package/dist/dist/dist/node/src/modules/setup.js.map +1 -0
  57. package/dist/dist/dist/node/src/modules/setup.public.js +12 -0
  58. package/dist/dist/dist/node/src/modules/setup.public.js.map +1 -0
  59. package/dist/dist/dist/node/src/modules/tasks.base.js +51 -0
  60. package/dist/dist/dist/node/src/modules/tasks.base.js.map +1 -0
  61. package/dist/dist/dist/node/src/modules/tasks.js +281 -0
  62. package/dist/dist/dist/node/src/modules/tasks.js.map +1 -0
  63. package/dist/dist/dist/node/src/modules/tasks.public.js +21 -0
  64. package/dist/dist/dist/node/src/modules/tasks.public.js.map +1 -0
  65. package/dist/dist/dist/node/src/modules/tasksActivity.js +62 -0
  66. package/dist/dist/dist/node/src/modules/tasksActivity.js.map +1 -0
  67. package/dist/dist/dist/node/src/modules/tasksActivity.public.js +6 -0
  68. package/dist/dist/dist/node/src/modules/tasksActivity.public.js.map +1 -0
  69. package/dist/dist/dist/node/src/modules/tasksPresets.js +102 -0
  70. package/dist/dist/dist/node/src/modules/tasksPresets.js.map +1 -0
  71. package/dist/dist/dist/node/src/modules/tasksPresets.public.js +10 -0
  72. package/dist/dist/dist/node/src/modules/tasksPresets.public.js.map +1 -0
  73. package/dist/dist/dist/node/src/modules/templates.js +136 -0
  74. package/dist/dist/dist/node/src/modules/templates.js.map +1 -0
  75. package/dist/dist/dist/node/src/modules/templates.public.js +11 -0
  76. package/dist/dist/dist/node/src/modules/templates.public.js.map +1 -0
  77. package/dist/dist/dist/test +0 -0
  78. package/dist/{types → dist/dist/types/src}/index.d.ts +10 -2
  79. package/dist/{types → dist/dist/types/src}/lib/axios.d.ts +3 -3
  80. package/dist/dist/dist/types/src/lib/promises.d.ts +21 -0
  81. package/dist/{types → dist/dist/types/src}/lib/utils.d.ts +5 -0
  82. package/dist/{types → dist/dist/types/src}/modules/auth.d.ts +4 -4
  83. package/dist/{types → dist/dist/types/src}/modules/crons.d.ts +32 -8
  84. package/dist/dist/dist/types/src/modules/crons.public.d.ts +1 -0
  85. package/dist/dist/dist/types/src/modules/elastic.d.ts +22 -0
  86. package/dist/dist/dist/types/src/modules/elastic.public.d.ts +1 -0
  87. package/dist/{types → dist/dist/types/src}/modules/namespaces.d.ts +10 -0
  88. package/dist/dist/dist/types/src/modules/queues.d.ts +120 -0
  89. package/dist/dist/dist/types/src/modules/queues.public.d.ts +1 -0
  90. package/dist/{types → dist/dist/types/src}/modules/reports.d.ts +27 -17
  91. package/dist/dist/dist/types/src/modules/tasks.d.ts +243 -0
  92. package/dist/dist/dist/types/src/modules/tasks.public.d.ts +2 -0
  93. package/dist/dist/dist/types/src/modules/tasksActivity.d.ts +36 -0
  94. package/dist/dist/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
  95. package/dist/dist/dist/types/src/modules/tasksPresets.d.ts +83 -0
  96. package/dist/dist/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
  97. package/dist/dist/dist/types/src/modules/templates.d.ts +153 -0
  98. package/dist/dist/node/package.json +58 -0
  99. package/dist/dist/node/src/index.js +43 -0
  100. package/dist/dist/node/src/index.js.map +1 -0
  101. package/dist/dist/node/src/lib/axios.js +95 -0
  102. package/dist/dist/node/src/lib/axios.js.map +1 -0
  103. package/dist/dist/node/src/lib/promises.js +41 -0
  104. package/dist/dist/node/src/lib/promises.js.map +1 -0
  105. package/dist/dist/node/src/lib/utils.js +24 -0
  106. package/dist/dist/node/src/lib/utils.js.map +1 -0
  107. package/dist/dist/node/src/modules/auth.js +111 -0
  108. package/dist/dist/node/src/modules/auth.js.map +1 -0
  109. package/dist/dist/node/src/modules/auth.public.js +11 -0
  110. package/dist/dist/node/src/modules/auth.public.js.map +1 -0
  111. package/dist/dist/node/src/modules/crons.js +128 -0
  112. package/dist/dist/node/src/modules/crons.js.map +1 -0
  113. package/dist/dist/node/src/modules/crons.public.js +11 -0
  114. package/dist/dist/node/src/modules/crons.public.js.map +1 -0
  115. package/dist/dist/node/src/modules/elastic.js +31 -0
  116. package/dist/dist/node/src/modules/elastic.js.map +1 -0
  117. package/dist/dist/node/src/modules/elastic.public.js +7 -0
  118. package/dist/dist/node/src/modules/elastic.public.js.map +1 -0
  119. package/dist/dist/node/src/modules/health.js +60 -0
  120. package/dist/dist/node/src/modules/health.js.map +1 -0
  121. package/dist/dist/node/src/modules/health.public.js +9 -0
  122. package/dist/dist/node/src/modules/health.public.js.map +1 -0
  123. package/dist/dist/node/src/modules/history.js +62 -0
  124. package/dist/dist/node/src/modules/history.js.map +1 -0
  125. package/dist/dist/node/src/modules/history.public.js +6 -0
  126. package/dist/dist/node/src/modules/history.public.js.map +1 -0
  127. package/dist/dist/node/src/modules/namespaces.js +15 -0
  128. package/dist/dist/node/src/modules/namespaces.js.map +1 -0
  129. package/dist/dist/node/src/modules/namespaces.public.js +3 -0
  130. package/dist/dist/node/src/modules/namespaces.public.js.map +1 -0
  131. package/dist/dist/node/src/modules/queues.js +179 -0
  132. package/dist/dist/node/src/modules/queues.js.map +1 -0
  133. package/dist/dist/node/src/modules/queues.public.js +13 -0
  134. package/dist/dist/node/src/modules/queues.public.js.map +1 -0
  135. package/dist/dist/node/src/modules/reports.js +267 -0
  136. package/dist/dist/node/src/modules/reports.js.map +1 -0
  137. package/dist/dist/node/src/modules/reports.public.js +13 -0
  138. package/dist/dist/node/src/modules/reports.public.js.map +1 -0
  139. package/dist/dist/node/src/modules/setup.js +35 -0
  140. package/dist/dist/node/src/modules/setup.js.map +1 -0
  141. package/dist/dist/node/src/modules/setup.public.js +12 -0
  142. package/dist/dist/node/src/modules/setup.public.js.map +1 -0
  143. package/dist/dist/node/src/modules/tasks.base.js +51 -0
  144. package/dist/dist/node/src/modules/tasks.base.js.map +1 -0
  145. package/dist/dist/node/src/modules/tasks.js +281 -0
  146. package/dist/dist/node/src/modules/tasks.js.map +1 -0
  147. package/dist/dist/node/src/modules/tasks.public.js +21 -0
  148. package/dist/dist/node/src/modules/tasks.public.js.map +1 -0
  149. package/dist/dist/node/src/modules/tasksActivity.js +62 -0
  150. package/dist/dist/node/src/modules/tasksActivity.js.map +1 -0
  151. package/dist/dist/node/src/modules/tasksActivity.public.js +6 -0
  152. package/dist/dist/node/src/modules/tasksActivity.public.js.map +1 -0
  153. package/dist/dist/node/src/modules/tasksPresets.js +102 -0
  154. package/dist/dist/node/src/modules/tasksPresets.js.map +1 -0
  155. package/dist/dist/node/src/modules/tasksPresets.public.js +10 -0
  156. package/dist/dist/node/src/modules/tasksPresets.public.js.map +1 -0
  157. package/dist/dist/node/src/modules/templates.js +136 -0
  158. package/dist/dist/node/src/modules/templates.js.map +1 -0
  159. package/dist/dist/node/src/modules/templates.public.js +11 -0
  160. package/dist/dist/node/src/modules/templates.public.js.map +1 -0
  161. package/dist/dist/test +0 -0
  162. package/dist/dist/types/src/index.d.ts +32 -0
  163. package/dist/dist/types/src/lib/axios.d.ts +51 -0
  164. package/dist/dist/types/src/lib/promises.d.ts +21 -0
  165. package/dist/dist/types/src/lib/utils.d.ts +27 -0
  166. package/dist/dist/types/src/modules/auth.d.ts +90 -0
  167. package/dist/dist/types/src/modules/auth.public.d.ts +1 -0
  168. package/dist/dist/types/src/modules/crons.d.ts +102 -0
  169. package/dist/dist/types/src/modules/crons.public.d.ts +1 -0
  170. package/dist/dist/types/src/modules/elastic.d.ts +22 -0
  171. package/dist/dist/types/src/modules/elastic.public.d.ts +1 -0
  172. package/dist/dist/types/src/modules/health.d.ts +53 -0
  173. package/dist/dist/types/src/modules/health.public.d.ts +1 -0
  174. package/dist/dist/types/src/modules/history.d.ts +38 -0
  175. package/dist/dist/types/src/modules/history.public.d.ts +1 -0
  176. package/dist/dist/types/src/modules/namespaces.d.ts +29 -0
  177. package/dist/dist/types/src/modules/namespaces.public.d.ts +1 -0
  178. package/dist/dist/types/src/modules/queues.d.ts +120 -0
  179. package/dist/dist/types/src/modules/queues.public.d.ts +1 -0
  180. package/dist/dist/types/src/modules/reports.d.ts +204 -0
  181. package/dist/dist/types/src/modules/reports.public.d.ts +1 -0
  182. package/dist/dist/types/src/modules/setup.d.ts +17 -0
  183. package/dist/dist/types/src/modules/setup.public.d.ts +2 -0
  184. package/dist/dist/types/src/modules/tasks.base.d.ts +48 -0
  185. package/dist/dist/types/src/modules/tasks.d.ts +243 -0
  186. package/dist/dist/types/src/modules/tasks.public.d.ts +2 -0
  187. package/dist/dist/types/src/modules/tasksActivity.d.ts +36 -0
  188. package/dist/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
  189. package/dist/dist/types/src/modules/tasksPresets.d.ts +83 -0
  190. package/dist/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
  191. package/dist/dist/types/src/modules/templates.d.ts +153 -0
  192. package/dist/dist/types/src/modules/templates.public.d.ts +1 -0
  193. package/dist/node/package.json +15 -13
  194. package/dist/node/src/index.js +43 -0
  195. package/dist/node/src/index.js.map +1 -0
  196. package/dist/node/src/lib/axios.js +95 -0
  197. package/dist/node/src/lib/axios.js.map +1 -0
  198. package/dist/node/src/lib/promises.js +41 -0
  199. package/dist/node/src/lib/promises.js.map +1 -0
  200. package/dist/node/src/lib/utils.js +24 -0
  201. package/dist/node/src/lib/utils.js.map +1 -0
  202. package/dist/node/src/modules/auth.js +114 -0
  203. package/dist/node/src/modules/auth.js.map +1 -0
  204. package/dist/node/src/modules/auth.public.js +11 -0
  205. package/dist/node/src/modules/auth.public.js.map +1 -0
  206. package/dist/node/src/modules/crons.js +128 -0
  207. package/dist/node/src/modules/crons.js.map +1 -0
  208. package/dist/node/src/modules/crons.public.js +11 -0
  209. package/dist/node/src/modules/crons.public.js.map +1 -0
  210. package/dist/node/src/modules/elastic.js +31 -0
  211. package/dist/node/src/modules/elastic.js.map +1 -0
  212. package/dist/node/src/modules/elastic.public.js +7 -0
  213. package/dist/node/src/modules/elastic.public.js.map +1 -0
  214. package/dist/node/src/modules/health.js +60 -0
  215. package/dist/node/src/modules/health.js.map +1 -0
  216. package/dist/node/src/modules/health.public.js +9 -0
  217. package/dist/node/src/modules/health.public.js.map +1 -0
  218. package/dist/node/src/modules/history.js +62 -0
  219. package/dist/node/src/modules/history.js.map +1 -0
  220. package/dist/node/src/modules/history.public.js +6 -0
  221. package/dist/node/src/modules/history.public.js.map +1 -0
  222. package/dist/node/src/modules/namespaces.js +15 -0
  223. package/dist/node/src/modules/namespaces.js.map +1 -0
  224. package/dist/node/src/modules/namespaces.public.js +3 -0
  225. package/dist/node/src/modules/namespaces.public.js.map +1 -0
  226. package/dist/node/src/modules/queues.js +179 -0
  227. package/dist/node/src/modules/queues.js.map +1 -0
  228. package/dist/node/src/modules/queues.public.js +13 -0
  229. package/dist/node/src/modules/queues.public.js.map +1 -0
  230. package/dist/node/src/modules/reports.js +267 -0
  231. package/dist/node/src/modules/reports.js.map +1 -0
  232. package/dist/node/src/modules/reports.public.js +13 -0
  233. package/dist/node/src/modules/reports.public.js.map +1 -0
  234. package/dist/node/src/modules/setup.js +35 -0
  235. package/dist/node/src/modules/setup.js.map +1 -0
  236. package/dist/node/src/modules/setup.public.js +12 -0
  237. package/dist/node/src/modules/setup.public.js.map +1 -0
  238. package/dist/node/src/modules/tasks.base.js +51 -0
  239. package/dist/node/src/modules/tasks.base.js.map +1 -0
  240. package/dist/node/src/modules/tasks.js +281 -0
  241. package/dist/node/src/modules/tasks.js.map +1 -0
  242. package/dist/node/src/modules/tasks.public.js +21 -0
  243. package/dist/node/src/modules/tasks.public.js.map +1 -0
  244. package/dist/node/src/modules/tasksActivity.js +62 -0
  245. package/dist/node/src/modules/tasksActivity.js.map +1 -0
  246. package/dist/node/src/modules/tasksActivity.public.js +6 -0
  247. package/dist/node/src/modules/tasksActivity.public.js.map +1 -0
  248. package/dist/node/src/modules/tasksPresets.js +102 -0
  249. package/dist/node/src/modules/tasksPresets.js.map +1 -0
  250. package/dist/node/src/modules/tasksPresets.public.js +10 -0
  251. package/dist/node/src/modules/tasksPresets.public.js.map +1 -0
  252. package/dist/node/src/modules/templates.js +136 -0
  253. package/dist/node/src/modules/templates.js.map +1 -0
  254. package/dist/node/src/modules/templates.public.js +11 -0
  255. package/dist/node/src/modules/templates.public.js.map +1 -0
  256. package/dist/types/src/index.d.ts +32 -0
  257. package/dist/types/src/lib/axios.d.ts +51 -0
  258. package/dist/types/src/lib/promises.d.ts +21 -0
  259. package/dist/types/src/lib/utils.d.ts +27 -0
  260. package/dist/types/src/modules/auth.d.ts +90 -0
  261. package/dist/types/src/modules/auth.public.d.ts +1 -0
  262. package/dist/types/src/modules/crons.d.ts +102 -0
  263. package/dist/types/src/modules/crons.public.d.ts +1 -0
  264. package/dist/types/src/modules/elastic.d.ts +22 -0
  265. package/dist/types/src/modules/elastic.public.d.ts +1 -0
  266. package/dist/types/src/modules/health.d.ts +53 -0
  267. package/dist/types/src/modules/health.public.d.ts +1 -0
  268. package/dist/types/src/modules/history.d.ts +38 -0
  269. package/dist/types/src/modules/history.public.d.ts +1 -0
  270. package/dist/types/src/modules/namespaces.d.ts +29 -0
  271. package/dist/types/src/modules/namespaces.public.d.ts +1 -0
  272. package/dist/types/src/modules/queues.d.ts +120 -0
  273. package/dist/types/src/modules/queues.public.d.ts +1 -0
  274. package/dist/types/src/modules/reports.d.ts +204 -0
  275. package/dist/types/src/modules/reports.public.d.ts +1 -0
  276. package/dist/types/src/modules/setup.d.ts +17 -0
  277. package/dist/types/src/modules/setup.public.d.ts +2 -0
  278. package/dist/types/src/modules/tasks.base.d.ts +48 -0
  279. package/dist/types/src/modules/tasks.d.ts +243 -0
  280. package/dist/types/src/modules/tasks.public.d.ts +2 -0
  281. package/dist/types/src/modules/tasksActivity.d.ts +36 -0
  282. package/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
  283. package/dist/types/src/modules/tasksPresets.d.ts +83 -0
  284. package/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
  285. package/dist/types/src/modules/templates.d.ts +153 -0
  286. package/dist/types/src/modules/templates.public.d.ts +1 -0
  287. package/package.json +14 -12
  288. package/CHANGELOG.md +0 -42
  289. package/dist/types/lib/promises.d.ts +0 -18
  290. package/dist/types/modules/crons.public.d.ts +0 -1
  291. package/dist/types/modules/institutions.d.ts +0 -56
  292. package/dist/types/modules/queues.d.ts +0 -93
  293. package/dist/types/modules/queues.public.d.ts +0 -1
  294. package/dist/types/modules/tasks.d.ts +0 -124
  295. package/dist/types/modules/tasks.public.d.ts +0 -2
  296. package/dist/types/modules/templates.d.ts +0 -120
  297. /package/dist/{types → dist/dist/types/src}/modules/auth.public.d.ts +0 -0
  298. /package/dist/{types → dist/dist/types/src}/modules/health.d.ts +0 -0
  299. /package/dist/{types → dist/dist/types/src}/modules/health.public.d.ts +0 -0
  300. /package/dist/{types → dist/dist/types/src}/modules/history.d.ts +0 -0
  301. /package/dist/{types → dist/dist/types/src}/modules/history.public.d.ts +0 -0
  302. /package/dist/{types → dist/dist/types/src}/modules/namespaces.public.d.ts +0 -0
  303. /package/dist/{types → dist/dist/types/src}/modules/reports.public.d.ts +0 -0
  304. /package/dist/{types → dist/dist/types/src}/modules/setup.d.ts +0 -0
  305. /package/dist/{types → dist/dist/types/src}/modules/setup.public.d.ts +0 -0
  306. /package/dist/{types → dist/dist/types/src}/modules/tasks.base.d.ts +0 -0
  307. /package/dist/{types → dist/dist/types/src}/modules/templates.public.d.ts +0 -0
@@ -0,0 +1,2426 @@
1
+ function w(e, t) {
2
+ const n = (t == null ? void 0 : t.additionalDigits) ?? 2, r = Ct(e);
3
+ let s;
4
+ if (r.date) {
5
+ const l = Nt(r.date, n);
6
+ s = $t(l.restDateString, l.year);
7
+ }
8
+ if (!s || isNaN(s.getTime()))
9
+ return /* @__PURE__ */ new Date(NaN);
10
+ const o = s.getTime();
11
+ let i = 0, c;
12
+ if (r.time && (i = Pt(r.time), isNaN(i)))
13
+ return /* @__PURE__ */ new Date(NaN);
14
+ if (r.timezone) {
15
+ if (c = kt(r.timezone), isNaN(c))
16
+ return /* @__PURE__ */ new Date(NaN);
17
+ } else {
18
+ const l = new Date(o + i), d = /* @__PURE__ */ new Date(0);
19
+ return d.setFullYear(
20
+ l.getUTCFullYear(),
21
+ l.getUTCMonth(),
22
+ l.getUTCDate()
23
+ ), d.setHours(
24
+ l.getUTCHours(),
25
+ l.getUTCMinutes(),
26
+ l.getUTCSeconds(),
27
+ l.getUTCMilliseconds()
28
+ ), d;
29
+ }
30
+ return new Date(o + i + c);
31
+ }
32
+ const q = {
33
+ dateTimeDelimiter: /[T ]/,
34
+ timeZoneDelimiter: /[Z ]/i,
35
+ timezone: /([Z+-].*)$/
36
+ }, Ot = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Lt = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, xt = /^([+-])(\d{2})(?::?(\d{2}))?$/;
37
+ function Ct(e) {
38
+ const t = {}, n = e.split(q.dateTimeDelimiter);
39
+ let r;
40
+ if (n.length > 2)
41
+ return t;
42
+ if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], q.timeZoneDelimiter.test(t.date) && (t.date = e.split(q.timeZoneDelimiter)[0], r = e.substr(
43
+ t.date.length,
44
+ e.length
45
+ ))), r) {
46
+ const s = q.timezone.exec(r);
47
+ s ? (t.time = r.replace(s[1], ""), t.timezone = s[1]) : t.time = r;
48
+ }
49
+ return t;
50
+ }
51
+ function Nt(e, t) {
52
+ const n = new RegExp(
53
+ "^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
54
+ ), r = e.match(n);
55
+ if (!r)
56
+ return { year: NaN, restDateString: "" };
57
+ const s = r[1] ? parseInt(r[1]) : null, o = r[2] ? parseInt(r[2]) : null;
58
+ return {
59
+ year: o === null ? s : o * 100,
60
+ restDateString: e.slice((r[1] || r[2]).length)
61
+ };
62
+ }
63
+ function $t(e, t) {
64
+ if (t === null)
65
+ return /* @__PURE__ */ new Date(NaN);
66
+ const n = e.match(Ot);
67
+ if (!n)
68
+ return /* @__PURE__ */ new Date(NaN);
69
+ const r = !!n[4], s = U(n[1]), o = U(n[2]) - 1, i = U(n[3]), c = U(n[4]), l = U(n[5]) - 1;
70
+ if (r)
71
+ return Bt(t, c, l) ? Dt(t, c, l) : /* @__PURE__ */ new Date(NaN);
72
+ {
73
+ const d = /* @__PURE__ */ new Date(0);
74
+ return !jt(t, o, i) || !Ut(t, s) ? /* @__PURE__ */ new Date(NaN) : (d.setUTCFullYear(t, o, Math.max(s, i)), d);
75
+ }
76
+ }
77
+ function U(e) {
78
+ return e ? parseInt(e) : 1;
79
+ }
80
+ function Pt(e) {
81
+ const t = e.match(Lt);
82
+ if (!t)
83
+ return NaN;
84
+ const n = re(t[1]), r = re(t[2]), s = re(t[3]);
85
+ return Mt(n, r, s) ? n * 36e5 + r * 6e4 + s * 1e3 : NaN;
86
+ }
87
+ function re(e) {
88
+ return e && parseFloat(e.replace(",", ".")) || 0;
89
+ }
90
+ function kt(e) {
91
+ if (e === "Z")
92
+ return 0;
93
+ const t = e.match(xt);
94
+ if (!t)
95
+ return 0;
96
+ const n = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), s = t[3] && parseInt(t[3]) || 0;
97
+ return Ht(r, s) ? n * (r * 36e5 + s * 6e4) : NaN;
98
+ }
99
+ function Dt(e, t, n) {
100
+ const r = /* @__PURE__ */ new Date(0);
101
+ r.setUTCFullYear(e, 0, 4);
102
+ const s = r.getUTCDay() || 7, o = (t - 1) * 7 + n + 1 - s;
103
+ return r.setUTCDate(r.getUTCDate() + o), r;
104
+ }
105
+ const Ft = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
106
+ function je(e) {
107
+ return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
108
+ }
109
+ function jt(e, t, n) {
110
+ return t >= 0 && t <= 11 && n >= 1 && n <= (Ft[t] || (je(e) ? 29 : 28));
111
+ }
112
+ function Ut(e, t) {
113
+ return t >= 1 && t <= (je(e) ? 366 : 365);
114
+ }
115
+ function Bt(e, t, n) {
116
+ return t >= 1 && t <= 53 && n >= 0 && n <= 6;
117
+ }
118
+ function Mt(e, t, n) {
119
+ return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
120
+ }
121
+ function Ht(e, t) {
122
+ return t >= 0 && t <= 59;
123
+ }
124
+ function Ue(e, t) {
125
+ return function() {
126
+ return e.apply(t, arguments);
127
+ };
128
+ }
129
+ const { toString: zt } = Object.prototype, { getPrototypeOf: pe } = Object, G = /* @__PURE__ */ ((e) => (t) => {
130
+ const n = zt.call(t);
131
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
132
+ })(/* @__PURE__ */ Object.create(null)), v = (e) => (e = e.toLowerCase(), (t) => G(t) === e), Q = (e) => (t) => typeof t === e, { isArray: D } = Array, M = Q("undefined");
133
+ function It(e) {
134
+ return e !== null && !M(e) && e.constructor !== null && !M(e.constructor) && S(e.constructor.isBuffer) && e.constructor.isBuffer(e);
135
+ }
136
+ const Be = v("ArrayBuffer");
137
+ function qt(e) {
138
+ let t;
139
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Be(e.buffer), t;
140
+ }
141
+ const Jt = Q("string"), S = Q("function"), Me = Q("number"), X = (e) => e !== null && typeof e == "object", Wt = (e) => e === !0 || e === !1, J = (e) => {
142
+ if (G(e) !== "object")
143
+ return !1;
144
+ const t = pe(e);
145
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
146
+ }, Yt = v("Date"), Kt = v("File"), Vt = v("Blob"), Gt = v("FileList"), Qt = (e) => X(e) && S(e.pipe), Xt = (e) => {
147
+ let t;
148
+ return e && (typeof FormData == "function" && e instanceof FormData || S(e.append) && ((t = G(e)) === "formdata" || // detect form-data instance
149
+ t === "object" && S(e.toString) && e.toString() === "[object FormData]"));
150
+ }, Zt = v("URLSearchParams"), en = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
151
+ function H(e, t, { allOwnKeys: n = !1 } = {}) {
152
+ if (e === null || typeof e > "u")
153
+ return;
154
+ let r, s;
155
+ if (typeof e != "object" && (e = [e]), D(e))
156
+ for (r = 0, s = e.length; r < s; r++)
157
+ t.call(null, e[r], r, e);
158
+ else {
159
+ const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
160
+ let c;
161
+ for (r = 0; r < i; r++)
162
+ c = o[r], t.call(null, e[c], c, e);
163
+ }
164
+ }
165
+ function He(e, t) {
166
+ t = t.toLowerCase();
167
+ const n = Object.keys(e);
168
+ let r = n.length, s;
169
+ for (; r-- > 0; )
170
+ if (s = n[r], t === s.toLowerCase())
171
+ return s;
172
+ return null;
173
+ }
174
+ const ze = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ie = (e) => !M(e) && e !== ze;
175
+ function ce() {
176
+ const { caseless: e } = Ie(this) && this || {}, t = {}, n = (r, s) => {
177
+ const o = e && He(t, s) || s;
178
+ J(t[o]) && J(r) ? t[o] = ce(t[o], r) : J(r) ? t[o] = ce({}, r) : D(r) ? t[o] = r.slice() : t[o] = r;
179
+ };
180
+ for (let r = 0, s = arguments.length; r < s; r++)
181
+ arguments[r] && H(arguments[r], n);
182
+ return t;
183
+ }
184
+ const tn = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
185
+ n && S(s) ? e[o] = Ue(s, n) : e[o] = s;
186
+ }, { allOwnKeys: r }), e), nn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), rn = (e, t, n, r) => {
187
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
188
+ value: t.prototype
189
+ }), n && Object.assign(e.prototype, n);
190
+ }, sn = (e, t, n, r) => {
191
+ let s, o, i;
192
+ const c = {};
193
+ if (t = t || {}, e == null)
194
+ return t;
195
+ do {
196
+ for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
197
+ i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
198
+ e = n !== !1 && pe(e);
199
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
200
+ return t;
201
+ }, on = (e, t, n) => {
202
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
203
+ const r = e.indexOf(t, n);
204
+ return r !== -1 && r === n;
205
+ }, an = (e) => {
206
+ if (!e)
207
+ return null;
208
+ if (D(e))
209
+ return e;
210
+ let t = e.length;
211
+ if (!Me(t))
212
+ return null;
213
+ const n = new Array(t);
214
+ for (; t-- > 0; )
215
+ n[t] = e[t];
216
+ return n;
217
+ }, cn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && pe(Uint8Array)), un = (e, t) => {
218
+ const r = (e && e[Symbol.iterator]).call(e);
219
+ let s;
220
+ for (; (s = r.next()) && !s.done; ) {
221
+ const o = s.value;
222
+ t.call(e, o[0], o[1]);
223
+ }
224
+ }, ln = (e, t) => {
225
+ let n;
226
+ const r = [];
227
+ for (; (n = e.exec(t)) !== null; )
228
+ r.push(n);
229
+ return r;
230
+ }, fn = v("HTMLFormElement"), dn = (e) => e.toLowerCase().replace(
231
+ /[-_\s]([a-z\d])(\w*)/g,
232
+ function(n, r, s) {
233
+ return r.toUpperCase() + s;
234
+ }
235
+ ), Se = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), pn = v("RegExp"), qe = (e, t) => {
236
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
237
+ H(n, (s, o) => {
238
+ let i;
239
+ (i = t(s, o, e)) !== !1 && (r[o] = i || s);
240
+ }), Object.defineProperties(e, r);
241
+ }, hn = (e) => {
242
+ qe(e, (t, n) => {
243
+ if (S(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
244
+ return !1;
245
+ const r = e[n];
246
+ if (S(r)) {
247
+ if (t.enumerable = !1, "writable" in t) {
248
+ t.writable = !1;
249
+ return;
250
+ }
251
+ t.set || (t.set = () => {
252
+ throw Error("Can not rewrite read-only method '" + n + "'");
253
+ });
254
+ }
255
+ });
256
+ }, mn = (e, t) => {
257
+ const n = {}, r = (s) => {
258
+ s.forEach((o) => {
259
+ n[o] = !0;
260
+ });
261
+ };
262
+ return D(e) ? r(e) : r(String(e).split(t)), n;
263
+ }, yn = () => {
264
+ }, gn = (e, t) => (e = +e, Number.isFinite(e) ? e : t), se = "abcdefghijklmnopqrstuvwxyz", _e = "0123456789", Je = {
265
+ DIGIT: _e,
266
+ ALPHA: se,
267
+ ALPHA_DIGIT: se + se.toUpperCase() + _e
268
+ }, wn = (e = 16, t = Je.ALPHA_DIGIT) => {
269
+ let n = "";
270
+ const { length: r } = t;
271
+ for (; e--; )
272
+ n += t[Math.random() * r | 0];
273
+ return n;
274
+ };
275
+ function bn(e) {
276
+ return !!(e && S(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
277
+ }
278
+ const En = (e) => {
279
+ const t = new Array(10), n = (r, s) => {
280
+ if (X(r)) {
281
+ if (t.indexOf(r) >= 0)
282
+ return;
283
+ if (!("toJSON" in r)) {
284
+ t[s] = r;
285
+ const o = D(r) ? [] : {};
286
+ return H(r, (i, c) => {
287
+ const l = n(i, s + 1);
288
+ !M(l) && (o[c] = l);
289
+ }), t[s] = void 0, o;
290
+ }
291
+ }
292
+ return r;
293
+ };
294
+ return n(e, 0);
295
+ }, An = v("AsyncFunction"), Tn = (e) => e && (X(e) || S(e)) && S(e.then) && S(e.catch), a = {
296
+ isArray: D,
297
+ isArrayBuffer: Be,
298
+ isBuffer: It,
299
+ isFormData: Xt,
300
+ isArrayBufferView: qt,
301
+ isString: Jt,
302
+ isNumber: Me,
303
+ isBoolean: Wt,
304
+ isObject: X,
305
+ isPlainObject: J,
306
+ isUndefined: M,
307
+ isDate: Yt,
308
+ isFile: Kt,
309
+ isBlob: Vt,
310
+ isRegExp: pn,
311
+ isFunction: S,
312
+ isStream: Qt,
313
+ isURLSearchParams: Zt,
314
+ isTypedArray: cn,
315
+ isFileList: Gt,
316
+ forEach: H,
317
+ merge: ce,
318
+ extend: tn,
319
+ trim: en,
320
+ stripBOM: nn,
321
+ inherits: rn,
322
+ toFlatObject: sn,
323
+ kindOf: G,
324
+ kindOfTest: v,
325
+ endsWith: on,
326
+ toArray: an,
327
+ forEachEntry: un,
328
+ matchAll: ln,
329
+ isHTMLForm: fn,
330
+ hasOwnProperty: Se,
331
+ hasOwnProp: Se,
332
+ // an alias to avoid ESLint no-prototype-builtins detection
333
+ reduceDescriptors: qe,
334
+ freezeMethods: hn,
335
+ toObjectSet: mn,
336
+ toCamelCase: dn,
337
+ noop: yn,
338
+ toFiniteNumber: gn,
339
+ findKey: He,
340
+ global: ze,
341
+ isContextDefined: Ie,
342
+ ALPHABET: Je,
343
+ generateString: wn,
344
+ isSpecCompliantForm: bn,
345
+ toJSONObject: En,
346
+ isAsyncFn: An,
347
+ isThenable: Tn
348
+ };
349
+ function y(e, t, n, r, s) {
350
+ 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);
351
+ }
352
+ a.inherits(y, Error, {
353
+ toJSON: function() {
354
+ return {
355
+ // Standard
356
+ message: this.message,
357
+ name: this.name,
358
+ // Microsoft
359
+ description: this.description,
360
+ number: this.number,
361
+ // Mozilla
362
+ fileName: this.fileName,
363
+ lineNumber: this.lineNumber,
364
+ columnNumber: this.columnNumber,
365
+ stack: this.stack,
366
+ // Axios
367
+ config: a.toJSONObject(this.config),
368
+ code: this.code,
369
+ status: this.response && this.response.status ? this.response.status : null
370
+ };
371
+ }
372
+ });
373
+ const We = y.prototype, Ye = {};
374
+ [
375
+ "ERR_BAD_OPTION_VALUE",
376
+ "ERR_BAD_OPTION",
377
+ "ECONNABORTED",
378
+ "ETIMEDOUT",
379
+ "ERR_NETWORK",
380
+ "ERR_FR_TOO_MANY_REDIRECTS",
381
+ "ERR_DEPRECATED",
382
+ "ERR_BAD_RESPONSE",
383
+ "ERR_BAD_REQUEST",
384
+ "ERR_CANCELED",
385
+ "ERR_NOT_SUPPORT",
386
+ "ERR_INVALID_URL"
387
+ // eslint-disable-next-line func-names
388
+ ].forEach((e) => {
389
+ Ye[e] = { value: e };
390
+ });
391
+ Object.defineProperties(y, Ye);
392
+ Object.defineProperty(We, "isAxiosError", { value: !0 });
393
+ y.from = (e, t, n, r, s, o) => {
394
+ const i = Object.create(We);
395
+ return a.toFlatObject(e, i, function(l) {
396
+ return l !== Error.prototype;
397
+ }, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
398
+ };
399
+ const Rn = null;
400
+ function ue(e) {
401
+ return a.isPlainObject(e) || a.isArray(e);
402
+ }
403
+ function Ke(e) {
404
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
405
+ }
406
+ function ve(e, t, n) {
407
+ return e ? e.concat(t).map(function(s, o) {
408
+ return s = Ke(s), !n && o ? "[" + s + "]" : s;
409
+ }).join(n ? "." : "") : t;
410
+ }
411
+ function Sn(e) {
412
+ return a.isArray(e) && !e.some(ue);
413
+ }
414
+ const _n = a.toFlatObject(a, {}, null, function(t) {
415
+ return /^is[A-Z]/.test(t);
416
+ });
417
+ function Z(e, t, n) {
418
+ if (!a.isObject(e))
419
+ throw new TypeError("target must be an object");
420
+ t = t || new FormData(), n = a.toFlatObject(n, {
421
+ metaTokens: !0,
422
+ dots: !1,
423
+ indexes: !1
424
+ }, !1, function(m, A) {
425
+ return !a.isUndefined(A[m]);
426
+ });
427
+ const r = n.metaTokens, s = n.visitor || f, o = n.dots, i = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
428
+ if (!a.isFunction(s))
429
+ throw new TypeError("visitor must be a function");
430
+ function d(h) {
431
+ if (h === null)
432
+ return "";
433
+ if (a.isDate(h))
434
+ return h.toISOString();
435
+ if (!l && a.isBlob(h))
436
+ throw new y("Blob is not supported. Use a Buffer instead.");
437
+ return a.isArrayBuffer(h) || a.isTypedArray(h) ? l && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
438
+ }
439
+ function f(h, m, A) {
440
+ let T = h;
441
+ if (h && !A && typeof h == "object") {
442
+ if (a.endsWith(m, "{}"))
443
+ m = r ? m : m.slice(0, -2), h = JSON.stringify(h);
444
+ else if (a.isArray(h) && Sn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (T = a.toArray(h)))
445
+ return m = Ke(m), T.forEach(function(C, vt) {
446
+ !(a.isUndefined(C) || C === null) && t.append(
447
+ // eslint-disable-next-line no-nested-ternary
448
+ i === !0 ? ve([m], vt, o) : i === null ? m : m + "[]",
449
+ d(C)
450
+ );
451
+ }), !1;
452
+ }
453
+ return ue(h) ? !0 : (t.append(ve(A, m, o), d(h)), !1);
454
+ }
455
+ const u = [], E = Object.assign(_n, {
456
+ defaultVisitor: f,
457
+ convertValue: d,
458
+ isVisitable: ue
459
+ });
460
+ function R(h, m) {
461
+ if (!a.isUndefined(h)) {
462
+ if (u.indexOf(h) !== -1)
463
+ throw Error("Circular reference detected in " + m.join("."));
464
+ u.push(h), a.forEach(h, function(T, x) {
465
+ (!(a.isUndefined(T) || T === null) && s.call(
466
+ t,
467
+ T,
468
+ a.isString(x) ? x.trim() : x,
469
+ m,
470
+ E
471
+ )) === !0 && R(T, m ? m.concat(x) : [x]);
472
+ }), u.pop();
473
+ }
474
+ }
475
+ if (!a.isObject(e))
476
+ throw new TypeError("data must be an object");
477
+ return R(e), t;
478
+ }
479
+ function Oe(e) {
480
+ const t = {
481
+ "!": "%21",
482
+ "'": "%27",
483
+ "(": "%28",
484
+ ")": "%29",
485
+ "~": "%7E",
486
+ "%20": "+",
487
+ "%00": "\0"
488
+ };
489
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
490
+ return t[r];
491
+ });
492
+ }
493
+ function he(e, t) {
494
+ this._pairs = [], e && Z(e, this, t);
495
+ }
496
+ const Ve = he.prototype;
497
+ Ve.append = function(t, n) {
498
+ this._pairs.push([t, n]);
499
+ };
500
+ Ve.toString = function(t) {
501
+ const n = t ? function(r) {
502
+ return t.call(this, r, Oe);
503
+ } : Oe;
504
+ return this._pairs.map(function(s) {
505
+ return n(s[0]) + "=" + n(s[1]);
506
+ }, "").join("&");
507
+ };
508
+ function vn(e) {
509
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
510
+ }
511
+ function Ge(e, t, n) {
512
+ if (!t)
513
+ return e;
514
+ const r = n && n.encode || vn, s = n && n.serialize;
515
+ let o;
516
+ if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new he(t, n).toString(r), o) {
517
+ const i = e.indexOf("#");
518
+ i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
519
+ }
520
+ return e;
521
+ }
522
+ class Le {
523
+ constructor() {
524
+ this.handlers = [];
525
+ }
526
+ /**
527
+ * Add a new interceptor to the stack
528
+ *
529
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
530
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
531
+ *
532
+ * @return {Number} An ID used to remove interceptor later
533
+ */
534
+ use(t, n, r) {
535
+ return this.handlers.push({
536
+ fulfilled: t,
537
+ rejected: n,
538
+ synchronous: r ? r.synchronous : !1,
539
+ runWhen: r ? r.runWhen : null
540
+ }), this.handlers.length - 1;
541
+ }
542
+ /**
543
+ * Remove an interceptor from the stack
544
+ *
545
+ * @param {Number} id The ID that was returned by `use`
546
+ *
547
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
548
+ */
549
+ eject(t) {
550
+ this.handlers[t] && (this.handlers[t] = null);
551
+ }
552
+ /**
553
+ * Clear all interceptors from the stack
554
+ *
555
+ * @returns {void}
556
+ */
557
+ clear() {
558
+ this.handlers && (this.handlers = []);
559
+ }
560
+ /**
561
+ * Iterate over all the registered interceptors
562
+ *
563
+ * This method is particularly useful for skipping over any
564
+ * interceptors that may have become `null` calling `eject`.
565
+ *
566
+ * @param {Function} fn The function to call for each interceptor
567
+ *
568
+ * @returns {void}
569
+ */
570
+ forEach(t) {
571
+ a.forEach(this.handlers, function(r) {
572
+ r !== null && t(r);
573
+ });
574
+ }
575
+ }
576
+ const Qe = {
577
+ silentJSONParsing: !0,
578
+ forcedJSONParsing: !0,
579
+ clarifyTimeoutError: !1
580
+ }, On = typeof URLSearchParams < "u" ? URLSearchParams : he, Ln = typeof FormData < "u" ? FormData : null, xn = typeof Blob < "u" ? Blob : null, Cn = {
581
+ isBrowser: !0,
582
+ classes: {
583
+ URLSearchParams: On,
584
+ FormData: Ln,
585
+ Blob: xn
586
+ },
587
+ protocols: ["http", "https", "file", "blob", "url", "data"]
588
+ }, Xe = typeof window < "u" && typeof document < "u", Nn = ((e) => Xe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), $n = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
589
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
590
+ __proto__: null,
591
+ hasBrowserEnv: Xe,
592
+ hasStandardBrowserEnv: Nn,
593
+ hasStandardBrowserWebWorkerEnv: $n
594
+ }, Symbol.toStringTag, { value: "Module" })), _ = {
595
+ ...Pn,
596
+ ...Cn
597
+ };
598
+ function kn(e, t) {
599
+ return Z(e, new _.classes.URLSearchParams(), Object.assign({
600
+ visitor: function(n, r, s, o) {
601
+ return _.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
602
+ }
603
+ }, t));
604
+ }
605
+ function Dn(e) {
606
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
607
+ }
608
+ function Fn(e) {
609
+ const t = {}, n = Object.keys(e);
610
+ let r;
611
+ const s = n.length;
612
+ let o;
613
+ for (r = 0; r < s; r++)
614
+ o = n[r], t[o] = e[o];
615
+ return t;
616
+ }
617
+ function Ze(e) {
618
+ function t(n, r, s, o) {
619
+ let i = n[o++];
620
+ if (i === "__proto__")
621
+ return !0;
622
+ const c = Number.isFinite(+i), l = o >= n.length;
623
+ return i = !i && a.isArray(s) ? s.length : i, l ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Fn(s[i])), !c);
624
+ }
625
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
626
+ const n = {};
627
+ return a.forEachEntry(e, (r, s) => {
628
+ t(Dn(r), s, n, 0);
629
+ }), n;
630
+ }
631
+ return null;
632
+ }
633
+ function jn(e, t, n) {
634
+ if (a.isString(e))
635
+ try {
636
+ return (t || JSON.parse)(e), a.trim(e);
637
+ } catch (r) {
638
+ if (r.name !== "SyntaxError")
639
+ throw r;
640
+ }
641
+ return (n || JSON.stringify)(e);
642
+ }
643
+ const me = {
644
+ transitional: Qe,
645
+ adapter: ["xhr", "http"],
646
+ transformRequest: [function(t, n) {
647
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
648
+ if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
649
+ return s && s ? JSON.stringify(Ze(t)) : t;
650
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
651
+ return t;
652
+ if (a.isArrayBufferView(t))
653
+ return t.buffer;
654
+ if (a.isURLSearchParams(t))
655
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
656
+ let c;
657
+ if (o) {
658
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
659
+ return kn(t, this.formSerializer).toString();
660
+ if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
661
+ const l = this.env && this.env.FormData;
662
+ return Z(
663
+ c ? { "files[]": t } : t,
664
+ l && new l(),
665
+ this.formSerializer
666
+ );
667
+ }
668
+ }
669
+ return o || s ? (n.setContentType("application/json", !1), jn(t)) : t;
670
+ }],
671
+ transformResponse: [function(t) {
672
+ const n = this.transitional || me.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
673
+ if (t && a.isString(t) && (r && !this.responseType || s)) {
674
+ const i = !(n && n.silentJSONParsing) && s;
675
+ try {
676
+ return JSON.parse(t);
677
+ } catch (c) {
678
+ if (i)
679
+ throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
680
+ }
681
+ }
682
+ return t;
683
+ }],
684
+ /**
685
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
686
+ * timeout is not created.
687
+ */
688
+ timeout: 0,
689
+ xsrfCookieName: "XSRF-TOKEN",
690
+ xsrfHeaderName: "X-XSRF-TOKEN",
691
+ maxContentLength: -1,
692
+ maxBodyLength: -1,
693
+ env: {
694
+ FormData: _.classes.FormData,
695
+ Blob: _.classes.Blob
696
+ },
697
+ validateStatus: function(t) {
698
+ return t >= 200 && t < 300;
699
+ },
700
+ headers: {
701
+ common: {
702
+ Accept: "application/json, text/plain, */*",
703
+ "Content-Type": void 0
704
+ }
705
+ }
706
+ };
707
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
708
+ me.headers[e] = {};
709
+ });
710
+ const ye = me, Un = a.toObjectSet([
711
+ "age",
712
+ "authorization",
713
+ "content-length",
714
+ "content-type",
715
+ "etag",
716
+ "expires",
717
+ "from",
718
+ "host",
719
+ "if-modified-since",
720
+ "if-unmodified-since",
721
+ "last-modified",
722
+ "location",
723
+ "max-forwards",
724
+ "proxy-authorization",
725
+ "referer",
726
+ "retry-after",
727
+ "user-agent"
728
+ ]), Bn = (e) => {
729
+ const t = {};
730
+ let n, r, s;
731
+ return e && e.split(`
732
+ `).forEach(function(i) {
733
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Un[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
734
+ }), t;
735
+ }, xe = Symbol("internals");
736
+ function B(e) {
737
+ return e && String(e).trim().toLowerCase();
738
+ }
739
+ function W(e) {
740
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(W) : String(e);
741
+ }
742
+ function Mn(e) {
743
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
744
+ let r;
745
+ for (; r = n.exec(e); )
746
+ t[r[1]] = r[2];
747
+ return t;
748
+ }
749
+ const Hn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
750
+ function oe(e, t, n, r, s) {
751
+ if (a.isFunction(r))
752
+ return r.call(this, t, n);
753
+ if (s && (t = n), !!a.isString(t)) {
754
+ if (a.isString(r))
755
+ return t.indexOf(r) !== -1;
756
+ if (a.isRegExp(r))
757
+ return r.test(t);
758
+ }
759
+ }
760
+ function zn(e) {
761
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
762
+ }
763
+ function In(e, t) {
764
+ const n = a.toCamelCase(" " + t);
765
+ ["get", "set", "has"].forEach((r) => {
766
+ Object.defineProperty(e, r + n, {
767
+ value: function(s, o, i) {
768
+ return this[r].call(this, t, s, o, i);
769
+ },
770
+ configurable: !0
771
+ });
772
+ });
773
+ }
774
+ let ee = class {
775
+ constructor(t) {
776
+ t && this.set(t);
777
+ }
778
+ set(t, n, r) {
779
+ const s = this;
780
+ function o(c, l, d) {
781
+ const f = B(l);
782
+ if (!f)
783
+ throw new Error("header name must be a non-empty string");
784
+ const u = a.findKey(s, f);
785
+ (!u || s[u] === void 0 || d === !0 || d === void 0 && s[u] !== !1) && (s[u || l] = W(c));
786
+ }
787
+ const i = (c, l) => a.forEach(c, (d, f) => o(d, f, l));
788
+ return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Hn(t) ? i(Bn(t), n) : t != null && o(n, t, r), this;
789
+ }
790
+ get(t, n) {
791
+ if (t = B(t), t) {
792
+ const r = a.findKey(this, t);
793
+ if (r) {
794
+ const s = this[r];
795
+ if (!n)
796
+ return s;
797
+ if (n === !0)
798
+ return Mn(s);
799
+ if (a.isFunction(n))
800
+ return n.call(this, s, r);
801
+ if (a.isRegExp(n))
802
+ return n.exec(s);
803
+ throw new TypeError("parser must be boolean|regexp|function");
804
+ }
805
+ }
806
+ }
807
+ has(t, n) {
808
+ if (t = B(t), t) {
809
+ const r = a.findKey(this, t);
810
+ return !!(r && this[r] !== void 0 && (!n || oe(this, this[r], r, n)));
811
+ }
812
+ return !1;
813
+ }
814
+ delete(t, n) {
815
+ const r = this;
816
+ let s = !1;
817
+ function o(i) {
818
+ if (i = B(i), i) {
819
+ const c = a.findKey(r, i);
820
+ c && (!n || oe(r, r[c], c, n)) && (delete r[c], s = !0);
821
+ }
822
+ }
823
+ return a.isArray(t) ? t.forEach(o) : o(t), s;
824
+ }
825
+ clear(t) {
826
+ const n = Object.keys(this);
827
+ let r = n.length, s = !1;
828
+ for (; r--; ) {
829
+ const o = n[r];
830
+ (!t || oe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
831
+ }
832
+ return s;
833
+ }
834
+ normalize(t) {
835
+ const n = this, r = {};
836
+ return a.forEach(this, (s, o) => {
837
+ const i = a.findKey(r, o);
838
+ if (i) {
839
+ n[i] = W(s), delete n[o];
840
+ return;
841
+ }
842
+ const c = t ? zn(o) : String(o).trim();
843
+ c !== o && delete n[o], n[c] = W(s), r[c] = !0;
844
+ }), this;
845
+ }
846
+ concat(...t) {
847
+ return this.constructor.concat(this, ...t);
848
+ }
849
+ toJSON(t) {
850
+ const n = /* @__PURE__ */ Object.create(null);
851
+ return a.forEach(this, (r, s) => {
852
+ r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
853
+ }), n;
854
+ }
855
+ [Symbol.iterator]() {
856
+ return Object.entries(this.toJSON())[Symbol.iterator]();
857
+ }
858
+ toString() {
859
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
860
+ `);
861
+ }
862
+ get [Symbol.toStringTag]() {
863
+ return "AxiosHeaders";
864
+ }
865
+ static from(t) {
866
+ return t instanceof this ? t : new this(t);
867
+ }
868
+ static concat(t, ...n) {
869
+ const r = new this(t);
870
+ return n.forEach((s) => r.set(s)), r;
871
+ }
872
+ static accessor(t) {
873
+ const r = (this[xe] = this[xe] = {
874
+ accessors: {}
875
+ }).accessors, s = this.prototype;
876
+ function o(i) {
877
+ const c = B(i);
878
+ r[c] || (In(s, i), r[c] = !0);
879
+ }
880
+ return a.isArray(t) ? t.forEach(o) : o(t), this;
881
+ }
882
+ };
883
+ ee.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
884
+ a.reduceDescriptors(ee.prototype, ({ value: e }, t) => {
885
+ let n = t[0].toUpperCase() + t.slice(1);
886
+ return {
887
+ get: () => e,
888
+ set(r) {
889
+ this[n] = r;
890
+ }
891
+ };
892
+ });
893
+ a.freezeMethods(ee);
894
+ const L = ee;
895
+ function ie(e, t) {
896
+ const n = this || ye, r = t || n, s = L.from(r.headers);
897
+ let o = r.data;
898
+ return a.forEach(e, function(c) {
899
+ o = c.call(n, o, s.normalize(), t ? t.status : void 0);
900
+ }), s.normalize(), o;
901
+ }
902
+ function et(e) {
903
+ return !!(e && e.__CANCEL__);
904
+ }
905
+ function z(e, t, n) {
906
+ y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
907
+ }
908
+ a.inherits(z, y, {
909
+ __CANCEL__: !0
910
+ });
911
+ function qn(e, t, n) {
912
+ const r = n.config.validateStatus;
913
+ !n.status || !r || r(n.status) ? e(n) : t(new y(
914
+ "Request failed with status code " + n.status,
915
+ [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
916
+ n.config,
917
+ n.request,
918
+ n
919
+ ));
920
+ }
921
+ const Jn = _.hasStandardBrowserEnv ? (
922
+ // Standard browser envs support document.cookie
923
+ {
924
+ write(e, t, n, r, s, o) {
925
+ const i = [e + "=" + encodeURIComponent(t)];
926
+ a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
927
+ },
928
+ read(e) {
929
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
930
+ return t ? decodeURIComponent(t[3]) : null;
931
+ },
932
+ remove(e) {
933
+ this.write(e, "", Date.now() - 864e5);
934
+ }
935
+ }
936
+ ) : (
937
+ // Non-standard browser env (web workers, react-native) lack needed support.
938
+ {
939
+ write() {
940
+ },
941
+ read() {
942
+ return null;
943
+ },
944
+ remove() {
945
+ }
946
+ }
947
+ );
948
+ function Wn(e) {
949
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
950
+ }
951
+ function Yn(e, t) {
952
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
953
+ }
954
+ function tt(e, t) {
955
+ return e && !Wn(t) ? Yn(e, t) : t;
956
+ }
957
+ const Kn = _.hasStandardBrowserEnv ? (
958
+ // Standard browser envs have full support of the APIs needed to test
959
+ // whether the request URL is of the same origin as current location.
960
+ function() {
961
+ const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
962
+ let r;
963
+ function s(o) {
964
+ let i = o;
965
+ return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
966
+ href: n.href,
967
+ protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
968
+ host: n.host,
969
+ search: n.search ? n.search.replace(/^\?/, "") : "",
970
+ hash: n.hash ? n.hash.replace(/^#/, "") : "",
971
+ hostname: n.hostname,
972
+ port: n.port,
973
+ pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
974
+ };
975
+ }
976
+ return r = s(window.location.href), function(i) {
977
+ const c = a.isString(i) ? s(i) : i;
978
+ return c.protocol === r.protocol && c.host === r.host;
979
+ };
980
+ }()
981
+ ) : (
982
+ // Non standard browser envs (web workers, react-native) lack needed support.
983
+ /* @__PURE__ */ function() {
984
+ return function() {
985
+ return !0;
986
+ };
987
+ }()
988
+ );
989
+ function Vn(e) {
990
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
991
+ return t && t[1] || "";
992
+ }
993
+ function Gn(e, t) {
994
+ e = e || 10;
995
+ const n = new Array(e), r = new Array(e);
996
+ let s = 0, o = 0, i;
997
+ return t = t !== void 0 ? t : 1e3, function(l) {
998
+ const d = Date.now(), f = r[o];
999
+ i || (i = d), n[s] = l, r[s] = d;
1000
+ let u = o, E = 0;
1001
+ for (; u !== s; )
1002
+ E += n[u++], u = u % e;
1003
+ if (s = (s + 1) % e, s === o && (o = (o + 1) % e), d - i < t)
1004
+ return;
1005
+ const R = f && d - f;
1006
+ return R ? Math.round(E * 1e3 / R) : void 0;
1007
+ };
1008
+ }
1009
+ function Ce(e, t) {
1010
+ let n = 0;
1011
+ const r = Gn(50, 250);
1012
+ return (s) => {
1013
+ const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, l = r(c), d = o <= i;
1014
+ n = o;
1015
+ const f = {
1016
+ loaded: o,
1017
+ total: i,
1018
+ progress: i ? o / i : void 0,
1019
+ bytes: c,
1020
+ rate: l || void 0,
1021
+ estimated: l && i && d ? (i - o) / l : void 0,
1022
+ event: s
1023
+ };
1024
+ f[t ? "download" : "upload"] = !0, e(f);
1025
+ };
1026
+ }
1027
+ const Qn = typeof XMLHttpRequest < "u", Xn = Qn && function(e) {
1028
+ return new Promise(function(n, r) {
1029
+ let s = e.data;
1030
+ const o = L.from(e.headers).normalize();
1031
+ let { responseType: i, withXSRFToken: c } = e, l;
1032
+ function d() {
1033
+ e.cancelToken && e.cancelToken.unsubscribe(l), e.signal && e.signal.removeEventListener("abort", l);
1034
+ }
1035
+ let f;
1036
+ if (a.isFormData(s)) {
1037
+ if (_.hasStandardBrowserEnv || _.hasStandardBrowserWebWorkerEnv)
1038
+ o.setContentType(!1);
1039
+ else if ((f = o.getContentType()) !== !1) {
1040
+ const [m, ...A] = f ? f.split(";").map((T) => T.trim()).filter(Boolean) : [];
1041
+ o.setContentType([m || "multipart/form-data", ...A].join("; "));
1042
+ }
1043
+ }
1044
+ let u = new XMLHttpRequest();
1045
+ if (e.auth) {
1046
+ const m = e.auth.username || "", A = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
1047
+ o.set("Authorization", "Basic " + btoa(m + ":" + A));
1048
+ }
1049
+ const E = tt(e.baseURL, e.url);
1050
+ u.open(e.method.toUpperCase(), Ge(E, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
1051
+ function R() {
1052
+ if (!u)
1053
+ return;
1054
+ const m = L.from(
1055
+ "getAllResponseHeaders" in u && u.getAllResponseHeaders()
1056
+ ), T = {
1057
+ data: !i || i === "text" || i === "json" ? u.responseText : u.response,
1058
+ status: u.status,
1059
+ statusText: u.statusText,
1060
+ headers: m,
1061
+ config: e,
1062
+ request: u
1063
+ };
1064
+ qn(function(C) {
1065
+ n(C), d();
1066
+ }, function(C) {
1067
+ r(C), d();
1068
+ }, T), u = null;
1069
+ }
1070
+ if ("onloadend" in u ? u.onloadend = R : u.onreadystatechange = function() {
1071
+ !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(R);
1072
+ }, u.onabort = function() {
1073
+ u && (r(new y("Request aborted", y.ECONNABORTED, e, u)), u = null);
1074
+ }, u.onerror = function() {
1075
+ r(new y("Network Error", y.ERR_NETWORK, e, u)), u = null;
1076
+ }, u.ontimeout = function() {
1077
+ let A = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
1078
+ const T = e.transitional || Qe;
1079
+ e.timeoutErrorMessage && (A = e.timeoutErrorMessage), r(new y(
1080
+ A,
1081
+ T.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1082
+ e,
1083
+ u
1084
+ )), u = null;
1085
+ }, _.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && Kn(E))) {
1086
+ const m = e.xsrfHeaderName && e.xsrfCookieName && Jn.read(e.xsrfCookieName);
1087
+ m && o.set(e.xsrfHeaderName, m);
1088
+ }
1089
+ s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(A, T) {
1090
+ u.setRequestHeader(T, A);
1091
+ }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ce(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ce(e.onUploadProgress)), (e.cancelToken || e.signal) && (l = (m) => {
1092
+ u && (r(!m || m.type ? new z(null, e, u) : m), u.abort(), u = null);
1093
+ }, e.cancelToken && e.cancelToken.subscribe(l), e.signal && (e.signal.aborted ? l() : e.signal.addEventListener("abort", l)));
1094
+ const h = Vn(E);
1095
+ if (h && _.protocols.indexOf(h) === -1) {
1096
+ r(new y("Unsupported protocol " + h + ":", y.ERR_BAD_REQUEST, e));
1097
+ return;
1098
+ }
1099
+ u.send(s || null);
1100
+ });
1101
+ }, le = {
1102
+ http: Rn,
1103
+ xhr: Xn
1104
+ };
1105
+ a.forEach(le, (e, t) => {
1106
+ if (e) {
1107
+ try {
1108
+ Object.defineProperty(e, "name", { value: t });
1109
+ } catch {
1110
+ }
1111
+ Object.defineProperty(e, "adapterName", { value: t });
1112
+ }
1113
+ });
1114
+ const Ne = (e) => `- ${e}`, Zn = (e) => a.isFunction(e) || e === null || e === !1, nt = {
1115
+ getAdapter: (e) => {
1116
+ e = a.isArray(e) ? e : [e];
1117
+ const { length: t } = e;
1118
+ let n, r;
1119
+ const s = {};
1120
+ for (let o = 0; o < t; o++) {
1121
+ n = e[o];
1122
+ let i;
1123
+ if (r = n, !Zn(n) && (r = le[(i = String(n)).toLowerCase()], r === void 0))
1124
+ throw new y(`Unknown adapter '${i}'`);
1125
+ if (r)
1126
+ break;
1127
+ s[i || "#" + o] = r;
1128
+ }
1129
+ if (!r) {
1130
+ const o = Object.entries(s).map(
1131
+ ([c, l]) => `adapter ${c} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
1132
+ );
1133
+ let i = t ? o.length > 1 ? `since :
1134
+ ` + o.map(Ne).join(`
1135
+ `) : " " + Ne(o[0]) : "as no adapter specified";
1136
+ throw new y(
1137
+ "There is no suitable adapter to dispatch the request " + i,
1138
+ "ERR_NOT_SUPPORT"
1139
+ );
1140
+ }
1141
+ return r;
1142
+ },
1143
+ adapters: le
1144
+ };
1145
+ function ae(e) {
1146
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1147
+ throw new z(null, e);
1148
+ }
1149
+ function $e(e) {
1150
+ return ae(e), e.headers = L.from(e.headers), e.data = ie.call(
1151
+ e,
1152
+ e.transformRequest
1153
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), nt.getAdapter(e.adapter || ye.adapter)(e).then(function(r) {
1154
+ return ae(e), r.data = ie.call(
1155
+ e,
1156
+ e.transformResponse,
1157
+ r
1158
+ ), r.headers = L.from(r.headers), r;
1159
+ }, function(r) {
1160
+ return et(r) || (ae(e), r && r.response && (r.response.data = ie.call(
1161
+ e,
1162
+ e.transformResponse,
1163
+ r.response
1164
+ ), r.response.headers = L.from(r.response.headers))), Promise.reject(r);
1165
+ });
1166
+ }
1167
+ const Pe = (e) => e instanceof L ? e.toJSON() : e;
1168
+ function k(e, t) {
1169
+ t = t || {};
1170
+ const n = {};
1171
+ function r(d, f, u) {
1172
+ return a.isPlainObject(d) && a.isPlainObject(f) ? a.merge.call({ caseless: u }, d, f) : a.isPlainObject(f) ? a.merge({}, f) : a.isArray(f) ? f.slice() : f;
1173
+ }
1174
+ function s(d, f, u) {
1175
+ if (a.isUndefined(f)) {
1176
+ if (!a.isUndefined(d))
1177
+ return r(void 0, d, u);
1178
+ } else
1179
+ return r(d, f, u);
1180
+ }
1181
+ function o(d, f) {
1182
+ if (!a.isUndefined(f))
1183
+ return r(void 0, f);
1184
+ }
1185
+ function i(d, f) {
1186
+ if (a.isUndefined(f)) {
1187
+ if (!a.isUndefined(d))
1188
+ return r(void 0, d);
1189
+ } else
1190
+ return r(void 0, f);
1191
+ }
1192
+ function c(d, f, u) {
1193
+ if (u in t)
1194
+ return r(d, f);
1195
+ if (u in e)
1196
+ return r(void 0, d);
1197
+ }
1198
+ const l = {
1199
+ url: o,
1200
+ method: o,
1201
+ data: o,
1202
+ baseURL: i,
1203
+ transformRequest: i,
1204
+ transformResponse: i,
1205
+ paramsSerializer: i,
1206
+ timeout: i,
1207
+ timeoutMessage: i,
1208
+ withCredentials: i,
1209
+ withXSRFToken: i,
1210
+ adapter: i,
1211
+ responseType: i,
1212
+ xsrfCookieName: i,
1213
+ xsrfHeaderName: i,
1214
+ onUploadProgress: i,
1215
+ onDownloadProgress: i,
1216
+ decompress: i,
1217
+ maxContentLength: i,
1218
+ maxBodyLength: i,
1219
+ beforeRedirect: i,
1220
+ transport: i,
1221
+ httpAgent: i,
1222
+ httpsAgent: i,
1223
+ cancelToken: i,
1224
+ socketPath: i,
1225
+ responseEncoding: i,
1226
+ validateStatus: c,
1227
+ headers: (d, f) => s(Pe(d), Pe(f), !0)
1228
+ };
1229
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
1230
+ const u = l[f] || s, E = u(e[f], t[f], f);
1231
+ a.isUndefined(E) && u !== c || (n[f] = E);
1232
+ }), n;
1233
+ }
1234
+ const rt = "1.6.4", ge = {};
1235
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1236
+ ge[e] = function(r) {
1237
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1238
+ };
1239
+ });
1240
+ const ke = {};
1241
+ ge.transitional = function(t, n, r) {
1242
+ function s(o, i) {
1243
+ return "[Axios v" + rt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1244
+ }
1245
+ return (o, i, c) => {
1246
+ if (t === !1)
1247
+ throw new y(
1248
+ s(i, " has been removed" + (n ? " in " + n : "")),
1249
+ y.ERR_DEPRECATED
1250
+ );
1251
+ return n && !ke[i] && (ke[i] = !0, console.warn(
1252
+ s(
1253
+ i,
1254
+ " has been deprecated since v" + n + " and will be removed in the near future"
1255
+ )
1256
+ )), t ? t(o, i, c) : !0;
1257
+ };
1258
+ };
1259
+ function er(e, t, n) {
1260
+ if (typeof e != "object")
1261
+ throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1262
+ const r = Object.keys(e);
1263
+ let s = r.length;
1264
+ for (; s-- > 0; ) {
1265
+ const o = r[s], i = t[o];
1266
+ if (i) {
1267
+ const c = e[o], l = c === void 0 || i(c, o, e);
1268
+ if (l !== !0)
1269
+ throw new y("option " + o + " must be " + l, y.ERR_BAD_OPTION_VALUE);
1270
+ continue;
1271
+ }
1272
+ if (n !== !0)
1273
+ throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
1274
+ }
1275
+ }
1276
+ const fe = {
1277
+ assertOptions: er,
1278
+ validators: ge
1279
+ }, N = fe.validators;
1280
+ let V = class {
1281
+ constructor(t) {
1282
+ this.defaults = t, this.interceptors = {
1283
+ request: new Le(),
1284
+ response: new Le()
1285
+ };
1286
+ }
1287
+ /**
1288
+ * Dispatch a request
1289
+ *
1290
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1291
+ * @param {?Object} config
1292
+ *
1293
+ * @returns {Promise} The Promise to be fulfilled
1294
+ */
1295
+ request(t, n) {
1296
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = k(this.defaults, n);
1297
+ const { transitional: r, paramsSerializer: s, headers: o } = n;
1298
+ r !== void 0 && fe.assertOptions(r, {
1299
+ silentJSONParsing: N.transitional(N.boolean),
1300
+ forcedJSONParsing: N.transitional(N.boolean),
1301
+ clarifyTimeoutError: N.transitional(N.boolean)
1302
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1303
+ serialize: s
1304
+ } : fe.assertOptions(s, {
1305
+ encode: N.function,
1306
+ serialize: N.function
1307
+ }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1308
+ let i = o && a.merge(
1309
+ o.common,
1310
+ o[n.method]
1311
+ );
1312
+ o && a.forEach(
1313
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1314
+ (h) => {
1315
+ delete o[h];
1316
+ }
1317
+ ), n.headers = L.concat(i, o);
1318
+ const c = [];
1319
+ let l = !0;
1320
+ this.interceptors.request.forEach(function(m) {
1321
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (l = l && m.synchronous, c.unshift(m.fulfilled, m.rejected));
1322
+ });
1323
+ const d = [];
1324
+ this.interceptors.response.forEach(function(m) {
1325
+ d.push(m.fulfilled, m.rejected);
1326
+ });
1327
+ let f, u = 0, E;
1328
+ if (!l) {
1329
+ const h = [$e.bind(this), void 0];
1330
+ for (h.unshift.apply(h, c), h.push.apply(h, d), E = h.length, f = Promise.resolve(n); u < E; )
1331
+ f = f.then(h[u++], h[u++]);
1332
+ return f;
1333
+ }
1334
+ E = c.length;
1335
+ let R = n;
1336
+ for (u = 0; u < E; ) {
1337
+ const h = c[u++], m = c[u++];
1338
+ try {
1339
+ R = h(R);
1340
+ } catch (A) {
1341
+ m.call(this, A);
1342
+ break;
1343
+ }
1344
+ }
1345
+ try {
1346
+ f = $e.call(this, R);
1347
+ } catch (h) {
1348
+ return Promise.reject(h);
1349
+ }
1350
+ for (u = 0, E = d.length; u < E; )
1351
+ f = f.then(d[u++], d[u++]);
1352
+ return f;
1353
+ }
1354
+ getUri(t) {
1355
+ t = k(this.defaults, t);
1356
+ const n = tt(t.baseURL, t.url);
1357
+ return Ge(n, t.params, t.paramsSerializer);
1358
+ }
1359
+ };
1360
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1361
+ V.prototype[t] = function(n, r) {
1362
+ return this.request(k(r || {}, {
1363
+ method: t,
1364
+ url: n,
1365
+ data: (r || {}).data
1366
+ }));
1367
+ };
1368
+ });
1369
+ a.forEach(["post", "put", "patch"], function(t) {
1370
+ function n(r) {
1371
+ return function(o, i, c) {
1372
+ return this.request(k(c || {}, {
1373
+ method: t,
1374
+ headers: r ? {
1375
+ "Content-Type": "multipart/form-data"
1376
+ } : {},
1377
+ url: o,
1378
+ data: i
1379
+ }));
1380
+ };
1381
+ }
1382
+ V.prototype[t] = n(), V.prototype[t + "Form"] = n(!0);
1383
+ });
1384
+ const Y = V;
1385
+ let tr = class st {
1386
+ constructor(t) {
1387
+ if (typeof t != "function")
1388
+ throw new TypeError("executor must be a function.");
1389
+ let n;
1390
+ this.promise = new Promise(function(o) {
1391
+ n = o;
1392
+ });
1393
+ const r = this;
1394
+ this.promise.then((s) => {
1395
+ if (!r._listeners)
1396
+ return;
1397
+ let o = r._listeners.length;
1398
+ for (; o-- > 0; )
1399
+ r._listeners[o](s);
1400
+ r._listeners = null;
1401
+ }), this.promise.then = (s) => {
1402
+ let o;
1403
+ const i = new Promise((c) => {
1404
+ r.subscribe(c), o = c;
1405
+ }).then(s);
1406
+ return i.cancel = function() {
1407
+ r.unsubscribe(o);
1408
+ }, i;
1409
+ }, t(function(o, i, c) {
1410
+ r.reason || (r.reason = new z(o, i, c), n(r.reason));
1411
+ });
1412
+ }
1413
+ /**
1414
+ * Throws a `CanceledError` if cancellation has been requested.
1415
+ */
1416
+ throwIfRequested() {
1417
+ if (this.reason)
1418
+ throw this.reason;
1419
+ }
1420
+ /**
1421
+ * Subscribe to the cancel signal
1422
+ */
1423
+ subscribe(t) {
1424
+ if (this.reason) {
1425
+ t(this.reason);
1426
+ return;
1427
+ }
1428
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1429
+ }
1430
+ /**
1431
+ * Unsubscribe from the cancel signal
1432
+ */
1433
+ unsubscribe(t) {
1434
+ if (!this._listeners)
1435
+ return;
1436
+ const n = this._listeners.indexOf(t);
1437
+ n !== -1 && this._listeners.splice(n, 1);
1438
+ }
1439
+ /**
1440
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1441
+ * cancels the `CancelToken`.
1442
+ */
1443
+ static source() {
1444
+ let t;
1445
+ return {
1446
+ token: new st(function(s) {
1447
+ t = s;
1448
+ }),
1449
+ cancel: t
1450
+ };
1451
+ }
1452
+ };
1453
+ const nr = tr;
1454
+ function rr(e) {
1455
+ return function(n) {
1456
+ return e.apply(null, n);
1457
+ };
1458
+ }
1459
+ function sr(e) {
1460
+ return a.isObject(e) && e.isAxiosError === !0;
1461
+ }
1462
+ const de = {
1463
+ Continue: 100,
1464
+ SwitchingProtocols: 101,
1465
+ Processing: 102,
1466
+ EarlyHints: 103,
1467
+ Ok: 200,
1468
+ Created: 201,
1469
+ Accepted: 202,
1470
+ NonAuthoritativeInformation: 203,
1471
+ NoContent: 204,
1472
+ ResetContent: 205,
1473
+ PartialContent: 206,
1474
+ MultiStatus: 207,
1475
+ AlreadyReported: 208,
1476
+ ImUsed: 226,
1477
+ MultipleChoices: 300,
1478
+ MovedPermanently: 301,
1479
+ Found: 302,
1480
+ SeeOther: 303,
1481
+ NotModified: 304,
1482
+ UseProxy: 305,
1483
+ Unused: 306,
1484
+ TemporaryRedirect: 307,
1485
+ PermanentRedirect: 308,
1486
+ BadRequest: 400,
1487
+ Unauthorized: 401,
1488
+ PaymentRequired: 402,
1489
+ Forbidden: 403,
1490
+ NotFound: 404,
1491
+ MethodNotAllowed: 405,
1492
+ NotAcceptable: 406,
1493
+ ProxyAuthenticationRequired: 407,
1494
+ RequestTimeout: 408,
1495
+ Conflict: 409,
1496
+ Gone: 410,
1497
+ LengthRequired: 411,
1498
+ PreconditionFailed: 412,
1499
+ PayloadTooLarge: 413,
1500
+ UriTooLong: 414,
1501
+ UnsupportedMediaType: 415,
1502
+ RangeNotSatisfiable: 416,
1503
+ ExpectationFailed: 417,
1504
+ ImATeapot: 418,
1505
+ MisdirectedRequest: 421,
1506
+ UnprocessableEntity: 422,
1507
+ Locked: 423,
1508
+ FailedDependency: 424,
1509
+ TooEarly: 425,
1510
+ UpgradeRequired: 426,
1511
+ PreconditionRequired: 428,
1512
+ TooManyRequests: 429,
1513
+ RequestHeaderFieldsTooLarge: 431,
1514
+ UnavailableForLegalReasons: 451,
1515
+ InternalServerError: 500,
1516
+ NotImplemented: 501,
1517
+ BadGateway: 502,
1518
+ ServiceUnavailable: 503,
1519
+ GatewayTimeout: 504,
1520
+ HttpVersionNotSupported: 505,
1521
+ VariantAlsoNegotiates: 506,
1522
+ InsufficientStorage: 507,
1523
+ LoopDetected: 508,
1524
+ NotExtended: 510,
1525
+ NetworkAuthenticationRequired: 511
1526
+ };
1527
+ Object.entries(de).forEach(([e, t]) => {
1528
+ de[t] = e;
1529
+ });
1530
+ const or = de;
1531
+ function ot(e) {
1532
+ const t = new Y(e), n = Ue(Y.prototype.request, t);
1533
+ return a.extend(n, Y.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1534
+ return ot(k(e, s));
1535
+ }, n;
1536
+ }
1537
+ const b = ot(ye);
1538
+ b.Axios = Y;
1539
+ b.CanceledError = z;
1540
+ b.CancelToken = nr;
1541
+ b.isCancel = et;
1542
+ b.VERSION = rt;
1543
+ b.toFormData = Z;
1544
+ b.AxiosError = y;
1545
+ b.Cancel = b.CanceledError;
1546
+ b.all = function(t) {
1547
+ return Promise.all(t);
1548
+ };
1549
+ b.spread = rr;
1550
+ b.isAxiosError = sr;
1551
+ b.mergeConfig = k;
1552
+ b.AxiosHeaders = L;
1553
+ b.formToJSON = (e) => Ze(a.isHTMLForm(e) ? new FormData(e) : e);
1554
+ b.getAdapter = nt.getAdapter;
1555
+ b.HttpStatusCode = or;
1556
+ b.default = b;
1557
+ const {
1558
+ Axios: Os,
1559
+ AxiosError: ir,
1560
+ CanceledError: Ls,
1561
+ isCancel: xs,
1562
+ CancelToken: Cs,
1563
+ VERSION: Ns,
1564
+ all: $s,
1565
+ Cancel: Ps,
1566
+ isAxiosError: ks,
1567
+ spread: Ds,
1568
+ toFormData: Fs,
1569
+ AxiosHeaders: js,
1570
+ HttpStatusCode: Us,
1571
+ formToJSON: Bs,
1572
+ getAdapter: Ms,
1573
+ mergeConfig: Hs
1574
+ } = b, it = b.create({
1575
+ headers: {
1576
+ "Content-Type": "application/json"
1577
+ }
1578
+ }), O = async (e, ...t) => {
1579
+ try {
1580
+ return await it[e](...t);
1581
+ } catch (n) {
1582
+ if (!(n instanceof ir) || !n.response)
1583
+ throw n;
1584
+ const r = n.response;
1585
+ let s = "";
1586
+ switch (r.status) {
1587
+ case 400:
1588
+ s = "Check parameters or API token";
1589
+ break;
1590
+ case 401:
1591
+ s = "You must be logged before using this function, use `auth.login(token)`";
1592
+ break;
1593
+ case 403:
1594
+ s = "You dont have enough permissions";
1595
+ break;
1596
+ case 404:
1597
+ s = "Check parameters";
1598
+ break;
1599
+ case 409:
1600
+ s = "Request conflit with current state";
1601
+ break;
1602
+ case 500:
1603
+ s = "Something went wrong with server";
1604
+ break;
1605
+ }
1606
+ throw s = `${n.code} (${r.status}) - ${s}: ${r.data.content.message}`, new Error(s);
1607
+ }
1608
+ }, p = Object.assign(
1609
+ it,
1610
+ {
1611
+ $get: async (...e) => (await O("get", ...e)).data,
1612
+ $post: async (...e) => (await O("post", ...e)).data,
1613
+ $put: async (...e) => (await O("put", ...e)).data,
1614
+ $patch: async (...e) => (await O("patch", ...e)).data,
1615
+ $delete: async (...e) => (await O("delete", ...e)).data
1616
+ }
1617
+ ), at = (e) => ({
1618
+ ...e,
1619
+ createdAt: w(e.createdAt),
1620
+ updatedAt: e.updatedAt ? w(e.updatedAt) : void 0
1621
+ }), ar = (e) => ({
1622
+ ...e,
1623
+ namespace: at(e.namespace),
1624
+ createdAt: w(e.createdAt),
1625
+ updatedAt: e.updatedAt ? w(e.updatedAt) : void 0
1626
+ }), cr = (e) => ({
1627
+ ...e,
1628
+ memberships: e.memberships.map(ar),
1629
+ createdAt: w(e.createdAt),
1630
+ updatedAt: e.updatedAt ? w(e.updatedAt) : void 0
1631
+ }), ct = (e) => {
1632
+ p.defaults.headers.common.authorization = `Bearer ${e}`;
1633
+ }, ut = () => {
1634
+ p.defaults.headers.common.authorization = void 0;
1635
+ }, lt = () => {
1636
+ const e = p.defaults.headers.common.authorization;
1637
+ if (!e || typeof e != "string")
1638
+ return !1;
1639
+ const [, t] = e.split("Bearer ");
1640
+ return !!t;
1641
+ }, ur = async () => {
1642
+ const { content: e, ...t } = await p.$get("/me");
1643
+ return {
1644
+ ...t,
1645
+ content: cr(e)
1646
+ };
1647
+ }, lr = () => p.$get("/me/permissions"), fr = () => p.$get("/me/namespaces"), zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1648
+ __proto__: null,
1649
+ getCurrentNamespaces: fr,
1650
+ getCurrentPermissions: lr,
1651
+ getCurrentUser: ur,
1652
+ isLogged: lt,
1653
+ login: ct,
1654
+ logout: ut
1655
+ }, Symbol.toStringTag, { value: "Module" })), F = (e) => ({
1656
+ ...e,
1657
+ nextRun: e.nextRun ? w(e.nextRun) : void 0,
1658
+ lastRun: e.lastRun ? w(e.lastRun) : void 0
1659
+ }), dr = async () => {
1660
+ const { content: e, ...t } = await p.$get("/crons");
1661
+ return {
1662
+ ...t,
1663
+ content: e.map(F)
1664
+ };
1665
+ }, pr = async (e) => {
1666
+ const t = typeof e == "string" ? e : e.name, { content: n, ...r } = await p.$get(`/crons/${t}`);
1667
+ return {
1668
+ ...r,
1669
+ content: F(n)
1670
+ };
1671
+ }, hr = async (e) => {
1672
+ const t = typeof e == "string" ? e : e.name, { content: n, ...r } = await p.$put(`/crons/${t}/start`, {});
1673
+ return {
1674
+ ...r,
1675
+ content: F(n)
1676
+ };
1677
+ }, mr = async (e) => {
1678
+ const t = typeof e == "string" ? e : e.name, { content: n, ...r } = await p.$put(`/crons/${t}/stop`, {});
1679
+ return {
1680
+ ...r,
1681
+ content: F(n)
1682
+ };
1683
+ }, yr = async (e) => {
1684
+ const { name: t, ...n } = e, { content: r, ...s } = await p.$patch(`/crons/${t}`, n);
1685
+ return {
1686
+ ...s,
1687
+ content: F(r)
1688
+ };
1689
+ }, gr = async (e) => {
1690
+ const t = typeof e == "string" ? e : e.name, { content: n, ...r } = await p.$post(`/crons/${t}/force`, {});
1691
+ return {
1692
+ ...r,
1693
+ content: F(n)
1694
+ };
1695
+ }, Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1696
+ __proto__: null,
1697
+ forceCron: gr,
1698
+ getAllCrons: dr,
1699
+ getCron: pr,
1700
+ startCron: hr,
1701
+ stopCron: mr,
1702
+ updateCron: yr
1703
+ }, Symbol.toStringTag, { value: "Module" })), ft = () => p.$get("/health"), wr = () => p.$get("/health/all"), dt = (e) => p.$get(`/health/${e}`), br = async () => {
1704
+ const { content: { current: e } } = await ft();
1705
+ return dt(e);
1706
+ }, qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1707
+ __proto__: null,
1708
+ checkAllConnectedService: wr,
1709
+ checkConnectedService: dt,
1710
+ checkCurrentService: br,
1711
+ getAllConnectedServices: ft
1712
+ }, Symbol.toStringTag, { value: "Module" }));
1713
+ var pt = /* @__PURE__ */ ((e) => (e.DAILY = "DAILY", e.WEEKLY = "WEEKLY", e.MONTHLY = "MONTHLY", e.QUARTERLY = "QUARTERLY", e.BIENNIAL = "BIENNIAL", e.YEARLY = "YEARLY", e))(pt || {});
1714
+ const te = (e) => ({
1715
+ ...e,
1716
+ nextRun: w(e.nextRun),
1717
+ lastRun: e.lastRun ? w(e.lastRun) : void 0,
1718
+ createdAt: w(e.createdAt),
1719
+ updatedAt: e.updatedAt ? w(e.updatedAt) : void 0
1720
+ }), ht = (e) => {
1721
+ const { namespace: t, ...n } = e, { namespaceId: r, ...s } = te({
1722
+ namespaceId: t.id,
1723
+ ...n
1724
+ });
1725
+ return {
1726
+ ...s,
1727
+ namespace: at(t)
1728
+ };
1729
+ }, Er = (e) => ({
1730
+ ...e,
1731
+ createdAt: w(e.createdAt)
1732
+ }), Ar = (e) => ({
1733
+ ...e,
1734
+ task: ht(e.task),
1735
+ createdAt: w(e.createdAt)
1736
+ }), Tr = async (e, t) => {
1737
+ const { data: { content: n, ...r } } = await O(
1738
+ "get",
1739
+ "/tasks-activity",
1740
+ {
1741
+ params: {
1742
+ namespaces: t,
1743
+ ...e ?? {}
1744
+ }
1745
+ }
1746
+ );
1747
+ return {
1748
+ ...r,
1749
+ content: n.map(Ar)
1750
+ };
1751
+ }, Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1752
+ __proto__: null,
1753
+ getAllEntries: Tr
1754
+ }, Symbol.toStringTag, { value: "Module" })), Rr = (e) => ({
1755
+ ...e,
1756
+ createdAt: w(e.createdAt),
1757
+ updatedAt: e.updatedAt ? w(e.updatedAt) : void 0
1758
+ }), we = (e) => ({
1759
+ ...e,
1760
+ createdAt: w(e.createdAt),
1761
+ updatedAt: e.updatedAt ? w(e.updatedAt) : void 0
1762
+ }), Sr = async () => {
1763
+ const { content: e, ...t } = await p.$get("/tasks-presets");
1764
+ return {
1765
+ ...t,
1766
+ content: e.map(Rr)
1767
+ };
1768
+ }, _r = async (e) => {
1769
+ const t = typeof e == "string" ? e : e.id, { content: n, ...r } = await p.$get(`/tasks-presets/${t}`);
1770
+ return {
1771
+ ...r,
1772
+ content: we(n)
1773
+ };
1774
+ }, vr = async (e) => {
1775
+ const { content: t, ...n } = await p.$post("/tasks-presets/", e);
1776
+ return {
1777
+ ...n,
1778
+ content: we(t)
1779
+ };
1780
+ }, Or = async (e) => {
1781
+ const { id: t, ...n } = e, { content: r, ...s } = await p.$put(
1782
+ `/tasks-presets/${t}`,
1783
+ n
1784
+ );
1785
+ return {
1786
+ ...s,
1787
+ content: we(r)
1788
+ };
1789
+ }, Lr = async (e) => {
1790
+ const t = typeof e == "string" ? e : e.id;
1791
+ await p.$delete(`/tasks-presets/${t}`);
1792
+ }, Ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1793
+ __proto__: null,
1794
+ createTasksPreset: vr,
1795
+ deleteTasksPreset: Lr,
1796
+ getAllTasksPresets: Sr,
1797
+ getTasksPreset: _r,
1798
+ upsertTasksPreset: Or
1799
+ }, Symbol.toStringTag, { value: "Module" })), Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1800
+ __proto__: null
1801
+ }, Symbol.toStringTag, { value: "Module" })), be = (e) => ({
1802
+ ...e,
1803
+ added: w(e.added),
1804
+ started: e.started ? w(e.started) : void 0,
1805
+ ended: e.ended ? w(e.ended) : void 0
1806
+ }), xr = () => p.$get("/queues"), Cr = async (e) => {
1807
+ const t = typeof e == "string" ? e : e.name;
1808
+ return p.$get(`/queues/${t}`);
1809
+ }, Nr = async (e) => {
1810
+ const { name: t, ...n } = e;
1811
+ return p.$patch(`/queues/${t}`, n);
1812
+ }, $r = async (e) => {
1813
+ const t = typeof e == "string" ? e : e.name;
1814
+ return p.$put(`/queues/${t}/pause`);
1815
+ }, Pr = async (e) => {
1816
+ const t = typeof e == "string" ? e : e.name;
1817
+ return p.$put(`/queues/${t}/resume`);
1818
+ }, kr = async (e, t) => {
1819
+ const n = typeof e == "string" ? e : e.name, { data: { content: r, ...s } } = await O(
1820
+ "get",
1821
+ `/queues/${n}/jobs`,
1822
+ {
1823
+ params: t
1824
+ }
1825
+ );
1826
+ return {
1827
+ ...s,
1828
+ content: r.map(be)
1829
+ };
1830
+ }, I = async (e, t, n) => {
1831
+ const r = typeof e == "string" ? e : e.name, s = typeof t == "string" || typeof t == "number" ? t : t.id, { content: o, ...i } = await p.$get(`/queues/${r}/jobs/${s}`, { params: { namespaces: n } });
1832
+ return {
1833
+ ...i,
1834
+ content: be(o)
1835
+ };
1836
+ }, Dr = async (e, t, n) => {
1837
+ const r = typeof e == "string" ? e : e.name, s = typeof t == "string" || typeof t == "number" ? t : t.id, { content: o, ...i } = await p.$post(`/queues/${r}/jobs/${s}/retry`, { params: { namespaces: n } });
1838
+ return {
1839
+ ...i,
1840
+ content: be(o)
1841
+ };
1842
+ }, Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1843
+ __proto__: null,
1844
+ getAllQueues: xr,
1845
+ getJob: I,
1846
+ getQueue: Cr,
1847
+ getQueueJobs: kr,
1848
+ pauseQueue: $r,
1849
+ resumeQueue: Pr,
1850
+ retryJob: Dr,
1851
+ updateQueue: Nr
1852
+ }, Symbol.toStringTag, { value: "Module" }));
1853
+ function Fr(e) {
1854
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1855
+ }
1856
+ var Ee = { exports: {} }, P = typeof Reflect == "object" ? Reflect : null, De = P && typeof P.apply == "function" ? P.apply : function(t, n, r) {
1857
+ return Function.prototype.apply.call(t, n, r);
1858
+ }, K;
1859
+ P && typeof P.ownKeys == "function" ? K = P.ownKeys : Object.getOwnPropertySymbols ? K = function(t) {
1860
+ return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
1861
+ } : K = function(t) {
1862
+ return Object.getOwnPropertyNames(t);
1863
+ };
1864
+ function jr(e) {
1865
+ console && console.warn && console.warn(e);
1866
+ }
1867
+ var mt = Number.isNaN || function(t) {
1868
+ return t !== t;
1869
+ };
1870
+ function g() {
1871
+ g.init.call(this);
1872
+ }
1873
+ Ee.exports = g;
1874
+ Ee.exports.once = Hr;
1875
+ g.EventEmitter = g;
1876
+ g.prototype._events = void 0;
1877
+ g.prototype._eventsCount = 0;
1878
+ g.prototype._maxListeners = void 0;
1879
+ var Fe = 10;
1880
+ function ne(e) {
1881
+ if (typeof e != "function")
1882
+ throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
1883
+ }
1884
+ Object.defineProperty(g, "defaultMaxListeners", {
1885
+ enumerable: !0,
1886
+ get: function() {
1887
+ return Fe;
1888
+ },
1889
+ set: function(e) {
1890
+ if (typeof e != "number" || e < 0 || mt(e))
1891
+ throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
1892
+ Fe = e;
1893
+ }
1894
+ });
1895
+ g.init = function() {
1896
+ (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
1897
+ };
1898
+ g.prototype.setMaxListeners = function(t) {
1899
+ if (typeof t != "number" || t < 0 || mt(t))
1900
+ throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
1901
+ return this._maxListeners = t, this;
1902
+ };
1903
+ function yt(e) {
1904
+ return e._maxListeners === void 0 ? g.defaultMaxListeners : e._maxListeners;
1905
+ }
1906
+ g.prototype.getMaxListeners = function() {
1907
+ return yt(this);
1908
+ };
1909
+ g.prototype.emit = function(t) {
1910
+ for (var n = [], r = 1; r < arguments.length; r++)
1911
+ n.push(arguments[r]);
1912
+ var s = t === "error", o = this._events;
1913
+ if (o !== void 0)
1914
+ s = s && o.error === void 0;
1915
+ else if (!s)
1916
+ return !1;
1917
+ if (s) {
1918
+ var i;
1919
+ if (n.length > 0 && (i = n[0]), i instanceof Error)
1920
+ throw i;
1921
+ var c = new Error("Unhandled error." + (i ? " (" + i.message + ")" : ""));
1922
+ throw c.context = i, c;
1923
+ }
1924
+ var l = o[t];
1925
+ if (l === void 0)
1926
+ return !1;
1927
+ if (typeof l == "function")
1928
+ De(l, this, n);
1929
+ else
1930
+ for (var d = l.length, f = At(l, d), r = 0; r < d; ++r)
1931
+ De(f[r], this, n);
1932
+ return !0;
1933
+ };
1934
+ function gt(e, t, n, r) {
1935
+ var s, o, i;
1936
+ if (ne(n), o = e._events, o === void 0 ? (o = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (o.newListener !== void 0 && (e.emit(
1937
+ "newListener",
1938
+ t,
1939
+ n.listener ? n.listener : n
1940
+ ), o = e._events), i = o[t]), i === void 0)
1941
+ i = o[t] = n, ++e._eventsCount;
1942
+ else if (typeof i == "function" ? i = o[t] = r ? [n, i] : [i, n] : r ? i.unshift(n) : i.push(n), s = yt(e), s > 0 && i.length > s && !i.warned) {
1943
+ i.warned = !0;
1944
+ var c = new Error("Possible EventEmitter memory leak detected. " + i.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
1945
+ c.name = "MaxListenersExceededWarning", c.emitter = e, c.type = t, c.count = i.length, jr(c);
1946
+ }
1947
+ return e;
1948
+ }
1949
+ g.prototype.addListener = function(t, n) {
1950
+ return gt(this, t, n, !1);
1951
+ };
1952
+ g.prototype.on = g.prototype.addListener;
1953
+ g.prototype.prependListener = function(t, n) {
1954
+ return gt(this, t, n, !0);
1955
+ };
1956
+ function Ur() {
1957
+ if (!this.fired)
1958
+ return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
1959
+ }
1960
+ function wt(e, t, n) {
1961
+ var r = { fired: !1, wrapFn: void 0, target: e, type: t, listener: n }, s = Ur.bind(r);
1962
+ return s.listener = n, r.wrapFn = s, s;
1963
+ }
1964
+ g.prototype.once = function(t, n) {
1965
+ return ne(n), this.on(t, wt(this, t, n)), this;
1966
+ };
1967
+ g.prototype.prependOnceListener = function(t, n) {
1968
+ return ne(n), this.prependListener(t, wt(this, t, n)), this;
1969
+ };
1970
+ g.prototype.removeListener = function(t, n) {
1971
+ var r, s, o, i, c;
1972
+ if (ne(n), s = this._events, s === void 0)
1973
+ return this;
1974
+ if (r = s[t], r === void 0)
1975
+ return this;
1976
+ if (r === n || r.listener === n)
1977
+ --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete s[t], s.removeListener && this.emit("removeListener", t, r.listener || n));
1978
+ else if (typeof r != "function") {
1979
+ for (o = -1, i = r.length - 1; i >= 0; i--)
1980
+ if (r[i] === n || r[i].listener === n) {
1981
+ c = r[i].listener, o = i;
1982
+ break;
1983
+ }
1984
+ if (o < 0)
1985
+ return this;
1986
+ o === 0 ? r.shift() : Br(r, o), r.length === 1 && (s[t] = r[0]), s.removeListener !== void 0 && this.emit("removeListener", t, c || n);
1987
+ }
1988
+ return this;
1989
+ };
1990
+ g.prototype.off = g.prototype.removeListener;
1991
+ g.prototype.removeAllListeners = function(t) {
1992
+ var n, r, s;
1993
+ if (r = this._events, r === void 0)
1994
+ return this;
1995
+ if (r.removeListener === void 0)
1996
+ return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : r[t] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete r[t]), this;
1997
+ if (arguments.length === 0) {
1998
+ var o = Object.keys(r), i;
1999
+ for (s = 0; s < o.length; ++s)
2000
+ i = o[s], i !== "removeListener" && this.removeAllListeners(i);
2001
+ return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
2002
+ }
2003
+ if (n = r[t], typeof n == "function")
2004
+ this.removeListener(t, n);
2005
+ else if (n !== void 0)
2006
+ for (s = n.length - 1; s >= 0; s--)
2007
+ this.removeListener(t, n[s]);
2008
+ return this;
2009
+ };
2010
+ function bt(e, t, n) {
2011
+ var r = e._events;
2012
+ if (r === void 0)
2013
+ return [];
2014
+ var s = r[t];
2015
+ return s === void 0 ? [] : typeof s == "function" ? n ? [s.listener || s] : [s] : n ? Mr(s) : At(s, s.length);
2016
+ }
2017
+ g.prototype.listeners = function(t) {
2018
+ return bt(this, t, !0);
2019
+ };
2020
+ g.prototype.rawListeners = function(t) {
2021
+ return bt(this, t, !1);
2022
+ };
2023
+ g.listenerCount = function(e, t) {
2024
+ return typeof e.listenerCount == "function" ? e.listenerCount(t) : Et.call(e, t);
2025
+ };
2026
+ g.prototype.listenerCount = Et;
2027
+ function Et(e) {
2028
+ var t = this._events;
2029
+ if (t !== void 0) {
2030
+ var n = t[e];
2031
+ if (typeof n == "function")
2032
+ return 1;
2033
+ if (n !== void 0)
2034
+ return n.length;
2035
+ }
2036
+ return 0;
2037
+ }
2038
+ g.prototype.eventNames = function() {
2039
+ return this._eventsCount > 0 ? K(this._events) : [];
2040
+ };
2041
+ function At(e, t) {
2042
+ for (var n = new Array(t), r = 0; r < t; ++r)
2043
+ n[r] = e[r];
2044
+ return n;
2045
+ }
2046
+ function Br(e, t) {
2047
+ for (; t + 1 < e.length; t++)
2048
+ e[t] = e[t + 1];
2049
+ e.pop();
2050
+ }
2051
+ function Mr(e) {
2052
+ for (var t = new Array(e.length), n = 0; n < t.length; ++n)
2053
+ t[n] = e[n].listener || e[n];
2054
+ return t;
2055
+ }
2056
+ function Hr(e, t) {
2057
+ return new Promise(function(n, r) {
2058
+ function s(i) {
2059
+ e.removeListener(t, o), r(i);
2060
+ }
2061
+ function o() {
2062
+ typeof e.removeListener == "function" && e.removeListener("error", s), n([].slice.call(arguments));
2063
+ }
2064
+ Tt(e, t, o, { once: !0 }), t !== "error" && zr(e, s, { once: !0 });
2065
+ });
2066
+ }
2067
+ function zr(e, t, n) {
2068
+ typeof e.on == "function" && Tt(e, "error", t, n);
2069
+ }
2070
+ function Tt(e, t, n, r) {
2071
+ if (typeof e.on == "function")
2072
+ r.once ? e.once(t, n) : e.on(t, n);
2073
+ else if (typeof e.addEventListener == "function")
2074
+ e.addEventListener(t, function s(o) {
2075
+ r.once && e.removeEventListener(t, s), n(o);
2076
+ });
2077
+ else
2078
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
2079
+ }
2080
+ var Ir = Ee.exports;
2081
+ const qr = /* @__PURE__ */ Fr(Ir), Jr = (e, t = new qr()) => {
2082
+ const n = {
2083
+ emit: (o, ...i) => (t.emit(o.toString(), ...i), n)
2084
+ }, r = e(n), s = Object.assign(
2085
+ r,
2086
+ {
2087
+ on: (o, i) => (t.on(o.toString(), (...c) => i(...c)), s),
2088
+ once: (o, i) => (t.once(o.toString(), (...c) => i(...c)), s),
2089
+ off: (o, i) => (t.off(o.toString(), (...c) => i(...c)), s)
2090
+ }
2091
+ );
2092
+ return s;
2093
+ }, Wr = (e) => new Promise(
2094
+ (t) => {
2095
+ setTimeout(t, e);
2096
+ }
2097
+ ), Yr = (e) => ({
2098
+ start: w(e.start),
2099
+ end: w(e.end)
2100
+ }), Kr = (e) => ({
2101
+ ...e,
2102
+ createdAt: w(e.createdAt),
2103
+ destroyAt: w(e.destroyAt),
2104
+ period: e.period ? Yr(e.period) : void 0
2105
+ }), Ae = (e) => ({
2106
+ ...e,
2107
+ detail: Kr(e.detail)
2108
+ }), Rt = (e, t, n) => {
2109
+ var s, o;
2110
+ const r = typeof e == "string" ? e : e.id;
2111
+ return p.$post(
2112
+ `/tasks/${r}/_run`,
2113
+ null,
2114
+ {
2115
+ params: {
2116
+ test_emails: t == null ? void 0 : t.testEmails,
2117
+ period_start: (s = t == null ? void 0 : t.period) == null ? void 0 : s.start,
2118
+ period_end: (o = t == null ? void 0 : t.period) == null ? void 0 : o.end,
2119
+ namespaces: n
2120
+ }
2121
+ }
2122
+ );
2123
+ }, Vr = (...e) => Jr(
2124
+ async (t) => {
2125
+ const { content: { id: n, queue: r } } = await Rt(...e);
2126
+ t.emit("started", { id: n, queue: r });
2127
+ let s;
2128
+ do {
2129
+ const {
2130
+ content: {
2131
+ progress: o,
2132
+ status: i,
2133
+ result: c
2134
+ }
2135
+ // FIXME: What if param order changes ?
2136
+ // eslint-disable-next-line no-await-in-loop
2137
+ } = await I(r, n, e[2]);
2138
+ s = { progress: o, status: i, result: c }, t.emit("progress", { progress: o, status: i });
2139
+ let l = 1e3;
2140
+ s.status === "active" && (l = 250), await Wr(l);
2141
+ } while (["completed", "failed", "stuck"].includes(s.status) === !1);
2142
+ if (!s.result)
2143
+ throw new Error("Generation failed with weird error");
2144
+ return Ae(s.result);
2145
+ }
2146
+ ), j = async (e, t, n) => (await O(
2147
+ "get",
2148
+ `/reports/${e}`,
2149
+ {
2150
+ responseType: n,
2151
+ params: { namespaces: t }
2152
+ }
2153
+ )).data, Gr = (e, t, n, r = "pdf") => j(`${e}.rep.${r}`, t, n), Qr = async (e, t, n, r) => {
2154
+ var o;
2155
+ const { content: { result: s } } = await I(
2156
+ e,
2157
+ t,
2158
+ n
2159
+ );
2160
+ if (!s)
2161
+ throw new Error("Job have no result");
2162
+ return j(((o = s.detail) == null ? void 0 : o.files.report) ?? "", n, r);
2163
+ }, Xr = async (e, t, n) => {
2164
+ const r = await j(`${e}.det.json`, t, n);
2165
+ return !n || n === "json" ? Ae(r) : r;
2166
+ }, Zr = async (e, t, n, r) => {
2167
+ var i;
2168
+ const { content: { result: s } } = await I(
2169
+ e,
2170
+ t,
2171
+ n
2172
+ );
2173
+ if (!s)
2174
+ throw new Error("Job have no result");
2175
+ const o = await j(((i = s.detail) == null ? void 0 : i.files.detail) ?? "", n, r);
2176
+ return !r || r === "json" ? Ae(o) : o;
2177
+ }, es = (e, t, n) => j(`${e}.deb.json`, t, n), ts = async (e, t, n, r) => {
2178
+ var o;
2179
+ const { content: { result: s } } = await I(
2180
+ e,
2181
+ t,
2182
+ n
2183
+ );
2184
+ if (!s)
2185
+ throw new Error("Job have no result");
2186
+ return j(((o = s.detail) == null ? void 0 : o.files.debug) ?? "", n, r);
2187
+ }, Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2188
+ __proto__: null,
2189
+ getReportDebugByJob: ts,
2190
+ getReportDebugByName: es,
2191
+ getReportDetailByJob: Zr,
2192
+ getReportDetailByName: Xr,
2193
+ getReportFileByJob: Qr,
2194
+ getReportFileByName: Gr,
2195
+ startAndListenGeneration: Vr,
2196
+ startGeneration: Rt
2197
+ }, Symbol.toStringTag, { value: "Module" })), ns = (e) => {
2198
+ p.defaults.baseURL = e;
2199
+ }, rs = () => {
2200
+ p.defaults.baseURL = void 0;
2201
+ }, ss = () => !!p.defaults.baseURL, Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2202
+ __proto__: null,
2203
+ isLogged: lt,
2204
+ isURLset: ss,
2205
+ login: ct,
2206
+ logout: ut,
2207
+ setURL: ns,
2208
+ unsetURL: rs
2209
+ }, Symbol.toStringTag, { value: "Module" })), Te = (e) => ({
2210
+ ...e,
2211
+ createdAt: w(e.createdAt),
2212
+ updatedAt: e.updatedAt ? w(e.updatedAt) : void 0
2213
+ }), Re = (e) => {
2214
+ const { body: t, tasks: n, ...r } = e;
2215
+ return {
2216
+ ...Te(r),
2217
+ tasks: n.map(te),
2218
+ body: t
2219
+ };
2220
+ }, os = async () => {
2221
+ const { content: e, ...t } = await p.$get("/templates");
2222
+ return {
2223
+ ...t,
2224
+ content: e.map(Te)
2225
+ };
2226
+ }, is = async (e) => {
2227
+ const t = typeof e == "string" ? e : e.id, { content: n, ...r } = await p.$get(`/templates/${t}`);
2228
+ return {
2229
+ ...r,
2230
+ content: Re(n)
2231
+ };
2232
+ }, as = async (e) => {
2233
+ const { content: t, ...n } = await p.$post(
2234
+ "/templates",
2235
+ e
2236
+ );
2237
+ return {
2238
+ ...n,
2239
+ content: Re(t)
2240
+ };
2241
+ }, St = async (e) => {
2242
+ const { id: t, ...n } = e, { content: r, ...s } = await p.$put(
2243
+ `/templates/${t}`,
2244
+ n
2245
+ );
2246
+ return {
2247
+ ...s,
2248
+ content: Re(r)
2249
+ };
2250
+ }, cs = St, us = async (e) => {
2251
+ const t = typeof e == "string" ? e : e.id;
2252
+ await p.$delete(`/templates/${t}`);
2253
+ }, $ = (e) => {
2254
+ const {
2255
+ activity: t,
2256
+ template: n,
2257
+ targets: r,
2258
+ extends: s,
2259
+ ...o
2260
+ } = e;
2261
+ return {
2262
+ ...ht(o),
2263
+ extends: Te(s),
2264
+ activity: t.map(Er),
2265
+ template: n,
2266
+ targets: r
2267
+ };
2268
+ }, ls = async (e, t) => {
2269
+ const { data: { content: n, ...r } } = await O(
2270
+ "get",
2271
+ "/tasks",
2272
+ {
2273
+ params: {
2274
+ namespaces: t,
2275
+ ...e ?? {}
2276
+ }
2277
+ }
2278
+ );
2279
+ return {
2280
+ ...r,
2281
+ content: n.map(({ tags: s, _count: o, ...i }) => ({
2282
+ tags: s,
2283
+ _count: o,
2284
+ ...te(i)
2285
+ }))
2286
+ };
2287
+ }, fs = (e) => p.$get(
2288
+ "/tasks/_targets",
2289
+ { params: { namespaces: e } }
2290
+ ), ds = async (e, t) => {
2291
+ const { content: n, ...r } = await p.$get(
2292
+ `/tasks/_targets/${e}/tasks`,
2293
+ { params: { namespaces: t } }
2294
+ );
2295
+ return {
2296
+ ...r,
2297
+ content: n.map(({ tags: s, ...o }) => ({
2298
+ tags: s,
2299
+ ...te(o)
2300
+ }))
2301
+ };
2302
+ }, ps = async (e, t, n) => {
2303
+ const r = typeof t == "string" ? t : t.id;
2304
+ await p.$delete(`/tasks/_targets/${e}/tasks/${r}`, { params: { namespaces: n } });
2305
+ }, hs = async (e, t) => {
2306
+ const { content: n, ...r } = await p.$post(
2307
+ "/tasks",
2308
+ e,
2309
+ { params: { namespaces: t } }
2310
+ );
2311
+ return {
2312
+ ...r,
2313
+ content: $(n)
2314
+ };
2315
+ }, ms = async (e, t, n) => {
2316
+ const { content: r, ...s } = await p.$post(
2317
+ `/tasks/_from-preset/${e}`,
2318
+ t,
2319
+ { params: { namespaces: n } }
2320
+ );
2321
+ return {
2322
+ ...s,
2323
+ content: $(r)
2324
+ };
2325
+ }, ys = async (e, t) => {
2326
+ const n = typeof e == "string" ? e : e.id, { content: r, ...s } = await p.$get(`/tasks/${n}`, { params: { namespaces: t } });
2327
+ return {
2328
+ ...s,
2329
+ content: $(r)
2330
+ };
2331
+ }, _t = async (e, t) => {
2332
+ const { id: n, ...r } = e, { content: s, ...o } = await p.$put(
2333
+ `/tasks/${n}`,
2334
+ r,
2335
+ { params: { namespaces: t } }
2336
+ );
2337
+ return {
2338
+ ...o,
2339
+ content: $(s)
2340
+ };
2341
+ }, gs = _t, ws = async (e, t) => {
2342
+ const n = typeof e == "string" ? e : e.id;
2343
+ await p.$delete(`/tasks/${n}`, { params: { namespaces: t } });
2344
+ }, bs = async (e, t) => {
2345
+ const n = typeof e == "string" ? e : e.id, { content: r, ...s } = await p.$put(
2346
+ `/tasks/${n}/_enable`,
2347
+ void 0,
2348
+ { params: { namespaces: t } }
2349
+ );
2350
+ return {
2351
+ ...s,
2352
+ content: $(r)
2353
+ };
2354
+ }, Es = async (e, t) => {
2355
+ const n = typeof e == "string" ? e : e.id, { content: r, ...s } = await p.$put(
2356
+ `/tasks/${n}/_disable`,
2357
+ void 0,
2358
+ { params: { namespaces: t } }
2359
+ );
2360
+ return {
2361
+ ...s,
2362
+ content: $(r)
2363
+ };
2364
+ }, As = async (e, t, n) => {
2365
+ const r = typeof e == "string" ? e : e.id, s = typeof t == "string" ? t : t.id, { content: o, ...i } = await p.$put(
2366
+ `/tasks/${r}/_link/${s}`,
2367
+ void 0,
2368
+ { params: { namespaces: n } }
2369
+ );
2370
+ return {
2371
+ ...i,
2372
+ content: $(o)
2373
+ };
2374
+ }, Ts = async (e, t, n) => {
2375
+ const r = typeof e == "string" ? e : e.id, s = typeof t == "string" ? t : t.id;
2376
+ await p.$delete(
2377
+ `/tasks/${r}/_link/${s}`,
2378
+ { params: { namespaces: n } }
2379
+ );
2380
+ }, Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2381
+ __proto__: null,
2382
+ Recurrence: pt,
2383
+ createTask: hs,
2384
+ createTaskFromPreset: ms,
2385
+ deleteTask: ws,
2386
+ disableTask: Es,
2387
+ enableTask: bs,
2388
+ getAllTargets: fs,
2389
+ getAllTasks: ls,
2390
+ getTask: ys,
2391
+ getTasksOfTarget: ds,
2392
+ linkTaskToTemplate: As,
2393
+ unlinkTaskToTemplate: Ts,
2394
+ unsubTargetOfTask: ps,
2395
+ updateTask: gs,
2396
+ upsertTask: _t
2397
+ }, Symbol.toStringTag, { value: "Module" })), Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2398
+ __proto__: null,
2399
+ createTemplate: as,
2400
+ deleteTemplate: us,
2401
+ getAllTemplates: os,
2402
+ getTemplate: is,
2403
+ updateTemplate: cs,
2404
+ upsertTemplate: St
2405
+ }, Symbol.toStringTag, { value: "Module" })), Rs = (e) => p.$get("/elastic/indices", { params: { namespace: e } }), Ss = (e, t) => p.$get(`/elastic/indices/${e}`, { params: { namespace: t } }), Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2406
+ __proto__: null,
2407
+ getAllIndices: Rs,
2408
+ getIndexMapping: Ss
2409
+ }, Symbol.toStringTag, { value: "Module" })), eo = "1.0.0-rc.1";
2410
+ export {
2411
+ zs as auth,
2412
+ Is as crons,
2413
+ Zs as elastic,
2414
+ qs as health,
2415
+ Js as history,
2416
+ Ys as namespaces,
2417
+ Ks as queues,
2418
+ Vs as reports,
2419
+ Gs as setup,
2420
+ Qs as tasks,
2421
+ Js as tasksActivity,
2422
+ Ws as tasksPresets,
2423
+ Xs as templates,
2424
+ eo as version
2425
+ };
2426
+ //# sourceMappingURL=ezreeport-sdk-js.mjs.map