vitepress-openapi 0.2.8 → 0.2.9

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 (158) hide show
  1. package/dist/{angular-html-uv0a0QNn.js → angular-html-B1XELn26.js} +2 -2
  2. package/dist/{angular-html-IrYiNUL5.cjs → angular-html-rIG_zEfF.cjs} +1 -1
  3. package/dist/{angular-ts-CVTzQ4yM.js → angular-ts-DXqtm5IU.js} +2 -2
  4. package/dist/{angular-ts-CmalYPic.cjs → angular-ts-f2TIFV5M.cjs} +1 -1
  5. package/dist/{apl-G7yswX6Q.js → apl-B1OCEGWr.js} +5 -5
  6. package/dist/{apl-Cp2eHb5H.cjs → apl-Ci3ALcue.cjs} +1 -1
  7. package/dist/{astro-CRpTyG5K.cjs → astro-CvLdnrh3.cjs} +1 -1
  8. package/dist/{astro-DUi5zMa4.js → astro-D1h7VNXE.js} +5 -5
  9. package/dist/{blade-DMsLIvGX.cjs → blade-Cwi6STL9.cjs} +1 -1
  10. package/dist/{blade-uJ4Xa5wc.js → blade-DhZOZtfj.js} +7 -7
  11. package/dist/{c-CtMd0n5W.js → c-7YqkXL9Z.js} +1 -1
  12. package/dist/{c-DJDNxT35.cjs → c-C7EnZWQp.cjs} +1 -1
  13. package/dist/{chapel-CCgxhb9n.cjs → chapel-BnA0bPCH.cjs} +1 -1
  14. package/dist/{chapel-DGgSBAIm.js → chapel-JTgeOnk1.js} +1 -1
  15. package/dist/{cobol-CDcij9i2.js → cobol-BTWAs8is.js} +2 -2
  16. package/dist/{cobol-DP8yLe0J.cjs → cobol-CP7NwoJy.cjs} +1 -1
  17. package/dist/{coffee-D3hXAm0d.cjs → coffee-LJIPHo3K.cjs} +1 -1
  18. package/dist/{coffee-Bcg2ycks.js → coffee-WesP7zhC.js} +1 -1
  19. package/dist/{cpp-CEMyuz0Z.cjs → cpp-Cbp1scY6.cjs} +1 -1
  20. package/dist/{cpp-CfsSSf1b.js → cpp-DAQpXhG0.js} +3 -3
  21. package/dist/{crystal-B76s5RL_.js → crystal-B4idWfGx.js} +6 -6
  22. package/dist/{crystal-BPjfGQfv.cjs → crystal-ChvXSZhJ.cjs} +1 -1
  23. package/dist/{css-B_5YxPHw.cjs → css-DddeWnQl.cjs} +1 -1
  24. package/dist/{css-Dnve9eIF.js → css-GGKvWM3L.js} +1 -1
  25. package/dist/{edge-Dlu9JAOU.js → edge-CtXsoVCh.js} +3 -3
  26. package/dist/{edge-DEHYswlE.cjs → edge-DwK7rLUo.cjs} +1 -1
  27. package/dist/{elixir-CKhKSpjp.cjs → elixir-Bgu3U6Wa.cjs} +1 -1
  28. package/dist/{elixir-CSK8G02U.js → elixir-D83eYIIE.js} +1 -1
  29. package/dist/{elm-CsVe-drn.js → elm-DpgO83wp.js} +1 -1
  30. package/dist/{elm-oUMNo4dE.cjs → elm-lX9Roq8z.cjs} +1 -1
  31. package/dist/{erb-3PcpbjWs.js → erb-BQVZ9HCP.js} +2 -2
  32. package/dist/{erb-B8WJz_Ls.cjs → erb-D4GvUbRw.cjs} +1 -1
  33. package/dist/{git-rebase-CBj8NRO-.cjs → git-rebase-BL2dAbMZ.cjs} +1 -1
  34. package/dist/{git-rebase-BFPUa7RP.js → git-rebase-Rrq2ZWm2.js} +1 -1
  35. package/dist/{glimmer-js-C06d46qf.js → glimmer-js-DWVebztp.js} +4 -4
  36. package/dist/{glimmer-js-BkM2LzJ_.cjs → glimmer-js-kdiBETU4.cjs} +1 -1
  37. package/dist/{glimmer-ts-B9TsQ9YM.cjs → glimmer-ts-2i4ik6-X.cjs} +1 -1
  38. package/dist/{glimmer-ts-BfZJAJhH.js → glimmer-ts-BR-tSF2n.js} +4 -4
  39. package/dist/{glsl-Bl7M-IPe.js → glsl-NrFCE9B3.js} +2 -2
  40. package/dist/{glsl-uL1y-Bk6.cjs → glsl-XEAEz2VT.cjs} +1 -1
  41. package/dist/{graphql-UjpB-MIz.cjs → graphql-Cafwg7BL.cjs} +1 -1
  42. package/dist/{graphql-j5wYAqtD.js → graphql-L_gmMBRF.js} +5 -5
  43. package/dist/{hack-DC3gQB4E.cjs → hack-BPeNRA1P.cjs} +1 -1
  44. package/dist/{hack-BN-XE31l.js → hack-CFPozk9L.js} +2 -2
  45. package/dist/{haml-CDfF0h4F.js → haml-Dnt1of6J.js} +3 -3
  46. package/dist/{haml-Bhy5P-KC.cjs → haml-kHWYo3MO.cjs} +1 -1
  47. package/dist/{handlebars-CNE9oFMe.cjs → handlebars-Cp6KipX3.cjs} +1 -1
  48. package/dist/{handlebars-BRDXZqV4.js → handlebars-DzeI5biV.js} +4 -4
  49. package/dist/{html-CPA7KoKg.js → html-CD7xOHw5.js} +3 -3
  50. package/dist/{html-DF6ZRDg_.cjs → html-DlNGDfk2.cjs} +1 -1
  51. package/dist/{html-derivative-D7b_E1PX.cjs → html-derivative-CFtmvvi-.cjs} +1 -1
  52. package/dist/{html-derivative-61htNTyH.js → html-derivative-Cb94qT-w.js} +1 -1
  53. package/dist/{http-BjRzGfMq.cjs → http-DSs5YpUC.cjs} +1 -1
  54. package/dist/{http-CR6vxe-f.js → http-TK3fYlls.js} +4 -4
  55. package/dist/{hurl-DR3Ao4uN.js → hurl-BfEx9X4Q.js} +2 -2
  56. package/dist/{hurl-Dz53E_EO.cjs → hurl-wYovbyGz.cjs} +1 -1
  57. package/dist/{java-rdA6e0wp.cjs → java-7h-cze_O.cjs} +1 -1
  58. package/dist/{java-BCOO6DGx.js → java-Cg0ETIHg.js} +1 -1
  59. package/dist/{javascript-4PA_CVZC.cjs → javascript-BNQL6umw.cjs} +1 -1
  60. package/dist/{javascript-B0H0Bm6m.js → javascript-BzzJDFzo.js} +1 -1
  61. package/dist/{jinja-DdO6Tf4t.js → jinja-IbZE90jR.js} +1 -1
  62. package/dist/{jinja-BcxYV4gu.cjs → jinja-Oa5J7fUC.cjs} +1 -1
  63. package/dist/{jison-CmQksr2y.js → jison-BSBE0rWh.js} +1 -1
  64. package/dist/{jison-BJENBrIF.cjs → jison-BSMwaMLb.cjs} +1 -1
  65. package/dist/{json-BJ_bvg_A.cjs → json-De9V2v7R.cjs} +1 -1
  66. package/dist/{json-Dd3OP7m9.js → json-KEsWV5Ng.js} +1 -1
  67. package/dist/{jsx-CaK8syd3.cjs → jsx-BSapmhxJ.cjs} +1 -1
  68. package/dist/{jsx-BhoiPRal.js → jsx-CeAAZrLd.js} +1 -1
  69. package/dist/{julia-CDeyMHwa.js → julia-BZFATeHL.js} +4 -4
  70. package/dist/{julia-DdPKjdf7.cjs → julia-xcZKc5Ew.cjs} +1 -1
  71. package/dist/{just-Db1lRieD.js → just-CMG_0Fcq.js} +5 -5
  72. package/dist/{just-B3mF2_pd.cjs → just-D18H_x3N.cjs} +1 -1
  73. package/dist/{latex-D73GL9tM.js → latex-CV2tVWCk.js} +1 -1
  74. package/dist/{latex-DyUb8gG5.cjs → latex-CtVwg9F3.cjs} +1 -1
  75. package/dist/{liquid-DF-tIke9.js → liquid-CGMhEsSb.js} +4 -4
  76. package/dist/{liquid-CztsYCRo.cjs → liquid-Dp13YYeR.cjs} +1 -1
  77. package/dist/{lua-xXZSPcKB.js → lua-AaCey3qg.js} +2 -2
  78. package/dist/{lua-Cg38zrfV.cjs → lua-Ch_W9mH8.cjs} +1 -1
  79. package/dist/{marko-BuXulXH5.cjs → marko-C5qkRYFl.cjs} +1 -1
  80. package/dist/{marko-D-oNtuqC.js → marko-CBVMpjgt.js} +3 -3
  81. package/dist/{mdc-FTCNLElJ.js → mdc-BDRDuMS7.js} +2 -2
  82. package/dist/{mdc-CXK0bw8f.cjs → mdc-BMY__-lv.cjs} +1 -1
  83. package/dist/{nginx-C7lNZZWT.js → nginx-CtvX9zIL.js} +1 -1
  84. package/dist/{nginx-Cgnh7QO-.cjs → nginx-D85LWKUU.cjs} +1 -1
  85. package/dist/{nim-DIkmkdRK.js → nim-BlruIwKi.js} +6 -6
  86. package/dist/{nim-D3q9r1nf.cjs → nim-CyM3gSu_.cjs} +1 -1
  87. package/dist/{org-CsORUXsX.js → org-8WaPnqtv.js} +26 -26
  88. package/dist/{org-Be03OJi3.cjs → org-BCFMP1HF.cjs} +1 -1
  89. package/dist/{perl-DzKqYwtD.js → perl-CAdQB2tx.js} +5 -5
  90. package/dist/{perl-jEpH5QnN.cjs → perl-DkYI6GA4.cjs} +1 -1
  91. package/dist/{php-Cd0xNNLC.cjs → php-CCrUGZVW.cjs} +1 -1
  92. package/dist/{php-MrcCGNBb.js → php-_x3_l_UU.js} +6 -6
  93. package/dist/{pug-tintEWep.cjs → pug-DzKmLctf.cjs} +1 -1
  94. package/dist/{pug-7jPx_35W.js → pug-hly27XLj.js} +3 -3
  95. package/dist/{qml-BYzhsmnS.cjs → qml-D-XitYWS.cjs} +1 -1
  96. package/dist/{qml-6QUtoeWA.js → qml-D_bIW4fQ.js} +1 -1
  97. package/dist/{r-Bwq_agHo.cjs → r-C0mb1qAW.cjs} +1 -1
  98. package/dist/{r-DSFCAodN.js → r-Crtx_Rj8.js} +1 -1
  99. package/dist/{razor-kZ9VMhh7.js → razor-CNmNW5in.js} +1 -1
  100. package/dist/{razor-GHEO8ZrJ.cjs → razor-DW4mGGX9.cjs} +1 -1
  101. package/dist/{regexp-C4cLyNsj.js → regexp-CVT3nhGv.js} +1 -1
  102. package/dist/{regexp-BTPSBkuS.cjs → regexp-DXSU4ubT.cjs} +1 -1
  103. package/dist/{rst-DC596VAb.cjs → rst-B5KTR2vb.cjs} +1 -1
  104. package/dist/{rst-Celv7pzQ.js → rst-BhA6XXbN.js} +6 -6
  105. package/dist/{ruby-CMUkZc4V.js → ruby-CEbJCOQJ.js} +12 -12
  106. package/dist/{ruby-CkA4Oavu.cjs → ruby-CUw63IwB.cjs} +1 -1
  107. package/dist/{sas-CWtZaM4y.cjs → sas-6_2bmt_p.cjs} +1 -1
  108. package/dist/{sas-DM3UyDFg.js → sas-UnkqfIql.js} +1 -1
  109. package/dist/{scss-LkHhJo18.cjs → scss-Cj6kiN3V.cjs} +1 -1
  110. package/dist/{scss-Ce0za1qK.js → scss-CtC0Ahui.js} +2 -2
  111. package/dist/{shellscript-CiDBNSSV.cjs → shellscript-B77I5Ggp.cjs} +1 -1
  112. package/dist/{shellscript-DfQbZbZv.js → shellscript-DuIgASGN.js} +1 -1
  113. package/dist/{shellsession-VJTxH3Qp.cjs → shellsession-BI9ZpV8b.cjs} +1 -1
  114. package/dist/{shellsession-B-u2-M3U.js → shellsession-DmtSuVxo.js} +1 -1
  115. package/dist/{soy-K4I5GWmG.js → soy-CrunrCzs.js} +1 -1
  116. package/dist/{soy-CFhgAJvR.cjs → soy-iSOjWcJx.cjs} +1 -1
  117. package/dist/{sql-jusQgRuy.js → sql-Cde1eu3c.js} +1 -1
  118. package/dist/{sql-CySKVD8Q.cjs → sql-CyoUs2h4.cjs} +1 -1
  119. package/dist/{stata-9iclJTGl.cjs → stata-ChVO1eIY.cjs} +1 -1
  120. package/dist/{stata-B0U1mDy6.js → stata-SoHdZt6f.js} +1 -1
  121. package/dist/{surrealql-DysQv_VH.cjs → surrealql-AyXmOtPo.cjs} +1 -1
  122. package/dist/{surrealql-6aGCR7SU.js → surrealql-Bwe12AZT.js} +1 -1
  123. package/dist/{svelte-B9UOpTL8.js → svelte-5ylhl1aX.js} +3 -3
  124. package/dist/{svelte-ZhIemg1n.cjs → svelte-6qBNWwQn.cjs} +1 -1
  125. package/dist/{templ-BaKkruXs.cjs → templ-DQeUexgT.cjs} +1 -1
  126. package/dist/{templ-CwElXEjo.js → templ-DZ18fL-0.js} +2 -2
  127. package/dist/{tex-kQHmfFkX.js → tex-Bu4Cft9y.js} +2 -2
  128. package/dist/{tex-CwQDQCX_.cjs → tex-grxyCd6F.cjs} +1 -1
  129. package/dist/{ts-tags-BkcgKPdU.js → ts-tags-ChoZiVav.js} +7 -7
  130. package/dist/{ts-tags-Dqqv0wS7.cjs → ts-tags-DWyJqpzh.cjs} +1 -1
  131. package/dist/{tsx-tC9_eQM0.js → tsx-BVZRMVCS.js} +1 -1
  132. package/dist/{tsx-TxRbY_MS.cjs → tsx-D8K0BrmX.cjs} +1 -1
  133. package/dist/{twig-Dsriugp3.cjs → twig-CzsEUGpk.cjs} +1 -1
  134. package/dist/{twig-zezbIase.js → twig-qC2X1Ju8.js} +5 -5
  135. package/dist/{typescript-KKVXItRs.js → typescript-BnzWnec5.js} +1 -1
  136. package/dist/{typescript-BoS6yqrz.cjs → typescript-DJ3zklOW.cjs} +1 -1
  137. package/dist/{typst-B_783qIn.cjs → typst-5ZpLDH4k.cjs} +1 -1
  138. package/dist/{typst-DsM2L8MG.js → typst-Bw8BzyoB.js} +29 -29
  139. package/dist/{useOpenapi-DOw8b0Cm.cjs → useOpenapi-CfKOQmG7.cjs} +3 -3
  140. package/dist/{useOpenapi-tKaw3COz.js → useOpenapi-vxhinHuF.js} +351 -304
  141. package/dist/vitepress-openapi.client.cjs.js +2 -2
  142. package/dist/vitepress-openapi.client.es.js +76 -76
  143. package/dist/vitepress-openapi.node.cjs.js +1 -1
  144. package/dist/vitepress-openapi.node.es.js +1 -1
  145. package/dist/{vue-C-ymR46K.cjs → vue-BPajHkJ2.cjs} +1 -1
  146. package/dist/{vue-B58kMEAQ.js → vue-DwyDZ4RX.js} +6 -6
  147. package/dist/{vue-html-B8vwCoQU.js → vue-html-Cj4_bNem.js} +1 -1
  148. package/dist/{vue-html-qs-Ree4R.cjs → vue-html-pQ4URscA.cjs} +1 -1
  149. package/dist/{vue-vine-B95XCKNF.js → vue-vine-0CAFnvXq.js} +3 -3
  150. package/dist/{vue-vine-Nsb-fhNk.cjs → vue-vine-BxsDBvMs.cjs} +1 -1
  151. package/dist/{xml-DzTGxXsy.cjs → xml-CqFmiD9z.cjs} +1 -1
  152. package/dist/{xml-B119d3-g.js → xml-PSx8kIzM.js} +2 -2
  153. package/dist/{xsl-CEz1476V.js → xsl-BJXJ9U2q.js} +1 -1
  154. package/dist/{xsl-xWljPYeJ.cjs → xsl-BsFSS-SN.cjs} +1 -1
  155. package/dist/{yaml-Cd_AUGXn.cjs → yaml-BOcaVyO_.cjs} +1 -1
  156. package/dist/{yaml-B9YlAzUe.js → yaml-BsVfajRZ.js} +1 -1
  157. package/package.json +1 -1
  158. package/src/lib/examples/getSchemaUiJson.ts +118 -13
@@ -9541,7 +9541,7 @@ function Vm(e = {}) {
9541
9541
  //#endregion
9542
9542
  //#region src/composables/usePaths.ts
9543
9543
  function Hm({ spec: e, defaultTag: t = void 0, defaultTagDescription: n = void 0 }) {
9544
- let r = Vm({ spec: T_().transformSync({
9544
+ let r = Vm({ spec: D_().transformSync({
9545
9545
  spec: e,
9546
9546
  defaultTag: t,
9547
9547
  defaultTagDescription: n
@@ -9694,7 +9694,7 @@ function ih({ spec: e, linkPrefix: t = nh.linkPrefix, tagLinkPrefix: n = nh.tagL
9694
9694
  let s = null;
9695
9695
  function c() {
9696
9696
  if (!e) throw Error("OpenAPI spec is not provided.");
9697
- return s || (s = Vm({ spec: T_().transformSync({
9697
+ return s || (s = Vm({ spec: D_().transformSync({
9698
9698
  spec: e,
9699
9699
  defaultTag: r
9700
9700
  }) })), s;
@@ -9929,51 +9929,73 @@ function Sh(e, t) {
9929
9929
  return Array.isArray(e) ? e.map((e) => Ch(e, t)) : Ch(e, t);
9930
9930
  }
9931
9931
  function Ch(e, t) {
9932
- var n, r, i;
9932
+ var n, r, i, a;
9933
9933
  if ((n = e.meta) != null && n.isCircularReference) return "[Circular Reference]";
9934
9934
  if ((r = e.meta) != null && r.isConstant) return Dh(e);
9935
- if (kh(e, "array")) return wh(e, t);
9936
- if (Ah(e)) return Eh(e, t);
9937
- if (jh(e)) {
9938
- var a;
9935
+ if (jh(e, "array")) return wh(e, t);
9936
+ if (Lh(e)) return Rh(e, t);
9937
+ if (Mh(e)) return Eh(e, t);
9938
+ if (Nh(e)) {
9939
+ var o;
9939
9940
  return Eh({
9940
9941
  ...e,
9941
- types: [(a = e.types.find((e) => e !== "null")) == null ? "null" : a]
9942
+ types: [(o = e.types.find((e) => e !== "null")) == null ? "null" : o]
9942
9943
  }, t);
9943
9944
  }
9944
- return Fh(e) ? Ih(e, t) : Mh(e, "object") ? Th(e.properties || [], t) : Oh((i = e.types[0]) == null ? "string" : i, e.defaultValue);
9945
+ return Ph(e, "object") ? Th(e.properties || [], t) : kh((i = e.types[0]) == null ? "string" : i, e.defaultValue, t ? (a = e.constraints) == null ? void 0 : a.format : void 0);
9945
9946
  }
9946
9947
  function wh(e, t) {
9947
9948
  var n;
9948
- if (Fh(e)) return [Ih(e, t)];
9949
+ if (Lh(e)) return [Rh(e, t)];
9949
9950
  if ((n = e.meta) != null && n.hasPrefixItems && e.properties && Array.isArray(e.properties)) return e.properties.map((e) => Ch(e, t));
9950
9951
  if (e.properties && Array.isArray(e.properties)) return [Th(e.properties, t)];
9952
+ if (t) {
9953
+ let t = oo({
9954
+ ...e,
9955
+ subexamples: void 0
9956
+ });
9957
+ if (Array.isArray(t)) return t;
9958
+ }
9959
+ if (e.items) return [Ch(e.items, t)];
9951
9960
  if (e.subtype) {
9952
- var r;
9953
- return e.subtype === "object" && e.properties ? [Th(e.properties, t)] : t ? [(r = oo(e)) == null ? Oh(e.subtype, e.defaultValue) : r] : [Oh(e.subtype, e.defaultValue)];
9961
+ if (e.subtype === "object" && e.properties) return [Th(e.properties, t)];
9962
+ if (t) {
9963
+ var r, i, a;
9964
+ let t = (r = e.constraints) == null ? void 0 : r.format;
9965
+ return [(i = (a = oo(e)) == null ? Oh(e) : a) == null ? kh(e.subtype, e.defaultValue, t) : i];
9966
+ }
9967
+ return [kh(e.subtype, e.defaultValue)];
9954
9968
  }
9955
9969
  return [];
9956
9970
  }
9957
9971
  function Th(e, t) {
9958
- return e.reduce((e, n) => (kh(n, "array") ? e[n.name] = wh(n, t) : e[n.name] = Ch(n, t), e), {});
9972
+ return e.reduce((e, n) => (jh(n, "array") ? e[n.name] = wh(n, t) : e[n.name] = Ch(n, t), e), {});
9959
9973
  }
9960
9974
  function Eh(e, t) {
9961
- var n, r;
9975
+ var n, r, i;
9962
9976
  if (t) {
9963
9977
  let t = oo(e);
9964
9978
  if (t != null) return t;
9979
+ if (e.defaultValue !== void 0) return e.defaultValue;
9980
+ let n = Oh(e);
9981
+ if (n !== void 0) return n;
9965
9982
  }
9966
- return ((n = e.constraints) == null ? void 0 : n.format) === "binary" ? "" : Oh((r = e.types[0]) == null ? "string" : r, e.defaultValue);
9983
+ return ((n = e.constraints) == null ? void 0 : n.format) === "binary" ? "" : kh((r = e.types[0]) == null ? "string" : r, e.defaultValue, t ? (i = e.constraints) == null ? void 0 : i.format : void 0);
9967
9984
  }
9968
9985
  function Dh(e) {
9969
- var t;
9970
- let n = oo(e);
9971
- return n == null ? Oh((t = e.types[0]) == null ? "string" : t, e.defaultValue) : n;
9986
+ var t, n;
9987
+ let r = oo(e);
9988
+ return r == null ? kh((t = e.types[0]) == null ? "string" : t, e.defaultValue, (n = e.constraints) == null ? void 0 : n.format) : r;
9989
+ }
9990
+ function Oh(e) {
9991
+ if (!e.enum || e.enum.length === 0) return;
9992
+ let t = e.enum.find((e) => e != null);
9993
+ return t === void 0 ? e.enum[0] : t;
9972
9994
  }
9973
- function Oh(e, t) {
9995
+ function kh(e, t, n) {
9974
9996
  if (t !== void 0) return t;
9975
9997
  switch (e) {
9976
- case "string": return "string";
9998
+ case "string": return Ah(n);
9977
9999
  case "number":
9978
10000
  case "integer": return 0;
9979
10001
  case "float": return 0;
@@ -9984,41 +10006,66 @@ function Oh(e, t) {
9984
10006
  default: return;
9985
10007
  }
9986
10008
  }
9987
- function kh(e, t) {
10009
+ function Ah(e) {
10010
+ switch (e) {
10011
+ case "date-time": return "2024-01-01T00:00:00Z";
10012
+ case "date": return "2024-01-01";
10013
+ case "time": return "00:00:00";
10014
+ case "uuid": return "123e4567-e89b-12d3-a456-426614174000";
10015
+ case "email": return "user@example.com";
10016
+ case "uri":
10017
+ case "url": return "https://example.com";
10018
+ case "binary": return "";
10019
+ default: return "string";
10020
+ }
10021
+ }
10022
+ function jh(e, t) {
9988
10023
  var n;
9989
10024
  return ((n = e.types) == null ? void 0 : n.length) === 1 && e.types[0] === t;
9990
10025
  }
9991
- function Ah(e) {
10026
+ function Mh(e) {
9992
10027
  var t;
9993
10028
  return ((t = e.types) == null ? void 0 : t.length) === 1 && e.types[0] != null && mh.includes(e.types[0]);
9994
10029
  }
9995
- function jh(e) {
10030
+ function Nh(e) {
9996
10031
  var t;
9997
10032
  return (t = e.types) == null ? void 0 : t.every((e) => e && mh.includes(e));
9998
10033
  }
9999
- function Mh(e, t) {
10034
+ function Ph(e, t) {
10000
10035
  var n, r;
10001
10036
  return (n = (r = e.types) == null ? void 0 : r.includes(t)) != null && n;
10002
10037
  }
10003
- function Nh(e) {
10038
+ function Fh(e) {
10004
10039
  var t;
10005
10040
  return !!((t = e.meta) != null && t.isOneOf) && Array.isArray(e.properties);
10006
10041
  }
10007
- function Ph(e) {
10042
+ function Ih(e) {
10008
10043
  var t;
10009
10044
  return !!((t = e.meta) != null && t.isAnyOf) && Array.isArray(e.properties);
10010
10045
  }
10011
- function Fh(e) {
10012
- return Nh(e) || Ph(e);
10046
+ function Lh(e) {
10047
+ return Fh(e) || Ih(e);
10013
10048
  }
10014
- function Ih(e, t) {
10015
- if (e.properties && e.properties.length > 0) return Ch(e.properties[0], t);
10016
- var n;
10017
- return t ? oo(e) : Oh((n = e.types[0]) == null ? "string" : n, e.defaultValue);
10049
+ function Rh(e, t) {
10050
+ var n, r, i;
10051
+ if (t) {
10052
+ let t = oo(e);
10053
+ if (t != null) return t;
10054
+ }
10055
+ if (e.defaultValue !== void 0) return e.defaultValue;
10056
+ if (e.properties && e.properties.length > 0) {
10057
+ var a;
10058
+ return Ch((a = e.properties.find((e) => !jh(e, "null"))) == null ? e.properties[0] : a, t);
10059
+ }
10060
+ if (t) {
10061
+ let t = Oh(e);
10062
+ if (t !== void 0) return t;
10063
+ }
10064
+ return kh((n = (r = e.types.find((e) => e !== "null")) == null ? e.types[0] : r) == null ? "string" : n, e.defaultValue, t ? (i = e.constraints) == null ? void 0 : i.format : void 0);
10018
10065
  }
10019
10066
  //#endregion
10020
10067
  //#region node_modules/.pnpm/json-xml-parse@1.3.0/node_modules/json-xml-parse/lib/constants.js
10021
- var Lh = /* @__PURE__ */ ne(((e) => {
10068
+ var zh = /* @__PURE__ */ ne(((e) => {
10022
10069
  Object.defineProperty(e, "__esModule", { value: !0 }), e.DEFAULTS = e.TAGS = void 0, e.TAGS = {
10023
10070
  OPENING: "OPENING",
10024
10071
  CLOSING: "CLOSING",
@@ -10062,13 +10109,13 @@ var Lh = /* @__PURE__ */ ne(((e) => {
10062
10109
  return [];
10063
10110
  }
10064
10111
  };
10065
- })), Rh = /* @__PURE__ */ ne(((e) => {
10112
+ })), Bh = /* @__PURE__ */ ne(((e) => {
10066
10113
  Object.defineProperty(e, "__esModule", { value: !0 }), e.objIsEmpty = e.keyExists = e.isUndef = e.isArr = e.isStr = e.isFunc = e.isObj = void 0;
10067
10114
  var t = "{}", n = "[]";
10068
10115
  e.isObj = (e) => !!e && typeof e == "object", e.isFunc = (e) => typeof e == "function", e.isStr = (e) => typeof e == "string", e.isArr = (e) => Array.isArray(e), e.isUndef = (e) => e === void 0, e.keyExists = (t, n) => (0, e.isObj)(t) && n in t, e.objIsEmpty = (r) => (0, e.isObj)(r) && [t, n].includes(JSON.stringify(r));
10069
- })), zh = /* @__PURE__ */ ne(((e) => {
10116
+ })), Vh = /* @__PURE__ */ ne(((e) => {
10070
10117
  Object.defineProperty(e, "__esModule", { value: !0 }), e.setDeclaration = e.setAttributes = e.setStringVal = e.createTag = e.checkChildTags = e.createEntityHandler = e.beautify = void 0;
10071
- var t = Lh(), n = Rh();
10118
+ var t = zh(), n = Bh();
10072
10119
  e.beautify = (e, n = t.DEFAULTS.LEVEL.INIT, r = t.DEFAULTS.BEAUTIFY.ENABLE) => {
10073
10120
  let i = e;
10074
10121
  if (!r) return t.DEFAULTS.EMPTY_STR;
@@ -10101,9 +10148,9 @@ var Lh = /* @__PURE__ */ ne(((e) => {
10101
10148
  let o = Object.assign({}, (0, n.isObj)(r) ? r : t.DEFAULTS.DECLARATION);
10102
10149
  return `<?xml${(0, e.setAttributes)(o, i)}?>${(0, e.beautify)(t.DEFAULTS.NEW_LINE, t.DEFAULTS.LEVEL.INIT, a)}`;
10103
10150
  };
10104
- })), Bh = /* @__PURE__ */ ne(((e) => {
10151
+ })), Hh = /* @__PURE__ */ ne(((e) => {
10105
10152
  Object.defineProperty(e, "__esModule", { value: !0 });
10106
- var t = zh(), n = Rh(), r = Lh();
10153
+ var t = Vh(), n = Bh(), r = zh();
10107
10154
  e.default = (e = r.DEFAULTS.EMPTY_OBJ, i = r.DEFAULTS.EMPTY_OBJ) => {
10108
10155
  let a = (i == null ? void 0 : i.attrKey) || r.DEFAULTS.ATTR_KEY, o = (i == null ? void 0 : i.contentKey) || r.DEFAULTS.CONTENT_KEY, s = (0, t.createEntityHandler)(Object.assign({}, (0, n.isObj)(i == null ? void 0 : i.entityMap) ? i == null ? void 0 : i.entityMap : r.DEFAULTS.ENTITY_MAP)), c = (0, t.setDeclaration)(i == null ? void 0 : i.declaration, s, i == null ? void 0 : i.beautify), l = (e, u, d) => {
10109
10156
  var f;
@@ -10139,12 +10186,12 @@ var Lh = /* @__PURE__ */ ne(((e) => {
10139
10186
  l(t, e[t], r.DEFAULTS.LEVEL.INIT);
10140
10187
  }), c))(e);
10141
10188
  };
10142
- })), Vh = /* @__PURE__ */ ne(((e) => {
10189
+ })), Uh = /* @__PURE__ */ ne(((e) => {
10143
10190
  var t = e && e.__importDefault || function(e) {
10144
10191
  return e && e.__esModule ? e : { default: e };
10145
10192
  };
10146
- Object.defineProperty(e, "__esModule", { value: !0 }), e.toXmlString = void 0, e.toXmlString = t(Bh()).default;
10147
- })), Hh = (/* @__PURE__ */ ne(((e) => {
10193
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.toXmlString = void 0, e.toXmlString = t(Hh()).default;
10194
+ })), Wh = (/* @__PURE__ */ ne(((e) => {
10148
10195
  var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
10149
10196
  r === void 0 && (r = n);
10150
10197
  var i = Object.getOwnPropertyDescriptor(t, n);
@@ -10169,19 +10216,19 @@ var Lh = /* @__PURE__ */ ne(((e) => {
10169
10216
  if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
10170
10217
  return n(r, e), r;
10171
10218
  };
10172
- Object.defineProperty(e, "__esModule", { value: !0 }), e.jsXml = void 0, e.jsXml = r(Vh());
10219
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.jsXml = void 0, e.jsXml = r(Uh());
10173
10220
  })))();
10174
- function Uh(e, t = !1) {
10221
+ function Gh(e, t = !1) {
10175
10222
  let n = xh(e, t);
10176
- return Hh.jsXml.toXmlString(n);
10223
+ return Wh.jsXml.toXmlString(n);
10177
10224
  }
10178
10225
  //#endregion
10179
10226
  //#region src/lib/examples/getSchemaExample.ts
10180
- function Wh(e) {
10227
+ function Kh(e) {
10181
10228
  return Ya(e) ? {
10182
10229
  key: "XML",
10183
10230
  summary: "XML",
10184
- valueGenerator: Uh,
10231
+ valueGenerator: Gh,
10185
10232
  lang: "xml"
10186
10233
  } : {
10187
10234
  key: "JSON",
@@ -10191,11 +10238,11 @@ function Wh(e) {
10191
10238
  hideOnSchemaTabs: Xa(e) || Za(e) || $a(e)
10192
10239
  };
10193
10240
  }
10194
- function Gh(e, t, n = !1) {
10195
- let r = Wh(e);
10196
- return { [r.key]: Kh(r, t, n) };
10241
+ function qh(e, t, n = !1) {
10242
+ let r = Kh(e);
10243
+ return { [r.key]: Jh(r, t, n) };
10197
10244
  }
10198
- function Kh(e, t, n = !1) {
10245
+ function Jh(e, t, n = !1) {
10199
10246
  var r, i;
10200
10247
  return {
10201
10248
  summary: e.summary,
@@ -10208,13 +10255,13 @@ function Kh(e, t, n = !1) {
10208
10255
  }
10209
10256
  //#endregion
10210
10257
  //#region src/lib/examples/getPropertyExamples.ts
10211
- function qh(e) {
10258
+ function Yh(e) {
10212
10259
  var t, n;
10213
10260
  return (e == null ? void 0 : e.examples) === void 0 ? (e == null || (t = e.schema) == null ? void 0 : t.examples) === void 0 ? (e == null ? void 0 : e.example) === void 0 ? (e == null ? void 0 : e.subexamples) === void 0 ? (e == null || (n = e.schema) == null ? void 0 : n.example) === void 0 ? (e == null ? void 0 : e.subexample) === void 0 ? null : [e.subexample] : [e.schema.example] : e.subexamples : [e.example] : e.schema.examples : e.examples;
10214
10261
  }
10215
10262
  //#endregion
10216
10263
  //#region src/lib/parser/constraintsParser.ts
10217
- var Jh = [
10264
+ var Xh = [
10218
10265
  "exclusiveMaximum",
10219
10266
  "exclusiveMinimum",
10220
10267
  "format",
@@ -10231,22 +10278,22 @@ var Jh = [
10231
10278
  "uniqueItems",
10232
10279
  "default"
10233
10280
  ];
10234
- function Yh(e) {
10235
- return Object.keys(e).some((e) => Jh.includes(e));
10281
+ function Zh(e) {
10282
+ return Object.keys(e).some((e) => Xh.includes(e));
10236
10283
  }
10237
- function Xh(e) {
10238
- return Object.entries(e).filter(([e]) => Jh.includes(e)).reduce((e, [t, n]) => (e[t] = n, e), {});
10284
+ function Qh(e) {
10285
+ return Object.entries(e).filter(([e]) => Xh.includes(e)).reduce((e, [t, n]) => (e[t] = n, e), {});
10239
10286
  }
10240
10287
  //#endregion
10241
10288
  //#region src/lib/parser/resolveCircularRef.ts
10242
- function Zh(e, t = /* @__PURE__ */ new WeakSet()) {
10243
- return Qh({
10289
+ function $h(e, t = /* @__PURE__ */ new WeakSet()) {
10290
+ return eg({
10244
10291
  key: "root",
10245
10292
  value: e,
10246
10293
  parent: null
10247
10294
  }, /* @__PURE__ */ new Map(), t), e;
10248
10295
  }
10249
- function Qh(e, t, n) {
10296
+ function eg(e, t, n) {
10250
10297
  var r;
10251
10298
  let { value: i } = e;
10252
10299
  if (typeof i != "object" || !i) return;
@@ -10254,13 +10301,13 @@ function Qh(e, t, n) {
10254
10301
  if (o) {
10255
10302
  e.parent.value[e.key] = {
10256
10303
  type: "object",
10257
- circularReference: $h(o)
10304
+ circularReference: tg(o)
10258
10305
  };
10259
10306
  return;
10260
10307
  }
10261
10308
  if (!n.has(i)) {
10262
10309
  t.set(a, e);
10263
- for (let [r, a] of Object.entries(i)) Qh({
10310
+ for (let [r, a] of Object.entries(i)) eg({
10264
10311
  key: r,
10265
10312
  value: a,
10266
10313
  parent: e
@@ -10268,21 +10315,21 @@ function Qh(e, t, n) {
10268
10315
  t.delete(a), n.add(i);
10269
10316
  }
10270
10317
  }
10271
- function $h(e) {
10272
- return e ? `${$h(e.parent)}/${e.key}` : "";
10318
+ function tg(e) {
10319
+ return e ? `${tg(e.parent)}/${e.key}` : "";
10273
10320
  }
10274
10321
  //#endregion
10275
10322
  //#region src/lib/parser/getSchemaUi.ts
10276
- var eg = class {
10323
+ var ng = class {
10277
10324
  constructor() {
10278
10325
  T(this, "walked", /* @__PURE__ */ new WeakSet()), T(this, "ui", /* @__PURE__ */ new WeakMap());
10279
10326
  }
10280
- }, tg = class e {
10327
+ }, rg = class e {
10281
10328
  constructor(e) {
10282
10329
  T(this, "memo", void 0), this.memo = e;
10283
10330
  }
10284
10331
  static createBaseProperty(e, t = {}, n = !1) {
10285
- let r = Array.isArray(t.type) ? t.type : [t.type || "string"], i = qh(t), a = {
10332
+ let r = Array.isArray(t.type) ? t.type : [t.type || "string"], i = Yh(t), a = {
10286
10333
  name: e,
10287
10334
  types: r,
10288
10335
  required: n,
@@ -10296,7 +10343,7 @@ var eg = class {
10296
10343
  return t.const !== void 0 && (a.meta = {
10297
10344
  ...a.meta || {},
10298
10345
  isConstant: !0
10299
- }), Yh(t) && (a.constraints = Xh(t)), Object.keys(t).forEach((e) => {
10346
+ }), Zh(t) && (a.constraints = Qh(t)), Object.keys(t).forEach((e) => {
10300
10347
  e.startsWith("x-") && (a.meta = a.meta || {}, a.meta.extra = a.meta.extra || {}, a.meta.extra[e] = t[e]);
10301
10348
  }), a;
10302
10349
  }
@@ -10310,7 +10357,7 @@ var eg = class {
10310
10357
  };
10311
10358
  }
10312
10359
  createUnionProperty(t, n, r = "", i = {}, a = !1) {
10313
- let o = e.createBaseProperty(r, i, a), s = [...new Set(t.map((e) => ig(e)).filter(Boolean))];
10360
+ let o = e.createBaseProperty(r, i, a), s = [...new Set(t.map((e) => og(e)).filter(Boolean))];
10314
10361
  s.length > 0 && (o.types = s);
10315
10362
  let c = n === "oneOf", l = c ? "isOneOfItem" : "isAnyOfItem", u = c ? "isOneOf" : "isAnyOf";
10316
10363
  return o.properties = t.map((e) => {
@@ -10348,9 +10395,9 @@ var eg = class {
10348
10395
  if (t.oneOf) return this.createOneOfProperty(t.oneOf, n, t, r);
10349
10396
  if (t.anyOf) return this.createAnyOfProperty(t.anyOf, n, t, r);
10350
10397
  if (t.const !== void 0) {
10351
- let i = e.createBaseProperty(n, t, r), a = ig(t);
10398
+ let i = e.createBaseProperty(n, t, r), a = og(t);
10352
10399
  a && (i.types = [a]);
10353
- let o = qh(t) || t.const;
10400
+ let o = Yh(t) || t.const;
10354
10401
  return o !== void 0 && (i.examples = Array.isArray(o) ? o : [o]), i.meta = {
10355
10402
  ...i.meta || {},
10356
10403
  isConstant: !0
@@ -10358,16 +10405,16 @@ var eg = class {
10358
10405
  }
10359
10406
  if (t.enum) {
10360
10407
  let i = [];
10361
- i = t.type ? Array.isArray(t.type) ? t.type : [t.type] : rg(t.enum), i.length === 0 && (i = ["string"]);
10408
+ i = t.type ? Array.isArray(t.type) ? t.type : [t.type] : ag(t.enum), i.length === 0 && (i = ["string"]);
10362
10409
  let a = e.createBaseProperty(n, t, r);
10363
10410
  return a.enum = t.enum, a.types = i, a;
10364
10411
  }
10365
10412
  let i = e.createBaseProperty(n, t, r);
10366
10413
  if (Array.isArray(t.type) ? t.type.includes("array") : t.type === "array") {
10367
10414
  if (t.items) {
10368
- let e = ig(t.items);
10415
+ let e = og(t.items);
10369
10416
  i.properties = e === "object" ? this.extractProperties(t.items.properties, t.items.required || [], t.items.additionalProperties, t.items["x-additionalPropertiesName"]) : void 0, e !== void 0 && (i.subtype = e);
10370
- let n = qh(t.items);
10417
+ let n = Yh(t.items);
10371
10418
  if (n && (i.subexamples = n), t.items.const !== void 0 && (i.meta = {
10372
10419
  ...i.meta || {},
10373
10420
  isConstant: !0
@@ -10430,31 +10477,31 @@ var eg = class {
10430
10477
  return i;
10431
10478
  }
10432
10479
  };
10433
- function ng(e, t = new eg()) {
10480
+ function ig(e, t = new ng()) {
10434
10481
  if (!e || Object.keys(e).length === 0) return [];
10435
- let n = Zh(e, t.walked);
10436
- return new tg(t.ui).schemaToUiProperty("", n);
10482
+ let n = $h(e, t.walked);
10483
+ return new rg(t.ui).schemaToUiProperty("", n);
10437
10484
  }
10438
- function rg(e) {
10485
+ function ag(e) {
10439
10486
  let t = /* @__PURE__ */ new Set();
10440
10487
  return e.forEach((e) => {
10441
10488
  e === null ? t.add("null") : Array.isArray(e) ? t.add("array") : typeof e == "object" ? t.add("object") : typeof e == "string" ? t.add("string") : typeof e == "boolean" ? t.add("boolean") : typeof e == "number" && t.add(Number.isInteger(e) ? "integer" : "number");
10442
10489
  }), t.has("number") && t.delete("integer"), [...t];
10443
10490
  }
10444
- function ig(e) {
10491
+ function og(e) {
10445
10492
  return !e.type && e.properties ? "object" : !e.type && e.items ? "array" : !e.type && e.const !== void 0 ? Array.isArray(e.const) ? "array" : typeof e.const == "object" && e.const !== null ? "object" : typeof e.const == "string" ? "string" : typeof e.const == "number" ? "number" : typeof e.const == "boolean" ? "boolean" : "null" : e.type;
10446
10493
  }
10447
10494
  //#endregion
10448
10495
  //#region src/lib/parser/generateRequestBodyUi.ts
10449
- function ag(e, t = new eg()) {
10496
+ function sg(e, t = new ng()) {
10450
10497
  if (!e.paths) return e;
10451
10498
  for (let n of Object.values(e.paths)) for (let e of ph) {
10452
10499
  let r = n[e];
10453
10500
  if (r && r.requestBody) for (let [e, n] of Object.entries(r.requestBody.content || {})) {
10454
10501
  let r = n;
10455
- r.schema && (r.ui = ng(r.schema, t), r.examples = {
10502
+ r.schema && (r.ui = ig(r.schema, t), r.examples = {
10456
10503
  ...r.examples || {},
10457
- ...Gh(e, r.ui, !0)
10504
+ ...qh(e, r.ui, !0)
10458
10505
  });
10459
10506
  }
10460
10507
  }
@@ -10462,15 +10509,15 @@ function ag(e, t = new eg()) {
10462
10509
  }
10463
10510
  //#endregion
10464
10511
  //#region src/lib/parser/generateResponseUi.ts
10465
- function og(e, t = new eg()) {
10512
+ function cg(e, t = new ng()) {
10466
10513
  if (!e.paths) return e;
10467
10514
  for (let n of Object.values(e.paths)) for (let e of ph) {
10468
10515
  let r = n[e];
10469
10516
  if (r && r.responses) for (let e of Object.values(r.responses)) for (let [n, r] of Object.entries(e.content || {})) {
10470
10517
  let e = r;
10471
- e.schema && (e.ui = ng(e.schema, t), e.examples = {
10518
+ e.schema && (e.ui = ig(e.schema, t), e.examples = {
10472
10519
  ...e.examples || {},
10473
- ...Gh(n, e.ui, !0)
10520
+ ...qh(n, e.ui, !0)
10474
10521
  });
10475
10522
  }
10476
10523
  }
@@ -10478,33 +10525,33 @@ function og(e, t = new eg()) {
10478
10525
  }
10479
10526
  //#endregion
10480
10527
  //#region src/lib/parser/getSecurityUi.ts
10481
- var sg = "None";
10482
- function cg(e, t) {
10528
+ var lg = "None";
10529
+ function ug(e, t) {
10483
10530
  let n = [];
10484
10531
  return e ? (e.forEach((e) => {
10485
10532
  let r = {
10486
- id: Object.keys(e).length ? Object.keys(e).join("|") : sg,
10533
+ id: Object.keys(e).length ? Object.keys(e).join("|") : lg,
10487
10534
  schemes: {}
10488
10535
  };
10489
10536
  Object.keys(e).forEach((e) => {
10490
10537
  t && t[e] && (r.schemes[e] = t[e]);
10491
10538
  }), n.push(r);
10492
- }), n.length === 1 && n[0].id === sg && Object.keys(n[0].schemes).length === 0 ? [] : n) : n;
10539
+ }), n.length === 1 && n[0].id === lg && Object.keys(n[0].schemes).length === 0 ? [] : n) : n;
10493
10540
  }
10494
10541
  //#endregion
10495
10542
  //#region src/lib/parser/generateSecurityUi.ts
10496
- function lg(e) {
10543
+ function dg(e) {
10497
10544
  if (!(e != null && e.paths)) return e;
10498
10545
  for (let i of Object.values(e.paths)) for (let a of ph) {
10499
10546
  var t, n, r;
10500
10547
  let o = i[a];
10501
- o && (o.securityUi = cg((t = (n = o.security) == null ? e.security : n) == null ? [] : t, ((r = e.components) == null ? void 0 : r.securitySchemes) || {}));
10548
+ o && (o.securityUi = ug((t = (n = o.security) == null ? e.security : n) == null ? [] : t, ((r = e.components) == null ? void 0 : r.securitySchemes) || {}));
10502
10549
  }
10503
10550
  return e;
10504
10551
  }
10505
10552
  //#endregion
10506
10553
  //#region node_modules/.pnpm/allof-merge@0.6.8/node_modules/allof-merge/dist/index.mjs
10507
- function ug(e, t) {
10554
+ function fg(e, t) {
10508
10555
  var n = {};
10509
10556
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
10510
10557
  if (e != null && typeof Object.getOwnPropertySymbols == "function") {
@@ -10513,7 +10560,7 @@ function ug(e, t) {
10513
10560
  }
10514
10561
  return n;
10515
10562
  }
10516
- function dg(e, t) {
10563
+ function pg(e, t) {
10517
10564
  var n = {};
10518
10565
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
10519
10566
  if (e != null && typeof Object.getOwnPropertySymbols == "function") {
@@ -10522,7 +10569,7 @@ function dg(e, t) {
10522
10569
  }
10523
10570
  return n;
10524
10571
  }
10525
- var fg = (e = {}, t, n, r) => {
10572
+ var mg = (e = {}, t, n, r) => {
10526
10573
  let i = `/${t}`, a = typeof e["/**"] == "function" ? e["/**"]({
10527
10574
  key: t,
10528
10575
  path: n,
@@ -10539,20 +10586,20 @@ var fg = (e = {}, t, n, r) => {
10539
10586
  path: n,
10540
10587
  value: r
10541
10588
  }) : s, o && (s = Object.assign(Object.assign({}, o), s)), a ? Object.assign(Object.assign({ "/**": e["/**"] }, a), s) : s;
10542
- }, pg = (e) => {
10589
+ }, hg = (e) => {
10543
10590
  let t = {}, n = e.reduce(((e, t) => (Object.keys(t).forEach(((t) => e.add(t))), e)), /* @__PURE__ */ new Set());
10544
10591
  for (let r of n.keys()) {
10545
10592
  let n = e.filter(((e) => r in e));
10546
10593
  if (n.length !== 1) {
10547
10594
  if (r.charAt(0) !== "/") throw Error(`Cannot merge rules. Duplicate key: ${r}. Rules should not have same Rule key`);
10548
- t[r] = (e, t) => pg(n.map(((n) => typeof n[r] == "function" ? n[r](e, t) : n[r])));
10595
+ t[r] = (e, t) => hg(n.map(((n) => typeof n[r] == "function" ? n[r](e, t) : n[r])));
10549
10596
  } else t[r] = n[0][r];
10550
10597
  }
10551
10598
  return t;
10552
- }, mg = (e) => typeof e == "object" && !!e, hg = (e) => Array.isArray(e), gg = (e, t, n = {}) => {
10599
+ }, gg = (e) => typeof e == "object" && !!e, _g = (e) => Array.isArray(e), vg = (e, t, n = {}) => {
10553
10600
  var r, i;
10554
- t = hg(t) ? t : [t];
10555
- let a = hg(n.rules) ? pg(n.rules) : n.rules, o = [{
10601
+ t = _g(t) ? t : [t];
10602
+ let a = _g(n.rules) ? hg(n.rules) : n.rules, o = [{
10556
10603
  data: e,
10557
10604
  state: n.state,
10558
10605
  path: [],
@@ -10570,7 +10617,7 @@ var fg = (e = {}, t, n, r) => {
10570
10617
  let n = e.keys[e.keyIndex++], [s, c, l] = o.length > 1 ? [
10571
10618
  e.data[n],
10572
10619
  [...e.path, n],
10573
- fg(e.rules, n, [...e.path, n], e.data[n])
10620
+ mg(e.rules, n, [...e.path, n], e.data[n])
10574
10621
  ] : [
10575
10622
  e.data,
10576
10623
  e.path,
@@ -10584,7 +10631,7 @@ var fg = (e = {}, t, n, r) => {
10584
10631
  }, d = [];
10585
10632
  for (let e of t) {
10586
10633
  if (!e || typeof e != "function") continue;
10587
- let t = (i = e(u)) == null ? {} : i, { terminate: n, done: r, exitHook: a } = t, o = dg(t, [
10634
+ let t = (i = e(u)) == null ? {} : i, { terminate: n, done: r, exitHook: a } = t, o = pg(t, [
10588
10635
  "terminate",
10589
10636
  "done",
10590
10637
  "exitHook"
@@ -10595,8 +10642,8 @@ var fg = (e = {}, t, n, r) => {
10595
10642
  break;
10596
10643
  }
10597
10644
  }
10598
- if (u && mg(u.value)) {
10599
- let e = hg(u.value) ? [...u.value.keys()] : Object.keys(u.value);
10645
+ if (u && gg(u.value)) {
10646
+ let e = _g(u.value) ? [...u.value.keys()] : Object.keys(u.value);
10600
10647
  o.push({
10601
10648
  hooks: d,
10602
10649
  state: u.state,
@@ -10608,12 +10655,12 @@ var fg = (e = {}, t, n, r) => {
10608
10655
  });
10609
10656
  } else for (; d.length;) d.pop()();
10610
10657
  }
10611
- }, _g = () => {
10658
+ }, yg = () => {
10612
10659
  let e = /* @__PURE__ */ new WeakMap(), t;
10613
10660
  return [({ value: e }) => {
10614
10661
  t = e;
10615
10662
  }, ({ value: n, path: r, key: i, state: a }) => {
10616
- if (i = r.length ? i : "#", mg(t) && mg(n)) {
10663
+ if (i = r.length ? i : "#", gg(t) && gg(n)) {
10617
10664
  if (e.has(t)) return a.node[i] = e.get(t), { done: !0 };
10618
10665
  let r = Array.isArray(n) ? [] : {};
10619
10666
  a.node[i] = r, e.set(t, r);
@@ -10623,71 +10670,71 @@ var fg = (e = {}, t, n, r) => {
10623
10670
  state: Object.assign(Object.assign({}, a), { node: a.node[i] })
10624
10671
  };
10625
10672
  }];
10626
- }, vg = class extends Map {
10673
+ }, bg = class extends Map {
10627
10674
  add(e, t) {
10628
10675
  let n = this.get(e);
10629
10676
  return n ? n.push(t) : this.set(e, [t]), this;
10630
10677
  }
10631
- }, yg = (e, t) => {
10678
+ }, xg = (e, t) => {
10632
10679
  let n = {};
10633
10680
  for (let r of t) r in e && (n[r] = e[r], delete e[r]);
10634
10681
  return n;
10635
- }, bg = (e, t) => {
10682
+ }, Sg = (e, t) => {
10636
10683
  if (Array.isArray(e) && Array.isArray(t)) return [...e, ...t];
10637
- if (mg(e) && mg(t)) {
10684
+ if (gg(e) && gg(t)) {
10638
10685
  let n = Object.assign({}, e);
10639
- for (let e of Object.keys(t)) n[e] = bg(n[e], t[e]);
10686
+ for (let e of Object.keys(t)) n[e] = Sg(n[e], t[e]);
10640
10687
  return n;
10641
10688
  }
10642
10689
  return t;
10643
- }, xg = (e) => e && e.$ref && typeof e.$ref == "string", Sg = (e) => e && e.anyOf && Array.isArray(e.anyOf), Cg = (e) => e && e.oneOf && Array.isArray(e.oneOf), wg = (e, t = "") => {
10690
+ }, Cg = (e) => e && e.$ref && typeof e.$ref == "string", wg = (e) => e && e.anyOf && Array.isArray(e.anyOf), Tg = (e) => e && e.oneOf && Array.isArray(e.oneOf), Eg = (e, t = "") => {
10644
10691
  let [n = t, r] = e.split("#"), i = r && r !== "/" ? r : "";
10645
10692
  return {
10646
10693
  filePath: n,
10647
10694
  pointer: i,
10648
- normalized: Tg(n, i),
10649
- jsonPath: Og(i)
10695
+ normalized: Dg(n, i),
10696
+ jsonPath: Ag(i)
10650
10697
  };
10651
- }, Tg = (e, t) => e ? `${e}${t ? "#" + t : ""}` : t ? `#${t}` : "#", Eg = (e, t, n = [t]) => {
10652
- if (!mg(e)) return;
10653
- let r = e, i = Og(t);
10698
+ }, Dg = (e, t) => e ? `${e}${t ? "#" + t : ""}` : t ? `#${t}` : "#", Og = (e, t, n = [t]) => {
10699
+ if (!gg(e)) return;
10700
+ let r = e, i = Ag(t);
10654
10701
  for (let t of i) if (Array.isArray(r) && r.length > +t) r = r[+t];
10655
- else if (mg(r) && t in r) r = r[t];
10702
+ else if (gg(r) && t in r) r = r[t];
10656
10703
  else {
10657
- if (!xg(r)) return;
10704
+ if (!Cg(r)) return;
10658
10705
  {
10659
- let t = wg(r.$ref);
10660
- r = t.filePath || n.includes(t.pointer) ? void 0 : Eg(e, t.pointer, [...n, t.pointer]);
10706
+ let t = Eg(r.$ref);
10707
+ r = t.filePath || n.includes(t.pointer) ? void 0 : Og(e, t.pointer, [...n, t.pointer]);
10661
10708
  }
10662
10709
  }
10663
10710
  return r;
10664
- }, Dg = {
10711
+ }, kg = {
10665
10712
  slash: /\//g,
10666
10713
  tilde: /~/g,
10667
10714
  escapedSlash: /~1/g,
10668
10715
  escapedTilde: /~0/g
10669
- }, Og = (e) => e.split("/").map(((e) => decodeURIComponent(e.replace(Dg.escapedSlash, "/").replace(Dg.escapedTilde, "~")))).slice(1), kg = (e) => e.length ? "/" + e.map(((e) => encodeURIComponent(String(e).replace(Dg.tilde, "~0").replace(Dg.slash, "~1")))).join("/") : "", Ag = (e, t) => JSON.stringify(e) == JSON.stringify(t), jg = (e) => {
10716
+ }, Ag = (e) => e.split("/").map(((e) => decodeURIComponent(e.replace(kg.escapedSlash, "/").replace(kg.escapedTilde, "~")))).slice(1), jg = (e) => e.length ? "/" + e.map(((e) => encodeURIComponent(String(e).replace(kg.tilde, "~0").replace(kg.slash, "~1")))).join("/") : "", Mg = (e, t) => JSON.stringify(e) == JSON.stringify(t), Ng = (e) => {
10670
10717
  let t = 1;
10671
10718
  for (; e * t % 1 != 0;) t *= 10;
10672
10719
  return t;
10673
10720
  };
10674
- function Mg(e) {
10675
- let t = e.reduce(((e, t) => Math.max(e, jg(t))), 0);
10676
- return e.reduce(((e, n) => Math.round(e * t * n * t / Ng(e * t, n * t)) / t));
10721
+ function Pg(e) {
10722
+ let t = e.reduce(((e, t) => Math.max(e, Ng(t))), 0);
10723
+ return e.reduce(((e, n) => Math.round(e * t * n * t / Fg(e * t, n * t)) / t));
10677
10724
  }
10678
- function Ng(e, t) {
10679
- return t === 0 ? e : Ng(t, e % t);
10725
+ function Fg(e, t) {
10726
+ return t === 0 ? e : Fg(t, e % t);
10680
10727
  }
10681
- var Pg = (e) => {
10728
+ var Ig = (e) => {
10682
10729
  if (e.length === 0) return [[]];
10683
- let t = e[0], n = Pg(e.slice(1)), r = [];
10730
+ let t = e[0], n = Ig(e.slice(1)), r = [];
10684
10731
  for (let e of t) for (let t of n) r.push([e, ...t]);
10685
10732
  return r;
10686
- }, Fg = (e) => {
10733
+ }, Lg = (e) => {
10687
10734
  let t = [];
10688
10735
  for (let n of e) {
10689
10736
  if (!("properties" in n)) continue;
10690
- let r = new Set(Object.keys(n.properties)), i = new vg();
10737
+ let r = new Set(Object.keys(n.properties)), i = new bg();
10691
10738
  for (let t of r.values()) for (let a of e) if (!(a == n || a.properties && t in a.properties)) {
10692
10739
  if ("patternProperties" in a && a.patternProperties) for (let e of Object.keys(a.patternProperties)) new RegExp(e).test(t) || r.delete(t);
10693
10740
  else "additionalProperties" in a && (!1 === a.additionalProperties ? r.delete(t) : typeof a.additionalProperties == "object" && i.add(t, a.additionalProperties));
@@ -10698,7 +10745,7 @@ var Pg = (e) => {
10698
10745
  t.push(a);
10699
10746
  }
10700
10747
  return t;
10701
- }, Ig = (e) => {
10748
+ }, Rg = (e) => {
10702
10749
  let t = [];
10703
10750
  for (let n of e) {
10704
10751
  if (!("patternProperties" in n)) continue;
@@ -10710,49 +10757,49 @@ var Pg = (e) => {
10710
10757
  t.push(i);
10711
10758
  }
10712
10759
  return t;
10713
- }, Lg = (e) => {
10714
- let t = {}, n = Vg(e);
10760
+ }, zg = (e) => {
10761
+ let t = {}, n = Ug(e);
10715
10762
  for (let [e, r] of Object.entries(n)) t[e] = r.includes(!1) ? !1 : r.length > 1 ? { allOf: r } : r[0];
10716
10763
  return t;
10717
- }, Rg = (e, t) => !!e.reduce(((e, t) => e && !0 === t), !0) || Hg(e, t), zg = () => "Could not merge values, they are probably incompatible", Bg = (e) => `Merge rule not found for key: ${e}`, Vg = (e) => {
10764
+ }, Bg = (e, t) => !!e.reduce(((e, t) => e && !0 === t), !0) || Wg(e, t), Vg = () => "Could not merge values, they are probably incompatible", Hg = (e) => `Merge rule not found for key: ${e}`, Ug = (e) => {
10718
10765
  let t = {};
10719
10766
  for (let n of e) for (let e of Object.keys(n)) Array.isArray(t[e]) ? t[e].push(n[e]) : t[e] = [n[e]];
10720
10767
  return t;
10721
- }, Hg = (e, t) => {
10768
+ }, Wg = (e, t) => {
10722
10769
  if (e.includes(!1)) return !1;
10723
- let n = {}, r = Vg(e);
10724
- "properties" in r && (r.properties = Fg(e)), "patternProperties" in r && (r.patternProperties = Ig(e));
10770
+ let n = {}, r = Ug(e);
10771
+ "properties" in r && (r.properties = Lg(e)), "patternProperties" in r && (r.patternProperties = Rg(e));
10725
10772
  for (let [i, a] of Object.entries(r)) {
10726
10773
  if (!a.length) continue;
10727
10774
  let r = t.mergeRules, o = `/${i}` in r ? r[`/${i}`] : r["/?"];
10728
10775
  o = o && !("$" in o) && "/" in o ? o["/"] : o, o = typeof o == "function" ? o() : o;
10729
10776
  let s = o && "$" in o ? o.$ : void 0;
10730
- if (!s) throw Error(Bg(i));
10777
+ if (!s) throw Error(Hg(i));
10731
10778
  let c = a.length > 1 ? s(a, Object.assign(Object.assign({}, t), { allOfItems: e })) : a[0];
10732
10779
  c === void 0 ? t.mergeError(a) : n[i] = c;
10733
10780
  }
10734
10781
  return Object.keys(n).length ? n : void 0;
10735
- }, Ug = (e) => e[e.length - 1], Wg = (e) => e.reduce(((e, t) => e || t), !1), Gg = (e) => Math.min(...e), Kg = (e) => Math.max(...e), qg = (e) => e.length > 1 ? e.reduce(((e, t) => `${e}(?=${t})`), "") : e[0], Jg = ([e, ...t]) => t.reduce(((e, t) => e.filter(((e) => t.includes(e)))), e), Yg = ([e, ...t]) => t.find(((t) => !Ag(t, e))) ? void 0 : e, Xg = ([e, ...t]) => t.reduce(((e, t) => bg(e, t)), e), Zg = (e) => Pg(e).map(((e) => ({ allOf: e }))), Qg = (e) => ({ anyOf: e }), $g = (e) => Mg(e), e_ = (e, t) => {
10736
- let n = Jg(e.map(((e) => e.map(((e) => JSON.stringify(e)))))).map(((e) => JSON.parse(e))).sort();
10782
+ }, Gg = (e) => e[e.length - 1], Kg = (e) => e.reduce(((e, t) => e || t), !1), qg = (e) => Math.min(...e), Jg = (e) => Math.max(...e), Yg = (e) => e.length > 1 ? e.reduce(((e, t) => `${e}(?=${t})`), "") : e[0], Xg = ([e, ...t]) => t.reduce(((e, t) => e.filter(((e) => t.includes(e)))), e), Zg = ([e, ...t]) => t.find(((t) => !Mg(t, e))) ? void 0 : e, Qg = ([e, ...t]) => t.reduce(((e, t) => Sg(e, t)), e), $g = (e) => Ig(e).map(((e) => ({ allOf: e }))), e_ = (e) => ({ anyOf: e }), t_ = (e) => Pg(e), n_ = (e, t) => {
10783
+ let n = Xg(e.map(((e) => e.map(((e) => JSON.stringify(e)))))).map(((e) => JSON.parse(e))).sort();
10737
10784
  return n.length || t.mergeError(e), n;
10738
- }, t_ = (e, t) => {
10739
- let n = Jg(e.map(((e) => Array.isArray(e) ? e : [e])));
10785
+ }, r_ = (e, t) => {
10786
+ let n = Xg(e.map(((e) => Array.isArray(e) ? e : [e])));
10740
10787
  return n.length === 1 ? n[0] : n.length ? n : void 0;
10741
- }, n_ = (e) => {
10788
+ }, i_ = (e) => {
10742
10789
  let t = /* @__PURE__ */ new Set();
10743
10790
  for (let n of e) for (let e of n) t.add(e);
10744
10791
  return Array.from(t).sort();
10745
- }, r_ = (e, t) => {
10746
- let n = {}, r = Vg(e);
10747
- for (let [e, t] of Object.entries(r)) if (t.reduce(((e, t) => e && Array.isArray(t)), !0)) n[e] = n_(t);
10792
+ }, a_ = (e, t) => {
10793
+ let n = {}, r = Ug(e);
10794
+ for (let [e, t] of Object.entries(r)) if (t.reduce(((e, t) => e && Array.isArray(t)), !0)) n[e] = i_(t);
10748
10795
  else {
10749
10796
  let r = t.map(((e) => Array.isArray(e) ? { required: e } : e));
10750
10797
  n[e] = r.length > 1 ? { allOf: r } : r[0];
10751
10798
  }
10752
10799
  return n;
10753
- }, i_ = (e, t) => {
10754
- if (!e.reduce(((e, t) => Array.isArray(t) || e), !1)) return Hg(e, t);
10755
- let n = [], r = 1 / 0, i = 0, a = new vg();
10800
+ }, o_ = (e, t) => {
10801
+ if (!e.reduce(((e, t) => Array.isArray(t) || e), !1)) return Wg(e, t);
10802
+ let n = [], r = 1 / 0, i = 0, a = new bg();
10756
10803
  for (let e of t.allOfItems) "additionalItems" in e && e.additionalItems && "items" in e && Array.isArray(e.items) && a.add(e.items.length, e.additionalItems), "items" in e && (n.push(e.items), Array.isArray(e.items) && (i = Math.max(i, e.items.length), "additionalItems" in e && !1 === e.additionalItems && (r = Math.min(r, e.items.length))));
10757
10804
  let o = Math.min(i, r), s = [...Array(o)].map((() => ({ allOf: [] })));
10758
10805
  for (let e of n) if (Array.isArray(e)) for (let t = 0; t < o; t++) {
@@ -10762,34 +10809,34 @@ var Pg = (e) => {
10762
10809
  }
10763
10810
  else s.forEach((({ allOf: t }) => t.push(e)));
10764
10811
  return s;
10765
- }, a_ = (e, t) => {
10812
+ }, s_ = (e, t) => {
10766
10813
  let n = [], r = [];
10767
10814
  for (let e of t.allOfItems) "items" in e && !Array.isArray(e.items) && r.push(e.items), "additionalItems" in e && "items" in e && Array.isArray(e.items) && n.push(e.additionalItems);
10768
- return r.length && n.forEach(((e) => e.allOf = r)), Hg(n, t);
10815
+ return r.length && n.forEach(((e) => e.allOf = r)), Wg(n, t);
10769
10816
  }, $ = (e = "draft-06", t = {}) => Object.assign(Object.assign(Object.assign(Object.assign({
10770
- "/maximum": { $: Gg },
10771
- "/exclusiveMaximum": { $: Wg },
10772
- "/minimum": { $: Kg },
10773
- "/exclusiveMinimum": { $: Wg },
10774
- "/maxLength": { $: Gg },
10775
- "/minLength": { $: Kg },
10776
- "/maxItems": { $: Gg },
10777
- "/minItems": { $: Kg },
10778
- "/uniqueItems": { $: Wg },
10779
- "/maxProperties": { $: Gg },
10780
- "/minProperties": { $: Kg },
10781
- "/required": { $: n_ },
10782
- "/multipleOf": { $: $g },
10783
- "/enum": { $: e_ },
10784
- "/type": { $: t_ },
10817
+ "/maximum": { $: qg },
10818
+ "/exclusiveMaximum": { $: Kg },
10819
+ "/minimum": { $: Jg },
10820
+ "/exclusiveMinimum": { $: Kg },
10821
+ "/maxLength": { $: qg },
10822
+ "/minLength": { $: Jg },
10823
+ "/maxItems": { $: qg },
10824
+ "/minItems": { $: Jg },
10825
+ "/uniqueItems": { $: Kg },
10826
+ "/maxProperties": { $: qg },
10827
+ "/minProperties": { $: Jg },
10828
+ "/required": { $: i_ },
10829
+ "/multipleOf": { $: t_ },
10830
+ "/enum": { $: n_ },
10831
+ "/type": { $: r_ },
10785
10832
  "/allOf": {
10786
10833
  "/*": () => $(e, t),
10787
- $: Zg
10834
+ $: $g
10788
10835
  },
10789
- "/not": { $: Qg },
10836
+ "/not": { $: e_ },
10790
10837
  "/oneOf": {
10791
10838
  "/*": () => $(e, t),
10792
- $: Zg,
10839
+ $: $g,
10793
10840
  sibling: [
10794
10841
  "definitions",
10795
10842
  "$defs",
@@ -10799,7 +10846,7 @@ var Pg = (e) => {
10799
10846
  },
10800
10847
  "/anyOf": {
10801
10848
  "/*": () => $(e, t),
10802
- $: Zg,
10849
+ $: $g,
10803
10850
  sibling: [
10804
10851
  "definitions",
10805
10852
  "$defs",
@@ -10809,130 +10856,130 @@ var Pg = (e) => {
10809
10856
  },
10810
10857
  "/properties": {
10811
10858
  "/*": () => $(e, t),
10812
- $: Lg
10859
+ $: zg
10813
10860
  },
10814
10861
  "/items": () => Object.assign(Object.assign({}, $(e, t)), {
10815
- $: i_,
10862
+ $: o_,
10816
10863
  "/*": ({ key: n }) => typeof n == "number" ? $(e, t) : {}
10817
10864
  }),
10818
- "/additionalProperties": () => Object.assign(Object.assign({}, $(e, t)), { $: Rg }),
10819
- "/additionalItems": () => Object.assign(Object.assign({}, $(e, t)), { $: a_ }),
10865
+ "/additionalProperties": () => Object.assign(Object.assign({}, $(e, t)), { $: Bg }),
10866
+ "/additionalItems": () => Object.assign(Object.assign({}, $(e, t)), { $: s_ }),
10820
10867
  "/patternProperties": {
10821
10868
  "/*": () => $(e, t),
10822
- $: Lg
10869
+ $: zg
10823
10870
  },
10824
- "/pattern": { $: qg },
10825
- "/readOnly": { $: Wg },
10826
- "/writeOnly": { $: Wg },
10827
- "/example": { $: Xg },
10828
- "/examples": { $: Xg },
10829
- "/deprecated": { $: Wg }
10871
+ "/pattern": { $: Yg },
10872
+ "/readOnly": { $: Kg },
10873
+ "/writeOnly": { $: Kg },
10874
+ "/example": { $: Qg },
10875
+ "/examples": { $: Qg },
10876
+ "/deprecated": { $: Kg }
10830
10877
  }, e === "draft-04" ? {} : {
10831
10878
  "/propertyNames": () => $(e, t),
10832
10879
  "/contains": () => $(e, t),
10833
10880
  "/dependencies": {
10834
10881
  "/*": () => $(e, t),
10835
- $: r_
10882
+ $: a_
10836
10883
  },
10837
- "/const": { $: Yg },
10838
- "/exclusiveMaximum": { $: Gg },
10839
- "/exclusiveMinimum": { $: Kg },
10884
+ "/const": { $: Zg },
10885
+ "/exclusiveMaximum": { $: qg },
10886
+ "/exclusiveMinimum": { $: Jg },
10840
10887
  "/$defs": {
10841
10888
  "/*": () => $(e, t),
10842
- $: Xg
10889
+ $: Qg
10843
10890
  }
10844
10891
  }), {
10845
10892
  "/definitions": {
10846
10893
  "/*": () => $(e, t),
10847
- $: Xg
10894
+ $: Qg
10848
10895
  },
10849
- "/xml": { $: Xg },
10850
- "/externalDocs": { $: Ug },
10851
- "/description": { $: Ug },
10852
- "/title": { $: Ug },
10853
- "/format": { $: Ug },
10854
- "/default": { $: Ug },
10855
- "/?": { $: Ug }
10856
- }), t), { $: Hg }), o_ = (e) => $(e, {
10857
- "/discriminator": { $: Xg },
10896
+ "/xml": { $: Qg },
10897
+ "/externalDocs": { $: Gg },
10898
+ "/description": { $: Gg },
10899
+ "/title": { $: Gg },
10900
+ "/format": { $: Gg },
10901
+ "/default": { $: Gg },
10902
+ "/?": { $: Gg }
10903
+ }), t), { $: Wg }), c_ = (e) => $(e, {
10904
+ "/discriminator": { $: Qg },
10858
10905
  "/oneOf": {
10859
- "/*": () => o_(e),
10860
- $: Zg,
10906
+ "/*": () => c_(e),
10907
+ $: $g,
10861
10908
  sibling: ["discriminator"]
10862
10909
  },
10863
10910
  "/anyOf": {
10864
- "/*": () => o_(e),
10865
- $: Zg,
10911
+ "/*": () => c_(e),
10912
+ $: $g,
10866
10913
  sibling: ["discriminator"]
10867
10914
  }
10868
- }), s_ = (e) => e === "3.0.x" ? Object.assign(Object.assign({}, o_("draft-04")), { "/items": ({ key: e }) => Object.assign(Object.assign({}, o_("draft-04")), { $: i_ }) }) : o_("draft-06"), c_ = (e) => ({ "/*": { "/schema": s_(e) } }), l_ = (e) => ({ "/content": { "/*": {
10869
- "/schema": s_(e),
10870
- "/encoding": { "/headers": c_(e) }
10871
- } } }), u_ = (e) => ({ "/*": {
10872
- "/headers": c_(e),
10915
+ }), l_ = (e) => e === "3.0.x" ? Object.assign(Object.assign({}, c_("draft-04")), { "/items": ({ key: e }) => Object.assign(Object.assign({}, c_("draft-04")), { $: o_ }) }) : c_("draft-06"), u_ = (e) => ({ "/*": { "/schema": l_(e) } }), d_ = (e) => ({ "/content": { "/*": {
10916
+ "/schema": l_(e),
10917
+ "/encoding": { "/headers": u_(e) }
10918
+ } } }), f_ = (e) => ({ "/*": {
10919
+ "/headers": u_(e),
10873
10920
  "/content": { "/*": {
10874
- "/schema": s_(e),
10875
- "/encoding": { "/headers": c_(e) }
10921
+ "/schema": l_(e),
10922
+ "/encoding": { "/headers": u_(e) }
10876
10923
  } }
10877
- } }), d_ = (e = "3.0.x") => ({
10924
+ } }), p_ = (e = "3.0.x") => ({
10878
10925
  "/paths": { "/*": {
10879
10926
  "/*": {
10880
- "/parameters": c_(e),
10881
- "/requestBody": l_(e),
10882
- "/responses": u_(e)
10927
+ "/parameters": u_(e),
10928
+ "/requestBody": d_(e),
10929
+ "/responses": f_(e)
10883
10930
  },
10884
- "/parameters": c_(e)
10931
+ "/parameters": u_(e)
10885
10932
  } },
10886
10933
  "/components": {
10887
- "/schemas": { "/*": s_(e) },
10888
- "/responses": u_(e),
10889
- "/parameters": c_(e),
10890
- "/requestBodies": { "/*": l_(e) },
10891
- "/headers": c_(e)
10892
- }
10893
- }), f_ = $("draft-06", {
10894
- "/args": () => f_,
10895
- "/nullable": { $: Wg },
10896
- "/specifiedByURL": { $: Ug },
10934
+ "/schemas": { "/*": l_(e) },
10935
+ "/responses": f_(e),
10936
+ "/parameters": u_(e),
10937
+ "/requestBodies": { "/*": d_(e) },
10938
+ "/headers": u_(e)
10939
+ }
10940
+ }), m_ = $("draft-06", {
10941
+ "/args": () => m_,
10942
+ "/nullable": { $: Kg },
10943
+ "/specifiedByURL": { $: Gg },
10897
10944
  "/values": {
10898
- $: Xg,
10945
+ $: Qg,
10899
10946
  "/*": {
10900
- $: Xg,
10901
- "/description": { $: Ug },
10947
+ $: Qg,
10948
+ "/description": { $: Gg },
10902
10949
  "/deprecated": {
10903
- $: Ug,
10904
- "/reason": { $: Ug }
10950
+ $: Gg,
10951
+ "/reason": { $: Gg }
10905
10952
  }
10906
10953
  }
10907
10954
  },
10908
10955
  "/interfaces": {
10909
- $: Xg,
10910
- "/*": { $: Xg }
10956
+ $: Qg,
10957
+ "/*": { $: Qg }
10911
10958
  },
10912
10959
  "/directives": {
10913
- $: Xg,
10914
- "/*": () => Object.assign(Object.assign({}, f_), { "/meta": { $: Xg } })
10960
+ $: Qg,
10961
+ "/*": () => Object.assign(Object.assign({}, m_), { "/meta": { $: Qg } })
10915
10962
  }
10916
- }), p_ = {
10917
- "/queries": { "/*": () => f_ },
10918
- "/mutations": { "/*": () => f_ },
10919
- "/subscriptions": { "/*": () => f_ },
10963
+ }), h_ = {
10964
+ "/queries": { "/*": () => m_ },
10965
+ "/mutations": { "/*": () => m_ },
10966
+ "/subscriptions": { "/*": () => m_ },
10920
10967
  "/components": {
10921
- "/*": { "/*": f_ },
10922
- "/directives": { "/*": { "/args": () => f_ } }
10968
+ "/*": { "/*": m_ },
10969
+ "/directives": { "/*": { "/args": () => m_ } }
10923
10970
  }
10924
- }, m_ = (e, t, n) => {
10925
- let r = n.sibling || [], i = e, a = t, o = i[a], s = ug(i, [typeof a == "symbol" ? a : a + ""]), c = yg(s, r);
10971
+ }, g_ = (e, t, n) => {
10972
+ let r = n.sibling || [], i = e, a = t, o = i[a], s = fg(i, [typeof a == "symbol" ? a : a + ""]), c = xg(s, r);
10926
10973
  return Object.keys(s).length ? Object.assign({ [t]: o.map(((e) => ({ allOf: [s, e] }))) }, c) : e;
10927
- }, h_ = (e, t, n, r) => {
10928
- let i = [], a = kg(t), o = [], s = {
10974
+ }, __ = (e, t, n, r) => {
10975
+ let i = [], a = jg(t), o = [], s = {
10929
10976
  pointer: a,
10930
10977
  data: "",
10931
10978
  refs: []
10932
10979
  };
10933
- for (let t of e) if (xg(t) && !o.includes(t.$ref)) {
10980
+ for (let t of e) if (Cg(t) && !o.includes(t.$ref)) {
10934
10981
  s.data === "" && (s.data = JSON.stringify(e));
10935
- let { $ref: c } = t, l = ug(t, ["$ref"]), { filePath: u, normalized: d, pointer: f } = wg(c);
10982
+ let { $ref: c } = t, l = fg(t, ["$ref"]), { filePath: u, normalized: d, pointer: f } = Eg(c);
10936
10983
  if (a === f) continue;
10937
10984
  let p = r.find(((e) => e.refs.includes(t.$ref) && e.data === s.data && f !== e.pointer));
10938
10985
  if (p) return {
@@ -10941,71 +10988,71 @@ var Pg = (e) => {
10941
10988
  };
10942
10989
  if (!s.refs.includes(d)) {
10943
10990
  s.refs.push(d);
10944
- let e = u ? void 0 : Eg(n, f);
10991
+ let e = u ? void 0 : Og(n, f);
10945
10992
  e === void 0 ? (o.push(d), i.push(t)) : i.push(e);
10946
10993
  }
10947
10994
  Object.keys(l).length && i.push(l);
10948
10995
  } else i.push(t);
10949
10996
  s.refs.length && r.push(s);
10950
- let c = g_(i);
10951
- return c.find(((e) => xg(e) && !o.includes(e.$ref))) ? h_(c, t, n, r) : {
10997
+ let c = v_(i);
10998
+ return c.find(((e) => Cg(e) && !o.includes(e.$ref))) ? __(c, t, n, r) : {
10952
10999
  allOfItems: c,
10953
11000
  brokenRefs: o
10954
11001
  };
10955
- }, g_ = (e) => {
11002
+ }, v_ = (e) => {
10956
11003
  let t = [];
10957
- for (let n of e) if (mg(n)) {
11004
+ for (let n of e) if (gg(n)) {
10958
11005
  if (n.allOf && Array.isArray(n.allOf)) {
10959
- let { allOf: e } = n, r = ug(n, ["allOf"]), i = Object.keys(r).length ? [...e, r] : e;
10960
- t.push(...g_(i));
11006
+ let { allOf: e } = n, r = fg(n, ["allOf"]), i = Object.keys(r).length ? [...e, r] : e;
11007
+ t.push(...v_(i));
10961
11008
  } else t.push(n);
10962
11009
  }
10963
11010
  return t;
10964
- }, __ = (e) => typeof e != "object" || !e ? $() : "openapi" in e && typeof e.openapi == "string" && /3.+/.test(e.openapi) ? d_(e.openapi.startsWith("3.1") ? "3.1.x" : "3.0.x") : "graphapi" in e && typeof e.graphapi == "string" ? p_ : $(), v_ = (e, t) => {
11011
+ }, y_ = (e) => typeof e != "object" || !e ? $() : "openapi" in e && typeof e.openapi == "string" && /3.+/.test(e.openapi) ? p_(e.openapi.startsWith("3.1") ? "3.1.x" : "3.0.x") : "graphapi" in e && typeof e.graphapi == "string" ? h_ : $(), b_ = (e, t) => {
10965
11012
  var n;
10966
- let r = (n = t == null ? void 0 : t.rules) == null ? __(e) : n;
11013
+ let r = (n = t == null ? void 0 : t.rules) == null ? y_(e) : n;
10967
11014
  return ((e, t = [], n = {}) => {
10968
11015
  var r;
10969
11016
  t = Array.isArray(t) ? t : [t];
10970
11017
  let i = { "#": void 0 }, a = Object.assign({ state: Object.assign(Object.assign({}, (r = n.state) == null ? {} : r), {
10971
11018
  root: i,
10972
11019
  node: i
10973
- }) }, n.rules ? { rules: n.rules } : {}), [o, s] = _g();
10974
- return gg(e, [
11020
+ }) }, n.rules ? { rules: n.rules } : {}), [o, s] = yg();
11021
+ return vg(e, [
10975
11022
  o,
10976
11023
  ...t,
10977
11024
  s
10978
11025
  ], a), i["#"];
10979
- })(e, y_(t), { rules: r });
10980
- }, y_ = (e) => {
11026
+ })(e, x_(t), { rules: r });
11027
+ }, x_ = (e) => {
10981
11028
  let t = /* @__PURE__ */ new Map(), n = e == null ? void 0 : e.source, r = [];
10982
11029
  return ({ value: i, key: a, path: o, rules: s, state: c }) => {
10983
11030
  var l;
10984
11031
  o.length || e != null && e.source || (n = i);
10985
11032
  let u = (n) => {
10986
11033
  var r;
10987
- let i = b_(o);
10988
- i ? t.set(...i) : (r = e == null ? void 0 : e.onMergeError) == null || r.call(e, zg(), o, n);
11034
+ let i = S_(o);
11035
+ i ? t.set(...i) : (r = e == null ? void 0 : e.onMergeError) == null || r.call(e, Vg(), o, n);
10989
11036
  }, d = () => {
10990
- let { node: e } = c, n = kg(o);
11037
+ let { node: e } = c, n = jg(o);
10991
11038
  if (t.has(n)) {
10992
11039
  let r = t.get(n), o = e[a];
10993
11040
  Array.isArray(o) && (o.length < 2 && u((i == null ? void 0 : i.allOf) || []), o.splice(r, 1));
10994
11041
  }
10995
11042
  };
10996
- if (!mg(i) || Array.isArray(i) || !((e) => !!e && e["/allOf"] && "$" in e["/allOf"])(s)) return { exitHook: d };
10997
- let { allOf: f } = i, p = ug(i, ["allOf"]), m = [];
11043
+ if (!gg(i) || Array.isArray(i) || !((e) => !!e && e["/allOf"] && "$" in e["/allOf"])(s)) return { exitHook: d };
11044
+ let { allOf: f } = i, p = fg(i, ["allOf"]), m = [];
10998
11045
  if (Array.isArray(f) && m.push(...f), m.length) Object.keys(p).length && m.push(p);
10999
11046
  else {
11000
- let { $ref: t } = p, n = ug(p, ["$ref"]);
11047
+ let { $ref: t } = p, n = fg(p, ["$ref"]);
11001
11048
  if (e != null && e.mergeRefSibling && t && Object.keys(n).length > 0) m.push({ $ref: t }, n);
11002
11049
  else if (e != null && e.mergeCombinarySibling) {
11003
- if (Sg(p) && s["/anyOf"]) return {
11004
- value: m_(p, "anyOf", s["/anyOf"]),
11050
+ if (wg(p) && s["/anyOf"]) return {
11051
+ value: g_(p, "anyOf", s["/anyOf"]),
11005
11052
  exitHook: d
11006
11053
  };
11007
- if (Cg(p) && s["/oneOf"]) return {
11008
- value: m_(p, "oneOf", s["/oneOf"]),
11054
+ if (Tg(p) && s["/oneOf"]) return {
11055
+ value: g_(p, "oneOf", s["/oneOf"]),
11009
11056
  exitHook: d
11010
11057
  };
11011
11058
  }
@@ -11014,7 +11061,7 @@ var Pg = (e) => {
11014
11061
  value: p,
11015
11062
  exitHook: d
11016
11063
  };
11017
- let { allOfItems: h, brokenRefs: g } = h_(m, o, n, r);
11064
+ let { allOfItems: h, brokenRefs: g } = __(m, o, n, r);
11018
11065
  if (g.length) {
11019
11066
  for (let t of g) (l = e == null ? void 0 : e.onRefResolveError) == null || l.call(e, "Cannot resolve $ref", o, t);
11020
11067
  return {
@@ -11026,53 +11073,53 @@ var Pg = (e) => {
11026
11073
  value: h.length ? h[0] : {},
11027
11074
  exitHook: d
11028
11075
  };
11029
- let _ = Hg(h, {
11076
+ let _ = Wg(h, {
11030
11077
  allOfItems: h,
11031
11078
  mergeRules: s,
11032
11079
  mergeError: u
11033
11080
  });
11034
- return e != null && e.mergeCombinarySibling && Sg(_) ? {
11035
- value: m_(_, "anyOf", s["/anyOf"]),
11081
+ return e != null && e.mergeCombinarySibling && wg(_) ? {
11082
+ value: g_(_, "anyOf", s["/anyOf"]),
11036
11083
  exitHook: d
11037
- } : e != null && e.mergeCombinarySibling && Cg(_) ? {
11038
- value: m_(_, "oneOf", s["/oneOf"]),
11084
+ } : e != null && e.mergeCombinarySibling && Tg(_) ? {
11085
+ value: g_(_, "oneOf", s["/oneOf"]),
11039
11086
  exitHook: d
11040
11087
  } : {
11041
11088
  value: _,
11042
11089
  exitHook: d
11043
11090
  };
11044
11091
  };
11045
- }, b_ = (e) => {
11046
- for (let t = e.length - 2; t >= 0; t--) if (e[t] === "anyOf" || e[t] === "oneOf") return [kg(e.slice(0, t + 1)), e[t + 1]];
11092
+ }, S_ = (e) => {
11093
+ for (let t = e.length - 2; t >= 0; t--) if (e[t] === "anyOf" || e[t] === "oneOf") return [jg(e.slice(0, t + 1)), e[t + 1]];
11047
11094
  };
11048
11095
  //#endregion
11049
11096
  //#region src/lib/parser/mergeAllOf.ts
11050
- function x_(e) {
11097
+ function C_(e) {
11051
11098
  var t;
11052
11099
  let n = [["paths"], ...Object.keys((t = e.components) == null ? {} : t).map((e) => ["components", e])].flatMap((t) => {
11053
11100
  var n;
11054
- return Object.entries((n = C_(e, t)) == null ? {} : n).filter(([, e]) => S_(e)).map(([e]) => [...t, e]);
11101
+ return Object.entries((n = T_(e, t)) == null ? {} : n).filter(([, e]) => w_(e)).map(([e]) => [...t, e]);
11055
11102
  });
11056
11103
  if (!n.length) return e;
11057
11104
  let r = { openapi: e.openapi };
11058
- n.forEach((t) => w_(r, t, C_(e, t)));
11059
- let i = v_(r, { source: e }), a = { ...e };
11060
- return n.forEach((e) => w_(a, e, C_(i, e))), a;
11105
+ n.forEach((t) => E_(r, t, T_(e, t)));
11106
+ let i = b_(r, { source: e }), a = { ...e };
11107
+ return n.forEach((e) => E_(a, e, T_(i, e))), a;
11061
11108
  }
11062
- function S_(e) {
11063
- return !e || typeof e != "object" ? !1 : "allOf" in e || Object.values(e).some(S_);
11109
+ function w_(e) {
11110
+ return !e || typeof e != "object" ? !1 : "allOf" in e || Object.values(e).some(w_);
11064
11111
  }
11065
- function C_(e, t) {
11112
+ function T_(e, t) {
11066
11113
  return t.reduce((e, t) => e == null ? void 0 : e[t], e);
11067
11114
  }
11068
- function w_(e, t, n) {
11115
+ function E_(e, t, n) {
11069
11116
  let r = e;
11070
11117
  for (let e of t.slice(0, -1)) r = r[e] = { ...r[e] };
11071
11118
  r[t[t.length - 1]] = n;
11072
11119
  }
11073
11120
  //#endregion
11074
11121
  //#region src/lib/parser/parseOpenapi.ts
11075
- function T_() {
11122
+ function D_() {
11076
11123
  function e({ spec: e, defaultTag: t = void 0, defaultTagDescription: n = void 0 }) {
11077
11124
  let r = Am(e);
11078
11125
  return r ? !r.openapi || !String(r.openapi).startsWith("3.") ? (console.warn("Only OpenAPI 3.x is supported"), {}) : (r != null && r.paths && (r = vh(r), r = yh(r), r = bh({
@@ -11086,7 +11133,7 @@ function T_() {
11086
11133
  return t = r ? t : n, t;
11087
11134
  }
11088
11135
  function n({ spec: t, defaultTag: n = void 0, defaultTagDescription: r = void 0 }) {
11089
- let i = { ...Am(t) }, [a, o] = Wu(() => x_(e({
11136
+ let i = { ...Am(t) }, [a, o] = Wu(() => C_(e({
11090
11137
  spec: t,
11091
11138
  defaultTag: n,
11092
11139
  defaultTagDescription: r
@@ -11094,11 +11141,11 @@ function T_() {
11094
11141
  i = o ? i : a;
11095
11142
  let [s, c] = Wu(() => Bm(i));
11096
11143
  i = c ? i : s;
11097
- let [l, u] = Wu(() => lg(i));
11144
+ let [l, u] = Wu(() => dg(i));
11098
11145
  i = u ? i : l;
11099
- let d = new eg(), [f, p] = Wu(() => ag(i, d));
11146
+ let d = new ng(), [f, p] = Wu(() => sg(i, d));
11100
11147
  i = p ? i : f;
11101
- let [m, h] = Wu(() => og(i, d));
11148
+ let [m, h] = Wu(() => cg(i, d));
11102
11149
  return i = h ? i : m, i.externalDocs = i.externalDocs || i.externalDocs || {}, i.info = i.info || i.info || {}, i.servers = i.servers || i.servers || [], i.tags = i.tags || i.tags || [], { ...i };
11103
11150
  }
11104
11151
  async function r({ spec: e, defaultTag: r = void 0, defaultTagDescription: i = void 0 }) {
@@ -11118,55 +11165,55 @@ function T_() {
11118
11165
  }
11119
11166
  //#endregion
11120
11167
  //#region src/composables/useOpenapi.ts
11121
- var E_ = Symbol("openapiLocal"), D_ = null;
11122
- function O_(e, t) {
11168
+ var O_ = Symbol("openapiLocal"), k_ = null;
11169
+ function A_(e, t) {
11123
11170
  return Vm({
11124
11171
  spec: e,
11125
11172
  originalSpec: t
11126
11173
  });
11127
11174
  }
11128
- function k_(e) {
11175
+ function j_(e) {
11129
11176
  let t = Am(e.spec);
11130
- return O_(T_().parseSync({
11177
+ return A_(D_().parseSync({
11131
11178
  spec: e.spec,
11132
11179
  defaultTag: e.defaultTag,
11133
11180
  defaultTagDescription: e.defaultTagDescription
11134
11181
  }), t);
11135
11182
  }
11136
- async function A_(e) {
11183
+ async function M_(e) {
11137
11184
  let t = Am(e.spec);
11138
- return O_(await T_().parseAsync({
11185
+ return A_(await D_().parseAsync({
11139
11186
  spec: e.spec,
11140
11187
  defaultTag: e.defaultTag,
11141
11188
  defaultTagDescription: e.defaultTagDescription
11142
11189
  }), t);
11143
11190
  }
11144
- function j_() {
11145
- return a() ? o(E_, null) : null;
11191
+ function N_() {
11192
+ return a() ? o(O_, null) : null;
11146
11193
  }
11147
- function M_() {
11148
- return D_;
11194
+ function P_() {
11195
+ return k_;
11149
11196
  }
11150
- function N_(e = {}) {
11197
+ function F_(e = {}) {
11151
11198
  var t, n;
11152
11199
  if (e.config && Wo(e.config), e.spec) {
11153
11200
  var r, i;
11154
- D_ = k_({
11201
+ k_ = j_({
11155
11202
  spec: e.spec,
11156
11203
  defaultTag: (r = e.config) == null || (r = r.spec) == null ? void 0 : r.defaultTag,
11157
11204
  defaultTagDescription: (i = e.config) == null || (i = i.spec) == null ? void 0 : i.defaultTagDescription
11158
11205
  });
11159
11206
  }
11160
- let a = (t = (n = j_()) == null ? D_ : n) == null ? Vm({}) : t;
11207
+ let a = (t = (n = N_()) == null ? k_ : n) == null ? Vm({}) : t;
11161
11208
  async function o(t = {}) {
11162
11209
  var n, r, i;
11163
11210
  let a = (n = t.spec) == null ? e.spec : n;
11164
11211
  if (!a) throw Error("No spec provided");
11165
- return D_ = await A_({
11212
+ return k_ = await M_({
11166
11213
  spec: a,
11167
11214
  defaultTag: (r = e.config) == null || (r = r.spec) == null ? void 0 : r.defaultTag,
11168
11215
  defaultTagDescription: (i = e.config) == null || (i = i.spec) == null ? void 0 : i.defaultTagDescription
11169
- }), D_;
11216
+ }), k_;
11170
11217
  }
11171
11218
  return {
11172
11219
  ...a,
@@ -11174,4 +11221,4 @@ function N_(e = {}) {
11174
11221
  };
11175
11222
  }
11176
11223
  //#endregion
11177
- export { re as $, Ja as A, ot as B, To as C, io as D, lo as E, He as F, Oe as G, lt as H, Le as I, ke as J, me as K, ct as L, Ya as M, T as N, ao as O, Ie as P, ne as Q, Re as R, Eo as S, uo as T, ue as U, nt as V, de as W, le as X, Me as Y, Pe as Z, km as _, T_ as a, Wo as b, hh as c, fh as d, ae as et, ih as f, Am as g, Vm as h, N_ as i, Za as j, Xa as k, ph as l, Hm as m, M_ as n, Xh as o, th as p, ye as q, j_ as r, qh as s, E_ as t, oe as tt, mh as u, Uu as v, fo as w, No as x, Ro as y, ze as z };
11224
+ export { re as $, Ja as A, ot as B, To as C, io as D, lo as E, He as F, Oe as G, lt as H, Le as I, ke as J, me as K, ct as L, Ya as M, T as N, ao as O, Ie as P, ne as Q, Re as R, Eo as S, uo as T, ue as U, nt as V, de as W, le as X, Me as Y, Pe as Z, km as _, D_ as a, Wo as b, hh as c, fh as d, ae as et, ih as f, Am as g, Vm as h, F_ as i, Za as j, Xa as k, ph as l, Hm as m, P_ as n, Qh as o, th as p, ye as q, N_ as r, Yh as s, O_ as t, oe as tt, mh as u, Uu as v, fo as w, No as x, Ro as y, ze as z };