@redocly/replay 0.30.0-next.5 → 0.30.0-next.7

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 (61) hide show
  1. package/dist/{replay-AiChatProvider-DIgkY3kh.js → replay-AiChatProvider-BM8abqH8.js} +6 -6
  2. package/dist/{replay-AiChatProvider-CIywyLHq.js → replay-AiChatProvider-LxWuWgjK.js} +1 -1
  3. package/dist/{replay-AiChatSqliteDBStorage-BFITaKcX.js → replay-AiChatSqliteDBStorage-ByM_jjvw.js} +1 -1
  4. package/dist/{replay-AiChatSqliteDBStorage-BEWFNvvr.js → replay-AiChatSqliteDBStorage-C4tdDPBf.js} +1 -1
  5. package/dist/{replay-AiPanel-Bsu1sdgq.js → replay-AiPanel-DD1S543u.js} +1 -1
  6. package/dist/{replay-AiPanel-B_XizDaL.js → replay-AiPanel-LQPU7h0J.js} +4 -4
  7. package/dist/{replay-FileWatcher-CDiK_231.js → replay-FileWatcher-BbFbSH7-.js} +2 -2
  8. package/dist/{replay-FileWatcher-DYuN1l9G.js → replay-FileWatcher-BwY_TKXE.js} +1 -1
  9. package/dist/{replay-SemanticSearchService-CWnTWVrh.js → replay-SemanticSearchService-C2OaJcha.js} +1 -1
  10. package/dist/{replay-SemanticSearchService-hGPvL8ZA.js → replay-SemanticSearchService-CVxK2RB-.js} +1 -1
  11. package/dist/{replay-SqliteDBStorage-DUgfGXQS.js → replay-SqliteDBStorage-BYMeLBll.js} +1 -1
  12. package/dist/{replay-SqliteDBStorage-DqCad-jO.js → replay-SqliteDBStorage-BiutW7pD.js} +1 -1
  13. package/dist/{replay-TauriFileSystemAdapter-DbStHrcq.js → replay-TauriFileSystemAdapter-DOPckV5d.js} +1 -1
  14. package/dist/{replay-TauriFileSystemAdapter-NsUe7OA2.js → replay-TauriFileSystemAdapter-SpIElzCj.js} +1 -1
  15. package/dist/{replay-TauriRootStorage-hyP1w9HP.js → replay-TauriRootStorage-Cs8FdTRB.js} +1 -1
  16. package/dist/{replay-TauriRootStorage-D4stEcJc.js → replay-TauriRootStorage-qdWzMQnK.js} +2 -2
  17. package/dist/{replay-agent-loop-wlfFhx7A.js → replay-agent-loop-CbONmEpU.js} +3 -3
  18. package/dist/{replay-agent-loop-YDWUOapv.js → replay-agent-loop-D20Uo83P.js} +1 -1
  19. package/dist/{replay-ai-chat-mappers-CX9Tbjaq.js → replay-ai-chat-mappers-BoD5va2S.js} +1 -1
  20. package/dist/{replay-ai-chat-mappers-C1MxdxUZ.js → replay-ai-chat-mappers-BqjA6a1R.js} +1 -1
  21. package/dist/{replay-create-model-B46oXIt0.js → replay-create-model-ByXMw0Mz.js} +3 -3
  22. package/dist/{replay-create-model-CpeHx32p.js → replay-create-model-iK8UnqLH.js} +3 -3
  23. package/dist/{replay-db-_sfKkGQN.js → replay-db-BAptE3HS.js} +1 -1
  24. package/dist/{replay-db-DyBtcH0M.js → replay-db-KVbyscDg.js} +1 -1
  25. package/dist/{replay-external-resolver-BVlse8p4.js → replay-external-resolver-CPTL9YMt.js} +1 -1
  26. package/dist/{replay-external-resolver-D7Wt_iae.js → replay-external-resolver-yhrzSVh-.js} +2 -2
  27. package/dist/{replay-index-BHtfLbOG.js → replay-index-7c2fdTRw.js} +18019 -17835
  28. package/dist/{replay-index-DojX0a8W.js → replay-index-B7Ax7uI3.js} +1 -1
  29. package/dist/{replay-index-CXJlqm6N.js → replay-index-BJuio1mk.js} +1 -1
  30. package/dist/{replay-index-waj9vpTT.js → replay-index-C1rF4MIj.js} +1 -1
  31. package/dist/{replay-index-Cx8oraX2.js → replay-index-CRekxOYt.js} +5 -5
  32. package/dist/{replay-index-B5qx5bDS.js → replay-index-D66UFxK0.js} +1 -1
  33. package/dist/{replay-index-CMFKqCDF.js → replay-index-DGVKGau4.js} +1243 -1146
  34. package/dist/replay-index-DcselHjq.js +4 -0
  35. package/dist/{replay-index-CPj7VXy4.js → replay-index-Dglne1rU.js} +1 -1
  36. package/dist/{replay-index-DDciZQv-.js → replay-index-DsB14Sfy.js} +1 -1
  37. package/dist/{replay-index-CjQB3EDL.js → replay-index-Du_9zDOG.js} +1 -1
  38. package/dist/{replay-index-CdCv9u0A.js → replay-index-TMDJfwog.js} +1 -1
  39. package/dist/{replay-lint-CTr--PY8.js → replay-lint-7C6uDSRh.js} +3 -3
  40. package/dist/{replay-lint-GlL55UxQ.js → replay-lint-BmCBitNn.js} +3 -3
  41. package/dist/{replay-lint-graphql-C6bTArZZ.js → replay-lint-graphql--lxWSyCB.js} +1 -1
  42. package/dist/{replay-lint-graphql-BAbZ5zlw.js → replay-lint-graphql-DbU8ryFL.js} +2 -2
  43. package/dist/{replay-periodic-revalidation-BIL4A6wA.js → replay-periodic-revalidation-C-RY1iAP.js} +1 -1
  44. package/dist/{replay-periodic-revalidation-BmcwS5Zr.js → replay-periodic-revalidation-NOc0MUCR.js} +1 -1
  45. package/dist/replay-resolve-27HxVuKM.js +53 -0
  46. package/dist/replay-resolve-D1Ex_R0P.js +3879 -0
  47. package/dist/{replay-respect-run-DYbP2ssj.js → replay-respect-run-9NB18649.js} +3 -3
  48. package/dist/{replay-respect-run-C683sR_D.js → replay-respect-run-Ba0IqCSQ.js} +1 -1
  49. package/dist/{replay-tauri-path-acwDFL6X.js → replay-tauri-path-L81YjxNO.js} +1 -1
  50. package/dist/{replay-tauri-path-CPxazvK7.js → replay-tauri-path-WDQCkBMZ.js} +2 -2
  51. package/dist/{replay-useAiChatQueries-ATPMv4Ui.js → replay-useAiChatQueries-CeNsH7jY.js} +1 -1
  52. package/dist/{replay-useAiChatQueries-CWkTkF35.js → replay-useAiChatQueries-ChvOULLB.js} +4 -4
  53. package/dist/{replay-validate-key-AU0r5ni5.js → replay-validate-key-BC0hj8Un.js} +1 -1
  54. package/dist/{replay-validate-key-a3_b2aYk.js → replay-validate-key-DpZjfsH8.js} +2 -2
  55. package/dist/replay.cjs +1 -1
  56. package/dist/replay.d.ts +3 -0
  57. package/dist/replay.js +1 -1
  58. package/package.json +2 -2
  59. package/dist/replay-index-Cby2I8sk.js +0 -4
  60. package/dist/replay-resolve-DM1hJihD.js +0 -47
  61. package/dist/replay-resolve-DyEp5KUi.js +0 -3739
@@ -1,6 +1,6 @@
1
- import { a7 as Y, a6 as ce, bs as Ne, bt as Me, bu as Va, bv as Yn, bw as ua, bx as x, by as Fe, bz as q, bA as Z, bB as Be, bC as Re, bD as Zr, bE as _n, V as Xa, W as qn, bF as Zn, bG as Qa, X as Ua, bH as Xn, bI as ca, bJ as Wa, bK as er } from "./replay-index-BHtfLbOG.js";
2
- import { c as Ze } from "./replay-resolve-DyEp5KUi.js";
3
- import { E as Xr, a7 as ar, c as Qn, a0 as et, X as at, Q as rt, ac as Qr, ad as nt } from "./replay-lint-GlL55UxQ.js";
1
+ import { a7 as Y, a6 as ce, bs as Ne, bt as Me, bu as Va, bv as Yn, bw as ua, bx as x, by as Fe, bz as q, bA as Z, bB as Be, bC as Re, bD as Zr, bE as _n, V as Xa, W as qn, bF as Zn, bG as Qa, X as Ua, bH as Xn, bI as ca, bJ as Wa, bK as er } from "./replay-index-7c2fdTRw.js";
2
+ import { c as Ze } from "./replay-resolve-D1Ex_R0P.js";
3
+ import { E as Xr, a7 as ar, c as Qn, a0 as et, X as at, Q as rt, ac as Qr, ad as nt } from "./replay-lint-BmCBitNn.js";
4
4
  function tt(e) {
5
5
  return Y(e) && "name" in e && "value" in e && !("in" in e);
6
6
  }
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./replay-index-CMFKqCDF.js"),$e=require("./replay-resolve-DM1hJihD.js"),de=require("./replay-lint-CTr--PY8.js");function Rn(e){return f.isPlainObject(e)&&"name"in e&&"value"in e&&!("in"in e)}function xa(e){return f.isPlainObject(e)&&"in"in e&&typeof e.in=="string"&&["header","query","path","cookie"].includes(e.in)}const Pn=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Hr(e){return e.startsWith("$file(")&&e.endsWith(")")?e.substring(7,e.length-2):e}const Fa=async(e,a,r,t,n)=>{const i=f.pathBrowserifyExports.dirname(t),o=f.pathBrowserifyExports.resolve(i,Hr(r));e.append(a,await n.options.requestFileLoader.getFileBody(o))},xr=(e,a,r,t,n,i)=>{Object.entries(r).forEach(([o,s])=>{const l=i?`${i}[${o}]`:o;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?e.push(Fa(a,l,s,t,n)):Array.isArray(s)?s.forEach(u=>{typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")?e.push(Fa(a,l,u,t,n)):a.append(l,u.toString())}):f.isPlainObject(s)?xr(e,a,s,t,n,l):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&a.append(l,s.toString())})},Ln=async(e,a,r,t)=>{if(f.isPlainObject(e)){const n=[];xr(n,a,e,r,t),await Promise.all(n)}},En=async(e,a)=>{if(typeof e=="string"&&e.startsWith("$file(")&&e.endsWith(")")){const r=f.pathBrowserifyExports.resolve(f.pathBrowserifyExports.dirname(a.options.filePath),Hr(e));return a.options.requestFileLoader.getFileBody(r)}else return e};async function Dn(e,a){if(!e)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:r,contentType:t}=e;if(t==="multipart/form-data"){const n=new FormData,i=f.pathBrowserifyExports.resolve(a.options.filePath);return await Ln(r,n,i,a),{...e,payload:n}}else{if(t==="application/octet-stream"||typeof t=="string"&&Pn.test(t))return{...e,payload:await En(r,a),contentType:"application/octet-stream"};if(t==="application/x-www-form-urlencoded"&&typeof r=="string")return{...e,payload:Object.fromEntries(new URLSearchParams(r).entries()),contentType:"application/x-www-form-urlencoded"}}return e}function Nn({payload:e,replacements:a,expressionContext:r,logger:t}){for(const n of a){const{target:i,value:o}=n;if(typeof i!="string")throw new Error(`Invalid JSON Pointer: ${i}`);try{const s=f.JsonPointerLib.get(e,i),l=f.evaluateRuntimeExpressionPayload({payload:o,context:r,logger:t});s!==void 0&&f.JsonPointerLib.set(e,i,l)}catch{throw new Error(`Invalid JSON Pointer: ${i}`)}}}const Hn=["parameters","failureActions","successActions"];function xn(e,a){const{reference:r,value:t}=e;if(!Hn.some(i=>r.includes(`$components.${i}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const n=f.getValueFromContext({value:r,ctx:a,logger:a.options.logger});return f.isPlainObject(n)&&"value"in n&&t?{...n,value:t}:n}function Ke(e,a){return"reference"in e?xn(e,a):e}const V={SUCCESS_CRITERIA_CHECK:"success criteria check",STATUS_CODE_CHECK:"status code check",SCHEMA_CHECK:"schema check",CONTENT_TYPE_CHECK:"content-type check",GLOBAL_TIMEOUT_ERROR:"global timeout error",MAX_STEPS_REACHED_ERROR:"maximum steps reached",NETWORK_ERROR:"failed network request",UNEXPECTED_ERROR:"unexpected error"};class Wr extends Error{}class Gr extends Wr{}class Ir extends Wr{}async function Wn(e){const{descriptionPath:a,externalRefResolver:r,base:t}=e,n=await de.bundle({base:t,ref:a,config:e.config,dereference:!0,externalRefResolver:r});if(!n)throw new Error(`Could not find source description file '${a}'.`);return n.bundle.parsed}const Gn={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},Ma=Symbol("skip");function We(e){return e<10?"0"+e:e}function In(e,a,r,t){var n=r?"":e.getUTCFullYear()+"-"+We(e.getUTCMonth()+1)+"-"+We(e.getUTCDate());return a||(n+="T"+We(e.getUTCHours())+":"+We(e.getUTCMinutes())+":"+We(e.getUTCSeconds())+"Z"),n}function Fr(e,a){return a>e.length?e.repeat(Math.trunc(a/e.length)+1).substring(0,a):e}function na(...e){const a=r=>r&&typeof r=="object";return e.reduce((r,t)=>(Object.keys(t||{}).forEach(n=>{const i=r[n],o=t[n];a(i)&&a(o)?r[n]=na(i,o):r[n]=o}),r),Array.isArray(e[e.length-1])?[]:{})}function Fn(e){var a=Jn(e),r=$n(a,a,a,a),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{var i=r()*16%16|0;return(n=="x"?i:i&3|8).toString(16)});return t}function ca(e){return{value:e==="object"?{}:e==="array"?[]:void 0}}function ke(e,a){a&&e.pop()}function On(e){return{name:e?.xml?.name||"",prefix:e?.xml?.prefix||"",namespace:e?.xml?.namespace||null,attribute:e?.xml?.attribute??!1,wrapped:e?.xml?.wrapped??!1}}function Kn(e){const a=e?.xml;return a?.nodeType?a.nodeType:a?.attribute===!0?"attribute":a?.wrapped===!0&&e?.type==="array"?"element":e?.$ref||e?.$dynamicRef||e?.type==="array"||e?.oneOf||e?.anyOf||e?.allOf?"none":"element"}function ta(e,a={},r={}){const{value:t}=e,{propertyName:n}=r,{name:i,prefix:o,namespace:s}=On(a),l=Kn(a);let u=i||n?`${o?o+":":""}${i||n}`:null,c=typeof t=="object"?Array.isArray(t)?[...t]:{...t}:t;switch(l){case"attribute":u&&(u=`$${u}`);break;case"text":u="#text";break;case"cdata":u="#cdata";break;case"none":a.type==="array"?(u=null,a.example!==void 0&&(u=a.items?.xml?.name||u)):u=null;break;default:a.type==="array"&&Array.isArray(c)&&(c={[u]:[...c]});break}return s&&l!=="text"&&l!=="cdata"&&l!=="none"&&(typeof c=="object"?c[`$xmlns${o?":"+o:""}`]=s:c={[`$xmlns${o?":"+o:""}`]:s,"#text":c}),{propertyName:u,value:c}}function Jn(e){var a=0;if(e.length==0)return a;for(var r=0;r<e.length;r++){var t=e.charCodeAt(r);a=(a<<5)-a+t,a=a&a}return a}function $n(e,a,r,t){return function(){e|=0,a|=0,r|=0,t|=0;var n=e-(a<<27|a>>>5)|0;return e=a^(r<<17|r>>>15),a=r+t|0,r=t+n|0,t=e+n|0,(t>>>0)/4294967296}}function zn(e,a,r,t,n){let i=he(e,r,t);const o=[];for(let s of a){const{type:l,readOnly:u,writeOnly:c,value:d}=he({type:i.type,...s},r,t,{...n,isAllOfChild:!0});i.type&&l&&l!==i.type&&(console.warn("allOf: schemas with different types can't be merged"),i.type=l),i.type=i.type||l,i.readOnly=i.readOnly||u,i.writeOnly=i.writeOnly||c,d!=null&&o.push(d)}if(i.type==="object"){i.value=na(i.value||{},...o.filter(s=>typeof s=="object"));for(const s in i.value)i.value[s]===Ma&&delete i.value[s];return i}else{i.type==="array"&&(r.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const s=o[o.length-1];return i.value=s??i.value,i}}const Oa={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function Ue(e){if(e.type!==void 0)return Array.isArray(e.type)?e.type.length===0?null:e.type[0]:e.type;const a=Object.keys(Oa);for(var r=0;r<a.length;r++){let t=a[r],n=Oa[t];if(e[t]!==void 0)return n}return null}let aa={},ce=[];function jn(){aa={},ce=[]}function Or(e){let a;return e.const!==void 0?a=e.const:e.examples!==void 0&&e.examples.length?a=e.examples[0]:e.enum!==void 0&&e.enum.length?a=e.enum[0]:e.default!==void 0&&(a=e.default),a}function Ka(e){const a=Or(e);if(a!==void 0)return{value:a,readOnly:e.readOnly,writeOnly:e.writeOnly,type:null}}function he(e,a,r,t){if(t){if(ce.includes(e))return ca(Ue(e));ce.push(e)}if(t&&t.depth>a.maxSampleDepth)return ke(ce,t),ca(Ue(e));if(e.$ref){if(!r)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(e.$ref);s.startsWith("#")&&(s=s.substring(1));const l=f.JsonPointerLib.get(r,s);let u;if(aa[s]!==!0){aa[s]=!0;const c=he(l,a,r,t);if(a.format==="xml"){const d=s.split("/").pop(),h={...t,propertyName:t?.propertyName||d},{propertyName:p,value:b}=ta(c,l,h);u={...c,value:{[p||"root"]:b}}}else u=c;aa[s]=!1}else{const c=Ue(l);u=ca(c)}return ke(ce,t),u}if(e.example!==void 0)return ke(ce,t),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(e.allOf!==void 0)return ke(ce,t),Ka(e)||zn({...e,allOf:void 0},e.allOf,a,r,t);if(e.oneOf&&e.oneOf.length){e.anyOf&&(a.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),ke(ce,t);const s=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]);return o(e,s)}if(e.anyOf&&e.anyOf.length){ke(ce,t);const s=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]);return o(e,s)}if(e.if&&e.then){ke(ce,t);const{if:s,then:l,...u}=e;return he(na(u,s,l),a,r,t)}let n=Or(e),i=null;if(n===void 0){n=null,i=e.type,Array.isArray(i)&&e.type.length>0&&(i=e.type[0]),i||(i=Ue(e));let s=$r[i];s&&(n=s(e,a,r,t))}return ke(ce,t),{value:n,readOnly:e.readOnly,writeOnly:e.writeOnly,type:i};function o(s,l){const u=Ka(s);if(u!==void 0)return u;const c=he({...s,oneOf:void 0,anyOf:void 0},a,r,t),d=he(l,a,r,t);if(typeof c.value=="object"&&typeof d.value=="object"){const h=na(c.value,d.value);return{...d,value:h}}return d}}function Vn(e,a={},r,t){const n=t&&t.depth||1;let i=Math.min(e.maxItems!=null?e.maxItems:1/0,e.minItems||1);const o=e.prefixItems||e.items||e.contains;Array.isArray(o)&&(i=Math.max(i,o.length));let s=u=>Array.isArray(o)?o[u]||{}:o||{},l=[];if(!o)return l;for(let u=0;u<i;u++){let c=s(u),{value:d}=he(c,a,r,{depth:n+1});if(a?.format==="xml"){const{value:h,propertyName:p}=ta({value:d},c,t);p?(l?.[p]||(l={...l,[p]:[]}),l[p].push(h)):l={...l,...h}}else l.push(d)}if(a?.format==="xml"&&n===1){const{value:u,propertyName:c}=ta({value:null},e,t);c&&(u?l=Array.isArray(l)?{[c]:{...u,...l.map(d=>({"#text":{...d}}))}}:{[c]:{...l,...u}}:l={[c]:l})}return l}function Un(e){return!0}function Kr(e){let a=0;if(e.type==="number"&&(e.format==="float"||e.format==="double")&&(a=.1),typeof e.exclusiveMinimum=="boolean"||typeof e.exclusiveMaximum=="boolean"){if(Number.isFinite(e.maximum)&&Number.isFinite(e.minimum))return a=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&a>=e.maximum||!e.exclusiveMaximum&&a>e.maximum)&&(a=(e.maximum+e.minimum)/2),a;if(Number.isFinite(e.minimum))return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(Number.isFinite(e.maximum))return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(Number.isFinite(e.minimum))return e.minimum;Number.isFinite(e.exclusiveMinimum)?(a=Math.floor(e.exclusiveMinimum)+1,a===e.exclusiveMaximum&&(a=(a+Math.floor(e.exclusiveMaximum)-1)/2)):Number.isFinite(e.exclusiveMaximum)?a=Math.floor(e.exclusiveMaximum)-1:Number.isFinite(e.maximum)&&(a=e.maximum)}return a}function Yn(e,a={},r,t){let n={};const i=t&&t.depth||1;if(e&&typeof e.properties=="object"){const o=Array.isArray(e.required)?e.required:[],s={};for(const l of o)s[l]=!0;Object.keys(e.properties).forEach(l=>{if(a.skipNonRequired&&!s.hasOwnProperty(l))return;const u=he(e.properties[l],a,r,{propertyName:l,depth:i+1});if(a.skipReadOnly&&u.readOnly){t?.isAllOfChild&&(n[l]=Ma);return}if(a.skipWriteOnly&&u.writeOnly){t?.isAllOfChild&&(n[l]=Ma);return}if(a?.format==="xml"){const{propertyName:c,value:d}=ta(u,e.properties[l],{propertyName:l});c?n[c]=d:d!==null&&typeof d=="object"&&(n={...n,...d})}else n[l]=u.value})}if(e&&typeof e.additionalProperties=="object"){const o=e.additionalProperties["x-additionalPropertiesName"]||"property";n[`${String(o)}1`]=he(e.additionalProperties,a,r,{depth:i+1}).value,n[`${String(o)}2`]=he(e.additionalProperties,a,r,{depth:i+1}).value}if(e&&typeof e.properties=="object"&&e.maxProperties!==void 0&&Object.keys(n).length>e.maxProperties){const o={};let s=0;(Array.isArray(e.required)?e.required:[]).forEach(u=>{n[u]!==void 0&&(o[u]=n[u],s++)}),Object.keys(n).forEach(u=>{s<e.maxProperties&&!o.hasOwnProperty(u)&&(o[u]=n[u],s++)}),n=o}return n}function ze(e,a){return e}function Ja(e,a,r){let t=1;if(e)switch(e){case"?":{t=0;break}case"*":{t=ze(0);break}case"+":{t=ze(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else a!=null&&r!=null?t=ze(parseInt(a)):a!=null&&r==null&&(t=parseInt(a));return t}function _n(e){let a=!1;e instanceof RegExp&&(a=e.flags.includes("i"),e=e.toString(),e=e.match(/\/(.+?)\//)?.[1]??""),e=e.replace(/^(\^)?(.*?)(\$)?$/,"$2");let r,t,n;const i=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=e.match(i);for(;o!=null;){const d=o[2],h=o[3],p=o[4];n=Ja(p,d,h),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(i)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,l=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=e.match(l);o!=null;){const d=o[1]==="^",h=o[2]==="-",p=o[4],b=o[5],w=o[6],A=[];let P=o[3],S=P.match(s);for(h&&A.push(45);S!=null;){if(S[0].indexOf("-")===-1)a&&isNaN(Number(S[0]))?(A.push(S[0].toUpperCase().charCodeAt(0)),A.push(S[0].toLowerCase().charCodeAt(0))):A.push(S[0].charCodeAt(0));else{const y=S[0].split("-").map(m=>m.charCodeAt(0));if(r=y[0],t=y[1],r>t)throw new Error("Character range provided is out of order.");for(let m=r;m<=t;m++)if(a&&isNaN(Number(String.fromCharCode(m)))){const k=String.fromCharCode(m);A.push(k.toUpperCase().charCodeAt(0)),A.push(k.toLowerCase().charCodeAt(0))}else A.push(m)}P=P.substring(S[0].length),S=P.match(s)}if(n=Ja(w,p,b),d){let y=-1;for(let m=48;m<=57;m++){if(y=A.indexOf(m),y>-1){A.splice(y,1);continue}A.push(m)}for(let m=65;m<=90;m++){if(y=A.indexOf(m),y>-1){A.splice(y,1);continue}A.push(m)}for(let m=97;m<=122;m++){if(y=A.indexOf(m),y>-1){A.splice(y,1);continue}A.push(m)}}const E=Array.from({length:n},()=>String.fromCharCode(A[ze(0)])).join("");e=e.slice(0,o.index)+E+e.slice(o.index+o[0].length),o=e.match(l)}const u=/(.)\{(\d+)\,(\d+)\}/;for(o=e.match(u);o!=null;){if(r=parseInt(o[2]),t=parseInt(o[3]),r>t)throw new Error("Numbers out of order in {} quantifier.");n=ze(r),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(u)}const c=/(.)\{(\d+)\}/;for(o=e.match(c);o!=null;)n=parseInt(o[2]),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(c);return e}const qn="qwerty!@#$%^123456";function Zn(){return"user@example.com"}function Xn(){return"пошта@укр.нет"}function Qn(e,a){let r="pa$$word";return e>r.length&&(r+="_",r+=Fr(qn,e-r.length).substring(0,e-r.length)),r}function Wa({min:e,max:a,omitTime:r,omitDate:t}){let n=In(new Date("2019-08-24T14:15:22.123Z"),r,t);return n.length<e&&console.warn(`Using minLength = ${e} is incorrect with format "date-time"`),a&&n.length>a&&console.warn(`Using maxLength = ${a} is incorrect with format "date-time"`),n}function et(e,a){return Wa({min:e,max:a,omitTime:!1,omitDate:!1})}function at(e,a){return Wa({min:e,max:a,omitTime:!0,omitDate:!1})}function rt(e,a){return Wa({min:e,max:a,omitTime:!1,omitDate:!0}).slice(1)}function Jr(e,a,r,t,n=!1){if(t&&n)return _n(t);let i=Fr("string",e);return a&&i.length>a&&(i=i.substring(0,a)),i}function nt(){return"192.168.0.1"}function tt(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function it(){return"example.com"}function ot(){return"приклад.укр"}function st(){return"http://example.com"}function lt(){return"../dictionary"}function ut(){return"http://example.com/{endpoint}"}function ct(){return"http://example.com/entity/1"}function dt(){return"/entity/1"}function ht(e,a,r){return Fn(r||"id")}function mt(){return"/json/pointer"}function pt(){return"1/relative/json/pointer"}function ft(){return"/regex/"}const yt={email:Zn,"idn-email":Xn,password:Qn,"date-time":et,date:at,time:rt,ipv4:nt,ipv6:tt,hostname:it,"idn-hostname":ot,iri:ct,"iri-reference":dt,uri:st,"uri-reference":lt,"uri-template":ut,uuid:ht,default:Jr,"json-pointer":mt,"relative-json-pointer":pt,regex:ft};function gt(e,a,r,t){let n=e.format||"default",i=yt[n]||Jr,o=t&&t.propertyName;return i(e.minLength||0,e.maxLength,o,e.pattern,a?.enablePatterns)}var $r={};const bt={skipReadOnly:!1,maxSampleDepth:15};function kt(e,a){if(!e)throw new Error("Unknown format output for building XML.");return(Array.isArray(e)||Object.keys(e).length>1)&&(e={[a?.xml?.name||"root"]:e}),new f.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(e)}function Ct(e,a,r){let t=Object.assign({},bt,a);jn();let n=he(e,t,r).value;return t?.format==="xml"?kt(n,e):n}function De(e,a){$r[e]=a}De("array",Vn);De("boolean",Un);De("integer",Kr);De("number",Kr);De("object",Yn);De("string",gt);function zr(e,a){if(e)try{return Ct(e,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(r){a.error(f.bgRed(" Error while generating test data from JSON Schema ")+`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./replay-index-DGVKGau4.js"),$e=require("./replay-resolve-27HxVuKM.js"),de=require("./replay-lint-7C6uDSRh.js");function Rn(e){return f.isPlainObject(e)&&"name"in e&&"value"in e&&!("in"in e)}function xa(e){return f.isPlainObject(e)&&"in"in e&&typeof e.in=="string"&&["header","query","path","cookie"].includes(e.in)}const Pn=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Hr(e){return e.startsWith("$file(")&&e.endsWith(")")?e.substring(7,e.length-2):e}const Fa=async(e,a,r,t,n)=>{const i=f.pathBrowserifyExports.dirname(t),o=f.pathBrowserifyExports.resolve(i,Hr(r));e.append(a,await n.options.requestFileLoader.getFileBody(o))},xr=(e,a,r,t,n,i)=>{Object.entries(r).forEach(([o,s])=>{const l=i?`${i}[${o}]`:o;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?e.push(Fa(a,l,s,t,n)):Array.isArray(s)?s.forEach(u=>{typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")?e.push(Fa(a,l,u,t,n)):a.append(l,u.toString())}):f.isPlainObject(s)?xr(e,a,s,t,n,l):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&a.append(l,s.toString())})},Ln=async(e,a,r,t)=>{if(f.isPlainObject(e)){const n=[];xr(n,a,e,r,t),await Promise.all(n)}},En=async(e,a)=>{if(typeof e=="string"&&e.startsWith("$file(")&&e.endsWith(")")){const r=f.pathBrowserifyExports.resolve(f.pathBrowserifyExports.dirname(a.options.filePath),Hr(e));return a.options.requestFileLoader.getFileBody(r)}else return e};async function Dn(e,a){if(!e)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:r,contentType:t}=e;if(t==="multipart/form-data"){const n=new FormData,i=f.pathBrowserifyExports.resolve(a.options.filePath);return await Ln(r,n,i,a),{...e,payload:n}}else{if(t==="application/octet-stream"||typeof t=="string"&&Pn.test(t))return{...e,payload:await En(r,a),contentType:"application/octet-stream"};if(t==="application/x-www-form-urlencoded"&&typeof r=="string")return{...e,payload:Object.fromEntries(new URLSearchParams(r).entries()),contentType:"application/x-www-form-urlencoded"}}return e}function Nn({payload:e,replacements:a,expressionContext:r,logger:t}){for(const n of a){const{target:i,value:o}=n;if(typeof i!="string")throw new Error(`Invalid JSON Pointer: ${i}`);try{const s=f.JsonPointerLib.get(e,i),l=f.evaluateRuntimeExpressionPayload({payload:o,context:r,logger:t});s!==void 0&&f.JsonPointerLib.set(e,i,l)}catch{throw new Error(`Invalid JSON Pointer: ${i}`)}}}const Hn=["parameters","failureActions","successActions"];function xn(e,a){const{reference:r,value:t}=e;if(!Hn.some(i=>r.includes(`$components.${i}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const n=f.getValueFromContext({value:r,ctx:a,logger:a.options.logger});return f.isPlainObject(n)&&"value"in n&&t?{...n,value:t}:n}function Ke(e,a){return"reference"in e?xn(e,a):e}const V={SUCCESS_CRITERIA_CHECK:"success criteria check",STATUS_CODE_CHECK:"status code check",SCHEMA_CHECK:"schema check",CONTENT_TYPE_CHECK:"content-type check",GLOBAL_TIMEOUT_ERROR:"global timeout error",MAX_STEPS_REACHED_ERROR:"maximum steps reached",NETWORK_ERROR:"failed network request",UNEXPECTED_ERROR:"unexpected error"};class Wr extends Error{}class Gr extends Wr{}class Ir extends Wr{}async function Wn(e){const{descriptionPath:a,externalRefResolver:r,base:t}=e,n=await de.bundle({base:t,ref:a,config:e.config,dereference:!0,externalRefResolver:r});if(!n)throw new Error(`Could not find source description file '${a}'.`);return n.bundle.parsed}const Gn={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},Ma=Symbol("skip");function We(e){return e<10?"0"+e:e}function In(e,a,r,t){var n=r?"":e.getUTCFullYear()+"-"+We(e.getUTCMonth()+1)+"-"+We(e.getUTCDate());return a||(n+="T"+We(e.getUTCHours())+":"+We(e.getUTCMinutes())+":"+We(e.getUTCSeconds())+"Z"),n}function Fr(e,a){return a>e.length?e.repeat(Math.trunc(a/e.length)+1).substring(0,a):e}function na(...e){const a=r=>r&&typeof r=="object";return e.reduce((r,t)=>(Object.keys(t||{}).forEach(n=>{const i=r[n],o=t[n];a(i)&&a(o)?r[n]=na(i,o):r[n]=o}),r),Array.isArray(e[e.length-1])?[]:{})}function Fn(e){var a=Jn(e),r=$n(a,a,a,a),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{var i=r()*16%16|0;return(n=="x"?i:i&3|8).toString(16)});return t}function ca(e){return{value:e==="object"?{}:e==="array"?[]:void 0}}function ke(e,a){a&&e.pop()}function On(e){return{name:e?.xml?.name||"",prefix:e?.xml?.prefix||"",namespace:e?.xml?.namespace||null,attribute:e?.xml?.attribute??!1,wrapped:e?.xml?.wrapped??!1}}function Kn(e){const a=e?.xml;return a?.nodeType?a.nodeType:a?.attribute===!0?"attribute":a?.wrapped===!0&&e?.type==="array"?"element":e?.$ref||e?.$dynamicRef||e?.type==="array"||e?.oneOf||e?.anyOf||e?.allOf?"none":"element"}function ta(e,a={},r={}){const{value:t}=e,{propertyName:n}=r,{name:i,prefix:o,namespace:s}=On(a),l=Kn(a);let u=i||n?`${o?o+":":""}${i||n}`:null,c=typeof t=="object"?Array.isArray(t)?[...t]:{...t}:t;switch(l){case"attribute":u&&(u=`$${u}`);break;case"text":u="#text";break;case"cdata":u="#cdata";break;case"none":a.type==="array"?(u=null,a.example!==void 0&&(u=a.items?.xml?.name||u)):u=null;break;default:a.type==="array"&&Array.isArray(c)&&(c={[u]:[...c]});break}return s&&l!=="text"&&l!=="cdata"&&l!=="none"&&(typeof c=="object"?c[`$xmlns${o?":"+o:""}`]=s:c={[`$xmlns${o?":"+o:""}`]:s,"#text":c}),{propertyName:u,value:c}}function Jn(e){var a=0;if(e.length==0)return a;for(var r=0;r<e.length;r++){var t=e.charCodeAt(r);a=(a<<5)-a+t,a=a&a}return a}function $n(e,a,r,t){return function(){e|=0,a|=0,r|=0,t|=0;var n=e-(a<<27|a>>>5)|0;return e=a^(r<<17|r>>>15),a=r+t|0,r=t+n|0,t=e+n|0,(t>>>0)/4294967296}}function zn(e,a,r,t,n){let i=he(e,r,t);const o=[];for(let s of a){const{type:l,readOnly:u,writeOnly:c,value:d}=he({type:i.type,...s},r,t,{...n,isAllOfChild:!0});i.type&&l&&l!==i.type&&(console.warn("allOf: schemas with different types can't be merged"),i.type=l),i.type=i.type||l,i.readOnly=i.readOnly||u,i.writeOnly=i.writeOnly||c,d!=null&&o.push(d)}if(i.type==="object"){i.value=na(i.value||{},...o.filter(s=>typeof s=="object"));for(const s in i.value)i.value[s]===Ma&&delete i.value[s];return i}else{i.type==="array"&&(r.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const s=o[o.length-1];return i.value=s??i.value,i}}const Oa={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function Ue(e){if(e.type!==void 0)return Array.isArray(e.type)?e.type.length===0?null:e.type[0]:e.type;const a=Object.keys(Oa);for(var r=0;r<a.length;r++){let t=a[r],n=Oa[t];if(e[t]!==void 0)return n}return null}let aa={},ce=[];function jn(){aa={},ce=[]}function Or(e){let a;return e.const!==void 0?a=e.const:e.examples!==void 0&&e.examples.length?a=e.examples[0]:e.enum!==void 0&&e.enum.length?a=e.enum[0]:e.default!==void 0&&(a=e.default),a}function Ka(e){const a=Or(e);if(a!==void 0)return{value:a,readOnly:e.readOnly,writeOnly:e.writeOnly,type:null}}function he(e,a,r,t){if(t){if(ce.includes(e))return ca(Ue(e));ce.push(e)}if(t&&t.depth>a.maxSampleDepth)return ke(ce,t),ca(Ue(e));if(e.$ref){if(!r)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(e.$ref);s.startsWith("#")&&(s=s.substring(1));const l=f.JsonPointerLib.get(r,s);let u;if(aa[s]!==!0){aa[s]=!0;const c=he(l,a,r,t);if(a.format==="xml"){const d=s.split("/").pop(),h={...t,propertyName:t?.propertyName||d},{propertyName:p,value:b}=ta(c,l,h);u={...c,value:{[p||"root"]:b}}}else u=c;aa[s]=!1}else{const c=Ue(l);u=ca(c)}return ke(ce,t),u}if(e.example!==void 0)return ke(ce,t),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(e.allOf!==void 0)return ke(ce,t),Ka(e)||zn({...e,allOf:void 0},e.allOf,a,r,t);if(e.oneOf&&e.oneOf.length){e.anyOf&&(a.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),ke(ce,t);const s=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]);return o(e,s)}if(e.anyOf&&e.anyOf.length){ke(ce,t);const s=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]);return o(e,s)}if(e.if&&e.then){ke(ce,t);const{if:s,then:l,...u}=e;return he(na(u,s,l),a,r,t)}let n=Or(e),i=null;if(n===void 0){n=null,i=e.type,Array.isArray(i)&&e.type.length>0&&(i=e.type[0]),i||(i=Ue(e));let s=$r[i];s&&(n=s(e,a,r,t))}return ke(ce,t),{value:n,readOnly:e.readOnly,writeOnly:e.writeOnly,type:i};function o(s,l){const u=Ka(s);if(u!==void 0)return u;const c=he({...s,oneOf:void 0,anyOf:void 0},a,r,t),d=he(l,a,r,t);if(typeof c.value=="object"&&typeof d.value=="object"){const h=na(c.value,d.value);return{...d,value:h}}return d}}function Vn(e,a={},r,t){const n=t&&t.depth||1;let i=Math.min(e.maxItems!=null?e.maxItems:1/0,e.minItems||1);const o=e.prefixItems||e.items||e.contains;Array.isArray(o)&&(i=Math.max(i,o.length));let s=u=>Array.isArray(o)?o[u]||{}:o||{},l=[];if(!o)return l;for(let u=0;u<i;u++){let c=s(u),{value:d}=he(c,a,r,{depth:n+1});if(a?.format==="xml"){const{value:h,propertyName:p}=ta({value:d},c,t);p?(l?.[p]||(l={...l,[p]:[]}),l[p].push(h)):l={...l,...h}}else l.push(d)}if(a?.format==="xml"&&n===1){const{value:u,propertyName:c}=ta({value:null},e,t);c&&(u?l=Array.isArray(l)?{[c]:{...u,...l.map(d=>({"#text":{...d}}))}}:{[c]:{...l,...u}}:l={[c]:l})}return l}function Un(e){return!0}function Kr(e){let a=0;if(e.type==="number"&&(e.format==="float"||e.format==="double")&&(a=.1),typeof e.exclusiveMinimum=="boolean"||typeof e.exclusiveMaximum=="boolean"){if(Number.isFinite(e.maximum)&&Number.isFinite(e.minimum))return a=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&a>=e.maximum||!e.exclusiveMaximum&&a>e.maximum)&&(a=(e.maximum+e.minimum)/2),a;if(Number.isFinite(e.minimum))return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(Number.isFinite(e.maximum))return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(Number.isFinite(e.minimum))return e.minimum;Number.isFinite(e.exclusiveMinimum)?(a=Math.floor(e.exclusiveMinimum)+1,a===e.exclusiveMaximum&&(a=(a+Math.floor(e.exclusiveMaximum)-1)/2)):Number.isFinite(e.exclusiveMaximum)?a=Math.floor(e.exclusiveMaximum)-1:Number.isFinite(e.maximum)&&(a=e.maximum)}return a}function Yn(e,a={},r,t){let n={};const i=t&&t.depth||1;if(e&&typeof e.properties=="object"){const o=Array.isArray(e.required)?e.required:[],s={};for(const l of o)s[l]=!0;Object.keys(e.properties).forEach(l=>{if(a.skipNonRequired&&!s.hasOwnProperty(l))return;const u=he(e.properties[l],a,r,{propertyName:l,depth:i+1});if(a.skipReadOnly&&u.readOnly){t?.isAllOfChild&&(n[l]=Ma);return}if(a.skipWriteOnly&&u.writeOnly){t?.isAllOfChild&&(n[l]=Ma);return}if(a?.format==="xml"){const{propertyName:c,value:d}=ta(u,e.properties[l],{propertyName:l});c?n[c]=d:d!==null&&typeof d=="object"&&(n={...n,...d})}else n[l]=u.value})}if(e&&typeof e.additionalProperties=="object"){const o=e.additionalProperties["x-additionalPropertiesName"]||"property";n[`${String(o)}1`]=he(e.additionalProperties,a,r,{depth:i+1}).value,n[`${String(o)}2`]=he(e.additionalProperties,a,r,{depth:i+1}).value}if(e&&typeof e.properties=="object"&&e.maxProperties!==void 0&&Object.keys(n).length>e.maxProperties){const o={};let s=0;(Array.isArray(e.required)?e.required:[]).forEach(u=>{n[u]!==void 0&&(o[u]=n[u],s++)}),Object.keys(n).forEach(u=>{s<e.maxProperties&&!o.hasOwnProperty(u)&&(o[u]=n[u],s++)}),n=o}return n}function ze(e,a){return e}function Ja(e,a,r){let t=1;if(e)switch(e){case"?":{t=0;break}case"*":{t=ze(0);break}case"+":{t=ze(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else a!=null&&r!=null?t=ze(parseInt(a)):a!=null&&r==null&&(t=parseInt(a));return t}function _n(e){let a=!1;e instanceof RegExp&&(a=e.flags.includes("i"),e=e.toString(),e=e.match(/\/(.+?)\//)?.[1]??""),e=e.replace(/^(\^)?(.*?)(\$)?$/,"$2");let r,t,n;const i=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=e.match(i);for(;o!=null;){const d=o[2],h=o[3],p=o[4];n=Ja(p,d,h),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(i)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,l=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=e.match(l);o!=null;){const d=o[1]==="^",h=o[2]==="-",p=o[4],b=o[5],w=o[6],A=[];let P=o[3],S=P.match(s);for(h&&A.push(45);S!=null;){if(S[0].indexOf("-")===-1)a&&isNaN(Number(S[0]))?(A.push(S[0].toUpperCase().charCodeAt(0)),A.push(S[0].toLowerCase().charCodeAt(0))):A.push(S[0].charCodeAt(0));else{const y=S[0].split("-").map(m=>m.charCodeAt(0));if(r=y[0],t=y[1],r>t)throw new Error("Character range provided is out of order.");for(let m=r;m<=t;m++)if(a&&isNaN(Number(String.fromCharCode(m)))){const k=String.fromCharCode(m);A.push(k.toUpperCase().charCodeAt(0)),A.push(k.toLowerCase().charCodeAt(0))}else A.push(m)}P=P.substring(S[0].length),S=P.match(s)}if(n=Ja(w,p,b),d){let y=-1;for(let m=48;m<=57;m++){if(y=A.indexOf(m),y>-1){A.splice(y,1);continue}A.push(m)}for(let m=65;m<=90;m++){if(y=A.indexOf(m),y>-1){A.splice(y,1);continue}A.push(m)}for(let m=97;m<=122;m++){if(y=A.indexOf(m),y>-1){A.splice(y,1);continue}A.push(m)}}const E=Array.from({length:n},()=>String.fromCharCode(A[ze(0)])).join("");e=e.slice(0,o.index)+E+e.slice(o.index+o[0].length),o=e.match(l)}const u=/(.)\{(\d+)\,(\d+)\}/;for(o=e.match(u);o!=null;){if(r=parseInt(o[2]),t=parseInt(o[3]),r>t)throw new Error("Numbers out of order in {} quantifier.");n=ze(r),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(u)}const c=/(.)\{(\d+)\}/;for(o=e.match(c);o!=null;)n=parseInt(o[2]),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(c);return e}const qn="qwerty!@#$%^123456";function Zn(){return"user@example.com"}function Xn(){return"пошта@укр.нет"}function Qn(e,a){let r="pa$$word";return e>r.length&&(r+="_",r+=Fr(qn,e-r.length).substring(0,e-r.length)),r}function Wa({min:e,max:a,omitTime:r,omitDate:t}){let n=In(new Date("2019-08-24T14:15:22.123Z"),r,t);return n.length<e&&console.warn(`Using minLength = ${e} is incorrect with format "date-time"`),a&&n.length>a&&console.warn(`Using maxLength = ${a} is incorrect with format "date-time"`),n}function et(e,a){return Wa({min:e,max:a,omitTime:!1,omitDate:!1})}function at(e,a){return Wa({min:e,max:a,omitTime:!0,omitDate:!1})}function rt(e,a){return Wa({min:e,max:a,omitTime:!1,omitDate:!0}).slice(1)}function Jr(e,a,r,t,n=!1){if(t&&n)return _n(t);let i=Fr("string",e);return a&&i.length>a&&(i=i.substring(0,a)),i}function nt(){return"192.168.0.1"}function tt(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function it(){return"example.com"}function ot(){return"приклад.укр"}function st(){return"http://example.com"}function lt(){return"../dictionary"}function ut(){return"http://example.com/{endpoint}"}function ct(){return"http://example.com/entity/1"}function dt(){return"/entity/1"}function ht(e,a,r){return Fn(r||"id")}function mt(){return"/json/pointer"}function pt(){return"1/relative/json/pointer"}function ft(){return"/regex/"}const yt={email:Zn,"idn-email":Xn,password:Qn,"date-time":et,date:at,time:rt,ipv4:nt,ipv6:tt,hostname:it,"idn-hostname":ot,iri:ct,"iri-reference":dt,uri:st,"uri-reference":lt,"uri-template":ut,uuid:ht,default:Jr,"json-pointer":mt,"relative-json-pointer":pt,regex:ft};function gt(e,a,r,t){let n=e.format||"default",i=yt[n]||Jr,o=t&&t.propertyName;return i(e.minLength||0,e.maxLength,o,e.pattern,a?.enablePatterns)}var $r={};const bt={skipReadOnly:!1,maxSampleDepth:15};function kt(e,a){if(!e)throw new Error("Unknown format output for building XML.");return(Array.isArray(e)||Object.keys(e).length>1)&&(e={[a?.xml?.name||"root"]:e}),new f.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(e)}function Ct(e,a,r){let t=Object.assign({},bt,a);jn();let n=he(e,t,r).value;return t?.format==="xml"?kt(n,e):n}function De(e,a){$r[e]=a}De("array",Vn);De("boolean",Un);De("integer",Kr);De("number",Kr);De("object",Yn);De("string",gt);function zr(e,a){if(e)try{return Ct(e,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(r){a.error(f.bgRed(" Error while generating test data from JSON Schema ")+`
2
2
  `+r);return}}function St(e,a){if(e?.example)return e.example;if(f.isPlainObject(e?.examples))return jr(e.examples);if(e?.schema)return zr(e.schema,a)}function jr(e){if(f.isPlainObject(e)){const a=Object.keys(e)[0];return a?e[a]?.value:void 0}else return}function vt(e,a){const r=e?.requestBody?.content||{},[t,n]=Object.entries(r)[0]||[],i=n?.example||jr(n?.examples)||zr(n?.schema,a),o=wt(e);return{parameters:At([...$a(e.pathParameters,a),...$a(e.parameters,a)]).filter(({value:l})=>l),contentTypeParameters:[...t?[{name:"content-type",in:"header",value:t}]:[],...o?[{name:"accept",in:"header",value:o}]:[]],requestBody:i,contentType:t}}function wt(e){return e?.responses?Array.from(new Set(Object.values(e.responses).flatMap(a=>f.isPlainObject(a)&&"content"in a?Object.keys(a.content||{}):[]))).join(", "):void 0}function $a(e,a){return(e||[]).filter(r=>r?.required===!0).map(r=>{if(xa(r))return{name:r.name,in:r.in,value:St(r,a),...r.allowReserved&&{allowReserved:r.allowReserved}}}).filter(r=>r!==void 0)}function At(e){const a={};for(const r of e)xa(r)&&(a[(r.name+":"+r.in).toLowerCase()]=r);return Object.values(a)}function Tt(e,a){const{$sourceDescriptions:r,sourceDescriptions:t}=a;let n,i;if(e.includes("$sourceDescriptions.")){const[,c,d]=e.split(".");n=c,i=d}else e.includes(".")?[n,i]=e.split("."):(i=e,n=Mt(i,r,t));const o=Object.keys(r);if(!r[n])throw new Error(`Unknown description name ${f.red(n)} at ${f.red(e)}. Available descriptions: ${o.join(", ")}.`);const s=r[n],l=s?.components?.securitySchemes,u=s.servers;for(const[c,d]of Object.entries(r[n].paths)){if(!d)return;for(const[h,p]of Object.entries(d))if(p.operationId===i)return{servers:d.servers||u,...p,pathParameters:p.parameters||[],path:c,method:h,descriptionName:n,securitySchemes:l}}throw new Error(`Unknown operationId ${f.red(i)} at ${f.red(e)}.`)}function Mt(e,a,r=[]){const t=r.filter(({type:n,name:i})=>n==="openapi"&&Object.values(a[i]?.paths||{}).some(o=>Object.values(o||{}).some(s=>s?.operationId===e))).map(({name:n})=>n);if(t.length===0)throw new Error(`Unknown operationId ${f.red(e)}. No openapi source description defines it.`);if(t.length>1)throw new Error(`The operationId ${f.red(e)} is defined in several source descriptions: ${t.join(", ")}. Use ${f.red(`$sourceDescriptions.<name>.${e}`)} to pick one.`);return t[0]}function Bt(e,a){const{$sourceDescriptions:r,sourceDescriptions:t}=a,[n,i]=e.split("#");if(!t)throw new Error("Missing described sourceDescriptions");const o=t.find(w=>{if(["openapi","arazzo"].includes(w.type)){if(n.includes("$sourceDescriptions.")){const[,A]=n.split(".");return w.name===A}return"url"in w&&w.url===n}return!1})?.name;if(!o)throw new Error(`Unknown operationPath ${f.red(e)}. API description ${f.red(n)} is not listed in 'sourceDescriptions' workflow section.`);const s=r[o]||{},l=s?.components?.securitySchemes,[u,c,d]=f.JsonPointerLib.parse(i);if(u!=="paths")throw new Error(`Invalid fragment identifier: ${i} at operationPath ${f.red(e)}.`);const{servers:h}=s,p=f.JsonPointerLib.get(s,i)||{},b=f.JsonPointerLib.get(s,f.JsonPointerLib.compile(["paths",c]))||{};return{servers:b.servers||h,...p,pathParameters:b.parameters||[],path:c,method:d,descriptionName:o,securitySchemes:l}}function Rt(e,a){if(!e.operationId&&!e.operationPath)return;const{$sourceDescriptions:r,sourceDescriptions:t}=a,{operationId:n,operationPath:i}=e;return n?Tt(n,{$sourceDescriptions:r,sourceDescriptions:t}):i?Bt(i,{$sourceDescriptions:r,sourceDescriptions:t}):void 0}function Pt({statusCode:e,contentType:a,descriptionResponses:r}){return r?(r[e]||r.default)?.content?.[a]?.schema:void 0}function Lt(e,a){if(!a)return;const t=a.requestBody?.content;return t&&t[e]?.schema||void 0}function Vr({ctx:e,security:a,operation:r}){const{scheme:t,schemeName:n}=a;if(t)return a.scheme;if(n){if(typeof n=="string"&&n.startsWith("$sourceDescriptions.")){const[i,o,s]=n.split("."),u=(o&&e.$sourceDescriptions[o])?.components?.securitySchemes;return s&&u?u[s]:void 0}return r?.securitySchemes?.[n]}}var Ye={exports:{}},za;function Et(){return za||(za=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.outdent=void 0;function r(){}function t(){return typeof WeakMap<"u"?new WeakMap:n()}function n(){return{add:r,delete:r,get:r,set:r,has:function(S){return!1}}}var i=Object.prototype.hasOwnProperty,o=function(S,E){return i.call(S,E)};function s(S,E){for(var y in E)o(E,y)&&(S[y]=E[y]);return S}var l=/^[ \t]*(?:\r\n|\r|\n)/,u=/(?:\r\n|\r|\n)[ \t]*$/,c=/^(?:[\r\n]|$)/,d=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,h=/^[ \t]*[\r\n][ \t\r\n]*$/;function p(S,E,y){var m=0,k=S[0].match(d);k&&(m=k[1].length);var M="(\\r\\n|\\r|\\n).{0,"+m+"}",T=new RegExp(M,"g");E&&(S=S.slice(1));var R=y.newline,N=y.trimLeadingNewline,G=y.trimTrailingNewline,x=typeof R=="string",I=S.length,O=S.map(function(U,_){return U=U.replace(T,"$1"),_===0&&N&&(U=U.replace(l,"")),_===I-1&&G&&(U=U.replace(u,"")),x&&(U=U.replace(/\r\n|\n|\r/g,function(q){return R})),U});return O}function b(S,E){for(var y="",m=0,k=S.length;m<k;m++)y+=S[m],m<k-1&&(y+=E[m]);return y}function w(S){return o(S,"raw")&&o(S,"length")}function A(S){var E=t(),y=t();function m(M){for(var T=[],R=1;R<arguments.length;R++)T[R-1]=arguments[R];if(w(M)){var N=M,G=(T[0]===m||T[0]===P)&&h.test(N[0])&&c.test(N[1]),x=G?y:E,I=x.get(N);if(I||(I=p(N,G,S),x.set(N,I)),T.length===0)return I[0];var O=b(I,G?T.slice(1):T);return O}else return A(s(s({},S),M||{}))}var k=s(m,{string:function(M){return p([M],!1,S)[0]}});return k}var P=A({trimLeadingNewline:!0,trimTrailingNewline:!0});a.outdent=P,a.default=P;try{e.exports=P,Object.defineProperty(P,"__esModule",{value:!0}),P.default=P,P.outdent=P}catch{}})(Ye,Ye.exports)),Ye.exports}var Ba=Et();function Dt(e){return!$e.isBrowser&&process.env.NODE_ENV==="test"?"<test>ms":`${Math.ceil(performance.now()-e)}ms`}function sa(e){const a=e.length;let r=0,t=0,n=0,i=0,o=0,s=0,l=0;const u=new Set;let c=0;const d=new Set,h=new Set;for(const p of e){const b=Ur(p.executedSteps);let w=!1;for(const A of b){if(i++,A.retriesLeft&&A.retriesLeft!==0)continue;n++;let P=!1;for(const S of A.checks)if(t++,!S.passed)switch(S.severity){case"warn":o++,u.add(p.workflowId),h.add(p.workflowId+":"+A.stepId);break;case"off":s++,d.add(p.workflowId+":"+A.stepId);break;default:r++,P=!0}P&&(c++,w=!0)}w&&l++}return{workflows:{passed:a-l,failed:l,warnings:u.size,skipped:0,total:a},steps:{passed:n-c,failed:c,warnings:h.size,skipped:d.size,total:n},checks:{passed:t-r,failed:r,warnings:o,skipped:s,total:t},totalRequests:i}}function Ur(e){return e.flatMap(a=>"executedSteps"in a?Ur(a.executedSteps):[a])}function Nt(e){try{return JSON.parse(e),!0}catch{return!1}}function Ht(e,a){const r=e.endsWith("/")?e.slice(0,-1):e,t=a.startsWith("/")?a.slice(1):a;return`${r}/${t}`}const ja=50;function Yr({testNameToDisplay:e,checks:a,verboseLogs:r,verboseResponseLogs:t,logger:n}){const i=a.every(({passed:o})=>o);n.output(` ${i?f.green("✓"):f.red("✗")} ${f.blue(e)}`),r&&(n.output(`${ee}
3
3
  `+(Va({logs:r,logger:n})||"")),n.printNewLine()),t&&(n.output(`${ee}
4
4
  `+(Va({logs:t,type:"response",logger:n})||"")),n.printNewLine()),n.printNewLine();for(const o of a)n.output(`${j(xt(o,o.severity),4)}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-CMFKqCDF.js");async function u(r,n){const t=e.sep(),l=await e.resolve(r),c=await e.resolve(n),a=l.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),i=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),m=Math.min(a.length,i.length);let s=0;for(let o=0;o<m&&a[o]===i[o];o++)s++;const p=a.slice(s).map(()=>".."),f=i.slice(s);return[...p,...f].join(t)}async function g(r){const n=await e.extname(r);return n?`.${n}`:""}exports.dirname=e.dirname;exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.extname=g;exports.relative=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-DGVKGau4.js");async function u(r,n){const t=e.sep(),l=await e.resolve(r),c=await e.resolve(n),a=l.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),i=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),m=Math.min(a.length,i.length);let s=0;for(let o=0;o<m&&a[o]===i[o];o++)s++;const p=a.slice(s).map(()=>".."),f=i.slice(s);return[...p,...f].join(t)}async function g(r){const n=await e.extname(r);return n?`.${n}`:""}exports.dirname=e.dirname;exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.extname=g;exports.relative=u;
@@ -1,5 +1,5 @@
1
- import { k as h, s as x, l as i } from "./replay-index-BHtfLbOG.js";
2
- import { n as j, o as b, j as k } from "./replay-index-BHtfLbOG.js";
1
+ import { k as h, s as x, l as i } from "./replay-index-7c2fdTRw.js";
2
+ import { n as j, o as b, j as k } from "./replay-index-7c2fdTRw.js";
3
3
  async function u(a, e) {
4
4
  const t = x(), l = await i(a), c = await i(e), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), s = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), m = Math.min(o.length, s.length);
5
5
  let r = 0;
@@ -1,4 +1,4 @@
1
- "use strict";const Ce=require("react"),a=require("./replay-index-CMFKqCDF.js"),m=require("./replay-db-DyBtcH0M.js"),r=require("./replay-create-model-B46oXIt0.js"),C=require("./replay-SemanticSearchService-hGPvL8ZA.js"),Oe=require("@tanstack/react-query"),j={path:"pathParameters",query:"queryParameters",header:"headers",cookie:"cookies"},ft={run_request:{approveLabel:"Run",denyLabel:"Skip"},update_step:{approveLabel:"Apply",denyLabel:"Dismiss"},update_security:{approveLabel:"Apply",denyLabel:"Dismiss"}},mt={set_active_environment:{approveLabel:"Switch",denyLabel:"Cancel"},add_environment:{approveLabel:"Add",denyLabel:"Cancel"},upsert_input:{approveLabel:"Set",denyLabel:"Cancel"},upsert_server:{approveLabel:"Set",denyLabel:"Cancel"},remove_input:{approveLabel:"Remove",denyLabel:"Cancel"},remove_server:{approveLabel:"Remove",denyLabel:"Cancel"},create_collection:{approveLabel:"Create",denyLabel:"Cancel"},create_workflow:{approveLabel:"Create",denyLabel:"Cancel"},create_step:{approveLabel:"Create",denyLabel:"Cancel"},move_step:{approveLabel:"Move",denyLabel:"Cancel"},delete_collection:{approveLabel:"Delete",denyLabel:"Cancel"},delete_workflow:{approveLabel:"Delete",denyLabel:"Cancel"},delete_step:{approveLabel:"Delete",denyLabel:"Cancel"},save_tab_to_collection:{approveLabel:"Save",denyLabel:"Cancel"}},ht={CHAT:"chat",HISTORY:"history"},yt="report_status",It="run_workflow",W={WEB_SEARCH:"web_search"};function wt(e){switch(e.provider){case a.AI_PROVIDERS.GEMINI:return{[W.WEB_SEARCH]:r.google.tools.googleSearch({})};case a.AI_PROVIDERS.OPENAI:return{[W.WEB_SEARCH]:r.openai.tools.webSearch({})};case a.AI_PROVIDERS.ANTHROPIC:return{[W.WEB_SEARCH]:r.anthropic.tools.webFetch_20250910()};case a.REUNITE_AI_PROVIDER:return{[W.WEB_SEARCH]:{type:"provider",id:"reunite.web_search",name:"web_search",args:{}}};default:return{}}}const gt=["info","workflows","sourceDescriptions"];function bt(e){const t=[];return e.collectionId&&t.push(`Collection ID: ${e.collectionId}`),e.collection?.info?.title&&t.push(`Title: ${e.collection.info.title}`),e.collection?.info?.summary&&t.push(`Summary: ${e.collection.info.summary}`),e.collection?.info?.description&&t.push(`Description: ${e.collection.info.description}`),m.buildMessageFromArray(t,`
1
+ "use strict";const Ce=require("react"),a=require("./replay-index-DGVKGau4.js"),m=require("./replay-db-KVbyscDg.js"),r=require("./replay-create-model-ByXMw0Mz.js"),C=require("./replay-SemanticSearchService-CVxK2RB-.js"),Oe=require("@tanstack/react-query"),j={path:"pathParameters",query:"queryParameters",header:"headers",cookie:"cookies"},ft={run_request:{approveLabel:"Run",denyLabel:"Skip"},update_step:{approveLabel:"Apply",denyLabel:"Dismiss"},update_security:{approveLabel:"Apply",denyLabel:"Dismiss"}},mt={set_active_environment:{approveLabel:"Switch",denyLabel:"Cancel"},add_environment:{approveLabel:"Add",denyLabel:"Cancel"},upsert_input:{approveLabel:"Set",denyLabel:"Cancel"},upsert_server:{approveLabel:"Set",denyLabel:"Cancel"},remove_input:{approveLabel:"Remove",denyLabel:"Cancel"},remove_server:{approveLabel:"Remove",denyLabel:"Cancel"},create_collection:{approveLabel:"Create",denyLabel:"Cancel"},create_workflow:{approveLabel:"Create",denyLabel:"Cancel"},create_step:{approveLabel:"Create",denyLabel:"Cancel"},move_step:{approveLabel:"Move",denyLabel:"Cancel"},delete_collection:{approveLabel:"Delete",denyLabel:"Cancel"},delete_workflow:{approveLabel:"Delete",denyLabel:"Cancel"},delete_step:{approveLabel:"Delete",denyLabel:"Cancel"},save_tab_to_collection:{approveLabel:"Save",denyLabel:"Cancel"}},ht={CHAT:"chat",HISTORY:"history"},yt="report_status",It="run_workflow",W={WEB_SEARCH:"web_search"};function wt(e){switch(e.provider){case a.AI_PROVIDERS.GEMINI:return{[W.WEB_SEARCH]:r.google.tools.googleSearch({})};case a.AI_PROVIDERS.OPENAI:return{[W.WEB_SEARCH]:r.openai.tools.webSearch({})};case a.AI_PROVIDERS.ANTHROPIC:return{[W.WEB_SEARCH]:r.anthropic.tools.webFetch_20250910()};case a.REUNITE_AI_PROVIDER:return{[W.WEB_SEARCH]:{type:"provider",id:"reunite.web_search",name:"web_search",args:{}}};default:return{}}}const gt=["info","workflows","sourceDescriptions"];function bt(e){const t=[];return e.collectionId&&t.push(`Collection ID: ${e.collectionId}`),e.collection?.info?.title&&t.push(`Title: ${e.collection.info.title}`),e.collection?.info?.summary&&t.push(`Summary: ${e.collection.info.summary}`),e.collection?.info?.description&&t.push(`Description: ${e.collection.info.description}`),m.buildMessageFromArray(t,`
2
2
  `)}function vt(e){const t=[];if(e.collection?.workflows?.length){t.push("Workflows:");for(const o of e.collection.workflows)t.push(` workflowId=${o.workflowId} ${o.summary??""}`)}return m.buildMessageFromArray(t,`
3
3
  `)}function Tt(e){const t=[];if(e.collection?.sourceDescriptions?.length){t.push("Source descriptions:");for(const o of e.collection.sourceDescriptions)t.push(` name=${o.name} url=${o.url}`)}return m.buildMessageFromArray(t,`
4
4
  `)}function St(e,t){const o=["Current tab (collection)"];for(const n of t)switch(n){case"info":o.push(bt(e));break;case"workflows":o.push(vt(e));break;case"sourceDescriptions":o.push(Tt(e));break}return m.buildMessageFromArray(o,`
@@ -1,8 +1,8 @@
1
1
  import { useContext as zt, createContext as Ht } from "react";
2
- import { R as Gt, A as be, aR as se, aS as Vt, aT as Kt, aU as Jt, ac as x, a as ue, aH as Y, aV as pt, aW as Oe, aG as Ae, aX as ft, aY as pe, aZ as ee, c as b, a_ as Qt, an as G, al as V, a$ as mt, b0 as fe, am as Ee, b1 as Xt, b2 as Zt, b3 as eo, b4 as to, b5 as oo, b6 as no, b7 as ro, af as K, b8 as so, ag as te, aa as ao, b9 as io, ba as co, bb as ht, bc as wt, bd as lo, be as It, bf as yt, bg as uo, ai as J, bh as po, ab as vt, bi as $e, aB as gt, bj as fo, bk as mo, bl as Me, F as k, bm as Fe, bn as ho, bo as Be, bp as wo, bq as Io, br as yo, a9 as bt, a8 as kt } from "./replay-index-BHtfLbOG.js";
3
- import { b as C, f as St, a as Tt, c as Ct, d as me, e as Ot, i as je, h as xe, R as z, j as vo, k as go, p as bo, s as Ye, l as ko } from "./replay-db-_sfKkGQN.js";
4
- import { b as So, o as To, d as Co, e as p, u as he, f as c, h as R, j as E, n as A, k as j, m as w, q as T, r as _e, t as oe, v as we, Z as H, w as Oo, x as ze, c as Ao, s as Eo, y as $o } from "./replay-create-model-CpeHx32p.js";
5
- import { g as xo, e as He, a as _o, b as Ro, c as Ge, d as Po, f as qo } from "./replay-SemanticSearchService-CWnTWVrh.js";
2
+ import { R as Gt, A as be, aR as se, aS as Vt, aT as Kt, aU as Jt, ac as x, a as ue, aH as Y, aV as pt, aW as Oe, aG as Ae, aX as ft, aY as pe, aZ as ee, c as b, a_ as Qt, an as G, al as V, a$ as mt, b0 as fe, am as Ee, b1 as Xt, b2 as Zt, b3 as eo, b4 as to, b5 as oo, b6 as no, b7 as ro, af as K, b8 as so, ag as te, aa as ao, b9 as io, ba as co, bb as ht, bc as wt, bd as lo, be as It, bf as yt, bg as uo, ai as J, bh as po, ab as vt, bi as $e, aB as gt, bj as fo, bk as mo, bl as Me, F as k, bm as Fe, bn as ho, bo as Be, bp as wo, bq as Io, br as yo, a9 as bt, a8 as kt } from "./replay-index-7c2fdTRw.js";
3
+ import { b as C, f as St, a as Tt, c as Ct, d as me, e as Ot, i as je, h as xe, R as z, j as vo, k as go, p as bo, s as Ye, l as ko } from "./replay-db-BAptE3HS.js";
4
+ import { b as So, o as To, d as Co, e as p, u as he, f as c, h as R, j as E, n as A, k as j, m as w, q as T, r as _e, t as oe, v as we, Z as H, w as Oo, x as ze, c as Ao, s as Eo, y as $o } from "./replay-create-model-iK8UnqLH.js";
5
+ import { g as xo, e as He, a as _o, b as Ro, c as Ge, d as Po, f as qo } from "./replay-SemanticSearchService-C2OaJcha.js";
6
6
  import { useInfiniteQuery as No, useQuery as Uo } from "@tanstack/react-query";
7
7
  const ae = {
8
8
  path: "pathParameters",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-B46oXIt0.js"),n=require("./replay-index-CMFKqCDF.js"),l=require("./replay-defaults-DVvOnvnR.js");async function s(t,a,o,i){try{const e=r.createModel({provider:t,modelId:o,apiKey:a});return await r.generateText({model:e,prompt:l.VALIDATION_PROMPT,maxOutputTokens:n.MAX_OUTPUT_TOKENS_FOR_VALIDATION,abortSignal:i?.abortSignal}),{valid:!0}}catch(e){if(e instanceof Error&&e.name==="AbortError")throw e;return{valid:!1,error:e instanceof Error&&e.message.length>0?e.message:"Validation failed. Please try again."}}}exports.validateApiKey=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-ByXMw0Mz.js"),n=require("./replay-index-DGVKGau4.js"),l=require("./replay-defaults-DVvOnvnR.js");async function s(t,a,o,i){try{const e=r.createModel({provider:t,modelId:o,apiKey:a});return await r.generateText({model:e,prompt:l.VALIDATION_PROMPT,maxOutputTokens:n.MAX_OUTPUT_TOKENS_FOR_VALIDATION,abortSignal:i?.abortSignal}),{valid:!0}}catch(e){if(e instanceof Error&&e.name==="AbortError")throw e;return{valid:!1,error:e instanceof Error&&e.message.length>0?e.message:"Validation failed. Please try again."}}}exports.validateApiKey=s;
@@ -1,5 +1,5 @@
1
- import { c as i, g as n } from "./replay-create-model-CpeHx32p.js";
2
- import { M as s } from "./replay-index-BHtfLbOG.js";
1
+ import { c as i, g as n } from "./replay-create-model-iK8UnqLH.js";
2
+ import { M as s } from "./replay-index-7c2fdTRw.js";
3
3
  import { V as l } from "./replay-defaults-CzR6jw9a.js";
4
4
  async function g(a, e, t, o) {
5
5
  try {
package/dist/replay.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-CMFKqCDF.js"),t=require("./replay-oauth2-redirect-handler-BfZRvm6l.js");exports.AI_PROVIDERS=e.AI_PROVIDERS;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.REUNITE_AI_PROVIDER=e.REUNITE_AI_PROVIDER;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.createResource=e.createResource;exports.getCurrentTheme=e.getCurrentTheme;exports.loadAgentLoop=e.loadAgentLoop;exports.makeProviderRecord=e.makeProviderRecord;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-DGVKGau4.js"),t=require("./replay-oauth2-redirect-handler-BfZRvm6l.js");exports.AI_PROVIDERS=e.AI_PROVIDERS;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.REUNITE_AI_PROVIDER=e.REUNITE_AI_PROVIDER;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.createResource=e.createResource;exports.getCurrentTheme=e.getCurrentTheme;exports.loadAgentLoop=e.loadAgentLoop;exports.makeProviderRecord=e.makeProviderRecord;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
package/dist/replay.d.ts CHANGED
@@ -156,6 +156,7 @@ export declare function createResource<O extends string = string>(object: O, id:
156
156
  uri: string;
157
157
  };
158
158
 
159
+ /** Fills the width and height of its container, so the host sets the embed's size. */
159
160
  export declare function EmbeddedReplay(props: ReplayAppProps): JSX.Element;
160
161
 
161
162
  declare type EndpointModel = {
@@ -474,6 +475,7 @@ declare type OpenAPIOperation_2 = {
474
475
  path: string;
475
476
  href: string;
476
477
  operationId?: string;
478
+ deprecated?: boolean;
477
479
  parameters: OperationParameter[];
478
480
  body?: {
479
481
  mediaTypes: MediaTypes;
@@ -757,6 +759,7 @@ declare type OperationSecurity = {
757
759
  openIdConnectUrl?: string;
758
760
  scopes: string[];
759
761
  in?: 'query' | 'header' | 'cookie';
762
+ deprecated?: boolean;
760
763
  scheme?: string;
761
764
  name?: string;
762
765
  flows?: OAuthFlowsObject;
package/dist/replay.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, ax as r, bQ as t, bR as l, R as o, bS as b, bT as R, N as d, bU as m, bV as p, O as n, bW as y, bX as A, bY as T, bZ as i, aw as u, av as O, b_ as h, b$ as E } from "./replay-index-BHtfLbOG.js";
1
+ import { A as s, ax as r, bQ as t, bR as l, R as o, bS as b, bT as R, N as d, bU as m, bV as p, O as n, bW as y, bX as A, bY as T, bZ as i, aw as u, av as O, b_ as h, b$ as E } from "./replay-index-7c2fdTRw.js";
2
2
  import { O as C, h as I } from "./replay-oauth2-redirect-handler-Bq6bpZMm.js";
3
3
  export {
4
4
  s as AI_PROVIDERS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/replay",
3
- "version": "0.30.0-next.5",
3
+ "version": "0.30.0-next.7",
4
4
  "type": "module",
5
5
  "main": "./dist/replay.cjs",
6
6
  "module": "./dist/replay.js",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "peerDependencies": {
19
- "@redocly/theme": "0.71.0-next.4",
19
+ "@redocly/theme": "0.71.0-next.6",
20
20
  "@tanstack/react-query": "5.62.3",
21
21
  "react": "^19.2.7",
22
22
  "react-dom": "^19.2.7",
@@ -1,4 +0,0 @@
1
- import { g as r } from "./replay-SemanticSearchService-CWnTWVrh.js";
2
- export {
3
- r as getSemanticSearchService
4
- };
@@ -1,47 +0,0 @@
1
- "use strict";const le=require("./replay-index-CMFKqCDF.js");function Bn(e){return!!e}var vt={},xt,dn;function At(){if(dn)return xt;dn=1;const e="\\\\/",t=`[^${e}]`,n=0,r="\\.",i="\\+",o="\\?",a="\\/",s="(?=.)",l="[^/]",u=`(?:${a}|$)`,c=`(?:^|${a})`,E=`${r}{1,2}${u}`,m=`(?!${r})`,b=`(?!${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:b,NO_DOT_SLASH:S,NO_DOTS_SLASH:w,QMARK_NO_DOT:M,STAR:N,START_ANCHOR:c,SEP:"/"},v={...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 xt={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?v:y}},xt}var hn;function yt(){return hn||(hn=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=At();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}})(vt)),vt}var _t,gn;function vr(){if(gn)return _t;gn=1;const e=yt(),{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:b,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:w}=At(),M=y=>y===s||y===r,N=y=>{y.isPrefix!==!0&&(y.depth=y.isGlobstar?1/0:1)};return _t=(y,v)=>{const f=v||{},I=y.length-1,R=f.parts===!0||f.tokens===!0||f.scanToEnd===!0,A=[],g=[],x=[];let j=y,k=-1,U=0,pe=0,ce=!1,ge=!1,W=!1,Ee=!1,xe=!1,me=!1,K=!1,Ae=!1,_e=!1,ne=!1,J=0,ue,O,F={value:"",depth:0,isGlob:!1};const p=()=>k>=I,re=()=>j.charCodeAt(k+1),X=()=>(ue=O,j.charCodeAt(++k));for(;k<I;){O=X();let D;if(O===r){K=F.backslashes=!0,O=X(),O===l&&(me=!0);continue}if(me===!0||O===l){for(J++;p()!==!0&&(O=X());){if(O===r){K=F.backslashes=!0,X();continue}if(O===l){J++;continue}if(me!==!0&&O===o&&(O=X())===o){if(ce=F.isBrace=!0,W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(me!==!0&&O===i){if(ce=F.isBrace=!0,W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===b&&(J--,J===0)){me=!1,ce=F.isBrace=!0,ne=!0;break}}if(R===!0)continue;break}if(O===s){if(A.push(k),g.push(F),F={value:"",depth:0,isGlob:!1},ne===!0)continue;if(ue===o&&k===U+1){U+=2;continue}pe=k+1;continue}if(f.noext!==!0&&(O===E||O===n||O===t||O===m||O===a)===!0&&re()===u){if(W=F.isGlob=!0,Ee=F.isExtglob=!0,ne=!0,O===a&&k===U&&(_e=!0),R===!0){let fe=0;for(;p()!==!0&&(O=X());){if(O===r){K=F.backslashes=!0,X();continue}if(O===u){fe++;continue}if(O===S&&--fe===0){ne=!0;break}}continue}break}if(O===t){if(ue===t&&(xe=F.isGlobstar=!0),W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===m){if(W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===c){for(;p()!==!0&&(D=X());){if(D===r){K=F.backslashes=!0,X();continue}if(D===w){ge=F.isBracket=!0,W=F.isGlob=!0,ne=!0;break}}if(R===!0)continue;break}if(f.nonegate!==!0&&O===a&&k===U){Ae=F.negated=!0,U++;continue}if(f.noparen!==!0&&O===u){if(W=F.isGlob=!0,R===!0){let se=1;for(;p()!==!0&&(O=X());){if(O===r){K=F.backslashes=!0,X();continue}if(O===u){se++;continue}if(O===S&&--se===0){ne=!0;break}}continue}break}if(W===!0){if(ne=!0,R===!0)continue;break}}f.noext===!0&&(Ee=!1,W=!1);let V=j,h="",d="";U>0&&(h=j.slice(0,U),j=j.slice(U),pe-=U),V&&W===!0&&pe>0?(V=j.slice(0,pe),d=j.slice(pe)):W===!0?(V="",d=j):V=j,V&&V!==""&&V!=="/"&&V!==j&&M(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),f.unescape===!0&&(d&&(d=e.removeBackslashes(d)),V&&K===!0&&(V=e.removeBackslashes(V)));const de={prefix:h,input:y,start:U,base:V,glob:d,isBrace:ce,isBracket:ge,isGlob:W,isExtglob:Ee,isGlobstar:xe,negated:Ae,negatedExtglob:_e};if(f.tokens===!0&&(de.maxDepth=0,M(O)||g.push(F),de.tokens=g),f.parts===!0||f.tokens===!0){let D;for(let z=0;z<A.length;z++){const He=D!==void 0?D+1:U,je=A[z],we=y.slice(He,je);f.tokens&&(z===0&&U!==0?(g[z].isPrefix=!0,g[z].value=h):g[z].value=we,N(g[z]),de.maxDepth+=g[z].depth),je>=U&&(x.push(we),D=je)}const se=D!==void 0?D+1:U,fe=y.slice(se);x.push(fe),f.tokens&&D&&D+1<y.length&&(g[g.length-1].value=fe,N(g[g.length-1]),de.maxDepth+=g[g.length-1].depth),de.slashes=A,de.parts=x}return de},_t}var wt,mn;function xr(){if(mn)return wt;mn=1;const e=At(),t=yt(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:a}=e,s=(y,v)=>{if(typeof v.expandRange=="function")return v.expandRange(...y,v);y.sort();const f=`[${y.join("-")}]`;try{new RegExp(f)}catch{return y.map(R=>t.escapeRegex(R)).join("..")}return f},l=(y,v)=>`Missing ${y}: "${v}" - use "\\\\${v}" to match literal characters`,u=y=>{const v=[];let f=0,I=0,R=0,A="",g=!1;for(const x of y){if(g===!0){A+=x,g=!1;continue}if(x==="\\"){A+=x,g=!0;continue}if(x==='"'){R=R===1?0:1,A+=x;continue}if(R===0){if(x==="[")f++;else if(x==="]"&&f>0)f--;else if(f===0){if(x==="(")I++;else if(x===")"&&I>0)I--;else if(x==="|"&&I===0){v.push(A),A="";continue}}}A+=x}return v.push(A),v},c=y=>{let v=!1;for(const f of y){if(v===!0){v=!1;continue}if(f==="\\"){v=!0;continue}if(/[?*+@!()[\]{}]/.test(f))return!1}return!0},E=y=>{let v=y.trim(),f=!0;for(;f===!0;)f=!1,/^@\([^\\()[\]{}|]+\)$/.test(v)&&(v=v.slice(2,-1),f=!0);if(c(v))return v.replace(/\\(.)/g,"$1")},m=y=>{const v=y.map(E).filter(Boolean);for(let f=0;f<v.length;f++)for(let I=f+1;I<v.length;I++){const R=v[f],A=v[I],g=R[0];if(!(!g||R!==g.repeat(R.length)||A!==g.repeat(A.length))&&(R===A||R.startsWith(A)||A.startsWith(R)))return!0}return!1},b=(y,v=!0)=>{if(y[0]!=="+"&&y[0]!=="*"||y[1]!=="(")return;let f=0,I=0,R=0,A=!1;for(let g=1;g<y.length;g++){const x=y[g];if(A===!0){A=!1;continue}if(x==="\\"){A=!0;continue}if(x==='"'){R=R===1?0:1;continue}if(R!==1){if(x==="["){f++;continue}if(x==="]"&&f>0){f--;continue}if(!(f>0)){if(x==="("){I++;continue}if(x===")"&&(I--,I===0))return v===!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 v=0;const f=[];for(;v<y.length;){const I=b(y.slice(v),!1);if(!I||I.type!=="*")return;const R=u(I.body).map(g=>g.trim());if(R.length!==1)return;const A=E(R[0]);if(!A||A.length!==1)return;f.push(A),v+=I.end+1}if(!(f.length<1))return f},M=y=>{let v=0,f=y.trim(),I=b(f);for(;I;)v++,f=I.body.trim(),I=b(f);return v},N=(y,v)=>{if(v.maxExtglobRecursion===!1)return{risky:!1};const f=typeof v.maxExtglobRecursion=="number"?v.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,I=u(y).map(x=>x.trim());if(I.length>1&&(I.some(x=>x==="")||I.some(x=>/^[*?]+$/.test(x))||m(I)))return{risky:!0};const R=[];let A=!1,g=!0;for(const x of I){const j=w(x);if(j){A=!0,R.push(...j);continue}const k=E(x);if(k&&k.length===1){R.push(k);continue}if(g=!1,M(x)>f)return{risky:!0}}return A?g?{risky:!0,safeOutput:S([...new Set(R)])}:{risky:!0}:{risky:!1}},$=(y,v)=>{if(typeof y!="string")throw new TypeError("Expected a string");y=a[y]||y;const f={...v},I=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n;let R=y.length;if(R>I)throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${I}`);const A={type:"bos",value:"",output:f.prepend||""},g=[A],x=f.capture?"":"?:",j=e.globChars(f.windows),k=e.extglobChars(j),{DOT_LITERAL:U,PLUS_LITERAL:pe,SLASH_LITERAL:ce,ONE_CHAR:ge,DOTS_SLASH:W,NO_DOT:Ee,NO_DOT_SLASH:xe,NO_DOTS_SLASH:me,QMARK:K,QMARK_NO_DOT:Ae,STAR:_e,START_ANCHOR:ne}=j,J=T=>`(${x}(?:(?!${ne}${T.dot?W:U}).)*?)`,ue=f.dot?"":Ee,O=f.dot?K:Ae;let F=f.bash===!0?J(f):_e;f.capture&&(F=`(${F})`),typeof f.noext=="boolean"&&(f.noextglob=f.noext);const p={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,p),R=y.length;const re=[],X=[],V=[];let h=A,d;const de=()=>p.index===R-1,D=p.peek=(T=1)=>y[p.index+T],se=p.advance=()=>y[++p.index]||"",fe=()=>y.slice(p.index+1),z=(T="",Y=0)=>{p.consumed+=T,p.index+=Y},He=T=>{p.output+=T.output!=null?T.output:T.value,z(T.value)},je=()=>{let T=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)se(),p.start++,T++;return T%2===0?!1:(p.negated=!0,p.start++,!0)},we=T=>{p[T]++,V.push(T)},Te=T=>{p[T]--,V.pop()},L=T=>{if(h.type==="globstar"){const Y=p.braces>0&&(T.type==="comma"||T.type==="brace"),C=T.extglob===!0||re.length&&(T.type==="pipe"||T.type==="paren");T.type!=="slash"&&T.type!=="paren"&&!Y&&!C&&(p.output=p.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=F,p.output+=h.output)}if(re.length&&T.type!=="paren"&&(re[re.length-1].inner+=T.value),(T.value||T.output)&&He(T),h&&h.type==="text"&&T.type==="text"){h.output=(h.output||h.value)+T.value,h.value+=T.value;return}T.prev=h,g.push(T),h=T},at=(T,Y)=>{const C={...k[Y],conditions:1,inner:""};C.prev=h,C.parens=p.parens,C.output=p.output,C.startIndex=p.index,C.tokensIndex=g.length;const P=(f.capture?"(":"")+C.open;we("parens"),L({type:T,value:Y,output:p.output?"":ge}),L({type:"paren",extglob:!0,value:se(),output:P}),re.push(C)},Rr=T=>{const Y=y.slice(T.startIndex,p.index+1),C=y.slice(T.startIndex+2,p.index),P=N(C,f);if((T.type==="plus"||T.type==="star")&&P.risky){const q=P.safeOutput?(T.output?"":ge)+(f.capture?`(${P.safeOutput})`:P.safeOutput):void 0,ye=g[T.tokensIndex];ye.type="text",ye.value=Y,ye.output=q||t.escapeRegex(Y);for(let Ie=T.tokensIndex+1;Ie<g.length;Ie++)g[Ie].value="",g[Ie].output="",delete g[Ie].suffix;p.output=T.output+ye.output,p.backtrack=!0,L({type:"paren",extglob:!0,value:d,output:""}),Te("parens");return}let G=T.close+(f.capture?")":""),Q;if(T.type==="negate"){let q=F;if(T.inner&&T.inner.length>1&&T.inner.includes("/")&&(q=J(f)),(q!==F||de()||/^\)+$/.test(fe()))&&(G=T.close=`)$))${q}`),T.inner.includes("*")&&(Q=fe())&&/^\.[^\\/.]+$/.test(Q)){const ye=$(Q,{...v,fastpaths:!1}).output;G=T.close=`)${ye})${q})`}T.prev.type==="bos"&&(p.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:d,output:G}),Te("parens")};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(y)){let T=!1,Y=y.replace(o,(C,P,G,Q,q,ye)=>Q==="\\"?(T=!0,C):Q==="?"?P?P+Q+(q?K.repeat(q.length):""):ye===0?O+(q?K.repeat(q.length):""):K.repeat(G.length):Q==="."?U.repeat(G.length):Q==="*"?P?P+Q+(q?F:""):F:P?C:`\\${C}`);return T===!0&&(f.unescape===!0?Y=Y.replace(/\\/g,""):Y=Y.replace(/\\+/g,C=>C.length%2===0?"\\\\":C?"\\":"")),Y===y&&f.contains===!0?(p.output=y,p):(p.output=t.wrapOutput(Y,p,v),p)}for(;!de();){if(d=se(),d==="\0")continue;if(d==="\\"){const C=D();if(C==="/"&&f.bash!==!0||C==="."||C===";")continue;if(!C){d+="\\",L({type:"text",value:d});continue}const P=/^\\+/.exec(fe());let G=0;if(P&&P[0].length>2&&(G=P[0].length,p.index+=G,G%2!==0&&(d+="\\")),f.unescape===!0?d=se():d+=se(),p.brackets===0){L({type:"text",value:d});continue}}if(p.brackets>0&&(d!=="]"||h.value==="["||h.value==="[^")){if(f.posix!==!1&&d===":"){const C=h.value.slice(1);if(C.includes("[")&&(h.posix=!0,C.includes(":"))){const P=h.value.lastIndexOf("["),G=h.value.slice(0,P),Q=h.value.slice(P+2),q=r[Q];if(q){h.value=G+q,p.backtrack=!0,se(),!A.output&&g.indexOf(h)===1&&(A.output=ge);continue}}}(d==="["&&D()!==":"||d==="-"&&D()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),f.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,He({value:d});continue}if(p.quotes===1&&d!=='"'){d=t.escapeRegex(d),h.value+=d,He({value:d});continue}if(d==='"'){p.quotes=p.quotes===1?0:1,f.keepQuotes===!0&&L({type:"text",value:d});continue}if(d==="("){we("parens"),L({type:"paren",value:d});continue}if(d===")"){if(p.parens===0&&f.strictBrackets===!0)throw new SyntaxError(l("opening","("));const C=re[re.length-1];if(C&&p.parens===C.parens+1){Rr(re.pop());continue}L({type:"paren",value:d,output:p.parens?")":"\\)"}),Te("parens");continue}if(d==="["){if(f.nobracket===!0||!fe().includes("]")){if(f.nobracket!==!0&&f.strictBrackets===!0)throw new SyntaxError(l("closing","]"));d=`\\${d}`}else we("brackets");L({type:"bracket",value:d});continue}if(d==="]"){if(f.nobracket===!0||h&&h.type==="bracket"&&h.value.length===1){L({type:"text",value:d,output:`\\${d}`});continue}if(p.brackets===0){if(f.strictBrackets===!0)throw new SyntaxError(l("opening","["));L({type:"text",value:d,output:`\\${d}`});continue}Te("brackets");const C=h.value.slice(1);if(h.posix!==!0&&C[0]==="^"&&!C.includes("/")&&(d=`/${d}`),h.value+=d,He({value:d}),f.literalBrackets===!1||t.hasRegexChars(C))continue;const P=t.escapeRegex(h.value);if(p.output=p.output.slice(0,-h.value.length),f.literalBrackets===!0){p.output+=P,h.value=P;continue}h.value=`(${x}${P}|${h.value})`,p.output+=h.value;continue}if(d==="{"&&f.nobrace!==!0){we("braces");const C={type:"brace",value:d,output:"(",outputIndex:p.output.length,tokensIndex:p.tokens.length};X.push(C),L(C);continue}if(d==="}"){const C=X[X.length-1];if(f.nobrace===!0||!C){L({type:"text",value:d,output:d});continue}let P=")";if(C.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),p.backtrack=!0}if(C.comma!==!0&&C.dots!==!0){const G=p.output.slice(0,C.outputIndex),Q=p.tokens.slice(C.tokensIndex);C.value=C.output="\\{",d=P="\\}",p.output=G;for(const q of Q)p.output+=q.output||q.value}L({type:"brace",value:d,output:P}),Te("braces"),X.pop();continue}if(d==="|"){re.length>0&&re[re.length-1].conditions++,L({type:"text",value:d});continue}if(d===","){let C=d;const P=X[X.length-1];P&&V[V.length-1]==="braces"&&(P.comma=!0,C="|"),L({type:"comma",value:d,output:C});continue}if(d==="/"){if(h.type==="dot"&&p.index===p.start+1){p.start=p.index+1,p.consumed="",p.output="",g.pop(),h=A;continue}L({type:"slash",value:d,output:ce});continue}if(d==="."){if(p.braces>0&&h.type==="dot"){h.value==="."&&(h.output=U);const C=X[X.length-1];h.type="dots",h.output+=d,h.value+=d,C.dots=!0;continue}if(p.braces+p.parens===0&&h.type!=="bos"&&h.type!=="slash"){L({type:"text",value:d,output:U});continue}L({type:"dot",value:d,output:U});continue}if(d==="?"){if(!(h&&h.value==="(")&&f.noextglob!==!0&&D()==="("&&D(2)!=="?"){at("qmark",d);continue}if(h&&h.type==="paren"){const P=D();let G=d;(h.value==="("&&!/[!=<:]/.test(P)||P==="<"&&!/<([!=]|\w+>)/.test(fe()))&&(G=`\\${d}`),L({type:"text",value:d,output:G});continue}if(f.dot!==!0&&(h.type==="slash"||h.type==="bos")){L({type:"qmark",value:d,output:Ae});continue}L({type:"qmark",value:d,output:K});continue}if(d==="!"){if(f.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){at("negate",d);continue}if(f.nonegate!==!0&&p.index===0){je();continue}}if(d==="+"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){at("plus",d);continue}if(h&&h.value==="("||f.regex===!1){L({type:"plus",value:d,output:pe});continue}if(h&&(h.type==="bracket"||h.type==="paren"||h.type==="brace")||p.parens>0){L({type:"plus",value:d});continue}L({type:"plus",value:pe});continue}if(d==="@"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){L({type:"at",extglob:!0,value:d,output:""});continue}L({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);const C=i.exec(fe());C&&(d+=C[0],p.index+=C[0].length),L({type:"text",value:d});continue}if(h&&(h.type==="globstar"||h.star===!0)){h.type="star",h.star=!0,h.value+=d,h.output=F,p.backtrack=!0,p.globstar=!0,z(d);continue}let T=fe();if(f.noextglob!==!0&&/^\([^?]/.test(T)){at("star",d);continue}if(h.type==="star"){if(f.noglobstar===!0){z(d);continue}const C=h.prev,P=C.prev,G=C.type==="slash"||C.type==="bos",Q=P&&(P.type==="star"||P.type==="globstar");if(f.bash===!0&&(!G||T[0]&&T[0]!=="/")){L({type:"star",value:d,output:""});continue}const q=p.braces>0&&(C.type==="comma"||C.type==="brace"),ye=re.length&&(C.type==="pipe"||C.type==="paren");if(!G&&C.type!=="paren"&&!q&&!ye){L({type:"star",value:d,output:""});continue}for(;T.slice(0,3)==="/**";){const Me=y[p.index+4];if(Me&&Me!=="/")break;T=T.slice(3),z("/**",3)}const Ie=de()||p.parens>0&&T===")".repeat(p.parens)&&!re.some(Me=>Me.type==="negate");if(C.type==="bos"&&de()){h.type="globstar",h.value+=d,h.output=J(f),p.output=h.output,p.globstar=!0,z(d);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&!Q&&Ie){p.output=p.output.slice(0,-(C.output+h.output).length),C.output=`(?:${C.output}`,h.type="globstar",h.output=J(f)+(f.strictSlashes?")":"|$)"),h.value+=d,p.globstar=!0,p.output+=C.output+h.output,z(d);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&T[0]==="/"){const Me=T[1]!==void 0?"|$":"";p.output=p.output.slice(0,-(C.output+h.output).length),C.output=`(?:${C.output}`,h.type="globstar",h.output=`${J(f)}${ce}|${ce}${Me})`,h.value+=d,p.output+=C.output+h.output,p.globstar=!0,z(d+se()),L({type:"slash",value:"/",output:""});continue}if(C.type==="bos"&&T[0]==="/"){h.type="globstar",h.value+=d,h.output=`(?:^|${ce}|${J(f)}${ce})`,p.output=h.output,p.globstar=!0,z(d+se()),L({type:"slash",value:"/",output:""});continue}p.output=p.output.slice(0,-h.output.length),h.type="globstar",h.output=J(f),h.value+=d,p.output+=h.output,p.globstar=!0,z(d);continue}const Y={type:"star",value:d,output:F};if(f.bash===!0){Y.output=".*?",(h.type==="bos"||h.type==="slash")&&(Y.output=ue+Y.output),L(Y);continue}if(h&&(h.type==="bracket"||h.type==="paren")&&f.regex===!0){Y.output=d,L(Y);continue}(p.index===p.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(p.output+=xe,h.output+=xe):f.dot===!0?(p.output+=me,h.output+=me):(p.output+=ue,h.output+=ue),D()!=="*"&&(p.output+=ge,h.output+=ge)),L(Y)}for(;p.brackets>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing","]"));p.output=t.escapeLast(p.output,"["),Te("brackets")}for(;p.parens>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing",")"));p.output=t.escapeLast(p.output,"("),Te("parens")}for(;p.braces>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing","}"));p.output=t.escapeLast(p.output,"{"),Te("braces")}if(f.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${ce}?`}),p.backtrack===!0){p.output="";for(const T of p.tokens)p.output+=T.output!=null?T.output:T.value,T.suffix&&(p.output+=T.suffix)}return p};return $.fastpaths=(y,v)=>{const f={...v},I=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n,R=y.length;if(R>I)throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${I}`);y=a[y]||y;const{DOT_LITERAL:A,SLASH_LITERAL:g,ONE_CHAR:x,DOTS_SLASH:j,NO_DOT:k,NO_DOTS:U,NO_DOTS_SLASH:pe,STAR:ce,START_ANCHOR:ge}=e.globChars(f.windows),W=f.dot?U:k,Ee=f.dot?pe:k,xe=f.capture?"":"?:",me={negated:!1,prefix:""};let K=f.bash===!0?".*?":ce;f.capture&&(K=`(${K})`);const Ae=ue=>ue.noglobstar===!0?K:`(${xe}(?:(?!${ge}${ue.dot?j:A}).)*?)`,_e=ue=>{switch(ue){case"*":return`${W}${x}${K}`;case".*":return`${A}${x}${K}`;case"*.*":return`${W}${K}${A}${x}${K}`;case"*/*":return`${W}${K}${g}${x}${Ee}${K}`;case"**":return W+Ae(f);case"**/*":return`(?:${W}${Ae(f)}${g})?${Ee}${x}${K}`;case"**/*.*":return`(?:${W}${Ae(f)}${g})?${Ee}${K}${A}${x}${K}`;case"**/.*":return`(?:${W}${Ae(f)}${g})?${A}${x}${K}`;default:{const O=/^(.*?)\.(\w+)$/.exec(ue);if(!O)return;const F=_e(O[1]);return F?F+A+O[2]:void 0}}},ne=t.removePrefix(y,me);let J=_e(ne);return J&&f.strictSlashes!==!0&&(J+=`${g}?`),J},wt=$,wt}var It,An;function _r(){if(An)return It;An=1;const e=vr(),t=xr(),n=yt(),r=At(),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 v=y($);if(v)return v}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),b=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:v}=o.test(M,m,s,{glob:a,posix:E}),f={glob:a,state:b,regex:m,posix:E,input:M,output:v,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=b),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 b=a===u,S=b&&m?m(a):a;return b===!1&&(S=m?m(a):a,b=S===u),(b===!1||E.capture===!0)&&(E.matchBase===!0||E.basename===!0?b=o.matchBase(a,s,l,c):b=s.exec(S)),{isMatch:!!b,match:b,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 b=`${E}(?:${a.output})${m}`;a&&a.negated===!0&&(b=`^(?!${b}).*$`);const S=o.toRegex(b,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,It=o,It}var Nt,yn;function wr(){if(yn)return Nt;yn=1;const e=_r(),t=yt();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),Nt=n,Nt}var Ir=wr();const Nr=le.getDefaultExportFromCjs(Ir),Dn=typeof window<"u"||typeof process>"u"||process?.platform==="browser",Un=Dn?{}:process.env||{};async function Kn(e,t){const n={};for(const i of t.headers)Or(e,i.matches)&&(n[i.name]=i.envVariable!==void 0?Un[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 Or(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),Nr.isMatch(e,t)}function $r(e,t={}){return{name:`${e}List`,properties:{},items:e,...t}}function kr(e,t={}){return{name:`${e}Map`,properties:{},additionalProperties:()=>e,...t}}const Xe={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}};function Lr(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=Xe,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)):ze(o)?(o={...o},r(o),o):o?.directResolveAs!==void 0?{...o,directResolveAs:i(o.directResolveAs)??void 0}:o}}function ze(e){return typeof e?.name=="string"}function Se(e,t){return e===""&&(e="#/"),e[e.length-1]==="/"?e+t:e+"/"+t}function Qe(e){return le.isPlainObject(e)&&typeof e.$ref=="string"}function qn(e){return Qe(e)&&Object.keys(e).length>1}function Gn(e){return le.isPlainObject(e)&&typeof e.externalValue=="string"}class et{source;pointer;constructor(t,n){this.source=t,this.pointer=n}child(t){return new et(this.source,Se(this.pointer,(Array.isArray(t)?t:[t]).map(Oe).join("/")))}key(){return Object.assign(Object.create(et.prototype),this,{reportOnKey:!0})}get absolutePointer(){return this.source.absoluteRef+(this.pointer==="#/"?"":this.pointer)}}function Yn(e){const t=e.indexOf("~")===-1?e:e.replaceAll("~1","/").replaceAll("~0","~");try{return decodeURIComponent(t)}catch{return t}}function Oe(e){return typeof e=="number"||e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replaceAll("~","~0").replaceAll("/","~1")}function jn(e){const[t,n=""]=e.split("#/");return{uri:(t.endsWith("#")?t.slice(0,-1):t)||null,pointer:Wn(n)}}function Wn(e){return e.split("/").map(Yn).filter(Bn)}function Pr(e){const t=e.split("/");return t[t.length-1]}function Fr(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")}function Re(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("data:")}function Hr(e){return le.pathBrowserifyExports.extname(e)?Re(e)?e.substring(0,e.lastIndexOf("/")):le.pathBrowserifyExports.dirname(e):e}function Mr(e,t){return Re(e)?new URL(t,e.endsWith("/")?e:`${e}/`).href:le.pathBrowserifyExports.resolve(e,t)}function Br(e){return typeof e=="string"&&(e.startsWith("#")||Re(e)||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1||/\.(ya?ml|json)$/i.test(e))}function Dr(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}function Ur(e,t,n){if(!le.isPlainObject(t.node)&&n.parent){n.parent[n.key]=t.node;return}delete e.$ref,le.isPlainObject(t.node)&&Object.assign(e,{...t.node,...e})}var H=Symbol("NOT_RESOLVED"),Jt=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 en(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 Et(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 Kr=ee("tag:yaml.org,2002:str",{resolve:e=>e,identify:e=>typeof e=="string"}),qr=["","~","null","Null","NULL"],Gr=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"}),Yr=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"}),jr=["","~","null","Null","NULL"],Wr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>jr.indexOf(e)!==-1?null:H,identify:e=>e===null,represent:()=>"null"}),Vr=["true","True","TRUE"],Xr=["false","False","FALSE"],zr=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:e=>Vr.indexOf(e)!==-1?!0:Xr.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Qr=["true"],Zr=["false"],Jr=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:e=>Qr.indexOf(e)!==-1?!0:Zr.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),ei=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],ti=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],ni=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:e=>ei.indexOf(e)!==-1?!0:ti.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),ri=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),ii=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function oi(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 ai(e,t){if(t){if(!ii.test(e))return H}else if(!ri.test(e))return H;const n=oi(e);return Number.isFinite(n)?n:H}var Vn=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:ai,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),si=new RegExp("^-?(?:0|[1-9][0-9]*)$"),li=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function ci(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 ui(e,t){if(t){if(!li.test(e))return H}else if(!si.test(e))return H;const n=ci(e);return Number.isFinite(n)?n:H}var fi=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:ui,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),pi=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 di(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 hi(e){if(!pi.test(e))return H;const t=di(e);return Number.isFinite(t)?t:H}var Ht=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:hi,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),gi=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mi=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ai(e){if(!gi.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)||mi.test(e)?r:H}function yi(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 Xn=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Ai,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:yi}),Ei=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Si=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function bi(e,t){if(t){if(!Si.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(!Ei.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:bi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:Ci}),Ri=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 xi(e){if(!Ri.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 _i(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 Mt=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:xi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:_i}),zn=ee("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(e,t)=>e==="<<"||t&&e===""?Jt:H}),wi=/^[A-Za-z0-9+/]*={0,2}$/;function Ii(e){const t=e.replace(/\s/g,"");if(t.length%4!==0||!wi.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 Ni(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Qn=ee("tag:yaml.org,2002:binary",{resolve:Ii,identify:e=>Object.prototype.toString.call(e)==="[object Uint8Array]",represent:Ni}),Oi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),$i=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 En(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 ki(e){let t=Oi.exec(e);if(t===null&&(t=$i.exec(e)),t===null)return H;const n=+t[1],r=+t[2]-1,i=+t[3];if(!t[4]){const c=En(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=En(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 Li=ee("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:ki,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),Pi=en("tag:yaml.org,2002:seq",{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function St(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Bt(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var Zn=en("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(St(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}),Jn=en("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]]]),"")}}),Fi=Et("tag:yaml.org,2002:map",{create:()=>({}),identify:St,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}}),er=Et("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 Hi(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function Mi(){return{scalar:[],sequence:[],mapping:[]}}function Bi(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 bt=class tr{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(t){const n=Bi(t),r=[],i=Hi(),o=Mi();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 tr([...this.tags,...n])}},tn=new bt([Kr,Pi,Fi]);new bt([...tn.tags,Yr,Jr,fi,Ti]);var nr=new bt([...tn.tags,Gr,zr,Vn,Xn]),Di=new bt([...tn.tags,Wr,ni,Ht,Mt,Li,zn,Qn,Zn,Jn,er]);Et("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||St(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 Sn(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)}Et("tag:yaml.org,2002:map",{create:()=>({}),identify:St,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=Sn(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=Sn(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 Ui={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function Ot(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 $t(e,t){return" ".repeat(Math.max(t-e.length,0))+e}function Ki(e,t){if(!e.buffer)return null;const n={...Ui,...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 b=Ot(e.buffer,i[s-m],o[s-m],e.position-(i[s]-i[s-m]),c);l=`${" ".repeat(n.indent)}${$t((e.line-m+1).toString(),u)} | ${b.str}
2
- ${l}`}const E=Ot(e.buffer,i[s],o[s],e.position,c);l+=`${" ".repeat(n.indent)}${$t((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 b=Ot(e.buffer,i[s+m],o[s+m],e.position-(i[s]-i[s+m]),c);l+=`${" ".repeat(n.indent)}${$t((e.line+m+1).toString(),u)} | ${b.str}
5
- `}return l.replace(/\n$/,"")}function bn(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 Ct=class extends Error{reason;mark;constructor(e,t){super(),this.name="YAMLException",this.reason=e,this.mark=t,this.message=bn(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${bn(this,e)}`}};function Tt(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=Ki(a),new Ct(n,a)}var qi=-1;function Cn(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 rr=new Array(256),ir=new Array(256);for(let e=0;e<256;e++)rr[e]=Cn(e)?1:0,ir[e]=Cn(e);function Gi(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Yi(e){return e>=48&&e<=57?e-48:(e|32)-97+10}function ji(e){return e===120?2:e===117?4:8}function dt(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 nn(e){return e===1?" ":`
9
- `.repeat(e-1)}function Wi(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=dt(e,i,n);r+=nn(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,a)}function Vi(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=dt(e,i,n);r+=nn(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,n)}function Xi(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=dt(e,i,n).position;else if(l<256&&rr[l])r+=ir[l],i++;else{let u=ji(l),c=0;for(;u>0;u--){i++;const E=Yi(e.charCodeAt(i));c=(c<<4)+E}r+=Gi(c),i++}o=a=i}else if(s===10||s===13){r+=e.slice(o,a);const l=dt(e,i,n);r+=nn(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,n)}function Tn(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 b of l){let S=0;for(;S<a&&b.charCodeAt(S)===32;)S++;if(r<0||S>=b.length){E++;continue}const w=b.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 zi(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 Vi(e,n,r);case 3:return Xi(e,n,r);case 4:return Tn(e,n,r,t.indent,t.chomping,!1);case 5:return Tn(e,n,r,t.indent,t.chomping,!0);default:return Wi(e,n,r)}}var Qi=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});function kt(e){return encodeURI(e).replace(/!/g,"%21")}function or(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]??Qi[r]??r;return decodeURIComponent(i)+decodeURIComponent(e.slice(r.length))}function ar(e){let t=e;return t.charCodeAt(0)===33?(t=t.slice(1),`!${kt(t)}`):t.slice(0,18)==="tag:yaml.org,2002:"?`!!${kt(t.slice(18))}`:`!<${kt(t)}>`}var Be=-1,rn={filename:"",schema:nr,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function Zi(e){return"tagStart"in e&&e.tagStart!==Be?e.tagStart:"anchorStart"in e&&e.anchorStart!==Be?e.anchorStart:"valueStart"in e&&e.valueStart!==Be?e.valueStart:"start"in e?e.start:0}function ae(e,t){Tt(e.source,e.position,t,e.filename)}function sr(e,t,n,r){try{return n.finalize(r)}catch(i){if(i instanceof Ct)throw i;Tt(e.source,t,i instanceof Error?i.message:String(i),e.filename)}}function ut(e,t,n){const r=e[n];if(r)return r;for(const i of t)if(n.startsWith(i.tagName))return i}function Ji(e,t,n,r,i){const o=ut(t,n,r);if(o)return o;ae(e,`unknown ${i} tag !<${r}>`)}function eo(e,t){const n=zi(e.source,t),r=t.tagStart===Be?"":e.source.slice(t.tagStart,t.tagEnd),i=e.schema.defaultScalarTag;if(r!==""){if(r==="!")return{value:n,tag:i};const o=or(r,e.tagHandlers),a=ut(e.schema.exact.scalar,e.schema.prefix.scalar,o);if(a){const l=a.resolve(n,!0,o);return l===H&&ae(e,`cannot resolve a node with !<${o}> explicit tag`),{value:l,tag:a}}const s=ut(e.schema.exact.mapping,e.schema.prefix.mapping,o)??ut(e.schema.exact.sequence,e.schema.prefix.sequence,o);if(s){n!==""&&ae(e,`cannot resolve a node with !<${o}> explicit tag`);const l=s.create(o);return{value:s.carrierIsResult?l:sr(e,e.position,s,l),tag:s}}ae(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 Rn(e,t,n,r,i,o){const a=t.tagStart===Be?"":e.source.slice(t.tagStart,t.tagEnd),s=a===""||a==="!"?i:or(a,e.tagHandlers);return{tagName:s,tag:Ji(e,n,r,s,o)}}function lr(e){return e.nodeKind==="mapping"}function vn(e,t,n,r){for(const i of r.keys(n)){if(e.maxTotalMergeKeys!==-1&&++e.totalMergeKeys>e.maxTotalMergeKeys&&ae(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&&ae(e,o),(t.overridable??=new Set).add(i)}}function to(e,t,n,r){if(e.position=t.keyPosition,lr(r))vn(e,t,n,r);else if(r.nodeKind==="sequence"&&Array.isArray(n))for(const i of n)vn(e,t,i,t.tag);else ae(e,"cannot merge mappings; the provided source object is unacceptable")}function no(e,t,n,r,i){if(e.position=t.keyPosition,n===Jt){to(e,t,r,i);return}!e.json&&t.tag.has(t.value,n)&&!t.overridable?.has(n)&&ae(e,"duplicated mapping key");const o=t.tag.addPair(t.value,n,r);o&&ae(e,o),t.overridable?.delete(n)}function Lt(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&&(lr(n)||ae(e,"cannot merge mappings; the provided source object is unacceptable"));const i=r.tag.addItem(r.value,t,r.index++);i&&ae(e,i)}else if(r.hasKey){const i=r.key;r.key=void 0,r.hasKey=!1,no(e,r,i,t,n)}else r.key=t,r.keyPosition=e.position,r.hasKey=!0}function Pt(e,t,n,r,i){if(t.anchorStart!==Be){const o={value:n,tag:r,isValueFinal:i};return e.anchors.set(e.source.slice(t.anchorStart,t.anchorEnd),o),o}return null}function ro(e,t){const n={...rn,...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=Zi(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}=eo(n,r);Pt(n,r,i,o,!0),Lt(n,i,o);break}case 2:{const i=Rn(n,r,n.schema.exact.sequence,n.schema.prefix.sequence,"tag:yaml.org,2002:seq","sequence"),o=i.tag.create(i.tagName),a=Pt(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===Jt;n.frames.push({kind:"sequence",position:n.position,value:o,tag:i.tag,anchor:a,index:0,merge:l});break}case 3:{const i=Rn(n,r,n.schema.exact.mapping,n.schema.prefix.mapping,"tag:yaml.org,2002:map","mapping"),o=i.tag.create(i.tagName),a=Pt(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&&ae(n,`aliases exceeded maxAliases (${n.maxAliases})`);const i=n.source.slice(r.anchorStart,r.anchorEnd),o=n.anchors.get(i);o||ae(n,`unidentified alias "${i}"`),o.isValueFinal||ae(n,`recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`),Lt(n,o.value,o.tag);break}case 6:{const i=n.frames.pop();if(i.kind==="mapping"&&i.hasKey&&(n.position=i.keyPosition,ae(n,"incomplete mapping pair in event stream")),i.kind==="document")n.documents.push(i.value);else{const o=i.tag.carrierIsResult?i.value:sr(n,i.position,i.tag,i.value);i.anchor&&(i.anchor.value=o,i.anchor.isValueFinal=!0),Lt(n,o,i.tag)}break}}}return n.documents}var B=-1,cr=Object.prototype.hasOwnProperty,qe=1,Dt=2,ur=3,ht=4,io=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oo=/[,\[\]{}]/,fr=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Ut=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,pr=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,ao=new RegExp(`^(?:${Ut})*$`),so=new RegExp(`^(?:${pr})+$`),lo=new RegExp(`^(?:!(?:${Ut})*|${pr}(?:${Ut})*)$`),on={filename:"",maxDepth:100};function co(e,t,n){e.events.push({type:1,explicitStart:t,explicitEnd:n,directives:e.directives})}function dr(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 Kt(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 xn(e,t){e.events.splice(t.eventsLength,0,{type:3,start:t.position,anchorStart:B,anchorEnd:B,tagStart:B,tagEnd:B,style:2})}function Ye(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 uo(e,t,n){e.events.push({type:5,anchorStart:t,anchorEnd:n})}function De(e){e.events.push({type:6})}function ie(e){Ye(e,B,B,B,B,B,B,1)}function _n(){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 Ue(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 _(e,t){Tt(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 he(e){return Le(e)||Z(e)}function be(e){return e===0||he(e)}function Pe(e){return e===44||e===91||e===93||e===123||e===125}function fo(e){return e>=48&&e<=57?e-48:-1}function po(e){if(e>=48&&e<=57)return e-48;const t=e|32;return t>=97&&t<=102?t-97+10:-1}function ho(e){return e===120?2:e===117?4:e===85?8:0}function go(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 gt(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 oe(e,t){let n=0,r=e.input.charCodeAt(e.position),i=e.position===e.lineStart||he(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(gt(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||he(r)}return!1}function wn(e){let t=e.input.charCodeAt(e.position);for(;t!==0&&!Z(t);)t=e.input.charCodeAt(++e.position)}function hr(e,t,n){io.test(e.input.slice(t,n))&&_(e,"the stream contains non-printable characters")}function mo(e,t,n){if(e.input.charCodeAt(e.position)!==33)return!1;t.tagStart!==B&&_(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&&_(e,"unexpected end of the stream within a verbatim tag"),u=e.input.slice(l,e.position),e.position++}else{for(;s!==0&&!he(s)&&!(n&&Pe(s));)s===33&&(o?_(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(l-1,e.position+1),fr.test(a)||_(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),oo.test(u)&&_(e,"tag suffix cannot contain flow indicator characters")}return u&&!(i?ao.test(u):so.test(u))&&_(e,`tag name cannot contain such characters: ${u}`),!i&&a!=="!"&&a!=="!!"&&!cr.call(e.tagHandlers,a)&&_(e,`undeclared tag handle "${a}"`),t.tagStart=r,t.tagEnd=e.position,!0}function Ao(e,t){if(e.input.charCodeAt(e.position)!==38)return!1;t.anchorStart!==B&&_(e,"duplication of an anchor property"),e.position++;const n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!he(e.input.charCodeAt(e.position))&&!Pe(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&_(e,"name of an anchor node must contain at least one character"),t.anchorStart=n,t.anchorEnd=e.position,!0}function yo(e,t){if(e.input.charCodeAt(e.position)!==42)return!1;(t.anchorStart!==B||t.tagStart!==B)&&_(e,"alias node should not have any properties"),e.position++;const n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!he(e.input.charCodeAt(e.position))&&!Pe(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&_(e,"name of an alias node must contain at least one character"),uo(e,n,e.position),!0}function qt(e,t){oe(e,!1),e.lineIndent<t&&_(e,"deficient indentation")}function Eo(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++,Ye(e,r,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2,1,-1,i),!0}Z(o)?(i=!1,qt(e,t)):e.position===e.lineStart&&$e(e)?_(e,"unexpected end of the document within a single quoted scalar"):o!==9&&o<32?_(e,"expected valid JSON character"):e.position++}_(e,"unexpected end of the stream within a single quoted scalar")}function So(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++,Ye(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))qt(e,t);else if(go(a))e.position++;else{let s=ho(a);for(s===0&&_(e,"unknown escape sequence");s-- >0;)e.position++,po(e.input.charCodeAt(e.position))<0&&_(e,"expected hexadecimal character");e.position++}}else Z(o)?(i=!1,qt(e,t)):e.position===e.lineStart&&$e(e)?_(e,"unexpected end of the document within a double quoted scalar"):o!==9&&o<32?_(e,"expected valid JSON character"):e.position++}_(e,"unexpected end of the stream within a double quoted scalar")}function bo(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 b=e.input.charCodeAt(e.position),S=fo(b);if(b===43||b===45)i!==1&&_(e,"repeat of a chomping mode identifier"),i=b===43?3:2,e.position++;else if(S>=0)S===0&&_(e,"bad explicit indentation width of a block scalar; it cannot be less than one"),a&&_(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&&wn(e),Z(e.input.charCodeAt(e.position))?gt(e):e.input.charCodeAt(e.position)!==0&&_(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 b=e.position;let S=0;for(;e.input.charCodeAt(b+S)===32;)S++;const w=e.input.charCodeAt(b+S);if(w===0){u>=0?S>u&&(m=b+S):S>0&&(m=b+S);break}if(b===e.lineStart&&$e(e,b))break;if(!a&&u===-1&&Z(w)&&(c=Math.max(c,S)),!a&&u===-1&&!Z(w)&&(w===9&&S<t&&(e.position=b+S,_(e,"tab characters must not be used in indentation")),S<c&&(e.position=b+S,_(e,"bad indentation of a mapping entry"))),u===-1&&w!==0&&!Z(w)&&S<t){e.lineIndent=S,e.position=b+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=b+S;break}wn(e),m=e.position,Z(e.input.charCodeAt(e.position))&&(gt(e),m=e.position)}return hr(e,E,m),Ye(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===qe;if(n===0||he(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(be(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===qe;let l=!1;for(;a!==0&&!(e.position===e.lineStart&&$e(e));){if(a===58){const u=e.input.charCodeAt(e.position+1);if(be(u)||s&&Pe(u))break}else if(a===35){if(he(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(oe(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:(hr(e,i,o),Ye(e,i,o,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1,1,-1,!l),!0)}function We(e,t){const n=e.line;oe(e,!0),(e.line>n&&e.lineIndent<t||e.firstTabInLine!==-1&&e.lineIndent<t)&&_(e,"deficient indentation")}function Ro(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?Kt(e,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2):dr(e,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2),e.position++;e.input.charCodeAt(e.position)!==0;){We(e,t);let l=e.input.charCodeAt(e.position);if(l===s)return e.position++,De(e),!0;a?l===44&&_(e,"expected the node content, but found ','"):_(e,"missed comma between flow collection entries");let u=!1,c=!1;l===63&&he(e.input.charCodeAt(e.position+1))&&(u=c=!0,e.position+=1,We(e,t));const E=e.line,m=Ze(e),b=ke(e,t,qe,!1,!0);We(e,t),l=e.input.charCodeAt(e.position),(i||c||e.line===E)&&l===58?(u=!0,e.position++,We(e,t),i||xn(e,m),b||ie(e),ke(e,t,qe,!1,!0)||ie(e),We(e,t),i||De(e)):i&&u?(b||ie(e),ie(e)):i?ie(e):u&&(xn(e,m),b||ie(e),ie(e),De(e)),l=e.input.charCodeAt(e.position),l===44?(a=!0,e.position++):a=!1}_(e,"unexpected end of the stream within a flow collection")}function In(e,t,n){if(e.firstTabInLine!==-1||e.input.charCodeAt(e.position)!==45||!be(e.input.charCodeAt(e.position+1)))return!1;for(dr(e,e.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1);e.input.charCodeAt(e.position)===45&&be(e.input.charCodeAt(e.position+1));){e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,_(e,"tab characters must not be used in indentation"));const r=e.line;e.position++;const i=oe(e,!0)>0;if(e.firstTabInLine!==-1&&e.input.charCodeAt(e.position)===45&&be(e.input.charCodeAt(e.position+1))&&_(e,"bad indentation of a sequence entry"),i&&e.lineIndent<=t?ie(e):ke(e,t,ur,!1,!0),oe(e,!0),e.lineIndent<t||e.position>=e.length)break;e.lineIndent>t&&_(e,"bad indentation of a sequence entry"),e.line===r&&e.input.charCodeAt(e.position)===45&&be(e.input.charCodeAt(e.position+1))&&_(e,"bad indentation of a sequence entry")}return De(e),!0}function Ft(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,_(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)&&be(u))a||(Kt(e,e.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1),a=!0),l===63?(i&&ie(e),o=!0,i=!0):(i||(ie(e),o=!0),i=!1),e.position+=1,s=!0;else{i&&(ie(e),i=!1);const E=Ze(e);if(!ke(e,n,Dt,!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),be(l)||_(e,"a whitespace character is expected after the key-value separator within a block mapping"),!a){for(Ue(e,E),Kt(e,E.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1),a=!0,ke(e,n,Dt,!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)_(e,"expected ':' after a mapping key");else return r.anchorStart!==B||r.tagStart!==B?(Ue(e,E),!1):!0}else if(o)_(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?(Ue(e,E),!1):!0}if(ke(e,t,ht,!0,s)&&(s=!1),i||s&&(ie(e),s=!1),oe(e,!0),l=e.input.charCodeAt(e.position),(e.line===c||e.lineIndent>t)&&l!==0)_(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return o?(i&&ie(e),a&&De(e),!0):!1}function ke(e,t,n,r,i,o=!0){e.depth>=e.maxDepth&&_(e,`nesting exceeded maxDepth (${e.maxDepth})`),e.depth++;let a=1,s=!1,l=!1,u=null;const c=_n();let E=n===ht||n===ur,m=E;const b=E;if(r&&oe(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&&b&&(c.tagStart!==B||c.anchorStart!==B)&&(S===33||S===38)){const M=Ze(e),N=t+1;if(Ft(e,e.position-e.lineStart,N,c)&&e.events[M.eventsLength]?.type===3)return e.depth--,!0;Ue(e,M)}if(s&&(S===33&&c.tagStart!==B||S===38&&c.anchorStart!==B)||!mo(e,c,n===qe)&&!Ao(e,c))break;u===null&&(u=w),oe(e,!0)?(s=!0,m=b,e.lineIndent>t?a=1:e.lineIndent===t?a=0:a=-1):m=!1}if(m&&(m=s||i),a===1||n===ht){const S=n===qe||n===Dt?t:t+1,w=e.position-e.lineStart;if(a===1)if(m&&(In(e,w,c)||Ft(e,w,S,c))||Ro(e,S,c))l=!0;else{const M=e.input.charCodeAt(e.position);if(u!==null&&o&&b&&!m&&M!==124&&M!==62){const N=Ze(e),$=u.position-u.lineStart;Ue(e,u),Ft(e,$,S,_n())&&e.events[N.eventsLength]?.type===3?l=!0:Ue(e,N)}!l&&(E&&bo(e,S,c)||Eo(e,S,c)||So(e,S,c)||yo(e,c)||To(e,S,n,c))&&(l=!0)}else a===0&&(l=m&&In(e,w,c))}return E=E&&!l,!l&&(c.anchorStart!==B||c.tagStart!==B||E)&&(Ye(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&&!he(e.input.charCodeAt(e.position));)e.position++;const n=e.input.slice(t,e.position),r=[];for(n.length===0&&_(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&&!he(e.input.charCodeAt(e.position));)e.position++;r.push(e.input.slice(i,e.position))}if(Z(e.input.charCodeAt(e.position))&&gt(e),n==="YAML"){e.directives.some(o=>o.kind==="yaml")&&_(e,"duplication of %YAML directive"),r.length!==1&&_(e,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);i===null&&_(e,"ill-formed argument of the YAML directive"),parseInt(i[1],10)!==1&&_(e,"unacceptable YAML version of the document"),e.directives.push({kind:"yaml",version:r[0]})}else if(n==="TAG"){r.length!==2&&_(e,"TAG directive accepts exactly two arguments");const[i,o]=r;fr.test(i)||_(e,"ill-formed tag handle (first argument) of the TAG directive"),cr.call(e.tagHandlers,i)&&_(e,`there is a previously declared suffix for "${i}" tag handle`),lo.test(o)||_(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 xo(e){e.directives=[],e.tagHandlers=Object.create(null);let t=!1;for(oe(e,!0);vo(e);)t=!0,oe(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&&be(e.input.charCodeAt(e.position+3))){n=!0;const s=e.line;e.position+=3,oe(e,!0),i=e.line>s}else t&&_(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,oe(e,!0);return}if(co(e,n,!1),ke(e,e.lineIndent-1,ht,!1,i,i)||ie(e),oe(e,!0),e.position===e.lineStart&&$e(e)&&(r=e.input.charCodeAt(e.position)===46,r)){const s=e.line;e.position+=3,oe(e,!0),e.line===s&&e.position<e.length&&_(e,"end of the stream or a document separator is expected")}const a=e.events[o];a?.type===1&&(a.explicitEnd=r),De(e),!r&&e.position<e.length&&!(e.position===e.lineStart&&$e(e))&&_(e,"end of the stream or a document separator is expected")}function _o(e,t){const n=e.length,r={...on,...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&&Tt(e,i,"null byte is not allowed in input",r.filename),r.input.charCodeAt(r.position)===65279&&r.position++;r.position<r.length&&(oe(r,!0),!(r.position>=r.length));){const o=r.position;xo(r),r.position===o&&_(r,"can not read a document")}return r.events}var wo={...on,...rn};function Io(e,t={}){const n={...wo,...t},r=String(e),i=Object.keys(on),o=Object.keys(rn);return ro(_o(r,Bt(n,i)),{...Bt(n,o),source:r})}function No(e,t,n){let r=null;typeof t=="function"?r=t:t!==null&&typeof t=="object"&&(n=t);const i=Io(e,n);if(r===null)return i;for(const o of i)r(o)}var st=class{tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},Ne=Symbol("INVALID");function Oo(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 $o(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 Ve(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 st,anchor:c.anchor}}const n=$o(e,t);if(!n){if(t===void 0||e.skipInvalid)return Ne;throw new Ct(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`)}const{tag:r,tagName:i,implicitTag:o}=n,a=o?i:ar(i);if(r.nodeKind==="scalar"){const c=new st;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 st;E.tagged=!o;const m={kind:"sequence",tag:a,style:E,items:[]};e.noRefs||e.refs.set(t,m);for(let b=0,S=c.length;b<S;b+=1){let w=Ve(e,c[b]);w===Ne&&c[b]===void 0&&(w=Ve(e,null)),w!==Ne&&m.items.push(w)}return m}const s=r.represent(t),l=new st;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=Ve(e,c);if(m===Ne)continue;const b=Ve(e,E);b!==Ne&&u.items.push({key:m,value:b})}return u}function ko(e,t,n={}){const r=Ve({representTypes:Oo(t),noRefs:n.noRefs??!1,skipInvalid:n.skipInvalid??!1,refs:new Map,refCounter:0},e);return[{contents:r===Ne?null:r,directives:[]}]}var Lo=Symbol("visit:break"),gr=Symbol("visit:skip");function ft(e,t,n){const r=t(e,n);if(r===Lo)return!0;if(r===gr)return!1;const i=n.depth+1;switch(e.kind){case"sequence":for(const o of e.items)if(ft(o,t,{depth:i,parent:e,isKey:!1}))return!0;break;case"mapping":for(const{key:o,value:a}of e.items)if(ft(o,t,{depth:i,parent:e,isKey:!0})||ft(a,t,{depth:i,parent:e,isKey:!1}))return!0;break}return!1}function Po(e,t){for(const n of e)if(n.contents&&ft(n.contents,t,{depth:0,parent:null,isKey:!1}))return}var an=65279,Fo=9,Fe=10,mr=13,Ho=32,Mo=33,Ar=34,Gt=35,Bo=37,Do=38,yr=39,Uo=42,Yt=44,sn=45,tt=58,Ko=61,qo=62,Er=63,Go=64,jt=91,Wt=93,Yo=96,Vt=123,jo=124,Xt=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 ln={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 Wo(e){return e.style.tagged?e.tag:ar(e.tag)}function Vo(e){const t={...ln,...e};return{...t,defaultScalarTagName:t.schema.defaultScalarTag.tagName,implicitResolvers:t.schema.implicitScalarTags}}function Xo(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 Nn(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 zt(e,t){return`
21
- ${" ".repeat(e.indent*t)}`}function zo(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 On(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 Ge(e){return e===Ho||e===Fo}function Qo(e){const t=e.charCodeAt(0);if(t!==sn&&t!==46||e.charCodeAt(1)!==t||e.charCodeAt(2)!==t)return!1;if(e.length===3)return!0;const n=e.charCodeAt(3);return Ge(n)||n===mr||n===Fe}function nt(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==an||e>=65536&&e<=1114111}function $n(e){return nt(e)&&e!==an&&e!==mr&&e!==Fe}function Qt(e,t,n){const r=$n(e),i=r&&!Ge(e);return(n?r:r&&e!==Yt&&e!==jt&&e!==Wt&&e!==Vt&&e!==Xt)&&e!==Gt&&!(t===tt&&!i)||$n(t)&&!Ge(t)&&e===Gt||t===tt&&i&&(n||e!==Yt&&e!==jt&&e!==Wt&&e!==Vt&&e!==Xt)}function Zo(e){return nt(e)&&e!==an&&!Ge(e)&&e!==sn&&e!==Er&&e!==tt&&e!==Yt&&e!==jt&&e!==Wt&&e!==Vt&&e!==Xt&&e!==Gt&&e!==Do&&e!==Uo&&e!==Mo&&e!==jo&&e!==Ko&&e!==qo&&e!==yr&&e!==Ar&&e!==Bo&&e!==Go&&e!==Yo}function Jo(e,t){const n=Ke(e,0);if(Zo(n))return!0;if(e.length>1&&(n===sn||n===Er||n===tt)){const r=Ke(e,1);return!Ge(r)&&Qt(r,n,t)}return!1}function ea(e){return!Ge(e)&&e!==tt}function Ke(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 Sr(e){return/^\n* /.test(e)}var rt=1,Je=2,cn=3,un=4,ve=5;function ta(e,t,n,r,i,o){const{blockIndent:a,lineWidth:s}=n;let l,u=0,c=-1,E=!1,m=!1;const b=s!==-1;let S=-1,w=!Qo(t)&&Jo(t,o)&&ea(Ke(t,t.length-1));if(r||i)for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=Ke(t,l),!nt(u))return ve;w=w&&Qt(u,c,o),c=u}else{for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=Ke(t,l),u===Fe)E=!0,b&&(m=m||l-S-1>s&&!it(t[S+1]),S=l);else if(!nt(u))return ve;w=w&&Qt(u,c,o),c=u}m=m||b&&l-S-1>s&&!it(t[S+1])}return!E&&!m?w&&!i?rt:e.quoteStyle==="double"?ve:Je:a>9&&Sr(t)?ve:m?un:cn}function na(e,t,n){const{indent:r,blockIndent:i,lineWidth:o}=n;switch(t){case rt:return Ln(e,r);case Je:return`'${Ln(e,r).replace(/'/g,"''")}'`;case cn:return"|"+kn(e,i)+Pn(Nn(e,r));case un:return">"+kn(e,i)+Pn(Nn(ia(e,o),r));case ve:return`"${oa(e)}"`}}function ra(e,t,n,r,i){const o=r||!i;if(t.style.singleQuoted)return Je;if(t.style.doubleQuoted)return ve;if(!o){if(t.style.literal)return cn;if(t.style.folded)return un}const a=t.value;if(a.length===0)return t.style.tagged||On(e,a)===t.tag?rt:e.quoteStyle==="double"?ve:Je;const s=ta(e,a,n,o,e.forceQuotes&&!r,i);return s===rt&&!t.style.tagged&&On(e,a)!==t.tag?e.quoteStyle==="double"?ve:Je:s}function kn(e,t){const n=Sr(e)?String(t):"",r=e[e.length-1]===`
22
- `;return`${n}${r&&(e[e.length-2]===`
23
- `||e===`
24
- `)?"+":r?"":"-"}
25
- `}function Ln(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 Pn(e){return e[e.length-1]===`
28
- `?e.slice(0,-1):e}function it(e){return e===" "||e===" "}function ia(e,t){const n=/(\n+)([^\n]*)/g;let r=e.indexOf(`
29
- `);r===-1&&(r=e.length),n.lastIndex=r;let i=Fn(e.slice(0,r),t),o=e[0]===`
30
- `||it(e[0]),a,s;for(;s=n.exec(e);){const l=s[1],u=s[2];a=u!==""&&it(u[0]),i+=l+(!o&&!a&&u!==""?`
31
- `:"")+Fn(u,t),o=a}return i}function Fn(e,t){if(e===""||it(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 oa(e){let t="",n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=Ke(e,r);const i=te[n];if(i){t+=i;continue}if(nt(n)){t+=e[r],n>=65536&&(t+=e[r+1]);continue}t+=Xo(n)}return t}function aa(e,t,n){let r="";for(let o=0,a=n.items.length;o<a;o+=1){const s=Ce(e,t,n.items[o],{});r!==""&&(r+=`,${e.flowSkipCommaSpace?"":" "}`),r+=s}const i=e.flowBracketPadding&&r!==""?" ":"";return`[${i}${r}${i}]`}function Hn(e,t,n,r){let i="";for(let o=0,a=n.items.length;o<a;o+=1){const s=Ce(e,t+1,n.items[o],{block:!0,compact:e.seqInlineFirst,isblockseq:!0});(!r||i!=="")&&(i+=zt(e,t)),s===""||Fe===s.charCodeAt(0)?i+="-":i+="- ",i+=s}return i}function sa(e,t,n){let r="";const i=br(e,n.items);for(const{key:a,value:s}of i){let l="";r!==""&&(l+=`,${e.flowSkipCommaSpace?"":" "}`);const u=Ce(e,t,a,{iskey:!0}),c=u.length>1024;c?l+="? ":e.quoteFlowKeys&&(l+='"');const E=Ce(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 lt(e){return e.kind==="scalar"?e.value:e}function br(e,t){if(!e.sortKeys)return t;const n=t.slice();if(e.sortKeys===!0)n.sort((r,i)=>{const o=lt(r.key),a=lt(i.key);return o<a?-1:o>a?1:0});else{const r=e.sortKeys;n.sort((i,o)=>r(lt(i.key),lt(o.key)))}return n}function la(e,t,n,r){let i="";const o=br(e,n.items);for(let a=0,s=o.length;a<s;a+=1){let l="";(!r||i!=="")&&(l+=zt(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?Ce(e,t+1,u,{block:!0,compact:!0,isblockseq:!Zt(e,u,t+1)}):Ce(e,t+1,u,{block:!0,compact:!0,iskey:!0}),b=u.kind==="scalar"&&u.value.indexOf(`
35
- `)!==-1,S=E||b||m.length>1024;S&&(m&&Fe===m.charCodeAt(0)?l+="?":l+="? "),l+=m,S&&(l+=zt(e,t));const w=Ce(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)!==yr&&m.charCodeAt(m.length-1)!==Ar,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 Ce(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=la(e,t,n,s):u=sa(e,t,n);else if(n.kind==="sequence")E?e.seqNoIndent&&!a&&t>0?u=Hn(e,t-1,n,s):u=Hn(e,t,n,s):u=aa(e,t,n);else{const m=zo(e,t),b=ra(e,n,m,o,i);u=na(n.value,b,m),c=n.style.tagged||b!==rt&&n.tag!==e.defaultScalarTagName}if(E&&s&&t>0&&e.indent>2&&(u=`${" ".repeat(e.indent-2)}${u}`),c||l){const m=[],b=c?Wo(n):null,S=l?`&${n.anchor}`:null;e.tagBeforeAnchor?(b!==null&&m.push(b),S!==null&&m.push(S)):(S!==null&&m.push(S),b!==null&&m.push(b));const w=u===""||u.charCodeAt(0)===Fe?"":" ";u=`${m.join(" ")}${w}${u}`}return u}function ca(e){return(e.kind==="sequence"||e.kind==="mapping")&&!e.style.flow&&e.items.length!==0&&!e.style.tagged&&e.anchor===void 0}function ua(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 fa(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 pa(e,t){const n=Vo(t);let r="",i=!1;for(let o=0;o<e.length;o+=1){const a=e[o],s=fa(a),l=s!=="",u=a.explicitStart||l||o>0&&!i;if(r+=s,a.contents===null)u&&(r+=`---
41
- `);else if(u){const c=Ce(n,0,a.contents,{block:!0,compact:!0}),E=c===""?"":l||ca(a.contents)?`
42
- `:" ";r+=`---${E}${c}
43
- `}else r+=Ce(n,0,a.contents,{block:!0,compact:!0})+`
44
- `;i=a.explicitEnd||a.contents!==null&&ua(a.contents),i&&(r+=`...
45
- `)}return r}var da=Di.withTags({...Ht,resolve:(e,t,n)=>{const r=Ht.resolve(e,t,n);return r===H?Vn.resolve(e,t,n):r}},{...Mt,resolve:(e,t,n)=>{const r=Mt.resolve(e,t,n);return r===H?Xn.resolve(e,t,n):r}}),ha={...ln,schema:da,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:()=>{}};function ga(e,t={}){const n={...ha,...t},r=ko(e,n.schema,{noRefs:n.noRefs,skipInvalid:n.skipInvalid});return n.flowLevel>=0&&Po(r,(i,o)=>{if(!(o.depth<n.flowLevel))return i.style.flow=!0,gr}),n.transform(r),pa(r,{...Bt(n,Object.keys(ln)),schema:n.schema})}const ma=nr.withTags(zn,Qn,Zn,Jn,er),fn=(e,t)=>{const n=No(e,{schema:ma,...t});if(n.length===0)return e.trim()===""?void 0:null;if(n.length>1)throw new Ct("expected a single document in the stream, but found more");return n[0]},Aa=(e,t)=>ga(e,t),ya=/\((\d+):(\d+)\)$/;class ot extends Error{originalError;source;col;line;constructor(t,n){super(t.message.split(`
46
- `)[0]),this.originalError=t,this.source=n,Object.setPrototypeOf(this,ot.prototype);const[,r,i]=this.message.match(ya)||[];this.line=parseInt(r,10),this.col=parseInt(i,10)}}const Ea=[".graphql",".gql"];function pn(e){const t=e.toLowerCase();return Ea.some(n=>t.endsWith(n))}function Cr(e,t){return e.hasOwnProperty(t)?e[t]:void 0}function Tr(e){return e.endsWith(".yaml")||e.endsWith(".yml")||e.endsWith(".json")}function pt(e,t){return e+"::"+t}function Sa(){return new Promise(e=>{setTimeout(e)})}class mt{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 Rt extends Error{originalError;constructor(t){super(t.message),this.originalError=t,Object.setPrototypeOf(this,Rt.prototype)}}function ba(e,t){const n=new mt(t,e);if(pn(t))return{source:n,parsed:e};try{return{source:n,parsed:fn(e,{filename:t})}}catch(r){throw new ot(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 Re(n)?n:t&&Re(t)?new URL(n,t).href:le.pathBrowserifyExports.resolve(t?le.pathBrowserifyExports.dirname(t):process.cwd(),n)}async loadExternalRef(t){try{if(Re(t)){const{body:n,mimeType:r}=await Kn(t,this.config.http);return new mt(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 mt(t,n.replace(/\r\n/g,`
47
- `))}}catch(n){throw n.message=n.message.replace(", lstat",""),new Rt(n)}}parseDocument(t,n=!1){if(pn(t.absoluteRef))return{source:t,parsed:t.body};const r=Re(t.absoluteRef)?new URL(t.absoluteRef).pathname:t.absoluteRef;if(!Tr(r)&&!t.mimeType?.match(/(json|yaml|openapi)/)&&!n)return{source:t,parsed:t.body};try{return{source:t,parsed:fn(t.body,{filename:t.absoluteRef})}}catch(i){throw new ot(i,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 Mn(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 ct={name:"unknown",properties:{}},Ra={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 b=c.source.absoluteRef,S=new Map;w(u,m,b+E);function w(N,$,y){if(!le.isPlainObject(N)&&!Array.isArray(N))return;const v=`${$.name}::${y}`;if(o.has(v))return;if(o.add(v),Array.isArray(N)){const R=$.items;if(R===void 0&&$!==ct&&$!==Xe)return;const A=typeof R=="function";for(let g=0;g<N.length;g++){let x=A?R(N[g],Se(y,g)):R;if(x===void 0&&$!==ct&&$!==Xe)continue;const j=x?.directResolveAs?{$ref:N[g]}:N[g];x=x?.directResolveAs||x,w(j,ze(x)?x:ct,Se(y,g))}return}const[f,I]=Object.entries(N).find(([R])=>R==="$anchor")||[];I&&S.set(`#${I}`,N);for(const R of Object.keys(N)){let A=N[R],g=Cr($.properties,R);const x=$.extensionsPrefix!==void 0&&R.startsWith($.extensionsPrefix);g===void 0&&!x&&(g=$.additionalProperties),typeof g=="function"&&(g=g(A,R)),x&&g===void 0&&(g=Xe),g===void 0&&(g=ct),!ze(g)&&g?.directResolveAs&&(g=g.directResolveAs,A={$ref:A}),g&&g.name===void 0&&g.resolvable!==!1&&(g=Ra),!(!ze(g)||!(le.isPlainObject(A)||Array.isArray(A)))&&w(A,g,Se(y,Oe(R)))}if(Qe(N)){const R=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(R)}if(Gn(N)){const R=M(c,{$ref:N.externalValue},{prev:null,node:N}).then(A=>{A.resolved&&l(A.node,A.document,A.nodePointer,$)});a.push(R)}}async function M(N,$,y){if(Ta(y.prev,$))throw new Error("Self-referencing circular pointer");if(Dr($.$ref)){await Sa();const k={resolved:!0,isRemote:!1,node:S.get($.$ref),document:N,nodePointer:$.$ref},U=pt(N.source.absoluteRef,$.$ref);return i.set(U,k),k}const{uri:v,pointer:f}=jn($.$ref),I=v!==null&&n.resolveExternalRef(N.source.absoluteRef,v)!==N.source.absoluteRef;let R;try{R=I?await n.resolveDocument(N.source.absoluteRef,v):N}catch(k){const U={resolved:!1,isRemote:I,document:void 0,error:k},pe=pt(N.source.absoluteRef,$.$ref);return i.set(pe,U),U}let A={resolved:!0,document:R,isRemote:I,node:N.parsed,nodePointer:"#/"},g=R.parsed;const x=f;for(const k of x)if(le.isPlainObject(g)&&g[k]!==void 0)g=g[k],A.nodePointer=Se(A.nodePointer,Oe(k));else if(Array.isArray(g)&&g[+k]!==void 0)g=g[+k],A.nodePointer=Se(A.nodePointer,Oe(k));else if(Qe(g))if(A=await M(R,g,Mn(y,g)),A.chain=void 0,R=A.document||R,le.isPlainObject(A.node))g=A.node[k],A.nodePointer=Se(A.nodePointer,Oe(k));else if(Array.isArray(A.node))g=A.node[+k],A.nodePointer=Se(A.nodePointer,Oe(k));else{g=void 0;break}else{g=void 0;break}A.node=g,A.document=R;const j=pt(N.source.absoluteRef,$.$ref);if(A.document&&Qe(g)){const k=qn(g)?{node:g,document:A.document,location:new et(A.document.source,A.nodePointer)}:void 0;A=await M(A.document,g,Mn(y,g)),k&&A.resolved&&(A={...A,chain:[k,...A.chain??[]]})}return i.set(j,A),{...A}}}}exports.BaseResolver=Ca;exports.Location=et;exports.ResolveError=Rt;exports.Source=mt;exports.SpecExtension=Xe;exports.YamlParseError=ot;exports.env=Un;exports.escapePointerFragment=Oe;exports.getDir=Hr;exports.getOwn=Cr;exports.isAbsoluteUrl=Re;exports.isBrowser=Dn;exports.isExternalValue=Gn;exports.isGraphqlRef=pn;exports.isMappingRef=Br;exports.isNamedType=ze;exports.isRef=Qe;exports.isRefWithSiblings=qn;exports.isSupportedExtension=Tr;exports.isTruthy=Bn;exports.joinPointer=Se;exports.listOf=$r;exports.makeDocumentFromString=ba;exports.makeRefId=pt;exports.mapOf=kr;exports.normalizeTypes=Lr;exports.parsePointer=Wn;exports.parseRef=jn;exports.parseYaml=fn;exports.pointerBaseName=Pr;exports.readFileFromUrl=Kn;exports.refBaseName=Fr;exports.replaceRef=Ur;exports.resolveDocument=va;exports.resolvePath=Mr;exports.stringifyYaml=Aa;exports.unescapePointerFragment=Yn;