@redocly/replay 0.27.0-next.9 → 0.27.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 (69) hide show
  1. package/dist/{replay-AiChatProvider-B94RnQsz.js → replay-AiChatProvider-LQhrLIDL.js} +44 -44
  2. package/dist/{replay-AiChatProvider-P2u2MtTk.js → replay-AiChatProvider-Oms5CFgT.js} +1 -1
  3. package/dist/{replay-AiChatSqliteDBStorage-z_QUPu2M.js → replay-AiChatSqliteDBStorage-3-p1mthX.js} +1 -1
  4. package/dist/{replay-AiChatSqliteDBStorage-BtTa9KkQ.js → replay-AiChatSqliteDBStorage-GZibdHOQ.js} +1 -1
  5. package/dist/replay-AiPanel-BvwwBTh1.js +742 -0
  6. package/dist/{replay-AiPanel-BCkDovN_.js → replay-AiPanel-lcDNvgo0.js} +973 -1176
  7. package/dist/replay-FileWatcher-ClVd_wG0.js +1 -0
  8. package/dist/replay-FileWatcher-DR-wJLe2.js +343 -0
  9. package/dist/replay-Observable-D6wKbFwB.js +31 -0
  10. package/dist/replay-Observable-bjJ6wkRB.js +1 -0
  11. package/dist/replay-SemanticSearchService-CCqwCRo6.js +1 -0
  12. package/dist/replay-SemanticSearchService-U1eXQGfF.js +723 -0
  13. package/dist/{replay-SqliteDBStorage-DMxFWJQ7.js → replay-SqliteDBStorage-Dn6DoVWW.js} +1 -1
  14. package/dist/{replay-SqliteDBStorage-D9b6LAKr.js → replay-SqliteDBStorage-d_ZK6ScA.js} +1 -1
  15. package/dist/replay-TauriFileSystemAdapter-CpiUuG3T.js +99 -0
  16. package/dist/replay-TauriFileSystemAdapter-dwJ0xBYr.js +1 -0
  17. package/dist/replay-TauriRootStorage-CuVbYMXX.js +605 -0
  18. package/dist/replay-TauriRootStorage-DhzbAahU.js +1 -0
  19. package/dist/{replay-agent-loop-C2QNfRSA.js → replay-agent-loop-BLSu4v_O.js} +1 -1
  20. package/dist/{replay-agent-loop-C8ERLqB5.js → replay-agent-loop-DgEHdXUt.js} +11 -11
  21. package/dist/{replay-ai-chat-mappers-fViZvzIy.js → replay-ai-chat-mappers-BvfcEubB.js} +5 -5
  22. package/dist/{replay-ai-chat-mappers-BMhtm64Y.js → replay-ai-chat-mappers-Dy2kJ7ZG.js} +1 -1
  23. package/dist/replay-core-BJmXmoC5.js +1 -0
  24. package/dist/replay-core-B_hiOZZr.js +10 -0
  25. package/dist/{replay-create-model-BhuazQ2q.js → replay-create-model-DNPFcOIp.js} +579 -578
  26. package/dist/{replay-create-model-BgR6vFGV.js → replay-create-model-bOIDB-e8.js} +10 -10
  27. package/dist/{replay-db-DAiJFj0l.js → replay-db-BQGv3PGw.js} +1 -1
  28. package/dist/{replay-db-DKzJowQC.js → replay-db-CMXZZs9v.js} +1 -1
  29. package/dist/{replay-external-resolver-UONYkON2.js → replay-external-resolver-mrykFC2h.js} +2 -2
  30. package/dist/{replay-external-resolver-BY6AAeGp.js → replay-external-resolver-n5OvQMRF.js} +1 -1
  31. package/dist/replay-index-3lwhSmvi.js +1 -0
  32. package/dist/{replay-index-BowK-_3Z.js → replay-index-Bc5RHu5L.js} +23698 -25407
  33. package/dist/replay-index-CFLu-XMV.js +25 -0
  34. package/dist/{replay-index-DWKlhkdU.js → replay-index-CHGVyIdG.js} +1 -1
  35. package/dist/replay-index-CSR_qlua.js +1 -0
  36. package/dist/replay-index-CepJ5Z0m.js +6875 -0
  37. package/dist/{replay-index-amF_dPN8.js → replay-index-CgCGhu4l.js} +6 -6
  38. package/dist/replay-index-DDjmUXWm.js +1 -0
  39. package/dist/{replay-index-DM12kT-D.js → replay-index-DiSy_1OY.js} +1 -1
  40. package/dist/replay-index-Oct6Dygd.js +1 -0
  41. package/dist/{replay-index-BubK_s3I.js → replay-index-QXosJxRc.js} +18 -18
  42. package/dist/replay-index-jkDlU0Lx.js +32 -0
  43. package/dist/{replay-lint-CAN3a2zf.js → replay-lint-DoHQIATV.js} +3 -3
  44. package/dist/{replay-lint-a0aMVdOC.js → replay-lint-PWaLESz5.js} +3 -3
  45. package/dist/{replay-lint-graphql-C3aqm51r.js → replay-lint-graphql-xh8VoAwd.js} +1 -1
  46. package/dist/{replay-lint-graphql-DnztHI0i.js → replay-lint-graphql-zO8zunug.js} +1 -1
  47. package/dist/replay-periodic-revalidation-BoyLQHtg.js +1 -0
  48. package/dist/replay-periodic-revalidation-Dsp-n7ui.js +21 -0
  49. package/dist/replay-promise-map-limit-DRDkHc-b.js +1 -0
  50. package/dist/replay-promise-map-limit-Db_42GvV.js +14 -0
  51. package/dist/replay-resolve-B0AjmaE9.js +47 -0
  52. package/dist/{replay-resolve-LjvT95Yw.js → replay-resolve-MVe_8Ube.js} +1104 -1094
  53. package/dist/{replay-respect-run-DLSZ4d4p.js → replay-respect-run-BJsR4a4m.js} +1 -1
  54. package/dist/{replay-respect-run-wqqp8WHA.js → replay-respect-run-X4PSO6Fj.js} +3 -3
  55. package/dist/{replay-tauri-path-Bg-T0cwI.js → replay-tauri-path-CkGiQWsb.js} +2 -2
  56. package/dist/{replay-tauri-path-DHZlqqfb.js → replay-tauri-path-D8FJsoZb.js} +1 -1
  57. package/dist/replay-useAiChatQueries-BXL-_N2Q.js +215 -0
  58. package/dist/{replay-useAiChatQueries-Dy-kPGKF.js → replay-useAiChatQueries-D7sHNAfV.js} +1078 -1022
  59. package/dist/{replay-validate-key-B2N6AiQk.js → replay-validate-key-CmzSfORv.js} +1 -1
  60. package/dist/{replay-validate-key-B7RBY-6z.js → replay-validate-key-CtZEJRP7.js} +2 -2
  61. package/dist/replay.cjs +1 -1
  62. package/dist/replay.js +12 -12
  63. package/package.json +5 -4
  64. package/dist/replay-AiPanel-COL9ADyD.js +0 -868
  65. package/dist/replay-index-ClVtMDHn.js +0 -6899
  66. package/dist/replay-index-F528jCaH.js +0 -1
  67. package/dist/replay-index-fpeoVNQb.js +0 -1
  68. package/dist/replay-resolve-BoryNVbu.js +0 -47
  69. package/dist/replay-useAiChatQueries-DuNxx5rQ.js +0 -215
@@ -1,5 +1,5 @@
1
- import { aM as we, g as qn, bb as xs, aO as Xf, aL as Je, bc as Eg, bd as Os } from "./replay-index-BowK-_3Z.js";
2
- import { l as $e, o as Ee, c as Tn, i as it, n as Rs, h as Tt, s as $g, d as Fe, p as Tg, q as kc, a as Pt, L as Jr, t as rn, Y as Zf, v as qc, w as Zo, e as Pg, f as Ig, x as ac, y as ia, z as cc, A as xg, C as Og, D as Rg, r as Rr, B as Mr, m as Cc, S as Ag, g as Ng, k as em, E as kg, F as tm, b as qg } from "./replay-resolve-LjvT95Yw.js";
1
+ import { aS as we, g as qn, bg as xs, aU as Xf, aR as Je, bh as Eg, bi as Os } from "./replay-index-Bc5RHu5L.js";
2
+ import { l as $e, o as Ee, c as Tn, i as it, n as Rs, h as Tt, s as $g, d as Fe, p as Tg, q as kc, a as Pt, L as Jr, t as rn, Y as Zf, v as qc, w as Zo, e as Pg, f as Ig, x as ac, y as ia, z as cc, A as xg, C as Og, D as Rg, r as Rr, B as Mr, m as Cc, S as Ag, g as Ng, k as em, E as kg, F as tm, b as qg } from "./replay-resolve-MVe_8Ube.js";
3
3
  function lc(e, t) {
4
4
  let r, n;
5
5
  if (e === t)
@@ -33602,7 +33602,7 @@ async function Lq(e) {
33602
33602
  async function _g(e) {
33603
33603
  const { document: t, customTypes: r, externalRefResolver: n, config: i } = e;
33604
33604
  if (qg(t.source.absoluteRef)) {
33605
- const { lintGraphqlDocument: y } = await import("./replay-lint-graphql-C3aqm51r.js");
33605
+ const { lintGraphqlDocument: y } = await import("./replay-lint-graphql-xh8VoAwd.js");
33606
33606
  return y({ document: t, config: i });
33607
33607
  }
33608
33608
  const o = Bn(t.parsed), s = i.getRulesForSpecVersion(Uh(o)), a = Rs(i.extendTypes(r ?? qs(o), o), i), c = {
@@ -1,4 +1,4 @@
1
- import { aa as R, ab as L, ac as k, ad as g, ae as B, af as M, ag as A, ah as U, ai as V, aj as a, ak as T, al as K, am as G, an as v, ao as $, ap as Y, aq as j } from "./replay-lint-a0aMVdOC.js";
1
+ import { aa as R, ab as L, ac as k, ad as g, ae as B, af as M, ag as A, ah as U, ai as V, aj as a, ak as T, al as K, am as G, an as v, ao as $, ap as Y, aq as j } from "./replay-lint-PWaLESz5.js";
2
2
  function u(n, t, e) {
3
3
  return new R(`Syntax Error: ${e}`, {
4
4
  source: n,
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./replay-lint-CAN3a2zf.js");function u(i,t,e){return new a.GraphQLError(`Syntax Error: ${e}`,{source:i,positions:[t]})}var r;(function(i){i.SOF="<SOF>",i.EOF="<EOF>",i.BANG="!",i.DOLLAR="$",i.AMP="&",i.PAREN_L="(",i.PAREN_R=")",i.DOT=".",i.SPREAD="...",i.COLON=":",i.EQUALS="=",i.AT="@",i.BRACKET_L="[",i.BRACKET_R="]",i.BRACE_L="{",i.PIPE="|",i.BRACE_R="}",i.NAME="Name",i.INT="Int",i.FLOAT="Float",i.STRING="String",i.BLOCK_STRING="BlockString",i.COMMENT="Comment"})(r||(r={}));class R{constructor(t){const e=new a.Token(r.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==r.EOF)do if(t.next)t=t.next;else{const e=S(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===r.COMMENT);return t}}function g(i){return i===r.BANG||i===r.DOLLAR||i===r.AMP||i===r.PAREN_L||i===r.PAREN_R||i===r.DOT||i===r.SPREAD||i===r.COLON||i===r.EQUALS||i===r.AT||i===r.BRACKET_L||i===r.BRACKET_R||i===r.BRACE_L||i===r.PIPE||i===r.BRACE_R}function E(i){return i>=0&&i<=55295||i>=57344&&i<=1114111}function N(i,t){return O(i.charCodeAt(t))&&v(i.charCodeAt(t+1))}function O(i){return i>=55296&&i<=56319}function v(i){return i>=56320&&i<=57343}function x(i,t){const e=i.source.body.codePointAt(t);if(e===void 0)return r.EOF;if(e>=32&&e<=126){const s=String.fromCodePoint(e);return s==='"'?`'"'`:`"${s}"`}return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function h(i,t,e,s,n){const o=i.line,c=1+e-i.lineStart;return new a.Token(t,e,s,o,c,n)}function S(i,t){const e=i.source.body,s=e.length;let n=t;for(;n<s;){const o=e.charCodeAt(n);switch(o){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++i.line,i.lineStart=n;continue;case 13:e.charCodeAt(n+1)===10?n+=2:++n,++i.line,i.lineStart=n;continue;case 35:return w(i,n);case 33:return h(i,r.BANG,n,n+1);case 36:return h(i,r.DOLLAR,n,n+1);case 38:return h(i,r.AMP,n,n+1);case 40:return h(i,r.PAREN_L,n,n+1);case 41:return h(i,r.PAREN_R,n,n+1);case 46:if(e.charCodeAt(n+1)===46&&e.charCodeAt(n+2)===46)return h(i,r.SPREAD,n,n+3);break;case 58:return h(i,r.COLON,n,n+1);case 61:return h(i,r.EQUALS,n,n+1);case 64:return h(i,r.AT,n,n+1);case 91:return h(i,r.BRACKET_L,n,n+1);case 93:return h(i,r.BRACKET_R,n,n+1);case 123:return h(i,r.BRACE_L,n,n+1);case 124:return h(i,r.PIPE,n,n+1);case 125:return h(i,r.BRACE_R,n,n+1);case 34:return e.charCodeAt(n+1)===34&&e.charCodeAt(n+2)===34?M(i,n):K(i,n)}if(a.isDigit(o)||o===45)return b(i,n,o);if(a.isNameStart(o))return U(i,n);throw u(i.source,n,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:E(o)||N(e,n)?`Unexpected character: ${x(i,n)}.`:`Invalid character: ${x(i,n)}.`)}return h(i,r.EOF,s,s)}function w(i,t){const e=i.source.body,s=e.length;let n=t+1;for(;n<s;){const o=e.charCodeAt(n);if(o===10||o===13)break;if(E(o))++n;else if(N(e,n))n+=2;else break}return h(i,r.COMMENT,t,n,e.slice(t+1,n))}function b(i,t,e){const s=i.source.body;let n=t,o=e,c=!1;if(o===45&&(o=s.charCodeAt(++n)),o===48){if(o=s.charCodeAt(++n),a.isDigit(o))throw u(i.source,n,`Invalid number, unexpected digit after 0: ${x(i,n)}.`)}else n=k(i,n,o),o=s.charCodeAt(n);if(o===46&&(c=!0,o=s.charCodeAt(++n),n=k(i,n,o),o=s.charCodeAt(n)),(o===69||o===101)&&(c=!0,o=s.charCodeAt(++n),(o===43||o===45)&&(o=s.charCodeAt(++n)),n=k(i,n,o),o=s.charCodeAt(n)),o===46||a.isNameStart(o))throw u(i.source,n,`Invalid number, expected digit but got: ${x(i,n)}.`);return h(i,c?r.FLOAT:r.INT,t,n,s.slice(t,n))}function k(i,t,e){if(!a.isDigit(e))throw u(i.source,t,`Invalid number, expected digit but got: ${x(i,t)}.`);const s=i.source.body;let n=t+1;for(;a.isDigit(s.charCodeAt(n));)++n;return n}function K(i,t){const e=i.source.body,s=e.length;let n=t+1,o=n,c="";for(;n<s;){const p=e.charCodeAt(n);if(p===34)return c+=e.slice(o,n),h(i,r.STRING,t,n+1,c);if(p===92){c+=e.slice(o,n);const d=e.charCodeAt(n+1)===117?e.charCodeAt(n+2)===123?P(i,n):F(i,n):B(i,n);c+=d.value,n+=d.size,o=n;continue}if(p===10||p===13)break;if(E(p))++n;else if(N(e,n))n+=2;else throw u(i.source,n,`Invalid character within String: ${x(i,n)}.`)}throw u(i.source,n,"Unterminated string.")}function P(i,t){const e=i.source.body;let s=0,n=3;for(;n<12;){const o=e.charCodeAt(t+n++);if(o===125){if(n<5||!E(s))break;return{value:String.fromCodePoint(s),size:n}}if(s=s<<4|m(o),s<0)break}throw u(i.source,t,`Invalid Unicode escape sequence: "${e.slice(t,t+n)}".`)}function F(i,t){const e=i.source.body,s=D(e,t+2);if(E(s))return{value:String.fromCodePoint(s),size:6};if(O(s)&&e.charCodeAt(t+6)===92&&e.charCodeAt(t+7)===117){const n=D(e,t+8);if(v(n))return{value:String.fromCodePoint(s,n),size:12}}throw u(i.source,t,`Invalid Unicode escape sequence: "${e.slice(t,t+6)}".`)}function D(i,t){return m(i.charCodeAt(t))<<12|m(i.charCodeAt(t+1))<<8|m(i.charCodeAt(t+2))<<4|m(i.charCodeAt(t+3))}function m(i){return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:-1}function B(i,t){const e=i.source.body;switch(e.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./replay-lint-DoHQIATV.js");function u(i,t,e){return new a.GraphQLError(`Syntax Error: ${e}`,{source:i,positions:[t]})}var r;(function(i){i.SOF="<SOF>",i.EOF="<EOF>",i.BANG="!",i.DOLLAR="$",i.AMP="&",i.PAREN_L="(",i.PAREN_R=")",i.DOT=".",i.SPREAD="...",i.COLON=":",i.EQUALS="=",i.AT="@",i.BRACKET_L="[",i.BRACKET_R="]",i.BRACE_L="{",i.PIPE="|",i.BRACE_R="}",i.NAME="Name",i.INT="Int",i.FLOAT="Float",i.STRING="String",i.BLOCK_STRING="BlockString",i.COMMENT="Comment"})(r||(r={}));class R{constructor(t){const e=new a.Token(r.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==r.EOF)do if(t.next)t=t.next;else{const e=S(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===r.COMMENT);return t}}function g(i){return i===r.BANG||i===r.DOLLAR||i===r.AMP||i===r.PAREN_L||i===r.PAREN_R||i===r.DOT||i===r.SPREAD||i===r.COLON||i===r.EQUALS||i===r.AT||i===r.BRACKET_L||i===r.BRACKET_R||i===r.BRACE_L||i===r.PIPE||i===r.BRACE_R}function E(i){return i>=0&&i<=55295||i>=57344&&i<=1114111}function N(i,t){return O(i.charCodeAt(t))&&v(i.charCodeAt(t+1))}function O(i){return i>=55296&&i<=56319}function v(i){return i>=56320&&i<=57343}function x(i,t){const e=i.source.body.codePointAt(t);if(e===void 0)return r.EOF;if(e>=32&&e<=126){const s=String.fromCodePoint(e);return s==='"'?`'"'`:`"${s}"`}return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function h(i,t,e,s,n){const o=i.line,c=1+e-i.lineStart;return new a.Token(t,e,s,o,c,n)}function S(i,t){const e=i.source.body,s=e.length;let n=t;for(;n<s;){const o=e.charCodeAt(n);switch(o){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++i.line,i.lineStart=n;continue;case 13:e.charCodeAt(n+1)===10?n+=2:++n,++i.line,i.lineStart=n;continue;case 35:return w(i,n);case 33:return h(i,r.BANG,n,n+1);case 36:return h(i,r.DOLLAR,n,n+1);case 38:return h(i,r.AMP,n,n+1);case 40:return h(i,r.PAREN_L,n,n+1);case 41:return h(i,r.PAREN_R,n,n+1);case 46:if(e.charCodeAt(n+1)===46&&e.charCodeAt(n+2)===46)return h(i,r.SPREAD,n,n+3);break;case 58:return h(i,r.COLON,n,n+1);case 61:return h(i,r.EQUALS,n,n+1);case 64:return h(i,r.AT,n,n+1);case 91:return h(i,r.BRACKET_L,n,n+1);case 93:return h(i,r.BRACKET_R,n,n+1);case 123:return h(i,r.BRACE_L,n,n+1);case 124:return h(i,r.PIPE,n,n+1);case 125:return h(i,r.BRACE_R,n,n+1);case 34:return e.charCodeAt(n+1)===34&&e.charCodeAt(n+2)===34?M(i,n):K(i,n)}if(a.isDigit(o)||o===45)return b(i,n,o);if(a.isNameStart(o))return U(i,n);throw u(i.source,n,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:E(o)||N(e,n)?`Unexpected character: ${x(i,n)}.`:`Invalid character: ${x(i,n)}.`)}return h(i,r.EOF,s,s)}function w(i,t){const e=i.source.body,s=e.length;let n=t+1;for(;n<s;){const o=e.charCodeAt(n);if(o===10||o===13)break;if(E(o))++n;else if(N(e,n))n+=2;else break}return h(i,r.COMMENT,t,n,e.slice(t+1,n))}function b(i,t,e){const s=i.source.body;let n=t,o=e,c=!1;if(o===45&&(o=s.charCodeAt(++n)),o===48){if(o=s.charCodeAt(++n),a.isDigit(o))throw u(i.source,n,`Invalid number, unexpected digit after 0: ${x(i,n)}.`)}else n=k(i,n,o),o=s.charCodeAt(n);if(o===46&&(c=!0,o=s.charCodeAt(++n),n=k(i,n,o),o=s.charCodeAt(n)),(o===69||o===101)&&(c=!0,o=s.charCodeAt(++n),(o===43||o===45)&&(o=s.charCodeAt(++n)),n=k(i,n,o),o=s.charCodeAt(n)),o===46||a.isNameStart(o))throw u(i.source,n,`Invalid number, expected digit but got: ${x(i,n)}.`);return h(i,c?r.FLOAT:r.INT,t,n,s.slice(t,n))}function k(i,t,e){if(!a.isDigit(e))throw u(i.source,t,`Invalid number, expected digit but got: ${x(i,t)}.`);const s=i.source.body;let n=t+1;for(;a.isDigit(s.charCodeAt(n));)++n;return n}function K(i,t){const e=i.source.body,s=e.length;let n=t+1,o=n,c="";for(;n<s;){const p=e.charCodeAt(n);if(p===34)return c+=e.slice(o,n),h(i,r.STRING,t,n+1,c);if(p===92){c+=e.slice(o,n);const d=e.charCodeAt(n+1)===117?e.charCodeAt(n+2)===123?P(i,n):F(i,n):B(i,n);c+=d.value,n+=d.size,o=n;continue}if(p===10||p===13)break;if(E(p))++n;else if(N(e,n))n+=2;else throw u(i.source,n,`Invalid character within String: ${x(i,n)}.`)}throw u(i.source,n,"Unterminated string.")}function P(i,t){const e=i.source.body;let s=0,n=3;for(;n<12;){const o=e.charCodeAt(t+n++);if(o===125){if(n<5||!E(s))break;return{value:String.fromCodePoint(s),size:n}}if(s=s<<4|m(o),s<0)break}throw u(i.source,t,`Invalid Unicode escape sequence: "${e.slice(t,t+n)}".`)}function F(i,t){const e=i.source.body,s=D(e,t+2);if(E(s))return{value:String.fromCodePoint(s),size:6};if(O(s)&&e.charCodeAt(t+6)===92&&e.charCodeAt(t+7)===117){const n=D(e,t+8);if(v(n))return{value:String.fromCodePoint(s,n),size:12}}throw u(i.source,t,`Invalid Unicode escape sequence: "${e.slice(t,t+6)}".`)}function D(i,t){return m(i.charCodeAt(t))<<12|m(i.charCodeAt(t+1))<<8|m(i.charCodeAt(t+2))<<4|m(i.charCodeAt(t+3))}function m(i){return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:-1}function B(i,t){const e=i.source.body;switch(e.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
2
2
  `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw u(i.source,t,`Invalid character escape sequence: "${e.slice(t,t+2)}".`)}function M(i,t){const e=i.source.body,s=e.length;let n=i.lineStart,o=t+3,c=o,p="";const d=[];for(;o<s;){const f=e.charCodeAt(o);if(f===34&&e.charCodeAt(o+1)===34&&e.charCodeAt(o+2)===34){p+=e.slice(c,o),d.push(p);const l=h(i,r.BLOCK_STRING,t,o+3,a.dedentBlockStringLines(d).join(`
3
3
  `));return i.line+=d.length-1,i.lineStart=n,l}if(f===92&&e.charCodeAt(o+1)===34&&e.charCodeAt(o+2)===34&&e.charCodeAt(o+3)===34){p+=e.slice(c,o),c=o+1,o+=4;continue}if(f===10||f===13){p+=e.slice(c,o),d.push(p),f===13&&e.charCodeAt(o+1)===10?o+=2:++o,p="",c=o,n=o;continue}if(E(f))++o;else if(N(e,o))o+=2;else throw u(i.source,o,`Invalid character within String: ${x(i,o)}.`)}throw u(i.source,o,"Unterminated string.")}function U(i,t){const e=i.source.body,s=e.length;let n=t+1;for(;n<s;){const o=e.charCodeAt(n);if(a.isNameContinue(o))++n;else break}return h(i,r.NAME,t,n,e.slice(t,n))}class _{constructor(t,e="GraphQL request",s={line:1,column:1}){typeof t=="string"||a.devAssert(!1,`Body must be a string. Received: ${a.inspect(t)}.`),this.body=t,this.name=e,this.locationOffset=s,this.locationOffset.line>0||a.devAssert(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||a.devAssert(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function V(i){return a.instanceOf(i,_)}function G(i,t){const e=new $(i,t),s=e.parseDocument();return Object.defineProperty(s,"tokenCount",{enumerable:!1,value:e.tokenCount}),s}class ${constructor(t,e={}){const{lexer:s,...n}=e;if(s)this._lexer=s;else{const o=V(t)?t:new _(t);this._lexer=new R(o)}this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(r.NAME);return this.node(t,{kind:a.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:a.Kind.DOCUMENT,definitions:this.many(r.SOF,this.parseDefinition,r.EOF)})}parseDefinition(){if(this.peek(r.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),e=t?this._lexer.lookahead():this._lexer.token;if(t&&e.kind===r.BRACE_L)throw u(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(e.kind===r.NAME){switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw u(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(e.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(e)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(r.BRACE_L))return this.node(t,{kind:a.Kind.OPERATION_DEFINITION,operation:a.OperationTypeNode.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const e=this.parseDescription(),s=this.parseOperationType();let n;return this.peek(r.NAME)&&(n=this.parseName()),this.node(t,{kind:a.Kind.OPERATION_DEFINITION,operation:s,description:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(r.NAME);switch(t.value){case"query":return a.OperationTypeNode.QUERY;case"mutation":return a.OperationTypeNode.MUTATION;case"subscription":return a.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(r.PAREN_L,this.parseVariableDefinition,r.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:a.Kind.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(r.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(r.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(r.DOLLAR),this.node(t,{kind:a.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:a.Kind.SELECTION_SET,selections:this.many(r.BRACE_L,this.parseSelection,r.BRACE_R)})}parseSelection(){return this.peek(r.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,e=this.parseName();let s,n;return this.expectOptionalToken(r.COLON)?(s=e,n=this.parseName()):n=e,this.node(t,{kind:a.Kind.FIELD,alias:s,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(r.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(r.PAREN_L,e,r.PAREN_R)}parseArgument(t=!1){const e=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(e,{kind:a.Kind.ARGUMENT,name:s,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(r.SPREAD);const e=this.expectOptionalKeyword("on");return!e&&this.peek(r.NAME)?this.node(t,{kind:a.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:a.Kind.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token,e=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:a.Kind.FRAGMENT_DEFINITION,description:e,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:a.Kind.FRAGMENT_DEFINITION,description:e,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const e=this._lexer.token;switch(e.kind){case r.BRACKET_L:return this.parseList(t);case r.BRACE_L:return this.parseObject(t);case r.INT:return this.advanceLexer(),this.node(e,{kind:a.Kind.INT,value:e.value});case r.FLOAT:return this.advanceLexer(),this.node(e,{kind:a.Kind.FLOAT,value:e.value});case r.STRING:case r.BLOCK_STRING:return this.parseStringLiteral();case r.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:a.Kind.BOOLEAN,value:!0});case"false":return this.node(e,{kind:a.Kind.BOOLEAN,value:!1});case"null":return this.node(e,{kind:a.Kind.NULL});default:return this.node(e,{kind:a.Kind.ENUM,value:e.value})}case r.DOLLAR:if(t)if(this.expectToken(r.DOLLAR),this._lexer.token.kind===r.NAME){const s=this._lexer.token.value;throw u(this._lexer.source,e.start,`Unexpected variable "$${s}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:a.Kind.STRING,value:t.value,block:t.kind===r.BLOCK_STRING})}parseList(t){const e=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:a.Kind.LIST,values:this.any(r.BRACKET_L,e,r.BRACKET_R)})}parseObject(t){const e=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:a.Kind.OBJECT,fields:this.any(r.BRACE_L,e,r.BRACE_R)})}parseObjectField(t){const e=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(e,{kind:a.Kind.OBJECT_FIELD,name:s,value:this.parseValueLiteral(t)})}parseDirectives(t){const e=[];for(;this.peek(r.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const e=this._lexer.token;return this.expectToken(r.AT),this.node(e,{kind:a.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let e;if(this.expectOptionalToken(r.BRACKET_L)){const s=this.parseTypeReference();this.expectToken(r.BRACKET_R),e=this.node(t,{kind:a.Kind.LIST_TYPE,type:s})}else e=this.parseNamedType();return this.expectOptionalToken(r.BANG)?this.node(t,{kind:a.Kind.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:a.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(r.STRING)||this.peek(r.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("schema");const s=this.parseConstDirectives(),n=this.many(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);return this.node(t,{kind:a.Kind.SCHEMA_DEFINITION,description:e,directives:s,operationTypes:n})}parseOperationTypeDefinition(){const t=this._lexer.token,e=this.parseOperationType();this.expectToken(r.COLON);const s=this.parseNamedType();return this.node(t,{kind:a.Kind.OPERATION_TYPE_DEFINITION,operation:e,type:s})}parseScalarTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("scalar");const s=this.parseName(),n=this.parseConstDirectives();return this.node(t,{kind:a.Kind.SCALAR_TYPE_DEFINITION,description:e,name:s,directives:n})}parseObjectTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("type");const s=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(t,{kind:a.Kind.OBJECT_TYPE_DEFINITION,description:e,name:s,interfaces:n,directives:o,fields:c})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(r.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseFieldDefinition,r.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,e=this.parseDescription(),s=this.parseName(),n=this.parseArgumentDefs();this.expectToken(r.COLON);const o=this.parseTypeReference(),c=this.parseConstDirectives();return this.node(t,{kind:a.Kind.FIELD_DEFINITION,description:e,name:s,arguments:n,type:o,directives:c})}parseArgumentDefs(){return this.optionalMany(r.PAREN_L,this.parseInputValueDef,r.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,e=this.parseDescription(),s=this.parseName();this.expectToken(r.COLON);const n=this.parseTypeReference();let o;this.expectOptionalToken(r.EQUALS)&&(o=this.parseConstValueLiteral());const c=this.parseConstDirectives();return this.node(t,{kind:a.Kind.INPUT_VALUE_DEFINITION,description:e,name:s,type:n,defaultValue:o,directives:c})}parseInterfaceTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("interface");const s=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(t,{kind:a.Kind.INTERFACE_TYPE_DEFINITION,description:e,name:s,interfaces:n,directives:o,fields:c})}parseUnionTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("union");const s=this.parseName(),n=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:a.Kind.UNION_TYPE_DEFINITION,description:e,name:s,directives:n,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(r.EQUALS)?this.delimitedMany(r.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("enum");const s=this.parseName(),n=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:a.Kind.ENUM_TYPE_DEFINITION,description:e,name:s,directives:n,values:o})}parseEnumValuesDefinition(){return this.optionalMany(r.BRACE_L,this.parseEnumValueDefinition,r.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,e=this.parseDescription(),s=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(t,{kind:a.Kind.ENUM_VALUE_DEFINITION,description:e,name:s,directives:n})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw u(this._lexer.source,this._lexer.token.start,`${T(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("input");const s=this.parseName(),n=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:a.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:s,directives:n,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseInputValueDef,r.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===r.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension();break}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const e=this.parseConstDirectives(),s=this.optionalMany(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);if(e.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.SCHEMA_EXTENSION,directives:e,operationTypes:s})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const e=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.SCALAR_TYPE_EXTENSION,name:e,directives:s})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const e=this.parseName(),s=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&n.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.OBJECT_TYPE_EXTENSION,name:e,interfaces:s,directives:n,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const e=this.parseName(),s=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&n.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.INTERFACE_TYPE_EXTENSION,name:e,interfaces:s,directives:n,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const e=this.parseName(),s=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(s.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.UNION_TYPE_EXTENSION,name:e,directives:s,types:n})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const e=this.parseName(),s=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(s.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.ENUM_TYPE_EXTENSION,name:e,directives:s,values:n})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const e=this.parseName(),s=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(s.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:s,fields:n})}parseDirectiveDefinitionExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(r.AT);const e=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.DIRECTIVE_EXTENSION,name:e,directives:s})}parseDirectiveDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(r.AT);const s=this.parseName(),n=this.parseArgumentDefs(),o=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],c=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const p=this.parseDirectiveLocations();return this.node(t,{kind:a.Kind.DIRECTIVE_DEFINITION,description:e,name:s,arguments:n,directives:o,repeatable:c,locations:p})}parseDirectiveLocations(){return this.delimitedMany(r.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(a.DirectiveLocation,e.value))return e;throw this.unexpected(t)}parseSchemaCoordinate(){const t=this._lexer.token,e=this.expectOptionalToken(r.AT),s=this.parseName();let n;!e&&this.expectOptionalToken(r.DOT)&&(n=this.parseName());let o;return(e||n)&&this.expectOptionalToken(r.PAREN_L)&&(o=this.parseName(),this.expectToken(r.COLON),this.expectToken(r.PAREN_R)),e?o?this.node(t,{kind:a.Kind.DIRECTIVE_ARGUMENT_COORDINATE,name:s,argumentName:o}):this.node(t,{kind:a.Kind.DIRECTIVE_COORDINATE,name:s}):n?o?this.node(t,{kind:a.Kind.ARGUMENT_COORDINATE,name:s,fieldName:n,argumentName:o}):this.node(t,{kind:a.Kind.MEMBER_COORDINATE,name:s,memberName:n}):this.node(t,{kind:a.Kind.TYPE_COORDINATE,name:s})}node(t,e){return this._options.noLocation!==!0&&(e.loc=new a.Location(t,this._lexer.lastToken,this._lexer.source)),e}peek(t){return this._lexer.token.kind===t}expectToken(t){const e=this._lexer.token;if(e.kind===t)return this.advanceLexer(),e;throw u(this._lexer.source,e.start,`Expected ${C(t)}, found ${T(e)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const e=this._lexer.token;if(e.kind===r.NAME&&e.value===t)this.advanceLexer();else throw u(this._lexer.source,e.start,`Expected "${t}", found ${T(e)}.`)}expectOptionalKeyword(t){const e=this._lexer.token;return e.kind===r.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const e=t??this._lexer.token;return u(this._lexer.source,e.start,`Unexpected ${T(e)}.`)}any(t,e,s){this.expectToken(t);const n=[];for(;!this.expectOptionalToken(s);)n.push(e.call(this));return n}optionalMany(t,e,s){if(this.expectOptionalToken(t)){const n=[];do n.push(e.call(this));while(!this.expectOptionalToken(s));return n}return[]}many(t,e,s){this.expectToken(t);const n=[];do n.push(e.call(this));while(!this.expectOptionalToken(s));return n}delimitedMany(t,e){this.expectOptionalToken(t);const s=[];do s.push(e.call(this));while(this.expectOptionalToken(t));return s}advanceLexer(){const{maxTokens:t}=this._options,e=this._lexer.advance();if(e.kind!==r.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw u(this._lexer.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function T(i){const t=i.value;return C(i.kind)+(t!=null?` "${t}"`:"")}function C(i){return g(i)?`"${i}"`:i}function Y(i,t){const e={};for(const s of Object.keys(i)){const n=i[s];if(!n)continue;const o=typeof n=="function"?n:n.enter,c=typeof n=="function"?void 0:n.leave;e[s]={...o?{enter:y(o,t)}:{},...c?{leave:y(c,t)}:{}}}return e}function y(i,t){return(e,s,n,o,c)=>{i(e,j(e,t,c))}}function j(i,t,e=[]){const{ruleId:s,severity:n,message:o,source:c,config:p,problems:d}=t,f=e.filter(l=>!Array.isArray(l));return{source:c,config:p,ancestors:f,report(l){const I=l.node??i,A=l.loc??q(I),L={source:c,pointer:void 0,start:A?.start??{line:1,col:1},end:A?.end};d.push({ruleId:l.ruleId??s,severity:l.severity??n,message:o?o.replace("{{message}}",l.message):l.message,suggest:l.suggest??[],location:[L]})}}}function q(i){if(!i?.loc)return;const t=a.getLocation(i.loc.source,i.loc.start),e=a.getLocation(i.loc.source,i.loc.end);return{start:{line:t.line,col:t.column},end:{line:e.line,col:e.column}}}function Q(i){const{document:t,config:e}=i,s=t.source;if(s.body.trim()==="")return[{ruleId:"struct",severity:"error",message:"The GraphQL document is empty. Expected at least one type definition.",suggest:[],location:[{source:s,pointer:void 0,start:{line:1,col:1}}]}];let n;try{n=G(new _(s.body,s.absoluteRef))}catch(d){if(d instanceof a.GraphQLError)return[z(d,s)];throw d}const o=e.getRulesForSpecVersion("graphql")??[],c=a.initRules(o,e,"rules","graphql");return X({ast:n,source:s,config:e,rules:c}).map(d=>e.addProblemToIgnore(d))}function z(i,t){const e=i.locations?.[0];return{ruleId:"struct",severity:"error",message:i.message,suggest:[],location:[{source:t,pointer:void 0,start:e?{line:e.line,col:e.column}:{line:1,col:1}}]}}function X(i){const{ast:t,source:e,config:s,rules:n}=i,o=[],c=n.map(({ruleId:p,severity:d,message:f,visitor:l})=>Y(l,{ruleId:p,severity:d,message:f,source:e,config:s,problems:o}));return c.length>0&&a.visit(t,a.visitInParallel(c)),o}exports.lintGraphqlDocument=Q;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=300*1e3;function r(e){return()=>({apis:e.apis.get({noproxy:!0})??[],collections:e.collections.get({noproxy:!0})??[]})}function s(e,i,o=n){let t=!1;const a=r(i),c=setInterval(()=>{t||e.getIndexingActivityState().inProgress||(t=!0,e.reindex(a).catch(l=>console.error("Semantic index revalidation:",l)).finally(()=>{t=!1}))},o);return()=>clearInterval(c)}exports.INDEX_REVALIDATION_INTERVAL_MS=n;exports.createIndexSnapshotGetter=r;exports.startPeriodicIndexRevalidation=s;
@@ -0,0 +1,21 @@
1
+ const l = 3e5;
2
+ function c(e) {
3
+ return () => ({
4
+ apis: e.apis.get({ noproxy: !0 }) ?? [],
5
+ collections: e.collections.get({ noproxy: !0 }) ?? []
6
+ });
7
+ }
8
+ function s(e, n, r = 3e5) {
9
+ let t = !1;
10
+ const i = c(n), o = setInterval(() => {
11
+ t || e.getIndexingActivityState().inProgress || (t = !0, e.reindex(i).catch((a) => console.error("Semantic index revalidation:", a)).finally(() => {
12
+ t = !1;
13
+ }));
14
+ }, r);
15
+ return () => clearInterval(o);
16
+ }
17
+ export {
18
+ l as INDEX_REVALIDATION_INTERVAL_MS,
19
+ c as createIndexSnapshotGetter,
20
+ s as startPeriodicIndexRevalidation
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";async function m(t,s,c){const i=[],e=[];for(const r of t){const n=Promise.resolve().then(()=>c(r,t));if(i.push(n),s<=t.length){const o=n.then(()=>e.splice(e.indexOf(o),1));e.push(o),e.length>=s&&await Promise.race(e)}}return Promise.all(i)}exports.promiseMapLimit=m;
@@ -0,0 +1,14 @@
1
+ async function r(t, n, c) {
2
+ const s = [], e = [];
3
+ for (const p of t) {
4
+ const i = Promise.resolve().then(() => c(p, t));
5
+ if (s.push(i), n <= t.length) {
6
+ const o = i.then(() => e.splice(e.indexOf(o), 1));
7
+ e.push(o), e.length >= n && await Promise.race(e);
8
+ }
9
+ }
10
+ return Promise.all(s);
11
+ }
12
+ export {
13
+ r as p
14
+ };
@@ -0,0 +1,47 @@
1
+ "use strict";const se=require("./replay-index-CepJ5Z0m.js");function Hn(e){return!!e}var bt={},vt,fn;function ht(){if(fn)return vt;fn=1;const e="\\\\/",t=`[^${e}]`,n=0,r="\\.",i="\\+",o="\\?",a="\\/",s="(?=.)",l="[^/]",u=`(?:${a}|$)`,c=`(?:^|${a})`,E=`${r}{1,2}${u}`,m=`(?!${r})`,C=`(?!${c}${E})`,S=`(?!${r}{0,1}${u})`,w=`(?!${E})`,M=`[^.${a}]`,N=`${l}*?`,y={DOT_LITERAL:r,PLUS_LITERAL:i,QMARK_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:s,QMARK:l,END_ANCHOR:u,DOTS_SLASH:E,NO_DOT:m,NO_DOTS:C,NO_DOT_SLASH:S,NO_DOTS_SLASH:w,QMARK_NO_DOT:M,STAR:N,START_ANCHOR:c,SEP:"/"},R={...y,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${e}])${r}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"},f={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return vt={DEFAULT_MAX_EXTGLOB_RECURSION:n,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:f,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(I){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${I.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(I){return I===!0?R:y}},vt}var pn;function gt(){return pn||(pn=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=ht();e.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),e.hasRegexChars=o=>r.test(o),e.isRegexChar=o=>o.length===1&&e.hasRegexChars(o),e.escapeRegex=o=>o.replace(i,"\\$1"),e.toPosixSlashes=o=>o.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const o=navigator.platform.toLowerCase();return o==="win32"||o==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1},e.removeBackslashes=o=>o.replace(n,a=>a==="\\"?"":a),e.escapeLast=(o,a,s)=>{const l=o.lastIndexOf(a,s);return l===-1?o:o[l-1]==="\\"?e.escapeLast(o,a,l-1):`${o.slice(0,l)}\\${o.slice(l)}`},e.removePrefix=(o,a={})=>{let s=o;return s.startsWith("./")&&(s=s.slice(2),a.prefix="./"),s},e.wrapOutput=(o,a={},s={})=>{const l=s.contains?"":"^",u=s.contains?"":"$";let c=`${l}(?:${o})${u}`;return a.negated===!0&&(c=`(?:^(?!${c}).*$)`),c},e.basename=(o,{windows:a}={})=>{const s=o.split(a?/[\\/]/:"/"),l=s[s.length-1];return l===""?s[s.length-2]:l}})(bt)),bt}var Rt,dn;function vr(){if(dn)return Rt;dn=1;const e=gt(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:i,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:s,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_PLUS:E,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:w}=ht(),M=y=>y===s||y===r,N=y=>{y.isPrefix!==!0&&(y.depth=y.isGlobstar?1/0:1)};return Rt=(y,R)=>{const f=R||{},I=y.length-1,v=f.parts===!0||f.scanToEnd===!0,A=[],g=[],_=[];let j=y,k=-1,K=0,ue=0,le=!1,he=!1,W=!1,Ee=!1,_e=!1,ge=!1,U=!1,me=!1,we=!1,ne=!1,J=0,ce,O,F={value:"",depth:0,isGlob:!1};const h=()=>k>=I,ae=()=>j.charCodeAt(k+1),z=()=>(ce=O,j.charCodeAt(++k));for(;k<I;){O=z();let D;if(O===r){U=F.backslashes=!0,O=z(),O===l&&(ge=!0);continue}if(ge===!0||O===l){for(J++;h()!==!0&&(O=z());){if(O===r){U=F.backslashes=!0,z();continue}if(O===l){J++;continue}if(ge!==!0&&O===o&&(O=z())===o){if(le=F.isBrace=!0,W=F.isGlob=!0,ne=!0,v===!0)continue;break}if(ge!==!0&&O===i){if(le=F.isBrace=!0,W=F.isGlob=!0,ne=!0,v===!0)continue;break}if(O===C&&(J--,J===0)){ge=!1,le=F.isBrace=!0,ne=!0;break}}if(v===!0)continue;break}if(O===s){if(A.push(k),g.push(F),F={value:"",depth:0,isGlob:!1},ne===!0)continue;if(ce===o&&k===K+1){K+=2;continue}ue=k+1;continue}if(f.noext!==!0&&(O===E||O===n||O===t||O===m||O===a)===!0&&ae()===u){if(W=F.isGlob=!0,Ee=F.isExtglob=!0,ne=!0,O===a&&k===K&&(we=!0),v===!0){for(;h()!==!0&&(O=z());){if(O===r){U=F.backslashes=!0,O=z();continue}if(O===S){W=F.isGlob=!0,ne=!0;break}}continue}break}if(O===t){if(ce===t&&(_e=F.isGlobstar=!0),W=F.isGlob=!0,ne=!0,v===!0)continue;break}if(O===m){if(W=F.isGlob=!0,ne=!0,v===!0)continue;break}if(O===c){for(;h()!==!0&&(D=z());){if(D===r){U=F.backslashes=!0,z();continue}if(D===w){he=F.isBracket=!0,W=F.isGlob=!0,ne=!0;break}}if(v===!0)continue;break}if(f.nonegate!==!0&&O===a&&k===K){me=F.negated=!0,K++;continue}if(f.noparen!==!0&&O===u){if(W=F.isGlob=!0,v===!0){for(;h()!==!0&&(O=z());){if(O===u){U=F.backslashes=!0,O=z();continue}if(O===S){ne=!0;break}}continue}break}if(W===!0){if(ne=!0,v===!0)continue;break}}f.noext===!0&&(Ee=!1,W=!1);let X=j,d="",p="";K>0&&(d=j.slice(0,K),j=j.slice(K),ue-=K),X&&W===!0&&ue>0?(X=j.slice(0,ue),p=j.slice(ue)):W===!0?(X="",p=j):X=j,X&&X!==""&&X!=="/"&&X!==j&&M(X.charCodeAt(X.length-1))&&(X=X.slice(0,-1)),f.unescape===!0&&(p&&(p=e.removeBackslashes(p)),X&&U===!0&&(X=e.removeBackslashes(X)));const fe={prefix:d,input:y,start:K,base:X,glob:p,isBrace:le,isBracket:he,isGlob:W,isExtglob:Ee,isGlobstar:_e,negated:me,negatedExtglob:we};if(f.tokens===!0&&(fe.maxDepth=0,M(O)||g.push(F),fe.tokens=g),f.parts===!0||f.tokens===!0){let D;for(let V=0;V<A.length;V++){const Se=D?D+1:K,pe=A[V],be=y.slice(Se,pe);f.tokens&&(V===0&&K!==0?(g[V].isPrefix=!0,g[V].value=d):g[V].value=be,N(g[V]),fe.maxDepth+=g[V].depth),(V!==0||be!=="")&&_.push(be),D=pe}if(D&&D+1<y.length){const V=y.slice(D+1);_.push(V),f.tokens&&(g[g.length-1].value=V,N(g[g.length-1]),fe.maxDepth+=g[g.length-1].depth)}fe.slashes=A,fe.parts=_}return fe},Rt}var xt,hn;function Rr(){if(hn)return xt;hn=1;const e=ht(),t=gt(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:a}=e,s=(y,R)=>{if(typeof R.expandRange=="function")return R.expandRange(...y,R);y.sort();const f=`[${y.join("-")}]`;try{new RegExp(f)}catch{return y.map(v=>t.escapeRegex(v)).join("..")}return f},l=(y,R)=>`Missing ${y}: "${R}" - use "\\\\${R}" to match literal characters`,u=y=>{const R=[];let f=0,I=0,v=0,A="",g=!1;for(const _ of y){if(g===!0){A+=_,g=!1;continue}if(_==="\\"){A+=_,g=!0;continue}if(_==='"'){v=v===1?0:1,A+=_;continue}if(v===0){if(_==="[")f++;else if(_==="]"&&f>0)f--;else if(f===0){if(_==="(")I++;else if(_===")"&&I>0)I--;else if(_==="|"&&I===0){R.push(A),A="";continue}}}A+=_}return R.push(A),R},c=y=>{let R=!1;for(const f of y){if(R===!0){R=!1;continue}if(f==="\\"){R=!0;continue}if(/[?*+@!()[\]{}]/.test(f))return!1}return!0},E=y=>{let R=y.trim(),f=!0;for(;f===!0;)f=!1,/^@\([^\\()[\]{}|]+\)$/.test(R)&&(R=R.slice(2,-1),f=!0);if(c(R))return R.replace(/\\(.)/g,"$1")},m=y=>{const R=y.map(E).filter(Boolean);for(let f=0;f<R.length;f++)for(let I=f+1;I<R.length;I++){const v=R[f],A=R[I],g=v[0];if(!(!g||v!==g.repeat(v.length)||A!==g.repeat(A.length))&&(v===A||v.startsWith(A)||A.startsWith(v)))return!0}return!1},C=(y,R=!0)=>{if(y[0]!=="+"&&y[0]!=="*"||y[1]!=="(")return;let f=0,I=0,v=0,A=!1;for(let g=1;g<y.length;g++){const _=y[g];if(A===!0){A=!1;continue}if(_==="\\"){A=!0;continue}if(_==='"'){v=v===1?0:1;continue}if(v!==1){if(_==="["){f++;continue}if(_==="]"&&f>0){f--;continue}if(!(f>0)){if(_==="("){I++;continue}if(_===")"&&(I--,I===0))return R===!0&&g!==y.length-1?void 0:{type:y[0],body:y.slice(2,g),end:g}}}}},S=y=>`${y.length===1?t.escapeRegex(y[0]):`[${y.map(f=>t.escapeRegex(f)).join("")}]`}*`,w=y=>{let R=0;const f=[];for(;R<y.length;){const I=C(y.slice(R),!1);if(!I||I.type!=="*")return;const v=u(I.body).map(g=>g.trim());if(v.length!==1)return;const A=E(v[0]);if(!A||A.length!==1)return;f.push(A),R+=I.end+1}if(!(f.length<1))return f},M=y=>{let R=0,f=y.trim(),I=C(f);for(;I;)R++,f=I.body.trim(),I=C(f);return R},N=(y,R)=>{if(R.maxExtglobRecursion===!1)return{risky:!1};const f=typeof R.maxExtglobRecursion=="number"?R.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,I=u(y).map(_=>_.trim());if(I.length>1&&(I.some(_=>_==="")||I.some(_=>/^[*?]+$/.test(_))||m(I)))return{risky:!0};const v=[];let A=!1,g=!0;for(const _ of I){const j=w(_);if(j){A=!0,v.push(...j);continue}const k=E(_);if(k&&k.length===1){v.push(k);continue}if(g=!1,M(_)>f)return{risky:!0}}return A?g?{risky:!0,safeOutput:S([...new Set(v)])}:{risky:!0}:{risky:!1}},$=(y,R)=>{if(typeof y!="string")throw new TypeError("Expected a string");y=a[y]||y;const f={...R},I=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n;let v=y.length;if(v>I)throw new SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${I}`);const A={type:"bos",value:"",output:f.prepend||""},g=[A],_=f.capture?"":"?:",j=e.globChars(f.windows),k=e.extglobChars(j),{DOT_LITERAL:K,PLUS_LITERAL:ue,SLASH_LITERAL:le,ONE_CHAR:he,DOTS_SLASH:W,NO_DOT:Ee,NO_DOT_SLASH:_e,NO_DOTS_SLASH:ge,QMARK:U,QMARK_NO_DOT:me,STAR:we,START_ANCHOR:ne}=j,J=b=>`(${_}(?:(?!${ne}${b.dot?W:K}).)*?)`,ce=f.dot?"":Ee,O=f.dot?U:me;let F=f.bash===!0?J(f):we;f.capture&&(F=`(${F})`),typeof f.noext=="boolean"&&(f.noextglob=f.noext);const h={input:y,index:-1,start:0,dot:f.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};y=t.removePrefix(y,h),v=y.length;const ae=[],z=[],X=[];let d=A,p;const fe=()=>h.index===v-1,D=h.peek=(b=1)=>y[h.index+b],V=h.advance=()=>y[++h.index]||"",Se=()=>y.slice(h.index+1),pe=(b="",Y=0)=>{h.consumed+=b,h.index+=Y},be=b=>{h.output+=b.output!=null?b.output:b.value,pe(b.value)},Tr=()=>{let b=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)V(),h.start++,b++;return b%2===0?!1:(h.negated=!0,h.start++,!0)},rt=b=>{h[b]++,X.push(b)},ve=b=>{h[b]--,X.pop()},L=b=>{if(d.type==="globstar"){const Y=h.braces>0&&(b.type==="comma"||b.type==="brace"),T=b.extglob===!0||ae.length&&(b.type==="pipe"||b.type==="paren");b.type!=="slash"&&b.type!=="paren"&&!Y&&!T&&(h.output=h.output.slice(0,-d.output.length),d.type="star",d.value="*",d.output=F,h.output+=d.output)}if(ae.length&&b.type!=="paren"&&(ae[ae.length-1].inner+=b.value),(b.value||b.output)&&be(b),d&&d.type==="text"&&b.type==="text"){d.output=(d.output||d.value)+b.value,d.value+=b.value;return}b.prev=d,g.push(b),d=b},it=(b,Y)=>{const T={...k[Y],conditions:1,inner:""};T.prev=d,T.parens=h.parens,T.output=h.output,T.startIndex=h.index,T.tokensIndex=g.length;const P=(f.capture?"(":"")+T.open;rt("parens"),L({type:b,value:Y,output:h.output?"":he}),L({type:"paren",extglob:!0,value:V(),output:P}),ae.push(T)},br=b=>{const Y=y.slice(b.startIndex,h.index+1),T=y.slice(b.startIndex+2,h.index),P=N(T,f);if((b.type==="plus"||b.type==="star")&&P.risky){const q=P.safeOutput?(b.output?"":he)+(f.capture?`(${P.safeOutput})`:P.safeOutput):void 0,Ae=g[b.tokensIndex];Ae.type="text",Ae.value=Y,Ae.output=q||t.escapeRegex(Y);for(let ye=b.tokensIndex+1;ye<g.length;ye++)g[ye].value="",g[ye].output="",delete g[ye].suffix;h.output=b.output+Ae.output,h.backtrack=!0,L({type:"paren",extglob:!0,value:p,output:""}),ve("parens");return}let G=b.close+(f.capture?")":""),Q;if(b.type==="negate"){let q=F;if(b.inner&&b.inner.length>1&&b.inner.includes("/")&&(q=J(f)),(q!==F||fe()||/^\)+$/.test(Se()))&&(G=b.close=`)$))${q}`),b.inner.includes("*")&&(Q=Se())&&/^\.[^\\/.]+$/.test(Q)){const Ae=$(Q,{...R,fastpaths:!1}).output;G=b.close=`)${Ae})${q})`}b.prev.type==="bos"&&(h.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:p,output:G}),ve("parens")};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(y)){let b=!1,Y=y.replace(o,(T,P,G,Q,q,Ae)=>Q==="\\"?(b=!0,T):Q==="?"?P?P+Q+(q?U.repeat(q.length):""):Ae===0?O+(q?U.repeat(q.length):""):U.repeat(G.length):Q==="."?K.repeat(G.length):Q==="*"?P?P+Q+(q?F:""):F:P?T:`\\${T}`);return b===!0&&(f.unescape===!0?Y=Y.replace(/\\/g,""):Y=Y.replace(/\\+/g,T=>T.length%2===0?"\\\\":T?"\\":"")),Y===y&&f.contains===!0?(h.output=y,h):(h.output=t.wrapOutput(Y,h,R),h)}for(;!fe();){if(p=V(),p==="\0")continue;if(p==="\\"){const T=D();if(T==="/"&&f.bash!==!0||T==="."||T===";")continue;if(!T){p+="\\",L({type:"text",value:p});continue}const P=/^\\+/.exec(Se());let G=0;if(P&&P[0].length>2&&(G=P[0].length,h.index+=G,G%2!==0&&(p+="\\")),f.unescape===!0?p=V():p+=V(),h.brackets===0){L({type:"text",value:p});continue}}if(h.brackets>0&&(p!=="]"||d.value==="["||d.value==="[^")){if(f.posix!==!1&&p===":"){const T=d.value.slice(1);if(T.includes("[")&&(d.posix=!0,T.includes(":"))){const P=d.value.lastIndexOf("["),G=d.value.slice(0,P),Q=d.value.slice(P+2),q=r[Q];if(q){d.value=G+q,h.backtrack=!0,V(),!A.output&&g.indexOf(d)===1&&(A.output=he);continue}}}(p==="["&&D()!==":"||p==="-"&&D()==="]")&&(p=`\\${p}`),p==="]"&&(d.value==="["||d.value==="[^")&&(p=`\\${p}`),f.posix===!0&&p==="!"&&d.value==="["&&(p="^"),d.value+=p,be({value:p});continue}if(h.quotes===1&&p!=='"'){p=t.escapeRegex(p),d.value+=p,be({value:p});continue}if(p==='"'){h.quotes=h.quotes===1?0:1,f.keepQuotes===!0&&L({type:"text",value:p});continue}if(p==="("){rt("parens"),L({type:"paren",value:p});continue}if(p===")"){if(h.parens===0&&f.strictBrackets===!0)throw new SyntaxError(l("opening","("));const T=ae[ae.length-1];if(T&&h.parens===T.parens+1){br(ae.pop());continue}L({type:"paren",value:p,output:h.parens?")":"\\)"}),ve("parens");continue}if(p==="["){if(f.nobracket===!0||!Se().includes("]")){if(f.nobracket!==!0&&f.strictBrackets===!0)throw new SyntaxError(l("closing","]"));p=`\\${p}`}else rt("brackets");L({type:"bracket",value:p});continue}if(p==="]"){if(f.nobracket===!0||d&&d.type==="bracket"&&d.value.length===1){L({type:"text",value:p,output:`\\${p}`});continue}if(h.brackets===0){if(f.strictBrackets===!0)throw new SyntaxError(l("opening","["));L({type:"text",value:p,output:`\\${p}`});continue}ve("brackets");const T=d.value.slice(1);if(d.posix!==!0&&T[0]==="^"&&!T.includes("/")&&(p=`/${p}`),d.value+=p,be({value:p}),f.literalBrackets===!1||t.hasRegexChars(T))continue;const P=t.escapeRegex(d.value);if(h.output=h.output.slice(0,-d.value.length),f.literalBrackets===!0){h.output+=P,d.value=P;continue}d.value=`(${_}${P}|${d.value})`,h.output+=d.value;continue}if(p==="{"&&f.nobrace!==!0){rt("braces");const T={type:"brace",value:p,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};z.push(T),L(T);continue}if(p==="}"){const T=z[z.length-1];if(f.nobrace===!0||!T){L({type:"text",value:p,output:p});continue}let P=")";if(T.dots===!0){const G=g.slice(),Q=[];for(let q=G.length-1;q>=0&&(g.pop(),G[q].type!=="brace");q--)G[q].type!=="dots"&&Q.unshift(G[q].value);P=s(Q,f),h.backtrack=!0}if(T.comma!==!0&&T.dots!==!0){const G=h.output.slice(0,T.outputIndex),Q=h.tokens.slice(T.tokensIndex);T.value=T.output="\\{",p=P="\\}",h.output=G;for(const q of Q)h.output+=q.output||q.value}L({type:"brace",value:p,output:P}),ve("braces"),z.pop();continue}if(p==="|"){ae.length>0&&ae[ae.length-1].conditions++,L({type:"text",value:p});continue}if(p===","){let T=p;const P=z[z.length-1];P&&X[X.length-1]==="braces"&&(P.comma=!0,T="|"),L({type:"comma",value:p,output:T});continue}if(p==="/"){if(d.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",g.pop(),d=A;continue}L({type:"slash",value:p,output:le});continue}if(p==="."){if(h.braces>0&&d.type==="dot"){d.value==="."&&(d.output=K);const T=z[z.length-1];d.type="dots",d.output+=p,d.value+=p,T.dots=!0;continue}if(h.braces+h.parens===0&&d.type!=="bos"&&d.type!=="slash"){L({type:"text",value:p,output:K});continue}L({type:"dot",value:p,output:K});continue}if(p==="?"){if(!(d&&d.value==="(")&&f.noextglob!==!0&&D()==="("&&D(2)!=="?"){it("qmark",p);continue}if(d&&d.type==="paren"){const P=D();let G=p;(d.value==="("&&!/[!=<:]/.test(P)||P==="<"&&!/<([!=]|\w+>)/.test(Se()))&&(G=`\\${p}`),L({type:"text",value:p,output:G});continue}if(f.dot!==!0&&(d.type==="slash"||d.type==="bos")){L({type:"qmark",value:p,output:me});continue}L({type:"qmark",value:p,output:U});continue}if(p==="!"){if(f.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){it("negate",p);continue}if(f.nonegate!==!0&&h.index===0){Tr();continue}}if(p==="+"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){it("plus",p);continue}if(d&&d.value==="("||f.regex===!1){L({type:"plus",value:p,output:ue});continue}if(d&&(d.type==="bracket"||d.type==="paren"||d.type==="brace")||h.parens>0){L({type:"plus",value:p});continue}L({type:"plus",value:ue});continue}if(p==="@"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){L({type:"at",extglob:!0,value:p,output:""});continue}L({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const T=i.exec(Se());T&&(p+=T[0],h.index+=T[0].length),L({type:"text",value:p});continue}if(d&&(d.type==="globstar"||d.star===!0)){d.type="star",d.star=!0,d.value+=p,d.output=F,h.backtrack=!0,h.globstar=!0,pe(p);continue}let b=Se();if(f.noextglob!==!0&&/^\([^?]/.test(b)){it("star",p);continue}if(d.type==="star"){if(f.noglobstar===!0){pe(p);continue}const T=d.prev,P=T.prev,G=T.type==="slash"||T.type==="bos",Q=P&&(P.type==="star"||P.type==="globstar");if(f.bash===!0&&(!G||b[0]&&b[0]!=="/")){L({type:"star",value:p,output:""});continue}const q=h.braces>0&&(T.type==="comma"||T.type==="brace"),Ae=ae.length&&(T.type==="pipe"||T.type==="paren");if(!G&&T.type!=="paren"&&!q&&!Ae){L({type:"star",value:p,output:""});continue}for(;b.slice(0,3)==="/**";){const ye=y[h.index+4];if(ye&&ye!=="/")break;b=b.slice(3),pe("/**",3)}if(T.type==="bos"&&fe()){d.type="globstar",d.value+=p,d.output=J(f),h.output=d.output,h.globstar=!0,pe(p);continue}if(T.type==="slash"&&T.prev.type!=="bos"&&!Q&&fe()){h.output=h.output.slice(0,-(T.output+d.output).length),T.output=`(?:${T.output}`,d.type="globstar",d.output=J(f)+(f.strictSlashes?")":"|$)"),d.value+=p,h.globstar=!0,h.output+=T.output+d.output,pe(p);continue}if(T.type==="slash"&&T.prev.type!=="bos"&&b[0]==="/"){const ye=b[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(T.output+d.output).length),T.output=`(?:${T.output}`,d.type="globstar",d.output=`${J(f)}${le}|${le}${ye})`,d.value+=p,h.output+=T.output+d.output,h.globstar=!0,pe(p+V()),L({type:"slash",value:"/",output:""});continue}if(T.type==="bos"&&b[0]==="/"){d.type="globstar",d.value+=p,d.output=`(?:^|${le}|${J(f)}${le})`,h.output=d.output,h.globstar=!0,pe(p+V()),L({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-d.output.length),d.type="globstar",d.output=J(f),d.value+=p,h.output+=d.output,h.globstar=!0,pe(p);continue}const Y={type:"star",value:p,output:F};if(f.bash===!0){Y.output=".*?",(d.type==="bos"||d.type==="slash")&&(Y.output=ce+Y.output),L(Y);continue}if(d&&(d.type==="bracket"||d.type==="paren")&&f.regex===!0){Y.output=p,L(Y);continue}(h.index===h.start||d.type==="slash"||d.type==="dot")&&(d.type==="dot"?(h.output+=_e,d.output+=_e):f.dot===!0?(h.output+=ge,d.output+=ge):(h.output+=ce,d.output+=ce),D()!=="*"&&(h.output+=he,d.output+=he)),L(Y)}for(;h.brackets>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing","]"));h.output=t.escapeLast(h.output,"["),ve("brackets")}for(;h.parens>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing",")"));h.output=t.escapeLast(h.output,"("),ve("parens")}for(;h.braces>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing","}"));h.output=t.escapeLast(h.output,"{"),ve("braces")}if(f.strictSlashes!==!0&&(d.type==="star"||d.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${le}?`}),h.backtrack===!0){h.output="";for(const b of h.tokens)h.output+=b.output!=null?b.output:b.value,b.suffix&&(h.output+=b.suffix)}return h};return $.fastpaths=(y,R)=>{const f={...R},I=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n,v=y.length;if(v>I)throw new SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${I}`);y=a[y]||y;const{DOT_LITERAL:A,SLASH_LITERAL:g,ONE_CHAR:_,DOTS_SLASH:j,NO_DOT:k,NO_DOTS:K,NO_DOTS_SLASH:ue,STAR:le,START_ANCHOR:he}=e.globChars(f.windows),W=f.dot?K:k,Ee=f.dot?ue:k,_e=f.capture?"":"?:",ge={negated:!1,prefix:""};let U=f.bash===!0?".*?":le;f.capture&&(U=`(${U})`);const me=ce=>ce.noglobstar===!0?U:`(${_e}(?:(?!${he}${ce.dot?j:A}).)*?)`,we=ce=>{switch(ce){case"*":return`${W}${_}${U}`;case".*":return`${A}${_}${U}`;case"*.*":return`${W}${U}${A}${_}${U}`;case"*/*":return`${W}${U}${g}${_}${Ee}${U}`;case"**":return W+me(f);case"**/*":return`(?:${W}${me(f)}${g})?${Ee}${_}${U}`;case"**/*.*":return`(?:${W}${me(f)}${g})?${Ee}${U}${A}${_}${U}`;case"**/.*":return`(?:${W}${me(f)}${g})?${A}${_}${U}`;default:{const O=/^(.*?)\.(\w+)$/.exec(ce);if(!O)return;const F=we(O[1]);return F?F+A+O[2]:void 0}}},ne=t.removePrefix(y,ge);let J=we(ne);return J&&f.strictSlashes!==!0&&(J+=`${g}?`),J},xt=$,xt}var _t,gn;function xr(){if(gn)return _t;gn=1;const e=vr(),t=Rr(),n=gt(),r=ht(),i=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,s,l=!1)=>{if(Array.isArray(a)){const M=a.map($=>o($,s,l));return $=>{for(const y of M){const R=y($);if(R)return R}return!1}}const u=i(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");const c=s||{},E=c.windows,m=u?o.compileRe(a,s):o.makeRe(a,s,!1,!0),C=m.state;delete m.state;let S=()=>!1;if(c.ignore){const M={...s,ignore:null,onMatch:null,onResult:null};S=o(c.ignore,M,l)}const w=(M,N=!1)=>{const{isMatch:$,match:y,output:R}=o.test(M,m,s,{glob:a,posix:E}),f={glob:a,state:C,regex:m,posix:E,input:M,output:R,match:y,isMatch:$};return typeof c.onResult=="function"&&c.onResult(f),$===!1?(f.isMatch=!1,N?f:!1):S(M)?(typeof c.onIgnore=="function"&&c.onIgnore(f),f.isMatch=!1,N?f:!1):(typeof c.onMatch=="function"&&c.onMatch(f),N?f:!0)};return l&&(w.state=C),w};return o.test=(a,s,l,{glob:u,posix:c}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const E=l||{},m=E.format||(c?n.toPosixSlashes:null);let C=a===u,S=C&&m?m(a):a;return C===!1&&(S=m?m(a):a,C=S===u),(C===!1||E.capture===!0)&&(E.matchBase===!0||E.basename===!0?C=o.matchBase(a,s,l,c):C=s.exec(S)),{isMatch:!!C,match:C,output:S}},o.matchBase=(a,s,l,u=l&&l.windows)=>(s instanceof RegExp?s:o.makeRe(s,l)).test(n.basename(a,{windows:u})),o.isMatch=(a,s,l)=>o(s,l)(a),o.parse=(a,s)=>Array.isArray(a)?a.map(l=>o.parse(l,s)):t(a,{...s,fastpaths:!1}),o.scan=(a,s)=>e(a,s),o.compileRe=(a,s,l=!1,u=!1)=>{if(l===!0)return a.output;const c=s||{},E=c.contains?"":"^",m=c.contains?"":"$";let C=`${E}(?:${a.output})${m}`;a&&a.negated===!0&&(C=`^(?!${C}).*$`);const S=o.toRegex(C,s);return u===!0&&(S.state=a),S},o.makeRe=(a,s={},l=!1,u=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-empty string");let c={negated:!1,fastpaths:!0};return s.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(c.output=t.fastpaths(a,s)),c.output||(c=t(a,s)),o.compileRe(c,s,l,u)},o.toRegex=(a,s)=>{try{const l=s||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(s&&s.debug===!0)throw l;return/$^/}},o.constants=r,_t=o,_t}var wt,mn;function _r(){if(mn)return wt;mn=1;const e=xr(),t=gt();function n(r,i,o=!1){return i&&(i.windows===null||i.windows===void 0)&&(i={...i,windows:t.isWindows()}),e(r,i,o)}return Object.assign(n,e),wt=n,wt}var wr=_r();const Ir=se.getDefaultExportFromCjs(wr),Mn=typeof window<"u"||typeof process>"u"||process?.platform==="browser",Bn=Mn?{}:process.env||{};async function Dn(e,t){const n={};for(const i of t.headers)Nr(e,i.matches)&&(n[i.name]=i.envVariable!==void 0?Bn[i.envVariable]||"":i.value);const r=await(t.customFetch||fetch)(e,{headers:n});if(!r.ok)throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);return{body:await r.text(),mimeType:r.headers.get("content-type")}}function Nr(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),Ir.isMatch(e,t)}function Or(e,t={}){return{name:`${e}List`,properties:{},items:e,...t}}function $r(e,t={}){return{name:`${e}Map`,properties:{},additionalProperties:()=>e,...t}}const We={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}};function kr(e,t={}){const n={};for(const o of Object.keys(e))n[o]={...e[o],name:o};for(const o of Object.values(n))r(o);return n.SpecExtension=We,n;function r(o){if(o.additionalProperties&&(o.additionalProperties=i(o.additionalProperties)),o.items&&(o.items=i(o.items)),o.properties){const a={};for(const[s,l]of Object.entries(o.properties))a[s]=i(l),t.doNotResolveExamples&&l&&l.isExample&&(a[s]={...l,resolvable:!1});o.properties=a}}function i(o){if(typeof o=="string"){if(!n[o])throw new Error(`Unknown type name found: ${o}`);return n[o]}else return typeof o=="function"?(a,s)=>i(o(a,s)):Ve(o)?(o={...o},r(o),o):o?.directResolveAs!==void 0?{...o,directResolveAs:i(o.directResolveAs)??void 0}:o}}function Ve(e){return typeof e?.name=="string"}function Re(e,t){return e===""&&(e="#/"),e[e.length-1]==="/"?e+t:e+"/"+t}function Xe(e){return se.isPlainObject(e)&&typeof e.$ref=="string"}function Un(e){return Xe(e)&&Object.keys(e).length>1}function qn(e){return se.isPlainObject(e)&&typeof e.externalValue=="string"}class mt{source;pointer;constructor(t,n){this.source=t,this.pointer=n}child(t){return new mt(this.source,Re(this.pointer,(Array.isArray(t)?t:[t]).map(Ne).join("/")))}key(){return{...this,reportOnKey:!0}}get absolutePointer(){return this.source.absoluteRef+(this.pointer==="#/"?"":this.pointer)}}function Kn(e){const t=e.indexOf("~")===-1?e:e.replaceAll("~1","/").replaceAll("~0","~");try{return decodeURIComponent(t)}catch{return t}}function Ne(e){return typeof e=="number"||e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replaceAll("~","~0").replaceAll("/","~1")}function Gn(e){const[t,n=""]=e.split("#/");return{uri:(t.endsWith("#")?t.slice(0,-1):t)||null,pointer:Yn(n)}}function Yn(e){return e.split("/").map(Kn).filter(Hn)}function Lr(e){const t=e.split("/");return t[t.length-1]}function Pr(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")}function Oe(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("data:")}function Fr(e){return se.pathBrowserifyExports.extname(e)?Oe(e)?e.substring(0,e.lastIndexOf("/")):se.pathBrowserifyExports.dirname(e):e}function Hr(e,t){return Oe(e)?new URL(t,e.endsWith("/")?e:`${e}/`).href:se.pathBrowserifyExports.resolve(e,t)}function Mr(e){return typeof e=="string"&&(e.startsWith("#")||Oe(e)||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1||/\.(ya?ml|json)$/i.test(e))}function Br(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}function Dr(e,t,n){if(!se.isPlainObject(t.node)&&n.parent){n.parent[n.key]=t.node;return}delete e.$ref,se.isPlainObject(t.node)&&Object.assign(e,{...t.node,...e})}var H=Symbol("NOT_RESOLVED"),Qt=Symbol("MERGE_KEY");function ee(e,t){return{tagName:e,nodeKind:"scalar",implicit:t.implicit??!1,matchByTagPrefix:t.matchByTagPrefix??!1,implicitFirstChars:t.implicitFirstChars??null,resolve:t.resolve,identify:t.identify??null,represent:t.represent??(n=>String(n)),representTagName:t.representTagName??null}}function Zt(e,t){const n=t.finalize===void 0;return{tagName:e,nodeKind:"sequence",implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addItem:t.addItem,finalize:t.finalize??(r=>r),carrierIsResult:n,identify:t.identify??null,represent:t.represent??(r=>r),representTagName:t.representTagName??null}}function At(e,t){const n=t.finalize===void 0;return{tagName:e,nodeKind:"mapping",implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addPair:t.addPair,has:t.has,keys:t.keys,get:t.get,finalize:t.finalize??(r=>r),carrierIsResult:n,identify:t.identify??null,represent:t.represent??(r=>r),representTagName:t.representTagName??null}}var Ur=ee("tag:yaml.org,2002:str",{resolve:e=>e,identify:e=>typeof e=="string"}),qr=["","~","null","Null","NULL"],Kr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>qr.indexOf(e)!==-1?null:H,identify:e=>e===null,represent:()=>"null"}),Gr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(e,t)=>e==="null"||t&&e===""?null:H,identify:e=>e===null,represent:()=>"null"}),Yr=["","~","null","Null","NULL"],jr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Yr.indexOf(e)!==-1?null:H,identify:e=>e===null,represent:()=>"null"}),Wr=["true","True","TRUE"],Vr=["false","False","FALSE"],Xr=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:e=>Wr.indexOf(e)!==-1?!0:Vr.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),zr=["true"],Qr=["false"],Zr=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:e=>zr.indexOf(e)!==-1?!0:Qr.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Jr=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],ei=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],ti=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:e=>Jr.indexOf(e)!==-1?!0:ei.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),ni=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),ri=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function ii(e){let t=e,n=1;return(t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b")?n*parseInt(t.slice(2),2):t.startsWith("0o")?n*parseInt(t.slice(2),8):t.startsWith("0x")?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function oi(e,t){if(t){if(!ri.test(e))return H}else if(!ni.test(e))return H;const n=ii(e);return Number.isFinite(n)?n:H}var jn=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:oi,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),ai=new RegExp("^-?(?:0|[1-9][0-9]*)$"),si=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function li(e){let t=e,n=1;return(t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b")?n*parseInt(t.slice(2),2):t.startsWith("0o")?n*parseInt(t.slice(2),8):t.startsWith("0x")?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function ci(e,t){if(t){if(!si.test(e))return H}else if(!ai.test(e))return H;const n=li(e);return Number.isFinite(n)?n:H}var ui=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:ci,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),fi=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function pi(e){let t=e.replace(/_/g,""),n=1;if((t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b"))return n*parseInt(t.slice(2),2);if(t.startsWith("0x"))return n*parseInt(t.slice(2),16);if(t.includes(":")){let r=0;for(const i of t.split(":"))r=r*60+Number(i);return n*r}return t!=="0"&&t[0]==="0"?n*parseInt(t,8):n*parseInt(t,10)}function di(e){if(!fi.test(e))return H;const t=pi(e);return Number.isFinite(t)?t:H}var Pt=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:di,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),hi=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),gi=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mi(e){if(!hi.test(e))return H;let t=e.toLowerCase();const n=t[0]==="-"?-1:1;if("+-".includes(t[0])&&(t=t.slice(1)),t===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(t===".nan")return NaN;const r=n*parseFloat(t);return Number.isFinite(r)||gi.test(e)?r:H}function Ai(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Wn=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:mi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:Ai}),yi=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Ei=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Si(e,t){if(t){if(!Ei.test(e))return H;let r=e.toLowerCase();const i=r[0]==="-"?-1:1;if("+-".includes(r[0])&&(r=r.slice(1)),r===".inf")return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(r===".nan")return NaN;const o=i*parseFloat(r);return Number.isFinite(o)?o:H}if(!yi.test(e))return H;const n=Number(e);return Number.isFinite(n)?n:H}function Ci(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Ti=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Si,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:Ci}),bi=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),vi=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ri(e){if(!bi.test(e))return H;let t=e.toLowerCase().replace(/_/g,"");const n=t[0]==="-"?-1:1;if("+-".includes(t[0])&&(t=t.slice(1)),t===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(t===".nan")return NaN;let r=0;if(t.includes(":")){for(const i of t.split(":"))r=r*60+Number(i);r*=n}else r=n*parseFloat(t);return Number.isFinite(r)||vi.test(e)?r:H}function xi(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Ft=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Ri,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:xi}),Vn=ee("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(e,t)=>e==="<<"||t&&e===""?Qt:H}),_i=/^[A-Za-z0-9+/]*={0,2}$/;function wi(e){const t=e.replace(/\s/g,"");if(t.length%4!==0||!_i.test(t))return H;const n=atob(t),r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}function Ii(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Xn=ee("tag:yaml.org,2002:binary",{resolve:wi,identify:e=>Object.prototype.toString.call(e)==="[object Uint8Array]",represent:Ii}),Ni=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Oi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function An(e,t,n,r=0,i=0,o=0,a=0){const s=new Date(Date.UTC(e,t,n,r,i,o,a));return s.setUTCFullYear(e,t,n),s}function $i(e){let t=Ni.exec(e);if(t===null&&(t=Oi.exec(e)),t===null)return H;const n=+t[1],r=+t[2]-1,i=+t[3];if(!t[4]){const c=An(n,r,i);return c.getUTCFullYear()!==n||c.getUTCMonth()!==r||c.getUTCDate()!==i?H:c}const o=+t[4],a=+t[5],s=+t[6];let l=0;if(o>23||a>59||s>59)return H;if(t[7]){let c=t[7].slice(0,3);for(;c.length<3;)c+="0";l=+c}const u=An(n,r,i,o,a,s,l);if(u.getUTCFullYear()!==n||u.getUTCMonth()!==r||u.getUTCDate()!==i)return H;if(t[9]){const c=+t[10],E=+(t[11]||0);if(c>23||E>59)return H;const m=(c*60+E)*6e4;u.setTime(u.getTime()-(t[9]==="-"?-m:m))}return u}var ki=ee("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:$i,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),Li=Zt("tag:yaml.org,2002:seq",{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function yt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ht(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var zn=Zt("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let n;if(t instanceof Map){if(t.size!==1)return"cannot resolve an ordered map item";n=t.keys().next().value}else if(yt(t)){const r=Object.keys(t);if(r.length!==1)return"cannot resolve an ordered map item";n=r[0]}else return"cannot resolve an ordered map item";return e.seen.has(n)?"duplicate key in ordered map":(e.seen.add(n),e.list.push(t),"")},finalize:e=>e.list}),Qn=Zt("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(e,t)=>{if(t instanceof Map)return t.size!==1?"cannot resolve a pairs item":(e.push(t.entries().next().value),"");if(Object.prototype.toString.call(t)!=="[object Object]")return"cannot resolve a pairs item";const n=t,r=Object.keys(n);return r.length!==1?"cannot resolve a pairs item":(e.push([r[0],n[r[0]]]),"")}}),Pi=At("tag:yaml.org,2002:map",{create:()=>({}),identify:yt,represent:e=>{const t=new Map;for(const n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{if(t!==null&&typeof t=="object")return"object-based map does not support complex keys";const r=String(t);return r==="__proto__"?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,""},has:(e,t)=>t!==null&&typeof t=="object"?!1:Object.prototype.hasOwnProperty.call(e,String(t)),keys:e=>Object.keys(e),get:(e,t)=>{const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}}),Zn=At("tag:yaml.org,2002:set",{create:()=>new Set,identify:e=>e instanceof Set,represent:e=>{const t=new Map;for(const n of e)t.set(n,null);return t},addPair:(e,t,n)=>n!==null?"cannot resolve a set item":(e.add(t),""),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:()=>null});function Fi(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function Hi(){return{scalar:[],sequence:[],mapping:[]}}function Mi(e){const t=[];for(const n of e){let r=t.length;for(let i=0;i<t.length;i++){const o=t[i];if(o.nodeKind===n.nodeKind&&o.tagName===n.tagName&&o.matchByTagPrefix===n.matchByTagPrefix){r=i;break}}t[r]=n}return t}var Et=class Jn{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(t){const n=Mi(t),r=[],i=Fi(),o=Hi();for(const c of n){if(c.nodeKind==="scalar"&&c.implicit){if(c.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");r.push(c)}switch(c.nodeKind){case"scalar":c.matchByTagPrefix?o.scalar.push(c):i.scalar[c.tagName]=c;break;case"sequence":c.matchByTagPrefix?o.sequence.push(c):i.sequence[c.tagName]=c;break;case"mapping":c.matchByTagPrefix?o.mapping.push(c):i.mapping[c.tagName]=c;break}}const a=r.filter(c=>c.implicitFirstChars===null),s=new Set;for(const c of r)if(c.implicitFirstChars!==null)for(const E of c.implicitFirstChars)s.add(E);const l=new Map;for(const c of s)l.set(c,r.filter(E=>E.implicitFirstChars===null||E.implicitFirstChars.indexOf(c)!==-1));const u=i.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=n,this.implicitScalarTags=r,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=u,this.defaultSequenceTag=i.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=i.mapping["tag:yaml.org,2002:map"],this.exact=i,this.prefix=o}withTags(...t){let n=[];for(const r of t)n=n.concat(r);return new Jn([...this.tags,...n])}},Jt=new Et([Ur,Li,Pi]);new Et([...Jt.tags,Gr,Zr,ui,Ti]);var er=new Et([...Jt.tags,Kr,Xr,jn,Wn]),Bi=new Et([...Jt.tags,jr,ti,Pt,Ft,ki,Vn,Xn,zn,Qn,Zn]);At("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(e,t,n)=>(e.set(t,n),""),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:(e,t)=>e.get(t),identify:e=>e instanceof Map||yt(e),represent:e=>{if(e instanceof Map)return e;const t=new Map,n=e;for(const r of Object.keys(n))t.set(r,n[r]);return t}});function yn(e){if(Array.isArray(e)){const t=Array.prototype.slice.call(e);for(let n=0;n<t.length;n++){if(Array.isArray(t[n]))return null;typeof t[n]=="object"&&Object.prototype.toString.call(t[n])==="[object Object]"&&(t[n]="[object Object]")}return String(t)}return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"?"[object Object]":String(e)}At("tag:yaml.org,2002:map",{create:()=>({}),identify:yt,represent:e=>{const t=new Map;for(const n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{const r=yn(t);return r===null?"nested arrays are not supported inside keys":(r==="__proto__"?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,"")},has:(e,t)=>{const n=yn(t);return n!==null&&Object.prototype.hasOwnProperty.call(e,n)},keys:e=>Object.keys(e),get:(e,t)=>{const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}});var Di={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function It(e,t,n,r,i){let o="",a="";const s=Math.floor(i/2)-1;return r-t>s&&(o=" ... ",t=r-s+o.length),n-r>s&&(a=" ...",n=r+s-a.length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+o.length}}function Nt(e,t){return" ".repeat(Math.max(t-e.length,0))+e}function Ui(e,t){if(!e.buffer)return null;const n={...Di,...t},r=/\r?\n|\r|\0/g,i=[0],o=[];let a,s=-1;for(;a=r.exec(e.buffer);)o.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);let l="";const u=Math.min(e.line+n.linesAfter,o.length).toString().length,c=n.maxLength-(n.indent+u+3);for(let m=1;m<=n.linesBefore&&!(s-m<0);m++){const C=It(e.buffer,i[s-m],o[s-m],e.position-(i[s]-i[s-m]),c);l=`${" ".repeat(n.indent)}${Nt((e.line-m+1).toString(),u)} | ${C.str}
2
+ ${l}`}const E=It(e.buffer,i[s],o[s],e.position,c);l+=`${" ".repeat(n.indent)}${Nt((e.line+1).toString(),u)} | ${E.str}
3
+ `,l+=`${"-".repeat(n.indent+u+3+E.pos)}^
4
+ `;for(let m=1;m<=n.linesAfter&&!(s+m>=o.length);m++){const C=It(e.buffer,i[s+m],o[s+m],e.position-(i[s]-i[s+m]),c);l+=`${" ".repeat(n.indent)}${Nt((e.line+m+1).toString(),u)} | ${C.str}
5
+ `}return l.replace(/\n$/,"")}function En(e,t){let n="";return e.mark?(e.mark.name&&(n+=`in "${e.mark.name}" `),n+=`(${e.mark.line+1}:${e.mark.column+1})`,!t&&e.mark.snippet&&(n+=`
6
+
7
+ ${e.mark.snippet}`),`${e.reason} ${n}`):e.reason}var St=class extends Error{reason;mark;constructor(e,t){super(),this.name="YAMLException",this.reason=e,this.mark=t,this.message=En(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${En(this,e)}`}};function Ct(e,t,n,r=""){let i=0,o=0;for(let s=0;s<t;s++){const l=e.charCodeAt(s);l===10?(i++,o=s+1):l===13&&(i++,e.charCodeAt(s+1)===10&&s++,o=s+1)}const a={name:r,buffer:e,position:t,line:i,column:t-o};throw a.snippet=Ui(a),new St(n,a)}var qi=-1;function Sn(e){switch(e){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
8
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}var tr=new Array(256),nr=new Array(256);for(let e=0;e<256;e++)tr[e]=Sn(e)?1:0,nr[e]=Sn(e);function Ki(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Gi(e){return e>=48&&e<=57?e-48:(e|32)-97+10}function Yi(e){return e===120?2:e===117?4:8}function ut(e,t,n){let r=0;for(;t<n;){const i=e.charCodeAt(t);if(i===10)r++,t++;else if(i===13)r++,t++,e.charCodeAt(t)===10&&t++;else if(i===32||i===9)t++;else break}return{position:t,breaks:r}}function en(e){return e===1?" ":`
9
+ `.repeat(e-1)}function ji(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===10||s===13){r+=e.slice(o,a);const l=ut(e,i,n);r+=en(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,a)}function Wi(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===39)r+=e.slice(o,i)+"'",i+=2,o=a=i;else if(s===10||s===13){r+=e.slice(o,a);const l=ut(e,i,n);r+=en(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,n)}function Vi(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===92){r+=e.slice(o,i),i++;const l=e.charCodeAt(i);if(l===10||l===13)i=ut(e,i,n).position;else if(l<256&&tr[l])r+=nr[l],i++;else{let u=Yi(l),c=0;for(;u>0;u--){i++;const E=Gi(e.charCodeAt(i));c=(c<<4)+E}r+=Ki(c),i++}o=a=i}else if(s===10||s===13){r+=e.slice(o,a);const l=ut(e,i,n);r+=en(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,n)}function Cn(e,t,n,r,i,o){const a=r<0?0:r,s=e.slice(t,n).replace(/\r\n?/g,`
10
+ `),l=s===""?[]:(s.endsWith(`
11
+ `)?s.slice(0,-1):s).split(`
12
+ `);let u="",c=!1,E=0,m=!1;for(const C of l){let S=0;for(;S<a&&C.charCodeAt(S)===32;)S++;if(r<0||S>=C.length){E++;continue}const w=C.slice(a),M=w.charCodeAt(0);o?M===32||M===9?(m=!0,u+=`
13
+ `.repeat(c?1+E:E)):m?(m=!1,u+=`
14
+ `.repeat(E+1)):E===0?c&&(u+=" "):u+=`
15
+ `.repeat(E):u+=`
16
+ `.repeat(c?1+E:E),u+=w,c=!0,E=0}return i===3?u+=`
17
+ `.repeat(c?1+E:E):i!==2&&c&&(u+=`
18
+ `),u}function Xi(e,t){if(t.valueStart===qi)return"";const{valueStart:n,valueEnd:r}=t;if(t.fast)return e.slice(n,r);switch(t.style){case 2:return Wi(e,n,r);case 3:return Vi(e,n,r);case 4:return Cn(e,n,r,t.indent,t.chomping,!1);case 5:return Cn(e,n,r,t.indent,t.chomping,!0);default:return ji(e,n,r)}}var zi=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});function Ot(e){return encodeURI(e).replace(/!/g,"%21")}function rr(e,t){if(e.startsWith("!<")&&e.endsWith(">"))return decodeURIComponent(e.slice(2,-1));const n=e.indexOf("!",1),r=n===-1?"!":e.slice(0,n+1),i=t?.[r]??zi[r]??r;return decodeURIComponent(i)+decodeURIComponent(e.slice(r.length))}function ir(e){let t=e;return t.charCodeAt(0)===33?(t=t.slice(1),`!${Ot(t)}`):t.slice(0,18)==="tag:yaml.org,2002:"?`!!${Ot(t.slice(18))}`:`!<${Ot(t)}>`}var He=-1,tn={filename:"",schema:er,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function Qi(e){return"tagStart"in e&&e.tagStart!==He?e.tagStart:"anchorStart"in e&&e.anchorStart!==He?e.anchorStart:"valueStart"in e&&e.valueStart!==He?e.valueStart:"start"in e?e.start:0}function oe(e,t){Ct(e.source,e.position,t,e.filename)}function or(e,t,n,r){try{return n.finalize(r)}catch(i){if(i instanceof St)throw i;Ct(e.source,t,i instanceof Error?i.message:String(i),e.filename)}}function st(e,t,n){const r=e[n];if(r)return r;for(const i of t)if(n.startsWith(i.tagName))return i}function Zi(e,t,n,r,i){const o=st(t,n,r);if(o)return o;oe(e,`unknown ${i} tag !<${r}>`)}function Ji(e,t){const n=Xi(e.source,t),r=t.tagStart===He?"":e.source.slice(t.tagStart,t.tagEnd),i=e.schema.defaultScalarTag;if(r!==""){if(r==="!")return{value:n,tag:i};const o=rr(r,e.tagHandlers),a=st(e.schema.exact.scalar,e.schema.prefix.scalar,o);if(a){const l=a.resolve(n,!0,o);return l===H&&oe(e,`cannot resolve a node with !<${o}> explicit tag`),{value:l,tag:a}}const s=st(e.schema.exact.mapping,e.schema.prefix.mapping,o)??st(e.schema.exact.sequence,e.schema.prefix.sequence,o);if(s){n!==""&&oe(e,`cannot resolve a node with !<${o}> explicit tag`);const l=s.create(o);return{value:s.carrierIsResult?l:or(e,e.position,s,l),tag:s}}oe(e,`unknown scalar tag !<${o}>`)}if(t.style===1){const o=e.schema.implicitScalarByFirstChar.get(n.charAt(0))??e.schema.implicitScalarAnyFirstChar;for(const a of o){const s=a.resolve(n,!1,a.tagName);if(s!==H)return{value:s,tag:a}}}return{value:i.resolve(n,!1,i.tagName),tag:i}}function Tn(e,t,n,r,i,o){const a=t.tagStart===He?"":e.source.slice(t.tagStart,t.tagEnd),s=a===""||a==="!"?i:rr(a,e.tagHandlers);return{tagName:s,tag:Zi(e,n,r,s,o)}}function ar(e){return e.nodeKind==="mapping"}function bn(e,t,n,r){for(const i of r.keys(n)){if(e.maxTotalMergeKeys!==-1&&++e.totalMergeKeys>e.maxTotalMergeKeys&&oe(e,`merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`),t.tag.has(t.value,i))continue;const o=t.tag.addPair(t.value,i,r.get(n,i));o&&oe(e,o),(t.overridable??=new Set).add(i)}}function eo(e,t,n,r){if(e.position=t.keyPosition,ar(r))bn(e,t,n,r);else if(r.nodeKind==="sequence"&&Array.isArray(n))for(const i of n)bn(e,t,i,t.tag);else oe(e,"cannot merge mappings; the provided source object is unacceptable")}function to(e,t,n,r,i){if(e.position=t.keyPosition,n===Qt){eo(e,t,r,i);return}!e.json&&t.tag.has(t.value,n)&&!t.overridable?.has(n)&&oe(e,"duplicated mapping key");const o=t.tag.addPair(t.value,n,r);o&&oe(e,o),t.overridable?.delete(n)}function $t(e,t,n){const r=e.frames[e.frames.length-1];if(r.kind==="document")r.value=t,r.hasValue=!0;else if(r.kind==="sequence"){r.merge&&(ar(n)||oe(e,"cannot merge mappings; the provided source object is unacceptable"));const i=r.tag.addItem(r.value,t,r.index++);i&&oe(e,i)}else if(r.hasKey){const i=r.key;r.key=void 0,r.hasKey=!1,to(e,r,i,t,n)}else r.key=t,r.keyPosition=e.position,r.hasKey=!0}function kt(e,t,n,r,i){if(t.anchorStart!==He){const o={value:n,tag:r,isValueFinal:i};return e.anchors.set(e.source.slice(t.anchorStart,t.anchorEnd),o),o}return null}function no(e,t){const n={...tn,...t,events:e,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;n.eventIndex<n.events.length;){const r=n.events[n.eventIndex++];switch(n.position=Qi(r),r.type){case 1:n.anchors=new Map,n.aliasCount=0,n.tagHandlers=Object.create(null);for(const i of r.directives)i.kind==="tag"&&(n.tagHandlers[i.handle]=i.prefix);n.frames.push({kind:"document",position:n.position,value:void 0,hasValue:!1});break;case 4:{const{value:i,tag:o}=Ji(n,r);kt(n,r,i,o,!0),$t(n,i,o);break}case 2:{const i=Tn(n,r,n.schema.exact.sequence,n.schema.prefix.sequence,"tag:yaml.org,2002:seq","sequence"),o=i.tag.create(i.tagName),a=kt(n,r,o,i.tag,i.tag.carrierIsResult),s=n.frames[n.frames.length-1],l=s!==void 0&&s.kind==="mapping"&&s.hasKey&&s.key===Qt;n.frames.push({kind:"sequence",position:n.position,value:o,tag:i.tag,anchor:a,index:0,merge:l});break}case 3:{const i=Tn(n,r,n.schema.exact.mapping,n.schema.prefix.mapping,"tag:yaml.org,2002:map","mapping"),o=i.tag.create(i.tagName),a=kt(n,r,o,i.tag,i.tag.carrierIsResult);n.frames.push({kind:"mapping",position:n.position,value:o,tag:i.tag,anchor:a,key:void 0,keyPosition:n.position,hasKey:!1,overridable:null});break}case 5:{n.maxAliases!==-1&&++n.aliasCount>n.maxAliases&&oe(n,`aliases exceeded maxAliases (${n.maxAliases})`);const i=n.source.slice(r.anchorStart,r.anchorEnd),o=n.anchors.get(i);o||oe(n,`unidentified alias "${i}"`),o.isValueFinal||oe(n,`recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`),$t(n,o.value,o.tag);break}case 6:{const i=n.frames.pop();if(i.kind==="mapping"&&i.hasKey&&(n.position=i.keyPosition,oe(n,"incomplete mapping pair in event stream")),i.kind==="document")n.documents.push(i.value);else{const o=i.tag.carrierIsResult?i.value:or(n,i.position,i.tag,i.value);i.anchor&&(i.anchor.value=o,i.anchor.isValueFinal=!0),$t(n,o,i.tag)}break}}}return n.documents}var B=-1,sr=Object.prototype.hasOwnProperty,Ue=1,Mt=2,lr=3,ft=4,ro=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,io=/[,\[\]{}]/,cr=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Bt=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,ur=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,oo=new RegExp(`^(?:${Bt})*$`),ao=new RegExp(`^(?:${ur})+$`),so=new RegExp(`^(?:!(?:${Bt})*|${ur}(?:${Bt})*)$`),nn={filename:"",maxDepth:100};function lo(e,t,n){e.events.push({type:1,explicitStart:t,explicitEnd:n,directives:e.directives})}function fr(e,t,n,r,i,o,a){e.events.push({type:2,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:o,style:a})}function Dt(e,t,n,r,i,o,a){e.events.push({type:3,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:o,style:a})}function vn(e,t){e.events.splice(t.eventsLength,0,{type:3,start:t.position,anchorStart:B,anchorEnd:B,tagStart:B,tagEnd:B,style:2})}function Ke(e,t,n,r,i,o,a,s,l=1,u=-1,c=!1){e.events.push({type:4,valueStart:t,valueEnd:n,anchorStart:r,anchorEnd:i,tagStart:o,tagEnd:a,style:s,chomping:l,indent:u,fast:c})}function co(e,t,n){e.events.push({type:5,anchorStart:t,anchorEnd:n})}function Me(e){e.events.push({type:6})}function re(e){Ke(e,B,B,B,B,B,B,1)}function Rn(){return{anchorStart:B,anchorEnd:B,tagStart:B,tagEnd:B}}function ze(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,eventsLength:e.events.length}}function Be(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.events.length=t.eventsLength}function x(e,t){Ct(e.input.slice(0,e.length),e.position,t,e.filename)}function Z(e){return e===10||e===13}function Le(e){return e===9||e===32}function de(e){return Le(e)||Z(e)}function Ce(e){return e===0||de(e)}function Pe(e){return e===44||e===91||e===93||e===123||e===125}function uo(e){return e>=48&&e<=57?e-48:-1}function fo(e){if(e>=48&&e<=57)return e-48;const t=e|32;return t>=97&&t<=102?t-97+10:-1}function po(e){return e===120?2:e===117?4:e===85?8:0}function ho(e){return e===48||e===97||e===98||e===116||e===9||e===110||e===118||e===102||e===114||e===101||e===32||e===34||e===47||e===92||e===78||e===95||e===76||e===80}function pt(e){e.input.charCodeAt(e.position)===10?e.position++:(e.position++,e.input.charCodeAt(e.position)===10&&e.position++),e.line++,e.lineStart=e.position,e.lineIndent=0,e.firstTabInLine=-1}function ie(e,t){let n=0,r=e.input.charCodeAt(e.position),i=e.position===e.lineStart||de(e.input.charCodeAt(e.position-1));for(;r!==0;){for(;Le(r);)i=!0,r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&i&&r===35)do r=e.input.charCodeAt(++e.position);while(!Z(r)&&r!==0);if(!Z(r))break;for(pt(e),n++,i=!0,r=e.input.charCodeAt(e.position);r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return n}function $e(e,t=e.position){const n=e.input.charCodeAt(t);if((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)){const r=e.input.charCodeAt(t+3);return r===0||de(r)}return!1}function xn(e){let t=e.input.charCodeAt(e.position);for(;t!==0&&!Z(t);)t=e.input.charCodeAt(++e.position)}function pr(e,t,n){ro.test(e.input.slice(t,n))&&x(e,"the stream contains non-printable characters")}function go(e,t,n){if(e.input.charCodeAt(e.position)!==33)return!1;t.tagStart!==B&&x(e,"duplication of a tag property");const r=e.position;let i=!1,o=!1,a="!",s=e.input.charCodeAt(++e.position);s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33&&(o=!0,a="!!",s=e.input.charCodeAt(++e.position));let l=e.position,u;if(i){for(;s!==0&&s!==62;)s=e.input.charCodeAt(++e.position);s!==62&&x(e,"unexpected end of the stream within a verbatim tag"),u=e.input.slice(l,e.position),e.position++}else{for(;s!==0&&!de(s)&&!(n&&Pe(s));)s===33&&(o?x(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(l-1,e.position+1),cr.test(a)||x(e,"named tag handle cannot contain such characters"),o=!0,l=e.position+1)),s=e.input.charCodeAt(++e.position);u=e.input.slice(l,e.position),io.test(u)&&x(e,"tag suffix cannot contain flow indicator characters")}return u&&!(i?oo.test(u):ao.test(u))&&x(e,`tag name cannot contain such characters: ${u}`),!i&&a!=="!"&&a!=="!!"&&!sr.call(e.tagHandlers,a)&&x(e,`undeclared tag handle "${a}"`),t.tagStart=r,t.tagEnd=e.position,!0}function mo(e,t){if(e.input.charCodeAt(e.position)!==38)return!1;t.anchorStart!==B&&x(e,"duplication of an anchor property"),e.position++;const n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position))&&!Pe(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&x(e,"name of an anchor node must contain at least one character"),t.anchorStart=n,t.anchorEnd=e.position,!0}function Ao(e,t){if(e.input.charCodeAt(e.position)!==42)return!1;(t.anchorStart!==B||t.tagStart!==B)&&x(e,"alias node should not have any properties"),e.position++;const n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position))&&!Pe(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&x(e,"name of an alias node must contain at least one character"),co(e,n,e.position),!0}function Ut(e,t){ie(e,!1),e.lineIndent<t&&x(e,"deficient indentation")}function yo(e,t,n){if(e.input.charCodeAt(e.position)!==39)return!1;e.position++;const r=e.position;let i=!0;for(;e.input.charCodeAt(e.position)!==0;){const o=e.input.charCodeAt(e.position);if(o===39){if(e.input.charCodeAt(e.position+1)===39){i=!1,e.position+=2;continue}const a=e.position;return e.position++,Ke(e,r,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2,1,-1,i),!0}Z(o)?(i=!1,Ut(e,t)):e.position===e.lineStart&&$e(e)?x(e,"unexpected end of the document within a single quoted scalar"):o!==9&&o<32?x(e,"expected valid JSON character"):e.position++}x(e,"unexpected end of the stream within a single quoted scalar")}function Eo(e,t,n){if(e.input.charCodeAt(e.position)!==34)return!1;e.position++;const r=e.position;let i=!0;for(;e.input.charCodeAt(e.position)!==0;){const o=e.input.charCodeAt(e.position);if(o===34){const a=e.position;return e.position++,Ke(e,r,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,3,1,-1,i),!0}if(o===92){i=!1;const a=e.input.charCodeAt(++e.position);if(Z(a))Ut(e,t);else if(ho(a))e.position++;else{let s=po(a);for(s===0&&x(e,"unknown escape sequence");s-- >0;)e.position++,fo(e.input.charCodeAt(e.position))<0&&x(e,"expected hexadecimal character");e.position++}}else Z(o)?(i=!1,Ut(e,t)):e.position===e.lineStart&&$e(e)?x(e,"unexpected end of the document within a double quoted scalar"):o!==9&&o<32?x(e,"expected valid JSON character"):e.position++}x(e,"unexpected end of the stream within a double quoted scalar")}function So(e,t,n){const r=e.input.charCodeAt(e.position);let i=1,o=-1,a=!1;if(r!==124&&r!==62)return!1;const s=r===124?4:5;for(e.position++;e.input.charCodeAt(e.position)!==0;){const C=e.input.charCodeAt(e.position),S=uo(C);if(C===43||C===45)i!==1&&x(e,"repeat of a chomping mode identifier"),i=C===43?3:2,e.position++;else if(S>=0)S===0&&x(e,"bad explicit indentation width of a block scalar; it cannot be less than one"),a&&x(e,"repeat of an indentation width identifier"),o=t+S-1,a=!0,e.position++;else break}let l=!1;for(;Le(e.input.charCodeAt(e.position));)l=!0,e.position++;l&&e.input.charCodeAt(e.position)===35&&xn(e),Z(e.input.charCodeAt(e.position))?pt(e):e.input.charCodeAt(e.position)!==0&&x(e,"a line break is expected");let u=a?o:-1,c=0;const E=e.position;let m=e.position;for(;e.input.charCodeAt(e.position)!==0;){const C=e.position;let S=0;for(;e.input.charCodeAt(C+S)===32;)S++;const w=e.input.charCodeAt(C+S);if(w===0){u>=0?S>u&&(m=C+S):S>0&&(m=C+S);break}if(C===e.lineStart&&$e(e,C))break;if(!a&&u===-1&&Z(w)&&(c=Math.max(c,S)),!a&&u===-1&&!Z(w)&&(w===9&&S<t&&(e.position=C+S,x(e,"tab characters must not be used in indentation")),S<c&&(e.position=C+S,x(e,"bad indentation of a mapping entry"))),u===-1&&w!==0&&!Z(w)&&S<t){e.lineIndent=S,e.position=C+S;break}!a&&w!==0&&!Z(w)&&u===-1&&(u=S);const M=u===-1?t+1:u;if(w!==0&&!Z(w)&&S<M){e.lineIndent=S,e.position=C+S;break}xn(e),m=e.position,Z(e.input.charCodeAt(e.position))&&(pt(e),m=e.position)}return pr(e,E,m),Ke(e,E,m,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,s,i,u),!0}function Co(e,t){const n=e.input.charCodeAt(e.position),r=t===Ue;if(n===0||de(n)||n===35||n===38||n===42||n===33||n===124||n===62||n===39||n===34||n===37||n===64||n===96||r&&Pe(n))return!1;if(n===63||n===45){const i=e.input.charCodeAt(e.position+1);if(Ce(i)||r&&Pe(i))return!1}return!0}function To(e,t,n,r){if(!Co(e,n))return!1;const i=e.position;let o=e.position,a=e.input.charCodeAt(e.position);const s=n===Ue;let l=!1;for(;a!==0&&!(e.position===e.lineStart&&$e(e));){if(a===58){const u=e.input.charCodeAt(e.position+1);if(Ce(u)||s&&Pe(u))break}else if(a===35){if(de(e.input.charCodeAt(e.position-1)))break}else{if(s&&Pe(a))break;if(Z(a)){const u=e.position,c=e.line,E=e.lineStart,m=e.lineIndent;if(ie(e,!1),e.lineIndent>=t){l=!0,a=e.input.charCodeAt(e.position);continue}e.position=u,e.line=c,e.lineStart=E,e.lineIndent=m;break}}Le(a)||(o=e.position+1),a=e.input.charCodeAt(++e.position)}return o===i?!1:(pr(e,i,o),Ke(e,i,o,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1,1,-1,!l),!0)}function Ge(e,t){const n=e.line;ie(e,!0),(e.line>n&&e.lineIndent<t||e.firstTabInLine!==-1&&e.lineIndent<t)&&x(e,"deficient indentation")}function bo(e,t,n){const r=e.input.charCodeAt(e.position),i=r===123,o=e.position;let a=!0;if(r!==91&&r!==123)return!1;const s=i?125:93;for(i?Dt(e,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2):fr(e,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2),e.position++;e.input.charCodeAt(e.position)!==0;){Ge(e,t);let l=e.input.charCodeAt(e.position);if(l===s)return e.position++,Me(e),!0;a?l===44&&x(e,"expected the node content, but found ','"):x(e,"missed comma between flow collection entries");let u=!1,c=!1;l===63&&de(e.input.charCodeAt(e.position+1))&&(u=c=!0,e.position+=1,Ge(e,t));const E=e.line,m=ze(e),C=ke(e,t,Ue,!1,!0);Ge(e,t),l=e.input.charCodeAt(e.position),(i||c||e.line===E)&&l===58?(u=!0,e.position++,Ge(e,t),i||vn(e,m),C||re(e),ke(e,t,Ue,!1,!0)||re(e),Ge(e,t),i||Me(e)):i&&u?(C||re(e),re(e)):i?re(e):u&&(vn(e,m),C||re(e),re(e),Me(e)),l=e.input.charCodeAt(e.position),l===44?(a=!0,e.position++):a=!1}x(e,"unexpected end of the stream within a flow collection")}function _n(e,t,n){if(e.firstTabInLine!==-1||e.input.charCodeAt(e.position)!==45||!Ce(e.input.charCodeAt(e.position+1)))return!1;for(fr(e,e.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1);e.input.charCodeAt(e.position)===45&&Ce(e.input.charCodeAt(e.position+1));){e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,x(e,"tab characters must not be used in indentation"));const r=e.line;e.position++;const i=ie(e,!0)>0;if(e.firstTabInLine!==-1&&e.input.charCodeAt(e.position)===45&&Ce(e.input.charCodeAt(e.position+1))&&x(e,"bad indentation of a sequence entry"),i&&e.lineIndent<=t?re(e):ke(e,t,lr,!1,!0),ie(e,!0),e.lineIndent<t||e.position>=e.length)break;e.lineIndent>t&&x(e,"bad indentation of a sequence entry"),e.line===r&&e.input.charCodeAt(e.position)===45&&Ce(e.input.charCodeAt(e.position+1))&&x(e,"bad indentation of a sequence entry")}return Me(e),!0}function Lt(e,t,n,r){let i=!1,o=!1,a=!1,s=!1;if(e.firstTabInLine!==-1)return!1;let l=e.input.charCodeAt(e.position);for(;l!==0;){!i&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,x(e,"tab characters must not be used in indentation"));const u=e.input.charCodeAt(e.position+1),c=e.line;if((l===63||l===58)&&Ce(u))a||(Dt(e,e.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1),a=!0),l===63?(i&&re(e),o=!0,i=!0):(i||(re(e),o=!0),i=!1),e.position+=1,s=!0;else{i&&(re(e),i=!1);const E=ze(e);if(!ke(e,n,Mt,!1,!0))break;if(e.line===c){for(l=e.input.charCodeAt(e.position);Le(l);)l=e.input.charCodeAt(++e.position);if(l===58){if(l=e.input.charCodeAt(++e.position),Ce(l)||x(e,"a whitespace character is expected after the key-value separator within a block mapping"),!a){for(Be(e,E),Dt(e,E.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1),a=!0,ke(e,n,Mt,!1,!0),l=e.input.charCodeAt(e.position);Le(l);)l=e.input.charCodeAt(++e.position);e.position++}o=!0,i=!1,s=!1}else if(o)x(e,"expected ':' after a mapping key");else return r.anchorStart!==B||r.tagStart!==B?(Be(e,E),!1):!0}else if(o)x(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.anchorStart!==B||r.tagStart!==B?(Be(e,E),!1):!0}if(ke(e,t,ft,!0,s)&&(s=!1),i||s&&(re(e),s=!1),ie(e,!0),l=e.input.charCodeAt(e.position),(e.line===c||e.lineIndent>t)&&l!==0)x(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return o?(i&&re(e),a&&Me(e),!0):!1}function ke(e,t,n,r,i,o=!0){e.depth>=e.maxDepth&&x(e,`nesting exceeded maxDepth (${e.maxDepth})`),e.depth++;let a=1,s=!1,l=!1,u=null;const c=Rn();let E=n===ft||n===lr,m=E;const C=E;if(r&&ie(e,!0)&&(s=!0,e.lineIndent>t?a=1:e.lineIndent===t?a=0:a=-1),a===1)for(;;){const S=e.input.charCodeAt(e.position),w=ze(e);if(s&&a!==1&&(S===33||S===38))break;if(s&&C&&(c.tagStart!==B||c.anchorStart!==B)&&(S===33||S===38)){const M=ze(e),N=t+1;if(Lt(e,e.position-e.lineStart,N,c)&&e.events[M.eventsLength]?.type===3)return e.depth--,!0;Be(e,M)}if(s&&(S===33&&c.tagStart!==B||S===38&&c.anchorStart!==B)||!go(e,c,n===Ue)&&!mo(e,c))break;u===null&&(u=w),ie(e,!0)?(s=!0,m=C,e.lineIndent>t?a=1:e.lineIndent===t?a=0:a=-1):m=!1}if(m&&(m=s||i),a===1||n===ft){const S=n===Ue||n===Mt?t:t+1,w=e.position-e.lineStart;if(a===1)if(m&&(_n(e,w,c)||Lt(e,w,S,c))||bo(e,S,c))l=!0;else{const M=e.input.charCodeAt(e.position);if(u!==null&&o&&C&&!m&&M!==124&&M!==62){const N=ze(e),$=u.position-u.lineStart;Be(e,u),Lt(e,$,S,Rn())&&e.events[N.eventsLength]?.type===3?l=!0:Be(e,N)}!l&&(E&&So(e,S,c)||yo(e,S,c)||Eo(e,S,c)||Ao(e,c)||To(e,S,n,c))&&(l=!0)}else a===0&&(l=m&&_n(e,w,c))}return E=E&&!l,!l&&(c.anchorStart!==B||c.tagStart!==B||E)&&(Ke(e,B,B,c.anchorStart,c.anchorEnd,c.tagStart,c.tagEnd,1),l=!0),e.depth--,l||c.anchorStart!==B||c.tagStart!==B}function vo(e){if(e.lineIndent>0||e.input.charCodeAt(e.position)!==37)return!1;e.position++;const t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position));)e.position++;const n=e.input.slice(t,e.position),r=[];for(n.length===0&&x(e,"directive name must not be less than one character in length");e.input.charCodeAt(e.position)!==0&&!Z(e.input.charCodeAt(e.position));){for(;Le(e.input.charCodeAt(e.position));)e.position++;if(e.input.charCodeAt(e.position)===35||Z(e.input.charCodeAt(e.position))||e.input.charCodeAt(e.position)===0)break;const i=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position));)e.position++;r.push(e.input.slice(i,e.position))}if(Z(e.input.charCodeAt(e.position))&&pt(e),n==="YAML"){e.directives.some(o=>o.kind==="yaml")&&x(e,"duplication of %YAML directive"),r.length!==1&&x(e,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);i===null&&x(e,"ill-formed argument of the YAML directive"),parseInt(i[1],10)!==1&&x(e,"unacceptable YAML version of the document"),e.directives.push({kind:"yaml",version:r[0]})}else if(n==="TAG"){r.length!==2&&x(e,"TAG directive accepts exactly two arguments");const[i,o]=r;cr.test(i)||x(e,"ill-formed tag handle (first argument) of the TAG directive"),sr.call(e.tagHandlers,i)&&x(e,`there is a previously declared suffix for "${i}" tag handle`),so.test(o)||x(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagHandlers[i]=o,e.directives.push({kind:"tag",handle:i,prefix:o})}return!0}function Ro(e){e.directives=[],e.tagHandlers=Object.create(null);let t=!1;for(ie(e,!0);vo(e);)t=!0,ie(e,!0);let n=!1,r=!1,i=!0;if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45&&Ce(e.input.charCodeAt(e.position+3))){n=!0;const s=e.line;e.position+=3,ie(e,!0),i=e.line>s}else t&&x(e,"directives end mark is expected");const o=e.events.length;if(!n&&e.position===e.lineStart&&e.input.charCodeAt(e.position)===46&&$e(e)){e.position+=3,ie(e,!0);return}if(lo(e,n,!1),ke(e,e.lineIndent-1,ft,!1,i,i)||re(e),ie(e,!0),e.position===e.lineStart&&$e(e)&&(r=e.input.charCodeAt(e.position)===46,r)){const s=e.line;e.position+=3,ie(e,!0),e.line===s&&e.position<e.length&&x(e,"end of the stream or a document separator is expected")}const a=e.events[o];a?.type===1&&(a.explicitEnd=r),Me(e),!r&&e.position<e.length&&!(e.position===e.lineStart&&$e(e))&&x(e,"end of the stream or a document separator is expected")}function xo(e,t){const n=e.length,r={...nn,...t,input:`${e}\0`,length:n,position:0,line:0,lineStart:0,lineIndent:0,firstTabInLine:-1,depth:0,directives:[],tagHandlers:Object.create(null),events:[]},i=e.indexOf("\0");for(i!==-1&&Ct(e,i,"null byte is not allowed in input",r.filename),r.input.charCodeAt(r.position)===65279&&r.position++;r.position<r.length&&(ie(r,!0),!(r.position>=r.length));){const o=r.position;Ro(r),r.position===o&&x(r,"can not read a document")}return r.events}var _o={...nn,...tn};function wo(e,t={}){const n={..._o,...t},r=String(e),i=Object.keys(nn),o=Object.keys(tn);return no(xo(r,Ht(n,i)),{...Ht(n,o),source:r})}function Io(e,t,n){let r=null;typeof t=="function"?r=t:t!==null&&typeof t=="object"&&(n=t);const i=wo(e,n);if(r===null)return i;for(const o of i)r(o)}var ot=class{tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},Ie=Symbol("INVALID");function No(e){const t=new Set([e.defaultScalarTag,e.defaultSequenceTag,e.defaultMappingTag].filter(o=>o!==void 0)),n=e.implicitScalarTags,r=e.tags.filter(o=>!(o.nodeKind==="scalar"&&o.implicit)&&!t.has(o)),i=e.tags.filter(o=>t.has(o));return[...n.map(o=>({tag:o,implicitTag:!0})),...r.map(o=>({tag:o,implicitTag:!1})),...i.map(o=>({tag:o,implicitTag:!0}))]}function Oo(e,t){for(let n=0,r=e.representTypes.length;n<r;n+=1){const{tag:i,implicitTag:o}=e.representTypes[n];if(i.identify&&i.identify(t)){let a;return i.matchByTagPrefix&&i.representTagName?a=i.representTagName(t):a=i.tagName,{tag:i,tagName:a,implicitTag:o}}}return null}function je(e,t){if(!e.noRefs&&t!==null&&typeof t=="object"){const c=e.refs.get(t);if(c)return c.anchor===void 0&&(c.anchor=`ref_${e.refCounter++}`),{kind:"alias",tag:"",style:new ot,anchor:c.anchor}}const n=Oo(e,t);if(!n){if(t===void 0||e.skipInvalid)return Ie;throw new St(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`)}const{tag:r,tagName:i,implicitTag:o}=n,a=o?i:ir(i);if(r.nodeKind==="scalar"){const c=new ot;return c.tagged=!o,{kind:"scalar",tag:a,style:c,value:r.represent(t)}}if(r.nodeKind==="sequence"){const c=r.represent(t),E=new ot;E.tagged=!o;const m={kind:"sequence",tag:a,style:E,items:[]};e.noRefs||e.refs.set(t,m);for(let C=0,S=c.length;C<S;C+=1){let w=je(e,c[C]);w===Ie&&c[C]===void 0&&(w=je(e,null)),w!==Ie&&m.items.push(w)}return m}const s=r.represent(t),l=new ot;l.tagged=!o;const u={kind:"mapping",tag:a,style:l,items:[]};e.noRefs||e.refs.set(t,u);for(const[c,E]of s){const m=je(e,c);if(m===Ie)continue;const C=je(e,E);C!==Ie&&u.items.push({key:m,value:C})}return u}function $o(e,t,n={}){const r=je({representTypes:No(t),noRefs:n.noRefs??!1,skipInvalid:n.skipInvalid??!1,refs:new Map,refCounter:0},e);return[{contents:r===Ie?null:r,directives:[]}]}var ko=Symbol("visit:break"),dr=Symbol("visit:skip");function lt(e,t,n){const r=t(e,n);if(r===ko)return!0;if(r===dr)return!1;const i=n.depth+1;switch(e.kind){case"sequence":for(const o of e.items)if(lt(o,t,{depth:i,parent:e,isKey:!1}))return!0;break;case"mapping":for(const{key:o,value:a}of e.items)if(lt(o,t,{depth:i,parent:e,isKey:!0})||lt(a,t,{depth:i,parent:e,isKey:!1}))return!0;break}return!1}function Lo(e,t){for(const n of e)if(n.contents&&lt(n.contents,t,{depth:0,parent:null,isKey:!1}))return}var rn=65279,Po=9,Fe=10,hr=13,Fo=32,Ho=33,gr=34,qt=35,Mo=37,Bo=38,mr=39,Do=42,Kt=44,on=45,Ze=58,Uo=61,qo=62,Ar=63,Ko=64,Gt=91,Yt=93,Go=96,jt=123,Yo=124,Wt=125,te={};te[0]="\\0";te[7]="\\a";te[8]="\\b";te[9]="\\t";te[10]="\\n";te[11]="\\v";te[12]="\\f";te[13]="\\r";te[27]="\\e";te[34]='\\"';te[92]="\\\\";te[133]="\\N";te[160]="\\_";te[8232]="\\L";te[8233]="\\P";var an={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};function jo(e){return e.style.tagged?e.tag:ir(e.tag)}function Wo(e){const t={...an,...e};return{...t,defaultScalarTagName:t.schema.defaultScalarTag.tagName,implicitResolvers:t.schema.implicitScalarTags}}function Vo(e){const t=e.toString(16).toUpperCase(),n=e<=255?"x":"u",r=e<=255?2:4;return`\\${n}${"0".repeat(r-t.length)}${t}`}function wn(e,t){const n=" ".repeat(t);let r=0,i="";const o=e.length;for(;r<o;){let a;const s=e.indexOf(`
19
+ `,r);s===-1?(a=e.slice(r),r=o):(a=e.slice(r,s+1),r=s+1),a.length&&a!==`
20
+ `&&(i+=n),i+=a}return i}function Vt(e,t){return`
21
+ ${" ".repeat(e.indent*t)}`}function Xo(e,t){const n=e.indent*Math.max(1,t);return{indent:n,blockIndent:t===0?e.indent+1:e.indent,lineWidth:e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n)}}function In(e,t){for(let n=0,r=e.implicitResolvers.length;n<r;n+=1){const i=e.implicitResolvers[n];if(i.resolve(t,!1,i.tagName)!==H)return i.tagName}return e.defaultScalarTagName}function qe(e){return e===Fo||e===Po}function zo(e){const t=e.charCodeAt(0);if(t!==on&&t!==46||e.charCodeAt(1)!==t||e.charCodeAt(2)!==t)return!1;if(e.length===3)return!0;const n=e.charCodeAt(3);return qe(n)||n===hr||n===Fe}function Je(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==rn||e>=65536&&e<=1114111}function Nn(e){return Je(e)&&e!==rn&&e!==hr&&e!==Fe}function Xt(e,t,n){const r=Nn(e),i=r&&!qe(e);return(n?r:r&&e!==Kt&&e!==Gt&&e!==Yt&&e!==jt&&e!==Wt)&&e!==qt&&!(t===Ze&&!i)||Nn(t)&&!qe(t)&&e===qt||t===Ze&&i&&(n||e!==Kt&&e!==Gt&&e!==Yt&&e!==jt&&e!==Wt)}function Qo(e){return Je(e)&&e!==rn&&!qe(e)&&e!==on&&e!==Ar&&e!==Ze&&e!==Kt&&e!==Gt&&e!==Yt&&e!==jt&&e!==Wt&&e!==qt&&e!==Bo&&e!==Do&&e!==Ho&&e!==Yo&&e!==Uo&&e!==qo&&e!==mr&&e!==gr&&e!==Mo&&e!==Ko&&e!==Go}function Zo(e,t){const n=De(e,0);if(Qo(n))return!0;if(e.length>1&&(n===on||n===Ar||n===Ze)){const r=De(e,1);return!qe(r)&&Xt(r,n,t)}return!1}function Jo(e){return!qe(e)&&e!==Ze}function De(e,t){const n=e.charCodeAt(t);let r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function yr(e){return/^\n* /.test(e)}var et=1,Qe=2,sn=3,ln=4,xe=5;function ea(e,t,n,r,i,o){const{blockIndent:a,lineWidth:s}=n;let l,u=0,c=-1,E=!1,m=!1;const C=s!==-1;let S=-1,w=!zo(t)&&Zo(t,o)&&Jo(De(t,t.length-1));if(r||i)for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=De(t,l),!Je(u))return xe;w=w&&Xt(u,c,o),c=u}else{for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=De(t,l),u===Fe)E=!0,C&&(m=m||l-S-1>s&&!tt(t[S+1]),S=l);else if(!Je(u))return xe;w=w&&Xt(u,c,o),c=u}m=m||C&&l-S-1>s&&!tt(t[S+1])}return!E&&!m?w&&!i?et:e.quoteStyle==="double"?xe:Qe:a>9&&yr(t)?xe:m?ln:sn}function ta(e,t,n){const{indent:r,blockIndent:i,lineWidth:o}=n;switch(t){case et:return $n(e,r);case Qe:return`'${$n(e,r).replace(/'/g,"''")}'`;case sn:return"|"+On(e,i)+kn(wn(e,r));case ln:return">"+On(e,i)+kn(wn(ra(e,o),r));case xe:return`"${ia(e)}"`}}function na(e,t,n,r,i){const o=r||!i;if(t.style.singleQuoted)return Qe;if(t.style.doubleQuoted)return xe;if(!o){if(t.style.literal)return sn;if(t.style.folded)return ln}const a=t.value;if(a.length===0)return t.style.tagged||In(e,a)===t.tag?et:e.quoteStyle==="double"?xe:Qe;const s=ea(e,a,n,o,e.forceQuotes&&!r,i);return s===et&&!t.style.tagged&&In(e,a)!==t.tag?e.quoteStyle==="double"?xe:Qe:s}function On(e,t){const n=yr(e)?String(t):"",r=e[e.length-1]===`
22
+ `;return`${n}${r&&(e[e.length-2]===`
23
+ `||e===`
24
+ `)?"+":r?"":"-"}
25
+ `}function $n(e,t){let n=e.indexOf(`
26
+ `);if(n===-1)return e;const r=" ".repeat(t);let i=e.slice(0,n);const o=/(\n+)([^\n]*)/g;o.lastIndex=n;let a;for(;a=o.exec(e);){const s=a[1].length,l=a[2];i+=`
27
+ `.repeat(s+1)+r+l}return i}function kn(e){return e[e.length-1]===`
28
+ `?e.slice(0,-1):e}function tt(e){return e===" "||e===" "}function ra(e,t){const n=/(\n+)([^\n]*)/g;let r=e.indexOf(`
29
+ `);r===-1&&(r=e.length),n.lastIndex=r;let i=Ln(e.slice(0,r),t),o=e[0]===`
30
+ `||tt(e[0]),a,s;for(;s=n.exec(e);){const l=s[1],u=s[2];a=u!==""&&tt(u[0]),i+=l+(!o&&!a&&u!==""?`
31
+ `:"")+Ln(u,t),o=a}return i}function Ln(e,t){if(e===""||tt(e[0]))return e;const n=/ [^ \t]/g;let r,i=0,o,a=0,s=0,l="";for(;r=n.exec(e);)s=r.index,s-i>t&&(o=a>i?a:s,l+=`
32
+ ${e.slice(i,o)}`,i=o+1),a=s;return l+=`
33
+ `,e.length-i>t&&a>i?l+=`${e.slice(i,a)}
34
+ ${e.slice(a+1)}`:l+=e.slice(i),l.slice(1)}function ia(e){let t="",n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=De(e,r);const i=te[n];if(i){t+=i;continue}if(Je(n)){t+=e[r],n>=65536&&(t+=e[r+1]);continue}t+=Vo(n)}return t}function oa(e,t,n){let r="";for(let o=0,a=n.items.length;o<a;o+=1){const s=Te(e,t,n.items[o],{});r!==""&&(r+=`,${e.flowSkipCommaSpace?"":" "}`),r+=s}const i=e.flowBracketPadding&&r!==""?" ":"";return`[${i}${r}${i}]`}function Pn(e,t,n,r){let i="";for(let o=0,a=n.items.length;o<a;o+=1){const s=Te(e,t+1,n.items[o],{block:!0,compact:e.seqInlineFirst,isblockseq:!0});(!r||i!=="")&&(i+=Vt(e,t)),s===""||Fe===s.charCodeAt(0)?i+="-":i+="- ",i+=s}return i}function aa(e,t,n){let r="";const i=Er(e,n.items);for(const{key:a,value:s}of i){let l="";r!==""&&(l+=`,${e.flowSkipCommaSpace?"":" "}`);const u=Te(e,t,a,{iskey:!0}),c=u.length>1024;c?l+="? ":e.quoteFlowKeys&&(l+='"');const E=Te(e,t,s,{}),m=e.flowSkipColonSpace||E===""?"":" ";l+=`${u}${e.quoteFlowKeys&&!c?'"':""}:${m}${E}`,r+=l}const o=e.flowBracketPadding&&r!==""?" ":"";return`{${o}${r}${o}}`}function at(e){return e.kind==="scalar"?e.value:e}function Er(e,t){if(!e.sortKeys)return t;const n=t.slice();if(e.sortKeys===!0)n.sort((r,i)=>{const o=at(r.key),a=at(i.key);return o<a?-1:o>a?1:0});else{const r=e.sortKeys;n.sort((i,o)=>r(at(i.key),at(o.key)))}return n}function sa(e,t,n,r){let i="";const o=Er(e,n.items);for(let a=0,s=o.length;a<s;a+=1){let l="";(!r||i!=="")&&(l+=Vt(e,t));const{key:u,value:c}=o[a],E=(u.kind==="mapping"||u.kind==="sequence")&&!u.style.flow&&u.items.length!==0||u.kind==="scalar"&&(u.style.literal||u.style.folded),m=E?Te(e,t+1,u,{block:!0,compact:!0,isblockseq:!zt(e,u,t+1)}):Te(e,t+1,u,{block:!0,compact:!0,iskey:!0}),C=u.kind==="scalar"&&u.value.indexOf(`
35
+ `)!==-1,S=E||C||m.length>1024;S&&(m&&Fe===m.charCodeAt(0)?l+="?":l+="? "),l+=m,S&&(l+=Vt(e,t));const w=Te(e,t+1,c,{block:!0,compact:S,isblockseq:S&&!zt(e,c,t+1)}),M=u.kind==="scalar"&&u.value===""&&m!==""&&m.charCodeAt(m.length-1)!==mr&&m.charCodeAt(m.length-1)!==gr,N=!S&&(u.kind==="alias"||M)?" ":"";w===""||Fe===w.charCodeAt(0)?l+=`${N}:`:l+=`${N}: `,l+=w,i+=l}return i}function zt(e,t,n){return t.style.tagged||t.anchor!==void 0||e.indent<2&&n>0}function Te(e,t,n,r){if(n.kind==="alias")return`*${n.anchor}`;const{block:i=!1,iskey:o=!1,isblockseq:a=!1}=r;let s=r.compact??!1;const l=n.anchor!==void 0;zt(e,n,t)&&(s=!1);let u,c=n.style.tagged;const E=i&&(n.kind==="mapping"||n.kind==="sequence")&&!n.style.flow&&n.items.length!==0;if(n.kind==="mapping")E?u=sa(e,t,n,s):u=aa(e,t,n);else if(n.kind==="sequence")E?e.seqNoIndent&&!a&&t>0?u=Pn(e,t-1,n,s):u=Pn(e,t,n,s):u=oa(e,t,n);else{const m=Xo(e,t),C=na(e,n,m,o,i);u=ta(n.value,C,m),c=n.style.tagged||C!==et&&n.tag!==e.defaultScalarTagName}if(E&&s&&t>0&&e.indent>2&&(u=`${" ".repeat(e.indent-2)}${u}`),c||l){const m=[],C=c?jo(n):null,S=l?`&${n.anchor}`:null;e.tagBeforeAnchor?(C!==null&&m.push(C),S!==null&&m.push(S)):(S!==null&&m.push(S),C!==null&&m.push(C));const w=u===""||u.charCodeAt(0)===Fe?"":" ";u=`${m.join(" ")}${w}${u}`}return u}function la(e){return(e.kind==="sequence"||e.kind==="mapping")&&!e.style.flow&&e.items.length!==0&&!e.style.tagged&&e.anchor===void 0}function ca(e){let t=e;for(;(t.kind==="sequence"||t.kind==="mapping")&&!t.style.flow&&t.items.length!==0;)t=t.kind==="sequence"?t.items[t.items.length-1]:t.items[t.items.length-1].value;if(t.kind!=="scalar"||!(t.style.literal||t.style.folded))return!1;const{value:n}=t;return n.endsWith(`
36
+
37
+ `)||n===`
38
+ `}function ua(e){let t="";for(const n of e.directives){if(n.kind==="yaml"){t+=`%YAML ${n.version}
39
+ `;continue}const{handle:r,prefix:i}=n;t+=`%TAG ${r} ${i}
40
+ `}return t}function fa(e,t){const n=Wo(t);let r="",i=!1;for(let o=0;o<e.length;o+=1){const a=e[o],s=ua(a),l=s!=="",u=a.explicitStart||l||o>0&&!i;if(r+=s,a.contents===null)u&&(r+=`---
41
+ `);else if(u){const c=Te(n,0,a.contents,{block:!0,compact:!0}),E=c===""?"":l||la(a.contents)?`
42
+ `:" ";r+=`---${E}${c}
43
+ `}else r+=Te(n,0,a.contents,{block:!0,compact:!0})+`
44
+ `;i=a.explicitEnd||a.contents!==null&&ca(a.contents),i&&(r+=`...
45
+ `)}return r}var pa=Bi.withTags({...Pt,resolve:(e,t,n)=>{const r=Pt.resolve(e,t,n);return r===H?jn.resolve(e,t,n):r}},{...Ft,resolve:(e,t,n)=>{const r=Ft.resolve(e,t,n);return r===H?Wn.resolve(e,t,n):r}}),da={...an,schema:pa,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:()=>{}};function ha(e,t={}){const n={...da,...t},r=$o(e,n.schema,{noRefs:n.noRefs,skipInvalid:n.skipInvalid});return n.flowLevel>=0&&Lo(r,(i,o)=>{if(!(o.depth<n.flowLevel))return i.style.flow=!0,dr}),n.transform(r),fa(r,{...Ht(n,Object.keys(an)),schema:n.schema})}const ga=er.withTags(Vn,Xn,zn,Qn,Zn),cn=(e,t)=>{const n=Io(e,{schema:ga,...t});if(n.length===0)return e.trim()===""?void 0:null;if(n.length>1)throw new St("expected a single document in the stream, but found more");return n[0]},ma=(e,t)=>ha(e,t);function Sr(e,t){return e.hasOwnProperty(t)?e[t]:void 0}const Aa=/\((\d+):(\d+)\)$/;class nt extends Error{originalError;source;col;line;constructor(t,n){super(t.message.split(`
46
+ `)[0]),this.originalError=t,this.source=n,Object.setPrototypeOf(this,nt.prototype);const[,r,i]=this.message.match(Aa)||[];this.line=parseInt(r,10),this.col=parseInt(i,10)}}function Cr(e){return e.endsWith(".yaml")||e.endsWith(".yml")||e.endsWith(".json")}const ya=[".graphql",".gql"];function un(e){const t=e.toLowerCase();return ya.some(n=>t.endsWith(n))}function ct(e,t){return e+"::"+t}function Ea(){return new Promise(e=>{setTimeout(e)})}class dt{absoluteRef;body;mimeType;constructor(t,n,r){this.absoluteRef=t,this.body=n,this.mimeType=r}#e;#t;getAst(t){return this.#e===void 0&&(this.#e=t(this.body,{filename:this.absoluteRef})??void 0,this.#e&&this.#e.kind===0&&this.#e.value===""&&this.#e.startPosition!==1&&(this.#e.startPosition=1,this.#e.endPosition=1)),this.#e}getLines(){return this.#t===void 0&&(this.#t=this.body.split(/\r\n|[\n\r]/g)),this.#t}}class Tt extends Error{originalError;constructor(t){super(t.message),this.originalError=t,Object.setPrototypeOf(this,Tt.prototype)}}function Sa(e,t){const n=new dt(t,e);if(un(t))return{source:n,parsed:e};try{return{source:n,parsed:cn(e,{filename:t})}}catch(r){throw new nt(r,n)}}class Ca{config;cache=new Map;constructor(t={http:{headers:[]}}){this.config=t}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(t,n){return Oe(n)?n:t&&Oe(t)?new URL(n,t).href:se.pathBrowserifyExports.resolve(t?se.pathBrowserifyExports.dirname(t):process.cwd(),n)}async loadExternalRef(t){try{if(Oe(t)){const{body:n,mimeType:r}=await Dn(t,this.config.http);return new dt(t,n,r)}else{if((void 0)(t).isDirectory())throw new Error(`Expected a file but received a folder at ${t}.`);const n=await(void 0).readFile(t,"utf-8");return new dt(t,n.replace(/\r\n/g,`
47
+ `))}}catch(n){throw n.message=n.message.replace(", lstat",""),new Tt(n)}}parseDocument(t,n=!1){if(un(t.absoluteRef))return{source:t,parsed:t.body};if(!Cr(t.absoluteRef)&&!t.mimeType?.match(/(json|yaml|openapi)/)&&!n)return{source:t,parsed:t.body};try{return{source:t,parsed:cn(t.body,{filename:t.absoluteRef})}}catch(r){throw new nt(r,t)}}async resolveDocument(t,n,r=!1){const i=this.resolveExternalRef(t,n),o=this.cache.get(i);if(o)return o;const a=this.loadExternalRef(i).then(s=>this.parseDocument(s,r));return this.cache.set(i,a),a}}function Fn(e,t){return{prev:e,node:t}}function Ta(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}const Ye={name:"unknown",properties:{}},ba={name:"scalar",properties:{}};async function va(e){const{rootDocument:t,externalRefResolver:n,rootType:r}=e,i=new Map,o=new Set,a=[];l(t.parsed,t,"#/",r);let s;do s=await Promise.all(a);while(a.length!==s.length);return i;function l(u,c,E,m){const C=c.source.absoluteRef,S=new Map;w(u,m,C+E);function w(N,$,y){if(!se.isPlainObject(N)&&!Array.isArray(N))return;const R=`${$.name}::${y}`;if(o.has(R))return;if(o.add(R),Array.isArray(N)){const v=$.items;if(v===void 0&&$!==Ye&&$!==We)return;const A=typeof v=="function";for(let g=0;g<N.length;g++){let _=A?v(N[g],Re(y,g)):v;if(_===void 0&&$!==Ye&&$!==We)continue;const j=_?.directResolveAs?{$ref:N[g]}:N[g];_=_?.directResolveAs||_,w(j,Ve(_)?_:Ye,Re(y,g))}return}const[f,I]=Object.entries(N).find(([v])=>v==="$anchor")||[];I&&S.set(`#${I}`,N);for(const v of Object.keys(N)){let A=N[v],g=Sr($.properties,v);g===void 0&&(g=$.additionalProperties),typeof g=="function"&&(g=g(A,v)),g===void 0&&(g=Ye),$.extensionsPrefix&&v.startsWith($.extensionsPrefix)&&g===Ye&&(g=We),!Ve(g)&&g?.directResolveAs&&(g=g.directResolveAs,A={$ref:A}),g&&g.name===void 0&&g.resolvable!==!1&&(g=ba),!(!Ve(g)||!(se.isPlainObject(A)||Array.isArray(A)))&&w(A,g,Re(y,Ne(v)))}if(Xe(N)){const v=M(c,N,{prev:null,node:N}).then(A=>{if(A.resolved){l(A.node,A.document,A.nodePointer,$);for(const g of A.chain??[])l(g.node,g.document,g.location.pointer,$)}});a.push(v)}if(qn(N)){const v=M(c,{$ref:N.externalValue},{prev:null,node:N}).then(A=>{A.resolved&&l(A.node,A.document,A.nodePointer,$)});a.push(v)}}async function M(N,$,y){if(Ta(y.prev,$))throw new Error("Self-referencing circular pointer");if(Br($.$ref)){await Ea();const k={resolved:!0,isRemote:!1,node:S.get($.$ref),document:N,nodePointer:$.$ref},K=ct(N.source.absoluteRef,$.$ref);return i.set(K,k),k}const{uri:R,pointer:f}=Gn($.$ref),I=R!==null&&n.resolveExternalRef(N.source.absoluteRef,R)!==N.source.absoluteRef;let v;try{v=I?await n.resolveDocument(N.source.absoluteRef,R):N}catch(k){const K={resolved:!1,isRemote:I,document:void 0,error:k},ue=ct(N.source.absoluteRef,$.$ref);return i.set(ue,K),K}let A={resolved:!0,document:v,isRemote:I,node:N.parsed,nodePointer:"#/"},g=v.parsed;const _=f;for(const k of _)if(se.isPlainObject(g)&&g[k]!==void 0)g=g[k],A.nodePointer=Re(A.nodePointer,Ne(k));else if(Array.isArray(g)&&g[+k]!==void 0)g=g[+k],A.nodePointer=Re(A.nodePointer,Ne(k));else if(Xe(g))if(A=await M(v,g,Fn(y,g)),A.chain=void 0,v=A.document||v,se.isPlainObject(A.node))g=A.node[k],A.nodePointer=Re(A.nodePointer,Ne(k));else if(Array.isArray(A.node))g=A.node[+k],A.nodePointer=Re(A.nodePointer,Ne(k));else{g=void 0;break}else{g=void 0;break}A.node=g,A.document=v;const j=ct(N.source.absoluteRef,$.$ref);if(A.document&&Xe(g)){const k=Un(g)?{node:g,document:A.document,location:new mt(A.document.source,A.nodePointer)}:void 0;A=await M(A.document,g,Fn(y,g)),k&&A.resolved&&(A={...A,chain:[k,...A.chain??[]]})}return i.set(j,A),{...A}}}}exports.BaseResolver=Ca;exports.Location=mt;exports.ResolveError=Tt;exports.Source=dt;exports.SpecExtension=We;exports.YamlParseError=nt;exports.env=Bn;exports.escapePointerFragment=Ne;exports.getDir=Fr;exports.getOwn=Sr;exports.isAbsoluteUrl=Oe;exports.isBrowser=Mn;exports.isExternalValue=qn;exports.isGraphqlRef=un;exports.isMappingRef=Mr;exports.isNamedType=Ve;exports.isRef=Xe;exports.isRefWithSiblings=Un;exports.isSupportedExtension=Cr;exports.isTruthy=Hn;exports.listOf=Or;exports.makeDocumentFromString=Sa;exports.makeRefId=ct;exports.mapOf=$r;exports.normalizeTypes=kr;exports.parsePointer=Yn;exports.parseRef=Gn;exports.parseYaml=cn;exports.pointerBaseName=Lr;exports.readFileFromUrl=Dn;exports.refBaseName=Pr;exports.replaceRef=Dr;exports.resolveDocument=va;exports.resolvePath=Hr;exports.stringifyYaml=ma;exports.unescapePointerFragment=Kn;