@novu/framework 2.11.2-alpha.0 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/cjs/{agent.types-DdgaVUb7.d.cts → agent.types-Dqm2VBTO.d.cts} +56 -2
  2. package/dist/cjs/ai-sdk/index.cjs +1 -1
  3. package/dist/cjs/ai-sdk/index.d.cts +2 -1
  4. package/dist/cjs/{health-check.types-CkUmYLNG.d.cts → health-check.types-B9FbzRbm.d.cts} +2 -2
  5. package/dist/cjs/{index-BCp3U0UG.d.cts → index-1DobCKAF.d.cts} +4 -33
  6. package/dist/cjs/index.cjs +72 -72
  7. package/dist/cjs/index.d.cts +4 -4
  8. package/dist/cjs/internal/index.cjs +1 -1
  9. package/dist/cjs/internal/index.d.cts +7 -5
  10. package/dist/cjs/langchain/index.cjs +1 -1
  11. package/dist/cjs/langchain/index.d.cts +2 -1
  12. package/dist/cjs/servers/express.cjs +86 -86
  13. package/dist/cjs/servers/express.d.cts +5 -5
  14. package/dist/cjs/servers/h3.cjs +93 -93
  15. package/dist/cjs/servers/h3.d.cts +5 -5
  16. package/dist/cjs/servers/lambda.cjs +72 -72
  17. package/dist/cjs/servers/lambda.d.cts +5 -5
  18. package/dist/cjs/servers/nest.cjs +105 -105
  19. package/dist/cjs/servers/nest.d.cts +7 -7
  20. package/dist/cjs/servers/next.cjs +86 -86
  21. package/dist/cjs/servers/next.d.cts +5 -5
  22. package/dist/cjs/servers/nuxt.cjs +93 -93
  23. package/dist/cjs/servers/nuxt.d.cts +5 -5
  24. package/dist/cjs/servers/remix.cjs +86 -86
  25. package/dist/cjs/servers/remix.d.cts +5 -5
  26. package/dist/cjs/servers/sveltekit.cjs +91 -91
  27. package/dist/cjs/servers/sveltekit.d.cts +5 -5
  28. package/dist/cjs/step-resolver.cjs +1 -1
  29. package/dist/cjs/step-resolver.d.cts +2 -2
  30. package/dist/cjs/{subscriber.types-DxMMRBIi.d.cts → subscriber.types-DubxcL8q.d.cts} +16 -0
  31. package/dist/cjs/validators.cjs +1 -1
  32. package/dist/esm/{agent.types-Bu3DhlVb.d.ts → agent.types-E3sxq6xr.d.ts} +56 -2
  33. package/dist/esm/ai-sdk/index.d.ts +2 -1
  34. package/dist/esm/ai-sdk/index.js +1 -1
  35. package/dist/esm/{chunk-DKQLYSZS.js → chunk-22DBAEUX.js} +1 -1
  36. package/dist/esm/{chunk-QTWEINJ4.js → chunk-CANJPWLT.js} +1 -1
  37. package/dist/esm/chunk-E2MET7IR.js +1 -0
  38. package/dist/esm/chunk-EZ22F362.js +98 -0
  39. package/dist/esm/{health-check.types-nDCnGlmX.d.ts → health-check.types-BNocZ4Wk.d.ts} +2 -2
  40. package/dist/esm/{index-DEehllqa.d.ts → index-aVljLqR4.d.ts} +4 -33
  41. package/dist/esm/index.d.ts +4 -4
  42. package/dist/esm/index.js +1 -1
  43. package/dist/esm/internal/index.d.ts +7 -5
  44. package/dist/esm/internal/index.js +1 -1
  45. package/dist/esm/langchain/index.d.ts +2 -1
  46. package/dist/esm/langchain/index.js +1 -1
  47. package/dist/esm/servers/express.d.ts +5 -5
  48. package/dist/esm/servers/express.js +1 -1
  49. package/dist/esm/servers/h3.d.ts +5 -5
  50. package/dist/esm/servers/h3.js +1 -1
  51. package/dist/esm/servers/lambda.d.ts +5 -5
  52. package/dist/esm/servers/lambda.js +1 -1
  53. package/dist/esm/servers/nest.d.ts +7 -7
  54. package/dist/esm/servers/nest.js +1 -1
  55. package/dist/esm/servers/next.d.ts +5 -5
  56. package/dist/esm/servers/next.js +1 -1
  57. package/dist/esm/servers/nuxt.d.ts +5 -5
  58. package/dist/esm/servers/nuxt.js +1 -1
  59. package/dist/esm/servers/remix.d.ts +5 -5
  60. package/dist/esm/servers/remix.js +1 -1
  61. package/dist/esm/servers/sveltekit.d.ts +5 -5
  62. package/dist/esm/servers/sveltekit.js +1 -1
  63. package/dist/esm/step-resolver.d.ts +2 -2
  64. package/dist/esm/step-resolver.js +1 -1
  65. package/dist/esm/{subscriber.types-BbyO_Cz6.d.ts → subscriber.types-CmybpXhA.d.ts} +16 -0
  66. package/dist/esm/validators.js +1 -1
  67. package/package.json +2 -2
  68. package/dist/esm/chunk-KLIOXJR3.js +0 -1
  69. package/dist/esm/chunk-YF62BBGH.js +0 -98
@@ -1,164 +1,164 @@
1
- "use strict";var Ag=Object.create;var tr=Object.defineProperty;var Gc=Object.getOwnPropertyDescriptor;var Eg=Object.getOwnPropertyNames;var _g=Object.getPrototypeOf,Og=Object.prototype.hasOwnProperty;var Rg=(e,n,t)=>n in e?tr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var M=(e,n,t)=>()=>{if(t)throw t[0];try{return e&&(n=e(e=0)),n}catch(r){throw t=[r],r}};var Ig=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}},Aa=(e,n)=>{for(var t in n)tr(e,t,{get:n[t],enumerable:!0})},Kc=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Eg(n))!Og.call(e,i)&&i!==t&&tr(e,i,{get:()=>n[i],enumerable:!(r=Gc(n,i))||r.enumerable});return e};var Bt=(e,n,t)=>(t=e!=null?Ag(_g(e)):{},Kc(n||!e||!e.__esModule?tr(t,"default",{value:e,enumerable:!0}):t,e)),Cg=e=>Kc(tr({},"__esModule",{value:!0}),e),Xt=(e,n,t,r)=>{for(var i=r>1?void 0:r?Gc(n,t):n,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(n,t,i):a(i))||i);return r&&i&&tr(n,t,i),i},Qt=(e,n)=>(t,r)=>n(t,r,e);var ke=(e,n,t)=>Rg(e,typeof n!="symbol"?n+"":n,t);function bn(e,n){let t=n||ty,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Fu(e,r,i)}function Fu(e,n,t){if(ny(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Du(e.children,n,t)}return Array.isArray(e)?Du(e,n,t):""}function Du(e,n,t){let r=[],i=-1;for(;++i<e.length;)r[i]=Fu(e[i],n,t);return r.join("")}function ny(e){return!!(e&&typeof e=="object")}var ty,Uu=M(()=>{"use strict";ty={}});var qr=M(()=>{"use strict";Uu()});function Ma(e,n){let t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}var $u=M(()=>{"use strict"});function zn(e){return e!==null&&(e<32||e===127)}function se(e){return e!==null&&e<-2}function Le(e){return e!==null&&(e<0||e===32)}function Se(e){return e===-2||e===-1||e===32}function Rn(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var ht,ft,qu,jr,ju,Bu,Vn,rn,Be=M(()=>{"use strict";ht=Rn(/[A-Za-z]/),ft=Rn(/[\dA-Za-z]/),qu=Rn(/[#-'*+\--9=?A-Z^-~]/);jr=Rn(/\d/),ju=Rn(/[\dA-Fa-f]/),Bu=Rn(/[!-/:-@[-`{-~]/);Vn=Rn(/\p{P}|\p{S}/u),rn=Rn(/\s/)});function Na(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var zu=M(()=>{"use strict"});function ry(e){let n=[],t=-1;for(;++t<e.length;)n[t]=In(e[t]);return to(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function iy(e){let n=e;return to(t);function t(r){let i=r,o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function oy(e){return to(n);function n(t){return t&&t.type===e}}function to(e){return n;function n(t,r,i){return!!(sy(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function ay(){return!0}function sy(e){return e!==null&&typeof e=="object"&&"type"in e}var In,Vu=M(()=>{"use strict";In=(function(e){if(e==null)return ay;if(typeof e=="function")return to(e);if(typeof e=="object")return Array.isArray(e)?ry(e):iy(e);if(typeof e=="string")return oy(e);throw new Error("Expected function, string, or object as test")})});var no=M(()=>{"use strict";Vu()});function Hu(e){return"\x1B[33m"+e+"\x1B[39m"}var Wu=M(()=>{"use strict"});function Br(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;let o=In(i),a=r?-1:1;s(e,void 0,[])();function s(u,p,d){let h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){let g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+Hu(u.type+(g?"<"+g+">":""))+")"})}return y;function y(){let g=Yu,P,ee,Z;if((!n||o(u,p,d[d.length-1]||void 0))&&(g=ly(t(u,d)),g[0]===Hn))return g;if("children"in u&&u.children){let B=u;if(B.children&&g[0]!==io)for(ee=(r?B.children.length:-1)+a,Z=d.concat(B);ee>-1&&ee<B.children.length;){let ue=B.children[ee];if(P=s(ue,ee,Z)(),P[0]===Hn)return P;ee=typeof P[1]=="number"?P[1]:ee+a}}return g}}}function ly(e){return Array.isArray(e)?e:typeof e=="number"?[ro,e]:e==null?Yu:[e]}var Yu,ro,Hn,io,Ju=M(()=>{"use strict";no();Wu();Yu=[],ro=!0,Hn=!1,io="skip"});var oo=M(()=>{"use strict";Ju()});function La(e,n,t){let i=In((t||{}).ignore||[]),o=cy(n),a=-1;for(;++a<o.length;)Br(e,"text",s);function s(p,d){let h=-1,y;for(;++h<d.length;){let g=d[h],P=y?y.children:void 0;if(i(g,P?P.indexOf(g):void 0,y))return;y=g}if(y)return u(p,d)}function u(p,d){let h=d[d.length-1],y=o[a][0],g=o[a][1],P=0,Z=h.children.indexOf(p),B=!1,ue=[];y.lastIndex=0;let ne=y.exec(p.value);for(;ne;){let ve=ne.index,Re={index:ne.index,input:ne.input,stack:[...d,p]},$=g(...ne,Re);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?y.lastIndex=ve+1:(P!==ve&&ue.push({type:"text",value:p.value.slice(P,ve)}),Array.isArray($)?ue.push(...$):$&&ue.push($),P=ve+ne[0].length,B=!0),!y.global)break;ne=y.exec(p.value)}return B?(P<p.value.length&&ue.push({type:"text",value:p.value.slice(P)}),h.children.splice(Z,1,...ue)):ue=[p],Z+ue.length}}function cy(e){let n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<t.length;){let i=t[r];n.push([uy(i[0]),py(i[1])])}return n}function uy(e){return typeof e=="string"?new RegExp(Na(e),"g"):e}function py(e){return typeof e=="function"?e:function(){return e}}var Gu=M(()=>{"use strict";zu();oo();no()});var Ku=M(()=>{"use strict";Gu()});function $a(){return{transforms:[yy],enter:{literalAutolink:dy,literalAutolinkEmail:Ua,literalAutolinkHttp:Ua,literalAutolinkWww:Ua},exit:{literalAutolink:gy,literalAutolinkEmail:my,literalAutolinkHttp:hy,literalAutolinkWww:fy}}}function qa(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Da,notInConstruct:Fa},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Da,notInConstruct:Fa},{character:":",before:"[ps]",after:"\\/",inConstruct:Da,notInConstruct:Fa}]}}function dy(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ua(e){this.config.enter.autolinkProtocol.call(this,e)}function hy(e){this.config.exit.autolinkProtocol.call(this,e)}function fy(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function my(e){this.config.exit.autolinkEmail.call(this,e)}function gy(e){this.exit(e)}function yy(e){La(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,by],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,wy]],{ignore:["link","linkReference"]})}function by(e,n,t,r,i){let o="";if(!Xu(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!Sy(t)))return!1;let a=Ty(t+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+n+a[0],children:[{type:"text",value:n+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function wy(e,n,t,r){return!Xu(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Sy(e){let n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Ty(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")"),i=Ma(e,"("),o=Ma(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function Xu(e,n){let t=e.input.charCodeAt(e.index-1);return(e.index===0||rn(t)||Vn(t))&&(!n||t!==47)}var Da,Fa,Qu=M(()=>{"use strict";$u();Be();Ku();Da="phrasing",Fa=["autolink","link","image","label"]});var Zu=M(()=>{"use strict";Qu()});function kt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var sr=M(()=>{"use strict"});function ja(){return{enter:{gfmFootnoteDefinition:xy,gfmFootnoteDefinitionLabelString:ky,gfmFootnoteCall:Ey,gfmFootnoteCallString:_y},exit:{gfmFootnoteDefinition:Ay,gfmFootnoteDefinitionLabelString:vy,gfmFootnoteCall:Ry,gfmFootnoteCallString:Oy}}}function Ba(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Cy,footnoteReference:ep}}}function xy(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ky(){this.buffer()}function vy(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=kt(this.sliceSerialize(e)).toLowerCase()}function Ay(e){this.exit(e)}function Ey(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _y(){this.buffer()}function Oy(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=kt(this.sliceSerialize(e)).toLowerCase()}function Ry(e){this.exit(e)}function ep(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),a=t.enter("footnoteReference"),s=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function Iy(){return"["}function Cy(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),a=t.enter("footnoteDefinition"),s=t.enter("label");return o+=i.move(t.safe(t.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(t.indentLines(t.containerFlow(e,i.current()),Py)),a(),o}function Py(e,n,t){return n===0?e:(t?"":" ")+e}var tp=M(()=>{"use strict";sr();ep.peek=Iy});var np=M(()=>{"use strict";tp()});function za(){return{canContainEols:["delete"],enter:{strikethrough:Ny},exit:{strikethrough:Ly}}}function Va(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:My}],handlers:{delete:rp}}}function Ny(e){this.enter({type:"delete",children:[]},e)}function Ly(e){this.exit(e)}function rp(e,n,t,r){let i=t.createTracker(r),o=t.enter("strikethrough"),a=i.move("~~");return a+=t.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Dy(){return"~"}var My,ip=M(()=>{"use strict";My=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rp.peek=Dy});var op=M(()=>{"use strict";ip()});function sp(e,n={}){let t=(n.align||[]).concat(),r=n.stringLength||Uy,i=[],o=[],a=[],s=[],u=0,p=-1;for(;++p<e.length;){let P=[],ee=[],Z=-1;for(e[p].length>u&&(u=e[p].length);++Z<e[p].length;){let B=Fy(e[p][Z]);if(n.alignDelimiters!==!1){let ue=r(B);ee[Z]=ue,(s[Z]===void 0||ue>s[Z])&&(s[Z]=ue)}P.push(B)}o[p]=P,a[p]=ee}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<u;)i[d]=ap(t[d]);else{let P=ap(t);for(;++d<u;)i[d]=P}d=-1;let h=[],y=[];for(;++d<u;){let P=i[d],ee="",Z="";P===99?(ee=":",Z=":"):P===108?ee=":":P===114&&(Z=":");let B=n.alignDelimiters===!1?1:Math.max(1,s[d]-ee.length-Z.length),ue=ee+"-".repeat(B)+Z;n.alignDelimiters!==!1&&(B=ee.length+B+Z.length,B>s[d]&&(s[d]=B),y[d]=B),h[d]=ue}o.splice(1,0,h),a.splice(1,0,y),p=-1;let g=[];for(;++p<o.length;){let P=o[p],ee=a[p];d=-1;let Z=[];for(;++d<u;){let B=P[d]||"",ue="",ne="";if(n.alignDelimiters!==!1){let ve=s[d]-(ee[d]||0),Re=i[d];Re===114?ue=" ".repeat(ve):Re===99?ve%2?(ue=" ".repeat(ve/2+.5),ne=" ".repeat(ve/2-.5)):(ue=" ".repeat(ve/2),ne=ue):ne=" ".repeat(ve)}n.delimiterStart!==!1&&!d&&Z.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&B==="")&&(n.delimiterStart!==!1||d)&&Z.push(" "),n.alignDelimiters!==!1&&Z.push(ue),Z.push(B),n.alignDelimiters!==!1&&Z.push(ne),n.padding!==!1&&Z.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&Z.push("|")}g.push(n.delimiterEnd===!1?Z.join("").replace(/ +$/,""):Z.join(""))}return g.join(`
2
- `)}function Fy(e){return e==null?"":String(e)}function Uy(e){return e.length}function ap(e){let n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}var lp=M(()=>{"use strict"});function cp(e,n,t,r){let i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);let a=t.indentLines(t.containerFlow(e,o.current()),$y);return i(),a}function $y(e,n,t){return">"+(t?"":" ")+e}var up=M(()=>{"use strict"});function dp(e,n){return pp(e,n.inConstruct,!0)&&!pp(e,n.notInConstruct,!1)}function pp(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}var hp=M(()=>{"use strict"});function Ha(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
3
- `&&dp(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
4
- `}var fp=M(()=>{"use strict";hp()});function mp(e,n){let t=String(e),r=t.indexOf(n),i=r,o=0,a=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+n.length,r=t.indexOf(n,i);return a}var gp=M(()=>{"use strict"});function yp(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}var bp=M(()=>{"use strict"});function wp(e){let n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}var Sp=M(()=>{"use strict"});function Tp(e,n,t,r){let i=wp(t),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(yp(e,t)){let h=t.enter("codeIndented"),y=t.indentLines(o,qy);return h(),y}let s=t.createTracker(r),u=i.repeat(Math.max(mp(o,i)+1,3)),p=t.enter("codeFenced"),d=s.move(u);if(e.lang){let h=t.enter(`codeFencedLang${a}`);d+=s.move(t.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){let h=t.enter(`codeFencedMeta${a}`);d+=s.move(" "),d+=s.move(t.safe(e.meta,{before:d,after:`
1
+ "use strict";var Rg=Object.create;var nr=Object.defineProperty;var Qc=Object.getOwnPropertyDescriptor;var Og=Object.getOwnPropertyNames;var Ig=Object.getPrototypeOf,Cg=Object.prototype.hasOwnProperty;var Pg=(e,n,t)=>n in e?nr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var M=(e,n,t)=>()=>{if(t)throw t[0];try{return e&&(n=e(e=0)),n}catch(r){throw t=[r],r}};var Mg=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}},Ra=(e,n)=>{for(var t in n)nr(e,t,{get:n[t],enumerable:!0})},Zc=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Og(n))!Cg.call(e,i)&&i!==t&&nr(e,i,{get:()=>n[i],enumerable:!(r=Qc(n,i))||r.enumerable});return e};var Bt=(e,n,t)=>(t=e!=null?Rg(Ig(e)):{},Zc(n||!e||!e.__esModule?nr(t,"default",{value:e,enumerable:!0}):t,e)),Ng=e=>Zc(nr({},"__esModule",{value:!0}),e),Xt=(e,n,t,r)=>{for(var i=r>1?void 0:r?Qc(n,t):n,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(n,t,i):a(i))||i);return r&&i&&nr(n,t,i),i},Qt=(e,n)=>(t,r)=>n(t,r,e);var ke=(e,n,t)=>Pg(e,typeof n!="symbol"?n+"":n,t);function bn(e,n){let t=n||oy,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return qu(e,r,i)}function qu(e,n,t){if(ay(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return $u(e.children,n,t)}return Array.isArray(e)?$u(e,n,t):""}function $u(e,n,t){let r=[],i=-1;for(;++i<e.length;)r[i]=qu(e[i],n,t);return r.join("")}function ay(e){return!!(e&&typeof e=="object")}var oy,ju=M(()=>{"use strict";oy={}});var Br=M(()=>{"use strict";ju()});function Da(e,n){let t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}var Bu=M(()=>{"use strict"});function Vn(e){return e!==null&&(e<32||e===127)}function se(e){return e!==null&&e<-2}function Le(e){return e!==null&&(e<0||e===32)}function Se(e){return e===-2||e===-1||e===32}function On(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var ht,ft,zu,zr,Vu,Wu,Wn,rn,Be=M(()=>{"use strict";ht=On(/[A-Za-z]/),ft=On(/[\dA-Za-z]/),zu=On(/[#-'*+\--9=?A-Z^-~]/);zr=On(/\d/),Vu=On(/[\dA-Fa-f]/),Wu=On(/[!-/:-@[-`{-~]/);Wn=On(/\p{P}|\p{S}/u),rn=On(/\s/)});function Fa(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Hu=M(()=>{"use strict"});function sy(e){let n=[],t=-1;for(;++t<e.length;)n[t]=In(e[t]);return io(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function ly(e){let n=e;return io(t);function t(r){let i=r,o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function cy(e){return io(n);function n(t){return t&&t.type===e}}function io(e){return n;function n(t,r,i){return!!(py(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function uy(){return!0}function py(e){return e!==null&&typeof e=="object"&&"type"in e}var In,Yu=M(()=>{"use strict";In=(function(e){if(e==null)return uy;if(typeof e=="function")return io(e);if(typeof e=="object")return Array.isArray(e)?sy(e):ly(e);if(typeof e=="string")return cy(e);throw new Error("Expected function, string, or object as test")})});var oo=M(()=>{"use strict";Yu()});function Ju(e){return"\x1B[33m"+e+"\x1B[39m"}var Gu=M(()=>{"use strict"});function Vr(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;let o=In(i),a=r?-1:1;s(e,void 0,[])();function s(u,p,d){let h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){let g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+Ju(u.type+(g?"<"+g+">":""))+")"})}return y;function y(){let g=Ku,P,ee,Z;if((!n||o(u,p,d[d.length-1]||void 0))&&(g=dy(t(u,d)),g[0]===Hn))return g;if("children"in u&&u.children){let B=u;if(B.children&&g[0]!==so)for(ee=(r?B.children.length:-1)+a,Z=d.concat(B);ee>-1&&ee<B.children.length;){let ue=B.children[ee];if(P=s(ue,ee,Z)(),P[0]===Hn)return P;ee=typeof P[1]=="number"?P[1]:ee+a}}return g}}}function dy(e){return Array.isArray(e)?e:typeof e=="number"?[ao,e]:e==null?Ku:[e]}var Ku,ao,Hn,so,Xu=M(()=>{"use strict";oo();Gu();Ku=[],ao=!0,Hn=!1,so="skip"});var lo=M(()=>{"use strict";Xu()});function Ua(e,n,t){let i=In((t||{}).ignore||[]),o=hy(n),a=-1;for(;++a<o.length;)Vr(e,"text",s);function s(p,d){let h=-1,y;for(;++h<d.length;){let g=d[h],P=y?y.children:void 0;if(i(g,P?P.indexOf(g):void 0,y))return;y=g}if(y)return u(p,d)}function u(p,d){let h=d[d.length-1],y=o[a][0],g=o[a][1],P=0,Z=h.children.indexOf(p),B=!1,ue=[];y.lastIndex=0;let ne=y.exec(p.value);for(;ne;){let Ae=ne.index,Oe={index:ne.index,input:ne.input,stack:[...d,p]},$=g(...ne,Oe);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?y.lastIndex=Ae+1:(P!==Ae&&ue.push({type:"text",value:p.value.slice(P,Ae)}),Array.isArray($)?ue.push(...$):$&&ue.push($),P=Ae+ne[0].length,B=!0),!y.global)break;ne=y.exec(p.value)}return B?(P<p.value.length&&ue.push({type:"text",value:p.value.slice(P)}),h.children.splice(Z,1,...ue)):ue=[p],Z+ue.length}}function hy(e){let n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<t.length;){let i=t[r];n.push([fy(i[0]),my(i[1])])}return n}function fy(e){return typeof e=="string"?new RegExp(Fa(e),"g"):e}function my(e){return typeof e=="function"?e:function(){return e}}var Qu=M(()=>{"use strict";Hu();lo();oo()});var Zu=M(()=>{"use strict";Qu()});function Ba(){return{transforms:[Ty],enter:{literalAutolink:gy,literalAutolinkEmail:ja,literalAutolinkHttp:ja,literalAutolinkWww:ja},exit:{literalAutolink:Sy,literalAutolinkEmail:wy,literalAutolinkHttp:yy,literalAutolinkWww:by}}}function za(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:$a,notInConstruct:qa},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:$a,notInConstruct:qa},{character:":",before:"[ps]",after:"\\/",inConstruct:$a,notInConstruct:qa}]}}function gy(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ja(e){this.config.enter.autolinkProtocol.call(this,e)}function yy(e){this.config.exit.autolinkProtocol.call(this,e)}function by(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function wy(e){this.config.exit.autolinkEmail.call(this,e)}function Sy(e){this.exit(e)}function Ty(e){Ua(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xy],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,ky]],{ignore:["link","linkReference"]})}function xy(e,n,t,r,i){let o="";if(!ep(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!Ay(t)))return!1;let a=vy(t+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+n+a[0],children:[{type:"text",value:n+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function ky(e,n,t,r){return!ep(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Ay(e){let n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function vy(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")"),i=Da(e,"("),o=Da(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function ep(e,n){let t=e.input.charCodeAt(e.index-1);return(e.index===0||rn(t)||Wn(t))&&(!n||t!==47)}var $a,qa,tp=M(()=>{"use strict";Bu();Be();Zu();$a="phrasing",qa=["autolink","link","image","label"]});var np=M(()=>{"use strict";tp()});function kt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var lr=M(()=>{"use strict"});function Va(){return{enter:{gfmFootnoteDefinition:Ey,gfmFootnoteDefinitionLabelString:_y,gfmFootnoteCall:Iy,gfmFootnoteCallString:Cy},exit:{gfmFootnoteDefinition:Oy,gfmFootnoteDefinitionLabelString:Ry,gfmFootnoteCall:My,gfmFootnoteCallString:Py}}}function Wa(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Ly,footnoteReference:rp}}}function Ey(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _y(){this.buffer()}function Ry(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=kt(this.sliceSerialize(e)).toLowerCase()}function Oy(e){this.exit(e)}function Iy(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Cy(){this.buffer()}function Py(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=kt(this.sliceSerialize(e)).toLowerCase()}function My(e){this.exit(e)}function rp(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),a=t.enter("footnoteReference"),s=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function Ny(){return"["}function Ly(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),a=t.enter("footnoteDefinition"),s=t.enter("label");return o+=i.move(t.safe(t.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(t.indentLines(t.containerFlow(e,i.current()),Dy)),a(),o}function Dy(e,n,t){return n===0?e:(t?"":" ")+e}var ip=M(()=>{"use strict";lr();rp.peek=Ny});var op=M(()=>{"use strict";ip()});function Ha(){return{canContainEols:["delete"],enter:{strikethrough:Uy},exit:{strikethrough:$y}}}function Ya(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Fy}],handlers:{delete:ap}}}function Uy(e){this.enter({type:"delete",children:[]},e)}function $y(e){this.exit(e)}function ap(e,n,t,r){let i=t.createTracker(r),o=t.enter("strikethrough"),a=i.move("~~");return a+=t.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function qy(){return"~"}var Fy,sp=M(()=>{"use strict";Fy=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ap.peek=qy});var lp=M(()=>{"use strict";sp()});function up(e,n={}){let t=(n.align||[]).concat(),r=n.stringLength||By,i=[],o=[],a=[],s=[],u=0,p=-1;for(;++p<e.length;){let P=[],ee=[],Z=-1;for(e[p].length>u&&(u=e[p].length);++Z<e[p].length;){let B=jy(e[p][Z]);if(n.alignDelimiters!==!1){let ue=r(B);ee[Z]=ue,(s[Z]===void 0||ue>s[Z])&&(s[Z]=ue)}P.push(B)}o[p]=P,a[p]=ee}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<u;)i[d]=cp(t[d]);else{let P=cp(t);for(;++d<u;)i[d]=P}d=-1;let h=[],y=[];for(;++d<u;){let P=i[d],ee="",Z="";P===99?(ee=":",Z=":"):P===108?ee=":":P===114&&(Z=":");let B=n.alignDelimiters===!1?1:Math.max(1,s[d]-ee.length-Z.length),ue=ee+"-".repeat(B)+Z;n.alignDelimiters!==!1&&(B=ee.length+B+Z.length,B>s[d]&&(s[d]=B),y[d]=B),h[d]=ue}o.splice(1,0,h),a.splice(1,0,y),p=-1;let g=[];for(;++p<o.length;){let P=o[p],ee=a[p];d=-1;let Z=[];for(;++d<u;){let B=P[d]||"",ue="",ne="";if(n.alignDelimiters!==!1){let Ae=s[d]-(ee[d]||0),Oe=i[d];Oe===114?ue=" ".repeat(Ae):Oe===99?Ae%2?(ue=" ".repeat(Ae/2+.5),ne=" ".repeat(Ae/2-.5)):(ue=" ".repeat(Ae/2),ne=ue):ne=" ".repeat(Ae)}n.delimiterStart!==!1&&!d&&Z.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&B==="")&&(n.delimiterStart!==!1||d)&&Z.push(" "),n.alignDelimiters!==!1&&Z.push(ue),Z.push(B),n.alignDelimiters!==!1&&Z.push(ne),n.padding!==!1&&Z.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&Z.push("|")}g.push(n.delimiterEnd===!1?Z.join("").replace(/ +$/,""):Z.join(""))}return g.join(`
2
+ `)}function jy(e){return e==null?"":String(e)}function By(e){return e.length}function cp(e){let n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}var pp=M(()=>{"use strict"});function dp(e,n,t,r){let i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);let a=t.indentLines(t.containerFlow(e,o.current()),zy);return i(),a}function zy(e,n,t){return">"+(t?"":" ")+e}var hp=M(()=>{"use strict"});function mp(e,n){return fp(e,n.inConstruct,!0)&&!fp(e,n.notInConstruct,!1)}function fp(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}var gp=M(()=>{"use strict"});function Ja(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
3
+ `&&mp(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
4
+ `}var yp=M(()=>{"use strict";gp()});function bp(e,n){let t=String(e),r=t.indexOf(n),i=r,o=0,a=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+n.length,r=t.indexOf(n,i);return a}var wp=M(()=>{"use strict"});function Sp(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}var Tp=M(()=>{"use strict"});function xp(e){let n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}var kp=M(()=>{"use strict"});function Ap(e,n,t,r){let i=xp(t),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Sp(e,t)){let h=t.enter("codeIndented"),y=t.indentLines(o,Vy);return h(),y}let s=t.createTracker(r),u=i.repeat(Math.max(bp(o,i)+1,3)),p=t.enter("codeFenced"),d=s.move(u);if(e.lang){let h=t.enter(`codeFencedLang${a}`);d+=s.move(t.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){let h=t.enter(`codeFencedMeta${a}`);d+=s.move(" "),d+=s.move(t.safe(e.meta,{before:d,after:`
5
5
  `,encode:["`"],...s.current()})),h()}return d+=s.move(`
6
6
  `),o&&(d+=s.move(o+`
7
- `)),d+=s.move(u),p(),d}function qy(e,n,t){return(t?"":" ")+e}var xp=M(()=>{"use strict";gp();bp();Sp()});function lr(e){let n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}var ao=M(()=>{"use strict"});function kp(e,n,t,r){let i=lr(t),o=i==='"'?"Quote":"Apostrophe",a=t.enter("definition"),s=t.enter("label"),u=t.createTracker(r),p=u.move("[");return p+=u.move(t.safe(t.associationId(e),{before:p,after:"]",...u.current()})),p+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(t.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=t.enter("destinationRaw"),p+=u.move(t.safe(e.url,{before:p,after:e.title?" ":`
8
- `,...u.current()}))),s(),e.title&&(s=t.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(t.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),a(),p}var vp=M(()=>{"use strict";ao()});function Ap(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}var Ep=M(()=>{"use strict"});function Wa(e,n,t,r){let i=Ap(t),o=t.enter("emphasis"),a=t.createTracker(r),s=a.move(i);return s+=a.move(t.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function jy(e,n,t){return t.options.emphasis||"*"}var _p=M(()=>{"use strict";Ep();Wa.peek=jy});function Ya(e,n,t,r){let i,o,a;typeof n=="function"&&typeof t!="function"?(o=void 0,a=n,i=t):(o=n,a=t,i=r),Br(e,o,s,i);function s(u,p){let d=p[p.length-1],h=d?d.children.indexOf(u):void 0;return a(u,h,d)}}var Op=M(()=>{"use strict";oo();oo()});var Rp=M(()=>{"use strict";Op()});function Ip(e,n){let t=!1;return Ya(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Hn}),!!((!e.depth||e.depth<3)&&bn(e)&&(n.options.setext||t))}var Cp=M(()=>{"use strict";Rp();qr()});function Pp(e,n,t,r){let i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(Ip(e,t)){let d=t.enter("headingSetext"),h=t.enter("phrasing"),y=t.containerPhrasing(e,{...o.current(),before:`
7
+ `)),d+=s.move(u),p(),d}function Vy(e,n,t){return(t?"":" ")+e}var vp=M(()=>{"use strict";wp();Tp();kp()});function cr(e){let n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}var co=M(()=>{"use strict"});function Ep(e,n,t,r){let i=cr(t),o=i==='"'?"Quote":"Apostrophe",a=t.enter("definition"),s=t.enter("label"),u=t.createTracker(r),p=u.move("[");return p+=u.move(t.safe(t.associationId(e),{before:p,after:"]",...u.current()})),p+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(t.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=t.enter("destinationRaw"),p+=u.move(t.safe(e.url,{before:p,after:e.title?" ":`
8
+ `,...u.current()}))),s(),e.title&&(s=t.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(t.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),a(),p}var _p=M(()=>{"use strict";co()});function Rp(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}var Op=M(()=>{"use strict"});function Ga(e,n,t,r){let i=Rp(t),o=t.enter("emphasis"),a=t.createTracker(r),s=a.move(i);return s+=a.move(t.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function Wy(e,n,t){return t.options.emphasis||"*"}var Ip=M(()=>{"use strict";Op();Ga.peek=Wy});function Ka(e,n,t,r){let i,o,a;typeof n=="function"&&typeof t!="function"?(o=void 0,a=n,i=t):(o=n,a=t,i=r),Vr(e,o,s,i);function s(u,p){let d=p[p.length-1],h=d?d.children.indexOf(u):void 0;return a(u,h,d)}}var Cp=M(()=>{"use strict";lo();lo()});var Pp=M(()=>{"use strict";Cp()});function Mp(e,n){let t=!1;return Ka(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Hn}),!!((!e.depth||e.depth<3)&&bn(e)&&(n.options.setext||t))}var Np=M(()=>{"use strict";Pp();Br()});function Lp(e,n,t,r){let i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(Mp(e,t)){let d=t.enter("headingSetext"),h=t.enter("phrasing"),y=t.containerPhrasing(e,{...o.current(),before:`
9
9
  `,after:`
10
10
  `});return h(),d(),y+`
11
11
  `+(i===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
12
12
  `))+1))}let a="#".repeat(i),s=t.enter("headingAtx"),u=t.enter("phrasing");o.move(a+" ");let p=t.containerPhrasing(e,{before:"# ",after:`
13
- `,...o.current()});return/^[\t ]/.test(p)&&(p="&#x"+p.charCodeAt(0).toString(16).toUpperCase()+";"+p.slice(1)),p=p?a+" "+p:a,t.options.closeAtx&&(p+=" "+a),u(),s(),p}var Mp=M(()=>{"use strict";Cp()});function Ja(e){return e.value||""}function By(){return"<"}var Np=M(()=>{"use strict";Ja.peek=By});function Ga(e,n,t,r){let i=lr(t),o=i==='"'?"Quote":"Apostrophe",a=t.enter("image"),s=t.enter("label"),u=t.createTracker(r),p=u.move("![");return p+=u.move(t.safe(e.alt,{before:p,after:"]",...u.current()})),p+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(t.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=t.enter("destinationRaw"),p+=u.move(t.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=t.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(t.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),p+=u.move(")"),a(),p}function zy(){return"!"}var Lp=M(()=>{"use strict";ao();Ga.peek=zy});function Ka(e,n,t,r){let i=e.referenceType,o=t.enter("imageReference"),a=t.enter("label"),s=t.createTracker(r),u=s.move("!["),p=t.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=t.stack;t.stack=[],a=t.enter("reference");let h=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return a(),t.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function Vy(){return"!"}var Dp=M(()=>{"use strict";Ka.peek=Vy});function Xa(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){let a=t.unsafe[o],s=t.compilePattern(a),u;if(a.atBreak)for(;u=s.exec(r);){let p=u.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(u.index+1)}}return i+r+i}function Hy(){return"`"}var Fp=M(()=>{"use strict";Xa.peek=Hy});function Qa(e,n){let t=bn(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var Up=M(()=>{"use strict";qr()});function Za(e,n,t,r){let i=lr(t),o=i==='"'?"Quote":"Apostrophe",a=t.createTracker(r),s,u;if(Qa(e,t)){let d=t.stack;t.stack=[],s=t.enter("autolink");let h=a.move("<");return h+=a.move(t.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),s(),t.stack=d,h}s=t.enter("link"),u=t.enter("label");let p=a.move("[");return p+=a.move(t.containerPhrasing(e,{before:p,after:"](",...a.current()})),p+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),p+=a.move("<"),p+=a.move(t.safe(e.url,{before:p,after:">",...a.current()})),p+=a.move(">")):(u=t.enter("destinationRaw"),p+=a.move(t.safe(e.url,{before:p,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=t.enter(`title${o}`),p+=a.move(" "+i),p+=a.move(t.safe(e.title,{before:p,after:i,...a.current()})),p+=a.move(i),u()),p+=a.move(")"),s(),p}function Wy(e,n,t){return Qa(e,t)?"<":"["}var $p=M(()=>{"use strict";ao();Up();Za.peek=Wy});function es(e,n,t,r){let i=e.referenceType,o=t.enter("linkReference"),a=t.enter("label"),s=t.createTracker(r),u=s.move("["),p=t.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=t.stack;t.stack=[],a=t.enter("reference");let h=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return a(),t.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function Yy(){return"["}var qp=M(()=>{"use strict";es.peek=Yy});function cr(e){let n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}var so=M(()=>{"use strict"});function jp(e){let n=cr(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}var Bp=M(()=>{"use strict";so()});function zp(e){let n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}var Vp=M(()=>{"use strict"});function lo(e){let n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}var ts=M(()=>{"use strict"});function Hp(e,n,t,r){let i=t.enter("list"),o=t.bulletCurrent,a=e.ordered?zp(t):cr(t),s=e.ordered?a==="."?")":".":jp(t),u=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){let d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),lo(t)===a&&d){let h=-1;for(;++h<e.children.length;){let y=e.children[h];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),t.bulletCurrent=a;let p=t.containerFlow(e,r);return t.bulletLastUsed=a,t.bulletCurrent=o,i(),p}var Wp=M(()=>{"use strict";so();Bp();Vp();ts()});function Yp(e){let n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}var Jp=M(()=>{"use strict"});function Gp(e,n,t,r){let i=Yp(t),o=t.bulletCurrent||cr(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=t.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=t.enter("listItem"),p=t.indentLines(t.containerFlow(e,s.current()),d);return u(),p;function d(h,y,g){return y?(g?"":" ".repeat(a))+h:(g?o:o+" ".repeat(a-o.length))+h}}var Kp=M(()=>{"use strict";so();Jp()});function Xp(e,n,t,r){let i=t.enter("paragraph"),o=t.enter("phrasing"),a=t.containerPhrasing(e,r);return o(),i(),a}var Qp=M(()=>{"use strict"});var ns,Zp=M(()=>{"use strict";no();ns=In(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var ed=M(()=>{"use strict";Zp()});function td(e,n,t,r){return(e.children.some(function(a){return ns(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}var nd=M(()=>{"use strict";ed()});function rd(e){let n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}var id=M(()=>{"use strict"});function rs(e,n,t,r){let i=rd(t),o=t.enter("strong"),a=t.createTracker(r),s=a.move(i+i);return s+=a.move(t.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function Jy(e,n,t){return t.options.strong||"*"}var od=M(()=>{"use strict";id();rs.peek=Jy});function ad(e,n,t,r){return t.safe(e.value,r)}var sd=M(()=>{"use strict"});function ld(e){let n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}var cd=M(()=>{"use strict"});function ud(e,n,t){let r=(lo(t)+(t.options.ruleSpaces?" ":"")).repeat(ld(t));return t.options.ruleSpaces?r.slice(0,-1):r}var pd=M(()=>{"use strict";cd();ts()});var zr,dd=M(()=>{"use strict";up();fp();xp();vp();_p();Mp();Np();Lp();Dp();Fp();$p();qp();Wp();Kp();Qp();nd();od();sd();pd();zr={blockquote:cp,break:Ha,code:Tp,definition:kp,emphasis:Wa,hardBreak:Ha,heading:Pp,html:Ja,image:Ga,imageReference:Ka,inlineCode:Xa,link:Za,linkReference:es,list:Hp,listItem:Gp,paragraph:Xp,root:td,strong:rs,text:ad,thematicBreak:ud}});var is,hd=M(()=>{"use strict";is={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
14
- `,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});function ur(e){return Gy.call(is,e)?is[e]:!1}var Gy,co=M(()=>{"use strict";hd();Gy={}.hasOwnProperty});function uo(e,n){let t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCodePoint(t)}var os=M(()=>{"use strict"});function fd(e){return e.replace(Ky,Xy)}function Xy(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){let i=t.charCodeAt(1),o=i===120||i===88;return uo(t.slice(o?2:1),o?16:10)}return ur(t)||e}var Ky,md=M(()=>{"use strict";co();os();Ky=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});var as=M(()=>{"use strict";dd()});function ls(){return{enter:{table:Qy,tableData:gd,tableHeader:gd,tableRow:eb},exit:{codeText:tb,table:Zy,tableData:ss,tableHeader:ss,tableRow:ss}}}function Qy(e){let n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Zy(e){this.exit(e),this.data.inTable=void 0}function eb(e){this.enter({type:"tableRow",children:[]},e)}function ss(e){this.exit(e)}function gd(e){this.enter({type:"tableCell",children:[]},e)}function tb(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,nb));let t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function nb(e,n){return n==="|"?n:e}function cs(e){let n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
13
+ `,...o.current()});return/^[\t ]/.test(p)&&(p="&#x"+p.charCodeAt(0).toString(16).toUpperCase()+";"+p.slice(1)),p=p?a+" "+p:a,t.options.closeAtx&&(p+=" "+a),u(),s(),p}var Dp=M(()=>{"use strict";Np()});function Xa(e){return e.value||""}function Hy(){return"<"}var Fp=M(()=>{"use strict";Xa.peek=Hy});function Qa(e,n,t,r){let i=cr(t),o=i==='"'?"Quote":"Apostrophe",a=t.enter("image"),s=t.enter("label"),u=t.createTracker(r),p=u.move("![");return p+=u.move(t.safe(e.alt,{before:p,after:"]",...u.current()})),p+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(t.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=t.enter("destinationRaw"),p+=u.move(t.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=t.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(t.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),p+=u.move(")"),a(),p}function Yy(){return"!"}var Up=M(()=>{"use strict";co();Qa.peek=Yy});function Za(e,n,t,r){let i=e.referenceType,o=t.enter("imageReference"),a=t.enter("label"),s=t.createTracker(r),u=s.move("!["),p=t.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=t.stack;t.stack=[],a=t.enter("reference");let h=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return a(),t.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function Jy(){return"!"}var $p=M(()=>{"use strict";Za.peek=Jy});function es(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){let a=t.unsafe[o],s=t.compilePattern(a),u;if(a.atBreak)for(;u=s.exec(r);){let p=u.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(u.index+1)}}return i+r+i}function Gy(){return"`"}var qp=M(()=>{"use strict";es.peek=Gy});function ts(e,n){let t=bn(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var jp=M(()=>{"use strict";Br()});function ns(e,n,t,r){let i=cr(t),o=i==='"'?"Quote":"Apostrophe",a=t.createTracker(r),s,u;if(ts(e,t)){let d=t.stack;t.stack=[],s=t.enter("autolink");let h=a.move("<");return h+=a.move(t.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),s(),t.stack=d,h}s=t.enter("link"),u=t.enter("label");let p=a.move("[");return p+=a.move(t.containerPhrasing(e,{before:p,after:"](",...a.current()})),p+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),p+=a.move("<"),p+=a.move(t.safe(e.url,{before:p,after:">",...a.current()})),p+=a.move(">")):(u=t.enter("destinationRaw"),p+=a.move(t.safe(e.url,{before:p,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=t.enter(`title${o}`),p+=a.move(" "+i),p+=a.move(t.safe(e.title,{before:p,after:i,...a.current()})),p+=a.move(i),u()),p+=a.move(")"),s(),p}function Ky(e,n,t){return ts(e,t)?"<":"["}var Bp=M(()=>{"use strict";co();jp();ns.peek=Ky});function rs(e,n,t,r){let i=e.referenceType,o=t.enter("linkReference"),a=t.enter("label"),s=t.createTracker(r),u=s.move("["),p=t.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=t.stack;t.stack=[],a=t.enter("reference");let h=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return a(),t.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function Xy(){return"["}var zp=M(()=>{"use strict";rs.peek=Xy});function ur(e){let n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}var uo=M(()=>{"use strict"});function Vp(e){let n=ur(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}var Wp=M(()=>{"use strict";uo()});function Hp(e){let n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}var Yp=M(()=>{"use strict"});function po(e){let n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}var is=M(()=>{"use strict"});function Jp(e,n,t,r){let i=t.enter("list"),o=t.bulletCurrent,a=e.ordered?Hp(t):ur(t),s=e.ordered?a==="."?")":".":Vp(t),u=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){let d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),po(t)===a&&d){let h=-1;for(;++h<e.children.length;){let y=e.children[h];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),t.bulletCurrent=a;let p=t.containerFlow(e,r);return t.bulletLastUsed=a,t.bulletCurrent=o,i(),p}var Gp=M(()=>{"use strict";uo();Wp();Yp();is()});function Kp(e){let n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}var Xp=M(()=>{"use strict"});function Qp(e,n,t,r){let i=Kp(t),o=t.bulletCurrent||ur(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=t.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=t.enter("listItem"),p=t.indentLines(t.containerFlow(e,s.current()),d);return u(),p;function d(h,y,g){return y?(g?"":" ".repeat(a))+h:(g?o:o+" ".repeat(a-o.length))+h}}var Zp=M(()=>{"use strict";uo();Xp()});function ed(e,n,t,r){let i=t.enter("paragraph"),o=t.enter("phrasing"),a=t.containerPhrasing(e,r);return o(),i(),a}var td=M(()=>{"use strict"});var os,nd=M(()=>{"use strict";oo();os=In(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var rd=M(()=>{"use strict";nd()});function id(e,n,t,r){return(e.children.some(function(a){return os(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}var od=M(()=>{"use strict";rd()});function ad(e){let n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}var sd=M(()=>{"use strict"});function as(e,n,t,r){let i=ad(t),o=t.enter("strong"),a=t.createTracker(r),s=a.move(i+i);return s+=a.move(t.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function Qy(e,n,t){return t.options.strong||"*"}var ld=M(()=>{"use strict";sd();as.peek=Qy});function cd(e,n,t,r){return t.safe(e.value,r)}var ud=M(()=>{"use strict"});function pd(e){let n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}var dd=M(()=>{"use strict"});function hd(e,n,t){let r=(po(t)+(t.options.ruleSpaces?" ":"")).repeat(pd(t));return t.options.ruleSpaces?r.slice(0,-1):r}var fd=M(()=>{"use strict";dd();is()});var Wr,md=M(()=>{"use strict";hp();yp();vp();_p();Ip();Dp();Fp();Up();$p();qp();Bp();zp();Gp();Zp();td();od();ld();ud();fd();Wr={blockquote:dp,break:Ja,code:Ap,definition:Ep,emphasis:Ga,hardBreak:Ja,heading:Lp,html:Xa,image:Qa,imageReference:Za,inlineCode:es,link:ns,linkReference:rs,list:Jp,listItem:Qp,paragraph:ed,root:id,strong:as,text:cd,thematicBreak:hd}});var ss,gd=M(()=>{"use strict";ss={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
14
+ `,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});function pr(e){return Zy.call(ss,e)?ss[e]:!1}var Zy,ho=M(()=>{"use strict";gd();Zy={}.hasOwnProperty});function fo(e,n){let t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCodePoint(t)}var ls=M(()=>{"use strict"});function yd(e){return e.replace(eb,tb)}function tb(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){let i=t.charCodeAt(1),o=i===120||i===88;return fo(t.slice(o?2:1),o?16:10)}return pr(t)||e}var eb,bd=M(()=>{"use strict";ho();ls();eb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});var cs=M(()=>{"use strict";md()});function ps(){return{enter:{table:nb,tableData:wd,tableHeader:wd,tableRow:ib},exit:{codeText:ob,table:rb,tableData:us,tableHeader:us,tableRow:us}}}function nb(e){let n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function rb(e){this.exit(e),this.data.inTable=void 0}function ib(e){this.enter({type:"tableRow",children:[]},e)}function us(e){this.exit(e)}function wd(e){this.enter({type:"tableCell",children:[]},e)}function ob(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,ab));let t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function ab(e,n){return n==="|"?n:e}function ds(e){let n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
15
15
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:a,tableCell:u,tableRow:s}};function a(g,P,ee,Z){return p(d(g,ee,Z),g.align)}function s(g,P,ee,Z){let B=h(g,ee,Z),ue=p([B]);return ue.slice(0,ue.indexOf(`
16
- `))}function u(g,P,ee,Z){let B=ee.enter("tableCell"),ue=ee.enter("phrasing"),ne=ee.containerPhrasing(g,{...Z,before:o,after:o});return ue(),B(),ne}function p(g,P){return sp(g,{align:P,alignDelimiters:r,padding:t,stringLength:i})}function d(g,P,ee){let Z=g.children,B=-1,ue=[],ne=P.enter("table");for(;++B<Z.length;)ue[B]=h(Z[B],P,ee);return ne(),ue}function h(g,P,ee){let Z=g.children,B=-1,ue=[],ne=P.enter("tableRow");for(;++B<Z.length;)ue[B]=u(Z[B],g,P,ee);return ne(),ue}function y(g,P,ee){let Z=zr.inlineCode(g,P,ee);return ee.stack.includes("tableCell")&&(Z=Z.replace(/\|/g,"\\$&")),Z}}var yd=M(()=>{"use strict";lp();as()});var bd=M(()=>{"use strict";yd()});function us(){return{exit:{taskListCheckValueChecked:wd,taskListCheckValueUnchecked:wd,paragraph:rb}}}function ps(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ib}}}function wd(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function rb(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let r=t.children[0];if(r&&r.type==="text"){let i=n.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function ib(e,n,t,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);o&&s.move(a);let u=zr.listItem(e,n,t,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),u;function p(d){return d+a}}var Sd=M(()=>{"use strict";as()});var Td=M(()=>{"use strict";Sd()});function ds(){return[$a(),ja(),za(),ls(),us()]}function hs(e){return{extensions:[qa(),Ba(),Va(),cs(e),ps()]}}var xd=M(()=>{"use strict";Zu();np();op();bd();Td()});var kd=M(()=>{"use strict";xd()});function pt(e,n,t,r){let i=e.length,o=0,a;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);o<r.length;)a=r.slice(o,o+1e4),a.unshift(n,0),e.splice(...a),o+=1e4,n+=1e4}function Rt(e,n){return e.length>0?(pt(e,e.length,0,n),e):n}var wn=M(()=>{"use strict"});function po(e){let n={},t=-1;for(;++t<e.length;)ob(n,e[t]);return n}function ob(e,n){let t;for(t in n){let i=(vd.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t],a;if(o)for(a in o){vd.call(i,a)||(i[a]=[]);let s=o[a];ab(i[a],Array.isArray(s)?s:s?[s]:[])}}}function ab(e,n){let t=-1,r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);pt(e,0,0,r)}var vd,fs=M(()=>{"use strict";wn();vd={}.hasOwnProperty});function gs(){return{text:on}}function cb(e,n,t){let r=this,i,o;return a;function a(h){return!ms(h)||!Pd.call(r,r.previous)||ys(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return ms(h)?(e.consume(h),s):h===64?(e.consume(h),u):t(h)}function u(h){return h===46?e.check(lb,d,p)(h):h===45||h===95||ft(h)?(o=!0,e.consume(h),u):d(h)}function p(h){return e.consume(h),i=!0,u}function d(h){return o&&i&&ht(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function ub(e,n,t){let r=this;return i;function i(a){return a!==87&&a!==119||!Id.call(r,r.previous)||ys(r.events)?t(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sb,e.attempt(Ad,e.attempt(Ed,o),t),t)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(a)}}function pb(e,n,t){let r=this,i="",o=!1;return a;function a(h){return(h===72||h===104)&&Cd.call(r,r.previous)&&!ys(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),s):t(h)}function s(h){if(ht(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),s;if(h===58){let y=i.toLowerCase();if(y==="http"||y==="https")return e.consume(h),u}return t(h)}function u(h){return h===47?(e.consume(h),o?p:(o=!0,u)):t(h)}function p(h){return h===null||zn(h)||Le(h)||rn(h)||Vn(h)?t(h):e.attempt(Ad,e.attempt(Ed,d),t)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function db(e,n,t){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):t(a)}function o(a){return a===null?t(a):n(a)}}function hb(e,n,t){let r,i,o;return a;function a(p){return p===46||p===95?e.check(_d,u,s)(p):p===null||Le(p)||rn(p)||p!==45&&Vn(p)?u(p):(o=!0,e.consume(p),a)}function s(p){return p===95?r=!0:(i=r,r=void 0),e.consume(p),a}function u(p){return i||r||!o?t(p):n(p)}}function fb(e,n){let t=0,r=0;return i;function i(a){return a===40?(t++,e.consume(a),i):a===41&&r<t?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(_d,n,o)(a):a===null||Le(a)||rn(a)?n(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function mb(e,n,t){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Le(s)||rn(s)?n(s):t(s)}function i(s){return s===null||s===40||s===91||Le(s)||rn(s)?n(s):r(s)}function o(s){return ht(s)?a(s):t(s)}function a(s){return s===59?(e.consume(s),r):ht(s)?(e.consume(s),a):t(s)}}function gb(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return ft(o)?t(o):n(o)}}function Id(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function Cd(e){return!ht(e)}function Pd(e){return!(e===47||ms(e))}function ms(e){return e===43||e===45||e===46||e===95||ft(e)}function ys(e){let n=e.length,t=!1;for(;n--;){let r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var sb,Ad,Ed,_d,lb,Od,Rd,Sn,on,Wn,Md=M(()=>{"use strict";Be();sb={tokenize:db,partial:!0},Ad={tokenize:hb,partial:!0},Ed={tokenize:fb,partial:!0},_d={tokenize:mb,partial:!0},lb={tokenize:gb,partial:!0},Od={name:"wwwAutolink",tokenize:ub,previous:Id},Rd={name:"protocolAutolink",tokenize:pb,previous:Cd},Sn={name:"emailAutolink",tokenize:cb,previous:Pd},on={};Wn=48;for(;Wn<123;)on[Wn]=Sn,Wn++,Wn===58?Wn=65:Wn===91&&(Wn=97);on[43]=Sn;on[45]=Sn;on[46]=Sn;on[95]=Sn;on[72]=[Sn,Rd];on[104]=[Sn,Rd];on[87]=[Sn,Od];on[119]=[Sn,Od]});var Nd=M(()=>{"use strict";Md()});function pr(e){if(e===null||Le(e)||rn(e))return 1;if(Vn(e))return 2}var bs=M(()=>{"use strict";Be()});function Cn(e,n,t){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}var Vr=M(()=>{"use strict"});function yb(e,n){let t=-1,r,i,o,a,s,u,p,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;let h=Object.assign({},e[r][1].end),y=Object.assign({},e[t][1].start);Ld(h,-u),Ld(y,u),a={type:u>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:y},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[t][1].start=Object.assign({},s.end),p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=Rt(p,[["enter",e[r][1],n],["exit",e[r][1],n]])),p=Rt(p,[["enter",i,n],["enter",a,n],["exit",a,n],["enter",o,n]]),p=Rt(p,Cn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),p=Rt(p,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,p=Rt(p,[["enter",e[t][1],n],["exit",e[t][1],n]])):d=0,pt(e,r-1,t-r+3,p),t=r+p.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function bb(e,n){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=pr(r),o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;let p=e.exit("attentionSequence"),d=pr(u),h=!d||d===2&&i||t.includes(u),y=!i||i===2&&d||t.includes(r);return p._open=!!(o===42?h:h&&(i||!y)),p._close=!!(o===42?y:y&&(d||!h)),n(u)}}function Ld(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var Hr,Dd=M(()=>{"use strict";wn();bs();Vr();Hr={name:"attention",tokenize:bb,resolveAll:yb}});function wb(e,n,t){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(g){return ht(g)?(e.consume(g),a):g===64?t(g):p(g)}function a(g){return g===43||g===45||g===46||ft(g)?(r=1,s(g)):p(g)}function s(g){return g===58?(e.consume(g),r=0,u):(g===43||g===45||g===46||ft(g))&&r++<32?(e.consume(g),s):(r=0,p(g))}function u(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):g===null||g===32||g===60||zn(g)?t(g):(e.consume(g),u)}function p(g){return g===64?(e.consume(g),d):qu(g)?(e.consume(g),p):t(g)}function d(g){return ft(g)?h(g):t(g)}function h(g){return g===46?(e.consume(g),r=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):y(g)}function y(g){if((g===45||ft(g))&&r++<63){let P=g===45?y:h;return e.consume(g),P}return t(g)}}var ws,Fd=M(()=>{"use strict";Be();ws={name:"autolink",tokenize:wb}});function we(e,n,t,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return Se(u)?(e.enter(t),s(u)):n(u)}function s(u){return Se(u)&&o++<i?(e.consume(u),s):(e.exit(t),n(u))}}var ut=M(()=>{"use strict";Be()});function Sb(e,n,t){return r;function r(o){return Se(o)?we(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||se(o)?n(o):t(o)}}var an,ho=M(()=>{"use strict";ut();Be();an={tokenize:Sb,partial:!0}});function Tb(e,n,t){let r=this;return i;function i(a){if(a===62){let s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return t(a)}function o(a){return Se(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(a))}}function xb(e,n,t){let r=this;return i;function i(a){return Se(a)?we(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(fo,n,t)(a)}}function kb(e){e.exit("blockQuote")}var fo,Ud=M(()=>{"use strict";ut();Be();fo={name:"blockQuote",tokenize:Tb,continuation:{tokenize:xb},exit:kb}});function vb(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Bu(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}var mo,$d=M(()=>{"use strict";Be();mo={name:"characterEscape",tokenize:vb}});function Ab(e,n,t){let r=this,i=0,o,a;return s;function s(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,a=ft,d(h))}function p(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=ju,d):(e.enter("characterReferenceValue"),o=7,a=jr,d(h))}function d(h){if(h===59&&i){let y=e.exit("characterReferenceValue");return a===ft&&!ur(r.sliceSerialize(y))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return a(h)&&i++<o?(e.consume(h),d):t(h)}}var go,qd=M(()=>{"use strict";co();Be();go={name:"characterReference",tokenize:Ab}});function Eb(e,n,t){let r=this,i={tokenize:Re,partial:!0},o=0,a=0,s;return u;function u($){return p($)}function p($){let Ue=r.events[r.events.length-1];return o=Ue&&Ue[1].type==="linePrefix"?Ue[2].sliceSerialize(Ue[1],!0).length:0,s=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d($)}function d($){return $===s?(a++,e.consume($),d):a<3?t($):(e.exit("codeFencedFenceSequence"),Se($)?we(e,h,"whitespace")($):h($))}function h($){return $===null||se($)?(e.exit("codeFencedFence"),r.interrupt?n($):e.check(jd,ee,ve)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y($))}function y($){return $===null||se($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h($)):Se($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,g,"whitespace")($)):$===96&&$===s?t($):(e.consume($),y)}function g($){return $===null||se($)?h($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),P($))}function P($){return $===null||se($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h($)):$===96&&$===s?t($):(e.consume($),P)}function ee($){return e.attempt(i,ve,Z)($)}function Z($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),B}function B($){return o>0&&Se($)?we(e,ue,"linePrefix",o+1)($):ue($)}function ue($){return $===null||se($)?e.check(jd,ee,ve)($):(e.enter("codeFlowValue"),ne($))}function ne($){return $===null||se($)?(e.exit("codeFlowValue"),ue($)):(e.consume($),ne)}function ve($){return e.exit("codeFenced"),n($)}function Re($,Ue,Xe){let je=0;return U;function U(Me){return $.enter("lineEnding"),$.consume(Me),$.exit("lineEnding"),Te}function Te(Me){return $.enter("codeFencedFence"),Se(Me)?we($,ze,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Me):ze(Me)}function ze(Me){return Me===s?($.enter("codeFencedFenceSequence"),ye(Me)):Xe(Me)}function ye(Me){return Me===s?(je++,$.consume(Me),ye):je>=a?($.exit("codeFencedFenceSequence"),Se(Me)?we($,Ce,"whitespace")(Me):Ce(Me)):Xe(Me)}function Ce(Me){return Me===null||se(Me)?($.exit("codeFencedFence"),Ue(Me)):Xe(Me)}}}function _b(e,n,t){let r=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}var jd,yo,Bd=M(()=>{"use strict";ut();Be();jd={tokenize:_b,partial:!0},yo={name:"codeFenced",tokenize:Eb,concrete:!0}});function Rb(e,n,t){let r=this;return i;function i(p){return e.enter("codeIndented"),we(e,o,"linePrefix",5)(p)}function o(p){let d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(p):t(p)}function a(p){return p===null?u(p):se(p)?e.attempt(Ob,a,u)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||se(p)?(e.exit("codeFlowValue"),a(p)):(e.consume(p),s)}function u(p){return e.exit("codeIndented"),n(p)}}function Ib(e,n,t){let r=this;return i;function i(a){return r.parser.lazy[r.now().line]?t(a):se(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):we(e,o,"linePrefix",5)(a)}function o(a){let s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):se(a)?i(a):t(a)}}var Wr,Ob,zd=M(()=>{"use strict";ut();Be();Wr={name:"codeIndented",tokenize:Rb},Ob={tokenize:Ib,partial:!0}});function Cb(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Pb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Mb(e,n,t){let r=this,i=0,o,a;return s;function s(y){return e.enter("codeText"),e.enter("codeTextSequence"),u(y)}function u(y){return y===96?(e.consume(y),i++,u):(e.exit("codeTextSequence"),p(y))}function p(y){return y===null?t(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),p):y===96?(a=e.enter("codeTextSequence"),o=0,h(y)):se(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("codeTextData"),d(y))}function d(y){return y===null||y===32||y===96||se(y)?(e.exit("codeTextData"),p(y)):(e.consume(y),d)}function h(y){return y===96?(e.consume(y),o++,h):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(a.type="codeTextData",d(y))}}var Ss,Vd=M(()=>{"use strict";Be();Ss={name:"codeText",tokenize:Mb,resolve:Cb,previous:Pb}});function Yr(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}var bo,Hd=M(()=>{"use strict";bo=class{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){let r=t==null?Number.POSITIVE_INFINITY:t;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){let i=t||0;this.setCursor(Math.trunc(n));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Yr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Yr(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Yr(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){let t=this.left.splice(n,Number.POSITIVE_INFINITY);Yr(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Yr(this.left,t.reverse())}}}});function wo(e){let n={},t=-1,r,i,o,a,s,u,p,d=new bo(e);for(;++t<d.length;){for(;t in n;)t=n[t];if(r=d.get(t),t&&r[1].type==="chunkFlow"&&d.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Nb(d,t)),t=n[t],p=!0);else if(r[1]._container){for(o=t,i=void 0;o--&&(a=d.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},d.get(i)[1].start),s=d.slice(i,t),s.unshift(r),d.splice(i,t-i+1,s))}}return pt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!p}function Nb(e,n){let t=e.get(n)[1],r=e.get(n)[2],i=n-1,o=[],a=t._tokenizer||r.parser[t.contentType](t.start),s=a.events,u=[],p={},d,h,y=-1,g=t,P=0,ee=0,Z=[ee];for(;g;){for(;e.get(++i)[1]!==g;);o.push(i),g._tokenizer||(d=r.sliceStream(g),g.next||d.push(null),h&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=g,g=g.next}for(g=t;++y<s.length;)s[y][0]==="exit"&&s[y-1][0]==="enter"&&s[y][1].type===s[y-1][1].type&&s[y][1].start.line!==s[y][1].end.line&&(ee=y+1,Z.push(ee),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):Z.pop(),y=Z.length;y--;){let B=s.slice(Z[y],Z[y+1]),ue=o.pop();u.push([ue,ue+B.length-1]),e.splice(ue,2,B)}for(u.reverse(),y=-1;++y<u.length;)p[P+u[y][0]]=P+u[y][1],P+=u[y][1]-u[y][0]-1;return p}var Ts=M(()=>{"use strict";wn();Hd()});function Db(e){return wo(e),e}function Fb(e,n){let t;return r;function r(s){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):se(s)?e.check(Lb,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),n(s)}function a(s){return e.consume(s),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Ub(e,n,t){let r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),we(e,o,"linePrefix")}function o(a){if(a===null||se(a))return t(a);let s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}var xs,Lb,Wd=M(()=>{"use strict";ut();Be();Ts();xs={tokenize:Fb,resolve:Db},Lb={tokenize:Ub,partial:!0}});function So(e,n,t,r,i,o,a,s,u){let p=u||Number.POSITIVE_INFINITY,d=0;return h;function h(B){return B===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(B),e.exit(o),y):B===null||B===32||B===41||zn(B)?t(B):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),ee(B))}function y(B){return B===62?(e.enter(o),e.consume(B),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),g(B))}function g(B){return B===62?(e.exit("chunkString"),e.exit(s),y(B)):B===null||B===60||se(B)?t(B):(e.consume(B),B===92?P:g)}function P(B){return B===60||B===62||B===92?(e.consume(B),g):g(B)}function ee(B){return!d&&(B===null||B===41||Le(B))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),n(B)):d<p&&B===40?(e.consume(B),d++,ee):B===41?(e.consume(B),d--,ee):B===null||B===32||B===40||zn(B)?t(B):(e.consume(B),B===92?Z:ee)}function Z(B){return B===40||B===41||B===92?(e.consume(B),ee):ee(B)}}var ks=M(()=>{"use strict";Be()});function To(e,n,t,r,i,o){let a=this,s=0,u;return p;function p(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(o),d}function d(g){return s>999||g===null||g===91||g===93&&!u||g===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?t(g):g===93?(e.exit(o),e.enter(i),e.consume(g),e.exit(i),e.exit(r),n):se(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||se(g)||s++>999?(e.exit("chunkString"),d(g)):(e.consume(g),u||(u=!Se(g)),g===92?y:h)}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}var vs=M(()=>{"use strict";Be()});function xo(e,n,t,r,i,o){let a;return s;function s(y){return y===34||y===39||y===40?(e.enter(r),e.enter(i),e.consume(y),e.exit(i),a=y===40?41:y,u):t(y)}function u(y){return y===a?(e.enter(i),e.consume(y),e.exit(i),e.exit(r),n):(e.enter(o),p(y))}function p(y){return y===a?(e.exit(o),u(a)):y===null?t(y):se(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),we(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===a||y===null||se(y)?(e.exit("chunkString"),p(y)):(e.consume(y),y===92?h:d)}function h(y){return y===a||y===92?(e.consume(y),d):d(y)}}var As=M(()=>{"use strict";ut();Be()});function Yn(e,n){let t;return r;function r(i){return se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):Se(i)?we(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}var Es=M(()=>{"use strict";ut();Be()});function qb(e,n,t){let r=this,i;return o;function o(g){return e.enter("definition"),a(g)}function a(g){return To.call(r,e,s,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function s(g){return i=kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u):t(g)}function u(g){return Le(g)?Yn(e,p)(g):p(g)}function p(g){return So(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt($b,h,h)(g)}function h(g){return Se(g)?we(e,y,"whitespace")(g):y(g)}function y(g){return g===null||se(g)?(e.exit("definition"),r.parser.defined.push(i),n(g)):t(g)}}function jb(e,n,t){return r;function r(s){return Le(s)?Yn(e,i)(s):t(s)}function i(s){return xo(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Se(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||se(s)?n(s):t(s)}}var _s,$b,Yd=M(()=>{"use strict";ks();vs();ut();As();Es();Be();sr();_s={name:"definition",tokenize:qb},$b={tokenize:jb,partial:!0}});function Bb(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return se(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}var Os,Jd=M(()=>{"use strict";Be();Os={name:"hardBreakEscape",tokenize:Bb}});function zb(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},pt(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function Vb(e,n,t){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Le(d)?(e.exit("atxHeadingSequence"),s(d)):t(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||se(d)?(e.exit("atxHeading"),n(d)):Se(d)?we(e,s,"whitespace")(d):(e.enter("atxHeadingText"),p(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),s(d))}function p(d){return d===null||d===35||Le(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),p)}}var Rs,Gd=M(()=>{"use strict";ut();Be();wn();Rs={name:"headingAtx",tokenize:Vb,resolve:zb}});var Kd,Is,Xd=M(()=>{"use strict";Kd=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Is=["pre","script","style","textarea"]});function Yb(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Jb(e,n,t){let r=this,i,o,a,s,u;return p;function p(_){return d(_)}function d(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),h}function h(_){return _===33?(e.consume(_),y):_===47?(e.consume(_),o=!0,ee):_===63?(e.consume(_),i=3,r.interrupt?n:A):ht(_)?(e.consume(_),a=String.fromCharCode(_),Z):t(_)}function y(_){return _===45?(e.consume(_),i=2,g):_===91?(e.consume(_),i=5,s=0,P):ht(_)?(e.consume(_),i=4,r.interrupt?n:A):t(_)}function g(_){return _===45?(e.consume(_),r.interrupt?n:A):t(_)}function P(_){let St="CDATA[";return _===St.charCodeAt(s++)?(e.consume(_),s===St.length?r.interrupt?n:ze:P):t(_)}function ee(_){return ht(_)?(e.consume(_),a=String.fromCharCode(_),Z):t(_)}function Z(_){if(_===null||_===47||_===62||Le(_)){let St=_===47,sn=a.toLowerCase();return!St&&!o&&Is.includes(sn)?(i=1,r.interrupt?n(_):ze(_)):Kd.includes(a.toLowerCase())?(i=6,St?(e.consume(_),B):r.interrupt?n(_):ze(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(_):o?ue(_):ne(_))}return _===45||ft(_)?(e.consume(_),a+=String.fromCharCode(_),Z):t(_)}function B(_){return _===62?(e.consume(_),r.interrupt?n:ze):t(_)}function ue(_){return Se(_)?(e.consume(_),ue):U(_)}function ne(_){return _===47?(e.consume(_),U):_===58||_===95||ht(_)?(e.consume(_),ve):Se(_)?(e.consume(_),ne):U(_)}function ve(_){return _===45||_===46||_===58||_===95||ft(_)?(e.consume(_),ve):Re(_)}function Re(_){return _===61?(e.consume(_),$):Se(_)?(e.consume(_),Re):ne(_)}function $(_){return _===null||_===60||_===61||_===62||_===96?t(_):_===34||_===39?(e.consume(_),u=_,Ue):Se(_)?(e.consume(_),$):Xe(_)}function Ue(_){return _===u?(e.consume(_),u=null,je):_===null||se(_)?t(_):(e.consume(_),Ue)}function Xe(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Le(_)?Re(_):(e.consume(_),Xe)}function je(_){return _===47||_===62||Se(_)?ne(_):t(_)}function U(_){return _===62?(e.consume(_),Te):t(_)}function Te(_){return _===null||se(_)?ze(_):Se(_)?(e.consume(_),Te):t(_)}function ze(_){return _===45&&i===2?(e.consume(_),tt):_===60&&i===1?(e.consume(_),lt):_===62&&i===4?(e.consume(_),At):_===63&&i===3?(e.consume(_),A):_===93&&i===5?(e.consume(_),Ut):se(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Hb,Lt,ye)(_)):_===null||se(_)?(e.exit("htmlFlowData"),ye(_)):(e.consume(_),ze)}function ye(_){return e.check(Wb,Ce,Lt)(_)}function Ce(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Me}function Me(_){return _===null||se(_)?ye(_):(e.enter("htmlFlowData"),ze(_))}function tt(_){return _===45?(e.consume(_),A):ze(_)}function lt(_){return _===47?(e.consume(_),a="",Nt):ze(_)}function Nt(_){if(_===62){let St=a.toLowerCase();return Is.includes(St)?(e.consume(_),At):ze(_)}return ht(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),Nt):ze(_)}function Ut(_){return _===93?(e.consume(_),A):ze(_)}function A(_){return _===62?(e.consume(_),At):_===45&&i===2?(e.consume(_),A):ze(_)}function At(_){return _===null||se(_)?(e.exit("htmlFlowData"),Lt(_)):(e.consume(_),At)}function Lt(_){return e.exit("htmlFlow"),n(_)}}function Gb(e,n,t){let r=this;return i;function i(a){return se(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function Kb(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(an,n,t)}}var Cs,Hb,Wb,Qd=M(()=>{"use strict";Be();Xd();ho();Cs={name:"htmlFlow",tokenize:Jb,resolveTo:Yb,concrete:!0},Hb={tokenize:Kb,partial:!0},Wb={tokenize:Gb,partial:!0}});function Xb(e,n,t){let r=this,i,o,a;return s;function s(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),u}function u(A){return A===33?(e.consume(A),p):A===47?(e.consume(A),Re):A===63?(e.consume(A),ne):ht(A)?(e.consume(A),Xe):t(A)}function p(A){return A===45?(e.consume(A),d):A===91?(e.consume(A),o=0,P):ht(A)?(e.consume(A),ue):t(A)}function d(A){return A===45?(e.consume(A),g):t(A)}function h(A){return A===null?t(A):A===45?(e.consume(A),y):se(A)?(a=h,lt(A)):(e.consume(A),h)}function y(A){return A===45?(e.consume(A),g):h(A)}function g(A){return A===62?tt(A):A===45?y(A):h(A)}function P(A){let At="CDATA[";return A===At.charCodeAt(o++)?(e.consume(A),o===At.length?ee:P):t(A)}function ee(A){return A===null?t(A):A===93?(e.consume(A),Z):se(A)?(a=ee,lt(A)):(e.consume(A),ee)}function Z(A){return A===93?(e.consume(A),B):ee(A)}function B(A){return A===62?tt(A):A===93?(e.consume(A),B):ee(A)}function ue(A){return A===null||A===62?tt(A):se(A)?(a=ue,lt(A)):(e.consume(A),ue)}function ne(A){return A===null?t(A):A===63?(e.consume(A),ve):se(A)?(a=ne,lt(A)):(e.consume(A),ne)}function ve(A){return A===62?tt(A):ne(A)}function Re(A){return ht(A)?(e.consume(A),$):t(A)}function $(A){return A===45||ft(A)?(e.consume(A),$):Ue(A)}function Ue(A){return se(A)?(a=Ue,lt(A)):Se(A)?(e.consume(A),Ue):tt(A)}function Xe(A){return A===45||ft(A)?(e.consume(A),Xe):A===47||A===62||Le(A)?je(A):t(A)}function je(A){return A===47?(e.consume(A),tt):A===58||A===95||ht(A)?(e.consume(A),U):se(A)?(a=je,lt(A)):Se(A)?(e.consume(A),je):tt(A)}function U(A){return A===45||A===46||A===58||A===95||ft(A)?(e.consume(A),U):Te(A)}function Te(A){return A===61?(e.consume(A),ze):se(A)?(a=Te,lt(A)):Se(A)?(e.consume(A),Te):je(A)}function ze(A){return A===null||A===60||A===61||A===62||A===96?t(A):A===34||A===39?(e.consume(A),i=A,ye):se(A)?(a=ze,lt(A)):Se(A)?(e.consume(A),ze):(e.consume(A),Ce)}function ye(A){return A===i?(e.consume(A),i=void 0,Me):A===null?t(A):se(A)?(a=ye,lt(A)):(e.consume(A),ye)}function Ce(A){return A===null||A===34||A===39||A===60||A===61||A===96?t(A):A===47||A===62||Le(A)?je(A):(e.consume(A),Ce)}function Me(A){return A===47||A===62||Le(A)?je(A):t(A)}function tt(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),n):t(A)}function lt(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Nt}function Nt(A){return Se(A)?we(e,Ut,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):Ut(A)}function Ut(A){return e.enter("htmlTextData"),a(A)}}var Ps,Zd=M(()=>{"use strict";ut();Be();Ps={name:"htmlText",tokenize:Xb}});function tw(e){let n=-1;for(;++n<e.length;){let t=e[n][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(n+1,t.type==="labelImage"?4:2),t.type="data",n++)}return e}function nw(e,n){let t=e.length,r=0,i,o,a,s;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=t);let u={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},d={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",u,n],["enter",p,n]],s=Rt(s,e.slice(o+1,o+r+3)),s=Rt(s,[["enter",d,n]]),s=Rt(s,Cn(n.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),n)),s=Rt(s,[["exit",d,n],e[a-2],e[a-1],["exit",p,n]]),s=Rt(s,e.slice(a+1)),s=Rt(s,[["exit",u,n]]),pt(e,o,e.length,s),e}function rw(e,n,t){let r=this,i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(y){return o?o._inactive?h(y):(a=r.parser.defined.includes(kt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),u):t(y)}function u(y){return y===40?e.attempt(Qb,d,a?d:h)(y):y===91?e.attempt(Zb,d,a?p:h)(y):a?d(y):h(y)}function p(y){return e.attempt(ew,d,h)(y)}function d(y){return n(y)}function h(y){return o._balanced=!0,t(y)}}function iw(e,n,t){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Le(h)?Yn(e,o)(h):o(h)}function o(h){return h===41?d(h):So(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Le(h)?Yn(e,u)(h):d(h)}function s(h){return t(h)}function u(h){return h===34||h===39||h===40?xo(e,p,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function p(h){return Le(h)?Yn(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function ow(e,n,t){let r=this;return i;function i(s){return To.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function a(s){return t(s)}}function aw(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}var Jn,Qb,Zb,ew,ko=M(()=>{"use strict";ks();vs();As();Es();Be();wn();sr();Vr();Jn={name:"labelEnd",tokenize:rw,resolveTo:nw,resolveAll:tw},Qb={tokenize:iw},Zb={tokenize:ow},ew={tokenize:aw}});function sw(e,n,t){let r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):t(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}var Ms,eh=M(()=>{"use strict";ko();Ms={name:"labelStartImage",tokenize:sw,resolveAll:Jn.resolveAll}});function lw(e,n,t){let r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}var Ns,th=M(()=>{"use strict";ko();Ns={name:"labelStartLink",tokenize:lw,resolveAll:Jn.resolveAll}});function cw(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,n,"linePrefix")}}var Jr,nh=M(()=>{"use strict";ut();Jr={name:"lineEnding",tokenize:cw}});function uw(e,n,t){let r=0,i;return o;function o(p){return e.enter("thematicBreak"),a(p)}function a(p){return i=p,s(p)}function s(p){return p===i?(e.enter("thematicBreakSequence"),u(p)):r>=3&&(p===null||se(p))?(e.exit("thematicBreak"),n(p)):t(p)}function u(p){return p===i?(e.consume(p),r++,u):(e.exit("thematicBreakSequence"),Se(p)?we(e,s,"whitespace")(p):s(p))}}var Gn,Ls=M(()=>{"use strict";ut();Be();Gn={name:"thematicBreak",tokenize:uw}});function hw(e,n,t){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(g){let P=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(P==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:jr(g)){if(r.containerState.type||(r.containerState.type=P,e.enter(P,{_container:!0})),P==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Gn,t,p)(g):p(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(g)}return t(g)}function u(g){return jr(g)&&++a<10?(e.consume(g),u):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),p(g)):t(g)}function p(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(an,r.interrupt?t:d,e.attempt(pw,y,h))}function d(g){return r.containerState.initialBlankLine=!0,o++,y(g)}function h(g){return Se(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),y):t(g)}function y(g){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function fw(e,n,t){let r=this;return r.containerState._closeFlow=void 0,e.check(an,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,n,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Se(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dw,n,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(vt,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function mw(e,n,t){let r=this;return we(e,i,"listItemIndent",r.containerState.size+1);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(o):t(o)}}function gw(e){e.exit(this.containerState.type)}function yw(e,n,t){let r=this;return we(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let a=r.events[r.events.length-1];return!Se(o)&&a&&a[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}var vt,pw,dw,rh=M(()=>{"use strict";ut();Be();ho();Ls();vt={name:"list",tokenize:hw,continuation:{tokenize:fw},exit:gw},pw={tokenize:yw,partial:!0},dw={tokenize:mw,partial:!0}});function bw(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);let a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,n]),e}function ww(e,n,t){let r=this,i;return o;function o(p){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=p,a(p)):t(p)}function a(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===i?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),Se(p)?we(e,u,"lineSuffix")(p):u(p))}function u(p){return p===null||se(p)?(e.exit("setextHeadingLine"),n(p)):t(p)}}var vo,ih=M(()=>{"use strict";ut();Be();vo={name:"setextUnderline",tokenize:ww,resolveTo:bw}});var Ao=M(()=>{"use strict";Dd();Fd();ho();Ud();$d();qd();Bd();zd();Vd();Wd();Yd();Jd();Gd();Qd();Zd();ko();eh();th();nh();rh();ih();Ls()});function Ds(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vw,continuation:{tokenize:Aw},exit:Ew}},text:{91:{name:"gfmFootnoteCall",tokenize:kw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Tw,resolveTo:xw}}}}function Tw(e,n,t){let r=this,i=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a;for(;i--;){let u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return t(u);let p=kt(r.sliceSerialize({start:a.end,end:r.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function xw(e,n){let t=e.length,r;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){r=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",a,n],["enter",s,n],["exit",s,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...u),e}function kw(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,a;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(h){if(o>999||h===93&&!a||h===null||h===91||Le(h))return t(h);if(h===93){e.exit("chunkString");let y=e.exit("gfmFootnoteCallString");return i.includes(kt(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Le(h)||(a=!0),o++,e.consume(h),h===92?d:p}function d(h){return h===91||h===92||h===93?(e.consume(h),o++,p):p(h)}}function vw(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,a=0,s;return u;function u(P){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(P){return P===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(P)}function d(P){if(a>999||P===93&&!s||P===null||P===91||Le(P))return t(P);if(P===93){e.exit("chunkString");let ee=e.exit("gfmFootnoteDefinitionLabelString");return o=kt(r.sliceSerialize(ee)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Le(P)||(s=!0),a++,e.consume(P),P===92?h:d}function h(P){return P===91||P===92||P===93?(e.consume(P),a++,d):d(P)}function y(P){return P===58?(e.enter("definitionMarker"),e.consume(P),e.exit("definitionMarker"),i.includes(o)||i.push(o),we(e,g,"gfmFootnoteDefinitionWhitespace")):t(P)}function g(P){return n(P)}}function Aw(e,n,t){return e.check(an,n,e.attempt(Sw,n,t))}function Ew(e){e.exit("gfmFootnoteDefinition")}function _w(e,n,t){let r=this;return we(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(o):t(o)}}var Sw,oh=M(()=>{"use strict";Ao();ut();Be();sr();Sw={tokenize:_w,partial:!0}});var ah=M(()=>{"use strict";oh()});function Fs(e){let t=(e||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let p=u;for(;p--;)if(a[p][0]==="exit"&&a[p][1].type==="strikethroughSequenceTemporary"&&a[p][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[p][1].end.offset-a[p][1].start.offset){a[u][1].type="strikethroughSequence",a[p][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},a[p][1].start),end:Object.assign({},a[u][1].end)},h={type:"strikethroughText",start:Object.assign({},a[p][1].end),end:Object.assign({},a[u][1].start)},y=[["enter",d,s],["enter",a[p][1],s],["exit",a[p][1],s],["enter",h,s]],g=s.parser.constructs.insideSpan.null;g&&pt(y,y.length,0,Cn(g,a.slice(p+1,u),s)),pt(y,y.length,0,[["exit",h,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",d,s]]),pt(a,p-1,u-p+3,y),u=p+y.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){let p=this.previous,d=this.events,h=0;return y;function y(P){return p===126&&d[d.length-1][1].type!=="characterEscape"?u(P):(a.enter("strikethroughSequenceTemporary"),g(P))}function g(P){let ee=pr(p);if(P===126)return h>1?u(P):(a.consume(P),h++,g);if(h<2&&!t)return u(P);let Z=a.exit("strikethroughSequenceTemporary"),B=pr(P);return Z._open=!B||B===2&&!!ee,Z._close=!ee||ee===2&&!!B,s(P)}}}var sh=M(()=>{"use strict";wn();bs();Vr()});var lh=M(()=>{"use strict";sh()});function Ow(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}var Eo,ch=M(()=>{"use strict";Eo=class{constructor(){this.map=[]}add(n,t,r){Ow(this,n,t,r)}consume(n){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push([...n]),n.length=0;let i=r.pop();for(;i;)n.push(...i),i=r.pop();this.map.length=0}}});function uh(e,n){let t=!1,r=[];for(;n<e.length;){let i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}var ph=M(()=>{"use strict"});function Us(){return{flow:{null:{name:"table",tokenize:Rw,resolveAll:Iw}}}}function Rw(e,n,t){let r=this,i=0,o=0,a;return s;function s(U){let Te=r.events.length-1;for(;Te>-1;){let Ce=r.events[Te][1].type;if(Ce==="lineEnding"||Ce==="linePrefix")Te--;else break}let ze=Te>-1?r.events[Te][1].type:null,ye=ze==="tableHead"||ze==="tableRow"?$:u;return ye===$&&r.parser.lazy[r.now().line]?t(U):ye(U)}function u(U){return e.enter("tableHead"),e.enter("tableRow"),p(U)}function p(U){return U===124||(a=!0,o+=1),d(U)}function d(U){return U===null?t(U):se(U)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),g):t(U):Se(U)?we(e,d,"whitespace")(U):(o+=1,a&&(a=!1,i+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),h(U)))}function h(U){return U===null||U===124||Le(U)?(e.exit("data"),d(U)):(e.consume(U),U===92?y:h)}function y(U){return U===92||U===124?(e.consume(U),h):h(U)}function g(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(U):(e.enter("tableDelimiterRow"),a=!1,Se(U)?we(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):P(U))}function P(U){return U===45||U===58?Z(U):U===124?(a=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),ee):Re(U)}function ee(U){return Se(U)?we(e,Z,"whitespace")(U):Z(U)}function Z(U){return U===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),B):U===45?(o+=1,B(U)):U===null||se(U)?ve(U):Re(U)}function B(U){return U===45?(e.enter("tableDelimiterFiller"),ue(U)):Re(U)}function ue(U){return U===45?(e.consume(U),ue):U===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),ne):(e.exit("tableDelimiterFiller"),ne(U))}function ne(U){return Se(U)?we(e,ve,"whitespace")(U):ve(U)}function ve(U){return U===124?P(U):U===null||se(U)?!a||i!==o?Re(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(U)):Re(U)}function Re(U){return t(U)}function $(U){return e.enter("tableRow"),Ue(U)}function Ue(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),Ue):U===null||se(U)?(e.exit("tableRow"),n(U)):Se(U)?we(e,Ue,"whitespace")(U):(e.enter("data"),Xe(U))}function Xe(U){return U===null||U===124||Le(U)?(e.exit("data"),Ue(U)):(e.consume(U),U===92?je:Xe)}function je(U){return U===92||U===124?(e.consume(U),Xe):Xe(U)}}function Iw(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,p,d,h,y=new Eo;for(;++t<e.length;){let g=e[t],P=g[1];g[0]==="enter"?P.type==="tableHead"?(s=!1,u!==0&&(dh(y,n,u,p,d),d=void 0,u=0),p={type:"table",start:Object.assign({},P.start),end:Object.assign({},P.end)},y.add(t,0,[["enter",p,n]])):P.type==="tableRow"||P.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],a=[0,t+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},P.start),end:Object.assign({},P.end)},y.add(t,0,[["enter",d,n]])),i=P.type==="tableDelimiterRow"?2:d?3:1):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],h=_o(y,n,o,i,void 0,h),o=[0,0,0,0]),a[2]=t)):P.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],h=_o(y,n,o,i,void 0,h)),o=a,a=[o[1],t,0,0])):P.type==="tableHead"?(s=!0,u=t):P.type==="tableRow"||P.type==="tableDelimiterRow"?(u=t,o[1]!==0?(a[0]=a[1],h=_o(y,n,o,i,t,h)):a[1]!==0&&(h=_o(y,n,a,i,t,h)),i=0):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")&&(a[3]=t)}for(u!==0&&dh(y,n,u,p,d),y.consume(n.events),t=-1;++t<n.events.length;){let g=n.events[t];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=uh(n.events,t))}return e}function _o(e,n,t,r,i,o){let a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(o.end=Object.assign({},dr(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));let u=dr(n.events,t[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){let p=dr(n.events,t[2]),d=dr(n.events,t[3]),h={type:s,start:Object.assign({},p),end:Object.assign({},d)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){let y=n.events[t[2]],g=n.events[t[3]];if(y[1].end=Object.assign({},g[1].end),y[1].type="chunkText",y[1].contentType="text",t[3]>t[2]+1){let P=t[2]+1,ee=t[3]-t[2]-1;e.add(P,ee,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return i!==void 0&&(o.end=Object.assign({},dr(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function dh(e,n,t,r,i){let o=[],a=dr(n.events,t);i&&(i.end=Object.assign({},a),o.push(["exit",i,n])),r.end=Object.assign({},a),o.push(["exit",r,n]),e.add(t+1,0,o)}function dr(e,n){let t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}var hh=M(()=>{"use strict";ut();Be();ch();ph()});var fh=M(()=>{"use strict";hh()});function $s(){return{text:{91:Cw}}}function Pw(e,n,t){let r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Le(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):t(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(u)}function s(u){return se(u)?n(u):Se(u)?e.check({tokenize:Mw},n,t)(u):t(u)}}function Mw(e,n,t){return we(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}var Cw,mh=M(()=>{"use strict";ut();Be();Cw={name:"tasklistCheck",tokenize:Pw}});var gh=M(()=>{"use strict";mh()});function yh(e){return po([gs(),Ds(),Fs(e),Us(),$s()])}var bh=M(()=>{"use strict";fs();Nd();ah();lh();fh();gh()});function Oo(e){let n=this,t=e||Nw,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(yh(t)),o.push(ds()),a.push(hs(t))}var Nw,wh=M(()=>{"use strict";kd();bh();Nw={}});var Sh=M(()=>{"use strict";wh()});function Lw(e){let n=e.attempt(this.parser.constructs.contentInitial,r,i),t;return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,n,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return se(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var Th,xh=M(()=>{"use strict";ut();Be();Th={tokenize:Lw}});function Dw(e){let n=this,t=[],r=0,i,o,a;return s;function s(ne){if(r<t.length){let ve=t[r];return n.containerState=ve[1],e.attempt(ve[0].continuation,u,p)(ne)}return p(ne)}function u(ne){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&ue();let ve=n.events.length,Re=ve,$;for(;Re--;)if(n.events[Re][0]==="exit"&&n.events[Re][1].type==="chunkFlow"){$=n.events[Re][1].end;break}B(r);let Ue=ve;for(;Ue<n.events.length;)n.events[Ue][1].end=Object.assign({},$),Ue++;return pt(n.events,Re+1,0,n.events.slice(ve)),n.events.length=Ue,p(ne)}return s(ne)}function p(ne){if(r===t.length){if(!i)return y(ne);if(i.currentConstruct&&i.currentConstruct.concrete)return P(ne);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(kh,d,h)(ne)}function d(ne){return i&&ue(),B(r),y(ne)}function h(ne){return n.parser.lazy[n.now().line]=r!==t.length,a=n.now().offset,P(ne)}function y(ne){return n.containerState={},e.attempt(kh,g,P)(ne)}function g(ne){return r++,t.push([n.currentConstruct,n.containerState]),y(ne)}function P(ne){if(ne===null){i&&ue(),B(0),e.consume(ne);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),ee(ne)}function ee(ne){if(ne===null){Z(e.exit("chunkFlow"),!0),B(0),e.consume(ne);return}return se(ne)?(e.consume(ne),Z(e.exit("chunkFlow")),r=0,n.interrupt=void 0,s):(e.consume(ne),ee)}function Z(ne,ve){let Re=n.sliceStream(ne);if(ve&&Re.push(null),ne.previous=o,o&&(o.next=ne),o=ne,i.defineSkip(ne.start),i.write(Re),n.parser.lazy[ne.start.line]){let $=i.events.length;for(;$--;)if(i.events[$][1].start.offset<a&&(!i.events[$][1].end||i.events[$][1].end.offset>a))return;let Ue=n.events.length,Xe=Ue,je,U;for(;Xe--;)if(n.events[Xe][0]==="exit"&&n.events[Xe][1].type==="chunkFlow"){if(je){U=n.events[Xe][1].end;break}je=!0}for(B(r),$=Ue;$<n.events.length;)n.events[$][1].end=Object.assign({},U),$++;pt(n.events,Xe+1,0,n.events.slice(Ue)),n.events.length=$}}function B(ne){let ve=t.length;for(;ve-- >ne;){let Re=t[ve];n.containerState=Re[1],Re[0].exit.call(n,e)}t.length=ne}function ue(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Fw(e,n,t){return we(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var vh,kh,Ah=M(()=>{"use strict";ut();Be();wn();vh={tokenize:Dw},kh={tokenize:Fw}});function Uw(e){let n=this,t=e.attempt(an,r,e.attempt(this.parser.constructs.flowInitial,i,we(e,e.attempt(this.parser.constructs.flow,i,e.attempt(xs,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var Eh,_h=M(()=>{"use strict";Ao();ut();Eh={tokenize:Uw}});function Ch(e){return{tokenize:n,resolveAll:Ph(e==="text"?$w:void 0)};function n(t){let r=this,i=this.parser.constructs[e],o=t.attempt(i,a,s);return a;function a(d){return p(d)?o(d):s(d)}function s(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),u}function u(d){return p(d)?(t.exit("data"),o(d)):(t.consume(d),u)}function p(d){if(d===null)return!0;let h=i[d],y=-1;if(h)for(;++y<h.length;){let g=h[y];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function Ph(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function $w(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){let r=e[t-1][1],i=n.sliceStream(r),o=i.length,a=-1,s=0,u;for(;o--;){let p=i[o];if(typeof p=="string"){for(a=p.length;p.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(p===-2)u=!0,s++;else if(p!==-1){o++;break}}if(s){let p={type:t===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},p.start),r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(t,0,["enter",p,n],["exit",p,n]),t+=2)}t++}return e}var Oh,Rh,Ih,qs=M(()=>{"use strict";Oh={resolveAll:Ph()},Rh=Ch("string"),Ih=Ch("text")});function Mh(e,n,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],u=!0,p={consume:ve,enter:Re,exit:$,attempt:je(Ue),check:je(Xe),interrupt:je(Xe,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:ee,sliceSerialize:P,now:Z,defineSkip:B,write:g},h=n.tokenize.call(d,p),y;return n.resolveAll&&o.push(n),d;function g(ye){return a=Rt(a,ye),ue(),a[a.length-1]!==null?[]:(U(n,0),d.events=Cn(o,d.events,d),d.events)}function P(ye,Ce){return jw(ee(ye),Ce)}function ee(ye){return qw(a,ye)}function Z(){let{line:ye,column:Ce,offset:Me,_index:tt,_bufferIndex:lt}=r;return{line:ye,column:Ce,offset:Me,_index:tt,_bufferIndex:lt}}function B(ye){i[ye.line]=ye.column,ze()}function ue(){let ye;for(;r._index<a.length;){let Ce=a[r._index];if(typeof Ce=="string")for(ye=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ye&&r._bufferIndex<Ce.length;)ne(Ce.charCodeAt(r._bufferIndex));else ne(Ce)}}function ne(ye){u=void 0,y=ye,h=h(ye)}function ve(ye){se(ye)?(r.line++,r.column=1,r.offset+=ye===-3?2:1,ze()):ye!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=ye,u=!0}function Re(ye,Ce){let Me=Ce||{};return Me.type=ye,Me.start=Z(),d.events.push(["enter",Me,d]),s.push(Me),Me}function $(ye){let Ce=s.pop();return Ce.end=Z(),d.events.push(["exit",Ce,d]),Ce}function Ue(ye,Ce){U(ye,Ce.from)}function Xe(ye,Ce){Ce.restore()}function je(ye,Ce){return Me;function Me(tt,lt,Nt){let Ut,A,At,Lt;return Array.isArray(tt)?St(tt):"tokenize"in tt?St([tt]):_(tt);function _(dt){return Fn;function Fn(Gt){let ln=Gt!==null&&dt[Gt],vn=Gt!==null&&dt.null,Sr=[...Array.isArray(ln)?ln:ln?[ln]:[],...Array.isArray(vn)?vn:vn?[vn]:[]];return St(Sr)(Gt)}}function St(dt){return Ut=dt,A=0,dt.length===0?Nt:sn(dt[A])}function sn(dt){return Fn;function Fn(Gt){return Lt=Te(),At=dt,dt.partial||(d.currentConstruct=dt),dt.name&&d.parser.constructs.disable.null.includes(dt.name)?Zn(Gt):dt.tokenize.call(Ce?Object.assign(Object.create(d),Ce):d,p,wr,Zn)(Gt)}}function wr(dt){return u=!0,ye(At,Lt),lt}function Zn(dt){return u=!0,Lt.restore(),++A<Ut.length?sn(Ut[A]):Nt}}}function U(ye,Ce){ye.resolveAll&&!o.includes(ye)&&o.push(ye),ye.resolve&&pt(d.events,Ce,d.events.length-Ce,ye.resolve(d.events.slice(Ce),d)),ye.resolveTo&&(d.events=ye.resolveTo(d.events,d))}function Te(){let ye=Z(),Ce=d.previous,Me=d.currentConstruct,tt=d.events.length,lt=Array.from(s);return{restore:Nt,from:tt};function Nt(){r=ye,d.previous=Ce,d.currentConstruct=Me,d.events.length=tt,s=lt,ze()}}function ze(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qw(e,n){let t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex,a;if(t===i)a=[e[t].slice(r,o)];else{if(a=e.slice(t,i),r>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function jw(e,n){let t=-1,r=[],i;for(;++t<e.length;){let o=e[t],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
16
+ `))}function u(g,P,ee,Z){let B=ee.enter("tableCell"),ue=ee.enter("phrasing"),ne=ee.containerPhrasing(g,{...Z,before:o,after:o});return ue(),B(),ne}function p(g,P){return up(g,{align:P,alignDelimiters:r,padding:t,stringLength:i})}function d(g,P,ee){let Z=g.children,B=-1,ue=[],ne=P.enter("table");for(;++B<Z.length;)ue[B]=h(Z[B],P,ee);return ne(),ue}function h(g,P,ee){let Z=g.children,B=-1,ue=[],ne=P.enter("tableRow");for(;++B<Z.length;)ue[B]=u(Z[B],g,P,ee);return ne(),ue}function y(g,P,ee){let Z=Wr.inlineCode(g,P,ee);return ee.stack.includes("tableCell")&&(Z=Z.replace(/\|/g,"\\$&")),Z}}var Sd=M(()=>{"use strict";pp();cs()});var Td=M(()=>{"use strict";Sd()});function hs(){return{exit:{taskListCheckValueChecked:xd,taskListCheckValueUnchecked:xd,paragraph:sb}}}function fs(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lb}}}function xd(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function sb(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let r=t.children[0];if(r&&r.type==="text"){let i=n.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function lb(e,n,t,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);o&&s.move(a);let u=Wr.listItem(e,n,t,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),u;function p(d){return d+a}}var kd=M(()=>{"use strict";cs()});var Ad=M(()=>{"use strict";kd()});function ms(){return[Ba(),Va(),Ha(),ps(),hs()]}function gs(e){return{extensions:[za(),Wa(),Ya(),ds(e),fs()]}}var vd=M(()=>{"use strict";np();op();lp();Td();Ad()});var Ed=M(()=>{"use strict";vd()});function pt(e,n,t,r){let i=e.length,o=0,a;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);o<r.length;)a=r.slice(o,o+1e4),a.unshift(n,0),e.splice(...a),o+=1e4,n+=1e4}function Ot(e,n){return e.length>0?(pt(e,e.length,0,n),e):n}var wn=M(()=>{"use strict"});function mo(e){let n={},t=-1;for(;++t<e.length;)cb(n,e[t]);return n}function cb(e,n){let t;for(t in n){let i=(_d.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t],a;if(o)for(a in o){_d.call(i,a)||(i[a]=[]);let s=o[a];ub(i[a],Array.isArray(s)?s:s?[s]:[])}}}function ub(e,n){let t=-1,r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);pt(e,0,0,r)}var _d,ys=M(()=>{"use strict";wn();_d={}.hasOwnProperty});function ws(){return{text:on}}function hb(e,n,t){let r=this,i,o;return a;function a(h){return!bs(h)||!Ld.call(r,r.previous)||Ss(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return bs(h)?(e.consume(h),s):h===64?(e.consume(h),u):t(h)}function u(h){return h===46?e.check(db,d,p)(h):h===45||h===95||ft(h)?(o=!0,e.consume(h),u):d(h)}function p(h){return e.consume(h),i=!0,u}function d(h){return o&&i&&ht(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function fb(e,n,t){let r=this;return i;function i(a){return a!==87&&a!==119||!Md.call(r,r.previous)||Ss(r.events)?t(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(pb,e.attempt(Rd,e.attempt(Od,o),t),t)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(a)}}function mb(e,n,t){let r=this,i="",o=!1;return a;function a(h){return(h===72||h===104)&&Nd.call(r,r.previous)&&!Ss(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),s):t(h)}function s(h){if(ht(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),s;if(h===58){let y=i.toLowerCase();if(y==="http"||y==="https")return e.consume(h),u}return t(h)}function u(h){return h===47?(e.consume(h),o?p:(o=!0,u)):t(h)}function p(h){return h===null||Vn(h)||Le(h)||rn(h)||Wn(h)?t(h):e.attempt(Rd,e.attempt(Od,d),t)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function gb(e,n,t){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):t(a)}function o(a){return a===null?t(a):n(a)}}function yb(e,n,t){let r,i,o;return a;function a(p){return p===46||p===95?e.check(Id,u,s)(p):p===null||Le(p)||rn(p)||p!==45&&Wn(p)?u(p):(o=!0,e.consume(p),a)}function s(p){return p===95?r=!0:(i=r,r=void 0),e.consume(p),a}function u(p){return i||r||!o?t(p):n(p)}}function bb(e,n){let t=0,r=0;return i;function i(a){return a===40?(t++,e.consume(a),i):a===41&&r<t?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Id,n,o)(a):a===null||Le(a)||rn(a)?n(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function wb(e,n,t){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Le(s)||rn(s)?n(s):t(s)}function i(s){return s===null||s===40||s===91||Le(s)||rn(s)?n(s):r(s)}function o(s){return ht(s)?a(s):t(s)}function a(s){return s===59?(e.consume(s),r):ht(s)?(e.consume(s),a):t(s)}}function Sb(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return ft(o)?t(o):n(o)}}function Md(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function Nd(e){return!ht(e)}function Ld(e){return!(e===47||bs(e))}function bs(e){return e===43||e===45||e===46||e===95||ft(e)}function Ss(e){let n=e.length,t=!1;for(;n--;){let r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var pb,Rd,Od,Id,db,Cd,Pd,Sn,on,Yn,Dd=M(()=>{"use strict";Be();pb={tokenize:gb,partial:!0},Rd={tokenize:yb,partial:!0},Od={tokenize:bb,partial:!0},Id={tokenize:wb,partial:!0},db={tokenize:Sb,partial:!0},Cd={name:"wwwAutolink",tokenize:fb,previous:Md},Pd={name:"protocolAutolink",tokenize:mb,previous:Nd},Sn={name:"emailAutolink",tokenize:hb,previous:Ld},on={};Yn=48;for(;Yn<123;)on[Yn]=Sn,Yn++,Yn===58?Yn=65:Yn===91&&(Yn=97);on[43]=Sn;on[45]=Sn;on[46]=Sn;on[95]=Sn;on[72]=[Sn,Pd];on[104]=[Sn,Pd];on[87]=[Sn,Cd];on[119]=[Sn,Cd]});var Fd=M(()=>{"use strict";Dd()});function dr(e){if(e===null||Le(e)||rn(e))return 1;if(Wn(e))return 2}var Ts=M(()=>{"use strict";Be()});function Cn(e,n,t){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}var Hr=M(()=>{"use strict"});function Tb(e,n){let t=-1,r,i,o,a,s,u,p,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;let h=Object.assign({},e[r][1].end),y=Object.assign({},e[t][1].start);Ud(h,-u),Ud(y,u),a={type:u>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:y},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[t][1].start=Object.assign({},s.end),p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=Ot(p,[["enter",e[r][1],n],["exit",e[r][1],n]])),p=Ot(p,[["enter",i,n],["enter",a,n],["exit",a,n],["enter",o,n]]),p=Ot(p,Cn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),p=Ot(p,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,p=Ot(p,[["enter",e[t][1],n],["exit",e[t][1],n]])):d=0,pt(e,r-1,t-r+3,p),t=r+p.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function xb(e,n){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=dr(r),o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;let p=e.exit("attentionSequence"),d=dr(u),h=!d||d===2&&i||t.includes(u),y=!i||i===2&&d||t.includes(r);return p._open=!!(o===42?h:h&&(i||!y)),p._close=!!(o===42?y:y&&(d||!h)),n(u)}}function Ud(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var Yr,$d=M(()=>{"use strict";wn();Ts();Hr();Yr={name:"attention",tokenize:xb,resolveAll:Tb}});function kb(e,n,t){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(g){return ht(g)?(e.consume(g),a):g===64?t(g):p(g)}function a(g){return g===43||g===45||g===46||ft(g)?(r=1,s(g)):p(g)}function s(g){return g===58?(e.consume(g),r=0,u):(g===43||g===45||g===46||ft(g))&&r++<32?(e.consume(g),s):(r=0,p(g))}function u(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):g===null||g===32||g===60||Vn(g)?t(g):(e.consume(g),u)}function p(g){return g===64?(e.consume(g),d):zu(g)?(e.consume(g),p):t(g)}function d(g){return ft(g)?h(g):t(g)}function h(g){return g===46?(e.consume(g),r=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):y(g)}function y(g){if((g===45||ft(g))&&r++<63){let P=g===45?y:h;return e.consume(g),P}return t(g)}}var xs,qd=M(()=>{"use strict";Be();xs={name:"autolink",tokenize:kb}});function we(e,n,t,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return Se(u)?(e.enter(t),s(u)):n(u)}function s(u){return Se(u)&&o++<i?(e.consume(u),s):(e.exit(t),n(u))}}var ut=M(()=>{"use strict";Be()});function Ab(e,n,t){return r;function r(o){return Se(o)?we(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||se(o)?n(o):t(o)}}var an,go=M(()=>{"use strict";ut();Be();an={tokenize:Ab,partial:!0}});function vb(e,n,t){let r=this;return i;function i(a){if(a===62){let s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return t(a)}function o(a){return Se(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(a))}}function Eb(e,n,t){let r=this;return i;function i(a){return Se(a)?we(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(yo,n,t)(a)}}function _b(e){e.exit("blockQuote")}var yo,jd=M(()=>{"use strict";ut();Be();yo={name:"blockQuote",tokenize:vb,continuation:{tokenize:Eb},exit:_b}});function Rb(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Wu(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}var bo,Bd=M(()=>{"use strict";Be();bo={name:"characterEscape",tokenize:Rb}});function Ob(e,n,t){let r=this,i=0,o,a;return s;function s(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,a=ft,d(h))}function p(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Vu,d):(e.enter("characterReferenceValue"),o=7,a=zr,d(h))}function d(h){if(h===59&&i){let y=e.exit("characterReferenceValue");return a===ft&&!pr(r.sliceSerialize(y))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return a(h)&&i++<o?(e.consume(h),d):t(h)}}var wo,zd=M(()=>{"use strict";ho();Be();wo={name:"characterReference",tokenize:Ob}});function Ib(e,n,t){let r=this,i={tokenize:Oe,partial:!0},o=0,a=0,s;return u;function u($){return p($)}function p($){let Ue=r.events[r.events.length-1];return o=Ue&&Ue[1].type==="linePrefix"?Ue[2].sliceSerialize(Ue[1],!0).length:0,s=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d($)}function d($){return $===s?(a++,e.consume($),d):a<3?t($):(e.exit("codeFencedFenceSequence"),Se($)?we(e,h,"whitespace")($):h($))}function h($){return $===null||se($)?(e.exit("codeFencedFence"),r.interrupt?n($):e.check(Vd,ee,Ae)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y($))}function y($){return $===null||se($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h($)):Se($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,g,"whitespace")($)):$===96&&$===s?t($):(e.consume($),y)}function g($){return $===null||se($)?h($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),P($))}function P($){return $===null||se($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h($)):$===96&&$===s?t($):(e.consume($),P)}function ee($){return e.attempt(i,Ae,Z)($)}function Z($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),B}function B($){return o>0&&Se($)?we(e,ue,"linePrefix",o+1)($):ue($)}function ue($){return $===null||se($)?e.check(Vd,ee,Ae)($):(e.enter("codeFlowValue"),ne($))}function ne($){return $===null||se($)?(e.exit("codeFlowValue"),ue($)):(e.consume($),ne)}function Ae($){return e.exit("codeFenced"),n($)}function Oe($,Ue,Xe){let je=0;return U;function U(Me){return $.enter("lineEnding"),$.consume(Me),$.exit("lineEnding"),Te}function Te(Me){return $.enter("codeFencedFence"),Se(Me)?we($,ze,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Me):ze(Me)}function ze(Me){return Me===s?($.enter("codeFencedFenceSequence"),ye(Me)):Xe(Me)}function ye(Me){return Me===s?(je++,$.consume(Me),ye):je>=a?($.exit("codeFencedFenceSequence"),Se(Me)?we($,Ce,"whitespace")(Me):Ce(Me)):Xe(Me)}function Ce(Me){return Me===null||se(Me)?($.exit("codeFencedFence"),Ue(Me)):Xe(Me)}}}function Cb(e,n,t){let r=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}var Vd,So,Wd=M(()=>{"use strict";ut();Be();Vd={tokenize:Cb,partial:!0},So={name:"codeFenced",tokenize:Ib,concrete:!0}});function Mb(e,n,t){let r=this;return i;function i(p){return e.enter("codeIndented"),we(e,o,"linePrefix",5)(p)}function o(p){let d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(p):t(p)}function a(p){return p===null?u(p):se(p)?e.attempt(Pb,a,u)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||se(p)?(e.exit("codeFlowValue"),a(p)):(e.consume(p),s)}function u(p){return e.exit("codeIndented"),n(p)}}function Nb(e,n,t){let r=this;return i;function i(a){return r.parser.lazy[r.now().line]?t(a):se(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):we(e,o,"linePrefix",5)(a)}function o(a){let s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):se(a)?i(a):t(a)}}var Jr,Pb,Hd=M(()=>{"use strict";ut();Be();Jr={name:"codeIndented",tokenize:Mb},Pb={tokenize:Nb,partial:!0}});function Lb(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Db(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Fb(e,n,t){let r=this,i=0,o,a;return s;function s(y){return e.enter("codeText"),e.enter("codeTextSequence"),u(y)}function u(y){return y===96?(e.consume(y),i++,u):(e.exit("codeTextSequence"),p(y))}function p(y){return y===null?t(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),p):y===96?(a=e.enter("codeTextSequence"),o=0,h(y)):se(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("codeTextData"),d(y))}function d(y){return y===null||y===32||y===96||se(y)?(e.exit("codeTextData"),p(y)):(e.consume(y),d)}function h(y){return y===96?(e.consume(y),o++,h):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(a.type="codeTextData",d(y))}}var ks,Yd=M(()=>{"use strict";Be();ks={name:"codeText",tokenize:Fb,resolve:Lb,previous:Db}});function Gr(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}var To,Jd=M(()=>{"use strict";To=class{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){let r=t==null?Number.POSITIVE_INFINITY:t;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){let i=t||0;this.setCursor(Math.trunc(n));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Gr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Gr(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Gr(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){let t=this.left.splice(n,Number.POSITIVE_INFINITY);Gr(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Gr(this.left,t.reverse())}}}});function xo(e){let n={},t=-1,r,i,o,a,s,u,p,d=new To(e);for(;++t<d.length;){for(;t in n;)t=n[t];if(r=d.get(t),t&&r[1].type==="chunkFlow"&&d.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Ub(d,t)),t=n[t],p=!0);else if(r[1]._container){for(o=t,i=void 0;o--&&(a=d.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},d.get(i)[1].start),s=d.slice(i,t),s.unshift(r),d.splice(i,t-i+1,s))}}return pt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!p}function Ub(e,n){let t=e.get(n)[1],r=e.get(n)[2],i=n-1,o=[],a=t._tokenizer||r.parser[t.contentType](t.start),s=a.events,u=[],p={},d,h,y=-1,g=t,P=0,ee=0,Z=[ee];for(;g;){for(;e.get(++i)[1]!==g;);o.push(i),g._tokenizer||(d=r.sliceStream(g),g.next||d.push(null),h&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=g,g=g.next}for(g=t;++y<s.length;)s[y][0]==="exit"&&s[y-1][0]==="enter"&&s[y][1].type===s[y-1][1].type&&s[y][1].start.line!==s[y][1].end.line&&(ee=y+1,Z.push(ee),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):Z.pop(),y=Z.length;y--;){let B=s.slice(Z[y],Z[y+1]),ue=o.pop();u.push([ue,ue+B.length-1]),e.splice(ue,2,B)}for(u.reverse(),y=-1;++y<u.length;)p[P+u[y][0]]=P+u[y][1],P+=u[y][1]-u[y][0]-1;return p}var As=M(()=>{"use strict";wn();Jd()});function qb(e){return xo(e),e}function jb(e,n){let t;return r;function r(s){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):se(s)?e.check($b,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),n(s)}function a(s){return e.consume(s),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Bb(e,n,t){let r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),we(e,o,"linePrefix")}function o(a){if(a===null||se(a))return t(a);let s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}var vs,$b,Gd=M(()=>{"use strict";ut();Be();As();vs={tokenize:jb,resolve:qb},$b={tokenize:Bb,partial:!0}});function ko(e,n,t,r,i,o,a,s,u){let p=u||Number.POSITIVE_INFINITY,d=0;return h;function h(B){return B===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(B),e.exit(o),y):B===null||B===32||B===41||Vn(B)?t(B):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),ee(B))}function y(B){return B===62?(e.enter(o),e.consume(B),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),g(B))}function g(B){return B===62?(e.exit("chunkString"),e.exit(s),y(B)):B===null||B===60||se(B)?t(B):(e.consume(B),B===92?P:g)}function P(B){return B===60||B===62||B===92?(e.consume(B),g):g(B)}function ee(B){return!d&&(B===null||B===41||Le(B))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),n(B)):d<p&&B===40?(e.consume(B),d++,ee):B===41?(e.consume(B),d--,ee):B===null||B===32||B===40||Vn(B)?t(B):(e.consume(B),B===92?Z:ee)}function Z(B){return B===40||B===41||B===92?(e.consume(B),ee):ee(B)}}var Es=M(()=>{"use strict";Be()});function Ao(e,n,t,r,i,o){let a=this,s=0,u;return p;function p(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(o),d}function d(g){return s>999||g===null||g===91||g===93&&!u||g===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?t(g):g===93?(e.exit(o),e.enter(i),e.consume(g),e.exit(i),e.exit(r),n):se(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||se(g)||s++>999?(e.exit("chunkString"),d(g)):(e.consume(g),u||(u=!Se(g)),g===92?y:h)}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}var _s=M(()=>{"use strict";Be()});function vo(e,n,t,r,i,o){let a;return s;function s(y){return y===34||y===39||y===40?(e.enter(r),e.enter(i),e.consume(y),e.exit(i),a=y===40?41:y,u):t(y)}function u(y){return y===a?(e.enter(i),e.consume(y),e.exit(i),e.exit(r),n):(e.enter(o),p(y))}function p(y){return y===a?(e.exit(o),u(a)):y===null?t(y):se(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),we(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===a||y===null||se(y)?(e.exit("chunkString"),p(y)):(e.consume(y),y===92?h:d)}function h(y){return y===a||y===92?(e.consume(y),d):d(y)}}var Rs=M(()=>{"use strict";ut();Be()});function Jn(e,n){let t;return r;function r(i){return se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):Se(i)?we(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}var Os=M(()=>{"use strict";ut();Be()});function Vb(e,n,t){let r=this,i;return o;function o(g){return e.enter("definition"),a(g)}function a(g){return Ao.call(r,e,s,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function s(g){return i=kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u):t(g)}function u(g){return Le(g)?Jn(e,p)(g):p(g)}function p(g){return ko(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(zb,h,h)(g)}function h(g){return Se(g)?we(e,y,"whitespace")(g):y(g)}function y(g){return g===null||se(g)?(e.exit("definition"),r.parser.defined.push(i),n(g)):t(g)}}function Wb(e,n,t){return r;function r(s){return Le(s)?Jn(e,i)(s):t(s)}function i(s){return vo(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Se(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||se(s)?n(s):t(s)}}var Is,zb,Kd=M(()=>{"use strict";Es();_s();ut();Rs();Os();Be();lr();Is={name:"definition",tokenize:Vb},zb={tokenize:Wb,partial:!0}});function Hb(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return se(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}var Cs,Xd=M(()=>{"use strict";Be();Cs={name:"hardBreakEscape",tokenize:Hb}});function Yb(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},pt(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function Jb(e,n,t){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Le(d)?(e.exit("atxHeadingSequence"),s(d)):t(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||se(d)?(e.exit("atxHeading"),n(d)):Se(d)?we(e,s,"whitespace")(d):(e.enter("atxHeadingText"),p(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),s(d))}function p(d){return d===null||d===35||Le(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),p)}}var Ps,Qd=M(()=>{"use strict";ut();Be();wn();Ps={name:"headingAtx",tokenize:Jb,resolve:Yb}});var Zd,Ms,eh=M(()=>{"use strict";Zd=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ms=["pre","script","style","textarea"]});function Xb(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Qb(e,n,t){let r=this,i,o,a,s,u;return p;function p(_){return d(_)}function d(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),h}function h(_){return _===33?(e.consume(_),y):_===47?(e.consume(_),o=!0,ee):_===63?(e.consume(_),i=3,r.interrupt?n:v):ht(_)?(e.consume(_),a=String.fromCharCode(_),Z):t(_)}function y(_){return _===45?(e.consume(_),i=2,g):_===91?(e.consume(_),i=5,s=0,P):ht(_)?(e.consume(_),i=4,r.interrupt?n:v):t(_)}function g(_){return _===45?(e.consume(_),r.interrupt?n:v):t(_)}function P(_){let St="CDATA[";return _===St.charCodeAt(s++)?(e.consume(_),s===St.length?r.interrupt?n:ze:P):t(_)}function ee(_){return ht(_)?(e.consume(_),a=String.fromCharCode(_),Z):t(_)}function Z(_){if(_===null||_===47||_===62||Le(_)){let St=_===47,sn=a.toLowerCase();return!St&&!o&&Ms.includes(sn)?(i=1,r.interrupt?n(_):ze(_)):Zd.includes(a.toLowerCase())?(i=6,St?(e.consume(_),B):r.interrupt?n(_):ze(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(_):o?ue(_):ne(_))}return _===45||ft(_)?(e.consume(_),a+=String.fromCharCode(_),Z):t(_)}function B(_){return _===62?(e.consume(_),r.interrupt?n:ze):t(_)}function ue(_){return Se(_)?(e.consume(_),ue):U(_)}function ne(_){return _===47?(e.consume(_),U):_===58||_===95||ht(_)?(e.consume(_),Ae):Se(_)?(e.consume(_),ne):U(_)}function Ae(_){return _===45||_===46||_===58||_===95||ft(_)?(e.consume(_),Ae):Oe(_)}function Oe(_){return _===61?(e.consume(_),$):Se(_)?(e.consume(_),Oe):ne(_)}function $(_){return _===null||_===60||_===61||_===62||_===96?t(_):_===34||_===39?(e.consume(_),u=_,Ue):Se(_)?(e.consume(_),$):Xe(_)}function Ue(_){return _===u?(e.consume(_),u=null,je):_===null||se(_)?t(_):(e.consume(_),Ue)}function Xe(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Le(_)?Oe(_):(e.consume(_),Xe)}function je(_){return _===47||_===62||Se(_)?ne(_):t(_)}function U(_){return _===62?(e.consume(_),Te):t(_)}function Te(_){return _===null||se(_)?ze(_):Se(_)?(e.consume(_),Te):t(_)}function ze(_){return _===45&&i===2?(e.consume(_),tt):_===60&&i===1?(e.consume(_),lt):_===62&&i===4?(e.consume(_),vt):_===63&&i===3?(e.consume(_),v):_===93&&i===5?(e.consume(_),Ut):se(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Gb,Lt,ye)(_)):_===null||se(_)?(e.exit("htmlFlowData"),ye(_)):(e.consume(_),ze)}function ye(_){return e.check(Kb,Ce,Lt)(_)}function Ce(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Me}function Me(_){return _===null||se(_)?ye(_):(e.enter("htmlFlowData"),ze(_))}function tt(_){return _===45?(e.consume(_),v):ze(_)}function lt(_){return _===47?(e.consume(_),a="",Nt):ze(_)}function Nt(_){if(_===62){let St=a.toLowerCase();return Ms.includes(St)?(e.consume(_),vt):ze(_)}return ht(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),Nt):ze(_)}function Ut(_){return _===93?(e.consume(_),v):ze(_)}function v(_){return _===62?(e.consume(_),vt):_===45&&i===2?(e.consume(_),v):ze(_)}function vt(_){return _===null||se(_)?(e.exit("htmlFlowData"),Lt(_)):(e.consume(_),vt)}function Lt(_){return e.exit("htmlFlow"),n(_)}}function Zb(e,n,t){let r=this;return i;function i(a){return se(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function ew(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(an,n,t)}}var Ns,Gb,Kb,th=M(()=>{"use strict";Be();eh();go();Ns={name:"htmlFlow",tokenize:Qb,resolveTo:Xb,concrete:!0},Gb={tokenize:ew,partial:!0},Kb={tokenize:Zb,partial:!0}});function tw(e,n,t){let r=this,i,o,a;return s;function s(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),u}function u(v){return v===33?(e.consume(v),p):v===47?(e.consume(v),Oe):v===63?(e.consume(v),ne):ht(v)?(e.consume(v),Xe):t(v)}function p(v){return v===45?(e.consume(v),d):v===91?(e.consume(v),o=0,P):ht(v)?(e.consume(v),ue):t(v)}function d(v){return v===45?(e.consume(v),g):t(v)}function h(v){return v===null?t(v):v===45?(e.consume(v),y):se(v)?(a=h,lt(v)):(e.consume(v),h)}function y(v){return v===45?(e.consume(v),g):h(v)}function g(v){return v===62?tt(v):v===45?y(v):h(v)}function P(v){let vt="CDATA[";return v===vt.charCodeAt(o++)?(e.consume(v),o===vt.length?ee:P):t(v)}function ee(v){return v===null?t(v):v===93?(e.consume(v),Z):se(v)?(a=ee,lt(v)):(e.consume(v),ee)}function Z(v){return v===93?(e.consume(v),B):ee(v)}function B(v){return v===62?tt(v):v===93?(e.consume(v),B):ee(v)}function ue(v){return v===null||v===62?tt(v):se(v)?(a=ue,lt(v)):(e.consume(v),ue)}function ne(v){return v===null?t(v):v===63?(e.consume(v),Ae):se(v)?(a=ne,lt(v)):(e.consume(v),ne)}function Ae(v){return v===62?tt(v):ne(v)}function Oe(v){return ht(v)?(e.consume(v),$):t(v)}function $(v){return v===45||ft(v)?(e.consume(v),$):Ue(v)}function Ue(v){return se(v)?(a=Ue,lt(v)):Se(v)?(e.consume(v),Ue):tt(v)}function Xe(v){return v===45||ft(v)?(e.consume(v),Xe):v===47||v===62||Le(v)?je(v):t(v)}function je(v){return v===47?(e.consume(v),tt):v===58||v===95||ht(v)?(e.consume(v),U):se(v)?(a=je,lt(v)):Se(v)?(e.consume(v),je):tt(v)}function U(v){return v===45||v===46||v===58||v===95||ft(v)?(e.consume(v),U):Te(v)}function Te(v){return v===61?(e.consume(v),ze):se(v)?(a=Te,lt(v)):Se(v)?(e.consume(v),Te):je(v)}function ze(v){return v===null||v===60||v===61||v===62||v===96?t(v):v===34||v===39?(e.consume(v),i=v,ye):se(v)?(a=ze,lt(v)):Se(v)?(e.consume(v),ze):(e.consume(v),Ce)}function ye(v){return v===i?(e.consume(v),i=void 0,Me):v===null?t(v):se(v)?(a=ye,lt(v)):(e.consume(v),ye)}function Ce(v){return v===null||v===34||v===39||v===60||v===61||v===96?t(v):v===47||v===62||Le(v)?je(v):(e.consume(v),Ce)}function Me(v){return v===47||v===62||Le(v)?je(v):t(v)}function tt(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),n):t(v)}function lt(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Nt}function Nt(v){return Se(v)?we(e,Ut,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):Ut(v)}function Ut(v){return e.enter("htmlTextData"),a(v)}}var Ls,nh=M(()=>{"use strict";ut();Be();Ls={name:"htmlText",tokenize:tw}});function ow(e){let n=-1;for(;++n<e.length;){let t=e[n][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(n+1,t.type==="labelImage"?4:2),t.type="data",n++)}return e}function aw(e,n){let t=e.length,r=0,i,o,a,s;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=t);let u={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},d={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",u,n],["enter",p,n]],s=Ot(s,e.slice(o+1,o+r+3)),s=Ot(s,[["enter",d,n]]),s=Ot(s,Cn(n.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),n)),s=Ot(s,[["exit",d,n],e[a-2],e[a-1],["exit",p,n]]),s=Ot(s,e.slice(a+1)),s=Ot(s,[["exit",u,n]]),pt(e,o,e.length,s),e}function sw(e,n,t){let r=this,i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(y){return o?o._inactive?h(y):(a=r.parser.defined.includes(kt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),u):t(y)}function u(y){return y===40?e.attempt(nw,d,a?d:h)(y):y===91?e.attempt(rw,d,a?p:h)(y):a?d(y):h(y)}function p(y){return e.attempt(iw,d,h)(y)}function d(y){return n(y)}function h(y){return o._balanced=!0,t(y)}}function lw(e,n,t){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Le(h)?Jn(e,o)(h):o(h)}function o(h){return h===41?d(h):ko(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Le(h)?Jn(e,u)(h):d(h)}function s(h){return t(h)}function u(h){return h===34||h===39||h===40?vo(e,p,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function p(h){return Le(h)?Jn(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function cw(e,n,t){let r=this;return i;function i(s){return Ao.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function a(s){return t(s)}}function uw(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}var Gn,nw,rw,iw,Eo=M(()=>{"use strict";Es();_s();Rs();Os();Be();wn();lr();Hr();Gn={name:"labelEnd",tokenize:sw,resolveTo:aw,resolveAll:ow},nw={tokenize:lw},rw={tokenize:cw},iw={tokenize:uw}});function pw(e,n,t){let r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):t(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}var Ds,rh=M(()=>{"use strict";Eo();Ds={name:"labelStartImage",tokenize:pw,resolveAll:Gn.resolveAll}});function dw(e,n,t){let r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}var Fs,ih=M(()=>{"use strict";Eo();Fs={name:"labelStartLink",tokenize:dw,resolveAll:Gn.resolveAll}});function hw(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,n,"linePrefix")}}var Kr,oh=M(()=>{"use strict";ut();Kr={name:"lineEnding",tokenize:hw}});function fw(e,n,t){let r=0,i;return o;function o(p){return e.enter("thematicBreak"),a(p)}function a(p){return i=p,s(p)}function s(p){return p===i?(e.enter("thematicBreakSequence"),u(p)):r>=3&&(p===null||se(p))?(e.exit("thematicBreak"),n(p)):t(p)}function u(p){return p===i?(e.consume(p),r++,u):(e.exit("thematicBreakSequence"),Se(p)?we(e,s,"whitespace")(p):s(p))}}var Kn,Us=M(()=>{"use strict";ut();Be();Kn={name:"thematicBreak",tokenize:fw}});function yw(e,n,t){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(g){let P=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(P==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:zr(g)){if(r.containerState.type||(r.containerState.type=P,e.enter(P,{_container:!0})),P==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Kn,t,p)(g):p(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(g)}return t(g)}function u(g){return zr(g)&&++a<10?(e.consume(g),u):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),p(g)):t(g)}function p(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(an,r.interrupt?t:d,e.attempt(mw,y,h))}function d(g){return r.containerState.initialBlankLine=!0,o++,y(g)}function h(g){return Se(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),y):t(g)}function y(g){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function bw(e,n,t){let r=this;return r.containerState._closeFlow=void 0,e.check(an,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,n,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Se(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gw,n,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(At,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ww(e,n,t){let r=this;return we(e,i,"listItemIndent",r.containerState.size+1);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(o):t(o)}}function Sw(e){e.exit(this.containerState.type)}function Tw(e,n,t){let r=this;return we(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let a=r.events[r.events.length-1];return!Se(o)&&a&&a[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}var At,mw,gw,ah=M(()=>{"use strict";ut();Be();go();Us();At={name:"list",tokenize:yw,continuation:{tokenize:bw},exit:Sw},mw={tokenize:Tw,partial:!0},gw={tokenize:ww,partial:!0}});function xw(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);let a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,n]),e}function kw(e,n,t){let r=this,i;return o;function o(p){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=p,a(p)):t(p)}function a(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===i?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),Se(p)?we(e,u,"lineSuffix")(p):u(p))}function u(p){return p===null||se(p)?(e.exit("setextHeadingLine"),n(p)):t(p)}}var _o,sh=M(()=>{"use strict";ut();Be();_o={name:"setextUnderline",tokenize:kw,resolveTo:xw}});var Ro=M(()=>{"use strict";$d();qd();go();jd();Bd();zd();Wd();Hd();Yd();Gd();Kd();Xd();Qd();th();nh();Eo();rh();ih();oh();ah();sh();Us()});function $s(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Rw,continuation:{tokenize:Ow},exit:Iw}},text:{91:{name:"gfmFootnoteCall",tokenize:_w},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vw,resolveTo:Ew}}}}function vw(e,n,t){let r=this,i=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a;for(;i--;){let u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return t(u);let p=kt(r.sliceSerialize({start:a.end,end:r.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function Ew(e,n){let t=e.length,r;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){r=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",a,n],["enter",s,n],["exit",s,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...u),e}function _w(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,a;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(h){if(o>999||h===93&&!a||h===null||h===91||Le(h))return t(h);if(h===93){e.exit("chunkString");let y=e.exit("gfmFootnoteCallString");return i.includes(kt(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Le(h)||(a=!0),o++,e.consume(h),h===92?d:p}function d(h){return h===91||h===92||h===93?(e.consume(h),o++,p):p(h)}}function Rw(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,a=0,s;return u;function u(P){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(P){return P===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(P)}function d(P){if(a>999||P===93&&!s||P===null||P===91||Le(P))return t(P);if(P===93){e.exit("chunkString");let ee=e.exit("gfmFootnoteDefinitionLabelString");return o=kt(r.sliceSerialize(ee)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Le(P)||(s=!0),a++,e.consume(P),P===92?h:d}function h(P){return P===91||P===92||P===93?(e.consume(P),a++,d):d(P)}function y(P){return P===58?(e.enter("definitionMarker"),e.consume(P),e.exit("definitionMarker"),i.includes(o)||i.push(o),we(e,g,"gfmFootnoteDefinitionWhitespace")):t(P)}function g(P){return n(P)}}function Ow(e,n,t){return e.check(an,n,e.attempt(Aw,n,t))}function Iw(e){e.exit("gfmFootnoteDefinition")}function Cw(e,n,t){let r=this;return we(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(o):t(o)}}var Aw,lh=M(()=>{"use strict";Ro();ut();Be();lr();Aw={tokenize:Cw,partial:!0}});var ch=M(()=>{"use strict";lh()});function qs(e){let t=(e||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let p=u;for(;p--;)if(a[p][0]==="exit"&&a[p][1].type==="strikethroughSequenceTemporary"&&a[p][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[p][1].end.offset-a[p][1].start.offset){a[u][1].type="strikethroughSequence",a[p][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},a[p][1].start),end:Object.assign({},a[u][1].end)},h={type:"strikethroughText",start:Object.assign({},a[p][1].end),end:Object.assign({},a[u][1].start)},y=[["enter",d,s],["enter",a[p][1],s],["exit",a[p][1],s],["enter",h,s]],g=s.parser.constructs.insideSpan.null;g&&pt(y,y.length,0,Cn(g,a.slice(p+1,u),s)),pt(y,y.length,0,[["exit",h,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",d,s]]),pt(a,p-1,u-p+3,y),u=p+y.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){let p=this.previous,d=this.events,h=0;return y;function y(P){return p===126&&d[d.length-1][1].type!=="characterEscape"?u(P):(a.enter("strikethroughSequenceTemporary"),g(P))}function g(P){let ee=dr(p);if(P===126)return h>1?u(P):(a.consume(P),h++,g);if(h<2&&!t)return u(P);let Z=a.exit("strikethroughSequenceTemporary"),B=dr(P);return Z._open=!B||B===2&&!!ee,Z._close=!ee||ee===2&&!!B,s(P)}}}var uh=M(()=>{"use strict";wn();Ts();Hr()});var ph=M(()=>{"use strict";uh()});function Pw(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}var Oo,dh=M(()=>{"use strict";Oo=class{constructor(){this.map=[]}add(n,t,r){Pw(this,n,t,r)}consume(n){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push([...n]),n.length=0;let i=r.pop();for(;i;)n.push(...i),i=r.pop();this.map.length=0}}});function hh(e,n){let t=!1,r=[];for(;n<e.length;){let i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}var fh=M(()=>{"use strict"});function js(){return{flow:{null:{name:"table",tokenize:Mw,resolveAll:Nw}}}}function Mw(e,n,t){let r=this,i=0,o=0,a;return s;function s(U){let Te=r.events.length-1;for(;Te>-1;){let Ce=r.events[Te][1].type;if(Ce==="lineEnding"||Ce==="linePrefix")Te--;else break}let ze=Te>-1?r.events[Te][1].type:null,ye=ze==="tableHead"||ze==="tableRow"?$:u;return ye===$&&r.parser.lazy[r.now().line]?t(U):ye(U)}function u(U){return e.enter("tableHead"),e.enter("tableRow"),p(U)}function p(U){return U===124||(a=!0,o+=1),d(U)}function d(U){return U===null?t(U):se(U)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),g):t(U):Se(U)?we(e,d,"whitespace")(U):(o+=1,a&&(a=!1,i+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),h(U)))}function h(U){return U===null||U===124||Le(U)?(e.exit("data"),d(U)):(e.consume(U),U===92?y:h)}function y(U){return U===92||U===124?(e.consume(U),h):h(U)}function g(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(U):(e.enter("tableDelimiterRow"),a=!1,Se(U)?we(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):P(U))}function P(U){return U===45||U===58?Z(U):U===124?(a=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),ee):Oe(U)}function ee(U){return Se(U)?we(e,Z,"whitespace")(U):Z(U)}function Z(U){return U===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),B):U===45?(o+=1,B(U)):U===null||se(U)?Ae(U):Oe(U)}function B(U){return U===45?(e.enter("tableDelimiterFiller"),ue(U)):Oe(U)}function ue(U){return U===45?(e.consume(U),ue):U===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),ne):(e.exit("tableDelimiterFiller"),ne(U))}function ne(U){return Se(U)?we(e,Ae,"whitespace")(U):Ae(U)}function Ae(U){return U===124?P(U):U===null||se(U)?!a||i!==o?Oe(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(U)):Oe(U)}function Oe(U){return t(U)}function $(U){return e.enter("tableRow"),Ue(U)}function Ue(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),Ue):U===null||se(U)?(e.exit("tableRow"),n(U)):Se(U)?we(e,Ue,"whitespace")(U):(e.enter("data"),Xe(U))}function Xe(U){return U===null||U===124||Le(U)?(e.exit("data"),Ue(U)):(e.consume(U),U===92?je:Xe)}function je(U){return U===92||U===124?(e.consume(U),Xe):Xe(U)}}function Nw(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,p,d,h,y=new Oo;for(;++t<e.length;){let g=e[t],P=g[1];g[0]==="enter"?P.type==="tableHead"?(s=!1,u!==0&&(mh(y,n,u,p,d),d=void 0,u=0),p={type:"table",start:Object.assign({},P.start),end:Object.assign({},P.end)},y.add(t,0,[["enter",p,n]])):P.type==="tableRow"||P.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],a=[0,t+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},P.start),end:Object.assign({},P.end)},y.add(t,0,[["enter",d,n]])),i=P.type==="tableDelimiterRow"?2:d?3:1):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],h=Io(y,n,o,i,void 0,h),o=[0,0,0,0]),a[2]=t)):P.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],h=Io(y,n,o,i,void 0,h)),o=a,a=[o[1],t,0,0])):P.type==="tableHead"?(s=!0,u=t):P.type==="tableRow"||P.type==="tableDelimiterRow"?(u=t,o[1]!==0?(a[0]=a[1],h=Io(y,n,o,i,t,h)):a[1]!==0&&(h=Io(y,n,a,i,t,h)),i=0):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")&&(a[3]=t)}for(u!==0&&mh(y,n,u,p,d),y.consume(n.events),t=-1;++t<n.events.length;){let g=n.events[t];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=hh(n.events,t))}return e}function Io(e,n,t,r,i,o){let a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(o.end=Object.assign({},hr(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));let u=hr(n.events,t[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){let p=hr(n.events,t[2]),d=hr(n.events,t[3]),h={type:s,start:Object.assign({},p),end:Object.assign({},d)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){let y=n.events[t[2]],g=n.events[t[3]];if(y[1].end=Object.assign({},g[1].end),y[1].type="chunkText",y[1].contentType="text",t[3]>t[2]+1){let P=t[2]+1,ee=t[3]-t[2]-1;e.add(P,ee,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return i!==void 0&&(o.end=Object.assign({},hr(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function mh(e,n,t,r,i){let o=[],a=hr(n.events,t);i&&(i.end=Object.assign({},a),o.push(["exit",i,n])),r.end=Object.assign({},a),o.push(["exit",r,n]),e.add(t+1,0,o)}function hr(e,n){let t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}var gh=M(()=>{"use strict";ut();Be();dh();fh()});var yh=M(()=>{"use strict";gh()});function Bs(){return{text:{91:Lw}}}function Dw(e,n,t){let r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Le(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):t(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(u)}function s(u){return se(u)?n(u):Se(u)?e.check({tokenize:Fw},n,t)(u):t(u)}}function Fw(e,n,t){return we(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}var Lw,bh=M(()=>{"use strict";ut();Be();Lw={name:"tasklistCheck",tokenize:Dw}});var wh=M(()=>{"use strict";bh()});function Sh(e){return mo([ws(),$s(),qs(e),js(),Bs()])}var Th=M(()=>{"use strict";ys();Fd();ch();ph();yh();wh()});function Co(e){let n=this,t=e||Uw,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Sh(t)),o.push(ms()),a.push(gs(t))}var Uw,xh=M(()=>{"use strict";Ed();Th();Uw={}});var kh=M(()=>{"use strict";xh()});function $w(e){let n=e.attempt(this.parser.constructs.contentInitial,r,i),t;return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,n,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return se(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var Ah,vh=M(()=>{"use strict";ut();Be();Ah={tokenize:$w}});function qw(e){let n=this,t=[],r=0,i,o,a;return s;function s(ne){if(r<t.length){let Ae=t[r];return n.containerState=Ae[1],e.attempt(Ae[0].continuation,u,p)(ne)}return p(ne)}function u(ne){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&ue();let Ae=n.events.length,Oe=Ae,$;for(;Oe--;)if(n.events[Oe][0]==="exit"&&n.events[Oe][1].type==="chunkFlow"){$=n.events[Oe][1].end;break}B(r);let Ue=Ae;for(;Ue<n.events.length;)n.events[Ue][1].end=Object.assign({},$),Ue++;return pt(n.events,Oe+1,0,n.events.slice(Ae)),n.events.length=Ue,p(ne)}return s(ne)}function p(ne){if(r===t.length){if(!i)return y(ne);if(i.currentConstruct&&i.currentConstruct.concrete)return P(ne);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Eh,d,h)(ne)}function d(ne){return i&&ue(),B(r),y(ne)}function h(ne){return n.parser.lazy[n.now().line]=r!==t.length,a=n.now().offset,P(ne)}function y(ne){return n.containerState={},e.attempt(Eh,g,P)(ne)}function g(ne){return r++,t.push([n.currentConstruct,n.containerState]),y(ne)}function P(ne){if(ne===null){i&&ue(),B(0),e.consume(ne);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),ee(ne)}function ee(ne){if(ne===null){Z(e.exit("chunkFlow"),!0),B(0),e.consume(ne);return}return se(ne)?(e.consume(ne),Z(e.exit("chunkFlow")),r=0,n.interrupt=void 0,s):(e.consume(ne),ee)}function Z(ne,Ae){let Oe=n.sliceStream(ne);if(Ae&&Oe.push(null),ne.previous=o,o&&(o.next=ne),o=ne,i.defineSkip(ne.start),i.write(Oe),n.parser.lazy[ne.start.line]){let $=i.events.length;for(;$--;)if(i.events[$][1].start.offset<a&&(!i.events[$][1].end||i.events[$][1].end.offset>a))return;let Ue=n.events.length,Xe=Ue,je,U;for(;Xe--;)if(n.events[Xe][0]==="exit"&&n.events[Xe][1].type==="chunkFlow"){if(je){U=n.events[Xe][1].end;break}je=!0}for(B(r),$=Ue;$<n.events.length;)n.events[$][1].end=Object.assign({},U),$++;pt(n.events,Xe+1,0,n.events.slice(Ue)),n.events.length=$}}function B(ne){let Ae=t.length;for(;Ae-- >ne;){let Oe=t[Ae];n.containerState=Oe[1],Oe[0].exit.call(n,e)}t.length=ne}function ue(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function jw(e,n,t){return we(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var _h,Eh,Rh=M(()=>{"use strict";ut();Be();wn();_h={tokenize:qw},Eh={tokenize:jw}});function Bw(e){let n=this,t=e.attempt(an,r,e.attempt(this.parser.constructs.flowInitial,i,we(e,e.attempt(this.parser.constructs.flow,i,e.attempt(vs,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var Oh,Ih=M(()=>{"use strict";Ro();ut();Oh={tokenize:Bw}});function Nh(e){return{tokenize:n,resolveAll:Lh(e==="text"?zw:void 0)};function n(t){let r=this,i=this.parser.constructs[e],o=t.attempt(i,a,s);return a;function a(d){return p(d)?o(d):s(d)}function s(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),u}function u(d){return p(d)?(t.exit("data"),o(d)):(t.consume(d),u)}function p(d){if(d===null)return!0;let h=i[d],y=-1;if(h)for(;++y<h.length;){let g=h[y];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function Lh(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function zw(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){let r=e[t-1][1],i=n.sliceStream(r),o=i.length,a=-1,s=0,u;for(;o--;){let p=i[o];if(typeof p=="string"){for(a=p.length;p.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(p===-2)u=!0,s++;else if(p!==-1){o++;break}}if(s){let p={type:t===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},p.start),r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(t,0,["enter",p,n],["exit",p,n]),t+=2)}t++}return e}var Ch,Ph,Mh,zs=M(()=>{"use strict";Ch={resolveAll:Lh()},Ph=Nh("string"),Mh=Nh("text")});function Dh(e,n,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],u=!0,p={consume:Ae,enter:Oe,exit:$,attempt:je(Ue),check:je(Xe),interrupt:je(Xe,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:ee,sliceSerialize:P,now:Z,defineSkip:B,write:g},h=n.tokenize.call(d,p),y;return n.resolveAll&&o.push(n),d;function g(ye){return a=Ot(a,ye),ue(),a[a.length-1]!==null?[]:(U(n,0),d.events=Cn(o,d.events,d),d.events)}function P(ye,Ce){return Ww(ee(ye),Ce)}function ee(ye){return Vw(a,ye)}function Z(){let{line:ye,column:Ce,offset:Me,_index:tt,_bufferIndex:lt}=r;return{line:ye,column:Ce,offset:Me,_index:tt,_bufferIndex:lt}}function B(ye){i[ye.line]=ye.column,ze()}function ue(){let ye;for(;r._index<a.length;){let Ce=a[r._index];if(typeof Ce=="string")for(ye=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ye&&r._bufferIndex<Ce.length;)ne(Ce.charCodeAt(r._bufferIndex));else ne(Ce)}}function ne(ye){u=void 0,y=ye,h=h(ye)}function Ae(ye){se(ye)?(r.line++,r.column=1,r.offset+=ye===-3?2:1,ze()):ye!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=ye,u=!0}function Oe(ye,Ce){let Me=Ce||{};return Me.type=ye,Me.start=Z(),d.events.push(["enter",Me,d]),s.push(Me),Me}function $(ye){let Ce=s.pop();return Ce.end=Z(),d.events.push(["exit",Ce,d]),Ce}function Ue(ye,Ce){U(ye,Ce.from)}function Xe(ye,Ce){Ce.restore()}function je(ye,Ce){return Me;function Me(tt,lt,Nt){let Ut,v,vt,Lt;return Array.isArray(tt)?St(tt):"tokenize"in tt?St([tt]):_(tt);function _(dt){return Fn;function Fn(Gt){let ln=Gt!==null&&dt[Gt],An=Gt!==null&&dt.null,Tr=[...Array.isArray(ln)?ln:ln?[ln]:[],...Array.isArray(An)?An:An?[An]:[]];return St(Tr)(Gt)}}function St(dt){return Ut=dt,v=0,dt.length===0?Nt:sn(dt[v])}function sn(dt){return Fn;function Fn(Gt){return Lt=Te(),vt=dt,dt.partial||(d.currentConstruct=dt),dt.name&&d.parser.constructs.disable.null.includes(dt.name)?er(Gt):dt.tokenize.call(Ce?Object.assign(Object.create(d),Ce):d,p,Sr,er)(Gt)}}function Sr(dt){return u=!0,ye(vt,Lt),lt}function er(dt){return u=!0,Lt.restore(),++v<Ut.length?sn(Ut[v]):Nt}}}function U(ye,Ce){ye.resolveAll&&!o.includes(ye)&&o.push(ye),ye.resolve&&pt(d.events,Ce,d.events.length-Ce,ye.resolve(d.events.slice(Ce),d)),ye.resolveTo&&(d.events=ye.resolveTo(d.events,d))}function Te(){let ye=Z(),Ce=d.previous,Me=d.currentConstruct,tt=d.events.length,lt=Array.from(s);return{restore:Nt,from:tt};function Nt(){r=ye,d.previous=Ce,d.currentConstruct=Me,d.events.length=tt,s=lt,ze()}}function ze(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Vw(e,n){let t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex,a;if(t===i)a=[e[t].slice(r,o)];else{if(a=e.slice(t,i),r>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Ww(e,n){let t=-1,r=[],i;for(;++t<e.length;){let o=e[t],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
17
17
  `;break}case-3:{a=`\r
18
- `;break}case-2:{a=n?" ":" ";break}case-1:{if(!n&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}var Nh=M(()=>{"use strict";Be();wn();Vr()});var js={};Aa(js,{attentionMarkers:()=>Gw,contentInitial:()=>zw,disable:()=>Kw,document:()=>Bw,flow:()=>Hw,flowInitial:()=>Vw,insideSpan:()=>Jw,string:()=>Ww,text:()=>Yw});var Bw,zw,Vw,Hw,Ww,Yw,Jw,Gw,Kw,Lh=M(()=>{"use strict";Ao();qs();Bw={42:vt,43:vt,45:vt,48:vt,49:vt,50:vt,51:vt,52:vt,53:vt,54:vt,55:vt,56:vt,57:vt,62:fo},zw={91:_s},Vw={[-2]:Wr,[-1]:Wr,32:Wr},Hw={35:Rs,42:Gn,45:[vo,Gn],60:Cs,61:vo,95:Gn,96:yo,126:yo},Ww={38:go,92:mo},Yw={[-5]:Jr,[-4]:Jr,[-3]:Jr,33:Ms,38:go,42:Hr,60:[ws,Ps],91:Ns,92:[Os,mo],93:Jn,95:Hr,96:Ss},Jw={null:[Hr,Oh]},Gw={null:[42,95]},Kw={null:[]}});function Bs(e){let t=po([js,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(Th),document:i(vh),flow:i(Eh),string:i(Rh),text:i(Ih)};return r;function i(o){return a;function a(s){return Mh(r,o,s)}}}var Dh=M(()=>{"use strict";fs();xh();Ah();_h();qs();Nh();Lh()});function zs(e){for(;!wo(e););return e}var Fh=M(()=>{"use strict";Ts()});function Vs(){let e=1,n="",t=!0,r;return i;function i(o,a,s){let u=[],p,d,h,y,g;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===65279&&h++,t=void 0);h<o.length;){if(Uh.lastIndex=h,p=Uh.exec(o),y=p&&p.index!==void 0?p.index:o.length,g=o.charCodeAt(y),!p){n=o.slice(h);break}if(g===10&&h===y&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<y&&(u.push(o.slice(h,y)),e+=y-h),g){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=y+1}return s&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}var Uh,$h=M(()=>{"use strict";Uh=/[\0\t\n\r]/g});var qh=M(()=>{"use strict";Dh();Fh();$h()});function Pn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jh(e.position):"start"in e||"end"in e?jh(e):"line"in e||"column"in e?Hs(e):""}function Hs(e){return Bh(e&&e.line)+":"+Bh(e&&e.column)}function jh(e){return Hs(e&&e.start)+"-"+Hs(e&&e.end)}function Bh(e){return e&&typeof e=="number"?e:1}var zh=M(()=>{"use strict"});var Ws=M(()=>{"use strict";zh()});function Ys(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Xw(t)(zs(Bs(t).document().write(Vs()(e,n,!0))))}function Xw(e){let n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(si),autolinkProtocol:je,autolinkEmail:je,atxHeading:o(oi),blockQuote:o(Gt),characterEscape:je,characterReference:je,codeFenced:o(ln),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(ln,a),codeText:o(vn,a),codeTextData:je,data:je,codeFlowValue:je,definition:o(Sr),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(na),hardBreakEscape:o(ai),hardBreakTrailing:o(ai),htmlFlow:o(Tr,a),htmlFlowData:je,htmlText:o(Tr,a),htmlTextData:je,image:o(ra),label:a,link:o(si),listItem:o(ia),listItemValue:y,listOrdered:o(li,h),listUnordered:o(li),paragraph:o(oa),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(oi),strong:o(aa),thematicBreak:o(la)},exit:{atxHeading:u(),atxHeadingSequence:Re,autolink:u(),autolinkEmail:Fn,autolinkProtocol:dt,blockQuote:u(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:sn,characterReferenceMarkerNumeric:sn,characterReferenceValue:wr,characterReference:Zn,codeFenced:u(Z),codeFencedFence:ee,codeFencedFenceInfo:g,codeFencedFenceMeta:P,codeFlowValue:U,codeIndented:u(B),codeText:u(Me),codeTextData:U,data:U,definition:u(),definitionDestinationString:ve,definitionLabelString:ue,definitionTitleString:ne,emphasis:u(),hardBreakEscape:u(ze),hardBreakTrailing:u(ze),htmlFlow:u(ye),htmlFlowData:U,htmlText:u(Ce),htmlTextData:U,image:u(lt),label:Ut,labelText:Nt,lineEnding:Te,link:u(tt),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:St,resourceDestinationString:A,resourceTitleString:At,resource:Lt,setextHeading:u(Xe),setextHeadingLineSequence:Ue,setextHeadingText:$,strong:u(),thematicBreak:u()}};Wh(n,(e||{}).mdastExtensions||[]);let t={};return r;function r(q){let re={type:"root",children:[]},Ie={stack:[re],tokenStack:[],config:n,enter:s,exit:p,buffer:a,resume:d,data:t},De=[],He=-1;for(;++He<q.length;)if(q[He][1].type==="listOrdered"||q[He][1].type==="listUnordered")if(q[He][0]==="enter")De.push(He);else{let Dt=De.pop();He=i(q,Dt,He)}for(He=-1;++He<q.length;){let Dt=n[q[He][0]];Hh.call(Dt,q[He][1].type)&&Dt[q[He][1].type].call(Object.assign({sliceSerialize:q[He][2].sliceSerialize},Ie),q[He][1])}if(Ie.tokenStack.length>0){let Dt=Ie.tokenStack[Ie.tokenStack.length-1];(Dt[1]||Vh).call(Ie,void 0,Dt[0])}for(re.position={start:Mn(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Mn(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<n.transforms.length;)re=n.transforms[He](re)||re;return re}function i(q,re,Ie){let De=re-1,He=-1,Dt=!1,cn,Kt,un,Un;for(;++De<=Ie;){let Tt=q[De];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?He++:He--,Un=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(cn&&!Un&&!He&&!un&&(un=De),Un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Un=void 0}if(!He&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||He===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(cn){let pn=De;for(Kt=void 0;pn--;){let $t=q[pn];if($t[1].type==="lineEnding"||$t[1].type==="lineEndingBlank"){if($t[0]==="exit")continue;Kt&&(q[Kt][1].type="lineEndingBlank",Dt=!0),$t[1].type="lineEnding",Kt=pn}else if(!($t[1].type==="linePrefix"||$t[1].type==="blockQuotePrefix"||$t[1].type==="blockQuotePrefixWhitespace"||$t[1].type==="blockQuoteMarker"||$t[1].type==="listItemIndent"))break}un&&(!Kt||un<Kt)&&(cn._spread=!0),cn.end=Object.assign({},Kt?q[Kt][1].start:Tt[1].end),q.splice(Kt||De,0,["exit",cn,Tt[2]]),De++,Ie++}if(Tt[1].type==="listItemPrefix"){let pn={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};cn=pn,q.splice(De,0,["enter",pn,Tt[2]]),De++,Ie++,un=void 0,Un=!0}}}return q[re][1]._spread=Dt,Ie}function o(q,re){return Ie;function Ie(De){s.call(this,q(De),De),re&&re.call(this,De)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(q,re,Ie){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([re,Ie]),q.position={start:Mn(re.start),end:void 0}}function u(q){return re;function re(Ie){q&&q.call(this,Ie),p.call(this,Ie)}}function p(q,re){let Ie=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==q.type&&(re?re.call(this,q,De[0]):(De[1]||Vh).call(this,q,De[0]));else throw new Error("Cannot close `"+q.type+"` ("+Pn({start:q.start,end:q.end})+"): it\u2019s not open");Ie.position.end=Mn(q.end)}function d(){return bn(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function y(q){if(this.data.expectingFirstListItemValue){let re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function g(){let q=this.resume(),re=this.stack[this.stack.length-1];re.lang=q}function P(){let q=this.resume(),re=this.stack[this.stack.length-1];re.meta=q}function ee(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function Z(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function B(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q.replace(/(\r?\n|\r)$/g,"")}function ue(q){let re=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=re,Ie.identifier=kt(this.sliceSerialize(q)).toLowerCase()}function ne(){let q=this.resume(),re=this.stack[this.stack.length-1];re.title=q}function ve(){let q=this.resume(),re=this.stack[this.stack.length-1];re.url=q}function Re(q){let re=this.stack[this.stack.length-1];if(!re.depth){let Ie=this.sliceSerialize(q).length;re.depth=Ie}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function Ue(q){let re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function Xe(){this.data.setextHeadingSlurpLineEnding=void 0}function je(q){let Ie=this.stack[this.stack.length-1].children,De=Ie[Ie.length-1];(!De||De.type!=="text")&&(De=sa(),De.position={start:Mn(q.start),end:void 0},Ie.push(De)),this.stack.push(De)}function U(q){let re=this.stack.pop();re.value+=this.sliceSerialize(q),re.position.end=Mn(q.end)}function Te(q){let re=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ie=re.children[re.children.length-1];Ie.position.end=Mn(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(re.type)&&(je.call(this,q),U.call(this,q))}function ze(){this.data.atHardBreak=!0}function ye(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q}function Ce(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q}function Me(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q}function tt(){let q=this.stack[this.stack.length-1];if(this.data.inReference){let re=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=re,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function lt(){let q=this.stack[this.stack.length-1];if(this.data.inReference){let re=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=re,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function Nt(q){let re=this.sliceSerialize(q),Ie=this.stack[this.stack.length-2];Ie.label=fd(re),Ie.identifier=kt(re).toLowerCase()}function Ut(){let q=this.stack[this.stack.length-1],re=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){let De=q.children;Ie.children=De}else Ie.alt=re}function A(){let q=this.resume(),re=this.stack[this.stack.length-1];re.url=q}function At(){let q=this.resume(),re=this.stack[this.stack.length-1];re.title=q}function Lt(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function St(q){let re=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=re,Ie.identifier=kt(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function sn(q){this.data.characterReferenceType=q.type}function wr(q){let re=this.sliceSerialize(q),Ie=this.data.characterReferenceType,De;Ie?(De=uo(re,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=ur(re);let He=this.stack[this.stack.length-1];He.value+=De}function Zn(q){let re=this.stack.pop();re.position.end=Mn(q.end)}function dt(q){U.call(this,q);let re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(q)}function Fn(q){U.call(this,q);let re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(q)}function Gt(){return{type:"blockquote",children:[]}}function ln(){return{type:"code",lang:null,meta:null,value:""}}function vn(){return{type:"inlineCode",value:""}}function Sr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function na(){return{type:"emphasis",children:[]}}function oi(){return{type:"heading",depth:0,children:[]}}function ai(){return{type:"break"}}function Tr(){return{type:"html",value:""}}function ra(){return{type:"image",title:null,url:"",alt:null}}function si(){return{type:"link",title:null,url:"",children:[]}}function li(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function ia(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function oa(){return{type:"paragraph",children:[]}}function aa(){return{type:"strong",children:[]}}function sa(){return{type:"text",value:""}}function la(){return{type:"thematicBreak"}}}function Mn(e){return{line:e.line,column:e.column,offset:e.offset}}function Wh(e,n){let t=-1;for(;++t<n.length;){let r=n[t];Array.isArray(r)?Wh(e,r):Qw(e,r)}}function Qw(e,n){let t;for(t in n)if(Hh.call(n,t))switch(t){case"canContainEols":{let r=n[t];r&&e[t].push(...r);break}case"transforms":{let r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{let r=n[t];r&&Object.assign(e[t],r);break}}}function Vh(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Pn({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Pn({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Pn({start:n.start,end:n.end})+") is still open")}var Hh,Yh=M(()=>{"use strict";qr();qh();os();md();sr();co();Ws();Hh={}.hasOwnProperty});var Jh=M(()=>{"use strict";Yh()});function Ro(e){let n=this;n.parser=t;function t(r){return Ys(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}var Gh=M(()=>{"use strict";Jh()});var Kh=M(()=>{"use strict";Gh()});function Js(e){if(e)throw e}var Xh=M(()=>{"use strict"});var sf=Ig((B0,af)=>{"use strict";var Io=Object.prototype.hasOwnProperty,of=Object.prototype.toString,Qh=Object.defineProperty,Zh=Object.getOwnPropertyDescriptor,ef=function(n){return typeof Array.isArray=="function"?Array.isArray(n):of.call(n)==="[object Array]"},tf=function(n){if(!n||of.call(n)!=="[object Object]")return!1;var t=Io.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&Io.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i=="undefined"||Io.call(n,i)},nf=function(n,t){Qh&&t.name==="__proto__"?Qh(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},rf=function(n,t){if(t==="__proto__")if(Io.call(n,t)){if(Zh)return Zh(n,t).value}else return;return n[t]};af.exports=function e(){var n,t,r,i,o,a,s=arguments[0],u=1,p=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<p;++u)if(n=arguments[u],n!=null)for(t in n)r=rf(s,t),i=rf(n,t),s!==i&&(d&&i&&(tf(i)||(o=ef(i)))?(o?(o=!1,a=r&&ef(r)?r:[]):a=r&&tf(r)?r:{},nf(s,{name:t,newValue:e(d,a,i)})):typeof i!="undefined"&&nf(s,{name:t,newValue:i}));return s}});function Gr(e){if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var lf=M(()=>{"use strict"});function Gs(){let e=[],n={run:t,use:r};return n;function t(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...p){let d=e[++o],h=-1;if(u){a(u);return}for(;++h<i.length;)(p[h]===null||p[h]===void 0)&&(p[h]=i[h]);i=p,d?cf(d,s)(...p):a(null,...p)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function cf(e,n){let t;return r;function r(...a){let s=e.length>a.length,u;s&&a.push(i);try{u=e.apply(this,a)}catch(p){let d=p;if(s&&t)throw d;return i(d)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){t||(t=!0,n(a,...s))}function o(a){i(null,a)}}var uf=M(()=>{"use strict"});var pf=M(()=>{"use strict";uf()});var bt,df=M(()=>{"use strict";Ws();bt=class extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(a=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){let u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){let u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}let s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Pn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};bt.prototype.file="";bt.prototype.name="";bt.prototype.reason="";bt.prototype.message="";bt.prototype.stack="";bt.prototype.column=void 0;bt.prototype.line=void 0;bt.prototype.ancestors=void 0;bt.prototype.cause=void 0;bt.prototype.fatal=void 0;bt.prototype.place=void 0;bt.prototype.ruleId=void 0;bt.prototype.source=void 0});var hf=M(()=>{"use strict";df()});var Vt,ff=M(()=>{"use strict";Vt=Bt(require("path"),1)});var Ks,mf=M(()=>{"use strict";Ks=Bt(require("process"),1)});function Co(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var gf=M(()=>{"use strict"});var Xs,yf=M(()=>{"use strict";Xs=require("url");gf()});function Zs(e,n){if(e&&e.includes(Vt.default.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Vt.default.sep+"`")}function el(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function bf(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Zw(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Qs,Kr,wf=M(()=>{"use strict";hf();ff();mf();yf();Qs=["history","path","basename","stem","extname","dirname"],Kr=class{constructor(n){let t;n?Co(n)?t={path:n}:typeof n=="string"||Zw(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Ks.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Qs.length;){let o=Qs[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Qs.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?Vt.default.basename(this.path):void 0}set basename(n){el(n,"basename"),Zs(n,"basename"),this.path=Vt.default.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Vt.default.dirname(this.path):void 0}set dirname(n){bf(this.basename,"dirname"),this.path=Vt.default.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Vt.default.extname(this.path):void 0}set extname(n){if(Zs(n,"extname"),bf(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vt.default.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Co(n)&&(n=(0,Xs.fileURLToPath)(n)),el(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Vt.default.basename(this.path,this.extname):void 0}set stem(n){el(n,"stem"),Zs(n,"stem"),this.path=Vt.default.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){let i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){let i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){let i=new bt(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}});var Sf=M(()=>{"use strict";wf()});var Tf,xf=M(()=>{"use strict";Tf=(function(e){let r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o})});function tl(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function nl(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function rl(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kf(e){if(!Gr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vf(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Po(e){return tS(e)?e:new Kr(e)}function tS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function nS(e){return typeof e=="string"||rS(e)}function rS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Mo,eS,il,ol,Af=M(()=>{"use strict";Xh();Mo=Bt(sf(),1);lf();pf();Sf();xf();eS={}.hasOwnProperty,il=class e extends Tf{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Gs()}copy(){let n=new e,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];n.use(...r)}return n.data((0,Mo.default)(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(rl("data",this.frozen),this.namespace[n]=t,this):eS.call(this.namespace,n)&&this.namespace[n]||void 0:n?(rl("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;let n=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();let t=Po(n),r=this.parser||this.Parser;return tl("parse",r),r(String(t),t)}process(n,t){let r=this;return this.freeze(),tl("process",this.parser||this.Parser),nl("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,a){let s=Po(n),u=r.parse(s);r.run(u,s,function(d,h,y){if(d||!h||!y)return p(d);let g=h,P=r.stringify(g,y);nS(P)?y.value=P:y.result=P,p(d,y)});function p(d,h){d||!h?a(d):o?o(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),tl("processSync",this.parser||this.Parser),nl("processSync",this.compiler||this.Compiler),this.process(n,i),vf("processSync","process",t),r;function i(o,a){t=!0,Js(o),r=a}}run(n,t,r){kf(n),this.freeze();let i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(a,s){let u=Po(t);i.run(n,u,p);function p(d,h,y){let g=h||n;d?s(d):a?a(g):r(void 0,g,y)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),vf("runSync","run",r),i;function o(a,s){Js(a),i=s,r=!0}}stringify(n,t){this.freeze();let r=Po(t),i=this.compiler||this.Compiler;return nl("stringify",i),kf(n),i(n,r)}use(n,...t){let r=this.attachers,i=this.namespace;if(rl("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):a(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(p){if(typeof p=="function")u(p,[]);else if(typeof p=="object")if(Array.isArray(p)){let[d,...h]=p;u(d,h)}else a(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function a(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(p.plugins),p.settings&&(i.settings=(0,Mo.default)(!0,i.settings,p.settings))}function s(p){let d=-1;if(p!=null)if(Array.isArray(p))for(;++d<p.length;){let h=p[d];o(h)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function u(p,d){let h=-1,y=-1;for(;++h<r.length;)if(r[h][0]===p){y=h;break}if(y===-1)r.push([p,...d]);else if(d.length>0){let[g,...P]=d,ee=r[y][1];Gr(ee)&&Gr(g)&&(g=(0,Mo.default)(!0,ee,g)),r[y]=[p,g,...P]}}}},ol=new il().freeze()});var Ef=M(()=>{"use strict";Af()});function Of(e,n){let t=[e,...n],r=Math.max(...t.map(s=>s.length));if(r===0)return"";let i=Array.from({length:r},()=>0);for(let s of t)for(let u=0;u<r;u++){let p=(s[u]||"").length;p>i[u]&&(i[u]=p)}let o=s=>Array.from({length:r},(u,p)=>(s[p]||"").padEnd(i[p])).join(" | ").trimEnd(),a=[];a.push(o(e)),a.push(i.map(s=>"-".repeat(s)).join("-|-"));for(let s of n)a.push(o(s));return a.join(`
19
- `)}function gl(e){return ol().use(Ro).use(Oo).parse(e)}function Xr(e){return bn(e)}function Tn(e){return{type:"text",value:e}}function xn(e){return{type:"paragraph",children:e}}function kn(e){return{type:"root",children:e}}function yl(e={}){var n;return{type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.imageUrl,children:(n=e.children)!=null?n:[]}}function al(e,n={}){return{type:"text",content:e,style:n.style}}function sl(e){return{type:"image",url:e.url,alt:e.alt}}function No(){return{type:"divider"}}function ll(e){return{type:"section",children:e}}function Lo(e){return{type:"actions",children:e}}function Do(e){return{type:"button",id:e.id,label:e.label,style:e.style,value:e.value,disabled:e.disabled,actionType:e.actionType,callbackUrl:e.callbackUrl}}function cl(e){return{type:"link-button",id:e.id,url:e.url,label:e.label,style:e.style}}function ul(e){return{type:"field",label:e.label,value:e.value}}function pl(e){return{type:"fields",children:e}}function dl(e){return{type:"table",headers:e.headers,rows:e.rows,align:e.align}}function Fo(e){return{type:"link",url:e.url,label:e.label}}function Qr(e){let n=[];e.title&&n.push(`**${e.title}**`),e.subtitle&&n.push(e.subtitle);for(let t of e.children){let r=bl(t);r&&n.push(r)}return n.join(`
20
- `)}function bl(e){switch(e.type){case"text":return e.content;case"link":return`${e.label} (${e.url})`;case"fields":return e.children.map(n=>`${n.label}: ${n.value}`).join(`
21
- `);case"actions":return null;case"table":return Of(e.headers,e.rows);case"section":return e.children.map(n=>bl(n)).filter(Boolean).join(`
22
- `);default:return null}}function If(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="modal"}function oS(e){let n=e.filter(t=>typeof t=="object"&&t!==null&&"type"in t&&iS.includes(t.type));return n.length<e.length&&console.warn("[chat] Modal contains unsupported child elements that were ignored"),n}function hl(e){var n;return{type:"modal",callbackId:e.callbackId,callbackUrl:e.callbackUrl,title:e.title,submitLabel:e.submitLabel,closeLabel:e.closeLabel,notifyOnClose:e.notifyOnClose,privateMetadata:e.privateMetadata,children:(n=e.children)!=null?n:[]}}function Uo(e){return{type:"text_input",id:e.id,label:e.label,placeholder:e.placeholder,initialValue:e.initialValue,multiline:e.multiline,optional:e.optional,maxLength:e.maxLength}}function $o(e){if(!e.options||e.options.length===0)throw new Error("Select requires at least one option");return{type:"select",id:e.id,label:e.label,placeholder:e.placeholder,options:e.options,initialOption:e.initialOption,optional:e.optional}}function fl(e){return{type:"external_select",id:e.id,initialOption:e.initialOption,label:e.label,placeholder:e.placeholder,minQueryLength:e.minQueryLength,optional:e.optional}}function qo(e){return{label:e.label,value:e.value,description:e.description}}function ml(e){if(!e.options||e.options.length===0)throw new Error("RadioSelect requires at least one option");return{type:"radio_select",id:e.id,label:e.label,options:e.options,initialOption:e.initialOption,optional:e.optional}}function jo(e){return typeof e=="object"&&e!==null&&e.$$typeof===wl}function Sl(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(Sl);if(jo(e)){let n=xl(e);return n?[n]:[]}return typeof e=="object"&&"type"in e?[e]:typeof e=="string"||typeof e=="number"?[String(e)]:[]}function aS(e){return!("id"in e||"url"in e||"label"in e)}function sS(e){return"id"in e&&typeof e.id=="string"&&!("url"in e)}function lS(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)}function Tl(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)&&!("alt"in e)&&!("style"in e)}function cS(e){return"url"in e&&typeof e.url=="string"}function uS(e){return"label"in e&&"value"in e&&typeof e.label=="string"&&typeof e.value=="string"}function pS(e){return!("id"in e||"url"in e||"callbackId"in e)&&("title"in e||"subtitle"in e||"imageUrl"in e)}function dS(e){return"callbackId"in e&&"title"in e}function hS(e){return"id"in e&&"label"in e&&!("options"in e)&&!("value"in e)}function _f(e){return"id"in e&&"label"in e&&!("value"in e)}function fS(e){return"id"in e&&"label"in e&&!("value"in e)&&!("children"in e)}function mS(e){return"label"in e&&"value"in e&&!("id"in e)}function xl(e){var a,s,u,p;let{type:n,props:t,children:r}=e,i=Sl(r);if(n===al){let d=aS(t)?t:{style:void 0},h=i.length>0?i.map(String).join(""):String((a=d.children)!=null?a:"");return al(h,{style:d.style})}if(n===ll)return ll(i);if(n===Lo)return Lo(i);if(n===pl)return pl(i);if(n===Do){if(!sS(t))throw new Error("Button requires an 'id' prop");let d=i.length>0?i.map(String).join(""):(s=t.label)!=null?s:"";return Do({id:t.id,label:d,style:t.style,value:t.value,actionType:t.actionType,callbackUrl:t.callbackUrl,disabled:t.disabled})}if(n===cl){if(!lS(t))throw new Error("LinkButton requires a 'url' prop");let d=i.length>0?i.map(String).join(""):(u=t.label)!=null?u:"";return cl({id:t.id,url:t.url,label:d,style:t.style})}if(n===Fo){if(!Tl(t))throw new Error("CardLink requires a 'url' prop");let d=i.length>0?i.map(String).join(""):(p=t.label)!=null?p:"";return Fo({url:t.url,label:d})}if(n===sl){if(!cS(t))throw new Error("Image requires a 'url' prop");return sl({url:t.url,alt:t.alt})}if(n===ul){if(!uS(t))throw new Error("Field requires 'label' and 'value' props");return ul({label:t.label,value:t.value})}if(n===No)return No();if(n===hl){if(!dS(t))throw new Error("Modal requires 'callbackId' and 'title' props");return hl({callbackId:t.callbackId,callbackUrl:t.callbackUrl,title:t.title,submitLabel:t.submitLabel,closeLabel:t.closeLabel,notifyOnClose:t.notifyOnClose,privateMetadata:t.privateMetadata,children:oS(i)})}if(n===Uo){if(!hS(t))throw new Error("TextInput requires 'id' and 'label' props");return Uo({id:t.id,label:t.label,placeholder:t.placeholder,initialValue:t.initialValue,multiline:t.multiline,optional:t.optional,maxLength:t.maxLength})}if(n===$o){if(!_f(t))throw new Error("Select requires 'id' and 'label' props");return $o({id:t.id,label:t.label,placeholder:t.placeholder,initialOption:t.initialOption,optional:t.optional,options:i})}if(n===fl){if(!fS(t))throw new Error("ExternalSelect requires 'id' and 'label' props");return fl({id:t.id,initialOption:t.initialOption,label:t.label,placeholder:t.placeholder,minQueryLength:t.minQueryLength,optional:t.optional})}if(n===ml){if(!_f(t))throw new Error("RadioSelect requires 'id' and 'label' props");return ml({id:t.id,label:t.label,initialOption:t.initialOption,optional:t.optional,options:i})}if(n===qo){if(!mS(t))throw new Error("SelectOption requires 'label' and 'value' props");return qo({label:t.label,value:t.value,description:t.description})}if(n===dl){let d=t;return dl({headers:d.headers,rows:d.rows})}let o=pS(t)?t:{};return yl({title:o.title,subtitle:o.subtitle,imageUrl:o.imageUrl,children:i})}function kl(e,n,t){let{children:r,...i}=n;return{$$typeof:wl,type:e,props:i,children:r!=null?[r]:[]}}function Cf(e,n,t){let{children:r,...i}=n,o;return Array.isArray(r)?o=r:r!=null?o=[r]:o=[],{$$typeof:wl,type:e,props:i,children:o}}function Mf(e){return Sl(e.children)}function Ht(e){if(jo(e)){let n=xl(e);if(n&&typeof n=="object"&&"type"in n&&n.type==="card")return n}return typeof e=="object"&&e!==null&&"type"in e&&e.type==="card"?e:null}function vl(e){if(jo(e)){let n=xl(e);if(n&&typeof n=="object"&&"type"in n&&n.type==="modal")return n}return If(e)?e:null}function Wt(e){if(jo(e))return!0;if(typeof e=="object"&&e!==null&&"$$typeof"in e&&typeof e.$$typeof=="symbol"){let n=e.$$typeof.toString();return n.includes("react.element")||n.includes("react.transitional.element")}return!1}var Rf,iS,wl,Pf,Al=M(()=>{"use strict";qr();Sh();Kh();Ef();Rf=al;iS=["text_input","select","external_select","radio_select","text","fields"];wl=Symbol.for("chat.jsx.element");Pf=kl});var Nf={};Aa(Nf,{Fragment:()=>Mf,isCardLinkProps:()=>Tl,isJSX:()=>Wt,jsx:()=>kl,jsxDEV:()=>Pf,jsxs:()=>Cf,toCardElement:()=>Ht,toModalElement:()=>vl});var Lf=M(()=>{"use strict";Al()});var Qx={};Aa(Qx,{Actions:()=>Dl,AgentDeliveryError:()=>yn,Button:()=>Fl,Card:()=>Ul,CardLink:()=>$l,CardText:()=>ql,Client:()=>or,CronExpression:()=>Ea,Divider:()=>jl,NOVU_OPTIONS:()=>Dn,NovuClient:()=>Jt,NovuController:()=>Pt,NovuHandler:()=>Yt,NovuModule:()=>ii,NovuRequestHandler:()=>hr,REGISTER_API_PATH:()=>Yl,REGISTER_CONTROLLER_DECORATORS:()=>Jl,Select:()=>Bl,SelectOption:()=>zl,SeverityLevelEnum:()=>Qo,TextInput:()=>Vl,agent:()=>Hl,frameworkName:()=>Jm,providerSchemas:()=>Jo,registerApiPath:()=>ta,registerControllerDecorators:()=>Kl,step:()=>Hm,workflow:()=>Vm});module.exports=Cg(Qx);var Ru=require("jsonrepair");var Rr=(i=>(i.TRIGGER="trigger",i.EXECUTE="execute",i.PREVIEW="preview",i.AGENT_EVENT="agent-event",i))(Rr||{}),yi=(r=>(r.DISCOVER="discover",r.HEALTH_CHECK="health-check",r.CODE="code",r))(yi||{});var Ea=(te=>(te.EVERY_SECOND="* * * * * *",te.EVERY_5_SECONDS="*/5 * * * * *",te.EVERY_10_SECONDS="*/10 * * * * *",te.EVERY_30_SECONDS="*/30 * * * * *",te.EVERY_MINUTE="*/1 * * * *",te.EVERY_5_MINUTES="0 */5 * * * *",te.EVERY_10_MINUTES="0 */10 * * * *",te.EVERY_30_MINUTES="0 */30 * * * *",te.EVERY_HOUR="0 0-23/1 * * *",te.EVERY_2_HOURS="0 0-23/2 * * *",te.EVERY_3_HOURS="0 0-23/3 * * *",te.EVERY_4_HOURS="0 0-23/4 * * *",te.EVERY_5_HOURS="0 0-23/5 * * *",te.EVERY_6_HOURS="0 0-23/6 * * *",te.EVERY_7_HOURS="0 0-23/7 * * *",te.EVERY_8_HOURS="0 0-23/8 * * *",te.EVERY_9_HOURS="0 0-23/9 * * *",te.EVERY_10_HOURS="0 0-23/10 * * *",te.EVERY_11_HOURS="0 0-23/11 * * *",te.EVERY_12_HOURS="0 0-23/12 * * *",te.EVERY_DAY_AT_1AM="0 01 * * *",te.EVERY_DAY_AT_2AM="0 02 * * *",te.EVERY_DAY_AT_3AM="0 03 * * *",te.EVERY_DAY_AT_4AM="0 04 * * *",te.EVERY_DAY_AT_5AM="0 05 * * *",te.EVERY_DAY_AT_6AM="0 06 * * *",te.EVERY_DAY_AT_7AM="0 07 * * *",te.EVERY_DAY_AT_8AM="0 08 * * *",te.EVERY_DAY_AT_9AM="0 09 * * *",te.EVERY_DAY_AT_10AM="0 10 * * *",te.EVERY_DAY_AT_11AM="0 11 * * *",te.EVERY_DAY_AT_NOON="0 12 * * *",te.EVERY_DAY_AT_1PM="0 13 * * *",te.EVERY_DAY_AT_2PM="0 14 * * *",te.EVERY_DAY_AT_3PM="0 15 * * *",te.EVERY_DAY_AT_4PM="0 16 * * *",te.EVERY_DAY_AT_5PM="0 17 * * *",te.EVERY_DAY_AT_6PM="0 18 * * *",te.EVERY_DAY_AT_7PM="0 19 * * *",te.EVERY_DAY_AT_8PM="0 20 * * *",te.EVERY_DAY_AT_9PM="0 21 * * *",te.EVERY_DAY_AT_10PM="0 22 * * *",te.EVERY_DAY_AT_11PM="0 23 * * *",te.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",te.EVERY_WEEK="0 0 * * 0",te.EVERY_WEEKDAY="0 0 * * 1-5",te.EVERY_WEEKEND="0 0 * * 6,0",te.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",te.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",te.EVERY_2ND_DAY_OF_MONTH_AT_10AM="0 10 2 * *",te.EVERY_2ND_HOUR="0 */2 * * *",te.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",te.EVERY_2ND_MONTH="0 0 1 */2 *",te.EVERY_QUARTER="0 0 1 */3 *",te.EVERY_6_MONTHS="0 0 1 */6 *",te.EVERY_YEAR="0 0 1 0 *",te.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",te.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",te.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",te.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",te.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",te.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",te.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",te.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",te.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",te.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",te.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",te.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",te.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",te.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",te.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",te.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",te.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",te.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",te.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",te.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",te.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",te.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",te.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",te.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",te.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",te.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",te.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",te.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5",te))(Ea||{});var zt=(Te=>(Te.BRIDGE_ERROR="BridgeError",Te.EXECUTION_EVENT_CONTROL_INVALID_ERROR="ExecutionEventControlInvalidError",Te.EXECUTION_EVENT_PAYLOAD_INVALID_ERROR="ExecutionEventPayloadInvalidError",Te.EXECUTION_PROVIDER_OUTPUT_INVALID_ERROR="ExecutionProviderOutputInvalidError",Te.EXECUTION_STATE_CONTROL_INVALID_ERROR="ExecutionStateControlInvalidError",Te.EXECUTION_STATE_CORRUPT_ERROR="ExecutionStateCorruptError",Te.EXECUTION_STATE_OUTPUT_INVALID_ERROR="ExecutionStateOutputInvalidError",Te.EXECUTION_STATE_RESULT_INVALID_ERROR="ExecutionStateResultInvalidError",Te.INVALID_ACTION_ERROR="InvalidActionError",Te.METHOD_NOT_ALLOWED_ERROR="MethodNotAllowedError",Te.MISSING_DEPENDENCY_ERROR="MissingDependencyError",Te.MISSING_SECRET_KEY_ERROR="MissingSecretKeyError",Te.PROVIDER_EXECUTION_FAILED_ERROR="ProviderExecutionFailedError",Te.PROVIDER_NOT_FOUND_ERROR="ProviderNotFoundError",Te.SIGNATURE_EXPIRED_ERROR="SignatureExpiredError",Te.SIGNATURE_INVALID_ERROR="SignatureInvalidError",Te.SIGNATURE_MISMATCH_ERROR="SignatureMismatchError",Te.SIGNATURE_NOT_FOUND_ERROR="SignatureNotFoundError",Te.SIGNATURE_VERSION_INVALID_ERROR="SignatureVersionInvalidError",Te.SIGNING_KEY_NOT_FOUND_ERROR="SigningKeyNotFoundError",Te.STEP_ALREADY_EXISTS_ERROR="StepAlreadyExistsError",Te.STEP_CONTROL_COMPILATION_FAILED_ERROR="StepControlCompilationFailedError",Te.STEP_EXECUTION_FAILED_ERROR="StepExecutionFailedError",Te.STEP_NOT_FOUND_ERROR="StepNotFoundError",Te.WORKFLOW_ALREADY_EXISTS_ERROR="WorkflowAlreadyExistsError",Te.WORKFLOW_NOT_FOUND_ERROR="WorkflowNotFoundError",Te.WORKFLOW_PAYLOAD_INVALID_ERROR="WorkflowPayloadInvalidError",Te))(zt||{});var bi=(r=>(r.POST="POST",r.GET="GET",r.OPTIONS="OPTIONS",r))(bi||{});var Pg=e=>{var t,r;if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(r=(t=n==null?void 0:n.constructor)==null?void 0:t.name.endsWith("Error"))!=null?r:!1},mn=class extends Error{},wi=class extends mn{constructor(){super(...arguments);this.statusCode=404}},Ot=class extends mn{constructor(){super(...arguments);this.statusCode=400}},En=class extends mn{constructor(){super(...arguments);this.statusCode=401}},_n=class extends mn{constructor(n,{cause:t}={}){var r;Pg(t)?(super(`${n}: ${t.message}`),this.data={stack:(r=t.stack)!=null?r:n}):(super(`${n}${t?`: ${JSON.stringify(t,null,2)}`:""}`),this.data={stack:n})}},Si=class extends mn{constructor(){super(...arguments);this.statusCode=409}};var nr=class extends _n{constructor(t){super("Unknown BridgeError",{cause:t});this.statusCode=500;this.code="BridgeError"}};var Ti=class extends Ot{constructor(t,r){super(`Workflow with id: \`${t}\` has a corrupt state. Step with id: \`${r}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:t,stepId:r}}},Cr=class extends Ot{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=r}},xi=class extends Ot{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=r}},ki=class extends Ot{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=i}},vi=class extends Ot{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=i}},Ai=class extends Ot{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=i}},Ei=class extends Ot{constructor(t,r,i){super(`Workflow with id: \`${t}\` has invalid controls syntax in step with id: \`${r}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=i}},_i=class extends Ot{constructor(t,r,i,o){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` and provider with id: \`${i}\` has invalid output. Please provide the correct provider output.`);this.code="ExecutionProviderOutputInvalidError";this.data=o}},Oi=class extends Ot{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=r}};var $n=e=>Object.values(zt).includes(e==null?void 0:e.code),Xc=e=>!$n(e)&&typeof e.statusCode=="number"&&e.statusCode>=400&&e.statusCode<500;var _a=e=>Object.values(e).map(n=>`\`${n}\``).join(", "),Ri=e=>e.replaceAll(/(\w)(\w*)/g,(n,t,r)=>t.toUpperCase()+r.toLowerCase()).replaceAll(/[\s-]+/g,"");var Ii=class extends mn{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${_a(bi)}`}},qn=class extends Ot{constructor(t,r){super(`Invalid query string: \`action\`=\`${t}\`. Please use one of ${_a(r)}`);this.code="InvalidActionError"}},Ci=class extends Ot{constructor(){super("Missing secret key. Set the `NOVU_SECRET_KEY` environment variable or pass `secretKey` to the client options.");this.code="MissingSecretKeyError"}};var Pi=class extends Error{constructor(n,t,r){super(),this.data={message:r},this.statusCode=n,this.code=t}};var Pr=class extends Si{constructor(n,t){super(`${Ri(n)} with id: \`${t}\` already exists. Please use a different id.`)}},On=class extends wi{constructor(n,t){super(`${Ri(n)} with id: \`${t}\` does not exist. Please provide a valid id.`)}},rr=class extends _n{constructor(t,r,i,o){super(`Failed to ${i} ${Ri(t)} with id: \`${r}\``,{cause:o});this.statusCode=502}};var Mi=class extends On{constructor(t){super("provider",t);this.code="ProviderNotFoundError"}},Ni=class extends rr{constructor(t,r,i){super("provider",t,r,i);this.code="ProviderExecutionFailedError"}};var Li=class extends En{constructor(){super("Signature does not match the expected signature. Please ensure the signature provided in the `novu-signature` header is correct and try again.");this.code="SignatureMismatchError"}},Di=class extends En{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},Fi=class extends En{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},Ui=class extends En{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},$i=class extends En{constructor(){super("Signature key not found. Please provide a valid key in the Client constructor `config.secretKey`");this.code="SigningKeyNotFoundError"}};var qi=class extends On{constructor(t){super("step",t);this.code="StepNotFoundError"}},ji=class extends Pr{constructor(t){super("step",t);this.code="StepAlreadyExistsError"}},Mr=class extends rr{constructor(t,r,i){super("step",t,r,i);this.code="StepExecutionFailedError"}};var Nr=class extends On{constructor(t){super("workflow",t);this.code="WorkflowNotFoundError"}};var Bi=(()=>{var e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(l,c)=>function(){return l&&(c=(0,l[t(l)[0]])(l=0)),c},o=(l,c)=>function(){return c||(0,l[t(l)[0]])((c={exports:{}}).exports,c),c.exports},a=(l,c)=>{for(var f in c)e(l,f,{get:c[f],enumerable:!0})},s=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let T of t(c))!r.call(l,T)&&T!==f&&e(l,T,{get:()=>c[T],enumerable:!(S=n(c,T))||S.enumerable});return l},u=l=>s(e({},"__esModule",{value:!0}),l),p={};a(p,{JSONSchemaFaker:()=>Yc,default:()=>Jc,setDependencies:()=>lc});function d(l,c){return typeof l=="string"?typeof c!="undefined"?vr.register(l,c):vr.get(l):vr.registerMany(l)}function h(l,c){return l=typeof l=="undefined"?tn.MIN_INTEGER:l,c=typeof c=="undefined"?tn.MAX_INTEGER:c,Math.floor(_e("random")()*(c-l+1))+l}function y(l){return ui.default.prototype.max=_e("defaultRandExpMax"),ui.default.prototype.randInt=(f,S)=>f+Math.floor(_e("random")()*(1+(S-f))),new ui.default(l).gen()}function g(l){return l[Math.floor(_e("random")()*l.length)]}function P(l){let c,f,S=l.length,T=l.slice();for(;S>0;)f=Math.floor(_e("random")()*S),S-=1,c=T[S],T[S]=T[f],T[f]=c;return T}function ee(l,c){return _e("random")()*(c-l)+l}function Z(l,c,f,S,T=!1){return f=typeof f=="undefined"?tn.MIN_NUMBER:f,S=typeof S=="undefined"?tn.MAX_NUMBER:S,l=typeof l=="undefined"?f:l,c=typeof c=="undefined"?S:c,c<l&&(c+=l),T?ee(l,c):h(l,c)}function B(l){switch(l){case"seconds":return Z(0,60)*60;case"minutes":return Z(15,50)*612;case"hours":return Z(12,72)*36123;case"days":return Z(7,30)*86412345;case"weeks":return Z(4,52)*604812345;case"months":return Z(2,13)*2592012345;case"years":return Z(1,20)*31104012345;default:break}}function ue(l){if(l)return B(l);let c=_e("minDateTime"),f=_e("maxDateTime");typeof c=="string"&&(c=new Date(c)),typeof f=="string"&&(f=new Date(f));let S=new Date().getTime();return typeof c=="number"&&(c=new Date(S+c)),typeof f=="number"&&(f=new Date(S+f)),new Date(ee(c.getTime(),f.getTime()))}function ne(l,c,f){if(c=decodeURIComponent(c),f&&f[c])return Te(f[c]);let S=c.replace("#/","/").split("/"),T=l.$ref&&f&&f[l.$ref]||l;for(!T&&!S[0]&&(S[0]=l.$ref.split("#/")[0]),f&&c.includes("#/")&&f[S[0]]&&(T=f[S.shift()]),S[0]||S.shift();T&&S.length>0;){let v=S.shift();if(!T[v])throw new Error(`Prop not found: ${v} (${c})`);T=T[v]}return T}function ve(l){return typeof l=="string"&&bc.test(l)}function Re(l){return["number","boolean"].includes(typeof l)}function $(l,...c){return c.filter(f=>typeof l[f]!="undefined").length>0}function Ue(l){if(l.includes(" "))return new Date(l).toISOString().substr(0,10);let[c,f,S]=l.split("T")[0].split("-");return f=`0${Math.max(1,Math.min(12,f))}`.slice(-2),S=`0${Math.max(1,Math.min(31,S))}`.slice(-2),`${c}-${f}-${S}`}function Xe(l){if(l.includes(" "))return new Date(l).toISOString().substr(0,10);let[c,f]=l.split("T"),[S,T,v]=c.split("-"),[k,L,Q]=f.substr(0,8).split(":");return T=`0${Math.max(1,Math.min(12,T))}`.slice(-2),v=`0${Math.max(1,Math.min(31,v))}`.slice(-2),k=`0${Math.max(1,Math.min(23,k))}`.slice(-2),L=`0${Math.max(1,Math.min(59,L))}`.slice(-2),Q=`0${Math.max(1,Math.min(59,Q))}`.slice(-2),`${S}-${T}-${v}T${k}:${L}:${Q}.000Z`}function je(l,c,f){let S={};switch(l||c.type){case"integer":case"number":if(typeof c.minimum!="undefined"&&(S.minimum=c.minimum),typeof c.maximum!="undefined"&&(S.maximum=c.maximum),c.enum){let v=Math.max(S.minimum||0,0),k=Math.min(S.maximum||1/0,1/0);c.exclusiveMinimum&&v===c.minimum&&(v+=c.multipleOf||1),c.exclusiveMaximum&&k===c.maximum&&(k-=c.multipleOf||1),(v||k!==1/0)&&(c.enum=c.enum.filter(L=>L>=v&&L<=k))}break;case"string":{S.minLength=_e("minLength")||0,S.maxLength=_e("maxLength")||Number.MAX_SAFE_INTEGER,typeof c.minLength!="undefined"&&(S.minLength=Math.max(S.minLength,c.minLength)),typeof c.maxLength!="undefined"&&(S.maxLength=Math.min(S.maxLength,c.maxLength));break}default:break}let T=f(S);if(T==null)return null;switch(l||c.type){case"number":T=ve(T)?parseFloat(T):T;break;case"integer":T=ve(T)?parseInt(T,10):T;break;case"boolean":T=!!T;break;case"string":{if(Re(T))return T;T=String(T);let v=Math.max(S.minLength||0,0),k=Math.min(S.maxLength||1/0,1/0),L,Q=0;for(;T.length<v;)if(L=T,c.pattern?T+=Ae.randexp(c.pattern):T+=`${Ae.pick([" ","/","_","-","+","=","@","^"])}${T}`,T===L){if(Q+=1,Q===3)break}else Q=0;switch(T.length>k&&(T=T.substr(0,k)),c.format){case"date-time":case"datetime":T=new Date(Xe(T)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":T=new Date(Ue(T)).toISOString().substr(0,10);break;case"time":T=new Date(`1969-01-01 ${T}`).toISOString().substr(11);break;default:break}break}default:break}return T}function U(l,c){return Object.keys(c).forEach(f=>{typeof c[f]!="object"||c[f]===null?l[f]=c[f]:Array.isArray(c[f])?(l[f]=l[f]||[],c[f].forEach((S,T)=>{l.type==="array"&&c.type==="array"?l[f][T]=U(l[f][T]||{},S,!0):Array.isArray(l[f])&&l[f].indexOf(S)===-1&&l[f].push(S)})):typeof l[f]!="object"||l[f]===null||Array.isArray(l[f])?l[f]=U({},c[f]):l[f]=U(l[f],c[f])}),l}function Te(l,c=new Map){if(!l||typeof l!="object")return l;if(c.has(l))return c.get(l);if(Array.isArray(l)){let S=[];return c.set(l,S),S.push(...l.map(T=>Te(T,c))),S}let f={};return c.set(l,f),Object.keys(l).reduce((S,T)=>(S[T]=Te(l[T],c),S),f)}function ze(l){let c=JSON.stringify(l),f=JSON.stringify(l,null,2);return c.length>400?`${f.substr(0,400)}...`:f}function ye(){return Ae.pick([!1,!0,null,-1,NaN,Math.PI,1/0,void 0,[],{},Math.random(),Math.random().toString(36).substr(2)])}function Ce(l,c){if(l.enum)return l.enum.includes(c);if(l.const)return l.const===c}function Me(l,c){let f=U({},c);if(typeof l.minimum!="undefined"&&(f.maximum=l.minimum,f.exclusiveMaximum=!0),typeof l.maximum!="undefined"&&(f.minimum=l.maximum>f.maximum?0:l.maximum,f.exclusiveMinimum=!0),typeof l.minLength!="undefined"&&(f.maxLength=l.minLength),typeof l.maxLength!="undefined"&&(f.minLength=l.maxLength>f.maxLength?0:l.maxLength),l.type)f.type=Ae.pick(tn.SCALAR_TYPES.filter(S=>(Array.isArray(l.type)?l.type:[l.type]).every(v=>S==="number"||S==="integer"?v!=="number"&&v!=="integer":S!==v)));else if(l.enum){let S;do S=ye();while(l.enum.indexOf(S)!==-1);f.enum=[S]}return l.required&&f.properties&&l.required.forEach(S=>{delete f.properties[S]}),f}function tt(l,c){let f=c.minimum!==void 0,S=c.maximum!==void 0;return(f||S)&&(!f||l>=c.minimum)&&(!S||l<=c.maximum)}function lt(l,c){return!c.every(f=>tt(l,f))}function Nt(l,c){return c.reduce((S,T)=>S+(tt(l,T)?1:0),0)===1}function Ut(l){return["enum","const","default","examples","required","definitions","items","properties"].includes(l)}function A(l,c){return Object.keys(l).filter(f=>!c.includes(f)).reduce((f,S)=>(Array.isArray(l[S])?f[S]=l[S].slice():f[S]=l[S]instanceof Object?U({},l[S]):l[S],f),{})}function At(l,c){return Array.isArray(l)?l.map(f=>At(f,c)):(typeof l=="string"&&(l=l.replace(/#\{([\w.-]+)\}/g,(f,S)=>c[S])),l)}function Lt(l){return Object.prototype.toString.call(l)==="[object Object]"&&!Object.keys(l).length}function _(l,c){c=c.items||c;let f=_e("alwaysFakeOptionals"),S=Array.isArray(c.required)&&c.required.includes(l)||f,T=typeof c.thunk=="function"||c.additionalProperties&&typeof c.additionalProperties.thunk=="function";return!S&&!T}function St(l,c,f=!1){if(!l||typeof l!="object")return l;if(Array.isArray(l))return l.map(S=>St(S,c,!0)).filter(S=>typeof S!="undefined");if(Object.keys(l).forEach(S=>{if(Lt(l[S]))_(S,c)&&delete l[S];else{let T=c;c&&c.properties&&c.properties[S]&&(T=c.properties[S]);let v=St(l[S],T);Lt(v)||(l[S]=v)}typeof l[S]=="undefined"&&delete l[S]}),!(!Object.keys(l).length&&f))return l}function sn(l){return(c,f,S,T)=>{let v=c,k=[];typeof c=="object"&&(v=Object.keys(c)[0],Array.isArray(c[v])?k=c[v]:k.push(c[v]));let L=v.split("."),Q=l();for(;L.length>1;)Q=Q[L.shift()];return c=typeof Q=="object"?Q[L[0]]:Q,typeof c=="function"&&(c=c.apply(Q,k.map(N=>Ye.template(N,T)))),Object.prototype.toString.call(c)==="[object Object]"&&Object.keys(c).forEach(N=>{if(typeof c[N]=="function")throw new Error(`Cannot resolve value for '${S}: ${v}', given: ${c}`)}),c}}function wr(l,c){if(typeof l=="undefined")return er.list();if(typeof l=="string")if(typeof c=="function")er.register(l,c);else if(c===null||c===!1)er.unregister(l);else return er.get(l);else er.registerMany(l)}function Zn(l,c,f){return Object.keys(l).filter(S=>{let T=xc.indexOf(c)>-1;return f.indexOf(S)>-1&&!T}).length>0}function dt(l,c){let f=Object.keys(Ar);for(let S=0;S<f.length;S+=1){let T=f[S],v=c[c.length-1];if(Zn(l,v,Ar[T]))return T}}function Fn(){return _e("random")()>.5}function Gt(){return null}function ln(l,c,f,S,T,v){let k=[],L=[];function Q(ie){let j=JSON.stringify(ie.value);return L.indexOf(j)===-1?(L.push(j),k.push(ie),!0):!1}c.forEach(Q);let N=100;for(;k.length!==c.length&&(Q(v(f.items||S,l,T))||(N-=1),!!N););return k}function vn(l,c,f,S){let T=[];if(!(l.items||l.additionalItems)){if(Ye.hasProperties(l,"minItems","maxItems","uniqueItems")&&(l.minItems!==0||l.maxItems!==0))throw new pi(`missing items for ${Ye.short(l)}`,c);return T}if(Array.isArray(l.items))return l.items.map((le,$e)=>{let xe=c.concat(["items",$e]);return S(le,xe,f)});let v=l.minItems,k=l.maxItems,L=_e("minItems"),Q=_e("maxItems");L&&(v=typeof v=="undefined"?L:Math.min(L,v)),Q&&(k=typeof k=="undefined"?Q:Math.min(Q,k),k&&k>Q&&(k=Q),v&&v>Q&&(v=k));let N=_e("alwaysFakeOptionals")===!0?1:_e("optionalsProbability"),ie=_e("alwaysFakeOptionals")||_e("fixedProbabilities")||!1,j=Ae.number(v,k,1,5);N!==null&&(j=Math.max(ie?Math.round((k||j)*N):Math.abs(Ae.number(v,k)*N),v||0));let he=typeof l.additionalItems=="object"?l.additionalItems:{};for(let le=T.length;le<j;le+=1){let $e=c.concat(["items",le]),xe=S(l.items||he,$e,f);T.push(xe)}if(l.contains&&j>0){let le=Ae.number(0,j-1);T[le]=S(l.contains,c.concat(["items",le]),f)}return l.uniqueItems?ln(c.concat(["items"]),T,l,he,f,S):T}function Sr(l){let c=typeof l.minimum=="undefined"||l.minimum===-Number.MAX_VALUE?tn.MIN_INTEGER:l.minimum,f=typeof l.maximum=="undefined"||l.maximum===Number.MAX_VALUE?tn.MAX_INTEGER:l.maximum,S=l.multipleOf,T=S&&String(S).match(/e-(\d)|\.(\d+)$/);if(T){let v=(Math.random()*Ae.number(0,10)+1)*S,k=T[1]||T[2].length,L=parseFloat(v.toFixed(k)),Q=Ae.number(c,f-1);return String(L).includes(".")?Q+L:(Q+L).toExponential()}if(S&&(f=Math.floor(f/S)*S,c=Math.ceil(c/S)*S),l.exclusiveMinimum&&c===l.minimum&&(c+=S||1),l.exclusiveMaximum&&f===l.maximum&&(f-=S||1),c>f)return NaN;if(S){let v=Ae.number(Math.floor(c/S),Math.floor(f/S))*S;for(;v<c;)v+=S;return v}return Ae.number(c,f,void 0,void 0,l.type!=="integer")}function na(l){return Math.floor(Sa({...l}))}function oi(l){return Ae.shuffle(Pc).slice(0,l)}function ai(l,c,f,S){let T={},v=l.properties||{},k=l.patternProperties||{},L=typeof l.required=="boolean"?[]:(l.required||[]).slice(),Q=l.additionalProperties!==!1,N=Object.keys(v),ie=Object.keys(k),j=N.concat(ie).reduce((ae,E)=>(L.indexOf(E)===-1&&ae.push(E),ae),[]),he=L.concat(j),le=Q&&l.additionalProperties===!0?hi:l.additionalProperties;if(!Q&&N.length===0&&ie.length===0&&Ye.hasProperties(l,"minProperties","maxProperties","dependencies","required"))return null;if(_e("requiredOnly")===!0)return L.forEach(ae=>{v[ae]&&(T[ae]=v[ae])}),S(T,c.concat(["properties"]),f,l);let $e=_e("alwaysFakeOptionals")===!0?1:_e("optionalsProbability"),xe=_e("alwaysFakeOptionals")||_e("fixedProbabilities")||!1,Oe=_e("ignoreProperties")||[],Ge=_e("reuseProperties"),Qe=_e("fillProperties"),oe=l.maxProperties||he.length+(Q?Ae.number(1,5):0),I=Math.max(l.minProperties||0,L.length),C=Math.max(0,he.length-I);he.length===1&&!L.length&&(I=Math.max(Ae.number(Qe?1:0,oe),I)),$e!==null&&(xe===!0?C=Math.round(I-L.length+$e*(he.length-I)):C=Ae.number(I-L.length,$e*(he.length-I)));let V=Ae.shuffle(j).slice(0,C),W=j.filter(ae=>V.indexOf(ae)!==-1),K=$e!==null||L.length===oe?oe:Ae.number(0,oe),z=L.concat(Ae.shuffle(W).slice(0,K)).slice(0,oe),Y=[],G=[];if(l.dependencies&&(Object.keys(l.dependencies).forEach(ae=>{let E=l.dependencies[ae];if(z.indexOf(ae)!==-1)if(Array.isArray(E))E.forEach(J=>{z.indexOf(J)===-1&&z.push(J)});else if(Array.isArray(E.oneOf||E.anyOf)){let J=E.oneOf||E.anyOf;G.push({prop:ae,values:J})}else Y.push(E)}),Y.length))return delete l.dependencies,S({allOf:Y.concat(l)},c.concat(["properties"]),f,l);let pe=[],fe=[];z.forEach(ae=>{if(v[ae]&&["{}","true"].includes(JSON.stringify(v[ae].not)))return;for(let J=0;J<Oe.length;J+=1)if(Oe[J]instanceof RegExp&&Oe[J].test(ae)||typeof Oe[J]=="string"&&Oe[J]===ae||typeof Oe[J]=="function"&&Oe[J](v[ae],ae)){pe.push(ae);return}le===!1&&L.indexOf(ae)!==-1&&(T[ae]=v[ae]),v[ae]&&(T[ae]=v[ae]);let E;if(ie.forEach(J=>{ae.match(new RegExp(J))&&(E=!0,T[ae]?Ye.merge(T[ae],k[J]):T[Ae.randexp(ae)]=k[J])}),!E){let J=k[ae]||le;J&&le!==!1?T[k[ae]?Ae.randexp(ae):ae]=v[ae]||J:fe.push(ae)}});let Ee=Object.keys(T).length+(Qe?0:pe.length),it=ae=>Ae.randexp(`_?[_a-f\\d]{1,3}${ae?"\\$?":""}`);function ot(ae){let E;do{if(!ae.length)break;E=ae.shift()}while(T[E]);return E}let st=I;if(Q&&!L.length&&(st=Math.max($e===null||le?Ae.number(Qe?1:0,oe):0,I)),!W.length&&!C&&Q&&xe===!0&&Qe){let ae=Ae.number(0,oe);for(let E=0;E<ae;E+=1)T[di(1)+it(ae[E])]=le||hi}for(;Qe&&!(!(ie.length||Q)||Ee>=st);){if(Q)if(Ge&&N.length-Ee>st){let ae=0,E;do{if(ae+=1,ae>1e3)break;E=ot(L)||Ae.pick(N)}while(typeof T[E]!="undefined");typeof T[E]=="undefined"&&(T[E]=v[E],Ee+=1)}else if(ie.length&&!le){let ae=Ae.pick(ie),E=Ae.randexp(ae);T[E]||(T[E]=k[ae],Ee+=1)}else{let ae=ot(L)||di(1)+it();T[ae]||(T[ae]=le||hi,Ee+=1)}for(let ae=0;Ee<I&&ae<ie.length;ae+=1){let E=ie[ae],J=Ae.randexp(E);T[J]||(T[J]=k[E],Ee+=1)}}if(L.length===0&&(!Q||$e===!1)){let ae=Ae.number(I,oe);for(;Ee<ae;){let E=ot(N);E&&(T[E]=v[E]),Ee+=1}}let mt=T;if(_e("sortProperties")!==null){let ae=Object.keys(v);mt=Object.keys(T).sort((J,me)=>_e("sortProperties")?J.localeCompare(me):ae.indexOf(J)-ae.indexOf(me)).reduce((J,me)=>(J[me]=T[me],J),{})}let xt=S(mt,c.concat(["properties"]),f,l);return G.forEach(ae=>{for(let E of ae.values)if(Ye.hasValue(E.properties[ae.prop],xt.value[ae.prop])){Object.keys(E.properties).forEach(J=>{J!==ae.prop&&Ye.merge(xt.value,S(E.properties,c.concat(["properties"]),f,l).value)});break}}),xt}function Tr(){let l=Ae.number(1,5);return di(l).join(" ")}function ra(l=0,c=140){let f=Math.max(0,l),S=Ae.number(f,c),T=Tr();for(;T.length<f;)T+=Tr();return T.length>S&&(T=T.substr(0,S)),T}function si(){return[0,0,0,0].map(()=>Ae.number(0,255)).join(".")}function li(){return Ae.date().toISOString()}function ia(){return fi().slice(0,10)}function oa(){return fi().slice(11)}function aa(l){return Ae.randexp(qt[l]).replace(Uc,(c,f)=>Ae.randexp(qt[f]))}function sa(l,c){let f=wa(l.format);if(typeof f=="function")return f(l);switch(l.format){case"date-time":case"datetime":return fi();case"date":return Lc();case"time":return Dc();case"ipv4":return Nc();case"regex":return".+?";case"email":case"hostname":case"ipv6":case"uri":case"uri-reference":case"iri":case"iri-reference":case"idn-email":case"idn-hostname":case"json-pointer":case"slug":case"uri-template":case"uuid":case"duration":return $c(l.format);default:if(typeof f=="undefined"){if(_e("failOnInvalidFormat"))throw new Error(`unknown registry key ${Ye.short(l.format)}`);return c()}throw new Error(`unsupported format '${l.format}'`)}}function la(l){return Ye.typecast("string",l,f=>l.format?sa(l,()=>Ta(f.minLength,f.maxLength)):l.pattern?Ae.randexp(l.pattern):Ta(f.minLength,f.maxLength))}function q({$comment:l,title:c,description:f}){return Object.entries({comment:l,title:c,description:f}).filter(([,S])=>S).reduce((S,[T,v])=>(S[T]=v,S),{})}function re(l,c,f,S){if(l=f(l,null,c),l&&(l.oneOf||l.anyOf||l.allOf)&&(l=f(l,null,c)),!l)throw new Error(`Cannot traverse at '${c.join(".")}', given '${JSON.stringify(S)}'`);let T={...q(l),schemaPath:c};if(c[c.length-1]!=="properties"){if(_e("useExamplesValue")&&Array.isArray(l.examples)){let N=l.examples.concat("default"in l?[l.default]:[]);return{value:Ye.typecast(null,l,()=>Ae.pick(N)),context:T}}if(_e("useExamplesValue")&&typeof l.example!="undefined")return{value:Ye.typecast(null,l,()=>l.example),context:T};if(_e("useDefaultValue")&&"default"in l&&(l.default!==""||!_e("replaceEmptyByRandomValue")))return{value:l.default,context:T};if("template"in l)return{value:Ye.template(l.template,S),context:T};if("const"in l)return{value:l.const,context:T}}if(l.not&&typeof l.not=="object"&&(l=Ye.notValue(l.not,Ye.omitProps(l,["not"])),l.type&&l.type==="object")){let{value:N,context:ie}=re(l,c.concat(["not"]),f,S);return{value:Ye.clean(N,l,!1),context:{...T,items:ie}}}if(typeof l.thunk=="function"){let{value:N,context:ie}=re(l.thunk(S),c,f);return{value:N,context:{...T,items:ie}}}if(l.jsonPath)return{value:l,context:T};let v=l.type;if(Array.isArray(v)?v=Ae.pick(v):typeof v=="undefined"&&(v=kc(l,c)||v,v&&(l.type=v)),typeof l.generate=="function"){let N=Ye.typecast(null,l,()=>l.generate(S,c)),ie=N===null?"null":typeof N;if(ie===v||ie==="number"&&v==="integer"||Array.isArray(N)&&v==="array")return{value:N,context:T}}if(typeof l.pattern=="string")return{value:Ye.typecast("string",l,()=>Ae.randexp(l.pattern)),context:T};if(Array.isArray(l.enum))return{value:Ye.typecast(null,l,()=>Ae.pick(l.enum)),context:T};if(typeof v=="string")if(Er[v])try{let N=Er[v](l,c,f,re);return v==="array"?{value:N.map(({value:ie})=>ie),context:{...T,items:N.map(Array.isArray(l.items)?({context:ie})=>ie:({context:ie})=>({...ie,schemaPath:ie.schemaPath.slice(0,-1)}))}}:v==="object"?N!==null?{value:N.value,context:{...T,items:N.context}}:{value:{},context:T}:{value:N,context:T}}catch(N){throw typeof N.path=="undefined"?new pi(N.stack,c):N}else{if(_e("failOnInvalidTypes"))throw new pi(`unknown primitive ${Ye.short(v)}`,c.concat(["type"]));{let N=_e("defaultInvalidTypeProduct");return typeof N=="string"&&Er[N]?{value:Er[N](l,c,f,re),context:T}:{value:N,context:T}}}let k={},L={...T};Array.isArray(l)&&(k=[]);let Q=_e("pruneProperties")||[];return Object.keys(l).forEach(N=>{if(!Q.includes(N)&&l[N]!==null)if(typeof l[N]=="object"&&N!=="definitions"){let{value:ie,context:j}=re(l[N],c.concat([N]),f,k);k[N]=Ye.clean(ie,l[N],!1),L[N]=j,k[N]===null&&_e("omitNulls")&&(delete k[N],delete L[N])}else k[N]=l[N]}),{value:k,context:L}}function Ie(l){return Array.isArray(l)?Ae.pick(l):l}function De(l,c){if(!Array.isArray(l))return l;let f=c?l.pop():l.shift();return c?l.unshift(f):l.push(f),f}function He(l,c,f,S){if(!l||typeof l!="object")return l;if(f||(f={}),c||(c=l),Array.isArray(l))return l.map(T=>He(T,c,f,S));if(l.jsonPath){let{JSONPath:T}=fa(),v=typeof l.jsonPath!="object"?{path:l.jsonPath}:l.jsonPath;v.group=l.group||v.group||S,v.cycle=l.cycle||v.cycle||!1,v.reverse=l.reverse||v.reverse||!1,v.count=l.count||v.count||1;let k=`${v.group}__${v.path}`;return f[k]||(v.count>1?f[k]=T(v.path,c).slice(0,v.count):f[k]=T(v.path,c)),v.cycle||v.reverse?De(f[k],v.reverse):Ie(f[k])}return Object.keys(l).forEach(T=>{l[T]=He(l[T],c,f,T)}),l}function Dt(l,c,f,S){if(Object.prototype.toString.call(c)!=="[object Object]")throw new Error(`Invalid input, expecting object but given ${typeof c}`);let T=_e("refDepthMin")||0,v=_e("refDepthMax")||3;try{let{resolveSchema:k}=Vc({refs:l,schema:c,container:f,synchronous:S,refDepthMin:T,refDepthMax:v}),L=Bc(Ye.clone(c),[],k);return _e("resolveJsonPath")?{value:He(L.value),context:L.context}:L}catch(k){throw k.path?new Error(`${k.message} in /${k.path.join("/")}`):k}}function cn(l){return l.value}function Kt(l,c){return c.reduce((f,S)=>S in f?f[S]:{},l)}function un(l,c,f,S=f){let{title:T,description:v,comment:k}=Kt(l,c),L=[];_e("renderTitle")&&T&&L.push(` ${T}`,""),_e("renderDescription")&&v&&L.push(` ${v}`),_e("renderComment")&&k&&L.push(` ${k}`),f.commentBefore=L.join(`
23
- `),S instanceof Hc?S.items.forEach(Q=>{un(l,[...c,"items",Q.key.value],Q.key,Q.value)}):S instanceof Wc&&S.items.forEach((Q,N)=>{un(l,[...c,"items",N],Q)})}function Un({value:l,context:c}){let f=_r.createNode(l);un(c,[],f);let S=new _r.Document;return S.contents=f,S.toString()}function Tt(){dn.define("autoIncrement",function(c,f){if(!this.offset){let S=f.minimum||1,T=S+tn.MAX_NUMBER,v=c.initialOffset||f.initialOffset;this.offset=v||Ae.number(S,T)}return c?this.offset++:f}),dn.define("sequentialDate",function(c,f){if(this.now||(this.now=Ae.date()),c){if(f=this.now.toISOString(),c=c===!0?"days":c,["seconds","minutes","hours","days","weeks","months","years"].indexOf(c)===-1)throw new Error(`Unsupported increment by ${Ye.short(c)}`);this.now.setTime(this.now.getTime()+Ae.date(c))}return f})}function pn(l,c){let f={};Array.isArray(l)?l.forEach(T=>{f[T.$id||T.id]=T}):f=l||{};function S(T){if(!T||typeof T!="object")return;if(Array.isArray(T))return T.forEach(S);let v=T.$id||T.id;typeof v=="string"&&!f[v]&&(f[v]=T),Object.keys(T).forEach(k=>{S(T[k])})}return S(l),S(c),f}var $t,ca,Xl,ua,Ql,Zl,Ft,ec,pa,xr,te,tc,nc,rc,ic,oc,kr,ci,da,ac,sc,ha,fa,lc,cc,ma,We,ga,uc,pc,vr,_e,ya,ba,dc,hc,fc,mc,gc,yc,tn,ui,Ae,bc,Ye,wc,Sc,er,wa,Tc,pi,Ar,xc,kc,vc,Ac,Ec,_c,Oc,Rc,Ic,Sa,Cc,Pc,di,hi,Mc,Ta,Nc,fi,Lc,Dc,xa,mi,Fc,qt,Uc,$c,qc,jc,Er,Bc,zc,Vc,ka,va,Et,Qm,Zm,eg,tg,ng,rg,ig,og,ag,sg,lg,cg,Hc,Wc,_r,dn,rt,Yc,Jc,ug=i({"src/shared.js"(){$t=Object.create,ca=Object.defineProperty,Xl=Object.getOwnPropertyDescriptor,ua=Object.getOwnPropertyNames,Ql=Object.getPrototypeOf,Zl=Object.prototype.hasOwnProperty,Ft=(l,c)=>function(){return c||(0,l[ua(l)[0]])((c={exports:{}}).exports,c),c.exports},ec=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let T of ua(c))!Zl.call(l,T)&&T!==f&&ca(l,T,{get:()=>c[T],enumerable:!(S=Xl(c,T))||S.enumerable});return l},pa=(l,c,f)=>(f=l!=null?$t(Ql(l)):{},ec(c||!l||!l.__esModule?ca(f,"default",{value:l,enumerable:!0}):f,l)),xr=Ft({"node_modules/ret/lib/types.js"(l,c){c.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}}}),te=Ft({"node_modules/ret/lib/sets.js"(l){var c=xr(),f=()=>[{type:c.RANGE,from:48,to:57}],S=()=>[{type:c.CHAR,value:95},{type:c.RANGE,from:97,to:122},{type:c.RANGE,from:65,to:90}].concat(f()),T=()=>[{type:c.CHAR,value:9},{type:c.CHAR,value:10},{type:c.CHAR,value:11},{type:c.CHAR,value:12},{type:c.CHAR,value:13},{type:c.CHAR,value:32},{type:c.CHAR,value:160},{type:c.CHAR,value:5760},{type:c.RANGE,from:8192,to:8202},{type:c.CHAR,value:8232},{type:c.CHAR,value:8233},{type:c.CHAR,value:8239},{type:c.CHAR,value:8287},{type:c.CHAR,value:12288},{type:c.CHAR,value:65279}],v=()=>[{type:c.CHAR,value:10},{type:c.CHAR,value:13},{type:c.CHAR,value:8232},{type:c.CHAR,value:8233}];l.words=()=>({type:c.SET,set:S(),not:!1}),l.notWords=()=>({type:c.SET,set:S(),not:!0}),l.ints=()=>({type:c.SET,set:f(),not:!1}),l.notInts=()=>({type:c.SET,set:f(),not:!0}),l.whitespace=()=>({type:c.SET,set:T(),not:!1}),l.notWhitespace=()=>({type:c.SET,set:T(),not:!0}),l.anyChar=()=>({type:c.SET,set:v(),not:!0})}}),tc=Ft({"node_modules/ret/lib/util.js"(l){var c=xr(),f=te(),S="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",T={0:0,t:9,n:10,v:11,f:12,r:13};l.strToChars=v=>{var k=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return v=v.replace(k,(L,Q,N,ie,j,he,le,$e)=>{if(N)return L;var xe=Q?8:ie?parseInt(ie,16):j?parseInt(j,16):he?parseInt(he,8):le?S.indexOf(le):T[$e],Oe=String.fromCharCode(xe);return/[[\]{}^$.|?*+()]/.test(Oe)&&(Oe="\\"+Oe),Oe}),v},l.tokenizeClass=(v,k)=>{for(var L=[],Q=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,N,ie;(N=Q.exec(v))!=null;)if(N[1])L.push(f.words());else if(N[2])L.push(f.ints());else if(N[3])L.push(f.whitespace());else if(N[4])L.push(f.notWords());else if(N[5])L.push(f.notInts());else if(N[6])L.push(f.notWhitespace());else if(N[7])L.push({type:c.RANGE,from:(N[8]||N[9]).charCodeAt(0),to:N[10].charCodeAt(0)});else if(ie=N[12])L.push({type:c.CHAR,value:ie.charCodeAt(0)});else return[L,Q.lastIndex];l.error(k,"Unterminated character class")},l.error=(v,k)=>{throw new SyntaxError("Invalid regular expression: /"+v+"/: "+k)}}}),nc=Ft({"node_modules/ret/lib/positions.js"(l){var c=xr();l.wordBoundary=()=>({type:c.POSITION,value:"b"}),l.nonWordBoundary=()=>({type:c.POSITION,value:"B"}),l.begin=()=>({type:c.POSITION,value:"^"}),l.end=()=>({type:c.POSITION,value:"$"})}}),rc=Ft({"node_modules/ret/lib/index.js"(l,c){var f=tc(),S=xr(),T=te(),v=nc();c.exports=k=>{var L=0,Q,N,ie={type:S.ROOT,stack:[]},j=ie,he=ie.stack,le=[],$e=W=>{f.error(k,`Nothing to repeat at column ${W-1}`)},xe=f.strToChars(k);for(Q=xe.length;L<Q;)switch(N=xe[L++],N){case"\\":switch(N=xe[L++],N){case"b":he.push(v.wordBoundary());break;case"B":he.push(v.nonWordBoundary());break;case"w":he.push(T.words());break;case"W":he.push(T.notWords());break;case"d":he.push(T.ints());break;case"D":he.push(T.notInts());break;case"s":he.push(T.whitespace());break;case"S":he.push(T.notWhitespace());break;default:/\d/.test(N)?he.push({type:S.REFERENCE,value:parseInt(N,10)}):he.push({type:S.CHAR,value:N.charCodeAt(0)})}break;case"^":he.push(v.begin());break;case"$":he.push(v.end());break;case"[":{var Oe;xe[L]==="^"?(Oe=!0,L++):Oe=!1;var Ge=f.tokenizeClass(xe.slice(L),k);L+=Ge[1],he.push({type:S.SET,set:Ge[0],not:Oe});break}case".":he.push(T.anyChar());break;case"(":{var Qe={type:S.GROUP,stack:[],remember:!0};N=xe[L],N==="?"&&(N=xe[L+1],L+=2,N==="="?Qe.followedBy=!0:N==="!"?Qe.notFollowedBy=!0:N!==":"&&f.error(k,`Invalid group, character '${N}' after '?' at column ${L-1}`),Qe.remember=!1),he.push(Qe),le.push(j),j=Qe,he=Qe.stack;break}case")":le.length===0&&f.error(k,`Unmatched ) at column ${L-1}`),j=le.pop(),he=j.options?j.options[j.options.length-1]:j.stack;break;case"|":{j.options||(j.options=[j.stack],delete j.stack);var oe=[];j.options.push(oe),he=oe;break}case"{":{var I=/^(\d+)(,(\d+)?)?\}/.exec(xe.slice(L)),C,V;I!==null?(he.length===0&&$e(L),C=parseInt(I[1],10),V=I[2]?I[3]?parseInt(I[3],10):1/0:C,L+=I[0].length,he.push({type:S.REPETITION,min:C,max:V,value:he.pop()})):he.push({type:S.CHAR,value:123});break}case"?":he.length===0&&$e(L),he.push({type:S.REPETITION,min:0,max:1,value:he.pop()});break;case"+":he.length===0&&$e(L),he.push({type:S.REPETITION,min:1,max:1/0,value:he.pop()});break;case"*":he.length===0&&$e(L),he.push({type:S.REPETITION,min:0,max:1/0,value:he.pop()});break;default:he.push({type:S.CHAR,value:N.charCodeAt(0)})}return le.length!==0&&f.error(k,"Unterminated group"),ie},c.exports.types=S}}),ic=Ft({"node_modules/drange/lib/index.js"(l,c){var f=class ir{constructor(v,k){this.low=v,this.high=k,this.length=1+k-v}overlaps(v){return!(this.high<v.low||this.low>v.high)}touches(v){return!(this.high+1<v.low||this.low-1>v.high)}add(v){return new ir(Math.min(this.low,v.low),Math.max(this.high,v.high))}subtract(v){return v.low<=this.low&&v.high>=this.high?[]:v.low>this.low&&v.high<this.high?[new ir(this.low,v.low-1),new ir(v.high+1,this.high)]:v.low<=this.low?[new ir(v.high+1,this.high)]:[new ir(this.low,v.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},S=class Lr{constructor(v,k){this.ranges=[],this.length=0,v!=null&&this.add(v,k)}_update_length(){this.length=this.ranges.reduce((v,k)=>v+k.length,0)}add(v,k){var L=Q=>{for(var N=0;N<this.ranges.length&&!Q.touches(this.ranges[N]);)N++;for(var ie=this.ranges.slice(0,N);N<this.ranges.length&&Q.touches(this.ranges[N]);)Q=Q.add(this.ranges[N]),N++;ie.push(Q),this.ranges=ie.concat(this.ranges.slice(N)),this._update_length()};return v instanceof Lr?v.ranges.forEach(L):(k==null&&(k=v),L(new f(v,k))),this}subtract(v,k){var L=Q=>{for(var N=0;N<this.ranges.length&&!Q.overlaps(this.ranges[N]);)N++;for(var ie=this.ranges.slice(0,N);N<this.ranges.length&&Q.overlaps(this.ranges[N]);)ie=ie.concat(this.ranges[N].subtract(Q)),N++;this.ranges=ie.concat(this.ranges.slice(N)),this._update_length()};return v instanceof Lr?v.ranges.forEach(L):(k==null&&(k=v),L(new f(v,k))),this}intersect(v,k){var L=[],Q=N=>{for(var ie=0;ie<this.ranges.length&&!N.overlaps(this.ranges[ie]);)ie++;for(;ie<this.ranges.length&&N.overlaps(this.ranges[ie]);){var j=Math.max(this.ranges[ie].low,N.low),he=Math.min(this.ranges[ie].high,N.high);L.push(new f(j,he)),ie++}};return v instanceof Lr?v.ranges.forEach(Q):(k==null&&(k=v),Q(new f(v,k))),this.ranges=L,this._update_length(),this}index(v){for(var k=0;k<this.ranges.length&&this.ranges[k].length<=v;)v-=this.ranges[k].length,k++;return this.ranges[k].low+v}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Lr(this)}numbers(){return this.ranges.reduce((v,k)=>{for(var L=k.low;L<=k.high;)v.push(L),L++;return v},[])}subranges(){return this.ranges.map(v=>({low:v.low,high:v.high,length:1+v.high-v.low}))}};c.exports=S}}),oc=Ft({"node_modules/randexp/lib/randexp.js"(l,c){var f=rc(),S=ic(),T=f.types;c.exports=class Dr{constructor(k,L){if(this._setDefaults(k),k instanceof RegExp)this.ignoreCase=k.ignoreCase,this.multiline=k.multiline,k=k.source;else if(typeof k=="string")this.ignoreCase=L&&L.indexOf("i")!==-1,this.multiline=L&&L.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=f(k)}_setDefaults(k){this.max=k.max!=null?k.max:Dr.prototype.max!=null?Dr.prototype.max:100,this.defaultRange=k.defaultRange?k.defaultRange:this.defaultRange.clone(),k.randInt&&(this.randInt=k.randInt)}gen(){return this._gen(this.tokens,[])}_gen(k,L){var Q,N,ie,j,he;switch(k.type){case T.ROOT:case T.GROUP:if(k.followedBy||k.notFollowedBy)return"";for(k.remember&&k.groupNumber===void 0&&(k.groupNumber=L.push(null)-1),Q=k.options?this._randSelect(k.options):k.stack,N="",j=0,he=Q.length;j<he;j++)N+=this._gen(Q[j],L);return k.remember&&(L[k.groupNumber]=N),N;case T.POSITION:return"";case T.SET:{var le=this._expand(k);return le.length?String.fromCharCode(this._randSelect(le)):""}case T.REPETITION:for(ie=this.randInt(k.min,k.max===1/0?k.min+this.max:k.max),N="",j=0;j<ie;j++)N+=this._gen(k.value,L);return N;case T.REFERENCE:return L[k.value-1]||"";case T.CHAR:{var $e=this.ignoreCase&&this._randBool()?this._toOtherCase(k.value):k.value;return String.fromCharCode($e)}}}_toOtherCase(k){return k+(97<=k&&k<=122?-32:65<=k&&k<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(k){return k instanceof S?k.index(this.randInt(0,k.length-1)):k[this.randInt(0,k.length-1)]}_expand(k){if(k.type===f.types.CHAR)return new S(k.value);if(k.type===f.types.RANGE)return new S(k.from,k.to);{let L=new S;for(let Q=0;Q<k.set.length;Q++){let N=this._expand(k.set[Q]);if(L.add(N),this.ignoreCase)for(let ie=0;ie<N.length;ie++){let j=N.index(ie),he=this._toOtherCase(j);j!==he&&L.add(he)}}return k.not?this.defaultRange.clone().subtract(L):this.defaultRange.clone().intersect(L)}}randInt(k,L){return k+Math.floor(Math.random()*(1+L-k))}get defaultRange(){return this._range=this._range||new S(32,126)}set defaultRange(k){this._range=k}static randexp(k,L){var Q;return typeof k=="string"&&(k=new RegExp(k,L)),k._randexp===void 0?(Q=new Dr(k,L),k._randexp=Q):(Q=k._randexp,Q._setDefaults(k)),Q.gen()}static sugar(){RegExp.prototype.gen=function(){return Dr.randexp(this)}}}}}),kr=Ft({"node_modules/yaml/dist/PlainValue-ec8e588e.js"(l){var c={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},f={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},S="tag:yaml.org,2002:",T={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function v(oe){let I=[0],C=oe.indexOf(`
18
+ `;break}case-2:{a=n?" ":" ";break}case-1:{if(!n&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}var Fh=M(()=>{"use strict";Be();wn();Hr()});var Vs={};Ra(Vs,{attentionMarkers:()=>Zw,contentInitial:()=>Yw,disable:()=>eS,document:()=>Hw,flow:()=>Gw,flowInitial:()=>Jw,insideSpan:()=>Qw,string:()=>Kw,text:()=>Xw});var Hw,Yw,Jw,Gw,Kw,Xw,Qw,Zw,eS,Uh=M(()=>{"use strict";Ro();zs();Hw={42:At,43:At,45:At,48:At,49:At,50:At,51:At,52:At,53:At,54:At,55:At,56:At,57:At,62:yo},Yw={91:Is},Jw={[-2]:Jr,[-1]:Jr,32:Jr},Gw={35:Ps,42:Kn,45:[_o,Kn],60:Ns,61:_o,95:Kn,96:So,126:So},Kw={38:wo,92:bo},Xw={[-5]:Kr,[-4]:Kr,[-3]:Kr,33:Ds,38:wo,42:Yr,60:[xs,Ls],91:Fs,92:[Cs,bo],93:Gn,95:Yr,96:ks},Qw={null:[Yr,Ch]},Zw={null:[42,95]},eS={null:[]}});function Ws(e){let t=mo([Vs,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(Ah),document:i(_h),flow:i(Oh),string:i(Ph),text:i(Mh)};return r;function i(o){return a;function a(s){return Dh(r,o,s)}}}var $h=M(()=>{"use strict";ys();vh();Rh();Ih();zs();Fh();Uh()});function Hs(e){for(;!xo(e););return e}var qh=M(()=>{"use strict";As()});function Ys(){let e=1,n="",t=!0,r;return i;function i(o,a,s){let u=[],p,d,h,y,g;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===65279&&h++,t=void 0);h<o.length;){if(jh.lastIndex=h,p=jh.exec(o),y=p&&p.index!==void 0?p.index:o.length,g=o.charCodeAt(y),!p){n=o.slice(h);break}if(g===10&&h===y&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<y&&(u.push(o.slice(h,y)),e+=y-h),g){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=y+1}return s&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}var jh,Bh=M(()=>{"use strict";jh=/[\0\t\n\r]/g});var zh=M(()=>{"use strict";$h();qh();Bh()});function Pn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vh(e.position):"start"in e||"end"in e?Vh(e):"line"in e||"column"in e?Js(e):""}function Js(e){return Wh(e&&e.line)+":"+Wh(e&&e.column)}function Vh(e){return Js(e&&e.start)+"-"+Js(e&&e.end)}function Wh(e){return e&&typeof e=="number"?e:1}var Hh=M(()=>{"use strict"});var Gs=M(()=>{"use strict";Hh()});function Ks(e,n,t){return typeof n!="string"&&(t=n,n=void 0),tS(t)(Hs(Ws(t).document().write(Ys()(e,n,!0))))}function tS(e){let n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ci),autolinkProtocol:je,autolinkEmail:je,atxHeading:o(si),blockQuote:o(Gt),characterEscape:je,characterReference:je,codeFenced:o(ln),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(ln,a),codeText:o(An,a),codeTextData:je,data:je,codeFlowValue:je,definition:o(Tr),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(oa),hardBreakEscape:o(li),hardBreakTrailing:o(li),htmlFlow:o(xr,a),htmlFlowData:je,htmlText:o(xr,a),htmlTextData:je,image:o(aa),label:a,link:o(ci),listItem:o(sa),listItemValue:y,listOrdered:o(ui,h),listUnordered:o(ui),paragraph:o(la),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(si),strong:o(ca),thematicBreak:o(pa)},exit:{atxHeading:u(),atxHeadingSequence:Oe,autolink:u(),autolinkEmail:Fn,autolinkProtocol:dt,blockQuote:u(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:sn,characterReferenceMarkerNumeric:sn,characterReferenceValue:Sr,characterReference:er,codeFenced:u(Z),codeFencedFence:ee,codeFencedFenceInfo:g,codeFencedFenceMeta:P,codeFlowValue:U,codeIndented:u(B),codeText:u(Me),codeTextData:U,data:U,definition:u(),definitionDestinationString:Ae,definitionLabelString:ue,definitionTitleString:ne,emphasis:u(),hardBreakEscape:u(ze),hardBreakTrailing:u(ze),htmlFlow:u(ye),htmlFlowData:U,htmlText:u(Ce),htmlTextData:U,image:u(lt),label:Ut,labelText:Nt,lineEnding:Te,link:u(tt),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:St,resourceDestinationString:v,resourceTitleString:vt,resource:Lt,setextHeading:u(Xe),setextHeadingLineSequence:Ue,setextHeadingText:$,strong:u(),thematicBreak:u()}};Gh(n,(e||{}).mdastExtensions||[]);let t={};return r;function r(q){let re={type:"root",children:[]},Ie={stack:[re],tokenStack:[],config:n,enter:s,exit:p,buffer:a,resume:d,data:t},De=[],We=-1;for(;++We<q.length;)if(q[We][1].type==="listOrdered"||q[We][1].type==="listUnordered")if(q[We][0]==="enter")De.push(We);else{let Dt=De.pop();We=i(q,Dt,We)}for(We=-1;++We<q.length;){let Dt=n[q[We][0]];Jh.call(Dt,q[We][1].type)&&Dt[q[We][1].type].call(Object.assign({sliceSerialize:q[We][2].sliceSerialize},Ie),q[We][1])}if(Ie.tokenStack.length>0){let Dt=Ie.tokenStack[Ie.tokenStack.length-1];(Dt[1]||Yh).call(Ie,void 0,Dt[0])}for(re.position={start:Mn(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Mn(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<n.transforms.length;)re=n.transforms[We](re)||re;return re}function i(q,re,Ie){let De=re-1,We=-1,Dt=!1,cn,Kt,un,Un;for(;++De<=Ie;){let Tt=q[De];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?We++:We--,Un=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(cn&&!Un&&!We&&!un&&(un=De),Un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Un=void 0}if(!We&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||We===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(cn){let pn=De;for(Kt=void 0;pn--;){let $t=q[pn];if($t[1].type==="lineEnding"||$t[1].type==="lineEndingBlank"){if($t[0]==="exit")continue;Kt&&(q[Kt][1].type="lineEndingBlank",Dt=!0),$t[1].type="lineEnding",Kt=pn}else if(!($t[1].type==="linePrefix"||$t[1].type==="blockQuotePrefix"||$t[1].type==="blockQuotePrefixWhitespace"||$t[1].type==="blockQuoteMarker"||$t[1].type==="listItemIndent"))break}un&&(!Kt||un<Kt)&&(cn._spread=!0),cn.end=Object.assign({},Kt?q[Kt][1].start:Tt[1].end),q.splice(Kt||De,0,["exit",cn,Tt[2]]),De++,Ie++}if(Tt[1].type==="listItemPrefix"){let pn={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};cn=pn,q.splice(De,0,["enter",pn,Tt[2]]),De++,Ie++,un=void 0,Un=!0}}}return q[re][1]._spread=Dt,Ie}function o(q,re){return Ie;function Ie(De){s.call(this,q(De),De),re&&re.call(this,De)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(q,re,Ie){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([re,Ie]),q.position={start:Mn(re.start),end:void 0}}function u(q){return re;function re(Ie){q&&q.call(this,Ie),p.call(this,Ie)}}function p(q,re){let Ie=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==q.type&&(re?re.call(this,q,De[0]):(De[1]||Yh).call(this,q,De[0]));else throw new Error("Cannot close `"+q.type+"` ("+Pn({start:q.start,end:q.end})+"): it\u2019s not open");Ie.position.end=Mn(q.end)}function d(){return bn(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function y(q){if(this.data.expectingFirstListItemValue){let re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function g(){let q=this.resume(),re=this.stack[this.stack.length-1];re.lang=q}function P(){let q=this.resume(),re=this.stack[this.stack.length-1];re.meta=q}function ee(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function Z(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function B(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q.replace(/(\r?\n|\r)$/g,"")}function ue(q){let re=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=re,Ie.identifier=kt(this.sliceSerialize(q)).toLowerCase()}function ne(){let q=this.resume(),re=this.stack[this.stack.length-1];re.title=q}function Ae(){let q=this.resume(),re=this.stack[this.stack.length-1];re.url=q}function Oe(q){let re=this.stack[this.stack.length-1];if(!re.depth){let Ie=this.sliceSerialize(q).length;re.depth=Ie}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function Ue(q){let re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function Xe(){this.data.setextHeadingSlurpLineEnding=void 0}function je(q){let Ie=this.stack[this.stack.length-1].children,De=Ie[Ie.length-1];(!De||De.type!=="text")&&(De=ua(),De.position={start:Mn(q.start),end:void 0},Ie.push(De)),this.stack.push(De)}function U(q){let re=this.stack.pop();re.value+=this.sliceSerialize(q),re.position.end=Mn(q.end)}function Te(q){let re=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ie=re.children[re.children.length-1];Ie.position.end=Mn(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(re.type)&&(je.call(this,q),U.call(this,q))}function ze(){this.data.atHardBreak=!0}function ye(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q}function Ce(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q}function Me(){let q=this.resume(),re=this.stack[this.stack.length-1];re.value=q}function tt(){let q=this.stack[this.stack.length-1];if(this.data.inReference){let re=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=re,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function lt(){let q=this.stack[this.stack.length-1];if(this.data.inReference){let re=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=re,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function Nt(q){let re=this.sliceSerialize(q),Ie=this.stack[this.stack.length-2];Ie.label=yd(re),Ie.identifier=kt(re).toLowerCase()}function Ut(){let q=this.stack[this.stack.length-1],re=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){let De=q.children;Ie.children=De}else Ie.alt=re}function v(){let q=this.resume(),re=this.stack[this.stack.length-1];re.url=q}function vt(){let q=this.resume(),re=this.stack[this.stack.length-1];re.title=q}function Lt(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function St(q){let re=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=re,Ie.identifier=kt(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function sn(q){this.data.characterReferenceType=q.type}function Sr(q){let re=this.sliceSerialize(q),Ie=this.data.characterReferenceType,De;Ie?(De=fo(re,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=pr(re);let We=this.stack[this.stack.length-1];We.value+=De}function er(q){let re=this.stack.pop();re.position.end=Mn(q.end)}function dt(q){U.call(this,q);let re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(q)}function Fn(q){U.call(this,q);let re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(q)}function Gt(){return{type:"blockquote",children:[]}}function ln(){return{type:"code",lang:null,meta:null,value:""}}function An(){return{type:"inlineCode",value:""}}function Tr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function oa(){return{type:"emphasis",children:[]}}function si(){return{type:"heading",depth:0,children:[]}}function li(){return{type:"break"}}function xr(){return{type:"html",value:""}}function aa(){return{type:"image",title:null,url:"",alt:null}}function ci(){return{type:"link",title:null,url:"",children:[]}}function ui(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function sa(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function la(){return{type:"paragraph",children:[]}}function ca(){return{type:"strong",children:[]}}function ua(){return{type:"text",value:""}}function pa(){return{type:"thematicBreak"}}}function Mn(e){return{line:e.line,column:e.column,offset:e.offset}}function Gh(e,n){let t=-1;for(;++t<n.length;){let r=n[t];Array.isArray(r)?Gh(e,r):nS(e,r)}}function nS(e,n){let t;for(t in n)if(Jh.call(n,t))switch(t){case"canContainEols":{let r=n[t];r&&e[t].push(...r);break}case"transforms":{let r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{let r=n[t];r&&Object.assign(e[t],r);break}}}function Yh(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Pn({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Pn({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Pn({start:n.start,end:n.end})+") is still open")}var Jh,Kh=M(()=>{"use strict";Br();zh();ls();bd();lr();ho();Gs();Jh={}.hasOwnProperty});var Xh=M(()=>{"use strict";Kh()});function Po(e){let n=this;n.parser=t;function t(r){return Ks(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}var Qh=M(()=>{"use strict";Xh()});var Zh=M(()=>{"use strict";Qh()});function Xs(e){if(e)throw e}var ef=M(()=>{"use strict"});var uf=Mg((J0,cf)=>{"use strict";var Mo=Object.prototype.hasOwnProperty,lf=Object.prototype.toString,tf=Object.defineProperty,nf=Object.getOwnPropertyDescriptor,rf=function(n){return typeof Array.isArray=="function"?Array.isArray(n):lf.call(n)==="[object Array]"},of=function(n){if(!n||lf.call(n)!=="[object Object]")return!1;var t=Mo.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&Mo.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i=="undefined"||Mo.call(n,i)},af=function(n,t){tf&&t.name==="__proto__"?tf(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},sf=function(n,t){if(t==="__proto__")if(Mo.call(n,t)){if(nf)return nf(n,t).value}else return;return n[t]};cf.exports=function e(){var n,t,r,i,o,a,s=arguments[0],u=1,p=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<p;++u)if(n=arguments[u],n!=null)for(t in n)r=sf(s,t),i=sf(n,t),s!==i&&(d&&i&&(of(i)||(o=rf(i)))?(o?(o=!1,a=r&&rf(r)?r:[]):a=r&&of(r)?r:{},af(s,{name:t,newValue:e(d,a,i)})):typeof i!="undefined"&&af(s,{name:t,newValue:i}));return s}});function Xr(e){if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var pf=M(()=>{"use strict"});function Qs(){let e=[],n={run:t,use:r};return n;function t(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...p){let d=e[++o],h=-1;if(u){a(u);return}for(;++h<i.length;)(p[h]===null||p[h]===void 0)&&(p[h]=i[h]);i=p,d?df(d,s)(...p):a(null,...p)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function df(e,n){let t;return r;function r(...a){let s=e.length>a.length,u;s&&a.push(i);try{u=e.apply(this,a)}catch(p){let d=p;if(s&&t)throw d;return i(d)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){t||(t=!0,n(a,...s))}function o(a){i(null,a)}}var hf=M(()=>{"use strict"});var ff=M(()=>{"use strict";hf()});var bt,mf=M(()=>{"use strict";Gs();bt=class extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(a=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){let u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){let u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}let s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Pn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};bt.prototype.file="";bt.prototype.name="";bt.prototype.reason="";bt.prototype.message="";bt.prototype.stack="";bt.prototype.column=void 0;bt.prototype.line=void 0;bt.prototype.ancestors=void 0;bt.prototype.cause=void 0;bt.prototype.fatal=void 0;bt.prototype.place=void 0;bt.prototype.ruleId=void 0;bt.prototype.source=void 0});var gf=M(()=>{"use strict";mf()});var Vt,yf=M(()=>{"use strict";Vt=Bt(require("path"),1)});var Zs,bf=M(()=>{"use strict";Zs=Bt(require("process"),1)});function No(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var wf=M(()=>{"use strict"});var el,Sf=M(()=>{"use strict";el=require("url");wf()});function nl(e,n){if(e&&e.includes(Vt.default.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Vt.default.sep+"`")}function rl(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Tf(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function rS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var tl,Qr,xf=M(()=>{"use strict";gf();yf();bf();Sf();tl=["history","path","basename","stem","extname","dirname"],Qr=class{constructor(n){let t;n?No(n)?t={path:n}:typeof n=="string"||rS(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Zs.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<tl.length;){let o=tl[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)tl.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?Vt.default.basename(this.path):void 0}set basename(n){rl(n,"basename"),nl(n,"basename"),this.path=Vt.default.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Vt.default.dirname(this.path):void 0}set dirname(n){Tf(this.basename,"dirname"),this.path=Vt.default.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Vt.default.extname(this.path):void 0}set extname(n){if(nl(n,"extname"),Tf(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vt.default.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){No(n)&&(n=(0,el.fileURLToPath)(n)),rl(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Vt.default.basename(this.path,this.extname):void 0}set stem(n){rl(n,"stem"),nl(n,"stem"),this.path=Vt.default.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){let i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){let i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){let i=new bt(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}});var kf=M(()=>{"use strict";xf()});var Af,vf=M(()=>{"use strict";Af=(function(e){let r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o})});function il(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ol(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function al(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ef(e){if(!Xr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _f(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Lo(e){return oS(e)?e:new Qr(e)}function oS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function aS(e){return typeof e=="string"||sS(e)}function sS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Do,iS,sl,ll,Rf=M(()=>{"use strict";ef();Do=Bt(uf(),1);pf();ff();kf();vf();iS={}.hasOwnProperty,sl=class e extends Af{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Qs()}copy(){let n=new e,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];n.use(...r)}return n.data((0,Do.default)(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(al("data",this.frozen),this.namespace[n]=t,this):iS.call(this.namespace,n)&&this.namespace[n]||void 0:n?(al("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;let n=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();let t=Lo(n),r=this.parser||this.Parser;return il("parse",r),r(String(t),t)}process(n,t){let r=this;return this.freeze(),il("process",this.parser||this.Parser),ol("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,a){let s=Lo(n),u=r.parse(s);r.run(u,s,function(d,h,y){if(d||!h||!y)return p(d);let g=h,P=r.stringify(g,y);aS(P)?y.value=P:y.result=P,p(d,y)});function p(d,h){d||!h?a(d):o?o(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),il("processSync",this.parser||this.Parser),ol("processSync",this.compiler||this.Compiler),this.process(n,i),_f("processSync","process",t),r;function i(o,a){t=!0,Xs(o),r=a}}run(n,t,r){Ef(n),this.freeze();let i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(a,s){let u=Lo(t);i.run(n,u,p);function p(d,h,y){let g=h||n;d?s(d):a?a(g):r(void 0,g,y)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),_f("runSync","run",r),i;function o(a,s){Xs(a),i=s,r=!0}}stringify(n,t){this.freeze();let r=Lo(t),i=this.compiler||this.Compiler;return ol("stringify",i),Ef(n),i(n,r)}use(n,...t){let r=this.attachers,i=this.namespace;if(al("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):a(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(p){if(typeof p=="function")u(p,[]);else if(typeof p=="object")if(Array.isArray(p)){let[d,...h]=p;u(d,h)}else a(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function a(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(p.plugins),p.settings&&(i.settings=(0,Do.default)(!0,i.settings,p.settings))}function s(p){let d=-1;if(p!=null)if(Array.isArray(p))for(;++d<p.length;){let h=p[d];o(h)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function u(p,d){let h=-1,y=-1;for(;++h<r.length;)if(r[h][0]===p){y=h;break}if(y===-1)r.push([p,...d]);else if(d.length>0){let[g,...P]=d,ee=r[y][1];Xr(ee)&&Xr(g)&&(g=(0,Do.default)(!0,ee,g)),r[y]=[p,g,...P]}}}},ll=new sl().freeze()});var Of=M(()=>{"use strict";Rf()});function Cf(e,n){let t=[e,...n],r=Math.max(...t.map(s=>s.length));if(r===0)return"";let i=Array.from({length:r},()=>0);for(let s of t)for(let u=0;u<r;u++){let p=(s[u]||"").length;p>i[u]&&(i[u]=p)}let o=s=>Array.from({length:r},(u,p)=>(s[p]||"").padEnd(i[p])).join(" | ").trimEnd(),a=[];a.push(o(e)),a.push(i.map(s=>"-".repeat(s)).join("-|-"));for(let s of n)a.push(o(s));return a.join(`
19
+ `)}function wl(e){return ll().use(Po).use(Co).parse(e)}function Zr(e){return bn(e)}function Tn(e){return{type:"text",value:e}}function xn(e){return{type:"paragraph",children:e}}function kn(e){return{type:"root",children:e}}function Sl(e={}){var n;return{type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.imageUrl,children:(n=e.children)!=null?n:[]}}function cl(e,n={}){return{type:"text",content:e,style:n.style}}function ul(e){return{type:"image",url:e.url,alt:e.alt}}function Fo(){return{type:"divider"}}function pl(e){return{type:"section",children:e}}function Uo(e){return{type:"actions",children:e}}function $o(e){return{type:"button",id:e.id,label:e.label,style:e.style,value:e.value,disabled:e.disabled,actionType:e.actionType,callbackUrl:e.callbackUrl}}function dl(e){return{type:"link-button",id:e.id,url:e.url,label:e.label,style:e.style}}function hl(e){return{type:"field",label:e.label,value:e.value}}function fl(e){return{type:"fields",children:e}}function ml(e){return{type:"table",headers:e.headers,rows:e.rows,align:e.align}}function qo(e){return{type:"link",url:e.url,label:e.label}}function ei(e){let n=[];e.title&&n.push(`**${e.title}**`),e.subtitle&&n.push(e.subtitle);for(let t of e.children){let r=Tl(t);r&&n.push(r)}return n.join(`
20
+ `)}function Tl(e){switch(e.type){case"text":return e.content;case"link":return`${e.label} (${e.url})`;case"fields":return e.children.map(n=>`${n.label}: ${n.value}`).join(`
21
+ `);case"actions":return null;case"table":return Cf(e.headers,e.rows);case"section":return e.children.map(n=>Tl(n)).filter(Boolean).join(`
22
+ `);default:return null}}function Mf(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="modal"}function cS(e){let n=e.filter(t=>typeof t=="object"&&t!==null&&"type"in t&&lS.includes(t.type));return n.length<e.length&&console.warn("[chat] Modal contains unsupported child elements that were ignored"),n}function gl(e){var n;return{type:"modal",callbackId:e.callbackId,callbackUrl:e.callbackUrl,title:e.title,submitLabel:e.submitLabel,closeLabel:e.closeLabel,notifyOnClose:e.notifyOnClose,privateMetadata:e.privateMetadata,children:(n=e.children)!=null?n:[]}}function jo(e){return{type:"text_input",id:e.id,label:e.label,placeholder:e.placeholder,initialValue:e.initialValue,multiline:e.multiline,optional:e.optional,maxLength:e.maxLength}}function Bo(e){if(!e.options||e.options.length===0)throw new Error("Select requires at least one option");return{type:"select",id:e.id,label:e.label,placeholder:e.placeholder,options:e.options,initialOption:e.initialOption,optional:e.optional}}function yl(e){return{type:"external_select",id:e.id,initialOption:e.initialOption,label:e.label,placeholder:e.placeholder,minQueryLength:e.minQueryLength,optional:e.optional}}function zo(e){return{label:e.label,value:e.value,description:e.description}}function bl(e){if(!e.options||e.options.length===0)throw new Error("RadioSelect requires at least one option");return{type:"radio_select",id:e.id,label:e.label,options:e.options,initialOption:e.initialOption,optional:e.optional}}function Vo(e){return typeof e=="object"&&e!==null&&e.$$typeof===xl}function kl(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(kl);if(Vo(e)){let n=vl(e);return n?[n]:[]}return typeof e=="object"&&"type"in e?[e]:typeof e=="string"||typeof e=="number"?[String(e)]:[]}function uS(e){return!("id"in e||"url"in e||"label"in e)}function pS(e){return"id"in e&&typeof e.id=="string"&&!("url"in e)}function dS(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)}function Al(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)&&!("alt"in e)&&!("style"in e)}function hS(e){return"url"in e&&typeof e.url=="string"}function fS(e){return"label"in e&&"value"in e&&typeof e.label=="string"&&typeof e.value=="string"}function mS(e){return!("id"in e||"url"in e||"callbackId"in e)&&("title"in e||"subtitle"in e||"imageUrl"in e)}function gS(e){return"callbackId"in e&&"title"in e}function yS(e){return"id"in e&&"label"in e&&!("options"in e)&&!("value"in e)}function If(e){return"id"in e&&"label"in e&&!("value"in e)}function bS(e){return"id"in e&&"label"in e&&!("value"in e)&&!("children"in e)}function wS(e){return"label"in e&&"value"in e&&!("id"in e)}function vl(e){var a,s,u,p;let{type:n,props:t,children:r}=e,i=kl(r);if(n===cl){let d=uS(t)?t:{style:void 0},h=i.length>0?i.map(String).join(""):String((a=d.children)!=null?a:"");return cl(h,{style:d.style})}if(n===pl)return pl(i);if(n===Uo)return Uo(i);if(n===fl)return fl(i);if(n===$o){if(!pS(t))throw new Error("Button requires an 'id' prop");let d=i.length>0?i.map(String).join(""):(s=t.label)!=null?s:"";return $o({id:t.id,label:d,style:t.style,value:t.value,actionType:t.actionType,callbackUrl:t.callbackUrl,disabled:t.disabled})}if(n===dl){if(!dS(t))throw new Error("LinkButton requires a 'url' prop");let d=i.length>0?i.map(String).join(""):(u=t.label)!=null?u:"";return dl({id:t.id,url:t.url,label:d,style:t.style})}if(n===qo){if(!Al(t))throw new Error("CardLink requires a 'url' prop");let d=i.length>0?i.map(String).join(""):(p=t.label)!=null?p:"";return qo({url:t.url,label:d})}if(n===ul){if(!hS(t))throw new Error("Image requires a 'url' prop");return ul({url:t.url,alt:t.alt})}if(n===hl){if(!fS(t))throw new Error("Field requires 'label' and 'value' props");return hl({label:t.label,value:t.value})}if(n===Fo)return Fo();if(n===gl){if(!gS(t))throw new Error("Modal requires 'callbackId' and 'title' props");return gl({callbackId:t.callbackId,callbackUrl:t.callbackUrl,title:t.title,submitLabel:t.submitLabel,closeLabel:t.closeLabel,notifyOnClose:t.notifyOnClose,privateMetadata:t.privateMetadata,children:cS(i)})}if(n===jo){if(!yS(t))throw new Error("TextInput requires 'id' and 'label' props");return jo({id:t.id,label:t.label,placeholder:t.placeholder,initialValue:t.initialValue,multiline:t.multiline,optional:t.optional,maxLength:t.maxLength})}if(n===Bo){if(!If(t))throw new Error("Select requires 'id' and 'label' props");return Bo({id:t.id,label:t.label,placeholder:t.placeholder,initialOption:t.initialOption,optional:t.optional,options:i})}if(n===yl){if(!bS(t))throw new Error("ExternalSelect requires 'id' and 'label' props");return yl({id:t.id,initialOption:t.initialOption,label:t.label,placeholder:t.placeholder,minQueryLength:t.minQueryLength,optional:t.optional})}if(n===bl){if(!If(t))throw new Error("RadioSelect requires 'id' and 'label' props");return bl({id:t.id,label:t.label,initialOption:t.initialOption,optional:t.optional,options:i})}if(n===zo){if(!wS(t))throw new Error("SelectOption requires 'label' and 'value' props");return zo({label:t.label,value:t.value,description:t.description})}if(n===ml){let d=t;return ml({headers:d.headers,rows:d.rows})}let o=mS(t)?t:{};return Sl({title:o.title,subtitle:o.subtitle,imageUrl:o.imageUrl,children:i})}function El(e,n,t){let{children:r,...i}=n;return{$$typeof:xl,type:e,props:i,children:r!=null?[r]:[]}}function Nf(e,n,t){let{children:r,...i}=n,o;return Array.isArray(r)?o=r:r!=null?o=[r]:o=[],{$$typeof:xl,type:e,props:i,children:o}}function Df(e){return kl(e.children)}function Wt(e){if(Vo(e)){let n=vl(e);if(n&&typeof n=="object"&&"type"in n&&n.type==="card")return n}return typeof e=="object"&&e!==null&&"type"in e&&e.type==="card"?e:null}function _l(e){if(Vo(e)){let n=vl(e);if(n&&typeof n=="object"&&"type"in n&&n.type==="modal")return n}return Mf(e)?e:null}function Ht(e){if(Vo(e))return!0;if(typeof e=="object"&&e!==null&&"$$typeof"in e&&typeof e.$$typeof=="symbol"){let n=e.$$typeof.toString();return n.includes("react.element")||n.includes("react.transitional.element")}return!1}var Pf,lS,xl,Lf,Rl=M(()=>{"use strict";Br();kh();Zh();Of();Pf=cl;lS=["text_input","select","external_select","radio_select","text","fields"];xl=Symbol.for("chat.jsx.element");Lf=El});var Ff={};Ra(Ff,{Fragment:()=>Df,isCardLinkProps:()=>Al,isJSX:()=>Ht,jsx:()=>El,jsxDEV:()=>Lf,jsxs:()=>Nf,toCardElement:()=>Wt,toModalElement:()=>_l});var Uf=M(()=>{"use strict";Rl()});var ik={};Ra(ik,{Actions:()=>$l,AgentDeliveryError:()=>zn,AgentError:()=>yn,Button:()=>ql,Card:()=>jl,CardLink:()=>Bl,CardText:()=>zl,Client:()=>ar,CronExpression:()=>Oa,Divider:()=>Vl,NOVU_OPTIONS:()=>Dn,NovuClient:()=>Jt,NovuController:()=>Pt,NovuHandler:()=>Yt,NovuModule:()=>ai,NovuRequestHandler:()=>fr,REGISTER_API_PATH:()=>Kl,REGISTER_CONTROLLER_DECORATORS:()=>Xl,Select:()=>Wl,SelectOption:()=>Hl,SeverityLevelEnum:()=>ta,TextInput:()=>Yl,agent:()=>Jl,frameworkName:()=>Xm,providerSchemas:()=>Xo,registerApiPath:()=>ia,registerControllerDecorators:()=>Zl,step:()=>Jm,toAgentError:()=>jr,workflow:()=>Ym});module.exports=Ng(ik);var Pu=require("jsonrepair");var Ir=(i=>(i.TRIGGER="trigger",i.EXECUTE="execute",i.PREVIEW="preview",i.AGENT_EVENT="agent-event",i))(Ir||{}),wi=(r=>(r.DISCOVER="discover",r.HEALTH_CHECK="health-check",r.CODE="code",r))(wi||{});var Oa=(te=>(te.EVERY_SECOND="* * * * * *",te.EVERY_5_SECONDS="*/5 * * * * *",te.EVERY_10_SECONDS="*/10 * * * * *",te.EVERY_30_SECONDS="*/30 * * * * *",te.EVERY_MINUTE="*/1 * * * *",te.EVERY_5_MINUTES="0 */5 * * * *",te.EVERY_10_MINUTES="0 */10 * * * *",te.EVERY_30_MINUTES="0 */30 * * * *",te.EVERY_HOUR="0 0-23/1 * * *",te.EVERY_2_HOURS="0 0-23/2 * * *",te.EVERY_3_HOURS="0 0-23/3 * * *",te.EVERY_4_HOURS="0 0-23/4 * * *",te.EVERY_5_HOURS="0 0-23/5 * * *",te.EVERY_6_HOURS="0 0-23/6 * * *",te.EVERY_7_HOURS="0 0-23/7 * * *",te.EVERY_8_HOURS="0 0-23/8 * * *",te.EVERY_9_HOURS="0 0-23/9 * * *",te.EVERY_10_HOURS="0 0-23/10 * * *",te.EVERY_11_HOURS="0 0-23/11 * * *",te.EVERY_12_HOURS="0 0-23/12 * * *",te.EVERY_DAY_AT_1AM="0 01 * * *",te.EVERY_DAY_AT_2AM="0 02 * * *",te.EVERY_DAY_AT_3AM="0 03 * * *",te.EVERY_DAY_AT_4AM="0 04 * * *",te.EVERY_DAY_AT_5AM="0 05 * * *",te.EVERY_DAY_AT_6AM="0 06 * * *",te.EVERY_DAY_AT_7AM="0 07 * * *",te.EVERY_DAY_AT_8AM="0 08 * * *",te.EVERY_DAY_AT_9AM="0 09 * * *",te.EVERY_DAY_AT_10AM="0 10 * * *",te.EVERY_DAY_AT_11AM="0 11 * * *",te.EVERY_DAY_AT_NOON="0 12 * * *",te.EVERY_DAY_AT_1PM="0 13 * * *",te.EVERY_DAY_AT_2PM="0 14 * * *",te.EVERY_DAY_AT_3PM="0 15 * * *",te.EVERY_DAY_AT_4PM="0 16 * * *",te.EVERY_DAY_AT_5PM="0 17 * * *",te.EVERY_DAY_AT_6PM="0 18 * * *",te.EVERY_DAY_AT_7PM="0 19 * * *",te.EVERY_DAY_AT_8PM="0 20 * * *",te.EVERY_DAY_AT_9PM="0 21 * * *",te.EVERY_DAY_AT_10PM="0 22 * * *",te.EVERY_DAY_AT_11PM="0 23 * * *",te.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",te.EVERY_WEEK="0 0 * * 0",te.EVERY_WEEKDAY="0 0 * * 1-5",te.EVERY_WEEKEND="0 0 * * 6,0",te.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",te.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",te.EVERY_2ND_DAY_OF_MONTH_AT_10AM="0 10 2 * *",te.EVERY_2ND_HOUR="0 */2 * * *",te.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",te.EVERY_2ND_MONTH="0 0 1 */2 *",te.EVERY_QUARTER="0 0 1 */3 *",te.EVERY_6_MONTHS="0 0 1 */6 *",te.EVERY_YEAR="0 0 1 0 *",te.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",te.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",te.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",te.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",te.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",te.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",te.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",te.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",te.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",te.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",te.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",te.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",te.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",te.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",te.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",te.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",te.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",te.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",te.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",te.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",te.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",te.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",te.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",te.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",te.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",te.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",te.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",te.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5",te))(Oa||{});var zt=(Te=>(Te.BRIDGE_ERROR="BridgeError",Te.EXECUTION_EVENT_CONTROL_INVALID_ERROR="ExecutionEventControlInvalidError",Te.EXECUTION_EVENT_PAYLOAD_INVALID_ERROR="ExecutionEventPayloadInvalidError",Te.EXECUTION_PROVIDER_OUTPUT_INVALID_ERROR="ExecutionProviderOutputInvalidError",Te.EXECUTION_STATE_CONTROL_INVALID_ERROR="ExecutionStateControlInvalidError",Te.EXECUTION_STATE_CORRUPT_ERROR="ExecutionStateCorruptError",Te.EXECUTION_STATE_OUTPUT_INVALID_ERROR="ExecutionStateOutputInvalidError",Te.EXECUTION_STATE_RESULT_INVALID_ERROR="ExecutionStateResultInvalidError",Te.INVALID_ACTION_ERROR="InvalidActionError",Te.METHOD_NOT_ALLOWED_ERROR="MethodNotAllowedError",Te.MISSING_DEPENDENCY_ERROR="MissingDependencyError",Te.MISSING_SECRET_KEY_ERROR="MissingSecretKeyError",Te.PROVIDER_EXECUTION_FAILED_ERROR="ProviderExecutionFailedError",Te.PROVIDER_NOT_FOUND_ERROR="ProviderNotFoundError",Te.SIGNATURE_EXPIRED_ERROR="SignatureExpiredError",Te.SIGNATURE_INVALID_ERROR="SignatureInvalidError",Te.SIGNATURE_MISMATCH_ERROR="SignatureMismatchError",Te.SIGNATURE_NOT_FOUND_ERROR="SignatureNotFoundError",Te.SIGNATURE_VERSION_INVALID_ERROR="SignatureVersionInvalidError",Te.SIGNING_KEY_NOT_FOUND_ERROR="SigningKeyNotFoundError",Te.STEP_ALREADY_EXISTS_ERROR="StepAlreadyExistsError",Te.STEP_CONTROL_COMPILATION_FAILED_ERROR="StepControlCompilationFailedError",Te.STEP_EXECUTION_FAILED_ERROR="StepExecutionFailedError",Te.STEP_NOT_FOUND_ERROR="StepNotFoundError",Te.WORKFLOW_ALREADY_EXISTS_ERROR="WorkflowAlreadyExistsError",Te.WORKFLOW_NOT_FOUND_ERROR="WorkflowNotFoundError",Te.WORKFLOW_PAYLOAD_INVALID_ERROR="WorkflowPayloadInvalidError",Te))(zt||{});var Si=(r=>(r.POST="POST",r.GET="GET",r.OPTIONS="OPTIONS",r))(Si||{});var Lg=e=>{var t,r;if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(r=(t=n==null?void 0:n.constructor)==null?void 0:t.name.endsWith("Error"))!=null?r:!1},mn=class extends Error{},Ti=class extends mn{constructor(){super(...arguments);this.statusCode=404}},Rt=class extends mn{constructor(){super(...arguments);this.statusCode=400}},En=class extends mn{constructor(){super(...arguments);this.statusCode=401}},_n=class extends mn{constructor(n,{cause:t}={}){var r;Lg(t)?(super(`${n}: ${t.message}`),this.data={stack:(r=t.stack)!=null?r:n}):(super(`${n}${t?`: ${JSON.stringify(t,null,2)}`:""}`),this.data={stack:n})}},xi=class extends mn{constructor(){super(...arguments);this.statusCode=409}};var rr=class extends _n{constructor(t){super("Unknown BridgeError",{cause:t});this.statusCode=500;this.code="BridgeError"}};var ki=class extends Rt{constructor(t,r){super(`Workflow with id: \`${t}\` has a corrupt state. Step with id: \`${r}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:t,stepId:r}}},Pr=class extends Rt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=r}},Ai=class extends Rt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=r}},vi=class extends Rt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=i}},Ei=class extends Rt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=i}},_i=class extends Rt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=i}},Ri=class extends Rt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has invalid controls syntax in step with id: \`${r}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=i}},Oi=class extends Rt{constructor(t,r,i,o){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` and provider with id: \`${i}\` has invalid output. Please provide the correct provider output.`);this.code="ExecutionProviderOutputInvalidError";this.data=o}},Ii=class extends Rt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=r}};var $n=e=>Object.values(zt).includes(e==null?void 0:e.code),eu=e=>!$n(e)&&typeof e.statusCode=="number"&&e.statusCode>=400&&e.statusCode<500;var Ia=e=>Object.values(e).map(n=>`\`${n}\``).join(", "),Ci=e=>e.replaceAll(/(\w)(\w*)/g,(n,t,r)=>t.toUpperCase()+r.toLowerCase()).replaceAll(/[\s-]+/g,"");var Pi=class extends mn{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${Ia(Si)}`}},qn=class extends Rt{constructor(t,r){super(`Invalid query string: \`action\`=\`${t}\`. Please use one of ${Ia(r)}`);this.code="InvalidActionError"}},Mi=class extends Rt{constructor(){super("Missing secret key. Set the `NOVU_SECRET_KEY` environment variable or pass `secretKey` to the client options.");this.code="MissingSecretKeyError"}};var Ni=class extends Error{constructor(n,t,r){super(),this.data={message:r},this.statusCode=n,this.code=t}};var Mr=class extends xi{constructor(n,t){super(`${Ci(n)} with id: \`${t}\` already exists. Please use a different id.`)}},Rn=class extends Ti{constructor(n,t){super(`${Ci(n)} with id: \`${t}\` does not exist. Please provide a valid id.`)}},ir=class extends _n{constructor(t,r,i,o){super(`Failed to ${i} ${Ci(t)} with id: \`${r}\``,{cause:o});this.statusCode=502}};var Li=class extends Rn{constructor(t){super("provider",t);this.code="ProviderNotFoundError"}},Di=class extends ir{constructor(t,r,i){super("provider",t,r,i);this.code="ProviderExecutionFailedError"}};var Fi=class extends En{constructor(){super("Signature does not match the expected signature. Please ensure the signature provided in the `novu-signature` header is correct and try again.");this.code="SignatureMismatchError"}},Ui=class extends En{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},$i=class extends En{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},qi=class extends En{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},ji=class extends En{constructor(){super("Signature key not found. Please provide a valid key in the Client constructor `config.secretKey`");this.code="SigningKeyNotFoundError"}};var Bi=class extends Rn{constructor(t){super("step",t);this.code="StepNotFoundError"}},zi=class extends Mr{constructor(t){super("step",t);this.code="StepAlreadyExistsError"}},Nr=class extends ir{constructor(t,r,i){super("step",t,r,i);this.code="StepExecutionFailedError"}};var Lr=class extends Rn{constructor(t){super("workflow",t);this.code="WorkflowNotFoundError"}};var Vi=(()=>{var e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(l,c)=>function(){return l&&(c=(0,l[t(l)[0]])(l=0)),c},o=(l,c)=>function(){return c||(0,l[t(l)[0]])((c={exports:{}}).exports,c),c.exports},a=(l,c)=>{for(var f in c)e(l,f,{get:c[f],enumerable:!0})},s=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let T of t(c))!r.call(l,T)&&T!==f&&e(l,T,{get:()=>c[T],enumerable:!(S=n(c,T))||S.enumerable});return l},u=l=>s(e({},"__esModule",{value:!0}),l),p={};a(p,{JSONSchemaFaker:()=>Kc,default:()=>Xc,setDependencies:()=>pc});function d(l,c){return typeof l=="string"?typeof c!="undefined"?vr.register(l,c):vr.get(l):vr.registerMany(l)}function h(l,c){return l=typeof l=="undefined"?tn.MIN_INTEGER:l,c=typeof c=="undefined"?tn.MAX_INTEGER:c,Math.floor(_e("random")()*(c-l+1))+l}function y(l){return di.default.prototype.max=_e("defaultRandExpMax"),di.default.prototype.randInt=(f,S)=>f+Math.floor(_e("random")()*(1+(S-f))),new di.default(l).gen()}function g(l){return l[Math.floor(_e("random")()*l.length)]}function P(l){let c,f,S=l.length,T=l.slice();for(;S>0;)f=Math.floor(_e("random")()*S),S-=1,c=T[S],T[S]=T[f],T[f]=c;return T}function ee(l,c){return _e("random")()*(c-l)+l}function Z(l,c,f,S,T=!1){return f=typeof f=="undefined"?tn.MIN_NUMBER:f,S=typeof S=="undefined"?tn.MAX_NUMBER:S,l=typeof l=="undefined"?f:l,c=typeof c=="undefined"?S:c,c<l&&(c+=l),T?ee(l,c):h(l,c)}function B(l){switch(l){case"seconds":return Z(0,60)*60;case"minutes":return Z(15,50)*612;case"hours":return Z(12,72)*36123;case"days":return Z(7,30)*86412345;case"weeks":return Z(4,52)*604812345;case"months":return Z(2,13)*2592012345;case"years":return Z(1,20)*31104012345;default:break}}function ue(l){if(l)return B(l);let c=_e("minDateTime"),f=_e("maxDateTime");typeof c=="string"&&(c=new Date(c)),typeof f=="string"&&(f=new Date(f));let S=new Date().getTime();return typeof c=="number"&&(c=new Date(S+c)),typeof f=="number"&&(f=new Date(S+f)),new Date(ee(c.getTime(),f.getTime()))}function ne(l,c,f){if(c=decodeURIComponent(c),f&&f[c])return Te(f[c]);let S=c.replace("#/","/").split("/"),T=l.$ref&&f&&f[l.$ref]||l;for(!T&&!S[0]&&(S[0]=l.$ref.split("#/")[0]),f&&c.includes("#/")&&f[S[0]]&&(T=f[S.shift()]),S[0]||S.shift();T&&S.length>0;){let A=S.shift();if(!T[A])throw new Error(`Prop not found: ${A} (${c})`);T=T[A]}return T}function Ae(l){return typeof l=="string"&&Tc.test(l)}function Oe(l){return["number","boolean"].includes(typeof l)}function $(l,...c){return c.filter(f=>typeof l[f]!="undefined").length>0}function Ue(l){if(l.includes(" "))return new Date(l).toISOString().substr(0,10);let[c,f,S]=l.split("T")[0].split("-");return f=`0${Math.max(1,Math.min(12,f))}`.slice(-2),S=`0${Math.max(1,Math.min(31,S))}`.slice(-2),`${c}-${f}-${S}`}function Xe(l){if(l.includes(" "))return new Date(l).toISOString().substr(0,10);let[c,f]=l.split("T"),[S,T,A]=c.split("-"),[k,L,Q]=f.substr(0,8).split(":");return T=`0${Math.max(1,Math.min(12,T))}`.slice(-2),A=`0${Math.max(1,Math.min(31,A))}`.slice(-2),k=`0${Math.max(1,Math.min(23,k))}`.slice(-2),L=`0${Math.max(1,Math.min(59,L))}`.slice(-2),Q=`0${Math.max(1,Math.min(59,Q))}`.slice(-2),`${S}-${T}-${A}T${k}:${L}:${Q}.000Z`}function je(l,c,f){let S={};switch(l||c.type){case"integer":case"number":if(typeof c.minimum!="undefined"&&(S.minimum=c.minimum),typeof c.maximum!="undefined"&&(S.maximum=c.maximum),c.enum){let A=Math.max(S.minimum||0,0),k=Math.min(S.maximum||1/0,1/0);c.exclusiveMinimum&&A===c.minimum&&(A+=c.multipleOf||1),c.exclusiveMaximum&&k===c.maximum&&(k-=c.multipleOf||1),(A||k!==1/0)&&(c.enum=c.enum.filter(L=>L>=A&&L<=k))}break;case"string":{S.minLength=_e("minLength")||0,S.maxLength=_e("maxLength")||Number.MAX_SAFE_INTEGER,typeof c.minLength!="undefined"&&(S.minLength=Math.max(S.minLength,c.minLength)),typeof c.maxLength!="undefined"&&(S.maxLength=Math.min(S.maxLength,c.maxLength));break}default:break}let T=f(S);if(T==null)return null;switch(l||c.type){case"number":T=Ae(T)?parseFloat(T):T;break;case"integer":T=Ae(T)?parseInt(T,10):T;break;case"boolean":T=!!T;break;case"string":{if(Oe(T))return T;T=String(T);let A=Math.max(S.minLength||0,0),k=Math.min(S.maxLength||1/0,1/0),L,Q=0;for(;T.length<A;)if(L=T,c.pattern?T+=ve.randexp(c.pattern):T+=`${ve.pick([" ","/","_","-","+","=","@","^"])}${T}`,T===L){if(Q+=1,Q===3)break}else Q=0;switch(T.length>k&&(T=T.substr(0,k)),c.format){case"date-time":case"datetime":T=new Date(Xe(T)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":T=new Date(Ue(T)).toISOString().substr(0,10);break;case"time":T=new Date(`1969-01-01 ${T}`).toISOString().substr(11);break;default:break}break}default:break}return T}function U(l,c){return Object.keys(c).forEach(f=>{typeof c[f]!="object"||c[f]===null?l[f]=c[f]:Array.isArray(c[f])?(l[f]=l[f]||[],c[f].forEach((S,T)=>{l.type==="array"&&c.type==="array"?l[f][T]=U(l[f][T]||{},S,!0):Array.isArray(l[f])&&l[f].indexOf(S)===-1&&l[f].push(S)})):typeof l[f]!="object"||l[f]===null||Array.isArray(l[f])?l[f]=U({},c[f]):l[f]=U(l[f],c[f])}),l}function Te(l,c=new Map){if(!l||typeof l!="object")return l;if(c.has(l))return c.get(l);if(Array.isArray(l)){let S=[];return c.set(l,S),S.push(...l.map(T=>Te(T,c))),S}let f={};return c.set(l,f),Object.keys(l).reduce((S,T)=>(S[T]=Te(l[T],c),S),f)}function ze(l){let c=JSON.stringify(l),f=JSON.stringify(l,null,2);return c.length>400?`${f.substr(0,400)}...`:f}function ye(){return ve.pick([!1,!0,null,-1,NaN,Math.PI,1/0,void 0,[],{},Math.random(),Math.random().toString(36).substr(2)])}function Ce(l,c){if(l.enum)return l.enum.includes(c);if(l.const)return l.const===c}function Me(l,c){let f=U({},c);if(typeof l.minimum!="undefined"&&(f.maximum=l.minimum,f.exclusiveMaximum=!0),typeof l.maximum!="undefined"&&(f.minimum=l.maximum>f.maximum?0:l.maximum,f.exclusiveMinimum=!0),typeof l.minLength!="undefined"&&(f.maxLength=l.minLength),typeof l.maxLength!="undefined"&&(f.minLength=l.maxLength>f.maxLength?0:l.maxLength),l.type)f.type=ve.pick(tn.SCALAR_TYPES.filter(S=>(Array.isArray(l.type)?l.type:[l.type]).every(A=>S==="number"||S==="integer"?A!=="number"&&A!=="integer":S!==A)));else if(l.enum){let S;do S=ye();while(l.enum.indexOf(S)!==-1);f.enum=[S]}return l.required&&f.properties&&l.required.forEach(S=>{delete f.properties[S]}),f}function tt(l,c){let f=c.minimum!==void 0,S=c.maximum!==void 0;return(f||S)&&(!f||l>=c.minimum)&&(!S||l<=c.maximum)}function lt(l,c){return!c.every(f=>tt(l,f))}function Nt(l,c){return c.reduce((S,T)=>S+(tt(l,T)?1:0),0)===1}function Ut(l){return["enum","const","default","examples","required","definitions","items","properties"].includes(l)}function v(l,c){return Object.keys(l).filter(f=>!c.includes(f)).reduce((f,S)=>(Array.isArray(l[S])?f[S]=l[S].slice():f[S]=l[S]instanceof Object?U({},l[S]):l[S],f),{})}function vt(l,c){return Array.isArray(l)?l.map(f=>vt(f,c)):(typeof l=="string"&&(l=l.replace(/#\{([\w.-]+)\}/g,(f,S)=>c[S])),l)}function Lt(l){return Object.prototype.toString.call(l)==="[object Object]"&&!Object.keys(l).length}function _(l,c){c=c.items||c;let f=_e("alwaysFakeOptionals"),S=Array.isArray(c.required)&&c.required.includes(l)||f,T=typeof c.thunk=="function"||c.additionalProperties&&typeof c.additionalProperties.thunk=="function";return!S&&!T}function St(l,c,f=!1){if(!l||typeof l!="object")return l;if(Array.isArray(l))return l.map(S=>St(S,c,!0)).filter(S=>typeof S!="undefined");if(Object.keys(l).forEach(S=>{if(Lt(l[S]))_(S,c)&&delete l[S];else{let T=c;c&&c.properties&&c.properties[S]&&(T=c.properties[S]);let A=St(l[S],T);Lt(A)||(l[S]=A)}typeof l[S]=="undefined"&&delete l[S]}),!(!Object.keys(l).length&&f))return l}function sn(l){return(c,f,S,T)=>{let A=c,k=[];typeof c=="object"&&(A=Object.keys(c)[0],Array.isArray(c[A])?k=c[A]:k.push(c[A]));let L=A.split("."),Q=l();for(;L.length>1;)Q=Q[L.shift()];return c=typeof Q=="object"?Q[L[0]]:Q,typeof c=="function"&&(c=c.apply(Q,k.map(N=>Ye.template(N,T)))),Object.prototype.toString.call(c)==="[object Object]"&&Object.keys(c).forEach(N=>{if(typeof c[N]=="function")throw new Error(`Cannot resolve value for '${S}: ${A}', given: ${c}`)}),c}}function Sr(l,c){if(typeof l=="undefined")return tr.list();if(typeof l=="string")if(typeof c=="function")tr.register(l,c);else if(c===null||c===!1)tr.unregister(l);else return tr.get(l);else tr.registerMany(l)}function er(l,c,f){return Object.keys(l).filter(S=>{let T=vc.indexOf(c)>-1;return f.indexOf(S)>-1&&!T}).length>0}function dt(l,c){let f=Object.keys(Er);for(let S=0;S<f.length;S+=1){let T=f[S],A=c[c.length-1];if(er(l,A,Er[T]))return T}}function Fn(){return _e("random")()>.5}function Gt(){return null}function ln(l,c,f,S,T,A){let k=[],L=[];function Q(ie){let j=JSON.stringify(ie.value);return L.indexOf(j)===-1?(L.push(j),k.push(ie),!0):!1}c.forEach(Q);let N=100;for(;k.length!==c.length&&(Q(A(f.items||S,l,T))||(N-=1),!!N););return k}function An(l,c,f,S){let T=[];if(!(l.items||l.additionalItems)){if(Ye.hasProperties(l,"minItems","maxItems","uniqueItems")&&(l.minItems!==0||l.maxItems!==0))throw new hi(`missing items for ${Ye.short(l)}`,c);return T}if(Array.isArray(l.items))return l.items.map((ce,$e)=>{let xe=c.concat(["items",$e]);return S(ce,xe,f)});let A=l.minItems,k=l.maxItems,L=_e("minItems"),Q=_e("maxItems");L&&(A=typeof A=="undefined"?L:Math.min(L,A)),Q&&(k=typeof k=="undefined"?Q:Math.min(Q,k),k&&k>Q&&(k=Q),A&&A>Q&&(A=k));let N=_e("alwaysFakeOptionals")===!0?1:_e("optionalsProbability"),ie=_e("alwaysFakeOptionals")||_e("fixedProbabilities")||!1,j=ve.number(A,k,1,5);N!==null&&(j=Math.max(ie?Math.round((k||j)*N):Math.abs(ve.number(A,k)*N),A||0));let he=typeof l.additionalItems=="object"?l.additionalItems:{};for(let ce=T.length;ce<j;ce+=1){let $e=c.concat(["items",ce]),xe=S(l.items||he,$e,f);T.push(xe)}if(l.contains&&j>0){let ce=ve.number(0,j-1);T[ce]=S(l.contains,c.concat(["items",ce]),f)}return l.uniqueItems?ln(c.concat(["items"]),T,l,he,f,S):T}function Tr(l){let c=typeof l.minimum=="undefined"||l.minimum===-Number.MAX_VALUE?tn.MIN_INTEGER:l.minimum,f=typeof l.maximum=="undefined"||l.maximum===Number.MAX_VALUE?tn.MAX_INTEGER:l.maximum,S=l.multipleOf,T=S&&String(S).match(/e-(\d)|\.(\d+)$/);if(T){let A=(Math.random()*ve.number(0,10)+1)*S,k=T[1]||T[2].length,L=parseFloat(A.toFixed(k)),Q=ve.number(c,f-1);return String(L).includes(".")?Q+L:(Q+L).toExponential()}if(S&&(f=Math.floor(f/S)*S,c=Math.ceil(c/S)*S),l.exclusiveMinimum&&c===l.minimum&&(c+=S||1),l.exclusiveMaximum&&f===l.maximum&&(f-=S||1),c>f)return NaN;if(S){let A=ve.number(Math.floor(c/S),Math.floor(f/S))*S;for(;A<c;)A+=S;return A}return ve.number(c,f,void 0,void 0,l.type!=="integer")}function oa(l){return Math.floor(ka({...l}))}function si(l){return ve.shuffle(Lc).slice(0,l)}function li(l,c,f,S){let T={},A=l.properties||{},k=l.patternProperties||{},L=typeof l.required=="boolean"?[]:(l.required||[]).slice(),Q=l.additionalProperties!==!1,N=Object.keys(A),ie=Object.keys(k),j=N.concat(ie).reduce((ae,E)=>(L.indexOf(E)===-1&&ae.push(E),ae),[]),he=L.concat(j),ce=Q&&l.additionalProperties===!0?mi:l.additionalProperties;if(!Q&&N.length===0&&ie.length===0&&Ye.hasProperties(l,"minProperties","maxProperties","dependencies","required"))return null;if(_e("requiredOnly")===!0)return L.forEach(ae=>{A[ae]&&(T[ae]=A[ae])}),S(T,c.concat(["properties"]),f,l);let $e=_e("alwaysFakeOptionals")===!0?1:_e("optionalsProbability"),xe=_e("alwaysFakeOptionals")||_e("fixedProbabilities")||!1,Re=_e("ignoreProperties")||[],Ge=_e("reuseProperties"),Qe=_e("fillProperties"),oe=l.maxProperties||he.length+(Q?ve.number(1,5):0),I=Math.max(l.minProperties||0,L.length),C=Math.max(0,he.length-I);he.length===1&&!L.length&&(I=Math.max(ve.number(Qe?1:0,oe),I)),$e!==null&&(xe===!0?C=Math.round(I-L.length+$e*(he.length-I)):C=ve.number(I-L.length,$e*(he.length-I)));let V=ve.shuffle(j).slice(0,C),H=j.filter(ae=>V.indexOf(ae)!==-1),K=$e!==null||L.length===oe?oe:ve.number(0,oe),z=L.concat(ve.shuffle(H).slice(0,K)).slice(0,oe),Y=[],G=[];if(l.dependencies&&(Object.keys(l.dependencies).forEach(ae=>{let E=l.dependencies[ae];if(z.indexOf(ae)!==-1)if(Array.isArray(E))E.forEach(J=>{z.indexOf(J)===-1&&z.push(J)});else if(Array.isArray(E.oneOf||E.anyOf)){let J=E.oneOf||E.anyOf;G.push({prop:ae,values:J})}else Y.push(E)}),Y.length))return delete l.dependencies,S({allOf:Y.concat(l)},c.concat(["properties"]),f,l);let pe=[],fe=[];z.forEach(ae=>{if(A[ae]&&["{}","true"].includes(JSON.stringify(A[ae].not)))return;for(let J=0;J<Re.length;J+=1)if(Re[J]instanceof RegExp&&Re[J].test(ae)||typeof Re[J]=="string"&&Re[J]===ae||typeof Re[J]=="function"&&Re[J](A[ae],ae)){pe.push(ae);return}ce===!1&&L.indexOf(ae)!==-1&&(T[ae]=A[ae]),A[ae]&&(T[ae]=A[ae]);let E;if(ie.forEach(J=>{ae.match(new RegExp(J))&&(E=!0,T[ae]?Ye.merge(T[ae],k[J]):T[ve.randexp(ae)]=k[J])}),!E){let J=k[ae]||ce;J&&ce!==!1?T[k[ae]?ve.randexp(ae):ae]=A[ae]||J:fe.push(ae)}});let Ee=Object.keys(T).length+(Qe?0:pe.length),it=ae=>ve.randexp(`_?[_a-f\\d]{1,3}${ae?"\\$?":""}`);function ot(ae){let E;do{if(!ae.length)break;E=ae.shift()}while(T[E]);return E}let st=I;if(Q&&!L.length&&(st=Math.max($e===null||ce?ve.number(Qe?1:0,oe):0,I)),!H.length&&!C&&Q&&xe===!0&&Qe){let ae=ve.number(0,oe);for(let E=0;E<ae;E+=1)T[fi(1)+it(ae[E])]=ce||mi}for(;Qe&&!(!(ie.length||Q)||Ee>=st);){if(Q)if(Ge&&N.length-Ee>st){let ae=0,E;do{if(ae+=1,ae>1e3)break;E=ot(L)||ve.pick(N)}while(typeof T[E]!="undefined");typeof T[E]=="undefined"&&(T[E]=A[E],Ee+=1)}else if(ie.length&&!ce){let ae=ve.pick(ie),E=ve.randexp(ae);T[E]||(T[E]=k[ae],Ee+=1)}else{let ae=ot(L)||fi(1)+it();T[ae]||(T[ae]=ce||mi,Ee+=1)}for(let ae=0;Ee<I&&ae<ie.length;ae+=1){let E=ie[ae],J=ve.randexp(E);T[J]||(T[J]=k[E],Ee+=1)}}if(L.length===0&&(!Q||$e===!1)){let ae=ve.number(I,oe);for(;Ee<ae;){let E=ot(N);E&&(T[E]=A[E]),Ee+=1}}let mt=T;if(_e("sortProperties")!==null){let ae=Object.keys(A);mt=Object.keys(T).sort((J,me)=>_e("sortProperties")?J.localeCompare(me):ae.indexOf(J)-ae.indexOf(me)).reduce((J,me)=>(J[me]=T[me],J),{})}let xt=S(mt,c.concat(["properties"]),f,l);return G.forEach(ae=>{for(let E of ae.values)if(Ye.hasValue(E.properties[ae.prop],xt.value[ae.prop])){Object.keys(E.properties).forEach(J=>{J!==ae.prop&&Ye.merge(xt.value,S(E.properties,c.concat(["properties"]),f,l).value)});break}}),xt}function xr(){let l=ve.number(1,5);return fi(l).join(" ")}function aa(l=0,c=140){let f=Math.max(0,l),S=ve.number(f,c),T=xr();for(;T.length<f;)T+=xr();return T.length>S&&(T=T.substr(0,S)),T}function ci(){return[0,0,0,0].map(()=>ve.number(0,255)).join(".")}function ui(){return ve.date().toISOString()}function sa(){return gi().slice(0,10)}function la(){return gi().slice(11)}function ca(l){return ve.randexp(qt[l]).replace(jc,(c,f)=>ve.randexp(qt[f]))}function ua(l,c){let f=xa(l.format);if(typeof f=="function")return f(l);switch(l.format){case"date-time":case"datetime":return gi();case"date":return Uc();case"time":return $c();case"ipv4":return Fc();case"regex":return".+?";case"email":case"hostname":case"ipv6":case"uri":case"uri-reference":case"iri":case"iri-reference":case"idn-email":case"idn-hostname":case"json-pointer":case"slug":case"uri-template":case"uuid":case"duration":return Bc(l.format);default:if(typeof f=="undefined"){if(_e("failOnInvalidFormat"))throw new Error(`unknown registry key ${Ye.short(l.format)}`);return c()}throw new Error(`unsupported format '${l.format}'`)}}function pa(l){return Ye.typecast("string",l,f=>l.format?ua(l,()=>Aa(f.minLength,f.maxLength)):l.pattern?ve.randexp(l.pattern):Aa(f.minLength,f.maxLength))}function q({$comment:l,title:c,description:f}){return Object.entries({comment:l,title:c,description:f}).filter(([,S])=>S).reduce((S,[T,A])=>(S[T]=A,S),{})}function re(l,c,f,S){if(l=f(l,null,c),l&&(l.oneOf||l.anyOf||l.allOf)&&(l=f(l,null,c)),!l)throw new Error(`Cannot traverse at '${c.join(".")}', given '${JSON.stringify(S)}'`);let T={...q(l),schemaPath:c};if(c[c.length-1]!=="properties"){if(_e("useExamplesValue")&&Array.isArray(l.examples)){let N=l.examples.concat("default"in l?[l.default]:[]);return{value:Ye.typecast(null,l,()=>ve.pick(N)),context:T}}if(_e("useExamplesValue")&&typeof l.example!="undefined")return{value:Ye.typecast(null,l,()=>l.example),context:T};if(_e("useDefaultValue")&&"default"in l&&(l.default!==""||!_e("replaceEmptyByRandomValue")))return{value:l.default,context:T};if("template"in l)return{value:Ye.template(l.template,S),context:T};if("const"in l)return{value:l.const,context:T}}if(l.not&&typeof l.not=="object"&&(l=Ye.notValue(l.not,Ye.omitProps(l,["not"])),l.type&&l.type==="object")){let{value:N,context:ie}=re(l,c.concat(["not"]),f,S);return{value:Ye.clean(N,l,!1),context:{...T,items:ie}}}if(typeof l.thunk=="function"){let{value:N,context:ie}=re(l.thunk(S),c,f);return{value:N,context:{...T,items:ie}}}if(l.jsonPath)return{value:l,context:T};let A=l.type;if(Array.isArray(A)?A=ve.pick(A):typeof A=="undefined"&&(A=Ec(l,c)||A,A&&(l.type=A)),typeof l.generate=="function"){let N=Ye.typecast(null,l,()=>l.generate(S,c)),ie=N===null?"null":typeof N;if(ie===A||ie==="number"&&A==="integer"||Array.isArray(N)&&A==="array")return{value:N,context:T}}if(typeof l.pattern=="string")return{value:Ye.typecast("string",l,()=>ve.randexp(l.pattern)),context:T};if(Array.isArray(l.enum))return{value:Ye.typecast(null,l,()=>ve.pick(l.enum)),context:T};if(typeof A=="string")if(_r[A])try{let N=_r[A](l,c,f,re);return A==="array"?{value:N.map(({value:ie})=>ie),context:{...T,items:N.map(Array.isArray(l.items)?({context:ie})=>ie:({context:ie})=>({...ie,schemaPath:ie.schemaPath.slice(0,-1)}))}}:A==="object"?N!==null?{value:N.value,context:{...T,items:N.context}}:{value:{},context:T}:{value:N,context:T}}catch(N){throw typeof N.path=="undefined"?new hi(N.stack,c):N}else{if(_e("failOnInvalidTypes"))throw new hi(`unknown primitive ${Ye.short(A)}`,c.concat(["type"]));{let N=_e("defaultInvalidTypeProduct");return typeof N=="string"&&_r[N]?{value:_r[N](l,c,f,re),context:T}:{value:N,context:T}}}let k={},L={...T};Array.isArray(l)&&(k=[]);let Q=_e("pruneProperties")||[];return Object.keys(l).forEach(N=>{if(!Q.includes(N)&&l[N]!==null)if(typeof l[N]=="object"&&N!=="definitions"){let{value:ie,context:j}=re(l[N],c.concat([N]),f,k);k[N]=Ye.clean(ie,l[N],!1),L[N]=j,k[N]===null&&_e("omitNulls")&&(delete k[N],delete L[N])}else k[N]=l[N]}),{value:k,context:L}}function Ie(l){return Array.isArray(l)?ve.pick(l):l}function De(l,c){if(!Array.isArray(l))return l;let f=c?l.pop():l.shift();return c?l.unshift(f):l.push(f),f}function We(l,c,f,S){if(!l||typeof l!="object")return l;if(f||(f={}),c||(c=l),Array.isArray(l))return l.map(T=>We(T,c,f,S));if(l.jsonPath){let{JSONPath:T}=ya(),A=typeof l.jsonPath!="object"?{path:l.jsonPath}:l.jsonPath;A.group=l.group||A.group||S,A.cycle=l.cycle||A.cycle||!1,A.reverse=l.reverse||A.reverse||!1,A.count=l.count||A.count||1;let k=`${A.group}__${A.path}`;return f[k]||(A.count>1?f[k]=T(A.path,c).slice(0,A.count):f[k]=T(A.path,c)),A.cycle||A.reverse?De(f[k],A.reverse):Ie(f[k])}return Object.keys(l).forEach(T=>{l[T]=We(l[T],c,f,T)}),l}function Dt(l,c,f,S){if(Object.prototype.toString.call(c)!=="[object Object]")throw new Error(`Invalid input, expecting object but given ${typeof c}`);let T=_e("refDepthMin")||0,A=_e("refDepthMax")||3;try{let{resolveSchema:k}=Yc({refs:l,schema:c,container:f,synchronous:S,refDepthMin:T,refDepthMax:A}),L=Wc(Ye.clone(c),[],k);return _e("resolveJsonPath")?{value:We(L.value),context:L.context}:L}catch(k){throw k.path?new Error(`${k.message} in /${k.path.join("/")}`):k}}function cn(l){return l.value}function Kt(l,c){return c.reduce((f,S)=>S in f?f[S]:{},l)}function un(l,c,f,S=f){let{title:T,description:A,comment:k}=Kt(l,c),L=[];_e("renderTitle")&&T&&L.push(` ${T}`,""),_e("renderDescription")&&A&&L.push(` ${A}`),_e("renderComment")&&k&&L.push(` ${k}`),f.commentBefore=L.join(`
23
+ `),S instanceof Jc?S.items.forEach(Q=>{un(l,[...c,"items",Q.key.value],Q.key,Q.value)}):S instanceof Gc&&S.items.forEach((Q,N)=>{un(l,[...c,"items",N],Q)})}function Un({value:l,context:c}){let f=Rr.createNode(l);un(c,[],f);let S=new Rr.Document;return S.contents=f,S.toString()}function Tt(){dn.define("autoIncrement",function(c,f){if(!this.offset){let S=f.minimum||1,T=S+tn.MAX_NUMBER,A=c.initialOffset||f.initialOffset;this.offset=A||ve.number(S,T)}return c?this.offset++:f}),dn.define("sequentialDate",function(c,f){if(this.now||(this.now=ve.date()),c){if(f=this.now.toISOString(),c=c===!0?"days":c,["seconds","minutes","hours","days","weeks","months","years"].indexOf(c)===-1)throw new Error(`Unsupported increment by ${Ye.short(c)}`);this.now.setTime(this.now.getTime()+ve.date(c))}return f})}function pn(l,c){let f={};Array.isArray(l)?l.forEach(T=>{f[T.$id||T.id]=T}):f=l||{};function S(T){if(!T||typeof T!="object")return;if(Array.isArray(T))return T.forEach(S);let A=T.$id||T.id;typeof A=="string"&&!f[A]&&(f[A]=T),Object.keys(T).forEach(k=>{S(T[k])})}return S(l),S(c),f}var $t,da,ec,ha,tc,nc,Ft,rc,fa,kr,te,ic,oc,ac,sc,lc,Ar,pi,ma,cc,uc,ga,ya,pc,dc,ba,He,wa,hc,fc,vr,_e,Sa,Ta,mc,gc,yc,bc,wc,Sc,tn,di,ve,Tc,Ye,xc,kc,tr,xa,Ac,hi,Er,vc,Ec,_c,Rc,Oc,Ic,Cc,Pc,Mc,ka,Nc,Lc,fi,mi,Dc,Aa,Fc,gi,Uc,$c,va,yi,qc,qt,jc,Bc,zc,Vc,_r,Wc,Hc,Yc,Ea,_a,Et,tg,ng,rg,ig,og,ag,sg,lg,cg,ug,pg,dg,Jc,Gc,Rr,dn,rt,Kc,Xc,hg=i({"src/shared.js"(){$t=Object.create,da=Object.defineProperty,ec=Object.getOwnPropertyDescriptor,ha=Object.getOwnPropertyNames,tc=Object.getPrototypeOf,nc=Object.prototype.hasOwnProperty,Ft=(l,c)=>function(){return c||(0,l[ha(l)[0]])((c={exports:{}}).exports,c),c.exports},rc=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let T of ha(c))!nc.call(l,T)&&T!==f&&da(l,T,{get:()=>c[T],enumerable:!(S=ec(c,T))||S.enumerable});return l},fa=(l,c,f)=>(f=l!=null?$t(tc(l)):{},rc(c||!l||!l.__esModule?da(f,"default",{value:l,enumerable:!0}):f,l)),kr=Ft({"node_modules/ret/lib/types.js"(l,c){c.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}}}),te=Ft({"node_modules/ret/lib/sets.js"(l){var c=kr(),f=()=>[{type:c.RANGE,from:48,to:57}],S=()=>[{type:c.CHAR,value:95},{type:c.RANGE,from:97,to:122},{type:c.RANGE,from:65,to:90}].concat(f()),T=()=>[{type:c.CHAR,value:9},{type:c.CHAR,value:10},{type:c.CHAR,value:11},{type:c.CHAR,value:12},{type:c.CHAR,value:13},{type:c.CHAR,value:32},{type:c.CHAR,value:160},{type:c.CHAR,value:5760},{type:c.RANGE,from:8192,to:8202},{type:c.CHAR,value:8232},{type:c.CHAR,value:8233},{type:c.CHAR,value:8239},{type:c.CHAR,value:8287},{type:c.CHAR,value:12288},{type:c.CHAR,value:65279}],A=()=>[{type:c.CHAR,value:10},{type:c.CHAR,value:13},{type:c.CHAR,value:8232},{type:c.CHAR,value:8233}];l.words=()=>({type:c.SET,set:S(),not:!1}),l.notWords=()=>({type:c.SET,set:S(),not:!0}),l.ints=()=>({type:c.SET,set:f(),not:!1}),l.notInts=()=>({type:c.SET,set:f(),not:!0}),l.whitespace=()=>({type:c.SET,set:T(),not:!1}),l.notWhitespace=()=>({type:c.SET,set:T(),not:!0}),l.anyChar=()=>({type:c.SET,set:A(),not:!0})}}),ic=Ft({"node_modules/ret/lib/util.js"(l){var c=kr(),f=te(),S="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",T={0:0,t:9,n:10,v:11,f:12,r:13};l.strToChars=A=>{var k=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return A=A.replace(k,(L,Q,N,ie,j,he,ce,$e)=>{if(N)return L;var xe=Q?8:ie?parseInt(ie,16):j?parseInt(j,16):he?parseInt(he,8):ce?S.indexOf(ce):T[$e],Re=String.fromCharCode(xe);return/[[\]{}^$.|?*+()]/.test(Re)&&(Re="\\"+Re),Re}),A},l.tokenizeClass=(A,k)=>{for(var L=[],Q=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,N,ie;(N=Q.exec(A))!=null;)if(N[1])L.push(f.words());else if(N[2])L.push(f.ints());else if(N[3])L.push(f.whitespace());else if(N[4])L.push(f.notWords());else if(N[5])L.push(f.notInts());else if(N[6])L.push(f.notWhitespace());else if(N[7])L.push({type:c.RANGE,from:(N[8]||N[9]).charCodeAt(0),to:N[10].charCodeAt(0)});else if(ie=N[12])L.push({type:c.CHAR,value:ie.charCodeAt(0)});else return[L,Q.lastIndex];l.error(k,"Unterminated character class")},l.error=(A,k)=>{throw new SyntaxError("Invalid regular expression: /"+A+"/: "+k)}}}),oc=Ft({"node_modules/ret/lib/positions.js"(l){var c=kr();l.wordBoundary=()=>({type:c.POSITION,value:"b"}),l.nonWordBoundary=()=>({type:c.POSITION,value:"B"}),l.begin=()=>({type:c.POSITION,value:"^"}),l.end=()=>({type:c.POSITION,value:"$"})}}),ac=Ft({"node_modules/ret/lib/index.js"(l,c){var f=ic(),S=kr(),T=te(),A=oc();c.exports=k=>{var L=0,Q,N,ie={type:S.ROOT,stack:[]},j=ie,he=ie.stack,ce=[],$e=H=>{f.error(k,`Nothing to repeat at column ${H-1}`)},xe=f.strToChars(k);for(Q=xe.length;L<Q;)switch(N=xe[L++],N){case"\\":switch(N=xe[L++],N){case"b":he.push(A.wordBoundary());break;case"B":he.push(A.nonWordBoundary());break;case"w":he.push(T.words());break;case"W":he.push(T.notWords());break;case"d":he.push(T.ints());break;case"D":he.push(T.notInts());break;case"s":he.push(T.whitespace());break;case"S":he.push(T.notWhitespace());break;default:/\d/.test(N)?he.push({type:S.REFERENCE,value:parseInt(N,10)}):he.push({type:S.CHAR,value:N.charCodeAt(0)})}break;case"^":he.push(A.begin());break;case"$":he.push(A.end());break;case"[":{var Re;xe[L]==="^"?(Re=!0,L++):Re=!1;var Ge=f.tokenizeClass(xe.slice(L),k);L+=Ge[1],he.push({type:S.SET,set:Ge[0],not:Re});break}case".":he.push(T.anyChar());break;case"(":{var Qe={type:S.GROUP,stack:[],remember:!0};N=xe[L],N==="?"&&(N=xe[L+1],L+=2,N==="="?Qe.followedBy=!0:N==="!"?Qe.notFollowedBy=!0:N!==":"&&f.error(k,`Invalid group, character '${N}' after '?' at column ${L-1}`),Qe.remember=!1),he.push(Qe),ce.push(j),j=Qe,he=Qe.stack;break}case")":ce.length===0&&f.error(k,`Unmatched ) at column ${L-1}`),j=ce.pop(),he=j.options?j.options[j.options.length-1]:j.stack;break;case"|":{j.options||(j.options=[j.stack],delete j.stack);var oe=[];j.options.push(oe),he=oe;break}case"{":{var I=/^(\d+)(,(\d+)?)?\}/.exec(xe.slice(L)),C,V;I!==null?(he.length===0&&$e(L),C=parseInt(I[1],10),V=I[2]?I[3]?parseInt(I[3],10):1/0:C,L+=I[0].length,he.push({type:S.REPETITION,min:C,max:V,value:he.pop()})):he.push({type:S.CHAR,value:123});break}case"?":he.length===0&&$e(L),he.push({type:S.REPETITION,min:0,max:1,value:he.pop()});break;case"+":he.length===0&&$e(L),he.push({type:S.REPETITION,min:1,max:1/0,value:he.pop()});break;case"*":he.length===0&&$e(L),he.push({type:S.REPETITION,min:0,max:1/0,value:he.pop()});break;default:he.push({type:S.CHAR,value:N.charCodeAt(0)})}return ce.length!==0&&f.error(k,"Unterminated group"),ie},c.exports.types=S}}),sc=Ft({"node_modules/drange/lib/index.js"(l,c){var f=class or{constructor(A,k){this.low=A,this.high=k,this.length=1+k-A}overlaps(A){return!(this.high<A.low||this.low>A.high)}touches(A){return!(this.high+1<A.low||this.low-1>A.high)}add(A){return new or(Math.min(this.low,A.low),Math.max(this.high,A.high))}subtract(A){return A.low<=this.low&&A.high>=this.high?[]:A.low>this.low&&A.high<this.high?[new or(this.low,A.low-1),new or(A.high+1,this.high)]:A.low<=this.low?[new or(A.high+1,this.high)]:[new or(this.low,A.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},S=class Dr{constructor(A,k){this.ranges=[],this.length=0,A!=null&&this.add(A,k)}_update_length(){this.length=this.ranges.reduce((A,k)=>A+k.length,0)}add(A,k){var L=Q=>{for(var N=0;N<this.ranges.length&&!Q.touches(this.ranges[N]);)N++;for(var ie=this.ranges.slice(0,N);N<this.ranges.length&&Q.touches(this.ranges[N]);)Q=Q.add(this.ranges[N]),N++;ie.push(Q),this.ranges=ie.concat(this.ranges.slice(N)),this._update_length()};return A instanceof Dr?A.ranges.forEach(L):(k==null&&(k=A),L(new f(A,k))),this}subtract(A,k){var L=Q=>{for(var N=0;N<this.ranges.length&&!Q.overlaps(this.ranges[N]);)N++;for(var ie=this.ranges.slice(0,N);N<this.ranges.length&&Q.overlaps(this.ranges[N]);)ie=ie.concat(this.ranges[N].subtract(Q)),N++;this.ranges=ie.concat(this.ranges.slice(N)),this._update_length()};return A instanceof Dr?A.ranges.forEach(L):(k==null&&(k=A),L(new f(A,k))),this}intersect(A,k){var L=[],Q=N=>{for(var ie=0;ie<this.ranges.length&&!N.overlaps(this.ranges[ie]);)ie++;for(;ie<this.ranges.length&&N.overlaps(this.ranges[ie]);){var j=Math.max(this.ranges[ie].low,N.low),he=Math.min(this.ranges[ie].high,N.high);L.push(new f(j,he)),ie++}};return A instanceof Dr?A.ranges.forEach(Q):(k==null&&(k=A),Q(new f(A,k))),this.ranges=L,this._update_length(),this}index(A){for(var k=0;k<this.ranges.length&&this.ranges[k].length<=A;)A-=this.ranges[k].length,k++;return this.ranges[k].low+A}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Dr(this)}numbers(){return this.ranges.reduce((A,k)=>{for(var L=k.low;L<=k.high;)A.push(L),L++;return A},[])}subranges(){return this.ranges.map(A=>({low:A.low,high:A.high,length:1+A.high-A.low}))}};c.exports=S}}),lc=Ft({"node_modules/randexp/lib/randexp.js"(l,c){var f=ac(),S=sc(),T=f.types;c.exports=class Fr{constructor(k,L){if(this._setDefaults(k),k instanceof RegExp)this.ignoreCase=k.ignoreCase,this.multiline=k.multiline,k=k.source;else if(typeof k=="string")this.ignoreCase=L&&L.indexOf("i")!==-1,this.multiline=L&&L.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=f(k)}_setDefaults(k){this.max=k.max!=null?k.max:Fr.prototype.max!=null?Fr.prototype.max:100,this.defaultRange=k.defaultRange?k.defaultRange:this.defaultRange.clone(),k.randInt&&(this.randInt=k.randInt)}gen(){return this._gen(this.tokens,[])}_gen(k,L){var Q,N,ie,j,he;switch(k.type){case T.ROOT:case T.GROUP:if(k.followedBy||k.notFollowedBy)return"";for(k.remember&&k.groupNumber===void 0&&(k.groupNumber=L.push(null)-1),Q=k.options?this._randSelect(k.options):k.stack,N="",j=0,he=Q.length;j<he;j++)N+=this._gen(Q[j],L);return k.remember&&(L[k.groupNumber]=N),N;case T.POSITION:return"";case T.SET:{var ce=this._expand(k);return ce.length?String.fromCharCode(this._randSelect(ce)):""}case T.REPETITION:for(ie=this.randInt(k.min,k.max===1/0?k.min+this.max:k.max),N="",j=0;j<ie;j++)N+=this._gen(k.value,L);return N;case T.REFERENCE:return L[k.value-1]||"";case T.CHAR:{var $e=this.ignoreCase&&this._randBool()?this._toOtherCase(k.value):k.value;return String.fromCharCode($e)}}}_toOtherCase(k){return k+(97<=k&&k<=122?-32:65<=k&&k<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(k){return k instanceof S?k.index(this.randInt(0,k.length-1)):k[this.randInt(0,k.length-1)]}_expand(k){if(k.type===f.types.CHAR)return new S(k.value);if(k.type===f.types.RANGE)return new S(k.from,k.to);{let L=new S;for(let Q=0;Q<k.set.length;Q++){let N=this._expand(k.set[Q]);if(L.add(N),this.ignoreCase)for(let ie=0;ie<N.length;ie++){let j=N.index(ie),he=this._toOtherCase(j);j!==he&&L.add(he)}}return k.not?this.defaultRange.clone().subtract(L):this.defaultRange.clone().intersect(L)}}randInt(k,L){return k+Math.floor(Math.random()*(1+L-k))}get defaultRange(){return this._range=this._range||new S(32,126)}set defaultRange(k){this._range=k}static randexp(k,L){var Q;return typeof k=="string"&&(k=new RegExp(k,L)),k._randexp===void 0?(Q=new Fr(k,L),k._randexp=Q):(Q=k._randexp,Q._setDefaults(k)),Q.gen()}static sugar(){RegExp.prototype.gen=function(){return Fr.randexp(this)}}}}}),Ar=Ft({"node_modules/yaml/dist/PlainValue-ec8e588e.js"(l){var c={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},f={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},S="tag:yaml.org,2002:",T={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function A(oe){let I=[0],C=oe.indexOf(`
24
24
  `);for(;C!==-1;)C+=1,I.push(C),C=oe.indexOf(`
25
- `,C);return I}function k(oe){let I,C;return typeof oe=="string"?(I=v(oe),C=oe):(Array.isArray(oe)&&(oe=oe[0]),oe&&oe.context&&(oe.lineStarts||(oe.lineStarts=v(oe.context.src)),I=oe.lineStarts,C=oe.context.src)),{lineStarts:I,src:C}}function L(oe,I){if(typeof oe!="number"||oe<0)return null;let{lineStarts:C,src:V}=k(I);if(!C||!V||oe>V.length)return null;for(let K=0;K<C.length;++K){let z=C[K];if(oe<z)return{line:K,col:oe-C[K-1]+1};if(oe===z)return{line:K+1,col:1}}let W=C.length;return{line:W,col:oe-C[W-1]+1}}function Q(oe,I){let{lineStarts:C,src:V}=k(I);if(!C||!(oe>=1)||oe>C.length)return null;let W=C[oe-1],K=C[oe];for(;K&&K>W&&V[K-1]===`
26
- `;)--K;return V.slice(W,K)}function N({start:oe,end:I},C,V=80){let W=Q(oe.line,C);if(!W)return null;let{col:K}=oe;if(W.length>V)if(K<=V-10)W=W.substr(0,V-1)+"\u2026";else{let fe=Math.round(V/2);W.length>K+fe&&(W=W.substr(0,K+fe-1)+"\u2026"),K-=W.length-V,W="\u2026"+W.substr(1-V)}let z=1,Y="";I&&(I.line===oe.line&&K+(I.col-oe.col)<=V+1?z=I.col-oe.col:(z=Math.min(W.length+1,V)-K,Y="\u2026"));let G=K>1?" ".repeat(K-1):"",pe="^".repeat(z);return`${W}
27
- ${G}${pe}${Y}`}var ie=class Zc{static copy(I){return new Zc(I.start,I.end)}constructor(I,C){this.start=I,this.end=C||I}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(I,C){let{start:V,end:W}=this;if(I.length===0||W<=I[0])return this.origStart=V,this.origEnd=W,C;let K=C;for(;K<I.length&&!(I[K]>V);)++K;this.origStart=V+K;let z=K;for(;K<I.length&&!(I[K]>=W);)++K;return this.origEnd=W+K,z}},j=class gn{static addStringTerminator(I,C,V){if(V[V.length-1]===`
28
- `)return V;let W=gn.endOfWhiteSpace(I,C);return W>=I.length||I[W]===`
25
+ `,C);return I}function k(oe){let I,C;return typeof oe=="string"?(I=A(oe),C=oe):(Array.isArray(oe)&&(oe=oe[0]),oe&&oe.context&&(oe.lineStarts||(oe.lineStarts=A(oe.context.src)),I=oe.lineStarts,C=oe.context.src)),{lineStarts:I,src:C}}function L(oe,I){if(typeof oe!="number"||oe<0)return null;let{lineStarts:C,src:V}=k(I);if(!C||!V||oe>V.length)return null;for(let K=0;K<C.length;++K){let z=C[K];if(oe<z)return{line:K,col:oe-C[K-1]+1};if(oe===z)return{line:K+1,col:1}}let H=C.length;return{line:H,col:oe-C[H-1]+1}}function Q(oe,I){let{lineStarts:C,src:V}=k(I);if(!C||!(oe>=1)||oe>C.length)return null;let H=C[oe-1],K=C[oe];for(;K&&K>H&&V[K-1]===`
26
+ `;)--K;return V.slice(H,K)}function N({start:oe,end:I},C,V=80){let H=Q(oe.line,C);if(!H)return null;let{col:K}=oe;if(H.length>V)if(K<=V-10)H=H.substr(0,V-1)+"\u2026";else{let fe=Math.round(V/2);H.length>K+fe&&(H=H.substr(0,K+fe-1)+"\u2026"),K-=H.length-V,H="\u2026"+H.substr(1-V)}let z=1,Y="";I&&(I.line===oe.line&&K+(I.col-oe.col)<=V+1?z=I.col-oe.col:(z=Math.min(H.length+1,V)-K,Y="\u2026"));let G=K>1?" ".repeat(K-1):"",pe="^".repeat(z);return`${H}
27
+ ${G}${pe}${Y}`}var ie=class nu{static copy(I){return new nu(I.start,I.end)}constructor(I,C){this.start=I,this.end=C||I}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(I,C){let{start:V,end:H}=this;if(I.length===0||H<=I[0])return this.origStart=V,this.origEnd=H,C;let K=C;for(;K<I.length&&!(I[K]>V);)++K;this.origStart=V+K;let z=K;for(;K<I.length&&!(I[K]>=H);)++K;return this.origEnd=H+K,z}},j=class gn{static addStringTerminator(I,C,V){if(V[V.length-1]===`
28
+ `)return V;let H=gn.endOfWhiteSpace(I,C);return H>=I.length||I[H]===`
29
29
  `?V+`
30
- `:V}static atDocumentBoundary(I,C,V){let W=I[C];if(!W)return!0;let K=I[C-1];if(K&&K!==`
31
- `)return!1;if(V){if(W!==V)return!1}else if(W!==c.DIRECTIVES_END&&W!==c.DOCUMENT_END)return!1;let z=I[C+1],Y=I[C+2];if(z!==W||Y!==W)return!1;let G=I[C+3];return!G||G===`
32
- `||G===" "||G===" "}static endOfIdentifier(I,C){let V=I[C],W=V==="<",K=W?[`
30
+ `:V}static atDocumentBoundary(I,C,V){let H=I[C];if(!H)return!0;let K=I[C-1];if(K&&K!==`
31
+ `)return!1;if(V){if(H!==V)return!1}else if(H!==c.DIRECTIVES_END&&H!==c.DOCUMENT_END)return!1;let z=I[C+1],Y=I[C+2];if(z!==H||Y!==H)return!1;let G=I[C+3];return!G||G===`
32
+ `||G===" "||G===" "}static endOfIdentifier(I,C){let V=I[C],H=V==="<",K=H?[`
33
33
  `," "," ",">"]:[`
34
- `," "," ","[","]","{","}",","];for(;V&&K.indexOf(V)===-1;)V=I[C+=1];return W&&V===">"&&(C+=1),C}static endOfIndent(I,C){let V=I[C];for(;V===" ";)V=I[C+=1];return C}static endOfLine(I,C){let V=I[C];for(;V&&V!==`
34
+ `," "," ","[","]","{","}",","];for(;V&&K.indexOf(V)===-1;)V=I[C+=1];return H&&V===">"&&(C+=1),C}static endOfIndent(I,C){let V=I[C];for(;V===" ";)V=I[C+=1];return C}static endOfLine(I,C){let V=I[C];for(;V&&V!==`
35
35
  `;)V=I[C+=1];return C}static endOfWhiteSpace(I,C){let V=I[C];for(;V===" "||V===" ";)V=I[C+=1];return C}static startOfLine(I,C){let V=I[C-1];if(V===`
36
36
  `)return C;for(;V&&V!==`
37
- `;)V=I[C-=1];return C+1}static endOfBlockIndent(I,C,V){let W=gn.endOfIndent(I,V);if(W>V+C)return W;{let K=gn.endOfWhiteSpace(I,W),z=I[K];if(!z||z===`
38
- `)return K}return null}static atBlank(I,C,V){let W=I[C];return W===`
39
- `||W===" "||W===" "||V&&!W}static nextNodeIsIndented(I,C,V){return!I||C<0?!1:C>0?!0:V&&I==="-"}static normalizeOffset(I,C){let V=I[C];return V?V!==`
37
+ `;)V=I[C-=1];return C+1}static endOfBlockIndent(I,C,V){let H=gn.endOfIndent(I,V);if(H>V+C)return H;{let K=gn.endOfWhiteSpace(I,H),z=I[K];if(!z||z===`
38
+ `)return K}return null}static atBlank(I,C,V){let H=I[C];return H===`
39
+ `||H===" "||H===" "||V&&!H}static nextNodeIsIndented(I,C,V){return!I||C<0?!1:C>0?!0:V&&I==="-"}static normalizeOffset(I,C){let V=I[C];return V?V!==`
40
40
  `&&I[C-1]===`
41
- `?C-1:gn.endOfWhiteSpace(I,C):C}static foldNewline(I,C,V){let W=0,K=!1,z="",Y=I[C+1];for(;Y===" "||Y===" "||Y===`
41
+ `?C-1:gn.endOfWhiteSpace(I,C):C}static foldNewline(I,C,V){let H=0,K=!1,z="",Y=I[C+1];for(;Y===" "||Y===" "||Y===`
42
42
  `;){switch(Y){case`
43
- `:W=0,C+=1,z+=`
44
- `;break;case" ":W<=V&&(K=!0),C=gn.endOfWhiteSpace(I,C+2)-1;break;case" ":W+=1,C+=1;break}Y=I[C+1]}return z||(z=" "),Y&&W<=V&&(K=!0),{fold:z,offset:C,error:K}}constructor(I,C,V){Object.defineProperty(this,"context",{value:V||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=C||[],this.type=I,this.value=null}getPropValue(I,C,V){if(!this.context)return null;let{src:W}=this.context,K=this.props[I];return K&&W[K.start]===C?W.slice(K.start+(V?1:0),K.end):null}get anchor(){for(let I=0;I<this.props.length;++I){let C=this.getPropValue(I,c.ANCHOR,!0);if(C!=null)return C}return null}get comment(){let I=[];for(let C=0;C<this.props.length;++C){let V=this.getPropValue(C,c.COMMENT,!0);V!=null&&I.push(V)}return I.length>0?I.join(`
45
- `):null}commentHasRequiredWhitespace(I){let{src:C}=this.context;if(this.header&&I===this.header.end||!this.valueRange)return!1;let{end:V}=this.valueRange;return I!==V||gn.atBlank(C,V-1)}get hasComment(){if(this.context){let{src:I}=this.context;for(let C=0;C<this.props.length;++C)if(I[this.props[C].start]===c.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:I}=this.context;for(let C=0;C<this.props.length;++C)if(I[this.props[C].start]!==c.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[f.FLOW_MAP,f.FLOW_SEQ,f.QUOTE_DOUBLE,f.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let I=L(this.range.start,this.context.root);if(!I)return;let C=L(this.range.end,this.context.root);return{start:I,end:C}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:I,end:C}=this.valueRange;return this.context.src.slice(I,C)}get tag(){for(let I=0;I<this.props.length;++I){let C=this.getPropValue(I,c.TAG,!1);if(C!=null){if(C[1]==="<")return{verbatim:C.slice(2,-1)};{let[V,W,K]=C.match(/^(.*!)([^!]*)$/);return{handle:W,suffix:K}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:I,end:C}=this.valueRange,{src:V}=this.context;for(let W=I;W<C;++W)if(V[W]===`
46
- `)return!0;return!1}parseComment(I){let{src:C}=this.context;if(C[I]===c.COMMENT){let V=gn.endOfLine(C,I+1),W=new ie(I,V);return this.props.push(W),V}return I}setOrigRanges(I,C){return this.range&&(C=this.range.setOrigRange(I,C)),this.valueRange&&this.valueRange.setOrigRange(I,C),this.props.forEach(V=>V.setOrigRange(I,C)),C}toString(){let{context:{src:I},range:C,value:V}=this;if(V!=null)return V;let W=I.slice(C.start,C.end);return gn.addStringTerminator(I,C.end,W)}},he=class extends Error{constructor(oe,I,C){if(!C||!(I instanceof j))throw new Error(`Invalid arguments for new ${oe}`);super(),this.name=oe,this.message=C,this.source=I}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let oe=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new ie(this.offset,this.offset+1);let I=oe&&L(this.offset,oe);if(I){let C={line:I.line,col:I.col+1};this.linePos={start:I,end:C}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:I,col:C}=this.linePos.start;this.message+=` at line ${I}, column ${C}`;let V=oe&&N(this.linePos,oe);V&&(this.message+=`:
43
+ `:H=0,C+=1,z+=`
44
+ `;break;case" ":H<=V&&(K=!0),C=gn.endOfWhiteSpace(I,C+2)-1;break;case" ":H+=1,C+=1;break}Y=I[C+1]}return z||(z=" "),Y&&H<=V&&(K=!0),{fold:z,offset:C,error:K}}constructor(I,C,V){Object.defineProperty(this,"context",{value:V||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=C||[],this.type=I,this.value=null}getPropValue(I,C,V){if(!this.context)return null;let{src:H}=this.context,K=this.props[I];return K&&H[K.start]===C?H.slice(K.start+(V?1:0),K.end):null}get anchor(){for(let I=0;I<this.props.length;++I){let C=this.getPropValue(I,c.ANCHOR,!0);if(C!=null)return C}return null}get comment(){let I=[];for(let C=0;C<this.props.length;++C){let V=this.getPropValue(C,c.COMMENT,!0);V!=null&&I.push(V)}return I.length>0?I.join(`
45
+ `):null}commentHasRequiredWhitespace(I){let{src:C}=this.context;if(this.header&&I===this.header.end||!this.valueRange)return!1;let{end:V}=this.valueRange;return I!==V||gn.atBlank(C,V-1)}get hasComment(){if(this.context){let{src:I}=this.context;for(let C=0;C<this.props.length;++C)if(I[this.props[C].start]===c.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:I}=this.context;for(let C=0;C<this.props.length;++C)if(I[this.props[C].start]!==c.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[f.FLOW_MAP,f.FLOW_SEQ,f.QUOTE_DOUBLE,f.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let I=L(this.range.start,this.context.root);if(!I)return;let C=L(this.range.end,this.context.root);return{start:I,end:C}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:I,end:C}=this.valueRange;return this.context.src.slice(I,C)}get tag(){for(let I=0;I<this.props.length;++I){let C=this.getPropValue(I,c.TAG,!1);if(C!=null){if(C[1]==="<")return{verbatim:C.slice(2,-1)};{let[V,H,K]=C.match(/^(.*!)([^!]*)$/);return{handle:H,suffix:K}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:I,end:C}=this.valueRange,{src:V}=this.context;for(let H=I;H<C;++H)if(V[H]===`
46
+ `)return!0;return!1}parseComment(I){let{src:C}=this.context;if(C[I]===c.COMMENT){let V=gn.endOfLine(C,I+1),H=new ie(I,V);return this.props.push(H),V}return I}setOrigRanges(I,C){return this.range&&(C=this.range.setOrigRange(I,C)),this.valueRange&&this.valueRange.setOrigRange(I,C),this.props.forEach(V=>V.setOrigRange(I,C)),C}toString(){let{context:{src:I},range:C,value:V}=this;if(V!=null)return V;let H=I.slice(C.start,C.end);return gn.addStringTerminator(I,C.end,H)}},he=class extends Error{constructor(oe,I,C){if(!C||!(I instanceof j))throw new Error(`Invalid arguments for new ${oe}`);super(),this.name=oe,this.message=C,this.source=I}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let oe=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new ie(this.offset,this.offset+1);let I=oe&&L(this.offset,oe);if(I){let C={line:I.line,col:I.col+1};this.linePos={start:I,end:C}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:I,col:C}=this.linePos.start;this.message+=` at line ${I}, column ${C}`;let V=oe&&N(this.linePos,oe);V&&(this.message+=`:
47
47
 
48
48
  ${V}
49
- `)}delete this.source}},le=class extends he{constructor(oe,I){super("YAMLReferenceError",oe,I)}},$e=class extends he{constructor(oe,I){super("YAMLSemanticError",oe,I)}},xe=class extends he{constructor(oe,I){super("YAMLSyntaxError",oe,I)}},Oe=class extends he{constructor(oe,I){super("YAMLWarning",oe,I)}};function Ge(oe,I,C){return I in oe?Object.defineProperty(oe,I,{value:C,enumerable:!0,configurable:!0,writable:!0}):oe[I]=C,oe}var Qe=class Oa extends j{static endOfLine(I,C,V){let W=I[C],K=C;for(;W&&W!==`
50
- `&&!(V&&(W==="["||W==="]"||W==="{"||W==="}"||W===","));){let z=I[K+1];if(W===":"&&(!z||z===`
51
- `||z===" "||z===" "||V&&z===",")||(W===" "||W===" ")&&z==="#")break;K+=1,W=z}return K}get strValue(){if(!this.valueRange||!this.context)return null;let{start:I,end:C}=this.valueRange,{src:V}=this.context,W=V[C-1];for(;I<C&&(W===`
52
- `||W===" "||W===" ");)W=V[--C-1];let K="";for(let Y=I;Y<C;++Y){let G=V[Y];if(G===`
49
+ `)}delete this.source}},ce=class extends he{constructor(oe,I){super("YAMLReferenceError",oe,I)}},$e=class extends he{constructor(oe,I){super("YAMLSemanticError",oe,I)}},xe=class extends he{constructor(oe,I){super("YAMLSyntaxError",oe,I)}},Re=class extends he{constructor(oe,I){super("YAMLWarning",oe,I)}};function Ge(oe,I,C){return I in oe?Object.defineProperty(oe,I,{value:C,enumerable:!0,configurable:!0,writable:!0}):oe[I]=C,oe}var Qe=class Ca extends j{static endOfLine(I,C,V){let H=I[C],K=C;for(;H&&H!==`
50
+ `&&!(V&&(H==="["||H==="]"||H==="{"||H==="}"||H===","));){let z=I[K+1];if(H===":"&&(!z||z===`
51
+ `||z===" "||z===" "||V&&z===",")||(H===" "||H===" ")&&z==="#")break;K+=1,H=z}return K}get strValue(){if(!this.valueRange||!this.context)return null;let{start:I,end:C}=this.valueRange,{src:V}=this.context,H=V[C-1];for(;I<C&&(H===`
52
+ `||H===" "||H===" ");)H=V[--C-1];let K="";for(let Y=I;Y<C;++Y){let G=V[Y];if(G===`
53
53
  `){let{fold:pe,offset:fe}=j.foldNewline(V,Y,-1);K+=pe,Y=fe}else if(G===" "||G===" "){let pe=Y,fe=V[Y+1];for(;Y<C&&(fe===" "||fe===" ");)Y+=1,fe=V[Y+1];fe!==`
54
- `&&(K+=Y>pe?V.slice(pe,Y+1):G)}else K+=G}let z=V[I];switch(z){case" ":{let Y="Plain value cannot start with a tab character";return{errors:[new $e(this,Y)],str:K}}case"@":case"`":{let Y=`Plain value cannot start with reserved character ${z}`;return{errors:[new $e(this,Y)],str:K}}default:return K}}parseBlockValue(I){let{indent:C,inFlow:V,src:W}=this.context,K=I,z=I;for(let Y=W[K];Y===`
55
- `&&!j.atDocumentBoundary(W,K+1);Y=W[K]){let G=j.endOfBlockIndent(W,C,K+1);if(G===null||W[G]==="#")break;W[G]===`
56
- `?K=G:(z=Oa.endOfLine(W,G,V),K=z)}return this.valueRange.isEmpty()&&(this.valueRange.start=I),this.valueRange.end=z,z}parse(I,C){this.context=I;let{inFlow:V,src:W}=I,K=C,z=W[K];return z&&z!=="#"&&z!==`
57
- `&&(K=Oa.endOfLine(W,C,V)),this.valueRange=new ie(C,K),K=j.endOfWhiteSpace(W,K),K=this.parseComment(K),(!this.hasComment||this.valueRange.isEmpty())&&(K=this.parseBlockValue(K)),K}};l.Char=c,l.Node=j,l.PlainValue=Qe,l.Range=ie,l.Type=f,l.YAMLError=he,l.YAMLReferenceError=le,l.YAMLSemanticError=$e,l.YAMLSyntaxError=xe,l.YAMLWarning=Oe,l._defineProperty=Ge,l.defaultTagPrefix=S,l.defaultTags=T}}),ci=Ft({"node_modules/yaml/dist/resolveSeq-d03cb037.js"(l){var c=kr();function f(b,m,w){return w?`#${w.replace(/[\s\S]^/gm,`$&${m}#`)}
54
+ `&&(K+=Y>pe?V.slice(pe,Y+1):G)}else K+=G}let z=V[I];switch(z){case" ":{let Y="Plain value cannot start with a tab character";return{errors:[new $e(this,Y)],str:K}}case"@":case"`":{let Y=`Plain value cannot start with reserved character ${z}`;return{errors:[new $e(this,Y)],str:K}}default:return K}}parseBlockValue(I){let{indent:C,inFlow:V,src:H}=this.context,K=I,z=I;for(let Y=H[K];Y===`
55
+ `&&!j.atDocumentBoundary(H,K+1);Y=H[K]){let G=j.endOfBlockIndent(H,C,K+1);if(G===null||H[G]==="#")break;H[G]===`
56
+ `?K=G:(z=Ca.endOfLine(H,G,V),K=z)}return this.valueRange.isEmpty()&&(this.valueRange.start=I),this.valueRange.end=z,z}parse(I,C){this.context=I;let{inFlow:V,src:H}=I,K=C,z=H[K];return z&&z!=="#"&&z!==`
57
+ `&&(K=Ca.endOfLine(H,C,V)),this.valueRange=new ie(C,K),K=j.endOfWhiteSpace(H,K),K=this.parseComment(K),(!this.hasComment||this.valueRange.isEmpty())&&(K=this.parseBlockValue(K)),K}};l.Char=c,l.Node=j,l.PlainValue=Qe,l.Range=ie,l.Type=f,l.YAMLError=he,l.YAMLReferenceError=ce,l.YAMLSemanticError=$e,l.YAMLSyntaxError=xe,l.YAMLWarning=Re,l._defineProperty=Ge,l.defaultTagPrefix=S,l.defaultTags=T}}),pi=Ft({"node_modules/yaml/dist/resolveSeq-d03cb037.js"(l){var c=Ar();function f(b,m,w){return w?`#${w.replace(/[\s\S]^/gm,`$&${m}#`)}
58
58
  ${m}${b}`:b}function S(b,m,w){return w?w.indexOf(`
59
59
  `)===-1?`${b} #${w}`:`${b}
60
- `+w.replace(/^/gm,`${m||""}#`):b}var T=class{};function v(b,m,w){if(Array.isArray(b))return b.map((x,O)=>v(x,String(O),w));if(b&&typeof b.toJSON=="function"){let x=w&&w.anchors&&w.anchors.get(b);x&&(w.onCreate=R=>{x.res=R,delete w.onCreate});let O=b.toJSON(m,w);return x&&w.onCreate&&w.onCreate(O),O}return(!w||!w.keep)&&typeof b=="bigint"?Number(b):b}var k=class extends T{constructor(b){super(),this.value=b}toJSON(b,m){return m&&m.keep?this.value:v(this.value,b,m)}toString(){return String(this.value)}};function L(b,m,w){let x=w;for(let O=m.length-1;O>=0;--O){let R=m[O];if(Number.isInteger(R)&&R>=0){let D=[];D[R]=x,x=D}else{let D={};Object.defineProperty(D,R,{value:x,writable:!0,enumerable:!0,configurable:!0}),x=D}}return b.createNode(x,!1)}var Q=b=>b==null||typeof b=="object"&&b[Symbol.iterator]().next().done,N=class jn extends T{constructor(m){super(),c._defineProperty(this,"items",[]),this.schema=m}addIn(m,w){if(Q(m))this.add(w);else{let[x,...O]=m,R=this.get(x,!0);if(R instanceof jn)R.addIn(O,w);else if(R===void 0&&this.schema)this.set(x,L(this.schema,O,w));else throw new Error(`Expected YAML collection at ${x}. Remaining path: ${O}`)}}deleteIn([m,...w]){if(w.length===0)return this.delete(m);let x=this.get(m,!0);if(x instanceof jn)return x.deleteIn(w);throw new Error(`Expected YAML collection at ${m}. Remaining path: ${w}`)}getIn([m,...w],x){let O=this.get(m,!0);return w.length===0?!x&&O instanceof k?O.value:O:O instanceof jn?O.getIn(w,x):void 0}hasAllNullValues(){return this.items.every(m=>{if(!m||m.type!=="PAIR")return!1;let w=m.value;return w==null||w instanceof k&&w.value==null&&!w.commentBefore&&!w.comment&&!w.tag})}hasIn([m,...w]){if(w.length===0)return this.has(m);let x=this.get(m,!0);return x instanceof jn?x.hasIn(w):!1}setIn([m,...w],x){if(w.length===0)this.set(m,x);else{let O=this.get(m,!0);if(O instanceof jn)O.setIn(w,x);else if(O===void 0&&this.schema)this.set(m,L(this.schema,w,x));else throw new Error(`Expected YAML collection at ${m}. Remaining path: ${w}`)}}toJSON(){return null}toString(m,{blockItem:w,flowChars:x,isMap:O,itemIndent:R},D,F){let{indent:H,indentStep:X,stringify:de}=m,be=this.type===c.Type.FLOW_MAP||this.type===c.Type.FLOW_SEQ||m.inFlow;be&&(R+=X);let nt=O&&this.hasAllNullValues();m=Object.assign({},m,{allNullValues:nt,indent:R,inFlow:be,type:null});let Ne=!1,Ze=!1,Fe=this.items.reduce((gt,Ve,at)=>{let Je;Ve&&(!Ne&&Ve.spaceBefore&&gt.push({type:"comment",str:""}),Ve.commentBefore&&Ve.commentBefore.match(/^.*$/gm).forEach(vg=>{gt.push({type:"comment",str:`#${vg}`})}),Ve.comment&&(Je=Ve.comment),be&&(!Ne&&Ve.spaceBefore||Ve.commentBefore||Ve.comment||Ve.key&&(Ve.key.commentBefore||Ve.key.comment)||Ve.value&&(Ve.value.commentBefore||Ve.value.comment))&&(Ze=!0)),Ne=!1;let _t=de(Ve,m,()=>Je=null,()=>Ne=!0);return be&&!Ze&&_t.includes(`
61
- `)&&(Ze=!0),be&&at<this.items.length-1&&(_t+=","),_t=S(_t,R,Je),Ne&&(Je||be)&&(Ne=!1),gt.push({type:"item",str:_t}),gt},[]),Ke;if(Fe.length===0)Ke=x.start+x.end;else if(be){let{start:gt,end:Ve}=x,at=Fe.map(Je=>Je.str);if(Ze||at.reduce((Je,_t)=>Je+_t.length+2,2)>jn.maxFlowStringSingleLineLength){Ke=gt;for(let Je of at)Ke+=Je?`
62
- ${X}${H}${Je}`:`
60
+ `+w.replace(/^/gm,`${m||""}#`):b}var T=class{};function A(b,m,w){if(Array.isArray(b))return b.map((x,R)=>A(x,String(R),w));if(b&&typeof b.toJSON=="function"){let x=w&&w.anchors&&w.anchors.get(b);x&&(w.onCreate=O=>{x.res=O,delete w.onCreate});let R=b.toJSON(m,w);return x&&w.onCreate&&w.onCreate(R),R}return(!w||!w.keep)&&typeof b=="bigint"?Number(b):b}var k=class extends T{constructor(b){super(),this.value=b}toJSON(b,m){return m&&m.keep?this.value:A(this.value,b,m)}toString(){return String(this.value)}};function L(b,m,w){let x=w;for(let R=m.length-1;R>=0;--R){let O=m[R];if(Number.isInteger(O)&&O>=0){let D=[];D[O]=x,x=D}else{let D={};Object.defineProperty(D,O,{value:x,writable:!0,enumerable:!0,configurable:!0}),x=D}}return b.createNode(x,!1)}var Q=b=>b==null||typeof b=="object"&&b[Symbol.iterator]().next().done,N=class jn extends T{constructor(m){super(),c._defineProperty(this,"items",[]),this.schema=m}addIn(m,w){if(Q(m))this.add(w);else{let[x,...R]=m,O=this.get(x,!0);if(O instanceof jn)O.addIn(R,w);else if(O===void 0&&this.schema)this.set(x,L(this.schema,R,w));else throw new Error(`Expected YAML collection at ${x}. Remaining path: ${R}`)}}deleteIn([m,...w]){if(w.length===0)return this.delete(m);let x=this.get(m,!0);if(x instanceof jn)return x.deleteIn(w);throw new Error(`Expected YAML collection at ${m}. Remaining path: ${w}`)}getIn([m,...w],x){let R=this.get(m,!0);return w.length===0?!x&&R instanceof k?R.value:R:R instanceof jn?R.getIn(w,x):void 0}hasAllNullValues(){return this.items.every(m=>{if(!m||m.type!=="PAIR")return!1;let w=m.value;return w==null||w instanceof k&&w.value==null&&!w.commentBefore&&!w.comment&&!w.tag})}hasIn([m,...w]){if(w.length===0)return this.has(m);let x=this.get(m,!0);return x instanceof jn?x.hasIn(w):!1}setIn([m,...w],x){if(w.length===0)this.set(m,x);else{let R=this.get(m,!0);if(R instanceof jn)R.setIn(w,x);else if(R===void 0&&this.schema)this.set(m,L(this.schema,w,x));else throw new Error(`Expected YAML collection at ${m}. Remaining path: ${w}`)}}toJSON(){return null}toString(m,{blockItem:w,flowChars:x,isMap:R,itemIndent:O},D,F){let{indent:W,indentStep:X,stringify:de}=m,be=this.type===c.Type.FLOW_MAP||this.type===c.Type.FLOW_SEQ||m.inFlow;be&&(O+=X);let nt=R&&this.hasAllNullValues();m=Object.assign({},m,{allNullValues:nt,indent:O,inFlow:be,type:null});let Ne=!1,Ze=!1,Fe=this.items.reduce((gt,Ve,at)=>{let Je;Ve&&(!Ne&&Ve.spaceBefore&&gt.push({type:"comment",str:""}),Ve.commentBefore&&Ve.commentBefore.match(/^.*$/gm).forEach(_g=>{gt.push({type:"comment",str:`#${_g}`})}),Ve.comment&&(Je=Ve.comment),be&&(!Ne&&Ve.spaceBefore||Ve.commentBefore||Ve.comment||Ve.key&&(Ve.key.commentBefore||Ve.key.comment)||Ve.value&&(Ve.value.commentBefore||Ve.value.comment))&&(Ze=!0)),Ne=!1;let _t=de(Ve,m,()=>Je=null,()=>Ne=!0);return be&&!Ze&&_t.includes(`
61
+ `)&&(Ze=!0),be&&at<this.items.length-1&&(_t+=","),_t=S(_t,O,Je),Ne&&(Je||be)&&(Ne=!1),gt.push({type:"item",str:_t}),gt},[]),Ke;if(Fe.length===0)Ke=x.start+x.end;else if(be){let{start:gt,end:Ve}=x,at=Fe.map(Je=>Je.str);if(Ze||at.reduce((Je,_t)=>Je+_t.length+2,2)>jn.maxFlowStringSingleLineLength){Ke=gt;for(let Je of at)Ke+=Je?`
62
+ ${X}${W}${Je}`:`
63
63
  `;Ke+=`
64
- ${H}${Ve}`}else Ke=`${gt} ${at.join(" ")} ${Ve}`}else{let gt=Fe.map(w);Ke=gt.shift();for(let Ve of gt)Ke+=Ve?`
65
- ${H}${Ve}`:`
64
+ ${W}${Ve}`}else Ke=`${gt} ${at.join(" ")} ${Ve}`}else{let gt=Fe.map(w);Ke=gt.shift();for(let Ve of gt)Ke+=Ve?`
65
+ ${W}${Ve}`:`
66
66
  `}return this.comment?(Ke+=`
67
- `+this.comment.replace(/^/gm,`${H}#`),D&&D()):Ne&&F&&F(),Ke}};c._defineProperty(N,"maxFlowStringSingleLineLength",60);function ie(b){let m=b instanceof k?b.value:b;return m&&typeof m=="string"&&(m=Number(m)),Number.isInteger(m)&&m>=0?m:null}var j=class extends N{add(b){this.items.push(b)}delete(b){let m=ie(b);return typeof m!="number"?!1:this.items.splice(m,1).length>0}get(b,m){let w=ie(b);if(typeof w!="number")return;let x=this.items[w];return!m&&x instanceof k?x.value:x}has(b){let m=ie(b);return typeof m=="number"&&m<this.items.length}set(b,m){let w=ie(b);if(typeof w!="number")throw new Error(`Expected a valid index, not ${b}.`);this.items[w]=m}toJSON(b,m){let w=[];m&&m.onCreate&&m.onCreate(w);let x=0;for(let O of this.items)w.push(v(O,String(x++),m));return w}toString(b,m,w){return b?super.toString(b,{blockItem:x=>x.type==="comment"?x.str:`- ${x.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(b.indent||"")+" "},m,w):JSON.stringify(this)}},he=(b,m,w)=>m===null?"":typeof m!="object"?String(m):b instanceof T&&w&&w.doc?b.toString({anchors:Object.create(null),doc:w.doc,indent:"",indentStep:w.indentStep,inFlow:!0,inStringifyKey:!0,stringify:w.stringify}):JSON.stringify(m),le=class eu extends T{constructor(m,w=null){super(),this.key=m,this.value=w,this.type=eu.Type.PAIR}get commentBefore(){return this.key instanceof T?this.key.commentBefore:void 0}set commentBefore(m){if(this.key==null&&(this.key=new k(null)),this.key instanceof T)this.key.commentBefore=m;else{let w="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(w)}}addToJSMap(m,w){let x=v(this.key,"",m);if(w instanceof Map){let O=v(this.value,x,m);w.set(x,O)}else if(w instanceof Set)w.add(x);else{let O=he(this.key,x,m),R=v(this.value,O,m);O in w?Object.defineProperty(w,O,{value:R,writable:!0,enumerable:!0,configurable:!0}):w[O]=R}return w}toJSON(m,w){let x=w&&w.mapAsMap?new Map:{};return this.addToJSMap(w,x)}toString(m,w,x){if(!m||!m.doc)return JSON.stringify(this);let{indent:O,indentSeq:R,simpleKeys:D}=m.doc.options,{key:F,value:H}=this,X=F instanceof T&&F.comment;if(D){if(X)throw new Error("With simple keys, key nodes cannot have comments");if(F instanceof N){let _t="With simple keys, collection cannot be used as a key value";throw new Error(_t)}}let de=!D&&(!F||X||(F instanceof T?F instanceof N||F.type===c.Type.BLOCK_FOLDED||F.type===c.Type.BLOCK_LITERAL:typeof F=="object")),{doc:be,indent:nt,indentStep:Ne,stringify:Ze}=m;m=Object.assign({},m,{implicitKey:!de,indent:nt+Ne});let Fe=!1,Ke=Ze(F,m,()=>X=null,()=>Fe=!0);if(Ke=S(Ke,m.indent,X),!de&&Ke.length>1024){if(D)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");de=!0}if(m.allNullValues&&!D)return this.comment?(Ke=S(Ke,m.indent,this.comment),w&&w()):Fe&&!X&&x&&x(),m.inFlow&&!de?Ke:`? ${Ke}`;Ke=de?`? ${Ke}
68
- ${nt}:`:`${Ke}:`,this.comment&&(Ke=S(Ke,m.indent,this.comment),w&&w());let gt="",Ve=null;if(H instanceof T){if(H.spaceBefore&&(gt=`
69
- `),H.commentBefore){let _t=H.commentBefore.replace(/^/gm,`${m.indent}#`);gt+=`
70
- ${_t}`}Ve=H.comment}else H&&typeof H=="object"&&(H=be.schema.createNode(H,!0));m.implicitKey=!1,!de&&!this.comment&&H instanceof k&&(m.indentAtStart=Ke.length+1),Fe=!1,!R&&O>=2&&!m.inFlow&&!de&&H instanceof j&&H.type!==c.Type.FLOW_SEQ&&!H.tag&&!be.anchors.getName(H)&&(m.indent=m.indent.substr(2));let at=Ze(H,m,()=>Ve=null,()=>Fe=!0),Je=" ";return gt||this.comment?Je=`${gt}
71
- ${m.indent}`:!de&&H instanceof N?(!(at[0]==="["||at[0]==="{")||at.includes(`
67
+ `+this.comment.replace(/^/gm,`${W}#`),D&&D()):Ne&&F&&F(),Ke}};c._defineProperty(N,"maxFlowStringSingleLineLength",60);function ie(b){let m=b instanceof k?b.value:b;return m&&typeof m=="string"&&(m=Number(m)),Number.isInteger(m)&&m>=0?m:null}var j=class extends N{add(b){this.items.push(b)}delete(b){let m=ie(b);return typeof m!="number"?!1:this.items.splice(m,1).length>0}get(b,m){let w=ie(b);if(typeof w!="number")return;let x=this.items[w];return!m&&x instanceof k?x.value:x}has(b){let m=ie(b);return typeof m=="number"&&m<this.items.length}set(b,m){let w=ie(b);if(typeof w!="number")throw new Error(`Expected a valid index, not ${b}.`);this.items[w]=m}toJSON(b,m){let w=[];m&&m.onCreate&&m.onCreate(w);let x=0;for(let R of this.items)w.push(A(R,String(x++),m));return w}toString(b,m,w){return b?super.toString(b,{blockItem:x=>x.type==="comment"?x.str:`- ${x.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(b.indent||"")+" "},m,w):JSON.stringify(this)}},he=(b,m,w)=>m===null?"":typeof m!="object"?String(m):b instanceof T&&w&&w.doc?b.toString({anchors:Object.create(null),doc:w.doc,indent:"",indentStep:w.indentStep,inFlow:!0,inStringifyKey:!0,stringify:w.stringify}):JSON.stringify(m),ce=class ru extends T{constructor(m,w=null){super(),this.key=m,this.value=w,this.type=ru.Type.PAIR}get commentBefore(){return this.key instanceof T?this.key.commentBefore:void 0}set commentBefore(m){if(this.key==null&&(this.key=new k(null)),this.key instanceof T)this.key.commentBefore=m;else{let w="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(w)}}addToJSMap(m,w){let x=A(this.key,"",m);if(w instanceof Map){let R=A(this.value,x,m);w.set(x,R)}else if(w instanceof Set)w.add(x);else{let R=he(this.key,x,m),O=A(this.value,R,m);R in w?Object.defineProperty(w,R,{value:O,writable:!0,enumerable:!0,configurable:!0}):w[R]=O}return w}toJSON(m,w){let x=w&&w.mapAsMap?new Map:{};return this.addToJSMap(w,x)}toString(m,w,x){if(!m||!m.doc)return JSON.stringify(this);let{indent:R,indentSeq:O,simpleKeys:D}=m.doc.options,{key:F,value:W}=this,X=F instanceof T&&F.comment;if(D){if(X)throw new Error("With simple keys, key nodes cannot have comments");if(F instanceof N){let _t="With simple keys, collection cannot be used as a key value";throw new Error(_t)}}let de=!D&&(!F||X||(F instanceof T?F instanceof N||F.type===c.Type.BLOCK_FOLDED||F.type===c.Type.BLOCK_LITERAL:typeof F=="object")),{doc:be,indent:nt,indentStep:Ne,stringify:Ze}=m;m=Object.assign({},m,{implicitKey:!de,indent:nt+Ne});let Fe=!1,Ke=Ze(F,m,()=>X=null,()=>Fe=!0);if(Ke=S(Ke,m.indent,X),!de&&Ke.length>1024){if(D)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");de=!0}if(m.allNullValues&&!D)return this.comment?(Ke=S(Ke,m.indent,this.comment),w&&w()):Fe&&!X&&x&&x(),m.inFlow&&!de?Ke:`? ${Ke}`;Ke=de?`? ${Ke}
68
+ ${nt}:`:`${Ke}:`,this.comment&&(Ke=S(Ke,m.indent,this.comment),w&&w());let gt="",Ve=null;if(W instanceof T){if(W.spaceBefore&&(gt=`
69
+ `),W.commentBefore){let _t=W.commentBefore.replace(/^/gm,`${m.indent}#`);gt+=`
70
+ ${_t}`}Ve=W.comment}else W&&typeof W=="object"&&(W=be.schema.createNode(W,!0));m.implicitKey=!1,!de&&!this.comment&&W instanceof k&&(m.indentAtStart=Ke.length+1),Fe=!1,!O&&R>=2&&!m.inFlow&&!de&&W instanceof j&&W.type!==c.Type.FLOW_SEQ&&!W.tag&&!be.anchors.getName(W)&&(m.indent=m.indent.substr(2));let at=Ze(W,m,()=>Ve=null,()=>Fe=!0),Je=" ";return gt||this.comment?Je=`${gt}
71
+ ${m.indent}`:!de&&W instanceof N?(!(at[0]==="["||at[0]==="{")||at.includes(`
72
72
  `))&&(Je=`
73
73
  ${m.indent}`):at[0]===`
74
- `&&(Je=""),Fe&&!Ve&&x&&x(),S(Ke+Je+at,m.indent,Ve)}};c._defineProperty(le,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var $e=(b,m)=>{if(b instanceof xe){let w=m.get(b.source);return w.count*w.aliasCount}else if(b instanceof N){let w=0;for(let x of b.items){let O=$e(x,m);O>w&&(w=O)}return w}else if(b instanceof le){let w=$e(b.key,m),x=$e(b.value,m);return Math.max(w,x)}return 1},xe=class tu extends T{static stringify({range:m,source:w},{anchors:x,doc:O,implicitKey:R,inStringifyKey:D}){let F=Object.keys(x).find(X=>x[X]===w);if(!F&&D&&(F=O.anchors.getName(w)||O.anchors.newName()),F)return`*${F}${R?" ":""}`;let H=O.anchors.getName(w)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${H} [${m}]`)}constructor(m){super(),this.source=m,this.type=c.Type.ALIAS}set tag(m){throw new Error("Alias nodes cannot have tags")}toJSON(m,w){if(!w)return v(this.source,m,w);let{anchors:x,maxAliasCount:O}=w,R=x.get(this.source);if(!R||R.res===void 0){let D="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new c.YAMLReferenceError(this.cstNode,D):new ReferenceError(D)}if(O>=0&&(R.count+=1,R.aliasCount===0&&(R.aliasCount=$e(this.source,x)),R.count*R.aliasCount>O)){let D="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new c.YAMLReferenceError(this.cstNode,D):new ReferenceError(D)}return R.res}toString(m){return tu.stringify(this,m)}};c._defineProperty(xe,"default",!0);function Oe(b,m){let w=m instanceof k?m.value:m;for(let x of b)if(x instanceof le&&(x.key===m||x.key===w||x.key&&x.key.value===w))return x}var Ge=class extends N{add(b,m){b?b instanceof le||(b=new le(b.key||b,b.value)):b=new le(b);let w=Oe(this.items,b.key),x=this.schema&&this.schema.sortMapEntries;if(w)if(m)w.value=b.value;else throw new Error(`Key ${b.key} already set`);else if(x){let O=this.items.findIndex(R=>x(b,R)<0);O===-1?this.items.push(b):this.items.splice(O,0,b)}else this.items.push(b)}delete(b){let m=Oe(this.items,b);return m?this.items.splice(this.items.indexOf(m),1).length>0:!1}get(b,m){let w=Oe(this.items,b),x=w&&w.value;return!m&&x instanceof k?x.value:x}has(b){return!!Oe(this.items,b)}set(b,m){this.add(new le(b,m),!0)}toJSON(b,m,w){let x=w?new w:m&&m.mapAsMap?new Map:{};m&&m.onCreate&&m.onCreate(x);for(let O of this.items)O.addToJSMap(m,x);return x}toString(b,m,w){if(!b)return JSON.stringify(this);for(let x of this.items)if(!(x instanceof le))throw new Error(`Map items must all be pairs; found ${JSON.stringify(x)} instead`);return super.toString(b,{blockItem:x=>x.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:b.indent||""},m,w)}},Qe="<<",oe=class extends le{constructor(b){if(b instanceof le){let m=b.value;m instanceof j||(m=new j,m.items.push(b.value),m.range=b.value.range),super(b.key,m),this.range=b.range}else super(new k(Qe),new j);this.type=le.Type.MERGE_PAIR}addToJSMap(b,m){for(let{source:w}of this.value.items){if(!(w instanceof Ge))throw new Error("Merge sources must be maps");let x=w.toJSON(null,b,Map);for(let[O,R]of x)m instanceof Map?m.has(O)||m.set(O,R):m instanceof Set?m.add(O):Object.prototype.hasOwnProperty.call(m,O)||Object.defineProperty(m,O,{value:R,writable:!0,enumerable:!0,configurable:!0})}return m}toString(b,m){let w=this.value;if(w.items.length>1)return super.toString(b,m);this.value=w.items[0];let x=super.toString(b,m);return this.value=w,x}},I={defaultType:c.Type.BLOCK_LITERAL,lineWidth:76},C={trueStr:"true",falseStr:"false"},V={asBigInt:!1},W={nullStr:"null"},K={defaultType:c.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function z(b,m,w){for(let{format:x,test:O,resolve:R}of m)if(O){let D=b.match(O);if(D){let F=R.apply(null,D);return F instanceof k||(F=new k(F)),x&&(F.format=x),F}}return w&&(b=w(b)),new k(b)}var Y="flow",G="block",pe="quoted",fe=(b,m)=>{let w=b[m+1];for(;w===" "||w===" ";){do w=b[m+=1];while(w&&w!==`
75
- `);w=b[m+1]}return m};function Ee(b,m,w,{indentAtStart:x,lineWidth:O=80,minContentWidth:R=20,onFold:D,onOverflow:F}){if(!O||O<0)return b;let H=Math.max(1+R,1+O-m.length);if(b.length<=H)return b;let X=[],de={},be=O-m.length;typeof x=="number"&&(x>O-Math.max(2,R)?X.push(0):be=O-x);let nt,Ne,Ze=!1,Fe=-1,Ke=-1,gt=-1;w===G&&(Fe=fe(b,Fe),Fe!==-1&&(be=Fe+H));for(let at;at=b[Fe+=1];){if(w===pe&&at==="\\"){switch(Ke=Fe,b[Fe+1]){case"x":Fe+=3;break;case"u":Fe+=5;break;case"U":Fe+=9;break;default:Fe+=1}gt=Fe}if(at===`
76
- `)w===G&&(Fe=fe(b,Fe)),be=Fe+H,nt=void 0;else{if(at===" "&&Ne&&Ne!==" "&&Ne!==`
74
+ `&&(Je=""),Fe&&!Ve&&x&&x(),S(Ke+Je+at,m.indent,Ve)}};c._defineProperty(ce,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var $e=(b,m)=>{if(b instanceof xe){let w=m.get(b.source);return w.count*w.aliasCount}else if(b instanceof N){let w=0;for(let x of b.items){let R=$e(x,m);R>w&&(w=R)}return w}else if(b instanceof ce){let w=$e(b.key,m),x=$e(b.value,m);return Math.max(w,x)}return 1},xe=class iu extends T{static stringify({range:m,source:w},{anchors:x,doc:R,implicitKey:O,inStringifyKey:D}){let F=Object.keys(x).find(X=>x[X]===w);if(!F&&D&&(F=R.anchors.getName(w)||R.anchors.newName()),F)return`*${F}${O?" ":""}`;let W=R.anchors.getName(w)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${W} [${m}]`)}constructor(m){super(),this.source=m,this.type=c.Type.ALIAS}set tag(m){throw new Error("Alias nodes cannot have tags")}toJSON(m,w){if(!w)return A(this.source,m,w);let{anchors:x,maxAliasCount:R}=w,O=x.get(this.source);if(!O||O.res===void 0){let D="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new c.YAMLReferenceError(this.cstNode,D):new ReferenceError(D)}if(R>=0&&(O.count+=1,O.aliasCount===0&&(O.aliasCount=$e(this.source,x)),O.count*O.aliasCount>R)){let D="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new c.YAMLReferenceError(this.cstNode,D):new ReferenceError(D)}return O.res}toString(m){return iu.stringify(this,m)}};c._defineProperty(xe,"default",!0);function Re(b,m){let w=m instanceof k?m.value:m;for(let x of b)if(x instanceof ce&&(x.key===m||x.key===w||x.key&&x.key.value===w))return x}var Ge=class extends N{add(b,m){b?b instanceof ce||(b=new ce(b.key||b,b.value)):b=new ce(b);let w=Re(this.items,b.key),x=this.schema&&this.schema.sortMapEntries;if(w)if(m)w.value=b.value;else throw new Error(`Key ${b.key} already set`);else if(x){let R=this.items.findIndex(O=>x(b,O)<0);R===-1?this.items.push(b):this.items.splice(R,0,b)}else this.items.push(b)}delete(b){let m=Re(this.items,b);return m?this.items.splice(this.items.indexOf(m),1).length>0:!1}get(b,m){let w=Re(this.items,b),x=w&&w.value;return!m&&x instanceof k?x.value:x}has(b){return!!Re(this.items,b)}set(b,m){this.add(new ce(b,m),!0)}toJSON(b,m,w){let x=w?new w:m&&m.mapAsMap?new Map:{};m&&m.onCreate&&m.onCreate(x);for(let R of this.items)R.addToJSMap(m,x);return x}toString(b,m,w){if(!b)return JSON.stringify(this);for(let x of this.items)if(!(x instanceof ce))throw new Error(`Map items must all be pairs; found ${JSON.stringify(x)} instead`);return super.toString(b,{blockItem:x=>x.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:b.indent||""},m,w)}},Qe="<<",oe=class extends ce{constructor(b){if(b instanceof ce){let m=b.value;m instanceof j||(m=new j,m.items.push(b.value),m.range=b.value.range),super(b.key,m),this.range=b.range}else super(new k(Qe),new j);this.type=ce.Type.MERGE_PAIR}addToJSMap(b,m){for(let{source:w}of this.value.items){if(!(w instanceof Ge))throw new Error("Merge sources must be maps");let x=w.toJSON(null,b,Map);for(let[R,O]of x)m instanceof Map?m.has(R)||m.set(R,O):m instanceof Set?m.add(R):Object.prototype.hasOwnProperty.call(m,R)||Object.defineProperty(m,R,{value:O,writable:!0,enumerable:!0,configurable:!0})}return m}toString(b,m){let w=this.value;if(w.items.length>1)return super.toString(b,m);this.value=w.items[0];let x=super.toString(b,m);return this.value=w,x}},I={defaultType:c.Type.BLOCK_LITERAL,lineWidth:76},C={trueStr:"true",falseStr:"false"},V={asBigInt:!1},H={nullStr:"null"},K={defaultType:c.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function z(b,m,w){for(let{format:x,test:R,resolve:O}of m)if(R){let D=b.match(R);if(D){let F=O.apply(null,D);return F instanceof k||(F=new k(F)),x&&(F.format=x),F}}return w&&(b=w(b)),new k(b)}var Y="flow",G="block",pe="quoted",fe=(b,m)=>{let w=b[m+1];for(;w===" "||w===" ";){do w=b[m+=1];while(w&&w!==`
75
+ `);w=b[m+1]}return m};function Ee(b,m,w,{indentAtStart:x,lineWidth:R=80,minContentWidth:O=20,onFold:D,onOverflow:F}){if(!R||R<0)return b;let W=Math.max(1+O,1+R-m.length);if(b.length<=W)return b;let X=[],de={},be=R-m.length;typeof x=="number"&&(x>R-Math.max(2,O)?X.push(0):be=R-x);let nt,Ne,Ze=!1,Fe=-1,Ke=-1,gt=-1;w===G&&(Fe=fe(b,Fe),Fe!==-1&&(be=Fe+W));for(let at;at=b[Fe+=1];){if(w===pe&&at==="\\"){switch(Ke=Fe,b[Fe+1]){case"x":Fe+=3;break;case"u":Fe+=5;break;case"U":Fe+=9;break;default:Fe+=1}gt=Fe}if(at===`
76
+ `)w===G&&(Fe=fe(b,Fe)),be=Fe+W,nt=void 0;else{if(at===" "&&Ne&&Ne!==" "&&Ne!==`
77
77
  `&&Ne!==" "){let Je=b[Fe+1];Je&&Je!==" "&&Je!==`
78
- `&&Je!==" "&&(nt=Fe)}if(Fe>=be)if(nt)X.push(nt),be=nt+H,nt=void 0;else if(w===pe){for(;Ne===" "||Ne===" ";)Ne=at,at=b[Fe+=1],Ze=!0;let Je=Fe>gt+1?Fe-2:Ke-1;if(de[Je])return b;X.push(Je),de[Je]=!0,be=Je+H,nt=void 0}else Ze=!0}Ne=at}if(Ze&&F&&F(),X.length===0)return b;D&&D();let Ve=b.slice(0,X[0]);for(let at=0;at<X.length;++at){let Je=X[at],_t=X[at+1]||b.length;Je===0?Ve=`
78
+ `&&Je!==" "&&(nt=Fe)}if(Fe>=be)if(nt)X.push(nt),be=nt+W,nt=void 0;else if(w===pe){for(;Ne===" "||Ne===" ";)Ne=at,at=b[Fe+=1],Ze=!0;let Je=Fe>gt+1?Fe-2:Ke-1;if(de[Je])return b;X.push(Je),de[Je]=!0,be=Je+W,nt=void 0}else Ze=!0}Ne=at}if(Ze&&F&&F(),X.length===0)return b;D&&D();let Ve=b.slice(0,X[0]);for(let at=0;at<X.length;++at){let Je=X[at],_t=X[at+1]||b.length;Je===0?Ve=`
79
79
  ${m}${b.slice(0,_t)}`:(w===pe&&de[Je]&&(Ve+=`${b[Je]}\\`),Ve+=`
80
- ${m}${b.slice(Je+1,_t)}`)}return Ve}var it=({indentAtStart:b})=>b?Object.assign({indentAtStart:b},K.fold):K.fold,ot=b=>/^(%|---|\.\.\.)/m.test(b);function st(b,m,w){if(!m||m<0)return!1;let x=m-w,O=b.length;if(O<=x)return!1;for(let R=0,D=0;R<O;++R)if(b[R]===`
81
- `){if(R-D>x)return!0;if(D=R+1,O-D<=x)return!1}return!0}function mt(b,m){let{implicitKey:w}=m,{jsonEncoding:x,minMultiLineLength:O}=K.doubleQuoted,R=JSON.stringify(b);if(x)return R;let D=m.indent||(ot(b)?" ":""),F="",H=0;for(let X=0,de=R[X];de;de=R[++X])if(de===" "&&R[X+1]==="\\"&&R[X+2]==="n"&&(F+=R.slice(H,X)+"\\ ",X+=1,H=X,de="\\"),de==="\\")switch(R[X+1]){case"u":{F+=R.slice(H,X);let be=R.substr(X+2,4);switch(be){case"0000":F+="\\0";break;case"0007":F+="\\a";break;case"000b":F+="\\v";break;case"001b":F+="\\e";break;case"0085":F+="\\N";break;case"00a0":F+="\\_";break;case"2028":F+="\\L";break;case"2029":F+="\\P";break;default:be.substr(0,2)==="00"?F+="\\x"+be.substr(2):F+=R.substr(X,6)}X+=5,H=X+1}break;case"n":if(w||R[X+2]==='"'||R.length<O)X+=1;else{for(F+=R.slice(H,X)+`
80
+ ${m}${b.slice(Je+1,_t)}`)}return Ve}var it=({indentAtStart:b})=>b?Object.assign({indentAtStart:b},K.fold):K.fold,ot=b=>/^(%|---|\.\.\.)/m.test(b);function st(b,m,w){if(!m||m<0)return!1;let x=m-w,R=b.length;if(R<=x)return!1;for(let O=0,D=0;O<R;++O)if(b[O]===`
81
+ `){if(O-D>x)return!0;if(D=O+1,R-D<=x)return!1}return!0}function mt(b,m){let{implicitKey:w}=m,{jsonEncoding:x,minMultiLineLength:R}=K.doubleQuoted,O=JSON.stringify(b);if(x)return O;let D=m.indent||(ot(b)?" ":""),F="",W=0;for(let X=0,de=O[X];de;de=O[++X])if(de===" "&&O[X+1]==="\\"&&O[X+2]==="n"&&(F+=O.slice(W,X)+"\\ ",X+=1,W=X,de="\\"),de==="\\")switch(O[X+1]){case"u":{F+=O.slice(W,X);let be=O.substr(X+2,4);switch(be){case"0000":F+="\\0";break;case"0007":F+="\\a";break;case"000b":F+="\\v";break;case"001b":F+="\\e";break;case"0085":F+="\\N";break;case"00a0":F+="\\_";break;case"2028":F+="\\L";break;case"2029":F+="\\P";break;default:be.substr(0,2)==="00"?F+="\\x"+be.substr(2):F+=O.substr(X,6)}X+=5,W=X+1}break;case"n":if(w||O[X+2]==='"'||O.length<R)X+=1;else{for(F+=O.slice(W,X)+`
82
82
 
83
- `;R[X+2]==="\\"&&R[X+3]==="n"&&R[X+4]!=='"';)F+=`
84
- `,X+=2;F+=D,R[X+2]===" "&&(F+="\\"),X+=1,H=X+1}break;default:X+=1}return F=H?F+R.slice(H):R,w?F:Ee(F,D,pe,it(m))}function xt(b,m){if(m.implicitKey){if(/\n/.test(b))return mt(b,m)}else if(/[ \t]\n|\n[ \t]/.test(b))return mt(b,m);let w=m.indent||(ot(b)?" ":""),x="'"+b.replace(/'/g,"''").replace(/\n+/g,`$&
85
- ${w}`)+"'";return m.implicitKey?x:Ee(x,w,Y,it(m))}function ae({comment:b,type:m,value:w},x,O,R){if(/\n[\t ]+$/.test(w)||/^\s*$/.test(w))return mt(w,x);let D=x.indent||(x.forceBlockIndent||ot(w)?" ":""),F=D?"2":"1",H=m===c.Type.BLOCK_FOLDED?!1:m===c.Type.BLOCK_LITERAL?!0:!st(w,K.fold.lineWidth,D.length),X=H?"|":">";if(!w)return X+`
83
+ `;O[X+2]==="\\"&&O[X+3]==="n"&&O[X+4]!=='"';)F+=`
84
+ `,X+=2;F+=D,O[X+2]===" "&&(F+="\\"),X+=1,W=X+1}break;default:X+=1}return F=W?F+O.slice(W):O,w?F:Ee(F,D,pe,it(m))}function xt(b,m){if(m.implicitKey){if(/\n/.test(b))return mt(b,m)}else if(/[ \t]\n|\n[ \t]/.test(b))return mt(b,m);let w=m.indent||(ot(b)?" ":""),x="'"+b.replace(/'/g,"''").replace(/\n+/g,`$&
85
+ ${w}`)+"'";return m.implicitKey?x:Ee(x,w,Y,it(m))}function ae({comment:b,type:m,value:w},x,R,O){if(/\n[\t ]+$/.test(w)||/^\s*$/.test(w))return mt(w,x);let D=x.indent||(x.forceBlockIndent||ot(w)?" ":""),F=D?"2":"1",W=m===c.Type.BLOCK_FOLDED?!1:m===c.Type.BLOCK_LITERAL?!0:!st(w,K.fold.lineWidth,D.length),X=W?"|":">";if(!w)return X+`
86
86
  `;let de="",be="";if(w=w.replace(/[\n\t ]*$/,Ne=>{let Ze=Ne.indexOf(`
87
- `);return Ze===-1?X+="-":(w===Ne||Ze!==Ne.length-1)&&(X+="+",R&&R()),be=Ne.replace(/\n$/,""),""}).replace(/^[\n ]*/,Ne=>{Ne.indexOf(" ")!==-1&&(X+=F);let Ze=Ne.match(/ +$/);return Ze?(de=Ne.slice(0,-Ze[0].length),Ze[0]):(de=Ne,"")}),be&&(be=be.replace(/\n+(?!\n|$)/g,`$&${D}`)),de&&(de=de.replace(/\n+/g,`$&${D}`)),b&&(X+=" #"+b.replace(/ ?[\r\n]+/g," "),O&&O()),!w)return`${X}${F}
88
- ${D}${be}`;if(H)return w=w.replace(/\n+/g,`$&${D}`),`${X}
87
+ `);return Ze===-1?X+="-":(w===Ne||Ze!==Ne.length-1)&&(X+="+",O&&O()),be=Ne.replace(/\n$/,""),""}).replace(/^[\n ]*/,Ne=>{Ne.indexOf(" ")!==-1&&(X+=F);let Ze=Ne.match(/ +$/);return Ze?(de=Ne.slice(0,-Ze[0].length),Ze[0]):(de=Ne,"")}),be&&(be=be.replace(/\n+(?!\n|$)/g,`$&${D}`)),de&&(de=de.replace(/\n+/g,`$&${D}`)),b&&(X+=" #"+b.replace(/ ?[\r\n]+/g," "),R&&R()),!w)return`${X}${F}
88
+ ${D}${be}`;if(W)return w=w.replace(/\n+/g,`$&${D}`),`${X}
89
89
  ${D}${de}${w}${be}`;w=w.replace(/\n+/g,`
90
90
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${D}`);let nt=Ee(`${de}${w}${be}`,D,G,K.fold);return`${X}
91
- ${D}${nt}`}function E(b,m,w,x){let{comment:O,type:R,value:D}=b,{actualString:F,implicitKey:H,indent:X,inFlow:de}=m;if(H&&/[\n[\]{},]/.test(D)||de&&/[[\]{},]/.test(D))return mt(D,m);if(!D||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(D))return H||de||D.indexOf(`
92
- `)===-1?D.indexOf('"')!==-1&&D.indexOf("'")===-1?xt(D,m):mt(D,m):ae(b,m,w,x);if(!H&&!de&&R!==c.Type.PLAIN&&D.indexOf(`
91
+ ${D}${nt}`}function E(b,m,w,x){let{comment:R,type:O,value:D}=b,{actualString:F,implicitKey:W,indent:X,inFlow:de}=m;if(W&&/[\n[\]{},]/.test(D)||de&&/[[\]{},]/.test(D))return mt(D,m);if(!D||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(D))return W||de||D.indexOf(`
92
+ `)===-1?D.indexOf('"')!==-1&&D.indexOf("'")===-1?xt(D,m):mt(D,m):ae(b,m,w,x);if(!W&&!de&&O!==c.Type.PLAIN&&D.indexOf(`
93
93
  `)!==-1)return ae(b,m,w,x);if(X===""&&ot(D))return m.forceBlockIndent=!0,ae(b,m,w,x);let be=D.replace(/\n+/g,`$&
94
- ${X}`);if(F){let{tags:Ne}=m.doc.schema;if(typeof z(be,Ne,Ne.scalarFallback).value!="string")return mt(D,m)}let nt=H?be:Ee(be,X,Y,it(m));return O&&!de&&(nt.indexOf(`
95
- `)!==-1||O.indexOf(`
96
- `)!==-1)?(w&&w(),f(nt,X,O)):nt}function J(b,m,w,x){let{defaultType:O}=K,{implicitKey:R,inFlow:D}=m,{type:F,value:H}=b;typeof H!="string"&&(H=String(H),b=Object.assign({},b,{value:H}));let X=be=>{switch(be){case c.Type.BLOCK_FOLDED:case c.Type.BLOCK_LITERAL:return ae(b,m,w,x);case c.Type.QUOTE_DOUBLE:return mt(H,m);case c.Type.QUOTE_SINGLE:return xt(H,m);case c.Type.PLAIN:return E(b,m,w,x);default:return null}};(F!==c.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(H)||(R||D)&&(F===c.Type.BLOCK_FOLDED||F===c.Type.BLOCK_LITERAL))&&(F=c.Type.QUOTE_DOUBLE);let de=X(F);if(de===null&&(de=X(O),de===null))throw new Error(`Unsupported default string type ${O}`);return de}function me({format:b,minFractionDigits:m,tag:w,value:x}){if(typeof x=="bigint")return String(x);if(!isFinite(x))return isNaN(x)?".nan":x<0?"-.inf":".inf";let O=JSON.stringify(x);if(!b&&m&&(!w||w==="tag:yaml.org,2002:float")&&/^\d/.test(O)){let R=O.indexOf(".");R<0&&(R=O.length,O+=".");let D=m-(O.length-R-1);for(;D-- >0;)O+="0"}return O}function ge(b,m){let w,x;switch(m.type){case c.Type.FLOW_MAP:w="}",x="flow map";break;case c.Type.FLOW_SEQ:w="]",x="flow sequence";break;default:b.push(new c.YAMLSemanticError(m,"Not a flow collection!?"));return}let O;for(let R=m.items.length-1;R>=0;--R){let D=m.items[R];if(!D||D.type!==c.Type.COMMENT){O=D;break}}if(O&&O.char!==w){let R=`Expected ${x} to end with ${w}`,D;typeof O.offset=="number"?(D=new c.YAMLSemanticError(m,R),D.offset=O.offset+1):(D=new c.YAMLSemanticError(O,R),O.range&&O.range.end&&(D.offset=O.range.end-O.range.start)),b.push(D)}}function Pe(b,m){let w=m.context.src[m.range.start-1];if(w!==`
97
- `&&w!==" "&&w!==" "){let x="Comments must be separated from other tokens by white space characters";b.push(new c.YAMLSemanticError(m,x))}}function qe(b,m){let w=String(m),x=w.substr(0,8)+"..."+w.substr(-8);return new c.YAMLSemanticError(b,`The "${x}" key is too long`)}function jt(b,m){for(let{afterKey:w,before:x,comment:O}of m){let R=b.items[x];R?(w&&R.value&&(R=R.value),O===void 0?(w||!R.commentBefore)&&(R.spaceBefore=!0):R.commentBefore?R.commentBefore+=`
98
- `+O:R.commentBefore=O):O!==void 0&&(b.comment?b.comment+=`
99
- `+O:b.comment=O)}}function hn(b,m){let w=m.strValue;return w?typeof w=="string"?w:(w.errors.forEach(x=>{x.source||(x.source=m),b.errors.push(x)}),w.str):""}function fn(b,m){let{handle:w,suffix:x}=m.tag,O=b.tagPrefixes.find(R=>R.handle===w);if(!O){let R=b.getDefaults().tagPrefixes;if(R&&(O=R.find(D=>D.handle===w)),!O)throw new c.YAMLSemanticError(m,`The ${w} tag handle is non-default and was not declared.`)}if(!x)throw new c.YAMLSemanticError(m,`The ${w} tag has no suffix.`);if(w==="!"&&(b.version||b.options.version)==="1.0"){if(x[0]==="^")return b.warnings.push(new c.YAMLWarning(m,"YAML 1.0 ^ tag expansion is not supported")),x;if(/[:/]/.test(x)){let R=x.match(/^([a-z0-9-]+)\/(.*)/i);return R?`tag:${R[1]}.yaml.org,2002:${R[2]}`:`tag:${x}`}}return O.prefix+decodeURIComponent(x)}function nn(b,m){let{tag:w,type:x}=m,O=!1;if(w){let{handle:R,suffix:D,verbatim:F}=w;if(F){if(F!=="!"&&F!=="!!")return F;let H=`Verbatim tags aren't resolved, so ${F} is invalid.`;b.errors.push(new c.YAMLSemanticError(m,H))}else if(R==="!"&&!D)O=!0;else try{return fn(b,m)}catch(H){b.errors.push(H)}}switch(x){case c.Type.BLOCK_FOLDED:case c.Type.BLOCK_LITERAL:case c.Type.QUOTE_DOUBLE:case c.Type.QUOTE_SINGLE:return c.defaultTags.STR;case c.Type.FLOW_MAP:case c.Type.MAP:return c.defaultTags.MAP;case c.Type.FLOW_SEQ:case c.Type.SEQ:return c.defaultTags.SEQ;case c.Type.PLAIN:return O?c.defaultTags.STR:null;default:return null}}function Or(b,m,w){let{tags:x}=b.schema,O=[];for(let D of x)if(D.tag===w)if(D.test)O.push(D);else{let F=D.resolve(b,m);return F instanceof N?F:new k(F)}let R=hn(b,m);return typeof R=="string"&&O.length>0?z(R,O,x.scalarFallback):null}function gi({type:b}){switch(b){case c.Type.FLOW_MAP:case c.Type.MAP:return c.defaultTags.MAP;case c.Type.FLOW_SEQ:case c.Type.SEQ:return c.defaultTags.SEQ;default:return c.defaultTags.STR}}function dg(b,m,w){try{let x=Or(b,m,w);if(x)return w&&m.tag&&(x.tag=w),x}catch(x){return x.source||(x.source=m),b.errors.push(x),null}try{let x=gi(m);if(!x)throw new Error(`The tag ${w} is unavailable`);let O=`The tag ${w} is unavailable, falling back to ${x}`;b.warnings.push(new c.YAMLWarning(m,O));let R=Or(b,m,x);return R.tag=w,R}catch(x){let O=new c.YAMLReferenceError(m,x.message);return O.stack=x.stack,b.errors.push(O),null}}var hg=b=>{if(!b)return!1;let{type:m}=b;return m===c.Type.MAP_KEY||m===c.Type.MAP_VALUE||m===c.Type.SEQ_ITEM};function fg(b,m){let w={before:[],after:[]},x=!1,O=!1,R=hg(m.context.parent)?m.context.parent.props.concat(m.props):m.props;for(let{start:D,end:F}of R)switch(m.context.src[D]){case c.Char.COMMENT:{if(!m.commentHasRequiredWhitespace(D)){let be="Comments must be separated from other tokens by white space characters";b.push(new c.YAMLSemanticError(m,be))}let{header:H,valueRange:X}=m;(X&&(D>X.start||H&&D>H.start)?w.after:w.before).push(m.context.src.slice(D+1,F));break}case c.Char.ANCHOR:if(x){let H="A node can have at most one anchor";b.push(new c.YAMLSemanticError(m,H))}x=!0;break;case c.Char.TAG:if(O){let H="A node can have at most one tag";b.push(new c.YAMLSemanticError(m,H))}O=!0;break}return{comments:w,hasAnchor:x,hasTag:O}}function mg(b,m){let{anchors:w,errors:x,schema:O}=b;if(m.type===c.Type.ALIAS){let D=m.rawValue,F=w.getNode(D);if(!F){let X=`Aliased anchor not found: ${D}`;return x.push(new c.YAMLReferenceError(m,X)),null}let H=new xe(F);return w._cstAliases.push(H),H}let R=nn(b,m);if(R)return dg(b,m,R);if(m.type!==c.Type.PLAIN){let D=`Failed to resolve ${m.type} node here`;return x.push(new c.YAMLSyntaxError(m,D)),null}try{let D=hn(b,m);return z(D,O.tags,O.tags.scalarFallback)}catch(D){return D.source||(D.source=m),x.push(D),null}}function An(b,m){if(!m)return null;m.error&&b.errors.push(m.error);let{comments:w,hasAnchor:x,hasTag:O}=fg(b.errors,m);if(x){let{anchors:D}=b,F=m.anchor,H=D.getNode(F);H&&(D.map[D.newName(F)]=H),D.map[F]=m}if(m.type===c.Type.ALIAS&&(x||O)){let D="An alias node must not specify any properties";b.errors.push(new c.YAMLSemanticError(m,D))}let R=mg(b,m);if(R){R.range=[m.range.start,m.range.end],b.options.keepCstNodes&&(R.cstNode=m),b.options.keepNodeTypes&&(R.type=m.type);let D=w.before.join(`
100
- `);D&&(R.commentBefore=R.commentBefore?`${R.commentBefore}
94
+ ${X}`);if(F){let{tags:Ne}=m.doc.schema;if(typeof z(be,Ne,Ne.scalarFallback).value!="string")return mt(D,m)}let nt=W?be:Ee(be,X,Y,it(m));return R&&!de&&(nt.indexOf(`
95
+ `)!==-1||R.indexOf(`
96
+ `)!==-1)?(w&&w(),f(nt,X,R)):nt}function J(b,m,w,x){let{defaultType:R}=K,{implicitKey:O,inFlow:D}=m,{type:F,value:W}=b;typeof W!="string"&&(W=String(W),b=Object.assign({},b,{value:W}));let X=be=>{switch(be){case c.Type.BLOCK_FOLDED:case c.Type.BLOCK_LITERAL:return ae(b,m,w,x);case c.Type.QUOTE_DOUBLE:return mt(W,m);case c.Type.QUOTE_SINGLE:return xt(W,m);case c.Type.PLAIN:return E(b,m,w,x);default:return null}};(F!==c.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(W)||(O||D)&&(F===c.Type.BLOCK_FOLDED||F===c.Type.BLOCK_LITERAL))&&(F=c.Type.QUOTE_DOUBLE);let de=X(F);if(de===null&&(de=X(R),de===null))throw new Error(`Unsupported default string type ${R}`);return de}function me({format:b,minFractionDigits:m,tag:w,value:x}){if(typeof x=="bigint")return String(x);if(!isFinite(x))return isNaN(x)?".nan":x<0?"-.inf":".inf";let R=JSON.stringify(x);if(!b&&m&&(!w||w==="tag:yaml.org,2002:float")&&/^\d/.test(R)){let O=R.indexOf(".");O<0&&(O=R.length,R+=".");let D=m-(R.length-O-1);for(;D-- >0;)R+="0"}return R}function ge(b,m){let w,x;switch(m.type){case c.Type.FLOW_MAP:w="}",x="flow map";break;case c.Type.FLOW_SEQ:w="]",x="flow sequence";break;default:b.push(new c.YAMLSemanticError(m,"Not a flow collection!?"));return}let R;for(let O=m.items.length-1;O>=0;--O){let D=m.items[O];if(!D||D.type!==c.Type.COMMENT){R=D;break}}if(R&&R.char!==w){let O=`Expected ${x} to end with ${w}`,D;typeof R.offset=="number"?(D=new c.YAMLSemanticError(m,O),D.offset=R.offset+1):(D=new c.YAMLSemanticError(R,O),R.range&&R.range.end&&(D.offset=R.range.end-R.range.start)),b.push(D)}}function Pe(b,m){let w=m.context.src[m.range.start-1];if(w!==`
97
+ `&&w!==" "&&w!==" "){let x="Comments must be separated from other tokens by white space characters";b.push(new c.YAMLSemanticError(m,x))}}function qe(b,m){let w=String(m),x=w.substr(0,8)+"..."+w.substr(-8);return new c.YAMLSemanticError(b,`The "${x}" key is too long`)}function jt(b,m){for(let{afterKey:w,before:x,comment:R}of m){let O=b.items[x];O?(w&&O.value&&(O=O.value),R===void 0?(w||!O.commentBefore)&&(O.spaceBefore=!0):O.commentBefore?O.commentBefore+=`
98
+ `+R:O.commentBefore=R):R!==void 0&&(b.comment?b.comment+=`
99
+ `+R:b.comment=R)}}function hn(b,m){let w=m.strValue;return w?typeof w=="string"?w:(w.errors.forEach(x=>{x.source||(x.source=m),b.errors.push(x)}),w.str):""}function fn(b,m){let{handle:w,suffix:x}=m.tag,R=b.tagPrefixes.find(O=>O.handle===w);if(!R){let O=b.getDefaults().tagPrefixes;if(O&&(R=O.find(D=>D.handle===w)),!R)throw new c.YAMLSemanticError(m,`The ${w} tag handle is non-default and was not declared.`)}if(!x)throw new c.YAMLSemanticError(m,`The ${w} tag has no suffix.`);if(w==="!"&&(b.version||b.options.version)==="1.0"){if(x[0]==="^")return b.warnings.push(new c.YAMLWarning(m,"YAML 1.0 ^ tag expansion is not supported")),x;if(/[:/]/.test(x)){let O=x.match(/^([a-z0-9-]+)\/(.*)/i);return O?`tag:${O[1]}.yaml.org,2002:${O[2]}`:`tag:${x}`}}return R.prefix+decodeURIComponent(x)}function nn(b,m){let{tag:w,type:x}=m,R=!1;if(w){let{handle:O,suffix:D,verbatim:F}=w;if(F){if(F!=="!"&&F!=="!!")return F;let W=`Verbatim tags aren't resolved, so ${F} is invalid.`;b.errors.push(new c.YAMLSemanticError(m,W))}else if(O==="!"&&!D)R=!0;else try{return fn(b,m)}catch(W){b.errors.push(W)}}switch(x){case c.Type.BLOCK_FOLDED:case c.Type.BLOCK_LITERAL:case c.Type.QUOTE_DOUBLE:case c.Type.QUOTE_SINGLE:return c.defaultTags.STR;case c.Type.FLOW_MAP:case c.Type.MAP:return c.defaultTags.MAP;case c.Type.FLOW_SEQ:case c.Type.SEQ:return c.defaultTags.SEQ;case c.Type.PLAIN:return R?c.defaultTags.STR:null;default:return null}}function Or(b,m,w){let{tags:x}=b.schema,R=[];for(let D of x)if(D.tag===w)if(D.test)R.push(D);else{let F=D.resolve(b,m);return F instanceof N?F:new k(F)}let O=hn(b,m);return typeof O=="string"&&R.length>0?z(O,R,x.scalarFallback):null}function bi({type:b}){switch(b){case c.Type.FLOW_MAP:case c.Type.MAP:return c.defaultTags.MAP;case c.Type.FLOW_SEQ:case c.Type.SEQ:return c.defaultTags.SEQ;default:return c.defaultTags.STR}}function mg(b,m,w){try{let x=Or(b,m,w);if(x)return w&&m.tag&&(x.tag=w),x}catch(x){return x.source||(x.source=m),b.errors.push(x),null}try{let x=bi(m);if(!x)throw new Error(`The tag ${w} is unavailable`);let R=`The tag ${w} is unavailable, falling back to ${x}`;b.warnings.push(new c.YAMLWarning(m,R));let O=Or(b,m,x);return O.tag=w,O}catch(x){let R=new c.YAMLReferenceError(m,x.message);return R.stack=x.stack,b.errors.push(R),null}}var gg=b=>{if(!b)return!1;let{type:m}=b;return m===c.Type.MAP_KEY||m===c.Type.MAP_VALUE||m===c.Type.SEQ_ITEM};function yg(b,m){let w={before:[],after:[]},x=!1,R=!1,O=gg(m.context.parent)?m.context.parent.props.concat(m.props):m.props;for(let{start:D,end:F}of O)switch(m.context.src[D]){case c.Char.COMMENT:{if(!m.commentHasRequiredWhitespace(D)){let be="Comments must be separated from other tokens by white space characters";b.push(new c.YAMLSemanticError(m,be))}let{header:W,valueRange:X}=m;(X&&(D>X.start||W&&D>W.start)?w.after:w.before).push(m.context.src.slice(D+1,F));break}case c.Char.ANCHOR:if(x){let W="A node can have at most one anchor";b.push(new c.YAMLSemanticError(m,W))}x=!0;break;case c.Char.TAG:if(R){let W="A node can have at most one tag";b.push(new c.YAMLSemanticError(m,W))}R=!0;break}return{comments:w,hasAnchor:x,hasTag:R}}function bg(b,m){let{anchors:w,errors:x,schema:R}=b;if(m.type===c.Type.ALIAS){let D=m.rawValue,F=w.getNode(D);if(!F){let X=`Aliased anchor not found: ${D}`;return x.push(new c.YAMLReferenceError(m,X)),null}let W=new xe(F);return w._cstAliases.push(W),W}let O=nn(b,m);if(O)return mg(b,m,O);if(m.type!==c.Type.PLAIN){let D=`Failed to resolve ${m.type} node here`;return x.push(new c.YAMLSyntaxError(m,D)),null}try{let D=hn(b,m);return z(D,R.tags,R.tags.scalarFallback)}catch(D){return D.source||(D.source=m),x.push(D),null}}function vn(b,m){if(!m)return null;m.error&&b.errors.push(m.error);let{comments:w,hasAnchor:x,hasTag:R}=yg(b.errors,m);if(x){let{anchors:D}=b,F=m.anchor,W=D.getNode(F);W&&(D.map[D.newName(F)]=W),D.map[F]=m}if(m.type===c.Type.ALIAS&&(x||R)){let D="An alias node must not specify any properties";b.errors.push(new c.YAMLSemanticError(m,D))}let O=bg(b,m);if(O){O.range=[m.range.start,m.range.end],b.options.keepCstNodes&&(O.cstNode=m),b.options.keepNodeTypes&&(O.type=m.type);let D=w.before.join(`
100
+ `);D&&(O.commentBefore=O.commentBefore?`${O.commentBefore}
101
101
  ${D}`:D);let F=w.after.join(`
102
- `);F&&(R.comment=R.comment?`${R.comment}
103
- ${F}`:F)}return m.resolved=R}function gg(b,m){if(m.type!==c.Type.MAP&&m.type!==c.Type.FLOW_MAP){let D=`A ${m.type} node cannot be resolved as a mapping`;return b.errors.push(new c.YAMLSyntaxError(m,D)),null}let{comments:w,items:x}=m.type===c.Type.FLOW_MAP?Sg(b,m):wg(b,m),O=new Ge;O.items=x,jt(O,w);let R=!1;for(let D=0;D<x.length;++D){let{key:F}=x[D];if(F instanceof N&&(R=!0),b.schema.merge&&F&&F.value===Qe){x[D]=new oe(x[D]);let H=x[D].value.items,X=null;H.some(de=>{if(de instanceof xe){let{type:be}=de.source;return be===c.Type.MAP||be===c.Type.FLOW_MAP?!1:X="Merge nodes aliases can only point to maps"}return X="Merge nodes can only have Alias nodes as values"}),X&&b.errors.push(new c.YAMLSemanticError(m,X))}else for(let H=D+1;H<x.length;++H){let{key:X}=x[H];if(F===X||F&&X&&Object.prototype.hasOwnProperty.call(F,"value")&&F.value===X.value){let de=`Map keys must be unique; "${F}" is repeated`;b.errors.push(new c.YAMLSemanticError(m,de));break}}}if(R&&!b.options.mapAsMap){let D="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";b.warnings.push(new c.YAMLWarning(m,D))}return m.resolved=O,O}var yg=({context:{lineStart:b,node:m,src:w},props:x})=>{if(x.length===0)return!1;let{start:O}=x[0];if(m&&O>m.valueRange.start||w[O]!==c.Char.COMMENT)return!1;for(let R=b;R<O;++R)if(w[R]===`
104
- `)return!1;return!0};function bg(b,m){if(!yg(b))return;let w=b.getPropValue(0,c.Char.COMMENT,!0),x=!1,O=m.value.commentBefore;if(O&&O.startsWith(w))m.value.commentBefore=O.substr(w.length+1),x=!0;else{let R=m.value.comment;!b.node&&R&&R.startsWith(w)&&(m.value.comment=R.substr(w.length+1),x=!0)}x&&(m.comment=w)}function wg(b,m){let w=[],x=[],O,R=null;for(let D=0;D<m.items.length;++D){let F=m.items[D];switch(F.type){case c.Type.BLANK_LINE:w.push({afterKey:!!O,before:x.length});break;case c.Type.COMMENT:w.push({afterKey:!!O,before:x.length,comment:F.comment});break;case c.Type.MAP_KEY:O!==void 0&&x.push(new le(O)),F.error&&b.errors.push(F.error),O=An(b,F.node),R=null;break;case c.Type.MAP_VALUE:{if(O===void 0&&(O=null),F.error&&b.errors.push(F.error),!F.context.atLineStart&&F.node&&F.node.type===c.Type.MAP&&!F.node.context.atLineStart){let de="Nested mappings are not allowed in compact mappings";b.errors.push(new c.YAMLSemanticError(F.node,de))}let H=F.node;if(!H&&F.props.length>0){H=new c.PlainValue(c.Type.PLAIN,[]),H.context={parent:F,src:F.context.src};let de=F.range.start+1;if(H.range={start:de,end:de},H.valueRange={start:de,end:de},typeof F.range.origStart=="number"){let be=F.range.origStart+1;H.range.origStart=H.range.origEnd=be,H.valueRange.origStart=H.valueRange.origEnd=be}}let X=new le(O,An(b,H));bg(F,X),x.push(X),O&&typeof R=="number"&&F.range.start>R+1024&&b.errors.push(qe(m,O)),O=void 0,R=null}break;default:O!==void 0&&x.push(new le(O)),O=An(b,F),R=F.range.start,F.error&&b.errors.push(F.error);e:for(let H=D+1;;++H){let X=m.items[H];switch(X&&X.type){case c.Type.BLANK_LINE:case c.Type.COMMENT:continue e;case c.Type.MAP_VALUE:break e;default:{let de="Implicit map keys need to be followed by map values";b.errors.push(new c.YAMLSemanticError(F,de));break e}}}if(F.valueRangeContainsNewline){let H="Implicit map keys need to be on a single line";b.errors.push(new c.YAMLSemanticError(F,H))}}}return O!==void 0&&x.push(new le(O)),{comments:w,items:x}}function Sg(b,m){let w=[],x=[],O,R=!1,D="{";for(let F=0;F<m.items.length;++F){let H=m.items[F];if(typeof H.char=="string"){let{char:X,offset:de}=H;if(X==="?"&&O===void 0&&!R){R=!0,D=":";continue}if(X===":"){if(O===void 0&&(O=null),D===":"){D=",";continue}}else if(R&&(O===void 0&&X!==","&&(O=null),R=!1),O!==void 0&&(x.push(new le(O)),O=void 0,X===",")){D=":";continue}if(X==="}"){if(F===m.items.length-1)continue}else if(X===D){D=":";continue}let be=`Flow map contains an unexpected ${X}`,nt=new c.YAMLSyntaxError(m,be);nt.offset=de,b.errors.push(nt)}else H.type===c.Type.BLANK_LINE?w.push({afterKey:!!O,before:x.length}):H.type===c.Type.COMMENT?(Pe(b.errors,H),w.push({afterKey:!!O,before:x.length,comment:H.comment})):O===void 0?(D===","&&b.errors.push(new c.YAMLSemanticError(H,"Separator , missing in flow map")),O=An(b,H)):(D!==","&&b.errors.push(new c.YAMLSemanticError(H,"Indicator : missing in flow map entry")),x.push(new le(O,An(b,H))),O=void 0,R=!1)}return ge(b.errors,m),O!==void 0&&x.push(new le(O)),{comments:w,items:x}}function Tg(b,m){if(m.type!==c.Type.SEQ&&m.type!==c.Type.FLOW_SEQ){let R=`A ${m.type} node cannot be resolved as a sequence`;return b.errors.push(new c.YAMLSyntaxError(m,R)),null}let{comments:w,items:x}=m.type===c.Type.FLOW_SEQ?kg(b,m):xg(b,m),O=new j;if(O.items=x,jt(O,w),!b.options.mapAsMap&&x.some(R=>R instanceof le&&R.key instanceof N)){let R="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";b.warnings.push(new c.YAMLWarning(m,R))}return m.resolved=O,O}function xg(b,m){let w=[],x=[];for(let O=0;O<m.items.length;++O){let R=m.items[O];switch(R.type){case c.Type.BLANK_LINE:w.push({before:x.length});break;case c.Type.COMMENT:w.push({comment:R.comment,before:x.length});break;case c.Type.SEQ_ITEM:if(R.error&&b.errors.push(R.error),x.push(An(b,R.node)),R.hasProps){let D="Sequence items cannot have tags or anchors before the - indicator";b.errors.push(new c.YAMLSemanticError(R,D))}break;default:R.error&&b.errors.push(R.error),b.errors.push(new c.YAMLSyntaxError(R,`Unexpected ${R.type} node in sequence`))}}return{comments:w,items:x}}function kg(b,m){let w=[],x=[],O=!1,R,D=null,F="[",H=null;for(let X=0;X<m.items.length;++X){let de=m.items[X];if(typeof de.char=="string"){let{char:be,offset:nt}=de;if(be!==":"&&(O||R!==void 0)&&(O&&R===void 0&&(R=F?x.pop():null),x.push(new le(R)),O=!1,R=void 0,D=null),be===F)F=null;else if(!F&&be==="?")O=!0;else if(F!=="["&&be===":"&&R===void 0){if(F===","){if(R=x.pop(),R instanceof le){let Ne="Chaining flow sequence pairs is invalid",Ze=new c.YAMLSemanticError(m,Ne);Ze.offset=nt,b.errors.push(Ze)}if(!O&&typeof D=="number"){let Ne=de.range?de.range.start:de.offset;Ne>D+1024&&b.errors.push(qe(m,R));let{src:Ze}=H.context;for(let Fe=D;Fe<Ne;++Fe)if(Ze[Fe]===`
105
- `){let Ke="Implicit keys of flow sequence pairs need to be on a single line";b.errors.push(new c.YAMLSemanticError(H,Ke));break}}}else R=null;D=null,O=!1,F=null}else if(F==="["||be!=="]"||X<m.items.length-1){let Ne=`Flow sequence contains an unexpected ${be}`,Ze=new c.YAMLSyntaxError(m,Ne);Ze.offset=nt,b.errors.push(Ze)}}else if(de.type===c.Type.BLANK_LINE)w.push({before:x.length});else if(de.type===c.Type.COMMENT)Pe(b.errors,de),w.push({comment:de.comment,before:x.length});else{if(F){let nt=`Expected a ${F} in flow sequence`;b.errors.push(new c.YAMLSemanticError(de,nt))}let be=An(b,de);R===void 0?(x.push(be),H=de):(x.push(new le(R,be)),R=void 0),D=de.range.start,F=","}}return ge(b.errors,m),R!==void 0&&x.push(new le(R)),{comments:w,items:x}}l.Alias=xe,l.Collection=N,l.Merge=oe,l.Node=T,l.Pair=le,l.Scalar=k,l.YAMLMap=Ge,l.YAMLSeq=j,l.addComment=S,l.binaryOptions=I,l.boolOptions=C,l.findPair=Oe,l.intOptions=V,l.isEmptyPath=Q,l.nullOptions=W,l.resolveMap=gg,l.resolveNode=An,l.resolveSeq=Tg,l.resolveString=hn,l.strOptions=K,l.stringifyNumber=me,l.stringifyString=J,l.toJSON=v}}),da=Ft({"node_modules/yaml/dist/warnings-1000a372.js"(l){var c=kr(),f=ci(),S={identify:z=>z instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(z,Y)=>{let G=f.resolveString(z,Y);if(typeof Buffer=="function")return Buffer.from(G,"base64");if(typeof atob=="function"){let pe=atob(G.replace(/[\n\r]/g,"")),fe=new Uint8Array(pe.length);for(let Ee=0;Ee<pe.length;++Ee)fe[Ee]=pe.charCodeAt(Ee);return fe}else{let pe="This environment does not support reading binary tags; either Buffer or atob is required";return z.errors.push(new c.YAMLReferenceError(Y,pe)),null}},options:f.binaryOptions,stringify:({comment:z,type:Y,value:G},pe,fe,Ee)=>{let it;if(typeof Buffer=="function")it=G instanceof Buffer?G.toString("base64"):Buffer.from(G.buffer).toString("base64");else if(typeof btoa=="function"){let ot="";for(let st=0;st<G.length;++st)ot+=String.fromCharCode(G[st]);it=btoa(ot)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Y||(Y=f.binaryOptions.defaultType),Y===c.Type.QUOTE_DOUBLE)G=it;else{let{lineWidth:ot}=f.binaryOptions,st=Math.ceil(it.length/ot),mt=new Array(st);for(let xt=0,ae=0;xt<st;++xt,ae+=ot)mt[xt]=it.substr(ae,ot);G=mt.join(Y===c.Type.BLOCK_LITERAL?`
102
+ `);F&&(O.comment=O.comment?`${O.comment}
103
+ ${F}`:F)}return m.resolved=O}function wg(b,m){if(m.type!==c.Type.MAP&&m.type!==c.Type.FLOW_MAP){let D=`A ${m.type} node cannot be resolved as a mapping`;return b.errors.push(new c.YAMLSyntaxError(m,D)),null}let{comments:w,items:x}=m.type===c.Type.FLOW_MAP?kg(b,m):xg(b,m),R=new Ge;R.items=x,jt(R,w);let O=!1;for(let D=0;D<x.length;++D){let{key:F}=x[D];if(F instanceof N&&(O=!0),b.schema.merge&&F&&F.value===Qe){x[D]=new oe(x[D]);let W=x[D].value.items,X=null;W.some(de=>{if(de instanceof xe){let{type:be}=de.source;return be===c.Type.MAP||be===c.Type.FLOW_MAP?!1:X="Merge nodes aliases can only point to maps"}return X="Merge nodes can only have Alias nodes as values"}),X&&b.errors.push(new c.YAMLSemanticError(m,X))}else for(let W=D+1;W<x.length;++W){let{key:X}=x[W];if(F===X||F&&X&&Object.prototype.hasOwnProperty.call(F,"value")&&F.value===X.value){let de=`Map keys must be unique; "${F}" is repeated`;b.errors.push(new c.YAMLSemanticError(m,de));break}}}if(O&&!b.options.mapAsMap){let D="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";b.warnings.push(new c.YAMLWarning(m,D))}return m.resolved=R,R}var Sg=({context:{lineStart:b,node:m,src:w},props:x})=>{if(x.length===0)return!1;let{start:R}=x[0];if(m&&R>m.valueRange.start||w[R]!==c.Char.COMMENT)return!1;for(let O=b;O<R;++O)if(w[O]===`
104
+ `)return!1;return!0};function Tg(b,m){if(!Sg(b))return;let w=b.getPropValue(0,c.Char.COMMENT,!0),x=!1,R=m.value.commentBefore;if(R&&R.startsWith(w))m.value.commentBefore=R.substr(w.length+1),x=!0;else{let O=m.value.comment;!b.node&&O&&O.startsWith(w)&&(m.value.comment=O.substr(w.length+1),x=!0)}x&&(m.comment=w)}function xg(b,m){let w=[],x=[],R,O=null;for(let D=0;D<m.items.length;++D){let F=m.items[D];switch(F.type){case c.Type.BLANK_LINE:w.push({afterKey:!!R,before:x.length});break;case c.Type.COMMENT:w.push({afterKey:!!R,before:x.length,comment:F.comment});break;case c.Type.MAP_KEY:R!==void 0&&x.push(new ce(R)),F.error&&b.errors.push(F.error),R=vn(b,F.node),O=null;break;case c.Type.MAP_VALUE:{if(R===void 0&&(R=null),F.error&&b.errors.push(F.error),!F.context.atLineStart&&F.node&&F.node.type===c.Type.MAP&&!F.node.context.atLineStart){let de="Nested mappings are not allowed in compact mappings";b.errors.push(new c.YAMLSemanticError(F.node,de))}let W=F.node;if(!W&&F.props.length>0){W=new c.PlainValue(c.Type.PLAIN,[]),W.context={parent:F,src:F.context.src};let de=F.range.start+1;if(W.range={start:de,end:de},W.valueRange={start:de,end:de},typeof F.range.origStart=="number"){let be=F.range.origStart+1;W.range.origStart=W.range.origEnd=be,W.valueRange.origStart=W.valueRange.origEnd=be}}let X=new ce(R,vn(b,W));Tg(F,X),x.push(X),R&&typeof O=="number"&&F.range.start>O+1024&&b.errors.push(qe(m,R)),R=void 0,O=null}break;default:R!==void 0&&x.push(new ce(R)),R=vn(b,F),O=F.range.start,F.error&&b.errors.push(F.error);e:for(let W=D+1;;++W){let X=m.items[W];switch(X&&X.type){case c.Type.BLANK_LINE:case c.Type.COMMENT:continue e;case c.Type.MAP_VALUE:break e;default:{let de="Implicit map keys need to be followed by map values";b.errors.push(new c.YAMLSemanticError(F,de));break e}}}if(F.valueRangeContainsNewline){let W="Implicit map keys need to be on a single line";b.errors.push(new c.YAMLSemanticError(F,W))}}}return R!==void 0&&x.push(new ce(R)),{comments:w,items:x}}function kg(b,m){let w=[],x=[],R,O=!1,D="{";for(let F=0;F<m.items.length;++F){let W=m.items[F];if(typeof W.char=="string"){let{char:X,offset:de}=W;if(X==="?"&&R===void 0&&!O){O=!0,D=":";continue}if(X===":"){if(R===void 0&&(R=null),D===":"){D=",";continue}}else if(O&&(R===void 0&&X!==","&&(R=null),O=!1),R!==void 0&&(x.push(new ce(R)),R=void 0,X===",")){D=":";continue}if(X==="}"){if(F===m.items.length-1)continue}else if(X===D){D=":";continue}let be=`Flow map contains an unexpected ${X}`,nt=new c.YAMLSyntaxError(m,be);nt.offset=de,b.errors.push(nt)}else W.type===c.Type.BLANK_LINE?w.push({afterKey:!!R,before:x.length}):W.type===c.Type.COMMENT?(Pe(b.errors,W),w.push({afterKey:!!R,before:x.length,comment:W.comment})):R===void 0?(D===","&&b.errors.push(new c.YAMLSemanticError(W,"Separator , missing in flow map")),R=vn(b,W)):(D!==","&&b.errors.push(new c.YAMLSemanticError(W,"Indicator : missing in flow map entry")),x.push(new ce(R,vn(b,W))),R=void 0,O=!1)}return ge(b.errors,m),R!==void 0&&x.push(new ce(R)),{comments:w,items:x}}function Ag(b,m){if(m.type!==c.Type.SEQ&&m.type!==c.Type.FLOW_SEQ){let O=`A ${m.type} node cannot be resolved as a sequence`;return b.errors.push(new c.YAMLSyntaxError(m,O)),null}let{comments:w,items:x}=m.type===c.Type.FLOW_SEQ?Eg(b,m):vg(b,m),R=new j;if(R.items=x,jt(R,w),!b.options.mapAsMap&&x.some(O=>O instanceof ce&&O.key instanceof N)){let O="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";b.warnings.push(new c.YAMLWarning(m,O))}return m.resolved=R,R}function vg(b,m){let w=[],x=[];for(let R=0;R<m.items.length;++R){let O=m.items[R];switch(O.type){case c.Type.BLANK_LINE:w.push({before:x.length});break;case c.Type.COMMENT:w.push({comment:O.comment,before:x.length});break;case c.Type.SEQ_ITEM:if(O.error&&b.errors.push(O.error),x.push(vn(b,O.node)),O.hasProps){let D="Sequence items cannot have tags or anchors before the - indicator";b.errors.push(new c.YAMLSemanticError(O,D))}break;default:O.error&&b.errors.push(O.error),b.errors.push(new c.YAMLSyntaxError(O,`Unexpected ${O.type} node in sequence`))}}return{comments:w,items:x}}function Eg(b,m){let w=[],x=[],R=!1,O,D=null,F="[",W=null;for(let X=0;X<m.items.length;++X){let de=m.items[X];if(typeof de.char=="string"){let{char:be,offset:nt}=de;if(be!==":"&&(R||O!==void 0)&&(R&&O===void 0&&(O=F?x.pop():null),x.push(new ce(O)),R=!1,O=void 0,D=null),be===F)F=null;else if(!F&&be==="?")R=!0;else if(F!=="["&&be===":"&&O===void 0){if(F===","){if(O=x.pop(),O instanceof ce){let Ne="Chaining flow sequence pairs is invalid",Ze=new c.YAMLSemanticError(m,Ne);Ze.offset=nt,b.errors.push(Ze)}if(!R&&typeof D=="number"){let Ne=de.range?de.range.start:de.offset;Ne>D+1024&&b.errors.push(qe(m,O));let{src:Ze}=W.context;for(let Fe=D;Fe<Ne;++Fe)if(Ze[Fe]===`
105
+ `){let Ke="Implicit keys of flow sequence pairs need to be on a single line";b.errors.push(new c.YAMLSemanticError(W,Ke));break}}}else O=null;D=null,R=!1,F=null}else if(F==="["||be!=="]"||X<m.items.length-1){let Ne=`Flow sequence contains an unexpected ${be}`,Ze=new c.YAMLSyntaxError(m,Ne);Ze.offset=nt,b.errors.push(Ze)}}else if(de.type===c.Type.BLANK_LINE)w.push({before:x.length});else if(de.type===c.Type.COMMENT)Pe(b.errors,de),w.push({comment:de.comment,before:x.length});else{if(F){let nt=`Expected a ${F} in flow sequence`;b.errors.push(new c.YAMLSemanticError(de,nt))}let be=vn(b,de);O===void 0?(x.push(be),W=de):(x.push(new ce(O,be)),O=void 0),D=de.range.start,F=","}}return ge(b.errors,m),O!==void 0&&x.push(new ce(O)),{comments:w,items:x}}l.Alias=xe,l.Collection=N,l.Merge=oe,l.Node=T,l.Pair=ce,l.Scalar=k,l.YAMLMap=Ge,l.YAMLSeq=j,l.addComment=S,l.binaryOptions=I,l.boolOptions=C,l.findPair=Re,l.intOptions=V,l.isEmptyPath=Q,l.nullOptions=H,l.resolveMap=wg,l.resolveNode=vn,l.resolveSeq=Ag,l.resolveString=hn,l.strOptions=K,l.stringifyNumber=me,l.stringifyString=J,l.toJSON=A}}),ma=Ft({"node_modules/yaml/dist/warnings-1000a372.js"(l){var c=Ar(),f=pi(),S={identify:z=>z instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(z,Y)=>{let G=f.resolveString(z,Y);if(typeof Buffer=="function")return Buffer.from(G,"base64");if(typeof atob=="function"){let pe=atob(G.replace(/[\n\r]/g,"")),fe=new Uint8Array(pe.length);for(let Ee=0;Ee<pe.length;++Ee)fe[Ee]=pe.charCodeAt(Ee);return fe}else{let pe="This environment does not support reading binary tags; either Buffer or atob is required";return z.errors.push(new c.YAMLReferenceError(Y,pe)),null}},options:f.binaryOptions,stringify:({comment:z,type:Y,value:G},pe,fe,Ee)=>{let it;if(typeof Buffer=="function")it=G instanceof Buffer?G.toString("base64"):Buffer.from(G.buffer).toString("base64");else if(typeof btoa=="function"){let ot="";for(let st=0;st<G.length;++st)ot+=String.fromCharCode(G[st]);it=btoa(ot)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Y||(Y=f.binaryOptions.defaultType),Y===c.Type.QUOTE_DOUBLE)G=it;else{let{lineWidth:ot}=f.binaryOptions,st=Math.ceil(it.length/ot),mt=new Array(st);for(let xt=0,ae=0;xt<st;++xt,ae+=ot)mt[xt]=it.substr(ae,ot);G=mt.join(Y===c.Type.BLOCK_LITERAL?`
106
106
  `:" ")}return f.stringifyString({comment:z,type:Y,value:G},pe,fe,Ee)}};function T(z,Y){let G=f.resolveSeq(z,Y);for(let pe=0;pe<G.items.length;++pe){let fe=G.items[pe];if(!(fe instanceof f.Pair)){if(fe instanceof f.YAMLMap){if(fe.items.length>1){let it="Each pair must have its own sequence indicator";throw new c.YAMLSemanticError(Y,it)}let Ee=fe.items[0]||new f.Pair;fe.commentBefore&&(Ee.commentBefore=Ee.commentBefore?`${fe.commentBefore}
107
107
  ${Ee.commentBefore}`:fe.commentBefore),fe.comment&&(Ee.comment=Ee.comment?`${fe.comment}
108
- ${Ee.comment}`:fe.comment),fe=Ee}G.items[pe]=fe instanceof f.Pair?fe:new f.Pair(fe)}}return G}function v(z,Y,G){let pe=new f.YAMLSeq(z);pe.tag="tag:yaml.org,2002:pairs";for(let fe of Y){let Ee,it;if(Array.isArray(fe))if(fe.length===2)Ee=fe[0],it=fe[1];else throw new TypeError(`Expected [key, value] tuple: ${fe}`);else if(fe&&fe instanceof Object){let st=Object.keys(fe);if(st.length===1)Ee=st[0],it=fe[Ee];else throw new TypeError(`Expected { key: value } tuple: ${fe}`)}else Ee=fe;let ot=z.createPair(Ee,it,G);pe.items.push(ot)}return pe}var k={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:T,createNode:v},L=class nu extends f.YAMLSeq{constructor(){super(),c._defineProperty(this,"add",f.YAMLMap.prototype.add.bind(this)),c._defineProperty(this,"delete",f.YAMLMap.prototype.delete.bind(this)),c._defineProperty(this,"get",f.YAMLMap.prototype.get.bind(this)),c._defineProperty(this,"has",f.YAMLMap.prototype.has.bind(this)),c._defineProperty(this,"set",f.YAMLMap.prototype.set.bind(this)),this.tag=nu.tag}toJSON(Y,G){let pe=new Map;G&&G.onCreate&&G.onCreate(pe);for(let fe of this.items){let Ee,it;if(fe instanceof f.Pair?(Ee=f.toJSON(fe.key,"",G),it=f.toJSON(fe.value,Ee,G)):Ee=f.toJSON(fe,"",G),pe.has(Ee))throw new Error("Ordered maps must not include duplicate keys");pe.set(Ee,it)}return pe}};c._defineProperty(L,"tag","tag:yaml.org,2002:omap");function Q(z,Y){let G=T(z,Y),pe=[];for(let{key:fe}of G.items)if(fe instanceof f.Scalar)if(pe.includes(fe.value)){let Ee="Ordered maps must not include duplicate keys";throw new c.YAMLSemanticError(Y,Ee)}else pe.push(fe.value);return Object.assign(new L,G)}function N(z,Y,G){let pe=v(z,Y,G),fe=new L;return fe.items=pe.items,fe}var ie={identify:z=>z instanceof Map,nodeClass:L,default:!1,tag:"tag:yaml.org,2002:omap",resolve:Q,createNode:N},j=class ru extends f.YAMLMap{constructor(){super(),this.tag=ru.tag}add(Y){let G=Y instanceof f.Pair?Y:new f.Pair(Y);f.findPair(this.items,G.key)||this.items.push(G)}get(Y,G){let pe=f.findPair(this.items,Y);return!G&&pe instanceof f.Pair?pe.key instanceof f.Scalar?pe.key.value:pe.key:pe}set(Y,G){if(typeof G!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof G}`);let pe=f.findPair(this.items,Y);pe&&!G?this.items.splice(this.items.indexOf(pe),1):!pe&&G&&this.items.push(new f.Pair(Y))}toJSON(Y,G){return super.toJSON(Y,G,Set)}toString(Y,G,pe){if(!Y)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(Y,G,pe);throw new Error("Set items must all have null values")}};c._defineProperty(j,"tag","tag:yaml.org,2002:set");function he(z,Y){let G=f.resolveMap(z,Y);if(!G.hasAllNullValues())throw new c.YAMLSemanticError(Y,"Set items must all have null values");return Object.assign(new j,G)}function le(z,Y,G){let pe=new j;for(let fe of Y)pe.items.push(z.createPair(fe,null,G));return pe}var $e={identify:z=>z instanceof Set,nodeClass:j,default:!1,tag:"tag:yaml.org,2002:set",resolve:he,createNode:le},xe=(z,Y)=>{let G=Y.split(":").reduce((pe,fe)=>pe*60+Number(fe),0);return z==="-"?-G:G},Oe=({value:z})=>{if(isNaN(z)||!isFinite(z))return f.stringifyNumber(z);let Y="";z<0&&(Y="-",z=Math.abs(z));let G=[z%60];return z<60?G.unshift(0):(z=Math.round((z-G[0])/60),G.unshift(z%60),z>=60&&(z=Math.round((z-G[0])/60),G.unshift(z))),Y+G.map(pe=>pe<10?"0"+String(pe):String(pe)).join(":").replace(/000000\d*$/,"")},Ge={identify:z=>typeof z=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(z,Y,G)=>xe(Y,G.replace(/_/g,"")),stringify:Oe},Qe={identify:z=>typeof z=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(z,Y,G)=>xe(Y,G.replace(/_/g,"")),stringify:Oe},oe={identify:z=>z instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:/^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\.[0-9]+)?)(?:[ \t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$/,resolve:(z,Y,G,pe,fe,Ee,it,ot,st)=>{ot&&(ot=(ot+"00").substr(1,3));let mt=Date.UTC(Y,G-1,pe,fe||0,Ee||0,it||0,ot||0);if(st&&st!=="Z"){let xt=xe(st[0],st.slice(1));Math.abs(xt)<30&&(xt*=60),mt-=6e4*xt}return new Date(mt)},stringify:({value:z})=>z.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function I(z){let Y=typeof process!="undefined"&&process.env||{};return z?typeof YAML_SILENCE_DEPRECATION_WARNINGS!="undefined"?!YAML_SILENCE_DEPRECATION_WARNINGS:!Y.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS!="undefined"?!YAML_SILENCE_WARNINGS:!Y.YAML_SILENCE_WARNINGS}function C(z,Y){if(I(!1)){let G=typeof process!="undefined"&&process.emitWarning;G?G(z,Y):console.warn(Y?`${Y}: ${z}`:z)}}function V(z){if(I(!0)){let Y=z.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");C(`The endpoint 'yaml/${Y}' will be removed in a future release.`,"DeprecationWarning")}}var W={};function K(z,Y){if(!W[z]&&I(!0)){W[z]=!0;let G=`The option '${z}' will be removed in a future release`;G+=Y?`, use '${Y}' instead.`:".",C(G,"DeprecationWarning")}}l.binary=S,l.floatTime=Qe,l.intTime=Ge,l.omap=ie,l.pairs=k,l.set=$e,l.timestamp=oe,l.warn=C,l.warnFileDeprecation=V,l.warnOptionDeprecation=K}}),ac=Ft({"node_modules/yaml/dist/Schema-88e323a7.js"(l){var c=kr(),f=ci(),S=da();function T(E,J,me){let ge=new f.YAMLMap(E);if(J instanceof Map)for(let[Pe,qe]of J)ge.items.push(E.createPair(Pe,qe,me));else if(J&&typeof J=="object")for(let Pe of Object.keys(J))ge.items.push(E.createPair(Pe,J[Pe],me));return typeof E.sortMapEntries=="function"&&ge.items.sort(E.sortMapEntries),ge}var v={createNode:T,default:!0,nodeClass:f.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:f.resolveMap};function k(E,J,me){let ge=new f.YAMLSeq(E);if(J&&J[Symbol.iterator])for(let Pe of J){let qe=E.createNode(Pe,me.wrapScalars,null,me);ge.items.push(qe)}return ge}var L={createNode:k,default:!0,nodeClass:f.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:f.resolveSeq},Q={identify:E=>typeof E=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:f.resolveString,stringify(E,J,me,ge){return J=Object.assign({actualString:!0},J),f.stringifyString(E,J,me,ge)},options:f.strOptions},N=[v,L,Q],ie=E=>typeof E=="bigint"||Number.isInteger(E),j=(E,J,me)=>f.intOptions.asBigInt?BigInt(E):parseInt(J,me);function he(E,J,me){let{value:ge}=E;return ie(ge)&&ge>=0?me+ge.toString(J):f.stringifyNumber(E)}var le={identify:E=>E==null,createNode:(E,J,me)=>me.wrapScalars?new f.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:f.nullOptions,stringify:()=>f.nullOptions.nullStr},$e={identify:E=>typeof E=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:E=>E[0]==="t"||E[0]==="T",options:f.boolOptions,stringify:({value:E})=>E?f.boolOptions.trueStr:f.boolOptions.falseStr},xe={identify:E=>ie(E)&&E>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(E,J)=>j(E,J,8),options:f.intOptions,stringify:E=>he(E,8,"0o")},Oe={identify:ie,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:E=>j(E,E,10),options:f.intOptions,stringify:f.stringifyNumber},Ge={identify:E=>ie(E)&&E>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(E,J)=>j(E,J,16),options:f.intOptions,stringify:E=>he(E,16,"0x")},Qe={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(E,J)=>J?NaN:E[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:f.stringifyNumber},oe={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:E=>parseFloat(E),stringify:({value:E})=>Number(E).toExponential()},I={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(E,J,me){let ge=J||me,Pe=new f.Scalar(parseFloat(E));return ge&&ge[ge.length-1]==="0"&&(Pe.minFractionDigits=ge.length),Pe},stringify:f.stringifyNumber},C=N.concat([le,$e,xe,Oe,Ge,Qe,oe,I]),V=E=>typeof E=="bigint"||Number.isInteger(E),W=({value:E})=>JSON.stringify(E),K=[v,L,{identify:E=>typeof E=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:f.resolveString,stringify:W},{identify:E=>E==null,createNode:(E,J,me)=>me.wrapScalars?new f.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:W},{identify:E=>typeof E=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:E=>E==="true",stringify:W},{identify:V,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:E=>f.intOptions.asBigInt?BigInt(E):parseInt(E,10),stringify:({value:E})=>V(E)?E.toString():JSON.stringify(E)},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:E=>parseFloat(E),stringify:W}];K.scalarFallback=E=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(E)}`)};var z=({value:E})=>E?f.boolOptions.trueStr:f.boolOptions.falseStr,Y=E=>typeof E=="bigint"||Number.isInteger(E);function G(E,J,me){let ge=J.replace(/_/g,"");if(f.intOptions.asBigInt){switch(me){case 2:ge=`0b${ge}`;break;case 8:ge=`0o${ge}`;break;case 16:ge=`0x${ge}`;break}let qe=BigInt(ge);return E==="-"?BigInt(-1)*qe:qe}let Pe=parseInt(ge,me);return E==="-"?-1*Pe:Pe}function pe(E,J,me){let{value:ge}=E;if(Y(ge)){let Pe=ge.toString(J);return ge<0?"-"+me+Pe.substr(1):me+Pe}return f.stringifyNumber(E)}var fe=N.concat([{identify:E=>E==null,createNode:(E,J,me)=>me.wrapScalars?new f.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:f.nullOptions,stringify:()=>f.nullOptions.nullStr},{identify:E=>typeof E=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:f.boolOptions,stringify:z},{identify:E=>typeof E=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:f.boolOptions,stringify:z},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(E,J,me)=>G(J,me,2),stringify:E=>pe(E,2,"0b")},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(E,J,me)=>G(J,me,8),stringify:E=>pe(E,8,"0")},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(E,J,me)=>G(J,me,10),stringify:f.stringifyNumber},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(E,J,me)=>G(J,me,16),stringify:E=>pe(E,16,"0x")},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(E,J)=>J?NaN:E[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:f.stringifyNumber},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:E=>parseFloat(E.replace(/_/g,"")),stringify:({value:E})=>Number(E).toExponential()},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(E,J){let me=new f.Scalar(parseFloat(E.replace(/_/g,"")));if(J){let ge=J.replace(/_/g,"");ge[ge.length-1]==="0"&&(me.minFractionDigits=ge.length)}return me},stringify:f.stringifyNumber}],S.binary,S.omap,S.pairs,S.set,S.intTime,S.floatTime,S.timestamp),Ee={core:C,failsafe:N,json:K,yaml11:fe},it={binary:S.binary,bool:$e,float:I,floatExp:oe,floatNaN:Qe,floatTime:S.floatTime,int:Oe,intHex:Ge,intOct:xe,intTime:S.intTime,map:v,null:le,omap:S.omap,pairs:S.pairs,seq:L,set:S.set,timestamp:S.timestamp};function ot(E,J,me){if(J){let ge=me.filter(qe=>qe.tag===J),Pe=ge.find(qe=>!qe.format)||ge[0];if(!Pe)throw new Error(`Tag ${J} not found`);return Pe}return me.find(ge=>(ge.identify&&ge.identify(E)||ge.class&&E instanceof ge.class)&&!ge.format)}function st(E,J,me){if(E instanceof f.Node)return E;let{defaultPrefix:ge,onTagObj:Pe,prevObjects:qe,schema:jt,wrapScalars:hn}=me;J&&J.startsWith("!!")&&(J=ge+J.slice(2));let fn=ot(E,J,jt.tags);if(!fn){if(typeof E.toJSON=="function"&&(E=E.toJSON()),!E||typeof E!="object")return hn?new f.Scalar(E):E;fn=E instanceof Map?v:E[Symbol.iterator]?L:v}Pe&&(Pe(fn),delete me.onTagObj);let nn={value:void 0,node:void 0};if(E&&typeof E=="object"&&qe){let Or=qe.get(E);if(Or){let gi=new f.Alias(Or);return me.aliasNodes.push(gi),gi}nn.value=E,qe.set(E,nn)}return nn.node=fn.createNode?fn.createNode(me.schema,E,me):hn?new f.Scalar(E):E,J&&nn.node instanceof f.Node&&(nn.node.tag=J),nn.node}function mt(E,J,me,ge){let Pe=E[ge.replace(/\W/g,"")];if(!Pe){let qe=Object.keys(E).map(jt=>JSON.stringify(jt)).join(", ");throw new Error(`Unknown schema "${ge}"; use one of ${qe}`)}if(Array.isArray(me))for(let qe of me)Pe=Pe.concat(qe);else typeof me=="function"&&(Pe=me(Pe.slice()));for(let qe=0;qe<Pe.length;++qe){let jt=Pe[qe];if(typeof jt=="string"){let hn=J[jt];if(!hn){let fn=Object.keys(J).map(nn=>JSON.stringify(nn)).join(", ");throw new Error(`Unknown custom tag "${jt}"; use one of ${fn}`)}Pe[qe]=hn}}return Pe}var xt=(E,J)=>E.key<J.key?-1:E.key>J.key?1:0,ae=class iu{constructor({customTags:J,merge:me,schema:ge,sortMapEntries:Pe,tags:qe}){this.merge=!!me,this.name=ge,this.sortMapEntries=Pe===!0?xt:Pe||null,!J&&qe&&S.warnOptionDeprecation("tags","customTags"),this.tags=mt(Ee,it,J||qe,ge)}createNode(J,me,ge,Pe){let qe={defaultPrefix:iu.defaultPrefix,schema:this,wrapScalars:me},jt=Pe?Object.assign(Pe,qe):qe;return st(J,ge,jt)}createPair(J,me,ge){ge||(ge={wrapScalars:!0});let Pe=this.createNode(J,ge.wrapScalars,null,ge),qe=this.createNode(me,ge.wrapScalars,null,ge);return new f.Pair(Pe,qe)}};c._defineProperty(ae,"defaultPrefix",c.defaultTagPrefix),c._defineProperty(ae,"defaultTags",c.defaultTags),l.Schema=ae}}),sc=Ft({"node_modules/yaml/dist/types.js"(l){var c=ci(),f=ac();kr(),da(),l.Alias=c.Alias,l.Collection=c.Collection,l.Merge=c.Merge,l.Node=c.Node,l.Pair=c.Pair,l.Scalar=c.Scalar,l.YAMLMap=c.YAMLMap,l.YAMLSeq=c.YAMLSeq,l.binaryOptions=c.binaryOptions,l.boolOptions=c.boolOptions,l.intOptions=c.intOptions,l.nullOptions=c.nullOptions,l.strOptions=c.strOptions,l.Schema=f.Schema}}),ha={},fa=()=>ha,lc=l=>{Object.assign(ha,l)},cc=class{constructor(){this.data={}}unregister(l){l?delete this.data[l]:this.data={}}register(l,c){this.data[l]=c}registerMany(l){Object.keys(l).forEach(c=>{this.data[c]=l[c]})}get(l){return this.data[l]}list(){return this.data}},ma=cc,We={},ga=We,We.defaultInvalidTypeProduct=void 0,We.defaultRandExpMax=10,We.pruneProperties=[],We.ignoreProperties=[],We.ignoreMissingRefs=!1,We.failOnInvalidTypes=!0,We.failOnInvalidFormat=!0,We.alwaysFakeOptionals=!1,We.optionalsProbability=null,We.fixedProbabilities=!1,We.useExamplesValue=!1,We.useDefaultValue=!1,We.requiredOnly=!1,We.omitNulls=!1,We.minItems=0,We.maxItems=null,We.minLength=0,We.maxLength=null,We.resolveJsonPath=!1,We.reuseProperties=!1,We.fillProperties=!0,We.sortProperties=!1,We.replaceEmptyByRandomValue=!1,We.random=Math.random,We.minDateTime=new Date("1889-12-31T00:00:00.000Z"),We.maxDateTime=new Date("1970-01-01T00:00:01.000Z"),We.renderTitle=!0,We.renderDescription=!0,We.renderComment=!1,uc=class extends ma{constructor(){super(),this.data={...ga},this._defaults=ga}get defaults(){return{...this._defaults}}},pc=uc,vr=new pc,d.getDefaults=()=>vr.defaults,_e=d,ya=["integer","number","string","boolean"],ba=ya.concat(["null"]),dc=["array","object"].concat(ba),hc=2524608e6,fc=-1e8,mc=1e8,gc=-100,yc=100,tn={ALLOWED_TYPES:ya,SCALAR_TYPES:ba,ALL_TYPES:dc,MIN_NUMBER:gc,MAX_NUMBER:yc,MIN_INTEGER:fc,MAX_INTEGER:mc,MOST_NEAR_DATETIME:hc},ui=pa(oc(),1),Ae={pick:g,date:ue,shuffle:P,number:Z,randexp:y},bc=/^(0|[1-9][0-9]*)$/,Ye={hasProperties:$,getLocalRef:ne,omitProps:A,typecast:je,merge:U,clone:Te,short:ze,hasValue:Ce,notValue:Me,anyValue:ye,validate:lt,validateValueForSchema:tt,validateValueForOneOf:Nt,isKey:Ut,template:At,shouldClean:_,clean:St,isEmpty:Lt,clampDate:Ue},wc=class{constructor(){this.registry={},this.support={}}reset(l){l?(delete this.registry[l],delete this.support[l]):(this.registry={},this.support={})}extend(l,c){this.registry[l]=c(this.registry[l]),this.support[l]||(this.support[l]=sn(()=>this.registry[l]))}define(l,c){this.support[l]=c}get(l){if(typeof this.registry[l]=="undefined")throw new ReferenceError(`'${l}' dependency doesn't exist.`);return this.registry[l]}wrap(l){if(!("generate"in l)){let c=Object.keys(l),f={},S=c.length;for(;S--;){let T=c[S].replace(/^x-/,""),v=this.support[T];if(typeof v=="function"){Object.defineProperty(l,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(k,L)=>v.call(f,l[c[S]],l,c[S],k,L.slice())});break}}}return l}},Sc=wc,er=new ma,wa=wr,Tc=class extends Error{constructor(l,c){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=l,this.path=c}},pi=Tc,Ar={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern","format"]},Ar.number=Ar.integer,xc=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"],kc=dt,vc=Fn,Ac=vc,Ec=Ac,_c=Gt,Oc=_c,Rc=Oc,Ic=vn,Sa=Sr,Cc=na,Pc=`Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore
108
+ ${Ee.comment}`:fe.comment),fe=Ee}G.items[pe]=fe instanceof f.Pair?fe:new f.Pair(fe)}}return G}function A(z,Y,G){let pe=new f.YAMLSeq(z);pe.tag="tag:yaml.org,2002:pairs";for(let fe of Y){let Ee,it;if(Array.isArray(fe))if(fe.length===2)Ee=fe[0],it=fe[1];else throw new TypeError(`Expected [key, value] tuple: ${fe}`);else if(fe&&fe instanceof Object){let st=Object.keys(fe);if(st.length===1)Ee=st[0],it=fe[Ee];else throw new TypeError(`Expected { key: value } tuple: ${fe}`)}else Ee=fe;let ot=z.createPair(Ee,it,G);pe.items.push(ot)}return pe}var k={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:T,createNode:A},L=class ou extends f.YAMLSeq{constructor(){super(),c._defineProperty(this,"add",f.YAMLMap.prototype.add.bind(this)),c._defineProperty(this,"delete",f.YAMLMap.prototype.delete.bind(this)),c._defineProperty(this,"get",f.YAMLMap.prototype.get.bind(this)),c._defineProperty(this,"has",f.YAMLMap.prototype.has.bind(this)),c._defineProperty(this,"set",f.YAMLMap.prototype.set.bind(this)),this.tag=ou.tag}toJSON(Y,G){let pe=new Map;G&&G.onCreate&&G.onCreate(pe);for(let fe of this.items){let Ee,it;if(fe instanceof f.Pair?(Ee=f.toJSON(fe.key,"",G),it=f.toJSON(fe.value,Ee,G)):Ee=f.toJSON(fe,"",G),pe.has(Ee))throw new Error("Ordered maps must not include duplicate keys");pe.set(Ee,it)}return pe}};c._defineProperty(L,"tag","tag:yaml.org,2002:omap");function Q(z,Y){let G=T(z,Y),pe=[];for(let{key:fe}of G.items)if(fe instanceof f.Scalar)if(pe.includes(fe.value)){let Ee="Ordered maps must not include duplicate keys";throw new c.YAMLSemanticError(Y,Ee)}else pe.push(fe.value);return Object.assign(new L,G)}function N(z,Y,G){let pe=A(z,Y,G),fe=new L;return fe.items=pe.items,fe}var ie={identify:z=>z instanceof Map,nodeClass:L,default:!1,tag:"tag:yaml.org,2002:omap",resolve:Q,createNode:N},j=class au extends f.YAMLMap{constructor(){super(),this.tag=au.tag}add(Y){let G=Y instanceof f.Pair?Y:new f.Pair(Y);f.findPair(this.items,G.key)||this.items.push(G)}get(Y,G){let pe=f.findPair(this.items,Y);return!G&&pe instanceof f.Pair?pe.key instanceof f.Scalar?pe.key.value:pe.key:pe}set(Y,G){if(typeof G!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof G}`);let pe=f.findPair(this.items,Y);pe&&!G?this.items.splice(this.items.indexOf(pe),1):!pe&&G&&this.items.push(new f.Pair(Y))}toJSON(Y,G){return super.toJSON(Y,G,Set)}toString(Y,G,pe){if(!Y)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(Y,G,pe);throw new Error("Set items must all have null values")}};c._defineProperty(j,"tag","tag:yaml.org,2002:set");function he(z,Y){let G=f.resolveMap(z,Y);if(!G.hasAllNullValues())throw new c.YAMLSemanticError(Y,"Set items must all have null values");return Object.assign(new j,G)}function ce(z,Y,G){let pe=new j;for(let fe of Y)pe.items.push(z.createPair(fe,null,G));return pe}var $e={identify:z=>z instanceof Set,nodeClass:j,default:!1,tag:"tag:yaml.org,2002:set",resolve:he,createNode:ce},xe=(z,Y)=>{let G=Y.split(":").reduce((pe,fe)=>pe*60+Number(fe),0);return z==="-"?-G:G},Re=({value:z})=>{if(isNaN(z)||!isFinite(z))return f.stringifyNumber(z);let Y="";z<0&&(Y="-",z=Math.abs(z));let G=[z%60];return z<60?G.unshift(0):(z=Math.round((z-G[0])/60),G.unshift(z%60),z>=60&&(z=Math.round((z-G[0])/60),G.unshift(z))),Y+G.map(pe=>pe<10?"0"+String(pe):String(pe)).join(":").replace(/000000\d*$/,"")},Ge={identify:z=>typeof z=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(z,Y,G)=>xe(Y,G.replace(/_/g,"")),stringify:Re},Qe={identify:z=>typeof z=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(z,Y,G)=>xe(Y,G.replace(/_/g,"")),stringify:Re},oe={identify:z=>z instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:/^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\.[0-9]+)?)(?:[ \t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$/,resolve:(z,Y,G,pe,fe,Ee,it,ot,st)=>{ot&&(ot=(ot+"00").substr(1,3));let mt=Date.UTC(Y,G-1,pe,fe||0,Ee||0,it||0,ot||0);if(st&&st!=="Z"){let xt=xe(st[0],st.slice(1));Math.abs(xt)<30&&(xt*=60),mt-=6e4*xt}return new Date(mt)},stringify:({value:z})=>z.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function I(z){let Y=typeof process!="undefined"&&process.env||{};return z?typeof YAML_SILENCE_DEPRECATION_WARNINGS!="undefined"?!YAML_SILENCE_DEPRECATION_WARNINGS:!Y.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS!="undefined"?!YAML_SILENCE_WARNINGS:!Y.YAML_SILENCE_WARNINGS}function C(z,Y){if(I(!1)){let G=typeof process!="undefined"&&process.emitWarning;G?G(z,Y):console.warn(Y?`${Y}: ${z}`:z)}}function V(z){if(I(!0)){let Y=z.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");C(`The endpoint 'yaml/${Y}' will be removed in a future release.`,"DeprecationWarning")}}var H={};function K(z,Y){if(!H[z]&&I(!0)){H[z]=!0;let G=`The option '${z}' will be removed in a future release`;G+=Y?`, use '${Y}' instead.`:".",C(G,"DeprecationWarning")}}l.binary=S,l.floatTime=Qe,l.intTime=Ge,l.omap=ie,l.pairs=k,l.set=$e,l.timestamp=oe,l.warn=C,l.warnFileDeprecation=V,l.warnOptionDeprecation=K}}),cc=Ft({"node_modules/yaml/dist/Schema-88e323a7.js"(l){var c=Ar(),f=pi(),S=ma();function T(E,J,me){let ge=new f.YAMLMap(E);if(J instanceof Map)for(let[Pe,qe]of J)ge.items.push(E.createPair(Pe,qe,me));else if(J&&typeof J=="object")for(let Pe of Object.keys(J))ge.items.push(E.createPair(Pe,J[Pe],me));return typeof E.sortMapEntries=="function"&&ge.items.sort(E.sortMapEntries),ge}var A={createNode:T,default:!0,nodeClass:f.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:f.resolveMap};function k(E,J,me){let ge=new f.YAMLSeq(E);if(J&&J[Symbol.iterator])for(let Pe of J){let qe=E.createNode(Pe,me.wrapScalars,null,me);ge.items.push(qe)}return ge}var L={createNode:k,default:!0,nodeClass:f.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:f.resolveSeq},Q={identify:E=>typeof E=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:f.resolveString,stringify(E,J,me,ge){return J=Object.assign({actualString:!0},J),f.stringifyString(E,J,me,ge)},options:f.strOptions},N=[A,L,Q],ie=E=>typeof E=="bigint"||Number.isInteger(E),j=(E,J,me)=>f.intOptions.asBigInt?BigInt(E):parseInt(J,me);function he(E,J,me){let{value:ge}=E;return ie(ge)&&ge>=0?me+ge.toString(J):f.stringifyNumber(E)}var ce={identify:E=>E==null,createNode:(E,J,me)=>me.wrapScalars?new f.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:f.nullOptions,stringify:()=>f.nullOptions.nullStr},$e={identify:E=>typeof E=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:E=>E[0]==="t"||E[0]==="T",options:f.boolOptions,stringify:({value:E})=>E?f.boolOptions.trueStr:f.boolOptions.falseStr},xe={identify:E=>ie(E)&&E>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(E,J)=>j(E,J,8),options:f.intOptions,stringify:E=>he(E,8,"0o")},Re={identify:ie,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:E=>j(E,E,10),options:f.intOptions,stringify:f.stringifyNumber},Ge={identify:E=>ie(E)&&E>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(E,J)=>j(E,J,16),options:f.intOptions,stringify:E=>he(E,16,"0x")},Qe={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(E,J)=>J?NaN:E[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:f.stringifyNumber},oe={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:E=>parseFloat(E),stringify:({value:E})=>Number(E).toExponential()},I={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(E,J,me){let ge=J||me,Pe=new f.Scalar(parseFloat(E));return ge&&ge[ge.length-1]==="0"&&(Pe.minFractionDigits=ge.length),Pe},stringify:f.stringifyNumber},C=N.concat([ce,$e,xe,Re,Ge,Qe,oe,I]),V=E=>typeof E=="bigint"||Number.isInteger(E),H=({value:E})=>JSON.stringify(E),K=[A,L,{identify:E=>typeof E=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:f.resolveString,stringify:H},{identify:E=>E==null,createNode:(E,J,me)=>me.wrapScalars?new f.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:H},{identify:E=>typeof E=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:E=>E==="true",stringify:H},{identify:V,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:E=>f.intOptions.asBigInt?BigInt(E):parseInt(E,10),stringify:({value:E})=>V(E)?E.toString():JSON.stringify(E)},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:E=>parseFloat(E),stringify:H}];K.scalarFallback=E=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(E)}`)};var z=({value:E})=>E?f.boolOptions.trueStr:f.boolOptions.falseStr,Y=E=>typeof E=="bigint"||Number.isInteger(E);function G(E,J,me){let ge=J.replace(/_/g,"");if(f.intOptions.asBigInt){switch(me){case 2:ge=`0b${ge}`;break;case 8:ge=`0o${ge}`;break;case 16:ge=`0x${ge}`;break}let qe=BigInt(ge);return E==="-"?BigInt(-1)*qe:qe}let Pe=parseInt(ge,me);return E==="-"?-1*Pe:Pe}function pe(E,J,me){let{value:ge}=E;if(Y(ge)){let Pe=ge.toString(J);return ge<0?"-"+me+Pe.substr(1):me+Pe}return f.stringifyNumber(E)}var fe=N.concat([{identify:E=>E==null,createNode:(E,J,me)=>me.wrapScalars?new f.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:f.nullOptions,stringify:()=>f.nullOptions.nullStr},{identify:E=>typeof E=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:f.boolOptions,stringify:z},{identify:E=>typeof E=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:f.boolOptions,stringify:z},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(E,J,me)=>G(J,me,2),stringify:E=>pe(E,2,"0b")},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(E,J,me)=>G(J,me,8),stringify:E=>pe(E,8,"0")},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(E,J,me)=>G(J,me,10),stringify:f.stringifyNumber},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(E,J,me)=>G(J,me,16),stringify:E=>pe(E,16,"0x")},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(E,J)=>J?NaN:E[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:f.stringifyNumber},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:E=>parseFloat(E.replace(/_/g,"")),stringify:({value:E})=>Number(E).toExponential()},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(E,J){let me=new f.Scalar(parseFloat(E.replace(/_/g,"")));if(J){let ge=J.replace(/_/g,"");ge[ge.length-1]==="0"&&(me.minFractionDigits=ge.length)}return me},stringify:f.stringifyNumber}],S.binary,S.omap,S.pairs,S.set,S.intTime,S.floatTime,S.timestamp),Ee={core:C,failsafe:N,json:K,yaml11:fe},it={binary:S.binary,bool:$e,float:I,floatExp:oe,floatNaN:Qe,floatTime:S.floatTime,int:Re,intHex:Ge,intOct:xe,intTime:S.intTime,map:A,null:ce,omap:S.omap,pairs:S.pairs,seq:L,set:S.set,timestamp:S.timestamp};function ot(E,J,me){if(J){let ge=me.filter(qe=>qe.tag===J),Pe=ge.find(qe=>!qe.format)||ge[0];if(!Pe)throw new Error(`Tag ${J} not found`);return Pe}return me.find(ge=>(ge.identify&&ge.identify(E)||ge.class&&E instanceof ge.class)&&!ge.format)}function st(E,J,me){if(E instanceof f.Node)return E;let{defaultPrefix:ge,onTagObj:Pe,prevObjects:qe,schema:jt,wrapScalars:hn}=me;J&&J.startsWith("!!")&&(J=ge+J.slice(2));let fn=ot(E,J,jt.tags);if(!fn){if(typeof E.toJSON=="function"&&(E=E.toJSON()),!E||typeof E!="object")return hn?new f.Scalar(E):E;fn=E instanceof Map?A:E[Symbol.iterator]?L:A}Pe&&(Pe(fn),delete me.onTagObj);let nn={value:void 0,node:void 0};if(E&&typeof E=="object"&&qe){let Or=qe.get(E);if(Or){let bi=new f.Alias(Or);return me.aliasNodes.push(bi),bi}nn.value=E,qe.set(E,nn)}return nn.node=fn.createNode?fn.createNode(me.schema,E,me):hn?new f.Scalar(E):E,J&&nn.node instanceof f.Node&&(nn.node.tag=J),nn.node}function mt(E,J,me,ge){let Pe=E[ge.replace(/\W/g,"")];if(!Pe){let qe=Object.keys(E).map(jt=>JSON.stringify(jt)).join(", ");throw new Error(`Unknown schema "${ge}"; use one of ${qe}`)}if(Array.isArray(me))for(let qe of me)Pe=Pe.concat(qe);else typeof me=="function"&&(Pe=me(Pe.slice()));for(let qe=0;qe<Pe.length;++qe){let jt=Pe[qe];if(typeof jt=="string"){let hn=J[jt];if(!hn){let fn=Object.keys(J).map(nn=>JSON.stringify(nn)).join(", ");throw new Error(`Unknown custom tag "${jt}"; use one of ${fn}`)}Pe[qe]=hn}}return Pe}var xt=(E,J)=>E.key<J.key?-1:E.key>J.key?1:0,ae=class su{constructor({customTags:J,merge:me,schema:ge,sortMapEntries:Pe,tags:qe}){this.merge=!!me,this.name=ge,this.sortMapEntries=Pe===!0?xt:Pe||null,!J&&qe&&S.warnOptionDeprecation("tags","customTags"),this.tags=mt(Ee,it,J||qe,ge)}createNode(J,me,ge,Pe){let qe={defaultPrefix:su.defaultPrefix,schema:this,wrapScalars:me},jt=Pe?Object.assign(Pe,qe):qe;return st(J,ge,jt)}createPair(J,me,ge){ge||(ge={wrapScalars:!0});let Pe=this.createNode(J,ge.wrapScalars,null,ge),qe=this.createNode(me,ge.wrapScalars,null,ge);return new f.Pair(Pe,qe)}};c._defineProperty(ae,"defaultPrefix",c.defaultTagPrefix),c._defineProperty(ae,"defaultTags",c.defaultTags),l.Schema=ae}}),uc=Ft({"node_modules/yaml/dist/types.js"(l){var c=pi(),f=cc();Ar(),ma(),l.Alias=c.Alias,l.Collection=c.Collection,l.Merge=c.Merge,l.Node=c.Node,l.Pair=c.Pair,l.Scalar=c.Scalar,l.YAMLMap=c.YAMLMap,l.YAMLSeq=c.YAMLSeq,l.binaryOptions=c.binaryOptions,l.boolOptions=c.boolOptions,l.intOptions=c.intOptions,l.nullOptions=c.nullOptions,l.strOptions=c.strOptions,l.Schema=f.Schema}}),ga={},ya=()=>ga,pc=l=>{Object.assign(ga,l)},dc=class{constructor(){this.data={}}unregister(l){l?delete this.data[l]:this.data={}}register(l,c){this.data[l]=c}registerMany(l){Object.keys(l).forEach(c=>{this.data[c]=l[c]})}get(l){return this.data[l]}list(){return this.data}},ba=dc,He={},wa=He,He.defaultInvalidTypeProduct=void 0,He.defaultRandExpMax=10,He.pruneProperties=[],He.ignoreProperties=[],He.ignoreMissingRefs=!1,He.failOnInvalidTypes=!0,He.failOnInvalidFormat=!0,He.alwaysFakeOptionals=!1,He.optionalsProbability=null,He.fixedProbabilities=!1,He.useExamplesValue=!1,He.useDefaultValue=!1,He.requiredOnly=!1,He.omitNulls=!1,He.minItems=0,He.maxItems=null,He.minLength=0,He.maxLength=null,He.resolveJsonPath=!1,He.reuseProperties=!1,He.fillProperties=!0,He.sortProperties=!1,He.replaceEmptyByRandomValue=!1,He.random=Math.random,He.minDateTime=new Date("1889-12-31T00:00:00.000Z"),He.maxDateTime=new Date("1970-01-01T00:00:01.000Z"),He.renderTitle=!0,He.renderDescription=!0,He.renderComment=!1,hc=class extends ba{constructor(){super(),this.data={...wa},this._defaults=wa}get defaults(){return{...this._defaults}}},fc=hc,vr=new fc,d.getDefaults=()=>vr.defaults,_e=d,Sa=["integer","number","string","boolean"],Ta=Sa.concat(["null"]),mc=["array","object"].concat(Ta),gc=2524608e6,yc=-1e8,bc=1e8,wc=-100,Sc=100,tn={ALLOWED_TYPES:Sa,SCALAR_TYPES:Ta,ALL_TYPES:mc,MIN_NUMBER:wc,MAX_NUMBER:Sc,MIN_INTEGER:yc,MAX_INTEGER:bc,MOST_NEAR_DATETIME:gc},di=fa(lc(),1),ve={pick:g,date:ue,shuffle:P,number:Z,randexp:y},Tc=/^(0|[1-9][0-9]*)$/,Ye={hasProperties:$,getLocalRef:ne,omitProps:v,typecast:je,merge:U,clone:Te,short:ze,hasValue:Ce,notValue:Me,anyValue:ye,validate:lt,validateValueForSchema:tt,validateValueForOneOf:Nt,isKey:Ut,template:vt,shouldClean:_,clean:St,isEmpty:Lt,clampDate:Ue},xc=class{constructor(){this.registry={},this.support={}}reset(l){l?(delete this.registry[l],delete this.support[l]):(this.registry={},this.support={})}extend(l,c){this.registry[l]=c(this.registry[l]),this.support[l]||(this.support[l]=sn(()=>this.registry[l]))}define(l,c){this.support[l]=c}get(l){if(typeof this.registry[l]=="undefined")throw new ReferenceError(`'${l}' dependency doesn't exist.`);return this.registry[l]}wrap(l){if(!("generate"in l)){let c=Object.keys(l),f={},S=c.length;for(;S--;){let T=c[S].replace(/^x-/,""),A=this.support[T];if(typeof A=="function"){Object.defineProperty(l,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(k,L)=>A.call(f,l[c[S]],l,c[S],k,L.slice())});break}}}return l}},kc=xc,tr=new ba,xa=Sr,Ac=class extends Error{constructor(l,c){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=l,this.path=c}},hi=Ac,Er={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern","format"]},Er.number=Er.integer,vc=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"],Ec=dt,_c=Fn,Rc=_c,Oc=Rc,Ic=Gt,Cc=Ic,Pc=Cc,Mc=An,ka=Tr,Nc=oa,Lc=`Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore
109
109
  et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
110
110
  commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
111
111
  pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est
112
- laborum`.split(/\W/),di=oi,hi={type:tn.ALLOWED_TYPES},Mc=ai,Ta=ra,Nc=si,fi=li,Lc=ia,Dc=oa,xa="[a-zA-Z][a-zA-Z0-9+-.]*",mi=`https?://{hostname}(?:${xa})+`,Fc="(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?",qt={email:"[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}",hostname:"[a-zA-Z]{1,33}\\.[a-z]{2,4}",ipv6:"[a-f\\d]{4}(:[a-f\\d]{4}){7}",uri:mi,slug:"[a-zA-Z\\d_-]+","uri-reference":`${mi}${Fc}`,"uri-template":mi.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${xa.replace("]*","/]*")}|~[01]))+`,uuid:"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",duration:"^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$"},qt.iri=qt["uri-reference"],qt["iri-reference"]=qt["uri-reference"],qt["idn-email"]=qt.email,qt["idn-hostname"]=qt.hostname,Uc=new RegExp(`\\{(${Object.keys(qt).join("|")})\\}`),$c=aa,qc=la,jc={boolean:Ec,null:Rc,array:Ic,integer:Cc,number:Sa,object:Mc,string:qc},Er=jc,Bc=re,zc=({refs:l,schema:c,container:f,synchronous:S,refDepthMax:T,refDepthMin:v})=>{let k={},L={},Q=0,N,ie;return k.resolveSchema=(j,he,le)=>{if(j==null)return null;if(typeof j.generate=="function")return j;if(typeof(j.$id||j.id)=="string"&&(delete j.id,delete j.$id,delete j.$schema),typeof j.$ref=="string"){let xe=Math.max(v,T)-1;if(j.$ref==="#"||L[j.$ref]<0||N===j.$ref&&++Q>xe)return j.$ref!=="#"&&ie&&ie.length===le.length?Ye.getLocalRef(c,j.$ref,S&&l):(delete j.$ref,j);typeof L[j.$ref]=="undefined"&&(L[j.$ref]=Ae.number(v,T)-1),ie=le,N=j.$ref;let Oe;j.$ref.indexOf("#/")===-1?Oe=l[j.$ref]||null:Oe=Ye.getLocalRef(c,j.$ref,S&&l)||null;let Ge;if(typeof Oe!="undefined"){if(!Oe&&_e("ignoreMissingRefs")!==!0)throw new Error(`Reference not found: ${j.$ref}`);L[j.$ref]-=1,Ye.merge(j,Oe||{}),Ge=S&&Oe&&Oe.$ref}return Ge||delete j.$ref,j}if(Array.isArray(j.allOf)){let xe=j.allOf;delete j.allOf,xe.forEach(Oe=>{let Ge=k.resolveSchema(Oe,null,le);Ye.merge(j,typeof Ge.thunk=="function"?Ge.thunk(j):Ge),Array.isArray(j.allOf)&&k.resolveSchema(j,he,le)})}if(Array.isArray(j.oneOf||j.anyOf)&&le[le.length-2]!=="dependencies"){let xe=j.oneOf||j.anyOf;return j.enum&&j.oneOf&&(j.enum=j.enum.filter(Oe=>Ye.validate(Oe,xe))),{thunk(Oe){let Ge=Ye.omitProps(j,["anyOf","oneOf"]),Qe=Ae.pick(xe);return Ye.merge(Ge,Qe),xe.forEach(oe=>{oe.required&&oe!==Qe&&oe.required.forEach(I=>{if(Qe.required&&Qe.required.includes(I))return;let C=Ge.required&&Ge.required.includes(I);Ge.properties&&!C&&delete Ge.properties[I],Oe&&Oe.properties&&delete Oe.properties[I]})}),Ge}}}if(Object.keys(j).forEach(xe=>{(Array.isArray(j[xe])||typeof j[xe]=="object")&&!Ye.isKey(xe)&&(j[xe]=k.resolveSchema(j[xe],xe,le.concat(xe)))}),le){let xe=le[le.length-1];if(xe==="properties"||xe==="items")return j}return f.wrap(j)},k},Vc=zc,ka=Dt,va=cn,Et=pa(sc(),1),Qm=Et.default.binaryOptions,Zm=Et.default.boolOptions,eg=Et.default.intOptions,tg=Et.default.nullOptions,ng=Et.default.strOptions,rg=Et.default.Schema,ig=Et.default.Alias,og=Et.default.Collection,ag=Et.default.Merge,sg=Et.default.Node,lg=Et.default.Pair,cg=Et.default.Scalar,Hc=Et.default.YAMLMap,Wc=Et.default.YAMLSeq,_r=Un,dn=new Sc,rt=(l,c,f)=>(console.debug("[json-schema-faker] calling JSONSchemaFaker() is deprecated, call either .generate() or .resolve()"),f&&console.debug("[json-schema-faker] local references are only supported by calling .resolve()"),rt.generate(l,c)),rt.generateWithContext=(l,c)=>{let f=pn(c,l);return ka(f,l,dn,!0)},rt.generate=(l,c)=>va(rt.generateWithContext(l,c)),rt.generateYAML=(l,c)=>_r(rt.generateWithContext(l,c)),rt.resolveWithContext=(l,c,f)=>{typeof c=="string"&&(f=c,c={}),f=f||(typeof process!="undefined"&&typeof process.cwd=="function"?process.cwd():""),f=`${f.replace(/\/+$/,"")}/`;let S=pn(c,l),T={order:1,canRead(k){let L=k.url.replace("/:",":");return S[L]||S[L.split("/").pop()]},read(k,L){try{L(null,this.canRead(k))}catch(Q){L(Q)}}},{$RefParser:v}=fa();return v.bundle(f,l,{resolve:{file:{order:100},http:{order:200},fixedRefs:T},dereference:{circular:"ignore"}}).then(k=>ka(S,k,dn)).catch(k=>{throw new Error(`Error while resolving schema (${k.message})`)})},rt.resolve=(l,c,f)=>rt.resolveWithContext(l,c,f).then(va),rt.resolveYAML=(l,c,f)=>rt.resolveWithContext(l,c,f).then(_r),Tt(),rt.format=wa,rt.option=_e,rt.random=Ae,rt.extend=(l,c)=>(dn.extend(l,c),rt),rt.define=(l,c)=>(dn.define(l,c),rt),rt.reset=l=>(dn.reset(l),Tt(),rt),rt.locate=l=>dn.get(l),rt.VERSION="0.5.5",Yc={...rt},Jc=rt}}),pg=o({"src/src/main.iife.js"(l,c){var f=(ug(),u(p));typeof $RefParser!="undefined"&&typeof JSONPath!="undefined"&&f.setDependencies({...JSONPath,$RefParser}),typeof window!="undefined"&&(window.JSONSchemaFaker=f.default),c.exports=f.default,c.exports.JSONSchemaFaker=f.JSONSchemaFaker}});return pg()})();((e,n)=>{e.JSONSchemaFaker=n()})(typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,()=>Bi);Bi.random.shuffle=function(){return["[placeholder]"]};Bi.option({useDefaultValue:!0,alwaysFakeOptionals:!0});function ou(e){return Bi.generate(e)}var au=async(e,n)=>{let t=new TextEncoder,r=t.encode(e),i=t.encode(n),o=await crypto.subtle.importKey("raw",r,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),a=await crypto.subtle.sign("HMAC",o,i);return Array.from(new Uint8Array(a)).map(s=>s.toString(16).padStart(2,"0")).join("")},su=(e,n)=>{if(typeof e!="string"||typeof n!="string"||e.length!==n.length)return!1;let t=0;for(let r=0;r<e.length;r+=1)t|=e.charCodeAt(r)^n.charCodeAt(r);return t===0};var Lg=require("cross-fetch");var lu=async()=>{if(process.env.NOVU_BRIDGE_ORIGIN)return`${process.env.NOVU_BRIDGE_ORIGIN}/api/novu`;if(process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"&&process.env.NEXT_PUBLIC_VERCEL_URL)return`https://${process.env.NEXT_PUBLIC_VERCEL_URL}/api/novu`;try{if(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"){let n=await(await fetch("http://localhost:2022/.well-known/novu")).json();return`${n.tunnelOrigin}${n.route}`}}catch(e){console.error(e)}return""};function cu(e){return!!e&&typeof e=="object"&&"error"in e&&"message"in e&&"statusCode"in e}var zi=(e,n)=>{if(!e)throw new Ci;return{post:async(t,r)=>{let i=await fetch(`${n}/v1${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`},body:JSON.stringify(r)}),o=await i.json();if(i.ok)return o;throw cu(o)?new Pi(o.statusCode,o.error,o.message):new nr(o)},delete:async t=>(await fetch(`${n}/v1${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`}})).json()}};var mu=require("liquidjs");function Ra(e,n){let t={...e};for(let r of Object.keys(n)){let i=n[r];i&&typeof i=="object"&&!Array.isArray(i)?t[r]=Ra(t[r]||{},i):(Array.isArray(i),t[r]=i)}return t}function Vi(e,n){let t=n.split(".").reduce((r,i)=>{if(r&&typeof r=="object")return r[i]},e);if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"){let r=JSON.stringify(t);return r==="{}"?"":r}return""}function uu(e,n=2,t,r=", "){if(!Array.isArray(e)||e.length===0)return"";let i=t?e.map(s=>typeof s!="object"||!s?"":Vi(s,t)):e;if(i.length===1)return i[0];if(i.length===2)return`${i[0]} and ${i[1]}`;if(i.length===3&&n>=3)return`${i[0]}, ${r}${i[1]} and ${i[2]}`;let o=i.slice(0,n),a=i.length-n;return`${o.join(r)} and ${a} ${a===1?"other":"others"}`}var pu=Bt(require("pluralize"),1);function du(e,n="",t="",r="true"){if(e==null)return"";let i=0;if(Array.isArray(e)?i=e.length:typeof e=="object"?i=Object.keys(e).length:typeof e=="string"?i=+e:typeof e=="number"?i=e:i=Number(e),Number.isNaN(i)&&(i=0),i<=0)return"";let o;return t?o=i===1?n:t:o=(0,pu.default)(n,i),r==="true"?`${i} ${o}`:o}var Dg=require("liquidjs"),hu=Bt(require("pluralize"),1),Fg=require("zod");var Ug="",$g=2,qg="other",jg=", ",Bg=" and ",zg=", and ";function fu(e,n=Ug,t=$g,r=qg,i=jg,o=Bg,a=zg){if(!Array.isArray(e)||e.length===0)return"";let s=n?e.map(y=>typeof y!="object"||!y?"":Vi(y,n)):e,u=s.length;if(u===1)return s[0];if(u===2)return`${s[0]}${o}${s[1]}`;if(t>=u){let y=s.slice(0,u-1),g=s[u-1];return`${y.join(i)}${a}${g}`}let p=s.slice(0,t),d=u-t,h=t===1?o:a;return`${p.join(i)}${h}${d} ${(0,hu.default)(r,d)}`}function Vg(e){return Array.isArray(e)||typeof e=="object"&&e!==null?gu(e):typeof e=="string"?e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):e==null?"":String(e)}var gu=(e,n=0)=>Array.isArray(e)||typeof e=="object"&&e!==null?JSON.stringify(e,null,n).replace(/"/g,"'").replace(/\n/g,"\\n"):e==null?"":String(e);function yu(e){let n=new mu.Liquid({outputEscape:Vg,...e});return n.registerFilter("json",(t,r)=>gu(t,r)),n.registerFilter("digest",uu),n.registerFilter("toSentence",fu),n.registerFilter("pluralize",du),n}var Bn=Bt(require("chalk"),1),et={info:e=>Bn.default.blue(e),warning:e=>Bn.default.yellow(e),error:e=>Bn.default.red(e),success:e=>Bn.default.green(e),underline:e=>Bn.default.underline(e),bold:e=>Bn.default.bold(e)},ct={SUCCESS:et.success("\u2714"),ERROR:et.error("\u2717"),WARNING:et.warning("\u26A0"),INFO:et.info("\u2139"),ARROW:et.bold("\u2192"),MOCK:et.info("\u25CB"),HYDRATED:et.bold(et.info("\u2192")),STEP:et.info("\u03C3"),ACTION:et.info("\u03B1"),DURATION:et.info("\u0394"),PROVIDER:et.info("\u2699"),OUTPUT:et.info("\u21E2"),INPUT:et.info("\u21E0"),WORKFLOW:et.info("\u03C9"),STATE:et.info("\u03C3"),EXECUTE:et.info("\u03B5"),PREVIEW:et.info("\u03C1")};function Hi(e){return e||process.env.NOVU_API_URL||"https://api.novu.co"}function Wi(e){return e||process.env.NOVU_SECRET_KEY||process.env.NOVU_API_KEY||""}var Ia=Bt(require("sanitize-html"),1),Hg=["src","alt","width","height","loading","srcset","sizes","crossorigin","usemap","ismap","class","id","style","title","dir","lang"];function Wg(e){return e.toLowerCase().startsWith("on")}function Yg(e){return e.replace(/<\/([a-zA-Z][a-zA-Z0-9]*)\s*\/[^>]*>/g,"</$1>")}var Jg={allowedTags:Ia.default.defaults.allowedTags.concat(["style","img","html","head","body","link","meta","title"]),allowedAttributes:!1,transformTags:{"*":(e,n)=>{let t={};for(let[r,i]of Object.entries(n))Wg(r)||(t[r]=i);return{tagName:e,attribs:t}},img:(e,n)=>{let t={};for(let[r,i]of Object.entries(n))Hg.includes(r.toLowerCase())&&(t[r]=i);return{tagName:e,attribs:t}}},allowVulnerableTags:!0,parseStyleAttributes:!1,parser:{lowerCaseAttributeNames:!0}},bu=e=>{if(!e)return e;let n=Yg(e),t=/^<!DOCTYPE .*?>/,r=n.match(t),i=(0,Ia.default)(n,Jg);return r?r[0]+i:i},Yi=e=>Object.keys(e).reduce((n,t)=>{let r=e[t];return typeof r=="string"?n[t]=bu(r):Array.isArray(r)?n[t]=r.map(i=>typeof i=="string"?bu(i):typeof i=="object"?Yi(i):i):typeof r=="object"&&r!==null?n[t]=Yi(r):n[t]=r,n},{});function wu(e,n=!0,t=console){n&&(t.info(`
113
- ${et.bold(et.underline("Discovered workflowId:"))} '${e.workflowId}'`),e.steps.forEach((r,i)=>{let o=i===e.steps.length-1,a=o?"\u2514":"\u251C";t.info(`${a} ${ct.STEP} Discovered stepId: '${r.stepId}' Type: '${r.type}'`),r.providers.forEach((s,u)=>{let p=u===r.providers.length-1,d=o?" ":"\u2502",h=p?"\u2514":"\u251C";t.info(`${d} ${h} ${ct.PROVIDER} Discovered provider: '${s.type}'`)})}))}var Su=require("jsonrepair");function Tu(e){let n=e.trim();return(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))&&n.length>2}var xu="__novuJsonString";function Gg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&e[xu]===!0}function Fr(e){if(typeof e=="string"){if(!Tu(e))return e;try{let n=JSON.parse(e);return{[xu]:!0,value:Fr(n)}}catch{return e}}if(Array.isArray(e))return e.map(n=>Fr(n));if(e&&typeof e=="object"){let n={};for(let[t,r]of Object.entries(e))n[t]=Fr(r);return n}return e}function Ur(e){if(Gg(e))return JSON.stringify(Ur(e.value));if(Array.isArray(e))return e.map(n=>Ur(n));if(e&&typeof e=="object"){let n={};for(let[t,r]of Object.entries(e))n[t]=Ur(r);return n}return e}function Kg(e){try{return JSON.parse(e),e}catch{try{return(0,Su.jsonrepair)(e)}catch{return e}}}function ku(e){return Object.fromEntries(Object.entries(e).map(([n,t])=>typeof t=="string"?[n,Tu(t)?Kg(t):t]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[n,ku(t)]:[n,t]))}function vu(e){return!(e!=null&&e.data)||typeof e.data!="object"||Array.isArray(e.data)?e:{...e,data:ku(e.data)}}var Eu=Bt(require("ajv"),1),_u=Bt(require("ajv-formats"),1);var Au=e=>typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));var Ji=class extends _n{constructor(t,r){let i=r.length===1?"it":"them";super(`Tried to use a ${t} in @novu/framework without ${r.join(", ")} installed. Please install ${i} by running \`npm install ${r.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var Gi=async(e,n)=>{let t=new Set;if((await Promise.allSettled(e.map(i=>i.import))).forEach((i,o)=>{let a=e[o];i.status==="fulfilled"&&a.exports.every(u=>i.value[u]!==void 0)||t.add(a.name)}),t.size>0)throw new Ji(n,Array.from(t))};var Ki=class{constructor(){this.requiredImports=[];this.ajv=new Eu.default({useDefaults:!0,removeAdditional:"failing",strict:!1}),(0,_u.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(n){let t=n.type==="object"||!!n.anyOf||!!n.allOf||!!n.oneOf;return t&&await Gi(this.requiredImports,"JSON schema"),t}async validate(n,t){let r=this.compiledSchemas.get(t);r||(r=this.ajv.compile(t),this.compiledSchemas.set(t,r));let i=Au(n);return r(i)?{success:!0,data:i}:{success:!1,errors:r.errors.map(a=>({path:a.instancePath,message:a.message}))}}async transformToJsonSchema(n){return n}};var Xi=class{constructor(){this.requiredImports=[{name:"zod",import:import("zod"),exports:["ZodType"]},{name:"zod-to-json-schema",import:import("zod-to-json-schema"),exports:["zodToJsonSchema"]}]}async canHandle(n){let t=n.safeParseAsync!==void 0;return t&&await Gi(this.requiredImports,"Zod schema"),t}async validate(n,t){let r=await t.safeParseAsync(n);return r.success?{success:!0,data:r.data}:{success:!1,errors:r.error.errors.map(i=>({path:`/${i.path.join("/")}`,message:i.message}))}}async transformToJsonSchema(n){let{zodToJsonSchema:t}=await import("zod-to-json-schema");return t(n)}};var Qi=new Xi,Zi=new Ki,$r=async(e,n)=>{if(await Qi.canHandle(e))return Qi.validate(n,e);if(await Zi.canHandle(e))return Zi.validate(n,e);throw new Error("Invalid schema")},yt=async e=>{if(await Qi.canHandle(e))return Qi.transformToJsonSchema(e);if(await Zi.canHandle(e))return Zi.transformToJsonSchema(e);throw new Error("Invalid schema")};function Ou(){return["development",void 0,"dev"].includes(process.env.NODE_ENV)}var or=class{constructor(n){this.discoveredWorkflows=new Map;this.discoverWorkflowPromises=new Map;this.registeredAgents=new Map;this.version="2.11.2-alpha.0";let t=this.buildOptions(n);this.apiUrl=t.apiUrl,this.secretKey=t.secretKey,this.strictAuthentication=t.strictAuthentication,this.verbose=t.verbose,this.logger=t.logger,this.templateEngine=yu()}buildOptions(n){let t={apiUrl:Hi(n==null?void 0:n.apiUrl),secretKey:Wi(n==null?void 0:n.secretKey),strictAuthentication:!Ou(),verbose:Ou(),logger:console};return(n==null?void 0:n.strictAuthentication)!==void 0?t.strictAuthentication=n.strictAuthentication:process.env.NOVU_STRICT_AUTHENTICATION_ENABLED!==void 0&&(t.strictAuthentication=process.env.NOVU_STRICT_AUTHENTICATION_ENABLED==="true"),(n==null?void 0:n.verbose)!==void 0&&(t.verbose=n.verbose),(n==null?void 0:n.logger)!==void 0&&(t.logger=n.logger),t}log(...n){this.verbose&&this.logger.info(...n)}async addWorkflows(n){for(let t of n){if(this.discoveredWorkflows.has(t.id))continue;let r=this.discoverWorkflowPromises.get(t.id);if(r){await r;continue}let i=this.addWorkflow(t);this.discoverWorkflowPromises.set(t.id,i),await i}}addAgents(n){for(let t of n)this.registeredAgents.set(t.id,t)}getAgent(n){return this.registeredAgents.get(n)}async addWorkflow(n){try{let t=await n.discover();wu(t,this.verbose,this.logger),this.discoveredWorkflows.set(n.id,t)}finally{this.discoverWorkflowPromises.delete(n.id)}}healthCheck(){let n=this.getRegisteredWorkflows(),t=n.length,r=n.reduce((i,o)=>i+o.steps.length,0);return{status:"ok",sdkVersion:"2.11.2-alpha.0",frameworkVersion:"2024-06-26",discovered:{workflows:t,steps:r}}}getWorkflow(n){let t=this.discoveredWorkflows.get(n);if(t)return t;throw new Nr(n)}getStep(n,t){let i=this.getWorkflow(n).steps.find(o=>o.stepId===t);if(i)return i;throw new qi(t)}getRegisteredWorkflows(){return Array.from(this.discoveredWorkflows.values())}discover(){return{workflows:this.getRegisteredWorkflows(),agents:Array.from(this.registeredAgents.keys()).map(n=>({agentId:n}))}}mock(n){try{return ou(n)}catch(t){return this.logger.warn("Failed to mock schema, returning empty object:",t),{}}}async validate(n,t,r,i,o,a,s){let u=await $r(t,n);if(u.success)return u.data;switch(r){case"event":this.throwInvalidEvent(i,o,u.errors);case"step":this.throwInvalidStep(a,i,o,u.errors);case"provider":this.throwInvalidProvider(a,s,i,o,u.errors);default:throw new Error(`Invalid component: '${r}'`)}}throwInvalidProvider(n,t,r,i,o){throw n?t?r==="output"?new _i(i,n,t,o):new Error(`Invalid payload type: '${r}'`):new Error("providerId is required"):new Error("stepId is required")}throwInvalidStep(n,t,r,i){if(!n)throw new Error("stepId is required");switch(t){case"output":throw new vi(r,n,i);case"result":throw new Ai(r,n,i);case"controls":throw new ki(r,n,i);default:throw new Error(`Invalid payload type: '${t}'`)}}throwInvalidEvent(n,t,r){switch(n){case"controls":throw new xi(t,r);case"payload":throw new Cr(t,r);default:throw new Error(`Invalid payload type: '${n}'`)}}executeStepFactory(n,t,r){return async(i,o,a)=>{if(r())return;let s=this.getStep(n.workflowId,i),u=n.action==="preview";if(!u&&i===n.stepId){let g=await this.createStepControls(s,n),P=await this.compileControls(g,n);if(await this.shouldSkip(a==null?void 0:a.skip,P))return t({options:{skip:!0},outputs:{},providers:{}}),{}}let p=this.previewStep.bind(this),d=this.executeStep.bind(this),y=await(u?p:d)(n,{...s,providers:s.providers.map(g=>{var ee;let P=(ee=a==null?void 0:a.providers)==null?void 0:ee[g.type];if(!P)throw new Mi(g.type);return{...g,resolve:P}}),resolve:o});return this.shouldSanitize({stepType:s.type,options:a})&&(y={...y,outputs:Yi(y.outputs)}),i===n.stepId&&t({...y,options:{skip:!1}}),y.outputs}}shouldSanitize({stepType:n,options:t}){return(t==null?void 0:t.disableOutputSanitization)===!0?!1:["email","in_app"].includes(n)}async shouldSkip(n,t){return n?n(t):!1}async executeWorkflow(n){let i=`${{execute:"Executing",preview:"Previewing"}[n.action]||n.action} workflowId:`;this.log(`
114
- ${et.bold(et.underline(i))} '${n.workflowId}'`);let o=this.getWorkflow(n.workflowId),a=process.hrtime(),s={outputs:{},providers:{},options:{skip:!1}},u,p=!1,d=new Promise(Re=>{u=Re}),h=Re=>{if(p)throw new Error("setResult can only be called once per workflow execution");u(),p=!0,s=Re},y=()=>p,g;try{if(n.action==="execute"&&!n.payload)throw new Cr(n.workflowId,{message:"Event `payload` is required"});let Re=await this.createExecutionPayload(n,o),$={...n,payload:Re};await Promise.race([d,o.execute({payload:Re,env:n.env,controls:{},subscriber:n.subscriber,context:n.context,step:{email:this.executeStepFactory($,h,y),sms:this.executeStepFactory($,h,y),inApp:this.executeStepFactory($,h,y),digest:this.executeStepFactory($,h,y),delay:this.executeStepFactory($,h,y),push:this.executeStepFactory($,h,y),chat:this.executeStepFactory($,h,y),custom:this.executeStepFactory($,h,y),throttle:this.executeStepFactory($,h,y)}})])}catch(Re){g=Re}let P=process.hrtime(a),ee=P[0],Z=P[1],B=ee*1e3+Z/1e6,ue=g?ct.ERROR:ct.SUCCESS,ve={execute:"Executed",preview:"Previewed"}[n.action]||n.action;if(this.log(`${ue} ${ve} workflowId: \`${n.workflowId}\``),this.prettyPrintExecute(n,B,g),g)throw g;return{outputs:s.outputs,providers:s.providers,options:s.options,metadata:{status:"success",error:!1,duration:B}}}async createExecutionPayload(n,t){let{payload:r}=n;if(n.action==="preview"){let o=this.mock(t.payload.schema);r=Object.assign(o,r)}return await this.validate(r,t.payload.unknownSchema,"event","payload",n.workflowId)}prettyPrintExecute(n,t,r){if(!this.verbose)return;let i=r?ct.ERROR:ct.SUCCESS,a={execute:"Executed",preview:"Previewed"}[n.action]||n.action,s=r?"Failed to execute":a,u=r?et.error:et.success,p=`${i} ${s} workflowId: '${n.workflowId}`;this.logger.info(`
112
+ laborum`.split(/\W/),fi=si,mi={type:tn.ALLOWED_TYPES},Dc=li,Aa=aa,Fc=ci,gi=ui,Uc=sa,$c=la,va="[a-zA-Z][a-zA-Z0-9+-.]*",yi=`https?://{hostname}(?:${va})+`,qc="(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?",qt={email:"[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}",hostname:"[a-zA-Z]{1,33}\\.[a-z]{2,4}",ipv6:"[a-f\\d]{4}(:[a-f\\d]{4}){7}",uri:yi,slug:"[a-zA-Z\\d_-]+","uri-reference":`${yi}${qc}`,"uri-template":yi.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${va.replace("]*","/]*")}|~[01]))+`,uuid:"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",duration:"^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$"},qt.iri=qt["uri-reference"],qt["iri-reference"]=qt["uri-reference"],qt["idn-email"]=qt.email,qt["idn-hostname"]=qt.hostname,jc=new RegExp(`\\{(${Object.keys(qt).join("|")})\\}`),Bc=ca,zc=pa,Vc={boolean:Oc,null:Pc,array:Mc,integer:Nc,number:ka,object:Dc,string:zc},_r=Vc,Wc=re,Hc=({refs:l,schema:c,container:f,synchronous:S,refDepthMax:T,refDepthMin:A})=>{let k={},L={},Q=0,N,ie;return k.resolveSchema=(j,he,ce)=>{if(j==null)return null;if(typeof j.generate=="function")return j;if(typeof(j.$id||j.id)=="string"&&(delete j.id,delete j.$id,delete j.$schema),typeof j.$ref=="string"){let xe=Math.max(A,T)-1;if(j.$ref==="#"||L[j.$ref]<0||N===j.$ref&&++Q>xe)return j.$ref!=="#"&&ie&&ie.length===ce.length?Ye.getLocalRef(c,j.$ref,S&&l):(delete j.$ref,j);typeof L[j.$ref]=="undefined"&&(L[j.$ref]=ve.number(A,T)-1),ie=ce,N=j.$ref;let Re;j.$ref.indexOf("#/")===-1?Re=l[j.$ref]||null:Re=Ye.getLocalRef(c,j.$ref,S&&l)||null;let Ge;if(typeof Re!="undefined"){if(!Re&&_e("ignoreMissingRefs")!==!0)throw new Error(`Reference not found: ${j.$ref}`);L[j.$ref]-=1,Ye.merge(j,Re||{}),Ge=S&&Re&&Re.$ref}return Ge||delete j.$ref,j}if(Array.isArray(j.allOf)){let xe=j.allOf;delete j.allOf,xe.forEach(Re=>{let Ge=k.resolveSchema(Re,null,ce);Ye.merge(j,typeof Ge.thunk=="function"?Ge.thunk(j):Ge),Array.isArray(j.allOf)&&k.resolveSchema(j,he,ce)})}if(Array.isArray(j.oneOf||j.anyOf)&&ce[ce.length-2]!=="dependencies"){let xe=j.oneOf||j.anyOf;return j.enum&&j.oneOf&&(j.enum=j.enum.filter(Re=>Ye.validate(Re,xe))),{thunk(Re){let Ge=Ye.omitProps(j,["anyOf","oneOf"]),Qe=ve.pick(xe);return Ye.merge(Ge,Qe),xe.forEach(oe=>{oe.required&&oe!==Qe&&oe.required.forEach(I=>{if(Qe.required&&Qe.required.includes(I))return;let C=Ge.required&&Ge.required.includes(I);Ge.properties&&!C&&delete Ge.properties[I],Re&&Re.properties&&delete Re.properties[I]})}),Ge}}}if(Object.keys(j).forEach(xe=>{(Array.isArray(j[xe])||typeof j[xe]=="object")&&!Ye.isKey(xe)&&(j[xe]=k.resolveSchema(j[xe],xe,ce.concat(xe)))}),ce){let xe=ce[ce.length-1];if(xe==="properties"||xe==="items")return j}return f.wrap(j)},k},Yc=Hc,Ea=Dt,_a=cn,Et=fa(uc(),1),tg=Et.default.binaryOptions,ng=Et.default.boolOptions,rg=Et.default.intOptions,ig=Et.default.nullOptions,og=Et.default.strOptions,ag=Et.default.Schema,sg=Et.default.Alias,lg=Et.default.Collection,cg=Et.default.Merge,ug=Et.default.Node,pg=Et.default.Pair,dg=Et.default.Scalar,Jc=Et.default.YAMLMap,Gc=Et.default.YAMLSeq,Rr=Un,dn=new kc,rt=(l,c,f)=>(console.debug("[json-schema-faker] calling JSONSchemaFaker() is deprecated, call either .generate() or .resolve()"),f&&console.debug("[json-schema-faker] local references are only supported by calling .resolve()"),rt.generate(l,c)),rt.generateWithContext=(l,c)=>{let f=pn(c,l);return Ea(f,l,dn,!0)},rt.generate=(l,c)=>_a(rt.generateWithContext(l,c)),rt.generateYAML=(l,c)=>Rr(rt.generateWithContext(l,c)),rt.resolveWithContext=(l,c,f)=>{typeof c=="string"&&(f=c,c={}),f=f||(typeof process!="undefined"&&typeof process.cwd=="function"?process.cwd():""),f=`${f.replace(/\/+$/,"")}/`;let S=pn(c,l),T={order:1,canRead(k){let L=k.url.replace("/:",":");return S[L]||S[L.split("/").pop()]},read(k,L){try{L(null,this.canRead(k))}catch(Q){L(Q)}}},{$RefParser:A}=ya();return A.bundle(f,l,{resolve:{file:{order:100},http:{order:200},fixedRefs:T},dereference:{circular:"ignore"}}).then(k=>Ea(S,k,dn)).catch(k=>{throw new Error(`Error while resolving schema (${k.message})`)})},rt.resolve=(l,c,f)=>rt.resolveWithContext(l,c,f).then(_a),rt.resolveYAML=(l,c,f)=>rt.resolveWithContext(l,c,f).then(Rr),Tt(),rt.format=xa,rt.option=_e,rt.random=ve,rt.extend=(l,c)=>(dn.extend(l,c),rt),rt.define=(l,c)=>(dn.define(l,c),rt),rt.reset=l=>(dn.reset(l),Tt(),rt),rt.locate=l=>dn.get(l),rt.VERSION="0.5.5",Kc={...rt},Xc=rt}}),fg=o({"src/src/main.iife.js"(l,c){var f=(hg(),u(p));typeof $RefParser!="undefined"&&typeof JSONPath!="undefined"&&f.setDependencies({...JSONPath,$RefParser}),typeof window!="undefined"&&(window.JSONSchemaFaker=f.default),c.exports=f.default,c.exports.JSONSchemaFaker=f.JSONSchemaFaker}});return fg()})();((e,n)=>{e.JSONSchemaFaker=n()})(typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,()=>Vi);Vi.random.shuffle=function(){return["[placeholder]"]};Vi.option({useDefaultValue:!0,alwaysFakeOptionals:!0});function lu(e){return Vi.generate(e)}var cu=async(e,n)=>{let t=new TextEncoder,r=t.encode(e),i=t.encode(n),o=await crypto.subtle.importKey("raw",r,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),a=await crypto.subtle.sign("HMAC",o,i);return Array.from(new Uint8Array(a)).map(s=>s.toString(16).padStart(2,"0")).join("")},uu=(e,n)=>{if(typeof e!="string"||typeof n!="string"||e.length!==n.length)return!1;let t=0;for(let r=0;r<e.length;r+=1)t|=e.charCodeAt(r)^n.charCodeAt(r);return t===0};var Ug=require("cross-fetch");var pu=async()=>{if(process.env.NOVU_BRIDGE_ORIGIN)return`${process.env.NOVU_BRIDGE_ORIGIN}/api/novu`;if(process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"&&process.env.NEXT_PUBLIC_VERCEL_URL)return`https://${process.env.NEXT_PUBLIC_VERCEL_URL}/api/novu`;try{if(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"){let n=await(await fetch("http://localhost:2022/.well-known/novu")).json();return`${n.tunnelOrigin}${n.route}`}}catch(e){console.error(e)}return""};function du(e){return!!e&&typeof e=="object"&&"error"in e&&"message"in e&&"statusCode"in e}var Wi=(e,n)=>{if(!e)throw new Mi;return{post:async(t,r)=>{let i=await fetch(`${n}/v1${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`},body:JSON.stringify(r)}),o=await i.json();if(i.ok)return o;throw du(o)?new Ni(o.statusCode,o.error,o.message):new rr(o)},delete:async t=>(await fetch(`${n}/v1${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`}})).json()}};var bu=require("liquidjs");function Pa(e,n){let t={...e};for(let r of Object.keys(n)){let i=n[r];i&&typeof i=="object"&&!Array.isArray(i)?t[r]=Pa(t[r]||{},i):(Array.isArray(i),t[r]=i)}return t}function Hi(e,n){let t=n.split(".").reduce((r,i)=>{if(r&&typeof r=="object")return r[i]},e);if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"){let r=JSON.stringify(t);return r==="{}"?"":r}return""}function hu(e,n=2,t,r=", "){if(!Array.isArray(e)||e.length===0)return"";let i=t?e.map(s=>typeof s!="object"||!s?"":Hi(s,t)):e;if(i.length===1)return i[0];if(i.length===2)return`${i[0]} and ${i[1]}`;if(i.length===3&&n>=3)return`${i[0]}, ${r}${i[1]} and ${i[2]}`;let o=i.slice(0,n),a=i.length-n;return`${o.join(r)} and ${a} ${a===1?"other":"others"}`}var fu=Bt(require("pluralize"),1);function mu(e,n="",t="",r="true"){if(e==null)return"";let i=0;if(Array.isArray(e)?i=e.length:typeof e=="object"?i=Object.keys(e).length:typeof e=="string"?i=+e:typeof e=="number"?i=e:i=Number(e),Number.isNaN(i)&&(i=0),i<=0)return"";let o;return t?o=i===1?n:t:o=(0,fu.default)(n,i),r==="true"?`${i} ${o}`:o}var $g=require("liquidjs"),gu=Bt(require("pluralize"),1),qg=require("zod");var jg="",Bg=2,zg="other",Vg=", ",Wg=" and ",Hg=", and ";function yu(e,n=jg,t=Bg,r=zg,i=Vg,o=Wg,a=Hg){if(!Array.isArray(e)||e.length===0)return"";let s=n?e.map(y=>typeof y!="object"||!y?"":Hi(y,n)):e,u=s.length;if(u===1)return s[0];if(u===2)return`${s[0]}${o}${s[1]}`;if(t>=u){let y=s.slice(0,u-1),g=s[u-1];return`${y.join(i)}${a}${g}`}let p=s.slice(0,t),d=u-t,h=t===1?o:a;return`${p.join(i)}${h}${d} ${(0,gu.default)(r,d)}`}function Yg(e){return Array.isArray(e)||typeof e=="object"&&e!==null?wu(e):typeof e=="string"?e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):e==null?"":String(e)}var wu=(e,n=0)=>Array.isArray(e)||typeof e=="object"&&e!==null?JSON.stringify(e,null,n).replace(/"/g,"'").replace(/\n/g,"\\n"):e==null?"":String(e);function Su(e){let n=new bu.Liquid({outputEscape:Yg,...e});return n.registerFilter("json",(t,r)=>wu(t,r)),n.registerFilter("digest",hu),n.registerFilter("toSentence",yu),n.registerFilter("pluralize",mu),n}var Bn=Bt(require("chalk"),1),et={info:e=>Bn.default.blue(e),warning:e=>Bn.default.yellow(e),error:e=>Bn.default.red(e),success:e=>Bn.default.green(e),underline:e=>Bn.default.underline(e),bold:e=>Bn.default.bold(e)},ct={SUCCESS:et.success("\u2714"),ERROR:et.error("\u2717"),WARNING:et.warning("\u26A0"),INFO:et.info("\u2139"),ARROW:et.bold("\u2192"),MOCK:et.info("\u25CB"),HYDRATED:et.bold(et.info("\u2192")),STEP:et.info("\u03C3"),ACTION:et.info("\u03B1"),DURATION:et.info("\u0394"),PROVIDER:et.info("\u2699"),OUTPUT:et.info("\u21E2"),INPUT:et.info("\u21E0"),WORKFLOW:et.info("\u03C9"),STATE:et.info("\u03C3"),EXECUTE:et.info("\u03B5"),PREVIEW:et.info("\u03C1")};function Yi(e){return e||process.env.NOVU_API_URL||"https://api.novu.co"}function Ji(e){return e||process.env.NOVU_SECRET_KEY||process.env.NOVU_API_KEY||""}var Ma=Bt(require("sanitize-html"),1),Jg=["src","alt","width","height","loading","srcset","sizes","crossorigin","usemap","ismap","class","id","style","title","dir","lang"];function Gg(e){return e.toLowerCase().startsWith("on")}function Kg(e){return e.replace(/<\/([a-zA-Z][a-zA-Z0-9]*)\s*\/[^>]*>/g,"</$1>")}var Xg={allowedTags:Ma.default.defaults.allowedTags.concat(["style","img","html","head","body","link","meta","title"]),allowedAttributes:!1,transformTags:{"*":(e,n)=>{let t={};for(let[r,i]of Object.entries(n))Gg(r)||(t[r]=i);return{tagName:e,attribs:t}},img:(e,n)=>{let t={};for(let[r,i]of Object.entries(n))Jg.includes(r.toLowerCase())&&(t[r]=i);return{tagName:e,attribs:t}}},allowVulnerableTags:!0,parseStyleAttributes:!1,parser:{lowerCaseAttributeNames:!0}},Tu=e=>{if(!e)return e;let n=Kg(e),t=/^<!DOCTYPE .*?>/,r=n.match(t),i=(0,Ma.default)(n,Xg);return r?r[0]+i:i},Gi=e=>Object.keys(e).reduce((n,t)=>{let r=e[t];return typeof r=="string"?n[t]=Tu(r):Array.isArray(r)?n[t]=r.map(i=>typeof i=="string"?Tu(i):typeof i=="object"?Gi(i):i):typeof r=="object"&&r!==null?n[t]=Gi(r):n[t]=r,n},{});function xu(e,n=!0,t=console){n&&(t.info(`
113
+ ${et.bold(et.underline("Discovered workflowId:"))} '${e.workflowId}'`),e.steps.forEach((r,i)=>{let o=i===e.steps.length-1,a=o?"\u2514":"\u251C";t.info(`${a} ${ct.STEP} Discovered stepId: '${r.stepId}' Type: '${r.type}'`),r.providers.forEach((s,u)=>{let p=u===r.providers.length-1,d=o?" ":"\u2502",h=p?"\u2514":"\u251C";t.info(`${d} ${h} ${ct.PROVIDER} Discovered provider: '${s.type}'`)})}))}var ku=require("jsonrepair");function Au(e){let n=e.trim();return(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))&&n.length>2}var vu="__novuJsonString";function Qg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&e[vu]===!0}function Ur(e){if(typeof e=="string"){if(!Au(e))return e;try{let n=JSON.parse(e);return{[vu]:!0,value:Ur(n)}}catch{return e}}if(Array.isArray(e))return e.map(n=>Ur(n));if(e&&typeof e=="object"){let n={};for(let[t,r]of Object.entries(e))n[t]=Ur(r);return n}return e}function $r(e){if(Qg(e))return JSON.stringify($r(e.value));if(Array.isArray(e))return e.map(n=>$r(n));if(e&&typeof e=="object"){let n={};for(let[t,r]of Object.entries(e))n[t]=$r(r);return n}return e}function Zg(e){try{return JSON.parse(e),e}catch{try{return(0,ku.jsonrepair)(e)}catch{return e}}}function Eu(e){return Object.fromEntries(Object.entries(e).map(([n,t])=>typeof t=="string"?[n,Au(t)?Zg(t):t]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[n,Eu(t)]:[n,t]))}function _u(e){return!(e!=null&&e.data)||typeof e.data!="object"||Array.isArray(e.data)?e:{...e,data:Eu(e.data)}}var Ou=Bt(require("ajv"),1),Iu=Bt(require("ajv-formats"),1);var Ru=e=>typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));var Ki=class extends _n{constructor(t,r){let i=r.length===1?"it":"them";super(`Tried to use a ${t} in @novu/framework without ${r.join(", ")} installed. Please install ${i} by running \`npm install ${r.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var Xi=async(e,n)=>{let t=new Set;if((await Promise.allSettled(e.map(i=>i.import))).forEach((i,o)=>{let a=e[o];i.status==="fulfilled"&&a.exports.every(u=>i.value[u]!==void 0)||t.add(a.name)}),t.size>0)throw new Ki(n,Array.from(t))};var Qi=class{constructor(){this.requiredImports=[];this.ajv=new Ou.default({useDefaults:!0,removeAdditional:"failing",strict:!1}),(0,Iu.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(n){let t=n.type==="object"||!!n.anyOf||!!n.allOf||!!n.oneOf;return t&&await Xi(this.requiredImports,"JSON schema"),t}async validate(n,t){let r=this.compiledSchemas.get(t);r||(r=this.ajv.compile(t),this.compiledSchemas.set(t,r));let i=Ru(n);return r(i)?{success:!0,data:i}:{success:!1,errors:r.errors.map(a=>({path:a.instancePath,message:a.message}))}}async transformToJsonSchema(n){return n}};var Zi=class{constructor(){this.requiredImports=[{name:"zod",import:import("zod"),exports:["ZodType"]},{name:"zod-to-json-schema",import:import("zod-to-json-schema"),exports:["zodToJsonSchema"]}]}async canHandle(n){let t=n.safeParseAsync!==void 0;return t&&await Xi(this.requiredImports,"Zod schema"),t}async validate(n,t){let r=await t.safeParseAsync(n);return r.success?{success:!0,data:r.data}:{success:!1,errors:r.error.issues.map(i=>({path:`/${i.path.join("/")}`,message:i.message}))}}async transformToJsonSchema(n){let{zodToJsonSchema:t}=await import("zod-to-json-schema");return t(n)}};var eo=new Zi,to=new Qi,qr=async(e,n)=>{if(await eo.canHandle(e))return eo.validate(n,e);if(await to.canHandle(e))return to.validate(n,e);throw new Error("Invalid schema")},yt=async e=>{if(await eo.canHandle(e))return eo.transformToJsonSchema(e);if(await to.canHandle(e))return to.transformToJsonSchema(e);throw new Error("Invalid schema")};function Cu(){return["development",void 0,"dev"].includes(process.env.NODE_ENV)}var ar=class{constructor(n){this.discoveredWorkflows=new Map;this.discoverWorkflowPromises=new Map;this.registeredAgents=new Map;this.version="2.11.2-alpha.0";let t=this.buildOptions(n);this.apiUrl=t.apiUrl,this.secretKey=t.secretKey,this.strictAuthentication=t.strictAuthentication,this.verbose=t.verbose,this.logger=t.logger,this.templateEngine=Su()}buildOptions(n){let t={apiUrl:Yi(n==null?void 0:n.apiUrl),secretKey:Ji(n==null?void 0:n.secretKey),strictAuthentication:!Cu(),verbose:Cu(),logger:console};return(n==null?void 0:n.strictAuthentication)!==void 0?t.strictAuthentication=n.strictAuthentication:process.env.NOVU_STRICT_AUTHENTICATION_ENABLED!==void 0&&(t.strictAuthentication=process.env.NOVU_STRICT_AUTHENTICATION_ENABLED==="true"),(n==null?void 0:n.verbose)!==void 0&&(t.verbose=n.verbose),(n==null?void 0:n.logger)!==void 0&&(t.logger=n.logger),t}log(...n){this.verbose&&this.logger.info(...n)}async addWorkflows(n){for(let t of n){if(this.discoveredWorkflows.has(t.id))continue;let r=this.discoverWorkflowPromises.get(t.id);if(r){await r;continue}let i=this.addWorkflow(t);this.discoverWorkflowPromises.set(t.id,i),await i}}addAgents(n){for(let t of n)this.registeredAgents.set(t.id,t)}getAgent(n){return this.registeredAgents.get(n)}async addWorkflow(n){try{let t=await n.discover();xu(t,this.verbose,this.logger),this.discoveredWorkflows.set(n.id,t)}finally{this.discoverWorkflowPromises.delete(n.id)}}healthCheck(){let n=this.getRegisteredWorkflows(),t=n.length,r=n.reduce((i,o)=>i+o.steps.length,0);return{status:"ok",sdkVersion:"2.11.2-alpha.0",frameworkVersion:"2024-06-26",discovered:{workflows:t,steps:r}}}getWorkflow(n){let t=this.discoveredWorkflows.get(n);if(t)return t;throw new Lr(n)}getStep(n,t){let i=this.getWorkflow(n).steps.find(o=>o.stepId===t);if(i)return i;throw new Bi(t)}getRegisteredWorkflows(){return Array.from(this.discoveredWorkflows.values())}discover(){return{workflows:this.getRegisteredWorkflows(),agents:Array.from(this.registeredAgents.keys()).map(n=>({agentId:n}))}}mock(n){try{return lu(n)}catch(t){return this.logger.warn("Failed to mock schema, returning empty object:",t),{}}}async validate(n,t,r,i,o,a,s){let u=await qr(t,n);if(u.success)return u.data;switch(r){case"event":this.throwInvalidEvent(i,o,u.errors);case"step":this.throwInvalidStep(a,i,o,u.errors);case"provider":this.throwInvalidProvider(a,s,i,o,u.errors);default:throw new Error(`Invalid component: '${r}'`)}}throwInvalidProvider(n,t,r,i,o){throw n?t?r==="output"?new Oi(i,n,t,o):new Error(`Invalid payload type: '${r}'`):new Error("providerId is required"):new Error("stepId is required")}throwInvalidStep(n,t,r,i){if(!n)throw new Error("stepId is required");switch(t){case"output":throw new Ei(r,n,i);case"result":throw new _i(r,n,i);case"controls":throw new vi(r,n,i);default:throw new Error(`Invalid payload type: '${t}'`)}}throwInvalidEvent(n,t,r){switch(n){case"controls":throw new Ai(t,r);case"payload":throw new Pr(t,r);default:throw new Error(`Invalid payload type: '${n}'`)}}executeStepFactory(n,t,r){return async(i,o,a)=>{if(r())return;let s=this.getStep(n.workflowId,i),u=n.action==="preview";if(!u&&i===n.stepId){let g=await this.createStepControls(s,n),P=await this.compileControls(g,n);if(await this.shouldSkip(a==null?void 0:a.skip,P))return t({options:{skip:!0},outputs:{},providers:{}}),{}}let p=this.previewStep.bind(this),d=this.executeStep.bind(this),y=await(u?p:d)(n,{...s,providers:s.providers.map(g=>{var ee;let P=(ee=a==null?void 0:a.providers)==null?void 0:ee[g.type];if(!P)throw new Li(g.type);return{...g,resolve:P}}),resolve:o});return this.shouldSanitize({stepType:s.type,options:a})&&(y={...y,outputs:Gi(y.outputs)}),i===n.stepId&&t({...y,options:{skip:!1}}),y.outputs}}shouldSanitize({stepType:n,options:t}){return(t==null?void 0:t.disableOutputSanitization)===!0?!1:["email","in_app"].includes(n)}async shouldSkip(n,t){return n?n(t):!1}async executeWorkflow(n){let i=`${{execute:"Executing",preview:"Previewing"}[n.action]||n.action} workflowId:`;this.log(`
114
+ ${et.bold(et.underline(i))} '${n.workflowId}'`);let o=this.getWorkflow(n.workflowId),a=process.hrtime(),s={outputs:{},providers:{},options:{skip:!1}},u,p=!1,d=new Promise(Oe=>{u=Oe}),h=Oe=>{if(p)throw new Error("setResult can only be called once per workflow execution");u(),p=!0,s=Oe},y=()=>p,g;try{if(n.action==="execute"&&!n.payload)throw new Pr(n.workflowId,{message:"Event `payload` is required"});let Oe=await this.createExecutionPayload(n,o),$={...n,payload:Oe};await Promise.race([d,o.execute({payload:Oe,env:n.env,controls:{},subscriber:n.subscriber,context:n.context,step:{email:this.executeStepFactory($,h,y),sms:this.executeStepFactory($,h,y),inApp:this.executeStepFactory($,h,y),digest:this.executeStepFactory($,h,y),delay:this.executeStepFactory($,h,y),push:this.executeStepFactory($,h,y),chat:this.executeStepFactory($,h,y),custom:this.executeStepFactory($,h,y),throttle:this.executeStepFactory($,h,y)}})])}catch(Oe){g=Oe}let P=process.hrtime(a),ee=P[0],Z=P[1],B=ee*1e3+Z/1e6,ue=g?ct.ERROR:ct.SUCCESS,Ae={execute:"Executed",preview:"Previewed"}[n.action]||n.action;if(this.log(`${ue} ${Ae} workflowId: \`${n.workflowId}\``),this.prettyPrintExecute(n,B,g),g)throw g;return{outputs:s.outputs,providers:s.providers,options:s.options,metadata:{status:"success",error:!1,duration:B}}}async createExecutionPayload(n,t){let{payload:r}=n;if(n.action==="preview"){let o=this.mock(t.payload.schema);r=Object.assign(o,r)}return await this.validate(r,t.payload.unknownSchema,"event","payload",n.workflowId)}prettyPrintExecute(n,t,r){if(!this.verbose)return;let i=r?ct.ERROR:ct.SUCCESS,a={execute:"Executed",preview:"Previewed"}[n.action]||n.action,s=r?"Failed to execute":a,u=r?et.error:et.success,p=`${i} ${s} workflowId: '${n.workflowId}`;this.logger.info(`
115
115
  ${et.bold(u(p))}'
116
116
  \u251C ${ct.STEP} stepId: '${n.stepId}'
117
117
  \u251C ${ct.ACTION} action: '${n.action}'
118
118
  \u2514 ${ct.DURATION} duration: '${t.toFixed(2)}ms'
119
- `)}async executeProviders(n,t,r){return t.providers.reduce(async(i,o)=>{let a=await i,s=this.previewProvider.bind(this),u=this.executeProvider.bind(this),d=await(n.action==="preview"?s:u)(n,t,o,r);return{...a,[o.type]:d}},Promise.resolve({}))}previewProvider(n,t,r,i){return this.log(` ${ct.MOCK} Mocked provider: \`${r.type}\``),this.mock(r.outputs.schema)}async executeProvider(n,t,r,i){try{if(n.stepId===t.stepId){let o=await this.createStepControls(t,n),a=await r.resolve({controls:o,outputs:i}),s=await this.validate(a,r.outputs.unknownSchema,"step","output",n.workflowId,t.stepId,r.type);return this.log(` ${ct.SUCCESS} Executed provider: \`${r.type}\``),{...s,_passthrough:a._passthrough}}else return this.log(` ${ct.HYDRATED} Hydrated provider: \`${r.type}\``),{}}catch(o){throw this.log(` ${ct.ERROR} Failed to execute provider: \`${r.type}\``),new Ni(r.type,n.action,o)}}async executeStep(n,t){if(n.stepId===t.stepId)try{let r=await this.createStepControls(t,n),i=await this.compileControls(r,n),o=await t.resolve(i),a=await this.validate(o,t.outputs.unknownSchema,"step","output",n.workflowId,t.stepId),s=await this.executeProviders(n,t,a);return this.log(` ${ct.SUCCESS} Executed stepId: \`${t.stepId}\``),{outputs:a,providers:s}}catch(r){throw this.log(` ${ct.ERROR} Failed to execute stepId: \`${t.stepId}\``),$n(r)?r:new Mr(t.stepId,n.action,r)}else try{let r=this.getStepState(n,t.stepId);if(r){let i=await this.validate(r.outputs,t.results.unknownSchema,"step","result",n.workflowId,t.stepId);return this.log(` ${ct.HYDRATED} Hydrated stepId: \`${t.stepId}\``),{outputs:i,providers:await this.executeProviders(n,t,i)}}else throw new Ti(n.workflowId,t.stepId)}catch(r){throw this.log(` ${ct.ERROR} Failed to hydrate stepId: \`${t.stepId}\``),r}}async compileControls(n,t){var r;try{let i=Fr(n),o=this.preprocessTranslationPatterns(JSON.stringify(i));o=this.preprocessFilterTranslationArgs(o);let a=this.templateEngine.parse(o),s=this.getWorkflow(t.workflowId),u={workflow:{workflowId:s.workflowId,name:s.name,description:s.description,tags:s.tags,severity:s.severity},payload:t.payload,subscriber:t.subscriber,...t.actor&&{actor:t.actor},context:t.context,steps:Xg(t.state),env:(r=t.env)!=null?r:{}},p=await this.templateEngine.render(a,u),d=this.postprocessTranslationMarkers(p),h=(0,Ru.jsonrepair)(d),y=JSON.parse(h),g=Ur(y);return vu(g)}catch(i){throw new Ei(t.workflowId,t.stepId,i)}}preprocessTranslationPatterns(n){return n.replace(/\{\{\s*t\.([\p{L}\p{N}_.-]+)\s*\}\}/gu,"[T:$1]")}preprocessFilterTranslationArgs(n){return n.replace(/'t\.([\p{L}\p{N}_.-]+)'/gu,"'[T:$1]'")}postprocessTranslationMarkers(n){return n.replace(/\[T:([\p{L}\p{N}_.-]+)\]/gu,"{{t.$1}}")}async createStepControls(n,t){return await this.validate(t.controls,n.controls.unknownSchema,"step","controls",t.workflowId,n.stepId)}async previewStep(n,t){try{return await this.constructStepForPreview(n,t)}catch(r){throw this.log(` ${ct.ERROR} Failed to preview stepId: \`${t.stepId}\``),$n(r)?r:new Mr(t.stepId,n.action,r)}}async constructStepForPreview(n,t){return n.stepId===t.stepId?await this.previewRequiredStep(t,n):await this.extractMockDataForPreviousSteps(n,t)}async extractMockDataForPreviousSteps(n,t){let r={},i=this.getStepState(n,t.stepId),o=this.mock(t.results.schema);return{outputs:Ra(o,(i==null?void 0:i.outputs)||{}),providers:await this.executeProviders(n,t,r)}}async previewRequiredStep(n,t){let r=await this.createStepControls(n,t),i=await this.compileControls(r,t),o=await n.resolve(i),a=await this.validate(o,n.outputs.unknownSchema,"step","output",t.workflowId,n.stepId);return this.log(` ${ct.MOCK} Mocked stepId: \`${n.stepId}\``),{outputs:a,providers:await this.executeProviders(t,n,a)}}getStepState(n,t){return n.state.find(r=>r.stepId===t)}getStepCode(n,t){return{code:this.getStep(n,t).resolve.toString()}}getWorkflowCode(n){return{code:this.getWorkflow(n).execute.toString()}}getCode(n,t){let r;if(n)t?r=this.getStepCode(n,t):r=this.getWorkflowCode(n);else throw new Nr(n);return r}};function Xg(e){let n={};for(let t of e)n[t.stepId]=t.outputs;return n}var Qg={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",408:"Request Timeout",409:"Conflict",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"};function eo(e){return typeof e=="string"&&e.trim()?e:!e||typeof e!="object"?null:eo(e.message)}function Zg(e){if(!e)return null;let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object")return null;let t=n,r=eo(t.message);if(r)return r;let i=eo(t.error);if(i)return i;let o=t.errors;return Array.isArray(o)?eo(o[0]):null}var yn=class extends Error{constructor(n,t){var a;let r=(a=Qg[n])!=null?a:n,i=Zg(t),o=i?`Delivery failed: ${r}: ${i}`:`Delivery failed: ${r}`;super(o),this.name="AgentDeliveryError",this.statusCode=n,this.responseBody=t}};var Iu=Symbol.for("novu.agent.runtimeContext");var Ca=(i=>(i.ON_MESSAGE="onMessage",i.ON_ACTION="onAction",i.ON_RESOLVE="onResolve",i.ON_REACTION="onReaction",i))(Ca||{}),ar=class{constructor(){this.__novuPendingApproval=!0}};function Cu(e){return"type"in e&&e.type==="card"}function Pu(e){return typeof e=="object"&&e!==null&&e.type==="tool-approval-card"}var Mu="tool-approval";function ey(e){return e==="approve"||e==="deny"}function Pa(e,n){return`${Mu}:${e}:${n}`}function Nu(e){let[n,t,...r]=(e!=null?e:"").split(":"),i=r.join(":");return n!==Mu||!ey(t)||!i?null:{approved:t==="approve",approvalId:i}}async function Lu(e,n,t,r){var p,d;let i=r!=null?r:n.id,o={approve:Pa("approve",i),deny:Pa("deny",i)},a=h=>({type:"tool-approval-card",...h}),s=(d=(p=t==null?void 0:t.renderApproval)==null?void 0:p.call(t,{toolCall:n,actionIds:o,approvalCard:a}))!=null?d:a(),u={approvalId:i,toolCallId:n.id,name:n.name,input:n.input};if(e.emitToolApprovalRequest(u),Pu(s)){await e.replyApprovalCard(s);return}await e.reply(s)}var gS=5*1024*1024,yS=5*1024*1024,Df=32768,bS=/^[A-Za-z0-9+/]*={0,2}$/;function ti(e,n){return e.filename?`"${e.filename}"`:`at index ${n}`}function Uf(){return globalThis.Buffer}function wS(e){var n,t,r;return(r=(t=(n=Uf())==null?void 0:n.isBuffer)==null?void 0:t.call(n,e))!=null?r:!1}function SS(e){return typeof Blob!="undefined"&&e instanceof Blob}function El(e){let n=Uf();if(n)return n.from(e).toString("base64");if(typeof btoa!="function")throw new Error("Unable to encode file data: base64 encoding is not available in this runtime.");let t="";for(let r=0;r<e.length;r+=Df){let i=e.subarray(r,r+Df);t+=String.fromCharCode(...i)}return btoa(t)}function $f(e){let n=e.replace(/\s/g,""),t=n.length%4;if(!n||t===1||!bS.test(n))return null;let r=n.endsWith("==")?2:n.endsWith("=")?1:0;return Math.floor(n.length*3/4)-r}function Zr(e,n,t){if(e>gS)throw new Error(`Invalid file ${ti(n,t)}: inline data must be 5 MB or smaller. Use a publicly-accessible URL for larger files.`)}async function TS(e,n,t){if(typeof e=="string"){let r=$f(e);if(r===null)throw new Error(`Invalid file ${ti(n,t)}: data must be a base64-encoded string.`);return Zr(r,n,t),e}if(wS(e))return Zr(e.byteLength,n,t),e.toString("base64");if(e instanceof Uint8Array)return Zr(e.byteLength,n,t),El(e);if(e instanceof ArrayBuffer)return Zr(e.byteLength,n,t),El(new Uint8Array(e));if(SS(e))return Zr(e.size,n,t),El(new Uint8Array(await e.arrayBuffer()));throw new Error(`Invalid file ${ti(n,t)}: data must be a base64 string, Buffer, Uint8Array, ArrayBuffer, or Blob.`)}async function xS(e){if(!(e!=null&&e.length))return;let n=[],t=0;for(let[r,i]of e.entries()){let o=i.data,a=i.url,s=o!=null,u=a!=null;if(s===u)throw new Error(`Invalid file ${ti(i,r)}: provide exactly one of data or url.`);if(s){let p=await TS(o,i,r),d=$f(p);if(t+=d!=null?d:0,t>yS)throw new Error("Invalid files: total inline data must be 5 MB or smaller. Use publicly-accessible URLs for larger files.");n.push({...i,data:p});continue}if(u&&typeof a!="string")throw new Error(`Invalid file ${ti(i,r)}: url must be a string.`);n.push(i)}return n}async function qf(e,n){let t=await xS(n);if(typeof e=="string")return t?{markdown:e,files:t}:{markdown:e};let{isJSX:r,toCardElement:i}=await Promise.resolve().then(()=>(Lf(),Nf));if(r(e)){let o=i(e);if(o)return t?{card:o,files:t}:{card:o}}if(Cu(e))return t?{card:e,files:t}:{card:e};throw new Error("Invalid message content \u2014 expected string or CardElement")}var ei=class{constructor(n,t,r,i,o){this.conversationId=r;this.integrationIdentifier=i;this.poster=o;this.editedByHandler=!1;this.messageId=n,this.platformThreadId=t}async edit(n,t){this.editedByHandler=!0;let r=await this.poster.post({conversationId:this.conversationId,integrationIdentifier:this.integrationIdentifier,edit:{messageId:this.messageId,content:await qf(n,t==null?void 0:t.files)}});if(!r)throw new Error("Agent edit did not return a message handle");return this.messageId=r.messageId,this.platformThreadId=r.platformThreadId,this}async delete(){await this.poster.post({conversationId:this.conversationId,integrationIdentifier:this.integrationIdentifier,deleteMessages:[{messageId:this.messageId}]})}},Ff;Ff=Iu;var Bo=class{constructor(n,t,r){this[Ff]=!0;this._signals=[];this._toolResults=[];this._pendingToolApprovalRequest=null;this._pendingReactions=[];this._pendingDeletes=[];this._resolveSignal=null;var s,u;this.event=n.event,this.action=(s=n.action)!=null?s:null,this.message=n.message,this.reaction=n.reaction,this.conversation=n.conversation,this.subscriber=n.subscriber,this.history=n.history,this.platform=n.platform,this.platformContext=n.platformContext,this._replyUrl=n.replyUrl,this._conversationId=n.conversationId,this._integrationIdentifier=n.integrationIdentifier,this._secretKey=t,this._poster={post:p=>this._post(p)},this._toolApprovalConfig=r,this._metadataState={...(u=n.conversation.metadata)!=null?u:{}};let i=this;this.metadata={get(p){return i._metadataState[p]},set(p,d){i._metadataState[p]=d,i._signals.push({type:"metadata",action:"set",key:p,value:d})},delete(p){delete i._metadataState[p],i._signals.push({type:"metadata",action:"delete",key:p})},clear(){i._metadataState={},i._signals.push({type:"metadata",action:"clear"})},get current(){return{...i._metadataState}}};let o=p=>this._post({conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,typing:p}).then(()=>{}),a=(p=>o(p===void 0?{}:{status:p}));a.stop=()=>o("stop"),this.typing=a,this.toolApproval={request:async p=>(await Lu(this,p,this._toolApprovalConfig),new ar)}}asMessageContext(){return this}async reply(n,t){let r=await qf(n,t==null?void 0:t.files),i={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,reply:r};this._drainSideEffects(i);let o=await this._post(i);if(!o)throw new Error("Agent reply did not return a message handle");return new ei(o.messageId,o.platformThreadId,this._conversationId,this._integrationIdentifier,this._poster)}async replyApprovalCard(n){let t={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,reply:{toolApprovalCard:n}};this._drainSideEffects(t);let r=await this._post(t);if(!r)throw new Error("Agent approval card reply did not return a message handle");return new ei(r.messageId,r.platformThreadId,this._conversationId,this._integrationIdentifier,this._poster)}createReplyHandle(n){return new ei(n,"",this._conversationId,this._integrationIdentifier,this._poster)}resolve(n){this._resolveSignal={summary:n}}trigger(n,t){this._signals.push({...t,type:"trigger",workflowId:n})}emitToolApprovalRequest(n){if(this._pendingToolApprovalRequest)throw new Error("Only one tool approval request can be queued before the next reply");this._pendingToolApprovalRequest=n}emitToolResult(n){this._toolResults.push(n)}addReaction(n,t){this._pendingReactions.push({messageId:n,emojiName:t})}deleteMessage(n){this._pendingDeletes.push({messageId:n})}async flush(){if(!this._hasPendingSideEffects())return;let n={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier};this._drainSideEffects(n),await this._post(n)}_hasPendingSideEffects(){return!!(this._pendingToolApprovalRequest||this._signals.length||this._toolResults.length||this._resolveSignal||this._pendingReactions.length||this._pendingDeletes.length)}_drainSideEffects(n){this._pendingToolApprovalRequest&&(n.toolApprovalRequest=this._pendingToolApprovalRequest,this._pendingToolApprovalRequest=null),this._signals.length&&(n.signals=this._signals,this._signals=[]),this._toolResults.length&&(n.toolResults=this._toolResults,this._toolResults=[]),this._pendingReactions.length&&(n.addReactions=this._pendingReactions,this._pendingReactions=[]),this._pendingDeletes.length&&(n.deleteMessages=this._pendingDeletes,this._pendingDeletes=[]),this._resolveSignal&&(n.resolve=this._resolveSignal,this._resolveSignal=null)}async _post(n){let t=await fetch(this._replyUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${this._secretKey}`},body:JSON.stringify(n)});if(!t.ok){let i=await t.text().catch(()=>"");throw new yn(t.status,i)}let r=await t.text().catch(()=>"");if(!r)return null;try{let i=JSON.parse(r),o=i&&typeof i=="object"&&"data"in i?i.data:i;if(o&&typeof o.messageId=="string"&&typeof o.platformThreadId=="string")return{messageId:o.messageId,platformThreadId:o.platformThreadId}}catch{}return null}};function kS(e,n){var t;for(let r of e){let i=r.toolData;if(r.type==="tool_approval_request"&&(i==null?void 0:i.approvalId)===n&&i.toolCallId)return{approvalId:i.approvalId,toolCallId:i.toolCallId,name:(t=i.toolName)!=null?t:"tool",input:i.input}}}async function jf(e){var t,r;let n=new Bo(e.bridge,e.secretKey,e.agent.handlers.toolApproval);try{await vS(e.agent,e.event,n),await n.flush()}catch(i){i instanceof yn?(t=e.logger)==null||t.error(`[agent:${e.agent.id}] ${i.message}`):(r=e.logger)==null||r.error(`[agent:${e.agent.id}] Handler error:`,i)}}async function vS(e,n,t){var i,o;let r=async a=>{a instanceof ar||a===void 0||await t.reply(a)};switch(n){case"onMessage":{await r(await e.handlers.onMessage(t.message,t));break}case"onAction":{let a=Nu((i=t.action)==null?void 0:i.id);if(a&&e.handlers.onToolApproval){let{approved:s,approvalId:u}=a,p=kS(t.history,u),d=p?{id:p.toolCallId,name:p.name,input:p.input}:{id:u,name:""},h=t.createReplyHandle((o=t.action.sourceMessageId)!=null?o:""),y={toolCall:d,approved:s,approvalMessage:h};e.userOnToolApproval===!1&&(await t.typing(),t.action.sourceMessageId&&await h.delete());let g=await e.handlers.onToolApproval(y,t);await r(g);break}e.handlers.onAction&&await r(await e.handlers.onAction(t.action,t));break}case"onReaction":e.handlers.onReaction&&await r(await e.handlers.onReaction(t.reaction,t));break;case"onResolve":e.handlers.onResolve&&await r(await e.handlers.onResolve(t));break;default:throw new qn(n,Ca)}}function Bf(e){let n={};for(let i of e.split(",")){let o=i.trim();if(!o)continue;let a=o.indexOf("=");if(a<=0)continue;let s=o.slice(0,a),u=o.slice(a+1);s&&u&&!(s in n)&&(n[s]=u)}let t=n.t,r=t!==void 0?Number(t):Number.NaN;return{t:Number.isFinite(r)?r:void 0,v1:n.v1}}var hr=class{constructor(n){this.handler=n.handler,this.client=n.client?n.client:new or,this.workflows=n.workflows||[],this.agents=n.agents||[],this.http=zi(this.client.secretKey,this.client.apiUrl),this.frameworkName=n.frameworkName,this.hmacEnabled=this.client.strictAuthentication,this.client.addAgents(this.agents)}createHandler(){return async(...n)=>{await this.client.addWorkflows(this.workflows);let t=await this.handler(...n),r=await this.handleAction({actions:t});return t.transformResponse(r)}}getStaticHeaders(){let n=`novu-framework:v${this.client.version}`;return{"content-type":"application/json","access-control-allow-origin":"*","access-control-allow-private-network":"true","access-control-allow-methods":"GET, POST","access-control-allow-headers":"*","access-control-max-age":"604800","novu-framework-version":"2024-06-26","novu-framework-sdk":"2.11.2-alpha.0","novu-framework-server":this.frameworkName,"user-agent":n}}createResponse(n,t){return{status:n,body:JSON.stringify(t),headers:{...this.getStaticHeaders()}}}createError(n){return{status:n.statusCode,body:JSON.stringify({message:n.message,data:n.data,code:n.code}),headers:this.getStaticHeaders()}}async handleAction({actions:n}){let t=await n.url(),r=await n.method(),i=t.searchParams.get("action")||"health-check",o=t.searchParams.get("workflowId")||"",a=t.searchParams.get("stepId")||"",s=t.searchParams.get("agentId")||"",u=t.searchParams.get("event")||"",p=await n.headers("novu-signature")||"",d={};try{r==="POST"&&(d=await n.body())}catch{}try{i!=="health-check"&&await this.validateHmac(d,p);let h=this.getPostActionMap(d,o,a,i,s,u,n.waitUntil),y=this.getGetActionMap(o,a);if(r==="POST")return await this.handlePostAction(i,h);if(r==="GET")return await this.handleGetAction(i,y);if(r==="OPTIONS")return this.createResponse(200,{})}catch(h){return this.handleError(h)}return this.createError(new Ii(r))}getPostActionMap(n,t,r,i,o,a,s){return{trigger:this.triggerAction({workflowId:t,...n}),execute:async()=>{let u=await this.client.executeWorkflow({...n,workflowId:t,stepId:r,action:i});return this.createResponse(200,u)},preview:async()=>{let u=await this.client.executeWorkflow({...n,workflowId:t,stepId:r,action:i});return this.createResponse(200,u)},"agent-event":async()=>{let u=this.client.getAgent(o);if(!u)return this.createResponse(404,{error:`Agent '${o}' not registered`});let p=jf({agent:u,event:a,bridge:n,secretKey:this.client.secretKey,logger:this.client.logger});return s&&s(p),this.createResponse(200,{status:"ack"})}}}triggerAction(n){return async()=>{let t={name:n.workflowId,to:n.to,payload:(n==null?void 0:n.payload)||{},transactionId:n.transactionId,overrides:n.overrides||{},...n.actor&&{actor:n.actor},...n.bridgeUrl&&{bridgeUrl:n.bridgeUrl},...n.controls&&{controls:n.controls},...n.context&&{context:n.context}},r=await this.http.post("/events/trigger",t);return this.createResponse(200,r)}}getGetActionMap(n,t){return{discover:async()=>{let r=await this.client.discover();return this.createResponse(200,r)},"health-check":async()=>{let r=await this.client.healthCheck();return this.createResponse(200,r)},code:async()=>{let r=await this.client.getCode(n,t);return this.createResponse(200,r)}}}async handlePostAction(n,t){if(Object.values(Rr).includes(n)){let r=t[n];return r()}else throw new qn(n,Rr)}async handleGetAction(n,t){if(Object.values(yi).includes(n)){let r=t[n];return r()}else throw new qn(n,yi)}handleError(n){if($n(n))return n.statusCode>=500&&this.client.logger.error(n),this.createError(n);if(Xc(n))return this.createError(n);{let t=new nr(n);return this.client.logger.error(t),this.createError(t)}}async validateHmac(n,t){if(!this.hmacEnabled)return;if(!t)throw new Di;if(!this.client.secretKey)throw new $i;let r=Bf(t);if(!r.v1||r.t===void 0)throw new Fi;let i=Date.now();if(r.t<i-3e5||r.t>i+3e5)throw new Ui;let o=await au(this.client.secretKey,`${r.t}.${JSON.stringify(n)}`);if(!su(o,r.v1))throw new Li}};Al();var fr=Symbol.for("workflow-serialize"),mr=Symbol.for("workflow-deserialize");var AS=Object.defineProperty,ES=Object.defineProperties,_S=Object.getOwnPropertyDescriptors,Vf=Object.getOwnPropertySymbols,OS=Object.prototype.hasOwnProperty,RS=Object.prototype.propertyIsEnumerable,Hf=(e,n,t)=>n in e?AS(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Gf=(e,n)=>{for(var t in n||(n={}))OS.call(n,t)&&Hf(e,t,n[t]);if(Vf)for(var t of Vf(n))RS.call(n,t)&&Hf(e,t,n[t]);return e},Kf=(e,n)=>ES(e,_S(n)),Ct=(e,n)=>{let t=!1,r=!1;for(let i=0;i<n;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(t=!t)}return t||r},IS=(e,n)=>{let t=e.substring(n,n+3)==="```",r=n>0&&e.substring(n-1,n+2)==="```",i=n>1&&e.substring(n-2,n+1)==="```";return t||r||i},CS=e=>{let n=0;for(let t=0;t<e.length;t+=1){if(e[t]==="\\"&&t+1<e.length&&e[t+1]==="`"){t+=1;continue}e[t]==="`"&&!IS(e,t)&&(n+=1)}return n},Nn=(e,n)=>{let t=!1,r=!1,i=-1;for(let o=0;o<e.length;o+=1){if(e[o]==="\\"&&o+1<e.length&&e[o+1]==="`"){o+=1;continue}if(e.substring(o,o+3)==="```"){r=!r,o+=2;continue}if(!r&&e[o]==="`")if(t){if(i<n&&n<o)return!0;t=!1,i=-1}else t=!0,i=o}return!1},PS=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,MS=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(PS,(n,t,r,i)=>Ct(e,i)?n:`${t}\\>${r}`),NS=/(\*\*)([^*]*\*?)$/,LS=/(__)([^_]*?)$/,DS=/(\*\*\*)([^*]*?)$/,FS=/(\*)([^*]*?)$/,US=/(_)([^_]*?)$/,$S=/(`)([^`]*?)$/,qS=/(~~)([^~]*?)$/,Kn=/^[\s_~*`]*$/,Xf=/^[\s]*[-*+][\s]+$/,jS=/[\p{L}\p{N}_]/u,BS=/^```[^`\n]*```?$/,zS=/^\*{4,}$/,VS=/(__)([^_]+)_$/,HS=/(~~)([^~]+)~$/,Wf=/~~/g,Ln=e=>{if(!e)return!1;let n=e.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===95?!0:jS.test(e)};var WS=(e,n)=>{let t=1;for(let r=n-1;r>=0;r-=1)if(e[r]==="]")t+=1;else if(e[r]==="["&&(t-=1,t===0))return r;return-1},Qf=(e,n)=>{let t=1;for(let r=n+1;r<e.length;r+=1)if(e[r]==="[")t+=1;else if(e[r]==="]"&&(t-=1,t===0))return r;return-1},zo=(e,n)=>{let t=!1,r=!1;for(let i=0;i<e.length&&i<n;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,t=!1):r||(t=!t))}return t||r},YS=(e,n)=>{for(let t=n;t<e.length;t+=1){if(e[t]===")")return!0;if(e[t]===`
120
- `)return!1}return!1},Zf=(e,n)=>{for(let t=n-1;t>=0;t-=1){if(e[t]===")")return!1;if(e[t]==="(")return t>0&&e[t-1]==="]"?YS(e,n):!1;if(e[t]===`
121
- `)return!1}return!1},JS=(e,n)=>{for(let t=n-1;t>=0;t-=1){if(e[t]===">")return!1;if(e[t]==="<"){let r=t+1<e.length?e[t+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[t]===`
122
- `)return!1}return!1},Ol=(e,n,t)=>{let r=0;for(let u=n-1;u>=0;u-=1)if(e[u]===`
119
+ `)}async executeProviders(n,t,r){return t.providers.reduce(async(i,o)=>{let a=await i,s=this.previewProvider.bind(this),u=this.executeProvider.bind(this),d=await(n.action==="preview"?s:u)(n,t,o,r);return{...a,[o.type]:d}},Promise.resolve({}))}previewProvider(n,t,r,i){return this.log(` ${ct.MOCK} Mocked provider: \`${r.type}\``),this.mock(r.outputs.schema)}async executeProvider(n,t,r,i){try{if(n.stepId===t.stepId){let o=await this.createStepControls(t,n),a=await r.resolve({controls:o,outputs:i}),s=await this.validate(a,r.outputs.unknownSchema,"step","output",n.workflowId,t.stepId,r.type);return this.log(` ${ct.SUCCESS} Executed provider: \`${r.type}\``),{...s,_passthrough:a._passthrough}}else return this.log(` ${ct.HYDRATED} Hydrated provider: \`${r.type}\``),{}}catch(o){throw this.log(` ${ct.ERROR} Failed to execute provider: \`${r.type}\``),new Di(r.type,n.action,o)}}async executeStep(n,t){if(n.stepId===t.stepId)try{let r=await this.createStepControls(t,n),i=await this.compileControls(r,n),o=await t.resolve(i),a=await this.validate(o,t.outputs.unknownSchema,"step","output",n.workflowId,t.stepId),s=await this.executeProviders(n,t,a);return this.log(` ${ct.SUCCESS} Executed stepId: \`${t.stepId}\``),{outputs:a,providers:s}}catch(r){throw this.log(` ${ct.ERROR} Failed to execute stepId: \`${t.stepId}\``),$n(r)?r:new Nr(t.stepId,n.action,r)}else try{let r=this.getStepState(n,t.stepId);if(r){let i=await this.validate(r.outputs,t.results.unknownSchema,"step","result",n.workflowId,t.stepId);return this.log(` ${ct.HYDRATED} Hydrated stepId: \`${t.stepId}\``),{outputs:i,providers:await this.executeProviders(n,t,i)}}else throw new ki(n.workflowId,t.stepId)}catch(r){throw this.log(` ${ct.ERROR} Failed to hydrate stepId: \`${t.stepId}\``),r}}async compileControls(n,t){var r;try{let i=Ur(n),o=this.preprocessTranslationPatterns(JSON.stringify(i));o=this.preprocessFilterTranslationArgs(o);let a=this.templateEngine.parse(o),s=this.getWorkflow(t.workflowId),u={workflow:{workflowId:s.workflowId,name:s.name,description:s.description,tags:s.tags,severity:s.severity},payload:t.payload,subscriber:t.subscriber,...t.actor&&{actor:t.actor},context:t.context,steps:ey(t.state),env:(r=t.env)!=null?r:{}},p=await this.templateEngine.render(a,u),d=this.postprocessTranslationMarkers(p),h=(0,Pu.jsonrepair)(d),y=JSON.parse(h),g=$r(y);return _u(g)}catch(i){throw new Ri(t.workflowId,t.stepId,i)}}preprocessTranslationPatterns(n){return n.replace(/\{\{\s*t\.([\p{L}\p{N}_.-]+)\s*\}\}/gu,"[T:$1]")}preprocessFilterTranslationArgs(n){return n.replace(/'t\.([\p{L}\p{N}_.-]+)'/gu,"'[T:$1]'")}postprocessTranslationMarkers(n){return n.replace(/\[T:([\p{L}\p{N}_.-]+)\]/gu,"{{t.$1}}")}async createStepControls(n,t){return await this.validate(t.controls,n.controls.unknownSchema,"step","controls",t.workflowId,n.stepId)}async previewStep(n,t){try{return await this.constructStepForPreview(n,t)}catch(r){throw this.log(` ${ct.ERROR} Failed to preview stepId: \`${t.stepId}\``),$n(r)?r:new Nr(t.stepId,n.action,r)}}async constructStepForPreview(n,t){return n.stepId===t.stepId?await this.previewRequiredStep(t,n):await this.extractMockDataForPreviousSteps(n,t)}async extractMockDataForPreviousSteps(n,t){let r={},i=this.getStepState(n,t.stepId),o=this.mock(t.results.schema);return{outputs:Pa(o,(i==null?void 0:i.outputs)||{}),providers:await this.executeProviders(n,t,r)}}async previewRequiredStep(n,t){let r=await this.createStepControls(n,t),i=await this.compileControls(r,t),o=await n.resolve(i),a=await this.validate(o,n.outputs.unknownSchema,"step","output",t.workflowId,n.stepId);return this.log(` ${ct.MOCK} Mocked stepId: \`${n.stepId}\``),{outputs:a,providers:await this.executeProviders(t,n,a)}}getStepState(n,t){return n.state.find(r=>r.stepId===t)}getStepCode(n,t){return{code:this.getStep(n,t).resolve.toString()}}getWorkflowCode(n){return{code:this.getWorkflow(n).execute.toString()}}getCode(n,t){let r;if(n)t?r=this.getStepCode(n,t):r=this.getWorkflowCode(n);else throw new Lr(n);return r}};function ey(e){let n={};for(let t of e)n[t.stepId]=t.outputs;return n}var ty={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",408:"Request Timeout",409:"Conflict",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"};function no(e){return typeof e=="string"&&e.trim()?e:!e||typeof e!="object"?null:no(e.message)}function ny(e){if(!e)return null;let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object")return null;let t=n,r=no(t.message);if(r)return r;let i=no(t.error);if(i)return i;let o=t.errors;return Array.isArray(o)?no(o[0]):null}function ry(e,n){var i;let t=(i=ty[e])!=null?i:e,r=ny(n);return r?`Delivery failed: ${t}: ${r}`:`Delivery failed: ${t}`}var yn=class extends Error{constructor(n,t){super(n),this.name="AgentError",this.cause=t==null?void 0:t.cause,this.delivery=t==null?void 0:t.delivery}},zn=class extends yn{constructor(n,t){let r={statusCode:n,responseBody:t};super(ry(n,t),{delivery:r}),this.name="AgentDeliveryError",this.statusCode=n,this.responseBody=t}};function jr(e){return e instanceof yn?e:e instanceof Error?new yn(e.message,{cause:e}):new yn("Turn failed",{cause:e})}var Mu=Symbol.for("novu.agent.runtimeContext");var Na=(i=>(i.ON_MESSAGE="onMessage",i.ON_ACTION="onAction",i.ON_RESOLVE="onResolve",i.ON_REACTION="onReaction",i))(Na||{}),sr=class{constructor(){this.__novuPendingApproval=!0}};function Nu(e){return typeof e=="object"&&e!==null&&"suppress"in e&&e.suppress===!0}function ro(e){return"type"in e&&e.type==="card"}function Lu(e){return typeof e=="object"&&e!==null&&e.type==="tool-approval-card"}var Du="tool-approval";function iy(e){return e==="approve"||e==="deny"}function La(e,n){return`${Du}:${e}:${n}`}function Fu(e){let[n,t,...r]=(e!=null?e:"").split(":"),i=r.join(":");return n!==Du||!iy(t)||!i?null:{approved:t==="approve",approvalId:i}}async function Uu(e,n,t,r){var p,d;let i=r!=null?r:n.id,o={approve:La("approve",i),deny:La("deny",i)},a=h=>({type:"tool-approval-card",...h}),s=(d=(p=t==null?void 0:t.renderApproval)==null?void 0:p.call(t,{toolCall:n,actionIds:o,approvalCard:a}))!=null?d:a(),u={approvalId:i,toolCallId:n.id,name:n.name,input:n.input};if(e.emitToolApprovalRequest(u),Lu(s)){await e.replyApprovalCard(s);return}await e.reply(s)}var SS=5*1024*1024,TS=5*1024*1024,$f=32768,xS=/^[A-Za-z0-9+/]*={0,2}$/;function ri(e,n){return e.filename?`"${e.filename}"`:`at index ${n}`}function jf(){return globalThis.Buffer}function kS(e){var n,t,r;return(r=(t=(n=jf())==null?void 0:n.isBuffer)==null?void 0:t.call(n,e))!=null?r:!1}function AS(e){return typeof Blob!="undefined"&&e instanceof Blob}function Ol(e){let n=jf();if(n)return n.from(e).toString("base64");if(typeof btoa!="function")throw new Error("Unable to encode file data: base64 encoding is not available in this runtime.");let t="";for(let r=0;r<e.length;r+=$f){let i=e.subarray(r,r+$f);t+=String.fromCharCode(...i)}return btoa(t)}function Bf(e){let n=e.replace(/\s/g,""),t=n.length%4;if(!n||t===1||!xS.test(n))return null;let r=n.endsWith("==")?2:n.endsWith("=")?1:0;return Math.floor(n.length*3/4)-r}function ti(e,n,t){if(e>SS)throw new Error(`Invalid file ${ri(n,t)}: inline data must be 5 MB or smaller. Use a publicly-accessible URL for larger files.`)}async function vS(e,n,t){if(typeof e=="string"){let r=Bf(e);if(r===null)throw new Error(`Invalid file ${ri(n,t)}: data must be a base64-encoded string.`);return ti(r,n,t),e}if(kS(e))return ti(e.byteLength,n,t),e.toString("base64");if(e instanceof Uint8Array)return ti(e.byteLength,n,t),Ol(e);if(e instanceof ArrayBuffer)return ti(e.byteLength,n,t),Ol(new Uint8Array(e));if(AS(e))return ti(e.size,n,t),Ol(new Uint8Array(await e.arrayBuffer()));throw new Error(`Invalid file ${ri(n,t)}: data must be a base64 string, Buffer, Uint8Array, ArrayBuffer, or Blob.`)}async function ES(e){if(!(e!=null&&e.length))return;let n=[],t=0;for(let[r,i]of e.entries()){let o=i.data,a=i.url,s=o!=null,u=a!=null;if(s===u)throw new Error(`Invalid file ${ri(i,r)}: provide exactly one of data or url.`);if(s){let p=await vS(o,i,r),d=Bf(p);if(t+=d!=null?d:0,t>TS)throw new Error("Invalid files: total inline data must be 5 MB or smaller. Use publicly-accessible URLs for larger files.");n.push({...i,data:p});continue}if(u&&typeof a!="string")throw new Error(`Invalid file ${ri(i,r)}: url must be a string.`);n.push(i)}return n}async function zf(e,n){let t=await ES(n);if(typeof e=="string")return t?{markdown:e,files:t}:{markdown:e};let{isJSX:r,toCardElement:i}=await Promise.resolve().then(()=>(Uf(),Ff));if(r(e)){let o=i(e);if(o)return t?{card:o,files:t}:{card:o}}if(ro(e))return t?{card:e,files:t}:{card:e};throw new Error("Invalid message content \u2014 expected string or CardElement")}var ni=class{constructor(n,t,r,i,o){this.conversationId=r;this.integrationIdentifier=i;this.poster=o;this.editedByHandler=!1;this.messageId=n,this.platformThreadId=t}async edit(n,t){this.editedByHandler=!0;let r=await this.poster.post({conversationId:this.conversationId,integrationIdentifier:this.integrationIdentifier,edit:{messageId:this.messageId,content:await zf(n,t==null?void 0:t.files)}});if(!r)throw new Error("Agent edit did not return a message handle");return this.messageId=r.messageId,this.platformThreadId=r.platformThreadId,this}async delete(){await this.poster.post({conversationId:this.conversationId,integrationIdentifier:this.integrationIdentifier,deleteMessages:[{messageId:this.messageId}]})}},qf;qf=Mu;var Wo=class{constructor(n,t,r){this[qf]=!0;this._signals=[];this._toolResults=[];this._pendingToolApprovalRequest=null;this._pendingReactions=[];this._pendingDeletes=[];this._resolveSignal=null;var s,u;this.event=n.event,this.action=(s=n.action)!=null?s:null,this.message=n.message,this.reaction=n.reaction,this.conversation=n.conversation,this.subscriber=n.subscriber,this.history=n.history,this.platform=n.platform,this.platformContext=n.platformContext,this._replyUrl=n.replyUrl,this._conversationId=n.conversationId,this._integrationIdentifier=n.integrationIdentifier,this._secretKey=t,this._poster={post:p=>this._post(p)},this._toolApprovalConfig=r,this._metadataState={...(u=n.conversation.metadata)!=null?u:{}};let i=this;this.metadata={get(p){return i._metadataState[p]},set(p,d){i._metadataState[p]=d,i._signals.push({type:"metadata",action:"set",key:p,value:d})},delete(p){delete i._metadataState[p],i._signals.push({type:"metadata",action:"delete",key:p})},clear(){i._metadataState={},i._signals.push({type:"metadata",action:"clear"})},get current(){return{...i._metadataState}}};let o=p=>this._post({conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,typing:p}).then(()=>{}),a=(p=>o(p===void 0?{}:{status:p}));a.stop=()=>o("stop"),this.typing=a,this.toolApproval={request:async p=>(await Uu(this,p,this._toolApprovalConfig),new sr)}}asMessageContext(){return this}async reply(n,t){let r=await zf(n,t==null?void 0:t.files),i={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,reply:r};this._drainSideEffects(i);let o=await this._post(i);if(!o)throw new Error("Agent reply did not return a message handle");return new ni(o.messageId,o.platformThreadId,this._conversationId,this._integrationIdentifier,this._poster)}async replyApprovalCard(n){let t={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,reply:{toolApprovalCard:n}};this._drainSideEffects(t);let r=await this._post(t);if(!r)throw new Error("Agent approval card reply did not return a message handle");return new ni(r.messageId,r.platformThreadId,this._conversationId,this._integrationIdentifier,this._poster)}createReplyHandle(n){return new ni(n,"",this._conversationId,this._integrationIdentifier,this._poster)}resolve(n){this._resolveSignal={summary:n}}trigger(n,t){this._signals.push({...t,type:"trigger",workflowId:n})}emitToolApprovalRequest(n){if(this._pendingToolApprovalRequest)throw new Error("Only one tool approval request can be queued before the next reply");this._pendingToolApprovalRequest=n}emitToolResult(n){this._toolResults.push(n)}addReaction(n,t){this._pendingReactions.push({messageId:n,emojiName:t})}deleteMessage(n){this._pendingDeletes.push({messageId:n})}async reportTurnError(){try{await this._post({conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,error:!0})}catch(n){console.error("[agent] Failed to report turn error:",n)}}async flush(){if(!this._hasPendingSideEffects())return;let n={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier};this._drainSideEffects(n),await this._post(n)}_hasPendingSideEffects(){return!!(this._pendingToolApprovalRequest||this._signals.length||this._toolResults.length||this._resolveSignal||this._pendingReactions.length||this._pendingDeletes.length)}_drainSideEffects(n){this._pendingToolApprovalRequest&&(n.toolApprovalRequest=this._pendingToolApprovalRequest,this._pendingToolApprovalRequest=null),this._signals.length&&(n.signals=this._signals,this._signals=[]),this._toolResults.length&&(n.toolResults=this._toolResults,this._toolResults=[]),this._pendingReactions.length&&(n.addReactions=this._pendingReactions,this._pendingReactions=[]),this._pendingDeletes.length&&(n.deleteMessages=this._pendingDeletes,this._pendingDeletes=[]),this._resolveSignal&&(n.resolve=this._resolveSignal,this._resolveSignal=null)}async _post(n){let t=await fetch(this._replyUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${this._secretKey}`},body:JSON.stringify(n)});if(!t.ok){let i=await t.text().catch(()=>"");throw new zn(t.status,i)}let r=await t.text().catch(()=>"");if(!r)return null;try{let i=JSON.parse(r),o=i&&typeof i=="object"&&"data"in i?i.data:i;if(o&&typeof o.messageId=="string"&&typeof o.platformThreadId=="string")return{messageId:o.messageId,platformThreadId:o.platformThreadId}}catch{}return null}};function _S(e){return!!(typeof e=="string"||typeof e=="object"&&e!==null&&ro(e)||typeof e=="object"&&e!==null&&("markdown"in e||"card"in e||"files"in e))}function RS(e,n){return e}function OS(e,n){var t;for(let r of e){let i=r.toolData;if(r.type==="tool_approval_request"&&(i==null?void 0:i.approvalId)===n&&i.toolCallId)return{approvalId:i.approvalId,toolCallId:i.toolCallId,name:(t=i.toolName)!=null?t:"tool",input:i.input}}}async function Vf(e){var o;let n=new Wo(e.bridge,e.secretKey,e.agent.handlers.toolApproval),{agent:t,event:r,logger:i}=e;try{await IS(t,r,n),await n.flush()}catch(a){let s=jr(a);i==null||i.error(`[agent:${t.id}] Turn failed (${r}): ${s.message}`,(o=s.cause)!=null?o:s);let u=!1;if(t.handlers.onError)try{let p=await t.handlers.onError(s,RS(n,r));Nu(p)?u=!0:_S(p)&&(await n.reply(p),u=!0)}catch(p){i==null||i.error(`[agent:${t.id}] onError failed:`,p)}u||await n.reportTurnError()}finally{try{await n.typing.stop()}catch{}}}async function IS(e,n,t){var i,o;let r=async a=>{a instanceof sr||a===void 0||await t.reply(a)};switch(n){case"onMessage":{await r(await e.handlers.onMessage(t.message,t));break}case"onAction":{let a=Fu((i=t.action)==null?void 0:i.id);if(a&&e.handlers.onToolApproval){let{approved:s,approvalId:u}=a,p=OS(t.history,u),d=p?{id:p.toolCallId,name:p.name,input:p.input}:{id:u,name:""},h=t.createReplyHandle((o=t.action.sourceMessageId)!=null?o:""),y={toolCall:d,approved:s,approvalMessage:h};e.userOnToolApproval===!1&&(await t.typing(),t.action.sourceMessageId&&await h.delete());let g=await e.handlers.onToolApproval(y,t);await r(g);break}e.handlers.onAction&&await r(await e.handlers.onAction(t.action,t));break}case"onReaction":e.handlers.onReaction&&await r(await e.handlers.onReaction(t.reaction,t));break;case"onResolve":e.handlers.onResolve&&await r(await e.handlers.onResolve(t));break;default:throw new qn(n,Na)}}function Wf(e){let n={};for(let i of e.split(",")){let o=i.trim();if(!o)continue;let a=o.indexOf("=");if(a<=0)continue;let s=o.slice(0,a),u=o.slice(a+1);s&&u&&!(s in n)&&(n[s]=u)}let t=n.t,r=t!==void 0?Number(t):Number.NaN;return{t:Number.isFinite(r)?r:void 0,v1:n.v1}}var fr=class{constructor(n){this.handler=n.handler,this.client=n.client?n.client:new ar,this.workflows=n.workflows||[],this.agents=n.agents||[],this.http=Wi(this.client.secretKey,this.client.apiUrl),this.frameworkName=n.frameworkName,this.hmacEnabled=this.client.strictAuthentication,this.client.addAgents(this.agents)}createHandler(){return async(...n)=>{await this.client.addWorkflows(this.workflows);let t=await this.handler(...n),r=await this.handleAction({actions:t});return t.transformResponse(r)}}getStaticHeaders(){let n=`novu-framework:v${this.client.version}`;return{"content-type":"application/json","access-control-allow-origin":"*","access-control-allow-private-network":"true","access-control-allow-methods":"GET, POST","access-control-allow-headers":"*","access-control-max-age":"604800","novu-framework-version":"2024-06-26","novu-framework-sdk":"2.11.2-alpha.0","novu-framework-server":this.frameworkName,"user-agent":n}}createResponse(n,t){return{status:n,body:JSON.stringify(t),headers:{...this.getStaticHeaders()}}}createError(n){return{status:n.statusCode,body:JSON.stringify({message:n.message,data:n.data,code:n.code}),headers:this.getStaticHeaders()}}async handleAction({actions:n}){let t=await n.url(),r=await n.method(),i=t.searchParams.get("action")||"health-check",o=t.searchParams.get("workflowId")||"",a=t.searchParams.get("stepId")||"",s=t.searchParams.get("agentId")||"",u=t.searchParams.get("event")||"",p=await n.headers("novu-signature")||"",d={};try{r==="POST"&&(d=await n.body())}catch{}try{i!=="health-check"&&await this.validateHmac(d,p);let h=this.getPostActionMap(d,o,a,i,s,u,n.waitUntil),y=this.getGetActionMap(o,a);if(r==="POST")return await this.handlePostAction(i,h);if(r==="GET")return await this.handleGetAction(i,y);if(r==="OPTIONS")return this.createResponse(200,{})}catch(h){return this.handleError(h)}return this.createError(new Pi(r))}getPostActionMap(n,t,r,i,o,a,s){return{trigger:this.triggerAction({workflowId:t,...n}),execute:async()=>{let u=await this.client.executeWorkflow({...n,workflowId:t,stepId:r,action:i});return this.createResponse(200,u)},preview:async()=>{let u=await this.client.executeWorkflow({...n,workflowId:t,stepId:r,action:i});return this.createResponse(200,u)},"agent-event":async()=>{let u=this.client.getAgent(o);if(!u)return this.createResponse(404,{error:`Agent '${o}' not registered`});let p=Vf({agent:u,event:a,bridge:n,secretKey:this.client.secretKey,logger:this.client.logger});return s&&s(p),this.createResponse(200,{status:"ack"})}}}triggerAction(n){return async()=>{let t={name:n.workflowId,to:n.to,payload:(n==null?void 0:n.payload)||{},transactionId:n.transactionId,overrides:n.overrides||{},...n.actor&&{actor:n.actor},...n.bridgeUrl&&{bridgeUrl:n.bridgeUrl},...n.controls&&{controls:n.controls},...n.context&&{context:n.context}},r=await this.http.post("/events/trigger",t);return this.createResponse(200,r)}}getGetActionMap(n,t){return{discover:async()=>{let r=await this.client.discover();return this.createResponse(200,r)},"health-check":async()=>{let r=await this.client.healthCheck();return this.createResponse(200,r)},code:async()=>{let r=await this.client.getCode(n,t);return this.createResponse(200,r)}}}async handlePostAction(n,t){if(Object.values(Ir).includes(n)){let r=t[n];return r()}else throw new qn(n,Ir)}async handleGetAction(n,t){if(Object.values(wi).includes(n)){let r=t[n];return r()}else throw new qn(n,wi)}handleError(n){if($n(n))return n.statusCode>=500&&this.client.logger.error(n),this.createError(n);if(eu(n))return this.createError(n);{let t=new rr(n);return this.client.logger.error(t),this.createError(t)}}async validateHmac(n,t){if(!this.hmacEnabled)return;if(!t)throw new Ui;if(!this.client.secretKey)throw new ji;let r=Wf(t);if(!r.v1||r.t===void 0)throw new $i;let i=Date.now();if(r.t<i-3e5||r.t>i+3e5)throw new qi;let o=await cu(this.client.secretKey,`${r.t}.${JSON.stringify(n)}`);if(!uu(o,r.v1))throw new Fi}};Rl();var mr=Symbol.for("workflow-serialize"),gr=Symbol.for("workflow-deserialize");var CS=Object.defineProperty,PS=Object.defineProperties,MS=Object.getOwnPropertyDescriptors,Yf=Object.getOwnPropertySymbols,NS=Object.prototype.hasOwnProperty,LS=Object.prototype.propertyIsEnumerable,Jf=(e,n,t)=>n in e?CS(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Qf=(e,n)=>{for(var t in n||(n={}))NS.call(n,t)&&Jf(e,t,n[t]);if(Yf)for(var t of Yf(n))LS.call(n,t)&&Jf(e,t,n[t]);return e},Zf=(e,n)=>PS(e,MS(n)),Ct=(e,n)=>{let t=!1,r=!1;for(let i=0;i<n;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(t=!t)}return t||r},DS=(e,n)=>{let t=e.substring(n,n+3)==="```",r=n>0&&e.substring(n-1,n+2)==="```",i=n>1&&e.substring(n-2,n+1)==="```";return t||r||i},FS=e=>{let n=0;for(let t=0;t<e.length;t+=1){if(e[t]==="\\"&&t+1<e.length&&e[t+1]==="`"){t+=1;continue}e[t]==="`"&&!DS(e,t)&&(n+=1)}return n},Nn=(e,n)=>{let t=!1,r=!1,i=-1;for(let o=0;o<e.length;o+=1){if(e[o]==="\\"&&o+1<e.length&&e[o+1]==="`"){o+=1;continue}if(e.substring(o,o+3)==="```"){r=!r,o+=2;continue}if(!r&&e[o]==="`")if(t){if(i<n&&n<o)return!0;t=!1,i=-1}else t=!0,i=o}return!1},US=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,$S=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(US,(n,t,r,i)=>Ct(e,i)?n:`${t}\\>${r}`),qS=/(\*\*)([^*]*\*?)$/,jS=/(__)([^_]*?)$/,BS=/(\*\*\*)([^*]*?)$/,zS=/(\*)([^*]*?)$/,VS=/(_)([^_]*?)$/,WS=/(`)([^`]*?)$/,HS=/(~~)([^~]*?)$/,Xn=/^[\s_~*`]*$/,em=/^[\s]*[-*+][\s]+$/,YS=/[\p{L}\p{N}_]/u,JS=/^```[^`\n]*```?$/,GS=/^\*{4,}$/,KS=/(__)([^_]+)_$/,XS=/(~~)([^~]+)~$/,Gf=/~~/g,Ln=e=>{if(!e)return!1;let n=e.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===95?!0:YS.test(e)};var QS=(e,n)=>{let t=1;for(let r=n-1;r>=0;r-=1)if(e[r]==="]")t+=1;else if(e[r]==="["&&(t-=1,t===0))return r;return-1},tm=(e,n)=>{let t=1;for(let r=n+1;r<e.length;r+=1)if(e[r]==="[")t+=1;else if(e[r]==="]"&&(t-=1,t===0))return r;return-1},Ho=(e,n)=>{let t=!1,r=!1;for(let i=0;i<e.length&&i<n;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,t=!1):r||(t=!t))}return t||r},ZS=(e,n)=>{for(let t=n;t<e.length;t+=1){if(e[t]===")")return!0;if(e[t]===`
120
+ `)return!1}return!1},nm=(e,n)=>{for(let t=n-1;t>=0;t-=1){if(e[t]===")")return!1;if(e[t]==="(")return t>0&&e[t-1]==="]"?ZS(e,n):!1;if(e[t]===`
121
+ `)return!1}return!1},eT=(e,n)=>{for(let t=n-1;t>=0;t-=1){if(e[t]===">")return!1;if(e[t]==="<"){let r=t+1<e.length?e[t+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[t]===`
122
+ `)return!1}return!1},Cl=(e,n,t)=>{let r=0;for(let u=n-1;u>=0;u-=1)if(e[u]===`
123
123
  `){r=u+1;break}let i=e.length;for(let u=n;u<e.length;u+=1)if(e[u]===`
124
- `){i=u;break}let o=e.substring(r,i),a=0,s=!1;for(let u of o)if(u===t)a+=1;else if(u!==" "&&u!==" "){s=!0;break}return a>=3&&!s},GS=(e,n,t,r)=>t==="\\"||e.includes("$")&&zo(e,n)?!0:t!=="*"&&r==="*"?(n<e.length-2?e[n+2]:"")!=="*":!!(t==="*"||t&&r&&Ln(t)&&Ln(r)||(!t||t===" "||t===" "||t===`
124
+ `){i=u;break}let o=e.substring(r,i),a=0,s=!1;for(let u of o)if(u===t)a+=1;else if(u!==" "&&u!==" "){s=!0;break}return a>=3&&!s},tT=(e,n,t,r)=>t==="\\"||e.includes("$")&&Ho(e,n)?!0:t!=="*"&&r==="*"?(n<e.length-2?e[n+2]:"")!=="*":!!(t==="*"||t&&r&&Ln(t)&&Ln(r)||(!t||t===" "||t===" "||t===`
125
125
  `)&&(!r||r===" "||r===" "||r===`
126
- `)),em=e=>{let n=0,t=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){t=!t,i+=2;continue}if(t||e[i]!=="*")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";GS(e,i,o,a)||(n+=1)}return n},KS=(e,n,t,r)=>!!(t==="\\"||e.includes("$")&&zo(e,n)||Zf(e,n)||JS(e,n)||t==="_"||r==="_"||t&&r&&Ln(t)&&Ln(r)),XS=e=>{let n=0,t=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){t=!t,i+=2;continue}if(t||e[i]!=="_")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";KS(e,i,o,a)||(n+=1)}return n},QS=e=>{let n=0,t=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){t>=3&&(n+=Math.floor(t/3)),t=0,r=!r,i+=2;continue}r||(e[i]==="*"?t+=1:(t>=3&&(n+=Math.floor(t/3)),t=0))}return t>=3&&(n+=Math.floor(t/3)),n},Rl=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}t||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(n+=1,r+=1)}return n},Yf=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}t||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(n+=1,r+=1)}return n},ZS=(e,n,t)=>{if(!n||Kn.test(n))return!0;let r=e.substring(0,t).lastIndexOf(`
127
- `),i=r===-1?0:r+1,o=e.substring(i,t);return Xf.test(o)&&n.includes(`
128
- `)?!0:Ol(e,t,"*")},eT=e=>{let n=e.match(NS);if(!n)return e;let t=n[2],r=e.lastIndexOf(n[1]);return Ct(e,r)||Nn(e,r)||ZS(e,t,r)?e:Rl(e)%2===1?t.endsWith("*")?`${e}*`:`${e}**`:e},tT=(e,n,t)=>{if(!n||Kn.test(n))return!0;let r=e.substring(0,t).lastIndexOf(`
129
- `),i=r===-1?0:r+1,o=e.substring(i,t);return Xf.test(o)&&n.includes(`
130
- `)?!0:Ol(e,t,"_")},nT=e=>{let n=e.match(LS);if(!n){let i=e.match(VS);if(i){let o=e.lastIndexOf(i[1]);if(!(Ct(e,o)||Nn(e,o))&&Yf(e)%2===1)return`${e}_`}return e}let t=n[2],r=e.lastIndexOf(n[1]);return Ct(e,r)||Nn(e,r)||tT(e,t,r)?e:Yf(e)%2===1?`${e}__`:e},rT=e=>{let n=!1;for(let t=0;t<e.length;t+=1){if(e[t]==="`"&&t+2<e.length&&e[t+1]==="`"&&e[t+2]==="`"){n=!n,t+=2;continue}if(!n&&e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!zo(e,t)){let r=t>0?e[t-1]:"",i=t<e.length-1?e[t+1]:"";if((!r||r===" "||r===" "||r===`
126
+ `)),rm=e=>{let n=0,t=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){t=!t,i+=2;continue}if(t||e[i]!=="*")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";tT(e,i,o,a)||(n+=1)}return n},nT=(e,n,t,r)=>!!(t==="\\"||e.includes("$")&&Ho(e,n)||nm(e,n)||eT(e,n)||t==="_"||r==="_"||t&&r&&Ln(t)&&Ln(r)),rT=e=>{let n=0,t=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){t=!t,i+=2;continue}if(t||e[i]!=="_")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";nT(e,i,o,a)||(n+=1)}return n},iT=e=>{let n=0,t=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){t>=3&&(n+=Math.floor(t/3)),t=0,r=!r,i+=2;continue}r||(e[i]==="*"?t+=1:(t>=3&&(n+=Math.floor(t/3)),t=0))}return t>=3&&(n+=Math.floor(t/3)),n},Pl=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}t||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(n+=1,r+=1)}return n},Kf=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}t||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(n+=1,r+=1)}return n},oT=(e,n,t)=>{if(!n||Xn.test(n))return!0;let r=e.substring(0,t).lastIndexOf(`
127
+ `),i=r===-1?0:r+1,o=e.substring(i,t);return em.test(o)&&n.includes(`
128
+ `)?!0:Cl(e,t,"*")},aT=e=>{let n=e.match(qS);if(!n)return e;let t=n[2],r=e.lastIndexOf(n[1]);return Ct(e,r)||Nn(e,r)||oT(e,t,r)?e:Pl(e)%2===1?t.endsWith("*")?`${e}*`:`${e}**`:e},sT=(e,n,t)=>{if(!n||Xn.test(n))return!0;let r=e.substring(0,t).lastIndexOf(`
129
+ `),i=r===-1?0:r+1,o=e.substring(i,t);return em.test(o)&&n.includes(`
130
+ `)?!0:Cl(e,t,"_")},lT=e=>{let n=e.match(jS);if(!n){let i=e.match(KS);if(i){let o=e.lastIndexOf(i[1]);if(!(Ct(e,o)||Nn(e,o))&&Kf(e)%2===1)return`${e}_`}return e}let t=n[2],r=e.lastIndexOf(n[1]);return Ct(e,r)||Nn(e,r)||sT(e,t,r)?e:Kf(e)%2===1?`${e}__`:e},cT=e=>{let n=!1;for(let t=0;t<e.length;t+=1){if(e[t]==="`"&&t+2<e.length&&e[t+1]==="`"&&e[t+2]==="`"){n=!n,t+=2;continue}if(!n&&e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!Ho(e,t)){let r=t>0?e[t-1]:"",i=t<e.length-1?e[t+1]:"";if((!r||r===" "||r===" "||r===`
131
131
  `)&&(!i||i===" "||i===" "||i===`
132
- `)||r&&i&&Ln(r)&&Ln(i))continue;return t}}return-1},iT=e=>{if(!e.match(FS))return e;let n=rT(e);if(n===-1||Ct(e,n)||Nn(e,n))return e;let t=e.substring(n+1);return!t||Kn.test(t)?e:em(e)%2===1?`${e}*`:e},tm=e=>{let n=!1;for(let t=0;t<e.length;t+=1){if(e[t]==="`"&&t+2<e.length&&e[t+1]==="`"&&e[t+2]==="`"){n=!n,t+=2;continue}if(!n&&e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!zo(e,t)&&!Zf(e,t)){let r=t>0?e[t-1]:"",i=t<e.length-1?e[t+1]:"";if(r&&i&&Ln(r)&&Ln(i))continue;return t}}return-1},oT=e=>{let n=e.length;for(;n>0&&e[n-1]===`
133
- `;)n-=1;if(n<e.length){let t=e.slice(0,n),r=e.slice(n);return`${t}_${r}`}return`${e}_`},aT=e=>{if(!e.endsWith("**"))return null;let n=e.slice(0,-2);if(Rl(n)%2!==1)return null;let t=n.indexOf("**"),r=tm(n);return t!==-1&&r!==-1&&t<r?`${n}_**`:null},sT=e=>{if(!e.match(US))return e;let n=tm(e);if(n===-1)return e;let t=e.substring(n+1);if(!t||Kn.test(t)||Ct(e,n)||Nn(e,n))return e;if(XS(e)%2===1){let r=aT(e);return r!==null?r:oT(e)}return e},lT=e=>{let n=Rl(e),t=em(e);return n%2===0&&t%2===0},cT=(e,n,t)=>!n||Kn.test(n)||Ct(e,t)||Nn(e,t)?!0:Ol(e,t,"*"),uT=e=>{if(zS.test(e))return e;let n=e.match(DS);if(!n)return e;let t=n[2],r=e.lastIndexOf(n[1]);return cT(e,t,r)?e:QS(e)%2===1?lT(e)?e:`${e}***`:e},pT=/<[a-zA-Z/][^>]*$/,dT=e=>{let n=e.match(pT);return!n||n.index===void 0||Ct(e,n.index)?e:e.substring(0,n.index).trimEnd()},hT=e=>!e.match(BS)||e.includes(`
134
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,fT=e=>(e.match(/```/g)||[]).length%2===1,mT=e=>{let n=hT(e);if(n!==null)return n;let t=e.match($S);if(t&&!fT(e)){let r=t[2];if(!r||Kn.test(r))return e;if(CS(e)%2===1)return`${e}\``}return e},nm=(e,n)=>n>=2&&e.substring(n-2,n+1)==="```"||n>=1&&e.substring(n-1,n+2)==="```"||n<=e.length-3&&e.substring(n,n+3)==="```",gT=e=>{let n=0,t=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!nm(e,r)&&(t=!t),!t&&e[r]==="$"&&e[r+1]==="$"&&(n+=1,r+=1);return n},yT=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!nm(e,r)){t=!t;continue}!t&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:n+=1)}return n},bT=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let n=e.indexOf("$$");return n!==-1&&e.indexOf(`
132
+ `)||r&&i&&Ln(r)&&Ln(i))continue;return t}}return-1},uT=e=>{if(!e.match(zS))return e;let n=cT(e);if(n===-1||Ct(e,n)||Nn(e,n))return e;let t=e.substring(n+1);return!t||Xn.test(t)?e:rm(e)%2===1?`${e}*`:e},im=e=>{let n=!1;for(let t=0;t<e.length;t+=1){if(e[t]==="`"&&t+2<e.length&&e[t+1]==="`"&&e[t+2]==="`"){n=!n,t+=2;continue}if(!n&&e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!Ho(e,t)&&!nm(e,t)){let r=t>0?e[t-1]:"",i=t<e.length-1?e[t+1]:"";if(r&&i&&Ln(r)&&Ln(i))continue;return t}}return-1},pT=e=>{let n=e.length;for(;n>0&&e[n-1]===`
133
+ `;)n-=1;if(n<e.length){let t=e.slice(0,n),r=e.slice(n);return`${t}_${r}`}return`${e}_`},dT=e=>{if(!e.endsWith("**"))return null;let n=e.slice(0,-2);if(Pl(n)%2!==1)return null;let t=n.indexOf("**"),r=im(n);return t!==-1&&r!==-1&&t<r?`${n}_**`:null},hT=e=>{if(!e.match(VS))return e;let n=im(e);if(n===-1)return e;let t=e.substring(n+1);if(!t||Xn.test(t)||Ct(e,n)||Nn(e,n))return e;if(rT(e)%2===1){let r=dT(e);return r!==null?r:pT(e)}return e},fT=e=>{let n=Pl(e),t=rm(e);return n%2===0&&t%2===0},mT=(e,n,t)=>!n||Xn.test(n)||Ct(e,t)||Nn(e,t)?!0:Cl(e,t,"*"),gT=e=>{if(GS.test(e))return e;let n=e.match(BS);if(!n)return e;let t=n[2],r=e.lastIndexOf(n[1]);return mT(e,t,r)?e:iT(e)%2===1?fT(e)?e:`${e}***`:e},yT=/<[a-zA-Z/][^>]*$/,bT=e=>{let n=e.match(yT);return!n||n.index===void 0||Ct(e,n.index)?e:e.substring(0,n.index).trimEnd()},wT=e=>!e.match(JS)||e.includes(`
134
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,ST=e=>(e.match(/```/g)||[]).length%2===1,TT=e=>{let n=wT(e);if(n!==null)return n;let t=e.match(WS);if(t&&!ST(e)){let r=t[2];if(!r||Xn.test(r))return e;if(FS(e)%2===1)return`${e}\``}return e},om=(e,n)=>n>=2&&e.substring(n-2,n+1)==="```"||n>=1&&e.substring(n-1,n+2)==="```"||n<=e.length-3&&e.substring(n,n+3)==="```",xT=e=>{let n=0,t=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!om(e,r)&&(t=!t),!t&&e[r]==="$"&&e[r+1]==="$"&&(n+=1,r+=1);return n},kT=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!om(e,r)){t=!t;continue}!t&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:n+=1)}return n},AT=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let n=e.indexOf("$$");return n!==-1&&e.indexOf(`
135
135
  `,n)!==-1&&!e.endsWith(`
136
136
  `)?`${e}
137
- $$`:`${e}$$`},wT=e=>gT(e)%2===0?e:bT(e),ST=e=>yT(e)%2===1?`${e}$`:e,TT=(e,n,t)=>{if(e.substring(n+2).includes(")"))return null;let r=WS(e,n);if(r===-1||Ct(e,r))return null;let i=r>0&&e[r-1]==="!",o=i?r-1:r,a=e.substring(0,o);if(i)return a;let s=e.substring(r+1,n);return t==="text-only"?`${a}${s}`:`${a}[${s}](streamdown:incomplete-link)`},Jf=(e,n)=>{for(let t=0;t<n;t++)if(e[t]==="["&&!Ct(e,t)){if(t>0&&e[t-1]==="!")continue;let r=Qf(e,t);if(r===-1)return t;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(t=i)}}return n},xT=(e,n,t)=>{let r=n>0&&e[n-1]==="!",i=r?n-1:n;if(!e.substring(n+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(t==="text-only"){let a=Jf(e,n);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(Qf(e,n)===-1){let o=e.substring(0,i);if(r)return o;if(t==="text-only"){let a=Jf(e,n);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},rm=(e,n="protocol")=>{let t=e.lastIndexOf("](");if(t!==-1&&!Ct(e,t)){let r=TT(e,t,n);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Ct(e,r)){let i=xT(e,r,n);if(i!==null)return i}return e},kT=/^-{1,2}$/,vT=/^[\s]*-{1,2}[\s]+$/,AT=/^={1,2}$/,ET=/^[\s]*={1,2}[\s]+$/,_T=e=>{if(!e||typeof e!="string")return e;let n=e.lastIndexOf(`
138
- `);if(n===-1)return e;let t=e.substring(n+1),r=e.substring(0,n),i=t.trim();if(kT.test(i)&&!t.match(vT)){let o=r.split(`
139
- `).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(AT.test(i)&&!t.match(ET)){let o=r.split(`
140
- `).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}return e},OT=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),RT=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(OT,(n,t)=>Ct(e,t)?n:"\\~"),IT=e=>{var n,t;let r=e.match(qS);if(r){let i=r[2];if(!i||Kn.test(i))return e;let o=e.lastIndexOf(r[1]);if(Ct(e,o)||Nn(e,o))return e;if(((n=e.match(Wf))==null?void 0:n.length)%2===1)return`${e}~~`}else{let i=e.match(HS);if(i){let o=e.lastIndexOf(i[0].slice(0,2));if(Ct(e,o)||Nn(e,o))return e;if(((t=e.match(Wf))==null?void 0:t.length)%2===1)return`${e}~`}}return e},_l=e=>e!==!1,CT=e=>e===!0,It={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},PT=[{handler:{name:"singleTilde",handle:RT,priority:It.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:MS,priority:It.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:dT,priority:It.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:_T,priority:It.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:rm,priority:It.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:uT,priority:It.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:eT,priority:It.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:nT,priority:It.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:iT,priority:It.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:sT,priority:It.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:mT,priority:It.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:IT,priority:It.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:wT,priority:It.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:ST,priority:It.INLINE_KATEX},optionKey:"inlineKatex"}],MT=e=>{var n;let t=(n=e==null?void 0:e.linkMode)!=null?n:"protocol";return PT.filter(({handler:r,optionKey:i})=>r.name==="links"?_l(e==null?void 0:e.links)||_l(e==null?void 0:e.images):r.name==="inlineKatex"?CT(e==null?void 0:e.inlineKatex):_l(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Kf(Gf({},r),{handle:o=>rm(o,t)}),earlyReturn:t==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},NT=(e,n)=>{var t;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=MT(n),o=((t=n==null?void 0:n.handlers)!=null?t:[]).map(s=>{var u;return{handler:Kf(Gf({},s),{priority:(u=s.priority)!=null?u:It.DEFAULT}),earlyReturn:void 0}}),a=[...i,...o].sort((s,u)=>{var p,d;return((p=s.handler.priority)!=null?p:0)-((d=u.handler.priority)!=null?d:0)});for(let{handler:s,earlyReturn:u}of a)if(r=s.handle(r),u!=null&&u(r))return r;return r},ni=NT;var LT="__cb:",DT="chat:callback:",FT=720*60*60*1e3;function UT(e){return`${LT}${e}`}function $T(){return crypto.randomUUID().replace(/-/g,"").slice(0,16)}async function qT(e,n){return{type:"actions",children:await Promise.all(e.children.map(async t=>{if(t.type!=="button"||!t.callbackUrl)return t;let r=$T(),i={url:t.callbackUrl,originalValue:t.value};return await n.set(`${DT}${r}`,i,FT),{type:"button",id:t.id,label:t.label,style:t.style,disabled:t.disabled,value:UT(r),actionType:t.actionType}}))}}function um(e){for(let n of e){if(n.type==="actions"){for(let t of n.children)if(t.type==="button"&&t.callbackUrl)return!0}if(n.type==="section"&&"children"in n&&um(n.children))return!0}return!1}async function pm(e,n){let t=[];for(let r of e)r.type==="actions"?t.push(await qT(r,n)):r.type==="section"&&"children"in r?t.push({...r,children:await pm(r.children,n)}):t.push(r);return t}async function Vo(e,n){return um(e.children)?{...e,children:await pm(e.children,n)}:e}var im=null;function Ho(){if(!im)throw new Error("No Chat singleton registered. Call chat.registerSingleton() first.");return im}var jT=new Set(["markdown_text","task_update","plan_update"]);async function*dm(e){var r,i;let n=!1,t=!1;for await(let o of e){if(typeof o=="string"){yield o;continue}if(o===null||typeof o!="object"||!("type"in o))continue;let a=o;if(jT.has(a.type)){yield o;continue}let s=(i=(r=a.text)!=null?r:a.delta)!=null?i:a.textDelta;a.type==="text-delta"&&typeof s=="string"?(n&&t&&(yield`
137
+ $$`:`${e}$$`},vT=e=>xT(e)%2===0?e:AT(e),ET=e=>kT(e)%2===1?`${e}$`:e,_T=(e,n,t)=>{if(e.substring(n+2).includes(")"))return null;let r=QS(e,n);if(r===-1||Ct(e,r))return null;let i=r>0&&e[r-1]==="!",o=i?r-1:r,a=e.substring(0,o);if(i)return a;let s=e.substring(r+1,n);return t==="text-only"?`${a}${s}`:`${a}[${s}](streamdown:incomplete-link)`},Xf=(e,n)=>{for(let t=0;t<n;t++)if(e[t]==="["&&!Ct(e,t)){if(t>0&&e[t-1]==="!")continue;let r=tm(e,t);if(r===-1)return t;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(t=i)}}return n},RT=(e,n,t)=>{let r=n>0&&e[n-1]==="!",i=r?n-1:n;if(!e.substring(n+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(t==="text-only"){let a=Xf(e,n);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(tm(e,n)===-1){let o=e.substring(0,i);if(r)return o;if(t==="text-only"){let a=Xf(e,n);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},am=(e,n="protocol")=>{let t=e.lastIndexOf("](");if(t!==-1&&!Ct(e,t)){let r=_T(e,t,n);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Ct(e,r)){let i=RT(e,r,n);if(i!==null)return i}return e},OT=/^-{1,2}$/,IT=/^[\s]*-{1,2}[\s]+$/,CT=/^={1,2}$/,PT=/^[\s]*={1,2}[\s]+$/,MT=e=>{if(!e||typeof e!="string")return e;let n=e.lastIndexOf(`
138
+ `);if(n===-1)return e;let t=e.substring(n+1),r=e.substring(0,n),i=t.trim();if(OT.test(i)&&!t.match(IT)){let o=r.split(`
139
+ `).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(CT.test(i)&&!t.match(PT)){let o=r.split(`
140
+ `).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}return e},NT=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),LT=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(NT,(n,t)=>Ct(e,t)?n:"\\~"),DT=e=>{var n,t;let r=e.match(HS);if(r){let i=r[2];if(!i||Xn.test(i))return e;let o=e.lastIndexOf(r[1]);if(Ct(e,o)||Nn(e,o))return e;if(((n=e.match(Gf))==null?void 0:n.length)%2===1)return`${e}~~`}else{let i=e.match(XS);if(i){let o=e.lastIndexOf(i[0].slice(0,2));if(Ct(e,o)||Nn(e,o))return e;if(((t=e.match(Gf))==null?void 0:t.length)%2===1)return`${e}~`}}return e},Il=e=>e!==!1,FT=e=>e===!0,It={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},UT=[{handler:{name:"singleTilde",handle:LT,priority:It.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:$S,priority:It.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:bT,priority:It.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:MT,priority:It.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:am,priority:It.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:gT,priority:It.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:aT,priority:It.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:lT,priority:It.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:uT,priority:It.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:hT,priority:It.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:TT,priority:It.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:DT,priority:It.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:vT,priority:It.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:ET,priority:It.INLINE_KATEX},optionKey:"inlineKatex"}],$T=e=>{var n;let t=(n=e==null?void 0:e.linkMode)!=null?n:"protocol";return UT.filter(({handler:r,optionKey:i})=>r.name==="links"?Il(e==null?void 0:e.links)||Il(e==null?void 0:e.images):r.name==="inlineKatex"?FT(e==null?void 0:e.inlineKatex):Il(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Zf(Qf({},r),{handle:o=>am(o,t)}),earlyReturn:t==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},qT=(e,n)=>{var t;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=$T(n),o=((t=n==null?void 0:n.handlers)!=null?t:[]).map(s=>{var u;return{handler:Zf(Qf({},s),{priority:(u=s.priority)!=null?u:It.DEFAULT}),earlyReturn:void 0}}),a=[...i,...o].sort((s,u)=>{var p,d;return((p=s.handler.priority)!=null?p:0)-((d=u.handler.priority)!=null?d:0)});for(let{handler:s,earlyReturn:u}of a)if(r=s.handle(r),u!=null&&u(r))return r;return r},ii=qT;var jT="__cb:",BT="chat:callback:",zT=720*60*60*1e3;function VT(e){return`${jT}${e}`}function WT(){return crypto.randomUUID().replace(/-/g,"").slice(0,16)}async function HT(e,n){return{type:"actions",children:await Promise.all(e.children.map(async t=>{if(t.type!=="button"||!t.callbackUrl)return t;let r=WT(),i={url:t.callbackUrl,originalValue:t.value};return await n.set(`${BT}${r}`,i,zT),{type:"button",id:t.id,label:t.label,style:t.style,disabled:t.disabled,value:VT(r),actionType:t.actionType}}))}}function hm(e){for(let n of e){if(n.type==="actions"){for(let t of n.children)if(t.type==="button"&&t.callbackUrl)return!0}if(n.type==="section"&&"children"in n&&hm(n.children))return!0}return!1}async function fm(e,n){let t=[];for(let r of e)r.type==="actions"?t.push(await HT(r,n)):r.type==="section"&&"children"in r?t.push({...r,children:await fm(r.children,n)}):t.push(r);return t}async function Yo(e,n){return hm(e.children)?{...e,children:await fm(e.children,n)}:e}var sm=null;function Jo(){if(!sm)throw new Error("No Chat singleton registered. Call chat.registerSingleton() first.");return sm}var YT=new Set(["markdown_text","task_update","plan_update"]);async function*mm(e){var r,i;let n=!1,t=!1;for await(let o of e){if(typeof o=="string"){yield o;continue}if(o===null||typeof o!="object"||!("type"in o))continue;let a=o;if(YT.has(a.type)){yield o;continue}let s=(i=(r=a.text)!=null?r:a.delta)!=null?i:a.textDelta;a.type==="text-delta"&&typeof s=="string"?(n&&t&&(yield`
141
141
 
142
- `),n=!1,t=!0,yield s):a.type==="finish-step"&&(n=!0)}}var BT=new WeakMap;var Xn=class Cl{constructor(n){ke(this,"id");ke(this,"threadId");ke(this,"text");ke(this,"formatted");ke(this,"raw");ke(this,"author");ke(this,"metadata");ke(this,"attachments");ke(this,"isMention");ke(this,"userKey");ke(this,"links");ke(this,"_subjectPromise");var t;this.id=n.id,this.threadId=n.threadId,this.text=n.text,this.formatted=n.formatted,this.raw=n.raw,this.author=n.author,this.metadata=n.metadata,this.attachments=n.attachments,this.isMention=n.isMention,this.links=(t=n.links)!=null?t:[]}get subject(){if(this._subjectPromise)return this._subjectPromise;let n=BT.get(this);return n!=null&&n.fetchSubject?(this._subjectPromise=n.fetchSubject(this.raw).catch(()=>null),this._subjectPromise):(this._subjectPromise=Promise.resolve(null),this._subjectPromise)}toJSON(){var n;return{_type:"chat:Message",id:this.id,threadId:this.threadId,text:this.text,formatted:this.formatted,raw:this.raw,author:{userId:this.author.userId,userName:this.author.userName,fullName:this.author.fullName,isBot:this.author.isBot,isMe:this.author.isMe},metadata:{dateSent:this.metadata.dateSent.toISOString(),edited:this.metadata.edited,editedAt:(n=this.metadata.editedAt)==null?void 0:n.toISOString()},attachments:this.attachments.map(t=>({type:t.type,url:t.url,name:t.name,mimeType:t.mimeType,size:t.size,width:t.width,height:t.height,fetchMetadata:t.fetchMetadata})),isMention:this.isMention,links:this.links.length>0?this.links.map(t=>({url:t.url,title:t.title,description:t.description,imageUrl:t.imageUrl,siteName:t.siteName})):void 0}}static fromJSON(n){return new Cl({id:n.id,threadId:n.threadId,text:n.text,formatted:n.formatted,raw:n.raw,author:n.author,metadata:{dateSent:new Date(n.metadata.dateSent),edited:n.metadata.edited,editedAt:n.metadata.editedAt?new Date(n.metadata.editedAt):void 0},attachments:n.attachments,isMention:n.isMention,links:n.links})}static[fr](n){return n.toJSON()}static[mr](n){return Cl.fromJSON(n)}},zT=Symbol.for("chat.postable");function hm(e){return typeof e=="object"&&e!==null&&e.$$typeof===zT}async function fm(e,n,t,r,i){let o=a=>{var s;return{adapter:n,logger:i,messageId:a.id,threadId:(s=a.threadId)!=null?s:t}};if(e.isSupported(n)&&n.postObject){let a=await n.postObject(t,e.kind,e.getPostData());e.onPosted(o(a))}else{let a=await r(t,e.getFallbackText());e.onPosted(o(a))}}var VT=class extends Error{constructor(n,t,r){super(n);ke(this,"code");ke(this,"cause");this.name="ChatError",this.code=t,this.cause=r}};var mm=class extends VT{constructor(n,t,r){super(n,"NOT_IMPLEMENTED",r);ke(this,"feature");this.name="NotImplementedError",this.feature=t}};var Wo=720*60*60*1e3,om="channel-state:";function HT(e){return"adapterName"in e&&!("adapter"in e)}function WT(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var YT=class Pl{constructor(n){ke(this,"id");ke(this,"isDM");ke(this,"channelVisibility");ke(this,"_adapter");ke(this,"_adapterName");ke(this,"_stateAdapterInstance");ke(this,"_name",null);ke(this,"_threadHistory");var t,r;this.id=n.id,this.isDM=(t=n.isDM)!=null?t:!1,this.channelVisibility=(r=n.channelVisibility)!=null?r:"unknown",HT(n)?this._adapterName=n.adapterName:(this._adapter=n.adapter,this._stateAdapterInstance=n.stateAdapter,this._threadHistory=n.threadHistory)}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Channel has no adapter configured");let t=Ho().getAdapter(this._adapterName);if(!t)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=t,t}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let n=Ho();return this._stateAdapterInstance=n.getState(),this._stateAdapterInstance}get name(){return this._name}get state(){return this._stateAdapter.get(`${om}${this.id}`)}async setState(n,t){let r=`${om}${this.id}`;if(t!=null&&t.replace)await this._stateAdapter.set(r,n,Wo);else{let o={...await this._stateAdapter.get(r),...n};await this._stateAdapter.set(r,o,Wo)}}get messages(){let n=this.adapter,t=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a={cursor:i,direction:"backward"},s=n.fetchChannelMessages?await n.fetchChannelMessages(t,a):await n.fetchMessages(t,a),u=[...s.messages].reverse();for(let p of u)o=!0,yield p;if(!s.nextCursor||s.messages.length===0)break;i=s.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}threads(){let n=this.adapter,t=this.id;return{async*[Symbol.asyncIterator](){if(!n.listThreads)return;let r;for(;;){let i=await n.listThreads(t,{cursor:r});for(let o of i.threads)yield o;if(!i.nextCursor||i.threads.length===0)break;r=i.nextCursor}}}}async fetchMetadata(){var n;if(this.adapter.fetchChannelInfo){let t=await this.adapter.fetchChannelInfo(this.id);return this._name=(n=t.name)!=null?n:null,t}return{id:this.id,isDM:this.isDM,metadata:{}}}async post(n){if(hm(n))return await this.handlePostableObject(n),n;if(WT(n)){let r="";for await(let i of dm(n))typeof i=="string"?r+=i:i.type==="markdown_text"&&(r+=i.text);return this.postSingleMessage({markdown:r})}let t=n;if(Wt(n)){let r=Ht(n);if(!r)throw new Error("Invalid JSX element: must be a Card element");t=r}return t=await this.processCallbackUrls(t),this.postSingleMessage(t)}async handlePostableObject(n){await fm(n,this.adapter,this.id,(t,r)=>this.adapter.postChannelMessage?this.adapter.postChannelMessage(t,r):this.adapter.postMessage(t,r))}async postSingleMessage(n){let t=this.adapter.postChannelMessage?await this.adapter.postChannelMessage(this.id,n):await this.adapter.postMessage(this.id,n),r=this.createSentMessage(t.id,n,t.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Xn(r)),r}async postEphemeral(n,t,r){let{fallbackToDM:i}=r,o=typeof n=="string"?n:n.userId,a;if(Wt(t)){let s=Ht(t);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=t;if(a=await this.processCallbackUrls(a),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),u=await this.adapter.postMessage(s,a);return{id:u.id,threadId:s,usedFallback:!0,raw:u.raw}}return null}async schedule(n,t){let r;if(Wt(n)){let i=Ht(n);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=n;if(r=await this.processCallbackUrls(r),!this.adapter.scheduleMessage)throw new mm("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,t)}async processCallbackUrls(n){var t;if(typeof n=="string")return n;if("type"in n&&n.type==="card")return Vo(n,this._stateAdapter);if("card"in n&&((t=n.card)==null?void 0:t.type)==="card"){let r=await Vo(n.card,this._stateAdapter);if(r!==n.card)return{...n,card:r}}return n}async startTyping(n){await this.adapter.startTyping(this.id,n)}mentionUser(n){return`<@${n}>`}toJSON(){var n;return{_type:"chat:Channel",id:this.id,adapterName:(n=this._adapterName)!=null?n:this.adapter.name,channelVisibility:this.channelVisibility,isDM:this.isDM}}static fromJSON(n,t){let r=new Pl({id:n.id,adapterName:n.adapterName,channelVisibility:n.channelVisibility,isDM:n.isDM});return t&&(r._adapter=t),r}static[fr](n){return n.toJSON()}static[mr](n){return Pl.fromJSON(n)}createSentMessage(n,t,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=GT(t);return{id:n,threadId:o,text:s,formatted:u,raw:null,author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:p,links:[],toJSON(){return new Xn(this).toJSON()},async edit(h){let y=h;if(Wt(h)){let g=Ht(h);if(!g)throw new Error("Invalid JSX element: must be a Card element");y=g}return y=await a.processCallbackUrls(y),await i.editMessage(o,n,y),a.createSentMessage(n,y)},async delete(){await i.deleteMessage(o,n)},async addReaction(h){await i.addReaction(o,n,h)},async removeReaction(h){await i.removeReaction(o,n,h)}}}};function JT(e,n){return e.channelIdFromThreadId(n)}function GT(e){if(typeof e=="string")return{plainText:e,formatted:kn([xn([Tn(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:kn([xn([Tn(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let n=gl(e.markdown);return{plainText:Xr(n),formatted:n,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Xr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let n=e.fallbackText||Qr(e.card);return{plainText:n,formatted:kn([xn([Tn(n)])]),attachments:[]}}if("type"in e&&e.type==="card"){let n=Qr(e);return{plainText:n,formatted:kn([xn([Tn(n)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var KT=class{constructor(e={}){ke(this,"accumulated","");ke(this,"dirty",!0);ke(this,"cachedRender","");ke(this,"finished",!1);ke(this,"fenceToggles",0);ke(this,"incompleteLine","");ke(this,"options");var n;this.options={wrapTablesForAppend:(n=e.wrapTablesForAppend)!=null?n:!0}}push(e){var t;this.accumulated+=e,this.dirty=!0,this.incompleteLine+=e;let n=this.incompleteLine.split(`
143
- `);this.incompleteLine=(t=n.pop())!=null?t:"";for(let r of n){let i=r.trimStart();(i.startsWith("```")||i.startsWith("~~~"))&&this.fenceToggles++}}isAccumulatedInsideFence(){let e=this.fenceToggles%2===1,n=this.incompleteLine.trimStart();return(n.startsWith("```")||n.startsWith("~~~"))&&(e=!e),e}render(){if(!this.dirty)return this.cachedRender;if(this.dirty=!1,this.finished)return this.cachedRender=ni(this.accumulated),this.cachedRender;if(this.isAccumulatedInsideFence())return this.cachedRender=ni(this.accumulated),this.cachedRender;let e=sm(this.accumulated);return this.cachedRender=ni(e),this.cachedRender}getCommittableText(){if(this.finished)return this.formatAppendOnlyText(this.accumulated,!0);let e=this.accumulated;if(e.length>0&&!e.endsWith(`
142
+ `),n=!1,t=!0,yield s):a.type==="finish-step"&&(n=!0)}}var JT=new WeakMap;var Qn=class Nl{constructor(n){ke(this,"id");ke(this,"threadId");ke(this,"text");ke(this,"formatted");ke(this,"raw");ke(this,"author");ke(this,"metadata");ke(this,"attachments");ke(this,"isMention");ke(this,"userKey");ke(this,"links");ke(this,"_subjectPromise");var t;this.id=n.id,this.threadId=n.threadId,this.text=n.text,this.formatted=n.formatted,this.raw=n.raw,this.author=n.author,this.metadata=n.metadata,this.attachments=n.attachments,this.isMention=n.isMention,this.links=(t=n.links)!=null?t:[]}get subject(){if(this._subjectPromise)return this._subjectPromise;let n=JT.get(this);return n!=null&&n.fetchSubject?(this._subjectPromise=n.fetchSubject(this.raw).catch(()=>null),this._subjectPromise):(this._subjectPromise=Promise.resolve(null),this._subjectPromise)}toJSON(){var n;return{_type:"chat:Message",id:this.id,threadId:this.threadId,text:this.text,formatted:this.formatted,raw:this.raw,author:{userId:this.author.userId,userName:this.author.userName,fullName:this.author.fullName,isBot:this.author.isBot,isMe:this.author.isMe},metadata:{dateSent:this.metadata.dateSent.toISOString(),edited:this.metadata.edited,editedAt:(n=this.metadata.editedAt)==null?void 0:n.toISOString()},attachments:this.attachments.map(t=>({type:t.type,url:t.url,name:t.name,mimeType:t.mimeType,size:t.size,width:t.width,height:t.height,fetchMetadata:t.fetchMetadata})),isMention:this.isMention,links:this.links.length>0?this.links.map(t=>({url:t.url,title:t.title,description:t.description,imageUrl:t.imageUrl,siteName:t.siteName})):void 0}}static fromJSON(n){return new Nl({id:n.id,threadId:n.threadId,text:n.text,formatted:n.formatted,raw:n.raw,author:n.author,metadata:{dateSent:new Date(n.metadata.dateSent),edited:n.metadata.edited,editedAt:n.metadata.editedAt?new Date(n.metadata.editedAt):void 0},attachments:n.attachments,isMention:n.isMention,links:n.links})}static[mr](n){return n.toJSON()}static[gr](n){return Nl.fromJSON(n)}},GT=Symbol.for("chat.postable");function gm(e){return typeof e=="object"&&e!==null&&e.$$typeof===GT}async function ym(e,n,t,r,i){let o=a=>{var s;return{adapter:n,logger:i,messageId:a.id,threadId:(s=a.threadId)!=null?s:t}};if(e.isSupported(n)&&n.postObject){let a=await n.postObject(t,e.kind,e.getPostData());e.onPosted(o(a))}else{let a=await r(t,e.getFallbackText());e.onPosted(o(a))}}var KT=class extends Error{constructor(n,t,r){super(n);ke(this,"code");ke(this,"cause");this.name="ChatError",this.code=t,this.cause=r}};var bm=class extends KT{constructor(n,t,r){super(n,"NOT_IMPLEMENTED",r);ke(this,"feature");this.name="NotImplementedError",this.feature=t}};var Go=720*60*60*1e3,lm="channel-state:";function XT(e){return"adapterName"in e&&!("adapter"in e)}function QT(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var ZT=class Ll{constructor(n){ke(this,"id");ke(this,"isDM");ke(this,"channelVisibility");ke(this,"_adapter");ke(this,"_adapterName");ke(this,"_stateAdapterInstance");ke(this,"_name",null);ke(this,"_threadHistory");var t,r;this.id=n.id,this.isDM=(t=n.isDM)!=null?t:!1,this.channelVisibility=(r=n.channelVisibility)!=null?r:"unknown",XT(n)?this._adapterName=n.adapterName:(this._adapter=n.adapter,this._stateAdapterInstance=n.stateAdapter,this._threadHistory=n.threadHistory)}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Channel has no adapter configured");let t=Jo().getAdapter(this._adapterName);if(!t)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=t,t}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let n=Jo();return this._stateAdapterInstance=n.getState(),this._stateAdapterInstance}get name(){return this._name}get state(){return this._stateAdapter.get(`${lm}${this.id}`)}async setState(n,t){let r=`${lm}${this.id}`;if(t!=null&&t.replace)await this._stateAdapter.set(r,n,Go);else{let o={...await this._stateAdapter.get(r),...n};await this._stateAdapter.set(r,o,Go)}}get messages(){let n=this.adapter,t=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a={cursor:i,direction:"backward"},s=n.fetchChannelMessages?await n.fetchChannelMessages(t,a):await n.fetchMessages(t,a),u=[...s.messages].reverse();for(let p of u)o=!0,yield p;if(!s.nextCursor||s.messages.length===0)break;i=s.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}threads(){let n=this.adapter,t=this.id;return{async*[Symbol.asyncIterator](){if(!n.listThreads)return;let r;for(;;){let i=await n.listThreads(t,{cursor:r});for(let o of i.threads)yield o;if(!i.nextCursor||i.threads.length===0)break;r=i.nextCursor}}}}async fetchMetadata(){var n;if(this.adapter.fetchChannelInfo){let t=await this.adapter.fetchChannelInfo(this.id);return this._name=(n=t.name)!=null?n:null,t}return{id:this.id,isDM:this.isDM,metadata:{}}}async post(n){if(gm(n))return await this.handlePostableObject(n),n;if(QT(n)){let r="";for await(let i of mm(n))typeof i=="string"?r+=i:i.type==="markdown_text"&&(r+=i.text);return this.postSingleMessage({markdown:r})}let t=n;if(Ht(n)){let r=Wt(n);if(!r)throw new Error("Invalid JSX element: must be a Card element");t=r}return t=await this.processCallbackUrls(t),this.postSingleMessage(t)}async handlePostableObject(n){await ym(n,this.adapter,this.id,(t,r)=>this.adapter.postChannelMessage?this.adapter.postChannelMessage(t,r):this.adapter.postMessage(t,r))}async postSingleMessage(n){let t=this.adapter.postChannelMessage?await this.adapter.postChannelMessage(this.id,n):await this.adapter.postMessage(this.id,n),r=this.createSentMessage(t.id,n,t.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Qn(r)),r}async postEphemeral(n,t,r){let{fallbackToDM:i}=r,o=typeof n=="string"?n:n.userId,a;if(Ht(t)){let s=Wt(t);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=t;if(a=await this.processCallbackUrls(a),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),u=await this.adapter.postMessage(s,a);return{id:u.id,threadId:s,usedFallback:!0,raw:u.raw}}return null}async schedule(n,t){let r;if(Ht(n)){let i=Wt(n);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=n;if(r=await this.processCallbackUrls(r),!this.adapter.scheduleMessage)throw new bm("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,t)}async processCallbackUrls(n){var t;if(typeof n=="string")return n;if("type"in n&&n.type==="card")return Yo(n,this._stateAdapter);if("card"in n&&((t=n.card)==null?void 0:t.type)==="card"){let r=await Yo(n.card,this._stateAdapter);if(r!==n.card)return{...n,card:r}}return n}async startTyping(n){await this.adapter.startTyping(this.id,n)}mentionUser(n){return`<@${n}>`}toJSON(){var n;return{_type:"chat:Channel",id:this.id,adapterName:(n=this._adapterName)!=null?n:this.adapter.name,channelVisibility:this.channelVisibility,isDM:this.isDM}}static fromJSON(n,t){let r=new Ll({id:n.id,adapterName:n.adapterName,channelVisibility:n.channelVisibility,isDM:n.isDM});return t&&(r._adapter=t),r}static[mr](n){return n.toJSON()}static[gr](n){return Ll.fromJSON(n)}createSentMessage(n,t,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=tx(t);return{id:n,threadId:o,text:s,formatted:u,raw:null,author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:p,links:[],toJSON(){return new Qn(this).toJSON()},async edit(h){let y=h;if(Ht(h)){let g=Wt(h);if(!g)throw new Error("Invalid JSX element: must be a Card element");y=g}return y=await a.processCallbackUrls(y),await i.editMessage(o,n,y),a.createSentMessage(n,y)},async delete(){await i.deleteMessage(o,n)},async addReaction(h){await i.addReaction(o,n,h)},async removeReaction(h){await i.removeReaction(o,n,h)}}}};function ex(e,n){return e.channelIdFromThreadId(n)}function tx(e){if(typeof e=="string")return{plainText:e,formatted:kn([xn([Tn(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:kn([xn([Tn(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let n=wl(e.markdown);return{plainText:Zr(n),formatted:n,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Zr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let n=e.fallbackText||ei(e.card);return{plainText:n,formatted:kn([xn([Tn(n)])]),attachments:[]}}if("type"in e&&e.type==="card"){let n=ei(e);return{plainText:n,formatted:kn([xn([Tn(n)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var nx=class{constructor(e={}){ke(this,"accumulated","");ke(this,"dirty",!0);ke(this,"cachedRender","");ke(this,"finished",!1);ke(this,"fenceToggles",0);ke(this,"incompleteLine","");ke(this,"options");var n;this.options={wrapTablesForAppend:(n=e.wrapTablesForAppend)!=null?n:!0}}push(e){var t;this.accumulated+=e,this.dirty=!0,this.incompleteLine+=e;let n=this.incompleteLine.split(`
143
+ `);this.incompleteLine=(t=n.pop())!=null?t:"";for(let r of n){let i=r.trimStart();(i.startsWith("```")||i.startsWith("~~~"))&&this.fenceToggles++}}isAccumulatedInsideFence(){let e=this.fenceToggles%2===1,n=this.incompleteLine.trimStart();return(n.startsWith("```")||n.startsWith("~~~"))&&(e=!e),e}render(){if(!this.dirty)return this.cachedRender;if(this.dirty=!1,this.finished)return this.cachedRender=ii(this.accumulated),this.cachedRender;if(this.isAccumulatedInsideFence())return this.cachedRender=ii(this.accumulated),this.cachedRender;let e=um(this.accumulated);return this.cachedRender=ii(e),this.cachedRender}getCommittableText(){if(this.finished)return this.formatAppendOnlyText(this.accumulated,!0);let e=this.accumulated;if(e.length>0&&!e.endsWith(`
144
144
  `)){let r=e.lastIndexOf(`
145
- `),i=r>=0?e.slice(0,r+1):"";if(Il(i))return this.formatAppendOnlyText(e);e=i}if(Il(e))return this.formatAppendOnlyText(e);let n=sm(e),t=this.formatAppendOnlyText(n);return Il(t)?t:QT(t)}getText(){return this.accumulated}finish(){return this.finished=!0,this.dirty=!0,this.render()}formatAppendOnlyText(e,n=!1){return this.options.wrapTablesForAppend?ZT(e,n):e}},XT=new Set(["*","~","`","["]);function am(e){return ni(e).length<=e.length}function QT(e){if(e.length===0||am(e))return e;for(let n=e.length-1;n>=0;n--)if(XT.has(e[n])){for(;n>0&&e[n-1]===e[n];)n--;let t=e.slice(0,n);if(am(t))return t}return""}var Ml=/^\|.*\|$/,Nl=/^\|[\s:]*-{1,}[\s:]*(\|[\s:]*-{1,}[\s:]*)*\|$/;function Il(e){let n=!1;for(let t of e.split(`
146
- `)){let r=t.trimStart();(r.startsWith("```")||r.startsWith("~~~"))&&(n=!n)}return n}function sm(e){let n=e.endsWith(`
145
+ `),i=r>=0?e.slice(0,r+1):"";if(Ml(i))return this.formatAppendOnlyText(e);e=i}if(Ml(e))return this.formatAppendOnlyText(e);let n=um(e),t=this.formatAppendOnlyText(n);return Ml(t)?t:ix(t)}getText(){return this.accumulated}finish(){return this.finished=!0,this.dirty=!0,this.render()}formatAppendOnlyText(e,n=!1){return this.options.wrapTablesForAppend?ox(e,n):e}},rx=new Set(["*","~","`","["]);function cm(e){return ii(e).length<=e.length}function ix(e){if(e.length===0||cm(e))return e;for(let n=e.length-1;n>=0;n--)if(rx.has(e[n])){for(;n>0&&e[n-1]===e[n];)n--;let t=e.slice(0,n);if(cm(t))return t}return""}var Dl=/^\|.*\|$/,Fl=/^\|[\s:]*-{1,}[\s:]*(\|[\s:]*-{1,}[\s:]*)*\|$/;function Ml(e){let n=!1;for(let t of e.split(`
146
+ `)){let r=t.trimStart();(r.startsWith("```")||r.startsWith("~~~"))&&(n=!n)}return n}function um(e){let n=e.endsWith(`
147
147
  `),t=e.split(`
148
- `);!n&&t.length>0&&t.pop(),n&&t.length>0&&t.at(-1)===""&&t.pop();let r=0,i=!1;for(let u=t.length-1;u>=0;u--){let p=t[u].trim();if(p==="")break;if(Nl.test(p)){i=!0;break}if(Ml.test(p))r++;else break}if(i||r===0)return e;let o=t.length-r,a=t.slice(0,o),s=a.join(`
148
+ `);!n&&t.length>0&&t.pop(),n&&t.length>0&&t.at(-1)===""&&t.pop();let r=0,i=!1;for(let u=t.length-1;u>=0;u--){let p=t[u].trim();if(p==="")break;if(Fl.test(p)){i=!0;break}if(Dl.test(p))r++;else break}if(i||r===0)return e;let o=t.length-r,a=t.slice(0,o),s=a.join(`
149
149
  `);return a.length>0&&(s+=`
150
- `),s}function ZT(e,n=!1){let t=e.endsWith(`
150
+ `),s}function ox(e,n=!1){let t=e.endsWith(`
151
151
  `),r=e.split(`
152
- `);t&&r.length>0&&r.at(-1)===""&&r.pop();let i=[],o=!1,a=!1;for(let u=0;u<r.length;u++){let p=r[u].trim();if(!o&&(p.startsWith("```")||p.startsWith("~~~"))){a=!a,i.push(r[u]);continue}if(a){i.push(r[u]);continue}let d=p!==""&&(Ml.test(p)||Nl.test(p));if(d&&!o){let h=!1;for(let y=u;y<r.length;y++){let g=r[y].trim();if(Nl.test(g)){h=!0;break}if(g===""||!Ml.test(g))break}h&&(i.push("```"),o=!0)}else!d&&o&&(i.push("```"),o=!1);i.push(r[u])}o&&n&&i.push("```");let s=i.join(`
152
+ `);t&&r.length>0&&r.at(-1)===""&&r.pop();let i=[],o=!1,a=!1;for(let u=0;u<r.length;u++){let p=r[u].trim();if(!o&&(p.startsWith("```")||p.startsWith("~~~"))){a=!a,i.push(r[u]);continue}if(a){i.push(r[u]);continue}let d=p!==""&&(Dl.test(p)||Fl.test(p));if(d&&!o){let h=!1;for(let y=u;y<r.length;y++){let g=r[y].trim();if(Fl.test(g)){h=!0;break}if(g===""||!Dl.test(g))break}h&&(i.push("```"),o=!0)}else!d&&o&&(i.push("```"),o=!1);i.push(r[u])}o&&n&&i.push("```");let s=i.join(`
153
153
  `);return t&&(s+=`
154
- `),s}function ex(e){return"adapterName"in e&&!("adapter"in e)}var lm="thread-state:";function tx(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var L1=class Ll{constructor(n){ke(this,"id");ke(this,"channelId");ke(this,"isDM");ke(this,"channelVisibility");ke(this,"_adapter");ke(this,"_adapterName");ke(this,"_stateAdapterInstance");ke(this,"_recentMessages",[]);ke(this,"_isSubscribedContext");ke(this,"_currentMessage");ke(this,"_streamingUpdateIntervalMs");ke(this,"_fallbackStreamingPlaceholderText");ke(this,"_channel");ke(this,"_threadHistory");ke(this,"_logger");var t,r,i,o;this.id=n.id,this.channelId=n.channelId,this.isDM=(t=n.isDM)!=null?t:!1,this.channelVisibility=(r=n.channelVisibility)!=null?r:"unknown",this._isSubscribedContext=(i=n.isSubscribedContext)!=null?i:!1,this._currentMessage=n.currentMessage,this._logger=n.logger,this._streamingUpdateIntervalMs=(o=n.streamingUpdateIntervalMs)!=null?o:500,this._fallbackStreamingPlaceholderText=n.fallbackStreamingPlaceholderText!==void 0?n.fallbackStreamingPlaceholderText:"...",ex(n)?this._adapterName=n.adapterName:(this._adapter=n.adapter,this._stateAdapterInstance=n.stateAdapter,this._threadHistory=n.threadHistory),n.initialMessage&&(this._recentMessages=[n.initialMessage])}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Thread has no adapter configured");let t=Ho().getAdapter(this._adapterName);if(!t)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=t,t}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let n=Ho();return this._stateAdapterInstance=n.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(n){this._recentMessages=n}get state(){return this._stateAdapter.get(`${lm}${this.id}`)}async setState(n,t){let r=`${lm}${this.id}`;if(t!=null&&t.replace)await this._stateAdapter.set(r,n,Wo);else{let o={...await this._stateAdapter.get(r),...n};await this._stateAdapter.set(r,o,Wo)}}get channel(){if(!this._channel){let n=JT(this.adapter,this.id);this._channel=new YT({id:n,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,threadHistory:this._threadHistory})}return this._channel}get messages(){let n=this.adapter,t=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await n.fetchMessages(t,{cursor:i,direction:"backward"}),s=[...a.messages].reverse();for(let u of s)o=!0,yield u;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}get allMessages(){let n=this.adapter,t=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await n.fetchMessages(t,{limit:100,cursor:i,direction:"forward"});for(let s of a.messages)o=!0,yield s;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s of a)yield s}}}}async getParticipants(){let n=new Map;this._currentMessage&&!this._currentMessage.author.isMe&&!this._currentMessage.author.isBot&&n.set(this._currentMessage.author.userId,this._currentMessage.author);for await(let t of this.allMessages)t.author.isMe||t.author.isBot||n.has(t.author.userId)||n.set(t.author.userId,t.author);return[...n.values()]}async isSubscribed(){return this._isSubscribedContext?!0:this._stateAdapter.isSubscribed(this.id)}async subscribe(){await this._stateAdapter.subscribe(this.id),this.adapter.onThreadSubscribe&&await this.adapter.onThreadSubscribe(this.id)}async unsubscribe(){await this._stateAdapter.unsubscribe(this.id)}async post(n){if(hm(n)){if(n.kind==="stream"){let o=n.getPostData(),a={...o.options.updateIntervalMs?{updateIntervalMs:o.options.updateIntervalMs}:{},...o.options.groupTasks?{taskDisplayMode:o.options.groupTasks}:{},...o.options.endWith?{stopBlocks:o.options.endWith}:{}};return await this.handleStream(o.stream,a),n}return await this.handlePostableObject(n),n}if(tx(n))return this.handleStream(n);let t=n;if(Wt(n)){let o=Ht(n);if(!o)throw new Error("Invalid JSX element: must be a Card element");t=o}t=await this.processCallbackUrls(t);let r=await this.adapter.postMessage(this.id,t),i=this.createSentMessage(r.id,t,r.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Xn(i)),i}async handlePostableObject(n){await fm(n,this.adapter,this.id,(t,r)=>this.adapter.postMessage(t,r),this._logger)}async postEphemeral(n,t,r){let{fallbackToDM:i}=r,o=typeof n=="string"?n:n.userId,a;if(Wt(t)){let s=Ht(t);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=t;if(a=await this.processCallbackUrls(a),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),u=await this.adapter.postMessage(s,a);return{id:u.id,threadId:s,usedFallback:!0,raw:u.raw}}return null}async processCallbackUrls(n){var t;if(typeof n=="string")return n;if("type"in n&&n.type==="card")return Vo(n,this._stateAdapter);if("card"in n&&((t=n.card)==null?void 0:t.type)==="card"){let r=await Vo(n.card,this._stateAdapter);if(r!==n.card)return{...n,card:r}}return n}async schedule(n,t){let r;if(Wt(n)){let i=Ht(n);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=n;if(r=await this.processCallbackUrls(r),!this.adapter.scheduleMessage)throw new mm("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,t)}async handleStream(n,t){let r=dm(n),i={updateIntervalMs:this._streamingUpdateIntervalMs,...t};if(this._currentMessage&&(i.recipientUserId=this._currentMessage.author.userId,i.recipientTeamId=this.extractSlackRecipientTeamId(this._currentMessage.raw)),this.adapter.stream){let a="",s={[Symbol.asyncIterator]:()=>{let p=r[Symbol.asyncIterator]();return{async next(){let d=await p.next();if(!d.done){let h=d.value;typeof h=="string"?a+=h:h.type==="markdown_text"&&(a+=h.text)}return d}}}},u=await this.adapter.stream(this.id,s,i);if(u){let p=this.createSentMessage(u.id,{markdown:a},u.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Xn(p)),p}}let o={[Symbol.asyncIterator]:()=>{let a=r[Symbol.asyncIterator]();return{async next(){for(;;){let s=await a.next();if(s.done)return{value:void 0,done:!0};let u=s.value;if(typeof u=="string")return{value:u,done:!1};if(u.type==="markdown_text")return{value:u.text,done:!1}}}}}};return this.fallbackStream(o,i)}extractSlackRecipientTeamId(n){var r;if(!n||typeof n!="object")return;let t=n;if(typeof t.team_id=="string"&&t.team_id)return t.team_id;if(typeof t.team=="string"&&t.team)return t.team;if(t.team&&typeof t.team=="object"&&typeof t.team.id=="string"&&t.team.id)return t.team.id;if(typeof((r=t.user)==null?void 0:r.team_id)=="string"&&t.user.team_id)return t.user.team_id}async startTyping(n){await this.adapter.startTyping(this.id,n)}async fallbackStream(n,t){var B;let r=(B=t==null?void 0:t.updateIntervalMs)!=null?B:this._streamingUpdateIntervalMs,i=this._fallbackStreamingPlaceholderText,o=i===null?null:await this.adapter.postMessage(this.id,i),a=this.id,s=new KT,u="",p=!1,d=null,h=null;o&&(a=o.threadId||this.id,u=i!=null?i:"");let y=()=>{h=setTimeout(()=>{d=g()},r)},g=async()=>{var ne;if(p||!o)return;let ue=s.render();if(ue.trim()&&ue!==u)try{await this.adapter.editMessage(a,o.id,{markdown:ue}),u=ue}catch(ve){(ne=this._logger)==null||ne.warn("fallbackStream edit failed",ve)}p||y()};o&&y();try{for await(let ue of n)if(s.push(ue),!o){let ne=s.render();ne.trim()&&(o=await this.adapter.postMessage(this.id,{markdown:ne}),a=o.threadId||this.id,u=ne,y())}}finally{p=!0,h&&(clearTimeout(h),h=null)}d&&await d;let P=s.getText(),ee=s.finish();o||(o=await this.adapter.postMessage(this.id,{markdown:P.trim()?P:" "}),a=o.threadId||this.id,u=P),ee.trim()&&ee!==u&&await this.adapter.editMessage(a,o.id,{markdown:P});let Z=this.createSentMessage(o.id,{markdown:P},a);return this._threadHistory&&await this._threadHistory.append(this.id,new Xn(Z)),Z}async refresh(){let n=await this.adapter.fetchMessages(this.id,{limit:50});n.messages.length>0?this._recentMessages=n.messages:this._threadHistory?this._recentMessages=await this._threadHistory.getMessages(this.id,50):this._recentMessages=[]}mentionUser(n){return`<@${n}>`}toJSON(){var n,t;return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:(n=this._currentMessage)==null?void 0:n.toJSON(),isDM:this.isDM,adapterName:(t=this._adapterName)!=null?t:this.adapter.name}}static fromJSON(n,t){let r=new Ll({id:n.id,adapterName:n.adapterName,channelId:n.channelId,channelVisibility:n.channelVisibility,currentMessage:n.currentMessage?Xn.fromJSON(n.currentMessage):void 0,isDM:n.isDM});return t&&(r._adapter=t),r}static[fr](n){return n.toJSON()}static[mr](n){return Ll.fromJSON(n)}createSentMessage(n,t,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=nx(t);return{id:n,threadId:o,text:s,formatted:u,raw:null,links:[],author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:p,toJSON(){return new Xn(this).toJSON()},async edit(h){let y=h;if(Wt(h)){let g=Ht(h);if(!g)throw new Error("Invalid JSX element: must be a Card element");y=g}return y=await a.processCallbackUrls(y),await i.editMessage(o,n,y),a.createSentMessage(n,y)},async delete(){await i.deleteMessage(o,n)},async addReaction(h){await i.addReaction(o,n,h)},async removeReaction(h){await i.removeReaction(o,n,h)}}}createSentMessageFromMessage(n){let t=this.adapter,r=this.id,i=n.id,o=this;return{id:n.id,threadId:n.threadId,text:n.text,formatted:n.formatted,raw:n.raw,author:n.author,metadata:n.metadata,attachments:n.attachments,links:n.links,isMention:n.isMention,toJSON(){return n.toJSON()},async edit(a){let s=a;if(Wt(a)){let u=Ht(a);if(!u)throw new Error("Invalid JSX element: must be a Card element");s=u}return s=await o.processCallbackUrls(s),await t.editMessage(r,i,s),o.createSentMessage(i,s,r)},async delete(){await t.deleteMessage(r,i)},async addReaction(a){await t.addReaction(r,i,a)},async removeReaction(a){await t.removeReaction(r,i,a)}}}};function nx(e){if(typeof e=="string")return{plainText:e,formatted:kn([xn([Tn(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:kn([xn([Tn(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let n=gl(e.markdown);return{plainText:Xr(n),formatted:n,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Xr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let n=e.fallbackText||Qr(e.card);return{plainText:n,formatted:kn([xn([Tn(n)])]),attachments:[]}}if("type"in e&&e.type==="card"){let n=Qr(e);return{plainText:n,formatted:kn([xn([Tn(n)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var D1=10080*60*1e3;var F1=300*1e3,U1=1440*60*1e3;var cm=new Map;function gr(e){let n=cm.get(e);return n||(n=Object.freeze({name:e,toString:()=>`{{emoji:${e}}}`,toJSON:()=>`{{emoji:${e}}}`}),cm.set(e,n)),n}var rx={thumbs_up:{slack:["+1","thumbsup"],gchat:"\u{1F44D}"},thumbs_down:{slack:["-1","thumbsdown"],gchat:"\u{1F44E}"},clap:{slack:"clap",gchat:"\u{1F44F}"},wave:{slack:"wave",gchat:"\u{1F44B}"},pray:{slack:"pray",gchat:"\u{1F64F}"},muscle:{slack:"muscle",gchat:"\u{1F4AA}"},ok_hand:{slack:"ok_hand",gchat:"\u{1F44C}"},point_up:{slack:"point_up",gchat:"\u{1F446}"},point_down:{slack:"point_down",gchat:"\u{1F447}"},point_left:{slack:"point_left",gchat:"\u{1F448}"},point_right:{slack:"point_right",gchat:"\u{1F449}"},raised_hands:{slack:"raised_hands",gchat:"\u{1F64C}"},shrug:{slack:"shrug",gchat:"\u{1F937}"},facepalm:{slack:"facepalm",gchat:"\u{1F926}"},heart:{slack:"heart",gchat:["\u2764\uFE0F","\u2764"]},smile:{slack:["smile","slightly_smiling_face"],gchat:"\u{1F60A}"},laugh:{slack:["laughing","satisfied","joy"],gchat:["\u{1F602}","\u{1F606}"]},thinking:{slack:"thinking_face",gchat:"\u{1F914}"},sad:{slack:["cry","sad","white_frowning_face"],gchat:"\u{1F622}"},cry:{slack:"sob",gchat:"\u{1F62D}"},angry:{slack:"angry",gchat:"\u{1F620}"},love_eyes:{slack:"heart_eyes",gchat:"\u{1F60D}"},cool:{slack:"sunglasses",gchat:"\u{1F60E}"},wink:{slack:"wink",gchat:"\u{1F609}"},surprised:{slack:"open_mouth",gchat:"\u{1F62E}"},worried:{slack:"worried",gchat:"\u{1F61F}"},confused:{slack:"confused",gchat:"\u{1F615}"},neutral:{slack:"neutral_face",gchat:"\u{1F610}"},sleeping:{slack:"sleeping",gchat:"\u{1F634}"},sick:{slack:"nauseated_face",gchat:"\u{1F922}"},mind_blown:{slack:"exploding_head",gchat:"\u{1F92F}"},relieved:{slack:"relieved",gchat:"\u{1F60C}"},grimace:{slack:"grimacing",gchat:"\u{1F62C}"},rolling_eyes:{slack:"rolling_eyes",gchat:"\u{1F644}"},hug:{slack:"hugging_face",gchat:"\u{1F917}"},zany:{slack:"zany_face",gchat:"\u{1F92A}"},check:{slack:["white_check_mark","heavy_check_mark"],gchat:["\u2705","\u2714\uFE0F"]},x:{slack:["x","heavy_multiplication_x"],gchat:["\u274C","\u2716\uFE0F"]},question:{slack:"question",gchat:["\u2753","?"]},exclamation:{slack:"exclamation",gchat:"\u2757"},warning:{slack:"warning",gchat:"\u26A0\uFE0F"},stop:{slack:"octagonal_sign",gchat:"\u{1F6D1}"},info:{slack:"information_source",gchat:"\u2139\uFE0F"},100:{slack:"100",gchat:"\u{1F4AF}"},fire:{slack:"fire",gchat:"\u{1F525}"},star:{slack:"star",gchat:"\u2B50"},sparkles:{slack:"sparkles",gchat:"\u2728"},lightning:{slack:"zap",gchat:"\u26A1"},boom:{slack:"boom",gchat:"\u{1F4A5}"},eyes:{slack:"eyes",gchat:"\u{1F440}"},green_circle:{slack:"large_green_circle",gchat:"\u{1F7E2}"},yellow_circle:{slack:"large_yellow_circle",gchat:"\u{1F7E1}"},red_circle:{slack:"red_circle",gchat:"\u{1F534}"},blue_circle:{slack:"large_blue_circle",gchat:"\u{1F535}"},white_circle:{slack:"white_circle",gchat:"\u26AA"},black_circle:{slack:"black_circle",gchat:"\u26AB"},rocket:{slack:"rocket",gchat:"\u{1F680}"},party:{slack:["tada","partying_face"],gchat:["\u{1F389}","\u{1F973}"]},confetti:{slack:"confetti_ball",gchat:"\u{1F38A}"},balloon:{slack:"balloon",gchat:"\u{1F388}"},gift:{slack:"gift",gchat:"\u{1F381}"},trophy:{slack:"trophy",gchat:"\u{1F3C6}"},medal:{slack:"first_place_medal",gchat:"\u{1F947}"},lightbulb:{slack:"bulb",gchat:"\u{1F4A1}"},gear:{slack:"gear",gchat:"\u2699\uFE0F"},wrench:{slack:"wrench",gchat:"\u{1F527}"},hammer:{slack:"hammer",gchat:"\u{1F528}"},bug:{slack:"bug",gchat:"\u{1F41B}"},link:{slack:"link",gchat:"\u{1F517}"},lock:{slack:"lock",gchat:"\u{1F512}"},unlock:{slack:"unlock",gchat:"\u{1F513}"},key:{slack:"key",gchat:"\u{1F511}"},pin:{slack:"pushpin",gchat:"\u{1F4CC}"},memo:{slack:"memo",gchat:"\u{1F4DD}"},clipboard:{slack:"clipboard",gchat:"\u{1F4CB}"},calendar:{slack:"calendar",gchat:"\u{1F4C5}"},clock:{slack:"clock1",gchat:"\u{1F550}"},hourglass:{slack:"hourglass",gchat:"\u23F3"},bell:{slack:"bell",gchat:"\u{1F514}"},megaphone:{slack:"mega",gchat:"\u{1F4E2}"},speech_bubble:{slack:"speech_balloon",gchat:"\u{1F4AC}"},email:{slack:"email",gchat:"\u{1F4E7}"},inbox:{slack:"inbox_tray",gchat:"\u{1F4E5}"},outbox:{slack:"outbox_tray",gchat:"\u{1F4E4}"},package:{slack:"package",gchat:"\u{1F4E6}"},folder:{slack:"file_folder",gchat:"\u{1F4C1}"},file:{slack:"page_facing_up",gchat:"\u{1F4C4}"},chart_up:{slack:"chart_with_upwards_trend",gchat:"\u{1F4C8}"},chart_down:{slack:"chart_with_downwards_trend",gchat:"\u{1F4C9}"},coffee:{slack:"coffee",gchat:"\u2615"},pizza:{slack:"pizza",gchat:"\u{1F355}"},beer:{slack:"beer",gchat:"\u{1F37A}"},arrow_up:{slack:"arrow_up",gchat:"\u2B06\uFE0F"},arrow_down:{slack:"arrow_down",gchat:"\u2B07\uFE0F"},arrow_left:{slack:"arrow_left",gchat:"\u2B05\uFE0F"},arrow_right:{slack:"arrow_right",gchat:"\u27A1\uFE0F"},refresh:{slack:"arrows_counterclockwise",gchat:"\u{1F504}"},sun:{slack:"sunny",gchat:"\u2600\uFE0F"},cloud:{slack:"cloud",gchat:"\u2601\uFE0F"},rain:{slack:"rain_cloud",gchat:"\u{1F327}\uFE0F"},snow:{slack:"snowflake",gchat:"\u2744\uFE0F"},rainbow:{slack:"rainbow",gchat:"\u{1F308}"}},ix=class{constructor(e){ke(this,"emojiMap");ke(this,"slackToNormalized");ke(this,"gchatToNormalized");this.emojiMap={...rx,...e},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[e,n]of Object.entries(this.emojiMap)){let t=Array.isArray(n.slack)?n.slack:[n.slack];for(let i of t)this.slackToNormalized.set(i.toLowerCase(),e);let r=Array.isArray(n.gchat)?n.gchat:[n.gchat];for(let i of r)this.gchatToNormalized.set(i,e)}}fromSlack(e){var r;let n=e.replace(/^:|:$/g,"").toLowerCase(),t=(r=this.slackToNormalized.get(n))!=null?r:e;return gr(t)}fromGChat(e){var t;let n=(t=this.gchatToNormalized.get(e))!=null?t:e;return gr(n)}fromTeams(e){var r;let t=(r={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[e])!=null?r:e;return gr(t)}toSlack(e){let n=typeof e=="string"?e:e.name,t=this.emojiMap[n];return t?Array.isArray(t.slack)?t.slack[0]:t.slack:n}toGChat(e){let n=typeof e=="string"?e:e.name,t=this.emojiMap[n];return t?Array.isArray(t.gchat)?t.gchat[0]:t.gchat:n}toDiscord(e){return this.toGChat(e)}matches(e,n){let t=typeof n=="string"?n:n.name,r=this.emojiMap[t];if(!r)return e===t;let i=Array.isArray(r.slack)?r.slack:[r.slack],o=Array.isArray(r.gchat)?r.gchat:[r.gchat],a=e.replace(/^:|:$/g,"").toLowerCase();return i.some(s=>s.toLowerCase()===a)||o.includes(e)}extend(e){Object.assign(this.emojiMap,e),this.buildReverseMaps()}},ox=new ix;function ax(e){let n=["thumbs_up","thumbs_down","clap","wave","pray","muscle","ok_hand","point_up","point_down","point_left","point_right","raised_hands","shrug","facepalm","heart","smile","laugh","thinking","sad","cry","angry","love_eyes","cool","wink","surprised","worried","confused","neutral","sleeping","sick","mind_blown","relieved","grimace","rolling_eyes","hug","zany","check","x","question","exclamation","warning","stop","info","100","fire","star","sparkles","lightning","boom","eyes","green_circle","yellow_circle","red_circle","blue_circle","white_circle","black_circle","rocket","party","confetti","balloon","gift","trophy","medal","lightbulb","gear","wrench","hammer","bug","link","lock","unlock","key","pin","memo","clipboard","calendar","clock","hourglass","bell","megaphone","speech_bubble","email","inbox","outbox","package","folder","file","chart_up","chart_down","coffee","pizza","beer","arrow_up","arrow_down","arrow_left","arrow_right","refresh","sun","cloud","rain","snow","rainbow"],t={custom:r=>gr(r)};for(let r of n)t[r]=gr(r);if(e){for(let r of Object.keys(e))t[r]=gr(r);ox.extend(e)}return t}var $1=ax(),Dl=Lo,Fl=Do,Ul=yl;var $l=Fo,ql=Rf,jl=No;var Bl=$o,zl=qo,Vl=Uo;function Hl(e,n){if(!e)throw new Error("agent() requires a non-empty agentId");if(!(n!=null&&n.onMessage))throw new Error(`agent('${e}') requires an onMessage handler`);return{id:e,handlers:n,userOnToolApproval:typeof n.onToolApproval=="function"}}var ce={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var sx={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},gm={output:sx};var ym={"chat-webhook":ce,discord:ce,getstream:ce,"grafana-on-call":ce,mattermost:ce,msteams:ce,"rocket-chat":ce,ryver:ce,slack:gm,"whatsapp-business":ce,zulip:ce,telegram:ce};var lx={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:'Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients (e.g.: "test@example.com,test@example.com" or ["test@example.com", "test@example.com"]).'},from:{type:"string"},subject:{type:"string",description:"Subject of the message."},text:{type:"string",description:"Text version of the message."},html:{type:"string",description:"HTML version of the message."},message:{type:"string",description:"MIME string of the message. Make sure to use multipart/form-data to send this as a file upload."},cc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for carbon copy"},bcc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for blind carbon copy"},ampHtml:{type:"string"},tVersion:{type:"string"},tText:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oTag:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Tag string. See Tagging for more information."},oDkim:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables/disabled DKIM signatures on per-message basis. Pass yes or no"},oDeliverytime:{type:"string",description:"Desired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future."},oDeliverytimeOptimizePeriod:{type:"string"},oTimeZoneLocalize:{type:"string"},oTestmode:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables sending in test mode. Pass yes if needed. See Sending in Test Mode"},oTracking:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no."},oTrackingClicks:{anyOf:[{type:"string",enum:["yes","no","htmlonly"]},{type:"boolean"}],description:"Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly."},oTrackingOpens:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no."},oRequireTls:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oSkipVerification:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},recipientVariables:{type:"string"}},required:[],additionalProperties:!0},bm={output:lx};var Qn={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},cx={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},ux={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},px={type:"object",properties:{from:Qn,sender:Qn,to:{type:"array",items:Qn},cc:{type:"array",items:Qn},bcc:{type:"array",items:Qn},replyTo:Qn,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:Qn,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:cx},inlineAttachments:{type:"array",items:ux},priority:{type:"number"},customCampaign:{type:"string"},deduplicateCampaign:{type:"boolean"},trackOpens:{type:"string",enum:["account_default","disabled","enabled"]},trackClicks:{type:"string",enum:["account_default","disabled","enabled"]},customId:{type:"string"},eventPayload:{type:"string"},urlTags:{type:"string"},headers:{type:"object",additionalProperties:!0},variables:{type:"object",additionalProperties:!0}},required:[],additionalProperties:!0},wm={output:px};var Zt={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},Yo={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},dx={type:"object",properties:{from:{anyOf:[{type:"string"},Zt]},sender:{anyOf:[{type:"string"},Zt]},to:{anyOf:[{type:"string"},Zt,{type:"array",items:Zt}]},cc:{anyOf:[{type:"string"},Zt,{type:"array",items:Zt}]},bcc:{anyOf:[{type:"string"},Zt,{type:"array",items:Zt}]},replyTo:{anyOf:[{type:"string"},Zt,{type:"array",items:Zt}]},inReplyTo:{anyOf:[{type:"string"},Zt]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},Yo]},html:{anyOf:[{type:"string"},Yo]},watchHtml:{anyOf:[{type:"string"},Yo]},amp:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},href:{type:"string"},encoding:{type:"string"},contentType:{type:"string"},raw:{anyOf:[{type:"string"},Yo]}}}]},icalEvent:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},method:{type:"string"},filename:{anyOf:[{type:"string"},{type:"boolean"}]},href:{type:"string"},encoding:{type:"string"}}}]},headers:{anyOf:[{type:"object",additionalProperties:!0},{type:"array",items:{type:"object",additionalProperties:!0}}]},list:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},attachments:{type:"array",items:{type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0}}},required:[],additionalProperties:!0},Sm={output:dx};var hx={type:"object",properties:{},required:[],additionalProperties:!1},Tm={output:hx};var fx={type:"object",properties:{personalizations:{type:"array",description:"An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",uniqueItems:!1,maxItems:1e3,items:{type:"object",properties:{from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},to:{title:"To Email Array",type:"array",items:{type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},cc:{type:"array",description:"An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},bcc:{type:"array",description:"An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},subject:{type:"string",description:"The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).",minLength:1},headers:{type:"object",description:"A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"},substitutions:{type:"object",description:'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitutionTag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.',maxProperties:1e4},dynamicTemplateData:{type:"object",description:'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".'},customArgs:{type:"object",description:"Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",maxProperties:1e4},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."}},required:["to"]}},from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},replyTo:{title:"Reply_to Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The email address where any replies or bounces will be returned."},name:{type:"string",description:"A name or title associated with the `replyTo` email address."}},required:["email"]},replyToList:{type:"array",description:"An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use \u201CreplyTo\u201D field or \u201CreplyToList\u201D but not both.",uniqueItems:!0,maxItems:1e3,items:{type:"object",properties:{email:{type:"string",description:"The email address where any replies or bounces will be returned.",format:"email"},name:{type:"string",description:"A name or title associated with the `replyToList` email address."}},required:["email"]}},subject:{type:"string",description:"The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.",minLength:1},content:{type:"array",description:"An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.",items:{type:"object",properties:{type:{type:"string",description:"The MIME type of the content you are including in your email (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},value:{type:"string",description:"The actual content of the specified MIME type that you are including in your email.",minLength:1}},required:["type","value"]}},attachments:{type:"array",description:"An array of objects where you can specify any attachments you want to include.",items:{type:"object",properties:{content:{type:"string",description:"The Base64 encoded content of the attachment.",minLength:1},type:{type:"string",description:"The MIME type of the content you are attaching (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},filename:{type:"string",description:"The attachment's filename."},disposition:{type:"string",default:"attachment",description:"The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `\u201Cinline\u201D` results in the attached file are displayed automatically within the message while `\u201Cattachment\u201D` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.",enum:["inline","attachment"]},contentId:{type:"string",description:"The attachment's content ID. This is used when the disposition is set to `\u201Cinline\u201D` and the attachment is an image, allowing the file to be displayed within the body of your email."}},required:["content","filename"]}},templateId:{type:"string",description:"An email template ID. A template that contains a subject and content \u2014 either text or html \u2014 will override any subject and content values specified at the personalizations or message level."},headers:{description:"An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.",type:"object"},categories:{type:"array",description:"An array of category names for this message. Each category name may not exceed 255 characters. ",uniqueItems:!0,maxItems:10,items:{type:"string",maxLength:255}},customArgs:{description:"Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `customArgs` set at the personalizations level. Total `customArgs` size may not exceed 10,000 bytes.",type:"string"},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `sendAt` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times \u2014 for example, scheduling at 10:53 \u2014 can result in lower deferral rates due to the reduced traffic during off-peak times."},batchId:{type:"string",description:"An ID representing a batch of emails to be sent at the same time. Including a `batchId` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."},asm:{type:"object",description:"An object allowing you to specify how to handle unsubscribes.",properties:{groupId:{type:"integer",description:"The unsubscribe group to associate with this email."},groupsToDisplay:{type:"array",description:"An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.",maxItems:25,items:{type:"integer"}}},required:["groupId"]},ipPoolName:{type:"string",description:"The IP Pool that you would like to send this email from.",minLength:2,maxLength:64},mailSettings:{type:"object",description:"A collection of different mail settings that you can use to specify how you would like this email to be handled.",properties:{bypassListManagement:{type:"object",description:"Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassSpamManagement:{type:"object",description:"Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassBounceManagement:{type:"object",description:"Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassUnsubscribeManagement:{type:"object",description:"Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},footer:{type:"object",description:"The default footer that you would like included on every email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"The plain text content of your footer."},html:{type:"string",description:"The HTML content of your footer."}}},sandboxMode:{type:"object",description:"Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}}}},trackingSettings:{type:"object",description:"Settings to determine how you would like to track the metrics of how your recipients interact with your email.",properties:{clickTracking:{type:"object",description:"Allows you to track if a recipient clicked a link in your email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},enableText:{type:"boolean",description:"Indicates if this setting should be included in the `text/plain` portion of your email."}}},openTracking:{type:"object",description:"Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},substitutionTag:{type:"string",description:"Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."}}},subscriptionTracking:{type:"object",description:"Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitutionTag`.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},html:{type:"string",description:"HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},substitutionTag:{type:"string",description:"A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag\u2019s location with no additional formatting."}}},ganalytics:{type:"object",description:"Allows you to enable tracking provided by Google Analytics.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},utmSource:{type:"string",description:"Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"},utmMedium:{type:"string",description:"Name of the marketing medium. (e.g. Email)"},utmTerm:{type:"string",description:"Used to identify any paid keywords."},utmContent:{type:"string",description:"Used to differentiate your campaign from advertisements."},utmCampaign:{type:"string",description:"The name of the campaign."}}}}}},required:[],additionalProperties:!1},xm={output:fx};var km={braze:ce,clickatell:ce,nodemailer:Sm,emailjs:ce,"email-webhook":ce,"infobip-email":ce,mailersend:ce,mailgun:bm,mailjet:wm,mailtrap:ce,mandrill:ce,netcore:ce,"novu-email":Tm,outlook365:ce,plunk:ce,postmark:ce,resend:ce,sendgrid:xm,sendinblue:ce,ses:ce,sparkpost:ce};var mx={type:"object",properties:{},required:[],additionalProperties:!1},vm={output:mx};var Am={novu:vm};var Em={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},gx={type:"object",properties:{topic:{type:"string",description:"The destination topic for the notification."},id:{type:"string",description:"A UUID to identify the notification with APNS. If an id is not supplied, APNS will generate one automatically. If an error occurs the response will contain the id. This property populates the apns-id header."},expiry:{type:"number",description:"A UNIX timestamp when the notification should expire. If the notification cannot be delivered to the device, APNS will retry until it expires. An expiry of 0 indicates that the notification expires immediately, therefore no retries will be attempted."},priority:{type:"number",description:`Provide one of the following values:
154
+ `),s}function ax(e){return"adapterName"in e&&!("adapter"in e)}var pm="thread-state:";function sx(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var BP=class Ul{constructor(n){ke(this,"id");ke(this,"channelId");ke(this,"isDM");ke(this,"channelVisibility");ke(this,"_adapter");ke(this,"_adapterName");ke(this,"_stateAdapterInstance");ke(this,"_recentMessages",[]);ke(this,"_isSubscribedContext");ke(this,"_currentMessage");ke(this,"_streamingUpdateIntervalMs");ke(this,"_fallbackStreamingPlaceholderText");ke(this,"_channel");ke(this,"_threadHistory");ke(this,"_logger");var t,r,i,o;this.id=n.id,this.channelId=n.channelId,this.isDM=(t=n.isDM)!=null?t:!1,this.channelVisibility=(r=n.channelVisibility)!=null?r:"unknown",this._isSubscribedContext=(i=n.isSubscribedContext)!=null?i:!1,this._currentMessage=n.currentMessage,this._logger=n.logger,this._streamingUpdateIntervalMs=(o=n.streamingUpdateIntervalMs)!=null?o:500,this._fallbackStreamingPlaceholderText=n.fallbackStreamingPlaceholderText!==void 0?n.fallbackStreamingPlaceholderText:"...",ax(n)?this._adapterName=n.adapterName:(this._adapter=n.adapter,this._stateAdapterInstance=n.stateAdapter,this._threadHistory=n.threadHistory),n.initialMessage&&(this._recentMessages=[n.initialMessage])}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Thread has no adapter configured");let t=Jo().getAdapter(this._adapterName);if(!t)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=t,t}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let n=Jo();return this._stateAdapterInstance=n.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(n){this._recentMessages=n}get state(){return this._stateAdapter.get(`${pm}${this.id}`)}async setState(n,t){let r=`${pm}${this.id}`;if(t!=null&&t.replace)await this._stateAdapter.set(r,n,Go);else{let o={...await this._stateAdapter.get(r),...n};await this._stateAdapter.set(r,o,Go)}}get channel(){if(!this._channel){let n=ex(this.adapter,this.id);this._channel=new ZT({id:n,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,threadHistory:this._threadHistory})}return this._channel}get messages(){let n=this.adapter,t=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await n.fetchMessages(t,{cursor:i,direction:"backward"}),s=[...a.messages].reverse();for(let u of s)o=!0,yield u;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}get allMessages(){let n=this.adapter,t=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await n.fetchMessages(t,{limit:100,cursor:i,direction:"forward"});for(let s of a.messages)o=!0,yield s;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s of a)yield s}}}}async getParticipants(){let n=new Map;this._currentMessage&&!this._currentMessage.author.isMe&&!this._currentMessage.author.isBot&&n.set(this._currentMessage.author.userId,this._currentMessage.author);for await(let t of this.allMessages)t.author.isMe||t.author.isBot||n.has(t.author.userId)||n.set(t.author.userId,t.author);return[...n.values()]}async isSubscribed(){return this._isSubscribedContext?!0:this._stateAdapter.isSubscribed(this.id)}async subscribe(){await this._stateAdapter.subscribe(this.id),this.adapter.onThreadSubscribe&&await this.adapter.onThreadSubscribe(this.id)}async unsubscribe(){await this._stateAdapter.unsubscribe(this.id)}async post(n){if(gm(n)){if(n.kind==="stream"){let o=n.getPostData(),a={...o.options.updateIntervalMs?{updateIntervalMs:o.options.updateIntervalMs}:{},...o.options.groupTasks?{taskDisplayMode:o.options.groupTasks}:{},...o.options.endWith?{stopBlocks:o.options.endWith}:{}};return await this.handleStream(o.stream,a),n}return await this.handlePostableObject(n),n}if(sx(n))return this.handleStream(n);let t=n;if(Ht(n)){let o=Wt(n);if(!o)throw new Error("Invalid JSX element: must be a Card element");t=o}t=await this.processCallbackUrls(t);let r=await this.adapter.postMessage(this.id,t),i=this.createSentMessage(r.id,t,r.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Qn(i)),i}async handlePostableObject(n){await ym(n,this.adapter,this.id,(t,r)=>this.adapter.postMessage(t,r),this._logger)}async postEphemeral(n,t,r){let{fallbackToDM:i}=r,o=typeof n=="string"?n:n.userId,a;if(Ht(t)){let s=Wt(t);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=t;if(a=await this.processCallbackUrls(a),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),u=await this.adapter.postMessage(s,a);return{id:u.id,threadId:s,usedFallback:!0,raw:u.raw}}return null}async processCallbackUrls(n){var t;if(typeof n=="string")return n;if("type"in n&&n.type==="card")return Yo(n,this._stateAdapter);if("card"in n&&((t=n.card)==null?void 0:t.type)==="card"){let r=await Yo(n.card,this._stateAdapter);if(r!==n.card)return{...n,card:r}}return n}async schedule(n,t){let r;if(Ht(n)){let i=Wt(n);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=n;if(r=await this.processCallbackUrls(r),!this.adapter.scheduleMessage)throw new bm("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,t)}async handleStream(n,t){let r=mm(n),i={updateIntervalMs:this._streamingUpdateIntervalMs,...t};if(this._currentMessage&&(i.recipientUserId=this._currentMessage.author.userId,i.recipientTeamId=this.extractSlackRecipientTeamId(this._currentMessage.raw)),this.adapter.stream){let a="",s={[Symbol.asyncIterator]:()=>{let p=r[Symbol.asyncIterator]();return{async next(){let d=await p.next();if(!d.done){let h=d.value;typeof h=="string"?a+=h:h.type==="markdown_text"&&(a+=h.text)}return d}}}},u=await this.adapter.stream(this.id,s,i);if(u){let p=this.createSentMessage(u.id,{markdown:a},u.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Qn(p)),p}}let o={[Symbol.asyncIterator]:()=>{let a=r[Symbol.asyncIterator]();return{async next(){for(;;){let s=await a.next();if(s.done)return{value:void 0,done:!0};let u=s.value;if(typeof u=="string")return{value:u,done:!1};if(u.type==="markdown_text")return{value:u.text,done:!1}}}}}};return this.fallbackStream(o,i)}extractSlackRecipientTeamId(n){var r;if(!n||typeof n!="object")return;let t=n;if(typeof t.team_id=="string"&&t.team_id)return t.team_id;if(typeof t.team=="string"&&t.team)return t.team;if(t.team&&typeof t.team=="object"&&typeof t.team.id=="string"&&t.team.id)return t.team.id;if(typeof((r=t.user)==null?void 0:r.team_id)=="string"&&t.user.team_id)return t.user.team_id}async startTyping(n){await this.adapter.startTyping(this.id,n)}async fallbackStream(n,t){var B;let r=(B=t==null?void 0:t.updateIntervalMs)!=null?B:this._streamingUpdateIntervalMs,i=this._fallbackStreamingPlaceholderText,o=i===null?null:await this.adapter.postMessage(this.id,i),a=this.id,s=new nx,u="",p=!1,d=null,h=null;o&&(a=o.threadId||this.id,u=i!=null?i:"");let y=()=>{h=setTimeout(()=>{d=g()},r)},g=async()=>{var ne;if(p||!o)return;let ue=s.render();if(ue.trim()&&ue!==u)try{await this.adapter.editMessage(a,o.id,{markdown:ue}),u=ue}catch(Ae){(ne=this._logger)==null||ne.warn("fallbackStream edit failed",Ae)}p||y()};o&&y();try{for await(let ue of n)if(s.push(ue),!o){let ne=s.render();ne.trim()&&(o=await this.adapter.postMessage(this.id,{markdown:ne}),a=o.threadId||this.id,u=ne,y())}}finally{p=!0,h&&(clearTimeout(h),h=null)}d&&await d;let P=s.getText(),ee=s.finish();o||(o=await this.adapter.postMessage(this.id,{markdown:P.trim()?P:" "}),a=o.threadId||this.id,u=P),ee.trim()&&ee!==u&&await this.adapter.editMessage(a,o.id,{markdown:P});let Z=this.createSentMessage(o.id,{markdown:P},a);return this._threadHistory&&await this._threadHistory.append(this.id,new Qn(Z)),Z}async refresh(){let n=await this.adapter.fetchMessages(this.id,{limit:50});n.messages.length>0?this._recentMessages=n.messages:this._threadHistory?this._recentMessages=await this._threadHistory.getMessages(this.id,50):this._recentMessages=[]}mentionUser(n){return`<@${n}>`}toJSON(){var n,t;return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:(n=this._currentMessage)==null?void 0:n.toJSON(),isDM:this.isDM,adapterName:(t=this._adapterName)!=null?t:this.adapter.name}}static fromJSON(n,t){let r=new Ul({id:n.id,adapterName:n.adapterName,channelId:n.channelId,channelVisibility:n.channelVisibility,currentMessage:n.currentMessage?Qn.fromJSON(n.currentMessage):void 0,isDM:n.isDM});return t&&(r._adapter=t),r}static[mr](n){return n.toJSON()}static[gr](n){return Ul.fromJSON(n)}createSentMessage(n,t,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=lx(t);return{id:n,threadId:o,text:s,formatted:u,raw:null,links:[],author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:p,toJSON(){return new Qn(this).toJSON()},async edit(h){let y=h;if(Ht(h)){let g=Wt(h);if(!g)throw new Error("Invalid JSX element: must be a Card element");y=g}return y=await a.processCallbackUrls(y),await i.editMessage(o,n,y),a.createSentMessage(n,y)},async delete(){await i.deleteMessage(o,n)},async addReaction(h){await i.addReaction(o,n,h)},async removeReaction(h){await i.removeReaction(o,n,h)}}}createSentMessageFromMessage(n){let t=this.adapter,r=this.id,i=n.id,o=this;return{id:n.id,threadId:n.threadId,text:n.text,formatted:n.formatted,raw:n.raw,author:n.author,metadata:n.metadata,attachments:n.attachments,links:n.links,isMention:n.isMention,toJSON(){return n.toJSON()},async edit(a){let s=a;if(Ht(a)){let u=Wt(a);if(!u)throw new Error("Invalid JSX element: must be a Card element");s=u}return s=await o.processCallbackUrls(s),await t.editMessage(r,i,s),o.createSentMessage(i,s,r)},async delete(){await t.deleteMessage(r,i)},async addReaction(a){await t.addReaction(r,i,a)},async removeReaction(a){await t.removeReaction(r,i,a)}}}};function lx(e){if(typeof e=="string")return{plainText:e,formatted:kn([xn([Tn(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:kn([xn([Tn(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let n=wl(e.markdown);return{plainText:Zr(n),formatted:n,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Zr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let n=e.fallbackText||ei(e.card);return{plainText:n,formatted:kn([xn([Tn(n)])]),attachments:[]}}if("type"in e&&e.type==="card"){let n=ei(e);return{plainText:n,formatted:kn([xn([Tn(n)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var zP=10080*60*1e3;var VP=300*1e3,WP=1440*60*1e3;var dm=new Map;function yr(e){let n=dm.get(e);return n||(n=Object.freeze({name:e,toString:()=>`{{emoji:${e}}}`,toJSON:()=>`{{emoji:${e}}}`}),dm.set(e,n)),n}var cx={thumbs_up:{slack:["+1","thumbsup"],gchat:"\u{1F44D}"},thumbs_down:{slack:["-1","thumbsdown"],gchat:"\u{1F44E}"},clap:{slack:"clap",gchat:"\u{1F44F}"},wave:{slack:"wave",gchat:"\u{1F44B}"},pray:{slack:"pray",gchat:"\u{1F64F}"},muscle:{slack:"muscle",gchat:"\u{1F4AA}"},ok_hand:{slack:"ok_hand",gchat:"\u{1F44C}"},point_up:{slack:"point_up",gchat:"\u{1F446}"},point_down:{slack:"point_down",gchat:"\u{1F447}"},point_left:{slack:"point_left",gchat:"\u{1F448}"},point_right:{slack:"point_right",gchat:"\u{1F449}"},raised_hands:{slack:"raised_hands",gchat:"\u{1F64C}"},shrug:{slack:"shrug",gchat:"\u{1F937}"},facepalm:{slack:"facepalm",gchat:"\u{1F926}"},heart:{slack:"heart",gchat:["\u2764\uFE0F","\u2764"]},smile:{slack:["smile","slightly_smiling_face"],gchat:"\u{1F60A}"},laugh:{slack:["laughing","satisfied","joy"],gchat:["\u{1F602}","\u{1F606}"]},thinking:{slack:"thinking_face",gchat:"\u{1F914}"},sad:{slack:["cry","sad","white_frowning_face"],gchat:"\u{1F622}"},cry:{slack:"sob",gchat:"\u{1F62D}"},angry:{slack:"angry",gchat:"\u{1F620}"},love_eyes:{slack:"heart_eyes",gchat:"\u{1F60D}"},cool:{slack:"sunglasses",gchat:"\u{1F60E}"},wink:{slack:"wink",gchat:"\u{1F609}"},surprised:{slack:"open_mouth",gchat:"\u{1F62E}"},worried:{slack:"worried",gchat:"\u{1F61F}"},confused:{slack:"confused",gchat:"\u{1F615}"},neutral:{slack:"neutral_face",gchat:"\u{1F610}"},sleeping:{slack:"sleeping",gchat:"\u{1F634}"},sick:{slack:"nauseated_face",gchat:"\u{1F922}"},mind_blown:{slack:"exploding_head",gchat:"\u{1F92F}"},relieved:{slack:"relieved",gchat:"\u{1F60C}"},grimace:{slack:"grimacing",gchat:"\u{1F62C}"},rolling_eyes:{slack:"rolling_eyes",gchat:"\u{1F644}"},hug:{slack:"hugging_face",gchat:"\u{1F917}"},zany:{slack:"zany_face",gchat:"\u{1F92A}"},check:{slack:["white_check_mark","heavy_check_mark"],gchat:["\u2705","\u2714\uFE0F"]},x:{slack:["x","heavy_multiplication_x"],gchat:["\u274C","\u2716\uFE0F"]},question:{slack:"question",gchat:["\u2753","?"]},exclamation:{slack:"exclamation",gchat:"\u2757"},warning:{slack:"warning",gchat:"\u26A0\uFE0F"},stop:{slack:"octagonal_sign",gchat:"\u{1F6D1}"},info:{slack:"information_source",gchat:"\u2139\uFE0F"},100:{slack:"100",gchat:"\u{1F4AF}"},fire:{slack:"fire",gchat:"\u{1F525}"},star:{slack:"star",gchat:"\u2B50"},sparkles:{slack:"sparkles",gchat:"\u2728"},lightning:{slack:"zap",gchat:"\u26A1"},boom:{slack:"boom",gchat:"\u{1F4A5}"},eyes:{slack:"eyes",gchat:"\u{1F440}"},green_circle:{slack:"large_green_circle",gchat:"\u{1F7E2}"},yellow_circle:{slack:"large_yellow_circle",gchat:"\u{1F7E1}"},red_circle:{slack:"red_circle",gchat:"\u{1F534}"},blue_circle:{slack:"large_blue_circle",gchat:"\u{1F535}"},white_circle:{slack:"white_circle",gchat:"\u26AA"},black_circle:{slack:"black_circle",gchat:"\u26AB"},rocket:{slack:"rocket",gchat:"\u{1F680}"},party:{slack:["tada","partying_face"],gchat:["\u{1F389}","\u{1F973}"]},confetti:{slack:"confetti_ball",gchat:"\u{1F38A}"},balloon:{slack:"balloon",gchat:"\u{1F388}"},gift:{slack:"gift",gchat:"\u{1F381}"},trophy:{slack:"trophy",gchat:"\u{1F3C6}"},medal:{slack:"first_place_medal",gchat:"\u{1F947}"},lightbulb:{slack:"bulb",gchat:"\u{1F4A1}"},gear:{slack:"gear",gchat:"\u2699\uFE0F"},wrench:{slack:"wrench",gchat:"\u{1F527}"},hammer:{slack:"hammer",gchat:"\u{1F528}"},bug:{slack:"bug",gchat:"\u{1F41B}"},link:{slack:"link",gchat:"\u{1F517}"},lock:{slack:"lock",gchat:"\u{1F512}"},unlock:{slack:"unlock",gchat:"\u{1F513}"},key:{slack:"key",gchat:"\u{1F511}"},pin:{slack:"pushpin",gchat:"\u{1F4CC}"},memo:{slack:"memo",gchat:"\u{1F4DD}"},clipboard:{slack:"clipboard",gchat:"\u{1F4CB}"},calendar:{slack:"calendar",gchat:"\u{1F4C5}"},clock:{slack:"clock1",gchat:"\u{1F550}"},hourglass:{slack:"hourglass",gchat:"\u23F3"},bell:{slack:"bell",gchat:"\u{1F514}"},megaphone:{slack:"mega",gchat:"\u{1F4E2}"},speech_bubble:{slack:"speech_balloon",gchat:"\u{1F4AC}"},email:{slack:"email",gchat:"\u{1F4E7}"},inbox:{slack:"inbox_tray",gchat:"\u{1F4E5}"},outbox:{slack:"outbox_tray",gchat:"\u{1F4E4}"},package:{slack:"package",gchat:"\u{1F4E6}"},folder:{slack:"file_folder",gchat:"\u{1F4C1}"},file:{slack:"page_facing_up",gchat:"\u{1F4C4}"},chart_up:{slack:"chart_with_upwards_trend",gchat:"\u{1F4C8}"},chart_down:{slack:"chart_with_downwards_trend",gchat:"\u{1F4C9}"},coffee:{slack:"coffee",gchat:"\u2615"},pizza:{slack:"pizza",gchat:"\u{1F355}"},beer:{slack:"beer",gchat:"\u{1F37A}"},arrow_up:{slack:"arrow_up",gchat:"\u2B06\uFE0F"},arrow_down:{slack:"arrow_down",gchat:"\u2B07\uFE0F"},arrow_left:{slack:"arrow_left",gchat:"\u2B05\uFE0F"},arrow_right:{slack:"arrow_right",gchat:"\u27A1\uFE0F"},refresh:{slack:"arrows_counterclockwise",gchat:"\u{1F504}"},sun:{slack:"sunny",gchat:"\u2600\uFE0F"},cloud:{slack:"cloud",gchat:"\u2601\uFE0F"},rain:{slack:"rain_cloud",gchat:"\u{1F327}\uFE0F"},snow:{slack:"snowflake",gchat:"\u2744\uFE0F"},rainbow:{slack:"rainbow",gchat:"\u{1F308}"}},ux=class{constructor(e){ke(this,"emojiMap");ke(this,"slackToNormalized");ke(this,"gchatToNormalized");this.emojiMap={...cx,...e},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[e,n]of Object.entries(this.emojiMap)){let t=Array.isArray(n.slack)?n.slack:[n.slack];for(let i of t)this.slackToNormalized.set(i.toLowerCase(),e);let r=Array.isArray(n.gchat)?n.gchat:[n.gchat];for(let i of r)this.gchatToNormalized.set(i,e)}}fromSlack(e){var r;let n=e.replace(/^:|:$/g,"").toLowerCase(),t=(r=this.slackToNormalized.get(n))!=null?r:e;return yr(t)}fromGChat(e){var t;let n=(t=this.gchatToNormalized.get(e))!=null?t:e;return yr(n)}fromTeams(e){var r;let t=(r={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[e])!=null?r:e;return yr(t)}toSlack(e){let n=typeof e=="string"?e:e.name,t=this.emojiMap[n];return t?Array.isArray(t.slack)?t.slack[0]:t.slack:n}toGChat(e){let n=typeof e=="string"?e:e.name,t=this.emojiMap[n];return t?Array.isArray(t.gchat)?t.gchat[0]:t.gchat:n}toDiscord(e){return this.toGChat(e)}matches(e,n){let t=typeof n=="string"?n:n.name,r=this.emojiMap[t];if(!r)return e===t;let i=Array.isArray(r.slack)?r.slack:[r.slack],o=Array.isArray(r.gchat)?r.gchat:[r.gchat],a=e.replace(/^:|:$/g,"").toLowerCase();return i.some(s=>s.toLowerCase()===a)||o.includes(e)}extend(e){Object.assign(this.emojiMap,e),this.buildReverseMaps()}},px=new ux;function dx(e){let n=["thumbs_up","thumbs_down","clap","wave","pray","muscle","ok_hand","point_up","point_down","point_left","point_right","raised_hands","shrug","facepalm","heart","smile","laugh","thinking","sad","cry","angry","love_eyes","cool","wink","surprised","worried","confused","neutral","sleeping","sick","mind_blown","relieved","grimace","rolling_eyes","hug","zany","check","x","question","exclamation","warning","stop","info","100","fire","star","sparkles","lightning","boom","eyes","green_circle","yellow_circle","red_circle","blue_circle","white_circle","black_circle","rocket","party","confetti","balloon","gift","trophy","medal","lightbulb","gear","wrench","hammer","bug","link","lock","unlock","key","pin","memo","clipboard","calendar","clock","hourglass","bell","megaphone","speech_bubble","email","inbox","outbox","package","folder","file","chart_up","chart_down","coffee","pizza","beer","arrow_up","arrow_down","arrow_left","arrow_right","refresh","sun","cloud","rain","snow","rainbow"],t={custom:r=>yr(r)};for(let r of n)t[r]=yr(r);if(e){for(let r of Object.keys(e))t[r]=yr(r);px.extend(e)}return t}var HP=dx(),$l=Uo,ql=$o,jl=Sl;var Bl=qo,zl=Pf,Vl=Fo;var Wl=Bo,Hl=zo,Yl=jo;function Jl(e,n){if(!e)throw new Error("agent() requires a non-empty agentId");if(!(n!=null&&n.onMessage))throw new Error(`agent('${e}') requires an onMessage handler`);return{id:e,handlers:n,userOnToolApproval:typeof n.onToolApproval=="function"}}var le={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var hx={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},wm={output:hx};var Sm={"chat-webhook":le,discord:le,getstream:le,"grafana-on-call":le,mattermost:le,msteams:le,"rocket-chat":le,ryver:le,sendblue:le,slack:wm,"whatsapp-business":le,zulip:le,telegram:le};var fx={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:'Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients (e.g.: "test@example.com,test@example.com" or ["test@example.com", "test@example.com"]).'},from:{type:"string"},subject:{type:"string",description:"Subject of the message."},text:{type:"string",description:"Text version of the message."},html:{type:"string",description:"HTML version of the message."},message:{type:"string",description:"MIME string of the message. Make sure to use multipart/form-data to send this as a file upload."},cc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for carbon copy"},bcc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for blind carbon copy"},ampHtml:{type:"string"},tVersion:{type:"string"},tText:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oTag:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Tag string. See Tagging for more information."},oDkim:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables/disabled DKIM signatures on per-message basis. Pass yes or no"},oDeliverytime:{type:"string",description:"Desired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future."},oDeliverytimeOptimizePeriod:{type:"string"},oTimeZoneLocalize:{type:"string"},oTestmode:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables sending in test mode. Pass yes if needed. See Sending in Test Mode"},oTracking:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no."},oTrackingClicks:{anyOf:[{type:"string",enum:["yes","no","htmlonly"]},{type:"boolean"}],description:"Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly."},oTrackingOpens:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no."},oRequireTls:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oSkipVerification:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},recipientVariables:{type:"string"}},required:[],additionalProperties:!0},Tm={output:fx};var Zn={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},mx={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},gx={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},yx={type:"object",properties:{from:Zn,sender:Zn,to:{type:"array",items:Zn},cc:{type:"array",items:Zn},bcc:{type:"array",items:Zn},replyTo:Zn,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:Zn,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:mx},inlineAttachments:{type:"array",items:gx},priority:{type:"number"},customCampaign:{type:"string"},deduplicateCampaign:{type:"boolean"},trackOpens:{type:"string",enum:["account_default","disabled","enabled"]},trackClicks:{type:"string",enum:["account_default","disabled","enabled"]},customId:{type:"string"},eventPayload:{type:"string"},urlTags:{type:"string"},headers:{type:"object",additionalProperties:!0},variables:{type:"object",additionalProperties:!0}},required:[],additionalProperties:!0},xm={output:yx};var Zt={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},Ko={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},bx={type:"object",properties:{from:{anyOf:[{type:"string"},Zt]},sender:{anyOf:[{type:"string"},Zt]},to:{anyOf:[{type:"string"},Zt,{type:"array",items:Zt}]},cc:{anyOf:[{type:"string"},Zt,{type:"array",items:Zt}]},bcc:{anyOf:[{type:"string"},Zt,{type:"array",items:Zt}]},replyTo:{anyOf:[{type:"string"},Zt,{type:"array",items:Zt}]},inReplyTo:{anyOf:[{type:"string"},Zt]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},Ko]},html:{anyOf:[{type:"string"},Ko]},watchHtml:{anyOf:[{type:"string"},Ko]},amp:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},href:{type:"string"},encoding:{type:"string"},contentType:{type:"string"},raw:{anyOf:[{type:"string"},Ko]}}}]},icalEvent:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},method:{type:"string"},filename:{anyOf:[{type:"string"},{type:"boolean"}]},href:{type:"string"},encoding:{type:"string"}}}]},headers:{anyOf:[{type:"object",additionalProperties:!0},{type:"array",items:{type:"object",additionalProperties:!0}}]},list:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},attachments:{type:"array",items:{type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0}}},required:[],additionalProperties:!0},km={output:bx};var wx={type:"object",properties:{},required:[],additionalProperties:!1},Am={output:wx};var Sx={type:"object",properties:{personalizations:{type:"array",description:"An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",uniqueItems:!1,maxItems:1e3,items:{type:"object",properties:{from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},to:{title:"To Email Array",type:"array",items:{type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},cc:{type:"array",description:"An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},bcc:{type:"array",description:"An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},subject:{type:"string",description:"The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).",minLength:1},headers:{type:"object",description:"A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"},substitutions:{type:"object",description:'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitutionTag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.',maxProperties:1e4},dynamicTemplateData:{type:"object",description:'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".'},customArgs:{type:"object",description:"Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",maxProperties:1e4},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."}},required:["to"]}},from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},replyTo:{title:"Reply_to Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The email address where any replies or bounces will be returned."},name:{type:"string",description:"A name or title associated with the `replyTo` email address."}},required:["email"]},replyToList:{type:"array",description:"An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use \u201CreplyTo\u201D field or \u201CreplyToList\u201D but not both.",uniqueItems:!0,maxItems:1e3,items:{type:"object",properties:{email:{type:"string",description:"The email address where any replies or bounces will be returned.",format:"email"},name:{type:"string",description:"A name or title associated with the `replyToList` email address."}},required:["email"]}},subject:{type:"string",description:"The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.",minLength:1},content:{type:"array",description:"An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.",items:{type:"object",properties:{type:{type:"string",description:"The MIME type of the content you are including in your email (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},value:{type:"string",description:"The actual content of the specified MIME type that you are including in your email.",minLength:1}},required:["type","value"]}},attachments:{type:"array",description:"An array of objects where you can specify any attachments you want to include.",items:{type:"object",properties:{content:{type:"string",description:"The Base64 encoded content of the attachment.",minLength:1},type:{type:"string",description:"The MIME type of the content you are attaching (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},filename:{type:"string",description:"The attachment's filename."},disposition:{type:"string",default:"attachment",description:"The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `\u201Cinline\u201D` results in the attached file are displayed automatically within the message while `\u201Cattachment\u201D` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.",enum:["inline","attachment"]},contentId:{type:"string",description:"The attachment's content ID. This is used when the disposition is set to `\u201Cinline\u201D` and the attachment is an image, allowing the file to be displayed within the body of your email."}},required:["content","filename"]}},templateId:{type:"string",description:"An email template ID. A template that contains a subject and content \u2014 either text or html \u2014 will override any subject and content values specified at the personalizations or message level."},headers:{description:"An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.",type:"object"},categories:{type:"array",description:"An array of category names for this message. Each category name may not exceed 255 characters. ",uniqueItems:!0,maxItems:10,items:{type:"string",maxLength:255}},customArgs:{description:"Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `customArgs` set at the personalizations level. Total `customArgs` size may not exceed 10,000 bytes.",type:"string"},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `sendAt` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times \u2014 for example, scheduling at 10:53 \u2014 can result in lower deferral rates due to the reduced traffic during off-peak times."},batchId:{type:"string",description:"An ID representing a batch of emails to be sent at the same time. Including a `batchId` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."},asm:{type:"object",description:"An object allowing you to specify how to handle unsubscribes.",properties:{groupId:{type:"integer",description:"The unsubscribe group to associate with this email."},groupsToDisplay:{type:"array",description:"An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.",maxItems:25,items:{type:"integer"}}},required:["groupId"]},ipPoolName:{type:"string",description:"The IP Pool that you would like to send this email from.",minLength:2,maxLength:64},mailSettings:{type:"object",description:"A collection of different mail settings that you can use to specify how you would like this email to be handled.",properties:{bypassListManagement:{type:"object",description:"Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassSpamManagement:{type:"object",description:"Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassBounceManagement:{type:"object",description:"Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassUnsubscribeManagement:{type:"object",description:"Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},footer:{type:"object",description:"The default footer that you would like included on every email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"The plain text content of your footer."},html:{type:"string",description:"The HTML content of your footer."}}},sandboxMode:{type:"object",description:"Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}}}},trackingSettings:{type:"object",description:"Settings to determine how you would like to track the metrics of how your recipients interact with your email.",properties:{clickTracking:{type:"object",description:"Allows you to track if a recipient clicked a link in your email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},enableText:{type:"boolean",description:"Indicates if this setting should be included in the `text/plain` portion of your email."}}},openTracking:{type:"object",description:"Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},substitutionTag:{type:"string",description:"Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."}}},subscriptionTracking:{type:"object",description:"Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitutionTag`.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},html:{type:"string",description:"HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},substitutionTag:{type:"string",description:"A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag\u2019s location with no additional formatting."}}},ganalytics:{type:"object",description:"Allows you to enable tracking provided by Google Analytics.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},utmSource:{type:"string",description:"Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"},utmMedium:{type:"string",description:"Name of the marketing medium. (e.g. Email)"},utmTerm:{type:"string",description:"Used to identify any paid keywords."},utmContent:{type:"string",description:"Used to differentiate your campaign from advertisements."},utmCampaign:{type:"string",description:"The name of the campaign."}}}}}},required:[],additionalProperties:!1},vm={output:Sx};var Em={anypost:le,braze:le,clickatell:le,nodemailer:km,emailjs:le,"email-webhook":le,"infobip-email":le,mailersend:le,mailgun:Tm,mailjet:xm,mailtrap:le,mandrill:le,netcore:le,"novu-email":Am,outlook365:le,plunk:le,postmark:le,resend:le,sendgrid:vm,sendinblue:le,ses:le,sparkpost:le};var Tx={type:"object",properties:{},required:[],additionalProperties:!1},_m={output:Tx};var Rm={novu:_m};var Om={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},xx={type:"object",properties:{topic:{type:"string",description:"The destination topic for the notification."},id:{type:"string",description:"A UUID to identify the notification with APNS. If an id is not supplied, APNS will generate one automatically. If an error occurs the response will contain the id. This property populates the apns-id header."},expiry:{type:"number",description:"A UNIX timestamp when the notification should expire. If the notification cannot be delivered to the device, APNS will retry until it expires. An expiry of 0 indicates that the notification expires immediately, therefore no retries will be attempted."},priority:{type:"number",description:`Provide one of the following values:
155
155
 
156
156
  10 - The push notification is sent to the device immediately. (Default)
157
157
  The push notification must trigger an alert, sound, or badge on the device. It is an error to use this priority for a push notification that contains only the content-available key.
158
158
 
159
159
  5 - The push message is sent at a time that conserves power on the device receiving it.`},collapseId:{type:"string"},pushType:{type:"string",enum:["background","alert","voip"],description:`The type of the notification. The value of this header is alert or background. Specify alert when the delivery of your notification displays an alert, plays a sound, or badges your app's icon. Specify background for silent notifications that do not interact with the user.
160
160
 
161
- The value of this header must accurately reflect the contents of your notification's payload. If there is a mismatch, or if the header is missing on required systems, APNs may delay the delivery of the notification or drop it altogether.`},threadId:{type:"string"},payload:{type:"object",additionalProperties:!0},aps:{type:"object",additionalProperties:!0,properties:{badge:{type:"number"},sound:Em,category:{type:"string"},contentAvailable:{type:"number"},launchImage:{type:"number"},mutableContent:{type:"number"},urlArgs:{type:"array",items:{type:"string"}}}},rawPayload:{type:"object",additionalProperties:!0},badge:{type:"number"},sound:Em,alert:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{title:{type:"string"},body:{type:"string"},subtitle:{type:"string"},titleLocKey:{type:"string"},titleLocArgs:{type:"array",items:{type:"string"}},actionLocKey:{type:"string"},locKey:{type:"string"},locArgs:{type:"array",items:{type:"string"}},launchImage:{type:"string"}},required:["body"]}]},contentAvailable:{type:"boolean"},mutableContent:{type:"boolean"},mdm:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0}]},urlArgs:{type:"array",items:{type:"string"}}},required:[],additionalProperties:!0},_m={output:gx};var yx={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message."},data:{type:"object",additionalProperties:!0,description:'A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error.'},title:{type:"string",description:"The title to display in the notification. Often displayed above the notification body."},subtitle:{type:"string",description:"The subtitle to display in the notification below the title."},body:{type:"string",description:"The message to display in the notification."},sound:{anyOf:[{type:"string"},{type:"null"},{type:"object",properties:{name:{anyOf:[{type:"string",enum:["default"]},{type:"null"}]},volume:{type:"number"},critical:{type:"boolean"}},additionalProperties:!0}],description:"Play a sound when the recipient receives this notification. Specify default to play the device's default notification sound, or omit this field to play no sound. Custom sounds are not supported."},ttl:{type:"number",description:"Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to undefined to use the respective defaults of each provider (2419200 (4 weeks) for Android/FCM and 0 for iOS/APNs)."},expiration:{type:"number",description:"Timestamp since the Unix epoch specifying when the message expires. Same effect as ttl (ttl takes precedence over expiration)."},priority:{type:"string",enum:["default","normal","high"],description:'The delivery priority of the message. Specify default or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS).'},badge:{type:"number",description:"Number to display in the badge on the app icon. Specify zero to clear the badge."},channelId:{type:"string",description:"ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (that has not yet been created by your app), the notification will not be displayed to the user."},categoryId:{type:"string",description:"ID of the notification category that this notification is associated with."},mutableContent:{type:"boolean",description:"Specifies whether this notification can be intercepted by the client app. In Expo Go, this defaults to true, and if you change that to false, you may experience issues. In standalone and bare apps, this defaults to false."}},required:[],additionalProperties:!0},Om={output:yx};var bx={type:"object",properties:{to:{description:`This parameter specifies the recipient of a message.
161
+ The value of this header must accurately reflect the contents of your notification's payload. If there is a mismatch, or if the header is missing on required systems, APNs may delay the delivery of the notification or drop it altogether.`},threadId:{type:"string"},payload:{type:"object",additionalProperties:!0},aps:{type:"object",additionalProperties:!0,properties:{badge:{type:"number"},sound:Om,category:{type:"string"},contentAvailable:{type:"number"},launchImage:{type:"number"},mutableContent:{type:"number"},urlArgs:{type:"array",items:{type:"string"}}}},rawPayload:{type:"object",additionalProperties:!0},badge:{type:"number"},sound:Om,alert:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{title:{type:"string"},body:{type:"string"},subtitle:{type:"string"},titleLocKey:{type:"string"},titleLocArgs:{type:"array",items:{type:"string"}},actionLocKey:{type:"string"},locKey:{type:"string"},locArgs:{type:"array",items:{type:"string"}},launchImage:{type:"string"}},required:["body"]}]},contentAvailable:{type:"boolean"},mutableContent:{type:"boolean"},mdm:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0}]},urlArgs:{type:"array",items:{type:"string"}}},required:[],additionalProperties:!0},Im={output:xx};var kx={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message."},data:{type:"object",additionalProperties:!0,description:'A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error.'},title:{type:"string",description:"The title to display in the notification. Often displayed above the notification body."},subtitle:{type:"string",description:"The subtitle to display in the notification below the title."},body:{type:"string",description:"The message to display in the notification."},sound:{anyOf:[{type:"string"},{type:"null"},{type:"object",properties:{name:{anyOf:[{type:"string",enum:["default"]},{type:"null"}]},volume:{type:"number"},critical:{type:"boolean"}},additionalProperties:!0}],description:"Play a sound when the recipient receives this notification. Specify default to play the device's default notification sound, or omit this field to play no sound. Custom sounds are not supported."},ttl:{type:"number",description:"Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to undefined to use the respective defaults of each provider (2419200 (4 weeks) for Android/FCM and 0 for iOS/APNs)."},expiration:{type:"number",description:"Timestamp since the Unix epoch specifying when the message expires. Same effect as ttl (ttl takes precedence over expiration)."},priority:{type:"string",enum:["default","normal","high"],description:'The delivery priority of the message. Specify default or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS).'},badge:{type:"number",description:"Number to display in the badge on the app icon. Specify zero to clear the badge."},channelId:{type:"string",description:"ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (that has not yet been created by your app), the notification will not be displayed to the user."},categoryId:{type:"string",description:"ID of the notification category that this notification is associated with."},mutableContent:{type:"boolean",description:"Specifies whether this notification can be intercepted by the client app. In Expo Go, this defaults to true, and if you change that to false, you may experience issues. In standalone and bare apps, this defaults to false."}},required:[],additionalProperties:!0},Cm={output:kx};var Ax={type:"object",properties:{to:{description:`This parameter specifies the recipient of a message.
162
162
  The value must be a registration token, notification key, or topic. Do not set this field when sending to multiple topics. See **condition**.
163
163
  `,type:"string"},registrationIds:{description:`This parameter specifies a list of devices (registration tokens, or IDs) receiving a multicast message. It must contain at least 1 and at most 1000 registration tokens.
164
164
  Use this parameter only for multicast messaging, not for single recipients. Multicast messages (sending to more than 1 registration tokens) are allowed using HTTP JSON format only.
@@ -194,7 +194,7 @@ If set, and a notification with the same tag is already being shown, the new not
194
194
  `,type:"string"},titleLocArgs:{description:`Indicates the string value to replace format specifiers in the title string for localization.
195
195
  * iOS: Corresponds to "title-loc-args" in the APNs payload.
196
196
  * android: See [Formatting strings](https://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling).
197
- `,type:"string"}}}},required:[],additionalProperties:!0},Rm={output:bx};var wx={allOf:[{allOf:[{anyOf:[{type:"object",properties:{includedSegments:{type:"array",description:`The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excludedSegments.
197
+ `,type:"string"}}}},required:[],additionalProperties:!0},Pm={output:Ax};var vx={allOf:[{allOf:[{anyOf:[{type:"object",properties:{includedSegments:{type:"array",description:`The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excludedSegments.
198
198
  Example: ["Active Users", "Inactive Users"]
199
199
  `,items:{type:"string"}},excludedSegments:{type:"array",description:`Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in includedSegments. This targeting parameter is only compatible with includedSegments.
200
200
  Example: ["Active Users", "Inactive Users"]
@@ -561,4 +561,4 @@ Examples: All examples are the exact same date & time.
561
561
  "Sept 24 2015 14:00:00 GMT-0700"
562
562
  "Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)"
563
563
  Note: SMS currently only supports sendAfter parameter.
564
- `,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},Im={output:wx};var Cm={apns:_m,expo:Om,fcm:Rm,"one-signal":Im,"pusher-beams":ce,pushpad:ce,"push-webhook":ce,appio:ce};var Sx={type:"object",properties:{},required:[],additionalProperties:!1},Pm={output:Sx};var Tx={type:"object",properties:{to:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`."},statusCallback:{type:"string",format:"uri",description:"The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messagingServiceSid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). "},applicationSid:{type:"string",minLength:34,maxLength:34,pattern:"^AP[0-9a-fA-F]{32}$",description:"The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `statusCallback` URL. Note that the `statusCallback` parameter of a request takes priority over the `applicationSid` parameter; if both are included `applicationSid` is ignored."},maxPrice:{type:"number",description:"[OBSOLETE] This parameter will no longer have any effect as of 2024-06-03."},provideFeedback:{type:"boolean",description:"Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`."},attempt:{type:"integer",description:"Total number of attempts made (including this request) to send the message regardless of the provider used"},validityPeriod:{type:"integer",description:"The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validityPeriod`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validityPeriod` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)"},forceDelivery:{type:"boolean",description:"Reserved"},contentRetention:{type:"string",enum:["retain","discard"],description:"Determines if the message content can be stored or redacted based on privacy settings"},addressRetention:{type:"string",enum:["retain","obfuscate"],description:"Determines if the address can be stored or obfuscated based on privacy settings"},smartEncoded:{type:"boolean",description:"Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`."},persistentAction:{type:"array",items:{type:"string"},description:"Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp)."},shortenUrls:{type:"boolean",description:"For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messagingServiceSid` parameter must also be provided."},scheduleType:{type:"string",enum:["fixed"],description:"For Messaging Services only: Include this parameter with a value of `fixed` in conjunction with the `sendAt` parameter in order to [schedule a Message](https://www.twilio.com/docs/messaging/features/message-scheduling)."},sendAt:{type:"string",format:"date-time",description:"The time that Twilio will send the message. Must be in ISO 8601 format."},sendAsMms:{type:"boolean",description:"If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media."},contentVariables:{type:"string",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `contentSid` parameter must also be provided. If values are not defined in the `contentVariables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used."},riskCheck:{type:"string",enum:["enable","disable"],description:"Include this parameter with a value of `disable` to skip any kind of risk check on the respective message request."},from:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messagingServiceSid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool."},messagingServiceSid:{type:"string",minLength:34,maxLength:34,pattern:"^MG[0-9a-fA-F]{32}$",description:"The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool."},body:{type:"string",description:"The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [sendAsMms parameter](https://www.twilio.com/blog/mms-for-long-text-messages)."},mediaUrl:{type:"array",items:{type:"string",format:"uri"},description:"The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `mediaUrl` parameters in the POST request. You can include up to ten `mediaUrl` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply."},contentSid:{type:"string",minLength:34,maxLength:34,pattern:"^HX[0-9a-fA-F]{32}$",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources)."}},required:[],additionalProperties:!0},Mm={output:Tx};var Nm={"africas-talking":ce,"azure-sms":ce,bandwidth:ce,"brevo-sms":ce,"bulk-sms":ce,"burst-sms":ce,clickatell:ce,clicksend:ce,"eazy-sms":ce,firetext:ce,"forty-six-elks":ce,"generic-sms":ce,gupshup:ce,"infobip-sms":ce,"isend-sms":ce,kannel:ce,maqsam:ce,messagebird:ce,mobishastra:ce,nexmo:ce,"novu-sms":Pm,plivo:ce,"ring-central":ce,sendchamp:ce,simpletexting:ce,sms77:ce,"sms-central":ce,smsmode:ce,sns:ce,telnyx:ce,termii:ce,twilio:Mm,"afro-message":ce,unifonic:ce,imedia:ce,sinch:ce,"isendpro-sms":ce};var Jo={chat:ym,sms:Nm,email:km,push:Cm,in_app:Am};var xx={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},kx={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},vx={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},Ax={oneOf:[xx,kx,vx]},Ex={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},Go={output:Ax,result:Ex};var _x={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},digestKey:{type:"string"},lookBackWindow:{type:"object",properties:{amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]}},required:["amount","unit"],additionalProperties:!1},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},Ox={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Rx={oneOf:[_x,Ox]},Ix={type:"object",properties:{eventCount:{type:"number"},events:{type:"array",items:{type:"object",properties:{id:{type:"string"},time:{type:"string"},payload:{type:"object"}},required:["id","time","payload"],additionalProperties:!1}}},required:["events"],additionalProperties:!1},Ko={output:Rx,result:Ix};var Xo={output:{type:"object",properties:{type:{type:"string",enum:["fixed","dynamic"]},amount:{type:"number"},unit:{type:"string",enum:["minutes","hours","days"]},dynamicKey:{type:"string"},threshold:{type:"number"},throttleKey:{type:"string"}},required:["type"],additionalProperties:!1},result:{type:"object",properties:{throttled:{type:"boolean",description:"Whether the workflow execution was throttled"},executionCount:{type:"number",description:"Number of executions within the throttle window"},threshold:{type:"number",description:"The throttle threshold that was applied"},windowStart:{type:"string",format:"date-time",description:"Start time of the throttle window"}},required:["throttled"],additionalProperties:!1}};var Cx={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Px={type:"object",properties:{},required:[],additionalProperties:!1},Lm={output:Cx,result:Px};var Mx={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"},from:{type:"object",properties:{email:{type:"string"},name:{type:"string"}},additionalProperties:!1}},required:["subject","body"],additionalProperties:!1},Nx={type:"object",properties:{},required:[],additionalProperties:!1},Dm={output:Mx,result:Nx};var Lx="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",Um={type:"object",properties:{url:{type:"string",pattern:Lx},target:{type:"string",enum:["_self","_blank","_parent","_top","_unfencedTop"],default:"_blank"}},if:{properties:{url:{type:"string",pattern:"^/"}}},then:{properties:{target:{default:"_self"}}},else:{properties:{target:{default:"_blank"}}},required:["url"],additionalProperties:!1},Fm={type:"object",properties:{label:{type:"string"},redirect:Um},required:["label"],additionalProperties:!1},Dx={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:Fm,secondaryAction:Fm,data:{type:"object",additionalProperties:!0},redirect:Um},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Fx={type:"object",properties:{seen:{type:"boolean"},read:{type:"boolean"},lastSeenDate:{type:"string",format:"date-time",nullable:!0},lastReadDate:{type:"string",format:"date-time",nullable:!0}},required:["seen","read","lastSeenDate","lastReadDate"],additionalProperties:!1},$m={output:Dx,result:Fx};var Ux={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},$x={type:"object",properties:{},required:[],additionalProperties:!1},qm={output:Ux,result:$x};var qx={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},jx={type:"object",properties:{},required:[],additionalProperties:!1},jm={output:qx,result:jx};var en={chat:Lm,sms:jm,push:qm,email:Dm,in_app:$m};var Mt={type:"object",properties:{},required:[],additionalProperties:!1};var Qo=(i=>(i.NONE="none",i.LOW="low",i.MEDIUM="medium",i.HIGH="high",i))(Qo||{});async function yr(e,n,t){if(e.steps.some(r=>r.stepId===n))throw new ji(n);e.steps.push(t)}async function Zo(e,n,t,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Mt;return await yr(e,i,{stepId:i,type:n,controls:{schema:await yt(s),unknownSchema:s},outputs:{schema:await yt(t),unknownSchema:t},results:{schema:await yt(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Bm(e,n,t){let r=Jo[n],i=Object.entries(t).map(async([o,a])=>{let s=r[o];return{type:o,code:a.toString(),resolve:a,outputs:{schema:await yt(s.output),unknownSchema:s.output}}});e.providers.push(...await Promise.all(i))}async function br(e,n,t,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Mt,u={stepId:i,type:n,controls:{schema:await yt(s),unknownSchema:s},outputs:{schema:await yt(t),unknownSchema:t},results:{schema:await yt(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]};return await yr(e,i,u),Object.keys(a.providers||{}).length>0&&await Bm(u,n,a.providers||{}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Wl(e,n){return async(t,r,i={})=>{let o=(i==null?void 0:i.controlSchema)||Mt,a=(i==null?void 0:i.outputSchema)||Mt,[s,u]=await Promise.all([yt(o),yt(a)]);return await yr(e,t,{stepId:t,type:n,controls:{schema:s,unknownSchema:o},outputs:{schema:u,unknownSchema:a},results:{schema:u,unknownSchema:a},resolve:r,code:r.toString(),options:i,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}var Bx={email:"email",sms:"sms",push:"push",inApp:"in_app",chat:"chat"};function zm(e){if(!e)return{};let n={};return e.all&&(n.all=e.all),Object.entries(e.channels||{}).forEach(([t,r])=>{let i=Bx[t];i&&(n.channels||(n.channels={}),n.channels[i]=r)}),n}function Vm(e,n,t){let r=t||{};return{id:e,trigger:async a=>{let s=zi(Wi(a.secretKey),Hi(a.apiUrl)),u=a.payload||{},p;if(r.payloadSchema){let P=await $r(r.payloadSchema,u);if(P.success===!1)throw new Oi(e,P.errors);p=P.data}else p=a.payload;let d=await lu(),h={name:e,to:a.to,payload:{...p},...a.transactionId&&{transactionId:a.transactionId},...a.overrides&&{overrides:a.overrides},...a.actor&&{actor:a.actor},...a.context&&{context:a.context},...d&&{bridgeUrl:d}},y=await s.post("/events/trigger",h);return{cancel:async()=>s.delete(`/events/trigger/${y.transactionId}`),data:y}},discover:async()=>{var s;let a={workflowId:e,severity:(s=r.severity)!=null?s:"none",steps:[],code:n.toString(),payload:{schema:await yt(r.payloadSchema||Mt),unknownSchema:r.payloadSchema||Mt},controls:{schema:await yt(r.controlSchema||Mt),unknownSchema:r.controlSchema||Mt},env:{schema:await yt(r.envSchema||Mt),unknownSchema:r.envSchema||Mt},tags:r.tags||[],preferences:zm(r.preferences),name:r.name,description:r.description,execute:n};return await n({payload:{},subscriber:{},env:{},controls:{},context:{},step:{push:await br(a,"push",en.push.output,en.push.result),chat:await br(a,"chat",en.chat.output,en.chat.result),email:await br(a,"email",en.email.output,en.email.result),sms:await br(a,"sms",en.sms.output,en.sms.result),inApp:await br(a,"in_app",en.in_app.output,en.in_app.result),digest:await Zo(a,"digest",Ko.output,Ko.result),delay:await Zo(a,"delay",Go.output,Go.result),throttle:await Zo(a,"throttle",Xo.output,Xo.result),custom:await Wl(a,"custom"),httpRequest:await Wl(a,"http_request")}}),a}}}function zx(e,n,t){return{type:"email",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Vx(e,n,t){return{type:"sms",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Hx(e,n,t){return{type:"chat",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Wx(e,n,t){return{type:"push",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Yx(e,n,t){return{type:"in_app",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Jx(e,n,t){return{type:"delay",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}function Gx(e,n,t){return{type:"digest",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}function Kx(e,n,t){return{type:"throttle",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}var Hm={email:zx,sms:Vx,chat:Hx,push:Wx,inApp:Yx,delay:Jx,digest:Gx,throttle:Kx};var ri=require("@nestjs/common");var Wm=require("@nestjs/common"),{ConfigurableModuleClass:ea,MODULE_OPTIONS_TOKEN:Dn,OPTIONS_TYPE:PL,ASYNC_OPTIONS_TYPE:ML}=new Wm.ConfigurableModuleBuilder().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(e=>({...e,isGlobal:!0})).build();var Yl="REGISTER_API_PATH",Jl="REGISTER_CONTROLLER_DECORATORS";var Ym=require("@nestjs/common");var Yt=class{handler(n,t){return{body:()=>n.body,headers:i=>{let o=n.headers[i.toLowerCase()];return Array.isArray(o)?o[0]:o},method:()=>n.method||"GET",queryString:i=>{let o=n.query[i];return Array.isArray(o)?o[0]:o},url:()=>{let i=n.headers.host||"",o=i!=null&&i.includes("://")?"":`${n.protocol||"https"}://`;return new URL(n.originalUrl||n.url||"",`${o}${i||""}`)},transformResponse:({body:i,headers:o,status:a})=>(Object.entries(o).forEach(([s,u])=>{t.setHeader(s,u)}),t.status(a).send(i))}}};Yt=Xt([(0,Ym.Injectable)()],Yt);var Jm="nest",Jt=class{constructor(n,t){this.options=n;this.novuHandler=t;this.novuRequestHandler=new hr({frameworkName:Jm,...this.options,handler:this.novuHandler.handler})}async handleRequest(n,t){await this.novuRequestHandler.createHandler()(n,t)}};Jt=Xt([(0,ri.Injectable)(),Qt(0,(0,ri.Inject)(Dn)),Qt(1,(0,ri.Inject)(Yt))],Jt);var wt=require("@nestjs/common");var Pt=class{constructor(n){this.novuService=n}async handleGet(n,t){await this.novuService.handleRequest(n,t)}async handlePost(n,t){await this.novuService.handleRequest(n,t)}async handleOptions(n,t){await this.novuService.handleRequest(n,t)}};Xt([(0,wt.Get)(),Qt(0,(0,wt.Req)()),Qt(1,(0,wt.Res)())],Pt.prototype,"handleGet",1),Xt([(0,wt.Post)(),Qt(0,(0,wt.Req)()),Qt(1,(0,wt.Res)())],Pt.prototype,"handlePost",1),Xt([(0,wt.Options)(),Qt(0,(0,wt.Req)()),Qt(1,(0,wt.Res)())],Pt.prototype,"handleOptions",1),Pt=Xt([(0,wt.Controller)(),Qt(0,(0,wt.Inject)(Jt))],Pt);var Xm=require("@nestjs/common");var Gm=require("@nestjs/common/constants");var ta={provide:Yl,useFactory:e=>{if(!e.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(Gm.PATH_METADATA,e.apiPath,Pt)},inject:[Dn]};function Gl(e,n=[]){return n.reduce((t,r)=>{let i=r(t);return i!=null?i:t},e)}function Xx(e,n){var t;for(let r of(t=Reflect.getMetadataKeys(e))!=null?t:[])Reflect.defineMetadata(r,Reflect.getMetadata(r,e),n)}function Km(e,n=[]){let t=Gl(e,n);t!==e&&Xx(t,e)}var Kl={provide:Jl,useFactory:e=>{var n;Km(Pt,(n=e.controllerDecorators)!=null?n:[])},inject:[Dn]};var ii=class extends ea{static register(n,t){var i;let r=ea.register(n);return r.controllers=[Gl(Pt,n.controllerDecorators||[])],(i=r.providers)==null||i.push(ta,Jt,Yt,...t||[]),r.exports=[Jt,Yt],r}static registerAsync(n,t){var i;let r=ea.registerAsync(n);return r.controllers=[Pt],(i=r.providers)==null||i.push(ta,Kl,Jt,Yt,...t||[]),r.exports=[Jt,Yt],r}};ii=Xt([(0,Xm.Module)({})],ii);0&&(module.exports={Actions,AgentDeliveryError,Button,Card,CardLink,CardText,Client,CronExpression,Divider,NOVU_OPTIONS,NovuClient,NovuController,NovuHandler,NovuModule,NovuRequestHandler,REGISTER_API_PATH,REGISTER_CONTROLLER_DECORATORS,Select,SelectOption,SeverityLevelEnum,TextInput,agent,frameworkName,providerSchemas,registerApiPath,registerControllerDecorators,step,workflow});
564
+ `,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},Mm={output:vx};var Nm={apns:Im,expo:Cm,fcm:Pm,"one-signal":Mm,"pusher-beams":le,pushpad:le,"push-webhook":le,appio:le};var Ex={type:"object",properties:{},required:[],additionalProperties:!1},Lm={output:Ex};var _x={type:"object",properties:{to:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`."},statusCallback:{type:"string",format:"uri",description:"The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messagingServiceSid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). "},applicationSid:{type:"string",minLength:34,maxLength:34,pattern:"^AP[0-9a-fA-F]{32}$",description:"The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `statusCallback` URL. Note that the `statusCallback` parameter of a request takes priority over the `applicationSid` parameter; if both are included `applicationSid` is ignored."},maxPrice:{type:"number",description:"[OBSOLETE] This parameter will no longer have any effect as of 2024-06-03."},provideFeedback:{type:"boolean",description:"Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`."},attempt:{type:"integer",description:"Total number of attempts made (including this request) to send the message regardless of the provider used"},validityPeriod:{type:"integer",description:"The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validityPeriod`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validityPeriod` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)"},forceDelivery:{type:"boolean",description:"Reserved"},contentRetention:{type:"string",enum:["retain","discard"],description:"Determines if the message content can be stored or redacted based on privacy settings"},addressRetention:{type:"string",enum:["retain","obfuscate"],description:"Determines if the address can be stored or obfuscated based on privacy settings"},smartEncoded:{type:"boolean",description:"Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`."},persistentAction:{type:"array",items:{type:"string"},description:"Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp)."},shortenUrls:{type:"boolean",description:"For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messagingServiceSid` parameter must also be provided."},scheduleType:{type:"string",enum:["fixed"],description:"For Messaging Services only: Include this parameter with a value of `fixed` in conjunction with the `sendAt` parameter in order to [schedule a Message](https://www.twilio.com/docs/messaging/features/message-scheduling)."},sendAt:{type:"string",format:"date-time",description:"The time that Twilio will send the message. Must be in ISO 8601 format."},sendAsMms:{type:"boolean",description:"If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media."},contentVariables:{type:"string",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `contentSid` parameter must also be provided. If values are not defined in the `contentVariables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used."},riskCheck:{type:"string",enum:["enable","disable"],description:"Include this parameter with a value of `disable` to skip any kind of risk check on the respective message request."},from:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messagingServiceSid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool."},messagingServiceSid:{type:"string",minLength:34,maxLength:34,pattern:"^MG[0-9a-fA-F]{32}$",description:"The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool."},body:{type:"string",description:"The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [sendAsMms parameter](https://www.twilio.com/blog/mms-for-long-text-messages)."},mediaUrl:{type:"array",items:{type:"string",format:"uri"},description:"The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `mediaUrl` parameters in the POST request. You can include up to ten `mediaUrl` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply."},contentSid:{type:"string",minLength:34,maxLength:34,pattern:"^HX[0-9a-fA-F]{32}$",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources)."}},required:[],additionalProperties:!0},Dm={output:_x};var Fm={"africas-talking":le,"azure-sms":le,bandwidth:le,"brevo-sms":le,"bulk-sms":le,"burst-sms":le,clickatell:le,clicksend:le,"eazy-sms":le,firetext:le,"forty-six-elks":le,"generic-sms":le,gupshup:le,"infobip-sms":le,"isend-sms":le,kannel:le,maqsam:le,messagebird:le,mobishastra:le,nexmo:le,"novu-sms":Lm,plivo:le,"ring-central":le,sendchamp:le,simpletexting:le,sms77:le,"sms-central":le,smsmode:le,sns:le,telnyx:le,termii:le,twilio:Dm,"afro-message":le,unifonic:le,imedia:le,sinch:le,"isendpro-sms":le};var Xo={chat:Sm,sms:Fm,email:Em,push:Nm,in_app:Rm};var Rx={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},Ox={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Ix={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},Cx={oneOf:[Rx,Ox,Ix]},Px={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},Qo={output:Cx,result:Px};var Mx={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},digestKey:{type:"string"},lookBackWindow:{type:"object",properties:{amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]}},required:["amount","unit"],additionalProperties:!1},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},Nx={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Lx={oneOf:[Mx,Nx]},Dx={type:"object",properties:{eventCount:{type:"number"},events:{type:"array",items:{type:"object",properties:{id:{type:"string"},time:{type:"string"},payload:{type:"object"}},required:["id","time","payload"],additionalProperties:!1}}},required:["events"],additionalProperties:!1},Zo={output:Lx,result:Dx};var ea={output:{type:"object",properties:{type:{type:"string",enum:["fixed","dynamic"]},amount:{type:"number"},unit:{type:"string",enum:["minutes","hours","days"]},dynamicKey:{type:"string"},threshold:{type:"number"},throttleKey:{type:"string"}},required:["type"],additionalProperties:!1},result:{type:"object",properties:{throttled:{type:"boolean",description:"Whether the workflow execution was throttled"},executionCount:{type:"number",description:"Number of executions within the throttle window"},threshold:{type:"number",description:"The throttle threshold that was applied"},windowStart:{type:"string",format:"date-time",description:"Start time of the throttle window"}},required:["throttled"],additionalProperties:!1}};var Fx={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Ux={type:"object",properties:{},required:[],additionalProperties:!1},Um={output:Fx,result:Ux};var $x={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"},from:{type:"object",properties:{email:{type:"string"},name:{type:"string"}},additionalProperties:!1}},required:["subject","body"],additionalProperties:!1},qx={type:"object",properties:{},required:[],additionalProperties:!1},$m={output:$x,result:qx};var jx="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",jm={type:"object",properties:{url:{type:"string",pattern:jx},target:{type:"string",enum:["_self","_blank","_parent","_top","_unfencedTop"],default:"_blank"}},if:{properties:{url:{type:"string",pattern:"^/"}}},then:{properties:{target:{default:"_self"}}},else:{properties:{target:{default:"_blank"}}},required:["url"],additionalProperties:!1},qm={type:"object",properties:{label:{type:"string"},redirect:jm},required:["label"],additionalProperties:!1},Bx={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:qm,secondaryAction:qm,data:{type:"object",additionalProperties:!0},redirect:jm},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},zx={type:"object",properties:{seen:{type:"boolean"},read:{type:"boolean"},lastSeenDate:{type:"string",format:"date-time",nullable:!0},lastReadDate:{type:"string",format:"date-time",nullable:!0}},required:["seen","read","lastSeenDate","lastReadDate"],additionalProperties:!1},Bm={output:Bx,result:zx};var Vx={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},Wx={type:"object",properties:{},required:[],additionalProperties:!1},zm={output:Vx,result:Wx};var Hx={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Yx={type:"object",properties:{},required:[],additionalProperties:!1},Vm={output:Hx,result:Yx};var en={chat:Um,sms:Vm,push:zm,email:$m,in_app:Bm};var Mt={type:"object",properties:{},required:[],additionalProperties:!1};var ta=(i=>(i.NONE="none",i.LOW="low",i.MEDIUM="medium",i.HIGH="high",i))(ta||{});async function br(e,n,t){if(e.steps.some(r=>r.stepId===n))throw new zi(n);e.steps.push(t)}async function na(e,n,t,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Mt;return await br(e,i,{stepId:i,type:n,controls:{schema:await yt(s),unknownSchema:s},outputs:{schema:await yt(t),unknownSchema:t},results:{schema:await yt(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Wm(e,n,t){let r=Xo[n],i=Object.entries(t).map(async([o,a])=>{let s=r[o];return{type:o,code:a.toString(),resolve:a,outputs:{schema:await yt(s.output),unknownSchema:s.output}}});e.providers.push(...await Promise.all(i))}async function wr(e,n,t,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Mt,u={stepId:i,type:n,controls:{schema:await yt(s),unknownSchema:s},outputs:{schema:await yt(t),unknownSchema:t},results:{schema:await yt(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]};return await br(e,i,u),Object.keys(a.providers||{}).length>0&&await Wm(u,n,a.providers||{}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Gl(e,n){return async(t,r,i={})=>{let o=(i==null?void 0:i.controlSchema)||Mt,a=(i==null?void 0:i.outputSchema)||Mt,[s,u]=await Promise.all([yt(o),yt(a)]);return await br(e,t,{stepId:t,type:n,controls:{schema:s,unknownSchema:o},outputs:{schema:u,unknownSchema:a},results:{schema:u,unknownSchema:a},resolve:r,code:r.toString(),options:i,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}var Jx={email:"email",sms:"sms",push:"push",inApp:"in_app",chat:"chat"};function Hm(e){if(!e)return{};let n={};return e.all&&(n.all=e.all),Object.entries(e.channels||{}).forEach(([t,r])=>{let i=Jx[t];i&&(n.channels||(n.channels={}),n.channels[i]=r)}),n}function Ym(e,n,t){let r=t||{};return{id:e,trigger:async a=>{let s=Wi(Ji(a.secretKey),Yi(a.apiUrl)),u=a.payload||{},p;if(r.payloadSchema){let P=await qr(r.payloadSchema,u);if(P.success===!1)throw new Ii(e,P.errors);p=P.data}else p=a.payload;let d=await pu(),h={name:e,to:a.to,payload:{...p},...a.transactionId&&{transactionId:a.transactionId},...a.overrides&&{overrides:a.overrides},...a.actor&&{actor:a.actor},...a.context&&{context:a.context},...d&&{bridgeUrl:d}},y=await s.post("/events/trigger",h);return{cancel:async()=>s.delete(`/events/trigger/${y.transactionId}`),data:y}},discover:async()=>{var s;let a={workflowId:e,severity:(s=r.severity)!=null?s:"none",steps:[],code:n.toString(),payload:{schema:await yt(r.payloadSchema||Mt),unknownSchema:r.payloadSchema||Mt},controls:{schema:await yt(r.controlSchema||Mt),unknownSchema:r.controlSchema||Mt},env:{schema:await yt(r.envSchema||Mt),unknownSchema:r.envSchema||Mt},tags:r.tags||[],preferences:Hm(r.preferences),name:r.name,description:r.description,execute:n};return await n({payload:{},subscriber:{},env:{},controls:{},context:{},step:{push:await wr(a,"push",en.push.output,en.push.result),chat:await wr(a,"chat",en.chat.output,en.chat.result),email:await wr(a,"email",en.email.output,en.email.result),sms:await wr(a,"sms",en.sms.output,en.sms.result),inApp:await wr(a,"in_app",en.in_app.output,en.in_app.result),digest:await na(a,"digest",Zo.output,Zo.result),delay:await na(a,"delay",Qo.output,Qo.result),throttle:await na(a,"throttle",ea.output,ea.result),custom:await Gl(a,"custom"),httpRequest:await Gl(a,"http_request")}}),a}}}function Gx(e,n,t){return{type:"email",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Kx(e,n,t){return{type:"sms",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Xx(e,n,t){return{type:"chat",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Qx(e,n,t){return{type:"push",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Zx(e,n,t){return{type:"in_app",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function ek(e,n,t){return{type:"delay",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}function tk(e,n,t){return{type:"digest",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}function nk(e,n,t){return{type:"throttle",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}var Jm={email:Gx,sms:Kx,chat:Xx,push:Qx,inApp:Zx,delay:ek,digest:tk,throttle:nk};var oi=require("@nestjs/common");var Gm=require("@nestjs/common"),{ConfigurableModuleClass:ra,MODULE_OPTIONS_TOKEN:Dn,OPTIONS_TYPE:$L,ASYNC_OPTIONS_TYPE:qL}=new Gm.ConfigurableModuleBuilder().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(e=>({...e,isGlobal:!0})).build();var Kl="REGISTER_API_PATH",Xl="REGISTER_CONTROLLER_DECORATORS";var Km=require("@nestjs/common");var Yt=class{handler(n,t){return{body:()=>n.body,headers:i=>{let o=n.headers[i.toLowerCase()];return Array.isArray(o)?o[0]:o},method:()=>n.method||"GET",queryString:i=>{let o=n.query[i];return Array.isArray(o)?o[0]:o},url:()=>{let i=n.headers.host||"",o=i!=null&&i.includes("://")?"":`${n.protocol||"https"}://`;return new URL(n.originalUrl||n.url||"",`${o}${i||""}`)},transformResponse:({body:i,headers:o,status:a})=>(Object.entries(o).forEach(([s,u])=>{t.setHeader(s,u)}),t.status(a).send(i))}}};Yt=Xt([(0,Km.Injectable)()],Yt);var Xm="nest",Jt=class{constructor(n,t){this.options=n;this.novuHandler=t;this.novuRequestHandler=new fr({frameworkName:Xm,...this.options,handler:this.novuHandler.handler})}async handleRequest(n,t){await this.novuRequestHandler.createHandler()(n,t)}};Jt=Xt([(0,oi.Injectable)(),Qt(0,(0,oi.Inject)(Dn)),Qt(1,(0,oi.Inject)(Yt))],Jt);var wt=require("@nestjs/common");var Pt=class{constructor(n){this.novuService=n}async handleGet(n,t){await this.novuService.handleRequest(n,t)}async handlePost(n,t){await this.novuService.handleRequest(n,t)}async handleOptions(n,t){await this.novuService.handleRequest(n,t)}};Xt([(0,wt.Get)(),Qt(0,(0,wt.Req)()),Qt(1,(0,wt.Res)())],Pt.prototype,"handleGet",1),Xt([(0,wt.Post)(),Qt(0,(0,wt.Req)()),Qt(1,(0,wt.Res)())],Pt.prototype,"handlePost",1),Xt([(0,wt.Options)(),Qt(0,(0,wt.Req)()),Qt(1,(0,wt.Res)())],Pt.prototype,"handleOptions",1),Pt=Xt([(0,wt.Controller)(),Qt(0,(0,wt.Inject)(Jt))],Pt);var eg=require("@nestjs/common");var Qm=require("@nestjs/common/constants");var ia={provide:Kl,useFactory:e=>{if(!e.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(Qm.PATH_METADATA,e.apiPath,Pt)},inject:[Dn]};function Ql(e,n=[]){return n.reduce((t,r)=>{let i=r(t);return i!=null?i:t},e)}function rk(e,n){var t;for(let r of(t=Reflect.getMetadataKeys(e))!=null?t:[])Reflect.defineMetadata(r,Reflect.getMetadata(r,e),n)}function Zm(e,n=[]){let t=Ql(e,n);t!==e&&rk(t,e)}var Zl={provide:Xl,useFactory:e=>{var n;Zm(Pt,(n=e.controllerDecorators)!=null?n:[])},inject:[Dn]};var ai=class extends ra{static register(n,t){var i;let r=ra.register(n);return r.controllers=[Ql(Pt,n.controllerDecorators||[])],(i=r.providers)==null||i.push(ia,Jt,Yt,...t||[]),r.exports=[Jt,Yt],r}static registerAsync(n,t){var i;let r=ra.registerAsync(n);return r.controllers=[Pt],(i=r.providers)==null||i.push(ia,Zl,Jt,Yt,...t||[]),r.exports=[Jt,Yt],r}};ai=Xt([(0,eg.Module)({})],ai);0&&(module.exports={Actions,AgentDeliveryError,AgentError,Button,Card,CardLink,CardText,Client,CronExpression,Divider,NOVU_OPTIONS,NovuClient,NovuController,NovuHandler,NovuModule,NovuRequestHandler,REGISTER_API_PATH,REGISTER_CONTROLLER_DECORATORS,Select,SelectOption,SeverityLevelEnum,TextInput,agent,frameworkName,providerSchemas,registerApiPath,registerControllerDecorators,step,toAgentError,workflow});