@novu/framework 2.13.1-rc.852194fa77 → 2.13.1

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 (65) hide show
  1. package/dist/cjs/{agent.types-CQKSD7NC.d.cts → agent.types-crcJBtCy.d.cts} +119 -3
  2. package/dist/cjs/ai-sdk/index.d.cts +1 -1
  3. package/dist/cjs/{health-check.types-B6RuXNc8.d.cts → health-check.types-C2XZ-Tpt.d.cts} +2 -2
  4. package/dist/cjs/{index-phn3kJ9H.d.cts → index-DVSB455a.d.cts} +3 -3
  5. package/dist/cjs/index.cjs +96 -96
  6. package/dist/cjs/index.d.cts +4 -4
  7. package/dist/cjs/internal/index.cjs +36 -36
  8. package/dist/cjs/internal/index.d.cts +29 -14
  9. package/dist/cjs/langchain/index.d.cts +1 -1
  10. package/dist/cjs/servers/express.cjs +97 -97
  11. package/dist/cjs/servers/express.d.cts +5 -5
  12. package/dist/cjs/servers/h3.cjs +106 -106
  13. package/dist/cjs/servers/h3.d.cts +5 -5
  14. package/dist/cjs/servers/hono.cjs +103 -103
  15. package/dist/cjs/servers/hono.d.cts +5 -5
  16. package/dist/cjs/servers/lambda.cjs +97 -97
  17. package/dist/cjs/servers/lambda.d.cts +5 -5
  18. package/dist/cjs/servers/nest.cjs +99 -99
  19. package/dist/cjs/servers/nest.d.cts +7 -7
  20. package/dist/cjs/servers/next.cjs +116 -116
  21. package/dist/cjs/servers/next.d.cts +5 -5
  22. package/dist/cjs/servers/nuxt.cjs +106 -106
  23. package/dist/cjs/servers/nuxt.d.cts +5 -5
  24. package/dist/cjs/servers/remix.cjs +110 -110
  25. package/dist/cjs/servers/remix.d.cts +5 -5
  26. package/dist/cjs/servers/sveltekit.cjs +110 -110
  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-_eHz1E0m.d.cts → subscriber.types-BanvmGul.d.cts} +1 -1
  31. package/dist/esm/{agent.types-C17NUGxY.d.ts → agent.types-DFLG1_vb.d.ts} +119 -3
  32. package/dist/esm/ai-sdk/index.d.ts +1 -1
  33. package/dist/esm/chunk-4ETX7FIT.js +1 -0
  34. package/dist/esm/{chunk-UXO4RWZV.js → chunk-IREH6K2M.js} +2 -2
  35. package/dist/esm/{chunk-WJUYDVXH.js → chunk-PBC7WR2R.js} +46 -46
  36. package/dist/esm/{health-check.types-CL5-B_D4.d.ts → health-check.types-DORn4djx.d.ts} +2 -2
  37. package/dist/esm/{index-CYtGHJJu.d.ts → index-BvRGmHFw.d.ts} +3 -3
  38. package/dist/esm/index.d.ts +4 -4
  39. package/dist/esm/index.js +1 -1
  40. package/dist/esm/internal/index.d.ts +20 -5
  41. package/dist/esm/internal/index.js +1 -1
  42. package/dist/esm/langchain/index.d.ts +1 -1
  43. package/dist/esm/servers/express.d.ts +5 -5
  44. package/dist/esm/servers/express.js +1 -1
  45. package/dist/esm/servers/h3.d.ts +5 -5
  46. package/dist/esm/servers/h3.js +1 -1
  47. package/dist/esm/servers/hono.d.ts +5 -5
  48. package/dist/esm/servers/hono.js +1 -1
  49. package/dist/esm/servers/lambda.d.ts +5 -5
  50. package/dist/esm/servers/lambda.js +1 -1
  51. package/dist/esm/servers/nest.d.ts +7 -7
  52. package/dist/esm/servers/nest.js +1 -1
  53. package/dist/esm/servers/next.d.ts +5 -5
  54. package/dist/esm/servers/next.js +1 -1
  55. package/dist/esm/servers/nuxt.d.ts +5 -5
  56. package/dist/esm/servers/nuxt.js +1 -1
  57. package/dist/esm/servers/remix.d.ts +5 -5
  58. package/dist/esm/servers/remix.js +1 -1
  59. package/dist/esm/servers/sveltekit.d.ts +5 -5
  60. package/dist/esm/servers/sveltekit.js +1 -1
  61. package/dist/esm/step-resolver.d.ts +2 -2
  62. package/dist/esm/step-resolver.js +1 -1
  63. package/dist/esm/{subscriber.types-D4PvRIKR.d.ts → subscriber.types-Drf26WPA.d.ts} +1 -1
  64. package/package.json +1 -1
  65. package/dist/esm/chunk-Q3ALQWIF.js +0 -1
@@ -1,164 +1,164 @@
1
- "use strict";var Zg=Object.create;var rr=Object.defineProperty;var lu=Object.getOwnPropertyDescriptor;var ey=Object.getOwnPropertyNames;var ty=Object.getPrototypeOf,ny=Object.prototype.hasOwnProperty;var ry=(e,t,n)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var M=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var iy=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Ka=(e,t)=>{for(var n in t)rr(e,n,{get:t[n],enumerable:!0})},cu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ey(t))!ny.call(e,i)&&i!==n&&rr(e,i,{get:()=>t[i],enumerable:!(r=lu(t,i))||r.enumerable});return e};var zt=(e,t,n)=>(n=e!=null?Zg(ty(e)):{},cu(t||!e||!e.__esModule?rr(n,"default",{value:e,enumerable:!0}):n,e)),oy=e=>cu(rr({},"__esModule",{value:!0}),e),Zt=(e,t,n,r)=>{for(var i=r>1?void 0:r?lu(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&rr(t,n,i),i},en=(e,t)=>(n,r)=>t(n,r,e);var ve=(e,t,n)=>ry(e,typeof t!="symbol"?t+"":t,n);function bn(e,t){let n=t||cy,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Su(e,r,i)}function Su(e,t,n){if(uy(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wu(e.children,t,n)}return Array.isArray(e)?wu(e,t,n):""}function wu(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Su(e[i],t,n);return r.join("")}function uy(e){return!!(e&&typeof e=="object")}var cy,Tu=M(()=>{"use strict";cy={}});var Ur=M(()=>{"use strict";Tu()});function es(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var xu=M(()=>{"use strict"});function zn(e){return e!==null&&(e<32||e===127)}function le(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 Cn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}var ht,ft,vu,$r,ku,Au,Vn,on,Be=M(()=>{"use strict";ht=Cn(/[A-Za-z]/),ft=Cn(/[\dA-Za-z]/),vu=Cn(/[#-'*+\--9=?A-Z^-~]/);$r=Cn(/\d/),ku=Cn(/[\dA-Fa-f]/),Au=Cn(/[!-/:-@[-`{-~]/);Vn=Cn(/\p{P}|\p{S}/u),on=Cn(/\s/)});function ts(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Eu=M(()=>{"use strict"});function py(e){let t=[],n=-1;for(;++n<e.length;)t[n]=In(e[n]);return to(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function dy(e){let t=e;return to(n);function n(r){let i=r,o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function hy(e){return to(t);function t(n){return n&&n.type===e}}function to(e){return t;function t(n,r,i){return!!(my(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function fy(){return!0}function my(e){return e!==null&&typeof e=="object"&&"type"in e}var In,Ru=M(()=>{"use strict";In=(function(e){if(e==null)return fy;if(typeof e=="function")return to(e);if(typeof e=="object")return Array.isArray(e)?py(e):dy(e);if(typeof e=="string")return hy(e);throw new Error("Expected function, string, or object as test")})});var no=M(()=>{"use strict";Ru()});function _u(e){return"\x1B[33m"+e+"\x1B[39m"}var Ou=M(()=>{"use strict"});function qr(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;let o=In(i),a=r?-1:1;s(e,void 0,[])();function s(u,p,h){let d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){let y=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(g,"name",{value:"node ("+_u(u.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=Cu,P,ee,Z;if((!t||o(u,p,h[h.length-1]||void 0))&&(y=gy(n(u,h)),y[0]===Wn))return y;if("children"in u&&u.children){let B=u;if(B.children&&y[0]!==io)for(ee=(r?B.children.length:-1)+a,Z=h.concat(B);ee>-1&&ee<B.children.length;){let ue=B.children[ee];if(P=s(ue,ee,Z)(),P[0]===Wn)return P;ee=typeof P[1]=="number"?P[1]:ee+a}}return y}}}function gy(e){return Array.isArray(e)?e:typeof e=="number"?[ro,e]:e==null?Cu:[e]}var Cu,ro,Wn,io,Iu=M(()=>{"use strict";no();Ou();Cu=[],ro=!0,Wn=!1,io="skip"});var oo=M(()=>{"use strict";Iu()});function ns(e,t,n){let i=In((n||{}).ignore||[]),o=yy(t),a=-1;for(;++a<o.length;)qr(e,"text",s);function s(p,h){let d=-1,g;for(;++d<h.length;){let y=h[d],P=g?g.children:void 0;if(i(y,P?P.indexOf(y):void 0,g))return;g=y}if(g)return u(p,h)}function u(p,h){let d=h[h.length-1],g=o[a][0],y=o[a][1],P=0,Z=d.children.indexOf(p),B=!1,ue=[];g.lastIndex=0;let ne=g.exec(p.value);for(;ne;){let ke=ne.index,Oe={index:ne.index,input:ne.input,stack:[...h,p]},$=y(...ne,Oe);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?g.lastIndex=ke+1:(P!==ke&&ue.push({type:"text",value:p.value.slice(P,ke)}),Array.isArray($)?ue.push(...$):$&&ue.push($),P=ke+ne[0].length,B=!0),!g.global)break;ne=g.exec(p.value)}return B?(P<p.value.length&&ue.push({type:"text",value:p.value.slice(P)}),d.children.splice(Z,1,...ue)):ue=[p],Z+ue.length}}function yy(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let i=n[r];t.push([by(i[0]),wy(i[1])])}return t}function by(e){return typeof e=="string"?new RegExp(ts(e),"g"):e}function wy(e){return typeof e=="function"?e:function(){return e}}var Pu=M(()=>{"use strict";Eu();oo();no()});var Mu=M(()=>{"use strict";Pu()});function as(){return{transforms:[Ay],enter:{literalAutolink:Sy,literalAutolinkEmail:os,literalAutolinkHttp:os,literalAutolinkWww:os},exit:{literalAutolink:ky,literalAutolinkEmail:vy,literalAutolinkHttp:Ty,literalAutolinkWww:xy}}}function ss(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rs,notInConstruct:is},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rs,notInConstruct:is},{character:":",before:"[ps]",after:"\\/",inConstruct:rs,notInConstruct:is}]}}function Sy(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function os(e){this.config.enter.autolinkProtocol.call(this,e)}function Ty(e){this.config.exit.autolinkProtocol.call(this,e)}function xy(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function vy(e){this.config.exit.autolinkEmail.call(this,e)}function ky(e){this.exit(e)}function Ay(e){ns(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ey],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Ry]],{ignore:["link","linkReference"]})}function Ey(e,t,n,r,i){let o="";if(!Nu(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!_y(n)))return!1;let a=Oy(n+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Ry(e,t,n,r){return!Nu(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function _y(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Oy(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=es(e,"("),o=es(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Nu(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||on(n)||Vn(n))&&(!t||n!==47)}var rs,is,Lu=M(()=>{"use strict";xu();Be();Mu();rs="phrasing",is=["autolink","link","image","label"]});var Du=M(()=>{"use strict";Lu()});function vt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var sr=M(()=>{"use strict"});function ls(){return{enter:{gfmFootnoteDefinition:Cy,gfmFootnoteDefinitionLabelString:Iy,gfmFootnoteCall:Ny,gfmFootnoteCallString:Ly},exit:{gfmFootnoteDefinition:My,gfmFootnoteDefinitionLabelString:Py,gfmFootnoteCall:Fy,gfmFootnoteCallString:Dy}}}function cs(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:$y,footnoteReference:Fu}}}function Cy(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Iy(){this.buffer()}function Py(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=vt(this.sliceSerialize(e)).toLowerCase()}function My(e){this.exit(e)}function Ny(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ly(){this.buffer()}function Dy(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=vt(this.sliceSerialize(e)).toLowerCase()}function Fy(e){this.exit(e)}function Fu(e,t,n,r){let i=n.createTracker(r),o=i.move("[^"),a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function Uy(){return"["}function $y(e,t,n,r){let i=n.createTracker(r),o=i.move("[^"),a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),qy)),a(),o}function qy(e,t,n){return t===0?e:(n?"":" ")+e}var Uu=M(()=>{"use strict";sr();Fu.peek=Uy});var $u=M(()=>{"use strict";Uu()});function us(){return{canContainEols:["delete"],enter:{strikethrough:By},exit:{strikethrough:zy}}}function ps(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:jy}],handlers:{delete:qu}}}function By(e){this.enter({type:"delete",children:[]},e)}function zy(e){this.exit(e)}function qu(e,t,n,r){let i=n.createTracker(r),o=n.enter("strikethrough"),a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Vy(){return"~"}var jy,ju=M(()=>{"use strict";jy=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qu.peek=Vy});var Bu=M(()=>{"use strict";ju()});function Vu(e,t={}){let n=(t.align||[]).concat(),r=t.stringLength||Hy,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=Wy(e[p][Z]);if(t.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 h=-1;if(typeof n=="object"&&"length"in n)for(;++h<u;)i[h]=zu(n[h]);else{let P=zu(n);for(;++h<u;)i[h]=P}h=-1;let d=[],g=[];for(;++h<u;){let P=i[h],ee="",Z="";P===99?(ee=":",Z=":"):P===108?ee=":":P===114&&(Z=":");let B=t.alignDelimiters===!1?1:Math.max(1,s[h]-ee.length-Z.length),ue=ee+"-".repeat(B)+Z;t.alignDelimiters!==!1&&(B=ee.length+B+Z.length,B>s[h]&&(s[h]=B),g[h]=B),d[h]=ue}o.splice(1,0,d),a.splice(1,0,g),p=-1;let y=[];for(;++p<o.length;){let P=o[p],ee=a[p];h=-1;let Z=[];for(;++h<u;){let B=P[h]||"",ue="",ne="";if(t.alignDelimiters!==!1){let ke=s[h]-(ee[h]||0),Oe=i[h];Oe===114?ue=" ".repeat(ke):Oe===99?ke%2?(ue=" ".repeat(ke/2+.5),ne=" ".repeat(ke/2-.5)):(ue=" ".repeat(ke/2),ne=ue):ne=" ".repeat(ke)}t.delimiterStart!==!1&&!h&&Z.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&B==="")&&(t.delimiterStart!==!1||h)&&Z.push(" "),t.alignDelimiters!==!1&&Z.push(ue),Z.push(B),t.alignDelimiters!==!1&&Z.push(ne),t.padding!==!1&&Z.push(" "),(t.delimiterEnd!==!1||h!==u-1)&&Z.push("|")}y.push(t.delimiterEnd===!1?Z.join("").replace(/ +$/,""):Z.join(""))}return y.join(`
2
- `)}function Wy(e){return e==null?"":String(e)}function Hy(e){return e.length}function zu(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Wu=M(()=>{"use strict"});function Hu(e,t,n,r){let i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);let a=n.indentLines(n.containerFlow(e,o.current()),Yy);return i(),a}function Yy(e,t,n){return">"+(n?"":" ")+e}var Yu=M(()=>{"use strict"});function Gu(e,t){return Ju(e,t.inConstruct,!0)&&!Ju(e,t.notInConstruct,!1)}function Ju(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}var Ku=M(()=>{"use strict"});function ds(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
1
+ "use strict";var ty=Object.create;var rr=Object.defineProperty;var lu=Object.getOwnPropertyDescriptor;var ny=Object.getOwnPropertyNames;var ry=Object.getPrototypeOf,iy=Object.prototype.hasOwnProperty;var oy=(e,t,n)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var M=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var ay=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Ka=(e,t)=>{for(var n in t)rr(e,n,{get:t[n],enumerable:!0})},cu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ny(t))!iy.call(e,i)&&i!==n&&rr(e,i,{get:()=>t[i],enumerable:!(r=lu(t,i))||r.enumerable});return e};var zt=(e,t,n)=>(n=e!=null?ty(ry(e)):{},cu(t||!e||!e.__esModule?rr(n,"default",{value:e,enumerable:!0}):n,e)),sy=e=>cu(rr({},"__esModule",{value:!0}),e),Zt=(e,t,n,r)=>{for(var i=r>1?void 0:r?lu(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&rr(t,n,i),i},en=(e,t)=>(n,r)=>t(n,r,e);var ve=(e,t,n)=>oy(e,typeof t!="symbol"?t+"":t,n);function bn(e,t){let n=t||py,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Su(e,r,i)}function Su(e,t,n){if(dy(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wu(e.children,t,n)}return Array.isArray(e)?wu(e,t,n):""}function wu(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Su(e[i],t,n);return r.join("")}function dy(e){return!!(e&&typeof e=="object")}var py,Tu=M(()=>{"use strict";py={}});var Ur=M(()=>{"use strict";Tu()});function es(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var xu=M(()=>{"use strict"});function zn(e){return e!==null&&(e<32||e===127)}function le(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 Cn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}var ht,ft,vu,$r,ku,Au,Hn,on,Be=M(()=>{"use strict";ht=Cn(/[A-Za-z]/),ft=Cn(/[\dA-Za-z]/),vu=Cn(/[#-'*+\--9=?A-Z^-~]/);$r=Cn(/\d/),ku=Cn(/[\dA-Fa-f]/),Au=Cn(/[!-/:-@[-`{-~]/);Hn=Cn(/\p{P}|\p{S}/u),on=Cn(/\s/)});function ts(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Eu=M(()=>{"use strict"});function hy(e){let t=[],n=-1;for(;++n<e.length;)t[n]=In(e[n]);return to(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function fy(e){let t=e;return to(n);function n(r){let i=r,o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function my(e){return to(t);function t(n){return n&&n.type===e}}function to(e){return t;function t(n,r,i){return!!(yy(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function gy(){return!0}function yy(e){return e!==null&&typeof e=="object"&&"type"in e}var In,Ru=M(()=>{"use strict";In=(function(e){if(e==null)return gy;if(typeof e=="function")return to(e);if(typeof e=="object")return Array.isArray(e)?hy(e):fy(e);if(typeof e=="string")return my(e);throw new Error("Expected function, string, or object as test")})});var no=M(()=>{"use strict";Ru()});function _u(e){return"\x1B[33m"+e+"\x1B[39m"}var Ou=M(()=>{"use strict"});function qr(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;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 y=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(g,"name",{value:"node ("+_u(u.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=Cu,P,ee,Z;if((!t||o(u,p,d[d.length-1]||void 0))&&(y=by(n(u,d)),y[0]===Vn))return y;if("children"in u&&u.children){let B=u;if(B.children&&y[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]===Vn)return P;ee=typeof P[1]=="number"?P[1]:ee+a}}return y}}}function by(e){return Array.isArray(e)?e:typeof e=="number"?[ro,e]:e==null?Cu:[e]}var Cu,ro,Vn,io,Iu=M(()=>{"use strict";no();Ou();Cu=[],ro=!0,Vn=!1,io="skip"});var oo=M(()=>{"use strict";Iu()});function ns(e,t,n){let i=In((n||{}).ignore||[]),o=wy(t),a=-1;for(;++a<o.length;)qr(e,"text",s);function s(p,d){let h=-1,g;for(;++h<d.length;){let y=d[h],P=g?g.children:void 0;if(i(y,P?P.indexOf(y):void 0,g))return;g=y}if(g)return u(p,d)}function u(p,d){let h=d[d.length-1],g=o[a][0],y=o[a][1],P=0,Z=h.children.indexOf(p),B=!1,ue=[];g.lastIndex=0;let ne=g.exec(p.value);for(;ne;){let ke=ne.index,Oe={index:ne.index,input:ne.input,stack:[...d,p]},$=y(...ne,Oe);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?g.lastIndex=ke+1:(P!==ke&&ue.push({type:"text",value:p.value.slice(P,ke)}),Array.isArray($)?ue.push(...$):$&&ue.push($),P=ke+ne[0].length,B=!0),!g.global)break;ne=g.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 wy(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let i=n[r];t.push([Sy(i[0]),Ty(i[1])])}return t}function Sy(e){return typeof e=="string"?new RegExp(ts(e),"g"):e}function Ty(e){return typeof e=="function"?e:function(){return e}}var Pu=M(()=>{"use strict";Eu();oo();no()});var Mu=M(()=>{"use strict";Pu()});function as(){return{transforms:[Ry],enter:{literalAutolink:xy,literalAutolinkEmail:os,literalAutolinkHttp:os,literalAutolinkWww:os},exit:{literalAutolink:Ey,literalAutolinkEmail:Ay,literalAutolinkHttp:vy,literalAutolinkWww:ky}}}function ss(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rs,notInConstruct:is},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rs,notInConstruct:is},{character:":",before:"[ps]",after:"\\/",inConstruct:rs,notInConstruct:is}]}}function xy(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function os(e){this.config.enter.autolinkProtocol.call(this,e)}function vy(e){this.config.exit.autolinkProtocol.call(this,e)}function ky(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ay(e){this.config.exit.autolinkEmail.call(this,e)}function Ey(e){this.exit(e)}function Ry(e){ns(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,_y],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Oy]],{ignore:["link","linkReference"]})}function _y(e,t,n,r,i){let o="";if(!Nu(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Cy(n)))return!1;let a=Iy(n+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Oy(e,t,n,r){return!Nu(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Cy(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Iy(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=es(e,"("),o=es(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Nu(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||on(n)||Hn(n))&&(!t||n!==47)}var rs,is,Lu=M(()=>{"use strict";xu();Be();Mu();rs="phrasing",is=["autolink","link","image","label"]});var Du=M(()=>{"use strict";Lu()});function vt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var sr=M(()=>{"use strict"});function ls(){return{enter:{gfmFootnoteDefinition:Py,gfmFootnoteDefinitionLabelString:My,gfmFootnoteCall:Dy,gfmFootnoteCallString:Fy},exit:{gfmFootnoteDefinition:Ly,gfmFootnoteDefinitionLabelString:Ny,gfmFootnoteCall:$y,gfmFootnoteCallString:Uy}}}function cs(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:jy,footnoteReference:Fu}}}function Py(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function My(){this.buffer()}function Ny(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=vt(this.sliceSerialize(e)).toLowerCase()}function Ly(e){this.exit(e)}function Dy(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Fy(){this.buffer()}function Uy(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=vt(this.sliceSerialize(e)).toLowerCase()}function $y(e){this.exit(e)}function Fu(e,t,n,r){let i=n.createTracker(r),o=i.move("[^"),a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function qy(){return"["}function jy(e,t,n,r){let i=n.createTracker(r),o=i.move("[^"),a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),By)),a(),o}function By(e,t,n){return t===0?e:(n?"":" ")+e}var Uu=M(()=>{"use strict";sr();Fu.peek=qy});var $u=M(()=>{"use strict";Uu()});function us(){return{canContainEols:["delete"],enter:{strikethrough:Hy},exit:{strikethrough:Vy}}}function ps(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zy}],handlers:{delete:qu}}}function Hy(e){this.enter({type:"delete",children:[]},e)}function Vy(e){this.exit(e)}function qu(e,t,n,r){let i=n.createTracker(r),o=n.enter("strikethrough"),a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Wy(){return"~"}var zy,ju=M(()=>{"use strict";zy=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qu.peek=Wy});var Bu=M(()=>{"use strict";ju()});function Hu(e,t={}){let n=(t.align||[]).concat(),r=t.stringLength||Jy,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=Yy(e[p][Z]);if(t.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 n=="object"&&"length"in n)for(;++d<u;)i[d]=zu(n[d]);else{let P=zu(n);for(;++d<u;)i[d]=P}d=-1;let h=[],g=[];for(;++d<u;){let P=i[d],ee="",Z="";P===99?(ee=":",Z=":"):P===108?ee=":":P===114&&(Z=":");let B=t.alignDelimiters===!1?1:Math.max(1,s[d]-ee.length-Z.length),ue=ee+"-".repeat(B)+Z;t.alignDelimiters!==!1&&(B=ee.length+B+Z.length,B>s[d]&&(s[d]=B),g[d]=B),h[d]=ue}o.splice(1,0,h),a.splice(1,0,g),p=-1;let y=[];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(t.alignDelimiters!==!1){let ke=s[d]-(ee[d]||0),Oe=i[d];Oe===114?ue=" ".repeat(ke):Oe===99?ke%2?(ue=" ".repeat(ke/2+.5),ne=" ".repeat(ke/2-.5)):(ue=" ".repeat(ke/2),ne=ue):ne=" ".repeat(ke)}t.delimiterStart!==!1&&!d&&Z.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&B==="")&&(t.delimiterStart!==!1||d)&&Z.push(" "),t.alignDelimiters!==!1&&Z.push(ue),Z.push(B),t.alignDelimiters!==!1&&Z.push(ne),t.padding!==!1&&Z.push(" "),(t.delimiterEnd!==!1||d!==u-1)&&Z.push("|")}y.push(t.delimiterEnd===!1?Z.join("").replace(/ +$/,""):Z.join(""))}return y.join(`
2
+ `)}function Yy(e){return e==null?"":String(e)}function Jy(e){return e.length}function zu(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Vu=M(()=>{"use strict"});function Wu(e,t,n,r){let i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);let a=n.indentLines(n.containerFlow(e,o.current()),Gy);return i(),a}function Gy(e,t,n){return">"+(n?"":" ")+e}var Yu=M(()=>{"use strict"});function Gu(e,t){return Ju(e,t.inConstruct,!0)&&!Ju(e,t.notInConstruct,!1)}function Ju(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}var Ku=M(()=>{"use strict"});function ds(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
3
3
  `&&Gu(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
4
- `}var Xu=M(()=>{"use strict";Ku()});function Qu(e,t){let n=String(e),r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}var Zu=M(()=>{"use strict"});function ep(e,t){return!!(t.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 np(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}var rp=M(()=>{"use strict"});function ip(e,t,n,r){let i=np(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(ep(e,n)){let d=n.enter("codeIndented"),g=n.indentLines(o,Jy);return d(),g}let s=n.createTracker(r),u=i.repeat(Math.max(Qu(o,i)+1,3)),p=n.enter("codeFenced"),h=s.move(u);if(e.lang){let d=n.enter(`codeFencedLang${a}`);h+=s.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){let d=n.enter(`codeFencedMeta${a}`);h+=s.move(" "),h+=s.move(n.safe(e.meta,{before:h,after:`
5
- `,encode:["`"],...s.current()})),d()}return h+=s.move(`
6
- `),o&&(h+=s.move(o+`
7
- `)),h+=s.move(u),p(),h}function Jy(e,t,n){return(n?"":" ")+e}var op=M(()=>{"use strict";Zu();tp();rp()});function lr(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}var ao=M(()=>{"use strict"});function ap(e,t,n,r){let i=lr(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition"),s=n.enter("label"),u=n.createTracker(r),p=u.move("[");return p+=u.move(n.safe(n.associationId(e),{before:p,after:"]",...u.current()})),p+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(n.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=n.enter("destinationRaw"),p+=u.move(n.safe(e.url,{before:p,after:e.title?" ":`
8
- `,...u.current()}))),s(),e.title&&(s=n.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(n.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),a(),p}var sp=M(()=>{"use strict";ao()});function lp(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}var cp=M(()=>{"use strict"});function hs(e,t,n,r){let i=lp(n),o=n.enter("emphasis"),a=n.createTracker(r),s=a.move(i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function Gy(e,t,n){return n.options.emphasis||"*"}var up=M(()=>{"use strict";cp();hs.peek=Gy});function fs(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),qr(e,o,s,i);function s(u,p){let h=p[p.length-1],d=h?h.children.indexOf(u):void 0;return a(u,d,h)}}var pp=M(()=>{"use strict";oo();oo()});var dp=M(()=>{"use strict";pp()});function hp(e,t){let n=!1;return fs(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Wn}),!!((!e.depth||e.depth<3)&&bn(e)&&(t.options.setext||n))}var fp=M(()=>{"use strict";dp();Ur()});function mp(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(hp(e,n)){let h=n.enter("headingSetext"),d=n.enter("phrasing"),g=n.containerPhrasing(e,{...o.current(),before:`
4
+ `}var Xu=M(()=>{"use strict";Ku()});function Qu(e,t){let n=String(e),r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}var Zu=M(()=>{"use strict"});function ep(e,t){return!!(t.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 np(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}var rp=M(()=>{"use strict"});function ip(e,t,n,r){let i=np(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(ep(e,n)){let h=n.enter("codeIndented"),g=n.indentLines(o,Ky);return h(),g}let s=n.createTracker(r),u=i.repeat(Math.max(Qu(o,i)+1,3)),p=n.enter("codeFenced"),d=s.move(u);if(e.lang){let h=n.enter(`codeFencedLang${a}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){let h=n.enter(`codeFencedMeta${a}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
5
+ `,encode:["`"],...s.current()})),h()}return d+=s.move(`
6
+ `),o&&(d+=s.move(o+`
7
+ `)),d+=s.move(u),p(),d}function Ky(e,t,n){return(n?"":" ")+e}var op=M(()=>{"use strict";Zu();tp();rp()});function lr(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}var ao=M(()=>{"use strict"});function ap(e,t,n,r){let i=lr(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition"),s=n.enter("label"),u=n.createTracker(r),p=u.move("[");return p+=u.move(n.safe(n.associationId(e),{before:p,after:"]",...u.current()})),p+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(n.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=n.enter("destinationRaw"),p+=u.move(n.safe(e.url,{before:p,after:e.title?" ":`
8
+ `,...u.current()}))),s(),e.title&&(s=n.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(n.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),a(),p}var sp=M(()=>{"use strict";ao()});function lp(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}var cp=M(()=>{"use strict"});function hs(e,t,n,r){let i=lp(n),o=n.enter("emphasis"),a=n.createTracker(r),s=a.move(i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function Xy(e,t,n){return n.options.emphasis||"*"}var up=M(()=>{"use strict";cp();hs.peek=Xy});function fs(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),qr(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 pp=M(()=>{"use strict";oo();oo()});var dp=M(()=>{"use strict";pp()});function hp(e,t){let n=!1;return fs(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Vn}),!!((!e.depth||e.depth<3)&&bn(e)&&(t.options.setext||n))}var fp=M(()=>{"use strict";dp();Ur()});function mp(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(hp(e,n)){let d=n.enter("headingSetext"),h=n.enter("phrasing"),g=n.containerPhrasing(e,{...o.current(),before:`
9
9
  `,after:`
10
- `});return d(),h(),g+`
10
+ `});return h(),d(),g+`
11
11
  `+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
12
12
  `))+1))}let a="#".repeat(i),s=n.enter("headingAtx"),u=n.enter("phrasing");o.move(a+" ");let p=n.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,n.options.closeAtx&&(p+=" "+a),u(),s(),p}var gp=M(()=>{"use strict";fp()});function ms(e){return e.value||""}function Ky(){return"<"}var yp=M(()=>{"use strict";ms.peek=Ky});function gs(e,t,n,r){let i=lr(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image"),s=n.enter("label"),u=n.createTracker(r),p=u.move("![");return p+=u.move(n.safe(e.alt,{before:p,after:"]",...u.current()})),p+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(n.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=n.enter("destinationRaw"),p+=u.move(n.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(n.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),p+=u.move(")"),a(),p}function Xy(){return"!"}var bp=M(()=>{"use strict";ao();gs.peek=Xy});function ys(e,t,n,r){let i=e.referenceType,o=n.enter("imageReference"),a=n.enter("label"),s=n.createTracker(r),u=s.move("!["),p=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let h=n.stack;n.stack=[],a=n.enter("reference");let d=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return a(),n.stack=h,o(),i==="full"||!p||p!==d?u+=s.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function Qy(){return"!"}var wp=M(()=>{"use strict";ys.peek=Qy});function bs(e,t,n){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<n.unsafe.length;){let a=n.unsafe[o],s=n.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 Zy(){return"`"}var Sp=M(()=>{"use strict";bs.peek=Zy});function ws(e,t){let n=bn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var Tp=M(()=>{"use strict";Ur()});function Ss(e,t,n,r){let i=lr(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r),s,u;if(ws(e,n)){let h=n.stack;n.stack=[],s=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),n.stack=h,d}s=n.enter("link"),u=n.enter("label");let p=a.move("[");return p+=a.move(n.containerPhrasing(e,{before:p,after:"](",...a.current()})),p+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),p+=a.move("<"),p+=a.move(n.safe(e.url,{before:p,after:">",...a.current()})),p+=a.move(">")):(u=n.enter("destinationRaw"),p+=a.move(n.safe(e.url,{before:p,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${o}`),p+=a.move(" "+i),p+=a.move(n.safe(e.title,{before:p,after:i,...a.current()})),p+=a.move(i),u()),p+=a.move(")"),s(),p}function eb(e,t,n){return ws(e,n)?"<":"["}var xp=M(()=>{"use strict";ao();Tp();Ss.peek=eb});function Ts(e,t,n,r){let i=e.referenceType,o=n.enter("linkReference"),a=n.enter("label"),s=n.createTracker(r),u=s.move("["),p=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let h=n.stack;n.stack=[],a=n.enter("reference");let d=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return a(),n.stack=h,o(),i==="full"||!p||p!==d?u+=s.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function tb(){return"["}var vp=M(()=>{"use strict";Ts.peek=tb});function cr(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var so=M(()=>{"use strict"});function kp(e){let t=cr(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}var Ap=M(()=>{"use strict";so()});function Ep(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}var Rp=M(()=>{"use strict"});function lo(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}var xs=M(()=>{"use strict"});function _p(e,t,n,r){let i=n.enter("list"),o=n.bulletCurrent,a=e.ordered?Ep(n):cr(n),s=e.ordered?a==="."?")":".":kp(n),u=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){let h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),lo(n)===a&&h){let d=-1;for(;++d<e.children.length;){let g=e.children[d];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),n.bulletCurrent=a;let p=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),p}var Op=M(()=>{"use strict";so();Ap();Rp();xs()});function Cp(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var Ip=M(()=>{"use strict"});function Pp(e,t,n,r){let i=Cp(n),o=n.bulletCurrent||cr(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,s.current()),h);return u(),p;function h(d,g,y){return g?(y?"":" ".repeat(a))+d:(y?o:o+" ".repeat(a-o.length))+d}}var Mp=M(()=>{"use strict";so();Ip()});function Np(e,t,n,r){let i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}var Lp=M(()=>{"use strict"});var vs,Dp=M(()=>{"use strict";no();vs=In(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var Fp=M(()=>{"use strict";Dp()});function Up(e,t,n,r){return(e.children.some(function(a){return vs(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}var $p=M(()=>{"use strict";Fp()});function qp(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}var jp=M(()=>{"use strict"});function ks(e,t,n,r){let i=qp(n),o=n.enter("strong"),a=n.createTracker(r),s=a.move(i+i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function nb(e,t,n){return n.options.strong||"*"}var Bp=M(()=>{"use strict";jp();ks.peek=nb});function zp(e,t,n,r){return n.safe(e.value,r)}var Vp=M(()=>{"use strict"});function Wp(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}var Hp=M(()=>{"use strict"});function Yp(e,t,n){let r=(lo(n)+(n.options.ruleSpaces?" ":"")).repeat(Wp(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Jp=M(()=>{"use strict";Hp();xs()});var jr,Gp=M(()=>{"use strict";Yu();Xu();op();sp();up();gp();yp();bp();wp();Sp();xp();vp();Op();Mp();Lp();$p();Bp();Vp();Jp();jr={blockquote:Hu,break:ds,code:ip,definition:ap,emphasis:hs,hardBreak:ds,heading:mp,html:ms,image:gs,imageReference:ys,inlineCode:bs,link:Ss,linkReference:Ts,list:_p,listItem:Pp,paragraph:Np,root:Up,strong:ks,text:zp,thematicBreak:Yp}});var As,Kp=M(()=>{"use strict";As={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 rb.call(As,e)?As[e]:!1}var rb,co=M(()=>{"use strict";Kp();rb={}.hasOwnProperty});function uo(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var Es=M(()=>{"use strict"});function Xp(e){return e.replace(ib,ob)}function ob(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),o=i===120||i===88;return uo(n.slice(o?2:1),o?16:10)}return ur(n)||e}var ib,Qp=M(()=>{"use strict";co();Es();ib=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});var Rs=M(()=>{"use strict";Gp()});function Os(){return{enter:{table:ab,tableData:Zp,tableHeader:Zp,tableRow:lb},exit:{codeText:cb,table:sb,tableData:_s,tableHeader:_s,tableRow:_s}}}function ab(e){let t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function sb(e){this.exit(e),this.data.inTable=void 0}function lb(e){this.enter({type:"tableRow",children:[]},e)}function _s(e){this.exit(e)}function Zp(e){this.enter({type:"tableCell",children:[]},e)}function cb(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ub));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ub(e,t){return t==="|"?t:e}function Cs(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
15
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:a,tableCell:u,tableRow:s}};function a(y,P,ee,Z){return p(h(y,ee,Z),y.align)}function s(y,P,ee,Z){let B=d(y,ee,Z),ue=p([B]);return ue.slice(0,ue.indexOf(`
16
- `))}function u(y,P,ee,Z){let B=ee.enter("tableCell"),ue=ee.enter("phrasing"),ne=ee.containerPhrasing(y,{...Z,before:o,after:o});return ue(),B(),ne}function p(y,P){return Vu(y,{align:P,alignDelimiters:r,padding:n,stringLength:i})}function h(y,P,ee){let Z=y.children,B=-1,ue=[],ne=P.enter("table");for(;++B<Z.length;)ue[B]=d(Z[B],P,ee);return ne(),ue}function d(y,P,ee){let Z=y.children,B=-1,ue=[],ne=P.enter("tableRow");for(;++B<Z.length;)ue[B]=u(Z[B],y,P,ee);return ne(),ue}function g(y,P,ee){let Z=jr.inlineCode(y,P,ee);return ee.stack.includes("tableCell")&&(Z=Z.replace(/\|/g,"\\$&")),Z}}var ed=M(()=>{"use strict";Wu();Rs()});var td=M(()=>{"use strict";ed()});function Is(){return{exit:{taskListCheckValueChecked:nd,taskListCheckValueUnchecked:nd,paragraph:pb}}}function Ps(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:db}}}function nd(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function pb(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let n=this.stack[this.stack.length-1];n.type;let r=n.children[0];if(r&&r.type==="text"){let i=t.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function db(e,t,n,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let u=jr.listItem(e,t,n,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),u;function p(h){return h+a}}var rd=M(()=>{"use strict";Rs()});var id=M(()=>{"use strict";rd()});function Ms(){return[as(),ls(),us(),Os(),Is()]}function Ns(e){return{extensions:[ss(),cs(),ps(),Cs(e),Ps()]}}var od=M(()=>{"use strict";Du();$u();Bu();td();id()});var ad=M(()=>{"use strict";od()});function pt(e,t,n,r){let i=e.length,o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Ot(e,t){return e.length>0?(pt(e,e.length,0,t),e):t}var wn=M(()=>{"use strict"});function po(e){let t={},n=-1;for(;++n<e.length;)hb(t,e[n]);return t}function hb(e,t){let n;for(n in t){let i=(sd.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n],a;if(o)for(a in o){sd.call(i,a)||(i[a]=[]);let s=o[a];fb(i[a],Array.isArray(s)?s:s?[s]:[])}}}function fb(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);pt(e,0,0,r)}var sd,Ls=M(()=>{"use strict";wn();sd={}.hasOwnProperty});function Fs(){return{text:an}}function yb(e,t,n){let r=this,i,o;return a;function a(d){return!Ds(d)||!md.call(r,r.previous)||Us(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Ds(d)?(e.consume(d),s):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(gb,h,p)(d):d===45||d===95||ft(d)?(o=!0,e.consume(d),u):h(d)}function p(d){return e.consume(d),i=!0,u}function h(d){return o&&i&&ht(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function bb(e,t,n){let r=this;return i;function i(a){return a!==87&&a!==119||!hd.call(r,r.previous)||Us(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mb,e.attempt(ld,e.attempt(cd,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function wb(e,t,n){let r=this,i="",o=!1;return a;function a(d){return(d===72||d===104)&&fd.call(r,r.previous)&&!Us(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(ht(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){let g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),o?p:(o=!0,u)):n(d)}function p(d){return d===null||zn(d)||Le(d)||on(d)||Vn(d)?n(d):e.attempt(ld,e.attempt(cd,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Sb(e,t,n){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):n(a)}function o(a){return a===null?n(a):t(a)}}function Tb(e,t,n){let r,i,o;return a;function a(p){return p===46||p===95?e.check(ud,u,s)(p):p===null||Le(p)||on(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?n(p):t(p)}}function xb(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?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(ud,t,o)(a):a===null||Le(a)||on(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function vb(e,t,n){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)||on(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Le(s)||on(s)?t(s):r(s)}function o(s){return ht(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):ht(s)?(e.consume(s),a):n(s)}}function kb(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ft(o)?n(o):t(o)}}function hd(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function fd(e){return!ht(e)}function md(e){return!(e===47||Ds(e))}function Ds(e){return e===43||e===45||e===46||e===95||ft(e)}function Us(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var mb,ld,cd,ud,gb,pd,dd,Sn,an,Hn,gd=M(()=>{"use strict";Be();mb={tokenize:Sb,partial:!0},ld={tokenize:Tb,partial:!0},cd={tokenize:xb,partial:!0},ud={tokenize:vb,partial:!0},gb={tokenize:kb,partial:!0},pd={name:"wwwAutolink",tokenize:bb,previous:hd},dd={name:"protocolAutolink",tokenize:wb,previous:fd},Sn={name:"emailAutolink",tokenize:yb,previous:md},an={};Hn=48;for(;Hn<123;)an[Hn]=Sn,Hn++,Hn===58?Hn=65:Hn===91&&(Hn=97);an[43]=Sn;an[45]=Sn;an[46]=Sn;an[95]=Sn;an[72]=[Sn,dd];an[104]=[Sn,dd];an[87]=[Sn,pd];an[119]=[Sn,pd]});var yd=M(()=>{"use strict";gd()});function pr(e){if(e===null||Le(e)||on(e))return 1;if(Vn(e))return 2}var $s=M(()=>{"use strict";Be()});function Pn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var Br=M(()=>{"use strict"});function Ab(e,t){let n=-1,r,i,o,a,s,u,p,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d=Object.assign({},e[r][1].end),g=Object.assign({},e[n][1].start);bd(d,-u),bd(g,u),a={type:u>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:g},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][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[n][1].start=Object.assign({},s.end),p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=Ot(p,[["enter",e[r][1],t],["exit",e[r][1],t]])),p=Ot(p,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),p=Ot(p,Pn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),p=Ot(p,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,p=Ot(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,pt(e,r-1,n-r+3,p),n=r+p.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Eb(e,t){let n=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"),h=pr(u),d=!h||h===2&&i||n.includes(u),g=!i||i===2&&h||n.includes(r);return p._open=!!(o===42?d:d&&(i||!g)),p._close=!!(o===42?g:g&&(h||!d)),t(u)}}function bd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var zr,wd=M(()=>{"use strict";wn();$s();Br();zr={name:"attention",tokenize:Eb,resolveAll:Ab}});function Rb(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return ht(y)?(e.consume(y),a):y===64?n(y):p(y)}function a(y){return y===43||y===45||y===46||ft(y)?(r=1,s(y)):p(y)}function s(y){return y===58?(e.consume(y),r=0,u):(y===43||y===45||y===46||ft(y))&&r++<32?(e.consume(y),s):(r=0,p(y))}function u(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||zn(y)?n(y):(e.consume(y),u)}function p(y){return y===64?(e.consume(y),h):vu(y)?(e.consume(y),p):n(y)}function h(y){return ft(y)?d(y):n(y)}function d(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):g(y)}function g(y){if((y===45||ft(y))&&r++<63){let P=y===45?g:d;return e.consume(y),P}return n(y)}}var qs,Sd=M(()=>{"use strict";Be();qs={name:"autolink",tokenize:Rb}});function we(e,t,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return Se(u)?(e.enter(n),s(u)):t(u)}function s(u){return Se(u)&&o++<i?(e.consume(u),s):(e.exit(n),t(u))}}var ut=M(()=>{"use strict";Be()});function _b(e,t,n){return r;function r(o){return Se(o)?we(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||le(o)?t(o):n(o)}}var sn,ho=M(()=>{"use strict";ut();Be();sn={tokenize:_b,partial:!0}});function Ob(e,t,n){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 n(a)}function o(a){return Se(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Cb(e,t,n){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,t,n)(a)}}function Ib(e){e.exit("blockQuote")}var fo,Td=M(()=>{"use strict";ut();Be();fo={name:"blockQuote",tokenize:Ob,continuation:{tokenize:Cb},exit:Ib}});function Pb(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Au(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}var mo,xd=M(()=>{"use strict";Be();mo={name:"characterEscape",tokenize:Pb}});function Mb(e,t,n){let r=this,i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,a=ft,h(d))}function p(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=ku,h):(e.enter("characterReferenceValue"),o=7,a=$r,h(d))}function h(d){if(d===59&&i){let g=e.exit("characterReferenceValue");return a===ft&&!ur(r.sliceSerialize(g))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<o?(e.consume(d),h):n(d)}}var go,vd=M(()=>{"use strict";co();Be();go={name:"characterReference",tokenize:Mb}});function Nb(e,t,n){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"),h($)}function h($){return $===s?(a++,e.consume($),h):a<3?n($):(e.exit("codeFencedFenceSequence"),Se($)?we(e,d,"whitespace")($):d($))}function d($){return $===null||le($)?(e.exit("codeFencedFence"),r.interrupt?t($):e.check(kd,ee,ke)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g($))}function g($){return $===null||le($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d($)):Se($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,y,"whitespace")($)):$===96&&$===s?n($):(e.consume($),g)}function y($){return $===null||le($)?d($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),P($))}function P($){return $===null||le($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d($)):$===96&&$===s?n($):(e.consume($),P)}function ee($){return e.attempt(i,ke,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||le($)?e.check(kd,ee,ke)($):(e.enter("codeFlowValue"),ne($))}function ne($){return $===null||le($)?(e.exit("codeFlowValue"),ue($)):(e.consume($),ne)}function ke($){return e.exit("codeFenced"),t($)}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($,Ie,"whitespace")(Me):Ie(Me)):Xe(Me)}function Ie(Me){return Me===null||le(Me)?($.exit("codeFencedFence"),Ue(Me)):Xe(Me)}}}function Lb(e,t,n){let r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}var kd,yo,Ad=M(()=>{"use strict";ut();Be();kd={tokenize:Lb,partial:!0},yo={name:"codeFenced",tokenize:Nb,concrete:!0}});function Fb(e,t,n){let r=this;return i;function i(p){return e.enter("codeIndented"),we(e,o,"linePrefix",5)(p)}function o(p){let h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(p):n(p)}function a(p){return p===null?u(p):le(p)?e.attempt(Db,a,u)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||le(p)?(e.exit("codeFlowValue"),a(p)):(e.consume(p),s)}function u(p){return e.exit("codeIndented"),t(p)}}function Ub(e,t,n){let r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):le(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?t(a):le(a)?i(a):n(a)}}var Vr,Db,Ed=M(()=>{"use strict";ut();Be();Vr={name:"codeIndented",tokenize:Fb},Db={tokenize:Ub,partial:!0}});function $b(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||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),t-=r-i-2,r=i+2),i=void 0);return e}function qb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function jb(e,t,n){let r=this,i=0,o,a;return s;function s(g){return e.enter("codeText"),e.enter("codeTextSequence"),u(g)}function u(g){return g===96?(e.consume(g),i++,u):(e.exit("codeTextSequence"),p(g))}function p(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(a=e.enter("codeTextSequence"),o=0,d(g)):le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||le(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),h)}function d(g){return g===96?(e.consume(g),o++,d):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",h(g))}}var js,Rd=M(()=>{"use strict";Be();js={name:"codeText",tokenize:jb,resolve:$b,previous:qb}});function Wr(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}var bo,_d=M(()=>{"use strict";bo=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){let i=n||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Wr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Wr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);Wr(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wr(this.left,n.reverse())}}}});function wo(e){let t={},n=-1,r,i,o,a,s,u,p,h=new bo(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-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(t,Bb(h,n)),n=t[n],p=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=h.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},h.get(i)[1].start),s=h.slice(i,n),s.unshift(r),h.splice(i,n-i+1,s))}}return pt(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!p}function Bb(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,u=[],p={},h,d,g=-1,y=n,P=0,ee=0,Z=[ee];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),d&&a.defineSkip(y.start),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=y,y=y.next}for(y=n;++g<s.length;)s[g][0]==="exit"&&s[g-1][0]==="enter"&&s[g][1].type===s[g-1][1].type&&s[g][1].start.line!==s[g][1].end.line&&(ee=g+1,Z.push(ee),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(a.events=[],y?(y._tokenizer=void 0,y.previous=void 0):Z.pop(),g=Z.length;g--;){let B=s.slice(Z[g],Z[g+1]),ue=o.pop();u.push([ue,ue+B.length-1]),e.splice(ue,2,B)}for(u.reverse(),g=-1;++g<u.length;)p[P+u[g][0]]=P+u[g][1],P+=u[g][1]-u[g][0]-1;return p}var Bs=M(()=>{"use strict";wn();_d()});function Vb(e){return wo(e),e}function Wb(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):le(s)?e.check(zb,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Hb(e,t,n){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||le(a))return n(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?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}var zs,zb,Od=M(()=>{"use strict";ut();Be();Bs();zs={tokenize:Wb,resolve:Vb},zb={tokenize:Hb,partial:!0}});function So(e,t,n,r,i,o,a,s,u){let p=u||Number.POSITIVE_INFINITY,h=0;return d;function d(B){return B===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(B),e.exit(o),g):B===null||B===32||B===41||zn(B)?n(B):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),ee(B))}function g(B){return B===62?(e.enter(o),e.consume(B),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),y(B))}function y(B){return B===62?(e.exit("chunkString"),e.exit(s),g(B)):B===null||B===60||le(B)?n(B):(e.consume(B),B===92?P:y)}function P(B){return B===60||B===62||B===92?(e.consume(B),y):y(B)}function ee(B){return!h&&(B===null||B===41||Le(B))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(B)):h<p&&B===40?(e.consume(B),h++,ee):B===41?(e.consume(B),h--,ee):B===null||B===32||B===40||zn(B)?n(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 Vs=M(()=>{"use strict";Be()});function To(e,t,n,r,i,o){let a=this,s=0,u;return p;function p(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),h}function h(y){return s>999||y===null||y===91||y===93&&!u||y===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):le(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===null||y===91||y===93||le(y)||s++>999?(e.exit("chunkString"),h(y)):(e.consume(y),u||(u=!Se(y)),y===92?g:d)}function g(y){return y===91||y===92||y===93?(e.consume(y),s++,d):d(y)}}var Ws=M(()=>{"use strict";Be()});function xo(e,t,n,r,i,o){let a;return s;function s(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),a=g===40?41:g,u):n(g)}function u(g){return g===a?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(o),p(g))}function p(g){return g===a?(e.exit(o),u(a)):g===null?n(g):le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),we(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===a||g===null||le(g)?(e.exit("chunkString"),p(g)):(e.consume(g),g===92?d:h)}function d(g){return g===a||g===92?(e.consume(g),h):h(g)}}var Hs=M(()=>{"use strict";ut();Be()});function Yn(e,t){let n;return r;function r(i){return le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Se(i)?we(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var Ys=M(()=>{"use strict";ut();Be()});function Jb(e,t,n){let r=this,i;return o;function o(y){return e.enter("definition"),a(y)}function a(y){return To.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function s(y){return i=vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),u):n(y)}function u(y){return Le(y)?Yn(e,p)(y):p(y)}function p(y){return So(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(Yb,d,d)(y)}function d(y){return Se(y)?we(e,g,"whitespace")(y):g(y)}function g(y){return y===null||le(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function Gb(e,t,n){return r;function r(s){return Le(s)?Yn(e,i)(s):n(s)}function i(s){return xo(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Se(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||le(s)?t(s):n(s)}}var Js,Yb,Cd=M(()=>{"use strict";Vs();Ws();ut();Hs();Ys();Be();sr();Js={name:"definition",tokenize:Jb},Yb={tokenize:Gb,partial:!0}});function Kb(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return le(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}var Gs,Id=M(()=>{"use strict";Be();Gs={name:"hardBreakEscape",tokenize:Kb}});function Xb(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},pt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Qb(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||Le(h)?(e.exit("atxHeadingSequence"),s(h)):n(h)}function s(h){return h===35?(e.enter("atxHeadingSequence"),u(h)):h===null||le(h)?(e.exit("atxHeading"),t(h)):Se(h)?we(e,s,"whitespace")(h):(e.enter("atxHeadingText"),p(h))}function u(h){return h===35?(e.consume(h),u):(e.exit("atxHeadingSequence"),s(h))}function p(h){return h===null||h===35||Le(h)?(e.exit("atxHeadingText"),s(h)):(e.consume(h),p)}}var Ks,Pd=M(()=>{"use strict";ut();Be();wn();Ks={name:"headingAtx",tokenize:Qb,resolve:Xb}});var Md,Xs,Nd=M(()=>{"use strict";Md=["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"],Xs=["pre","script","style","textarea"]});function tw(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function nw(e,t,n){let r=this,i,o,a,s,u;return p;function p(R){return h(R)}function h(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),g):R===47?(e.consume(R),o=!0,ee):R===63?(e.consume(R),i=3,r.interrupt?t:A):ht(R)?(e.consume(R),a=String.fromCharCode(R),Z):n(R)}function g(R){return R===45?(e.consume(R),i=2,y):R===91?(e.consume(R),i=5,s=0,P):ht(R)?(e.consume(R),i=4,r.interrupt?t:A):n(R)}function y(R){return R===45?(e.consume(R),r.interrupt?t:A):n(R)}function P(R){let St="CDATA[";return R===St.charCodeAt(s++)?(e.consume(R),s===St.length?r.interrupt?t:ze:P):n(R)}function ee(R){return ht(R)?(e.consume(R),a=String.fromCharCode(R),Z):n(R)}function Z(R){if(R===null||R===47||R===62||Le(R)){let St=R===47,ln=a.toLowerCase();return!St&&!o&&Xs.includes(ln)?(i=1,r.interrupt?t(R):ze(R)):Md.includes(a.toLowerCase())?(i=6,St?(e.consume(R),B):r.interrupt?t(R):ze(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):o?ue(R):ne(R))}return R===45||ft(R)?(e.consume(R),a+=String.fromCharCode(R),Z):n(R)}function B(R){return R===62?(e.consume(R),r.interrupt?t:ze):n(R)}function ue(R){return Se(R)?(e.consume(R),ue):U(R)}function ne(R){return R===47?(e.consume(R),U):R===58||R===95||ht(R)?(e.consume(R),ke):Se(R)?(e.consume(R),ne):U(R)}function ke(R){return R===45||R===46||R===58||R===95||ft(R)?(e.consume(R),ke):Oe(R)}function Oe(R){return R===61?(e.consume(R),$):Se(R)?(e.consume(R),Oe):ne(R)}function $(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),u=R,Ue):Se(R)?(e.consume(R),$):Xe(R)}function Ue(R){return R===u?(e.consume(R),u=null,je):R===null||le(R)?n(R):(e.consume(R),Ue)}function Xe(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Le(R)?Oe(R):(e.consume(R),Xe)}function je(R){return R===47||R===62||Se(R)?ne(R):n(R)}function U(R){return R===62?(e.consume(R),Te):n(R)}function Te(R){return R===null||le(R)?ze(R):Se(R)?(e.consume(R),Te):n(R)}function ze(R){return R===45&&i===2?(e.consume(R),tt):R===60&&i===1?(e.consume(R),ct):R===62&&i===4?(e.consume(R),At):R===63&&i===3?(e.consume(R),A):R===93&&i===5?(e.consume(R),$t):le(R)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Zb,Lt,ye)(R)):R===null||le(R)?(e.exit("htmlFlowData"),ye(R)):(e.consume(R),ze)}function ye(R){return e.check(ew,Ie,Lt)(R)}function Ie(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Me}function Me(R){return R===null||le(R)?ye(R):(e.enter("htmlFlowData"),ze(R))}function tt(R){return R===45?(e.consume(R),A):ze(R)}function ct(R){return R===47?(e.consume(R),a="",Nt):ze(R)}function Nt(R){if(R===62){let St=a.toLowerCase();return Xs.includes(St)?(e.consume(R),At):ze(R)}return ht(R)&&a.length<8?(e.consume(R),a+=String.fromCharCode(R),Nt):ze(R)}function $t(R){return R===93?(e.consume(R),A):ze(R)}function A(R){return R===62?(e.consume(R),At):R===45&&i===2?(e.consume(R),A):ze(R)}function At(R){return R===null||le(R)?(e.exit("htmlFlowData"),Lt(R)):(e.consume(R),At)}function Lt(R){return e.exit("htmlFlow"),t(R)}}function rw(e,t,n){let r=this;return i;function i(a){return le(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function iw(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(sn,t,n)}}var Qs,Zb,ew,Ld=M(()=>{"use strict";Be();Nd();ho();Qs={name:"htmlFlow",tokenize:nw,resolveTo:tw,concrete:!0},Zb={tokenize:iw,partial:!0},ew={tokenize:rw,partial:!0}});function ow(e,t,n){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),Oe):A===63?(e.consume(A),ne):ht(A)?(e.consume(A),Xe):n(A)}function p(A){return A===45?(e.consume(A),h):A===91?(e.consume(A),o=0,P):ht(A)?(e.consume(A),ue):n(A)}function h(A){return A===45?(e.consume(A),y):n(A)}function d(A){return A===null?n(A):A===45?(e.consume(A),g):le(A)?(a=d,ct(A)):(e.consume(A),d)}function g(A){return A===45?(e.consume(A),y):d(A)}function y(A){return A===62?tt(A):A===45?g(A):d(A)}function P(A){let At="CDATA[";return A===At.charCodeAt(o++)?(e.consume(A),o===At.length?ee:P):n(A)}function ee(A){return A===null?n(A):A===93?(e.consume(A),Z):le(A)?(a=ee,ct(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):le(A)?(a=ue,ct(A)):(e.consume(A),ue)}function ne(A){return A===null?n(A):A===63?(e.consume(A),ke):le(A)?(a=ne,ct(A)):(e.consume(A),ne)}function ke(A){return A===62?tt(A):ne(A)}function Oe(A){return ht(A)?(e.consume(A),$):n(A)}function $(A){return A===45||ft(A)?(e.consume(A),$):Ue(A)}function Ue(A){return le(A)?(a=Ue,ct(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):n(A)}function je(A){return A===47?(e.consume(A),tt):A===58||A===95||ht(A)?(e.consume(A),U):le(A)?(a=je,ct(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):le(A)?(a=Te,ct(A)):Se(A)?(e.consume(A),Te):je(A)}function ze(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,ye):le(A)?(a=ze,ct(A)):Se(A)?(e.consume(A),ze):(e.consume(A),Ie)}function ye(A){return A===i?(e.consume(A),i=void 0,Me):A===null?n(A):le(A)?(a=ye,ct(A)):(e.consume(A),ye)}function Ie(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Le(A)?je(A):(e.consume(A),Ie)}function Me(A){return A===47||A===62||Le(A)?je(A):n(A)}function tt(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function ct(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Nt}function Nt(A){return Se(A)?we(e,$t,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):$t(A)}function $t(A){return e.enter("htmlTextData"),a(A)}}var Zs,Dd=M(()=>{"use strict";ut();Be();Zs={name:"htmlText",tokenize:ow}});function cw(e){let t=-1;for(;++t<e.length;){let n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function uw(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);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)},h={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",u,t],["enter",p,t]],s=Ot(s,e.slice(o+1,o+r+3)),s=Ot(s,[["enter",h,t]]),s=Ot(s,Pn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=Ot(s,[["exit",h,t],e[a-2],e[a-1],["exit",p,t]]),s=Ot(s,e.slice(a+1)),s=Ot(s,[["exit",u,t]]),pt(e,o,e.length,s),e}function pw(e,t,n){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(g){return o?o._inactive?d(g):(a=r.parser.defined.includes(vt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),u):n(g)}function u(g){return g===40?e.attempt(aw,h,a?h:d)(g):g===91?e.attempt(sw,h,a?p:d)(g):a?h(g):d(g)}function p(g){return e.attempt(lw,h,d)(g)}function h(g){return t(g)}function d(g){return o._balanced=!0,n(g)}}function dw(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Le(d)?Yn(e,o)(d):o(d)}function o(d){return d===41?h(d):So(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Le(d)?Yn(e,u)(d):h(d)}function s(d){return n(d)}function u(d){return d===34||d===39||d===40?xo(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function p(d){return Le(d)?Yn(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function hw(e,t,n){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(vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function fw(e,t,n){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"),t):n(o)}}var Jn,aw,sw,lw,vo=M(()=>{"use strict";Vs();Ws();Hs();Ys();Be();wn();sr();Br();Jn={name:"labelEnd",tokenize:pw,resolveTo:uw,resolveAll:cw},aw={tokenize:dw},sw={tokenize:hw},lw={tokenize:fw}});function mw(e,t,n){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):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var el,Fd=M(()=>{"use strict";vo();el={name:"labelStartImage",tokenize:mw,resolveAll:Jn.resolveAll}});function gw(e,t,n){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?n(a):t(a)}}var tl,Ud=M(()=>{"use strict";vo();tl={name:"labelStartLink",tokenize:gw,resolveAll:Jn.resolveAll}});function yw(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,t,"linePrefix")}}var Hr,$d=M(()=>{"use strict";ut();Hr={name:"lineEnding",tokenize:yw}});function bw(e,t,n){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||le(p))?(e.exit("thematicBreak"),t(p)):n(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,nl=M(()=>{"use strict";ut();Be();Gn={name:"thematicBreak",tokenize:bw}});function Tw(e,t,n){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(y){let P=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(P==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:$r(y)){if(r.containerState.type||(r.containerState.type=P,e.enter(P,{_container:!0})),P==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Gn,n,p)(y):p(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(y)}return n(y)}function u(y){return $r(y)&&++a<10?(e.consume(y),u):(!r.interrupt||a<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),p(y)):n(y)}function p(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(sn,r.interrupt?n:h,e.attempt(ww,g,d))}function h(y){return r.containerState.initialBlankLine=!0,o++,g(y)}function d(y){return Se(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function xw(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(sn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,t,"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(Sw,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(kt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function vw(e,t,n){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?t(o):n(o)}}function kw(e){e.exit(this.containerState.type)}function Aw(e,t,n){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"?t(o):n(o)}}var kt,ww,Sw,qd=M(()=>{"use strict";ut();Be();ho();nl();kt={name:"list",tokenize:Tw,continuation:{tokenize:xw},exit:kw},ww={tokenize:Aw,partial:!0},Sw={tokenize:vw,partial:!0}});function Ew(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);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,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function Rw(e,t,n){let r=this,i;return o;function o(p){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=p,a(p)):n(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||le(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}var ko,jd=M(()=>{"use strict";ut();Be();ko={name:"setextUnderline",tokenize:Rw,resolveTo:Ew}});var Ao=M(()=>{"use strict";wd();Sd();ho();Td();xd();vd();Ad();Ed();Rd();Od();Cd();Id();Pd();Ld();Dd();vo();Fd();Ud();$d();qd();jd();nl()});function rl(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pw,continuation:{tokenize:Mw},exit:Nw}},text:{91:{name:"gfmFootnoteCall",tokenize:Iw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ow,resolveTo:Cw}}}}function Ow(e,t,n){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 n(u);let p=vt(r.sliceSerialize({start:a.end,end:r.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Cw(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){r=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+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[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...u),e}function Iw(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(d){if(o>999||d===93&&!a||d===null||d===91||Le(d))return n(d);if(d===93){e.exit("chunkString");let g=e.exit("gfmFootnoteCallString");return i.includes(vt(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Le(d)||(a=!0),o++,e.consume(d),d===92?h:p}function h(d){return d===91||d===92||d===93?(e.consume(d),o++,p):p(d)}}function Pw(e,t,n){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",h):n(P)}function h(P){if(a>999||P===93&&!s||P===null||P===91||Le(P))return n(P);if(P===93){e.exit("chunkString");let ee=e.exit("gfmFootnoteDefinitionLabelString");return o=vt(r.sliceSerialize(ee)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return Le(P)||(s=!0),a++,e.consume(P),P===92?d:h}function d(P){return P===91||P===92||P===93?(e.consume(P),a++,h):h(P)}function g(P){return P===58?(e.enter("definitionMarker"),e.consume(P),e.exit("definitionMarker"),i.includes(o)||i.push(o),we(e,y,"gfmFootnoteDefinitionWhitespace")):n(P)}function y(P){return t(P)}}function Mw(e,t,n){return e.check(sn,t,e.attempt(_w,t,n))}function Nw(e){e.exit("gfmFootnoteDefinition")}function Lw(e,t,n){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?t(o):n(o)}}var _w,Bd=M(()=>{"use strict";Ao();ut();Be();sr();_w={tokenize:Lw,partial:!0}});var zd=M(()=>{"use strict";Bd()});function il(e){let n=(e||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!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 h={type:"strikethrough",start:Object.assign({},a[p][1].start),end:Object.assign({},a[u][1].end)},d={type:"strikethroughText",start:Object.assign({},a[p][1].end),end:Object.assign({},a[u][1].start)},g=[["enter",h,s],["enter",a[p][1],s],["exit",a[p][1],s],["enter",d,s]],y=s.parser.constructs.insideSpan.null;y&&pt(g,g.length,0,Pn(y,a.slice(p+1,u),s)),pt(g,g.length,0,[["exit",d,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",h,s]]),pt(a,p-1,u-p+3,g),u=p+g.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,h=this.events,d=0;return g;function g(P){return p===126&&h[h.length-1][1].type!=="characterEscape"?u(P):(a.enter("strikethroughSequenceTemporary"),y(P))}function y(P){let ee=pr(p);if(P===126)return d>1?u(P):(a.consume(P),d++,y);if(d<2&&!n)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 Vd=M(()=>{"use strict";wn();$s();Br()});var Wd=M(()=>{"use strict";Vd()});function Dw(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}var Eo,Hd=M(()=>{"use strict";Eo=class{constructor(){this.map=[]}add(t,n,r){Dw(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length,r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}});function Yd(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-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"&&(n=!0);t+=1}return r}var Jd=M(()=>{"use strict"});function ol(){return{flow:{null:{name:"table",tokenize:Fw,resolveAll:Uw}}}}function Fw(e,t,n){let r=this,i=0,o=0,a;return s;function s(U){let Te=r.events.length-1;for(;Te>-1;){let Ie=r.events[Te][1].type;if(Ie==="lineEnding"||Ie==="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]?n(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),h(U)}function h(U){return U===null?n(U):le(U)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),y):n(U):Se(U)?we(e,h,"whitespace")(U):(o+=1,a&&(a=!1,i+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),d(U)))}function d(U){return U===null||U===124||Le(U)?(e.exit("data"),h(U)):(e.consume(U),U===92?g:d)}function g(U){return U===92||U===124?(e.consume(U),d):d(U)}function y(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(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||le(U)?ke(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,ke,"whitespace")(U):ke(U)}function ke(U){return U===124?P(U):U===null||le(U)?!a||i!==o?Oe(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):Oe(U)}function Oe(U){return n(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||le(U)?(e.exit("tableRow"),t(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 Uw(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,p,h,d,g=new Eo;for(;++n<e.length;){let y=e[n],P=y[1];y[0]==="enter"?P.type==="tableHead"?(s=!1,u!==0&&(Gd(g,t,u,p,h),h=void 0,u=0),p={type:"table",start:Object.assign({},P.start),end:Object.assign({},P.end)},g.add(n,0,[["enter",p,t]])):P.type==="tableRow"||P.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,h={type:"tableBody",start:Object.assign({},P.start),end:Object.assign({},P.end)},g.add(n,0,[["enter",h,t]])),i=P.type==="tableDelimiterRow"?2:h?3:1):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],d=Ro(g,t,o,i,void 0,d),o=[0,0,0,0]),a[2]=n)):P.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],d=Ro(g,t,o,i,void 0,d)),o=a,a=[o[1],n,0,0])):P.type==="tableHead"?(s=!0,u=n):P.type==="tableRow"||P.type==="tableDelimiterRow"?(u=n,o[1]!==0?(a[0]=a[1],d=Ro(g,t,o,i,n,d)):a[1]!==0&&(d=Ro(g,t,a,i,n,d)),i=0):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&Gd(g,t,u,p,h),g.consume(t.events),n=-1;++n<t.events.length;){let y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Yd(t.events,n))}return e}function Ro(e,t,n,r,i,o){let a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},dr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));let u=dr(t.events,n[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){let p=dr(t.events,n[2]),h=dr(t.events,n[3]),d={type:s,start:Object.assign({},p),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){let g=t.events[n[2]],y=t.events[n[3]];if(g[1].end=Object.assign({},y[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){let P=n[2]+1,ee=n[3]-n[2]-1;e.add(P,ee,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},dr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Gd(e,t,n,r,i){let o=[],a=dr(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function dr(e,t){let n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var Kd=M(()=>{"use strict";ut();Be();Hd();Jd()});var Xd=M(()=>{"use strict";Kd()});function al(){return{text:{91:$w}}}function qw(e,t,n){let r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(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):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return le(u)?t(u):Se(u)?e.check({tokenize:jw},t,n)(u):n(u)}}function jw(e,t,n){return we(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}var $w,Qd=M(()=>{"use strict";ut();Be();$w={name:"tasklistCheck",tokenize:qw}});var Zd=M(()=>{"use strict";Qd()});function eh(e){return po([Fs(),rl(),il(e),ol(),al()])}var th=M(()=>{"use strict";Ls();yd();zd();Wd();Xd();Zd()});function _o(e){let t=this,n=e||Bw,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(eh(n)),o.push(Ms()),a.push(Ns(n))}var Bw,nh=M(()=>{"use strict";ad();th();Bw={}});var rh=M(()=>{"use strict";nh()});function zw(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return le(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var ih,oh=M(()=>{"use strict";ut();Be();ih={tokenize:zw}});function Vw(e){let t=this,n=[],r=0,i,o,a;return s;function s(ne){if(r<n.length){let ke=n[r];return t.containerState=ke[1],e.attempt(ke[0].continuation,u,p)(ne)}return p(ne)}function u(ne){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&ue();let ke=t.events.length,Oe=ke,$;for(;Oe--;)if(t.events[Oe][0]==="exit"&&t.events[Oe][1].type==="chunkFlow"){$=t.events[Oe][1].end;break}B(r);let Ue=ke;for(;Ue<t.events.length;)t.events[Ue][1].end=Object.assign({},$),Ue++;return pt(t.events,Oe+1,0,t.events.slice(ke)),t.events.length=Ue,p(ne)}return s(ne)}function p(ne){if(r===n.length){if(!i)return g(ne);if(i.currentConstruct&&i.currentConstruct.concrete)return P(ne);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ah,h,d)(ne)}function h(ne){return i&&ue(),B(r),g(ne)}function d(ne){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,P(ne)}function g(ne){return t.containerState={},e.attempt(ah,y,P)(ne)}function y(ne){return r++,n.push([t.currentConstruct,t.containerState]),g(ne)}function P(ne){if(ne===null){i&&ue(),B(0),e.consume(ne);return}return i=i||t.parser.flow(t.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 le(ne)?(e.consume(ne),Z(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(ne),ee)}function Z(ne,ke){let Oe=t.sliceStream(ne);if(ke&&Oe.push(null),ne.previous=o,o&&(o.next=ne),o=ne,i.defineSkip(ne.start),i.write(Oe),t.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=t.events.length,Xe=Ue,je,U;for(;Xe--;)if(t.events[Xe][0]==="exit"&&t.events[Xe][1].type==="chunkFlow"){if(je){U=t.events[Xe][1].end;break}je=!0}for(B(r),$=Ue;$<t.events.length;)t.events[$][1].end=Object.assign({},U),$++;pt(t.events,Xe+1,0,t.events.slice(Ue)),t.events.length=$}}function B(ne){let ke=n.length;for(;ke-- >ne;){let Oe=n[ke];t.containerState=Oe[1],Oe[0].exit.call(t,e)}n.length=ne}function ue(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ww(e,t,n){return we(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var sh,ah,lh=M(()=>{"use strict";ut();Be();wn();sh={tokenize:Vw},ah={tokenize:Ww}});function Hw(e){let t=this,n=e.attempt(sn,r,e.attempt(this.parser.constructs.flowInitial,i,we(e,e.attempt(this.parser.constructs.flow,i,e.attempt(zs,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var ch,uh=M(()=>{"use strict";Ao();ut();ch={tokenize:Hw}});function fh(e){return{tokenize:t,resolveAll:mh(e==="text"?Yw:void 0)};function t(n){let r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(h){return p(h)?o(h):s(h)}function s(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),u}function u(h){return p(h)?(n.exit("data"),o(h)):(n.consume(h),u)}function p(h){if(h===null)return!0;let d=i[h],g=-1;if(d)for(;++g<d.length;){let y=d[g];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function mh(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Yw(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let r=e[n-1][1],i=t.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:n===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(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}var ph,dh,hh,sl=M(()=>{"use strict";ph={resolveAll:mh()},dh=fh("string"),hh=fh("text")});function gh(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],u=!0,p={consume:ke,enter:Oe,exit:$,attempt:je(Ue),check:je(Xe),interrupt:je(Xe,{interrupt:!0})},h={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:ee,sliceSerialize:P,now:Z,defineSkip:B,write:y},d=t.tokenize.call(h,p),g;return t.resolveAll&&o.push(t),h;function y(ye){return a=Ot(a,ye),ue(),a[a.length-1]!==null?[]:(U(t,0),h.events=Pn(o,h.events,h),h.events)}function P(ye,Ie){return Gw(ee(ye),Ie)}function ee(ye){return Jw(a,ye)}function Z(){let{line:ye,column:Ie,offset:Me,_index:tt,_bufferIndex:ct}=r;return{line:ye,column:Ie,offset:Me,_index:tt,_bufferIndex:ct}}function B(ye){i[ye.line]=ye.column,ze()}function ue(){let ye;for(;r._index<a.length;){let Ie=a[r._index];if(typeof Ie=="string")for(ye=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ye&&r._bufferIndex<Ie.length;)ne(Ie.charCodeAt(r._bufferIndex));else ne(Ie)}}function ne(ye){u=void 0,g=ye,d=d(ye)}function ke(ye){le(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++)),h.previous=ye,u=!0}function Oe(ye,Ie){let Me=Ie||{};return Me.type=ye,Me.start=Z(),h.events.push(["enter",Me,h]),s.push(Me),Me}function $(ye){let Ie=s.pop();return Ie.end=Z(),h.events.push(["exit",Ie,h]),Ie}function Ue(ye,Ie){U(ye,Ie.from)}function Xe(ye,Ie){Ie.restore()}function je(ye,Ie){return Me;function Me(tt,ct,Nt){let $t,A,At,Lt;return Array.isArray(tt)?St(tt):"tokenize"in tt?St([tt]):R(tt);function R(dt){return Un;function Un(Xt){let cn=Xt!==null&&dt[Xt],An=Xt!==null&&dt.null,Tr=[...Array.isArray(cn)?cn:cn?[cn]:[],...Array.isArray(An)?An:An?[An]:[]];return St(Tr)(Xt)}}function St(dt){return $t=dt,A=0,dt.length===0?Nt:ln(dt[A])}function ln(dt){return Un;function Un(Xt){return Lt=Te(),At=dt,dt.partial||(h.currentConstruct=dt),dt.name&&h.parser.constructs.disable.null.includes(dt.name)?tr(Xt):dt.tokenize.call(Ie?Object.assign(Object.create(h),Ie):h,p,Sr,tr)(Xt)}}function Sr(dt){return u=!0,ye(At,Lt),ct}function tr(dt){return u=!0,Lt.restore(),++A<$t.length?ln($t[A]):Nt}}}function U(ye,Ie){ye.resolveAll&&!o.includes(ye)&&o.push(ye),ye.resolve&&pt(h.events,Ie,h.events.length-Ie,ye.resolve(h.events.slice(Ie),h)),ye.resolveTo&&(h.events=ye.resolveTo(h.events,h))}function Te(){let ye=Z(),Ie=h.previous,Me=h.currentConstruct,tt=h.events.length,ct=Array.from(s);return{restore:Nt,from:tt};function Nt(){r=ye,h.previous=Ie,h.currentConstruct=Me,h.events.length=tt,s=ct,ze()}}function ze(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Jw(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,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 Gw(e,t){let n=-1,r=[],i;for(;++n<e.length;){let o=e[n],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
13
+ `,...o.current()});return/^[\t ]/.test(p)&&(p="&#x"+p.charCodeAt(0).toString(16).toUpperCase()+";"+p.slice(1)),p=p?a+" "+p:a,n.options.closeAtx&&(p+=" "+a),u(),s(),p}var gp=M(()=>{"use strict";fp()});function ms(e){return e.value||""}function Qy(){return"<"}var yp=M(()=>{"use strict";ms.peek=Qy});function gs(e,t,n,r){let i=lr(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image"),s=n.enter("label"),u=n.createTracker(r),p=u.move("![");return p+=u.move(n.safe(e.alt,{before:p,after:"]",...u.current()})),p+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(n.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=n.enter("destinationRaw"),p+=u.move(n.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(n.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),p+=u.move(")"),a(),p}function Zy(){return"!"}var bp=M(()=>{"use strict";ao();gs.peek=Zy});function ys(e,t,n,r){let i=e.referenceType,o=n.enter("imageReference"),a=n.enter("label"),s=n.createTracker(r),u=s.move("!["),p=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=n.stack;n.stack=[],a=n.enter("reference");let h=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return a(),n.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function eb(){return"!"}var wp=M(()=>{"use strict";ys.peek=eb});function bs(e,t,n){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<n.unsafe.length;){let a=n.unsafe[o],s=n.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 tb(){return"`"}var Sp=M(()=>{"use strict";bs.peek=tb});function ws(e,t){let n=bn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var Tp=M(()=>{"use strict";Ur()});function Ss(e,t,n,r){let i=lr(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r),s,u;if(ws(e,n)){let d=n.stack;n.stack=[],s=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),s(),n.stack=d,h}s=n.enter("link"),u=n.enter("label");let p=a.move("[");return p+=a.move(n.containerPhrasing(e,{before:p,after:"](",...a.current()})),p+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),p+=a.move("<"),p+=a.move(n.safe(e.url,{before:p,after:">",...a.current()})),p+=a.move(">")):(u=n.enter("destinationRaw"),p+=a.move(n.safe(e.url,{before:p,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${o}`),p+=a.move(" "+i),p+=a.move(n.safe(e.title,{before:p,after:i,...a.current()})),p+=a.move(i),u()),p+=a.move(")"),s(),p}function nb(e,t,n){return ws(e,n)?"<":"["}var xp=M(()=>{"use strict";ao();Tp();Ss.peek=nb});function Ts(e,t,n,r){let i=e.referenceType,o=n.enter("linkReference"),a=n.enter("label"),s=n.createTracker(r),u=s.move("["),p=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=n.stack;n.stack=[],a=n.enter("reference");let h=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return a(),n.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function rb(){return"["}var vp=M(()=>{"use strict";Ts.peek=rb});function cr(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var so=M(()=>{"use strict"});function kp(e){let t=cr(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}var Ap=M(()=>{"use strict";so()});function Ep(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}var Rp=M(()=>{"use strict"});function lo(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}var xs=M(()=>{"use strict"});function _p(e,t,n,r){let i=n.enter("list"),o=n.bulletCurrent,a=e.ordered?Ep(n):cr(n),s=e.ordered?a==="."?")":".":kp(n),u=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){let d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),lo(n)===a&&d){let h=-1;for(;++h<e.children.length;){let g=e.children[h];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),n.bulletCurrent=a;let p=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),p}var Op=M(()=>{"use strict";so();Ap();Rp();xs()});function Cp(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var Ip=M(()=>{"use strict"});function Pp(e,t,n,r){let i=Cp(n),o=n.bulletCurrent||cr(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,s.current()),d);return u(),p;function d(h,g,y){return g?(y?"":" ".repeat(a))+h:(y?o:o+" ".repeat(a-o.length))+h}}var Mp=M(()=>{"use strict";so();Ip()});function Np(e,t,n,r){let i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}var Lp=M(()=>{"use strict"});var vs,Dp=M(()=>{"use strict";no();vs=In(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var Fp=M(()=>{"use strict";Dp()});function Up(e,t,n,r){return(e.children.some(function(a){return vs(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}var $p=M(()=>{"use strict";Fp()});function qp(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}var jp=M(()=>{"use strict"});function ks(e,t,n,r){let i=qp(n),o=n.enter("strong"),a=n.createTracker(r),s=a.move(i+i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function ib(e,t,n){return n.options.strong||"*"}var Bp=M(()=>{"use strict";jp();ks.peek=ib});function zp(e,t,n,r){return n.safe(e.value,r)}var Hp=M(()=>{"use strict"});function Vp(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}var Wp=M(()=>{"use strict"});function Yp(e,t,n){let r=(lo(n)+(n.options.ruleSpaces?" ":"")).repeat(Vp(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Jp=M(()=>{"use strict";Wp();xs()});var jr,Gp=M(()=>{"use strict";Yu();Xu();op();sp();up();gp();yp();bp();wp();Sp();xp();vp();Op();Mp();Lp();$p();Bp();Hp();Jp();jr={blockquote:Wu,break:ds,code:ip,definition:ap,emphasis:hs,hardBreak:ds,heading:mp,html:ms,image:gs,imageReference:ys,inlineCode:bs,link:Ss,linkReference:Ts,list:_p,listItem:Pp,paragraph:Np,root:Up,strong:ks,text:zp,thematicBreak:Yp}});var As,Kp=M(()=>{"use strict";As={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 ob.call(As,e)?As[e]:!1}var ob,co=M(()=>{"use strict";Kp();ob={}.hasOwnProperty});function uo(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var Es=M(()=>{"use strict"});function Xp(e){return e.replace(ab,sb)}function sb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),o=i===120||i===88;return uo(n.slice(o?2:1),o?16:10)}return ur(n)||e}var ab,Qp=M(()=>{"use strict";co();Es();ab=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});var Rs=M(()=>{"use strict";Gp()});function Os(){return{enter:{table:lb,tableData:Zp,tableHeader:Zp,tableRow:ub},exit:{codeText:pb,table:cb,tableData:_s,tableHeader:_s,tableRow:_s}}}function lb(e){let t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function cb(e){this.exit(e),this.data.inTable=void 0}function ub(e){this.enter({type:"tableRow",children:[]},e)}function _s(e){this.exit(e)}function Zp(e){this.enter({type:"tableCell",children:[]},e)}function pb(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,db));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function db(e,t){return t==="|"?t:e}function Cs(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
15
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:a,tableCell:u,tableRow:s}};function a(y,P,ee,Z){return p(d(y,ee,Z),y.align)}function s(y,P,ee,Z){let B=h(y,ee,Z),ue=p([B]);return ue.slice(0,ue.indexOf(`
16
+ `))}function u(y,P,ee,Z){let B=ee.enter("tableCell"),ue=ee.enter("phrasing"),ne=ee.containerPhrasing(y,{...Z,before:o,after:o});return ue(),B(),ne}function p(y,P){return Hu(y,{align:P,alignDelimiters:r,padding:n,stringLength:i})}function d(y,P,ee){let Z=y.children,B=-1,ue=[],ne=P.enter("table");for(;++B<Z.length;)ue[B]=h(Z[B],P,ee);return ne(),ue}function h(y,P,ee){let Z=y.children,B=-1,ue=[],ne=P.enter("tableRow");for(;++B<Z.length;)ue[B]=u(Z[B],y,P,ee);return ne(),ue}function g(y,P,ee){let Z=jr.inlineCode(y,P,ee);return ee.stack.includes("tableCell")&&(Z=Z.replace(/\|/g,"\\$&")),Z}}var ed=M(()=>{"use strict";Vu();Rs()});var td=M(()=>{"use strict";ed()});function Is(){return{exit:{taskListCheckValueChecked:nd,taskListCheckValueUnchecked:nd,paragraph:hb}}}function Ps(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:fb}}}function nd(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hb(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let n=this.stack[this.stack.length-1];n.type;let r=n.children[0];if(r&&r.type==="text"){let i=t.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function fb(e,t,n,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let u=jr.listItem(e,t,n,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),u;function p(d){return d+a}}var rd=M(()=>{"use strict";Rs()});var id=M(()=>{"use strict";rd()});function Ms(){return[as(),ls(),us(),Os(),Is()]}function Ns(e){return{extensions:[ss(),cs(),ps(),Cs(e),Ps()]}}var od=M(()=>{"use strict";Du();$u();Bu();td();id()});var ad=M(()=>{"use strict";od()});function pt(e,t,n,r){let i=e.length,o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Ot(e,t){return e.length>0?(pt(e,e.length,0,t),e):t}var wn=M(()=>{"use strict"});function po(e){let t={},n=-1;for(;++n<e.length;)mb(t,e[n]);return t}function mb(e,t){let n;for(n in t){let i=(sd.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n],a;if(o)for(a in o){sd.call(i,a)||(i[a]=[]);let s=o[a];gb(i[a],Array.isArray(s)?s:s?[s]:[])}}}function gb(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);pt(e,0,0,r)}var sd,Ls=M(()=>{"use strict";wn();sd={}.hasOwnProperty});function Fs(){return{text:an}}function wb(e,t,n){let r=this,i,o;return a;function a(h){return!Ds(h)||!md.call(r,r.previous)||Us(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return Ds(h)?(e.consume(h),s):h===64?(e.consume(h),u):n(h)}function u(h){return h===46?e.check(bb,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"),t(h)):n(h)}}function Sb(e,t,n){let r=this;return i;function i(a){return a!==87&&a!==119||!hd.call(r,r.previous)||Us(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(yb,e.attempt(ld,e.attempt(cd,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Tb(e,t,n){let r=this,i="",o=!1;return a;function a(h){return(h===72||h===104)&&fd.call(r,r.previous)&&!Us(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),s):n(h)}function s(h){if(ht(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),s;if(h===58){let g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(h),u}return n(h)}function u(h){return h===47?(e.consume(h),o?p:(o=!0,u)):n(h)}function p(h){return h===null||zn(h)||Le(h)||on(h)||Hn(h)?n(h):e.attempt(ld,e.attempt(cd,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function xb(e,t,n){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):n(a)}function o(a){return a===null?n(a):t(a)}}function vb(e,t,n){let r,i,o;return a;function a(p){return p===46||p===95?e.check(ud,u,s)(p):p===null||Le(p)||on(p)||p!==45&&Hn(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?n(p):t(p)}}function kb(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?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(ud,t,o)(a):a===null||Le(a)||on(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function Ab(e,t,n){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)||on(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Le(s)||on(s)?t(s):r(s)}function o(s){return ht(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):ht(s)?(e.consume(s),a):n(s)}}function Eb(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ft(o)?n(o):t(o)}}function hd(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function fd(e){return!ht(e)}function md(e){return!(e===47||Ds(e))}function Ds(e){return e===43||e===45||e===46||e===95||ft(e)}function Us(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var yb,ld,cd,ud,bb,pd,dd,Sn,an,Wn,gd=M(()=>{"use strict";Be();yb={tokenize:xb,partial:!0},ld={tokenize:vb,partial:!0},cd={tokenize:kb,partial:!0},ud={tokenize:Ab,partial:!0},bb={tokenize:Eb,partial:!0},pd={name:"wwwAutolink",tokenize:Sb,previous:hd},dd={name:"protocolAutolink",tokenize:Tb,previous:fd},Sn={name:"emailAutolink",tokenize:wb,previous:md},an={};Wn=48;for(;Wn<123;)an[Wn]=Sn,Wn++,Wn===58?Wn=65:Wn===91&&(Wn=97);an[43]=Sn;an[45]=Sn;an[46]=Sn;an[95]=Sn;an[72]=[Sn,dd];an[104]=[Sn,dd];an[87]=[Sn,pd];an[119]=[Sn,pd]});var yd=M(()=>{"use strict";gd()});function pr(e){if(e===null||Le(e)||on(e))return 1;if(Hn(e))return 2}var $s=M(()=>{"use strict";Be()});function Pn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var Br=M(()=>{"use strict"});function Rb(e,t){let n=-1,r,i,o,a,s,u,p,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let h=Object.assign({},e[r][1].end),g=Object.assign({},e[n][1].start);bd(h,-u),bd(g,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[n][1].start),end:g},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][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[n][1].start=Object.assign({},s.end),p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=Ot(p,[["enter",e[r][1],t],["exit",e[r][1],t]])),p=Ot(p,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),p=Ot(p,Pn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),p=Ot(p,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,p=Ot(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,pt(e,r-1,n-r+3,p),n=r+p.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _b(e,t){let n=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||n.includes(u),g=!i||i===2&&d||n.includes(r);return p._open=!!(o===42?h:h&&(i||!g)),p._close=!!(o===42?g:g&&(d||!h)),t(u)}}function bd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var zr,wd=M(()=>{"use strict";wn();$s();Br();zr={name:"attention",tokenize:_b,resolveAll:Rb}});function Ob(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return ht(y)?(e.consume(y),a):y===64?n(y):p(y)}function a(y){return y===43||y===45||y===46||ft(y)?(r=1,s(y)):p(y)}function s(y){return y===58?(e.consume(y),r=0,u):(y===43||y===45||y===46||ft(y))&&r++<32?(e.consume(y),s):(r=0,p(y))}function u(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||zn(y)?n(y):(e.consume(y),u)}function p(y){return y===64?(e.consume(y),d):vu(y)?(e.consume(y),p):n(y)}function d(y){return ft(y)?h(y):n(y)}function h(y){return y===46?(e.consume(y),r=0,d):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):g(y)}function g(y){if((y===45||ft(y))&&r++<63){let P=y===45?g:h;return e.consume(y),P}return n(y)}}var qs,Sd=M(()=>{"use strict";Be();qs={name:"autolink",tokenize:Ob}});function we(e,t,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return Se(u)?(e.enter(n),s(u)):t(u)}function s(u){return Se(u)&&o++<i?(e.consume(u),s):(e.exit(n),t(u))}}var ut=M(()=>{"use strict";Be()});function Cb(e,t,n){return r;function r(o){return Se(o)?we(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||le(o)?t(o):n(o)}}var sn,ho=M(()=>{"use strict";ut();Be();sn={tokenize:Cb,partial:!0}});function Ib(e,t,n){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 n(a)}function o(a){return Se(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Pb(e,t,n){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,t,n)(a)}}function Mb(e){e.exit("blockQuote")}var fo,Td=M(()=>{"use strict";ut();Be();fo={name:"blockQuote",tokenize:Ib,continuation:{tokenize:Pb},exit:Mb}});function Nb(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Au(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}var mo,xd=M(()=>{"use strict";Be();mo={name:"characterEscape",tokenize:Nb}});function Lb(e,t,n){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=ku,d):(e.enter("characterReferenceValue"),o=7,a=$r,d(h))}function d(h){if(h===59&&i){let g=e.exit("characterReferenceValue");return a===ft&&!ur(r.sliceSerialize(g))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&i++<o?(e.consume(h),d):n(h)}}var go,vd=M(()=>{"use strict";co();Be();go={name:"characterReference",tokenize:Lb}});function Db(e,t,n){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?n($):(e.exit("codeFencedFenceSequence"),Se($)?we(e,h,"whitespace")($):h($))}function h($){return $===null||le($)?(e.exit("codeFencedFence"),r.interrupt?t($):e.check(kd,ee,ke)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g($))}function g($){return $===null||le($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h($)):Se($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,y,"whitespace")($)):$===96&&$===s?n($):(e.consume($),g)}function y($){return $===null||le($)?h($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),P($))}function P($){return $===null||le($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h($)):$===96&&$===s?n($):(e.consume($),P)}function ee($){return e.attempt(i,ke,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||le($)?e.check(kd,ee,ke)($):(e.enter("codeFlowValue"),ne($))}function ne($){return $===null||le($)?(e.exit("codeFlowValue"),ue($)):(e.consume($),ne)}function ke($){return e.exit("codeFenced"),t($)}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($,Ie,"whitespace")(Me):Ie(Me)):Xe(Me)}function Ie(Me){return Me===null||le(Me)?($.exit("codeFencedFence"),Ue(Me)):Xe(Me)}}}function Fb(e,t,n){let r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}var kd,yo,Ad=M(()=>{"use strict";ut();Be();kd={tokenize:Fb,partial:!0},yo={name:"codeFenced",tokenize:Db,concrete:!0}});function $b(e,t,n){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):n(p)}function a(p){return p===null?u(p):le(p)?e.attempt(Ub,a,u)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||le(p)?(e.exit("codeFlowValue"),a(p)):(e.consume(p),s)}function u(p){return e.exit("codeIndented"),t(p)}}function qb(e,t,n){let r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):le(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?t(a):le(a)?i(a):n(a)}}var Hr,Ub,Ed=M(()=>{"use strict";ut();Be();Hr={name:"codeIndented",tokenize:$b},Ub={tokenize:qb,partial:!0}});function jb(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||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),t-=r-i-2,r=i+2),i=void 0);return e}function Bb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zb(e,t,n){let r=this,i=0,o,a;return s;function s(g){return e.enter("codeText"),e.enter("codeTextSequence"),u(g)}function u(g){return g===96?(e.consume(g),i++,u):(e.exit("codeTextSequence"),p(g))}function p(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(a=e.enter("codeTextSequence"),o=0,h(g)):le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),d(g))}function d(g){return g===null||g===32||g===96||le(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),d)}function h(g){return g===96?(e.consume(g),o++,h):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",d(g))}}var js,Rd=M(()=>{"use strict";Be();js={name:"codeText",tokenize:zb,resolve:jb,previous:Bb}});function Vr(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}var bo,_d=M(()=>{"use strict";bo=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){let i=n||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Vr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Vr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);Vr(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vr(this.left,n.reverse())}}}});function wo(e){let t={},n=-1,r,i,o,a,s,u,p,d=new bo(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-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(t,Hb(d,n)),n=t[n],p=!0);else if(r[1]._container){for(o=n,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,n),s.unshift(r),d.splice(i,n-i+1,s))}}return pt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!p}function Hb(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,u=[],p={},d,h,g=-1,y=n,P=0,ee=0,Z=[ee];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(d=r.sliceStream(y),y.next||d.push(null),h&&a.defineSkip(y.start),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=y,y=y.next}for(y=n;++g<s.length;)s[g][0]==="exit"&&s[g-1][0]==="enter"&&s[g][1].type===s[g-1][1].type&&s[g][1].start.line!==s[g][1].end.line&&(ee=g+1,Z.push(ee),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(a.events=[],y?(y._tokenizer=void 0,y.previous=void 0):Z.pop(),g=Z.length;g--;){let B=s.slice(Z[g],Z[g+1]),ue=o.pop();u.push([ue,ue+B.length-1]),e.splice(ue,2,B)}for(u.reverse(),g=-1;++g<u.length;)p[P+u[g][0]]=P+u[g][1],P+=u[g][1]-u[g][0]-1;return p}var Bs=M(()=>{"use strict";wn();_d()});function Wb(e){return wo(e),e}function Yb(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):le(s)?e.check(Vb,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Jb(e,t,n){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||le(a))return n(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?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}var zs,Vb,Od=M(()=>{"use strict";ut();Be();Bs();zs={tokenize:Yb,resolve:Wb},Vb={tokenize:Jb,partial:!0}});function So(e,t,n,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),g):B===null||B===32||B===41||zn(B)?n(B):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),ee(B))}function g(B){return B===62?(e.enter(o),e.consume(B),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),y(B))}function y(B){return B===62?(e.exit("chunkString"),e.exit(s),g(B)):B===null||B===60||le(B)?n(B):(e.consume(B),B===92?P:y)}function P(B){return B===60||B===62||B===92?(e.consume(B),y):y(B)}function ee(B){return!d&&(B===null||B===41||Le(B))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(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)?n(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 Hs=M(()=>{"use strict";Be()});function To(e,t,n,r,i,o){let a=this,s=0,u;return p;function p(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),d}function d(y){return s>999||y===null||y===91||y===93&&!u||y===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):le(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===null||y===91||y===93||le(y)||s++>999?(e.exit("chunkString"),d(y)):(e.consume(y),u||(u=!Se(y)),y===92?g:h)}function g(y){return y===91||y===92||y===93?(e.consume(y),s++,h):h(y)}}var Vs=M(()=>{"use strict";Be()});function xo(e,t,n,r,i,o){let a;return s;function s(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),a=g===40?41:g,u):n(g)}function u(g){return g===a?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(o),p(g))}function p(g){return g===a?(e.exit(o),u(a)):g===null?n(g):le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),we(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===a||g===null||le(g)?(e.exit("chunkString"),p(g)):(e.consume(g),g===92?h:d)}function h(g){return g===a||g===92?(e.consume(g),d):d(g)}}var Ws=M(()=>{"use strict";ut();Be()});function Yn(e,t){let n;return r;function r(i){return le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Se(i)?we(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var Ys=M(()=>{"use strict";ut();Be()});function Kb(e,t,n){let r=this,i;return o;function o(y){return e.enter("definition"),a(y)}function a(y){return To.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function s(y){return i=vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),u):n(y)}function u(y){return Le(y)?Yn(e,p)(y):p(y)}function p(y){return So(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function d(y){return e.attempt(Gb,h,h)(y)}function h(y){return Se(y)?we(e,g,"whitespace")(y):g(y)}function g(y){return y===null||le(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function Xb(e,t,n){return r;function r(s){return Le(s)?Yn(e,i)(s):n(s)}function i(s){return xo(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Se(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||le(s)?t(s):n(s)}}var Js,Gb,Cd=M(()=>{"use strict";Hs();Vs();ut();Ws();Ys();Be();sr();Js={name:"definition",tokenize:Kb},Gb={tokenize:Xb,partial:!0}});function Qb(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return le(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}var Gs,Id=M(()=>{"use strict";Be();Gs={name:"hardBreakEscape",tokenize:Qb}});function Zb(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},pt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function ew(e,t,n){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)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||le(d)?(e.exit("atxHeading"),t(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 Ks,Pd=M(()=>{"use strict";ut();Be();wn();Ks={name:"headingAtx",tokenize:ew,resolve:Zb}});var Md,Xs,Nd=M(()=>{"use strict";Md=["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"],Xs=["pre","script","style","textarea"]});function rw(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function iw(e,t,n){let r=this,i,o,a,s,u;return p;function p(R){return d(R)}function d(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),g):R===47?(e.consume(R),o=!0,ee):R===63?(e.consume(R),i=3,r.interrupt?t:A):ht(R)?(e.consume(R),a=String.fromCharCode(R),Z):n(R)}function g(R){return R===45?(e.consume(R),i=2,y):R===91?(e.consume(R),i=5,s=0,P):ht(R)?(e.consume(R),i=4,r.interrupt?t:A):n(R)}function y(R){return R===45?(e.consume(R),r.interrupt?t:A):n(R)}function P(R){let St="CDATA[";return R===St.charCodeAt(s++)?(e.consume(R),s===St.length?r.interrupt?t:ze:P):n(R)}function ee(R){return ht(R)?(e.consume(R),a=String.fromCharCode(R),Z):n(R)}function Z(R){if(R===null||R===47||R===62||Le(R)){let St=R===47,ln=a.toLowerCase();return!St&&!o&&Xs.includes(ln)?(i=1,r.interrupt?t(R):ze(R)):Md.includes(a.toLowerCase())?(i=6,St?(e.consume(R),B):r.interrupt?t(R):ze(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):o?ue(R):ne(R))}return R===45||ft(R)?(e.consume(R),a+=String.fromCharCode(R),Z):n(R)}function B(R){return R===62?(e.consume(R),r.interrupt?t:ze):n(R)}function ue(R){return Se(R)?(e.consume(R),ue):U(R)}function ne(R){return R===47?(e.consume(R),U):R===58||R===95||ht(R)?(e.consume(R),ke):Se(R)?(e.consume(R),ne):U(R)}function ke(R){return R===45||R===46||R===58||R===95||ft(R)?(e.consume(R),ke):Oe(R)}function Oe(R){return R===61?(e.consume(R),$):Se(R)?(e.consume(R),Oe):ne(R)}function $(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),u=R,Ue):Se(R)?(e.consume(R),$):Xe(R)}function Ue(R){return R===u?(e.consume(R),u=null,je):R===null||le(R)?n(R):(e.consume(R),Ue)}function Xe(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Le(R)?Oe(R):(e.consume(R),Xe)}function je(R){return R===47||R===62||Se(R)?ne(R):n(R)}function U(R){return R===62?(e.consume(R),Te):n(R)}function Te(R){return R===null||le(R)?ze(R):Se(R)?(e.consume(R),Te):n(R)}function ze(R){return R===45&&i===2?(e.consume(R),tt):R===60&&i===1?(e.consume(R),ct):R===62&&i===4?(e.consume(R),At):R===63&&i===3?(e.consume(R),A):R===93&&i===5?(e.consume(R),$t):le(R)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(tw,Lt,ye)(R)):R===null||le(R)?(e.exit("htmlFlowData"),ye(R)):(e.consume(R),ze)}function ye(R){return e.check(nw,Ie,Lt)(R)}function Ie(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Me}function Me(R){return R===null||le(R)?ye(R):(e.enter("htmlFlowData"),ze(R))}function tt(R){return R===45?(e.consume(R),A):ze(R)}function ct(R){return R===47?(e.consume(R),a="",Nt):ze(R)}function Nt(R){if(R===62){let St=a.toLowerCase();return Xs.includes(St)?(e.consume(R),At):ze(R)}return ht(R)&&a.length<8?(e.consume(R),a+=String.fromCharCode(R),Nt):ze(R)}function $t(R){return R===93?(e.consume(R),A):ze(R)}function A(R){return R===62?(e.consume(R),At):R===45&&i===2?(e.consume(R),A):ze(R)}function At(R){return R===null||le(R)?(e.exit("htmlFlowData"),Lt(R)):(e.consume(R),At)}function Lt(R){return e.exit("htmlFlow"),t(R)}}function ow(e,t,n){let r=this;return i;function i(a){return le(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function aw(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(sn,t,n)}}var Qs,tw,nw,Ld=M(()=>{"use strict";Be();Nd();ho();Qs={name:"htmlFlow",tokenize:iw,resolveTo:rw,concrete:!0},tw={tokenize:aw,partial:!0},nw={tokenize:ow,partial:!0}});function sw(e,t,n){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),Oe):A===63?(e.consume(A),ne):ht(A)?(e.consume(A),Xe):n(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):n(A)}function d(A){return A===45?(e.consume(A),y):n(A)}function h(A){return A===null?n(A):A===45?(e.consume(A),g):le(A)?(a=h,ct(A)):(e.consume(A),h)}function g(A){return A===45?(e.consume(A),y):h(A)}function y(A){return A===62?tt(A):A===45?g(A):h(A)}function P(A){let At="CDATA[";return A===At.charCodeAt(o++)?(e.consume(A),o===At.length?ee:P):n(A)}function ee(A){return A===null?n(A):A===93?(e.consume(A),Z):le(A)?(a=ee,ct(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):le(A)?(a=ue,ct(A)):(e.consume(A),ue)}function ne(A){return A===null?n(A):A===63?(e.consume(A),ke):le(A)?(a=ne,ct(A)):(e.consume(A),ne)}function ke(A){return A===62?tt(A):ne(A)}function Oe(A){return ht(A)?(e.consume(A),$):n(A)}function $(A){return A===45||ft(A)?(e.consume(A),$):Ue(A)}function Ue(A){return le(A)?(a=Ue,ct(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):n(A)}function je(A){return A===47?(e.consume(A),tt):A===58||A===95||ht(A)?(e.consume(A),U):le(A)?(a=je,ct(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):le(A)?(a=Te,ct(A)):Se(A)?(e.consume(A),Te):je(A)}function ze(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,ye):le(A)?(a=ze,ct(A)):Se(A)?(e.consume(A),ze):(e.consume(A),Ie)}function ye(A){return A===i?(e.consume(A),i=void 0,Me):A===null?n(A):le(A)?(a=ye,ct(A)):(e.consume(A),ye)}function Ie(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Le(A)?je(A):(e.consume(A),Ie)}function Me(A){return A===47||A===62||Le(A)?je(A):n(A)}function tt(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function ct(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Nt}function Nt(A){return Se(A)?we(e,$t,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):$t(A)}function $t(A){return e.enter("htmlTextData"),a(A)}}var Zs,Dd=M(()=>{"use strict";ut();Be();Zs={name:"htmlText",tokenize:sw}});function pw(e){let t=-1;for(;++t<e.length;){let n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function dw(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);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,t],["enter",p,t]],s=Ot(s,e.slice(o+1,o+r+3)),s=Ot(s,[["enter",d,t]]),s=Ot(s,Pn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=Ot(s,[["exit",d,t],e[a-2],e[a-1],["exit",p,t]]),s=Ot(s,e.slice(a+1)),s=Ot(s,[["exit",u,t]]),pt(e,o,e.length,s),e}function hw(e,t,n){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(g){return o?o._inactive?h(g):(a=r.parser.defined.includes(vt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),u):n(g)}function u(g){return g===40?e.attempt(lw,d,a?d:h)(g):g===91?e.attempt(cw,d,a?p:h)(g):a?d(g):h(g)}function p(g){return e.attempt(uw,d,h)(g)}function d(g){return t(g)}function h(g){return o._balanced=!0,n(g)}}function fw(e,t,n){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 n(h)}function u(h){return h===34||h===39||h===40?xo(e,p,n,"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"),t):n(h)}}function mw(e,t,n){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(vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function gw(e,t,n){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"),t):n(o)}}var Jn,lw,cw,uw,vo=M(()=>{"use strict";Hs();Vs();Ws();Ys();Be();wn();sr();Br();Jn={name:"labelEnd",tokenize:hw,resolveTo:dw,resolveAll:pw},lw={tokenize:fw},cw={tokenize:mw},uw={tokenize:gw}});function yw(e,t,n){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):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var el,Fd=M(()=>{"use strict";vo();el={name:"labelStartImage",tokenize:yw,resolveAll:Jn.resolveAll}});function bw(e,t,n){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?n(a):t(a)}}var tl,Ud=M(()=>{"use strict";vo();tl={name:"labelStartLink",tokenize:bw,resolveAll:Jn.resolveAll}});function ww(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,t,"linePrefix")}}var Wr,$d=M(()=>{"use strict";ut();Wr={name:"lineEnding",tokenize:ww}});function Sw(e,t,n){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||le(p))?(e.exit("thematicBreak"),t(p)):n(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,nl=M(()=>{"use strict";ut();Be();Gn={name:"thematicBreak",tokenize:Sw}});function vw(e,t,n){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(y){let P=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(P==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:$r(y)){if(r.containerState.type||(r.containerState.type=P,e.enter(P,{_container:!0})),P==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Gn,n,p)(y):p(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(y)}return n(y)}function u(y){return $r(y)&&++a<10?(e.consume(y),u):(!r.interrupt||a<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),p(y)):n(y)}function p(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(sn,r.interrupt?n:d,e.attempt(Tw,g,h))}function d(y){return r.containerState.initialBlankLine=!0,o++,g(y)}function h(y){return Se(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function kw(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(sn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,t,"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(xw,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(kt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Aw(e,t,n){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?t(o):n(o)}}function Ew(e){e.exit(this.containerState.type)}function Rw(e,t,n){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"?t(o):n(o)}}var kt,Tw,xw,qd=M(()=>{"use strict";ut();Be();ho();nl();kt={name:"list",tokenize:vw,continuation:{tokenize:kw},exit:Ew},Tw={tokenize:Rw,partial:!0},xw={tokenize:Aw,partial:!0}});function _w(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);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,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function Ow(e,t,n){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)):n(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||le(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}var ko,jd=M(()=>{"use strict";ut();Be();ko={name:"setextUnderline",tokenize:Ow,resolveTo:_w}});var Ao=M(()=>{"use strict";wd();Sd();ho();Td();xd();vd();Ad();Ed();Rd();Od();Cd();Id();Pd();Ld();Dd();vo();Fd();Ud();$d();qd();jd();nl()});function rl(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Nw,continuation:{tokenize:Lw},exit:Dw}},text:{91:{name:"gfmFootnoteCall",tokenize:Mw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Iw,resolveTo:Pw}}}}function Iw(e,t,n){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 n(u);let p=vt(r.sliceSerialize({start:a.end,end:r.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Pw(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){r=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+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[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...u),e}function Mw(e,t,n){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?n(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 n(h);if(h===93){e.exit("chunkString");let g=e.exit("gfmFootnoteCallString");return i.includes(vt(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(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 Nw(e,t,n){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):n(P)}function d(P){if(a>999||P===93&&!s||P===null||P===91||Le(P))return n(P);if(P===93){e.exit("chunkString");let ee=e.exit("gfmFootnoteDefinitionLabelString");return o=vt(r.sliceSerialize(ee)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}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 g(P){return P===58?(e.enter("definitionMarker"),e.consume(P),e.exit("definitionMarker"),i.includes(o)||i.push(o),we(e,y,"gfmFootnoteDefinitionWhitespace")):n(P)}function y(P){return t(P)}}function Lw(e,t,n){return e.check(sn,t,e.attempt(Cw,t,n))}function Dw(e){e.exit("gfmFootnoteDefinition")}function Fw(e,t,n){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?t(o):n(o)}}var Cw,Bd=M(()=>{"use strict";Ao();ut();Be();sr();Cw={tokenize:Fw,partial:!0}});var zd=M(()=>{"use strict";Bd()});function il(e){let n=(e||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!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)},g=[["enter",d,s],["enter",a[p][1],s],["exit",a[p][1],s],["enter",h,s]],y=s.parser.constructs.insideSpan.null;y&&pt(g,g.length,0,Pn(y,a.slice(p+1,u),s)),pt(g,g.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,g),u=p+g.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 g;function g(P){return p===126&&d[d.length-1][1].type!=="characterEscape"?u(P):(a.enter("strikethroughSequenceTemporary"),y(P))}function y(P){let ee=pr(p);if(P===126)return h>1?u(P):(a.consume(P),h++,y);if(h<2&&!n)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 Hd=M(()=>{"use strict";wn();$s();Br()});var Vd=M(()=>{"use strict";Hd()});function Uw(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}var Eo,Wd=M(()=>{"use strict";Eo=class{constructor(){this.map=[]}add(t,n,r){Uw(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length,r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}});function Yd(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-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"&&(n=!0);t+=1}return r}var Jd=M(()=>{"use strict"});function ol(){return{flow:{null:{name:"table",tokenize:$w,resolveAll:qw}}}}function $w(e,t,n){let r=this,i=0,o=0,a;return s;function s(U){let Te=r.events.length-1;for(;Te>-1;){let Ie=r.events[Te][1].type;if(Ie==="lineEnding"||Ie==="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]?n(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?n(U):le(U)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),y):n(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?g:h)}function g(U){return U===92||U===124?(e.consume(U),h):h(U)}function y(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(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||le(U)?ke(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,ke,"whitespace")(U):ke(U)}function ke(U){return U===124?P(U):U===null||le(U)?!a||i!==o?Oe(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):Oe(U)}function Oe(U){return n(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||le(U)?(e.exit("tableRow"),t(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 qw(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,p,d,h,g=new Eo;for(;++n<e.length;){let y=e[n],P=y[1];y[0]==="enter"?P.type==="tableHead"?(s=!1,u!==0&&(Gd(g,t,u,p,d),d=void 0,u=0),p={type:"table",start:Object.assign({},P.start),end:Object.assign({},P.end)},g.add(n,0,[["enter",p,t]])):P.type==="tableRow"||P.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},P.start),end:Object.assign({},P.end)},g.add(n,0,[["enter",d,t]])),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=Ro(g,t,o,i,void 0,h),o=[0,0,0,0]),a[2]=n)):P.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],h=Ro(g,t,o,i,void 0,h)),o=a,a=[o[1],n,0,0])):P.type==="tableHead"?(s=!0,u=n):P.type==="tableRow"||P.type==="tableDelimiterRow"?(u=n,o[1]!==0?(a[0]=a[1],h=Ro(g,t,o,i,n,h)):a[1]!==0&&(h=Ro(g,t,a,i,n,h)),i=0):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&Gd(g,t,u,p,d),g.consume(t.events),n=-1;++n<t.events.length;){let y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Yd(t.events,n))}return e}function Ro(e,t,n,r,i,o){let a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},dr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));let u=dr(t.events,n[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){let p=dr(t.events,n[2]),d=dr(t.events,n[3]),h={type:s,start:Object.assign({},p),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){let g=t.events[n[2]],y=t.events[n[3]];if(g[1].end=Object.assign({},y[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){let P=n[2]+1,ee=n[3]-n[2]-1;e.add(P,ee,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(o.end=Object.assign({},dr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Gd(e,t,n,r,i){let o=[],a=dr(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function dr(e,t){let n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var Kd=M(()=>{"use strict";ut();Be();Wd();Jd()});var Xd=M(()=>{"use strict";Kd()});function al(){return{text:{91:jw}}}function Bw(e,t,n){let r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(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):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return le(u)?t(u):Se(u)?e.check({tokenize:zw},t,n)(u):n(u)}}function zw(e,t,n){return we(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}var jw,Qd=M(()=>{"use strict";ut();Be();jw={name:"tasklistCheck",tokenize:Bw}});var Zd=M(()=>{"use strict";Qd()});function eh(e){return po([Fs(),rl(),il(e),ol(),al()])}var th=M(()=>{"use strict";Ls();yd();zd();Vd();Xd();Zd()});function _o(e){let t=this,n=e||Hw,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(eh(n)),o.push(Ms()),a.push(Ns(n))}var Hw,nh=M(()=>{"use strict";ad();th();Hw={}});var rh=M(()=>{"use strict";nh()});function Vw(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return le(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var ih,oh=M(()=>{"use strict";ut();Be();ih={tokenize:Vw}});function Ww(e){let t=this,n=[],r=0,i,o,a;return s;function s(ne){if(r<n.length){let ke=n[r];return t.containerState=ke[1],e.attempt(ke[0].continuation,u,p)(ne)}return p(ne)}function u(ne){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&ue();let ke=t.events.length,Oe=ke,$;for(;Oe--;)if(t.events[Oe][0]==="exit"&&t.events[Oe][1].type==="chunkFlow"){$=t.events[Oe][1].end;break}B(r);let Ue=ke;for(;Ue<t.events.length;)t.events[Ue][1].end=Object.assign({},$),Ue++;return pt(t.events,Oe+1,0,t.events.slice(ke)),t.events.length=Ue,p(ne)}return s(ne)}function p(ne){if(r===n.length){if(!i)return g(ne);if(i.currentConstruct&&i.currentConstruct.concrete)return P(ne);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ah,d,h)(ne)}function d(ne){return i&&ue(),B(r),g(ne)}function h(ne){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,P(ne)}function g(ne){return t.containerState={},e.attempt(ah,y,P)(ne)}function y(ne){return r++,n.push([t.currentConstruct,t.containerState]),g(ne)}function P(ne){if(ne===null){i&&ue(),B(0),e.consume(ne);return}return i=i||t.parser.flow(t.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 le(ne)?(e.consume(ne),Z(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(ne),ee)}function Z(ne,ke){let Oe=t.sliceStream(ne);if(ke&&Oe.push(null),ne.previous=o,o&&(o.next=ne),o=ne,i.defineSkip(ne.start),i.write(Oe),t.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=t.events.length,Xe=Ue,je,U;for(;Xe--;)if(t.events[Xe][0]==="exit"&&t.events[Xe][1].type==="chunkFlow"){if(je){U=t.events[Xe][1].end;break}je=!0}for(B(r),$=Ue;$<t.events.length;)t.events[$][1].end=Object.assign({},U),$++;pt(t.events,Xe+1,0,t.events.slice(Ue)),t.events.length=$}}function B(ne){let ke=n.length;for(;ke-- >ne;){let Oe=n[ke];t.containerState=Oe[1],Oe[0].exit.call(t,e)}n.length=ne}function ue(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Yw(e,t,n){return we(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var sh,ah,lh=M(()=>{"use strict";ut();Be();wn();sh={tokenize:Ww},ah={tokenize:Yw}});function Jw(e){let t=this,n=e.attempt(sn,r,e.attempt(this.parser.constructs.flowInitial,i,we(e,e.attempt(this.parser.constructs.flow,i,e.attempt(zs,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var ch,uh=M(()=>{"use strict";Ao();ut();ch={tokenize:Jw}});function fh(e){return{tokenize:t,resolveAll:mh(e==="text"?Gw:void 0)};function t(n){let r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(d){return p(d)?o(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return p(d)?(n.exit("data"),o(d)):(n.consume(d),u)}function p(d){if(d===null)return!0;let h=i[d],g=-1;if(h)for(;++g<h.length;){let y=h[g];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function mh(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Gw(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let r=e[n-1][1],i=t.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:n===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(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}var ph,dh,hh,sl=M(()=>{"use strict";ph={resolveAll:mh()},dh=fh("string"),hh=fh("text")});function gh(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],u=!0,p={consume:ke,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:y},h=t.tokenize.call(d,p),g;return t.resolveAll&&o.push(t),d;function y(ye){return a=Ot(a,ye),ue(),a[a.length-1]!==null?[]:(U(t,0),d.events=Pn(o,d.events,d),d.events)}function P(ye,Ie){return Xw(ee(ye),Ie)}function ee(ye){return Kw(a,ye)}function Z(){let{line:ye,column:Ie,offset:Me,_index:tt,_bufferIndex:ct}=r;return{line:ye,column:Ie,offset:Me,_index:tt,_bufferIndex:ct}}function B(ye){i[ye.line]=ye.column,ze()}function ue(){let ye;for(;r._index<a.length;){let Ie=a[r._index];if(typeof Ie=="string")for(ye=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ye&&r._bufferIndex<Ie.length;)ne(Ie.charCodeAt(r._bufferIndex));else ne(Ie)}}function ne(ye){u=void 0,g=ye,h=h(ye)}function ke(ye){le(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,Ie){let Me=Ie||{};return Me.type=ye,Me.start=Z(),d.events.push(["enter",Me,d]),s.push(Me),Me}function $(ye){let Ie=s.pop();return Ie.end=Z(),d.events.push(["exit",Ie,d]),Ie}function Ue(ye,Ie){U(ye,Ie.from)}function Xe(ye,Ie){Ie.restore()}function je(ye,Ie){return Me;function Me(tt,ct,Nt){let $t,A,At,Lt;return Array.isArray(tt)?St(tt):"tokenize"in tt?St([tt]):R(tt);function R(dt){return Un;function Un(Xt){let cn=Xt!==null&&dt[Xt],An=Xt!==null&&dt.null,Tr=[...Array.isArray(cn)?cn:cn?[cn]:[],...Array.isArray(An)?An:An?[An]:[]];return St(Tr)(Xt)}}function St(dt){return $t=dt,A=0,dt.length===0?Nt:ln(dt[A])}function ln(dt){return Un;function Un(Xt){return Lt=Te(),At=dt,dt.partial||(d.currentConstruct=dt),dt.name&&d.parser.constructs.disable.null.includes(dt.name)?tr(Xt):dt.tokenize.call(Ie?Object.assign(Object.create(d),Ie):d,p,Sr,tr)(Xt)}}function Sr(dt){return u=!0,ye(At,Lt),ct}function tr(dt){return u=!0,Lt.restore(),++A<$t.length?ln($t[A]):Nt}}}function U(ye,Ie){ye.resolveAll&&!o.includes(ye)&&o.push(ye),ye.resolve&&pt(d.events,Ie,d.events.length-Ie,ye.resolve(d.events.slice(Ie),d)),ye.resolveTo&&(d.events=ye.resolveTo(d.events,d))}function Te(){let ye=Z(),Ie=d.previous,Me=d.currentConstruct,tt=d.events.length,ct=Array.from(s);return{restore:Nt,from:tt};function Nt(){r=ye,d.previous=Ie,d.currentConstruct=Me,d.events.length=tt,s=ct,ze()}}function ze(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Kw(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,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 Xw(e,t){let n=-1,r=[],i;for(;++n<e.length;){let o=e[n],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=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}var yh=M(()=>{"use strict";Be();wn();Br()});var ll={};Ka(ll,{attentionMarkers:()=>rS,contentInitial:()=>Xw,disable:()=>iS,document:()=>Kw,flow:()=>Zw,flowInitial:()=>Qw,insideSpan:()=>nS,string:()=>eS,text:()=>tS});var Kw,Xw,Qw,Zw,eS,tS,nS,rS,iS,bh=M(()=>{"use strict";Ao();sl();Kw={42:kt,43:kt,45:kt,48:kt,49:kt,50:kt,51:kt,52:kt,53:kt,54:kt,55:kt,56:kt,57:kt,62:fo},Xw={91:Js},Qw={[-2]:Vr,[-1]:Vr,32:Vr},Zw={35:Ks,42:Gn,45:[ko,Gn],60:Qs,61:ko,95:Gn,96:yo,126:yo},eS={38:go,92:mo},tS={[-5]:Hr,[-4]:Hr,[-3]:Hr,33:el,38:go,42:zr,60:[qs,Zs],91:tl,92:[Gs,mo],93:Jn,95:zr,96:js},nS={null:[zr,ph]},rS={null:[42,95]},iS={null:[]}});function cl(e){let n=po([ll,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(ih),document:i(sh),flow:i(ch),string:i(dh),text:i(hh)};return r;function i(o){return a;function a(s){return gh(r,o,s)}}}var wh=M(()=>{"use strict";Ls();oh();lh();uh();sl();yh();bh()});function ul(e){for(;!wo(e););return e}var Sh=M(()=>{"use strict";Bs()});function pl(){let e=1,t="",n=!0,r;return i;function i(o,a,s){let u=[],p,h,d,g,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(Th.lastIndex=d,p=Th.exec(o),g=p&&p.index!==void 0?p.index:o.length,y=o.charCodeAt(g),!p){t=o.slice(d);break}if(y===10&&d===g&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<g&&(u.push(o.slice(d,g)),e+=g-d),y){case 0:{u.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,u.push(-2);e++<h;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=g+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}var Th,xh=M(()=>{"use strict";Th=/[\0\t\n\r]/g});var vh=M(()=>{"use strict";wh();Sh();xh()});function Mn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?kh(e.position):"start"in e||"end"in e?kh(e):"line"in e||"column"in e?dl(e):""}function dl(e){return Ah(e&&e.line)+":"+Ah(e&&e.column)}function kh(e){return dl(e&&e.start)+"-"+dl(e&&e.end)}function Ah(e){return e&&typeof e=="number"?e:1}var Eh=M(()=>{"use strict"});var hl=M(()=>{"use strict";Eh()});function fl(e,t,n){return typeof t!="string"&&(n=t,t=void 0),oS(n)(ul(cl(n).document().write(pl()(e,t,!0))))}function oS(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(wi),autolinkProtocol:je,autolinkEmail:je,atxHeading:o(yi),blockQuote:o(Xt),characterEscape:je,characterReference:je,codeFenced:o(cn),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(cn,a),codeText:o(An,a),codeTextData:je,data:je,codeFlowValue:je,definition:o(Tr),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(Ra),hardBreakEscape:o(bi),hardBreakTrailing:o(bi),htmlFlow:o(xr,a),htmlFlowData:je,htmlText:o(xr,a),htmlTextData:je,image:o(_a),label:a,link:o(wi),listItem:o(Oa),listItemValue:g,listOrdered:o(Si,d),listUnordered:o(Si),paragraph:o(Ca),reference:R,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(yi),strong:o(Ia),thematicBreak:o(Ma)},exit:{atxHeading:u(),atxHeadingSequence:Oe,autolink:u(),autolinkEmail:Un,autolinkProtocol:dt,blockQuote:u(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:ln,characterReferenceMarkerNumeric:ln,characterReferenceValue:Sr,characterReference:tr,codeFenced:u(Z),codeFencedFence:ee,codeFencedFenceInfo:y,codeFencedFenceMeta:P,codeFlowValue:U,codeIndented:u(B),codeText:u(Me),codeTextData:U,data:U,definition:u(),definitionDestinationString:ke,definitionLabelString:ue,definitionTitleString:ne,emphasis:u(),hardBreakEscape:u(ze),hardBreakTrailing:u(ze),htmlFlow:u(ye),htmlFlowData:U,htmlText:u(Ie),htmlTextData:U,image:u(ct),label:$t,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()}};Oh(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(q){let re={type:"root",children:[]},Ce={stack:[re],tokenStack:[],config:t,enter:s,exit:p,buffer:a,resume:h,data:n},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=t[q[We][0]];_h.call(Dt,q[We][1].type)&&Dt[q[We][1].type].call(Object.assign({sliceSerialize:q[We][2].sliceSerialize},Ce),q[We][1])}if(Ce.tokenStack.length>0){let Dt=Ce.tokenStack[Ce.tokenStack.length-1];(Dt[1]||Rh).call(Ce,void 0,Dt[0])}for(re.position={start:Nn(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Nn(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<t.transforms.length;)re=t.transforms[We](re)||re;return re}function i(q,re,Ce){let De=re-1,We=-1,Dt=!1,un,Qt,pn,$n;for(;++De<=Ce;){let Tt=q[De];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?We++:We--,$n=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(un&&!$n&&!We&&!pn&&(pn=De),$n=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$n=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(un){let dn=De;for(Qt=void 0;dn--;){let qt=q[dn];if(qt[1].type==="lineEnding"||qt[1].type==="lineEndingBlank"){if(qt[0]==="exit")continue;Qt&&(q[Qt][1].type="lineEndingBlank",Dt=!0),qt[1].type="lineEnding",Qt=dn}else if(!(qt[1].type==="linePrefix"||qt[1].type==="blockQuotePrefix"||qt[1].type==="blockQuotePrefixWhitespace"||qt[1].type==="blockQuoteMarker"||qt[1].type==="listItemIndent"))break}pn&&(!Qt||pn<Qt)&&(un._spread=!0),un.end=Object.assign({},Qt?q[Qt][1].start:Tt[1].end),q.splice(Qt||De,0,["exit",un,Tt[2]]),De++,Ce++}if(Tt[1].type==="listItemPrefix"){let dn={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};un=dn,q.splice(De,0,["enter",dn,Tt[2]]),De++,Ce++,pn=void 0,$n=!0}}}return q[re][1]._spread=Dt,Ce}function o(q,re){return Ce;function Ce(De){s.call(this,q(De),De),re&&re.call(this,De)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(q,re,Ce){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([re,Ce]),q.position={start:Nn(re.start),end:void 0}}function u(q){return re;function re(Ce){q&&q.call(this,Ce),p.call(this,Ce)}}function p(q,re){let Ce=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==q.type&&(re?re.call(this,q,De[0]):(De[1]||Rh).call(this,q,De[0]));else throw new Error("Cannot close `"+q.type+"` ("+Mn({start:q.start,end:q.end})+"): it\u2019s not open");Ce.position.end=Nn(q.end)}function h(){return bn(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function g(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 y(){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(),Ce=this.stack[this.stack.length-1];Ce.label=re,Ce.identifier=vt(this.sliceSerialize(q)).toLowerCase()}function ne(){let q=this.resume(),re=this.stack[this.stack.length-1];re.title=q}function ke(){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 Ce=this.sliceSerialize(q).length;re.depth=Ce}}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 Ce=this.stack[this.stack.length-1].children,De=Ce[Ce.length-1];(!De||De.type!=="text")&&(De=Pa(),De.position={start:Nn(q.start),end:void 0},Ce.push(De)),this.stack.push(De)}function U(q){let re=this.stack.pop();re.value+=this.sliceSerialize(q),re.position.end=Nn(q.end)}function Te(q){let re=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ce=re.children[re.children.length-1];Ce.position.end=Nn(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.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 Ie(){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 ct(){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),Ce=this.stack[this.stack.length-2];Ce.label=Xp(re),Ce.identifier=vt(re).toLowerCase()}function $t(){let q=this.stack[this.stack.length-1],re=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){let De=q.children;Ce.children=De}else Ce.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 R(){this.data.referenceType="collapsed"}function St(q){let re=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=re,Ce.identifier=vt(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function ln(q){this.data.characterReferenceType=q.type}function Sr(q){let re=this.sliceSerialize(q),Ce=this.data.characterReferenceType,De;Ce?(De=uo(re,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=ur(re);let We=this.stack[this.stack.length-1];We.value+=De}function tr(q){let re=this.stack.pop();re.position.end=Nn(q.end)}function dt(q){U.call(this,q);let re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(q)}function Un(q){U.call(this,q);let re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(q)}function Xt(){return{type:"blockquote",children:[]}}function cn(){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 Ra(){return{type:"emphasis",children:[]}}function yi(){return{type:"heading",depth:0,children:[]}}function bi(){return{type:"break"}}function xr(){return{type:"html",value:""}}function _a(){return{type:"image",title:null,url:"",alt:null}}function wi(){return{type:"link",title:null,url:"",children:[]}}function Si(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Oa(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function Ca(){return{type:"paragraph",children:[]}}function Ia(){return{type:"strong",children:[]}}function Pa(){return{type:"text",value:""}}function Ma(){return{type:"thematicBreak"}}}function Nn(e){return{line:e.line,column:e.column,offset:e.offset}}function Oh(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Oh(e,r):aS(e,r)}}function aS(e,t){let n;for(n in t)if(_h.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r);break}}}function Rh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is still open")}var _h,Ch=M(()=>{"use strict";Ur();vh();Es();Qp();sr();co();hl();_h={}.hasOwnProperty});var Ih=M(()=>{"use strict";Ch()});function Oo(e){let t=this;t.parser=n;function n(r){return fl(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var Ph=M(()=>{"use strict";Ih()});var Mh=M(()=>{"use strict";Ph()});function ml(e){if(e)throw e}var Nh=M(()=>{"use strict"});var zh=iy((I0,Bh)=>{"use strict";var Co=Object.prototype.hasOwnProperty,jh=Object.prototype.toString,Lh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,Fh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):jh.call(t)==="[object Array]"},Uh=function(t){if(!t||jh.call(t)!=="[object Object]")return!1;var n=Co.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Co.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i=="undefined"||Co.call(t,i)},$h=function(t,n){Lh&&n.name==="__proto__"?Lh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},qh=function(t,n){if(n==="__proto__")if(Co.call(t,n)){if(Dh)return Dh(t,n).value}else return;return t[n]};Bh.exports=function e(){var t,n,r,i,o,a,s=arguments[0],u=1,p=arguments.length,h=!1;for(typeof s=="boolean"&&(h=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<p;++u)if(t=arguments[u],t!=null)for(n in t)r=qh(s,n),i=qh(t,n),s!==i&&(h&&i&&(Uh(i)||(o=Fh(i)))?(o?(o=!1,a=r&&Fh(r)?r:[]):a=r&&Uh(r)?r:{},$h(s,{name:n,newValue:e(h,a,i)})):typeof i!="undefined"&&$h(s,{name:n,newValue:i}));return s}});function Yr(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Vh=M(()=>{"use strict"});function gl(){let e=[],t={run:n,use:r};return t;function n(...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 h=e[++o],d=-1;if(u){a(u);return}for(;++d<i.length;)(p[d]===null||p[d]===void 0)&&(p[d]=i[d]);i=p,h?Wh(h,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),t}}function Wh(e,t){let n;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 h=p;if(s&&n)throw h;return i(h)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}var Hh=M(()=>{"use strict"});var Yh=M(()=>{"use strict";Hh()});var yt,Jh=M(()=>{"use strict";hl();yt=class extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!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=Mn(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}};yt.prototype.file="";yt.prototype.name="";yt.prototype.reason="";yt.prototype.message="";yt.prototype.stack="";yt.prototype.column=void 0;yt.prototype.line=void 0;yt.prototype.ancestors=void 0;yt.prototype.cause=void 0;yt.prototype.fatal=void 0;yt.prototype.place=void 0;yt.prototype.ruleId=void 0;yt.prototype.source=void 0});var Gh=M(()=>{"use strict";Jh()});var Wt,Kh=M(()=>{"use strict";Wt=zt(require("path"),1)});var yl,Xh=M(()=>{"use strict";yl=zt(require("process"),1)});function Io(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var Qh=M(()=>{"use strict"});var bl,Zh=M(()=>{"use strict";bl=require("url");Qh()});function Sl(e,t){if(e&&e.includes(Wt.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wt.default.sep+"`")}function Tl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ef(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function sS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var wl,Jr,tf=M(()=>{"use strict";Gh();Kh();Xh();Zh();wl=["history","path","basename","stem","extname","dirname"],Jr=class{constructor(t){let n;t?Io(t)?n={path:t}:typeof t=="string"||sS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":yl.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<wl.length;){let o=wl[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)wl.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Wt.default.basename(this.path):void 0}set basename(t){Tl(t,"basename"),Sl(t,"basename"),this.path=Wt.default.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wt.default.dirname(this.path):void 0}set dirname(t){ef(this.basename,"dirname"),this.path=Wt.default.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wt.default.extname(this.path):void 0}set extname(t){if(Sl(t,"extname"),ef(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Wt.default.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Io(t)&&(t=(0,bl.fileURLToPath)(t)),Tl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wt.default.basename(this.path,this.extname):void 0}set stem(t){Tl(t,"stem"),Sl(t,"stem"),this.path=Wt.default.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){let i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){let i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){let i=new yt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var nf=M(()=>{"use strict";tf()});var rf,of=M(()=>{"use strict";rf=(function(e){let r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o})});function xl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function vl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function kl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function af(e){if(!Yr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Po(e){return cS(e)?e:new Jr(e)}function cS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uS(e){return typeof e=="string"||pS(e)}function pS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Mo,lS,Al,El,lf=M(()=>{"use strict";Nh();Mo=zt(zh(),1);Vh();Yh();nf();of();lS={}.hasOwnProperty,Al=class e extends rf{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=gl()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let r=this.attachers[n];t.use(...r)}return t.data((0,Mo.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(kl("data",this.frozen),this.namespace[t]=n,this):lS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(kl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let n=Po(t),r=this.parser||this.Parser;return xl("parse",r),r(String(n),n)}process(t,n){let r=this;return this.freeze(),xl("process",this.parser||this.Parser),vl("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){let s=Po(t),u=r.parse(s);r.run(u,s,function(h,d,g){if(h||!d||!g)return p(h);let y=d,P=r.stringify(y,g);uS(P)?g.value=P:g.result=P,p(h,g)});function p(h,d){h||!d?a(h):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),xl("processSync",this.parser||this.Parser),vl("processSync",this.compiler||this.Compiler),this.process(t,i),sf("processSync","process",n),r;function i(o,a){n=!0,ml(o),r=a}}run(t,n,r){af(t),this.freeze();let i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){let u=Po(n);i.run(t,u,p);function p(h,d,g){let y=d||t;h?s(h):a?a(y):r(void 0,y,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),sf("runSync","run",r),i;function o(a,s){ml(a),i=s,r=!0}}stringify(t,n){this.freeze();let r=Po(n),i=this.compiler||this.Compiler;return vl("stringify",i),af(t),i(t,r)}use(t,...n){let r=this.attachers,i=this.namespace;if(kl("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(p){if(typeof p=="function")u(p,[]);else if(typeof p=="object")if(Array.isArray(p)){let[h,...d]=p;u(h,d)}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 h=-1;if(p!=null)if(Array.isArray(p))for(;++h<p.length;){let d=p[h];o(d)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function u(p,h){let d=-1,g=-1;for(;++d<r.length;)if(r[d][0]===p){g=d;break}if(g===-1)r.push([p,...h]);else if(h.length>0){let[y,...P]=h,ee=r[g][1];Yr(ee)&&Yr(y)&&(y=(0,Mo.default)(!0,ee,y)),r[g]=[p,y,...P]}}}},El=new Al().freeze()});var cf=M(()=>{"use strict";lf()});function pf(e,t){let n=[e,...t],r=Math.max(...n.map(s=>s.length));if(r===0)return"";let i=Array.from({length:r},()=>0);for(let s of n)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 t)a.push(o(s));return a.join(`
18
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}var yh=M(()=>{"use strict";Be();wn();Br()});var ll={};Ka(ll,{attentionMarkers:()=>oS,contentInitial:()=>Zw,disable:()=>aS,document:()=>Qw,flow:()=>tS,flowInitial:()=>eS,insideSpan:()=>iS,string:()=>nS,text:()=>rS});var Qw,Zw,eS,tS,nS,rS,iS,oS,aS,bh=M(()=>{"use strict";Ao();sl();Qw={42:kt,43:kt,45:kt,48:kt,49:kt,50:kt,51:kt,52:kt,53:kt,54:kt,55:kt,56:kt,57:kt,62:fo},Zw={91:Js},eS={[-2]:Hr,[-1]:Hr,32:Hr},tS={35:Ks,42:Gn,45:[ko,Gn],60:Qs,61:ko,95:Gn,96:yo,126:yo},nS={38:go,92:mo},rS={[-5]:Wr,[-4]:Wr,[-3]:Wr,33:el,38:go,42:zr,60:[qs,Zs],91:tl,92:[Gs,mo],93:Jn,95:zr,96:js},iS={null:[zr,ph]},oS={null:[42,95]},aS={null:[]}});function cl(e){let n=po([ll,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(ih),document:i(sh),flow:i(ch),string:i(dh),text:i(hh)};return r;function i(o){return a;function a(s){return gh(r,o,s)}}}var wh=M(()=>{"use strict";Ls();oh();lh();uh();sl();yh();bh()});function ul(e){for(;!wo(e););return e}var Sh=M(()=>{"use strict";Bs()});function pl(){let e=1,t="",n=!0,r;return i;function i(o,a,s){let u=[],p,d,h,g,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(Th.lastIndex=h,p=Th.exec(o),g=p&&p.index!==void 0?p.index:o.length,y=o.charCodeAt(g),!p){t=o.slice(h);break}if(y===10&&h===g&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<g&&(u.push(o.slice(h,g)),e+=g-h),y){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=g+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}var Th,xh=M(()=>{"use strict";Th=/[\0\t\n\r]/g});var vh=M(()=>{"use strict";wh();Sh();xh()});function Mn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?kh(e.position):"start"in e||"end"in e?kh(e):"line"in e||"column"in e?dl(e):""}function dl(e){return Ah(e&&e.line)+":"+Ah(e&&e.column)}function kh(e){return dl(e&&e.start)+"-"+dl(e&&e.end)}function Ah(e){return e&&typeof e=="number"?e:1}var Eh=M(()=>{"use strict"});var hl=M(()=>{"use strict";Eh()});function fl(e,t,n){return typeof t!="string"&&(n=t,t=void 0),sS(n)(ul(cl(n).document().write(pl()(e,t,!0))))}function sS(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(wi),autolinkProtocol:je,autolinkEmail:je,atxHeading:o(yi),blockQuote:o(Xt),characterEscape:je,characterReference:je,codeFenced:o(cn),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(cn,a),codeText:o(An,a),codeTextData:je,data:je,codeFlowValue:je,definition:o(Tr),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(Ra),hardBreakEscape:o(bi),hardBreakTrailing:o(bi),htmlFlow:o(xr,a),htmlFlowData:je,htmlText:o(xr,a),htmlTextData:je,image:o(_a),label:a,link:o(wi),listItem:o(Oa),listItemValue:g,listOrdered:o(Si,h),listUnordered:o(Si),paragraph:o(Ca),reference:R,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(yi),strong:o(Ia),thematicBreak:o(Ma)},exit:{atxHeading:u(),atxHeadingSequence:Oe,autolink:u(),autolinkEmail:Un,autolinkProtocol:dt,blockQuote:u(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:ln,characterReferenceMarkerNumeric:ln,characterReferenceValue:Sr,characterReference:tr,codeFenced:u(Z),codeFencedFence:ee,codeFencedFenceInfo:y,codeFencedFenceMeta:P,codeFlowValue:U,codeIndented:u(B),codeText:u(Me),codeTextData:U,data:U,definition:u(),definitionDestinationString:ke,definitionLabelString:ue,definitionTitleString:ne,emphasis:u(),hardBreakEscape:u(ze),hardBreakTrailing:u(ze),htmlFlow:u(ye),htmlFlowData:U,htmlText:u(Ie),htmlTextData:U,image:u(ct),label:$t,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()}};Oh(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(q){let re={type:"root",children:[]},Ce={stack:[re],tokenStack:[],config:t,enter:s,exit:p,buffer:a,resume:d,data:n},De=[],Ve=-1;for(;++Ve<q.length;)if(q[Ve][1].type==="listOrdered"||q[Ve][1].type==="listUnordered")if(q[Ve][0]==="enter")De.push(Ve);else{let Dt=De.pop();Ve=i(q,Dt,Ve)}for(Ve=-1;++Ve<q.length;){let Dt=t[q[Ve][0]];_h.call(Dt,q[Ve][1].type)&&Dt[q[Ve][1].type].call(Object.assign({sliceSerialize:q[Ve][2].sliceSerialize},Ce),q[Ve][1])}if(Ce.tokenStack.length>0){let Dt=Ce.tokenStack[Ce.tokenStack.length-1];(Dt[1]||Rh).call(Ce,void 0,Dt[0])}for(re.position={start:Nn(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Nn(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<t.transforms.length;)re=t.transforms[Ve](re)||re;return re}function i(q,re,Ce){let De=re-1,Ve=-1,Dt=!1,un,Qt,pn,$n;for(;++De<=Ce;){let Tt=q[De];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?Ve++:Ve--,$n=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(un&&!$n&&!Ve&&!pn&&(pn=De),$n=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$n=void 0}if(!Ve&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||Ve===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(un){let dn=De;for(Qt=void 0;dn--;){let qt=q[dn];if(qt[1].type==="lineEnding"||qt[1].type==="lineEndingBlank"){if(qt[0]==="exit")continue;Qt&&(q[Qt][1].type="lineEndingBlank",Dt=!0),qt[1].type="lineEnding",Qt=dn}else if(!(qt[1].type==="linePrefix"||qt[1].type==="blockQuotePrefix"||qt[1].type==="blockQuotePrefixWhitespace"||qt[1].type==="blockQuoteMarker"||qt[1].type==="listItemIndent"))break}pn&&(!Qt||pn<Qt)&&(un._spread=!0),un.end=Object.assign({},Qt?q[Qt][1].start:Tt[1].end),q.splice(Qt||De,0,["exit",un,Tt[2]]),De++,Ce++}if(Tt[1].type==="listItemPrefix"){let dn={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};un=dn,q.splice(De,0,["enter",dn,Tt[2]]),De++,Ce++,pn=void 0,$n=!0}}}return q[re][1]._spread=Dt,Ce}function o(q,re){return Ce;function Ce(De){s.call(this,q(De),De),re&&re.call(this,De)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(q,re,Ce){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([re,Ce]),q.position={start:Nn(re.start),end:void 0}}function u(q){return re;function re(Ce){q&&q.call(this,Ce),p.call(this,Ce)}}function p(q,re){let Ce=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==q.type&&(re?re.call(this,q,De[0]):(De[1]||Rh).call(this,q,De[0]));else throw new Error("Cannot close `"+q.type+"` ("+Mn({start:q.start,end:q.end})+"): it\u2019s not open");Ce.position.end=Nn(q.end)}function d(){return bn(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function g(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 y(){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(),Ce=this.stack[this.stack.length-1];Ce.label=re,Ce.identifier=vt(this.sliceSerialize(q)).toLowerCase()}function ne(){let q=this.resume(),re=this.stack[this.stack.length-1];re.title=q}function ke(){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 Ce=this.sliceSerialize(q).length;re.depth=Ce}}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 Ce=this.stack[this.stack.length-1].children,De=Ce[Ce.length-1];(!De||De.type!=="text")&&(De=Pa(),De.position={start:Nn(q.start),end:void 0},Ce.push(De)),this.stack.push(De)}function U(q){let re=this.stack.pop();re.value+=this.sliceSerialize(q),re.position.end=Nn(q.end)}function Te(q){let re=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ce=re.children[re.children.length-1];Ce.position.end=Nn(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.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 Ie(){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 ct(){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),Ce=this.stack[this.stack.length-2];Ce.label=Xp(re),Ce.identifier=vt(re).toLowerCase()}function $t(){let q=this.stack[this.stack.length-1],re=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){let De=q.children;Ce.children=De}else Ce.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 R(){this.data.referenceType="collapsed"}function St(q){let re=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=re,Ce.identifier=vt(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function ln(q){this.data.characterReferenceType=q.type}function Sr(q){let re=this.sliceSerialize(q),Ce=this.data.characterReferenceType,De;Ce?(De=uo(re,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=ur(re);let Ve=this.stack[this.stack.length-1];Ve.value+=De}function tr(q){let re=this.stack.pop();re.position.end=Nn(q.end)}function dt(q){U.call(this,q);let re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(q)}function Un(q){U.call(this,q);let re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(q)}function Xt(){return{type:"blockquote",children:[]}}function cn(){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 Ra(){return{type:"emphasis",children:[]}}function yi(){return{type:"heading",depth:0,children:[]}}function bi(){return{type:"break"}}function xr(){return{type:"html",value:""}}function _a(){return{type:"image",title:null,url:"",alt:null}}function wi(){return{type:"link",title:null,url:"",children:[]}}function Si(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Oa(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function Ca(){return{type:"paragraph",children:[]}}function Ia(){return{type:"strong",children:[]}}function Pa(){return{type:"text",value:""}}function Ma(){return{type:"thematicBreak"}}}function Nn(e){return{line:e.line,column:e.column,offset:e.offset}}function Oh(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Oh(e,r):lS(e,r)}}function lS(e,t){let n;for(n in t)if(_h.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r);break}}}function Rh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is still open")}var _h,Ch=M(()=>{"use strict";Ur();vh();Es();Qp();sr();co();hl();_h={}.hasOwnProperty});var Ih=M(()=>{"use strict";Ch()});function Oo(e){let t=this;t.parser=n;function n(r){return fl(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var Ph=M(()=>{"use strict";Ih()});var Mh=M(()=>{"use strict";Ph()});function ml(e){if(e)throw e}var Nh=M(()=>{"use strict"});var zh=ay((P0,Bh)=>{"use strict";var Co=Object.prototype.hasOwnProperty,jh=Object.prototype.toString,Lh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,Fh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):jh.call(t)==="[object Array]"},Uh=function(t){if(!t||jh.call(t)!=="[object Object]")return!1;var n=Co.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Co.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i=="undefined"||Co.call(t,i)},$h=function(t,n){Lh&&n.name==="__proto__"?Lh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},qh=function(t,n){if(n==="__proto__")if(Co.call(t,n)){if(Dh)return Dh(t,n).value}else return;return t[n]};Bh.exports=function e(){var t,n,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(t=arguments[u],t!=null)for(n in t)r=qh(s,n),i=qh(t,n),s!==i&&(d&&i&&(Uh(i)||(o=Fh(i)))?(o?(o=!1,a=r&&Fh(r)?r:[]):a=r&&Uh(r)?r:{},$h(s,{name:n,newValue:e(d,a,i)})):typeof i!="undefined"&&$h(s,{name:n,newValue:i}));return s}});function Yr(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Hh=M(()=>{"use strict"});function gl(){let e=[],t={run:n,use:r};return t;function n(...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?Vh(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),t}}function Vh(e,t){let n;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&&n)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){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}var Wh=M(()=>{"use strict"});var Yh=M(()=>{"use strict";Wh()});var yt,Jh=M(()=>{"use strict";hl();yt=class extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!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=Mn(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}};yt.prototype.file="";yt.prototype.name="";yt.prototype.reason="";yt.prototype.message="";yt.prototype.stack="";yt.prototype.column=void 0;yt.prototype.line=void 0;yt.prototype.ancestors=void 0;yt.prototype.cause=void 0;yt.prototype.fatal=void 0;yt.prototype.place=void 0;yt.prototype.ruleId=void 0;yt.prototype.source=void 0});var Gh=M(()=>{"use strict";Jh()});var Vt,Kh=M(()=>{"use strict";Vt=zt(require("path"),1)});var yl,Xh=M(()=>{"use strict";yl=zt(require("process"),1)});function Io(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var Qh=M(()=>{"use strict"});var bl,Zh=M(()=>{"use strict";bl=require("url");Qh()});function Sl(e,t){if(e&&e.includes(Vt.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vt.default.sep+"`")}function Tl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ef(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var wl,Jr,tf=M(()=>{"use strict";Gh();Kh();Xh();Zh();wl=["history","path","basename","stem","extname","dirname"],Jr=class{constructor(t){let n;t?Io(t)?n={path:t}:typeof t=="string"||cS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":yl.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<wl.length;){let o=wl[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)wl.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Vt.default.basename(this.path):void 0}set basename(t){Tl(t,"basename"),Sl(t,"basename"),this.path=Vt.default.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vt.default.dirname(this.path):void 0}set dirname(t){ef(this.basename,"dirname"),this.path=Vt.default.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vt.default.extname(this.path):void 0}set extname(t){if(Sl(t,"extname"),ef(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vt.default.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Io(t)&&(t=(0,bl.fileURLToPath)(t)),Tl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vt.default.basename(this.path,this.extname):void 0}set stem(t){Tl(t,"stem"),Sl(t,"stem"),this.path=Vt.default.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){let i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){let i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){let i=new yt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var nf=M(()=>{"use strict";tf()});var rf,of=M(()=>{"use strict";rf=(function(e){let r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o})});function xl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function vl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function kl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function af(e){if(!Yr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Po(e){return pS(e)?e:new Jr(e)}function pS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function dS(e){return typeof e=="string"||hS(e)}function hS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Mo,uS,Al,El,lf=M(()=>{"use strict";Nh();Mo=zt(zh(),1);Hh();Yh();nf();of();uS={}.hasOwnProperty,Al=class e extends rf{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=gl()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let r=this.attachers[n];t.use(...r)}return t.data((0,Mo.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(kl("data",this.frozen),this.namespace[t]=n,this):uS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(kl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let n=Po(t),r=this.parser||this.Parser;return xl("parse",r),r(String(n),n)}process(t,n){let r=this;return this.freeze(),xl("process",this.parser||this.Parser),vl("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){let s=Po(t),u=r.parse(s);r.run(u,s,function(d,h,g){if(d||!h||!g)return p(d);let y=h,P=r.stringify(y,g);dS(P)?g.value=P:g.result=P,p(d,g)});function p(d,h){d||!h?a(d):o?o(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),xl("processSync",this.parser||this.Parser),vl("processSync",this.compiler||this.Compiler),this.process(t,i),sf("processSync","process",n),r;function i(o,a){n=!0,ml(o),r=a}}run(t,n,r){af(t),this.freeze();let i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){let u=Po(n);i.run(t,u,p);function p(d,h,g){let y=h||t;d?s(d):a?a(y):r(void 0,y,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),sf("runSync","run",r),i;function o(a,s){ml(a),i=s,r=!0}}stringify(t,n){this.freeze();let r=Po(n),i=this.compiler||this.Compiler;return vl("stringify",i),af(t),i(t,r)}use(t,...n){let r=this.attachers,i=this.namespace;if(kl("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");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,g=-1;for(;++h<r.length;)if(r[h][0]===p){g=h;break}if(g===-1)r.push([p,...d]);else if(d.length>0){let[y,...P]=d,ee=r[g][1];Yr(ee)&&Yr(y)&&(y=(0,Mo.default)(!0,ee,y)),r[g]=[p,y,...P]}}}},El=new Al().freeze()});var cf=M(()=>{"use strict";lf()});function pf(e,t){let n=[e,...t],r=Math.max(...n.map(s=>s.length));if(r===0)return"";let i=Array.from({length:r},()=>0);for(let s of n)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 t)a.push(o(s));return a.join(`
19
19
  `)}function _l(e){return El().use(Oo).use(_o).parse(e)}function Gr(e){return bn(e)}function Tn(e){return{type:"text",value:e}}function xn(e){return{type:"paragraph",children:e}}function vn(e){return{type:"root",children:e}}function Ol(e={}){var t;return{type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.imageUrl,children:(t=e.children)!=null?t:[]}}function Rl(e,t={}){return{type:"text",content:e,style:t.style}}function No(e){return{type:"image",url:e.url,alt:e.alt}}function Lo(){return{type:"divider"}}function Do(e){return{type:"section",children:e}}function Fo(e){return{type:"actions",children:e}}function Uo(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 $o(e){return{type:"link-button",id:e.id,url:e.url,label:e.label,style:e.style}}function qo(e){return{type:"field",label:e.label,value:e.value}}function jo(e){return{type:"fields",children:e}}function Bo(e){return{type:"table",headers:e.headers,rows:e.rows,align:e.align}}function zo(e){return{type:"link",url:e.url,label:e.label}}function Kr(e){let t=[];e.title&&t.push(`**${e.title}**`),e.subtitle&&t.push(e.subtitle);for(let n of e.children){let r=Cl(n);r&&t.push(r)}return t.join(`
20
20
  `)}function Cl(e){switch(e.type){case"text":return e.content;case"link":return`${e.label} (${e.url})`;case"fields":return e.children.map(t=>`${t.label}: ${t.value}`).join(`
21
21
  `);case"actions":return null;case"table":return pf(e.headers,e.rows);case"section":return e.children.map(t=>Cl(t)).filter(Boolean).join(`
22
- `);default:return null}}function hf(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="modal"}function hS(e){let t=e.filter(n=>typeof n=="object"&&n!==null&&"type"in n&&dS.includes(n.type));return t.length<e.length&&console.warn("[chat] Modal contains unsupported child elements that were ignored"),t}function Vo(e){var t;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:(t=e.children)!=null?t:[]}}function Wo(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 Ho(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 Yo(e){return{type:"external_select",id:e.id,initialOption:e.initialOption,label:e.label,placeholder:e.placeholder,minQueryLength:e.minQueryLength,optional:e.optional}}function Jo(e){return{label:e.label,value:e.value,description:e.description}}function Go(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 Ko(e){return typeof e=="object"&&e!==null&&e.$$typeof===Il}function Pl(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(Pl);if(Ko(e)){let t=Nl(e);return t?[t]:[]}return typeof e=="object"&&"type"in e?[e]:typeof e=="string"||typeof e=="number"?[String(e)]:[]}function fS(e){return!("id"in e||"url"in e||"label"in e)}function mS(e){return"id"in e&&typeof e.id=="string"&&!("url"in e)}function gS(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)}function Ml(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)&&!("alt"in e)&&!("style"in e)}function yS(e){return"url"in e&&typeof e.url=="string"}function bS(e){return"label"in e&&"value"in e&&typeof e.label=="string"&&typeof e.value=="string"}function wS(e){return!("id"in e||"url"in e||"callbackId"in e)&&("title"in e||"subtitle"in e||"imageUrl"in e)}function SS(e){return"callbackId"in e&&"title"in e}function TS(e){return"id"in e&&"label"in e&&!("options"in e)&&!("value"in e)}function uf(e){return"id"in e&&"label"in e&&!("value"in e)}function xS(e){return"id"in e&&"label"in e&&!("value"in e)&&!("children"in e)}function vS(e){return"label"in e&&"value"in e&&!("id"in e)}function Nl(e){var a,s,u,p;let{type:t,props:n,children:r}=e,i=Pl(r);if(t===Rl){let h=fS(n)?n:{style:void 0},d=i.length>0?i.map(String).join(""):String((a=h.children)!=null?a:"");return Rl(d,{style:h.style})}if(t===Do)return Do(i);if(t===Fo)return Fo(i);if(t===jo)return jo(i);if(t===Uo){if(!mS(n))throw new Error("Button requires an 'id' prop");let h=i.length>0?i.map(String).join(""):(s=n.label)!=null?s:"";return Uo({id:n.id,label:h,style:n.style,value:n.value,actionType:n.actionType,callbackUrl:n.callbackUrl,disabled:n.disabled})}if(t===$o){if(!gS(n))throw new Error("LinkButton requires a 'url' prop");let h=i.length>0?i.map(String).join(""):(u=n.label)!=null?u:"";return $o({id:n.id,url:n.url,label:h,style:n.style})}if(t===zo){if(!Ml(n))throw new Error("CardLink requires a 'url' prop");let h=i.length>0?i.map(String).join(""):(p=n.label)!=null?p:"";return zo({url:n.url,label:h})}if(t===No){if(!yS(n))throw new Error("Image requires a 'url' prop");return No({url:n.url,alt:n.alt})}if(t===qo){if(!bS(n))throw new Error("Field requires 'label' and 'value' props");return qo({label:n.label,value:n.value})}if(t===Lo)return Lo();if(t===Vo){if(!SS(n))throw new Error("Modal requires 'callbackId' and 'title' props");return Vo({callbackId:n.callbackId,callbackUrl:n.callbackUrl,title:n.title,submitLabel:n.submitLabel,closeLabel:n.closeLabel,notifyOnClose:n.notifyOnClose,privateMetadata:n.privateMetadata,children:hS(i)})}if(t===Wo){if(!TS(n))throw new Error("TextInput requires 'id' and 'label' props");return Wo({id:n.id,label:n.label,placeholder:n.placeholder,initialValue:n.initialValue,multiline:n.multiline,optional:n.optional,maxLength:n.maxLength})}if(t===Ho){if(!uf(n))throw new Error("Select requires 'id' and 'label' props");return Ho({id:n.id,label:n.label,placeholder:n.placeholder,initialOption:n.initialOption,optional:n.optional,options:i})}if(t===Yo){if(!xS(n))throw new Error("ExternalSelect requires 'id' and 'label' props");return Yo({id:n.id,initialOption:n.initialOption,label:n.label,placeholder:n.placeholder,minQueryLength:n.minQueryLength,optional:n.optional})}if(t===Go){if(!uf(n))throw new Error("RadioSelect requires 'id' and 'label' props");return Go({id:n.id,label:n.label,initialOption:n.initialOption,optional:n.optional,options:i})}if(t===Jo){if(!vS(n))throw new Error("SelectOption requires 'label' and 'value' props");return Jo({label:n.label,value:n.value,description:n.description})}if(t===Bo){let h=n;return Bo({headers:h.headers,rows:h.rows})}let o=wS(n)?n:{};return Ol({title:o.title,subtitle:o.subtitle,imageUrl:o.imageUrl,children:i})}function Ll(e,t,n){let{children:r,...i}=t;return{$$typeof:Il,type:e,props:i,children:r!=null?[r]:[]}}function ff(e,t,n){let{children:r,...i}=t,o;return Array.isArray(r)?o=r:r!=null?o=[r]:o=[],{$$typeof:Il,type:e,props:i,children:o}}function gf(e){return Pl(e.children)}function Ht(e){if(Ko(e)){let t=Nl(e);if(t&&typeof t=="object"&&"type"in t&&t.type==="card")return t}return typeof e=="object"&&e!==null&&"type"in e&&e.type==="card"?e:null}function Dl(e){if(Ko(e)){let t=Nl(e);if(t&&typeof t=="object"&&"type"in t&&t.type==="modal")return t}return hf(e)?e:null}function Yt(e){if(Ko(e))return!0;if(typeof e=="object"&&e!==null&&"$$typeof"in e&&typeof e.$$typeof=="symbol"){let t=e.$$typeof.toString();return t.includes("react.element")||t.includes("react.transitional.element")}return!1}var df,dS,Il,mf,Fl=M(()=>{"use strict";Ur();rh();Mh();cf();df=Rl;dS=["text_input","select","external_select","radio_select","text","fields"];Il=Symbol.for("chat.jsx.element");mf=Ll});var Qf={};Ka(Qf,{Fragment:()=>gf,isCardLinkProps:()=>Ml,isJSX:()=>Yt,jsx:()=>Ll,jsxDEV:()=>mf,jsxs:()=>ff,toCardElement:()=>Ht,toModalElement:()=>Dl});var Zf=M(()=>{"use strict";Fl()});var tk={};Ka(tk,{Actions:()=>Qr,AgentDeliveryError:()=>Jt,AgentError:()=>kn,Button:()=>Zr,Card:()=>ei,CardLink:()=>ti,CardText:()=>ni,Client:()=>gr,CronExpression:()=>Xa,Divider:()=>ri,Image:()=>ii,NOVU_OPTIONS:()=>Fn,NovuClient:()=>Kt,NovuController:()=>Pt,NovuHandler:()=>Gt,NovuModule:()=>gi,NovuRequestHandler:()=>br,REGISTER_API_PATH:()=>ac,REGISTER_CONTROLLER_DECORATORS:()=>sc,Select:()=>oi,SelectOption:()=>ai,SeverityLevelEnum:()=>va,TextInput:()=>si,agent:()=>ic,frameworkName:()=>xg,isFromWorkflow:()=>Yl,providerSchemas:()=>wa,registerApiPath:()=>Ea,registerControllerDecorators:()=>cc,step:()=>wg,toAgentError:()=>pi,workflow:()=>bg});module.exports=oy(tk);var vm=require("jsonrepair");var Cr=(i=>(i.TRIGGER="trigger",i.EXECUTE="execute",i.PREVIEW="preview",i.AGENT_EVENT="agent-event",i))(Cr||{}),Oi=(r=>(r.DISCOVER="discover",r.HEALTH_CHECK="health-check",r.CODE="code",r))(Oi||{});var Xa=(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))(Xa||{});var Vt=(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))(Vt||{});var Ci=(r=>(r.POST="POST",r.GET="GET",r.OPTIONS="OPTIONS",r))(Ci||{});var ay=e=>{var n,r;if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(r=(n=t==null?void 0:t.constructor)==null?void 0:n.name.endsWith("Error"))!=null?r:!1},gn=class extends Error{},Ii=class extends gn{constructor(){super(...arguments);this.statusCode=404}},_t=class extends gn{constructor(){super(...arguments);this.statusCode=400}},Rn=class extends gn{constructor(){super(...arguments);this.statusCode=401}},_n=class extends gn{constructor(t,{cause:n}={}){var r;ay(n)?(super(`${t}: ${n.message}`),this.data={stack:(r=n.stack)!=null?r:t}):(super(`${t}${n?`: ${JSON.stringify(n,null,2)}`:""}`),this.data={stack:t})}},Pi=class extends gn{constructor(){super(...arguments);this.statusCode=409}};var ir=class extends _n{constructor(n){super("Unknown BridgeError",{cause:n});this.statusCode=500;this.code="BridgeError"}};var Mi=class extends _t{constructor(n,r){super(`Workflow with id: \`${n}\` has a corrupt state. Step with id: \`${r}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:n,stepId:r}}},Pr=class extends _t{constructor(n,r){super(`Workflow with id: \`${n}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=r}},Ni=class extends _t{constructor(n,r){super(`Workflow with id: \`${n}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=r}},Li=class extends _t{constructor(n,r,i){super(`Workflow with id: \`${n}\` has an invalid state. Step with id: \`${r}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=i}},Di=class extends _t{constructor(n,r,i){super(`Workflow with id: \`${n}\` has an invalid state. Step with id: \`${r}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=i}},Fi=class extends _t{constructor(n,r,i){super(`Workflow with id: \`${n}\` has an invalid state. Step with id: \`${r}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=i}},Ui=class extends _t{constructor(n,r,i){super(`Workflow with id: \`${n}\` has invalid controls syntax in step with id: \`${r}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=i}},$i=class extends _t{constructor(n,r,i,o){super(`Workflow with id: \`${n}\` 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}},qi=class extends _t{constructor(n,r){super(`Workflow with id: \`${n}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=r}};var qn=e=>Object.values(Vt).includes(e==null?void 0:e.code),uu=e=>!qn(e)&&typeof e.statusCode=="number"&&e.statusCode>=400&&e.statusCode<500;var Qa=e=>Object.values(e).map(t=>`\`${t}\``).join(", "),ji=e=>e.replaceAll(/(\w)(\w*)/g,(t,n,r)=>n.toUpperCase()+r.toLowerCase()).replaceAll(/[\s-]+/g,"");var Bi=class extends gn{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${Qa(Ci)}`}},jn=class extends _t{constructor(n,r){super(`Invalid query string: \`action\`=\`${n}\`. Please use one of ${Qa(r)}`);this.code="InvalidActionError"}},zi=class extends _t{constructor(){super("Missing secret key. Set the `NOVU_SECRET_KEY` environment variable or pass `secretKey` to the client options.");this.code="MissingSecretKeyError"}};var Vi=class extends Error{constructor(t,n,r){super(),this.data={message:r},this.statusCode=t,this.code=n}};var Mr=class extends Pi{constructor(t,n){super(`${ji(t)} with id: \`${n}\` already exists. Please use a different id.`)}},On=class extends Ii{constructor(t,n){super(`${ji(t)} with id: \`${n}\` does not exist. Please provide a valid id.`)}},or=class extends _n{constructor(n,r,i,o){super(`Failed to ${i} ${ji(n)} with id: \`${r}\``,{cause:o});this.statusCode=502}};var Wi=class extends On{constructor(n){super("provider",n);this.code="ProviderNotFoundError"}},Hi=class extends or{constructor(n,r,i){super("provider",n,r,i);this.code="ProviderExecutionFailedError"}};var Yi=class extends Rn{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"}},Ji=class extends Rn{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},Gi=class extends Rn{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},Ki=class extends Rn{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},Xi=class extends Rn{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(n){super("step",n);this.code="StepNotFoundError"}},Zi=class extends Mr{constructor(n){super("step",n);this.code="StepAlreadyExistsError"}},Nr=class extends or{constructor(n,r,i){super("step",n,r,i);this.code="StepExecutionFailedError"}};var Lr=class extends On{constructor(n){super("workflow",n);this.code="WorkflowNotFoundError"}};var eo=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(l,c)=>function(){return l&&(c=(0,l[n(l)[0]])(l=0)),c},o=(l,c)=>function(){return c||(0,l[n(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 n(c))!r.call(l,T)&&T!==f&&e(l,T,{get:()=>c[T],enumerable:!(S=t(c,T))||S.enumerable});return l},u=l=>s(e({},"__esModule",{value:!0}),l),p={};a(p,{JSONSchemaFaker:()=>au,default:()=>su,setDependencies:()=>Tc});function h(l,c){return typeof l=="string"?typeof c!="undefined"?Ar.register(l,c):Ar.get(l):Ar.registerMany(l)}function d(l,c){return l=typeof l=="undefined"?nn.MIN_INTEGER:l,c=typeof c=="undefined"?nn.MAX_INTEGER:c,Math.floor(Re("random")()*(c-l+1))+l}function g(l){return xi.default.prototype.max=Re("defaultRandExpMax"),xi.default.prototype.randInt=(f,S)=>f+Math.floor(Re("random")()*(1+(S-f))),new xi.default(l).gen()}function y(l){return l[Math.floor(Re("random")()*l.length)]}function P(l){let c,f,S=l.length,T=l.slice();for(;S>0;)f=Math.floor(Re("random")()*S),S-=1,c=T[S],T[S]=T[f],T[f]=c;return T}function ee(l,c){return Re("random")()*(c-l)+l}function Z(l,c,f,S,T=!1){return f=typeof f=="undefined"?nn.MIN_NUMBER:f,S=typeof S=="undefined"?nn.MAX_NUMBER:S,l=typeof l=="undefined"?f:l,c=typeof c=="undefined"?S:c,c<l&&(c+=l),T?ee(l,c):d(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=Re("minDateTime"),f=Re("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 k=S.shift();if(!T[k])throw new Error(`Prop not found: ${k} (${c})`);T=T[k]}return T}function ke(l){return typeof l=="string"&&Ic.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,k]=c.split("-"),[v,L,Q]=f.substr(0,8).split(":");return T=`0${Math.max(1,Math.min(12,T))}`.slice(-2),k=`0${Math.max(1,Math.min(31,k))}`.slice(-2),v=`0${Math.max(1,Math.min(23,v))}`.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}-${k}T${v}:${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 k=Math.max(S.minimum||0,0),v=Math.min(S.maximum||1/0,1/0);c.exclusiveMinimum&&k===c.minimum&&(k+=c.multipleOf||1),c.exclusiveMaximum&&v===c.maximum&&(v-=c.multipleOf||1),(k||v!==1/0)&&(c.enum=c.enum.filter(L=>L>=k&&L<=v))}break;case"string":{S.minLength=Re("minLength")||0,S.maxLength=Re("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=ke(T)?parseFloat(T):T;break;case"integer":T=ke(T)?parseInt(T,10):T;break;case"boolean":T=!!T;break;case"string":{if(Oe(T))return T;T=String(T);let k=Math.max(S.minLength||0,0),v=Math.min(S.maxLength||1/0,1/0),L,Q=0;for(;T.length<k;)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>v&&(T=T.substr(0,v)),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 Ie(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(nn.SCALAR_TYPES.filter(S=>(Array.isArray(l.type)?l.type:[l.type]).every(k=>S==="number"||S==="integer"?k!=="number"&&k!=="integer":S!==k)));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 ct(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 $t(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 R(l,c){c=c.items||c;let f=Re("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]))R(S,c)&&delete l[S];else{let T=c;c&&c.properties&&c.properties[S]&&(T=c.properties[S]);let k=St(l[S],T);Lt(k)||(l[S]=k)}typeof l[S]=="undefined"&&delete l[S]}),!(!Object.keys(l).length&&f))return l}function ln(l){return(c,f,S,T)=>{let k=c,v=[];typeof c=="object"&&(k=Object.keys(c)[0],Array.isArray(c[k])?v=c[k]:v.push(c[k]));let L=k.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,v.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}: ${k}', given: ${c}`)}),c}}function Sr(l,c){if(typeof l=="undefined")return nr.list();if(typeof l=="string")if(typeof c=="function")nr.register(l,c);else if(c===null||c===!1)nr.unregister(l);else return nr.get(l);else nr.registerMany(l)}function tr(l,c,f){return Object.keys(l).filter(S=>{let T=Lc.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],k=c[c.length-1];if(tr(l,k,Er[T]))return T}}function Un(){return Re("random")()>.5}function Xt(){return null}function cn(l,c,f,S,T,k){let v=[],L=[];function Q(ie){let j=JSON.stringify(ie.value);return L.indexOf(j)===-1?(L.push(j),v.push(ie),!0):!1}c.forEach(Q);let N=100;for(;v.length!==c.length&&(Q(k(f.items||S,l,T))||(N-=1),!!N););return v}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 vi(`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 k=l.minItems,v=l.maxItems,L=Re("minItems"),Q=Re("maxItems");L&&(k=typeof k=="undefined"?L:Math.min(L,k)),Q&&(v=typeof v=="undefined"?Q:Math.min(Q,v),v&&v>Q&&(v=Q),k&&k>Q&&(k=v));let N=Re("alwaysFakeOptionals")===!0?1:Re("optionalsProbability"),ie=Re("alwaysFakeOptionals")||Re("fixedProbabilities")||!1,j=Ae.number(k,v,1,5);N!==null&&(j=Math.max(ie?Math.round((v||j)*N):Math.abs(Ae.number(k,v)*N),k||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=Ae.number(0,j-1);T[ce]=S(l.contains,c.concat(["items",ce]),f)}return l.uniqueItems?cn(c.concat(["items"]),T,l,he,f,S):T}function Tr(l){let c=typeof l.minimum=="undefined"||l.minimum===-Number.MAX_VALUE?nn.MIN_INTEGER:l.minimum,f=typeof l.maximum=="undefined"||l.maximum===Number.MAX_VALUE?nn.MAX_INTEGER:l.maximum,S=l.multipleOf,T=S&&String(S).match(/e-(\d)|\.(\d+)$/);if(T){let k=(Math.random()*Ae.number(0,10)+1)*S,v=T[1]||T[2].length,L=parseFloat(k.toFixed(v)),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 k=Ae.number(Math.floor(c/S),Math.floor(f/S))*S;for(;k<c;)k+=S;return k}return Ae.number(c,f,void 0,void 0,l.type!=="integer")}function Ra(l){return Math.floor(Wa({...l}))}function yi(l){return Ae.shuffle(Wc).slice(0,l)}function bi(l,c,f,S){let T={},k=l.properties||{},v=l.patternProperties||{},L=typeof l.required=="boolean"?[]:(l.required||[]).slice(),Q=l.additionalProperties!==!1,N=Object.keys(k),ie=Object.keys(v),j=N.concat(ie).reduce((se,E)=>(L.indexOf(E)===-1&&se.push(E),se),[]),he=L.concat(j),ce=Q&&l.additionalProperties===!0?Ai:l.additionalProperties;if(!Q&&N.length===0&&ie.length===0&&Ye.hasProperties(l,"minProperties","maxProperties","dependencies","required"))return null;if(Re("requiredOnly")===!0)return L.forEach(se=>{k[se]&&(T[se]=k[se])}),S(T,c.concat(["properties"]),f,l);let $e=Re("alwaysFakeOptionals")===!0?1:Re("optionalsProbability"),xe=Re("alwaysFakeOptionals")||Re("fixedProbabilities")||!1,_e=Re("ignoreProperties")||[],Ge=Re("reuseProperties"),Qe=Re("fillProperties"),ae=l.maxProperties||he.length+(Q?Ae.number(1,5):0),C=Math.max(l.minProperties||0,L.length),I=Math.max(0,he.length-C);he.length===1&&!L.length&&(C=Math.max(Ae.number(Qe?1:0,ae),C)),$e!==null&&(xe===!0?I=Math.round(C-L.length+$e*(he.length-C)):I=Ae.number(C-L.length,$e*(he.length-C)));let V=Ae.shuffle(j).slice(0,I),H=j.filter(se=>V.indexOf(se)!==-1),K=$e!==null||L.length===ae?ae:Ae.number(0,ae),z=L.concat(Ae.shuffle(H).slice(0,K)).slice(0,ae),Y=[],G=[];if(l.dependencies&&(Object.keys(l.dependencies).forEach(se=>{let E=l.dependencies[se];if(z.indexOf(se)!==-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:se,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(se=>{if(k[se]&&["{}","true"].includes(JSON.stringify(k[se].not)))return;for(let J=0;J<_e.length;J+=1)if(_e[J]instanceof RegExp&&_e[J].test(se)||typeof _e[J]=="string"&&_e[J]===se||typeof _e[J]=="function"&&_e[J](k[se],se)){pe.push(se);return}ce===!1&&L.indexOf(se)!==-1&&(T[se]=k[se]),k[se]&&(T[se]=k[se]);let E;if(ie.forEach(J=>{se.match(new RegExp(J))&&(E=!0,T[se]?Ye.merge(T[se],v[J]):T[Ae.randexp(se)]=v[J])}),!E){let J=v[se]||ce;J&&ce!==!1?T[v[se]?Ae.randexp(se):se]=k[se]||J:fe.push(se)}});let Ee=Object.keys(T).length+(Qe?0:pe.length),it=se=>Ae.randexp(`_?[_a-f\\d]{1,3}${se?"\\$?":""}`);function ot(se){let E;do{if(!se.length)break;E=se.shift()}while(T[E]);return E}let st=C;if(Q&&!L.length&&(st=Math.max($e===null||ce?Ae.number(Qe?1:0,ae):0,C)),!H.length&&!I&&Q&&xe===!0&&Qe){let se=Ae.number(0,ae);for(let E=0;E<se;E+=1)T[ki(1)+it(se[E])]=ce||Ai}for(;Qe&&!(!(ie.length||Q)||Ee>=st);){if(Q)if(Ge&&N.length-Ee>st){let se=0,E;do{if(se+=1,se>1e3)break;E=ot(L)||Ae.pick(N)}while(typeof T[E]!="undefined");typeof T[E]=="undefined"&&(T[E]=k[E],Ee+=1)}else if(ie.length&&!ce){let se=Ae.pick(ie),E=Ae.randexp(se);T[E]||(T[E]=v[se],Ee+=1)}else{let se=ot(L)||ki(1)+it();T[se]||(T[se]=ce||Ai,Ee+=1)}for(let se=0;Ee<C&&se<ie.length;se+=1){let E=ie[se],J=Ae.randexp(E);T[J]||(T[J]=v[E],Ee+=1)}}if(L.length===0&&(!Q||$e===!1)){let se=Ae.number(C,ae);for(;Ee<se;){let E=ot(N);E&&(T[E]=k[E]),Ee+=1}}let mt=T;if(Re("sortProperties")!==null){let se=Object.keys(k);mt=Object.keys(T).sort((J,me)=>Re("sortProperties")?J.localeCompare(me):se.indexOf(J)-se.indexOf(me)).reduce((J,me)=>(J[me]=T[me],J),{})}let xt=S(mt,c.concat(["properties"]),f,l);return G.forEach(se=>{for(let E of se.values)if(Ye.hasValue(E.properties[se.prop],xt.value[se.prop])){Object.keys(E.properties).forEach(J=>{J!==se.prop&&Ye.merge(xt.value,S(E.properties,c.concat(["properties"]),f,l).value)});break}}),xt}function xr(){let l=Ae.number(1,5);return ki(l).join(" ")}function _a(l=0,c=140){let f=Math.max(0,l),S=Ae.number(f,c),T=xr();for(;T.length<f;)T+=xr();return T.length>S&&(T=T.substr(0,S)),T}function wi(){return[0,0,0,0].map(()=>Ae.number(0,255)).join(".")}function Si(){return Ae.date().toISOString()}function Oa(){return Ei().slice(0,10)}function Ca(){return Ei().slice(11)}function Ia(l){return Ae.randexp(jt[l]).replace(Xc,(c,f)=>Ae.randexp(jt[f]))}function Pa(l,c){let f=Va(l.format);if(typeof f=="function")return f(l);switch(l.format){case"date-time":case"datetime":return Ei();case"date":return Jc();case"time":return Gc();case"ipv4":return Yc();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 Qc(l.format);default:if(typeof f=="undefined"){if(Re("failOnInvalidFormat"))throw new Error(`unknown registry key ${Ye.short(l.format)}`);return c()}throw new Error(`unsupported format '${l.format}'`)}}function Ma(l){return Ye.typecast("string",l,f=>l.format?Pa(l,()=>Ha(f.minLength,f.maxLength)):l.pattern?Ae.randexp(l.pattern):Ha(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,k])=>(S[T]=k,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(Re("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(Re("useExamplesValue")&&typeof l.example!="undefined")return{value:Ye.typecast(null,l,()=>l.example),context:T};if(Re("useDefaultValue")&&"default"in l&&(l.default!==""||!Re("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 k=l.type;if(Array.isArray(k)?k=Ae.pick(k):typeof k=="undefined"&&(k=Dc(l,c)||k,k&&(l.type=k)),typeof l.generate=="function"){let N=Ye.typecast(null,l,()=>l.generate(S,c)),ie=N===null?"null":typeof N;if(ie===k||ie==="number"&&k==="integer"||Array.isArray(N)&&k==="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 k=="string")if(Rr[k])try{let N=Rr[k](l,c,f,re);return k==="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)}))}}:k==="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 vi(N.stack,c):N}else{if(Re("failOnInvalidTypes"))throw new vi(`unknown primitive ${Ye.short(k)}`,c.concat(["type"]));{let N=Re("defaultInvalidTypeProduct");return typeof N=="string"&&Rr[N]?{value:Rr[N](l,c,f,re),context:T}:{value:N,context:T}}}let v={},L={...T};Array.isArray(l)&&(v=[]);let Q=Re("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,v);v[N]=Ye.clean(ie,l[N],!1),L[N]=j,v[N]===null&&Re("omitNulls")&&(delete v[N],delete L[N])}else v[N]=l[N]}),{value:v,context:L}}function Ce(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 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}=$a(),k=typeof l.jsonPath!="object"?{path:l.jsonPath}:l.jsonPath;k.group=l.group||k.group||S,k.cycle=l.cycle||k.cycle||!1,k.reverse=l.reverse||k.reverse||!1,k.count=l.count||k.count||1;let v=`${k.group}__${k.path}`;return f[v]||(k.count>1?f[v]=T(k.path,c).slice(0,k.count):f[v]=T(k.path,c)),k.cycle||k.reverse?De(f[v],k.reverse):Ce(f[v])}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=Re("refDepthMin")||0,k=Re("refDepthMax")||3;try{let{resolveSchema:v}=ru({refs:l,schema:c,container:f,synchronous:S,refDepthMin:T,refDepthMax:k}),L=tu(Ye.clone(c),[],v);return Re("resolveJsonPath")?{value:We(L.value),context:L.context}:L}catch(v){throw v.path?new Error(`${v.message} in /${v.path.join("/")}`):v}}function un(l){return l.value}function Qt(l,c){return c.reduce((f,S)=>S in f?f[S]:{},l)}function pn(l,c,f,S=f){let{title:T,description:k,comment:v}=Qt(l,c),L=[];Re("renderTitle")&&T&&L.push(` ${T}`,""),Re("renderDescription")&&k&&L.push(` ${k}`),Re("renderComment")&&v&&L.push(` ${v}`),f.commentBefore=L.join(`
23
- `),S instanceof iu?S.items.forEach(Q=>{pn(l,[...c,"items",Q.key.value],Q.key,Q.value)}):S instanceof ou&&S.items.forEach((Q,N)=>{pn(l,[...c,"items",N],Q)})}function $n({value:l,context:c}){let f=_r.createNode(l);pn(c,[],f);let S=new _r.Document;return S.contents=f,S.toString()}function Tt(){hn.define("autoIncrement",function(c,f){if(!this.offset){let S=f.minimum||1,T=S+nn.MAX_NUMBER,k=c.initialOffset||f.initialOffset;this.offset=k||Ae.number(S,T)}return c?this.offset++:f}),hn.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 dn(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 k=T.$id||T.id;typeof k=="string"&&!f[k]&&(f[k]=T),Object.keys(T).forEach(v=>{S(T[v])})}return S(l),S(c),f}var qt,Na,uc,La,pc,dc,Ft,hc,Da,vr,te,fc,mc,gc,yc,bc,kr,Ti,Fa,wc,Sc,Ua,$a,Tc,xc,qa,He,ja,vc,kc,Ar,Re,Ba,za,Ac,Ec,Rc,_c,Oc,Cc,nn,xi,Ae,Ic,Ye,Pc,Mc,nr,Va,Nc,vi,Er,Lc,Dc,Fc,Uc,$c,qc,jc,Bc,zc,Wa,Vc,Wc,ki,Ai,Hc,Ha,Yc,Ei,Jc,Gc,Ya,Ri,Kc,jt,Xc,Qc,Zc,eu,Rr,tu,nu,ru,Ja,Ga,Et,Eg,Rg,_g,Og,Cg,Ig,Pg,Mg,Ng,Lg,Dg,Fg,iu,ou,_r,hn,rt,au,su,Ug=i({"src/shared.js"(){qt=Object.create,Na=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,La=Object.getOwnPropertyNames,pc=Object.getPrototypeOf,dc=Object.prototype.hasOwnProperty,Ft=(l,c)=>function(){return c||(0,l[La(l)[0]])((c={exports:{}}).exports,c),c.exports},hc=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let T of La(c))!dc.call(l,T)&&T!==f&&Na(l,T,{get:()=>c[T],enumerable:!(S=uc(c,T))||S.enumerable});return l},Da=(l,c,f)=>(f=l!=null?qt(pc(l)):{},hc(c||!l||!l.__esModule?Na(f,"default",{value:l,enumerable:!0}):f,l)),vr=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=vr(),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}],k=()=>[{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:k(),not:!0})}}),fc=Ft({"node_modules/ret/lib/util.js"(l){var c=vr(),f=te(),S="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",T={0:0,t:9,n:10,v:11,f:12,r:13};l.strToChars=k=>{var v=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return k=k.replace(v,(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],_e=String.fromCharCode(xe);return/[[\]{}^$.|?*+()]/.test(_e)&&(_e="\\"+_e),_e}),k},l.tokenizeClass=(k,v)=>{for(var L=[],Q=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,N,ie;(N=Q.exec(k))!=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(v,"Unterminated character class")},l.error=(k,v)=>{throw new SyntaxError("Invalid regular expression: /"+k+"/: "+v)}}}),mc=Ft({"node_modules/ret/lib/positions.js"(l){var c=vr();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:"$"})}}),gc=Ft({"node_modules/ret/lib/index.js"(l,c){var f=fc(),S=vr(),T=te(),k=mc();c.exports=v=>{var L=0,Q,N,ie={type:S.ROOT,stack:[]},j=ie,he=ie.stack,ce=[],$e=H=>{f.error(v,`Nothing to repeat at column ${H-1}`)},xe=f.strToChars(v);for(Q=xe.length;L<Q;)switch(N=xe[L++],N){case"\\":switch(N=xe[L++],N){case"b":he.push(k.wordBoundary());break;case"B":he.push(k.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(k.begin());break;case"$":he.push(k.end());break;case"[":{var _e;xe[L]==="^"?(_e=!0,L++):_e=!1;var Ge=f.tokenizeClass(xe.slice(L),v);L+=Ge[1],he.push({type:S.SET,set:Ge[0],not:_e});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(v,`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(v,`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 ae=[];j.options.push(ae),he=ae;break}case"{":{var C=/^(\d+)(,(\d+)?)?\}/.exec(xe.slice(L)),I,V;C!==null?(he.length===0&&$e(L),I=parseInt(C[1],10),V=C[2]?C[3]?parseInt(C[3],10):1/0:I,L+=C[0].length,he.push({type:S.REPETITION,min:I,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(v,"Unterminated group"),ie},c.exports.types=S}}),yc=Ft({"node_modules/drange/lib/index.js"(l,c){var f=class ar{constructor(k,v){this.low=k,this.high=v,this.length=1+v-k}overlaps(k){return!(this.high<k.low||this.low>k.high)}touches(k){return!(this.high+1<k.low||this.low-1>k.high)}add(k){return new ar(Math.min(this.low,k.low),Math.max(this.high,k.high))}subtract(k){return k.low<=this.low&&k.high>=this.high?[]:k.low>this.low&&k.high<this.high?[new ar(this.low,k.low-1),new ar(k.high+1,this.high)]:k.low<=this.low?[new ar(k.high+1,this.high)]:[new ar(this.low,k.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},S=class Dr{constructor(k,v){this.ranges=[],this.length=0,k!=null&&this.add(k,v)}_update_length(){this.length=this.ranges.reduce((k,v)=>k+v.length,0)}add(k,v){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 k instanceof Dr?k.ranges.forEach(L):(v==null&&(v=k),L(new f(k,v))),this}subtract(k,v){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 k instanceof Dr?k.ranges.forEach(L):(v==null&&(v=k),L(new f(k,v))),this}intersect(k,v){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 k instanceof Dr?k.ranges.forEach(Q):(v==null&&(v=k),Q(new f(k,v))),this.ranges=L,this._update_length(),this}index(k){for(var v=0;v<this.ranges.length&&this.ranges[v].length<=k;)k-=this.ranges[v].length,v++;return this.ranges[v].low+k}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Dr(this)}numbers(){return this.ranges.reduce((k,v)=>{for(var L=v.low;L<=v.high;)k.push(L),L++;return k},[])}subranges(){return this.ranges.map(k=>({low:k.low,high:k.high,length:1+k.high-k.low}))}};c.exports=S}}),bc=Ft({"node_modules/randexp/lib/randexp.js"(l,c){var f=gc(),S=yc(),T=f.types;c.exports=class Fr{constructor(v,L){if(this._setDefaults(v),v instanceof RegExp)this.ignoreCase=v.ignoreCase,this.multiline=v.multiline,v=v.source;else if(typeof v=="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(v)}_setDefaults(v){this.max=v.max!=null?v.max:Fr.prototype.max!=null?Fr.prototype.max:100,this.defaultRange=v.defaultRange?v.defaultRange:this.defaultRange.clone(),v.randInt&&(this.randInt=v.randInt)}gen(){return this._gen(this.tokens,[])}_gen(v,L){var Q,N,ie,j,he;switch(v.type){case T.ROOT:case T.GROUP:if(v.followedBy||v.notFollowedBy)return"";for(v.remember&&v.groupNumber===void 0&&(v.groupNumber=L.push(null)-1),Q=v.options?this._randSelect(v.options):v.stack,N="",j=0,he=Q.length;j<he;j++)N+=this._gen(Q[j],L);return v.remember&&(L[v.groupNumber]=N),N;case T.POSITION:return"";case T.SET:{var ce=this._expand(v);return ce.length?String.fromCharCode(this._randSelect(ce)):""}case T.REPETITION:for(ie=this.randInt(v.min,v.max===1/0?v.min+this.max:v.max),N="",j=0;j<ie;j++)N+=this._gen(v.value,L);return N;case T.REFERENCE:return L[v.value-1]||"";case T.CHAR:{var $e=this.ignoreCase&&this._randBool()?this._toOtherCase(v.value):v.value;return String.fromCharCode($e)}}}_toOtherCase(v){return v+(97<=v&&v<=122?-32:65<=v&&v<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(v){return v instanceof S?v.index(this.randInt(0,v.length-1)):v[this.randInt(0,v.length-1)]}_expand(v){if(v.type===f.types.CHAR)return new S(v.value);if(v.type===f.types.RANGE)return new S(v.from,v.to);{let L=new S;for(let Q=0;Q<v.set.length;Q++){let N=this._expand(v.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 v.not?this.defaultRange.clone().subtract(L):this.defaultRange.clone().intersect(L)}}randInt(v,L){return v+Math.floor(Math.random()*(1+L-v))}get defaultRange(){return this._range=this._range||new S(32,126)}set defaultRange(v){this._range=v}static randexp(v,L){var Q;return typeof v=="string"&&(v=new RegExp(v,L)),v._randexp===void 0?(Q=new Fr(v,L),v._randexp=Q):(Q=v._randexp,Q._setDefaults(v)),Q.gen()}static sugar(){RegExp.prototype.gen=function(){return Fr.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 k(ae){let C=[0],I=ae.indexOf(`
22
+ `);default:return null}}function hf(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="modal"}function mS(e){let t=e.filter(n=>typeof n=="object"&&n!==null&&"type"in n&&fS.includes(n.type));return t.length<e.length&&console.warn("[chat] Modal contains unsupported child elements that were ignored"),t}function Ho(e){var t;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:(t=e.children)!=null?t:[]}}function Vo(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 Wo(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 Yo(e){return{type:"external_select",id:e.id,initialOption:e.initialOption,label:e.label,placeholder:e.placeholder,minQueryLength:e.minQueryLength,optional:e.optional}}function Jo(e){return{label:e.label,value:e.value,description:e.description}}function Go(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 Ko(e){return typeof e=="object"&&e!==null&&e.$$typeof===Il}function Pl(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(Pl);if(Ko(e)){let t=Nl(e);return t?[t]:[]}return typeof e=="object"&&"type"in e?[e]:typeof e=="string"||typeof e=="number"?[String(e)]:[]}function gS(e){return!("id"in e||"url"in e||"label"in e)}function yS(e){return"id"in e&&typeof e.id=="string"&&!("url"in e)}function bS(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)}function Ml(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)&&!("alt"in e)&&!("style"in e)}function wS(e){return"url"in e&&typeof e.url=="string"}function SS(e){return"label"in e&&"value"in e&&typeof e.label=="string"&&typeof e.value=="string"}function TS(e){return!("id"in e||"url"in e||"callbackId"in e)&&("title"in e||"subtitle"in e||"imageUrl"in e)}function xS(e){return"callbackId"in e&&"title"in e}function vS(e){return"id"in e&&"label"in e&&!("options"in e)&&!("value"in e)}function uf(e){return"id"in e&&"label"in e&&!("value"in e)}function kS(e){return"id"in e&&"label"in e&&!("value"in e)&&!("children"in e)}function AS(e){return"label"in e&&"value"in e&&!("id"in e)}function Nl(e){var a,s,u,p;let{type:t,props:n,children:r}=e,i=Pl(r);if(t===Rl){let d=gS(n)?n:{style:void 0},h=i.length>0?i.map(String).join(""):String((a=d.children)!=null?a:"");return Rl(h,{style:d.style})}if(t===Do)return Do(i);if(t===Fo)return Fo(i);if(t===jo)return jo(i);if(t===Uo){if(!yS(n))throw new Error("Button requires an 'id' prop");let d=i.length>0?i.map(String).join(""):(s=n.label)!=null?s:"";return Uo({id:n.id,label:d,style:n.style,value:n.value,actionType:n.actionType,callbackUrl:n.callbackUrl,disabled:n.disabled})}if(t===$o){if(!bS(n))throw new Error("LinkButton requires a 'url' prop");let d=i.length>0?i.map(String).join(""):(u=n.label)!=null?u:"";return $o({id:n.id,url:n.url,label:d,style:n.style})}if(t===zo){if(!Ml(n))throw new Error("CardLink requires a 'url' prop");let d=i.length>0?i.map(String).join(""):(p=n.label)!=null?p:"";return zo({url:n.url,label:d})}if(t===No){if(!wS(n))throw new Error("Image requires a 'url' prop");return No({url:n.url,alt:n.alt})}if(t===qo){if(!SS(n))throw new Error("Field requires 'label' and 'value' props");return qo({label:n.label,value:n.value})}if(t===Lo)return Lo();if(t===Ho){if(!xS(n))throw new Error("Modal requires 'callbackId' and 'title' props");return Ho({callbackId:n.callbackId,callbackUrl:n.callbackUrl,title:n.title,submitLabel:n.submitLabel,closeLabel:n.closeLabel,notifyOnClose:n.notifyOnClose,privateMetadata:n.privateMetadata,children:mS(i)})}if(t===Vo){if(!vS(n))throw new Error("TextInput requires 'id' and 'label' props");return Vo({id:n.id,label:n.label,placeholder:n.placeholder,initialValue:n.initialValue,multiline:n.multiline,optional:n.optional,maxLength:n.maxLength})}if(t===Wo){if(!uf(n))throw new Error("Select requires 'id' and 'label' props");return Wo({id:n.id,label:n.label,placeholder:n.placeholder,initialOption:n.initialOption,optional:n.optional,options:i})}if(t===Yo){if(!kS(n))throw new Error("ExternalSelect requires 'id' and 'label' props");return Yo({id:n.id,initialOption:n.initialOption,label:n.label,placeholder:n.placeholder,minQueryLength:n.minQueryLength,optional:n.optional})}if(t===Go){if(!uf(n))throw new Error("RadioSelect requires 'id' and 'label' props");return Go({id:n.id,label:n.label,initialOption:n.initialOption,optional:n.optional,options:i})}if(t===Jo){if(!AS(n))throw new Error("SelectOption requires 'label' and 'value' props");return Jo({label:n.label,value:n.value,description:n.description})}if(t===Bo){let d=n;return Bo({headers:d.headers,rows:d.rows})}let o=TS(n)?n:{};return Ol({title:o.title,subtitle:o.subtitle,imageUrl:o.imageUrl,children:i})}function Ll(e,t,n){let{children:r,...i}=t;return{$$typeof:Il,type:e,props:i,children:r!=null?[r]:[]}}function ff(e,t,n){let{children:r,...i}=t,o;return Array.isArray(r)?o=r:r!=null?o=[r]:o=[],{$$typeof:Il,type:e,props:i,children:o}}function gf(e){return Pl(e.children)}function Wt(e){if(Ko(e)){let t=Nl(e);if(t&&typeof t=="object"&&"type"in t&&t.type==="card")return t}return typeof e=="object"&&e!==null&&"type"in e&&e.type==="card"?e:null}function Dl(e){if(Ko(e)){let t=Nl(e);if(t&&typeof t=="object"&&"type"in t&&t.type==="modal")return t}return hf(e)?e:null}function Yt(e){if(Ko(e))return!0;if(typeof e=="object"&&e!==null&&"$$typeof"in e&&typeof e.$$typeof=="symbol"){let t=e.$$typeof.toString();return t.includes("react.element")||t.includes("react.transitional.element")}return!1}var df,fS,Il,mf,Fl=M(()=>{"use strict";Ur();rh();Mh();cf();df=Rl;fS=["text_input","select","external_select","radio_select","text","fields"];Il=Symbol.for("chat.jsx.element");mf=Ll});var Qf={};Ka(Qf,{Fragment:()=>gf,isCardLinkProps:()=>Ml,isJSX:()=>Yt,jsx:()=>Ll,jsxDEV:()=>mf,jsxs:()=>ff,toCardElement:()=>Wt,toModalElement:()=>Dl});var Zf=M(()=>{"use strict";Fl()});var nk={};Ka(nk,{Actions:()=>Qr,AgentDeliveryError:()=>Jt,AgentError:()=>kn,Button:()=>Zr,Card:()=>ei,CardLink:()=>ti,CardText:()=>ni,Client:()=>gr,CronExpression:()=>Xa,Divider:()=>ri,Image:()=>ii,NOVU_OPTIONS:()=>Fn,NovuClient:()=>Kt,NovuController:()=>Pt,NovuHandler:()=>Gt,NovuModule:()=>gi,NovuRequestHandler:()=>br,REGISTER_API_PATH:()=>ac,REGISTER_CONTROLLER_DECORATORS:()=>sc,Select:()=>oi,SelectOption:()=>ai,SeverityLevelEnum:()=>va,TextInput:()=>si,agent:()=>ic,frameworkName:()=>kg,isFromWorkflow:()=>Yl,providerSchemas:()=>wa,registerApiPath:()=>Ea,registerControllerDecorators:()=>cc,step:()=>Tg,toAgentError:()=>pi,workflow:()=>Sg});module.exports=sy(nk);var vm=require("jsonrepair");var Cr=(i=>(i.TRIGGER="trigger",i.EXECUTE="execute",i.PREVIEW="preview",i.AGENT_EVENT="agent-event",i))(Cr||{}),Oi=(r=>(r.DISCOVER="discover",r.HEALTH_CHECK="health-check",r.CODE="code",r))(Oi||{});var Xa=(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))(Xa||{});var Ht=(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))(Ht||{});var Ci=(r=>(r.POST="POST",r.GET="GET",r.OPTIONS="OPTIONS",r))(Ci||{});var ly=e=>{var n,r;if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(r=(n=t==null?void 0:t.constructor)==null?void 0:n.name.endsWith("Error"))!=null?r:!1},gn=class extends Error{},Ii=class extends gn{constructor(){super(...arguments);this.statusCode=404}},_t=class extends gn{constructor(){super(...arguments);this.statusCode=400}},Rn=class extends gn{constructor(){super(...arguments);this.statusCode=401}},_n=class extends gn{constructor(t,{cause:n}={}){var r;ly(n)?(super(`${t}: ${n.message}`),this.data={stack:(r=n.stack)!=null?r:t}):(super(`${t}${n?`: ${JSON.stringify(n,null,2)}`:""}`),this.data={stack:t})}},Pi=class extends gn{constructor(){super(...arguments);this.statusCode=409}};var ir=class extends _n{constructor(n){super("Unknown BridgeError",{cause:n});this.statusCode=500;this.code="BridgeError"}};var Mi=class extends _t{constructor(n,r){super(`Workflow with id: \`${n}\` has a corrupt state. Step with id: \`${r}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:n,stepId:r}}},Pr=class extends _t{constructor(n,r){super(`Workflow with id: \`${n}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=r}},Ni=class extends _t{constructor(n,r){super(`Workflow with id: \`${n}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=r}},Li=class extends _t{constructor(n,r,i){super(`Workflow with id: \`${n}\` has an invalid state. Step with id: \`${r}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=i}},Di=class extends _t{constructor(n,r,i){super(`Workflow with id: \`${n}\` has an invalid state. Step with id: \`${r}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=i}},Fi=class extends _t{constructor(n,r,i){super(`Workflow with id: \`${n}\` has an invalid state. Step with id: \`${r}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=i}},Ui=class extends _t{constructor(n,r,i){super(`Workflow with id: \`${n}\` has invalid controls syntax in step with id: \`${r}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=i}},$i=class extends _t{constructor(n,r,i,o){super(`Workflow with id: \`${n}\` 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}},qi=class extends _t{constructor(n,r){super(`Workflow with id: \`${n}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=r}};var qn=e=>Object.values(Ht).includes(e==null?void 0:e.code),uu=e=>!qn(e)&&typeof e.statusCode=="number"&&e.statusCode>=400&&e.statusCode<500;var Qa=e=>Object.values(e).map(t=>`\`${t}\``).join(", "),ji=e=>e.replaceAll(/(\w)(\w*)/g,(t,n,r)=>n.toUpperCase()+r.toLowerCase()).replaceAll(/[\s-]+/g,"");var Bi=class extends gn{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${Qa(Ci)}`}},jn=class extends _t{constructor(n,r){super(`Invalid query string: \`action\`=\`${n}\`. Please use one of ${Qa(r)}`);this.code="InvalidActionError"}},zi=class extends _t{constructor(){super("Missing secret key. Set the `NOVU_SECRET_KEY` environment variable or pass `secretKey` to the client options.");this.code="MissingSecretKeyError"}};var Hi=class extends Error{constructor(t,n,r){super(),this.data={message:r},this.statusCode=t,this.code=n}};var Mr=class extends Pi{constructor(t,n){super(`${ji(t)} with id: \`${n}\` already exists. Please use a different id.`)}},On=class extends Ii{constructor(t,n){super(`${ji(t)} with id: \`${n}\` does not exist. Please provide a valid id.`)}},or=class extends _n{constructor(n,r,i,o){super(`Failed to ${i} ${ji(n)} with id: \`${r}\``,{cause:o});this.statusCode=502}};var Vi=class extends On{constructor(n){super("provider",n);this.code="ProviderNotFoundError"}},Wi=class extends or{constructor(n,r,i){super("provider",n,r,i);this.code="ProviderExecutionFailedError"}};var Yi=class extends Rn{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"}},Ji=class extends Rn{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},Gi=class extends Rn{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},Ki=class extends Rn{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},Xi=class extends Rn{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(n){super("step",n);this.code="StepNotFoundError"}},Zi=class extends Mr{constructor(n){super("step",n);this.code="StepAlreadyExistsError"}},Nr=class extends or{constructor(n,r,i){super("step",n,r,i);this.code="StepExecutionFailedError"}};var Lr=class extends On{constructor(n){super("workflow",n);this.code="WorkflowNotFoundError"}};var eo=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(l,c)=>function(){return l&&(c=(0,l[n(l)[0]])(l=0)),c},o=(l,c)=>function(){return c||(0,l[n(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 n(c))!r.call(l,T)&&T!==f&&e(l,T,{get:()=>c[T],enumerable:!(S=t(c,T))||S.enumerable});return l},u=l=>s(e({},"__esModule",{value:!0}),l),p={};a(p,{JSONSchemaFaker:()=>au,default:()=>su,setDependencies:()=>Tc});function d(l,c){return typeof l=="string"?typeof c!="undefined"?Ar.register(l,c):Ar.get(l):Ar.registerMany(l)}function h(l,c){return l=typeof l=="undefined"?nn.MIN_INTEGER:l,c=typeof c=="undefined"?nn.MAX_INTEGER:c,Math.floor(Re("random")()*(c-l+1))+l}function g(l){return xi.default.prototype.max=Re("defaultRandExpMax"),xi.default.prototype.randInt=(f,S)=>f+Math.floor(Re("random")()*(1+(S-f))),new xi.default(l).gen()}function y(l){return l[Math.floor(Re("random")()*l.length)]}function P(l){let c,f,S=l.length,T=l.slice();for(;S>0;)f=Math.floor(Re("random")()*S),S-=1,c=T[S],T[S]=T[f],T[f]=c;return T}function ee(l,c){return Re("random")()*(c-l)+l}function Z(l,c,f,S,T=!1){return f=typeof f=="undefined"?nn.MIN_NUMBER:f,S=typeof S=="undefined"?nn.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=Re("minDateTime"),f=Re("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 k=S.shift();if(!T[k])throw new Error(`Prop not found: ${k} (${c})`);T=T[k]}return T}function ke(l){return typeof l=="string"&&Ic.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,k]=c.split("-"),[v,L,Q]=f.substr(0,8).split(":");return T=`0${Math.max(1,Math.min(12,T))}`.slice(-2),k=`0${Math.max(1,Math.min(31,k))}`.slice(-2),v=`0${Math.max(1,Math.min(23,v))}`.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}-${k}T${v}:${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 k=Math.max(S.minimum||0,0),v=Math.min(S.maximum||1/0,1/0);c.exclusiveMinimum&&k===c.minimum&&(k+=c.multipleOf||1),c.exclusiveMaximum&&v===c.maximum&&(v-=c.multipleOf||1),(k||v!==1/0)&&(c.enum=c.enum.filter(L=>L>=k&&L<=v))}break;case"string":{S.minLength=Re("minLength")||0,S.maxLength=Re("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=ke(T)?parseFloat(T):T;break;case"integer":T=ke(T)?parseInt(T,10):T;break;case"boolean":T=!!T;break;case"string":{if(Oe(T))return T;T=String(T);let k=Math.max(S.minLength||0,0),v=Math.min(S.maxLength||1/0,1/0),L,Q=0;for(;T.length<k;)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>v&&(T=T.substr(0,v)),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 Ie(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(nn.SCALAR_TYPES.filter(S=>(Array.isArray(l.type)?l.type:[l.type]).every(k=>S==="number"||S==="integer"?k!=="number"&&k!=="integer":S!==k)));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 ct(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 $t(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 R(l,c){c=c.items||c;let f=Re("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]))R(S,c)&&delete l[S];else{let T=c;c&&c.properties&&c.properties[S]&&(T=c.properties[S]);let k=St(l[S],T);Lt(k)||(l[S]=k)}typeof l[S]=="undefined"&&delete l[S]}),!(!Object.keys(l).length&&f))return l}function ln(l){return(c,f,S,T)=>{let k=c,v=[];typeof c=="object"&&(k=Object.keys(c)[0],Array.isArray(c[k])?v=c[k]:v.push(c[k]));let L=k.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,v.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}: ${k}', given: ${c}`)}),c}}function Sr(l,c){if(typeof l=="undefined")return nr.list();if(typeof l=="string")if(typeof c=="function")nr.register(l,c);else if(c===null||c===!1)nr.unregister(l);else return nr.get(l);else nr.registerMany(l)}function tr(l,c,f){return Object.keys(l).filter(S=>{let T=Lc.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],k=c[c.length-1];if(tr(l,k,Er[T]))return T}}function Un(){return Re("random")()>.5}function Xt(){return null}function cn(l,c,f,S,T,k){let v=[],L=[];function Q(ie){let j=JSON.stringify(ie.value);return L.indexOf(j)===-1?(L.push(j),v.push(ie),!0):!1}c.forEach(Q);let N=100;for(;v.length!==c.length&&(Q(k(f.items||S,l,T))||(N-=1),!!N););return v}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 vi(`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 k=l.minItems,v=l.maxItems,L=Re("minItems"),Q=Re("maxItems");L&&(k=typeof k=="undefined"?L:Math.min(L,k)),Q&&(v=typeof v=="undefined"?Q:Math.min(Q,v),v&&v>Q&&(v=Q),k&&k>Q&&(k=v));let N=Re("alwaysFakeOptionals")===!0?1:Re("optionalsProbability"),ie=Re("alwaysFakeOptionals")||Re("fixedProbabilities")||!1,j=Ae.number(k,v,1,5);N!==null&&(j=Math.max(ie?Math.round((v||j)*N):Math.abs(Ae.number(k,v)*N),k||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=Ae.number(0,j-1);T[ce]=S(l.contains,c.concat(["items",ce]),f)}return l.uniqueItems?cn(c.concat(["items"]),T,l,he,f,S):T}function Tr(l){let c=typeof l.minimum=="undefined"||l.minimum===-Number.MAX_VALUE?nn.MIN_INTEGER:l.minimum,f=typeof l.maximum=="undefined"||l.maximum===Number.MAX_VALUE?nn.MAX_INTEGER:l.maximum,S=l.multipleOf,T=S&&String(S).match(/e-(\d)|\.(\d+)$/);if(T){let k=(Math.random()*Ae.number(0,10)+1)*S,v=T[1]||T[2].length,L=parseFloat(k.toFixed(v)),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 k=Ae.number(Math.floor(c/S),Math.floor(f/S))*S;for(;k<c;)k+=S;return k}return Ae.number(c,f,void 0,void 0,l.type!=="integer")}function Ra(l){return Math.floor(Va({...l}))}function yi(l){return Ae.shuffle(Vc).slice(0,l)}function bi(l,c,f,S){let T={},k=l.properties||{},v=l.patternProperties||{},L=typeof l.required=="boolean"?[]:(l.required||[]).slice(),Q=l.additionalProperties!==!1,N=Object.keys(k),ie=Object.keys(v),j=N.concat(ie).reduce((se,E)=>(L.indexOf(E)===-1&&se.push(E),se),[]),he=L.concat(j),ce=Q&&l.additionalProperties===!0?Ai:l.additionalProperties;if(!Q&&N.length===0&&ie.length===0&&Ye.hasProperties(l,"minProperties","maxProperties","dependencies","required"))return null;if(Re("requiredOnly")===!0)return L.forEach(se=>{k[se]&&(T[se]=k[se])}),S(T,c.concat(["properties"]),f,l);let $e=Re("alwaysFakeOptionals")===!0?1:Re("optionalsProbability"),xe=Re("alwaysFakeOptionals")||Re("fixedProbabilities")||!1,_e=Re("ignoreProperties")||[],Ge=Re("reuseProperties"),Qe=Re("fillProperties"),ae=l.maxProperties||he.length+(Q?Ae.number(1,5):0),C=Math.max(l.minProperties||0,L.length),I=Math.max(0,he.length-C);he.length===1&&!L.length&&(C=Math.max(Ae.number(Qe?1:0,ae),C)),$e!==null&&(xe===!0?I=Math.round(C-L.length+$e*(he.length-C)):I=Ae.number(C-L.length,$e*(he.length-C)));let H=Ae.shuffle(j).slice(0,I),W=j.filter(se=>H.indexOf(se)!==-1),K=$e!==null||L.length===ae?ae:Ae.number(0,ae),z=L.concat(Ae.shuffle(W).slice(0,K)).slice(0,ae),Y=[],G=[];if(l.dependencies&&(Object.keys(l.dependencies).forEach(se=>{let E=l.dependencies[se];if(z.indexOf(se)!==-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:se,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(se=>{if(k[se]&&["{}","true"].includes(JSON.stringify(k[se].not)))return;for(let J=0;J<_e.length;J+=1)if(_e[J]instanceof RegExp&&_e[J].test(se)||typeof _e[J]=="string"&&_e[J]===se||typeof _e[J]=="function"&&_e[J](k[se],se)){pe.push(se);return}ce===!1&&L.indexOf(se)!==-1&&(T[se]=k[se]),k[se]&&(T[se]=k[se]);let E;if(ie.forEach(J=>{se.match(new RegExp(J))&&(E=!0,T[se]?Ye.merge(T[se],v[J]):T[Ae.randexp(se)]=v[J])}),!E){let J=v[se]||ce;J&&ce!==!1?T[v[se]?Ae.randexp(se):se]=k[se]||J:fe.push(se)}});let Ee=Object.keys(T).length+(Qe?0:pe.length),it=se=>Ae.randexp(`_?[_a-f\\d]{1,3}${se?"\\$?":""}`);function ot(se){let E;do{if(!se.length)break;E=se.shift()}while(T[E]);return E}let st=C;if(Q&&!L.length&&(st=Math.max($e===null||ce?Ae.number(Qe?1:0,ae):0,C)),!W.length&&!I&&Q&&xe===!0&&Qe){let se=Ae.number(0,ae);for(let E=0;E<se;E+=1)T[ki(1)+it(se[E])]=ce||Ai}for(;Qe&&!(!(ie.length||Q)||Ee>=st);){if(Q)if(Ge&&N.length-Ee>st){let se=0,E;do{if(se+=1,se>1e3)break;E=ot(L)||Ae.pick(N)}while(typeof T[E]!="undefined");typeof T[E]=="undefined"&&(T[E]=k[E],Ee+=1)}else if(ie.length&&!ce){let se=Ae.pick(ie),E=Ae.randexp(se);T[E]||(T[E]=v[se],Ee+=1)}else{let se=ot(L)||ki(1)+it();T[se]||(T[se]=ce||Ai,Ee+=1)}for(let se=0;Ee<C&&se<ie.length;se+=1){let E=ie[se],J=Ae.randexp(E);T[J]||(T[J]=v[E],Ee+=1)}}if(L.length===0&&(!Q||$e===!1)){let se=Ae.number(C,ae);for(;Ee<se;){let E=ot(N);E&&(T[E]=k[E]),Ee+=1}}let mt=T;if(Re("sortProperties")!==null){let se=Object.keys(k);mt=Object.keys(T).sort((J,me)=>Re("sortProperties")?J.localeCompare(me):se.indexOf(J)-se.indexOf(me)).reduce((J,me)=>(J[me]=T[me],J),{})}let xt=S(mt,c.concat(["properties"]),f,l);return G.forEach(se=>{for(let E of se.values)if(Ye.hasValue(E.properties[se.prop],xt.value[se.prop])){Object.keys(E.properties).forEach(J=>{J!==se.prop&&Ye.merge(xt.value,S(E.properties,c.concat(["properties"]),f,l).value)});break}}),xt}function xr(){let l=Ae.number(1,5);return ki(l).join(" ")}function _a(l=0,c=140){let f=Math.max(0,l),S=Ae.number(f,c),T=xr();for(;T.length<f;)T+=xr();return T.length>S&&(T=T.substr(0,S)),T}function wi(){return[0,0,0,0].map(()=>Ae.number(0,255)).join(".")}function Si(){return Ae.date().toISOString()}function Oa(){return Ei().slice(0,10)}function Ca(){return Ei().slice(11)}function Ia(l){return Ae.randexp(jt[l]).replace(Xc,(c,f)=>Ae.randexp(jt[f]))}function Pa(l,c){let f=Ha(l.format);if(typeof f=="function")return f(l);switch(l.format){case"date-time":case"datetime":return Ei();case"date":return Jc();case"time":return Gc();case"ipv4":return Yc();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 Qc(l.format);default:if(typeof f=="undefined"){if(Re("failOnInvalidFormat"))throw new Error(`unknown registry key ${Ye.short(l.format)}`);return c()}throw new Error(`unsupported format '${l.format}'`)}}function Ma(l){return Ye.typecast("string",l,f=>l.format?Pa(l,()=>Wa(f.minLength,f.maxLength)):l.pattern?Ae.randexp(l.pattern):Wa(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,k])=>(S[T]=k,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(Re("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(Re("useExamplesValue")&&typeof l.example!="undefined")return{value:Ye.typecast(null,l,()=>l.example),context:T};if(Re("useDefaultValue")&&"default"in l&&(l.default!==""||!Re("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 k=l.type;if(Array.isArray(k)?k=Ae.pick(k):typeof k=="undefined"&&(k=Dc(l,c)||k,k&&(l.type=k)),typeof l.generate=="function"){let N=Ye.typecast(null,l,()=>l.generate(S,c)),ie=N===null?"null":typeof N;if(ie===k||ie==="number"&&k==="integer"||Array.isArray(N)&&k==="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 k=="string")if(Rr[k])try{let N=Rr[k](l,c,f,re);return k==="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)}))}}:k==="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 vi(N.stack,c):N}else{if(Re("failOnInvalidTypes"))throw new vi(`unknown primitive ${Ye.short(k)}`,c.concat(["type"]));{let N=Re("defaultInvalidTypeProduct");return typeof N=="string"&&Rr[N]?{value:Rr[N](l,c,f,re),context:T}:{value:N,context:T}}}let v={},L={...T};Array.isArray(l)&&(v=[]);let Q=Re("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,v);v[N]=Ye.clean(ie,l[N],!1),L[N]=j,v[N]===null&&Re("omitNulls")&&(delete v[N],delete L[N])}else v[N]=l[N]}),{value:v,context:L}}function Ce(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 Ve(l,c,f,S){if(!l||typeof l!="object")return l;if(f||(f={}),c||(c=l),Array.isArray(l))return l.map(T=>Ve(T,c,f,S));if(l.jsonPath){let{JSONPath:T}=$a(),k=typeof l.jsonPath!="object"?{path:l.jsonPath}:l.jsonPath;k.group=l.group||k.group||S,k.cycle=l.cycle||k.cycle||!1,k.reverse=l.reverse||k.reverse||!1,k.count=l.count||k.count||1;let v=`${k.group}__${k.path}`;return f[v]||(k.count>1?f[v]=T(k.path,c).slice(0,k.count):f[v]=T(k.path,c)),k.cycle||k.reverse?De(f[v],k.reverse):Ce(f[v])}return Object.keys(l).forEach(T=>{l[T]=Ve(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=Re("refDepthMin")||0,k=Re("refDepthMax")||3;try{let{resolveSchema:v}=ru({refs:l,schema:c,container:f,synchronous:S,refDepthMin:T,refDepthMax:k}),L=tu(Ye.clone(c),[],v);return Re("resolveJsonPath")?{value:Ve(L.value),context:L.context}:L}catch(v){throw v.path?new Error(`${v.message} in /${v.path.join("/")}`):v}}function un(l){return l.value}function Qt(l,c){return c.reduce((f,S)=>S in f?f[S]:{},l)}function pn(l,c,f,S=f){let{title:T,description:k,comment:v}=Qt(l,c),L=[];Re("renderTitle")&&T&&L.push(` ${T}`,""),Re("renderDescription")&&k&&L.push(` ${k}`),Re("renderComment")&&v&&L.push(` ${v}`),f.commentBefore=L.join(`
23
+ `),S instanceof iu?S.items.forEach(Q=>{pn(l,[...c,"items",Q.key.value],Q.key,Q.value)}):S instanceof ou&&S.items.forEach((Q,N)=>{pn(l,[...c,"items",N],Q)})}function $n({value:l,context:c}){let f=_r.createNode(l);pn(c,[],f);let S=new _r.Document;return S.contents=f,S.toString()}function Tt(){hn.define("autoIncrement",function(c,f){if(!this.offset){let S=f.minimum||1,T=S+nn.MAX_NUMBER,k=c.initialOffset||f.initialOffset;this.offset=k||Ae.number(S,T)}return c?this.offset++:f}),hn.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 dn(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 k=T.$id||T.id;typeof k=="string"&&!f[k]&&(f[k]=T),Object.keys(T).forEach(v=>{S(T[v])})}return S(l),S(c),f}var qt,Na,uc,La,pc,dc,Ft,hc,Da,vr,te,fc,mc,gc,yc,bc,kr,Ti,Fa,wc,Sc,Ua,$a,Tc,xc,qa,We,ja,vc,kc,Ar,Re,Ba,za,Ac,Ec,Rc,_c,Oc,Cc,nn,xi,Ae,Ic,Ye,Pc,Mc,nr,Ha,Nc,vi,Er,Lc,Dc,Fc,Uc,$c,qc,jc,Bc,zc,Va,Hc,Vc,ki,Ai,Wc,Wa,Yc,Ei,Jc,Gc,Ya,Ri,Kc,jt,Xc,Qc,Zc,eu,Rr,tu,nu,ru,Ja,Ga,Et,_g,Og,Cg,Ig,Pg,Mg,Ng,Lg,Dg,Fg,Ug,$g,iu,ou,_r,hn,rt,au,su,qg=i({"src/shared.js"(){qt=Object.create,Na=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,La=Object.getOwnPropertyNames,pc=Object.getPrototypeOf,dc=Object.prototype.hasOwnProperty,Ft=(l,c)=>function(){return c||(0,l[La(l)[0]])((c={exports:{}}).exports,c),c.exports},hc=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let T of La(c))!dc.call(l,T)&&T!==f&&Na(l,T,{get:()=>c[T],enumerable:!(S=uc(c,T))||S.enumerable});return l},Da=(l,c,f)=>(f=l!=null?qt(pc(l)):{},hc(c||!l||!l.__esModule?Na(f,"default",{value:l,enumerable:!0}):f,l)),vr=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=vr(),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}],k=()=>[{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:k(),not:!0})}}),fc=Ft({"node_modules/ret/lib/util.js"(l){var c=vr(),f=te(),S="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",T={0:0,t:9,n:10,v:11,f:12,r:13};l.strToChars=k=>{var v=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return k=k.replace(v,(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],_e=String.fromCharCode(xe);return/[[\]{}^$.|?*+()]/.test(_e)&&(_e="\\"+_e),_e}),k},l.tokenizeClass=(k,v)=>{for(var L=[],Q=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,N,ie;(N=Q.exec(k))!=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(v,"Unterminated character class")},l.error=(k,v)=>{throw new SyntaxError("Invalid regular expression: /"+k+"/: "+v)}}}),mc=Ft({"node_modules/ret/lib/positions.js"(l){var c=vr();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:"$"})}}),gc=Ft({"node_modules/ret/lib/index.js"(l,c){var f=fc(),S=vr(),T=te(),k=mc();c.exports=v=>{var L=0,Q,N,ie={type:S.ROOT,stack:[]},j=ie,he=ie.stack,ce=[],$e=W=>{f.error(v,`Nothing to repeat at column ${W-1}`)},xe=f.strToChars(v);for(Q=xe.length;L<Q;)switch(N=xe[L++],N){case"\\":switch(N=xe[L++],N){case"b":he.push(k.wordBoundary());break;case"B":he.push(k.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(k.begin());break;case"$":he.push(k.end());break;case"[":{var _e;xe[L]==="^"?(_e=!0,L++):_e=!1;var Ge=f.tokenizeClass(xe.slice(L),v);L+=Ge[1],he.push({type:S.SET,set:Ge[0],not:_e});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(v,`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(v,`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 ae=[];j.options.push(ae),he=ae;break}case"{":{var C=/^(\d+)(,(\d+)?)?\}/.exec(xe.slice(L)),I,H;C!==null?(he.length===0&&$e(L),I=parseInt(C[1],10),H=C[2]?C[3]?parseInt(C[3],10):1/0:I,L+=C[0].length,he.push({type:S.REPETITION,min:I,max:H,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(v,"Unterminated group"),ie},c.exports.types=S}}),yc=Ft({"node_modules/drange/lib/index.js"(l,c){var f=class ar{constructor(k,v){this.low=k,this.high=v,this.length=1+v-k}overlaps(k){return!(this.high<k.low||this.low>k.high)}touches(k){return!(this.high+1<k.low||this.low-1>k.high)}add(k){return new ar(Math.min(this.low,k.low),Math.max(this.high,k.high))}subtract(k){return k.low<=this.low&&k.high>=this.high?[]:k.low>this.low&&k.high<this.high?[new ar(this.low,k.low-1),new ar(k.high+1,this.high)]:k.low<=this.low?[new ar(k.high+1,this.high)]:[new ar(this.low,k.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},S=class Dr{constructor(k,v){this.ranges=[],this.length=0,k!=null&&this.add(k,v)}_update_length(){this.length=this.ranges.reduce((k,v)=>k+v.length,0)}add(k,v){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 k instanceof Dr?k.ranges.forEach(L):(v==null&&(v=k),L(new f(k,v))),this}subtract(k,v){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 k instanceof Dr?k.ranges.forEach(L):(v==null&&(v=k),L(new f(k,v))),this}intersect(k,v){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 k instanceof Dr?k.ranges.forEach(Q):(v==null&&(v=k),Q(new f(k,v))),this.ranges=L,this._update_length(),this}index(k){for(var v=0;v<this.ranges.length&&this.ranges[v].length<=k;)k-=this.ranges[v].length,v++;return this.ranges[v].low+k}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Dr(this)}numbers(){return this.ranges.reduce((k,v)=>{for(var L=v.low;L<=v.high;)k.push(L),L++;return k},[])}subranges(){return this.ranges.map(k=>({low:k.low,high:k.high,length:1+k.high-k.low}))}};c.exports=S}}),bc=Ft({"node_modules/randexp/lib/randexp.js"(l,c){var f=gc(),S=yc(),T=f.types;c.exports=class Fr{constructor(v,L){if(this._setDefaults(v),v instanceof RegExp)this.ignoreCase=v.ignoreCase,this.multiline=v.multiline,v=v.source;else if(typeof v=="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(v)}_setDefaults(v){this.max=v.max!=null?v.max:Fr.prototype.max!=null?Fr.prototype.max:100,this.defaultRange=v.defaultRange?v.defaultRange:this.defaultRange.clone(),v.randInt&&(this.randInt=v.randInt)}gen(){return this._gen(this.tokens,[])}_gen(v,L){var Q,N,ie,j,he;switch(v.type){case T.ROOT:case T.GROUP:if(v.followedBy||v.notFollowedBy)return"";for(v.remember&&v.groupNumber===void 0&&(v.groupNumber=L.push(null)-1),Q=v.options?this._randSelect(v.options):v.stack,N="",j=0,he=Q.length;j<he;j++)N+=this._gen(Q[j],L);return v.remember&&(L[v.groupNumber]=N),N;case T.POSITION:return"";case T.SET:{var ce=this._expand(v);return ce.length?String.fromCharCode(this._randSelect(ce)):""}case T.REPETITION:for(ie=this.randInt(v.min,v.max===1/0?v.min+this.max:v.max),N="",j=0;j<ie;j++)N+=this._gen(v.value,L);return N;case T.REFERENCE:return L[v.value-1]||"";case T.CHAR:{var $e=this.ignoreCase&&this._randBool()?this._toOtherCase(v.value):v.value;return String.fromCharCode($e)}}}_toOtherCase(v){return v+(97<=v&&v<=122?-32:65<=v&&v<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(v){return v instanceof S?v.index(this.randInt(0,v.length-1)):v[this.randInt(0,v.length-1)]}_expand(v){if(v.type===f.types.CHAR)return new S(v.value);if(v.type===f.types.RANGE)return new S(v.from,v.to);{let L=new S;for(let Q=0;Q<v.set.length;Q++){let N=this._expand(v.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 v.not?this.defaultRange.clone().subtract(L):this.defaultRange.clone().intersect(L)}}randInt(v,L){return v+Math.floor(Math.random()*(1+L-v))}get defaultRange(){return this._range=this._range||new S(32,126)}set defaultRange(v){this._range=v}static randexp(v,L){var Q;return typeof v=="string"&&(v=new RegExp(v,L)),v._randexp===void 0?(Q=new Fr(v,L),v._randexp=Q):(Q=v._randexp,Q._setDefaults(v)),Q.gen()}static sugar(){RegExp.prototype.gen=function(){return Fr.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 k(ae){let C=[0],I=ae.indexOf(`
24
24
  `);for(;I!==-1;)I+=1,C.push(I),I=ae.indexOf(`
25
- `,I);return C}function v(ae){let C,I;return typeof ae=="string"?(C=k(ae),I=ae):(Array.isArray(ae)&&(ae=ae[0]),ae&&ae.context&&(ae.lineStarts||(ae.lineStarts=k(ae.context.src)),C=ae.lineStarts,I=ae.context.src)),{lineStarts:C,src:I}}function L(ae,C){if(typeof ae!="number"||ae<0)return null;let{lineStarts:I,src:V}=v(C);if(!I||!V||ae>V.length)return null;for(let K=0;K<I.length;++K){let z=I[K];if(ae<z)return{line:K,col:ae-I[K-1]+1};if(ae===z)return{line:K+1,col:1}}let H=I.length;return{line:H,col:ae-I[H-1]+1}}function Q(ae,C){let{lineStarts:I,src:V}=v(C);if(!I||!(ae>=1)||ae>I.length)return null;let H=I[ae-1],K=I[ae];for(;K&&K>H&&V[K-1]===`
26
- `;)--K;return V.slice(H,K)}function N({start:ae,end:C},I,V=80){let H=Q(ae.line,I);if(!H)return null;let{col:K}=ae;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="";C&&(C.line===ae.line&&K+(C.col-ae.col)<=V+1?z=C.col-ae.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 du{static copy(C){return new du(C.start,C.end)}constructor(C,I){this.start=C,this.end=I||C}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(C,I){let{start:V,end:H}=this;if(C.length===0||H<=C[0])return this.origStart=V,this.origEnd=H,I;let K=I;for(;K<C.length&&!(C[K]>V);)++K;this.origStart=V+K;let z=K;for(;K<C.length&&!(C[K]>=H);)++K;return this.origEnd=H+K,z}},j=class yn{static addStringTerminator(C,I,V){if(V[V.length-1]===`
28
- `)return V;let H=yn.endOfWhiteSpace(C,I);return H>=C.length||C[H]===`
29
- `?V+`
30
- `:V}static atDocumentBoundary(C,I,V){let H=C[I];if(!H)return!0;let K=C[I-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=C[I+1],Y=C[I+2];if(z!==H||Y!==H)return!1;let G=C[I+3];return!G||G===`
32
- `||G===" "||G===" "}static endOfIdentifier(C,I){let V=C[I],H=V==="<",K=H?[`
25
+ `,I);return C}function v(ae){let C,I;return typeof ae=="string"?(C=k(ae),I=ae):(Array.isArray(ae)&&(ae=ae[0]),ae&&ae.context&&(ae.lineStarts||(ae.lineStarts=k(ae.context.src)),C=ae.lineStarts,I=ae.context.src)),{lineStarts:C,src:I}}function L(ae,C){if(typeof ae!="number"||ae<0)return null;let{lineStarts:I,src:H}=v(C);if(!I||!H||ae>H.length)return null;for(let K=0;K<I.length;++K){let z=I[K];if(ae<z)return{line:K,col:ae-I[K-1]+1};if(ae===z)return{line:K+1,col:1}}let W=I.length;return{line:W,col:ae-I[W-1]+1}}function Q(ae,C){let{lineStarts:I,src:H}=v(C);if(!I||!(ae>=1)||ae>I.length)return null;let W=I[ae-1],K=I[ae];for(;K&&K>W&&H[K-1]===`
26
+ `;)--K;return H.slice(W,K)}function N({start:ae,end:C},I,H=80){let W=Q(ae.line,I);if(!W)return null;let{col:K}=ae;if(W.length>H)if(K<=H-10)W=W.substr(0,H-1)+"\u2026";else{let fe=Math.round(H/2);W.length>K+fe&&(W=W.substr(0,K+fe-1)+"\u2026"),K-=W.length-H,W="\u2026"+W.substr(1-H)}let z=1,Y="";C&&(C.line===ae.line&&K+(C.col-ae.col)<=H+1?z=C.col-ae.col:(z=Math.min(W.length+1,H)-K,Y="\u2026"));let G=K>1?" ".repeat(K-1):"",pe="^".repeat(z);return`${W}
27
+ ${G}${pe}${Y}`}var ie=class du{static copy(C){return new du(C.start,C.end)}constructor(C,I){this.start=C,this.end=I||C}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(C,I){let{start:H,end:W}=this;if(C.length===0||W<=C[0])return this.origStart=H,this.origEnd=W,I;let K=I;for(;K<C.length&&!(C[K]>H);)++K;this.origStart=H+K;let z=K;for(;K<C.length&&!(C[K]>=W);)++K;return this.origEnd=W+K,z}},j=class yn{static addStringTerminator(C,I,H){if(H[H.length-1]===`
28
+ `)return H;let W=yn.endOfWhiteSpace(C,I);return W>=C.length||C[W]===`
29
+ `?H+`
30
+ `:H}static atDocumentBoundary(C,I,H){let W=C[I];if(!W)return!0;let K=C[I-1];if(K&&K!==`
31
+ `)return!1;if(H){if(W!==H)return!1}else if(W!==c.DIRECTIVES_END&&W!==c.DOCUMENT_END)return!1;let z=C[I+1],Y=C[I+2];if(z!==W||Y!==W)return!1;let G=C[I+3];return!G||G===`
32
+ `||G===" "||G===" "}static endOfIdentifier(C,I){let H=C[I],W=H==="<",K=W?[`
33
33
  `," "," ",">"]:[`
34
- `," "," ","[","]","{","}",","];for(;V&&K.indexOf(V)===-1;)V=C[I+=1];return H&&V===">"&&(I+=1),I}static endOfIndent(C,I){let V=C[I];for(;V===" ";)V=C[I+=1];return I}static endOfLine(C,I){let V=C[I];for(;V&&V!==`
35
- `;)V=C[I+=1];return I}static endOfWhiteSpace(C,I){let V=C[I];for(;V===" "||V===" ";)V=C[I+=1];return I}static startOfLine(C,I){let V=C[I-1];if(V===`
36
- `)return I;for(;V&&V!==`
37
- `;)V=C[I-=1];return I+1}static endOfBlockIndent(C,I,V){let H=yn.endOfIndent(C,V);if(H>V+I)return H;{let K=yn.endOfWhiteSpace(C,H),z=C[K];if(!z||z===`
38
- `)return K}return null}static atBlank(C,I,V){let H=C[I];return H===`
39
- `||H===" "||H===" "||V&&!H}static nextNodeIsIndented(C,I,V){return!C||I<0?!1:I>0?!0:V&&C==="-"}static normalizeOffset(C,I){let V=C[I];return V?V!==`
34
+ `," "," ","[","]","{","}",","];for(;H&&K.indexOf(H)===-1;)H=C[I+=1];return W&&H===">"&&(I+=1),I}static endOfIndent(C,I){let H=C[I];for(;H===" ";)H=C[I+=1];return I}static endOfLine(C,I){let H=C[I];for(;H&&H!==`
35
+ `;)H=C[I+=1];return I}static endOfWhiteSpace(C,I){let H=C[I];for(;H===" "||H===" ";)H=C[I+=1];return I}static startOfLine(C,I){let H=C[I-1];if(H===`
36
+ `)return I;for(;H&&H!==`
37
+ `;)H=C[I-=1];return I+1}static endOfBlockIndent(C,I,H){let W=yn.endOfIndent(C,H);if(W>H+I)return W;{let K=yn.endOfWhiteSpace(C,W),z=C[K];if(!z||z===`
38
+ `)return K}return null}static atBlank(C,I,H){let W=C[I];return W===`
39
+ `||W===" "||W===" "||H&&!W}static nextNodeIsIndented(C,I,H){return!C||I<0?!1:I>0?!0:H&&C==="-"}static normalizeOffset(C,I){let H=C[I];return H?H!==`
40
40
  `&&C[I-1]===`
41
- `?I-1:yn.endOfWhiteSpace(C,I):I}static foldNewline(C,I,V){let H=0,K=!1,z="",Y=C[I+1];for(;Y===" "||Y===" "||Y===`
41
+ `?I-1:yn.endOfWhiteSpace(C,I):I}static foldNewline(C,I,H){let W=0,K=!1,z="",Y=C[I+1];for(;Y===" "||Y===" "||Y===`
42
42
  `;){switch(Y){case`
43
- `:H=0,I+=1,z+=`
44
- `;break;case" ":H<=V&&(K=!0),I=yn.endOfWhiteSpace(C,I+2)-1;break;case" ":H+=1,I+=1;break}Y=C[I+1]}return z||(z=" "),Y&&H<=V&&(K=!0),{fold:z,offset:I,error:K}}constructor(C,I,V){Object.defineProperty(this,"context",{value:V||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=I||[],this.type=C,this.value=null}getPropValue(C,I,V){if(!this.context)return null;let{src:H}=this.context,K=this.props[C];return K&&H[K.start]===I?H.slice(K.start+(V?1:0),K.end):null}get anchor(){for(let C=0;C<this.props.length;++C){let I=this.getPropValue(C,c.ANCHOR,!0);if(I!=null)return I}return null}get comment(){let C=[];for(let I=0;I<this.props.length;++I){let V=this.getPropValue(I,c.COMMENT,!0);V!=null&&C.push(V)}return C.length>0?C.join(`
45
- `):null}commentHasRequiredWhitespace(C){let{src:I}=this.context;if(this.header&&C===this.header.end||!this.valueRange)return!1;let{end:V}=this.valueRange;return C!==V||yn.atBlank(I,V-1)}get hasComment(){if(this.context){let{src:C}=this.context;for(let I=0;I<this.props.length;++I)if(C[this.props[I].start]===c.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:C}=this.context;for(let I=0;I<this.props.length;++I)if(C[this.props[I].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 C=L(this.range.start,this.context.root);if(!C)return;let I=L(this.range.end,this.context.root);return{start:C,end:I}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:C,end:I}=this.valueRange;return this.context.src.slice(C,I)}get tag(){for(let C=0;C<this.props.length;++C){let I=this.getPropValue(C,c.TAG,!1);if(I!=null){if(I[1]==="<")return{verbatim:I.slice(2,-1)};{let[V,H,K]=I.match(/^(.*!)([^!]*)$/);return{handle:H,suffix:K}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:C,end:I}=this.valueRange,{src:V}=this.context;for(let H=C;H<I;++H)if(V[H]===`
46
- `)return!0;return!1}parseComment(C){let{src:I}=this.context;if(I[C]===c.COMMENT){let V=yn.endOfLine(I,C+1),H=new ie(C,V);return this.props.push(H),V}return C}setOrigRanges(C,I){return this.range&&(I=this.range.setOrigRange(C,I)),this.valueRange&&this.valueRange.setOrigRange(C,I),this.props.forEach(V=>V.setOrigRange(C,I)),I}toString(){let{context:{src:C},range:I,value:V}=this;if(V!=null)return V;let H=C.slice(I.start,I.end);return yn.addStringTerminator(C,I.end,H)}},he=class extends Error{constructor(ae,C,I){if(!I||!(C instanceof j))throw new Error(`Invalid arguments for new ${ae}`);super(),this.name=ae,this.message=I,this.source=C}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let ae=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new ie(this.offset,this.offset+1);let C=ae&&L(this.offset,ae);if(C){let I={line:C.line,col:C.col+1};this.linePos={start:C,end:I}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:C,col:I}=this.linePos.start;this.message+=` at line ${C}, column ${I}`;let V=ae&&N(this.linePos,ae);V&&(this.message+=`:
43
+ `:W=0,I+=1,z+=`
44
+ `;break;case" ":W<=H&&(K=!0),I=yn.endOfWhiteSpace(C,I+2)-1;break;case" ":W+=1,I+=1;break}Y=C[I+1]}return z||(z=" "),Y&&W<=H&&(K=!0),{fold:z,offset:I,error:K}}constructor(C,I,H){Object.defineProperty(this,"context",{value:H||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=I||[],this.type=C,this.value=null}getPropValue(C,I,H){if(!this.context)return null;let{src:W}=this.context,K=this.props[C];return K&&W[K.start]===I?W.slice(K.start+(H?1:0),K.end):null}get anchor(){for(let C=0;C<this.props.length;++C){let I=this.getPropValue(C,c.ANCHOR,!0);if(I!=null)return I}return null}get comment(){let C=[];for(let I=0;I<this.props.length;++I){let H=this.getPropValue(I,c.COMMENT,!0);H!=null&&C.push(H)}return C.length>0?C.join(`
45
+ `):null}commentHasRequiredWhitespace(C){let{src:I}=this.context;if(this.header&&C===this.header.end||!this.valueRange)return!1;let{end:H}=this.valueRange;return C!==H||yn.atBlank(I,H-1)}get hasComment(){if(this.context){let{src:C}=this.context;for(let I=0;I<this.props.length;++I)if(C[this.props[I].start]===c.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:C}=this.context;for(let I=0;I<this.props.length;++I)if(C[this.props[I].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 C=L(this.range.start,this.context.root);if(!C)return;let I=L(this.range.end,this.context.root);return{start:C,end:I}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:C,end:I}=this.valueRange;return this.context.src.slice(C,I)}get tag(){for(let C=0;C<this.props.length;++C){let I=this.getPropValue(C,c.TAG,!1);if(I!=null){if(I[1]==="<")return{verbatim:I.slice(2,-1)};{let[H,W,K]=I.match(/^(.*!)([^!]*)$/);return{handle:W,suffix:K}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:C,end:I}=this.valueRange,{src:H}=this.context;for(let W=C;W<I;++W)if(H[W]===`
46
+ `)return!0;return!1}parseComment(C){let{src:I}=this.context;if(I[C]===c.COMMENT){let H=yn.endOfLine(I,C+1),W=new ie(C,H);return this.props.push(W),H}return C}setOrigRanges(C,I){return this.range&&(I=this.range.setOrigRange(C,I)),this.valueRange&&this.valueRange.setOrigRange(C,I),this.props.forEach(H=>H.setOrigRange(C,I)),I}toString(){let{context:{src:C},range:I,value:H}=this;if(H!=null)return H;let W=C.slice(I.start,I.end);return yn.addStringTerminator(C,I.end,W)}},he=class extends Error{constructor(ae,C,I){if(!I||!(C instanceof j))throw new Error(`Invalid arguments for new ${ae}`);super(),this.name=ae,this.message=I,this.source=C}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let ae=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new ie(this.offset,this.offset+1);let C=ae&&L(this.offset,ae);if(C){let I={line:C.line,col:C.col+1};this.linePos={start:C,end:I}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:C,col:I}=this.linePos.start;this.message+=` at line ${C}, column ${I}`;let H=ae&&N(this.linePos,ae);H&&(this.message+=`:
47
47
 
48
- ${V}
49
- `)}delete this.source}},ce=class extends he{constructor(ae,C){super("YAMLReferenceError",ae,C)}},$e=class extends he{constructor(ae,C){super("YAMLSemanticError",ae,C)}},xe=class extends he{constructor(ae,C){super("YAMLSyntaxError",ae,C)}},_e=class extends he{constructor(ae,C){super("YAMLWarning",ae,C)}};function Ge(ae,C,I){return C in ae?Object.defineProperty(ae,C,{value:I,enumerable:!0,configurable:!0,writable:!0}):ae[C]=I,ae}var Qe=class Za extends j{static endOfLine(C,I,V){let H=C[I],K=I;for(;H&&H!==`
50
- `&&!(V&&(H==="["||H==="]"||H==="{"||H==="}"||H===","));){let z=C[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:C,end:I}=this.valueRange,{src:V}=this.context,H=V[I-1];for(;C<I&&(H===`
52
- `||H===" "||H===" ");)H=V[--I-1];let K="";for(let Y=C;Y<I;++Y){let G=V[Y];if(G===`
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<I&&(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[C];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(C){let{indent:I,inFlow:V,src:H}=this.context,K=C,z=C;for(let Y=H[K];Y===`
55
- `&&!j.atDocumentBoundary(H,K+1);Y=H[K]){let G=j.endOfBlockIndent(H,I,K+1);if(G===null||H[G]==="#")break;H[G]===`
56
- `?K=G:(z=Za.endOfLine(H,G,V),K=z)}return this.valueRange.isEmpty()&&(this.valueRange.start=C),this.valueRange.end=z,z}parse(C,I){this.context=C;let{inFlow:V,src:H}=C,K=I,z=H[K];return z&&z!=="#"&&z!==`
57
- `&&(K=Za.endOfLine(H,I,V)),this.valueRange=new ie(I,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=_e,l._defineProperty=Ge,l.defaultTagPrefix=S,l.defaultTags=T}}),Ti=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}#`)}
48
+ ${H}
49
+ `)}delete this.source}},ce=class extends he{constructor(ae,C){super("YAMLReferenceError",ae,C)}},$e=class extends he{constructor(ae,C){super("YAMLSemanticError",ae,C)}},xe=class extends he{constructor(ae,C){super("YAMLSyntaxError",ae,C)}},_e=class extends he{constructor(ae,C){super("YAMLWarning",ae,C)}};function Ge(ae,C,I){return C in ae?Object.defineProperty(ae,C,{value:I,enumerable:!0,configurable:!0,writable:!0}):ae[C]=I,ae}var Qe=class Za extends j{static endOfLine(C,I,H){let W=C[I],K=I;for(;W&&W!==`
50
+ `&&!(H&&(W==="["||W==="]"||W==="{"||W==="}"||W===","));){let z=C[K+1];if(W===":"&&(!z||z===`
51
+ `||z===" "||z===" "||H&&z===",")||(W===" "||W===" ")&&z==="#")break;K+=1,W=z}return K}get strValue(){if(!this.valueRange||!this.context)return null;let{start:C,end:I}=this.valueRange,{src:H}=this.context,W=H[I-1];for(;C<I&&(W===`
52
+ `||W===" "||W===" ");)W=H[--I-1];let K="";for(let Y=C;Y<I;++Y){let G=H[Y];if(G===`
53
+ `){let{fold:pe,offset:fe}=j.foldNewline(H,Y,-1);K+=pe,Y=fe}else if(G===" "||G===" "){let pe=Y,fe=H[Y+1];for(;Y<I&&(fe===" "||fe===" ");)Y+=1,fe=H[Y+1];fe!==`
54
+ `&&(K+=Y>pe?H.slice(pe,Y+1):G)}else K+=G}let z=H[C];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(C){let{indent:I,inFlow:H,src:W}=this.context,K=C,z=C;for(let Y=W[K];Y===`
55
+ `&&!j.atDocumentBoundary(W,K+1);Y=W[K]){let G=j.endOfBlockIndent(W,I,K+1);if(G===null||W[G]==="#")break;W[G]===`
56
+ `?K=G:(z=Za.endOfLine(W,G,H),K=z)}return this.valueRange.isEmpty()&&(this.valueRange.start=C),this.valueRange.end=z,z}parse(C,I){this.context=C;let{inFlow:H,src:W}=C,K=I,z=W[K];return z&&z!=="#"&&z!==`
57
+ `&&(K=Za.endOfLine(W,I,H)),this.valueRange=new ie(I,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=ce,l.YAMLSemanticError=$e,l.YAMLSyntaxError=xe,l.YAMLWarning=_e,l._defineProperty=Ge,l.defaultTagPrefix=S,l.defaultTags=T}}),Ti=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}#`)}
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 k(b,m,w){if(Array.isArray(b))return b.map((x,_)=>k(x,String(_),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 _=b.toJSON(m,w);return x&&w.onCreate&&w.onCreate(_),_}return(!w||!w.keep)&&typeof b=="bigint"?Number(b):b}var v=class extends T{constructor(b){super(),this.value=b}toJSON(b,m){return m&&m.keep?this.value:k(this.value,b,m)}toString(){return String(this.value)}};function L(b,m,w){let x=w;for(let _=m.length-1;_>=0;--_){let O=m[_];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 Bn extends T{constructor(m){super(),c._defineProperty(this,"items",[]),this.schema=m}addIn(m,w){if(Q(m))this.add(w);else{let[x,..._]=m,O=this.get(x,!0);if(O instanceof Bn)O.addIn(_,w);else if(O===void 0&&this.schema)this.set(x,L(this.schema,_,w));else throw new Error(`Expected YAML collection at ${x}. Remaining path: ${_}`)}}deleteIn([m,...w]){if(w.length===0)return this.delete(m);let x=this.get(m,!0);if(x instanceof Bn)return x.deleteIn(w);throw new Error(`Expected YAML collection at ${m}. Remaining path: ${w}`)}getIn([m,...w],x){let _=this.get(m,!0);return w.length===0?!x&&_ instanceof v?_.value:_:_ instanceof Bn?_.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 v&&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 Bn?x.hasIn(w):!1}setIn([m,...w],x){if(w.length===0)this.set(m,x);else{let _=this.get(m,!0);if(_ instanceof Bn)_.setIn(w,x);else if(_===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:_,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=_&&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(Qg=>{gt.push({type:"comment",str:`#${Qg}`})}),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 Rt=de(Ve,m,()=>Je=null,()=>Ne=!0);return be&&!Ze&&Rt.includes(`
61
- `)&&(Ze=!0),be&&at<this.items.length-1&&(Rt+=","),Rt=S(Rt,O,Je),Ne&&(Je||be)&&(Ne=!1),gt.push({type:"item",str:Rt}),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,Rt)=>Je+Rt.length+2,2)>Bn.maxFlowStringSingleLineLength){Ke=gt;for(let Je of at)Ke+=Je?`
62
- ${X}${W}${Je}`:`
60
+ `+w.replace(/^/gm,`${m||""}#`):b}var T=class{};function k(b,m,w){if(Array.isArray(b))return b.map((x,_)=>k(x,String(_),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 _=b.toJSON(m,w);return x&&w.onCreate&&w.onCreate(_),_}return(!w||!w.keep)&&typeof b=="bigint"?Number(b):b}var v=class extends T{constructor(b){super(),this.value=b}toJSON(b,m){return m&&m.keep?this.value:k(this.value,b,m)}toString(){return String(this.value)}};function L(b,m,w){let x=w;for(let _=m.length-1;_>=0;--_){let O=m[_];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 Bn extends T{constructor(m){super(),c._defineProperty(this,"items",[]),this.schema=m}addIn(m,w){if(Q(m))this.add(w);else{let[x,..._]=m,O=this.get(x,!0);if(O instanceof Bn)O.addIn(_,w);else if(O===void 0&&this.schema)this.set(x,L(this.schema,_,w));else throw new Error(`Expected YAML collection at ${x}. Remaining path: ${_}`)}}deleteIn([m,...w]){if(w.length===0)return this.delete(m);let x=this.get(m,!0);if(x instanceof Bn)return x.deleteIn(w);throw new Error(`Expected YAML collection at ${m}. Remaining path: ${w}`)}getIn([m,...w],x){let _=this.get(m,!0);return w.length===0?!x&&_ instanceof v?_.value:_:_ instanceof Bn?_.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 v&&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 Bn?x.hasIn(w):!1}setIn([m,...w],x){if(w.length===0)this.set(m,x);else{let _=this.get(m,!0);if(_ instanceof Bn)_.setIn(w,x);else if(_===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:_,itemIndent:O},D,F){let{indent:V,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=_&&this.hasAllNullValues();m=Object.assign({},m,{allNullValues:nt,indent:O,inFlow:be,type:null});let Ne=!1,Ze=!1,Fe=this.items.reduce((gt,He,at)=>{let Je;He&&(!Ne&&He.spaceBefore&&gt.push({type:"comment",str:""}),He.commentBefore&&He.commentBefore.match(/^.*$/gm).forEach(ey=>{gt.push({type:"comment",str:`#${ey}`})}),He.comment&&(Je=He.comment),be&&(!Ne&&He.spaceBefore||He.commentBefore||He.comment||He.key&&(He.key.commentBefore||He.key.comment)||He.value&&(He.value.commentBefore||He.value.comment))&&(Ze=!0)),Ne=!1;let Rt=de(He,m,()=>Je=null,()=>Ne=!0);return be&&!Ze&&Rt.includes(`
61
+ `)&&(Ze=!0),be&&at<this.items.length-1&&(Rt+=","),Rt=S(Rt,O,Je),Ne&&(Je||be)&&(Ne=!1),gt.push({type:"item",str:Rt}),gt},[]),Ke;if(Fe.length===0)Ke=x.start+x.end;else if(be){let{start:gt,end:He}=x,at=Fe.map(Je=>Je.str);if(Ze||at.reduce((Je,Rt)=>Je+Rt.length+2,2)>Bn.maxFlowStringSingleLineLength){Ke=gt;for(let Je of at)Ke+=Je?`
62
+ ${X}${V}${Je}`:`
63
63
  `;Ke+=`
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}`:`
64
+ ${V}${He}`}else Ke=`${gt} ${at.join(" ")} ${He}`}else{let gt=Fe.map(w);Ke=gt.shift();for(let He of gt)Ke+=He?`
65
+ ${V}${He}`:`
66
66
  `}return this.comment?(Ke+=`
67
- `+this.comment.replace(/^/gm,`${W}#`),D&&D()):Ne&&F&&F(),Ke}};c._defineProperty(N,"maxFlowStringSingleLineLength",60);function ie(b){let m=b instanceof v?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 v?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 _ of this.items)w.push(k(_,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 hu extends T{constructor(m,w=null){super(),this.key=m,this.value=w,this.type=hu.Type.PAIR}get commentBefore(){return this.key instanceof T?this.key.commentBefore:void 0}set commentBefore(m){if(this.key==null&&(this.key=new v(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=k(this.key,"",m);if(w instanceof Map){let _=k(this.value,x,m);w.set(x,_)}else if(w instanceof Set)w.add(x);else{let _=he(this.key,x,m),O=k(this.value,_,m);_ in w?Object.defineProperty(w,_,{value:O,writable:!0,enumerable:!0,configurable:!0}):w[_]=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:_,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 Rt="With simple keys, collection cannot be used as a key value";throw new Error(Rt)}}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 Rt=W.commentBefore.replace(/^/gm,`${m.indent}#`);gt+=`
70
- ${Rt}`}Ve=W.comment}else W&&typeof W=="object"&&(W=be.schema.createNode(W,!0));m.implicitKey=!1,!de&&!this.comment&&W instanceof v&&(m.indentAtStart=Ke.length+1),Fe=!1,!O&&_>=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(`
67
+ `+this.comment.replace(/^/gm,`${V}#`),D&&D()):Ne&&F&&F(),Ke}};c._defineProperty(N,"maxFlowStringSingleLineLength",60);function ie(b){let m=b instanceof v?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 v?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 _ of this.items)w.push(k(_,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 hu extends T{constructor(m,w=null){super(),this.key=m,this.value=w,this.type=hu.Type.PAIR}get commentBefore(){return this.key instanceof T?this.key.commentBefore:void 0}set commentBefore(m){if(this.key==null&&(this.key=new v(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=k(this.key,"",m);if(w instanceof Map){let _=k(this.value,x,m);w.set(x,_)}else if(w instanceof Set)w.add(x);else{let _=he(this.key,x,m),O=k(this.value,_,m);_ in w?Object.defineProperty(w,_,{value:O,writable:!0,enumerable:!0,configurable:!0}):w[_]=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:_,indentSeq:O,simpleKeys:D}=m.doc.options,{key:F,value:V}=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 Rt="With simple keys, collection cannot be used as a key value";throw new Error(Rt)}}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="",He=null;if(V instanceof T){if(V.spaceBefore&&(gt=`
69
+ `),V.commentBefore){let Rt=V.commentBefore.replace(/^/gm,`${m.indent}#`);gt+=`
70
+ ${Rt}`}He=V.comment}else V&&typeof V=="object"&&(V=be.schema.createNode(V,!0));m.implicitKey=!1,!de&&!this.comment&&V instanceof v&&(m.indentAtStart=Ke.length+1),Fe=!1,!O&&_>=2&&!m.inFlow&&!de&&V instanceof j&&V.type!==c.Type.FLOW_SEQ&&!V.tag&&!be.anchors.getName(V)&&(m.indent=m.indent.substr(2));let at=Ze(V,m,()=>He=null,()=>Fe=!0),Je=" ";return gt||this.comment?Je=`${gt}
71
+ ${m.indent}`:!de&&V 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(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 _=$e(x,m);_>w&&(w=_)}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 fu extends T{static stringify({range:m,source:w},{anchors:x,doc:_,implicitKey:O,inStringifyKey:D}){let F=Object.keys(x).find(X=>x[X]===w);if(!F&&D&&(F=_.anchors.getName(w)||_.anchors.newName()),F)return`*${F}${O?" ":""}`;let W=_.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 k(this.source,m,w);let{anchors:x,maxAliasCount:_}=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(_>=0&&(O.count+=1,O.aliasCount===0&&(O.aliasCount=$e(this.source,x)),O.count*O.aliasCount>_)){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 fu.stringify(this,m)}};c._defineProperty(xe,"default",!0);function _e(b,m){let w=m instanceof v?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=_e(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 _=this.items.findIndex(O=>x(b,O)<0);_===-1?this.items.push(b):this.items.splice(_,0,b)}else this.items.push(b)}delete(b){let m=_e(this.items,b);return m?this.items.splice(this.items.indexOf(m),1).length>0:!1}get(b,m){let w=_e(this.items,b),x=w&&w.value;return!m&&x instanceof v?x.value:x}has(b){return!!_e(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 _ of this.items)_.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="<<",ae=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 v(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[_,O]of x)m instanceof Map?m.has(_)||m.set(_,O):m instanceof Set?m.add(_):Object.prototype.hasOwnProperty.call(m,_)||Object.defineProperty(m,_,{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}},C={defaultType:c.Type.BLOCK_LITERAL,lineWidth:76},I={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:_,resolve:O}of m)if(_){let D=b.match(_);if(D){let F=O.apply(null,D);return F instanceof v||(F=new v(F)),x&&(F.format=x),F}}return w&&(b=w(b)),new v(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:_=80,minContentWidth:O=20,onFold:D,onOverflow:F}){if(!_||_<0)return b;let W=Math.max(1+O,1+_-m.length);if(b.length<=W)return b;let X=[],de={},be=_-m.length;typeof x=="number"&&(x>_-Math.max(2,O)?X.push(0):be=_-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!==`
74
+ `&&(Je=""),Fe&&!He&&x&&x(),S(Ke+Je+at,m.indent,He)}};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 _=$e(x,m);_>w&&(w=_)}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 fu extends T{static stringify({range:m,source:w},{anchors:x,doc:_,implicitKey:O,inStringifyKey:D}){let F=Object.keys(x).find(X=>x[X]===w);if(!F&&D&&(F=_.anchors.getName(w)||_.anchors.newName()),F)return`*${F}${O?" ":""}`;let V=_.anchors.getName(w)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${V} [${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 k(this.source,m,w);let{anchors:x,maxAliasCount:_}=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(_>=0&&(O.count+=1,O.aliasCount===0&&(O.aliasCount=$e(this.source,x)),O.count*O.aliasCount>_)){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 fu.stringify(this,m)}};c._defineProperty(xe,"default",!0);function _e(b,m){let w=m instanceof v?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=_e(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 _=this.items.findIndex(O=>x(b,O)<0);_===-1?this.items.push(b):this.items.splice(_,0,b)}else this.items.push(b)}delete(b){let m=_e(this.items,b);return m?this.items.splice(this.items.indexOf(m),1).length>0:!1}get(b,m){let w=_e(this.items,b),x=w&&w.value;return!m&&x instanceof v?x.value:x}has(b){return!!_e(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 _ of this.items)_.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="<<",ae=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 v(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[_,O]of x)m instanceof Map?m.has(_)||m.set(_,O):m instanceof Set?m.add(_):Object.prototype.hasOwnProperty.call(m,_)||Object.defineProperty(m,_,{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}},C={defaultType:c.Type.BLOCK_LITERAL,lineWidth:76},I={trueStr:"true",falseStr:"false"},H={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:_,resolve:O}of m)if(_){let D=b.match(_);if(D){let F=O.apply(null,D);return F instanceof v||(F=new v(F)),x&&(F.format=x),F}}return w&&(b=w(b)),new v(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:_=80,minContentWidth:O=20,onFold:D,onOverflow:F}){if(!_||_<0)return b;let V=Math.max(1+O,1+_-m.length);if(b.length<=V)return b;let X=[],de={},be=_-m.length;typeof x=="number"&&(x>_-Math.max(2,O)?X.push(0):be=_-x);let nt,Ne,Ze=!1,Fe=-1,Ke=-1,gt=-1;w===G&&(Fe=fe(b,Fe),Fe!==-1&&(be=Fe+V));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+V,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+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],Rt=X[at+1]||b.length;Je===0?Ve=`
79
- ${m}${b.slice(0,Rt)}`:(w===pe&&de[Je]&&(Ve+=`${b[Je]}\\`),Ve+=`
80
- ${m}${b.slice(Je+1,Rt)}`)}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,_=b.length;if(_<=x)return!1;for(let O=0,D=0;O<_;++O)if(b[O]===`
81
- `){if(O-D>x)return!0;if(D=O+1,_-D<=x)return!1}return!0}function mt(b,m){let{implicitKey:w}=m,{jsonEncoding:x,minMultiLineLength:_}=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<_)X+=1;else{for(F+=O.slice(W,X)+`
78
+ `&&Je!==" "&&(nt=Fe)}if(Fe>=be)if(nt)X.push(nt),be=nt+V,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+V,nt=void 0}else Ze=!0}Ne=at}if(Ze&&F&&F(),X.length===0)return b;D&&D();let He=b.slice(0,X[0]);for(let at=0;at<X.length;++at){let Je=X[at],Rt=X[at+1]||b.length;Je===0?He=`
79
+ ${m}${b.slice(0,Rt)}`:(w===pe&&de[Je]&&(He+=`${b[Je]}\\`),He+=`
80
+ ${m}${b.slice(Je+1,Rt)}`)}return He}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,_=b.length;if(_<=x)return!1;for(let O=0,D=0;O<_;++O)if(b[O]===`
81
+ `){if(O-D>x)return!0;if(D=O+1,_-D<=x)return!1}return!0}function mt(b,m){let{implicitKey:w}=m,{jsonEncoding:x,minMultiLineLength:_}=K.doubleQuoted,O=JSON.stringify(b);if(x)return O;let D=m.indent||(ot(b)?" ":""),F="",V=0;for(let X=0,de=O[X];de;de=O[++X])if(de===" "&&O[X+1]==="\\"&&O[X+2]==="n"&&(F+=O.slice(V,X)+"\\ ",X+=1,V=X,de="\\"),de==="\\")switch(O[X+1]){case"u":{F+=O.slice(V,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,V=X+1}break;case"n":if(w||O[X+2]==='"'||O.length<_)X+=1;else{for(F+=O.slice(V,X)+`
82
82
 
83
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 se({comment:b,type:m,value:w},x,_,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+`
84
+ `,X+=2;F+=D,O[X+2]===" "&&(F+="\\"),X+=1,V=X+1}break;default:X+=1}return F=V?F+O.slice(V):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 se({comment:b,type:m,value:w},x,_,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",V=m===c.Type.BLOCK_FOLDED?!1:m===c.Type.BLOCK_LITERAL?!0:!st(w,K.fold.lineWidth,D.length),X=V?"|":">";if(!w)return X+`
86
86
  `;let de="",be="";if(w=w.replace(/[\n\t ]*$/,Ne=>{let Ze=Ne.indexOf(`
87
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," "),_&&_()),!w)return`${X}${F}
88
- ${D}${be}`;if(W)return w=w.replace(/\n+/g,`$&${D}`),`${X}
88
+ ${D}${be}`;if(V)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:_,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):se(b,m,w,x);if(!W&&!de&&O!==c.Type.PLAIN&&D.indexOf(`
91
+ ${D}${nt}`}function E(b,m,w,x){let{comment:_,type:O,value:D}=b,{actualString:F,implicitKey:V,indent:X,inFlow:de}=m;if(V&&/[\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 V||de||D.indexOf(`
92
+ `)===-1?D.indexOf('"')!==-1&&D.indexOf("'")===-1?xt(D,m):mt(D,m):se(b,m,w,x);if(!V&&!de&&O!==c.Type.PLAIN&&D.indexOf(`
93
93
  `)!==-1)return se(b,m,w,x);if(X===""&&ot(D))return m.forceBlockIndent=!0,se(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=W?be:Ee(be,X,Y,it(m));return _&&!de&&(nt.indexOf(`
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=V?be:Ee(be,X,Y,it(m));return _&&!de&&(nt.indexOf(`
95
95
  `)!==-1||_.indexOf(`
96
- `)!==-1)?(w&&w(),f(nt,X,_)):nt}function J(b,m,w,x){let{defaultType:_}=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 se(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(_),de===null))throw new Error(`Unsupported default string type ${_}`);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 _=JSON.stringify(x);if(!b&&m&&(!w||w==="tag:yaml.org,2002:float")&&/^\d/.test(_)){let O=_.indexOf(".");O<0&&(O=_.length,_+=".");let D=m-(_.length-O-1);for(;D-- >0;)_+="0"}return _}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 _;for(let O=m.items.length-1;O>=0;--O){let D=m.items[O];if(!D||D.type!==c.Type.COMMENT){_=D;break}}if(_&&_.char!==w){let O=`Expected ${x} to end with ${w}`,D;typeof _.offset=="number"?(D=new c.YAMLSemanticError(m,O),D.offset=_.offset+1):(D=new c.YAMLSemanticError(_,O),_.range&&_.range.end&&(D.offset=_.range.end-_.range.start)),b.push(D)}}function Pe(b,m){let w=m.context.src[m.range.start-1];if(w!==`
96
+ `)!==-1)?(w&&w(),f(nt,X,_)):nt}function J(b,m,w,x){let{defaultType:_}=K,{implicitKey:O,inFlow:D}=m,{type:F,value:V}=b;typeof V!="string"&&(V=String(V),b=Object.assign({},b,{value:V}));let X=be=>{switch(be){case c.Type.BLOCK_FOLDED:case c.Type.BLOCK_LITERAL:return se(b,m,w,x);case c.Type.QUOTE_DOUBLE:return mt(V,m);case c.Type.QUOTE_SINGLE:return xt(V,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(V)||(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(_),de===null))throw new Error(`Unsupported default string type ${_}`);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 _=JSON.stringify(x);if(!b&&m&&(!w||w==="tag:yaml.org,2002:float")&&/^\d/.test(_)){let O=_.indexOf(".");O<0&&(O=_.length,_+=".");let D=m-(_.length-O-1);for(;D-- >0;)_+="0"}return _}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 _;for(let O=m.items.length-1;O>=0;--O){let D=m.items[O];if(!D||D.type!==c.Type.COMMENT){_=D;break}}if(_&&_.char!==w){let O=`Expected ${x} to end with ${w}`,D;typeof _.offset=="number"?(D=new c.YAMLSemanticError(m,O),D.offset=_.offset+1):(D=new c.YAMLSemanticError(_,O),_.range&&_.range.end&&(D.offset=_.range.end-_.range.start)),b.push(D)}}function Pe(b,m){let w=m.context.src[m.range.start-1];if(w!==`
97
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 Bt(b,m){for(let{afterKey:w,before:x,comment:_}of m){let O=b.items[x];O?(w&&O.value&&(O=O.value),_===void 0?(w||!O.commentBefore)&&(O.spaceBefore=!0):O.commentBefore?O.commentBefore+=`
98
98
  `+_:O.commentBefore=_):_!==void 0&&(b.comment?b.comment+=`
99
- `+_:b.comment=_)}}function fn(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 mn(b,m){let{handle:w,suffix:x}=m.tag,_=b.tagPrefixes.find(O=>O.handle===w);if(!_){let O=b.getDefaults().tagPrefixes;if(O&&(_=O.find(D=>D.handle===w)),!_)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 _.prefix+decodeURIComponent(x)}function rn(b,m){let{tag:w,type:x}=m,_=!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)_=!0;else try{return mn(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 _?c.defaultTags.STR:null;default:return null}}function Or(b,m,w){let{tags:x}=b.schema,_=[];for(let D of x)if(D.tag===w)if(D.test)_.push(D);else{let F=D.resolve(b,m);return F instanceof N?F:new v(F)}let O=fn(b,m);return typeof O=="string"&&_.length>0?z(O,_,x.scalarFallback):null}function _i({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 qg(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=_i(m);if(!x)throw new Error(`The tag ${w} is unavailable`);let _=`The tag ${w} is unavailable, falling back to ${x}`;b.warnings.push(new c.YAMLWarning(m,_));let O=Or(b,m,x);return O.tag=w,O}catch(x){let _=new c.YAMLReferenceError(m,x.message);return _.stack=x.stack,b.errors.push(_),null}}var jg=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 Bg(b,m){let w={before:[],after:[]},x=!1,_=!1,O=jg(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(_){let W="A node can have at most one tag";b.push(new c.YAMLSemanticError(m,W))}_=!0;break}return{comments:w,hasAnchor:x,hasTag:_}}function zg(b,m){let{anchors:w,errors:x,schema:_}=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=rn(b,m);if(O)return qg(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=fn(b,m);return z(D,_.tags,_.tags.scalarFallback)}catch(D){return D.source||(D.source=m),x.push(D),null}}function En(b,m){if(!m)return null;m.error&&b.errors.push(m.error);let{comments:w,hasAnchor:x,hasTag:_}=Bg(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||_)){let D="An alias node must not specify any properties";b.errors.push(new c.YAMLSemanticError(m,D))}let O=zg(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(`
99
+ `+_:b.comment=_)}}function fn(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 mn(b,m){let{handle:w,suffix:x}=m.tag,_=b.tagPrefixes.find(O=>O.handle===w);if(!_){let O=b.getDefaults().tagPrefixes;if(O&&(_=O.find(D=>D.handle===w)),!_)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 _.prefix+decodeURIComponent(x)}function rn(b,m){let{tag:w,type:x}=m,_=!1;if(w){let{handle:O,suffix:D,verbatim:F}=w;if(F){if(F!=="!"&&F!=="!!")return F;let V=`Verbatim tags aren't resolved, so ${F} is invalid.`;b.errors.push(new c.YAMLSemanticError(m,V))}else if(O==="!"&&!D)_=!0;else try{return mn(b,m)}catch(V){b.errors.push(V)}}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 _?c.defaultTags.STR:null;default:return null}}function Or(b,m,w){let{tags:x}=b.schema,_=[];for(let D of x)if(D.tag===w)if(D.test)_.push(D);else{let F=D.resolve(b,m);return F instanceof N?F:new v(F)}let O=fn(b,m);return typeof O=="string"&&_.length>0?z(O,_,x.scalarFallback):null}function _i({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 Bg(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=_i(m);if(!x)throw new Error(`The tag ${w} is unavailable`);let _=`The tag ${w} is unavailable, falling back to ${x}`;b.warnings.push(new c.YAMLWarning(m,_));let O=Or(b,m,x);return O.tag=w,O}catch(x){let _=new c.YAMLReferenceError(m,x.message);return _.stack=x.stack,b.errors.push(_),null}}var zg=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 Hg(b,m){let w={before:[],after:[]},x=!1,_=!1,O=zg(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:V,valueRange:X}=m;(X&&(D>X.start||V&&D>V.start)?w.after:w.before).push(m.context.src.slice(D+1,F));break}case c.Char.ANCHOR:if(x){let V="A node can have at most one anchor";b.push(new c.YAMLSemanticError(m,V))}x=!0;break;case c.Char.TAG:if(_){let V="A node can have at most one tag";b.push(new c.YAMLSemanticError(m,V))}_=!0;break}return{comments:w,hasAnchor:x,hasTag:_}}function Vg(b,m){let{anchors:w,errors:x,schema:_}=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 V=new xe(F);return w._cstAliases.push(V),V}let O=rn(b,m);if(O)return Bg(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=fn(b,m);return z(D,_.tags,_.tags.scalarFallback)}catch(D){return D.source||(D.source=m),x.push(D),null}}function En(b,m){if(!m)return null;m.error&&b.errors.push(m.error);let{comments:w,hasAnchor:x,hasTag:_}=Hg(b.errors,m);if(x){let{anchors:D}=b,F=m.anchor,V=D.getNode(F);V&&(D.map[D.newName(F)]=V),D.map[F]=m}if(m.type===c.Type.ALIAS&&(x||_)){let D="An alias node must not specify any properties";b.errors.push(new c.YAMLSemanticError(m,D))}let O=Vg(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
100
  `);D&&(O.commentBefore=O.commentBefore?`${O.commentBefore}
101
101
  ${D}`:D);let F=w.after.join(`
102
102
  `);F&&(O.comment=O.comment?`${O.comment}
103
- ${F}`:F)}return m.resolved=O}function Vg(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?Jg(b,m):Yg(b,m),_=new Ge;_.items=x,Bt(_,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 ae(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=_,_}var Wg=({context:{lineStart:b,node:m,src:w},props:x})=>{if(x.length===0)return!1;let{start:_}=x[0];if(m&&_>m.valueRange.start||w[_]!==c.Char.COMMENT)return!1;for(let O=b;O<_;++O)if(w[O]===`
104
- `)return!1;return!0};function Hg(b,m){if(!Wg(b))return;let w=b.getPropValue(0,c.Char.COMMENT,!0),x=!1,_=m.value.commentBefore;if(_&&_.startsWith(w))m.value.commentBefore=_.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 Yg(b,m){let w=[],x=[],_,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:!!_,before:x.length});break;case c.Type.COMMENT:w.push({afterKey:!!_,before:x.length,comment:F.comment});break;case c.Type.MAP_KEY:_!==void 0&&x.push(new ce(_)),F.error&&b.errors.push(F.error),_=En(b,F.node),O=null;break;case c.Type.MAP_VALUE:{if(_===void 0&&(_=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(_,En(b,W));Hg(F,X),x.push(X),_&&typeof O=="number"&&F.range.start>O+1024&&b.errors.push(qe(m,_)),_=void 0,O=null}break;default:_!==void 0&&x.push(new ce(_)),_=En(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 _!==void 0&&x.push(new ce(_)),{comments:w,items:x}}function Jg(b,m){let w=[],x=[],_,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==="?"&&_===void 0&&!O){O=!0,D=":";continue}if(X===":"){if(_===void 0&&(_=null),D===":"){D=",";continue}}else if(O&&(_===void 0&&X!==","&&(_=null),O=!1),_!==void 0&&(x.push(new ce(_)),_=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:!!_,before:x.length}):W.type===c.Type.COMMENT?(Pe(b.errors,W),w.push({afterKey:!!_,before:x.length,comment:W.comment})):_===void 0?(D===","&&b.errors.push(new c.YAMLSemanticError(W,"Separator , missing in flow map")),_=En(b,W)):(D!==","&&b.errors.push(new c.YAMLSemanticError(W,"Indicator : missing in flow map entry")),x.push(new ce(_,En(b,W))),_=void 0,O=!1)}return ge(b.errors,m),_!==void 0&&x.push(new ce(_)),{comments:w,items:x}}function Gg(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?Xg(b,m):Kg(b,m),_=new j;if(_.items=x,Bt(_,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=_,_}function Kg(b,m){let w=[],x=[];for(let _=0;_<m.items.length;++_){let O=m.items[_];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(En(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 Xg(b,m){let w=[],x=[],_=!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!==":"&&(_||O!==void 0)&&(_&&O===void 0&&(O=F?x.pop():null),x.push(new ce(O)),_=!1,O=void 0,D=null),be===F)F=null;else if(!F&&be==="?")_=!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(!_&&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,_=!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=En(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=ae,l.Node=T,l.Pair=ce,l.Scalar=v,l.YAMLMap=Ge,l.YAMLSeq=j,l.addComment=S,l.binaryOptions=C,l.boolOptions=I,l.findPair=_e,l.intOptions=V,l.isEmptyPath=Q,l.nullOptions=H,l.resolveMap=Vg,l.resolveNode=En,l.resolveSeq=Gg,l.resolveString=fn,l.strOptions=K,l.stringifyNumber=me,l.stringifyString=J,l.toJSON=k}}),Fa=Ft({"node_modules/yaml/dist/warnings-1000a372.js"(l){var c=kr(),f=Ti(),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,se=0;xt<st;++xt,se+=ot)mt[xt]=it.substr(se,ot);G=mt.join(Y===c.Type.BLOCK_LITERAL?`
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):Gg(b,m),_=new Ge;_.items=x,Bt(_,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 ae(x[D]);let V=x[D].value.items,X=null;V.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 V=D+1;V<x.length;++V){let{key:X}=x[V];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=_,_}var Yg=({context:{lineStart:b,node:m,src:w},props:x})=>{if(x.length===0)return!1;let{start:_}=x[0];if(m&&_>m.valueRange.start||w[_]!==c.Char.COMMENT)return!1;for(let O=b;O<_;++O)if(w[O]===`
104
+ `)return!1;return!0};function Jg(b,m){if(!Yg(b))return;let w=b.getPropValue(0,c.Char.COMMENT,!0),x=!1,_=m.value.commentBefore;if(_&&_.startsWith(w))m.value.commentBefore=_.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 Gg(b,m){let w=[],x=[],_,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:!!_,before:x.length});break;case c.Type.COMMENT:w.push({afterKey:!!_,before:x.length,comment:F.comment});break;case c.Type.MAP_KEY:_!==void 0&&x.push(new ce(_)),F.error&&b.errors.push(F.error),_=En(b,F.node),O=null;break;case c.Type.MAP_VALUE:{if(_===void 0&&(_=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 V=F.node;if(!V&&F.props.length>0){V=new c.PlainValue(c.Type.PLAIN,[]),V.context={parent:F,src:F.context.src};let de=F.range.start+1;if(V.range={start:de,end:de},V.valueRange={start:de,end:de},typeof F.range.origStart=="number"){let be=F.range.origStart+1;V.range.origStart=V.range.origEnd=be,V.valueRange.origStart=V.valueRange.origEnd=be}}let X=new ce(_,En(b,V));Jg(F,X),x.push(X),_&&typeof O=="number"&&F.range.start>O+1024&&b.errors.push(qe(m,_)),_=void 0,O=null}break;default:_!==void 0&&x.push(new ce(_)),_=En(b,F),O=F.range.start,F.error&&b.errors.push(F.error);e:for(let V=D+1;;++V){let X=m.items[V];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 V="Implicit map keys need to be on a single line";b.errors.push(new c.YAMLSemanticError(F,V))}}}return _!==void 0&&x.push(new ce(_)),{comments:w,items:x}}function Kg(b,m){let w=[],x=[],_,O=!1,D="{";for(let F=0;F<m.items.length;++F){let V=m.items[F];if(typeof V.char=="string"){let{char:X,offset:de}=V;if(X==="?"&&_===void 0&&!O){O=!0,D=":";continue}if(X===":"){if(_===void 0&&(_=null),D===":"){D=",";continue}}else if(O&&(_===void 0&&X!==","&&(_=null),O=!1),_!==void 0&&(x.push(new ce(_)),_=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 V.type===c.Type.BLANK_LINE?w.push({afterKey:!!_,before:x.length}):V.type===c.Type.COMMENT?(Pe(b.errors,V),w.push({afterKey:!!_,before:x.length,comment:V.comment})):_===void 0?(D===","&&b.errors.push(new c.YAMLSemanticError(V,"Separator , missing in flow map")),_=En(b,V)):(D!==","&&b.errors.push(new c.YAMLSemanticError(V,"Indicator : missing in flow map entry")),x.push(new ce(_,En(b,V))),_=void 0,O=!1)}return ge(b.errors,m),_!==void 0&&x.push(new ce(_)),{comments:w,items:x}}function Xg(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?Zg(b,m):Qg(b,m),_=new j;if(_.items=x,Bt(_,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=_,_}function Qg(b,m){let w=[],x=[];for(let _=0;_<m.items.length;++_){let O=m.items[_];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(En(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 Zg(b,m){let w=[],x=[],_=!1,O,D=null,F="[",V=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!==void 0)&&(_&&O===void 0&&(O=F?x.pop():null),x.push(new ce(O)),_=!1,O=void 0,D=null),be===F)F=null;else if(!F&&be==="?")_=!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(!_&&typeof D=="number"){let Ne=de.range?de.range.start:de.offset;Ne>D+1024&&b.errors.push(qe(m,O));let{src:Ze}=V.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(V,Ke));break}}}else O=null;D=null,_=!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=En(b,de);O===void 0?(x.push(be),V=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=ae,l.Node=T,l.Pair=ce,l.Scalar=v,l.YAMLMap=Ge,l.YAMLSeq=j,l.addComment=S,l.binaryOptions=C,l.boolOptions=I,l.findPair=_e,l.intOptions=H,l.isEmptyPath=Q,l.nullOptions=W,l.resolveMap=Wg,l.resolveNode=En,l.resolveSeq=Xg,l.resolveString=fn,l.strOptions=K,l.stringifyNumber=me,l.stringifyString=J,l.toJSON=k}}),Fa=Ft({"node_modules/yaml/dist/warnings-1000a372.js"(l){var c=kr(),f=Ti(),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,se=0;xt<st;++xt,se+=ot)mt[xt]=it.substr(se,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 k(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 v={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:T,createNode:k},L=class mu 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=mu.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=k(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 gu extends f.YAMLMap{constructor(){super(),this.tag=gu.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},_e=({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:_e},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:_e},ae={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 C(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 I(z,Y){if(C(!1)){let G=typeof process!="undefined"&&process.emitWarning;G?G(z,Y):console.warn(Y?`${Y}: ${z}`:z)}}function V(z){if(C(!0)){let Y=z.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");I(`The endpoint 'yaml/${Y}' will be removed in a future release.`,"DeprecationWarning")}}var H={};function K(z,Y){if(!H[z]&&C(!0)){H[z]=!0;let G=`The option '${z}' will be removed in a future release`;G+=Y?`, use '${Y}' instead.`:".",I(G,"DeprecationWarning")}}l.binary=S,l.floatTime=Qe,l.intTime=Ge,l.omap=ie,l.pairs=v,l.set=$e,l.timestamp=ae,l.warn=I,l.warnFileDeprecation=V,l.warnOptionDeprecation=K}}),wc=Ft({"node_modules/yaml/dist/Schema-88e323a7.js"(l){var c=kr(),f=Ti(),S=Fa();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 k={createNode:T,default:!0,nodeClass:f.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:f.resolveMap};function v(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:v,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=[k,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")},_e={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},ae={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()},C={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},I=N.concat([ce,$e,xe,_e,Ge,Qe,ae,C]),V=E=>typeof E=="bigint"||Number.isInteger(E),H=({value:E})=>JSON.stringify(E),K=[k,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:I,failsafe:N,json:K,yaml11:fe},it={binary:S.binary,bool:$e,float:C,floatExp:ae,floatNaN:Qe,floatTime:S.floatTime,int:_e,intHex:Ge,intOct:xe,intTime:S.intTime,map:k,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:Bt,wrapScalars:fn}=me;J&&J.startsWith("!!")&&(J=ge+J.slice(2));let mn=ot(E,J,Bt.tags);if(!mn){if(typeof E.toJSON=="function"&&(E=E.toJSON()),!E||typeof E!="object")return fn?new f.Scalar(E):E;mn=E instanceof Map?k:E[Symbol.iterator]?L:k}Pe&&(Pe(mn),delete me.onTagObj);let rn={value:void 0,node:void 0};if(E&&typeof E=="object"&&qe){let Or=qe.get(E);if(Or){let _i=new f.Alias(Or);return me.aliasNodes.push(_i),_i}rn.value=E,qe.set(E,rn)}return rn.node=mn.createNode?mn.createNode(me.schema,E,me):fn?new f.Scalar(E):E,J&&rn.node instanceof f.Node&&(rn.node.tag=J),rn.node}function mt(E,J,me,ge){let Pe=E[ge.replace(/\W/g,"")];if(!Pe){let qe=Object.keys(E).map(Bt=>JSON.stringify(Bt)).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 Bt=Pe[qe];if(typeof Bt=="string"){let fn=J[Bt];if(!fn){let mn=Object.keys(J).map(rn=>JSON.stringify(rn)).join(", ");throw new Error(`Unknown custom tag "${Bt}"; use one of ${mn}`)}Pe[qe]=fn}}return Pe}var xt=(E,J)=>E.key<J.key?-1:E.key>J.key?1:0,se=class yu{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:yu.defaultPrefix,schema:this,wrapScalars:me},Bt=Pe?Object.assign(Pe,qe):qe;return st(J,ge,Bt)}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(se,"defaultPrefix",c.defaultTagPrefix),c._defineProperty(se,"defaultTags",c.defaultTags),l.Schema=se}}),Sc=Ft({"node_modules/yaml/dist/types.js"(l){var c=Ti(),f=wc();kr(),Fa(),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}}),Ua={},$a=()=>Ua,Tc=l=>{Object.assign(Ua,l)},xc=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}},qa=xc,He={},ja=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,vc=class extends qa{constructor(){super(),this.data={...ja},this._defaults=ja}get defaults(){return{...this._defaults}}},kc=vc,Ar=new kc,h.getDefaults=()=>Ar.defaults,Re=h,Ba=["integer","number","string","boolean"],za=Ba.concat(["null"]),Ac=["array","object"].concat(za),Ec=2524608e6,Rc=-1e8,_c=1e8,Oc=-100,Cc=100,nn={ALLOWED_TYPES:Ba,SCALAR_TYPES:za,ALL_TYPES:Ac,MIN_NUMBER:Oc,MAX_NUMBER:Cc,MIN_INTEGER:Rc,MAX_INTEGER:_c,MOST_NEAR_DATETIME:Ec},xi=Da(bc(),1),Ae={pick:y,date:ue,shuffle:P,number:Z,randexp:g},Ic=/^(0|[1-9][0-9]*)$/,Ye={hasProperties:$,getLocalRef:ne,omitProps:A,typecast:je,merge:U,clone:Te,short:ze,hasValue:Ie,notValue:Me,anyValue:ye,validate:ct,validateValueForSchema:tt,validateValueForOneOf:Nt,isKey:$t,template:At,shouldClean:R,clean:St,isEmpty:Lt,clampDate:Ue},Pc=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]=ln(()=>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-/,""),k=this.support[T];if(typeof k=="function"){Object.defineProperty(l,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(v,L)=>k.call(f,l[c[S]],l,c[S],v,L.slice())});break}}}return l}},Mc=Pc,nr=new qa,Va=Sr,Nc=class extends Error{constructor(l,c){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=l,this.path=c}},vi=Nc,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,Lc=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"],Dc=dt,Fc=Un,Uc=Fc,$c=Uc,qc=Xt,jc=qc,Bc=jc,zc=An,Wa=Tr,Vc=Ra,Wc=`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 k(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 v={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:T,createNode:k},L=class mu 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=mu.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=k(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 gu extends f.YAMLMap{constructor(){super(),this.tag=gu.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},_e=({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:_e},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:_e},ae={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 C(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 I(z,Y){if(C(!1)){let G=typeof process!="undefined"&&process.emitWarning;G?G(z,Y):console.warn(Y?`${Y}: ${z}`:z)}}function H(z){if(C(!0)){let Y=z.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");I(`The endpoint 'yaml/${Y}' will be removed in a future release.`,"DeprecationWarning")}}var W={};function K(z,Y){if(!W[z]&&C(!0)){W[z]=!0;let G=`The option '${z}' will be removed in a future release`;G+=Y?`, use '${Y}' instead.`:".",I(G,"DeprecationWarning")}}l.binary=S,l.floatTime=Qe,l.intTime=Ge,l.omap=ie,l.pairs=v,l.set=$e,l.timestamp=ae,l.warn=I,l.warnFileDeprecation=H,l.warnOptionDeprecation=K}}),wc=Ft({"node_modules/yaml/dist/Schema-88e323a7.js"(l){var c=kr(),f=Ti(),S=Fa();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 k={createNode:T,default:!0,nodeClass:f.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:f.resolveMap};function v(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:v,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=[k,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")},_e={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},ae={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()},C={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},I=N.concat([ce,$e,xe,_e,Ge,Qe,ae,C]),H=E=>typeof E=="bigint"||Number.isInteger(E),W=({value:E})=>JSON.stringify(E),K=[k,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:H,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})=>H(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:I,failsafe:N,json:K,yaml11:fe},it={binary:S.binary,bool:$e,float:C,floatExp:ae,floatNaN:Qe,floatTime:S.floatTime,int:_e,intHex:Ge,intOct:xe,intTime:S.intTime,map:k,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:Bt,wrapScalars:fn}=me;J&&J.startsWith("!!")&&(J=ge+J.slice(2));let mn=ot(E,J,Bt.tags);if(!mn){if(typeof E.toJSON=="function"&&(E=E.toJSON()),!E||typeof E!="object")return fn?new f.Scalar(E):E;mn=E instanceof Map?k:E[Symbol.iterator]?L:k}Pe&&(Pe(mn),delete me.onTagObj);let rn={value:void 0,node:void 0};if(E&&typeof E=="object"&&qe){let Or=qe.get(E);if(Or){let _i=new f.Alias(Or);return me.aliasNodes.push(_i),_i}rn.value=E,qe.set(E,rn)}return rn.node=mn.createNode?mn.createNode(me.schema,E,me):fn?new f.Scalar(E):E,J&&rn.node instanceof f.Node&&(rn.node.tag=J),rn.node}function mt(E,J,me,ge){let Pe=E[ge.replace(/\W/g,"")];if(!Pe){let qe=Object.keys(E).map(Bt=>JSON.stringify(Bt)).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 Bt=Pe[qe];if(typeof Bt=="string"){let fn=J[Bt];if(!fn){let mn=Object.keys(J).map(rn=>JSON.stringify(rn)).join(", ");throw new Error(`Unknown custom tag "${Bt}"; use one of ${mn}`)}Pe[qe]=fn}}return Pe}var xt=(E,J)=>E.key<J.key?-1:E.key>J.key?1:0,se=class yu{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:yu.defaultPrefix,schema:this,wrapScalars:me},Bt=Pe?Object.assign(Pe,qe):qe;return st(J,ge,Bt)}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(se,"defaultPrefix",c.defaultTagPrefix),c._defineProperty(se,"defaultTags",c.defaultTags),l.Schema=se}}),Sc=Ft({"node_modules/yaml/dist/types.js"(l){var c=Ti(),f=wc();kr(),Fa(),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}}),Ua={},$a=()=>Ua,Tc=l=>{Object.assign(Ua,l)},xc=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}},qa=xc,We={},ja=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,vc=class extends qa{constructor(){super(),this.data={...ja},this._defaults=ja}get defaults(){return{...this._defaults}}},kc=vc,Ar=new kc,d.getDefaults=()=>Ar.defaults,Re=d,Ba=["integer","number","string","boolean"],za=Ba.concat(["null"]),Ac=["array","object"].concat(za),Ec=2524608e6,Rc=-1e8,_c=1e8,Oc=-100,Cc=100,nn={ALLOWED_TYPES:Ba,SCALAR_TYPES:za,ALL_TYPES:Ac,MIN_NUMBER:Oc,MAX_NUMBER:Cc,MIN_INTEGER:Rc,MAX_INTEGER:_c,MOST_NEAR_DATETIME:Ec},xi=Da(bc(),1),Ae={pick:y,date:ue,shuffle:P,number:Z,randexp:g},Ic=/^(0|[1-9][0-9]*)$/,Ye={hasProperties:$,getLocalRef:ne,omitProps:A,typecast:je,merge:U,clone:Te,short:ze,hasValue:Ie,notValue:Me,anyValue:ye,validate:ct,validateValueForSchema:tt,validateValueForOneOf:Nt,isKey:$t,template:At,shouldClean:R,clean:St,isEmpty:Lt,clampDate:Ue},Pc=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]=ln(()=>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-/,""),k=this.support[T];if(typeof k=="function"){Object.defineProperty(l,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(v,L)=>k.call(f,l[c[S]],l,c[S],v,L.slice())});break}}}return l}},Mc=Pc,nr=new qa,Ha=Sr,Nc=class extends Error{constructor(l,c){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=l,this.path=c}},vi=Nc,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,Lc=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"],Dc=dt,Fc=Un,Uc=Fc,$c=Uc,qc=Xt,jc=qc,Bc=jc,zc=An,Va=Tr,Hc=Ra,Vc=`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/),ki=yi,Ai={type:nn.ALLOWED_TYPES},Hc=bi,Ha=_a,Yc=wi,Ei=Si,Jc=Oa,Gc=Ca,Ya="[a-zA-Z][a-zA-Z0-9+-.]*",Ri=`https?://{hostname}(?:${Ya})+`,Kc="(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?",jt={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:Ri,slug:"[a-zA-Z\\d_-]+","uri-reference":`${Ri}${Kc}`,"uri-template":Ri.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${Ya.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)?)$"},jt.iri=jt["uri-reference"],jt["iri-reference"]=jt["uri-reference"],jt["idn-email"]=jt.email,jt["idn-hostname"]=jt.hostname,Xc=new RegExp(`\\{(${Object.keys(jt).join("|")})\\}`),Qc=Ia,Zc=Ma,eu={boolean:$c,null:Bc,array:zc,integer:Vc,number:Wa,object:Hc,string:Zc},Rr=eu,tu=re,nu=({refs:l,schema:c,container:f,synchronous:S,refDepthMax:T,refDepthMin:k})=>{let v={},L={},Q=0,N,ie;return v.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(k,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]=Ae.number(k,T)-1),ie=ce,N=j.$ref;let _e;j.$ref.indexOf("#/")===-1?_e=l[j.$ref]||null:_e=Ye.getLocalRef(c,j.$ref,S&&l)||null;let Ge;if(typeof _e!="undefined"){if(!_e&&Re("ignoreMissingRefs")!==!0)throw new Error(`Reference not found: ${j.$ref}`);L[j.$ref]-=1,Ye.merge(j,_e||{}),Ge=S&&_e&&_e.$ref}return Ge||delete j.$ref,j}if(Array.isArray(j.allOf)){let xe=j.allOf;delete j.allOf,xe.forEach(_e=>{let Ge=v.resolveSchema(_e,null,ce);Ye.merge(j,typeof Ge.thunk=="function"?Ge.thunk(j):Ge),Array.isArray(j.allOf)&&v.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(_e=>Ye.validate(_e,xe))),{thunk(_e){let Ge=Ye.omitProps(j,["anyOf","oneOf"]),Qe=Ae.pick(xe);return Ye.merge(Ge,Qe),xe.forEach(ae=>{ae.required&&ae!==Qe&&ae.required.forEach(C=>{if(Qe.required&&Qe.required.includes(C))return;let I=Ge.required&&Ge.required.includes(C);Ge.properties&&!I&&delete Ge.properties[C],_e&&_e.properties&&delete _e.properties[C]})}),Ge}}}if(Object.keys(j).forEach(xe=>{(Array.isArray(j[xe])||typeof j[xe]=="object")&&!Ye.isKey(xe)&&(j[xe]=v.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)},v},ru=nu,Ja=Dt,Ga=un,Et=Da(Sc(),1),Eg=Et.default.binaryOptions,Rg=Et.default.boolOptions,_g=Et.default.intOptions,Og=Et.default.nullOptions,Cg=Et.default.strOptions,Ig=Et.default.Schema,Pg=Et.default.Alias,Mg=Et.default.Collection,Ng=Et.default.Merge,Lg=Et.default.Node,Dg=Et.default.Pair,Fg=Et.default.Scalar,iu=Et.default.YAMLMap,ou=Et.default.YAMLSeq,_r=$n,hn=new Mc,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=dn(c,l);return Ja(f,l,hn,!0)},rt.generate=(l,c)=>Ga(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=dn(c,l),T={order:1,canRead(v){let L=v.url.replace("/:",":");return S[L]||S[L.split("/").pop()]},read(v,L){try{L(null,this.canRead(v))}catch(Q){L(Q)}}},{$RefParser:k}=$a();return k.bundle(f,l,{resolve:{file:{order:100},http:{order:200},fixedRefs:T},dereference:{circular:"ignore"}}).then(v=>Ja(S,v,hn)).catch(v=>{throw new Error(`Error while resolving schema (${v.message})`)})},rt.resolve=(l,c,f)=>rt.resolveWithContext(l,c,f).then(Ga),rt.resolveYAML=(l,c,f)=>rt.resolveWithContext(l,c,f).then(_r),Tt(),rt.format=Va,rt.option=Re,rt.random=Ae,rt.extend=(l,c)=>(hn.extend(l,c),rt),rt.define=(l,c)=>(hn.define(l,c),rt),rt.reset=l=>(hn.reset(l),Tt(),rt),rt.locate=l=>hn.get(l),rt.VERSION="0.5.5",au={...rt},su=rt}}),$g=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 $g()})();((e,t)=>{e.JSONSchemaFaker=t()})(typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,()=>eo);eo.random.shuffle=function(){return["[placeholder]"]};eo.option({useDefaultValue:!0,alwaysFakeOptionals:!0,fillProperties:!1});function bu(e){return eo.generate(e)}Fl();var hr=Symbol.for("workflow-serialize"),fr=Symbol.for("workflow-deserialize");var kS=Object.defineProperty,AS=Object.defineProperties,ES=Object.getOwnPropertyDescriptors,yf=Object.getOwnPropertySymbols,RS=Object.prototype.hasOwnProperty,_S=Object.prototype.propertyIsEnumerable,bf=(e,t,n)=>t in e?kS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xf=(e,t)=>{for(var n in t||(t={}))RS.call(t,n)&&bf(e,n,t[n]);if(yf)for(var n of yf(t))_S.call(t,n)&&bf(e,n,t[n]);return e},vf=(e,t)=>AS(e,ES(t)),It=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;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]==="`"&&(n=!n)}return n||r},OS=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},CS=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!OS(e,n)&&(t+=1)}return t},Ln=(e,t)=>{let n=!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(n){if(i<t&&t<o)return!0;n=!1,i=-1}else n=!0,i=o}return!1},IS=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,PS=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(IS,(t,n,r,i)=>It(e,i)?t:`${n}\\>${r}`),MS=/(\*\*)([^*]*\*?)$/,NS=/(__)([^_]*?)$/,LS=/(\*\*\*)([^*]*?)$/,DS=/(\*)([^*]*?)$/,FS=/(_)([^_]*?)$/,US=/(`)([^`]*?)$/,$S=/(~~)([^~]*?)$/,Kn=/^[\s_~*`]*$/,kf=/^[\s]*[-*+][\s]+$/,qS=/[\p{L}\p{N}_]/u,jS=/^```[^`\n]*```?$/,BS=/^\*{4,}$/,zS=/(__)([^_]+)_$/,VS=/(~~)([^~]+)~$/,wf=/~~/g,Dn=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:qS.test(e)};var WS=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Af=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Xo=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},HS=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
113
- `)return!1}return!1},Ef=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?HS(e,t):!1;if(e[n]===`
114
- `)return!1}return!1},YS=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
112
+ laborum`.split(/\W/),ki=yi,Ai={type:nn.ALLOWED_TYPES},Wc=bi,Wa=_a,Yc=wi,Ei=Si,Jc=Oa,Gc=Ca,Ya="[a-zA-Z][a-zA-Z0-9+-.]*",Ri=`https?://{hostname}(?:${Ya})+`,Kc="(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?",jt={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:Ri,slug:"[a-zA-Z\\d_-]+","uri-reference":`${Ri}${Kc}`,"uri-template":Ri.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${Ya.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)?)$"},jt.iri=jt["uri-reference"],jt["iri-reference"]=jt["uri-reference"],jt["idn-email"]=jt.email,jt["idn-hostname"]=jt.hostname,Xc=new RegExp(`\\{(${Object.keys(jt).join("|")})\\}`),Qc=Ia,Zc=Ma,eu={boolean:$c,null:Bc,array:zc,integer:Hc,number:Va,object:Wc,string:Zc},Rr=eu,tu=re,nu=({refs:l,schema:c,container:f,synchronous:S,refDepthMax:T,refDepthMin:k})=>{let v={},L={},Q=0,N,ie;return v.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(k,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]=Ae.number(k,T)-1),ie=ce,N=j.$ref;let _e;j.$ref.indexOf("#/")===-1?_e=l[j.$ref]||null:_e=Ye.getLocalRef(c,j.$ref,S&&l)||null;let Ge;if(typeof _e!="undefined"){if(!_e&&Re("ignoreMissingRefs")!==!0)throw new Error(`Reference not found: ${j.$ref}`);L[j.$ref]-=1,Ye.merge(j,_e||{}),Ge=S&&_e&&_e.$ref}return Ge||delete j.$ref,j}if(Array.isArray(j.allOf)){let xe=j.allOf;delete j.allOf,xe.forEach(_e=>{let Ge=v.resolveSchema(_e,null,ce);Ye.merge(j,typeof Ge.thunk=="function"?Ge.thunk(j):Ge),Array.isArray(j.allOf)&&v.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(_e=>Ye.validate(_e,xe))),{thunk(_e){let Ge=Ye.omitProps(j,["anyOf","oneOf"]),Qe=Ae.pick(xe);return Ye.merge(Ge,Qe),xe.forEach(ae=>{ae.required&&ae!==Qe&&ae.required.forEach(C=>{if(Qe.required&&Qe.required.includes(C))return;let I=Ge.required&&Ge.required.includes(C);Ge.properties&&!I&&delete Ge.properties[C],_e&&_e.properties&&delete _e.properties[C]})}),Ge}}}if(Object.keys(j).forEach(xe=>{(Array.isArray(j[xe])||typeof j[xe]=="object")&&!Ye.isKey(xe)&&(j[xe]=v.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)},v},ru=nu,Ja=Dt,Ga=un,Et=Da(Sc(),1),_g=Et.default.binaryOptions,Og=Et.default.boolOptions,Cg=Et.default.intOptions,Ig=Et.default.nullOptions,Pg=Et.default.strOptions,Mg=Et.default.Schema,Ng=Et.default.Alias,Lg=Et.default.Collection,Dg=Et.default.Merge,Fg=Et.default.Node,Ug=Et.default.Pair,$g=Et.default.Scalar,iu=Et.default.YAMLMap,ou=Et.default.YAMLSeq,_r=$n,hn=new Mc,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=dn(c,l);return Ja(f,l,hn,!0)},rt.generate=(l,c)=>Ga(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=dn(c,l),T={order:1,canRead(v){let L=v.url.replace("/:",":");return S[L]||S[L.split("/").pop()]},read(v,L){try{L(null,this.canRead(v))}catch(Q){L(Q)}}},{$RefParser:k}=$a();return k.bundle(f,l,{resolve:{file:{order:100},http:{order:200},fixedRefs:T},dereference:{circular:"ignore"}}).then(v=>Ja(S,v,hn)).catch(v=>{throw new Error(`Error while resolving schema (${v.message})`)})},rt.resolve=(l,c,f)=>rt.resolveWithContext(l,c,f).then(Ga),rt.resolveYAML=(l,c,f)=>rt.resolveWithContext(l,c,f).then(_r),Tt(),rt.format=Ha,rt.option=Re,rt.random=Ae,rt.extend=(l,c)=>(hn.extend(l,c),rt),rt.define=(l,c)=>(hn.define(l,c),rt),rt.reset=l=>(hn.reset(l),Tt(),rt),rt.locate=l=>hn.get(l),rt.VERSION="0.5.5",au={...rt},su=rt}}),jg=o({"src/src/main.iife.js"(l,c){var f=(qg(),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 jg()})();((e,t)=>{e.JSONSchemaFaker=t()})(typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,()=>eo);eo.random.shuffle=function(){return["[placeholder]"]};eo.option({useDefaultValue:!0,alwaysFakeOptionals:!0,fillProperties:!1});function bu(e){return eo.generate(e)}Fl();var hr=Symbol.for("workflow-serialize"),fr=Symbol.for("workflow-deserialize");var ES=Object.defineProperty,RS=Object.defineProperties,_S=Object.getOwnPropertyDescriptors,yf=Object.getOwnPropertySymbols,OS=Object.prototype.hasOwnProperty,CS=Object.prototype.propertyIsEnumerable,bf=(e,t,n)=>t in e?ES(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xf=(e,t)=>{for(var n in t||(t={}))OS.call(t,n)&&bf(e,n,t[n]);if(yf)for(var n of yf(t))CS.call(t,n)&&bf(e,n,t[n]);return e},vf=(e,t)=>RS(e,_S(t)),It=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;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]==="`"&&(n=!n)}return n||r},IS=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},PS=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!IS(e,n)&&(t+=1)}return t},Ln=(e,t)=>{let n=!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(n){if(i<t&&t<o)return!0;n=!1,i=-1}else n=!0,i=o}return!1},MS=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,NS=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(MS,(t,n,r,i)=>It(e,i)?t:`${n}\\>${r}`),LS=/(\*\*)([^*]*\*?)$/,DS=/(__)([^_]*?)$/,FS=/(\*\*\*)([^*]*?)$/,US=/(\*)([^*]*?)$/,$S=/(_)([^_]*?)$/,qS=/(`)([^`]*?)$/,jS=/(~~)([^~]*?)$/,Kn=/^[\s_~*`]*$/,kf=/^[\s]*[-*+][\s]+$/,BS=/[\p{L}\p{N}_]/u,zS=/^```[^`\n]*```?$/,HS=/^\*{4,}$/,VS=/(__)([^_]+)_$/,WS=/(~~)([^~]+)~$/,wf=/~~/g,Dn=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:BS.test(e)};var YS=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Af=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Xo=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},JS=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
113
+ `)return!1}return!1},Ef=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?JS(e,t):!1;if(e[n]===`
114
+ `)return!1}return!1},GS=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
115
115
  `)return!1}return!1},$l=(e,t,n)=>{let r=0;for(let u=t-1;u>=0;u-=1)if(e[u]===`
116
116
  `){r=u+1;break}let i=e.length;for(let u=t;u<e.length;u+=1)if(e[u]===`
117
- `){i=u;break}let o=e.substring(r,i),a=0,s=!1;for(let u of o)if(u===n)a+=1;else if(u!==" "&&u!==" "){s=!0;break}return a>=3&&!s},JS=(e,t,n,r)=>n==="\\"||e.includes("$")&&Xo(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Dn(n)&&Dn(r)||(!n||n===" "||n===" "||n===`
117
+ `){i=u;break}let o=e.substring(r,i),a=0,s=!1;for(let u of o)if(u===n)a+=1;else if(u!==" "&&u!==" "){s=!0;break}return a>=3&&!s},KS=(e,t,n,r)=>n==="\\"||e.includes("$")&&Xo(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Dn(n)&&Dn(r)||(!n||n===" "||n===" "||n===`
118
118
  `)&&(!r||r===" "||r===" "||r===`
119
- `)),Rf=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";JS(e,i,o,a)||(t+=1)}return t},GS=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Xo(e,t)||Ef(e,t)||YS(e,t)||n==="_"||r==="_"||n&&r&&Dn(n)&&Dn(r)),KS=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";GS(e,i,o,a)||(t+=1)}return t},XS=e=>{let t=0,n=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]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},ql=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},Sf=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},QS=(e,t,n)=>{if(!t||Kn.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
119
+ `)),Rf=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";KS(e,i,o,a)||(t+=1)}return t},XS=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Xo(e,t)||Ef(e,t)||GS(e,t)||n==="_"||r==="_"||n&&r&&Dn(n)&&Dn(r)),QS=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";XS(e,i,o,a)||(t+=1)}return t},ZS=e=>{let t=0,n=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]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},ql=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},Sf=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},eT=(e,t,n)=>{if(!t||Kn.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
120
120
  `),i=r===-1?0:r+1,o=e.substring(i,n);return kf.test(o)&&t.includes(`
121
- `)?!0:$l(e,n,"*")},ZS=e=>{let t=e.match(MS);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return It(e,r)||Ln(e,r)||QS(e,n,r)?e:ql(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},eT=(e,t,n)=>{if(!t||Kn.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
121
+ `)?!0:$l(e,n,"*")},tT=e=>{let t=e.match(LS);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return It(e,r)||Ln(e,r)||eT(e,n,r)?e:ql(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},nT=(e,t,n)=>{if(!t||Kn.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
122
122
  `),i=r===-1?0:r+1,o=e.substring(i,n);return kf.test(o)&&t.includes(`
123
- `)?!0:$l(e,n,"_")},tT=e=>{let t=e.match(NS);if(!t){let i=e.match(zS);if(i){let o=e.lastIndexOf(i[1]);if(!(It(e,o)||Ln(e,o))&&Sf(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return It(e,r)||Ln(e,r)||eT(e,n,r)?e:Sf(e)%2===1?`${e}__`:e},nT=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Xo(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
123
+ `)?!0:$l(e,n,"_")},rT=e=>{let t=e.match(DS);if(!t){let i=e.match(VS);if(i){let o=e.lastIndexOf(i[1]);if(!(It(e,o)||Ln(e,o))&&Sf(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return It(e,r)||Ln(e,r)||nT(e,n,r)?e:Sf(e)%2===1?`${e}__`:e},iT=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Xo(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
124
124
  `)&&(!i||i===" "||i===" "||i===`
125
- `)||r&&i&&Dn(r)&&Dn(i))continue;return n}}return-1},rT=e=>{if(!e.match(DS))return e;let t=nT(e);if(t===-1||It(e,t)||Ln(e,t))return e;let n=e.substring(t+1);return!n||Kn.test(n)?e:Rf(e)%2===1?`${e}*`:e},_f=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Xo(e,n)&&!Ef(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&Dn(r)&&Dn(i))continue;return n}}return-1},iT=e=>{let t=e.length;for(;t>0&&e[t-1]===`
126
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},oT=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(ql(t)%2!==1)return null;let n=t.indexOf("**"),r=_f(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},aT=e=>{if(!e.match(FS))return e;let t=_f(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Kn.test(n)||It(e,t)||Ln(e,t))return e;if(KS(e)%2===1){let r=oT(e);return r!==null?r:iT(e)}return e},sT=e=>{let t=ql(e),n=Rf(e);return t%2===0&&n%2===0},lT=(e,t,n)=>!t||Kn.test(t)||It(e,n)||Ln(e,n)?!0:$l(e,n,"*"),cT=e=>{if(BS.test(e))return e;let t=e.match(LS);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return lT(e,n,r)?e:XS(e)%2===1?sT(e)?e:`${e}***`:e},uT=/<[a-zA-Z/][^>]*$/,pT=e=>{let t=e.match(uT);return!t||t.index===void 0||It(e,t.index)?e:e.substring(0,t.index).trimEnd()},dT=e=>!e.match(jS)||e.includes(`
127
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,hT=e=>(e.match(/```/g)||[]).length%2===1,fT=e=>{let t=dT(e);if(t!==null)return t;let n=e.match(US);if(n&&!hT(e)){let r=n[2];if(!r||Kn.test(r))return e;if(CS(e)%2===1)return`${e}\``}return e},Of=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",mT=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Of(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},gT=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Of(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},yT=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
125
+ `)||r&&i&&Dn(r)&&Dn(i))continue;return n}}return-1},oT=e=>{if(!e.match(US))return e;let t=iT(e);if(t===-1||It(e,t)||Ln(e,t))return e;let n=e.substring(t+1);return!n||Kn.test(n)?e:Rf(e)%2===1?`${e}*`:e},_f=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Xo(e,n)&&!Ef(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&Dn(r)&&Dn(i))continue;return n}}return-1},aT=e=>{let t=e.length;for(;t>0&&e[t-1]===`
126
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},sT=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(ql(t)%2!==1)return null;let n=t.indexOf("**"),r=_f(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},lT=e=>{if(!e.match($S))return e;let t=_f(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Kn.test(n)||It(e,t)||Ln(e,t))return e;if(QS(e)%2===1){let r=sT(e);return r!==null?r:aT(e)}return e},cT=e=>{let t=ql(e),n=Rf(e);return t%2===0&&n%2===0},uT=(e,t,n)=>!t||Kn.test(t)||It(e,n)||Ln(e,n)?!0:$l(e,n,"*"),pT=e=>{if(HS.test(e))return e;let t=e.match(FS);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return uT(e,n,r)?e:ZS(e)%2===1?cT(e)?e:`${e}***`:e},dT=/<[a-zA-Z/][^>]*$/,hT=e=>{let t=e.match(dT);return!t||t.index===void 0||It(e,t.index)?e:e.substring(0,t.index).trimEnd()},fT=e=>!e.match(zS)||e.includes(`
127
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,mT=e=>(e.match(/```/g)||[]).length%2===1,gT=e=>{let t=fT(e);if(t!==null)return t;let n=e.match(qS);if(n&&!mT(e)){let r=n[2];if(!r||Kn.test(r))return e;if(PS(e)%2===1)return`${e}\``}return e},Of=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",yT=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Of(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},bT=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Of(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},wT=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
128
128
  `,t)!==-1&&!e.endsWith(`
129
129
  `)?`${e}
130
- $$`:`${e}$$`},bT=e=>mT(e)%2===0?e:yT(e),wT=e=>gT(e)%2===1?`${e}$`:e,ST=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=WS(e,t);if(r===-1||It(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,t);return n==="text-only"?`${a}${s}`:`${a}[${s}](streamdown:incomplete-link)`},Tf=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!It(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Af(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},TT=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let a=Tf(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(Af(e,t)===-1){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let a=Tf(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},Cf=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!It(e,n)){let r=ST(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!It(e,r)){let i=TT(e,r,t);if(i!==null)return i}return e},xT=/^-{1,2}$/,vT=/^[\s]*-{1,2}[\s]+$/,kT=/^={1,2}$/,AT=/^[\s]*={1,2}[\s]+$/,ET=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
131
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(xT.test(i)&&!n.match(vT)){let o=r.split(`
132
- `).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(kT.test(i)&&!n.match(AT)){let o=r.split(`
133
- `).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}return e},RT=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),_T=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(RT,(t,n)=>It(e,n)?t:"\\~"),OT=e=>{var t,n;let r=e.match($S);if(r){let i=r[2];if(!i||Kn.test(i))return e;let o=e.lastIndexOf(r[1]);if(It(e,o)||Ln(e,o))return e;if(((t=e.match(wf))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(VS);if(i){let o=e.lastIndexOf(i[0].slice(0,2));if(It(e,o)||Ln(e,o))return e;if(((n=e.match(wf))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Ul=e=>e!==!1,CT=e=>e===!0,Ct={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},IT=[{handler:{name:"singleTilde",handle:_T,priority:Ct.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:PS,priority:Ct.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:pT,priority:Ct.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:ET,priority:Ct.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Cf,priority:Ct.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:cT,priority:Ct.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:ZS,priority:Ct.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:tT,priority:Ct.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:rT,priority:Ct.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:aT,priority:Ct.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:fT,priority:Ct.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:OT,priority:Ct.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:bT,priority:Ct.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:wT,priority:Ct.INLINE_KATEX},optionKey:"inlineKatex"}],PT=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return IT.filter(({handler:r,optionKey:i})=>r.name==="links"?Ul(e==null?void 0:e.links)||Ul(e==null?void 0:e.images):r.name==="inlineKatex"?CT(e==null?void 0:e.inlineKatex):Ul(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:vf(xf({},r),{handle:o=>Cf(o,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},MT=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=PT(t),o=((n=t==null?void 0:t.handlers)!=null?n:[]).map(s=>{var u;return{handler:vf(xf({},s),{priority:(u=s.priority)!=null?u:Ct.DEFAULT}),earlyReturn:void 0}}),a=[...i,...o].sort((s,u)=>{var p,h;return((p=s.handler.priority)!=null?p:0)-((h=u.handler.priority)!=null?h:0)});for(let{handler:s,earlyReturn:u}of a)if(r=s.handle(r),u!=null&&u(r))return r;return r},Xr=MT;var NT="__cb:",LT="chat:callback:",DT=720*60*60*1e3;function FT(e){return`${NT}${e}`}function UT(){return crypto.randomUUID().replace(/-/g,"").slice(0,16)}async function $T(e,t){return{type:"actions",children:await Promise.all(e.children.map(async n=>{if(n.type!=="button"||!n.callbackUrl)return n;let r=UT(),i={url:n.callbackUrl,originalValue:n.value};return await t.set(`${LT}${r}`,i,DT),{type:"button",id:n.id,label:n.label,style:n.style,disabled:n.disabled,value:FT(r),actionType:n.actionType}}))}}function Ff(e){for(let t of e){if(t.type==="actions"){for(let n of t.children)if(n.type==="button"&&n.callbackUrl)return!0}if(t.type==="section"&&"children"in t&&Ff(t.children))return!0}return!1}async function Uf(e,t){let n=[];for(let r of e)r.type==="actions"?n.push(await $T(r,t)):r.type==="section"&&"children"in r?n.push({...r,children:await Uf(r.children,t)}):n.push(r);return n}async function Qo(e,t){return Ff(e.children)?{...e,children:await Uf(e.children,t)}:e}var If=null;function Zo(){if(!If)throw new Error("No Chat singleton registered. Call chat.registerSingleton() first.");return If}var qT=new Set(["markdown_text","task_update","plan_update"]);async function*$f(e){var r,i;let t=!1,n=!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(qT.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"?(t&&n&&(yield`
130
+ $$`:`${e}$$`},ST=e=>yT(e)%2===0?e:wT(e),TT=e=>bT(e)%2===1?`${e}$`:e,xT=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=YS(e,t);if(r===-1||It(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,t);return n==="text-only"?`${a}${s}`:`${a}[${s}](streamdown:incomplete-link)`},Tf=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!It(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Af(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},vT=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let a=Tf(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(Af(e,t)===-1){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let a=Tf(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},Cf=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!It(e,n)){let r=xT(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!It(e,r)){let i=vT(e,r,t);if(i!==null)return i}return e},kT=/^-{1,2}$/,AT=/^[\s]*-{1,2}[\s]+$/,ET=/^={1,2}$/,RT=/^[\s]*={1,2}[\s]+$/,_T=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
131
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(kT.test(i)&&!n.match(AT)){let o=r.split(`
132
+ `).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(ET.test(i)&&!n.match(RT)){let o=r.split(`
133
+ `).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"),CT=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(OT,(t,n)=>It(e,n)?t:"\\~"),IT=e=>{var t,n;let r=e.match(jS);if(r){let i=r[2];if(!i||Kn.test(i))return e;let o=e.lastIndexOf(r[1]);if(It(e,o)||Ln(e,o))return e;if(((t=e.match(wf))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(WS);if(i){let o=e.lastIndexOf(i[0].slice(0,2));if(It(e,o)||Ln(e,o))return e;if(((n=e.match(wf))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Ul=e=>e!==!1,PT=e=>e===!0,Ct={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},MT=[{handler:{name:"singleTilde",handle:CT,priority:Ct.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:NS,priority:Ct.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:hT,priority:Ct.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:_T,priority:Ct.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Cf,priority:Ct.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:pT,priority:Ct.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:tT,priority:Ct.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:rT,priority:Ct.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:oT,priority:Ct.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:lT,priority:Ct.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:gT,priority:Ct.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:IT,priority:Ct.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:ST,priority:Ct.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:TT,priority:Ct.INLINE_KATEX},optionKey:"inlineKatex"}],NT=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return MT.filter(({handler:r,optionKey:i})=>r.name==="links"?Ul(e==null?void 0:e.links)||Ul(e==null?void 0:e.images):r.name==="inlineKatex"?PT(e==null?void 0:e.inlineKatex):Ul(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:vf(xf({},r),{handle:o=>Cf(o,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},LT=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=NT(t),o=((n=t==null?void 0:t.handlers)!=null?n:[]).map(s=>{var u;return{handler:vf(xf({},s),{priority:(u=s.priority)!=null?u:Ct.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},Xr=LT;var DT="__cb:",FT="chat:callback:",UT=720*60*60*1e3;function $T(e){return`${DT}${e}`}function qT(){return crypto.randomUUID().replace(/-/g,"").slice(0,16)}async function jT(e,t){return{type:"actions",children:await Promise.all(e.children.map(async n=>{if(n.type!=="button"||!n.callbackUrl)return n;let r=qT(),i={url:n.callbackUrl,originalValue:n.value};return await t.set(`${FT}${r}`,i,UT),{type:"button",id:n.id,label:n.label,style:n.style,disabled:n.disabled,value:$T(r),actionType:n.actionType}}))}}function Ff(e){for(let t of e){if(t.type==="actions"){for(let n of t.children)if(n.type==="button"&&n.callbackUrl)return!0}if(t.type==="section"&&"children"in t&&Ff(t.children))return!0}return!1}async function Uf(e,t){let n=[];for(let r of e)r.type==="actions"?n.push(await jT(r,t)):r.type==="section"&&"children"in r?n.push({...r,children:await Uf(r.children,t)}):n.push(r);return n}async function Qo(e,t){return Ff(e.children)?{...e,children:await Uf(e.children,t)}:e}var If=null;function Zo(){if(!If)throw new Error("No Chat singleton registered. Call chat.registerSingleton() first.");return If}var BT=new Set(["markdown_text","task_update","plan_update"]);async function*$f(e){var r,i;let t=!1,n=!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(BT.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"?(t&&n&&(yield`
134
134
 
135
- `),t=!1,n=!0,yield s):a.type==="finish-step"&&(t=!0)}}var jT=new WeakMap;var Xn=class Bl{constructor(t){ve(this,"id");ve(this,"threadId");ve(this,"text");ve(this,"formatted");ve(this,"raw");ve(this,"author");ve(this,"metadata");ve(this,"attachments");ve(this,"isMention");ve(this,"userKey");ve(this,"links");ve(this,"_subjectPromise");var n;this.id=t.id,this.threadId=t.threadId,this.text=t.text,this.formatted=t.formatted,this.raw=t.raw,this.author=t.author,this.metadata=t.metadata,this.attachments=t.attachments,this.isMention=t.isMention,this.links=(n=t.links)!=null?n:[]}get subject(){if(this._subjectPromise)return this._subjectPromise;let t=jT.get(this);return t!=null&&t.fetchSubject?(this._subjectPromise=t.fetchSubject(this.raw).catch(()=>null),this._subjectPromise):(this._subjectPromise=Promise.resolve(null),this._subjectPromise)}toJSON(){var t;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:(t=this.metadata.editedAt)==null?void 0:t.toISOString()},attachments:this.attachments.map(n=>({type:n.type,url:n.url,name:n.name,mimeType:n.mimeType,size:n.size,width:n.width,height:n.height,fetchMetadata:n.fetchMetadata})),isMention:this.isMention,links:this.links.length>0?this.links.map(n=>({url:n.url,title:n.title,description:n.description,imageUrl:n.imageUrl,siteName:n.siteName})):void 0}}static fromJSON(t){return new Bl({id:t.id,threadId:t.threadId,text:t.text,formatted:t.formatted,raw:t.raw,author:t.author,metadata:{dateSent:new Date(t.metadata.dateSent),edited:t.metadata.edited,editedAt:t.metadata.editedAt?new Date(t.metadata.editedAt):void 0},attachments:t.attachments,isMention:t.isMention,links:t.links})}static[hr](t){return t.toJSON()}static[fr](t){return Bl.fromJSON(t)}},BT=Symbol.for("chat.postable");function qf(e){return typeof e=="object"&&e!==null&&e.$$typeof===BT}async function jf(e,t,n,r,i){let o=a=>{var s;return{adapter:t,logger:i,messageId:a.id,threadId:(s=a.threadId)!=null?s:n}};if(e.isSupported(t)&&t.postObject){let a=await t.postObject(n,e.kind,e.getPostData());e.onPosted(o(a))}else{let a=await r(n,e.getFallbackText());e.onPosted(o(a))}}var zT=class extends Error{constructor(t,n,r){super(t);ve(this,"code");ve(this,"cause");this.name="ChatError",this.code=n,this.cause=r}};var Bf=class extends zT{constructor(t,n,r){super(t,"NOT_IMPLEMENTED",r);ve(this,"feature");this.name="NotImplementedError",this.feature=n}};var ea=720*60*60*1e3,Pf="channel-state:";function VT(e){return"adapterName"in e&&!("adapter"in e)}function WT(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var HT=class zl{constructor(t){ve(this,"id");ve(this,"isDM");ve(this,"channelVisibility");ve(this,"_adapter");ve(this,"_adapterName");ve(this,"_stateAdapterInstance");ve(this,"_name",null);ve(this,"_threadHistory");var n,r;this.id=t.id,this.isDM=(n=t.isDM)!=null?n:!1,this.channelVisibility=(r=t.channelVisibility)!=null?r:"unknown",VT(t)?this._adapterName=t.adapterName:(this._adapter=t.adapter,this._stateAdapterInstance=t.stateAdapter,this._threadHistory=t.threadHistory)}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Channel has no adapter configured");let n=Zo().getAdapter(this._adapterName);if(!n)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=n,n}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let t=Zo();return this._stateAdapterInstance=t.getState(),this._stateAdapterInstance}get name(){return this._name}get state(){return this._stateAdapter.get(`${Pf}${this.id}`)}async setState(t,n){let r=`${Pf}${this.id}`;if(n!=null&&n.replace)await this._stateAdapter.set(r,t,ea);else{let o={...await this._stateAdapter.get(r),...t};await this._stateAdapter.set(r,o,ea)}}get messages(){let t=this.adapter,n=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a={cursor:i,direction:"backward"},s=t.fetchChannelMessages?await t.fetchChannelMessages(n,a):await t.fetchMessages(n,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(n);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}threads(){let t=this.adapter,n=this.id;return{async*[Symbol.asyncIterator](){if(!t.listThreads)return;let r;for(;;){let i=await t.listThreads(n,{cursor:r});for(let o of i.threads)yield o;if(!i.nextCursor||i.threads.length===0)break;r=i.nextCursor}}}}async fetchMetadata(){var t;if(this.adapter.fetchChannelInfo){let n=await this.adapter.fetchChannelInfo(this.id);return this._name=(t=n.name)!=null?t:null,n}return{id:this.id,isDM:this.isDM,metadata:{}}}async post(t){if(qf(t))return await this.handlePostableObject(t),t;if(WT(t)){let r="";for await(let i of $f(t))typeof i=="string"?r+=i:i.type==="markdown_text"&&(r+=i.text);return this.postSingleMessage({markdown:r})}let n=t;if(Yt(t)){let r=Ht(t);if(!r)throw new Error("Invalid JSX element: must be a Card element");n=r}return n=await this.processCallbackUrls(n),this.postSingleMessage(n)}async handlePostableObject(t){await jf(t,this.adapter,this.id,(n,r)=>this.adapter.postChannelMessage?this.adapter.postChannelMessage(n,r):this.adapter.postMessage(n,r))}async postSingleMessage(t){let n=this.adapter.postChannelMessage?await this.adapter.postChannelMessage(this.id,t):await this.adapter.postMessage(this.id,t),r=this.createSentMessage(n.id,t,n.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Xn(r)),r}async postEphemeral(t,n,r){let{fallbackToDM:i}=r,o=typeof t=="string"?t:t.userId,a;if(Yt(n)){let s=Ht(n);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=n;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(t,n){let r;if(Yt(t)){let i=Ht(t);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=t;if(r=await this.processCallbackUrls(r),!this.adapter.scheduleMessage)throw new Bf("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,n)}async processCallbackUrls(t){var n;if(typeof t=="string")return t;if("type"in t&&t.type==="card")return Qo(t,this._stateAdapter);if("card"in t&&((n=t.card)==null?void 0:n.type)==="card"){let r=await Qo(t.card,this._stateAdapter);if(r!==t.card)return{...t,card:r}}return t}async startTyping(t){await this.adapter.startTyping(this.id,t)}mentionUser(t){return`<@${t}>`}toJSON(){var t;return{_type:"chat:Channel",id:this.id,adapterName:(t=this._adapterName)!=null?t:this.adapter.name,channelVisibility:this.channelVisibility,isDM:this.isDM}}static fromJSON(t,n){let r=new zl({id:t.id,adapterName:t.adapterName,channelVisibility:t.channelVisibility,isDM:t.isDM});return n&&(r._adapter=n),r}static[hr](t){return t.toJSON()}static[fr](t){return zl.fromJSON(t)}createSentMessage(t,n,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=JT(n);return{id:t,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(d){let g=d;if(Yt(d)){let y=Ht(d);if(!y)throw new Error("Invalid JSX element: must be a Card element");g=y}return g=await a.processCallbackUrls(g),await i.editMessage(o,t,g),a.createSentMessage(t,g)},async delete(){await i.deleteMessage(o,t)},async addReaction(d){await i.addReaction(o,t,d)},async removeReaction(d){await i.removeReaction(o,t,d)}}}};function YT(e,t){return e.channelIdFromThreadId(t)}function JT(e){if(typeof e=="string")return{plainText:e,formatted:vn([xn([Tn(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:vn([xn([Tn(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let t=_l(e.markdown);return{plainText:Gr(t),formatted:t,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Gr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let t=e.fallbackText||Kr(e.card);return{plainText:t,formatted:vn([xn([Tn(t)])]),attachments:[]}}if("type"in e&&e.type==="card"){let t=Kr(e);return{plainText:t,formatted:vn([xn([Tn(t)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var GT=class{constructor(e={}){ve(this,"accumulated","");ve(this,"dirty",!0);ve(this,"cachedRender","");ve(this,"finished",!1);ve(this,"fenceToggles",0);ve(this,"incompleteLine","");ve(this,"options");var t;this.options={wrapTablesForAppend:(t=e.wrapTablesForAppend)!=null?t:!0}}push(e){var n;this.accumulated+=e,this.dirty=!0,this.incompleteLine+=e;let t=this.incompleteLine.split(`
135
+ `),t=!1,n=!0,yield s):a.type==="finish-step"&&(t=!0)}}var zT=new WeakMap;var Xn=class Bl{constructor(t){ve(this,"id");ve(this,"threadId");ve(this,"text");ve(this,"formatted");ve(this,"raw");ve(this,"author");ve(this,"metadata");ve(this,"attachments");ve(this,"isMention");ve(this,"userKey");ve(this,"links");ve(this,"_subjectPromise");var n;this.id=t.id,this.threadId=t.threadId,this.text=t.text,this.formatted=t.formatted,this.raw=t.raw,this.author=t.author,this.metadata=t.metadata,this.attachments=t.attachments,this.isMention=t.isMention,this.links=(n=t.links)!=null?n:[]}get subject(){if(this._subjectPromise)return this._subjectPromise;let t=zT.get(this);return t!=null&&t.fetchSubject?(this._subjectPromise=t.fetchSubject(this.raw).catch(()=>null),this._subjectPromise):(this._subjectPromise=Promise.resolve(null),this._subjectPromise)}toJSON(){var t;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:(t=this.metadata.editedAt)==null?void 0:t.toISOString()},attachments:this.attachments.map(n=>({type:n.type,url:n.url,name:n.name,mimeType:n.mimeType,size:n.size,width:n.width,height:n.height,fetchMetadata:n.fetchMetadata})),isMention:this.isMention,links:this.links.length>0?this.links.map(n=>({url:n.url,title:n.title,description:n.description,imageUrl:n.imageUrl,siteName:n.siteName})):void 0}}static fromJSON(t){return new Bl({id:t.id,threadId:t.threadId,text:t.text,formatted:t.formatted,raw:t.raw,author:t.author,metadata:{dateSent:new Date(t.metadata.dateSent),edited:t.metadata.edited,editedAt:t.metadata.editedAt?new Date(t.metadata.editedAt):void 0},attachments:t.attachments,isMention:t.isMention,links:t.links})}static[hr](t){return t.toJSON()}static[fr](t){return Bl.fromJSON(t)}},HT=Symbol.for("chat.postable");function qf(e){return typeof e=="object"&&e!==null&&e.$$typeof===HT}async function jf(e,t,n,r,i){let o=a=>{var s;return{adapter:t,logger:i,messageId:a.id,threadId:(s=a.threadId)!=null?s:n}};if(e.isSupported(t)&&t.postObject){let a=await t.postObject(n,e.kind,e.getPostData());e.onPosted(o(a))}else{let a=await r(n,e.getFallbackText());e.onPosted(o(a))}}var VT=class extends Error{constructor(t,n,r){super(t);ve(this,"code");ve(this,"cause");this.name="ChatError",this.code=n,this.cause=r}};var Bf=class extends VT{constructor(t,n,r){super(t,"NOT_IMPLEMENTED",r);ve(this,"feature");this.name="NotImplementedError",this.feature=n}};var ea=720*60*60*1e3,Pf="channel-state:";function WT(e){return"adapterName"in e&&!("adapter"in e)}function YT(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var JT=class zl{constructor(t){ve(this,"id");ve(this,"isDM");ve(this,"channelVisibility");ve(this,"_adapter");ve(this,"_adapterName");ve(this,"_stateAdapterInstance");ve(this,"_name",null);ve(this,"_threadHistory");var n,r;this.id=t.id,this.isDM=(n=t.isDM)!=null?n:!1,this.channelVisibility=(r=t.channelVisibility)!=null?r:"unknown",WT(t)?this._adapterName=t.adapterName:(this._adapter=t.adapter,this._stateAdapterInstance=t.stateAdapter,this._threadHistory=t.threadHistory)}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Channel has no adapter configured");let n=Zo().getAdapter(this._adapterName);if(!n)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=n,n}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let t=Zo();return this._stateAdapterInstance=t.getState(),this._stateAdapterInstance}get name(){return this._name}get state(){return this._stateAdapter.get(`${Pf}${this.id}`)}async setState(t,n){let r=`${Pf}${this.id}`;if(n!=null&&n.replace)await this._stateAdapter.set(r,t,ea);else{let o={...await this._stateAdapter.get(r),...t};await this._stateAdapter.set(r,o,ea)}}get messages(){let t=this.adapter,n=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a={cursor:i,direction:"backward"},s=t.fetchChannelMessages?await t.fetchChannelMessages(n,a):await t.fetchMessages(n,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(n);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}threads(){let t=this.adapter,n=this.id;return{async*[Symbol.asyncIterator](){if(!t.listThreads)return;let r;for(;;){let i=await t.listThreads(n,{cursor:r});for(let o of i.threads)yield o;if(!i.nextCursor||i.threads.length===0)break;r=i.nextCursor}}}}async fetchMetadata(){var t;if(this.adapter.fetchChannelInfo){let n=await this.adapter.fetchChannelInfo(this.id);return this._name=(t=n.name)!=null?t:null,n}return{id:this.id,isDM:this.isDM,metadata:{}}}async post(t){if(qf(t))return await this.handlePostableObject(t),t;if(YT(t)){let r="";for await(let i of $f(t))typeof i=="string"?r+=i:i.type==="markdown_text"&&(r+=i.text);return this.postSingleMessage({markdown:r})}let n=t;if(Yt(t)){let r=Wt(t);if(!r)throw new Error("Invalid JSX element: must be a Card element");n=r}return n=await this.processCallbackUrls(n),this.postSingleMessage(n)}async handlePostableObject(t){await jf(t,this.adapter,this.id,(n,r)=>this.adapter.postChannelMessage?this.adapter.postChannelMessage(n,r):this.adapter.postMessage(n,r))}async postSingleMessage(t){let n=this.adapter.postChannelMessage?await this.adapter.postChannelMessage(this.id,t):await this.adapter.postMessage(this.id,t),r=this.createSentMessage(n.id,t,n.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Xn(r)),r}async postEphemeral(t,n,r){let{fallbackToDM:i}=r,o=typeof t=="string"?t:t.userId,a;if(Yt(n)){let s=Wt(n);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=n;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(t,n){let r;if(Yt(t)){let i=Wt(t);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=t;if(r=await this.processCallbackUrls(r),!this.adapter.scheduleMessage)throw new Bf("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,n)}async processCallbackUrls(t){var n;if(typeof t=="string")return t;if("type"in t&&t.type==="card")return Qo(t,this._stateAdapter);if("card"in t&&((n=t.card)==null?void 0:n.type)==="card"){let r=await Qo(t.card,this._stateAdapter);if(r!==t.card)return{...t,card:r}}return t}async startTyping(t){await this.adapter.startTyping(this.id,t)}mentionUser(t){return`<@${t}>`}toJSON(){var t;return{_type:"chat:Channel",id:this.id,adapterName:(t=this._adapterName)!=null?t:this.adapter.name,channelVisibility:this.channelVisibility,isDM:this.isDM}}static fromJSON(t,n){let r=new zl({id:t.id,adapterName:t.adapterName,channelVisibility:t.channelVisibility,isDM:t.isDM});return n&&(r._adapter=n),r}static[hr](t){return t.toJSON()}static[fr](t){return zl.fromJSON(t)}createSentMessage(t,n,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=KT(n);return{id:t,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 g=h;if(Yt(h)){let y=Wt(h);if(!y)throw new Error("Invalid JSX element: must be a Card element");g=y}return g=await a.processCallbackUrls(g),await i.editMessage(o,t,g),a.createSentMessage(t,g)},async delete(){await i.deleteMessage(o,t)},async addReaction(h){await i.addReaction(o,t,h)},async removeReaction(h){await i.removeReaction(o,t,h)}}}};function GT(e,t){return e.channelIdFromThreadId(t)}function KT(e){if(typeof e=="string")return{plainText:e,formatted:vn([xn([Tn(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:vn([xn([Tn(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let t=_l(e.markdown);return{plainText:Gr(t),formatted:t,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Gr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let t=e.fallbackText||Kr(e.card);return{plainText:t,formatted:vn([xn([Tn(t)])]),attachments:[]}}if("type"in e&&e.type==="card"){let t=Kr(e);return{plainText:t,formatted:vn([xn([Tn(t)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var XT=class{constructor(e={}){ve(this,"accumulated","");ve(this,"dirty",!0);ve(this,"cachedRender","");ve(this,"finished",!1);ve(this,"fenceToggles",0);ve(this,"incompleteLine","");ve(this,"options");var t;this.options={wrapTablesForAppend:(t=e.wrapTablesForAppend)!=null?t:!0}}push(e){var n;this.accumulated+=e,this.dirty=!0,this.incompleteLine+=e;let t=this.incompleteLine.split(`
136
136
  `);this.incompleteLine=(n=t.pop())!=null?n:"";for(let r of t){let i=r.trimStart();(i.startsWith("```")||i.startsWith("~~~"))&&this.fenceToggles++}}isAccumulatedInsideFence(){let e=this.fenceToggles%2===1,t=this.incompleteLine.trimStart();return(t.startsWith("```")||t.startsWith("~~~"))&&(e=!e),e}render(){if(!this.dirty)return this.cachedRender;if(this.dirty=!1,this.finished)return this.cachedRender=Xr(this.accumulated),this.cachedRender;if(this.isAccumulatedInsideFence())return this.cachedRender=Xr(this.accumulated),this.cachedRender;let e=Nf(this.accumulated);return this.cachedRender=Xr(e),this.cachedRender}getCommittableText(){if(this.finished)return this.formatAppendOnlyText(this.accumulated,!0);let e=this.accumulated;if(e.length>0&&!e.endsWith(`
137
137
  `)){let r=e.lastIndexOf(`
138
- `),i=r>=0?e.slice(0,r+1):"";if(jl(i))return this.formatAppendOnlyText(e);e=i}if(jl(e))return this.formatAppendOnlyText(e);let t=Nf(e),n=this.formatAppendOnlyText(t);return jl(n)?n:XT(n)}getText(){return this.accumulated}finish(){return this.finished=!0,this.dirty=!0,this.render()}formatAppendOnlyText(e,t=!1){return this.options.wrapTablesForAppend?QT(e,t):e}},KT=new Set(["*","~","`","["]);function Mf(e){return Xr(e).length<=e.length}function XT(e){if(e.length===0||Mf(e))return e;for(let t=e.length-1;t>=0;t--)if(KT.has(e[t])){for(;t>0&&e[t-1]===e[t];)t--;let n=e.slice(0,t);if(Mf(n))return n}return""}var Vl=/^\|.*\|$/,Wl=/^\|[\s:]*-{1,}[\s:]*(\|[\s:]*-{1,}[\s:]*)*\|$/;function jl(e){let t=!1;for(let n of e.split(`
138
+ `),i=r>=0?e.slice(0,r+1):"";if(jl(i))return this.formatAppendOnlyText(e);e=i}if(jl(e))return this.formatAppendOnlyText(e);let t=Nf(e),n=this.formatAppendOnlyText(t);return jl(n)?n:ZT(n)}getText(){return this.accumulated}finish(){return this.finished=!0,this.dirty=!0,this.render()}formatAppendOnlyText(e,t=!1){return this.options.wrapTablesForAppend?ex(e,t):e}},QT=new Set(["*","~","`","["]);function Mf(e){return Xr(e).length<=e.length}function ZT(e){if(e.length===0||Mf(e))return e;for(let t=e.length-1;t>=0;t--)if(QT.has(e[t])){for(;t>0&&e[t-1]===e[t];)t--;let n=e.slice(0,t);if(Mf(n))return n}return""}var Hl=/^\|.*\|$/,Vl=/^\|[\s:]*-{1,}[\s:]*(\|[\s:]*-{1,}[\s:]*)*\|$/;function jl(e){let t=!1;for(let n of e.split(`
139
139
  `)){let r=n.trimStart();(r.startsWith("```")||r.startsWith("~~~"))&&(t=!t)}return t}function Nf(e){let t=e.endsWith(`
140
140
  `),n=e.split(`
141
- `);!t&&n.length>0&&n.pop(),t&&n.length>0&&n.at(-1)===""&&n.pop();let r=0,i=!1;for(let u=n.length-1;u>=0;u--){let p=n[u].trim();if(p==="")break;if(Wl.test(p)){i=!0;break}if(Vl.test(p))r++;else break}if(i||r===0)return e;let o=n.length-r,a=n.slice(0,o),s=a.join(`
141
+ `);!t&&n.length>0&&n.pop(),t&&n.length>0&&n.at(-1)===""&&n.pop();let r=0,i=!1;for(let u=n.length-1;u>=0;u--){let p=n[u].trim();if(p==="")break;if(Vl.test(p)){i=!0;break}if(Hl.test(p))r++;else break}if(i||r===0)return e;let o=n.length-r,a=n.slice(0,o),s=a.join(`
142
142
  `);return a.length>0&&(s+=`
143
- `),s}function QT(e,t=!1){let n=e.endsWith(`
143
+ `),s}function ex(e,t=!1){let n=e.endsWith(`
144
144
  `),r=e.split(`
145
- `);n&&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 h=p!==""&&(Vl.test(p)||Wl.test(p));if(h&&!o){let d=!1;for(let g=u;g<r.length;g++){let y=r[g].trim();if(Wl.test(y)){d=!0;break}if(y===""||!Vl.test(y))break}d&&(i.push("```"),o=!0)}else!h&&o&&(i.push("```"),o=!1);i.push(r[u])}o&&t&&i.push("```");let s=i.join(`
145
+ `);n&&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!==""&&(Hl.test(p)||Vl.test(p));if(d&&!o){let h=!1;for(let g=u;g<r.length;g++){let y=r[g].trim();if(Vl.test(y)){h=!0;break}if(y===""||!Hl.test(y))break}h&&(i.push("```"),o=!0)}else!d&&o&&(i.push("```"),o=!1);i.push(r[u])}o&&t&&i.push("```");let s=i.join(`
146
146
  `);return n&&(s+=`
147
- `),s}function ZT(e){return"adapterName"in e&&!("adapter"in e)}var Lf="thread-state:";function ex(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var ZP=class Hl{constructor(t){ve(this,"id");ve(this,"channelId");ve(this,"isDM");ve(this,"channelVisibility");ve(this,"_adapter");ve(this,"_adapterName");ve(this,"_stateAdapterInstance");ve(this,"_recentMessages",[]);ve(this,"_isSubscribedContext");ve(this,"_currentMessage");ve(this,"_streamingUpdateIntervalMs");ve(this,"_fallbackStreamingPlaceholderText");ve(this,"_channel");ve(this,"_threadHistory");ve(this,"_logger");var n,r,i,o;this.id=t.id,this.channelId=t.channelId,this.isDM=(n=t.isDM)!=null?n:!1,this.channelVisibility=(r=t.channelVisibility)!=null?r:"unknown",this._isSubscribedContext=(i=t.isSubscribedContext)!=null?i:!1,this._currentMessage=t.currentMessage,this._logger=t.logger,this._streamingUpdateIntervalMs=(o=t.streamingUpdateIntervalMs)!=null?o:500,this._fallbackStreamingPlaceholderText=t.fallbackStreamingPlaceholderText!==void 0?t.fallbackStreamingPlaceholderText:"...",ZT(t)?this._adapterName=t.adapterName:(this._adapter=t.adapter,this._stateAdapterInstance=t.stateAdapter,this._threadHistory=t.threadHistory),t.initialMessage&&(this._recentMessages=[t.initialMessage])}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Thread has no adapter configured");let n=Zo().getAdapter(this._adapterName);if(!n)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=n,n}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let t=Zo();return this._stateAdapterInstance=t.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(t){this._recentMessages=t}get state(){return this._stateAdapter.get(`${Lf}${this.id}`)}async setState(t,n){let r=`${Lf}${this.id}`;if(n!=null&&n.replace)await this._stateAdapter.set(r,t,ea);else{let o={...await this._stateAdapter.get(r),...t};await this._stateAdapter.set(r,o,ea)}}get channel(){if(!this._channel){let t=YT(this.adapter,this.id);this._channel=new HT({id:t,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,threadHistory:this._threadHistory})}return this._channel}get messages(){let t=this.adapter,n=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await t.fetchMessages(n,{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(n);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}get allMessages(){let t=this.adapter,n=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await t.fetchMessages(n,{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(n);for(let s of a)yield s}}}}async getParticipants(){let t=new Map;this._currentMessage&&!this._currentMessage.author.isMe&&!this._currentMessage.author.isBot&&t.set(this._currentMessage.author.userId,this._currentMessage.author);for await(let n of this.allMessages)n.author.isMe||n.author.isBot||t.has(n.author.userId)||t.set(n.author.userId,n.author);return[...t.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(t){if(qf(t)){if(t.kind==="stream"){let o=t.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),t}return await this.handlePostableObject(t),t}if(ex(t))return this.handleStream(t);let n=t;if(Yt(t)){let o=Ht(t);if(!o)throw new Error("Invalid JSX element: must be a Card element");n=o}n=await this.processCallbackUrls(n);let r=await this.adapter.postMessage(this.id,n),i=this.createSentMessage(r.id,n,r.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Xn(i)),i}async handlePostableObject(t){await jf(t,this.adapter,this.id,(n,r)=>this.adapter.postMessage(n,r),this._logger)}async postEphemeral(t,n,r){let{fallbackToDM:i}=r,o=typeof t=="string"?t:t.userId,a;if(Yt(n)){let s=Ht(n);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=n;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(t){var n;if(typeof t=="string")return t;if("type"in t&&t.type==="card")return Qo(t,this._stateAdapter);if("card"in t&&((n=t.card)==null?void 0:n.type)==="card"){let r=await Qo(t.card,this._stateAdapter);if(r!==t.card)return{...t,card:r}}return t}async schedule(t,n){let r;if(Yt(t)){let i=Ht(t);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=t;if(r=await this.processCallbackUrls(r),!this.adapter.scheduleMessage)throw new Bf("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,n)}async handleStream(t,n){let r=$f(t),i={updateIntervalMs:this._streamingUpdateIntervalMs,...n};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 h=await p.next();if(!h.done){let d=h.value;typeof d=="string"?a+=d:d.type==="markdown_text"&&(a+=d.text)}return h}}}},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(t){var r;if(!t||typeof t!="object")return;let n=t;if(typeof n.team_id=="string"&&n.team_id)return n.team_id;if(typeof n.team=="string"&&n.team)return n.team;if(n.team&&typeof n.team=="object"&&typeof n.team.id=="string"&&n.team.id)return n.team.id;if(typeof((r=n.user)==null?void 0:r.team_id)=="string"&&n.user.team_id)return n.user.team_id}async startTyping(t){await this.adapter.startTyping(this.id,t)}async fallbackStream(t,n){var B;let r=(B=n==null?void 0:n.updateIntervalMs)!=null?B:this._streamingUpdateIntervalMs,i=this._fallbackStreamingPlaceholderText,o=i===null?null:await this.adapter.postMessage(this.id,i),a=this.id,s=new GT,u="",p=!1,h=null,d=null;o&&(a=o.threadId||this.id,u=i!=null?i:"");let g=()=>{d=setTimeout(()=>{h=y()},r)},y=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(ke){(ne=this._logger)==null||ne.warn("fallbackStream edit failed",ke)}p||g()};o&&g();try{for await(let ue of t)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,g())}}finally{p=!0,d&&(clearTimeout(d),d=null)}h&&await h;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 t=await this.adapter.fetchMessages(this.id,{limit:50});t.messages.length>0?this._recentMessages=t.messages:this._threadHistory?this._recentMessages=await this._threadHistory.getMessages(this.id,50):this._recentMessages=[]}mentionUser(t){return`<@${t}>`}toJSON(){var t,n;return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:(t=this._currentMessage)==null?void 0:t.toJSON(),isDM:this.isDM,adapterName:(n=this._adapterName)!=null?n:this.adapter.name}}static fromJSON(t,n){let r=new Hl({id:t.id,adapterName:t.adapterName,channelId:t.channelId,channelVisibility:t.channelVisibility,currentMessage:t.currentMessage?Xn.fromJSON(t.currentMessage):void 0,isDM:t.isDM});return n&&(r._adapter=n),r}static[hr](t){return t.toJSON()}static[fr](t){return Hl.fromJSON(t)}createSentMessage(t,n,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=tx(n);return{id:t,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(d){let g=d;if(Yt(d)){let y=Ht(d);if(!y)throw new Error("Invalid JSX element: must be a Card element");g=y}return g=await a.processCallbackUrls(g),await i.editMessage(o,t,g),a.createSentMessage(t,g)},async delete(){await i.deleteMessage(o,t)},async addReaction(d){await i.addReaction(o,t,d)},async removeReaction(d){await i.removeReaction(o,t,d)}}}createSentMessageFromMessage(t){let n=this.adapter,r=this.id,i=t.id,o=this;return{id:t.id,threadId:t.threadId,text:t.text,formatted:t.formatted,raw:t.raw,author:t.author,metadata:t.metadata,attachments:t.attachments,links:t.links,isMention:t.isMention,toJSON(){return t.toJSON()},async edit(a){let s=a;if(Yt(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 n.editMessage(r,i,s),o.createSentMessage(i,s,r)},async delete(){await n.deleteMessage(r,i)},async addReaction(a){await n.addReaction(r,i,a)},async removeReaction(a){await n.removeReaction(r,i,a)}}}};function tx(e){if(typeof e=="string")return{plainText:e,formatted:vn([xn([Tn(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:vn([xn([Tn(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let t=_l(e.markdown);return{plainText:Gr(t),formatted:t,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Gr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let t=e.fallbackText||Kr(e.card);return{plainText:t,formatted:vn([xn([Tn(t)])]),attachments:[]}}if("type"in e&&e.type==="card"){let t=Kr(e);return{plainText:t,formatted:vn([xn([Tn(t)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var e1=10080*60*1e3;var t1=600*1e3,n1=1440*60*1e3;var Df=new Map;function mr(e){let t=Df.get(e);return t||(t=Object.freeze({name:e,toString:()=>`{{emoji:${e}}}`,toJSON:()=>`{{emoji:${e}}}`}),Df.set(e,t)),t}var nx={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}"}},rx=class{constructor(e){ve(this,"emojiMap");ve(this,"slackToNormalized");ve(this,"gchatToNormalized");this.emojiMap={...nx,...e},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[e,t]of Object.entries(this.emojiMap)){let n=Array.isArray(t.slack)?t.slack:[t.slack];for(let i of n)this.slackToNormalized.set(i.toLowerCase(),e);let r=Array.isArray(t.gchat)?t.gchat:[t.gchat];for(let i of r)this.gchatToNormalized.set(i,e)}}fromSlack(e){var r;let t=e.replace(/^:|:$/g,"").toLowerCase(),n=(r=this.slackToNormalized.get(t))!=null?r:e;return mr(n)}fromGChat(e){var n;let t=(n=this.gchatToNormalized.get(e))!=null?n:e;return mr(t)}fromTeams(e){var r;let n=(r={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[e])!=null?r:e;return mr(n)}toSlack(e){let t=typeof e=="string"?e:e.name,n=this.emojiMap[t];return n?Array.isArray(n.slack)?n.slack[0]:n.slack:t}toGChat(e){let t=typeof e=="string"?e:e.name,n=this.emojiMap[t];return n?Array.isArray(n.gchat)?n.gchat[0]:n.gchat:t}toDiscord(e){return this.toGChat(e)}matches(e,t){let n=typeof t=="string"?t:t.name,r=this.emojiMap[n];if(!r)return e===n;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()}},ix=new rx;function ox(e){let t=["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"],n={custom:r=>mr(r)};for(let r of t)n[r]=mr(r);if(e){for(let r of Object.keys(e))n[r]=mr(r);ix.extend(e)}return n}var r1=ox(),Qr=Fo,Zr=Uo,ei=Ol;var ti=zo,ni=df,ri=Lo,zf=qo,Vf=jo;var ii=No;var Wf=$o,Hf=Do,Yf=Bo;var Jf=Yo,Gf=Vo,Kf=Go,oi=Ho,ai=Jo,si=Wo;function ta(e){return"type"in e&&e.type==="card"}function Xf(e){return typeof e=="object"&&e!==null&&e.type==="tool-approval-card"}function Yl(e,t){return(e==null?void 0:e.workflowId)===t.id}var ax=Symbol.for("chat.jsx.element"),sx=new Set([Qr,Zr,ei,ti,ni,ri,Jf,zf,Vf,ii,Wf,Gf,Kf,Hf,oi,ai,Yf,si]);function lx(e){return typeof e=="object"&&e!==null&&e.$$typeof===ax}async function ra(e){let t=na(e);if(t&&typeof t=="object"&&ta(t))return t;let{isJSX:n,toCardElement:r}=await Promise.resolve().then(()=>(Zf(),Qf));return n(t)?r(t):null}function na(e){var t;if(Array.isArray(e))return e.map(n=>na(n));if(!lx(e))return e;if(typeof e.type=="function"&&!sx.has(e.type)){let n={...(t=e.props)!=null?t:{}};return e.children!==void 0&&(n.children=e.children),na(e.type(n))}return{...e,children:na(e.children)}}var em=async(e,t)=>{let n=new TextEncoder,r=n.encode(e),i=n.encode(t),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("")},tm=(e,t)=>{if(typeof e!="string"||typeof t!="string"||e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r+=1)n|=e.charCodeAt(r)^t.charCodeAt(r);return n===0};var cx=require("cross-fetch");var nm=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 t=await(await fetch("http://localhost:2022/.well-known/novu")).json();return`${t.tunnelOrigin}${t.route}`}}catch(e){console.error(e)}return""};function rm(e){return!!e&&typeof e=="object"&&"error"in e&&"message"in e&&"statusCode"in e}var ia=(e,t)=>{if(!e)throw new zi;return{post:async(n,r)=>{let i=await fetch(`${t}/v1${n}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`},body:JSON.stringify(r)}),o=await i.json();if(i.ok)return o;throw rm(o)?new Vi(o.statusCode,o.error,o.message):new ir(o)},delete:async n=>(await fetch(`${t}/v1${n}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`}})).json()}};var cm=require("liquidjs");function Jl(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r];i&&typeof i=="object"&&!Array.isArray(i)?n[r]=Jl(n[r]||{},i):(Array.isArray(i),n[r]=i)}return n}function oa(e,t){let n=t.split(".").reduce((r,i)=>{if(r&&typeof r=="object")return r[i]},e);if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);if(typeof n=="object"){let r=JSON.stringify(n);return r==="{}"?"":r}return""}function im(e,t=2,n,r=", "){if(!Array.isArray(e)||e.length===0)return"";let i=n?e.map(s=>typeof s!="object"||!s?"":oa(s,n)):e;if(i.length===1)return i[0];if(i.length===2)return`${i[0]} and ${i[1]}`;if(t>=i.length){let s=i.slice(0,-1),u=i[i.length-1];return`${s.join(r)} and ${u}`}let o=i.slice(0,t),a=i.length-t;return`${o.join(r)} and ${a} ${a===1?"other":"others"}`}var om=zt(require("pluralize"),1);function am(e,t="",n="",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 n?o=i===1?t:n:o=(0,om.default)(t,i),r==="true"?`${i} ${o}`:o}var ux=require("liquidjs"),sm=zt(require("pluralize"),1),px=require("zod");var dx="",hx=2,fx="other",mx=", ",gx=" and ",yx=", and ";function lm(e,t=dx,n=hx,r=fx,i=mx,o=gx,a=yx){if(!Array.isArray(e)||e.length===0)return"";let s=t?e.map(g=>typeof g!="object"||!g?"":oa(g,t)):e,u=s.length;if(u===1)return s[0];if(u===2)return`${s[0]}${o}${s[1]}`;if(n>=u){let g=s.slice(0,u-1),y=s[u-1];return`${g.join(i)}${a}${y}`}let p=s.slice(0,n),h=u-n,d=n===1?o:a;return`${p.join(i)}${d}${h} ${(0,sm.default)(r,h)}`}function bx(e){return Array.isArray(e)||typeof e=="object"&&e!==null?um(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 um=(e,t=0)=>Array.isArray(e)||typeof e=="object"&&e!==null?JSON.stringify(e,null,t).replace(/"/g,"'").replace(/\n/g,"\\n"):e==null?"":String(e);function pm(e){let t=new cm.Liquid({outputEscape:bx,...e});return t.registerFilter("json",(n,r)=>um(n,r)),t.registerFilter("digest",im),t.registerFilter("toSentence",lm),t.registerFilter("pluralize",am),t}var Qn=zt(require("chalk"),1),et={info:e=>Qn.default.blue(e),warning:e=>Qn.default.yellow(e),error:e=>Qn.default.red(e),success:e=>Qn.default.green(e),underline:e=>Qn.default.underline(e),bold:e=>Qn.default.bold(e)},lt={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 aa(e){return e||process.env.NOVU_API_URL||"https://api.novu.co"}function sa(e){return e||process.env.NOVU_SECRET_KEY||process.env.NOVU_API_KEY||""}var Gl=zt(require("sanitize-html"),1),wx=["src","alt","width","height","loading","srcset","sizes","crossorigin","usemap","ismap","class","id","style","title","dir","lang"];function Sx(e){return e.toLowerCase().startsWith("on")}function Tx(e){return e.replace(/<\/([a-zA-Z][a-zA-Z0-9]*)\s*\/[^>]*>/g,"</$1>")}var xx={allowedTags:Gl.default.defaults.allowedTags.concat(["style","img","html","head","body","link","meta","title"]),allowedAttributes:!1,transformTags:{"*":(e,t)=>{let n={};for(let[r,i]of Object.entries(t))Sx(r)||(n[r]=i);return{tagName:e,attribs:n}},img:(e,t)=>{let n={};for(let[r,i]of Object.entries(t))wx.includes(r.toLowerCase())&&(n[r]=i);return{tagName:e,attribs:n}}},allowVulnerableTags:!0,parseStyleAttributes:!1,parser:{lowerCaseAttributeNames:!0}},dm=e=>{if(!e)return e;let t=Tx(e),n=/^<!DOCTYPE .*?>/,r=t.match(n),i=(0,Gl.default)(t,xx);return r?r[0]+i:i},la=e=>Object.keys(e).reduce((t,n)=>{let r=e[n];return typeof r=="string"?t[n]=dm(r):Array.isArray(r)?t[n]=r.map(i=>typeof i=="string"?dm(i):typeof i=="object"?la(i):i):typeof r=="object"&&r!==null?t[n]=la(r):t[n]=r,t},{});function hm(e,t=!0,n=console){t&&(n.info(`
148
- ${et.bold(et.underline("Discovered workflowId:"))} '${e.workflowId}'`),e.steps.forEach((r,i)=>{let o=i===e.steps.length-1,a=o?"\u2514":"\u251C";n.info(`${a} ${lt.STEP} Discovered stepId: '${r.stepId}' Type: '${r.type}'`),r.providers.forEach((s,u)=>{let p=u===r.providers.length-1,h=o?" ":"\u2502",d=p?"\u2514":"\u251C";n.info(`${h} ${d} ${lt.PROVIDER} Discovered provider: '${s.type}'`)})}))}var fm=require("jsonrepair");function mm(e){let t=e.trim();return(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))&&t.length>2}var gm="__novuJsonString";function vx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&e[gm]===!0}function li(e){if(typeof e=="string"){if(!mm(e))return e;try{let t=JSON.parse(e);return{[gm]:!0,value:li(t)}}catch{return e}}if(Array.isArray(e))return e.map(t=>li(t));if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=li(r);return t}return e}function ci(e){if(vx(e))return JSON.stringify(ci(e.value));if(Array.isArray(e))return e.map(t=>ci(t));if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=ci(r);return t}return e}function kx(e){try{return JSON.parse(e),e}catch{try{return(0,fm.jsonrepair)(e)}catch{return e}}}function ym(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>typeof n=="string"?[t,mm(n)?kx(n):n]:typeof n=="object"&&n!==null&&!Array.isArray(n)?[t,ym(n)]:[t,n]))}function bm(e){return!(e!=null&&e.data)||typeof e.data!="object"||Array.isArray(e.data)?e:{...e,data:ym(e.data)}}var Sm=zt(require("ajv"),1),Tm=zt(require("ajv-formats"),1);var wm=e=>typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));var ca=class extends _n{constructor(n,r){let i=r.length===1?"it":"them";super(`Tried to use a ${n} in @novu/framework without ${r.join(", ")} installed. Please install ${i} by running \`npm install ${r.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var ua=async(e,t)=>{let n=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)||n.add(a.name)}),n.size>0)throw new ca(t,Array.from(n))};var pa=class{constructor(){this.requiredImports=[];this.ajv=new Sm.default({useDefaults:!0,removeAdditional:"failing",strict:!1}),(0,Tm.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(t){let n=t.type==="object"||!!t.anyOf||!!t.allOf||!!t.oneOf;return n&&await ua(this.requiredImports,"JSON schema"),n}async validate(t,n){let r=this.compiledSchemas.get(n);r||(r=this.ajv.compile(n),this.compiledSchemas.set(n,r));let i=wm(t);return r(i)?{success:!0,data:i}:{success:!1,errors:r.errors.map(a=>({path:a.instancePath,message:a.message}))}}async transformToJsonSchema(t){return t}};var da=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(t){let n=t.safeParseAsync!==void 0;return n&&await ua(this.requiredImports,"Zod schema"),n}async validate(t,n){let r=await n.safeParseAsync(t);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(t){let{zodToJsonSchema:n}=await import("zod-to-json-schema");return n(t)}};var ha=new da,fa=new pa,ui=async(e,t)=>{if(await ha.canHandle(e))return ha.validate(t,e);if(await fa.canHandle(e))return fa.validate(t,e);throw new Error("Invalid schema")},bt=async e=>{if(await ha.canHandle(e))return ha.transformToJsonSchema(e);if(await fa.canHandle(e))return fa.transformToJsonSchema(e);throw new Error("Invalid schema")};function xm(){return["development",void 0,"dev"].includes(process.env.NODE_ENV)}var gr=class{constructor(t){this.discoveredWorkflows=new Map;this.discoverWorkflowPromises=new Map;this.registeredAgents=new Map;this.version="2.13.1-rc.852194fa77";let n=this.buildOptions(t);this.apiUrl=n.apiUrl,this.secretKey=n.secretKey,this.strictAuthentication=n.strictAuthentication,this.verbose=n.verbose,this.logger=n.logger,this.templateEngine=pm()}buildOptions(t){let n={apiUrl:aa(t==null?void 0:t.apiUrl),secretKey:sa(t==null?void 0:t.secretKey),strictAuthentication:!xm(),verbose:xm(),logger:console};return(t==null?void 0:t.strictAuthentication)!==void 0?n.strictAuthentication=t.strictAuthentication:process.env.NOVU_STRICT_AUTHENTICATION_ENABLED!==void 0&&(n.strictAuthentication=process.env.NOVU_STRICT_AUTHENTICATION_ENABLED==="true"),(t==null?void 0:t.verbose)!==void 0&&(n.verbose=t.verbose),(t==null?void 0:t.logger)!==void 0&&(n.logger=t.logger),n}log(...t){this.verbose&&this.logger.info(...t)}async addWorkflows(t){for(let n of t){if(this.discoveredWorkflows.has(n.id))continue;let r=this.discoverWorkflowPromises.get(n.id);if(r){await r;continue}let i=this.addWorkflow(n);this.discoverWorkflowPromises.set(n.id,i),await i}}addAgents(t){for(let n of t)this.registeredAgents.set(n.id,n)}getAgent(t){return this.registeredAgents.get(t)}async addWorkflow(t){try{let n=await t.discover();hm(n,this.verbose,this.logger),this.discoveredWorkflows.set(t.id,n)}finally{this.discoverWorkflowPromises.delete(t.id)}}healthCheck(){let t=this.getRegisteredWorkflows(),n=t.length,r=t.reduce((i,o)=>i+o.steps.length,0);return{status:"ok",sdkVersion:"2.13.1-rc.852194fa77",frameworkVersion:"2024-06-26",discovered:{workflows:n,steps:r}}}getWorkflow(t){let n=this.discoveredWorkflows.get(t);if(n)return n;throw new Lr(t)}getStep(t,n){let i=this.getWorkflow(t).steps.find(o=>o.stepId===n);if(i)return i;throw new Qi(n)}getRegisteredWorkflows(){return Array.from(this.discoveredWorkflows.values())}discover(){return{workflows:this.getRegisteredWorkflows(),agents:Array.from(this.registeredAgents.keys()).map(t=>({agentId:t}))}}mock(t){try{return bu(t)}catch(n){return this.logger.warn("Failed to mock schema, returning empty object:",n),{}}}async validate(t,n,r,i,o,a,s){let u=await ui(n,t);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(t,n,r,i,o){throw t?n?r==="output"?new $i(i,t,n,o):new Error(`Invalid payload type: '${r}'`):new Error("providerId is required"):new Error("stepId is required")}throwInvalidStep(t,n,r,i){if(!t)throw new Error("stepId is required");switch(n){case"output":throw new Di(r,t,i);case"result":throw new Fi(r,t,i);case"controls":throw new Li(r,t,i);default:throw new Error(`Invalid payload type: '${n}'`)}}throwInvalidEvent(t,n,r){switch(t){case"controls":throw new Ni(n,r);case"payload":throw new Pr(n,r);default:throw new Error(`Invalid payload type: '${t}'`)}}executeStepFactory(t,n,r){return async(i,o,a)=>{if(r())return;let s=this.getStep(t.workflowId,i),u=t.action==="preview";if(!u&&i===t.stepId){let y=await this.createStepControls(s,t),P=await this.compileControls(y,t);if(await this.shouldSkip(a==null?void 0:a.skip,P))return n({options:{skip:!0},outputs:{},providers:{}}),{}}let p=this.previewStep.bind(this),h=this.executeStep.bind(this),g=await(u?p:h)(t,{...s,providers:s.providers.map(y=>{var ee;let P=(ee=a==null?void 0:a.providers)==null?void 0:ee[y.type];if(!P)throw new Wi(y.type);return{...y,resolve:P}}),resolve:o});return this.shouldSanitize({stepType:s.type,options:a})&&(g={...g,outputs:la(g.outputs)}),i===t.stepId&&n({...g,options:{skip:!1}}),g.outputs}}shouldSanitize({stepType:t,options:n}){return(n==null?void 0:n.disableOutputSanitization)===!0?!1:["email","in_app"].includes(t)}async shouldSkip(t,n){return t?t(n):!1}async executeWorkflow(t){let i=`${{execute:"Executing",preview:"Previewing"}[t.action]||t.action} workflowId:`;this.log(`
149
- ${et.bold(et.underline(i))} '${t.workflowId}'`);let o=this.getWorkflow(t.workflowId),a=process.hrtime(),s={outputs:{},providers:{},options:{skip:!1}},u,p=!1,h=new Promise(Oe=>{u=Oe}),d=Oe=>{if(p)throw new Error("setResult can only be called once per workflow execution");u(),p=!0,s=Oe},g=()=>p,y;try{if(t.action==="execute"&&!t.payload)throw new Pr(t.workflowId,{message:"Event `payload` is required"});let Oe=await this.createExecutionPayload(t,o),$={...t,payload:Oe};await Promise.race([h,o.execute({payload:Oe,env:t.env,controls:{},subscriber:t.subscriber,context:t.context,step:{email:this.executeStepFactory($,d,g),sms:this.executeStepFactory($,d,g),inApp:this.executeStepFactory($,d,g),digest:this.executeStepFactory($,d,g),delay:this.executeStepFactory($,d,g),push:this.executeStepFactory($,d,g),chat:this.executeStepFactory($,d,g),custom:this.executeStepFactory($,d,g),throttle:this.executeStepFactory($,d,g),tool:this.executeStepFactory($,d,g)}})])}catch(Oe){y=Oe}let P=process.hrtime(a),ee=P[0],Z=P[1],B=ee*1e3+Z/1e6,ue=y?lt.ERROR:lt.SUCCESS,ke={execute:"Executed",preview:"Previewed"}[t.action]||t.action;if(this.log(`${ue} ${ke} workflowId: \`${t.workflowId}\``),this.prettyPrintExecute(t,B,y),y)throw y;return{outputs:s.outputs,providers:s.providers,options:s.options,metadata:{status:"success",error:!1,duration:B}}}async createExecutionPayload(t,n){let{payload:r}=t;if(t.action==="preview"){let o=this.mock(n.payload.schema);r=Object.assign(o,r)}return await this.validate(r,n.payload.unknownSchema,"event","payload",t.workflowId)}prettyPrintExecute(t,n,r){if(!this.verbose)return;let i=r?lt.ERROR:lt.SUCCESS,a={execute:"Executed",preview:"Previewed"}[t.action]||t.action,s=r?"Failed to execute":a,u=r?et.error:et.success,p=`${i} ${s} workflowId: '${t.workflowId}`;this.logger.info(`
147
+ `),s}function tx(e){return"adapterName"in e&&!("adapter"in e)}var Lf="thread-state:";function nx(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var e1=class Wl{constructor(t){ve(this,"id");ve(this,"channelId");ve(this,"isDM");ve(this,"channelVisibility");ve(this,"_adapter");ve(this,"_adapterName");ve(this,"_stateAdapterInstance");ve(this,"_recentMessages",[]);ve(this,"_isSubscribedContext");ve(this,"_currentMessage");ve(this,"_streamingUpdateIntervalMs");ve(this,"_fallbackStreamingPlaceholderText");ve(this,"_channel");ve(this,"_threadHistory");ve(this,"_logger");var n,r,i,o;this.id=t.id,this.channelId=t.channelId,this.isDM=(n=t.isDM)!=null?n:!1,this.channelVisibility=(r=t.channelVisibility)!=null?r:"unknown",this._isSubscribedContext=(i=t.isSubscribedContext)!=null?i:!1,this._currentMessage=t.currentMessage,this._logger=t.logger,this._streamingUpdateIntervalMs=(o=t.streamingUpdateIntervalMs)!=null?o:500,this._fallbackStreamingPlaceholderText=t.fallbackStreamingPlaceholderText!==void 0?t.fallbackStreamingPlaceholderText:"...",tx(t)?this._adapterName=t.adapterName:(this._adapter=t.adapter,this._stateAdapterInstance=t.stateAdapter,this._threadHistory=t.threadHistory),t.initialMessage&&(this._recentMessages=[t.initialMessage])}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Thread has no adapter configured");let n=Zo().getAdapter(this._adapterName);if(!n)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=n,n}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let t=Zo();return this._stateAdapterInstance=t.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(t){this._recentMessages=t}get state(){return this._stateAdapter.get(`${Lf}${this.id}`)}async setState(t,n){let r=`${Lf}${this.id}`;if(n!=null&&n.replace)await this._stateAdapter.set(r,t,ea);else{let o={...await this._stateAdapter.get(r),...t};await this._stateAdapter.set(r,o,ea)}}get channel(){if(!this._channel){let t=GT(this.adapter,this.id);this._channel=new JT({id:t,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,threadHistory:this._threadHistory})}return this._channel}get messages(){let t=this.adapter,n=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await t.fetchMessages(n,{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(n);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}get allMessages(){let t=this.adapter,n=this.id,r=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await t.fetchMessages(n,{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(n);for(let s of a)yield s}}}}async getParticipants(){let t=new Map;this._currentMessage&&!this._currentMessage.author.isMe&&!this._currentMessage.author.isBot&&t.set(this._currentMessage.author.userId,this._currentMessage.author);for await(let n of this.allMessages)n.author.isMe||n.author.isBot||t.has(n.author.userId)||t.set(n.author.userId,n.author);return[...t.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(t){if(qf(t)){if(t.kind==="stream"){let o=t.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),t}return await this.handlePostableObject(t),t}if(nx(t))return this.handleStream(t);let n=t;if(Yt(t)){let o=Wt(t);if(!o)throw new Error("Invalid JSX element: must be a Card element");n=o}n=await this.processCallbackUrls(n);let r=await this.adapter.postMessage(this.id,n),i=this.createSentMessage(r.id,n,r.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Xn(i)),i}async handlePostableObject(t){await jf(t,this.adapter,this.id,(n,r)=>this.adapter.postMessage(n,r),this._logger)}async postEphemeral(t,n,r){let{fallbackToDM:i}=r,o=typeof t=="string"?t:t.userId,a;if(Yt(n)){let s=Wt(n);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=n;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(t){var n;if(typeof t=="string")return t;if("type"in t&&t.type==="card")return Qo(t,this._stateAdapter);if("card"in t&&((n=t.card)==null?void 0:n.type)==="card"){let r=await Qo(t.card,this._stateAdapter);if(r!==t.card)return{...t,card:r}}return t}async schedule(t,n){let r;if(Yt(t)){let i=Wt(t);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=t;if(r=await this.processCallbackUrls(r),!this.adapter.scheduleMessage)throw new Bf("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,n)}async handleStream(t,n){let r=$f(t),i={updateIntervalMs:this._streamingUpdateIntervalMs,...n};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(t){var r;if(!t||typeof t!="object")return;let n=t;if(typeof n.team_id=="string"&&n.team_id)return n.team_id;if(typeof n.team=="string"&&n.team)return n.team;if(n.team&&typeof n.team=="object"&&typeof n.team.id=="string"&&n.team.id)return n.team.id;if(typeof((r=n.user)==null?void 0:r.team_id)=="string"&&n.user.team_id)return n.user.team_id}async startTyping(t){await this.adapter.startTyping(this.id,t)}async fallbackStream(t,n){var B;let r=(B=n==null?void 0:n.updateIntervalMs)!=null?B:this._streamingUpdateIntervalMs,i=this._fallbackStreamingPlaceholderText,o=i===null?null:await this.adapter.postMessage(this.id,i),a=this.id,s=new XT,u="",p=!1,d=null,h=null;o&&(a=o.threadId||this.id,u=i!=null?i:"");let g=()=>{h=setTimeout(()=>{d=y()},r)},y=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(ke){(ne=this._logger)==null||ne.warn("fallbackStream edit failed",ke)}p||g()};o&&g();try{for await(let ue of t)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,g())}}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 t=await this.adapter.fetchMessages(this.id,{limit:50});t.messages.length>0?this._recentMessages=t.messages:this._threadHistory?this._recentMessages=await this._threadHistory.getMessages(this.id,50):this._recentMessages=[]}mentionUser(t){return`<@${t}>`}toJSON(){var t,n;return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:(t=this._currentMessage)==null?void 0:t.toJSON(),isDM:this.isDM,adapterName:(n=this._adapterName)!=null?n:this.adapter.name}}static fromJSON(t,n){let r=new Wl({id:t.id,adapterName:t.adapterName,channelId:t.channelId,channelVisibility:t.channelVisibility,currentMessage:t.currentMessage?Xn.fromJSON(t.currentMessage):void 0,isDM:t.isDM});return n&&(r._adapter=n),r}static[hr](t){return t.toJSON()}static[fr](t){return Wl.fromJSON(t)}createSentMessage(t,n,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=rx(n);return{id:t,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 g=h;if(Yt(h)){let y=Wt(h);if(!y)throw new Error("Invalid JSX element: must be a Card element");g=y}return g=await a.processCallbackUrls(g),await i.editMessage(o,t,g),a.createSentMessage(t,g)},async delete(){await i.deleteMessage(o,t)},async addReaction(h){await i.addReaction(o,t,h)},async removeReaction(h){await i.removeReaction(o,t,h)}}}createSentMessageFromMessage(t){let n=this.adapter,r=this.id,i=t.id,o=this;return{id:t.id,threadId:t.threadId,text:t.text,formatted:t.formatted,raw:t.raw,author:t.author,metadata:t.metadata,attachments:t.attachments,links:t.links,isMention:t.isMention,toJSON(){return t.toJSON()},async edit(a){let s=a;if(Yt(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 n.editMessage(r,i,s),o.createSentMessage(i,s,r)},async delete(){await n.deleteMessage(r,i)},async addReaction(a){await n.addReaction(r,i,a)},async removeReaction(a){await n.removeReaction(r,i,a)}}}};function rx(e){if(typeof e=="string")return{plainText:e,formatted:vn([xn([Tn(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:vn([xn([Tn(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let t=_l(e.markdown);return{plainText:Gr(t),formatted:t,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Gr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let t=e.fallbackText||Kr(e.card);return{plainText:t,formatted:vn([xn([Tn(t)])]),attachments:[]}}if("type"in e&&e.type==="card"){let t=Kr(e);return{plainText:t,formatted:vn([xn([Tn(t)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var t1=10080*60*1e3;var n1=600*1e3,r1=1440*60*1e3;var Df=new Map;function mr(e){let t=Df.get(e);return t||(t=Object.freeze({name:e,toString:()=>`{{emoji:${e}}}`,toJSON:()=>`{{emoji:${e}}}`}),Df.set(e,t)),t}var ix={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}"}},ox=class{constructor(e){ve(this,"emojiMap");ve(this,"slackToNormalized");ve(this,"gchatToNormalized");this.emojiMap={...ix,...e},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[e,t]of Object.entries(this.emojiMap)){let n=Array.isArray(t.slack)?t.slack:[t.slack];for(let i of n)this.slackToNormalized.set(i.toLowerCase(),e);let r=Array.isArray(t.gchat)?t.gchat:[t.gchat];for(let i of r)this.gchatToNormalized.set(i,e)}}fromSlack(e){var r;let t=e.replace(/^:|:$/g,"").toLowerCase(),n=(r=this.slackToNormalized.get(t))!=null?r:e;return mr(n)}fromGChat(e){var n;let t=(n=this.gchatToNormalized.get(e))!=null?n:e;return mr(t)}fromTeams(e){var r;let n=(r={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[e])!=null?r:e;return mr(n)}toSlack(e){let t=typeof e=="string"?e:e.name,n=this.emojiMap[t];return n?Array.isArray(n.slack)?n.slack[0]:n.slack:t}toGChat(e){let t=typeof e=="string"?e:e.name,n=this.emojiMap[t];return n?Array.isArray(n.gchat)?n.gchat[0]:n.gchat:t}toDiscord(e){return this.toGChat(e)}matches(e,t){let n=typeof t=="string"?t:t.name,r=this.emojiMap[n];if(!r)return e===n;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()}},ax=new ox;function sx(e){let t=["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"],n={custom:r=>mr(r)};for(let r of t)n[r]=mr(r);if(e){for(let r of Object.keys(e))n[r]=mr(r);ax.extend(e)}return n}var i1=sx(),Qr=Fo,Zr=Uo,ei=Ol;var ti=zo,ni=df,ri=Lo,zf=qo,Hf=jo;var ii=No;var Vf=$o,Wf=Do,Yf=Bo;var Jf=Yo,Gf=Ho,Kf=Go,oi=Wo,ai=Jo,si=Vo;function ta(e){return"type"in e&&e.type==="card"}function Xf(e){return typeof e=="object"&&e!==null&&e.type==="tool-approval-card"}function Yl(e,t){return(e==null?void 0:e.workflowId)===t.id}var lx=Symbol.for("chat.jsx.element"),cx=new Set([Qr,Zr,ei,ti,ni,ri,Jf,zf,Hf,ii,Vf,Gf,Kf,Wf,oi,ai,Yf,si]);function ux(e){return typeof e=="object"&&e!==null&&e.$$typeof===lx}async function ra(e){let t=na(e);if(t&&typeof t=="object"&&ta(t))return t;let{isJSX:n,toCardElement:r}=await Promise.resolve().then(()=>(Zf(),Qf));return n(t)?r(t):null}function na(e){var t;if(Array.isArray(e))return e.map(n=>na(n));if(!ux(e))return e;if(typeof e.type=="function"&&!cx.has(e.type)){let n={...(t=e.props)!=null?t:{}};return e.children!==void 0&&(n.children=e.children),na(e.type(n))}return{...e,children:na(e.children)}}var em=async(e,t)=>{let n=new TextEncoder,r=n.encode(e),i=n.encode(t),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("")},tm=(e,t)=>{if(typeof e!="string"||typeof t!="string"||e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r+=1)n|=e.charCodeAt(r)^t.charCodeAt(r);return n===0};var px=require("cross-fetch");var nm=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 t=await(await fetch("http://localhost:2022/.well-known/novu")).json();return`${t.tunnelOrigin}${t.route}`}}catch(e){console.error(e)}return""};function rm(e){return!!e&&typeof e=="object"&&"error"in e&&"message"in e&&"statusCode"in e}var ia=(e,t)=>{if(!e)throw new zi;return{post:async(n,r)=>{let i=await fetch(`${t}/v1${n}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`},body:JSON.stringify(r)}),o=await i.json();if(i.ok)return o;throw rm(o)?new Hi(o.statusCode,o.error,o.message):new ir(o)},delete:async n=>(await fetch(`${t}/v1${n}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`}})).json()}};var cm=require("liquidjs");function Jl(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r];i&&typeof i=="object"&&!Array.isArray(i)?n[r]=Jl(n[r]||{},i):(Array.isArray(i),n[r]=i)}return n}function oa(e,t){let n=t.split(".").reduce((r,i)=>{if(r&&typeof r=="object")return r[i]},e);if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);if(typeof n=="object"){let r=JSON.stringify(n);return r==="{}"?"":r}return""}function im(e,t=2,n,r=", "){if(!Array.isArray(e)||e.length===0)return"";let i=n?e.map(s=>typeof s!="object"||!s?"":oa(s,n)):e;if(i.length===1)return i[0];if(i.length===2)return`${i[0]} and ${i[1]}`;if(t>=i.length){let s=i.slice(0,-1),u=i[i.length-1];return`${s.join(r)} and ${u}`}let o=i.slice(0,t),a=i.length-t;return`${o.join(r)} and ${a} ${a===1?"other":"others"}`}var om=zt(require("pluralize"),1);function am(e,t="",n="",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 n?o=i===1?t:n:o=(0,om.default)(t,i),r==="true"?`${i} ${o}`:o}var dx=require("liquidjs"),sm=zt(require("pluralize"),1),hx=require("zod");var fx="",mx=2,gx="other",yx=", ",bx=" and ",wx=", and ";function lm(e,t=fx,n=mx,r=gx,i=yx,o=bx,a=wx){if(!Array.isArray(e)||e.length===0)return"";let s=t?e.map(g=>typeof g!="object"||!g?"":oa(g,t)):e,u=s.length;if(u===1)return s[0];if(u===2)return`${s[0]}${o}${s[1]}`;if(n>=u){let g=s.slice(0,u-1),y=s[u-1];return`${g.join(i)}${a}${y}`}let p=s.slice(0,n),d=u-n,h=n===1?o:a;return`${p.join(i)}${h}${d} ${(0,sm.default)(r,d)}`}function Sx(e){return Array.isArray(e)||typeof e=="object"&&e!==null?um(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 um=(e,t=0)=>Array.isArray(e)||typeof e=="object"&&e!==null?JSON.stringify(e,null,t).replace(/"/g,"'").replace(/\n/g,"\\n"):e==null?"":String(e);function pm(e){let t=new cm.Liquid({outputEscape:Sx,...e});return t.registerFilter("json",(n,r)=>um(n,r)),t.registerFilter("digest",im),t.registerFilter("toSentence",lm),t.registerFilter("pluralize",am),t}var Qn=zt(require("chalk"),1),et={info:e=>Qn.default.blue(e),warning:e=>Qn.default.yellow(e),error:e=>Qn.default.red(e),success:e=>Qn.default.green(e),underline:e=>Qn.default.underline(e),bold:e=>Qn.default.bold(e)},lt={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 aa(e){return e||process.env.NOVU_API_URL||"https://api.novu.co"}function sa(e){return e||process.env.NOVU_SECRET_KEY||process.env.NOVU_API_KEY||""}var Gl=zt(require("sanitize-html"),1),Tx=["src","alt","width","height","loading","srcset","sizes","crossorigin","usemap","ismap","class","id","style","title","dir","lang"];function xx(e){return e.toLowerCase().startsWith("on")}function vx(e){return e.replace(/<\/([a-zA-Z][a-zA-Z0-9]*)\s*\/[^>]*>/g,"</$1>")}var kx={allowedTags:Gl.default.defaults.allowedTags.concat(["style","img","html","head","body","link","meta","title"]),allowedAttributes:!1,transformTags:{"*":(e,t)=>{let n={};for(let[r,i]of Object.entries(t))xx(r)||(n[r]=i);return{tagName:e,attribs:n}},img:(e,t)=>{let n={};for(let[r,i]of Object.entries(t))Tx.includes(r.toLowerCase())&&(n[r]=i);return{tagName:e,attribs:n}}},allowVulnerableTags:!0,parseStyleAttributes:!1,parser:{lowerCaseAttributeNames:!0}},dm=e=>{if(!e)return e;let t=vx(e),n=/^<!DOCTYPE .*?>/,r=t.match(n),i=(0,Gl.default)(t,kx);return r?r[0]+i:i},la=e=>Object.keys(e).reduce((t,n)=>{let r=e[n];return typeof r=="string"?t[n]=dm(r):Array.isArray(r)?t[n]=r.map(i=>typeof i=="string"?dm(i):typeof i=="object"?la(i):i):typeof r=="object"&&r!==null?t[n]=la(r):t[n]=r,t},{});function hm(e,t=!0,n=console){t&&(n.info(`
148
+ ${et.bold(et.underline("Discovered workflowId:"))} '${e.workflowId}'`),e.steps.forEach((r,i)=>{let o=i===e.steps.length-1,a=o?"\u2514":"\u251C";n.info(`${a} ${lt.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";n.info(`${d} ${h} ${lt.PROVIDER} Discovered provider: '${s.type}'`)})}))}var fm=require("jsonrepair");function mm(e){let t=e.trim();return(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))&&t.length>2}var gm="__novuJsonString";function Ax(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&e[gm]===!0}function li(e){if(typeof e=="string"){if(!mm(e))return e;try{let t=JSON.parse(e);return{[gm]:!0,value:li(t)}}catch{return e}}if(Array.isArray(e))return e.map(t=>li(t));if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=li(r);return t}return e}function ci(e){if(Ax(e))return JSON.stringify(ci(e.value));if(Array.isArray(e))return e.map(t=>ci(t));if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=ci(r);return t}return e}function Ex(e){try{return JSON.parse(e),e}catch{try{return(0,fm.jsonrepair)(e)}catch{return e}}}function ym(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>typeof n=="string"?[t,mm(n)?Ex(n):n]:typeof n=="object"&&n!==null&&!Array.isArray(n)?[t,ym(n)]:[t,n]))}function bm(e){return!(e!=null&&e.data)||typeof e.data!="object"||Array.isArray(e.data)?e:{...e,data:ym(e.data)}}var Sm=zt(require("ajv"),1),Tm=zt(require("ajv-formats"),1);var wm=e=>typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));var ca=class extends _n{constructor(n,r){let i=r.length===1?"it":"them";super(`Tried to use a ${n} in @novu/framework without ${r.join(", ")} installed. Please install ${i} by running \`npm install ${r.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var ua=async(e,t)=>{let n=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)||n.add(a.name)}),n.size>0)throw new ca(t,Array.from(n))};var pa=class{constructor(){this.requiredImports=[];this.ajv=new Sm.default({useDefaults:!0,removeAdditional:"failing",strict:!1}),(0,Tm.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(t){let n=t.type==="object"||!!t.anyOf||!!t.allOf||!!t.oneOf;return n&&await ua(this.requiredImports,"JSON schema"),n}async validate(t,n){let r=this.compiledSchemas.get(n);r||(r=this.ajv.compile(n),this.compiledSchemas.set(n,r));let i=wm(t);return r(i)?{success:!0,data:i}:{success:!1,errors:r.errors.map(a=>({path:a.instancePath,message:a.message}))}}async transformToJsonSchema(t){return t}};var da=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(t){let n=t.safeParseAsync!==void 0;return n&&await ua(this.requiredImports,"Zod schema"),n}async validate(t,n){let r=await n.safeParseAsync(t);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(t){let{zodToJsonSchema:n}=await import("zod-to-json-schema");return n(t)}};var ha=new da,fa=new pa,ui=async(e,t)=>{if(await ha.canHandle(e))return ha.validate(t,e);if(await fa.canHandle(e))return fa.validate(t,e);throw new Error("Invalid schema")},bt=async e=>{if(await ha.canHandle(e))return ha.transformToJsonSchema(e);if(await fa.canHandle(e))return fa.transformToJsonSchema(e);throw new Error("Invalid schema")};function xm(){return["development",void 0,"dev"].includes(process.env.NODE_ENV)}var gr=class{constructor(t){this.discoveredWorkflows=new Map;this.discoverWorkflowPromises=new Map;this.registeredAgents=new Map;this.version="2.13.1";let n=this.buildOptions(t);this.apiUrl=n.apiUrl,this.secretKey=n.secretKey,this.strictAuthentication=n.strictAuthentication,this.verbose=n.verbose,this.logger=n.logger,this.templateEngine=pm()}buildOptions(t){let n={apiUrl:aa(t==null?void 0:t.apiUrl),secretKey:sa(t==null?void 0:t.secretKey),strictAuthentication:!xm(),verbose:xm(),logger:console};return(t==null?void 0:t.strictAuthentication)!==void 0?n.strictAuthentication=t.strictAuthentication:process.env.NOVU_STRICT_AUTHENTICATION_ENABLED!==void 0&&(n.strictAuthentication=process.env.NOVU_STRICT_AUTHENTICATION_ENABLED==="true"),(t==null?void 0:t.verbose)!==void 0&&(n.verbose=t.verbose),(t==null?void 0:t.logger)!==void 0&&(n.logger=t.logger),n}log(...t){this.verbose&&this.logger.info(...t)}async addWorkflows(t){for(let n of t){if(this.discoveredWorkflows.has(n.id))continue;let r=this.discoverWorkflowPromises.get(n.id);if(r){await r;continue}let i=this.addWorkflow(n);this.discoverWorkflowPromises.set(n.id,i),await i}}addAgents(t){for(let n of t)this.registeredAgents.set(n.id,n)}getAgent(t){return this.registeredAgents.get(t)}async addWorkflow(t){try{let n=await t.discover();hm(n,this.verbose,this.logger),this.discoveredWorkflows.set(t.id,n)}finally{this.discoverWorkflowPromises.delete(t.id)}}healthCheck(){let t=this.getRegisteredWorkflows(),n=t.length,r=t.reduce((i,o)=>i+o.steps.length,0);return{status:"ok",sdkVersion:"2.13.1",frameworkVersion:"2024-06-26",discovered:{workflows:n,steps:r}}}getWorkflow(t){let n=this.discoveredWorkflows.get(t);if(n)return n;throw new Lr(t)}getStep(t,n){let i=this.getWorkflow(t).steps.find(o=>o.stepId===n);if(i)return i;throw new Qi(n)}getRegisteredWorkflows(){return Array.from(this.discoveredWorkflows.values())}discover(){return{workflows:this.getRegisteredWorkflows(),agents:Array.from(this.registeredAgents.keys()).map(t=>({agentId:t}))}}mock(t){try{return bu(t)}catch(n){return this.logger.warn("Failed to mock schema, returning empty object:",n),{}}}async validate(t,n,r,i,o,a,s){let u=await ui(n,t);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(t,n,r,i,o){throw t?n?r==="output"?new $i(i,t,n,o):new Error(`Invalid payload type: '${r}'`):new Error("providerId is required"):new Error("stepId is required")}throwInvalidStep(t,n,r,i){if(!t)throw new Error("stepId is required");switch(n){case"output":throw new Di(r,t,i);case"result":throw new Fi(r,t,i);case"controls":throw new Li(r,t,i);default:throw new Error(`Invalid payload type: '${n}'`)}}throwInvalidEvent(t,n,r){switch(t){case"controls":throw new Ni(n,r);case"payload":throw new Pr(n,r);default:throw new Error(`Invalid payload type: '${t}'`)}}executeStepFactory(t,n,r){return async(i,o,a)=>{if(r())return;let s=this.getStep(t.workflowId,i),u=t.action==="preview";if(!u&&i===t.stepId){let y=await this.createStepControls(s,t),P=await this.compileControls(y,t);if(await this.shouldSkip(a==null?void 0:a.skip,P))return n({options:{skip:!0},outputs:{},providers:{}}),{}}let p=this.previewStep.bind(this),d=this.executeStep.bind(this),g=await(u?p:d)(t,{...s,providers:s.providers.map(y=>{var ee;let P=(ee=a==null?void 0:a.providers)==null?void 0:ee[y.type];if(!P)throw new Vi(y.type);return{...y,resolve:P}}),resolve:o});return this.shouldSanitize({stepType:s.type,options:a})&&(g={...g,outputs:la(g.outputs)}),i===t.stepId&&n({...g,options:{skip:!1}}),g.outputs}}shouldSanitize({stepType:t,options:n}){return(n==null?void 0:n.disableOutputSanitization)===!0?!1:["email","in_app"].includes(t)}async shouldSkip(t,n){return t?t(n):!1}async executeWorkflow(t){let i=`${{execute:"Executing",preview:"Previewing"}[t.action]||t.action} workflowId:`;this.log(`
149
+ ${et.bold(et.underline(i))} '${t.workflowId}'`);let o=this.getWorkflow(t.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},g=()=>p,y;try{if(t.action==="execute"&&!t.payload)throw new Pr(t.workflowId,{message:"Event `payload` is required"});let Oe=await this.createExecutionPayload(t,o),$={...t,payload:Oe};await Promise.race([d,o.execute({payload:Oe,env:t.env,controls:{},subscriber:t.subscriber,context:t.context,step:{email:this.executeStepFactory($,h,g),sms:this.executeStepFactory($,h,g),inApp:this.executeStepFactory($,h,g),digest:this.executeStepFactory($,h,g),delay:this.executeStepFactory($,h,g),push:this.executeStepFactory($,h,g),chat:this.executeStepFactory($,h,g),custom:this.executeStepFactory($,h,g),throttle:this.executeStepFactory($,h,g),tool:this.executeStepFactory($,h,g)}})])}catch(Oe){y=Oe}let P=process.hrtime(a),ee=P[0],Z=P[1],B=ee*1e3+Z/1e6,ue=y?lt.ERROR:lt.SUCCESS,ke={execute:"Executed",preview:"Previewed"}[t.action]||t.action;if(this.log(`${ue} ${ke} workflowId: \`${t.workflowId}\``),this.prettyPrintExecute(t,B,y),y)throw y;return{outputs:s.outputs,providers:s.providers,options:s.options,metadata:{status:"success",error:!1,duration:B}}}async createExecutionPayload(t,n){let{payload:r}=t;if(t.action==="preview"){let o=this.mock(n.payload.schema);r=Object.assign(o,r)}return await this.validate(r,n.payload.unknownSchema,"event","payload",t.workflowId)}prettyPrintExecute(t,n,r){if(!this.verbose)return;let i=r?lt.ERROR:lt.SUCCESS,a={execute:"Executed",preview:"Previewed"}[t.action]||t.action,s=r?"Failed to execute":a,u=r?et.error:et.success,p=`${i} ${s} workflowId: '${t.workflowId}`;this.logger.info(`
150
150
  ${et.bold(u(p))}'
151
151
  \u251C ${lt.STEP} stepId: '${t.stepId}'
152
152
  \u251C ${lt.ACTION} action: '${t.action}'
153
153
  \u2514 ${lt.DURATION} duration: '${n.toFixed(2)}ms'
154
- `)}async executeProviders(t,n,r,i){return n.providers.reduce(async(o,a)=>{let s=await o,u=await this.runProvider(t,n,a,r,i);return{...s,[a.type]:u}},Promise.resolve({}))}async runProvider(t,n,r,i,o){let a=t.action==="preview";if(t.stepId!==n.stepId)return a?(this.log(` ${lt.MOCK} Mocked provider: \`${r.type}\``),this.mock(r.outputs.schema)):(this.log(` ${lt.HYDRATED} Hydrated provider: \`${r.type}\``),{});try{return await this.resolveProviderOutput(t,n,r,o,i)}catch(s){if(this.log(` ${lt.ERROR} Failed to execute provider: \`${r.type}\``),a)return this.log(` ${lt.MOCK} Mocked provider: \`${r.type}\``),this.mock(r.outputs.schema);throw new Hi(r.type,t.action,s)}}async resolveProviderOutput(t,n,r,i,o){let a=await r.resolve({controls:i,outputs:o}),s=await this.validate(a,r.outputs.unknownSchema,"step","output",t.workflowId,n.stepId,r.type);return this.log(` ${lt.SUCCESS} Executed provider: \`${r.type}\``),{...s,_passthrough:a._passthrough}}async executeStep(t,n){if(t.stepId===n.stepId)try{let r=await this.createStepControls(n,t),i=await this.compileControls(r,t),o=await n.resolve(i),a=await this.normalizeChatCardOutput(n,o),s=await this.validate(a,n.outputs.unknownSchema,"step","output",t.workflowId,n.stepId),u=await this.executeProviders(t,n,s,i);return this.log(` ${lt.SUCCESS} Executed stepId: \`${n.stepId}\``),{outputs:s,providers:u}}catch(r){throw this.log(` ${lt.ERROR} Failed to execute stepId: \`${n.stepId}\``),qn(r)?r:new Nr(n.stepId,t.action,r)}else try{let r=this.getStepState(t,n.stepId);if(r){let i=await this.validate(r.outputs,n.results.unknownSchema,"step","result",t.workflowId,n.stepId);return this.log(` ${lt.HYDRATED} Hydrated stepId: \`${n.stepId}\``),{outputs:i,providers:await this.executeProviders(t,n,i,{})}}else throw new Mi(t.workflowId,n.stepId)}catch(r){throw this.log(` ${lt.ERROR} Failed to hydrate stepId: \`${n.stepId}\``),r}}async normalizeChatCardOutput(t,n){if(t.type!=="chat"||(n==null?void 0:n.card)==null)return n;let r=await ra(n.card);return r?{...n,card:r}:n}async compileControls(t,n){var r;try{let i=li(t),o=this.preprocessTranslationPatterns(JSON.stringify(i));o=this.preprocessFilterTranslationArgs(o);let a=this.templateEngine.parse(o),s=this.getWorkflow(n.workflowId),u={workflow:{workflowId:s.workflowId,name:s.name,description:s.description,tags:s.tags,severity:s.severity},payload:n.payload,subscriber:n.subscriber,...n.actor&&{actor:n.actor},context:n.context,steps:Ex(n.state),env:(r=n.env)!=null?r:{}},p=await this.templateEngine.render(a,u),h=this.postprocessTranslationMarkers(p),d=(0,vm.jsonrepair)(h),g=JSON.parse(d),y=ci(g);return bm(y)}catch(i){throw new Ui(n.workflowId,n.stepId,i)}}preprocessTranslationPatterns(t){return t.replace(/\{\{\s*t\.([\p{L}\p{N}_.-]+)\s*\}\}/gu,"[T:$1]")}preprocessFilterTranslationArgs(t){return t.replace(/'t\.([\p{L}\p{N}_.-]+)'/gu,"'[T:$1]'")}postprocessTranslationMarkers(t){return t.replace(/\[T:([\p{L}\p{N}_.-]+)\]/gu,"{{t.$1}}")}async createStepControls(t,n){return await this.validate(n.controls,t.controls.unknownSchema,"step","controls",n.workflowId,t.stepId)}async previewStep(t,n){try{return await this.constructStepForPreview(t,n)}catch(r){throw this.log(` ${lt.ERROR} Failed to preview stepId: \`${n.stepId}\``),qn(r)?r:new Nr(n.stepId,t.action,r)}}async constructStepForPreview(t,n){return t.stepId===n.stepId?await this.previewRequiredStep(n,t):await this.extractMockDataForPreviousSteps(t,n)}async extractMockDataForPreviousSteps(t,n){let r={},i=this.getStepState(t,n.stepId),o=this.mock(n.results.schema);return{outputs:Jl(o,(i==null?void 0:i.outputs)||{}),providers:await this.executeProviders(t,n,r,{})}}async previewRequiredStep(t,n){let r=await this.createStepControls(t,n),i=await this.compileControls(r,n),o=await t.resolve(i),a=await this.normalizeChatCardOutput(t,o),s=await this.validate(a,t.outputs.unknownSchema,"step","output",n.workflowId,t.stepId);return this.log(` ${lt.MOCK} Mocked stepId: \`${t.stepId}\``),{outputs:s,providers:await this.executeProviders(n,t,s,i)}}getStepState(t,n){return t.state.find(r=>r.stepId===n)}getStepCode(t,n){return{code:this.getStep(t,n).resolve.toString()}}getWorkflowCode(t){return{code:this.getWorkflow(t).execute.toString()}}getCode(t,n){let r;if(t)n?r=this.getStepCode(t,n):r=this.getWorkflowCode(t);else throw new Lr(t);return r}};function Ex(e){let t={};for(let n of e)t[n.stepId]=n.outputs;return t}var Rx={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 ma(e){return typeof e=="string"&&e.trim()?e:!e||typeof e!="object"?null:ma(e.message)}function _x(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;let n=t,r=ma(n.message);if(r)return r;let i=ma(n.error);if(i)return i;let o=n.errors;return Array.isArray(o)?ma(o[0]):null}function Ox(e,t){var i;let n=(i=Rx[e])!=null?i:e,r=_x(t);return r?`Delivery failed: ${n}: ${r}`:`Delivery failed: ${n}`}var kn=class extends Error{constructor(t,n){super(t),this.name="AgentError",this.cause=n==null?void 0:n.cause,this.delivery=n==null?void 0:n.delivery}},Jt=class extends kn{constructor(t,n){let r={statusCode:t,responseBody:n};super(Ox(t,n),{delivery:r}),this.name="AgentDeliveryError",this.statusCode=t,this.responseBody=n}};function pi(e){return e instanceof kn?e:e instanceof Error?new kn(e.message,{cause:e}):new kn("Turn failed",{cause:e})}var km=Symbol.for("novu.agent.runtimeContext");var Kl=(i=>(i.ON_MESSAGE="onMessage",i.ON_ACTION="onAction",i.ON_RESOLVE="onResolve",i.ON_REACTION="onReaction",i))(Kl||{}),yr=class{constructor(){this.__novuPendingApproval=!0}};function Am(e){return typeof e=="object"&&e!==null&&"suppress"in e&&e.suppress===!0}var Em=1;function Cx(e){return new Promise(t=>{setTimeout(t,e)})}function Ix(e){return e>=500||e===408||e===429}var ga=class{constructor(t){this.sequence=0;this.buffer=[];this.chain=Promise.resolve();var n,r;this.runId=`run_${crypto.randomUUID()}`,this.eventsUrl=t.eventsUrl,this.secretKey=t.secretKey,this.conversationId=t.conversationId,this.agentId=t.agentId,this.turnId=t.turnId,this.fetchFn=(n=t.fetchFn)!=null?n:fetch,this.maxRetries=(r=t.maxRetries)!=null?r:3}enqueue(t){this.sequence+=1,this.buffer.push({version:Em,conversationId:this.conversationId,agentId:this.agentId,runId:this.runId,turnId:this.turnId,sequence:this.sequence,timestamp:new Date().toISOString(),event:t})}flush(){if(this.buffer.length===0)return this.chain;let t=this.buffer;return this.buffer=[],this.chain=this.chain.then(()=>this.postBatchWithRetry(t)),this.chain}async emit(t){this.enqueue(t),await this.flush()}async postBatchWithRetry(t){let n;for(let r=1;r<=this.maxRetries;r+=1)try{await this.postBatch(t);return}catch(i){if(n=i,!Px(i))throw i;r<this.maxRetries&&await Cx(250*r)}throw n}async postBatch(t){let n;try{n=await this.fetchFn(this.eventsUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${this.secretKey}`},body:JSON.stringify({events:t})})}catch(i){throw Mx(i)}let r=await n.text().catch(()=>"");if(!n.ok)throw new Jt(n.status,r)}};function Px(e){return!(e instanceof Jt)||e.statusCode===0?!0:Ix(e.statusCode)}function Mx(e){if(e instanceof Jt)return e;let t=e instanceof Error?e.message:"Network request failed";return new Jt(0,t)}var Rm="tool-approval";function Nx(e){return e==="approve"||e==="deny"}function Xl(e,t){return`${Rm}:${e}:${t}`}function _m(e){let[t,n,...r]=(e!=null?e:"").split(":"),i=r.join(":");return t!==Rm||!Nx(n)||!i?null:{approved:n==="approve",approvalId:i}}async function Om(e,t,n,r){var p,h;let i=r!=null?r:t.id,o={approve:Xl("approve",i),deny:Xl("deny",i)},a=d=>({type:"tool-approval-card",...d}),s=(h=(p=n==null?void 0:n.renderApproval)==null?void 0:p.call(n,{toolCall:t,actionIds:o,approvalCard:a}))!=null?h:a(),u={approvalId:i,toolCallId:t.id,name:t.name,input:t.input};if(e.emitToolApprovalRequest(u),Xf(s)){await e.replyApprovalCard(s);return}await e.reply(s)}var Lx=5*1024*1024,Dx=5*1024*1024,Cm=32768,Fx=/^[A-Za-z0-9+/]*={0,2}$/;function fi(e,t){return e.filename?`"${e.filename}"`:`at index ${t}`}function Nm(){return globalThis.Buffer}function Ux(e){var t,n,r;return(r=(n=(t=Nm())==null?void 0:t.isBuffer)==null?void 0:n.call(t,e))!=null?r:!1}function $x(e){return typeof Blob!="undefined"&&e instanceof Blob}function Ql(e){let t=Nm();if(t)return t.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 n="";for(let r=0;r<e.length;r+=Cm){let i=e.subarray(r,r+Cm);n+=String.fromCharCode(...i)}return btoa(n)}function Lm(e){let t=e.replace(/\s/g,""),n=t.length%4;if(!t||n===1||!Fx.test(t))return null;let r=t.endsWith("==")?2:t.endsWith("=")?1:0;return Math.floor(t.length*3/4)-r}function di(e,t,n){if(e>Lx)throw new Error(`Invalid file ${fi(t,n)}: inline data must be 5 MB or smaller. Use a publicly-accessible URL for larger files.`)}async function qx(e,t,n){if(typeof e=="string"){let r=Lm(e);if(r===null)throw new Error(`Invalid file ${fi(t,n)}: data must be a base64-encoded string.`);return di(r,t,n),e}if(Ux(e))return di(e.byteLength,t,n),e.toString("base64");if(e instanceof Uint8Array)return di(e.byteLength,t,n),Ql(e);if(e instanceof ArrayBuffer)return di(e.byteLength,t,n),Ql(new Uint8Array(e));if($x(e))return di(e.size,t,n),Ql(new Uint8Array(await e.arrayBuffer()));throw new Error(`Invalid file ${fi(t,n)}: data must be a base64 string, Buffer, Uint8Array, ArrayBuffer, or Blob.`)}async function jx(e){if(!(e!=null&&e.length))return;let t=[],n=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 ${fi(i,r)}: provide exactly one of data or url.`);if(s){let p=await qx(o,i,r),h=Lm(p);if(n+=h!=null?h:0,n>Dx)throw new Error("Invalid files: total inline data must be 5 MB or smaller. Use publicly-accessible URLs for larger files.");t.push({...i,data:p});continue}if(u&&typeof a!="string")throw new Error(`Invalid file ${fi(i,r)}: url must be a string.`);t.push(i)}return t}async function Dm(e,t){let n=await jx(t);if(typeof e=="string")return n?{markdown:e,files:n}:{markdown:e};let r=await ra(e);if(r)return n?{card:r,files:n}:{card:r};throw new Error("Invalid message content \u2014 expected string or CardElement")}function Bx(e){return`${e}_${crypto.randomUUID()}`}function Im(e){if(e.markdown!==void 0)return{markdown:e.markdown};if(e.card!==void 0)return{card:e.card};throw new Error("Invalid reply content \u2014 expected markdown or card")}function Pm(e){if(e!=null&&e.length)return e.map((t,n)=>({fileId:t.filename||`file_${n}`,name:t.filename,mediaType:t.mimeType,...t.data!==void 0?{data:typeof t.data=="string"?t.data:void 0}:{},...t.url!==void 0?{url:t.url}:{}}))}function Zl(e,t){t.toolApprovalRequest&&(e.toolApprovalRequest=t.toolApprovalRequest),t.signals.length&&(e.signals=t.signals),t.toolResults.length&&(e.toolResults=t.toolResults),t.addReactions.length&&(e.addReactions=t.addReactions),t.deleteMessages.length&&(e.deleteMessages=t.deleteMessages),t.resolve&&(e.resolve=t.resolve)}function ec(e,t){var r;let n=[];if(e.toolApprovalRequest){let i=e.toolApprovalRequest;n.push({type:"tool-approval-request",approvalId:i.approvalId,toolUseId:i.toolCallId,toolName:i.name,input:i.input,...t!=null&&t.deliverApprovalCard?{deliverCard:!0}:{}})}for(let i of e.toolResults)n.push({type:"tool-use-result",toolUseId:i.toolCallId,content:[{type:"text",text:String((r=i.preview)!=null?r:"")},{type:"json",value:i.output}]});for(let i of e.signals)n.push({type:"signal",signal:i});for(let i of e.addReactions)n.push({type:"channel.reaction",messageId:i.messageId,emoji:i.emojiName,op:"add"});for(let i of e.deleteMessages)n.push({type:"channel.delete",messageId:i.messageId});return e.resolve&&n.push({type:"resolve",summary:e.resolve.summary}),n}var tc=class{constructor(t,n,r,i){this.replyUrl=t;this.secretKey=n;this.conversationId=r;this.integrationIdentifier=i}async sendReply(t,n){let r=this._baseBody();return r.reply=t,Zl(r,n),this._post(r)}async sendApprovalCard(t,n){let r=this._baseBody();return r.reply={toolApprovalCard:t},Zl(r,n),this._post(r)}async editMessage(t,n){return this._post({...this._baseBody(),edit:{messageId:t,content:n}})}async deleteMessage(t){await this._post({...this._baseBody(),deleteMessages:[{messageId:t}]})}async setTyping(t){await this._post({...this._baseBody(),typing:t})}async flushSideEffects(t){let n=this._baseBody();Zl(n,t),await this._post(n)}async emitCustom(){}queueRunStart(){}async emitRunFinish(){}async reportTurnError(){await this._post({...this._baseBody(),error:!0})}_baseBody(){return{conversationId:this.conversationId,integrationIdentifier:this.integrationIdentifier}}async _post(t){let n=await fetch(this.replyUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${this.secretKey}`},body:JSON.stringify(t)});if(!n.ok){let i=await n.text().catch(()=>"");throw new Jt(n.status,i)}let r=await n.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}},nc=class{constructor(t){this.outbox=t}async sendReply(t,n){let r=Bx("msg"),i=ec(n);return i.push({type:"message",role:"assistant",messageId:r,content:Im(t),files:Pm(t.files)}),await this._emitAndFlush(i),{messageId:r,platformThreadId:""}}async sendApprovalCard(t,n){return await this._emitAndFlush(ec(n,{deliverApprovalCard:!0})),"unaddressable"}async editMessage(t,n){return await this.outbox.emit({type:"channel.edit",messageId:t,content:Im(n),files:Pm(n.files)}),{messageId:t,platformThreadId:""}}async deleteMessage(t){await this.outbox.emit({type:"channel.delete",messageId:t})}async setTyping(t){if(t==="stop"){await this.outbox.emit({type:"channel.typing",state:"off"});return}let n=typeof t=="object"&&"status"in t?t.status:void 0;await this.outbox.emit({type:"channel.typing",state:"on",status:n})}async flushSideEffects(t){await this._emitAndFlush(ec(t))}async emitCustom(t,n){await this.outbox.emit({type:"custom",name:t,data:n})}queueRunStart(){this.outbox.enqueue({type:"run-start"})}async emitRunFinish(t){await this.outbox.emit({type:"run-finish",outcome:t})}async reportTurnError(t){await this.outbox.emit({type:"run-error",message:t!=null?t:"agent handler failed"})}async _emitAndFlush(t){if(t.length!==0){for(let n of t)this.outbox.enqueue(n);await this.outbox.flush()}}},hi=class{constructor(t,n,r){this.transport=r;this.editedByHandler=!1;this.messageId=t,this.platformThreadId=n}async edit(t,n){this.editedByHandler=!0;let r=await Dm(t,n==null?void 0:n.files),i=await this.transport.editMessage(this.messageId,r);if(!i)throw new Error("Agent edit did not return a message handle");return this.messageId=i.messageId,this.platformThreadId=i.platformThreadId,this}async delete(){await this.transport.deleteMessage(this.messageId)}},rc=class{constructor(){this.messageId="";this.platformThreadId=""}async edit(){return this}async delete(){}},Mm;Mm=km;var ya=class{constructor(t,n,r){this[Mm]=!0;this._signals=[];this._toolResults=[];this._pendingToolApprovalRequest=null;this._pendingReactions=[];this._pendingDeletes=[];this._resolveSignal=null;var s,u,p,h;this.event=t.event,this.action=(s=t.action)!=null?s:null,this.message=t.message,this.reaction=t.reaction,this.conversation=t.conversation,this.subscriber=t.subscriber,this.context=(u=t.context)!=null?u:null,this.notification=(p=t.notification)!=null?p:null,this.history=t.history,this.platform=t.platform,this.platformContext=t.platformContext,this._toolApprovalConfig=r,this._transport=t.eventsUrl?new nc(new ga({eventsUrl:t.eventsUrl,secretKey:n,conversationId:t.conversationId,agentId:t.agentId,turnId:t.deliveryId})):new tc(t.replyUrl,n,t.conversationId,t.integrationIdentifier),this._metadataState={...(h=t.conversation.metadata)!=null?h:{}};let i=this;this.metadata={get(d){return i._metadataState[d]},set(d,g){i._metadataState[d]=g,i._signals.push({type:"metadata",action:"set",key:d,value:g})},delete(d){delete i._metadataState[d],i._signals.push({type:"metadata",action:"delete",key:d})},clear(){i._metadataState={},i._signals.push({type:"metadata",action:"clear"})},get current(){return{...i._metadataState}}};let o=d=>this._transport.setTyping(d),a=(d=>o(d===void 0?{}:{status:d}));a.stop=()=>o("stop"),this.typing=a,this.toolApproval={request:async d=>(await Om(this,d,this._toolApprovalConfig),new yr)}}asMessageContext(){return this}async reply(t,n){let r=await Dm(t,n==null?void 0:n.files),i=this._drainSideEffectsSnapshot(),o=await this._transport.sendReply(r,i);if(!o)throw new Error("Agent reply did not return a message handle");return new hi(o.messageId,o.platformThreadId,this._transport)}async replyApprovalCard(t){let n=this._drainSideEffectsSnapshot(),r=await this._transport.sendApprovalCard(t,n);if(r==="unaddressable")return new rc;if(!r)throw new Error("Agent approval card reply did not return a message handle");return new hi(r.messageId,r.platformThreadId,this._transport)}createReplyHandle(t){return new hi(t,"",this._transport)}async emit(t){await this._transport.emitCustom(t.name,t.data)}resolve(t){this._resolveSignal={summary:t}}trigger(t,n){this._signals.push({...n,type:"trigger",workflowId:t})}emitToolApprovalRequest(t){if(this._pendingToolApprovalRequest)throw new Error("Only one tool approval request can be queued before the next reply");this._pendingToolApprovalRequest=t}emitToolResult(t){this._toolResults.push(t)}addReaction(t,n){this._pendingReactions.push({messageId:t,emojiName:n})}deleteMessage(t){this._pendingDeletes.push({messageId:t})}queueRunStart(){this._transport.queueRunStart()}async emitRunFinish(t){try{await this._transport.emitRunFinish(t.outcome)}catch(n){console.error("[agent] Failed to emit run finish:",n)}}async reportTurnError(t){try{await this._transport.reportTurnError(t)}catch(n){console.error("[agent] Failed to report turn error:",n)}}async flush(){if(!this._hasPendingSideEffects())return;let t=this._drainSideEffectsSnapshot();await this._transport.flushSideEffects(t)}_hasPendingSideEffects(){return!!(this._pendingToolApprovalRequest||this._signals.length||this._toolResults.length||this._resolveSignal||this._pendingReactions.length||this._pendingDeletes.length)}_drainSideEffectsSnapshot(){let t={toolApprovalRequest:this._pendingToolApprovalRequest,signals:this._signals,toolResults:this._toolResults,addReactions:this._pendingReactions,deleteMessages:this._pendingDeletes,resolve:this._resolveSignal};return this._pendingToolApprovalRequest=null,this._signals=[],this._toolResults=[],this._pendingReactions=[],this._pendingDeletes=[],this._resolveSignal=null,t}};function zx(e){return!!(typeof e=="string"||typeof e=="object"&&e!==null&&ta(e)||typeof e=="object"&&e!==null&&("markdown"in e||"card"in e||"files"in e))}function Vx(e,t){return e}function Wx(e,t){var n;for(let r of e){let i=r.toolData;if(r.type==="tool_approval_request"&&(i==null?void 0:i.approvalId)===t&&i.toolCallId)return{approvalId:i.approvalId,toolCallId:i.toolCallId,name:(n=i.toolName)!=null?n:"tool",input:i.input}}}async function Fm(e){var o;let t=new ya(e.bridge,e.secretKey,e.agent.handlers.toolApproval),{agent:n,event:r,logger:i}=e;try{t.queueRunStart(),await Hx(n,r,t),await t.flush(),await t.emitRunFinish({outcome:"completed"})}catch(a){let s=pi(a);i==null||i.error(`[agent:${n.id}] Turn failed (${r}): ${s.message}`,(o=s.cause)!=null?o:s);let u=!1;if(n.handlers.onError)try{let p=await n.handlers.onError(s,Vx(t,r));Am(p)?u=!0:zx(p)&&(await t.reply(p),u=!0)}catch(p){i==null||i.error(`[agent:${n.id}] onError failed:`,p)}u?await t.emitRunFinish({outcome:"completed"}):await t.reportTurnError(s.message)}finally{try{await t.typing.stop(),await t.flush()}catch{}}}async function Hx(e,t,n){var i,o;let r=async a=>{a instanceof yr||a===void 0||await n.reply(a)};switch(t){case"onMessage":{await r(await e.handlers.onMessage(n.message,n));break}case"onAction":{let a=_m((i=n.action)==null?void 0:i.id);if(a&&e.handlers.onToolApproval){let{approved:s,approvalId:u}=a,p=Wx(n.history,u),h=p?{id:p.toolCallId,name:p.name,input:p.input}:{id:u,name:""},d=n.createReplyHandle((o=n.action.sourceMessageId)!=null?o:""),g={toolCall:h,approved:s,approvalMessage:d};e.userOnToolApproval===!1&&(await n.typing(),n.action.sourceMessageId&&await d.delete());let y=await e.handlers.onToolApproval(g,n);await r(y);break}e.handlers.onAction&&await r(await e.handlers.onAction(n.action,n));break}case"onReaction":e.handlers.onReaction&&await r(await e.handlers.onReaction(n.reaction,n));break;case"onResolve":e.handlers.onResolve&&await r(await e.handlers.onResolve(n));break;default:throw new jn(t,Kl)}}function Um(e){let t={};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 t)&&(t[s]=u)}let n=t.t,r=n!==void 0?Number(n):Number.NaN;return{t:Number.isFinite(r)?r:void 0,v1:t.v1}}var br=class{constructor(t){this.handler=t.handler,this.client=t.client?t.client:new gr,this.workflows=t.workflows||[],this.agents=t.agents||[],this.http=ia(this.client.secretKey,this.client.apiUrl),this.frameworkName=t.frameworkName,this.hmacEnabled=this.client.strictAuthentication,this.waitUntil=t.waitUntil,this.client.addAgents(this.agents)}createHandler(){return async(...t)=>{await this.client.addWorkflows(this.workflows);let n=await this.handler(...t),r=await this.handleAction({actions:n});return n.transformResponse(r)}}getStaticHeaders(){let t=`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.13.1-rc.852194fa77","novu-framework-server":this.frameworkName,"user-agent":t}}createResponse(t,n){return{status:t,body:JSON.stringify(n),headers:{...this.getStaticHeaders()}}}createError(t){return{status:t.statusCode,body:JSON.stringify({message:t.message,data:t.data,code:t.code}),headers:this.getStaticHeaders()}}async handleAction({actions:t}){var d;let n=await t.url(),r=await t.method(),i=n.searchParams.get("action")||"health-check",o=n.searchParams.get("workflowId")||"",a=n.searchParams.get("stepId")||"",s=n.searchParams.get("agentId")||"",u=n.searchParams.get("event")||"",p=await t.headers("novu-signature")||"",h={};try{r==="POST"&&(h=await t.body())}catch{}try{i!=="health-check"&&await this.validateHmac(h,p);let g=this.getPostActionMap(h,o,a,i,s,u,(d=this.waitUntil)!=null?d:t.waitUntil),y=this.getGetActionMap(o,a);if(r==="POST")return await this.handlePostAction(i,g);if(r==="GET")return await this.handleGetAction(i,y);if(r==="OPTIONS")return this.createResponse(200,{})}catch(g){return this.handleError(g)}return this.createError(new Bi(r))}getPostActionMap(t,n,r,i,o,a,s){return{trigger:this.triggerAction({workflowId:n,...t}),execute:async()=>{let u=await this.client.executeWorkflow({...t,workflowId:n,stepId:r,action:i});return this.createResponse(200,u)},preview:async()=>{let u=await this.client.executeWorkflow({...t,workflowId:n,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=Fm({agent:u,event:a,bridge:t,secretKey:this.client.secretKey,logger:this.client.logger});return s?s(p):this.warnOnUnprotectedServerlessRuntime(o),this.createResponse(200,{status:"ack"})}}}warnOnUnprotectedServerlessRuntime(t){let n;try{process.env.AWS_LAMBDA_FUNCTION_NAME?n="AWS Lambda":process.env.VERCEL&&(n="Vercel")}catch{}n&&this.client.logger.warn(`[agent:${t}] Agent event acknowledged without a \`waitUntil\` primitive while running on ${n}. The runtime may freeze once the response is sent, silently dropping the rest of the agent turn. Pass \`waitUntil\` to \`serve()\` (e.g. \`serve({ agents, waitUntil })\`) to extend the invocation lifetime.`)}triggerAction(t){return async()=>{let n={name:t.workflowId,to:t.to,payload:(t==null?void 0:t.payload)||{},transactionId:t.transactionId,overrides:t.overrides||{},...t.actor&&{actor:t.actor},...t.bridgeUrl&&{bridgeUrl:t.bridgeUrl},...t.controls&&{controls:t.controls},...t.context&&{context:t.context},...t.agentId!==void 0&&{agentId:t.agentId}},r=await this.http.post("/events/trigger",n);return this.createResponse(200,r)}}getGetActionMap(t,n){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(t,n);return this.createResponse(200,r)}}}async handlePostAction(t,n){if(Object.values(Cr).includes(t)){let r=n[t];return r()}else throw new jn(t,Cr)}async handleGetAction(t,n){if(Object.values(Oi).includes(t)){let r=n[t];return r()}else throw new jn(t,Oi)}handleError(t){if(qn(t))return t.statusCode>=500&&this.client.logger.error(t),this.createError(t);if(uu(t))return this.createError(t);{let n=new ir(t);return this.client.logger.error(n),this.createError(n)}}async validateHmac(t,n){if(!this.hmacEnabled)return;if(!n)throw new Ji;if(!this.client.secretKey)throw new Xi;let r=Um(n);if(!r.v1||r.t===void 0)throw new Gi;let i=Date.now();if(r.t<i-3e5||r.t>i+3e5)throw new Ki;let o=await em(this.client.secretKey,`${r.t}.${JSON.stringify(t)}`);if(!tm(o,r.v1))throw new Yi}};function ic(e,t){if(!e)throw new Error("agent() requires a non-empty agentId");if(!(t!=null&&t.onMessage))throw new Error(`agent('${e}') requires an onMessage handler`);return{id:e,handlers:t,userOnToolApproval:typeof t.onToolApproval=="function"}}var oe={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var Yx={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},qm={output:Yx};var jm={"chat-webhook":oe,discord:oe,getstream:oe,"grafana-on-call":oe,line:oe,mattermost:oe,msteams:oe,"novu-slack":oe,"novu-agent-chat":oe,"rocket-chat":oe,ryver:oe,sendblue:oe,slack:qm,"webex-messaging":oe,"whatsapp-business":oe,zulip:oe,telegram:oe};var Jx={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:Jx};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},Gx={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},Kx={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},Xx={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:Gx},inlineAttachments:{type:"array",items:Kx},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},zm={output:Xx};var tn={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},ba={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},Qx={type:"object",properties:{from:{anyOf:[{type:"string"},tn]},sender:{anyOf:[{type:"string"},tn]},to:{anyOf:[{type:"string"},tn,{type:"array",items:tn}]},cc:{anyOf:[{type:"string"},tn,{type:"array",items:tn}]},bcc:{anyOf:[{type:"string"},tn,{type:"array",items:tn}]},replyTo:{anyOf:[{type:"string"},tn,{type:"array",items:tn}]},inReplyTo:{anyOf:[{type:"string"},tn]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},ba]},html:{anyOf:[{type:"string"},ba]},watchHtml:{anyOf:[{type:"string"},ba]},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"},ba]}}}]},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},Vm={output:Qx};var Zx={type:"object",properties:{},required:[],additionalProperties:!1},Wm={output:Zx};var ev={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},Hm={output:ev};var Ym={anypost:oe,braze:oe,clickatell:oe,nodemailer:Vm,emailjs:oe,"email-webhook":oe,"infobip-email":oe,mailersend:oe,mailgun:Bm,mailjet:zm,mailtrap:oe,mandrill:oe,netcore:oe,"novu-email":Wm,outlook365:oe,plunk:oe,postmark:oe,resend:oe,sendgrid:Hm,sendinblue:oe,ses:oe,sparkpost:oe};var tv={type:"object",properties:{},required:[],additionalProperties:!1},Jm={output:tv};var Gm={novu:Jm};var Km={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},nv={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
+ `)}async executeProviders(t,n,r,i){return n.providers.reduce(async(o,a)=>{let s=await o,u=await this.runProvider(t,n,a,r,i);return{...s,[a.type]:u}},Promise.resolve({}))}async runProvider(t,n,r,i,o){let a=t.action==="preview";if(t.stepId!==n.stepId)return a?(this.log(` ${lt.MOCK} Mocked provider: \`${r.type}\``),this.mock(r.outputs.schema)):(this.log(` ${lt.HYDRATED} Hydrated provider: \`${r.type}\``),{});try{return await this.resolveProviderOutput(t,n,r,o,i)}catch(s){if(this.log(` ${lt.ERROR} Failed to execute provider: \`${r.type}\``),a)return this.log(` ${lt.MOCK} Mocked provider: \`${r.type}\``),this.mock(r.outputs.schema);throw new Wi(r.type,t.action,s)}}async resolveProviderOutput(t,n,r,i,o){let a=await r.resolve({controls:i,outputs:o}),s=await this.validate(a,r.outputs.unknownSchema,"step","output",t.workflowId,n.stepId,r.type);return this.log(` ${lt.SUCCESS} Executed provider: \`${r.type}\``),{...s,_passthrough:a._passthrough}}async executeStep(t,n){if(t.stepId===n.stepId)try{let r=await this.createStepControls(n,t),i=await this.compileControls(r,t),o=await n.resolve(i),a=await this.normalizeChatCardOutput(n,o),s=await this.validate(a,n.outputs.unknownSchema,"step","output",t.workflowId,n.stepId),u=await this.executeProviders(t,n,s,i);return this.log(` ${lt.SUCCESS} Executed stepId: \`${n.stepId}\``),{outputs:s,providers:u}}catch(r){throw this.log(` ${lt.ERROR} Failed to execute stepId: \`${n.stepId}\``),qn(r)?r:new Nr(n.stepId,t.action,r)}else try{let r=this.getStepState(t,n.stepId);if(r){let i=await this.validate(r.outputs,n.results.unknownSchema,"step","result",t.workflowId,n.stepId);return this.log(` ${lt.HYDRATED} Hydrated stepId: \`${n.stepId}\``),{outputs:i,providers:await this.executeProviders(t,n,i,{})}}else throw new Mi(t.workflowId,n.stepId)}catch(r){throw this.log(` ${lt.ERROR} Failed to hydrate stepId: \`${n.stepId}\``),r}}async normalizeChatCardOutput(t,n){if(t.type!=="chat"||(n==null?void 0:n.card)==null)return n;let r=await ra(n.card);return r?{...n,card:r}:n}async compileControls(t,n){var r;try{let i=li(t),o=this.preprocessTranslationPatterns(JSON.stringify(i));o=this.preprocessFilterTranslationArgs(o);let a=this.templateEngine.parse(o),s=this.getWorkflow(n.workflowId),u={workflow:{workflowId:s.workflowId,name:s.name,description:s.description,tags:s.tags,severity:s.severity},payload:n.payload,subscriber:n.subscriber,...n.actor&&{actor:n.actor},context:n.context,steps:_x(n.state),env:(r=n.env)!=null?r:{}},p=await this.templateEngine.render(a,u),d=this.postprocessTranslationMarkers(p),h=(0,vm.jsonrepair)(d),g=JSON.parse(h),y=ci(g);return bm(y)}catch(i){throw new Ui(n.workflowId,n.stepId,i)}}preprocessTranslationPatterns(t){return t.replace(/\{\{\s*t\.([\p{L}\p{N}_.-]+)\s*\}\}/gu,"[T:$1]")}preprocessFilterTranslationArgs(t){return t.replace(/'t\.([\p{L}\p{N}_.-]+)'/gu,"'[T:$1]'")}postprocessTranslationMarkers(t){return t.replace(/\[T:([\p{L}\p{N}_.-]+)\]/gu,"{{t.$1}}")}async createStepControls(t,n){return await this.validate(n.controls,t.controls.unknownSchema,"step","controls",n.workflowId,t.stepId)}async previewStep(t,n){try{return await this.constructStepForPreview(t,n)}catch(r){throw this.log(` ${lt.ERROR} Failed to preview stepId: \`${n.stepId}\``),qn(r)?r:new Nr(n.stepId,t.action,r)}}async constructStepForPreview(t,n){return t.stepId===n.stepId?await this.previewRequiredStep(n,t):await this.extractMockDataForPreviousSteps(t,n)}async extractMockDataForPreviousSteps(t,n){let r={},i=this.getStepState(t,n.stepId),o=this.mock(n.results.schema);return{outputs:Jl(o,(i==null?void 0:i.outputs)||{}),providers:await this.executeProviders(t,n,r,{})}}async previewRequiredStep(t,n){let r=await this.createStepControls(t,n),i=await this.compileControls(r,n),o=await t.resolve(i),a=await this.normalizeChatCardOutput(t,o),s=await this.validate(a,t.outputs.unknownSchema,"step","output",n.workflowId,t.stepId);return this.log(` ${lt.MOCK} Mocked stepId: \`${t.stepId}\``),{outputs:s,providers:await this.executeProviders(n,t,s,i)}}getStepState(t,n){return t.state.find(r=>r.stepId===n)}getStepCode(t,n){return{code:this.getStep(t,n).resolve.toString()}}getWorkflowCode(t){return{code:this.getWorkflow(t).execute.toString()}}getCode(t,n){let r;if(t)n?r=this.getStepCode(t,n):r=this.getWorkflowCode(t);else throw new Lr(t);return r}};function _x(e){let t={};for(let n of e)t[n.stepId]=n.outputs;return t}var Ox={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 ma(e){return typeof e=="string"&&e.trim()?e:!e||typeof e!="object"?null:ma(e.message)}function Cx(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;let n=t,r=ma(n.message);if(r)return r;let i=ma(n.error);if(i)return i;let o=n.errors;return Array.isArray(o)?ma(o[0]):null}function Ix(e,t){var i;let n=(i=Ox[e])!=null?i:e,r=Cx(t);return r?`Delivery failed: ${n}: ${r}`:`Delivery failed: ${n}`}var kn=class extends Error{constructor(t,n){super(t),this.name="AgentError",this.cause=n==null?void 0:n.cause,this.delivery=n==null?void 0:n.delivery}},Jt=class extends kn{constructor(t,n){let r={statusCode:t,responseBody:n};super(Ix(t,n),{delivery:r}),this.name="AgentDeliveryError",this.statusCode=t,this.responseBody=n}};function pi(e){return e instanceof kn?e:e instanceof Error?new kn(e.message,{cause:e}):new kn("Turn failed",{cause:e})}var km=Symbol.for("novu.agent.runtimeContext");var Kl=(i=>(i.ON_MESSAGE="onMessage",i.ON_ACTION="onAction",i.ON_RESOLVE="onResolve",i.ON_REACTION="onReaction",i))(Kl||{}),yr=class{constructor(){this.__novuPendingApproval=!0}};function Am(e){return typeof e=="object"&&e!==null&&"suppress"in e&&e.suppress===!0}var Em=1;function Px(e){return new Promise(t=>{setTimeout(t,e)})}function Mx(e){return e>=500||e===408||e===429}var ga=class{constructor(t){this.sequence=0;this.buffer=[];this.chain=Promise.resolve();var n,r;this.runId=`run_${crypto.randomUUID()}`,this.eventsUrl=t.eventsUrl,this.secretKey=t.secretKey,this.conversationId=t.conversationId,this.agentId=t.agentId,this.turnId=t.turnId,this.fetchFn=(n=t.fetchFn)!=null?n:fetch,this.maxRetries=(r=t.maxRetries)!=null?r:3}enqueue(t){this.sequence+=1,this.buffer.push({version:Em,conversationId:this.conversationId,agentId:this.agentId,runId:this.runId,turnId:this.turnId,sequence:this.sequence,timestamp:new Date().toISOString(),event:t})}flush(){if(this.buffer.length===0)return this.chain;let t=this.buffer;return this.buffer=[],this.chain=this.chain.then(()=>this.postBatchWithRetry(t)),this.chain}async emit(t){this.enqueue(t),await this.flush()}async postBatchWithRetry(t){let n;for(let r=1;r<=this.maxRetries;r+=1)try{await this.postBatch(t);return}catch(i){if(n=i,!Nx(i))throw i;r<this.maxRetries&&await Px(250*r)}throw n}async postBatch(t){let n;try{n=await this.fetchFn(this.eventsUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${this.secretKey}`},body:JSON.stringify({events:t})})}catch(i){throw Lx(i)}let r=await n.text().catch(()=>"");if(!n.ok)throw new Jt(n.status,r)}};function Nx(e){return!(e instanceof Jt)||e.statusCode===0?!0:Mx(e.statusCode)}function Lx(e){if(e instanceof Jt)return e;let t=e instanceof Error?e.message:"Network request failed";return new Jt(0,t)}function Rm(e){let t=typeof e=="string"?[e]:e,n=[],r=new Set;for(let i of t){if(typeof i!="string")throw new Error("`to` must be a subscriberId string or an array of subscriberIds");let o=i.trim();!o||r.has(o)||(r.add(o),n.push(o))}if(n.length===0)throw new Error("`to` must include at least one subscriberId");if(n.length>50)throw new Error("`to` supports at most 50 subscriberIds");return n}var _m="tool-approval";function Dx(e){return e==="approve"||e==="deny"}function Xl(e,t){return`${_m}:${e}:${t}`}function Om(e){let[t,n,...r]=(e!=null?e:"").split(":"),i=r.join(":");return t!==_m||!Dx(n)||!i?null:{approved:n==="approve",approvalId:i}}async function Cm(e,t,n,r){var p,d;let i=r!=null?r:t.id,o={approve:Xl("approve",i),deny:Xl("deny",i)},a=h=>({type:"tool-approval-card",...h}),s=(d=(p=n==null?void 0:n.renderApproval)==null?void 0:p.call(n,{toolCall:t,actionIds:o,approvalCard:a}))!=null?d:a(),u={approvalId:i,toolCallId:t.id,name:t.name,input:t.input};if(e.emitToolApprovalRequest(u),Xf(s)){await e.replyApprovalCard(s);return}await e.reply(s)}var Fx=5*1024*1024,Ux=5*1024*1024,Im=32768,$x=/^[A-Za-z0-9+/]*={0,2}$/;function fi(e,t){return e.filename?`"${e.filename}"`:`at index ${t}`}function Lm(){return globalThis.Buffer}function qx(e){var t,n,r;return(r=(n=(t=Lm())==null?void 0:t.isBuffer)==null?void 0:n.call(t,e))!=null?r:!1}function jx(e){return typeof Blob!="undefined"&&e instanceof Blob}function Ql(e){let t=Lm();if(t)return t.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 n="";for(let r=0;r<e.length;r+=Im){let i=e.subarray(r,r+Im);n+=String.fromCharCode(...i)}return btoa(n)}function Dm(e){let t=e.replace(/\s/g,""),n=t.length%4;if(!t||n===1||!$x.test(t))return null;let r=t.endsWith("==")?2:t.endsWith("=")?1:0;return Math.floor(t.length*3/4)-r}function di(e,t,n){if(e>Fx)throw new Error(`Invalid file ${fi(t,n)}: inline data must be 5 MB or smaller. Use a publicly-accessible URL for larger files.`)}async function Bx(e,t,n){if(typeof e=="string"){let r=Dm(e);if(r===null)throw new Error(`Invalid file ${fi(t,n)}: data must be a base64-encoded string.`);return di(r,t,n),e}if(qx(e))return di(e.byteLength,t,n),e.toString("base64");if(e instanceof Uint8Array)return di(e.byteLength,t,n),Ql(e);if(e instanceof ArrayBuffer)return di(e.byteLength,t,n),Ql(new Uint8Array(e));if(jx(e))return di(e.size,t,n),Ql(new Uint8Array(await e.arrayBuffer()));throw new Error(`Invalid file ${fi(t,n)}: data must be a base64 string, Buffer, Uint8Array, ArrayBuffer, or Blob.`)}async function zx(e){if(!(e!=null&&e.length))return;let t=[],n=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 ${fi(i,r)}: provide exactly one of data or url.`);if(s){let p=await Bx(o,i,r),d=Dm(p);if(n+=d!=null?d:0,n>Ux)throw new Error("Invalid files: total inline data must be 5 MB or smaller. Use publicly-accessible URLs for larger files.");t.push({...i,data:p});continue}if(u&&typeof a!="string")throw new Error(`Invalid file ${fi(i,r)}: url must be a string.`);t.push(i)}return t}async function Fm(e,t){let n=await zx(t);if(typeof e=="string")return n?{markdown:e,files:n}:{markdown:e};let r=await ra(e);if(r)return n?{card:r,files:n}:{card:r};throw new Error("Invalid message content \u2014 expected string or CardElement")}function Um(e){return`${e}_${crypto.randomUUID()}`}function Pm(e){if(e.markdown!==void 0)return{markdown:e.markdown};if(e.card!==void 0)return{card:e.card};throw new Error("Invalid reply content \u2014 expected markdown or card")}function Mm(e){if(e!=null&&e.length)return e.map((t,n)=>({fileId:t.filename||`file_${n}`,name:t.filename,mediaType:t.mimeType,...t.data!==void 0?{data:typeof t.data=="string"?t.data:void 0}:{},...t.url!==void 0?{url:t.url}:{}}))}function Zl(e,t){t.toolApprovalRequest&&(e.toolApprovalRequest=t.toolApprovalRequest),t.signals.length&&(e.signals=t.signals),t.toolResults.length&&(e.toolResults=t.toolResults),t.addReactions.length&&(e.addReactions=t.addReactions),t.deleteMessages.length&&(e.deleteMessages=t.deleteMessages),t.resolve&&(e.resolve=t.resolve)}function ec(e,t){var r;let n=[];if(e.toolApprovalRequest){let i=e.toolApprovalRequest;n.push({type:"tool-approval-request",approvalId:i.approvalId,toolUseId:i.toolCallId,toolName:i.name,input:i.input,...t!=null&&t.deliverApprovalCard?{deliverCard:!0}:{}})}for(let i of e.toolResults)n.push({type:"tool-use-result",toolUseId:i.toolCallId,content:[{type:"text",text:String((r=i.preview)!=null?r:"")},{type:"json",value:i.output}]});for(let i of e.signals)n.push({type:"signal",signal:i});for(let i of e.addReactions)n.push({type:"channel.reaction",messageId:i.messageId,emoji:i.emojiName,op:"add"});for(let i of e.deleteMessages)n.push({type:"channel.delete",messageId:i.messageId});return e.resolve&&n.push({type:"resolve",summary:e.resolve.summary}),n}var tc=class{constructor(t,n,r,i){this.replyUrl=t;this.secretKey=n;this.conversationId=r;this.integrationIdentifier=i}async sendReply(t,n){let r=this._baseBody();return r.reply=t,Zl(r,n),this._post(r)}async sendApprovalCard(t,n){let r=this._baseBody();return r.reply={toolApprovalCard:t},Zl(r,n),this._post(r)}async editMessage(t,n){return this._post({...this._baseBody(),edit:{messageId:t,content:n}})}async deleteMessage(t){await this._post({...this._baseBody(),deleteMessages:[{messageId:t}]})}async setTyping(t){await this._post({...this._baseBody(),typing:t})}async flushSideEffects(t){let n=this._baseBody();Zl(n,t),await this._post(n)}async emitCustom(){}queueRunStart(){}async emitRunFinish(){}async reportTurnError(){await this._post({...this._baseBody(),error:!0})}_baseBody(){return{conversationId:this.conversationId,integrationIdentifier:this.integrationIdentifier}}async _post(t){let n=await fetch(this.replyUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${this.secretKey}`},body:JSON.stringify(t)});if(!n.ok){let i=await n.text().catch(()=>"");throw new Jt(n.status,i)}let r=await n.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}},nc=class{constructor(t){this.outbox=t}async sendReply(t,n){let r=Um("msg"),i=ec(n);return i.push({type:"message",role:"assistant",messageId:r,content:Pm(t),files:Mm(t.files)}),await this._emitAndFlush(i),{messageId:r,platformThreadId:""}}async sendApprovalCard(t,n){return await this._emitAndFlush(ec(n,{deliverApprovalCard:!0})),"unaddressable"}async editMessage(t,n){return await this.outbox.emit({type:"channel.edit",messageId:t,content:Pm(n),files:Mm(n.files)}),{messageId:t,platformThreadId:""}}async deleteMessage(t){await this.outbox.emit({type:"channel.delete",messageId:t})}async setTyping(t){if(t==="stop"){await this.outbox.emit({type:"channel.typing",state:"off"});return}let n=typeof t=="object"&&"status"in t?t.status:void 0;await this.outbox.emit({type:"channel.typing",state:"on",status:n})}async flushSideEffects(t){await this._emitAndFlush(ec(t))}async emitCustom(t,n){await this.outbox.emit({type:"custom",name:t,data:n})}queueRunStart(){this.outbox.enqueue({type:"run-start"})}async emitRunFinish(t){await this.outbox.emit({type:"run-finish",outcome:t})}async reportTurnError(t){await this.outbox.emit({type:"run-error",message:t!=null?t:"agent handler failed"})}async _emitAndFlush(t){if(t.length!==0){for(let n of t)this.outbox.enqueue(n);await this.outbox.flush()}}},hi=class{constructor(t,n,r){this.transport=r;this.editedByHandler=!1;this.messageId=t,this.platformThreadId=n}async edit(t,n){this.editedByHandler=!0;let r=await Fm(t,n==null?void 0:n.files),i=await this.transport.editMessage(this.messageId,r);if(!i)throw new Error("Agent edit did not return a message handle");return this.messageId=i.messageId,this.platformThreadId=i.platformThreadId,this}async delete(){await this.transport.deleteMessage(this.messageId)}},rc=class{constructor(){this.messageId="";this.platformThreadId=""}async edit(){return this}async delete(){}},Nm;Nm=km;var ya=class{constructor(t,n,r){this[Nm]=!0;this._signals=[];this._toolResults=[];this._pendingToolApprovalRequest=null;this._pendingReactions=[];this._pendingDeletes=[];this._resolveSignal=null;var s,u,p,d,h;this.event=t.event,this.action=(s=t.action)!=null?s:null,this.message=t.message,this.reaction=t.reaction,this.conversation=t.conversation,this.subscriber=t.subscriber,this.context=(u=t.context)!=null?u:null,this.notification=(p=t.notification)!=null?p:null,this.history=t.history,this.platform=t.platform,this.platformContext=t.platformContext,this.humanResponse=(d=t.humanResponse)!=null?d:null,this._toolApprovalConfig=r,this._transport=t.eventsUrl?new nc(new ga({eventsUrl:t.eventsUrl,secretKey:n,conversationId:t.conversationId,agentId:t.agentId,turnId:t.deliveryId})):new tc(t.replyUrl,n,t.conversationId,t.integrationIdentifier),this._metadataState={...(h=t.conversation.metadata)!=null?h:{}};let i=this;this.metadata={get(g){return i._metadataState[g]},set(g,y){i._metadataState[g]=y,i._signals.push({type:"metadata",action:"set",key:g,value:y})},delete(g){delete i._metadataState[g],i._signals.push({type:"metadata",action:"delete",key:g})},clear(){i._metadataState={},i._signals.push({type:"metadata",action:"clear"})},get current(){return{...i._metadataState}}};let o=g=>this._transport.setTyping(g),a=(g=>o(g===void 0?{}:{status:g}));a.stop=()=>o("stop"),this.typing=a,this.toolApproval={request:async g=>(await Cm(this,g,this._toolApprovalConfig),new yr)}}asMessageContext(){return this}async reply(t,n){let r=await Fm(t,n==null?void 0:n.files),i=this._drainSideEffectsSnapshot(),o=await this._transport.sendReply(r,i);if(!o)throw new Error("Agent reply did not return a message handle");return new hi(o.messageId,o.platformThreadId,this._transport)}async replyApprovalCard(t){let n=this._drainSideEffectsSnapshot(),r=await this._transport.sendApprovalCard(t,n);if(r==="unaddressable")return new rc;if(!r)throw new Error("Agent approval card reply did not return a message handle");return new hi(r.messageId,r.platformThreadId,this._transport)}createReplyHandle(t){return new hi(t,"",this._transport)}async emit(t){await this._transport.emitCustom(t.name,t.data)}resolve(t){this._resolveSignal={summary:t}}trigger(t,n){this._signals.push({...n,type:"trigger",workflowId:t})}ask(t,n){return this.queueHumanSignal("ask",t,n)}approve(t,n){return this.queueHumanSignal("approve",t,n)}choose(t,n,r){if(n.length<2||n.length>10)throw new Error("ctx.choose requires between 2 and 10 options");if(n.some(i=>typeof i!="string"||i.trim().length===0))throw new Error("ctx.choose options must be non-empty strings");return this.queueHumanSignal("choose",t,r,n)}tell(t,n){return this.queueHumanSignal("tell",t,n)}queueHumanSignal(t,n,r,i){let o=Um("hr"),a=(r==null?void 0:r.to)!==void 0?Rm(r.to):void 0;return this._signals.push({type:"human",kind:t,prompt:n,requestId:o,...i?{options:i}:{},...r!=null&&r.from?{from:r.from}:{},...r&&"ttlSeconds"in r&&r.ttlSeconds!==void 0?{ttlSeconds:r.ttlSeconds}:{},...a!==void 0?{to:a}:{}}),o}emitToolApprovalRequest(t){if(this._pendingToolApprovalRequest)throw new Error("Only one tool approval request can be queued before the next reply");this._pendingToolApprovalRequest=t}emitToolResult(t){this._toolResults.push(t)}addReaction(t,n){this._pendingReactions.push({messageId:t,emojiName:n})}deleteMessage(t){this._pendingDeletes.push({messageId:t})}queueRunStart(){this._transport.queueRunStart()}async emitRunFinish(t){try{await this._transport.emitRunFinish(t.outcome)}catch(n){console.error("[agent] Failed to emit run finish:",n)}}async reportTurnError(t){try{await this._transport.reportTurnError(t)}catch(n){console.error("[agent] Failed to report turn error:",n)}}async flush(){if(!this._hasPendingSideEffects())return;let t=this._drainSideEffectsSnapshot();await this._transport.flushSideEffects(t)}_hasPendingSideEffects(){return!!(this._pendingToolApprovalRequest||this._signals.length||this._toolResults.length||this._resolveSignal||this._pendingReactions.length||this._pendingDeletes.length)}_drainSideEffectsSnapshot(){let t={toolApprovalRequest:this._pendingToolApprovalRequest,signals:this._signals,toolResults:this._toolResults,addReactions:this._pendingReactions,deleteMessages:this._pendingDeletes,resolve:this._resolveSignal};return this._pendingToolApprovalRequest=null,this._signals=[],this._toolResults=[],this._pendingReactions=[],this._pendingDeletes=[],this._resolveSignal=null,t}};function Hx(e){return!!(typeof e=="string"||typeof e=="object"&&e!==null&&ta(e)||typeof e=="object"&&e!==null&&("markdown"in e||"card"in e||"files"in e))}function Vx(e,t){return e}function Wx(e,t){var n;for(let r of e){let i=r.toolData;if(r.type==="tool_approval_request"&&(i==null?void 0:i.approvalId)===t&&i.toolCallId)return{approvalId:i.approvalId,toolCallId:i.toolCallId,name:(n=i.toolName)!=null?n:"tool",input:i.input}}}async function $m(e){var o;let t=new ya(e.bridge,e.secretKey,e.agent.handlers.toolApproval),{agent:n,event:r,logger:i}=e;try{t.queueRunStart(),await Yx(n,r,t),await t.flush(),await t.emitRunFinish({outcome:"completed"})}catch(a){let s=pi(a);i==null||i.error(`[agent:${n.id}] Turn failed (${r}): ${s.message}`,(o=s.cause)!=null?o:s);let u=!1;if(n.handlers.onError)try{let p=await n.handlers.onError(s,Vx(t,r));Am(p)?u=!0:Hx(p)&&(await t.reply(p),u=!0)}catch(p){i==null||i.error(`[agent:${n.id}] onError failed:`,p)}u?await t.emitRunFinish({outcome:"completed"}):await t.reportTurnError(s.message)}finally{try{await t.typing.stop(),await t.flush()}catch{}}}async function Yx(e,t,n){var i,o;let r=async a=>{a instanceof yr||a===void 0||await n.reply(a)};switch(t){case"onMessage":{await r(await e.handlers.onMessage(n.message,n));break}case"onAction":{let a=Om((i=n.action)==null?void 0:i.id);if(a&&e.handlers.onToolApproval){let{approved:s,approvalId:u}=a,p=Wx(n.history,u),d=p?{id:p.toolCallId,name:p.name,input:p.input}:{id:u,name:""},h=n.createReplyHandle((o=n.action.sourceMessageId)!=null?o:""),g={toolCall:d,approved:s,approvalMessage:h};e.userOnToolApproval===!1&&(await n.typing(),n.action.sourceMessageId&&await h.delete());let y=await e.handlers.onToolApproval(g,n);await r(y);break}e.handlers.onAction&&await r(await e.handlers.onAction(n.action,n));break}case"onReaction":e.handlers.onReaction&&await r(await e.handlers.onReaction(n.reaction,n));break;case"onResolve":e.handlers.onResolve&&await r(await e.handlers.onResolve(n));break;default:throw new jn(t,Kl)}}function qm(e){let t={};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 t)&&(t[s]=u)}let n=t.t,r=n!==void 0?Number(n):Number.NaN;return{t:Number.isFinite(r)?r:void 0,v1:t.v1}}var br=class{constructor(t){this.handler=t.handler,this.client=t.client?t.client:new gr,this.workflows=t.workflows||[],this.agents=t.agents||[],this.http=ia(this.client.secretKey,this.client.apiUrl),this.frameworkName=t.frameworkName,this.hmacEnabled=this.client.strictAuthentication,this.waitUntil=t.waitUntil,this.client.addAgents(this.agents)}createHandler(){return async(...t)=>{await this.client.addWorkflows(this.workflows);let n=await this.handler(...t),r=await this.handleAction({actions:n});return n.transformResponse(r)}}getStaticHeaders(){let t=`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.13.1","novu-framework-server":this.frameworkName,"user-agent":t}}createResponse(t,n){return{status:t,body:JSON.stringify(n),headers:{...this.getStaticHeaders()}}}createError(t){return{status:t.statusCode,body:JSON.stringify({message:t.message,data:t.data,code:t.code}),headers:this.getStaticHeaders()}}async handleAction({actions:t}){var h;let n=await t.url(),r=await t.method(),i=n.searchParams.get("action")||"health-check",o=n.searchParams.get("workflowId")||"",a=n.searchParams.get("stepId")||"",s=n.searchParams.get("agentId")||"",u=n.searchParams.get("event")||"",p=await t.headers("novu-signature")||"",d={};try{r==="POST"&&(d=await t.body())}catch{}try{i!=="health-check"&&await this.validateHmac(d,p);let g=this.getPostActionMap(d,o,a,i,s,u,(h=this.waitUntil)!=null?h:t.waitUntil),y=this.getGetActionMap(o,a);if(r==="POST")return await this.handlePostAction(i,g);if(r==="GET")return await this.handleGetAction(i,y);if(r==="OPTIONS")return this.createResponse(200,{})}catch(g){return this.handleError(g)}return this.createError(new Bi(r))}getPostActionMap(t,n,r,i,o,a,s){return{trigger:this.triggerAction({workflowId:n,...t}),execute:async()=>{let u=await this.client.executeWorkflow({...t,workflowId:n,stepId:r,action:i});return this.createResponse(200,u)},preview:async()=>{let u=await this.client.executeWorkflow({...t,workflowId:n,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=$m({agent:u,event:a,bridge:t,secretKey:this.client.secretKey,logger:this.client.logger});return s?s(p):this.warnOnUnprotectedServerlessRuntime(o),this.createResponse(200,{status:"ack"})}}}warnOnUnprotectedServerlessRuntime(t){let n;try{process.env.AWS_LAMBDA_FUNCTION_NAME?n="AWS Lambda":process.env.VERCEL&&(n="Vercel")}catch{}n&&this.client.logger.warn(`[agent:${t}] Agent event acknowledged without a \`waitUntil\` primitive while running on ${n}. The runtime may freeze once the response is sent, silently dropping the rest of the agent turn. Pass \`waitUntil\` to \`serve()\` (e.g. \`serve({ agents, waitUntil })\`) to extend the invocation lifetime.`)}triggerAction(t){return async()=>{let n={name:t.workflowId,to:t.to,payload:(t==null?void 0:t.payload)||{},transactionId:t.transactionId,overrides:t.overrides||{},...t.actor&&{actor:t.actor},...t.bridgeUrl&&{bridgeUrl:t.bridgeUrl},...t.controls&&{controls:t.controls},...t.context&&{context:t.context},...t.agentId!==void 0&&{agentId:t.agentId}},r=await this.http.post("/events/trigger",n);return this.createResponse(200,r)}}getGetActionMap(t,n){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(t,n);return this.createResponse(200,r)}}}async handlePostAction(t,n){if(Object.values(Cr).includes(t)){let r=n[t];return r()}else throw new jn(t,Cr)}async handleGetAction(t,n){if(Object.values(Oi).includes(t)){let r=n[t];return r()}else throw new jn(t,Oi)}handleError(t){if(qn(t))return t.statusCode>=500&&this.client.logger.error(t),this.createError(t);if(uu(t))return this.createError(t);{let n=new ir(t);return this.client.logger.error(n),this.createError(n)}}async validateHmac(t,n){if(!this.hmacEnabled)return;if(!n)throw new Ji;if(!this.client.secretKey)throw new Xi;let r=qm(n);if(!r.v1||r.t===void 0)throw new Gi;let i=Date.now();if(r.t<i-3e5||r.t>i+3e5)throw new Ki;let o=await em(this.client.secretKey,`${r.t}.${JSON.stringify(t)}`);if(!tm(o,r.v1))throw new Yi}};function ic(e,t){if(!e)throw new Error("agent() requires a non-empty agentId");if(!(t!=null&&t.onMessage))throw new Error(`agent('${e}') requires an onMessage handler`);return{id:e,handlers:t,userOnToolApproval:typeof t.onToolApproval=="function"}}var oe={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var Jx={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},Bm={output:Jx};var zm={"chat-webhook":oe,discord:oe,getstream:oe,"grafana-on-call":oe,line:oe,mattermost:oe,msteams:oe,"novu-slack":oe,"novu-web-chat":oe,"rocket-chat":oe,ryver:oe,sendblue:oe,slack:Bm,"webex-messaging":oe,"whatsapp-business":oe,zulip:oe,telegram:oe};var Gx={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},Hm={output:Gx};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},Kx={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},Xx={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},Qx={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:Kx},inlineAttachments:{type:"array",items:Xx},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},Vm={output:Qx};var tn={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},ba={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},Zx={type:"object",properties:{from:{anyOf:[{type:"string"},tn]},sender:{anyOf:[{type:"string"},tn]},to:{anyOf:[{type:"string"},tn,{type:"array",items:tn}]},cc:{anyOf:[{type:"string"},tn,{type:"array",items:tn}]},bcc:{anyOf:[{type:"string"},tn,{type:"array",items:tn}]},replyTo:{anyOf:[{type:"string"},tn,{type:"array",items:tn}]},inReplyTo:{anyOf:[{type:"string"},tn]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},ba]},html:{anyOf:[{type:"string"},ba]},watchHtml:{anyOf:[{type:"string"},ba]},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"},ba]}}}]},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},Wm={output:Zx};var ev={type:"object",properties:{},required:[],additionalProperties:!1},Ym={output:ev};var tv={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},Jm={output:tv};var Gm={anypost:oe,braze:oe,clickatell:oe,nodemailer:Wm,emailjs:oe,"email-webhook":oe,"infobip-email":oe,mailersend:oe,mailgun:Hm,mailjet:Vm,mailtrap:oe,mandrill:oe,netcore:oe,"novu-email":Ym,outlook365:oe,plunk:oe,postmark:oe,resend:oe,sendgrid:Jm,sendinblue:oe,ses:oe,sparkpost:oe};var nv={type:"object",properties:{},required:[],additionalProperties:!1},Km={output:nv};var Xm={novu:Km};var Qm={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},rv={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:Km,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:Km,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},Xm={output:nv};var rv={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},Qm={output:rv};var iv={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:Qm,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:Qm,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},Zm={output:rv};var iv={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},eg={output:iv};var ov={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},Zm={output:iv};var ov={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},tg={output:ov};var av={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},eg={output:ov};var tg={apns:Xm,expo:Qm,fcm:Zm,"one-signal":eg,"pusher-beams":oe,pushpad:oe,"push-webhook":oe,appio:oe};var av={type:"object",properties:{},required:[],additionalProperties:!1},ng={output:av};var sv={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},rg={output:sv};var ig={"africas-talking":oe,"azure-sms":oe,bandwidth:oe,"brevo-sms":oe,"bulk-sms":oe,"burst-sms":oe,clickatell:oe,clicksend:oe,"eazy-sms":oe,firetext:oe,"forty-six-elks":oe,"generic-sms":oe,gupshup:oe,"infobip-sms":oe,"isend-sms":oe,kannel:oe,maqsam:oe,messagebird:oe,mobishastra:oe,nexmo:oe,"novu-sms":ng,plivo:oe,"ring-central":oe,sendchamp:oe,simpletexting:oe,sms77:oe,"sms-central":oe,smsmode:oe,sns:oe,telnyx:oe,termii:oe,twilio:rg,"afro-message":oe,unifonic:oe,imedia:oe,sinch:oe,"isendpro-sms":oe,"ruach-sms":oe};var og={pagerduty:oe,opsgenie:oe,grafana:oe,"tool-webhook":oe};var wa={chat:jm,sms:ig,email:Ym,push:tg,in_app:Gm,tool:og};var lv={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},cv={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},uv={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},pv={oneOf:[lv,cv,uv]},dv={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},Sa={output:pv,result:dv};var hv={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},fv={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},mv={oneOf:[hv,fv]},gv={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},Ta={output:mv,result:gv};var xa={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 yv={type:"object",properties:{type:{type:"string",const:"text"},content:{type:"string"},style:{type:"string",enum:["plain","bold","muted"]}},required:["type","content"]},bv={type:"object",properties:{type:{type:"string",const:"image"},url:{type:"string"},alt:{type:"string"}},required:["type","url"]},wv={type:"object",properties:{type:{type:"string",const:"divider"}},required:["type"]},Sv={type:"object",properties:{type:{type:"string",const:"link"},label:{type:"string"},url:{type:"string"}},required:["type","label","url"]},Tv={type:"object",properties:{type:{type:"string",const:"link-button"},label:{type:"string"},url:{type:"string"},style:{type:"string",enum:["primary","danger","default"]},id:{type:"string"}},required:["type","label","url"]},xv={type:"object",properties:{type:{type:"string",const:"button"},id:{type:"string"},label:{type:"string"},style:{type:"string",enum:["primary","danger","default"]},actionType:{type:"string",enum:["action","modal"]},callbackUrl:{type:"string"},value:{type:"string"},disabled:{type:"boolean"}},required:["type","id","label"]},ag={type:"object",properties:{label:{type:"string"},value:{type:"string"},description:{type:"string"}},required:["label","value"]},vv={type:"object",properties:{type:{type:"string",const:"select"},id:{type:"string"},label:{type:"string"},options:{type:"array",items:ag},initialOption:{type:"string"},optional:{type:"boolean"},placeholder:{type:"string"}},required:["type","id","label","options"]},kv={type:"object",properties:{type:{type:"string",const:"radio_select"},id:{type:"string"},label:{type:"string"},options:{type:"array",items:ag},initialOption:{type:"string"},optional:{type:"boolean"}},required:["type","id","label","options"]},Av={type:"object",properties:{type:{type:"string",const:"actions"},children:{type:"array",items:{anyOf:[Tv,xv,vv,kv]}}},required:["type","children"]},Ev={type:"object",properties:{type:{type:"string",const:"field"},label:{type:"string"},value:{type:"string"}},required:["type","label","value"]},Rv={type:"object",properties:{type:{type:"string",const:"fields"},children:{type:"array",items:Ev}},required:["type","children"]},_v={type:"object",properties:{type:{type:"string",const:"table"},headers:{type:"array",items:{type:"string"}},rows:{type:"array",items:{type:"array",items:{type:"string"}}},align:{type:"array",items:{type:"string",enum:["left","center","right"]}}},required:["type","headers","rows"]},sg=[yv,bv,wv,Sv,Av,Rv,_v],Ov={type:"object",properties:{type:{type:"string",const:"section"},children:{type:"array",items:{anyOf:[...sg,{type:"object",properties:{type:{type:"string",const:"section"},children:{type:"array",items:{type:"object"}}},required:["type","children"]}]}}},required:["type","children"]},Cv={type:"object",properties:{type:{type:"string",const:"card"},title:{type:"string"},subtitle:{type:"string"},imageUrl:{type:"string"},children:{type:"array",items:{anyOf:[...sg,Ov]}}},required:["type","children"],additionalProperties:!1},Iv={type:"object",properties:{body:{type:"string"},card:Cv},anyOf:[{required:["body"]},{required:["card"]}],additionalProperties:!1},Pv={type:"object",properties:{},required:[],additionalProperties:!1},lg={output:Iv,result:Pv};var Mv={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"},from:{type:"object",properties:{email:{type:"string"},name:{type:"string"}},additionalProperties:!1},replyTo:{type:"string"},preheader:{type:"string"},useProviderDefaults:{type:"boolean"}},required:["subject","body"],additionalProperties:!1},Nv={type:"object",properties:{},required:[],additionalProperties:!1},cg={output:Mv,result:Nv};var Lv="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",pg={type:"object",properties:{url:{type:"string",pattern:Lv},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},ug={type:"object",properties:{label:{type:"string"},redirect:pg},required:["label"],additionalProperties:!1},Dv={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:ug,secondaryAction:ug,data:{type:"object",additionalProperties:!0},redirect:pg},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Fv={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},dg={output:Dv,result:Fv};var Uv={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},$v={type:"object",properties:{},required:[],additionalProperties:!1},hg={output:Uv,result:$v};var qv={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},jv={type:"object",properties:{},required:[],additionalProperties:!1},fg={output:qv,result:jv};var Bv={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},zv={type:"object",properties:{},required:[],additionalProperties:!1},mg={output:Bv,result:zv};var Ut={chat:lg,sms:fg,push:hg,email:cg,in_app:dg,tool:mg};var Mt={type:"object",properties:{},required:[],additionalProperties:!1};var va=(i=>(i.NONE="none",i.LOW="low",i.MEDIUM="medium",i.HIGH="high",i))(va||{});async function wr(e,t,n){if(e.steps.some(r=>r.stepId===t))throw new Zi(t);e.steps.push(n)}async function ka(e,t,n,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Mt;return await wr(e,i,{stepId:i,type:t,controls:{schema:await bt(s),unknownSchema:s},outputs:{schema:await bt(n),unknownSchema:n},results:{schema:await bt(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function gg(e,t,n){let r=wa[t],i=Object.entries(n).map(async([o,a])=>{let s=r[o];return{type:o,code:a.toString(),resolve:a,outputs:{schema:await bt(s.output),unknownSchema:s.output}}});e.providers.push(...await Promise.all(i))}async function er(e,t,n,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Mt,u={stepId:i,type:t,controls:{schema:await bt(s),unknownSchema:s},outputs:{schema:await bt(n),unknownSchema:n},results:{schema:await bt(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]};return await wr(e,i,u),Object.keys(a.providers||{}).length>0&&await gg(u,t,a.providers||{}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function oc(e,t){return async(n,r,i={})=>{let o=(i==null?void 0:i.controlSchema)||Mt,a=(i==null?void 0:i.outputSchema)||Mt,[s,u]=await Promise.all([bt(o),bt(a)]);return await wr(e,n,{stepId:n,type:t,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 Vv={email:"email",sms:"sms",push:"push",inApp:"in_app",chat:"chat",tool:"tool"};function yg(e){if(!e)return{};let t={};return e.all&&(t.all=e.all),Object.entries(e.channels||{}).forEach(([n,r])=>{let i=Vv[n];i&&(t.channels||(t.channels={}),t.channels[i]=r)}),t}function bg(e,t,n){let r=n||{};return{id:e,trigger:async a=>{let s=ia(sa(a.secretKey),aa(a.apiUrl)),u=a.payload||{},p;if(r.payloadSchema){let P=await ui(r.payloadSchema,u);if(P.success===!1)throw new qi(e,P.errors);p=P.data}else p=a.payload;let h=await nm(),d={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},...a.agentId!==void 0&&{agentId:a.agentId},...h&&{bridgeUrl:h}},g=await s.post("/events/trigger",d);return{cancel:async()=>s.delete(`/events/trigger/${g.transactionId}`),data:g}},discover:async()=>{var s;let a={workflowId:e,severity:(s=r.severity)!=null?s:"none",steps:[],code:t.toString(),payload:{schema:await bt(r.payloadSchema||Mt),unknownSchema:r.payloadSchema||Mt},controls:{schema:await bt(r.controlSchema||Mt),unknownSchema:r.controlSchema||Mt},env:{schema:await bt(r.envSchema||Mt),unknownSchema:r.envSchema||Mt},tags:r.tags||[],preferences:yg(r.preferences),name:r.name,description:r.description,execute:t};return await t({payload:{},subscriber:{},env:{},controls:{},context:{},step:{push:await er(a,"push",Ut.push.output,Ut.push.result),chat:await er(a,"chat",Ut.chat.output,Ut.chat.result),email:await er(a,"email",Ut.email.output,Ut.email.result),sms:await er(a,"sms",Ut.sms.output,Ut.sms.result),inApp:await er(a,"in_app",Ut.in_app.output,Ut.in_app.result),tool:await er(a,"tool",Ut.tool.output,Ut.tool.result),digest:await ka(a,"digest",Ta.output,Ta.result),delay:await ka(a,"delay",Sa.output,Sa.result),throttle:await ka(a,"throttle",xa.output,xa.result),custom:await oc(a,"custom"),httpRequest:await oc(a,"http_request")}}),a}}}function Wv(e,t,n){return{type:"email",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Hv(e,t,n){return{type:"sms",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Yv(e,t,n){return{type:"chat",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Jv(e,t,n){return{type:"push",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Gv(e,t,n){return{type:"in_app",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Kv(e,t,n){return{type:"tool",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Xv(e,t,n){return{type:"delay",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip}}function Qv(e,t,n){return{type:"digest",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip}}function Zv(e,t,n){return{type:"throttle",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip}}var wg={email:Wv,sms:Hv,chat:Yv,push:Jv,inApp:Gv,tool:Kv,delay:Xv,digest:Qv,throttle:Zv};var mi=require("@nestjs/common");var Sg=require("@nestjs/common"),{ConfigurableModuleClass:Aa,MODULE_OPTIONS_TOKEN:Fn,OPTIONS_TYPE:KD,ASYNC_OPTIONS_TYPE:XD}=new Sg.ConfigurableModuleBuilder().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(e=>({...e,isGlobal:!0})).build();var ac="REGISTER_API_PATH",sc="REGISTER_CONTROLLER_DECORATORS";var Tg=require("@nestjs/common");var Gt=class{handler(t,n){return{body:()=>t.body,headers:i=>{let o=t.headers[i.toLowerCase()];return Array.isArray(o)?o[0]:o},method:()=>t.method||"GET",queryString:i=>{let o=t.query[i];return Array.isArray(o)?o[0]:o},url:()=>{let i=t.headers.host||"",o=i!=null&&i.includes("://")?"":`${t.protocol||"https"}://`;return new URL(t.originalUrl||t.url||"",`${o}${i||""}`)},transformResponse:({body:i,headers:o,status:a})=>(Object.entries(o).forEach(([s,u])=>{n.setHeader(s,u)}),n.status(a).send(i))}}};Gt=Zt([(0,Tg.Injectable)()],Gt);var xg="nest",Kt=class{constructor(t,n){this.options=t;this.novuHandler=n;this.novuRequestHandler=new br({frameworkName:xg,...this.options,handler:this.novuHandler.handler})}async handleRequest(t,n){await this.novuRequestHandler.createHandler()(t,n)}};Kt=Zt([(0,mi.Injectable)(),en(0,(0,mi.Inject)(Fn)),en(1,(0,mi.Inject)(Gt))],Kt);var wt=require("@nestjs/common");var Pt=class{constructor(t){this.novuService=t}async handleGet(t,n){await this.novuService.handleRequest(t,n)}async handlePost(t,n){await this.novuService.handleRequest(t,n)}async handleOptions(t,n){await this.novuService.handleRequest(t,n)}};Zt([(0,wt.Get)(),en(0,(0,wt.Req)()),en(1,(0,wt.Res)())],Pt.prototype,"handleGet",1),Zt([(0,wt.Post)(),en(0,(0,wt.Req)()),en(1,(0,wt.Res)())],Pt.prototype,"handlePost",1),Zt([(0,wt.Options)(),en(0,(0,wt.Req)()),en(1,(0,wt.Res)())],Pt.prototype,"handleOptions",1),Pt=Zt([(0,wt.Controller)(),en(0,(0,wt.Inject)(Kt))],Pt);var Ag=require("@nestjs/common");var vg=require("@nestjs/common/constants");var Ea={provide:ac,useFactory:e=>{if(!e.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(vg.PATH_METADATA,e.apiPath,Pt)},inject:[Fn]};function lc(e,t=[]){return t.reduce((n,r)=>{let i=r(n);return i!=null?i:n},e)}function ek(e,t){var n;for(let r of(n=Reflect.getMetadataKeys(e))!=null?n:[])Reflect.defineMetadata(r,Reflect.getMetadata(r,e),t)}function kg(e,t=[]){let n=lc(e,t);n!==e&&ek(n,e)}var cc={provide:sc,useFactory:e=>{var t;kg(Pt,(t=e.controllerDecorators)!=null?t:[])},inject:[Fn]};var gi=class extends Aa{static register(t,n){var i;let r=Aa.register(t);return r.controllers=[lc(Pt,t.controllerDecorators||[])],(i=r.providers)==null||i.push(Ea,Kt,Gt,...n||[]),r.exports=[Kt,Gt],r}static registerAsync(t,n){var i;let r=Aa.registerAsync(t);return r.controllers=[Pt],(i=r.providers)==null||i.push(Ea,cc,Kt,Gt,...n||[]),r.exports=[Kt,Gt],r}};gi=Zt([(0,Ag.Module)({})],gi);0&&(module.exports={Actions,AgentDeliveryError,AgentError,Button,Card,CardLink,CardText,Client,CronExpression,Divider,Image,NOVU_OPTIONS,NovuClient,NovuController,NovuHandler,NovuModule,NovuRequestHandler,REGISTER_API_PATH,REGISTER_CONTROLLER_DECORATORS,Select,SelectOption,SeverityLevelEnum,TextInput,agent,frameworkName,isFromWorkflow,providerSchemas,registerApiPath,registerControllerDecorators,step,toAgentError,workflow});
564
+ `,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},ng={output:av};var rg={apns:Zm,expo:eg,fcm:tg,"one-signal":ng,"pusher-beams":oe,pushpad:oe,"push-webhook":oe,appio:oe};var sv={type:"object",properties:{},required:[],additionalProperties:!1},ig={output:sv};var lv={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},og={output:lv};var ag={"africas-talking":oe,"azure-sms":oe,bandwidth:oe,"brevo-sms":oe,"bulk-sms":oe,"burst-sms":oe,clickatell:oe,clicksend:oe,"eazy-sms":oe,firetext:oe,"forty-six-elks":oe,"generic-sms":oe,gupshup:oe,"infobip-sms":oe,"isend-sms":oe,kannel:oe,maqsam:oe,messagebird:oe,mobishastra:oe,nexmo:oe,"novu-sms":ig,plivo:oe,"ring-central":oe,sendchamp:oe,simpletexting:oe,sms77:oe,"sms-central":oe,smsmode:oe,sns:oe,telnyx:oe,termii:oe,twilio:og,"afro-message":oe,unifonic:oe,imedia:oe,sinch:oe,"isendpro-sms":oe,"ruach-sms":oe};var sg={pagerduty:oe,opsgenie:oe,grafana:oe,"tool-webhook":oe};var wa={chat:zm,sms:ag,email:Gm,push:rg,in_app:Xm,tool:sg};var cv={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},uv={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},pv={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},dv={oneOf:[cv,uv,pv]},hv={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},Sa={output:dv,result:hv};var fv={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},mv={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},gv={oneOf:[fv,mv]},yv={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},Ta={output:gv,result:yv};var xa={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 bv={type:"object",properties:{type:{type:"string",const:"text"},content:{type:"string"},style:{type:"string",enum:["plain","bold","muted"]}},required:["type","content"]},wv={type:"object",properties:{type:{type:"string",const:"image"},url:{type:"string"},alt:{type:"string"}},required:["type","url"]},Sv={type:"object",properties:{type:{type:"string",const:"divider"}},required:["type"]},Tv={type:"object",properties:{type:{type:"string",const:"link"},label:{type:"string"},url:{type:"string"}},required:["type","label","url"]},xv={type:"object",properties:{type:{type:"string",const:"link-button"},label:{type:"string"},url:{type:"string"},style:{type:"string",enum:["primary","danger","default"]},id:{type:"string"}},required:["type","label","url"]},vv={type:"object",properties:{type:{type:"string",const:"button"},id:{type:"string"},label:{type:"string"},style:{type:"string",enum:["primary","danger","default"]},actionType:{type:"string",enum:["action","modal"]},callbackUrl:{type:"string"},value:{type:"string"},disabled:{type:"boolean"}},required:["type","id","label"]},lg={type:"object",properties:{label:{type:"string"},value:{type:"string"},description:{type:"string"}},required:["label","value"]},kv={type:"object",properties:{type:{type:"string",const:"select"},id:{type:"string"},label:{type:"string"},options:{type:"array",items:lg},initialOption:{type:"string"},optional:{type:"boolean"},placeholder:{type:"string"}},required:["type","id","label","options"]},Av={type:"object",properties:{type:{type:"string",const:"radio_select"},id:{type:"string"},label:{type:"string"},options:{type:"array",items:lg},initialOption:{type:"string"},optional:{type:"boolean"}},required:["type","id","label","options"]},Ev={type:"object",properties:{type:{type:"string",const:"actions"},children:{type:"array",items:{anyOf:[xv,vv,kv,Av]}}},required:["type","children"]},Rv={type:"object",properties:{type:{type:"string",const:"field"},label:{type:"string"},value:{type:"string"}},required:["type","label","value"]},_v={type:"object",properties:{type:{type:"string",const:"fields"},children:{type:"array",items:Rv}},required:["type","children"]},Ov={type:"object",properties:{type:{type:"string",const:"table"},headers:{type:"array",items:{type:"string"}},rows:{type:"array",items:{type:"array",items:{type:"string"}}},align:{type:"array",items:{type:"string",enum:["left","center","right"]}}},required:["type","headers","rows"]},cg=[bv,wv,Sv,Tv,Ev,_v,Ov],Cv={type:"object",properties:{type:{type:"string",const:"section"},children:{type:"array",items:{anyOf:[...cg,{type:"object",properties:{type:{type:"string",const:"section"},children:{type:"array",items:{type:"object"}}},required:["type","children"]}]}}},required:["type","children"]},Iv={type:"object",properties:{type:{type:"string",const:"card"},title:{type:"string"},subtitle:{type:"string"},imageUrl:{type:"string"},children:{type:"array",items:{anyOf:[...cg,Cv]}}},required:["type","children"],additionalProperties:!1},Pv={type:"object",properties:{body:{type:"string"},card:Iv},anyOf:[{required:["body"]},{required:["card"]}],additionalProperties:!1},Mv={type:"object",properties:{},required:[],additionalProperties:!1},ug={output:Pv,result:Mv};var Nv={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"},from:{type:"object",properties:{email:{type:"string"},name:{type:"string"}},additionalProperties:!1},replyTo:{type:"string"},preheader:{type:"string"},useProviderDefaults:{type:"boolean"}},required:["subject","body"],additionalProperties:!1},Lv={type:"object",properties:{},required:[],additionalProperties:!1},pg={output:Nv,result:Lv};var Dv="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",hg={type:"object",properties:{url:{type:"string",pattern:Dv},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},dg={type:"object",properties:{label:{type:"string"},redirect:hg},required:["label"],additionalProperties:!1},Fv={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:dg,secondaryAction:dg,data:{type:"object",additionalProperties:!0},redirect:hg},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Uv={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},fg={output:Fv,result:Uv};var $v={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},qv={type:"object",properties:{},required:[],additionalProperties:!1},mg={output:$v,result:qv};var jv={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Bv={type:"object",properties:{},required:[],additionalProperties:!1},gg={output:jv,result:Bv};var zv={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Hv={type:"object",properties:{},required:[],additionalProperties:!1},yg={output:zv,result:Hv};var Ut={chat:ug,sms:gg,push:mg,email:pg,in_app:fg,tool:yg};var Mt={type:"object",properties:{},required:[],additionalProperties:!1};var va=(i=>(i.NONE="none",i.LOW="low",i.MEDIUM="medium",i.HIGH="high",i))(va||{});async function wr(e,t,n){if(e.steps.some(r=>r.stepId===t))throw new Zi(t);e.steps.push(n)}async function ka(e,t,n,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Mt;return await wr(e,i,{stepId:i,type:t,controls:{schema:await bt(s),unknownSchema:s},outputs:{schema:await bt(n),unknownSchema:n},results:{schema:await bt(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function bg(e,t,n){let r=wa[t],i=Object.entries(n).map(async([o,a])=>{let s=r[o];return{type:o,code:a.toString(),resolve:a,outputs:{schema:await bt(s.output),unknownSchema:s.output}}});e.providers.push(...await Promise.all(i))}async function er(e,t,n,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Mt,u={stepId:i,type:t,controls:{schema:await bt(s),unknownSchema:s},outputs:{schema:await bt(n),unknownSchema:n},results:{schema:await bt(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]};return await wr(e,i,u),Object.keys(a.providers||{}).length>0&&await bg(u,t,a.providers||{}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function oc(e,t){return async(n,r,i={})=>{let o=(i==null?void 0:i.controlSchema)||Mt,a=(i==null?void 0:i.outputSchema)||Mt,[s,u]=await Promise.all([bt(o),bt(a)]);return await wr(e,n,{stepId:n,type:t,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 Vv={email:"email",sms:"sms",push:"push",inApp:"in_app",chat:"chat",tool:"tool"};function wg(e){if(!e)return{};let t={};return e.all&&(t.all=e.all),Object.entries(e.channels||{}).forEach(([n,r])=>{let i=Vv[n];i&&(t.channels||(t.channels={}),t.channels[i]=r)}),t}function Sg(e,t,n){let r=n||{};return{id:e,trigger:async a=>{let s=ia(sa(a.secretKey),aa(a.apiUrl)),u=a.payload||{},p;if(r.payloadSchema){let P=await ui(r.payloadSchema,u);if(P.success===!1)throw new qi(e,P.errors);p=P.data}else p=a.payload;let d=await nm(),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},...a.agentId!==void 0&&{agentId:a.agentId},...d&&{bridgeUrl:d}},g=await s.post("/events/trigger",h);return{cancel:async()=>s.delete(`/events/trigger/${g.transactionId}`),data:g}},discover:async()=>{var s;let a={workflowId:e,severity:(s=r.severity)!=null?s:"none",steps:[],code:t.toString(),payload:{schema:await bt(r.payloadSchema||Mt),unknownSchema:r.payloadSchema||Mt},controls:{schema:await bt(r.controlSchema||Mt),unknownSchema:r.controlSchema||Mt},env:{schema:await bt(r.envSchema||Mt),unknownSchema:r.envSchema||Mt},tags:r.tags||[],preferences:wg(r.preferences),name:r.name,description:r.description,execute:t};return await t({payload:{},subscriber:{},env:{},controls:{},context:{},step:{push:await er(a,"push",Ut.push.output,Ut.push.result),chat:await er(a,"chat",Ut.chat.output,Ut.chat.result),email:await er(a,"email",Ut.email.output,Ut.email.result),sms:await er(a,"sms",Ut.sms.output,Ut.sms.result),inApp:await er(a,"in_app",Ut.in_app.output,Ut.in_app.result),tool:await er(a,"tool",Ut.tool.output,Ut.tool.result),digest:await ka(a,"digest",Ta.output,Ta.result),delay:await ka(a,"delay",Sa.output,Sa.result),throttle:await ka(a,"throttle",xa.output,xa.result),custom:await oc(a,"custom"),httpRequest:await oc(a,"http_request")}}),a}}}function Wv(e,t,n){return{type:"email",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Yv(e,t,n){return{type:"sms",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Jv(e,t,n){return{type:"chat",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Gv(e,t,n){return{type:"push",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Kv(e,t,n){return{type:"in_app",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Xv(e,t,n){return{type:"tool",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip,providers:n==null?void 0:n.providers,disableOutputSanitization:n==null?void 0:n.disableOutputSanitization}}function Qv(e,t,n){return{type:"delay",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip}}function Zv(e,t,n){return{type:"digest",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip}}function ek(e,t,n){return{type:"throttle",stepId:e,resolve:t,controlSchema:n==null?void 0:n.controlSchema,payloadSchema:n==null?void 0:n.payloadSchema,envSchema:n==null?void 0:n.envSchema,skip:n==null?void 0:n.skip}}var Tg={email:Wv,sms:Yv,chat:Jv,push:Gv,inApp:Kv,tool:Xv,delay:Qv,digest:Zv,throttle:ek};var mi=require("@nestjs/common");var xg=require("@nestjs/common"),{ConfigurableModuleClass:Aa,MODULE_OPTIONS_TOKEN:Fn,OPTIONS_TYPE:ZD,ASYNC_OPTIONS_TYPE:eF}=new xg.ConfigurableModuleBuilder().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(e=>({...e,isGlobal:!0})).build();var ac="REGISTER_API_PATH",sc="REGISTER_CONTROLLER_DECORATORS";var vg=require("@nestjs/common");var Gt=class{handler(t,n){return{body:()=>t.body,headers:i=>{let o=t.headers[i.toLowerCase()];return Array.isArray(o)?o[0]:o},method:()=>t.method||"GET",queryString:i=>{let o=t.query[i];return Array.isArray(o)?o[0]:o},url:()=>{let i=t.headers.host||"",o=i!=null&&i.includes("://")?"":`${t.protocol||"https"}://`;return new URL(t.originalUrl||t.url||"",`${o}${i||""}`)},transformResponse:({body:i,headers:o,status:a})=>(Object.entries(o).forEach(([s,u])=>{n.setHeader(s,u)}),n.status(a).send(i))}}};Gt=Zt([(0,vg.Injectable)()],Gt);var kg="nest",Kt=class{constructor(t,n){this.options=t;this.novuHandler=n;this.novuRequestHandler=new br({frameworkName:kg,...this.options,handler:this.novuHandler.handler})}async handleRequest(t,n){await this.novuRequestHandler.createHandler()(t,n)}};Kt=Zt([(0,mi.Injectable)(),en(0,(0,mi.Inject)(Fn)),en(1,(0,mi.Inject)(Gt))],Kt);var wt=require("@nestjs/common");var Pt=class{constructor(t){this.novuService=t}async handleGet(t,n){await this.novuService.handleRequest(t,n)}async handlePost(t,n){await this.novuService.handleRequest(t,n)}async handleOptions(t,n){await this.novuService.handleRequest(t,n)}};Zt([(0,wt.Get)(),en(0,(0,wt.Req)()),en(1,(0,wt.Res)())],Pt.prototype,"handleGet",1),Zt([(0,wt.Post)(),en(0,(0,wt.Req)()),en(1,(0,wt.Res)())],Pt.prototype,"handlePost",1),Zt([(0,wt.Options)(),en(0,(0,wt.Req)()),en(1,(0,wt.Res)())],Pt.prototype,"handleOptions",1),Pt=Zt([(0,wt.Controller)(),en(0,(0,wt.Inject)(Kt))],Pt);var Rg=require("@nestjs/common");var Ag=require("@nestjs/common/constants");var Ea={provide:ac,useFactory:e=>{if(!e.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(Ag.PATH_METADATA,e.apiPath,Pt)},inject:[Fn]};function lc(e,t=[]){return t.reduce((n,r)=>{let i=r(n);return i!=null?i:n},e)}function tk(e,t){var n;for(let r of(n=Reflect.getMetadataKeys(e))!=null?n:[])Reflect.defineMetadata(r,Reflect.getMetadata(r,e),t)}function Eg(e,t=[]){let n=lc(e,t);n!==e&&tk(n,e)}var cc={provide:sc,useFactory:e=>{var t;Eg(Pt,(t=e.controllerDecorators)!=null?t:[])},inject:[Fn]};var gi=class extends Aa{static register(t,n){var i;let r=Aa.register(t);return r.controllers=[lc(Pt,t.controllerDecorators||[])],(i=r.providers)==null||i.push(Ea,Kt,Gt,...n||[]),r.exports=[Kt,Gt],r}static registerAsync(t,n){var i;let r=Aa.registerAsync(t);return r.controllers=[Pt],(i=r.providers)==null||i.push(Ea,cc,Kt,Gt,...n||[]),r.exports=[Kt,Gt],r}};gi=Zt([(0,Rg.Module)({})],gi);0&&(module.exports={Actions,AgentDeliveryError,AgentError,Button,Card,CardLink,CardText,Client,CronExpression,Divider,Image,NOVU_OPTIONS,NovuClient,NovuController,NovuHandler,NovuModule,NovuRequestHandler,REGISTER_API_PATH,REGISTER_CONTROLLER_DECORATORS,Select,SelectOption,SeverityLevelEnum,TextInput,agent,frameworkName,isFromWorkflow,providerSchemas,registerApiPath,registerControllerDecorators,step,toAgentError,workflow});