@shopify/cli 4.6.0 → 4.7.0

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 (426) hide show
  1. package/dist/analytics-6LI5GLWS.js +1 -0
  2. package/dist/analytics-UNRIIG4Y.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-4YCMEC5R.js → chunk-2CYVZUYT.js} +1 -1
  5. package/dist/{chunk-C256W7D2.js → chunk-2HK4MFWP.js} +3 -3
  6. package/dist/chunk-2JDCVEFK.js +1 -0
  7. package/dist/chunk-2SZOPJYI.js +1 -0
  8. package/dist/chunk-2U4P6UFZ.js +6 -0
  9. package/dist/{chunk-TAFOSPBW.js → chunk-2WJAAJVX.js} +1 -1
  10. package/dist/chunk-37TEEITE.js +2 -0
  11. package/dist/chunk-3K6VHXC2.js +4 -0
  12. package/dist/chunk-4HV6A6UH.js +8 -0
  13. package/dist/chunk-4JY2P2A5.js +1 -0
  14. package/dist/chunk-4LRG5YBS.js +3 -0
  15. package/dist/chunk-4W3UE2ZI.js +1 -0
  16. package/dist/chunk-5CADTCJE.js +25 -0
  17. package/dist/chunk-5CR5YJTU.js +11 -0
  18. package/dist/chunk-5CYJG63I.js +1 -0
  19. package/dist/chunk-5HBIIYSK.js +1 -0
  20. package/dist/chunk-5HPBQ6U5.js +1 -0
  21. package/dist/chunk-5NO5OXYP.js +15 -0
  22. package/dist/chunk-63CIFL36.js +6 -0
  23. package/dist/chunk-6EBLULOC.js +1 -0
  24. package/dist/{chunk-FMTPUYSH.js → chunk-6ENBE43F.js} +1 -1
  25. package/dist/chunk-6OFGSZD6.js +1 -0
  26. package/dist/chunk-6PDR2IUL.js +11 -0
  27. package/dist/chunk-6VGJVXZI.js +3 -0
  28. package/dist/{chunk-ILQXBASM.js → chunk-6VRXGEIW.js} +1 -1
  29. package/dist/chunk-6WZYX5RO.js +1 -0
  30. package/dist/chunk-7AALWJAO.js +7 -0
  31. package/dist/chunk-7DOWT5JZ.js +20 -0
  32. package/dist/chunk-7JIQXGDE.js +9 -0
  33. package/dist/chunk-7MHANY34.js +1 -0
  34. package/dist/chunk-7WTNEG2F.js +3 -0
  35. package/dist/chunk-7Y7AZRL3.js +10 -0
  36. package/dist/chunk-ACTDYTAV.js +317 -0
  37. package/dist/{chunk-Y2PC2BBJ.js → chunk-AEUCDGTB.js} +4 -4
  38. package/dist/chunk-AGOEROAI.js +10 -0
  39. package/dist/{chunk-WPRAJ25Z.js → chunk-AH2ZGMDM.js} +1 -1
  40. package/dist/chunk-AMLWPYNA.js +4 -0
  41. package/dist/chunk-B4OMIONW.js +5 -0
  42. package/dist/chunk-BR6DBMQA.js +5 -0
  43. package/dist/chunk-CFWHR74L.js +1 -0
  44. package/dist/chunk-CHMEDVDZ.js +15 -0
  45. package/dist/chunk-CIH6LPTG.js +6 -0
  46. package/dist/chunk-CMYQXGLO.js +1 -0
  47. package/dist/chunk-CTRXLZAJ.js +1 -0
  48. package/dist/{chunk-WWX265PC.js → chunk-CYOFLJ3Z.js} +1 -1
  49. package/dist/{chunk-HSKB5OTM.js → chunk-CZJZCJRX.js} +1 -1
  50. package/dist/chunk-CZPGC2E7.js +1 -0
  51. package/dist/{chunk-2I62GKIH.js → chunk-D2K2ZBKH.js} +8 -8
  52. package/dist/chunk-DHU57LKD.js +1 -0
  53. package/dist/chunk-DKL6N3L2.js +1 -0
  54. package/dist/chunk-DMXQLI35.js +1 -0
  55. package/dist/chunk-DPNZWBT5.js +1 -0
  56. package/dist/{chunk-QU5NL2QT.js → chunk-DQCIORGH.js} +1 -1
  57. package/dist/chunk-DQFSKPKL.js +6 -0
  58. package/dist/{chunk-6Q5VRSRN.js → chunk-E2W5OYYM.js} +1 -1
  59. package/dist/chunk-E5T4YRGW.js +1 -0
  60. package/dist/chunk-EOMCXBCS.js +5 -0
  61. package/dist/{chunk-LWRDNTAD.js → chunk-EW55WWT7.js} +1 -1
  62. package/dist/{chunk-6UTUJKKC.js → chunk-F5HCSUXC.js} +5 -5
  63. package/dist/{chunk-W2GMKXM7.js → chunk-FCGKO2KY.js} +1 -1
  64. package/dist/{chunk-7CPECP5P.js → chunk-FULWTZS6.js} +1 -1
  65. package/dist/chunk-FWPJEL6Q.js +3 -0
  66. package/dist/chunk-GKOBFX4A.js +1 -0
  67. package/dist/chunk-GLWQMLUC.js +1 -0
  68. package/dist/chunk-GMTNOCMS.js +375 -0
  69. package/dist/chunk-GSCWZR22.js +1 -0
  70. package/dist/chunk-GZ64KWHX.js +8 -0
  71. package/dist/{chunk-72GN655L.js → chunk-H5KWM27L.js} +1 -1
  72. package/dist/chunk-HHVHVGRT.js +1 -0
  73. package/dist/{chunk-EBZ6MDEM.js → chunk-HLNJL4B6.js} +1 -1
  74. package/dist/{chunk-OUUOML3D.js → chunk-HZIX3DIT.js} +1 -1
  75. package/dist/chunk-I3N6NPHF.js +2 -0
  76. package/dist/chunk-JD5P5RAJ.js +1 -0
  77. package/dist/chunk-JJJTPEMD.js +1 -0
  78. package/dist/{chunk-KRZABRYT.js → chunk-JLGA3B7P.js} +1 -1
  79. package/dist/chunk-JQ2B3VHR.js +7 -0
  80. package/dist/{chunk-VZKR2YFM.js → chunk-JQISGC7D.js} +1 -1
  81. package/dist/chunk-JQVXH26X.js +6 -0
  82. package/dist/{chunk-ERCJPRN3.js → chunk-JUKAWTYY.js} +1 -1
  83. package/dist/{chunk-JHRZCUBE.js → chunk-JZMRBJH3.js} +1 -1
  84. package/dist/chunk-JZXA3H5K.js +1 -0
  85. package/dist/chunk-K4KTNINH.js +1 -0
  86. package/dist/chunk-KCS75ZM4.js +1 -0
  87. package/dist/{chunk-AJ6VOBXU.js → chunk-KIYHEMHD.js} +7 -7
  88. package/dist/chunk-KK24VGVE.js +6 -0
  89. package/dist/{chunk-6BX62FFE.js → chunk-KOVAFUYN.js} +1 -1
  90. package/dist/{chunk-QG7TELFC.js → chunk-KUNDCAQN.js} +1 -1
  91. package/dist/{chunk-3NO6PWNL.js → chunk-L67BU25M.js} +1 -1
  92. package/dist/{chunk-4KZRP2JP.js → chunk-LDF4PQ3B.js} +18 -18
  93. package/dist/chunk-LFOBYEWG.js +1 -0
  94. package/dist/chunk-LJM2DUXN.js +1 -0
  95. package/dist/{chunk-XWPPBOGF.js → chunk-LQ7ENG4V.js} +1 -1
  96. package/dist/chunk-LQCR4TGH.js +3 -0
  97. package/dist/{chunk-UM3OHLCX.js → chunk-LRQYUWWB.js} +1 -1
  98. package/dist/{chunk-CXWLHQKA.js → chunk-LWJA2DQG.js} +1 -1
  99. package/dist/{chunk-IKYZ5L3F.js → chunk-LZ3GZ7NS.js} +1 -1
  100. package/dist/chunk-MB7E5GEY.js +2 -0
  101. package/dist/{chunk-XERJY4IG.js → chunk-MLZLDL6B.js} +8 -8
  102. package/dist/chunk-MRCWOOSF.js +8 -0
  103. package/dist/chunk-N6YTJXIS.js +18 -0
  104. package/dist/chunk-NEMPLS7C.js +1 -0
  105. package/dist/chunk-OE3F7XXU.js +4 -0
  106. package/dist/chunk-OORWOTAP.js +3 -0
  107. package/dist/chunk-OUZGGWFN.js +1 -0
  108. package/dist/chunk-P5MNNBSO.js +1 -0
  109. package/dist/chunk-PAAKBWSF.js +1 -0
  110. package/dist/{chunk-5EFQILLF.js → chunk-PANGX7SA.js} +1 -1
  111. package/dist/{chunk-DODCPRXT.js → chunk-PIFW2R3S.js} +1 -1
  112. package/dist/chunk-PWSI275S.js +7 -0
  113. package/dist/chunk-Q5DQGV3M.js +1 -0
  114. package/dist/chunk-QBIVQXUJ.js +6 -0
  115. package/dist/chunk-QEB3HUQE.js +19 -0
  116. package/dist/{chunk-E3RDAVJT.js → chunk-QKGZWOOY.js} +1 -1
  117. package/dist/chunk-QPWMD2VR.js +1 -0
  118. package/dist/chunk-QRT4A2RV.js +3 -0
  119. package/dist/chunk-QXHENYJH.js +2 -0
  120. package/dist/{chunk-FPWLEGKZ.js → chunk-QZBSCOJV.js} +1 -1
  121. package/dist/chunk-R2R6JDNH.js +1 -0
  122. package/dist/chunk-RUFQCXBX.js +16 -0
  123. package/dist/chunk-RY2SJVWM.js +12 -0
  124. package/dist/chunk-RZFBGBNA.js +1 -0
  125. package/dist/chunk-S3P5WWJD.js +1 -0
  126. package/dist/chunk-SEVSMWNX.js +1 -0
  127. package/dist/chunk-SJMTETSU.js +32 -0
  128. package/dist/chunk-SSJGWLCW.js +28 -0
  129. package/dist/chunk-SYADOUBB.js +7 -0
  130. package/dist/chunk-T5JXQ7KO.js +1 -0
  131. package/dist/chunk-TCTVI6PK.js +1 -0
  132. package/dist/chunk-TSLQZTXR.js +1 -0
  133. package/dist/chunk-TTAPXLI5.js +1 -0
  134. package/dist/{chunk-MDXSLAIC.js → chunk-TY4W7AYX.js} +1 -1
  135. package/dist/chunk-TYIGOVRQ.js +3 -0
  136. package/dist/{chunk-B6SY4BIK.js → chunk-U2Z5NMXV.js} +1 -1
  137. package/dist/{chunk-KGZH4RFA.js → chunk-U6HYEGAE.js} +1 -1
  138. package/dist/chunk-U7R6LYPJ.js +5 -0
  139. package/dist/chunk-UPJLZHHR.js +4 -0
  140. package/dist/chunk-UVQL7RUY.js +1 -0
  141. package/dist/chunk-V2HCVJYF.js +1 -0
  142. package/dist/chunk-V5SC2RYQ.js +2 -0
  143. package/dist/chunk-VKSR6MJG.js +2 -0
  144. package/dist/chunk-VRVP2GQL.js +5 -0
  145. package/dist/{chunk-XGRVAPLR.js → chunk-WCRZJY3P.js} +1 -1
  146. package/dist/{chunk-XGCJWCC4.js → chunk-WHLGNDRE.js} +1 -1
  147. package/dist/{chunk-E3RQCWSC.js → chunk-WKUGSFTB.js} +3 -3
  148. package/dist/chunk-X4XP2RQJ.js +1 -0
  149. package/dist/chunk-XAOYKECS.js +1 -0
  150. package/dist/chunk-XCBEYRQI.js +3 -0
  151. package/dist/chunk-XHZ5BWXL.js +5 -0
  152. package/dist/{chunk-2JFZ6GZC.js → chunk-XLURZ6GL.js} +52 -52
  153. package/dist/chunk-XRT2W5Y2.js +10 -0
  154. package/dist/chunk-XUEMMLXK.js +1 -0
  155. package/dist/chunk-Y34LWI3S.js +19 -0
  156. package/dist/chunk-YHPBDS52.js +16 -0
  157. package/dist/{chunk-JS3X6BDT.js → chunk-YIZZ5LZN.js} +1 -1
  158. package/dist/chunk-YN6A26QL.js +836 -0
  159. package/dist/chunk-YOO7DLOT.js +1 -0
  160. package/dist/chunk-YUVE2I3C.js +1 -0
  161. package/dist/chunk-YY6TFARF.js +1 -0
  162. package/dist/chunk-Z5K4J7HQ.js +1 -0
  163. package/dist/chunk-ZCNIR6YU.js +1 -0
  164. package/dist/{chunk-OTT73YUA.js → chunk-ZO74GSWC.js} +1 -1
  165. package/dist/{chunk-5Y2VD4I3.js → chunk-ZRLEAF7M.js} +1 -1
  166. package/dist/chunk-ZSFAURIH.js +3 -0
  167. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  168. package/dist/cli/commands/app/build.js +1 -1
  169. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  170. package/dist/cli/commands/app/bulk/execute.js +1 -1
  171. package/dist/cli/commands/app/bulk/status.js +1 -1
  172. package/dist/cli/commands/app/config/link.js +1 -1
  173. package/dist/cli/commands/app/config/pull.js +1 -1
  174. package/dist/cli/commands/app/config/use.js +1 -1
  175. package/dist/cli/commands/app/config/validate.js +1 -1
  176. package/dist/cli/commands/app/demo/watcher.js +1 -1
  177. package/dist/cli/commands/app/deploy.js +1 -1
  178. package/dist/cli/commands/app/dev/clean.js +1 -1
  179. package/dist/cli/commands/app/dev.js +1 -1
  180. package/dist/cli/commands/app/env/pull.js +1 -1
  181. package/dist/cli/commands/app/env/show.js +1 -1
  182. package/dist/cli/commands/app/execute.js +1 -1
  183. package/dist/cli/commands/app/function/build.js +1 -1
  184. package/dist/cli/commands/app/function/info.js +1 -1
  185. package/dist/cli/commands/app/function/replay.js +1 -1
  186. package/dist/cli/commands/app/function/run.js +1 -1
  187. package/dist/cli/commands/app/function/schema.js +1 -1
  188. package/dist/cli/commands/app/function/typegen.js +1 -1
  189. package/dist/cli/commands/app/generate/extension.js +1 -1
  190. package/dist/cli/commands/app/graphiql.js +1 -1
  191. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  192. package/dist/cli/commands/app/import-extensions.js +1 -1
  193. package/dist/cli/commands/app/info.js +1 -1
  194. package/dist/cli/commands/app/init.js +1 -1
  195. package/dist/cli/commands/app/logs.js +1 -1
  196. package/dist/cli/commands/app/release.js +1 -1
  197. package/dist/cli/commands/app/versions/list.js +1 -1
  198. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  199. package/dist/cli/commands/auth/login.js +1 -1
  200. package/dist/cli/commands/auth/logout.js +1 -1
  201. package/dist/cli/commands/cache/clear.js +1 -1
  202. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  203. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  204. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  205. package/dist/cli/commands/debug/command-flags.js +1 -1
  206. package/dist/cli/commands/doc/fetch.js +1 -1
  207. package/dist/cli/commands/doc/search.js +1 -1
  208. package/dist/cli/commands/docs/generate.js +1 -1
  209. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  210. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  211. package/dist/cli/commands/help.js +1 -1
  212. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  213. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  214. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  215. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  216. package/dist/cli/commands/notifications/generate.js +1 -1
  217. package/dist/cli/commands/notifications/list.js +1 -1
  218. package/dist/cli/commands/organization/list.js +1 -1
  219. package/dist/cli/commands/search.js +1 -1
  220. package/dist/cli/commands/send-analytics.d.ts +5 -0
  221. package/dist/cli/commands/send-analytics.js +1 -0
  222. package/dist/cli/commands/theme/check.js +1 -1
  223. package/dist/cli/commands/theme/console.js +1 -1
  224. package/dist/cli/commands/theme/delete.js +1 -1
  225. package/dist/cli/commands/theme/dev.js +1 -1
  226. package/dist/cli/commands/theme/duplicate.js +1 -1
  227. package/dist/cli/commands/theme/info.js +1 -1
  228. package/dist/cli/commands/theme/init.js +1 -1
  229. package/dist/cli/commands/theme/language-server.js +1 -1
  230. package/dist/cli/commands/theme/list.js +1 -1
  231. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  232. package/dist/cli/commands/theme/open.js +1 -1
  233. package/dist/cli/commands/theme/package.js +1 -1
  234. package/dist/cli/commands/theme/preview.js +1 -1
  235. package/dist/cli/commands/theme/profile.js +1 -1
  236. package/dist/cli/commands/theme/publish.js +1 -1
  237. package/dist/cli/commands/theme/pull.js +1 -1
  238. package/dist/cli/commands/theme/push.js +1 -1
  239. package/dist/cli/commands/theme/rename.js +1 -1
  240. package/dist/cli/commands/theme/share.js +1 -1
  241. package/dist/cli/commands/upgrade.js +1 -1
  242. package/dist/cli/commands/version.js +1 -1
  243. package/dist/cli/help.js +1 -1
  244. package/dist/cli/services/doctor-release/theme/tests/init.js +4 -8
  245. package/dist/cli/services/doctor-release/theme/tests/push.js +3 -4
  246. package/dist/command-registry.js +1 -1
  247. package/dist/conf-store-OAGJBITE.js +1 -0
  248. package/dist/custom-oclif-loader-BWAMUFQ4.js +1 -0
  249. package/dist/deprecations-K3NPRKBF.js +1 -0
  250. package/dist/dist-EXJEE23W.js +1 -0
  251. package/dist/dist-S62Z6IFV.js +1 -0
  252. package/dist/environments-ALH2N36U.js +1 -0
  253. package/dist/error-YX56C43A.js +1 -0
  254. package/dist/error-handler-FDCH72NH.js +1 -0
  255. package/dist/fs-SKHQZZTQ.js +1 -0
  256. package/dist/hooks/did-you-mean.js +1 -1
  257. package/dist/hooks/hydrogen-init.js +1 -1
  258. package/dist/hooks/postrun.js +1 -1
  259. package/dist/hooks/prerun.js +2 -1
  260. package/dist/hooks/public-metadata.js +1 -1
  261. package/dist/hooks/sensitive-metadata.js +1 -1
  262. package/dist/hooks/tunnel-provider.js +1 -1
  263. package/dist/hooks/tunnel-start.js +1 -1
  264. package/dist/index.d.ts +1 -1
  265. package/dist/index.js +15 -15
  266. package/dist/is-global-V5VORI3F.js +1 -0
  267. package/dist/lib-M72BVWQ3.js +1 -0
  268. package/dist/local-GX5AN6ZS.js +1 -0
  269. package/dist/metadata-XUJUTBTB.js +1 -0
  270. package/dist/{morph-ABSWZEVT.js → morph-77RHJICZ.js} +1 -1
  271. package/dist/node-package-manager-3WIYU7Y3.js +1 -0
  272. package/dist/notifications-system-RHULO564.js +1 -0
  273. package/dist/os-M6X7KOR4.js +1 -0
  274. package/dist/output-X47P6ICP.js +1 -0
  275. package/dist/{prettier-6ZMB2MMO.js → prettier-RVUAAWC7.js} +1 -1
  276. package/dist/system-SR5G7WEW.js +1 -0
  277. package/dist/tsconfig.tsbuildinfo +1 -1
  278. package/dist/ui-VYWSLAQ6.js +1 -0
  279. package/dist/upgrade-PFQ7JMXG.js +1 -0
  280. package/dist/version-FK4ETQ22.js +1 -0
  281. package/dist/version-U4GM2LNG.js +1 -0
  282. package/dist/workerd-NAPS5TA7.js +18 -0
  283. package/oclif.manifest.json +146 -120
  284. package/package.json +7 -8
  285. package/dist/analytics-6S5JVSRO.js +0 -1
  286. package/dist/analytics-E252SR3P.js +0 -1
  287. package/dist/chunk-2MCH43SL.js +0 -11
  288. package/dist/chunk-2SNT7U7B.js +0 -1
  289. package/dist/chunk-2VIUGNYO.js +0 -1
  290. package/dist/chunk-2Y6CYLKF.js +0 -1
  291. package/dist/chunk-3EHRA4LA.js +0 -1
  292. package/dist/chunk-3EPQ6UOK.js +0 -25
  293. package/dist/chunk-3TFUSDHY.js +0 -370
  294. package/dist/chunk-46NA23I7.js +0 -3
  295. package/dist/chunk-47URTBZF.js +0 -9
  296. package/dist/chunk-4FEBSLSU.js +0 -1
  297. package/dist/chunk-4HB4VZJQ.js +0 -4
  298. package/dist/chunk-4JARSKED.js +0 -32
  299. package/dist/chunk-4P7PWLUN.js +0 -1
  300. package/dist/chunk-53ZA2HD3.js +0 -1
  301. package/dist/chunk-57YF2UNT.js +0 -1
  302. package/dist/chunk-5JPV3HPJ.js +0 -1
  303. package/dist/chunk-5LJ5H4TD.js +0 -7
  304. package/dist/chunk-6FJBCRVK.js +0 -15
  305. package/dist/chunk-6SXB44CE.js +0 -1
  306. package/dist/chunk-6YCGMS7X.js +0 -28
  307. package/dist/chunk-7HAFBCL3.js +0 -2
  308. package/dist/chunk-7XPFLQEM.js +0 -1
  309. package/dist/chunk-A3JE5LX3.js +0 -7
  310. package/dist/chunk-A4SBXDZB.js +0 -14
  311. package/dist/chunk-B2WK53GH.js +0 -1
  312. package/dist/chunk-B34VYVGV.js +0 -1
  313. package/dist/chunk-BBEHNPKK.js +0 -7
  314. package/dist/chunk-BCTMBKAU.js +0 -7
  315. package/dist/chunk-BGUHH7AW.js +0 -10
  316. package/dist/chunk-DHU767C3.js +0 -1
  317. package/dist/chunk-DKHMLETG.js +0 -1
  318. package/dist/chunk-EJDWYASP.js +0 -1
  319. package/dist/chunk-ELJ7SKMH.js +0 -1
  320. package/dist/chunk-EQTULRM7.js +0 -2
  321. package/dist/chunk-ESZS7L6O.js +0 -11
  322. package/dist/chunk-ET2O5DAS.js +0 -1
  323. package/dist/chunk-EZ7EBYDT.js +0 -684
  324. package/dist/chunk-EZNJDFFK.js +0 -28
  325. package/dist/chunk-F34LB7M4.js +0 -20
  326. package/dist/chunk-FE24P4UQ.js +0 -6
  327. package/dist/chunk-FT4HLDK7.js +0 -1
  328. package/dist/chunk-G3YYMKWG.js +0 -3
  329. package/dist/chunk-G7QW5OSQ.js +0 -6
  330. package/dist/chunk-GCDEDRY7.js +0 -3
  331. package/dist/chunk-GEE5MXHT.js +0 -5
  332. package/dist/chunk-H4MYBJ6C.js +0 -1
  333. package/dist/chunk-HDXBZLHH.js +0 -8
  334. package/dist/chunk-HT6MOPLW.js +0 -1
  335. package/dist/chunk-HZXY7RWJ.js +0 -19
  336. package/dist/chunk-IDAWPBJM.js +0 -4
  337. package/dist/chunk-IDLDQ2JB.js +0 -1
  338. package/dist/chunk-IYU72M55.js +0 -3
  339. package/dist/chunk-J3IHP46B.js +0 -3
  340. package/dist/chunk-J4KJQHNS.js +0 -1
  341. package/dist/chunk-JIBLEZ57.js +0 -18
  342. package/dist/chunk-JIKIYMCT.js +0 -1
  343. package/dist/chunk-JJTGHARS.js +0 -3
  344. package/dist/chunk-JQP3ZCAG.js +0 -1
  345. package/dist/chunk-K7IZMKBR.js +0 -5
  346. package/dist/chunk-KO4FB4QU.js +0 -1
  347. package/dist/chunk-KPRKIZ5M.js +0 -3
  348. package/dist/chunk-KUN74JD4.js +0 -4
  349. package/dist/chunk-KURWC4A5.js +0 -16
  350. package/dist/chunk-L3D2CASO.js +0 -1
  351. package/dist/chunk-L7DZTIHJ.js +0 -1
  352. package/dist/chunk-LBDAYBIF.js +0 -1
  353. package/dist/chunk-LH3RIIOB.js +0 -8
  354. package/dist/chunk-LWWBU7ET.js +0 -6
  355. package/dist/chunk-M4BEPPA3.js +0 -1
  356. package/dist/chunk-M4YPMHIM.js +0 -1
  357. package/dist/chunk-M5KKLAM6.js +0 -3
  358. package/dist/chunk-MBLHXPGK.js +0 -1
  359. package/dist/chunk-MDHJJVXA.js +0 -2
  360. package/dist/chunk-NA2ERJIJ.js +0 -1
  361. package/dist/chunk-NOKCVDYD.js +0 -317
  362. package/dist/chunk-O6XSWAP2.js +0 -4
  363. package/dist/chunk-OB62WVZ5.js +0 -16
  364. package/dist/chunk-OT52JOML.js +0 -1
  365. package/dist/chunk-P7XC5HS2.js +0 -1
  366. package/dist/chunk-PALG4SNB.js +0 -1
  367. package/dist/chunk-PB37BTPE.js +0 -6
  368. package/dist/chunk-PWYRKTJ4.js +0 -1
  369. package/dist/chunk-PXSX63RF.js +0 -1
  370. package/dist/chunk-QDPDB5EP.js +0 -3
  371. package/dist/chunk-QV53BSQP.js +0 -6
  372. package/dist/chunk-QXXA2EQY.js +0 -15
  373. package/dist/chunk-QZ5FMWZS.js +0 -1
  374. package/dist/chunk-R26GJEH3.js +0 -1
  375. package/dist/chunk-RTW4RZWH.js +0 -6
  376. package/dist/chunk-SEV3S3WH.js +0 -8
  377. package/dist/chunk-STJ3LWFL.js +0 -1
  378. package/dist/chunk-TAV2ENJY.js +0 -1
  379. package/dist/chunk-TQNALMQH.js +0 -3
  380. package/dist/chunk-TUJNCWHZ.js +0 -1
  381. package/dist/chunk-U564K7SX.js +0 -1
  382. package/dist/chunk-UKQ7NE5V.js +0 -1
  383. package/dist/chunk-V65P572N.js +0 -10
  384. package/dist/chunk-VFIVXK53.js +0 -2
  385. package/dist/chunk-VVFPW4ZQ.js +0 -2
  386. package/dist/chunk-VYITPC34.js +0 -11
  387. package/dist/chunk-W4X3635B.js +0 -1
  388. package/dist/chunk-WEEYQX3M.js +0 -1
  389. package/dist/chunk-WO7LKJCJ.js +0 -1
  390. package/dist/chunk-WR2ZQGUR.js +0 -1
  391. package/dist/chunk-WW7TENNA.js +0 -1
  392. package/dist/chunk-XGMPC7KK.js +0 -2
  393. package/dist/chunk-Y4QC2YVE.js +0 -1
  394. package/dist/chunk-YNJZ2VXV.js +0 -5
  395. package/dist/chunk-Z5DDPQ26.js +0 -3
  396. package/dist/chunk-ZK7VJZ6V.js +0 -6
  397. package/dist/chunk-ZLT4DPHN.js +0 -5
  398. package/dist/chunk-ZOBQKNGK.js +0 -1
  399. package/dist/chunk-ZTE46E4Z.js +0 -153
  400. package/dist/conf-store-N5P2ZEAD.js +0 -1
  401. package/dist/custom-oclif-loader-4ZAXX5MR.js +0 -1
  402. package/dist/deprecations-4TY4DNME.js +0 -1
  403. package/dist/dist-6ZJS4I57.js +0 -1
  404. package/dist/dist-7W2KJOYN.js +0 -1
  405. package/dist/environments-TR5WW2MD.js +0 -1
  406. package/dist/error-VJQM4MFE.js +0 -1
  407. package/dist/error-handler-IYGE3Z72.js +0 -1
  408. package/dist/fs-EOQL26C3.js +0 -1
  409. package/dist/hooks/app-init.d.ts +0 -9
  410. package/dist/hooks/app-init.js +0 -1
  411. package/dist/is-global-RQCPBQA3.js +0 -1
  412. package/dist/is-wsl-UEMXYJPN.js +0 -1
  413. package/dist/lib-JKLF33A7.js +0 -1
  414. package/dist/local-TW3HCZ2S.js +0 -1
  415. package/dist/local-storage-T6FKS53K.js +0 -1
  416. package/dist/metadata-TYZDEER5.js +0 -1
  417. package/dist/node-package-manager-6SWUZILX.js +0 -1
  418. package/dist/notifications-system-SMHMV2UW.js +0 -1
  419. package/dist/output-JG5I2TEL.js +0 -1
  420. package/dist/system-D4Z32GDS.js +0 -1
  421. package/dist/ui-6M3XZ6MR.js +0 -1
  422. package/dist/upgrade-EKAG4IV7.js +0 -1
  423. package/dist/version-6UBWZCNS.js +0 -1
  424. package/dist/version-XRU7TEAI.js +0 -1
  425. package/dist/workerd-LXBSJULF.js +0 -18
  426. /package/dist/{chunk-VDN6MEYI.js → chunk-NJPL5BTN.js} +0 -0
@@ -1,10 +0,0 @@
1
- import{a as ri}from"./chunk-RJ5VF3QY.js";import{m as si,p as ni}from"./chunk-ZTE46E4Z.js";import{Ra as Jr,Sa as sr}from"./chunk-3TFUSDHY.js";import{b as ti}from"./chunk-UKQ7NE5V.js";import{i as rr}from"./chunk-773TIA5M.js";import{a as mc}from"./chunk-CX5CC6P5.js";import{c as g,e as Wr,g as u}from"./chunk-VKWPEFWQ.js";var Nt=g(q=>{"use strict";u();Object.defineProperty(q,"__esModule",{value:!0});q.regexpCode=q.getEsmExportName=q.getProperty=q.safeStringify=q.stringify=q.strConcat=q.addCodeArg=q.str=q._=q.nil=q._Code=q.Name=q.IDENTIFIER=q._CodeOrName=void 0;var bt=class{};q._CodeOrName=bt;q.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ve=class extends bt{constructor(e){if(super(),!q.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};q.Name=Ve;var se=class extends bt{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof Ve&&(r[s.str]=(r[s.str]||0)+1),r),{})}};q._Code=se;q.nil=new se("");function bi(t,...e){let r=[t[0]],s=0;for(;s<e.length;)os(r,e[s]),r.push(t[++s]);return new se(r)}q._=bi;var is=new se("+");function Pi(t,...e){let r=[Pt(t[0])],s=0;for(;s<e.length;)r.push(is),os(r,e[s]),r.push(is,Pt(t[++s]));return Nc(r),new se(r)}q.str=Pi;function os(t,e){e instanceof se?t.push(...e._items):e instanceof Ve?t.push(e):t.push(Ic(e))}q.addCodeArg=os;function Nc(t){let e=1;for(;e<t.length-1;){if(t[e]===is){let r=Oc(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Oc(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ve||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Ve))return`"${t}${e.slice(1)}`}function Tc(t,e){return e.emptyStr()?t:t.emptyStr()?e:Pi`${t}${e}`}q.strConcat=Tc;function Ic(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Pt(Array.isArray(t)?t.join(","):t)}function kc(t){return new se(Pt(t))}q.stringify=kc;function Pt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}q.safeStringify=Pt;function Rc(t){return typeof t=="string"&&q.IDENTIFIER.test(t)?new se(`.${t}`):bi`[${t}]`}q.getProperty=Rc;function jc(t){if(typeof t=="string"&&q.IDENTIFIER.test(t))return new se(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}q.getEsmExportName=jc;function qc(t){return new se(t.toString())}q.regexpCode=qc});var us=g(Q=>{"use strict";u();Object.defineProperty(Q,"__esModule",{value:!0});Q.ValueScope=Q.ValueScopeName=Q.Scope=Q.varKinds=Q.UsedValueState=void 0;var Z=Nt(),as=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ar;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ar||(Q.UsedValueState=ar={}));Q.varKinds={const:new Z.Name("const"),let:new Z.Name("let"),var:new Z.Name("var")};var cr=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Z.Name?e:this.name(e)}name(e){return new Z.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Q.Scope=cr;var ur=class extends Z.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,Z._)`.${new Z.Name(r)}[${s}]`}};Q.ValueScopeName=ur;var Ac=(0,Z._)`\n`,cs=class extends cr{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ac:Z.nil}}get(){return this._scope}name(e){return new ur(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,o=(s=r.key)!==null&&s!==void 0?s:r.ref,a=this._values[i];if(a){let d=a.get(o);if(d)return d}else a=this._values[i]=new Map;a.set(o,n);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=r.ref,n.setValue(r,{property:i,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Z._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let i=Z.nil;for(let o in e){let a=e[o];if(!a)continue;let c=s[o]=s[o]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,ar.Started);let d=r(l);if(d){let f=this.opts.es5?Q.varKinds.var:Q.varKinds.const;i=(0,Z._)`${i}${f} ${l} = ${d};${this.opts._n}`}else if(d=n?.(l))i=(0,Z._)`${i}${d}${this.opts._n}`;else throw new as(l);c.set(l,ar.Completed)})}return i}};Q.ValueScope=cs});var b=g(P=>{"use strict";u();Object.defineProperty(P,"__esModule",{value:!0});P.or=P.and=P.not=P.CodeGen=P.operators=P.varKinds=P.ValueScopeName=P.ValueScope=P.Scope=P.Name=P.regexpCode=P.stringify=P.getProperty=P.nil=P.strConcat=P.str=P._=void 0;var T=Nt(),ue=us(),Ie=Nt();Object.defineProperty(P,"_",{enumerable:!0,get:function(){return Ie._}});Object.defineProperty(P,"str",{enumerable:!0,get:function(){return Ie.str}});Object.defineProperty(P,"strConcat",{enumerable:!0,get:function(){return Ie.strConcat}});Object.defineProperty(P,"nil",{enumerable:!0,get:function(){return Ie.nil}});Object.defineProperty(P,"getProperty",{enumerable:!0,get:function(){return Ie.getProperty}});Object.defineProperty(P,"stringify",{enumerable:!0,get:function(){return Ie.stringify}});Object.defineProperty(P,"regexpCode",{enumerable:!0,get:function(){return Ie.regexpCode}});Object.defineProperty(P,"Name",{enumerable:!0,get:function(){return Ie.Name}});var hr=us();Object.defineProperty(P,"Scope",{enumerable:!0,get:function(){return hr.Scope}});Object.defineProperty(P,"ValueScope",{enumerable:!0,get:function(){return hr.ValueScope}});Object.defineProperty(P,"ValueScopeName",{enumerable:!0,get:function(){return hr.ValueScopeName}});Object.defineProperty(P,"varKinds",{enumerable:!0,get:function(){return hr.varKinds}});P.operators={GT:new T._Code(">"),GTE:new T._Code(">="),LT:new T._Code("<"),LTE:new T._Code("<="),EQ:new T._Code("==="),NEQ:new T._Code("!=="),NOT:new T._Code("!"),OR:new T._Code("||"),AND:new T._Code("&&"),ADD:new T._Code("+")};var be=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},ls=class extends be{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?ue.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=rt(this.rhs,e,r)),this}get names(){return this.rhs instanceof T._CodeOrName?this.rhs.names:{}}},lr=class extends be{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof T.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=rt(this.rhs,e,r),this}get names(){let e=this.lhs instanceof T.Name?{}:{...this.lhs.names};return fr(e,this.rhs)}},ds=class extends lr{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},fs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},hs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},ps=class extends be{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ms=class extends be{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=rt(this.code,e,r),this}get names(){return this.code instanceof T._CodeOrName?this.code.names:{}}},Ot=class extends be{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let i=s[n];i.optimizeNames(e,r)||(Cc(e,i.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Ke(e,r.names),{})}},Pe=class extends Ot{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},ys=class extends Ot{},tt=class extends Pe{};tt.kind="else";var Ue=class t extends Pe{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new tt(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Ni(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=rt(this.condition,e,r),this}get names(){let e=super.names;return fr(e,this.condition),this.else&&Ke(e,this.else.names),e}};Ue.kind="if";var Le=class extends Pe{};Le.kind="for";var _s=class extends Le{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=rt(this.iteration,e,r),this}get names(){return Ke(super.names,this.iteration.names)}},gs=class extends Le{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?ue.varKinds.var:this.varKind,{name:s,from:n,to:i}=this;return`for(${r} ${s}=${n}; ${s}<${i}; ${s}++)`+super.render(e)}get names(){let e=fr(super.names,this.from);return fr(e,this.to)}},dr=class extends Le{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=rt(this.iterable,e,r),this}get names(){return Ke(super.names,this.iterable.names)}},Tt=class extends Pe{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Tt.kind="func";var It=class extends Ot{render(e){return"return "+super.render(e)}};It.kind="return";var $s=class extends Pe{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Ke(e,this.catch.names),this.finally&&Ke(e,this.finally.names),e}},kt=class extends Pe{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};kt.kind="catch";var Rt=class extends Pe{render(e){return"finally"+super.render(e)}};Rt.kind="finally";var vs=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
2
- `:""},this._extScope=e,this._scope=new ue.Scope({parent:e}),this._nodes=[new ys]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let s=this._extScope.value(e,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,s,n){let i=this._scope.toName(r);return s!==void 0&&n&&(this._constants[i.str]=s),this._leafNode(new ls(e,i,s)),i}const(e,r,s){return this._def(ue.varKinds.const,e,r,s)}let(e,r,s){return this._def(ue.varKinds.let,e,r,s)}var(e,r,s){return this._def(ue.varKinds.var,e,r,s)}assign(e,r,s){return this._leafNode(new lr(e,r,s))}add(e,r){return this._leafNode(new ds(e,P.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==T.nil&&this._leafNode(new ms(e)),this}object(...e){let r=["{"];for(let[s,n]of e)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,T.addCodeArg)(r,n));return r.push("}"),new T._Code(r)}if(e,r,s){if(this._blockNode(new Ue(e)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ue(e))}else(){return this._elseNode(new tt)}endIf(){return this._endBlockNode(Ue,tt)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new _s(e),r)}forRange(e,r,s,n,i=this.opts.es5?ue.varKinds.var:ue.varKinds.let){let o=this._scope.toName(e);return this._for(new gs(i,o,r,s),()=>n(o))}forOf(e,r,s,n=ue.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let o=r instanceof T.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,T._)`${o}.length`,a=>{this.var(i,(0,T._)`${o}[${a}]`),s(i)})}return this._for(new dr("of",n,i,r),()=>s(i))}forIn(e,r,s,n=this.opts.es5?ue.varKinds.var:ue.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,T._)`Object.keys(${r})`,s);let i=this._scope.toName(e);return this._for(new dr("in",n,i,r),()=>s(i))}endFor(){return this._endBlockNode(Le)}label(e){return this._leafNode(new fs(e))}break(e){return this._leafNode(new hs(e))}return(e){let r=new It;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(It)}try(e,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new $s;if(this._blockNode(n),this.code(e),r){let i=this.name("e");this._currNode=n.catch=new kt(i),r(i)}return s&&(this._currNode=n.finally=new Rt,this.code(s)),this._endBlockNode(kt,Rt)}throw(e){return this._leafNode(new ps(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=T.nil,s,n){return this._blockNode(new Tt(e,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Tt)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let s=this._currNode;if(s instanceof e||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Ue))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};P.CodeGen=vs;function Ke(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function fr(t,e){return e instanceof T._CodeOrName?Ke(t,e.names):t}function rt(t,e,r){if(t instanceof T.Name)return s(t);if(!n(t))return t;return new T._Code(t._items.reduce((i,o)=>(o instanceof T.Name&&(o=s(o)),o instanceof T._Code?i.push(...o._items):i.push(o),i),[]));function s(i){let o=r[i.str];return o===void 0||e[i.str]!==1?i:(delete e[i.str],o)}function n(i){return i instanceof T._Code&&i._items.some(o=>o instanceof T.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function Cc(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Ni(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,T._)`!${ws(t)}`}P.not=Ni;var Mc=Oi(P.operators.AND);function Dc(...t){return t.reduce(Mc)}P.and=Dc;var xc=Oi(P.operators.OR);function zc(...t){return t.reduce(xc)}P.or=zc;function Oi(t){return(e,r)=>e===T.nil?r:r===T.nil?e:(0,T._)`${ws(e)} ${t} ${ws(r)}`}function ws(t){return t instanceof T.Name?t:(0,T._)`(${t})`}});var k=g(N=>{"use strict";u();Object.defineProperty(N,"__esModule",{value:!0});N.checkStrictMode=N.getErrorPath=N.Type=N.useFunc=N.setEvaluated=N.evaluatedPropsToName=N.mergeEvaluated=N.eachItem=N.unescapeJsonPointer=N.escapeJsonPointer=N.escapeFragment=N.unescapeFragment=N.schemaRefOrVal=N.schemaHasRulesButRef=N.schemaHasRules=N.checkUnknownRules=N.alwaysValidSchema=N.toHash=void 0;var C=b(),Fc=Nt();function Vc(t){let e={};for(let r of t)e[r]=!0;return e}N.toHash=Vc;function Uc(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(ki(t,e),!Ri(e,t.self.RULES.all))}N.alwaysValidSchema=Uc;function ki(t,e=t.schema){let{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=s.RULES.keywords;for(let i in e)n[i]||Ai(t,`unknown keyword: "${i}"`)}N.checkUnknownRules=ki;function Ri(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}N.schemaHasRules=Ri;function Lc(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}N.schemaHasRulesButRef=Lc;function Kc({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,C._)`${r}`}return(0,C._)`${t}${e}${(0,C.getProperty)(s)}`}N.schemaRefOrVal=Kc;function Gc(t){return ji(decodeURIComponent(t))}N.unescapeFragment=Gc;function Hc(t){return encodeURIComponent(Ss(t))}N.escapeFragment=Hc;function Ss(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}N.escapeJsonPointer=Ss;function ji(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}N.unescapeJsonPointer=ji;function Wc(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}N.eachItem=Wc;function Ti({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,i,o,a)=>{let c=o===void 0?i:o instanceof C.Name?(i instanceof C.Name?t(n,i,o):e(n,i,o),o):i instanceof C.Name?(e(n,o,i),i):r(i,o);return a===C.Name&&!(c instanceof C.Name)?s(n,c):c}}N.mergeEvaluated={props:Ti({mergeNames:(t,e,r)=>t.if((0,C._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,C._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,C._)`${r} || {}`).code((0,C._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,C._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,C._)`${r} || {}`),bs(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:qi}),items:Ti({mergeNames:(t,e,r)=>t.if((0,C._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,C._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,C._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,C._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function qi(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,C._)`{}`);return e!==void 0&&bs(t,r,e),r}N.evaluatedPropsToName=qi;function bs(t,e,r){Object.keys(r).forEach(s=>t.assign((0,C._)`${e}${(0,C.getProperty)(s)}`,!0))}N.setEvaluated=bs;var Ii={};function Jc(t,e){return t.scopeValue("func",{ref:e,code:Ii[e.code]||(Ii[e.code]=new Fc._Code(e.code))})}N.useFunc=Jc;var Es;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Es||(N.Type=Es={}));function Yc(t,e,r){if(t instanceof C.Name){let s=e===Es.Num;return r?s?(0,C._)`"[" + ${t} + "]"`:(0,C._)`"['" + ${t} + "']"`:s?(0,C._)`"/" + ${t}`:(0,C._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,C.getProperty)(t).toString():"/"+Ss(t)}N.getErrorPath=Yc;function Ai(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}N.checkStrictMode=Ai});var Ne=g(Ps=>{"use strict";u();Object.defineProperty(Ps,"__esModule",{value:!0});var H=b(),Bc={data:new H.Name("data"),valCxt:new H.Name("valCxt"),instancePath:new H.Name("instancePath"),parentData:new H.Name("parentData"),parentDataProperty:new H.Name("parentDataProperty"),rootData:new H.Name("rootData"),dynamicAnchors:new H.Name("dynamicAnchors"),vErrors:new H.Name("vErrors"),errors:new H.Name("errors"),this:new H.Name("this"),self:new H.Name("self"),scope:new H.Name("scope"),json:new H.Name("json"),jsonPos:new H.Name("jsonPos"),jsonLen:new H.Name("jsonLen"),jsonPart:new H.Name("jsonPart")};Ps.default=Bc});var jt=g(W=>{"use strict";u();Object.defineProperty(W,"__esModule",{value:!0});W.extendErrors=W.resetErrorsCount=W.reportExtraError=W.reportError=W.keyword$DataError=W.keywordError=void 0;var R=b(),pr=k(),Y=Ne();W.keywordError={message:({keyword:t})=>(0,R.str)`must pass "${t}" keyword validation`};W.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,R.str)`"${t}" keyword must be ${e} ($data)`:(0,R.str)`"${t}" keyword is invalid ($data)`};function Xc(t,e=W.keywordError,r,s){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,c=Di(t,e,r);s??(o||a)?Ci(i,c):Mi(n,(0,R._)`[${c}]`)}W.reportError=Xc;function Zc(t,e=W.keywordError,r){let{it:s}=t,{gen:n,compositeRule:i,allErrors:o}=s,a=Di(t,e,r);Ci(n,a),i||o||Mi(s,Y.default.vErrors)}W.reportExtraError=Zc;function Qc(t,e){t.assign(Y.default.errors,e),t.if((0,R._)`${Y.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,R._)`${Y.default.vErrors}.length`,e),()=>t.assign(Y.default.vErrors,null)))}W.resetErrorsCount=Qc;function eu({gen:t,keyword:e,schemaValue:r,data:s,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",n,Y.default.errors,a=>{t.const(o,(0,R._)`${Y.default.vErrors}[${a}]`),t.if((0,R._)`${o}.instancePath === undefined`,()=>t.assign((0,R._)`${o}.instancePath`,(0,R.strConcat)(Y.default.instancePath,i.errorPath))),t.assign((0,R._)`${o}.schemaPath`,(0,R.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,R._)`${o}.schema`,r),t.assign((0,R._)`${o}.data`,s))})}W.extendErrors=eu;function Ci(t,e){let r=t.const("err",e);t.if((0,R._)`${Y.default.vErrors} === null`,()=>t.assign(Y.default.vErrors,(0,R._)`[${r}]`),(0,R._)`${Y.default.vErrors}.push(${r})`),t.code((0,R._)`${Y.default.errors}++`)}function Mi(t,e){let{gen:r,validateName:s,schemaEnv:n}=t;n.$async?r.throw((0,R._)`new ${t.ValidationError}(${e})`):(r.assign((0,R._)`${s}.errors`,e),r.return(!1))}var Ge={keyword:new R.Name("keyword"),schemaPath:new R.Name("schemaPath"),params:new R.Name("params"),propertyName:new R.Name("propertyName"),message:new R.Name("message"),schema:new R.Name("schema"),parentSchema:new R.Name("parentSchema")};function Di(t,e,r){let{createErrors:s}=t.it;return s===!1?(0,R._)`{}`:tu(t,e,r)}function tu(t,e,r={}){let{gen:s,it:n}=t,i=[ru(n,r),su(t,r)];return nu(t,e,i),s.object(...i)}function ru({errorPath:t},{instancePath:e}){let r=e?(0,R.str)`${t}${(0,pr.getErrorPath)(e,pr.Type.Str)}`:t;return[Y.default.instancePath,(0,R.strConcat)(Y.default.instancePath,r)]}function su({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:s}){let n=s?e:(0,R.str)`${e}/${t}`;return r&&(n=(0,R.str)`${n}${(0,pr.getErrorPath)(r,pr.Type.Str)}`),[Ge.schemaPath,n]}function nu(t,{params:e,message:r},s){let{keyword:n,data:i,schemaValue:o,it:a}=t,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:f}=a;s.push([Ge.keyword,n],[Ge.params,typeof e=="function"?e(t):e||(0,R._)`{}`]),c.messages&&s.push([Ge.message,typeof r=="function"?r(t):r]),c.verbose&&s.push([Ge.schema,o],[Ge.parentSchema,(0,R._)`${d}${f}`],[Y.default.data,i]),l&&s.push([Ge.propertyName,l])}});var zi=g(st=>{"use strict";u();Object.defineProperty(st,"__esModule",{value:!0});st.boolOrEmptySchema=st.topBoolOrEmptySchema=void 0;var iu=jt(),ou=b(),au=Ne(),cu={message:"boolean schema is false"};function uu(t){let{gen:e,schema:r,validateName:s}=t;r===!1?xi(t,!1):typeof r=="object"&&r.$async===!0?e.return(au.default.data):(e.assign((0,ou._)`${s}.errors`,null),e.return(!0))}st.topBoolOrEmptySchema=uu;function lu(t,e){let{gen:r,schema:s}=t;s===!1?(r.var(e,!1),xi(t)):r.var(e,!0)}st.boolOrEmptySchema=lu;function xi(t,e){let{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,iu.reportError)(n,cu,void 0,e)}});var Ns=g(nt=>{"use strict";u();Object.defineProperty(nt,"__esModule",{value:!0});nt.getRules=nt.isJSONType=void 0;var du=["string","number","integer","boolean","null","object","array"],fu=new Set(du);function hu(t){return typeof t=="string"&&fu.has(t)}nt.isJSONType=hu;function pu(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}nt.getRules=pu});var Os=g(ke=>{"use strict";u();Object.defineProperty(ke,"__esModule",{value:!0});ke.shouldUseRule=ke.shouldUseGroup=ke.schemaHasRulesForType=void 0;function mu({schema:t,self:e},r){let s=e.RULES.types[r];return s&&s!==!0&&Fi(t,s)}ke.schemaHasRulesForType=mu;function Fi(t,e){return e.rules.some(r=>Vi(t,r))}ke.shouldUseGroup=Fi;function Vi(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}ke.shouldUseRule=Vi});var qt=g(J=>{"use strict";u();Object.defineProperty(J,"__esModule",{value:!0});J.reportTypeError=J.checkDataTypes=J.checkDataType=J.coerceAndCheckDataType=J.getJSONTypes=J.getSchemaTypes=J.DataType=void 0;var yu=Ns(),_u=Os(),gu=jt(),S=b(),Ui=k(),it;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(it||(J.DataType=it={}));function $u(t){let e=Li(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}J.getSchemaTypes=$u;function Li(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(yu.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}J.getJSONTypes=Li;function vu(t,e){let{gen:r,data:s,opts:n}=t,i=wu(e,n.coerceTypes),o=e.length>0&&!(i.length===0&&e.length===1&&(0,_u.schemaHasRulesForType)(t,e[0]));if(o){let a=Is(e,s,n.strictNumbers,it.Wrong);r.if(a,()=>{i.length?Eu(t,e,i):ks(t)})}return o}J.coerceAndCheckDataType=vu;var Ki=new Set(["string","number","integer","boolean","null"]);function wu(t,e){return e?t.filter(r=>Ki.has(r)||e==="array"&&r==="array"):[]}function Eu(t,e,r){let{gen:s,data:n,opts:i}=t,o=s.let("dataType",(0,S._)`typeof ${n}`),a=s.let("coerced",(0,S._)`undefined`);i.coerceTypes==="array"&&s.if((0,S._)`${o} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,S._)`${n}[0]`).assign(o,(0,S._)`typeof ${n}`).if(Is(e,n,i.strictNumbers),()=>s.assign(a,n))),s.if((0,S._)`${a} !== undefined`);for(let l of r)(Ki.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);s.else(),ks(t),s.endIf(),s.if((0,S._)`${a} !== undefined`,()=>{s.assign(n,a),Su(t,a)});function c(l){switch(l){case"string":s.elseIf((0,S._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,S._)`"" + ${n}`).elseIf((0,S._)`${n} === null`).assign(a,(0,S._)`""`);return;case"number":s.elseIf((0,S._)`${o} == "boolean" || ${n} === null
3
- || (${o} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,S._)`+${n}`);return;case"integer":s.elseIf((0,S._)`${o} === "boolean" || ${n} === null
4
- || (${o} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,S._)`+${n}`);return;case"boolean":s.elseIf((0,S._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf((0,S._)`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":s.elseIf((0,S._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(a,null);return;case"array":s.elseIf((0,S._)`${o} === "string" || ${o} === "number"
5
- || ${o} === "boolean" || ${n} === null`).assign(a,(0,S._)`[${n}]`)}}}function Su({gen:t,parentData:e,parentDataProperty:r},s){t.if((0,S._)`${e} !== undefined`,()=>t.assign((0,S._)`${e}[${r}]`,s))}function Ts(t,e,r,s=it.Correct){let n=s===it.Correct?S.operators.EQ:S.operators.NEQ,i;switch(t){case"null":return(0,S._)`${e} ${n} null`;case"array":i=(0,S._)`Array.isArray(${e})`;break;case"object":i=(0,S._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=o((0,S._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=o();break;default:return(0,S._)`typeof ${e} ${n} ${t}`}return s===it.Correct?i:(0,S.not)(i);function o(a=S.nil){return(0,S.and)((0,S._)`typeof ${e} == "number"`,a,r?(0,S._)`isFinite(${e})`:S.nil)}}J.checkDataType=Ts;function Is(t,e,r,s){if(t.length===1)return Ts(t[0],e,r,s);let n,i=(0,Ui.toHash)(t);if(i.array&&i.object){let o=(0,S._)`typeof ${e} != "object"`;n=i.null?o:(0,S._)`!${e} || ${o}`,delete i.null,delete i.array,delete i.object}else n=S.nil;i.number&&delete i.integer;for(let o in i)n=(0,S.and)(n,Ts(o,e,r,s));return n}J.checkDataTypes=Is;var bu={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,S._)`{type: ${t}}`:(0,S._)`{type: ${e}}`};function ks(t){let e=Pu(t);(0,gu.reportError)(e,bu)}J.reportTypeError=ks;function Pu(t){let{gen:e,data:r,schema:s}=t,n=(0,Ui.schemaRefOrVal)(t,s,"type");return{gen:e,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:t}}});var Hi=g(mr=>{"use strict";u();Object.defineProperty(mr,"__esModule",{value:!0});mr.assignDefaults=void 0;var ot=b(),Nu=k();function Ou(t,e){let{properties:r,items:s}=t.schema;if(e==="object"&&r)for(let n in r)Gi(t,n,r[n].default);else e==="array"&&Array.isArray(s)&&s.forEach((n,i)=>Gi(t,i,n.default))}mr.assignDefaults=Ou;function Gi(t,e,r){let{gen:s,compositeRule:n,data:i,opts:o}=t;if(r===void 0)return;let a=(0,ot._)`${i}${(0,ot.getProperty)(e)}`;if(n){(0,Nu.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,ot._)`${a} === undefined`;o.useDefaults==="empty"&&(c=(0,ot._)`${c} || ${a} === null || ${a} === ""`),s.if(c,(0,ot._)`${a} = ${(0,ot.stringify)(r)}`)}});var ne=g(A=>{"use strict";u();Object.defineProperty(A,"__esModule",{value:!0});A.validateUnion=A.validateArray=A.usePattern=A.callValidateCode=A.schemaProperties=A.allSchemaProperties=A.noPropertyInData=A.propertyInData=A.isOwnProperty=A.hasPropFunc=A.reportMissingProp=A.checkMissingProp=A.checkReportMissingProp=void 0;var D=b(),Rs=k(),Re=Ne(),Tu=k();function Iu(t,e){let{gen:r,data:s,it:n}=t;r.if(qs(r,s,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,D._)`${e}`},!0),t.error()})}A.checkReportMissingProp=Iu;function ku({gen:t,data:e,it:{opts:r}},s,n){return(0,D.or)(...s.map(i=>(0,D.and)(qs(t,e,i,r.ownProperties),(0,D._)`${n} = ${i}`)))}A.checkMissingProp=ku;function Ru(t,e){t.setParams({missingProperty:e},!0),t.error()}A.reportMissingProp=Ru;function Wi(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,D._)`Object.prototype.hasOwnProperty`})}A.hasPropFunc=Wi;function js(t,e,r){return(0,D._)`${Wi(t)}.call(${e}, ${r})`}A.isOwnProperty=js;function ju(t,e,r,s){let n=(0,D._)`${e}${(0,D.getProperty)(r)} !== undefined`;return s?(0,D._)`${n} && ${js(t,e,r)}`:n}A.propertyInData=ju;function qs(t,e,r,s){let n=(0,D._)`${e}${(0,D.getProperty)(r)} === undefined`;return s?(0,D.or)(n,(0,D.not)(js(t,e,r))):n}A.noPropertyInData=qs;function Ji(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}A.allSchemaProperties=Ji;function qu(t,e){return Ji(e).filter(r=>!(0,Rs.alwaysValidSchema)(t,e[r]))}A.schemaProperties=qu;function Au({schemaCode:t,data:e,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:i},it:o},a,c,l){let d=l?(0,D._)`${t}, ${e}, ${s}${n}`:e,f=[[Re.default.instancePath,(0,D.strConcat)(Re.default.instancePath,i)],[Re.default.parentData,o.parentData],[Re.default.parentDataProperty,o.parentDataProperty],[Re.default.rootData,Re.default.rootData]];o.opts.dynamicRef&&f.push([Re.default.dynamicAnchors,Re.default.dynamicAnchors]);let p=(0,D._)`${d}, ${r.object(...f)}`;return c!==D.nil?(0,D._)`${a}.call(${c}, ${p})`:(0,D._)`${a}(${p})`}A.callValidateCode=Au;var Cu=(0,D._)`new RegExp`;function Mu({gen:t,it:{opts:e}},r){let s=e.unicodeRegExp?"u":"",{regExp:n}=e.code,i=n(r,s);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,D._)`${n.code==="new RegExp"?Cu:(0,Tu.useFunc)(t,n)}(${r}, ${s})`})}A.usePattern=Mu;function Du(t){let{gen:e,data:r,keyword:s,it:n}=t,i=e.name("valid");if(n.allErrors){let a=e.let("valid",!0);return o(()=>e.assign(a,!1)),a}return e.var(i,!0),o(()=>e.break()),i;function o(a){let c=e.const("len",(0,D._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:s,dataProp:l,dataPropType:Rs.Type.Num},i),e.if((0,D.not)(i),a)})}}A.validateArray=Du;function xu(t){let{gen:e,schema:r,keyword:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Rs.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let o=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let d=t.subschema({keyword:s,schemaProp:l,compositeRule:!0},a);e.assign(o,(0,D._)`${o} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,D.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}A.validateUnion=xu});var Xi=g(ge=>{"use strict";u();Object.defineProperty(ge,"__esModule",{value:!0});ge.validateKeywordUsage=ge.validSchemaType=ge.funcKeywordCode=ge.macroKeywordCode=void 0;var B=b(),He=Ne(),zu=ne(),Fu=jt();function Vu(t,e){let{gen:r,keyword:s,schema:n,parentSchema:i,it:o}=t,a=e.macro.call(o.self,n,i,o),c=Bi(r,s,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:B.nil,errSchemaPath:`${o.errSchemaPath}/${s}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}ge.macroKeywordCode=Vu;function Uu(t,e){var r;let{gen:s,keyword:n,schema:i,parentSchema:o,$data:a,it:c}=t;Ku(c,e);let l=!a&&e.compile?e.compile.call(c.self,i,o,c):e.validate,d=Bi(s,n,l),f=s.let("valid");t.block$data(f,p),t.ok((r=e.valid)!==null&&r!==void 0?r:f);function p(){if(e.errors===!1)m(),e.modifying&&Yi(t),_(()=>t.error());else{let $=e.async?y():h();e.modifying&&Yi(t),_(()=>Lu(t,$))}}function y(){let $=s.let("ruleErrs",null);return s.try(()=>m((0,B._)`await `),I=>s.assign(f,!1).if((0,B._)`${I} instanceof ${c.ValidationError}`,()=>s.assign($,(0,B._)`${I}.errors`),()=>s.throw(I))),$}function h(){let $=(0,B._)`${d}.errors`;return s.assign($,null),m(B.nil),$}function m($=e.async?(0,B._)`await `:B.nil){let I=c.opts.passContext?He.default.this:He.default.self,O=!("compile"in e&&!a||e.schema===!1);s.assign(f,(0,B._)`${$}${(0,zu.callValidateCode)(t,d,I,O)}`,e.modifying)}function _($){var I;s.if((0,B.not)((I=e.valid)!==null&&I!==void 0?I:f),$)}}ge.funcKeywordCode=Uu;function Yi(t){let{gen:e,data:r,it:s}=t;e.if(s.parentData,()=>e.assign(r,(0,B._)`${s.parentData}[${s.parentDataProperty}]`))}function Lu(t,e){let{gen:r}=t;r.if((0,B._)`Array.isArray(${e})`,()=>{r.assign(He.default.vErrors,(0,B._)`${He.default.vErrors} === null ? ${e} : ${He.default.vErrors}.concat(${e})`).assign(He.default.errors,(0,B._)`${He.default.vErrors}.length`),(0,Fu.extendErrors)(t)},()=>t.error())}function Ku({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Bi(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,B.stringify)(r)})}function Gu(t,e,r=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(t):s==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==s||r&&typeof t>"u")}ge.validSchemaType=Gu;function Hu({schema:t,opts:e,self:r,errSchemaPath:s},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let o=n.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[i])){let c=`keyword "${i}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}ge.validateKeywordUsage=Hu});var Qi=g(je=>{"use strict";u();Object.defineProperty(je,"__esModule",{value:!0});je.extendSubschemaMode=je.extendSubschemaData=je.getSubschema=void 0;var $e=b(),Zi=k();function Wu(t,{keyword:e,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:i,topSchemaRef:o}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,$e._)`${t.schemaPath}${(0,$e.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,$e._)`${t.schemaPath}${(0,$e.getProperty)(e)}${(0,$e.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Zi.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||i===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:o,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}je.getSubschema=Wu;function Ju(t,e,{dataProp:r,dataPropType:s,data:n,dataTypes:i,propertyName:o}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:d,opts:f}=e,p=a.let("data",(0,$e._)`${e.data}${(0,$e.getProperty)(r)}`,!0);c(p),t.errorPath=(0,$e.str)`${l}${(0,Zi.getErrorPath)(r,s,f.jsPropertySyntax)}`,t.parentDataProperty=(0,$e._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty]}if(n!==void 0){let l=n instanceof $e.Name?n:a.let("data",n,!0);c(l),o!==void 0&&(t.propertyName=o)}i&&(t.dataTypes=i);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}je.extendSubschemaData=Ju;function Yu(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:i}){s!==void 0&&(t.compositeRule=s),n!==void 0&&(t.createErrors=n),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=r}je.extendSubschemaMode=Yu});var As=g((wy,eo)=>{"use strict";u();eo.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var s,n,i;if(Array.isArray(e)){if(s=e.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),s=i.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=s;n--!==0;){var o=i[n];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}});var ro=g((Sy,to)=>{"use strict";u();var qe=to.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};yr(e,s,n,t,"",t)};qe.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};qe.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};qe.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};qe.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function yr(t,e,r,s,n,i,o,a,c,l){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,i,o,a,c,l);for(var d in s){var f=s[d];if(Array.isArray(f)){if(d in qe.arrayKeywords)for(var p=0;p<f.length;p++)yr(t,e,r,f[p],n+"/"+d+"/"+p,i,n,d,s,p)}else if(d in qe.propsKeywords){if(f&&typeof f=="object")for(var y in f)yr(t,e,r,f[y],n+"/"+d+"/"+Bu(y),i,n,d,s,y)}else(d in qe.keywords||t.allKeys&&!(d in qe.skipKeywords))&&yr(t,e,r,f,n+"/"+d,i,n,d,s)}r(s,n,i,o,a,c,l)}}function Bu(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var At=g(ee=>{"use strict";u();Object.defineProperty(ee,"__esModule",{value:!0});ee.getSchemaRefs=ee.resolveUrl=ee.normalizeId=ee._getFullPath=ee.getFullPath=ee.inlineRef=void 0;var Xu=k(),Zu=As(),Qu=ro(),el=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function tl(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Cs(t):e?so(t)<=e:!1}ee.inlineRef=tl;var rl=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Cs(t){for(let e in t){if(rl.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Cs)||typeof r=="object"&&Cs(r))return!0}return!1}function so(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!el.has(r)&&(typeof t[r]=="object"&&(0,Xu.eachItem)(t[r],s=>e+=so(s)),e===1/0))return 1/0}return e}function no(t,e="",r){r!==!1&&(e=at(e));let s=t.parse(e);return io(t,s)}ee.getFullPath=no;function io(t,e){return t.serialize(e).split("#")[0]+"#"}ee._getFullPath=io;var sl=/#\/?$/;function at(t){return t?t.replace(sl,""):""}ee.normalizeId=at;function nl(t,e,r){return r=at(r),t.resolve(e,r)}ee.resolveUrl=nl;var il=/^[a-z_][-a-z0-9._]*$/i;function ol(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:s}=this.opts,n=at(t[r]||e),i={"":n},o=no(s,n,!1),a={},c=new Set;return Qu(t,{allKeys:!0},(f,p,y,h)=>{if(h===void 0)return;let m=o+p,_=i[h];typeof f[r]=="string"&&(_=$.call(this,f[r])),I.call(this,f.$anchor),I.call(this,f.$dynamicAnchor),i[p]=_;function $(O){let M=this.opts.uriResolver.resolve;if(O=at(_?M(_,O):O),c.has(O))throw d(O);c.add(O);let E=this.refs[O];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?l(f,E.schema,O):O!==at(m)&&(O[0]==="#"?(l(f,a[O],O),a[O]=f):this.refs[O]=m),O}function I(O){if(typeof O=="string"){if(!il.test(O))throw new Error(`invalid anchor "${O}"`);$.call(this,`#${O}`)}}}),a;function l(f,p,y){if(p!==void 0&&!Zu(f,p))throw d(y)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}ee.getSchemaRefs=ol});var Dt=g(Ae=>{"use strict";u();Object.defineProperty(Ae,"__esModule",{value:!0});Ae.getData=Ae.KeywordCxt=Ae.validateFunctionCode=void 0;var lo=zi(),oo=qt(),Ds=Os(),_r=qt(),al=Hi(),Mt=Xi(),Ms=Qi(),v=b(),w=Ne(),cl=At(),Oe=k(),Ct=jt();function ul(t){if(po(t)&&(mo(t),ho(t))){fl(t);return}fo(t,()=>(0,lo.topBoolOrEmptySchema)(t))}Ae.validateFunctionCode=ul;function fo({gen:t,validateName:e,schema:r,schemaEnv:s,opts:n},i){n.code.es5?t.func(e,(0,v._)`${w.default.data}, ${w.default.valCxt}`,s.$async,()=>{t.code((0,v._)`"use strict"; ${ao(r,n)}`),dl(t,n),t.code(i)}):t.func(e,(0,v._)`${w.default.data}, ${ll(n)}`,s.$async,()=>t.code(ao(r,n)).code(i))}function ll(t){return(0,v._)`{${w.default.instancePath}="", ${w.default.parentData}, ${w.default.parentDataProperty}, ${w.default.rootData}=${w.default.data}${t.dynamicRef?(0,v._)`, ${w.default.dynamicAnchors}={}`:v.nil}}={}`}function dl(t,e){t.if(w.default.valCxt,()=>{t.var(w.default.instancePath,(0,v._)`${w.default.valCxt}.${w.default.instancePath}`),t.var(w.default.parentData,(0,v._)`${w.default.valCxt}.${w.default.parentData}`),t.var(w.default.parentDataProperty,(0,v._)`${w.default.valCxt}.${w.default.parentDataProperty}`),t.var(w.default.rootData,(0,v._)`${w.default.valCxt}.${w.default.rootData}`),e.dynamicRef&&t.var(w.default.dynamicAnchors,(0,v._)`${w.default.valCxt}.${w.default.dynamicAnchors}`)},()=>{t.var(w.default.instancePath,(0,v._)`""`),t.var(w.default.parentData,(0,v._)`undefined`),t.var(w.default.parentDataProperty,(0,v._)`undefined`),t.var(w.default.rootData,w.default.data),e.dynamicRef&&t.var(w.default.dynamicAnchors,(0,v._)`{}`)})}function fl(t){let{schema:e,opts:r,gen:s}=t;fo(t,()=>{r.$comment&&e.$comment&&_o(t),_l(t),s.let(w.default.vErrors,null),s.let(w.default.errors,0),r.unevaluated&&hl(t),yo(t),vl(t)})}function hl(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,v._)`${r}.evaluated`),e.if((0,v._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,v._)`${t.evaluated}.props`,(0,v._)`undefined`)),e.if((0,v._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,v._)`${t.evaluated}.items`,(0,v._)`undefined`))}function ao(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,v._)`/*# sourceURL=${r} */`:v.nil}function pl(t,e){if(po(t)&&(mo(t),ho(t))){ml(t,e);return}(0,lo.boolOrEmptySchema)(t,e)}function ho({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function po(t){return typeof t.schema!="boolean"}function ml(t,e){let{schema:r,gen:s,opts:n}=t;n.$comment&&r.$comment&&_o(t),gl(t),$l(t);let i=s.const("_errs",w.default.errors);yo(t,i),s.var(e,(0,v._)`${i} === ${w.default.errors}`)}function mo(t){(0,Oe.checkUnknownRules)(t),yl(t)}function yo(t,e){if(t.opts.jtd)return co(t,[],!1,e);let r=(0,oo.getSchemaTypes)(t.schema),s=(0,oo.coerceAndCheckDataType)(t,r);co(t,r,!s,e)}function yl(t){let{schema:e,errSchemaPath:r,opts:s,self:n}=t;e.$ref&&s.ignoreKeywordsWithRef&&(0,Oe.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function _l(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Oe.checkStrictMode)(t,"default is ignored in the schema root")}function gl(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,cl.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function $l(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function _o({gen:t,schemaEnv:e,schema:r,errSchemaPath:s,opts:n}){let i=r.$comment;if(n.$comment===!0)t.code((0,v._)`${w.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let o=(0,v.str)`${s}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,v._)`${w.default.self}.opts.$comment(${i}, ${o}, ${a}.schema)`)}}function vl(t){let{gen:e,schemaEnv:r,validateName:s,ValidationError:n,opts:i}=t;r.$async?e.if((0,v._)`${w.default.errors} === 0`,()=>e.return(w.default.data),()=>e.throw((0,v._)`new ${n}(${w.default.vErrors})`)):(e.assign((0,v._)`${s}.errors`,w.default.vErrors),i.unevaluated&&wl(t),e.return((0,v._)`${w.default.errors} === 0`))}function wl({gen:t,evaluated:e,props:r,items:s}){r instanceof v.Name&&t.assign((0,v._)`${e}.props`,r),s instanceof v.Name&&t.assign((0,v._)`${e}.items`,s)}function co(t,e,r,s){let{gen:n,schema:i,data:o,allErrors:a,opts:c,self:l}=t,{RULES:d}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Oe.schemaHasRulesButRef)(i,d))){n.block(()=>$o(t,"$ref",d.all.$ref.definition));return}c.jtd||El(t,e),n.block(()=>{for(let p of d.rules)f(p);f(d.post)});function f(p){(0,Ds.shouldUseGroup)(i,p)&&(p.type?(n.if((0,_r.checkDataType)(p.type,o,c.strictNumbers)),uo(t,p),e.length===1&&e[0]===p.type&&r&&(n.else(),(0,_r.reportTypeError)(t)),n.endIf()):uo(t,p),a||n.if((0,v._)`${w.default.errors} === ${s||0}`))}}function uo(t,e){let{gen:r,schema:s,opts:{useDefaults:n}}=t;n&&(0,al.assignDefaults)(t,e.type),r.block(()=>{for(let i of e.rules)(0,Ds.shouldUseRule)(s,i)&&$o(t,i.keyword,i.definition,e.type)})}function El(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Sl(t,e),t.opts.allowUnionTypes||bl(t,e),Pl(t,t.dataTypes))}function Sl(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{go(t.dataTypes,r)||xs(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Ol(t,e)}}function bl(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&xs(t,"use allowUnionTypes to allow union type keyword")}function Pl(t,e){let r=t.self.RULES.all;for(let s in r){let n=r[s];if(typeof n=="object"&&(0,Ds.shouldUseRule)(t.schema,n)){let{type:i}=n.definition;i.length&&!i.some(o=>Nl(e,o))&&xs(t,`missing type "${i.join(",")}" for keyword "${s}"`)}}}function Nl(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function go(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Ol(t,e){let r=[];for(let s of t.dataTypes)go(e,s)?r.push(s):e.includes("integer")&&s==="number"&&r.push("integer");t.dataTypes=r}function xs(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Oe.checkStrictMode)(t,e,t.opts.strictTypes)}var gr=class{constructor(e,r,s){if((0,Mt.validateKeywordUsage)(e,r,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Oe.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",vo(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Mt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",w.default.errors))}result(e,r,s){this.failResult((0,v.not)(e),r,s)}failResult(e,r,s){this.gen.if(e),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,v.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,v._)`${r} !== undefined && (${(0,v.or)(this.invalid$data(),e)})`)}error(e,r,s){if(r){this.setParams(r),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,r){(e?Ct.reportExtraError:Ct.reportError)(this,this.def.error,r)}$dataError(){(0,Ct.reportError)(this,this.def.$dataError||Ct.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ct.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,s=v.nil){this.gen.block(()=>{this.check$data(e,s),r()})}check$data(e=v.nil,r=v.nil){if(!this.$data)return;let{gen:s,schemaCode:n,schemaType:i,def:o}=this;s.if((0,v.or)((0,v._)`${n} === undefined`,r)),e!==v.nil&&s.assign(e,!0),(i.length||o.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==v.nil&&s.assign(e,!1)),s.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:s,def:n,it:i}=this;return(0,v.or)(o(),a());function o(){if(s.length){if(!(r instanceof v.Name))throw new Error("ajv implementation error");let c=Array.isArray(s)?s:[s];return(0,v._)`${(0,_r.checkDataTypes)(c,r,i.opts.strictNumbers,_r.DataType.Wrong)}`}return v.nil}function a(){if(n.validateSchema){let c=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,v._)`!${c}(${r})`}return v.nil}}subschema(e,r){let s=(0,Ms.getSubschema)(this.it,e);(0,Ms.extendSubschemaData)(s,this.it,e),(0,Ms.extendSubschemaMode)(s,e);let n={...this.it,...s,items:void 0,props:void 0};return pl(n,r),n}mergeEvaluated(e,r){let{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=Oe.mergeEvaluated.props(n,e.props,s.props,r)),s.items!==!0&&e.items!==void 0&&(s.items=Oe.mergeEvaluated.items(n,e.items,s.items,r)))}mergeValidEvaluated(e,r){let{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,v.Name)),!0}};Ae.KeywordCxt=gr;function $o(t,e,r,s){let n=new gr(t,r,e);"code"in r?r.code(n,s):n.$data&&r.validate?(0,Mt.funcKeywordCode)(n,r):"macro"in r?(0,Mt.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Mt.funcKeywordCode)(n,r)}var Tl=/^\/(?:[^~]|~0|~1)*$/,Il=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function vo(t,{dataLevel:e,dataNames:r,dataPathArr:s}){let n,i;if(t==="")return w.default.rootData;if(t[0]==="/"){if(!Tl.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,i=w.default.rootData}else{let l=Il.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+l[1];if(n=l[2],n==="#"){if(d>=e)throw new Error(c("property/index",d));return s[e-d]}if(d>e)throw new Error(c("data",d));if(i=r[e-d],!n)return i}let o=i,a=n.split("/");for(let l of a)l&&(i=(0,v._)`${i}${(0,v.getProperty)((0,Oe.unescapeJsonPointer)(l))}`,o=(0,v._)`${o} && ${i}`);return o;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${e}`}}Ae.getData=vo});var $r=g(Fs=>{"use strict";u();Object.defineProperty(Fs,"__esModule",{value:!0});var zs=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Fs.default=zs});var xt=g(Ls=>{"use strict";u();Object.defineProperty(Ls,"__esModule",{value:!0});var Vs=At(),Us=class extends Error{constructor(e,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,Vs.resolveUrl)(e,r,s),this.missingSchema=(0,Vs.normalizeId)((0,Vs.getFullPath)(e,this.missingRef))}};Ls.default=Us});var wr=g(ie=>{"use strict";u();Object.defineProperty(ie,"__esModule",{value:!0});ie.resolveSchema=ie.getCompilingSchema=ie.resolveRef=ie.compileSchema=ie.SchemaEnv=void 0;var le=b(),kl=$r(),We=Ne(),de=At(),wo=k(),Rl=Dt(),ct=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,de.normalizeId)(s?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s?.$async,this.refs={}}};ie.SchemaEnv=ct;function Gs(t){let e=Eo.call(this,t);if(e)return e;let r=(0,de.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:i}=this.opts,o=new le.CodeGen(this.scope,{es5:s,lines:n,ownProperties:i}),a;t.$async&&(a=o.scopeValue("Error",{ref:kl.default,code:(0,le._)`require("ajv/dist/runtime/validation_error").default`}));let c=o.scopeName("validate");t.validateName=c;let l={gen:o,allErrors:this.opts.allErrors,data:We.default.data,parentData:We.default.parentData,parentDataProperty:We.default.parentDataProperty,dataNames:[We.default.data],dataPathArr:[le.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,le.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:le.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,le._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,Rl.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);let f=o.toString();d=`${o.scopeRefs(We.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let y=new Function(`${We.default.self}`,`${We.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:y}),y.errors=null,y.schema=t.schema,y.schemaEnv=t,t.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:c,validateCode:f,scopeValues:o._values}),this.opts.unevaluated){let{props:h,items:m}=l;y.evaluated={props:h instanceof le.Name?void 0:h,items:m instanceof le.Name?void 0:m,dynamicProps:h instanceof le.Name,dynamicItems:m instanceof le.Name},y.source&&(y.source.evaluated=(0,le.stringify)(y.evaluated))}return t.validate=y,t}catch(f){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(t)}}ie.compileSchema=Gs;function jl(t,e,r){var s;r=(0,de.resolveUrl)(this.opts.uriResolver,e,r);let n=t.refs[r];if(n)return n;let i=Cl.call(this,t,r);if(i===void 0){let o=(s=t.localRefs)===null||s===void 0?void 0:s[r],{schemaId:a}=this.opts;o&&(i=new ct({schema:o,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[r]=ql.call(this,i)}ie.resolveRef=jl;function ql(t){return(0,de.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Gs.call(this,t)}function Eo(t){for(let e of this._compilations)if(Al(e,t))return e}ie.getCompilingSchema=Eo;function Al(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Cl(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||vr.call(this,t,e)}function vr(t,e){let r=this.opts.uriResolver.parse(e),s=(0,de._getFullPath)(this.opts.uriResolver,r),n=(0,de.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&s===n)return Ks.call(this,r,t);let i=(0,de.normalizeId)(s),o=this.refs[i]||this.schemas[i];if(typeof o=="string"){let a=vr.call(this,t,o);return typeof a?.schema!="object"?void 0:Ks.call(this,r,a)}if(typeof o?.schema=="object"){if(o.validate||Gs.call(this,o),i===(0,de.normalizeId)(e)){let{schema:a}=o,{schemaId:c}=this.opts,l=a[c];return l&&(n=(0,de.resolveUrl)(this.opts.uriResolver,n,l)),new ct({schema:a,schemaId:c,root:t,baseId:n})}return Ks.call(this,r,o)}}ie.resolveSchema=vr;var Ml=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ks(t,{baseId:e,schema:r,root:s}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,wo.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!Ml.has(a)&&l&&(e=(0,de.resolveUrl)(this.opts.uriResolver,e,l))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,wo.schemaHasRulesButRef)(r,this.RULES)){let a=(0,de.resolveUrl)(this.opts.uriResolver,e,r.$ref);i=vr.call(this,s,a)}let{schemaId:o}=this.opts;if(i=i||new ct({schema:r,schemaId:o,root:s,baseId:e}),i.schema!==i.root.schema)return i}});var So=g((Cy,Dl)=>{Dl.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Ws=g((My,Oo)=>{"use strict";u();var xl=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Po=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function Hs(t){let e="",r=0,s=0;for(s=0;s<t.length;s++)if(r=t[s].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[s];break}for(s+=1;s<t.length;s++){if(r=t[s].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[s]}return e}var zl=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function bo(t){return t.length=0,!0}function Fl(t,e,r){if(t.length){let s=Hs(t);if(s!=="")e.push(s);else return r.error=!0,!1;t.length=0}return!0}function Vl(t){let e=0,r={error:!1,address:"",zone:""},s=[],n=[],i=!1,o=!1,a=Fl;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(o=!0),!a(n,s,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(i=!0),s.push(":");continue}else if(l==="%"){if(!a(n,s,r))break;a=bo}else{n.push(l);continue}}return n.length&&(a===bo?r.zone=n.join(""):o?s.push(n.join("")):s.push(Hs(n))),r.address=s.join(""),r}function No(t){if(Ul(t,":")<2)return{host:t,isIPV6:!1};let e=Vl(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,s=e.address;return e.zone&&(r+="%"+e.zone,s+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:s}}}function Ul(t,e){let r=0;for(let s=0;s<t.length;s++)t[s]===e&&r++;return r}function Ll(t){let e=t,r=[],s=-1,n=0;for(;n=e.length;){if(n===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(n===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(n===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((s=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,s)),e=e.slice(s)}return r.join("")}function Kl(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function Gl(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Po(r)){let s=No(r);s.isIPV6===!0?r=`[${s.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Oo.exports={nonSimpleDomain:zl,recomposeAuthority:Gl,normalizeComponentEncoding:Kl,removeDotSegments:Ll,isIPv4:Po,isUUID:xl,normalizeIPv6:No,stringArrayToHexStripped:Hs}});var jo=g((xy,Ro)=>{"use strict";u();var{isUUID:Hl}=Ws(),Wl=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Jl=["http","https","ws","wss","urn","urn:uuid"];function Yl(t){return Jl.indexOf(t)!==-1}function Js(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function To(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Io(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function Bl(t){return t.secure=Js(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function Xl(t){if((t.port===(Js(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function Zl(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Wl);if(r){let s=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let n=`${s}:${e.nid||t.nid}`,i=Ys(n);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Ql(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",s=t.nid.toLowerCase(),n=`${r}:${e.nid||s}`,i=Ys(n);i&&(t=i.serialize(t,e));let o=t,a=t.nss;return o.path=`${s||e.nid}:${a}`,e.skipEscape=!0,o}function ed(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Hl(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function td(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var ko={scheme:"http",domainHost:!0,parse:To,serialize:Io},rd={scheme:"https",domainHost:ko.domainHost,parse:To,serialize:Io},Er={scheme:"ws",domainHost:!0,parse:Bl,serialize:Xl},sd={scheme:"wss",domainHost:Er.domainHost,parse:Er.parse,serialize:Er.serialize},nd={scheme:"urn",parse:Zl,serialize:Ql,skipNormalize:!0},id={scheme:"urn:uuid",parse:ed,serialize:td,skipNormalize:!0},Sr={http:ko,https:rd,ws:Er,wss:sd,urn:nd,"urn:uuid":id};Object.setPrototypeOf(Sr,null);function Ys(t){return t&&(Sr[t]||Sr[t.toLowerCase()])||void 0}Ro.exports={wsIsSecure:Js,SCHEMES:Sr,isValidSchemeName:Yl,getSchemeHandler:Ys}});var Co=g((Fy,Pr)=>{"use strict";u();var{normalizeIPv6:od,removeDotSegments:zt,recomposeAuthority:ad,normalizeComponentEncoding:br,isIPv4:cd,nonSimpleDomain:ud}=Ws(),{SCHEMES:ld,getSchemeHandler:qo}=jo();function dd(t,e){return typeof t=="string"?t=ve(Te(t,e),e):typeof t=="object"&&(t=Te(ve(t,e),e)),t}function fd(t,e,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=Ao(Te(t,s),Te(e,s),s,!0);return s.skipEscape=!0,ve(n,s)}function Ao(t,e,r,s){let n={};return s||(t=Te(ve(t,r),r),e=Te(ve(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(n.scheme=e.scheme,n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=zt(e.path||""),n.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=zt(e.path||""),n.query=e.query):(e.path?(e.path[0]==="/"?n.path=zt(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?n.path="/"+e.path:t.path?n.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:n.path=e.path,n.path=zt(n.path)),n.query=e.query):(n.path=t.path,e.query!==void 0?n.query=e.query:n.query=t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=e.fragment,n}function hd(t,e,r){return typeof t=="string"?(t=unescape(t),t=ve(br(Te(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=ve(br(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=ve(br(Te(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=ve(br(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function ve(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},s=Object.assign({},e),n=[],i=qo(s.scheme||r.scheme);i&&i.serialize&&i.serialize(r,s),r.path!==void 0&&(s.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),s.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");let o=ad(r);if(o!==void 0&&(s.reference!=="suffix"&&n.push("//"),n.push(o),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let a=r.path;!s.absolutePath&&(!i||!i.absolutePath)&&(a=zt(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),n.push(a)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}var pd=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Te(t,e){let r=Object.assign({},e),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let i=t.match(pd);if(i){if(s.scheme=i[1],s.userinfo=i[3],s.host=i[4],s.port=parseInt(i[5],10),s.path=i[6]||"",s.query=i[7],s.fragment=i[8],isNaN(s.port)&&(s.port=i[5]),s.host)if(cd(s.host)===!1){let c=od(s.host);s.host=c.host.toLowerCase(),n=c.isIPV6}else n=!0;s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&s.query===void 0&&!s.path?s.reference="same-document":s.scheme===void 0?s.reference="relative":s.fragment===void 0?s.reference="absolute":s.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");let o=qo(r.scheme||s.scheme);if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&s.host&&(r.domainHost||o&&o.domainHost)&&n===!1&&ud(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(a){s.error=s.error||"Host's domain name can not be converted to ASCII: "+a}(!o||o&&!o.skipNormalize)&&(t.indexOf("%")!==-1&&(s.scheme!==void 0&&(s.scheme=unescape(s.scheme)),s.host!==void 0&&(s.host=unescape(s.host))),s.path&&(s.path=escape(unescape(s.path))),s.fragment&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),o&&o.parse&&o.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return s}var Bs={SCHEMES:ld,normalize:dd,resolve:fd,resolveComponent:Ao,equal:hd,serialize:ve,parse:Te};Pr.exports=Bs;Pr.exports.default=Bs;Pr.exports.fastUri=Bs});var Do=g(Xs=>{"use strict";u();Object.defineProperty(Xs,"__esModule",{value:!0});var Mo=Co();Mo.code='require("ajv/dist/runtime/uri").default';Xs.default=Mo});var Go=g(L=>{"use strict";u();Object.defineProperty(L,"__esModule",{value:!0});L.CodeGen=L.Name=L.nil=L.stringify=L.str=L._=L.KeywordCxt=void 0;var md=Dt();Object.defineProperty(L,"KeywordCxt",{enumerable:!0,get:function(){return md.KeywordCxt}});var ut=b();Object.defineProperty(L,"_",{enumerable:!0,get:function(){return ut._}});Object.defineProperty(L,"str",{enumerable:!0,get:function(){return ut.str}});Object.defineProperty(L,"stringify",{enumerable:!0,get:function(){return ut.stringify}});Object.defineProperty(L,"nil",{enumerable:!0,get:function(){return ut.nil}});Object.defineProperty(L,"Name",{enumerable:!0,get:function(){return ut.Name}});Object.defineProperty(L,"CodeGen",{enumerable:!0,get:function(){return ut.CodeGen}});var yd=$r(),Uo=xt(),_d=Ns(),Ft=wr(),gd=b(),Vt=At(),Nr=qt(),Qs=k(),xo=So(),$d=Do(),Lo=(t,e)=>new RegExp(t,e);Lo.code="new RegExp";var vd=["removeAdditional","useDefaults","coerceTypes"],wd=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Ed={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Sd={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},zo=200;function bd(t){var e,r,s,n,i,o,a,c,l,d,f,p,y,h,m,_,$,I,O,M,E,pe,Se,Kr,Gr;let vt=t.strict,Hr=(e=t.code)===null||e===void 0?void 0:e.optimize,Qn=Hr===!0||Hr===void 0?1:Hr||0,ei=(s=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:Lo,pc=(n=t.uriResolver)!==null&&n!==void 0?n:$d.default;return{strictSchema:(o=(i=t.strictSchema)!==null&&i!==void 0?i:vt)!==null&&o!==void 0?o:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:vt)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=t.strictTypes)!==null&&l!==void 0?l:vt)!==null&&d!==void 0?d:"log",strictTuples:(p=(f=t.strictTuples)!==null&&f!==void 0?f:vt)!==null&&p!==void 0?p:"log",strictRequired:(h=(y=t.strictRequired)!==null&&y!==void 0?y:vt)!==null&&h!==void 0?h:!1,code:t.code?{...t.code,optimize:Qn,regExp:ei}:{optimize:Qn,regExp:ei},loopRequired:(m=t.loopRequired)!==null&&m!==void 0?m:zo,loopEnum:(_=t.loopEnum)!==null&&_!==void 0?_:zo,meta:($=t.meta)!==null&&$!==void 0?$:!0,messages:(I=t.messages)!==null&&I!==void 0?I:!0,inlineRefs:(O=t.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(M=t.schemaId)!==null&&M!==void 0?M:"$id",addUsedSchema:(E=t.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(pe=t.validateSchema)!==null&&pe!==void 0?pe:!0,validateFormats:(Se=t.validateFormats)!==null&&Se!==void 0?Se:!0,unicodeRegExp:(Kr=t.unicodeRegExp)!==null&&Kr!==void 0?Kr:!0,int32range:(Gr=t.int32range)!==null&&Gr!==void 0?Gr:!0,uriResolver:pc}}var Ut=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...bd(e)};let{es5:r,lines:s}=this.opts.code;this.scope=new gd.ValueScope({scope:{},prefixes:wd,es5:r,lines:s}),this.logger=kd(e.logger);let n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,_d.getRules)(),Fo.call(this,Ed,e,"NOT SUPPORTED"),Fo.call(this,Sd,e,"DEPRECATED","warn"),this._metaOpts=Td.call(this),e.formats&&Nd.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Od.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Pd.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:s}=this.opts,n=xo;s==="id"&&(n={...xo},n.id=n.$id,delete n.$id),r&&e&&this.addMetaSchema(n,n[s],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let s;if(typeof e=="string"){if(s=this.getSchema(e),!s)throw new Error(`no schema with key or ref "${e}"`)}else s=this.compile(e);let n=s(r);return"$async"in s||(this.errors=s.errors),n}compile(e,r){let s=this._addSchema(e,r);return s.validate||this._compileSchemaEnv(s)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:s}=this.opts;return n.call(this,e,r);async function n(d,f){await i.call(this,d.$schema);let p=this._addSchema(d,f);return p.validate||o.call(this,p)}async function i(d){d&&!this.getSchema(d)&&await n.call(this,{$ref:d},!0)}async function o(d){try{return this._compileSchemaEnv(d)}catch(f){if(!(f instanceof Uo.default))throw f;return a.call(this,f),await c.call(this,f.missingSchema),o.call(this,d)}}function a({missingSchema:d,missingRef:f}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${f} cannot be resolved`)}async function c(d){let f=await l.call(this,d);this.refs[d]||await i.call(this,f.$schema),this.refs[d]||this.addSchema(f,d,r)}async function l(d){let f=this._loading[d];if(f)return f;try{return await(this._loading[d]=s(d))}finally{delete this._loading[d]}}}addSchema(e,r,s,n=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,s,n);return this}let i;if(typeof e=="object"){let{schemaId:o}=this.opts;if(i=e[o],i!==void 0&&typeof i!="string")throw new Error(`schema ${o} must be string`)}return r=(0,Vt.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(e,s,r,n,!0),this}addMetaSchema(e,r,s=this.opts.validateSchema){return this.addSchema(e,r,!0,s),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let s;if(s=e.$schema,s!==void 0&&typeof s!="string")throw new Error("$schema must be a string");if(s=s||this.opts.defaultMeta||this.defaultMeta(),!s)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(s,e);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(e){let r;for(;typeof(r=Vo.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:s}=this.opts,n=new Ft.SchemaEnv({schema:{},schemaId:s});if(r=Ft.resolveSchema.call(this,n,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Vo.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let s=e[this.opts.schemaId];return s&&(s=(0,Vt.normalizeId)(s),delete this.schemas[s],delete this.refs[s]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let s;if(typeof e=="string")s=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=s);else if(typeof e=="object"&&r===void 0){if(r=e,s=r.keyword,Array.isArray(s)&&!s.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(jd.call(this,s,r),!r)return(0,Qs.eachItem)(s,i=>Zs.call(this,i)),this;Ad.call(this,r);let n={...r,type:(0,Nr.getJSONTypes)(r.type),schemaType:(0,Nr.getJSONTypes)(r.schemaType)};return(0,Qs.eachItem)(s,n.type.length===0?i=>Zs.call(this,i,n):i=>n.type.forEach(o=>Zs.call(this,i,n,o))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let s of r.rules){let n=s.rules.findIndex(i=>i.keyword===e);n>=0&&s.rules.splice(n,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:s="data"}={}){return!e||e.length===0?"No errors":e.map(n=>`${s}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(e,r){let s=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of r){let i=n.split("/").slice(1),o=e;for(let a of i)o=o[a];for(let a in s){let c=s[a];if(typeof c!="object")continue;let{$data:l}=c.definition,d=o[a];l&&d&&(o[a]=Ko(d))}}return e}_removeAllSchemas(e,r){for(let s in e){let n=e[s];(!r||r.test(s))&&(typeof n=="string"?delete e[s]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[s]))}}_addSchema(e,r,s,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof e=="object")o=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;s=(0,Vt.normalizeId)(o||s);let l=Vt.getSchemaRefs.call(this,e,s);return c=new Ft.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:s,localRefs:l}),this._cache.set(c.schema,c),i&&!s.startsWith("#")&&(s&&this._checkUnique(s),this.refs[s]=c),n&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Ft.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Ft.compileSchema.call(this,e)}finally{this.opts=r}}};Ut.ValidationError=yd.default;Ut.MissingRefError=Uo.default;L.default=Ut;function Fo(t,e,r,s="error"){for(let n in t){let i=n;i in e&&this.logger[s](`${r}: option ${n}. ${t[i]}`)}}function Vo(t){return t=(0,Vt.normalizeId)(t),this.schemas[t]||this.refs[t]}function Pd(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Nd(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Od(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Td(){let t={...this.opts};for(let e of vd)delete t[e];return t}var Id={log(){},warn(){},error(){}};function kd(t){if(t===!1)return Id;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Rd=/^[a-z_$][a-z0-9_$:-]*$/i;function jd(t,e){let{RULES:r}=this;if((0,Qs.eachItem)(t,s=>{if(r.keywords[s])throw new Error(`Keyword ${s} is already defined`);if(!Rd.test(s))throw new Error(`Keyword ${s} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Zs(t,e,r){var s;let n=e?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,o=n?i.post:i.rules.find(({type:c})=>c===r);if(o||(o={type:r,rules:[]},i.rules.push(o)),i.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Nr.getJSONTypes)(e.type),schemaType:(0,Nr.getJSONTypes)(e.schemaType)}};e.before?qd.call(this,o,a,e.before):o.rules.push(a),i.all[t]=a,(s=e.implements)===null||s===void 0||s.forEach(c=>this.addKeyword(c))}function qd(t,e,r){let s=t.rules.findIndex(n=>n.keyword===r);s>=0?t.rules.splice(s,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Ad(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Ko(e)),t.validateSchema=this.compile(e,!0))}var Cd={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ko(t){return{anyOf:[t,Cd]}}});var Ho=g(en=>{"use strict";u();Object.defineProperty(en,"__esModule",{value:!0});var Md={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};en.default=Md});var Bo=g(Je=>{"use strict";u();Object.defineProperty(Je,"__esModule",{value:!0});Je.callRef=Je.getValidate=void 0;var Dd=xt(),Wo=ne(),te=b(),lt=Ne(),Jo=wr(),Or=k(),xd={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:s}=t,{baseId:n,schemaEnv:i,validateName:o,opts:a,self:c}=s,{root:l}=i;if((r==="#"||r==="#/")&&n===l.baseId)return f();let d=Jo.resolveRef.call(c,l,n,r);if(d===void 0)throw new Dd.default(s.opts.uriResolver,n,r);if(d instanceof Jo.SchemaEnv)return p(d);return y(d);function f(){if(i===l)return Tr(t,o,i,i.$async);let h=e.scopeValue("root",{ref:l});return Tr(t,(0,te._)`${h}.validate`,l,l.$async)}function p(h){let m=Yo(t,h);Tr(t,m,h,h.$async)}function y(h){let m=e.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,te.stringify)(h)}:{ref:h}),_=e.name("valid"),$=t.subschema({schema:h,dataTypes:[],schemaPath:te.nil,topSchemaRef:m,errSchemaPath:r},_);t.mergeEvaluated($),t.ok(_)}}};function Yo(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,te._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Je.getValidate=Yo;function Tr(t,e,r,s){let{gen:n,it:i}=t,{allErrors:o,schemaEnv:a,opts:c}=i,l=c.passContext?lt.default.this:te.nil;s?d():f();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let h=n.let("valid");n.try(()=>{n.code((0,te._)`await ${(0,Wo.callValidateCode)(t,e,l)}`),y(e),o||n.assign(h,!0)},m=>{n.if((0,te._)`!(${m} instanceof ${i.ValidationError})`,()=>n.throw(m)),p(m),o||n.assign(h,!1)}),t.ok(h)}function f(){t.result((0,Wo.callValidateCode)(t,e,l),()=>y(e),()=>p(e))}function p(h){let m=(0,te._)`${h}.errors`;n.assign(lt.default.vErrors,(0,te._)`${lt.default.vErrors} === null ? ${m} : ${lt.default.vErrors}.concat(${m})`),n.assign(lt.default.errors,(0,te._)`${lt.default.vErrors}.length`)}function y(h){var m;if(!i.opts.unevaluated)return;let _=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=Or.mergeEvaluated.props(n,_.props,i.props));else{let $=n.var("props",(0,te._)`${h}.evaluated.props`);i.props=Or.mergeEvaluated.props(n,$,i.props,te.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=Or.mergeEvaluated.items(n,_.items,i.items));else{let $=n.var("items",(0,te._)`${h}.evaluated.items`);i.items=Or.mergeEvaluated.items(n,$,i.items,te.Name)}}}Je.callRef=Tr;Je.default=xd});var Xo=g(tn=>{"use strict";u();Object.defineProperty(tn,"__esModule",{value:!0});var zd=Ho(),Fd=Bo(),Vd=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",zd.default,Fd.default];tn.default=Vd});var Zo=g(rn=>{"use strict";u();Object.defineProperty(rn,"__esModule",{value:!0});var Ir=b(),Ce=Ir.operators,kr={maximum:{okStr:"<=",ok:Ce.LTE,fail:Ce.GT},minimum:{okStr:">=",ok:Ce.GTE,fail:Ce.LT},exclusiveMaximum:{okStr:"<",ok:Ce.LT,fail:Ce.GTE},exclusiveMinimum:{okStr:">",ok:Ce.GT,fail:Ce.LTE}},Ud={message:({keyword:t,schemaCode:e})=>(0,Ir.str)`must be ${kr[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ir._)`{comparison: ${kr[t].okStr}, limit: ${e}}`},Ld={keyword:Object.keys(kr),type:"number",schemaType:"number",$data:!0,error:Ud,code(t){let{keyword:e,data:r,schemaCode:s}=t;t.fail$data((0,Ir._)`${r} ${kr[e].fail} ${s} || isNaN(${r})`)}};rn.default=Ld});var Qo=g(sn=>{"use strict";u();Object.defineProperty(sn,"__esModule",{value:!0});var Lt=b(),Kd={message:({schemaCode:t})=>(0,Lt.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Lt._)`{multipleOf: ${t}}`},Gd={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Kd,code(t){let{gen:e,data:r,schemaCode:s,it:n}=t,i=n.opts.multipleOfPrecision,o=e.let("res"),a=i?(0,Lt._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:(0,Lt._)`${o} !== parseInt(${o})`;t.fail$data((0,Lt._)`(${s} === 0 || (${o} = ${r}/${s}, ${a}))`)}};sn.default=Gd});var ta=g(nn=>{"use strict";u();Object.defineProperty(nn,"__esModule",{value:!0});function ea(t){let e=t.length,r=0,s=0,n;for(;s<e;)r++,n=t.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=t.charCodeAt(s),(n&64512)===56320&&s++);return r}nn.default=ea;ea.code='require("ajv/dist/runtime/ucs2length").default'});var ra=g(on=>{"use strict";u();Object.defineProperty(on,"__esModule",{value:!0});var Ye=b(),Hd=k(),Wd=ta(),Jd={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Ye.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Ye._)`{limit: ${t}}`},Yd={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Jd,code(t){let{keyword:e,data:r,schemaCode:s,it:n}=t,i=e==="maxLength"?Ye.operators.GT:Ye.operators.LT,o=n.opts.unicode===!1?(0,Ye._)`${r}.length`:(0,Ye._)`${(0,Hd.useFunc)(t.gen,Wd.default)}(${r})`;t.fail$data((0,Ye._)`${o} ${i} ${s}`)}};on.default=Yd});var sa=g(an=>{"use strict";u();Object.defineProperty(an,"__esModule",{value:!0});var Bd=ne(),Xd=k(),dt=b(),Zd={message:({schemaCode:t})=>(0,dt.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,dt._)`{pattern: ${t}}`},Qd={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Zd,code(t){let{gen:e,data:r,$data:s,schema:n,schemaCode:i,it:o}=t,a=o.opts.unicodeRegExp?"u":"";if(s){let{regExp:c}=o.opts.code,l=c.code==="new RegExp"?(0,dt._)`new RegExp`:(0,Xd.useFunc)(e,c),d=e.let("valid");e.try(()=>e.assign(d,(0,dt._)`${l}(${i}, ${a}).test(${r})`),()=>e.assign(d,!1)),t.fail$data((0,dt._)`!${d}`)}else{let c=(0,Bd.usePattern)(t,n);t.fail$data((0,dt._)`!${c}.test(${r})`)}}};an.default=Qd});var na=g(cn=>{"use strict";u();Object.defineProperty(cn,"__esModule",{value:!0});var Kt=b(),ef={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Kt.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Kt._)`{limit: ${t}}`},tf={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ef,code(t){let{keyword:e,data:r,schemaCode:s}=t,n=e==="maxProperties"?Kt.operators.GT:Kt.operators.LT;t.fail$data((0,Kt._)`Object.keys(${r}).length ${n} ${s}`)}};cn.default=tf});var ia=g(un=>{"use strict";u();Object.defineProperty(un,"__esModule",{value:!0});var Gt=ne(),Ht=b(),rf=k(),sf={message:({params:{missingProperty:t}})=>(0,Ht.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Ht._)`{missingProperty: ${t}}`},nf={keyword:"required",type:"object",schemaType:"array",$data:!0,error:sf,code(t){let{gen:e,schema:r,schemaCode:s,data:n,$data:i,it:o}=t,{opts:a}=o;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(o.allErrors?l():d(),a.strictRequired){let y=t.parentSchema.properties,{definedProperties:h}=t.it;for(let m of r)if(y?.[m]===void 0&&!h.has(m)){let _=o.schemaEnv.baseId+o.errSchemaPath,$=`required property "${m}" is not defined at "${_}" (strictRequired)`;(0,rf.checkStrictMode)(o,$,o.opts.strictRequired)}}function l(){if(c||i)t.block$data(Ht.nil,f);else for(let y of r)(0,Gt.checkReportMissingProp)(t,y)}function d(){let y=e.let("missing");if(c||i){let h=e.let("valid",!0);t.block$data(h,()=>p(y,h)),t.ok(h)}else e.if((0,Gt.checkMissingProp)(t,r,y)),(0,Gt.reportMissingProp)(t,y),e.else()}function f(){e.forOf("prop",s,y=>{t.setParams({missingProperty:y}),e.if((0,Gt.noPropertyInData)(e,n,y,a.ownProperties),()=>t.error())})}function p(y,h){t.setParams({missingProperty:y}),e.forOf(y,s,()=>{e.assign(h,(0,Gt.propertyInData)(e,n,y,a.ownProperties)),e.if((0,Ht.not)(h),()=>{t.error(),e.break()})},Ht.nil)}}};un.default=nf});var oa=g(ln=>{"use strict";u();Object.defineProperty(ln,"__esModule",{value:!0});var Wt=b(),of={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Wt.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Wt._)`{limit: ${t}}`},af={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:of,code(t){let{keyword:e,data:r,schemaCode:s}=t,n=e==="maxItems"?Wt.operators.GT:Wt.operators.LT;t.fail$data((0,Wt._)`${r}.length ${n} ${s}`)}};ln.default=af});var Rr=g(dn=>{"use strict";u();Object.defineProperty(dn,"__esModule",{value:!0});var aa=As();aa.code='require("ajv/dist/runtime/equal").default';dn.default=aa});var ca=g(hn=>{"use strict";u();Object.defineProperty(hn,"__esModule",{value:!0});var fn=qt(),K=b(),cf=k(),uf=Rr(),lf={message:({params:{i:t,j:e}})=>(0,K.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,K._)`{i: ${t}, j: ${e}}`},df={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:lf,code(t){let{gen:e,data:r,$data:s,schema:n,parentSchema:i,schemaCode:o,it:a}=t;if(!s&&!n)return;let c=e.let("valid"),l=i.items?(0,fn.getSchemaTypes)(i.items):[];t.block$data(c,d,(0,K._)`${o} === false`),t.ok(c);function d(){let h=e.let("i",(0,K._)`${r}.length`),m=e.let("j");t.setParams({i:h,j:m}),e.assign(c,!0),e.if((0,K._)`${h} > 1`,()=>(f()?p:y)(h,m))}function f(){return l.length>0&&!l.some(h=>h==="object"||h==="array")}function p(h,m){let _=e.name("item"),$=(0,fn.checkDataTypes)(l,_,a.opts.strictNumbers,fn.DataType.Wrong),I=e.const("indices",(0,K._)`{}`);e.for((0,K._)`;${h}--;`,()=>{e.let(_,(0,K._)`${r}[${h}]`),e.if($,(0,K._)`continue`),l.length>1&&e.if((0,K._)`typeof ${_} == "string"`,(0,K._)`${_} += "_"`),e.if((0,K._)`typeof ${I}[${_}] == "number"`,()=>{e.assign(m,(0,K._)`${I}[${_}]`),t.error(),e.assign(c,!1).break()}).code((0,K._)`${I}[${_}] = ${h}`)})}function y(h,m){let _=(0,cf.useFunc)(e,uf.default),$=e.name("outer");e.label($).for((0,K._)`;${h}--;`,()=>e.for((0,K._)`${m} = ${h}; ${m}--;`,()=>e.if((0,K._)`${_}(${r}[${h}], ${r}[${m}])`,()=>{t.error(),e.assign(c,!1).break($)})))}}};hn.default=df});var ua=g(mn=>{"use strict";u();Object.defineProperty(mn,"__esModule",{value:!0});var pn=b(),ff=k(),hf=Rr(),pf={message:"must be equal to constant",params:({schemaCode:t})=>(0,pn._)`{allowedValue: ${t}}`},mf={keyword:"const",$data:!0,error:pf,code(t){let{gen:e,data:r,$data:s,schemaCode:n,schema:i}=t;s||i&&typeof i=="object"?t.fail$data((0,pn._)`!${(0,ff.useFunc)(e,hf.default)}(${r}, ${n})`):t.fail((0,pn._)`${i} !== ${r}`)}};mn.default=mf});var la=g(yn=>{"use strict";u();Object.defineProperty(yn,"__esModule",{value:!0});var Jt=b(),yf=k(),_f=Rr(),gf={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Jt._)`{allowedValues: ${t}}`},$f={keyword:"enum",schemaType:"array",$data:!0,error:gf,code(t){let{gen:e,data:r,$data:s,schema:n,schemaCode:i,it:o}=t;if(!s&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=o.opts.loopEnum,c,l=()=>c??(c=(0,yf.useFunc)(e,_f.default)),d;if(a||s)d=e.let("valid"),t.block$data(d,f);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let y=e.const("vSchema",i);d=(0,Jt.or)(...n.map((h,m)=>p(y,m)))}t.pass(d);function f(){e.assign(d,!1),e.forOf("v",i,y=>e.if((0,Jt._)`${l()}(${r}, ${y})`,()=>e.assign(d,!0).break()))}function p(y,h){let m=n[h];return typeof m=="object"&&m!==null?(0,Jt._)`${l()}(${r}, ${y}[${h}])`:(0,Jt._)`${r} === ${m}`}}};yn.default=$f});var da=g(_n=>{"use strict";u();Object.defineProperty(_n,"__esModule",{value:!0});var vf=Zo(),wf=Qo(),Ef=ra(),Sf=sa(),bf=na(),Pf=ia(),Nf=oa(),Of=ca(),Tf=ua(),If=la(),kf=[vf.default,wf.default,Ef.default,Sf.default,bf.default,Pf.default,Nf.default,Of.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Tf.default,If.default];_n.default=kf});var $n=g(Yt=>{"use strict";u();Object.defineProperty(Yt,"__esModule",{value:!0});Yt.validateAdditionalItems=void 0;var Be=b(),gn=k(),Rf={message:({params:{len:t}})=>(0,Be.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Be._)`{limit: ${t}}`},jf={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Rf,code(t){let{parentSchema:e,it:r}=t,{items:s}=e;if(!Array.isArray(s)){(0,gn.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}fa(t,s)}};function fa(t,e){let{gen:r,schema:s,data:n,keyword:i,it:o}=t;o.items=!0;let a=r.const("len",(0,Be._)`${n}.length`);if(s===!1)t.setParams({len:e.length}),t.pass((0,Be._)`${a} <= ${e.length}`);else if(typeof s=="object"&&!(0,gn.alwaysValidSchema)(o,s)){let l=r.var("valid",(0,Be._)`${a} <= ${e.length}`);r.if((0,Be.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,d=>{t.subschema({keyword:i,dataProp:d,dataPropType:gn.Type.Num},l),o.allErrors||r.if((0,Be.not)(l),()=>r.break())})}}Yt.validateAdditionalItems=fa;Yt.default=jf});var vn=g(Bt=>{"use strict";u();Object.defineProperty(Bt,"__esModule",{value:!0});Bt.validateTuple=void 0;var ha=b(),jr=k(),qf=ne(),Af={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return pa(t,"additionalItems",e);r.items=!0,!(0,jr.alwaysValidSchema)(r,e)&&t.ok((0,qf.validateArray)(t))}};function pa(t,e,r=t.schema){let{gen:s,parentSchema:n,data:i,keyword:o,it:a}=t;d(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=jr.mergeEvaluated.items(s,r.length,a.items));let c=s.name("valid"),l=s.const("len",(0,ha._)`${i}.length`);r.forEach((f,p)=>{(0,jr.alwaysValidSchema)(a,f)||(s.if((0,ha._)`${l} > ${p}`,()=>t.subschema({keyword:o,schemaProp:p,dataProp:p},c)),t.ok(c))});function d(f){let{opts:p,errSchemaPath:y}=a,h=r.length,m=h===f.minItems&&(h===f.maxItems||f[e]===!1);if(p.strictTuples&&!m){let _=`"${o}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${y}"`;(0,jr.checkStrictMode)(a,_,p.strictTuples)}}}Bt.validateTuple=pa;Bt.default=Af});var ma=g(wn=>{"use strict";u();Object.defineProperty(wn,"__esModule",{value:!0});var Cf=vn(),Mf={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Cf.validateTuple)(t,"items")};wn.default=Mf});var _a=g(En=>{"use strict";u();Object.defineProperty(En,"__esModule",{value:!0});var ya=b(),Df=k(),xf=ne(),zf=$n(),Ff={message:({params:{len:t}})=>(0,ya.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ya._)`{limit: ${t}}`},Vf={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Ff,code(t){let{schema:e,parentSchema:r,it:s}=t,{prefixItems:n}=r;s.items=!0,!(0,Df.alwaysValidSchema)(s,e)&&(n?(0,zf.validateAdditionalItems)(t,n):t.ok((0,xf.validateArray)(t)))}};En.default=Vf});var ga=g(Sn=>{"use strict";u();Object.defineProperty(Sn,"__esModule",{value:!0});var oe=b(),qr=k(),Uf={message:({params:{min:t,max:e}})=>e===void 0?(0,oe.str)`must contain at least ${t} valid item(s)`:(0,oe.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,oe._)`{minContains: ${t}}`:(0,oe._)`{minContains: ${t}, maxContains: ${e}}`},Lf={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Uf,code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:i}=t,o,a,{minContains:c,maxContains:l}=s;i.opts.next?(o=c===void 0?1:c,a=l):o=1;let d=e.const("len",(0,oe._)`${n}.length`);if(t.setParams({min:o,max:a}),a===void 0&&o===0){(0,qr.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,qr.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,qr.alwaysValidSchema)(i,r)){let m=(0,oe._)`${d} >= ${o}`;a!==void 0&&(m=(0,oe._)`${m} && ${d} <= ${a}`),t.pass(m);return}i.items=!0;let f=e.name("valid");a===void 0&&o===1?y(f,()=>e.if(f,()=>e.break())):o===0?(e.let(f,!0),a!==void 0&&e.if((0,oe._)`${n}.length > 0`,p)):(e.let(f,!1),p()),t.result(f,()=>t.reset());function p(){let m=e.name("_valid"),_=e.let("count",0);y(m,()=>e.if(m,()=>h(_)))}function y(m,_){e.forRange("i",0,d,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:qr.Type.Num,compositeRule:!0},m),_()})}function h(m){e.code((0,oe._)`${m}++`),a===void 0?e.if((0,oe._)`${m} >= ${o}`,()=>e.assign(f,!0).break()):(e.if((0,oe._)`${m} > ${a}`,()=>e.assign(f,!1).break()),o===1?e.assign(f,!0):e.if((0,oe._)`${m} >= ${o}`,()=>e.assign(f,!0)))}}};Sn.default=Lf});var wa=g(we=>{"use strict";u();Object.defineProperty(we,"__esModule",{value:!0});we.validateSchemaDeps=we.validatePropertyDeps=we.error=void 0;var bn=b(),Kf=k(),Xt=ne();we.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let s=e===1?"property":"properties";return(0,bn.str)`must have ${s} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:s}})=>(0,bn._)`{property: ${t},
6
- missingProperty: ${s},
7
- depsCount: ${e},
8
- deps: ${r}}`};var Gf={keyword:"dependencies",type:"object",schemaType:"object",error:we.error,code(t){let[e,r]=Hf(t);$a(t,e),va(t,r)}};function Hf({schema:t}){let e={},r={};for(let s in t){if(s==="__proto__")continue;let n=Array.isArray(t[s])?e:r;n[s]=t[s]}return[e,r]}function $a(t,e=t.schema){let{gen:r,data:s,it:n}=t;if(Object.keys(e).length===0)return;let i=r.let("missing");for(let o in e){let a=e[o];if(a.length===0)continue;let c=(0,Xt.propertyInData)(r,s,o,n.opts.ownProperties);t.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let l of a)(0,Xt.checkReportMissingProp)(t,l)}):(r.if((0,bn._)`${c} && (${(0,Xt.checkMissingProp)(t,a,i)})`),(0,Xt.reportMissingProp)(t,i),r.else())}}we.validatePropertyDeps=$a;function va(t,e=t.schema){let{gen:r,data:s,keyword:n,it:i}=t,o=r.name("valid");for(let a in e)(0,Kf.alwaysValidSchema)(i,e[a])||(r.if((0,Xt.propertyInData)(r,s,a,i.opts.ownProperties),()=>{let c=t.subschema({keyword:n,schemaProp:a},o);t.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),t.ok(o))}we.validateSchemaDeps=va;we.default=Gf});var Sa=g(Pn=>{"use strict";u();Object.defineProperty(Pn,"__esModule",{value:!0});var Ea=b(),Wf=k(),Jf={message:"property name must be valid",params:({params:t})=>(0,Ea._)`{propertyName: ${t.propertyName}}`},Yf={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Jf,code(t){let{gen:e,schema:r,data:s,it:n}=t;if((0,Wf.alwaysValidSchema)(n,r))return;let i=e.name("valid");e.forIn("key",s,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),e.if((0,Ea.not)(i),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(i)}};Pn.default=Yf});var On=g(Nn=>{"use strict";u();Object.defineProperty(Nn,"__esModule",{value:!0});var Ar=ne(),fe=b(),Bf=Ne(),Cr=k(),Xf={message:"must NOT have additional properties",params:({params:t})=>(0,fe._)`{additionalProperty: ${t.additionalProperty}}`},Zf={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Xf,code(t){let{gen:e,schema:r,parentSchema:s,data:n,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,Cr.alwaysValidSchema)(o,r))return;let l=(0,Ar.allSchemaProperties)(s.properties),d=(0,Ar.allSchemaProperties)(s.patternProperties);f(),t.ok((0,fe._)`${i} === ${Bf.default.errors}`);function f(){e.forIn("key",n,_=>{!l.length&&!d.length?h(_):e.if(p(_),()=>h(_))})}function p(_){let $;if(l.length>8){let I=(0,Cr.schemaRefOrVal)(o,s.properties,"properties");$=(0,Ar.isOwnProperty)(e,I,_)}else l.length?$=(0,fe.or)(...l.map(I=>(0,fe._)`${_} === ${I}`)):$=fe.nil;return d.length&&($=(0,fe.or)($,...d.map(I=>(0,fe._)`${(0,Ar.usePattern)(t,I)}.test(${_})`))),(0,fe.not)($)}function y(_){e.code((0,fe._)`delete ${n}[${_}]`)}function h(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){y(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Cr.alwaysValidSchema)(o,r)){let $=e.name("valid");c.removeAdditional==="failing"?(m(_,$,!1),e.if((0,fe.not)($),()=>{t.reset(),y(_)})):(m(_,$),a||e.if((0,fe.not)($),()=>e.break()))}}function m(_,$,I){let O={keyword:"additionalProperties",dataProp:_,dataPropType:Cr.Type.Str};I===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(O,$)}}};Nn.default=Zf});var Na=g(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});var Qf=Dt(),ba=ne(),Tn=k(),Pa=On(),eh={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:i}=t;i.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Pa.default.code(new Qf.KeywordCxt(i,Pa.default,"additionalProperties"));let o=(0,ba.allSchemaProperties)(r);for(let f of o)i.definedProperties.add(f);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=Tn.mergeEvaluated.props(e,(0,Tn.toHash)(o),i.props));let a=o.filter(f=>!(0,Tn.alwaysValidSchema)(i,r[f]));if(a.length===0)return;let c=e.name("valid");for(let f of a)l(f)?d(f):(e.if((0,ba.propertyInData)(e,n,f,i.opts.ownProperties)),d(f),i.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(c);function l(f){return i.opts.useDefaults&&!i.compositeRule&&r[f].default!==void 0}function d(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};In.default=eh});var ka=g(kn=>{"use strict";u();Object.defineProperty(kn,"__esModule",{value:!0});var Oa=ne(),Mr=b(),Ta=k(),Ia=k(),th={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:s,parentSchema:n,it:i}=t,{opts:o}=i,a=(0,Oa.allSchemaProperties)(r),c=a.filter(m=>(0,Ta.alwaysValidSchema)(i,r[m]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let l=o.strictSchema&&!o.allowMatchingProperties&&n.properties,d=e.name("valid");i.props!==!0&&!(i.props instanceof Mr.Name)&&(i.props=(0,Ia.evaluatedPropsToName)(e,i.props));let{props:f}=i;p();function p(){for(let m of a)l&&y(m),i.allErrors?h(m):(e.var(d,!0),h(m),e.if(d))}function y(m){for(let _ in l)new RegExp(m).test(_)&&(0,Ta.checkStrictMode)(i,`property ${_} matches pattern ${m} (use allowMatchingProperties)`)}function h(m){e.forIn("key",s,_=>{e.if((0,Mr._)`${(0,Oa.usePattern)(t,m)}.test(${_})`,()=>{let $=c.includes(m);$||t.subschema({keyword:"patternProperties",schemaProp:m,dataProp:_,dataPropType:Ia.Type.Str},d),i.opts.unevaluated&&f!==!0?e.assign((0,Mr._)`${f}[${_}]`,!0):!$&&!i.allErrors&&e.if((0,Mr.not)(d),()=>e.break())})})}}};kn.default=th});var Ra=g(Rn=>{"use strict";u();Object.defineProperty(Rn,"__esModule",{value:!0});var rh=k(),sh={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:s}=t;if((0,rh.alwaysValidSchema)(s,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Rn.default=sh});var ja=g(jn=>{"use strict";u();Object.defineProperty(jn,"__esModule",{value:!0});var nh=ne(),ih={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:nh.validateUnion,error:{message:"must match a schema in anyOf"}};jn.default=ih});var qa=g(qn=>{"use strict";u();Object.defineProperty(qn,"__esModule",{value:!0});var Dr=b(),oh=k(),ah={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Dr._)`{passingSchemas: ${t.passing}}`},ch={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:ah,code(t){let{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let i=r,o=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(o,()=>t.reset(),()=>t.error(!0));function l(){i.forEach((d,f)=>{let p;(0,oh.alwaysValidSchema)(n,d)?e.var(c,!0):p=t.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&e.if((0,Dr._)`${c} && ${o}`).assign(o,!1).assign(a,(0,Dr._)`[${a}, ${f}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(a,f),p&&t.mergeEvaluated(p,Dr.Name)})})}}};qn.default=ch});var Aa=g(An=>{"use strict";u();Object.defineProperty(An,"__esModule",{value:!0});var uh=k(),lh={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((i,o)=>{if((0,uh.alwaysValidSchema)(s,i))return;let a=t.subschema({keyword:"allOf",schemaProp:o},n);t.ok(n),t.mergeEvaluated(a)})}};An.default=lh});var Da=g(Cn=>{"use strict";u();Object.defineProperty(Cn,"__esModule",{value:!0});var xr=b(),Ma=k(),dh={message:({params:t})=>(0,xr.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,xr._)`{failingKeyword: ${t.ifClause}}`},fh={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:dh,code(t){let{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,Ma.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=Ca(s,"then"),i=Ca(s,"else");if(!n&&!i)return;let o=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),n&&i){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,l("then",d),l("else",d))}else n?e.if(a,l("then")):e.if((0,xr.not)(a),l("else"));t.pass(o,()=>t.error(!0));function c(){let d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(d)}function l(d,f){return()=>{let p=t.subschema({keyword:d},a);e.assign(o,a),t.mergeValidEvaluated(p,o),f?e.assign(f,(0,xr._)`${d}`):t.setParams({ifClause:d})}}}};function Ca(t,e){let r=t.schema[e];return r!==void 0&&!(0,Ma.alwaysValidSchema)(t,r)}Cn.default=fh});var xa=g(Mn=>{"use strict";u();Object.defineProperty(Mn,"__esModule",{value:!0});var hh=k(),ph={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,hh.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Mn.default=ph});var za=g(Dn=>{"use strict";u();Object.defineProperty(Dn,"__esModule",{value:!0});var mh=$n(),yh=ma(),_h=vn(),gh=_a(),$h=ga(),vh=wa(),wh=Sa(),Eh=On(),Sh=Na(),bh=ka(),Ph=Ra(),Nh=ja(),Oh=qa(),Th=Aa(),Ih=Da(),kh=xa();function Rh(t=!1){let e=[Ph.default,Nh.default,Oh.default,Th.default,Ih.default,kh.default,wh.default,Eh.default,vh.default,Sh.default,bh.default];return t?e.push(yh.default,gh.default):e.push(mh.default,_h.default),e.push($h.default),e}Dn.default=Rh});var Fa=g(xn=>{"use strict";u();Object.defineProperty(xn,"__esModule",{value:!0});var F=b(),jh={message:({schemaCode:t})=>(0,F.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,F._)`{format: ${t}}`},qh={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:jh,code(t,e){let{gen:r,data:s,$data:n,schema:i,schemaCode:o,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:d,self:f}=a;if(!c.validateFormats)return;n?p():y();function p(){let h=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),m=r.const("fDef",(0,F._)`${h}[${o}]`),_=r.let("fType"),$=r.let("format");r.if((0,F._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(_,(0,F._)`${m}.type || "string"`).assign($,(0,F._)`${m}.validate`),()=>r.assign(_,(0,F._)`"string"`).assign($,m)),t.fail$data((0,F.or)(I(),O()));function I(){return c.strictSchema===!1?F.nil:(0,F._)`${o} && !${$}`}function O(){let M=d.$async?(0,F._)`(${m}.async ? await ${$}(${s}) : ${$}(${s}))`:(0,F._)`${$}(${s})`,E=(0,F._)`(typeof ${$} == "function" ? ${M} : ${$}.test(${s}))`;return(0,F._)`${$} && ${$} !== true && ${_} === ${e} && !${E}`}}function y(){let h=f.formats[i];if(!h){I();return}if(h===!0)return;let[m,_,$]=O(h);m===e&&t.pass(M());function I(){if(c.strictSchema===!1){f.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function O(E){let pe=E instanceof RegExp?(0,F.regexpCode)(E):c.code.formats?(0,F._)`${c.code.formats}${(0,F.getProperty)(i)}`:void 0,Se=r.scopeValue("formats",{key:i,ref:E,code:pe});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,F._)`${Se}.validate`]:["string",E,Se]}function M(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!d.$async)throw new Error("async format in sync schema");return(0,F._)`await ${$}(${s})`}return typeof _=="function"?(0,F._)`${$}(${s})`:(0,F._)`${$}.test(${s})`}}}};xn.default=qh});var Va=g(zn=>{"use strict";u();Object.defineProperty(zn,"__esModule",{value:!0});var Ah=Fa(),Ch=[Ah.default];zn.default=Ch});var Ua=g(ft=>{"use strict";u();Object.defineProperty(ft,"__esModule",{value:!0});ft.contentVocabulary=ft.metadataVocabulary=void 0;ft.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ft.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ka=g(Fn=>{"use strict";u();Object.defineProperty(Fn,"__esModule",{value:!0});var Mh=Xo(),Dh=da(),xh=za(),zh=Va(),La=Ua(),Fh=[Mh.default,Dh.default,(0,xh.default)(),zh.default,La.metadataVocabulary,La.contentVocabulary];Fn.default=Fh});var Ha=g(zr=>{"use strict";u();Object.defineProperty(zr,"__esModule",{value:!0});zr.DiscrError=void 0;var Ga;(function(t){t.Tag="tag",t.Mapping="mapping"})(Ga||(zr.DiscrError=Ga={}))});var Ja=g(Un=>{"use strict";u();Object.defineProperty(Un,"__esModule",{value:!0});var ht=b(),Vn=Ha(),Wa=wr(),Vh=xt(),Uh=k(),Lh={message:({params:{discrError:t,tagName:e}})=>t===Vn.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,ht._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Kh={keyword:"discriminator",type:"object",schemaType:"object",error:Lh,code(t){let{gen:e,data:r,schema:s,parentSchema:n,it:i}=t,{oneOf:o}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=s.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,ht._)`${r}${(0,ht.getProperty)(a)}`);e.if((0,ht._)`typeof ${l} == "string"`,()=>d(),()=>t.error(!1,{discrError:Vn.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function d(){let y=p();e.if(!1);for(let h in y)e.elseIf((0,ht._)`${l} === ${h}`),e.assign(c,f(y[h]));e.else(),t.error(!1,{discrError:Vn.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function f(y){let h=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:y},h);return t.mergeEvaluated(m,ht.Name),h}function p(){var y;let h={},m=$(n),_=!0;for(let M=0;M<o.length;M++){let E=o[M];if(E?.$ref&&!(0,Uh.schemaHasRulesButRef)(E,i.self.RULES)){let Se=E.$ref;if(E=Wa.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Se),E instanceof Wa.SchemaEnv&&(E=E.schema),E===void 0)throw new Vh.default(i.opts.uriResolver,i.baseId,Se)}let pe=(y=E?.properties)===null||y===void 0?void 0:y[a];if(typeof pe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(m||$(E)),I(pe,M)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return h;function $({required:M}){return Array.isArray(M)&&M.includes(a)}function I(M,E){if(M.const)O(M.const,E);else if(M.enum)for(let pe of M.enum)O(pe,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function O(M,E){if(typeof M!="string"||M in h)throw new Error(`discriminator: "${a}" values must be unique strings`);h[M]=E}}}};Un.default=Kh});var Ya=g((y_,Gh)=>{Gh.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Kn=g((x,Ln)=>{"use strict";u();Object.defineProperty(x,"__esModule",{value:!0});x.MissingRefError=x.ValidationError=x.CodeGen=x.Name=x.nil=x.stringify=x.str=x._=x.KeywordCxt=x.Ajv=void 0;var Hh=Go(),Wh=Ka(),Jh=Ja(),Ba=Ya(),Yh=["/properties"],Fr="http://json-schema.org/draft-07/schema",pt=class extends Hh.default{_addVocabularies(){super._addVocabularies(),Wh.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Jh.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Ba,Yh):Ba;this.addMetaSchema(e,Fr,!1),this.refs["http://json-schema.org/schema"]=Fr}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Fr)?Fr:void 0)}};x.Ajv=pt;Ln.exports=x=pt;Ln.exports.Ajv=pt;Object.defineProperty(x,"__esModule",{value:!0});x.default=pt;var Bh=Dt();Object.defineProperty(x,"KeywordCxt",{enumerable:!0,get:function(){return Bh.KeywordCxt}});var mt=b();Object.defineProperty(x,"_",{enumerable:!0,get:function(){return mt._}});Object.defineProperty(x,"str",{enumerable:!0,get:function(){return mt.str}});Object.defineProperty(x,"stringify",{enumerable:!0,get:function(){return mt.stringify}});Object.defineProperty(x,"nil",{enumerable:!0,get:function(){return mt.nil}});Object.defineProperty(x,"Name",{enumerable:!0,get:function(){return mt.Name}});Object.defineProperty(x,"CodeGen",{enumerable:!0,get:function(){return mt.CodeGen}});var Xh=$r();Object.defineProperty(x,"ValidationError",{enumerable:!0,get:function(){return Xh.default}});var Zh=xt();Object.defineProperty(x,"MissingRefError",{enumerable:!0,get:function(){return Zh.default}})});var rc=g(Ee=>{"use strict";u();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.formatNames=Ee.fastFormats=Ee.fullFormats=void 0;function yt(t,e){return{validate:t,compare:e}}Ee.fullFormats={date:yt(Qa,Wn),time:yt(ec,Jn),"date-time":yt(rp,tc),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:ip,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:fp,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:op,int32:{type:"number",validate:up},int64:{type:"number",validate:lp},float:{type:"number",validate:Za},double:{type:"number",validate:Za},password:!0,binary:!0};Ee.fastFormats={...Ee.fullFormats,date:yt(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Wn),time:yt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Jn),"date-time":yt(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,tc),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Ee.formatNames=Object.keys(Ee.fullFormats);function Qh(t){return t%4===0&&(t%100!==0||t%400===0)}var ep=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,tp=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Qa(t){let e=ep.exec(t);if(!e)return!1;let r=+e[1],s=+e[2],n=+e[3];return s>=1&&s<=12&&n>=1&&n<=(s===2&&Qh(r)?29:tp[s])}function Wn(t,e){if(t&&e)return t>e?1:t<e?-1:0}var Gn=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function ec(t,e){let r=Gn.exec(t);if(!r)return!1;let s=+r[1],n=+r[2],i=+r[3],o=r[5];return(s<=23&&n<=59&&i<=59||s===23&&n===59&&i===60)&&(!e||o!=="")}function Jn(t,e){if(!(t&&e))return;let r=Gn.exec(t),s=Gn.exec(e);if(r&&s)return t=r[1]+r[2]+r[3]+(r[4]||""),e=s[1]+s[2]+s[3]+(s[4]||""),t>e?1:t<e?-1:0}var Hn=/t|\s/i;function rp(t){let e=t.split(Hn);return e.length===2&&Qa(e[0])&&ec(e[1],!0)}function tc(t,e){if(!(t&&e))return;let[r,s]=t.split(Hn),[n,i]=e.split(Hn),o=Wn(r,n);if(o!==void 0)return o||Jn(s,i)}var sp=/\/|:/,np=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function ip(t){return sp.test(t)&&np.test(t)}var Xa=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function op(t){return Xa.lastIndex=0,Xa.test(t)}var ap=-(2**31),cp=2**31-1;function up(t){return Number.isInteger(t)&&t<=cp&&t>=ap}function lp(t){return Number.isInteger(t)}function Za(){return!0}var dp=/[^\\]\\Z/;function fp(t){if(dp.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var sc=g(_t=>{"use strict";u();Object.defineProperty(_t,"__esModule",{value:!0});_t.formatLimitDefinition=void 0;var hp=Kn(),he=b(),Me=he.operators,Vr={formatMaximum:{okStr:"<=",ok:Me.LTE,fail:Me.GT},formatMinimum:{okStr:">=",ok:Me.GTE,fail:Me.LT},formatExclusiveMaximum:{okStr:"<",ok:Me.LT,fail:Me.GTE},formatExclusiveMinimum:{okStr:">",ok:Me.GT,fail:Me.LTE}},pp={message:({keyword:t,schemaCode:e})=>he.str`should be ${Vr[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>he._`{comparison: ${Vr[t].okStr}, limit: ${e}}`};_t.formatLimitDefinition={keyword:Object.keys(Vr),type:"string",schemaType:"string",$data:!0,error:pp,code(t){let{gen:e,data:r,schemaCode:s,keyword:n,it:i}=t,{opts:o,self:a}=i;if(!o.validateFormats)return;let c=new hp.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?l():d();function l(){let p=e.scopeValue("formats",{ref:a.formats,code:o.code.formats}),y=e.const("fmt",he._`${p}[${c.schemaCode}]`);t.fail$data(he.or(he._`typeof ${y} != "object"`,he._`${y} instanceof RegExp`,he._`typeof ${y}.compare != "function"`,f(y)))}function d(){let p=c.schema,y=a.formats[p];if(!y||y===!0)return;if(typeof y!="object"||y instanceof RegExp||typeof y.compare!="function")throw new Error(`"${n}": format "${p}" does not define "compare" function`);let h=e.scopeValue("formats",{key:p,ref:y,code:o.code.formats?he._`${o.code.formats}${he.getProperty(p)}`:void 0});t.fail$data(f(h))}function f(p){return he._`${p}.compare(${r}, ${s}) ${Vr[n].fail} 0`}},dependencies:["format"]};var mp=t=>(t.addKeyword(_t.formatLimitDefinition),t);_t.default=mp});var ac=g((Zt,oc)=>{"use strict";u();Object.defineProperty(Zt,"__esModule",{value:!0});var gt=rc(),yp=sc(),Yn=b(),nc=new Yn.Name("fullFormats"),_p=new Yn.Name("fastFormats"),Bn=(t,e={keywords:!0})=>{if(Array.isArray(e))return ic(t,e,gt.fullFormats,nc),t;let[r,s]=e.mode==="fast"?[gt.fastFormats,_p]:[gt.fullFormats,nc],n=e.formats||gt.formatNames;return ic(t,n,r,s),e.keywords&&yp.default(t),t};Bn.get=(t,e="full")=>{let s=(e==="fast"?gt.fastFormats:gt.fullFormats)[t];if(!s)throw new Error(`Unknown format "${t}"`);return s};function ic(t,e,r,s){var n,i;(n=(i=t.opts.code).formats)!==null&&n!==void 0||(i.formats=Yn._`require("ajv-formats/dist/formats").${s}`);for(let o of e)t.addFormat(o,r[o])}oc.exports=Zt=Bn;Object.defineProperty(Zt,"__esModule",{value:!0});Zt.default=Bn});u();u();import{isDeepStrictEqual as $p}from"node:util";import cc from"node:process";import{Buffer as Qt}from"node:buffer";import Ze from"node:fs";import uc from"node:path";import er from"node:crypto";import vp from"node:assert";import{EventEmitter as wp}from"node:events";u();var ze=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")},Yr=new Set(["__proto__","prototype","constructor"]),yc=new Set("0123456789");function nr(t){let e=[],r="",s="start",n=!1;for(let i of t)switch(i){case"\\":if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");n&&(r+=i),s="property",n=!n;break;case".":if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="property";break}if(n){n=!1,r+=i;break}if(Yr.has(r))return[];e.push(r),r="",s="property";break;case"[":if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="index";break}if(n){n=!1,r+=i;break}if(s==="property"){if(Yr.has(r))return[];e.push(r),r=""}s="index";break;case"]":if(s==="index"){e.push(Number.parseInt(r,10)),r="",s="indexEnd";break}if(s==="indexEnd")throw new Error("Invalid character after an index");default:if(s==="index"&&!yc.has(i))throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");s==="start"&&(s="property"),n&&(n=!1,r+="\\"),r+=i}switch(n&&(r+="\\"),s){case"property":{if(Yr.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Br(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function ii(t,e){if(Br(t,e))throw new Error("Cannot use string index")}function oi(t,e,r){if(!ze(t)||typeof e!="string")return r===void 0?t:r;let s=nr(e);if(s.length===0)return r;for(let n=0;n<s.length;n++){let i=s[n];if(Br(t,i)?t=n===s.length-1?void 0:null:t=t[i],t==null){if(n!==s.length-1)return r;break}}return t===void 0?r:t}function Xr(t,e,r){if(!ze(t)||typeof e!="string")return t;let s=t,n=nr(e);for(let i=0;i<n.length;i++){let o=n[i];ii(t,o),i===n.length-1?t[o]=r:ze(t[o])||(t[o]=typeof n[i+1]=="number"?[]:{}),t=t[o]}return s}function ai(t,e){if(!ze(t)||typeof e!="string")return!1;let r=nr(e);for(let s=0;s<r.length;s++){let n=r[s];if(ii(t,n),s===r.length-1)return delete t[n],!0;if(t=t[n],!ze(t))return!1}}function ci(t,e){if(!ze(t)||typeof e!="string")return!1;let r=nr(e);if(r.length===0)return!1;for(let s of r){if(!ze(t)||!(s in t)||Br(t,s))return!1;t=t[s]}return!0}u();import Pc from"node:path";u();import j from"node:fs";import{promisify as G}from"node:util";u();u();var _c=(t,e)=>{let{onError:r}=e;return function(...n){return t.apply(void 0,n).catch(r)}},me=_c;u();var gc=(t,e)=>{let{onError:r}=e;return function(...n){try{return t.apply(void 0,n)}catch(i){return r(i)}}},ce=gc;u();u();var vc=(t,e)=>{let{isRetriable:r}=e;return function(n){let{timeout:i}=n,o=n.interval??250,a=Date.now()+i;return function c(...l){return t.apply(void 0,l).catch(d=>{if(!r(d)||Date.now()>=a)throw d;let f=Math.round(o*Math.random());return f>0?new Promise(y=>setTimeout(y,f)).then(()=>c.apply(void 0,l)):c.apply(void 0,l)})}}},ye=vc;u();var wc=(t,e)=>{let{isRetriable:r}=e;return function(n){let{timeout:i}=n,o=Date.now()+i;return function(...c){for(;;)try{return t.apply(void 0,c)}catch(l){if(!r(l)||Date.now()>=o)throw l;continue}}}},_e=wc;u();import li from"node:process";u();var wt={isChangeErrorOk:t=>{if(!wt.isNodeError(t))return!1;let{code:e}=t;return e==="ENOSYS"||!ui&&(e==="EINVAL"||e==="EPERM")},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!wt.isNodeError(t))return!1;let{code:e}=t;return e==="EMFILE"||e==="ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:t=>{if(!wt.isNodeError(t))throw t;if(!wt.isChangeErrorOk(t))throw t}},Zr=wt;var Et={onError:Zr.onChangeError},X={onError:()=>{}},ui=li.getuid?!li.getuid():!1,U={isRetriable:Zr.isRetriableError};var Ec={attempt:{chmod:me(G(j.chmod),Et),chown:me(G(j.chown),Et),close:me(G(j.close),X),fsync:me(G(j.fsync),X),mkdir:me(G(j.mkdir),X),realpath:me(G(j.realpath),X),stat:me(G(j.stat),X),unlink:me(G(j.unlink),X),chmodSync:ce(j.chmodSync,Et),chownSync:ce(j.chownSync,Et),closeSync:ce(j.closeSync,X),existsSync:ce(j.existsSync,X),fsyncSync:ce(j.fsync,X),mkdirSync:ce(j.mkdirSync,X),realpathSync:ce(j.realpathSync,X),statSync:ce(j.statSync,X),unlinkSync:ce(j.unlinkSync,X)},retry:{close:ye(G(j.close),U),fsync:ye(G(j.fsync),U),open:ye(G(j.open),U),readFile:ye(G(j.readFile),U),rename:ye(G(j.rename),U),stat:ye(G(j.stat),U),write:ye(G(j.write),U),writeFile:ye(G(j.writeFile),U),closeSync:_e(j.closeSync,U),fsyncSync:_e(j.fsyncSync,U),openSync:_e(j.openSync,U),readFileSync:_e(j.readFileSync,U),renameSync:_e(j.renameSync,U),statSync:_e(j.statSync,U),writeSync:_e(j.writeSync,U),writeFileSync:_e(j.writeFileSync,U)}},V=Ec;u();import Fe from"node:process";var di="utf8",Qr=438,fi=511;var hi={},pi=Fe.geteuid?Fe.geteuid():-1,mi=Fe.getegid?Fe.getegid():-1;var yi=1e3,_i=!!Fe.getuid,am=Fe.getuid?!Fe.getuid():!1,es=128;u();var gi=t=>t instanceof Error&&"code"in t;var ts=t=>typeof t=="string",ir=t=>t===void 0;u();u();import bc from"node:path";u();u();import et from"node:process";u();import $i from"node:process";var vi=$i.platform==="linux",or=$i.platform==="win32";u();var rs=["SIGHUP","SIGINT","SIGTERM"];or||rs.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");vi&&rs.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var wi=rs;var ss=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(let r of this.callbacks)r();e&&(or&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?et.kill(et.pid,"SIGTERM"):et.kill(et.pid,e))}},this.hook=()=>{et.once("exit",()=>this.exit());for(let e of wi)try{et.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}},Ei=new ss;var Sc=Ei.register,Si=Sc;var re={store:{},create:t=>{let e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),n=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${t}${n}`},get:(t,e,r=!0)=>{let s=re.truncate(e(t));return s in re.store?re.get(t,e,r):(re.store[s]=r,[s,()=>delete re.store[s]])},purge:t=>{re.store[t]&&(delete re.store[t],V.attempt.unlink(t))},purgeSync:t=>{re.store[t]&&(delete re.store[t],V.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(let t in re.store)re.purgeSync(t)},truncate:t=>{let e=bc.basename(t);if(e.length<=es)return t;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;let s=e.length-es;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-s)}${r[3]}`}};Si(re.purgeSyncAll);var St=re;function ns(t,e,r=hi){if(ts(r))return ns(t,e,{encoding:r});let n={timeout:r.timeout??yi},i=null,o=null,a=null;try{let c=V.attempt.realpathSync(t),l=!!c;t=c||t,[o,i]=St.get(t,r.tmpCreate||St.create,r.tmpPurge!==!1);let d=_i&&ir(r.chown),f=ir(r.mode);if(l&&(d||f)){let p=V.attempt.statSync(t);p&&(r={...r},d&&(r.chown={uid:p.uid,gid:p.gid}),f&&(r.mode=p.mode))}if(!l){let p=Pc.dirname(t);V.attempt.mkdirSync(p,{mode:fi,recursive:!0})}a=V.retry.openSync(n)(o,"w",r.mode||Qr),r.tmpCreated&&r.tmpCreated(o),ts(e)?V.retry.writeSync(n)(a,e,0,r.encoding||di):ir(e)||V.retry.writeSync(n)(a,e,0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?V.retry.fsyncSync(n)(a):V.attempt.fsync(a)),V.retry.closeSync(n)(a),a=null,r.chown&&(r.chown.uid!==pi||r.chown.gid!==mi)&&V.attempt.chownSync(o,r.chown.uid,r.chown.gid),r.mode&&r.mode!==Qr&&V.attempt.chmodSync(o,r.mode);try{V.retry.renameSync(n)(o,t)}catch(p){if(!gi(p)||p.code!=="ENAMETOOLONG")throw p;V.retry.renameSync(n)(o,St.truncate(t))}i(),o=null}finally{a&&V.attempt.closeSync(a),o&&St.purge(o)}}var dc=Wr(Kn(),1),fc=Wr(ac(),1);u();var gp=(t,e={})=>{if(typeof t!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``);let{wait:r=0,maxWait:s=Number.POSITIVE_INFINITY,before:n=!1,after:i=!0}=e;if(!n&&!i)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,c,l=function(...d){let f=this,p=()=>{o=void 0,a&&(clearTimeout(a),a=void 0),i&&(c=t.apply(f,d))},y=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),i&&(c=t.apply(f,d))},h=n&&!o;return clearTimeout(o),o=setTimeout(p,r),s>0&&s!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(y,s)),h&&(c=t.apply(f,d)),c};return ri(l,t),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l},Xn=gp;var Qe=Wr(mc(),1),Ur=function(t,e,r,s,n){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?n.call(t,r):n?n.value=r:e.set(t,r),r},z=function(t,e,r,s){if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?s:r==="a"?s.call(t):s?s.value:e.get(t)},Xe,De,ae,xe,Ep=dc.default.default,Sp=fc.default.default,lc="aes-256-cbc",$t=()=>Object.create(null),bp=t=>t!=null,Pp=(t,e)=>{let r=new Set(["undefined","symbol","function"]),s=typeof e;if(r.has(s))throw new TypeError(`Setting a value of type \`${s}\` for key \`${t}\` is not allowed as it's not supported by JSON`)},Lr="__internal__",Zn=`${Lr}.migrations.version`,tr=class{constructor(e={}){Object.defineProperty(this,"path",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Xe.set(this,void 0),De.set(this,void 0),ae.set(this,void 0),xe.set(this,{}),Object.defineProperty(this,"_deserialize",{enumerable:!0,configurable:!0,writable:!0,value:o=>JSON.parse(o)}),Object.defineProperty(this,"_serialize",{enumerable:!0,configurable:!0,writable:!0,value:o=>JSON.stringify(o,void 0," ")});let r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!r.cwd){if(!r.projectName)throw new Error("Please specify the `projectName` option.");r.cwd=ti(r.projectName,{suffix:r.projectSuffix}).config}if(Ur(this,ae,r,"f"),r.schema){if(typeof r.schema!="object")throw new TypeError("The `schema` option must be an object.");let o=new Ep({allErrors:!0,useDefaults:!0});Sp(o);let a={type:"object",properties:r.schema};Ur(this,Xe,o.compile(a),"f");for(let[c,l]of Object.entries(r.schema))l?.default&&(z(this,xe,"f")[c]=l.default)}r.defaults&&Ur(this,xe,{...z(this,xe,"f"),...r.defaults},"f"),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new wp,Ur(this,De,r.encryptionKey,"f");let s=r.fileExtension?`.${r.fileExtension}`:"";this.path=uc.resolve(r.cwd,`${r.configName??"config"}${s}`);let n=this.store,i=Object.assign($t(),r.defaults,n);this._validate(i);try{vp.deepEqual(n,i)}catch{this.store=i}if(r.watch&&this._watch(),r.migrations){if(!r.projectVersion)throw new Error("Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}}get(e,r){if(z(this,ae,"f").accessPropertiesByDotNotation)return this._get(e,r);let{store:s}=this;return e in s?s[e]:r}set(e,r){if(typeof e!="string"&&typeof e!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!="object"&&r===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${Lr} key, as it's used to manage this module internal operations.`);let{store:s}=this,n=(i,o)=>{Pp(i,o),z(this,ae,"f").accessPropertiesByDotNotation?Xr(s,i,o):s[i]=o};if(typeof e=="object"){let i=e;for(let[o,a]of Object.entries(i))n(o,a)}else n(e,r);this.store=s}has(e){return z(this,ae,"f").accessPropertiesByDotNotation?ci(this.store,e):e in this.store}reset(...e){for(let r of e)bp(z(this,xe,"f")[r])&&this.set(r,z(this,xe,"f")[r])}delete(e){let{store:r}=this;z(this,ae,"f").accessPropertiesByDotNotation?ai(r,e):delete r[e],this.store=r}clear(){this.store=$t();for(let e of Object.keys(z(this,xe,"f")))this.reset(e)}onDidChange(e,r){if(typeof e!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);return this._handleChange(()=>this.get(e),r)}onDidAnyChange(e){if(typeof e!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleChange(()=>this.store,e)}get size(){return Object.keys(this.store).length}get store(){try{let e=Ze.readFileSync(this.path,z(this,De,"f")?null:"utf8"),r=this._encryptData(e),s=this._deserialize(r);return this._validate(s),Object.assign($t(),s)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),$t();if(z(this,ae,"f").clearInvalidConfig&&e.name==="SyntaxError")return $t();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.emit("change")}*[(Xe=new WeakMap,De=new WeakMap,ae=new WeakMap,xe=new WeakMap,Symbol.iterator)](){for(let[e,r]of Object.entries(this.store))yield[e,r]}_encryptData(e){if(!z(this,De,"f"))return e.toString();try{let r=e.slice(0,16),s=er.pbkdf2Sync(z(this,De,"f"),r.toString(),1e4,32,"sha512"),n=er.createDecipheriv(lc,s,r);return Qt.concat([n.update(Qt.from(e.slice(17))),n.final()]).toString("utf8")}catch{}return e.toString()}_handleChange(e,r){let s=e(),n=()=>{let i=s,o=e();$p(o,i)||(s=o,r.call(this,o,i))};return this.events.on("change",n),()=>this.events.removeListener("change",n)}_validate(e){if(!z(this,Xe,"f")||z(this,Xe,"f").call(this,e)||!z(this,Xe,"f").errors)return;let s=z(this,Xe,"f").errors.map(({instancePath:n,message:i=""})=>`\`${n.slice(1)}\` ${i}`);throw new Error("Config schema violation: "+s.join("; "))}_ensureDirectory(){Ze.mkdirSync(uc.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(z(this,De,"f")){let s=er.randomBytes(16),n=er.pbkdf2Sync(z(this,De,"f"),s.toString(),1e4,32,"sha512"),i=er.createCipheriv(lc,n,s);r=Qt.concat([s,Qt.from(":"),i.update(Qt.from(r)),i.final()])}if(cc.env.SNAP)Ze.writeFileSync(this.path,r,{mode:z(this,ae,"f").configFileMode});else try{ns(this.path,r,{mode:z(this,ae,"f").configFileMode})}catch(s){if(s?.code==="EXDEV"){Ze.writeFileSync(this.path,r,{mode:z(this,ae,"f").configFileMode});return}throw s}}_watch(){this._ensureDirectory(),Ze.existsSync(this.path)||this._write($t()),cc.platform==="win32"?Ze.watch(this.path,{persistent:!1},Xn(()=>{this.events.emit("change")},{wait:100})):Ze.watchFile(this.path,{persistent:!1},Xn(()=>{this.events.emit("change")},{wait:5e3}))}_migrate(e,r,s){let n=this._get(Zn,"0.0.0"),i=Object.keys(e).filter(a=>this._shouldPerformMigration(a,n,r)),o={...this.store};for(let a of i)try{s&&s(this,{fromVersion:n,toVersion:a,finalVersion:r,versions:i});let c=e[a];c?.(this),this._set(Zn,a),n=a,o={...this.store}}catch(c){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${c}`)}(this._isVersionInRangeFormat(n)||!Qe.default.eq(n,r))&&this._set(Zn,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===Lr?!0:typeof e!="string"?!1:z(this,ae,"f").accessPropertiesByDotNotation?!!e.startsWith(`${Lr}.`):!1}_isVersionInRangeFormat(e){return Qe.default.clean(e)===null}_shouldPerformMigration(e,r,s){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&Qe.default.satisfies(r,e)?!1:Qe.default.satisfies(s,e):!(Qe.default.lte(e,r)||Qe.default.gt(e,s))}_get(e,r){return oi(this.store,e,r)}_set(e,r){let{store:s}=this;Xr(s,e,r),this.store=s}};function Np(t){let e=t.replace(/^\uFEFF/,"");return JSON.parse(e)}var hc=class{constructor(e){this.config=new tr({...e,clearInvalidConfig:!0,deserialize:Np})}get(e){try{return this.config.get(e)}catch(r){this.handleError(r,"get")}}set(e,r){try{this.config.set(e,r)}catch(s){this.handleError(s,"set")}}delete(e){try{this.config.delete(e)}catch(r){this.handleError(r,"delete")}}clear(){try{this.config.clear()}catch(e){this.handleError(e,"clear")}}handleError(e,r){throw this.isPermissionError()?new si(`Failed to access local storage (${r}): ${e}`,this.tryMessage()):new ni(`Unexpected error while accessing local storage at ${this.config.path} (${r}): ${e}`)}isPermissionError(){let e=Jr(this.config.path),r=Jr(rr(this.config.path)),s=sr(this.config.path);return!e||!r||s===!1}tryMessage(){let e=sr(this.config.path),r=sr(rr(this.config.path)),s=["Check that you have write permissions for",{filePath:this.config.path}];return(e===!1||r===!1)&&s.push("- The file is owned by a different user. This typically happens when Shopify CLI was previously run with elevated permissions (e.g., sudo)."),s.push(`
9
-
10
- To resolve this, remove the Shopify CLI preferences folder:`),s.push({command:`rm -rf ${rr(this.config.path)}`}),s}};export{Kn as a,hc as b};
@@ -1,2 +0,0 @@
1
- import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-K7IZMKBR.js";import{a as oe}from"./chunk-72GN655L.js";import{a as se}from"./chunk-DHU767C3.js";import{a as z}from"./chunk-QG7TELFC.js";import{C as X,S as ee,U as te,l as W,ta as re}from"./chunk-NOKCVDYD.js";import{ba as Z}from"./chunk-6UTUJKKC.js";import{b as Y,c as K}from"./chunk-2Y6CYLKF.js";import{y as G}from"./chunk-EZ7EBYDT.js";import{i as H,u as Q}from"./chunk-6YCGMS7X.js";import{m as _}from"./chunk-ZTE46E4Z.js";import{Lb as M,Mb as S,ca as $,eb as F,fb as f,gb as o}from"./chunk-3TFUSDHY.js";import{j as V}from"./chunk-773TIA5M.js";import{a as _e}from"./chunk-CTNBSUVU.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var B=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new _(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await Fe({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=v)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
2
- `),await Se({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id}))}async function Le(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:l,organization:a}=t,p=V(s.configPath);t.format==="text"&&Pe(n.title,l.shopDomain,t.storeFqdns,p,a.businessName);let u=new Map;return u.set(l.shopId,l.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let d=await Z(a,c,i);u.set(d.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Pe(t,s,n,i,l){let a=[];n&&n.length>0?n.forEach(u=>a.push(u)):a.push(s);let p=i?W(i):void 0;Q({headline:i?`Using ${p} for default values:`:"Using these settings:",body:ee({appName:t,org:l,devStores:a,messages:[te]})})}var O=N(_e(),1);var J,I=class extends se{async run(){let{flags:s}=await this.parse(J);await X(s.path);let n=await re({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await oe({appContextResult:n,storeFqdn:s.store?.[0],forceReselectStore:s.reset}),l={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Ae(l),{app:n.app}}};J=I;I.summary="Stream detailed logs for your Shopify app.";I.descriptionWithMarkdown="\n Opens a real-time stream of detailed app logs from the selected app and store.\n Use the `--source` argument to limit output to a particular log source, such as a specific Shopify Function handle. Use the `shopify app logs sources` command to view a list of sources.\n Use the `--status` argument to filter on status, either `success` or `failure`.\n ```\n shopify app logs --status=success --source=extension.discount-function\n ```\n ";I.description=J.descriptionWithoutMarkdown();I.flags={...Y,...z,...K,store:O.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async t=>G(t)}),source:O.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:O.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};var _t=I;export{_t as a};
@@ -1,2 +0,0 @@
1
- import{$ as z,T as X,aa as j,ba as v,ca as J,da as A,ea as W,fa as k,ga as q,ha as N,ia as B,ja as L,ka as K,la as R,ma as Q}from"./chunk-NOKCVDYD.js";import{f as T,i as G,p as l}from"./chunk-6UTUJKKC.js";import{c as H}from"./chunk-AJ6VOBXU.js";import{v as U,z as x}from"./chunk-6YCGMS7X.js";import{m as C,o as P}from"./chunk-ZTE46E4Z.js";import{Hb as $,Ta as V,X as c,_ as b,qa as F,wa as I,ya as D}from"./chunk-3TFUSDHY.js";import{d as E,j as M}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Y(e){switch(e){case d.Offsite:return v;case d.CreditCard:return L;case d.CustomCreditCard:return N;case d.CustomOnsite:return k;case d.Redeemable:return A;case d.CardPresent:return R}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function Z(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);switch(i){case v:return w(e,t,J);case L:return w(e,t,K);case N:return w(e,t,B);case k:return w(e,t,q);case A:return w(e,t,W);case R:return w(e,t,Q);default:throw new Error(`Unsupported extension: ${i}`)}}function w(e,t,i){let n=(e.activeVersion??e.draftVersion)?.config;if(!n)throw new Error("No config found for extension");let r=JSON.parse(n),p=i(r,t);p&&delete p.api_version;let a=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:c(e.title.substring(0,l)),...p,targeting:[{target:`${a}`}]}]}}s();s();var pe=new Map(j.map(e=>[e[1],e[0]])),fe=(e,t)=>{let i=pe.get(e.uiType);if(!i)throw new C(`Field type ${e.uiType} is not supported`);let o={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(o.name=e.label,o.required=e.required),o},ue=(e,t)=>{let n={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(n.required=e.required),e.uiType==="marketing-activity-id"&&(n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),n},ee=(e,t)=>t?t.map(o=>o.uiType==="commerce-object-id"||o.uiType==="marketing-activity-id"||z.includes(o.uiType)?ue(o,e):fe(o,e)):[];function te(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,o;if(e.type==="flow_trigger_discovery_webhook"){let n=JSON.parse(t);o={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:c(e.title.substring(0,l)),url:n.url}]}}else{let n=JSON.parse(t),r=ee(e.type,n.fields??[]);o={extensions:[{type:e.type.replace("_definition",""),name:n.title,handle:c(e.title.substring(0,l)),description:n.description,runtime_url:n.url??i,config_page_url:n.custom_configuration_page_url,config_page_preview_url:n.custom_configuration_page_preview_url,validation_url:n.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return o}s();s();var ie=e=>{let t=e.split("#");if(t.length!==2||t.some(p=>p===""||p===void 0))throw new Error("Invalid context");let i="admin",o=de(t[0]??""),n=me(t[1]??""),r="link";return n==="selection"?[i,`${o}-index`,`${n}-action`,r].join("."):[i,`${o}-${n}`,"action",r].join(".")},me=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},de=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function ne(e,t,i){let o=e.activeVersion?.config??e.draftVersion?.config;if(!o)throw new Error("No config found for extension");let n=e.activeVersion?.context??e.draftVersion?.context;if(!n)throw new Error("No context found for link extension");let r=JSON.parse(o);if(i.embedded)try{let a=new URL(r.url),_=a.pathname.startsWith("/")?a.pathname.substring(1):a.pathname,u=new URL(`app://${_}`);u.search=a.search,u.hash=a.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:c(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(n)}]}]}}s();var ge={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},_e={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let t=new URL(e);return t.pathname+t.search+t.hash}function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:c(e.title.substring(0,l)),title:i.title,description:i.description,api_path:ye(i.app_api_url),tactic:i.tactic,marketing_channel:ge[i.platform]??"",referring_domain:_e[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:n,...r})=>r)}]}}s();function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:c(e.title.substring(0,l)),pattern:i.pattern}]}}var O=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Z},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:te},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:oe},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:re},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:ne}];function se(e){return O.filter(t=>t.extensionTypes.some(i=>e.some(o=>o.type.toLowerCase()===i.toLowerCase())))}async function ft(e){if(e.length===1&&e[0])return e[0];let t=e.map(n=>({label:n.label,value:n.value})),i=await x({message:"Extension type to migrate",choices:t}),o=e.find(n=>n.value===i);if(o===void 0)throw new C("Invalid migration choice");return o}s();var vt=O.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),o=E(t.directory,G.extensions.directoryName,i);if(await V(o)){let n=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await x({message:`Directory "${i}" already exists. What would you like to do?`,choices:n});if(r===g.Cancel)throw new P;return{directory:o,action:r}}return await I(o),await F(E(o,T.lockFile)),{directory:o,action:g.Write}}async function Ce(e){let{app:t,remoteApp:i,extensionTypes:o,extensions:n,buildExtensionConfig:r,all:p}=e,a=n.filter(f=>o.includes(f.type.toLowerCase()));if(a=we(t,a),a.length===0)throw new C("No extensions to migrate");if(!p){let f=a.map(y=>({label:y.title,value:y.uuid}));a.length>1&&f.push({label:"All",value:"All"});let m=await x({message:"Extensions to migrate",choices:f});m!=="All"&&(a=[a.find(y=>y?.uuid===m)])}let _={},u=a.map(async f=>{let{directory:m,action:y}=await Ee({app:t,name:f.title}),ae=c(f.title.substring(0,l));if(_[ae]=f.uuid,y===g.Write){let S=r(f,n,t.configuration),ce=E(m,"shopify.extension.toml");await new H(ce,S).replace(S);let le=E(m,T.lockFile);await D(le)}return{extension:f,directory:E("extensions",M(m))}}),h=await Promise.all(u);xe(h),await X({app:t,appApiKey:i.apiKey,extensionUuids:_,command:"import-extensions"})}function we(e,t){let i=e.dotenv?.variables??{},o=e.allExtensions.map(n=>i[n.idEnvironmentVariableName]);return t.filter(n=>!o.includes(n.uuid))}async function At(e){let t=se(e.extensions);await Promise.all(t.map(async i=>Ce({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function xe(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>$`• "${t.extension.title}" at: ${t.directory}`.value).join(`
2
- `)})}s();async function Lt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:o,onlyDashboardManaged:n=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:p,extensionRegistrations:a}=r.app;return(n?p:a.concat(p)).filter(u=>{let h=o.includes(u.type.toLowerCase()),f=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(f??m)})}export{se as a,ft as b,vt as c,Ce as d,we as e,At as f,Lt as g};
@@ -1,11 +0,0 @@
1
- import{a as E}from"./chunk-FKIVKNOV.js";import{a as S}from"./chunk-DHU767C3.js";import{a as C}from"./chunk-QG7TELFC.js";import{F as x,_ as y,i as F,ta as P}from"./chunk-NOKCVDYD.js";import{b as f}from"./chunk-CXWLHQKA.js";import{b as w}from"./chunk-2Y6CYLKF.js";import{Fb as n,Hb as d,Lb as v,Ta as h,ma as g,ua as l}from"./chunk-3TFUSDHY.js";import{f as u}from"./chunk-773TIA5M.js";import{a as $}from"./chunk-CTNBSUVU.js";import{e as k,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function _({app:c,remoteApp:t,organization:o,envFile:e}){await y(t,o.source);let r={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:F(c.configuration)};if(await h(e)){let a=await g(e),s=f(a,r);if(s===a)return d`No changes to ${n.path(e)}`;{await l(e,s);let I=E(a??"",s);return d`Updated ${n.path(e)} to be:
2
-
3
- ${s}
4
-
5
- Here's what changed:
6
-
7
- ${n.linesDiff(I)}
8
- `}}else{let a=f(null,r);return await l(e,a),d`Created ${n.path(e)}:
9
-
10
- ${a}
11
- `}}var b=k($(),1);var m,i=class extends S{async run(){let{flags:t}=await this.parse(m),{app:o,remoteApp:e,organization:r}=await P({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),a=u(o.directory,t["env-file"]??x(o.configPath));return v(await _({app:o,remoteApp:e,organization:r,envFile:a})),{app:o}}};m=i;i.summary="Pull app and extensions environment variables.";i.descriptionWithMarkdown="Creates or updates an `.env` files that contains app and app extension environment variables.\n\n When an existing `.env` file is updated, changes to the variables are displayed in the terminal output. Existing variables and commented variables are preserved.";i.description=m.descriptionWithoutMarkdown();i.flags={...w,...C,"env-file":b.Flags.string({hidden:!1,description:"Specify an environment file to update if the update flag is set",env:"SHOPIFY_FLAG_ENV_FILE"})};var j=i;export{j as a};
@@ -1 +0,0 @@
1
- import{b as a}from"./chunk-LWRDNTAD.js";import{b as s}from"./chunk-2MCH43SL.js";import{Ca as i}from"./chunk-EZ7EBYDT.js";import{a as m}from"./chunk-CTNBSUVU.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static{this.description="List current notifications configured for the CLI."}static{this.hidden=!0}static{this.flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})}}async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
@@ -1 +0,0 @@
1
- import{b as E}from"./chunk-2Y6CYLKF.js";import{b}from"./chunk-2MCH43SL.js";import{M as F,N}from"./chunk-6YCGMS7X.js";import{Mb as k,S as C,Ta as w,ma as O}from"./chunk-3TFUSDHY.js";import{u as n}from"./chunk-A4SBXDZB.js";import{j as R}from"./chunk-J3IHP46B.js";import{d as u,f as P,g as x,h as g,n as T,q as y}from"./chunk-773TIA5M.js";import{a as U}from"./chunk-CTNBSUVU.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{constructor(){this.assertions=[],this.registeredTests=[]}async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let i of this.registeredTests){this.assertions=[];let s=Date.now();try{await i.fn(),e.push({name:i.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:i.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let i=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:i,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let i=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:i,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,i){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:i??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:i??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,i){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:i??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:i??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:i??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,i){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:i??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,i){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:i??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:i??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:i??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,i){this.assertions.push({description:i,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};m.description="Doctor test suite";var p=class extends m{constructor(){super(...arguments);this.themeName="";this.themePath=""}static{this.description="Tests the theme init command creates a valid theme structure"}tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let e=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(e),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let e=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(e.map(i=>this.assertFile(u(this.themePath,i))))}),this.test("theme directories exist",async()=>{let e=["sections","snippets","assets","locales"];await Promise.all(e.map(i=>this.assertDirectory(u(this.themePath,i))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static{this.description="Tests pushing a theme to the store creates an unpublished theme"}static{this.requiresStore=!0}tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let i=await this.run(e);this.assertSuccess(i);let s=this.assertJson(i,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(o){return{workingDirectory:o.path??y(),environment:o.environment,store:o.store,password:o.password,data:{}}}d();var a=o=>k(o),v;function J(o){v=o}function G(o){if(!v)return o;let t=/\/[^\s,)]+/g;return o.replace(t,e=>T(e,v))}function A(o,t){a(""),a(n.bold(n.cyan(`Suite: ${o}`))),a(n.dim(t))}function j(o){a(n.bold(n.blue(`Running: ${o}`)))}function q(o){let t=`(${(o.duration/1e3).toFixed(2)}s)`;if(o.status==="passed"){a(n.bold(n.green(`PASSED: ${o.name} ${n.dim(t)}`)));for(let e of I(o.assertions))a(e)}else if(o.status==="failed"){a(n.red(`FAILED: ${o.name} ${n.dim(t)}`));for(let e of I(o.assertions))a(e);o.error&&a(n.red(` Error: ${G(o.error.message)}`))}else a(n.yellow(`SKIPPED: ${o.name}`))}function S(o){let t=o.filter(h=>h.status==="passed").length,e=o.filter(h=>h.status==="failed").length,i=o.filter(h=>h.status==="skipped").length,s=o.length,r=o.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),i>0&&a(` Skipped: ${n.yellow(String(i))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(o){return o.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(o){let t=[],e=_(o);J(e.workingDirectory);for(let i of Y){let s=new i,r=i.description??"Test suite";A(i.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class o extends b{static{this.description="Run all theme command doctor-release tests"}static{this.hidden=!0}static{this.flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})}}async run(){if(!R())return;let{flags:t}=await this.parse(o);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
@@ -1 +0,0 @@
1
- import{b as d,c as f}from"./chunk-U564K7SX.js";import{a as c}from"./chunk-M4YPMHIM.js";import{a as p}from"./chunk-QG7TELFC.js";import{e as i,ua as u}from"./chunk-NOKCVDYD.js";import{b as n}from"./chunk-2Y6CYLKF.js";import{v as e}from"./chunk-6YCGMS7X.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a,t=class extends c{async run(){let{flags:o}=await this.parse(a),{app:r}=await u({directory:o.path,userProvidedConfigName:o.config}),m=await f(r,o.path);return await i(m,{stdout:process.stdout,stderr:process.stderr,app:r}),e({headline:"GraphQL types generated successfully."}),{app:r}}};a=t;t.summary="Generate GraphQL types for a function.";t.descriptionWithMarkdown="Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...p,...d};var x=t;export{x as a};
@@ -1 +0,0 @@
1
- import{b as h}from"./chunk-V65P572N.js";import{Hb as a,Pb as u}from"./chunk-3TFUSDHY.js";import{f as I}from"./chunk-J3IHP46B.js";import{c as D}from"./chunk-UKQ7NE5V.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();var p;(function(e){e.Local="local",e.Production="production"})(p||(p={}));function L(e=process.env){return e[D.serviceEnv]==="local"?p.Local:p.Production}function v(e=process.env){return L(e)===p.Local}var S;function n(){return S??(S=new h({projectName:`shopify-cli-kit${I()?"-test":""}`})),S}function g(){return v()?"devSessionStore":"sessionStore"}function x(){return v()?"currentDevSessionId":"currentSessionId"}function M(e=n()){return u(a`Getting session store...`),e.get(g())}function N(e,t=n()){u(a`Setting session store...`),t.set(g(),e)}function O(e=n()){u(a`Removing session store...`),e.delete(g())}function F(e=n()){return u(a`Getting current session ID...`),e.get(x())}function T(e,t=n()){u(a`Setting current session ID...`),t.set(x(),e)}function V(e=n()){u(a`Removing current session ID...`),e.delete(x())}async function W(e,t,r,o=n()){let c=b(e,o);if(c?.value!==void 0&&(r===void 0||Date.now()-c.timestamp<r))return c.value;let i=await t();return P(e,i,o),i}function P(e,t,r=n()){let o=r.get("cache")??{};o[e]={value:t,timestamp:Date.now()},r.set("cache",o)}function b(e,t=n()){return(t.get("cache")??{})[e]}function _(e=n()){e.delete("cache")}function y({days:e=0,hours:t=0,minutes:r=0,seconds:o=0}){return(e*24*60*60+t*60*60+r*60+o)*1e3}async function q(e,t,r,o=n()){let c=o.get("cache")??{},i=`most-recent-occurrence-${e}`,s=c[i];return s?.value!==void 0&&Date.now()-s.timestamp<y(t)?!1:(await r(),c[i]={value:!0,timestamp:Date.now()},o.set("cache",c),!0)}async function z(e,t=n()){let{key:r,limit:o,timeout:c,task:i}=e,s=t.get("cache")??{},m=`rate-limited-occurrences-${r}`,w=s[m],l=Date.now();if(w?.value){let C=l-y(c),d=w.value.filter(E=>E>=C);if(d.length>=o)return s[m]={value:d,timestamp:Date.now()},t.set("cache",s),!1;await i(),s[m]={value:[...d,l],timestamp:l}}else await i(),s[m]={value:[l],timestamp:l};return t.set("cache",s),!0}function B(e=n()){return e.get("autoUpgradeEnabled")??!0}function H(e,t=n()){t.set("autoUpgradeEnabled",e)}function A(){return new h({projectName:"shopify-cli-kit-partner-status"})}function J(e){return e&&A().get(e)?!0:null}function Q(e){A().set(e,{status:!0,checkedAt:new Date().toISOString()})}export{p as a,L as b,v as c,M as d,N as e,O as f,F as g,T as h,V as i,W as j,P as k,b as l,_ as m,y as n,q as o,z as p,B as q,H as r,A as s,J as t,Q as u};
@@ -1 +0,0 @@
1
- import{g as t}from"./chunk-VKWPEFWQ.js";t();var n;function r(){return n??(n={currentCommandId:""}),n}function o(){return r().currentCommandId}function d(e){r().currentCommandId=e}export{o as a,d as b};
@@ -1,2 +0,0 @@
1
- import{Fb as e,Hb as r,Pb as n,Ta as o,ua as g,wa as d}from"./chunk-3TFUSDHY.js";import{d as i}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var f=".shopify";async function E(p){let t=i(p,f),a=i(t,".gitignore"),[h,u]=await Promise.all([o(t),o(a)]);return h||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await d(t)),u||(n(r`Creating .gitignore in ${e.path(t)}...`),await g(a,`# Ignore the entire ${f} directory
2
- *`)),t}export{E as a};
@@ -1 +0,0 @@
1
- import{l as u,m as t,u as h}from"./chunk-ZTE46E4Z.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var o=e=>new a(e),s=e=>new n(e),a=class{constructor(r){this.value=r}isErr(){return!1}doOnOk(r){return r(this.value),o(this.value)}valueOrBug(){return this.value}valueOrAbort(){return this.value}map(r){return o(r(this.value))}mapError(r){return o(this.value)}},n=class{constructor(r){this.error=r}isErr(){return!0}doOnOk(r){return s(this.error)}valueOrBug(){throw this.error}valueOrAbort(){if(this.error instanceof u)throw this.error;if(this.error instanceof h.ExtendableError||this.error instanceof Error){let r=new t(this.error.message);throw r.stack=this.error.stack,r}else throw new t(`${this.error}`)}map(r){return s(this.error)}mapError(r){return s(r(this.error))}};export{o as a,s as b};
@@ -1,5 +0,0 @@
1
- import{a as v}from"./chunk-72GN655L.js";import{a as h}from"./chunk-DHU767C3.js";import{a as l}from"./chunk-QG7TELFC.js";import{ta as c}from"./chunk-NOKCVDYD.js";import{b as m}from"./chunk-2Y6CYLKF.js";import{y as i}from"./chunk-EZ7EBYDT.js";import{v as n}from"./chunk-6YCGMS7X.js";import{m as d}from"./chunk-ZTE46E4Z.js";import{a as S}from"./chunk-CTNBSUVU.js";import{e as C,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function f(o){let e=o.appContextResult.developerPlatformClient,r=o.appContextResult.remoteApp,s=await e.devSessionDelete({shopFqdn:o.store.shopDomain,appId:r.id});if(s.devSessionDelete?.userErrors.length){let w=s.devSessionDelete.userErrors.map(g=>g.message).join(`
2
- `);throw new d(`Failed to stop the dev preview: ${w}`)}n({headline:"Dev preview stopped.",body:[`The dev preview has been stopped on ${o.store.shopDomain} and the app's active version has been restored.`,"You can start it again with",{command:"shopify app dev"}]})}var u=C(S(),1);var p,t=class extends h{async run(){let{flags:e}=await this.parse(p),r=await c({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),s=await v({appContextResult:r,storeFqdn:e.store,forceReselectStore:e.reset});return await f({appContextResult:r,store:s}),{app:r.app}}};p=t;t.summary="Cleans up the dev preview from the selected store.";t.descriptionWithMarkdown=`Stop the dev preview that was started with \`shopify app dev\`.
3
-
4
- It restores the app's active version to the selected development store.
5
- `;t.description=p.descriptionWithoutMarkdown();t.flags={...m,...l,store:u.Flags.string({hidden:!1,char:"s",description:"Store URL. Must be an existing development store.",env:"SHOPIFY_FLAG_STORE",parse:async o=>i(o)})};var L=t;export{L as a};
@@ -1,3 +0,0 @@
1
- import{a as ce}from"./chunk-ILQXBASM.js";import{d as de}from"./chunk-2Y6CYLKF.js";import{a as ue,b as me}from"./chunk-2MCH43SL.js";import{F as L,O as U,a as ee,sa as te,ua as N,va as re,y as w}from"./chunk-EZ7EBYDT.js";import{b as x}from"./chunk-V65P572N.js";import{A as ie,a as Z,t as se,w as R,x as I}from"./chunk-6YCGMS7X.js";import{d as oe,e as ne}from"./chunk-VZKR2YFM.js";import{m as F,p as ae}from"./chunk-ZTE46E4Z.js";import{Fa as X,Fb as q,Hb as l,Pb as h,Ua as _}from"./chunk-3TFUSDHY.js";import{d as Q,f as k,i as V,q as $}from"./chunk-773TIA5M.js";import{a as Ie}from"./chunk-CTNBSUVU.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var O={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?X(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${V(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>$(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},pe="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${pe}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${pe}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var fe=new _e,j,D,M,B;function S(){return j??(j=new x({projectName:"shopify-cli-theme-conf"})),j}function G(){return D??(D=new x({projectName:"shopify-cli-development-theme-config"})),D}function H(){return M??(M=new x({projectName:"shopify-cli-repl-theme-config"})),M}function z(){return B??(B=new x({projectName:"shopify-cli-theme-store-password"})),B}function Y(t=S()){return fe.getStore()?.store??t.get("themeStore")}function he(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),G().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),G().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),G().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),H().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),H().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),H().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),z().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),z().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),z().delete(e)}function v(t=S()){let e=Y(t);if(!e)throw new ae("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function le(t,e){return fe.run({store:t},e)}function Se(t){let e=t.store??Y();if(!e)throw te(new F("A store is required",`Specify the store passing ${l`${q.genericShellCommand(`--${O.store.name}=example.myshopify.com`)}`.value} or set the ${l`${q.genericShellCommand(O.store.env)}`.value} environment variable.`));return he(e),e}f();f();var ge="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],mt=50;f();f();var J="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,W;function P(){return W??(W=new x({projectName:Fe})),W}function b(t){return`${J}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function $e(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function Pe(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function K(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${J}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=K(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=K(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=K(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var C=class extends me{environmentsFilename(){return ge}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(N(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){R({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(ue(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await ce(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),ie(s)}async runConcurrent(e){let o=new Z,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await se({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await le(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();N(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
2
-
3
- ${A.message}`,I({body:[A.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(r=>{let n=o.find(i=>!i.some(s=>s.flags.store===r.flags.store));n?n.push(r):o.push([r])}),o}async createSession(e,o){let r=Se({store:e.store}),n=e.password;return n?await U(r,n):o??await this.storeAuthSessionForTheme({store:r})??await U(r,n)}async storeAuthSessionForTheme(e){let o=this.storeAuthScopes();if(!o)return;let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!r||n)return;let i=w(r),s=Ae(i);if(s)return this.adminSessionFromStoreAuthSession(s,i,o)}storeAuthSessionsForTheme(e){let o=this.storeAuthScopes();if(!o)return new Map;let r=new Set(e.filter(({store:n,password:i})=>typeof n=="string"&&!i).map(({store:n})=>w(n)));return r.size===0?new Map:new Map(we().map(n=>{let i=w(n.store);if(!r.has(i))return;let s=this.adminSessionFromStoreAuthSession(n,i,o);return s?[i,s]:void 0}).filter(n=>n!==void 0))}storeAuthSessionFromCache(e,o){let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!(!r||n))return o.get(w(r))}adminSessionFromStoreAuthSession(e,o,r){if(ve(e)){h(`Ignoring stored store auth session for ${o}: it expired at ${e.expiresAt??"unknown"}.`);return}if(!this.hasRequiredStoreAuthScopes(e.scopes,r)){h(`Ignoring stored store auth session for ${o}: it is missing required scopes (has: ${e.scopes.join(", ")}; needs: ${r.join(", ")}).`);return}return h(`Using stored store auth session for ${o} (scopes: ${e.scopes.join(", ")}).`),L(e.userId),{token:e.accessToken,storeFqdn:o}}expandImpliedStoreAuthScopes(e){let o=new Set(e);for(let r of e){let n=r.match(/^(unauthenticated_)?write_(.*)$/);n&&o.add(`${n[1]??""}read_${n[2]}`)}return o}hasRequiredStoreAuthScopes(e,o){let r=this.expandImpliedStoreAuthScopes(e);return o.every(n=>r.has(n))}validConfig(e,o,r,n){let i=o.filter(s=>Array.isArray(s)?!s.some(a=>this.hasRequiredFlag(e,a,n)):!this.hasRequiredFlag(e,s,n)).map(s=>Array.isArray(s)?s.join(" or "):s);return i.length>0?(R({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:i}}]}),i):!0}hasRequiredFlag(e,o,r){return o==="password"&&r?!0:!!e[o]}errorOnGlobalPath(){let e=Q($(),"shopify.theme.toml"),o=_(e);I({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=re();await oe(()=>({store_fqdn_hash:ee(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await ne(()=>({store_fqdn:e.storeFqdn}))}};C.baseFlags=de;var Mt=C;export{J as a,we as b,Ae as c,wt as d,At as e,Y as f,He as g,ze as h,Ye as i,Je as j,We as k,Ke as l,Qe as m,Ve as n,Xe as o,O as p,qe as q,Se as r,ct as s,ut as t,mt as u,Mt as v};
@@ -1,6 +0,0 @@
1
- import{a as o}from"./chunk-GCN4O7HM.js";import{b as r}from"./chunk-2MCH43SL.js";import{q as i}from"./chunk-WR2ZQGUR.js";import{u as e}from"./chunk-6YCGMS7X.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
2
-
3
- When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
4
-
5
- Run \`shopify config autoupgrade on\` or \`shopify config autoupgrade off\` to configure it.
6
- `}static{this.description=this.descriptionWithoutMarkdown()}async run(){i()?e({body:o.on}):e({body:o.off})}};export{t as a};