@novu/framework 2.10.1-alpha.5 → 2.10.1-alpha.6
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.
- package/dist/cjs/{index-B4t9LyOV.d.cts → index-BAY1Gj4h.d.cts} +139 -10
- package/dist/cjs/index.cjs +47 -47
- package/dist/cjs/index.d.cts +1 -1
- package/dist/cjs/servers/express.cjs +24 -24
- package/dist/cjs/servers/express.d.cts +2 -2
- package/dist/cjs/servers/h3.cjs +30 -30
- package/dist/cjs/servers/h3.d.cts +2 -2
- package/dist/cjs/servers/lambda.cjs +24 -24
- package/dist/cjs/servers/lambda.d.cts +2 -2
- package/dist/cjs/servers/nest.cjs +47 -47
- package/dist/cjs/servers/nest.d.cts +2 -2
- package/dist/cjs/servers/next.cjs +24 -24
- package/dist/cjs/servers/next.d.cts +2 -2
- package/dist/cjs/servers/nuxt.cjs +30 -30
- package/dist/cjs/servers/nuxt.d.cts +2 -2
- package/dist/cjs/servers/remix.cjs +24 -24
- package/dist/cjs/servers/remix.d.cts +2 -2
- package/dist/cjs/servers/sveltekit.cjs +40 -40
- package/dist/cjs/servers/sveltekit.d.cts +2 -2
- package/dist/esm/{chunk-TJFK73XZ.js → chunk-H2XIPY7V.js} +21 -21
- package/dist/esm/{index-BCzJp-zE.d.ts → index-DiFdSsia.d.ts} +139 -10
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/servers/express.d.ts +2 -2
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +2 -2
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/lambda.d.ts +2 -2
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +2 -2
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +2 -2
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +2 -2
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +2 -2
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +2 -2
- package/dist/esm/servers/sveltekit.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var Ld=Object.create;var mr=Object.defineProperty;var Dd=Object.getOwnPropertyDescriptor;var Fd=Object.getOwnPropertyNames;var Ud=Object.getPrototypeOf,$d=Object.prototype.hasOwnProperty;var qd=(e,n,t)=>n in e?mr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var jd=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),Hl=(e,n)=>{for(var t in n)mr(e,t,{get:n[t],enumerable:!0})},Yl=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Fd(n))!$d.call(e,i)&&i!==t&&mr(e,i,{get:()=>n[i],enumerable:!(r=Dd(n,i))||r.enumerable});return e};var $t=(e,n,t)=>(t=e!=null?Ld(Ud(e)):{},Yl(n||!e||!e.__esModule?mr(t,"default",{value:e,enumerable:!0}):t,e)),Bd=e=>Yl(mr({},"__esModule",{value:!0}),e);var Ee=(e,n,t)=>qd(e,typeof n!="symbol"?n+"":n,t);var Hu=jd((U_,Wu)=>{"use strict";var ta=Object.prototype.hasOwnProperty,Vu=Object.prototype.toString,Uu=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,qu=function(n){return typeof Array.isArray=="function"?Array.isArray(n):Vu.call(n)==="[object Array]"},ju=function(n){if(!n||Vu.call(n)!=="[object Object]")return!1;var t=ta.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&ta.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i=="undefined"||ta.call(n,i)},Bu=function(n,t){Uu&&t.name==="__proto__"?Uu(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},zu=function(n,t){if(t==="__proto__")if(ta.call(n,t)){if($u)return $u(n,t).value}else return;return n[t]};Wu.exports=function e(){var n,t,r,i,o,a,s=arguments[0],u=1,p=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<p;++u)if(n=arguments[u],n!=null)for(t in n)r=zu(s,t),i=zu(n,t),s!==i&&(d&&i&&(ju(i)||(o=qu(i)))?(o?(o=!1,a=r&&qu(r)?r:[]):a=r&&ju(r)?r:{},Bu(s,{name:t,newValue:e(d,a,i)})):typeof i!="undefined"&&Bu(s,{name:t,newValue:i}));return s}});var nw={};Hl(nw,{Actions:()=>Ls,AgentDeliveryError:()=>hn,AgentEventEnum:()=>nr,Button:()=>Ds,Card:()=>Fs,CardLink:()=>Us,CardText:()=>$s,Client:()=>Yn,CronExpression:()=>Ya,Divider:()=>qs,NovuRequestHandler:()=>ga,Select:()=>js,SelectOption:()=>Bs,SeverityLevelEnum:()=>Ta,TextInput:()=>zs,agent:()=>Hs,providerSchemas:()=>ba,step:()=>sd,workflow:()=>od});module.exports=Bd(nw);var kc=require("jsonrepair");var gr=(i=>(i.TRIGGER="trigger",i.EXECUTE="execute",i.PREVIEW="preview",i.AGENT_EVENT="agent-event",i))(gr||{}),Qr=(r=>(r.DISCOVER="discover",r.HEALTH_CHECK="health-check",r.CODE="code",r))(Qr||{});var Ya=(ee=>(ee.EVERY_SECOND="* * * * * *",ee.EVERY_5_SECONDS="*/5 * * * * *",ee.EVERY_10_SECONDS="*/10 * * * * *",ee.EVERY_30_SECONDS="*/30 * * * * *",ee.EVERY_MINUTE="*/1 * * * *",ee.EVERY_5_MINUTES="0 */5 * * * *",ee.EVERY_10_MINUTES="0 */10 * * * *",ee.EVERY_30_MINUTES="0 */30 * * * *",ee.EVERY_HOUR="0 0-23/1 * * *",ee.EVERY_2_HOURS="0 0-23/2 * * *",ee.EVERY_3_HOURS="0 0-23/3 * * *",ee.EVERY_4_HOURS="0 0-23/4 * * *",ee.EVERY_5_HOURS="0 0-23/5 * * *",ee.EVERY_6_HOURS="0 0-23/6 * * *",ee.EVERY_7_HOURS="0 0-23/7 * * *",ee.EVERY_8_HOURS="0 0-23/8 * * *",ee.EVERY_9_HOURS="0 0-23/9 * * *",ee.EVERY_10_HOURS="0 0-23/10 * * *",ee.EVERY_11_HOURS="0 0-23/11 * * *",ee.EVERY_12_HOURS="0 0-23/12 * * *",ee.EVERY_DAY_AT_1AM="0 01 * * *",ee.EVERY_DAY_AT_2AM="0 02 * * *",ee.EVERY_DAY_AT_3AM="0 03 * * *",ee.EVERY_DAY_AT_4AM="0 04 * * *",ee.EVERY_DAY_AT_5AM="0 05 * * *",ee.EVERY_DAY_AT_6AM="0 06 * * *",ee.EVERY_DAY_AT_7AM="0 07 * * *",ee.EVERY_DAY_AT_8AM="0 08 * * *",ee.EVERY_DAY_AT_9AM="0 09 * * *",ee.EVERY_DAY_AT_10AM="0 10 * * *",ee.EVERY_DAY_AT_11AM="0 11 * * *",ee.EVERY_DAY_AT_NOON="0 12 * * *",ee.EVERY_DAY_AT_1PM="0 13 * * *",ee.EVERY_DAY_AT_2PM="0 14 * * *",ee.EVERY_DAY_AT_3PM="0 15 * * *",ee.EVERY_DAY_AT_4PM="0 16 * * *",ee.EVERY_DAY_AT_5PM="0 17 * * *",ee.EVERY_DAY_AT_6PM="0 18 * * *",ee.EVERY_DAY_AT_7PM="0 19 * * *",ee.EVERY_DAY_AT_8PM="0 20 * * *",ee.EVERY_DAY_AT_9PM="0 21 * * *",ee.EVERY_DAY_AT_10PM="0 22 * * *",ee.EVERY_DAY_AT_11PM="0 23 * * *",ee.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",ee.EVERY_WEEK="0 0 * * 0",ee.EVERY_WEEKDAY="0 0 * * 1-5",ee.EVERY_WEEKEND="0 0 * * 6,0",ee.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",ee.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",ee.EVERY_2ND_DAY_OF_MONTH_AT_10AM="0 10 2 * *",ee.EVERY_2ND_HOUR="0 */2 * * *",ee.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",ee.EVERY_2ND_MONTH="0 0 1 */2 *",ee.EVERY_QUARTER="0 0 1 */3 *",ee.EVERY_6_MONTHS="0 0 1 */6 *",ee.EVERY_YEAR="0 0 1 0 *",ee.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",ee.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",ee.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",ee.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5",ee))(Ya||{});var qt=(Se=>(Se.BRIDGE_ERROR="BridgeError",Se.EXECUTION_EVENT_CONTROL_INVALID_ERROR="ExecutionEventControlInvalidError",Se.EXECUTION_EVENT_PAYLOAD_INVALID_ERROR="ExecutionEventPayloadInvalidError",Se.EXECUTION_PROVIDER_OUTPUT_INVALID_ERROR="ExecutionProviderOutputInvalidError",Se.EXECUTION_STATE_CONTROL_INVALID_ERROR="ExecutionStateControlInvalidError",Se.EXECUTION_STATE_CORRUPT_ERROR="ExecutionStateCorruptError",Se.EXECUTION_STATE_OUTPUT_INVALID_ERROR="ExecutionStateOutputInvalidError",Se.EXECUTION_STATE_RESULT_INVALID_ERROR="ExecutionStateResultInvalidError",Se.INVALID_ACTION_ERROR="InvalidActionError",Se.METHOD_NOT_ALLOWED_ERROR="MethodNotAllowedError",Se.MISSING_DEPENDENCY_ERROR="MissingDependencyError",Se.MISSING_SECRET_KEY_ERROR="MissingSecretKeyError",Se.PROVIDER_EXECUTION_FAILED_ERROR="ProviderExecutionFailedError",Se.PROVIDER_NOT_FOUND_ERROR="ProviderNotFoundError",Se.SIGNATURE_EXPIRED_ERROR="SignatureExpiredError",Se.SIGNATURE_INVALID_ERROR="SignatureInvalidError",Se.SIGNATURE_MISMATCH_ERROR="SignatureMismatchError",Se.SIGNATURE_NOT_FOUND_ERROR="SignatureNotFoundError",Se.SIGNATURE_VERSION_INVALID_ERROR="SignatureVersionInvalidError",Se.SIGNING_KEY_NOT_FOUND_ERROR="SigningKeyNotFoundError",Se.STEP_ALREADY_EXISTS_ERROR="StepAlreadyExistsError",Se.STEP_CONTROL_COMPILATION_FAILED_ERROR="StepControlCompilationFailedError",Se.STEP_EXECUTION_FAILED_ERROR="StepExecutionFailedError",Se.STEP_NOT_FOUND_ERROR="StepNotFoundError",Se.WORKFLOW_ALREADY_EXISTS_ERROR="WorkflowAlreadyExistsError",Se.WORKFLOW_NOT_FOUND_ERROR="WorkflowNotFoundError",Se.WORKFLOW_PAYLOAD_INVALID_ERROR="WorkflowPayloadInvalidError",Se))(qt||{});var Zr=(r=>(r.POST="POST",r.GET="GET",r.OPTIONS="OPTIONS",r))(Zr||{});var zd=e=>{var t,r;if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(r=(t=n==null?void 0:n.constructor)==null?void 0:t.name.endsWith("Error"))!=null?r:!1},on=class extends Error{},ei=class extends on{constructor(){super(...arguments);this.statusCode=404}},vt=class extends on{constructor(){super(...arguments);this.statusCode=400}},gn=class extends on{constructor(){super(...arguments);this.statusCode=401}},yn=class extends on{constructor(n,{cause:t}={}){var r;zd(t)?(super(`${n}: ${t.message}`),this.data={stack:(r=t.stack)!=null?r:n}):(super(`${n}${t?`: ${JSON.stringify(t,null,2)}`:""}`),this.data={stack:n})}},ti=class extends on{constructor(){super(...arguments);this.statusCode=409}};var zn=class extends yn{constructor(t){super("Unknown BridgeError",{cause:t});this.statusCode=500;this.code="BridgeError"}};var ni=class extends vt{constructor(t,r){super(`Workflow with id: \`${t}\` has a corrupt state. Step with id: \`${r}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:t,stepId:r}}},br=class extends vt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=r}},ri=class extends vt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=r}},ii=class extends vt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=i}},ai=class extends vt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=i}},oi=class extends vt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=i}},si=class extends vt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has invalid controls syntax in step with id: \`${r}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=i}},li=class extends vt{constructor(t,r,i,o){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` and provider with id: \`${i}\` has invalid output. Please provide the correct provider output.`);this.code="ExecutionProviderOutputInvalidError";this.data=o}},ci=class extends vt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=r}};var _n=e=>Object.values(qt).includes(e==null?void 0:e.code),Jl=e=>!_n(e)&&typeof e.statusCode=="number"&&e.statusCode>=400&&e.statusCode<500;var Ja=e=>Object.values(e).map(n=>`\`${n}\``).join(", "),ui=e=>e.replaceAll(/(\w)(\w*)/g,(n,t,r)=>t.toUpperCase()+r.toLowerCase()).replaceAll(/[\s-]+/g,"");var pi=class extends on{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${Ja(Zr)}`}},Vn=class extends vt{constructor(t,r){super(`Invalid query string: \`action\`=\`${t}\`. Please use one of ${Ja(r)}`);this.code="InvalidActionError"}},di=class extends vt{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(n,t,r){super(),this.data={message:r},this.statusCode=n,this.code=t}};var wr=class extends ti{constructor(n,t){super(`${ui(n)} with id: \`${t}\` already exists. Please use a different id.`)}},bn=class extends ei{constructor(n,t){super(`${ui(n)} with id: \`${t}\` does not exist. Please provide a valid id.`)}},Wn=class extends yn{constructor(t,r,i,o){super(`Failed to ${i} ${ui(t)} with id: \`${r}\``,{cause:o});this.statusCode=502}};var fi=class extends bn{constructor(t){super("provider",t);this.code="ProviderNotFoundError"}},mi=class extends Wn{constructor(t,r,i){super("provider",t,r,i);this.code="ProviderExecutionFailedError"}};var gi=class extends gn{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"}},yi=class extends gn{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},bi=class extends gn{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},wi=class extends gn{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},Si=class extends gn{constructor(){super("Signature key not found. Please provide a valid key in the Client constructor `config.secretKey`");this.code="SigningKeyNotFoundError"}};var xi=class extends bn{constructor(t){super("step",t);this.code="StepNotFoundError"}},Ti=class extends wr{constructor(t){super("step",t);this.code="StepAlreadyExistsError"}},Sr=class extends Wn{constructor(t,r,i){super("step",t,r,i);this.code="StepExecutionFailedError"}};var xr=class extends bn{constructor(t){super("workflow",t);this.code="WorkflowNotFoundError"}};var ki=(()=>{var e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(l,c)=>function(){return l&&(c=(0,l[t(l)[0]])(l=0)),c},o=(l,c)=>function(){return c||(0,l[t(l)[0]])((c={exports:{}}).exports,c),c.exports},a=(l,c)=>{for(var f in c)e(l,f,{get:c[f],enumerable:!0})},s=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let x of t(c))!r.call(l,x)&&x!==f&&e(l,x,{get:()=>c[x],enumerable:!(S=n(c,x))||S.enumerable});return l},u=l=>s(e({},"__esModule",{value:!0}),l),p={};a(p,{JSONSchemaFaker:()=>Vl,default:()=>Wl,setDependencies:()=>al});function d(l,c){return typeof l=="string"?typeof c!="undefined"?ur.register(l,c):ur.get(l):ur.registerMany(l)}function h(l,c){return l=typeof l=="undefined"?Ht.MIN_INTEGER:l,c=typeof c=="undefined"?Ht.MAX_INTEGER:c,Math.floor(Ae("random")()*(c-l+1))+l}function y(l){return Wr.default.prototype.max=Ae("defaultRandExpMax"),Wr.default.prototype.randInt=(f,S)=>f+Math.floor(Ae("random")()*(1+(S-f))),new Wr.default(l).gen()}function g(l){return l[Math.floor(Ae("random")()*l.length)]}function P(l){let c,f,S=l.length,x=l.slice();for(;S>0;)f=Math.floor(Ae("random")()*S),S-=1,c=x[S],x[S]=x[f],x[f]=c;return x}function Z(l,c){return Ae("random")()*(c-l)+l}function Q(l,c,f,S,x=!1){return f=typeof f=="undefined"?Ht.MIN_NUMBER:f,S=typeof S=="undefined"?Ht.MAX_NUMBER:S,l=typeof l=="undefined"?f:l,c=typeof c=="undefined"?S:c,c<l&&(c+=l),x?Z(l,c):h(l,c)}function j(l){switch(l){case"seconds":return Q(0,60)*60;case"minutes":return Q(15,50)*612;case"hours":return Q(12,72)*36123;case"days":return Q(7,30)*86412345;case"weeks":return Q(4,52)*604812345;case"months":return Q(2,13)*2592012345;case"years":return Q(1,20)*31104012345;default:break}}function pe(l){if(l)return j(l);let c=Ae("minDateTime"),f=Ae("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(Z(c.getTime(),f.getTime()))}function te(l,c,f){if(c=decodeURIComponent(c),f&&f[c])return Se(f[c]);let S=c.replace("#/","/").split("/"),x=l.$ref&&f&&f[l.$ref]||l;for(!x&&!S[0]&&(S[0]=l.$ref.split("#/")[0]),f&&c.includes("#/")&&f[S[0]]&&(x=f[S.shift()]),S[0]||S.shift();x&&S.length>0;){let v=S.shift();if(!x[v])throw new Error(`Prop not found: ${v} (${c})`);x=x[v]}return x}function Te(l){return typeof l=="string"&&ml.test(l)}function _e(l){return["number","boolean"].includes(typeof l)}function U(l,...c){return c.filter(f=>typeof l[f]!="undefined").length>0}function Fe(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 Ge(l){if(l.includes(" "))return new Date(l).toISOString().substr(0,10);let[c,f]=l.split("T"),[S,x,v]=c.split("-"),[k,N,X]=f.substr(0,8).split(":");return x=`0${Math.max(1,Math.min(12,x))}`.slice(-2),v=`0${Math.max(1,Math.min(31,v))}`.slice(-2),k=`0${Math.max(1,Math.min(23,k))}`.slice(-2),N=`0${Math.max(1,Math.min(59,N))}`.slice(-2),X=`0${Math.max(1,Math.min(59,X))}`.slice(-2),`${S}-${x}-${v}T${k}:${N}:${X}.000Z`}function qe(l,c,f){let S={};switch(l||c.type){case"integer":case"number":if(typeof c.minimum!="undefined"&&(S.minimum=c.minimum),typeof c.maximum!="undefined"&&(S.maximum=c.maximum),c.enum){let v=Math.max(S.minimum||0,0),k=Math.min(S.maximum||1/0,1/0);c.exclusiveMinimum&&v===c.minimum&&(v+=c.multipleOf||1),c.exclusiveMaximum&&k===c.maximum&&(k-=c.multipleOf||1),(v||k!==1/0)&&(c.enum=c.enum.filter(N=>N>=v&&N<=k))}break;case"string":{S.minLength=Ae("minLength")||0,S.maxLength=Ae("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 x=f(S);if(x==null)return null;switch(l||c.type){case"number":x=Te(x)?parseFloat(x):x;break;case"integer":x=Te(x)?parseInt(x,10):x;break;case"boolean":x=!!x;break;case"string":{if(_e(x))return x;x=String(x);let v=Math.max(S.minLength||0,0),k=Math.min(S.maxLength||1/0,1/0),N,X=0;for(;x.length<v;)if(N=x,c.pattern?x+=ke.randexp(c.pattern):x+=`${ke.pick([" ","/","_","-","+","=","@","^"])}${x}`,x===N){if(X+=1,X===3)break}else X=0;switch(x.length>k&&(x=x.substr(0,k)),c.format){case"date-time":case"datetime":x=new Date(Ge(x)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":x=new Date(Fe(x)).toISOString().substr(0,10);break;case"time":x=new Date(`1969-01-01 ${x}`).toISOString().substr(11);break;default:break}break}default:break}return x}function F(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,x)=>{l.type==="array"&&c.type==="array"?l[f][x]=F(l[f][x]||{},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]=F({},c[f]):l[f]=F(l[f],c[f])}),l}function Se(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(x=>Se(x,c))),S}let f={};return c.set(l,f),Object.keys(l).reduce((S,x)=>(S[x]=Se(l[x],c),S),f)}function je(l){let c=JSON.stringify(l),f=JSON.stringify(l,null,2);return c.length>400?`${f.substr(0,400)}...`:f}function ge(){return ke.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 Pe(l,c){let f=F({},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=ke.pick(Ht.SCALAR_TYPES.filter(S=>(Array.isArray(l.type)?l.type:[l.type]).every(v=>S==="number"||S==="integer"?v!=="number"&&v!=="integer":S!==v)));else if(l.enum){let S;do S=ge();while(l.enum.indexOf(S)!==-1);f.enum=[S]}return l.required&&f.properties&&l.required.forEach(S=>{delete f.properties[S]}),f}function Ze(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 ot(l,c){return!c.every(f=>Ze(l,f))}function Rt(l,c){return c.reduce((S,x)=>S+(Ze(l,x)?1:0),0)===1}function Lt(l){return["enum","const","default","examples","required","definitions","items","properties"].includes(l)}function E(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?F({},l[S]):l[S],f),{})}function xt(l,c){return Array.isArray(l)?l.map(f=>xt(f,c)):(typeof l=="string"&&(l=l.replace(/#\{([\w.-]+)\}/g,(f,S)=>c[S])),l)}function It(l){return Object.prototype.toString.call(l)==="[object Object]"&&!Object.keys(l).length}function O(l,c){c=c.items||c;let f=Ae("alwaysFakeOptionals"),S=Array.isArray(c.required)&&c.required.includes(l)||f,x=typeof c.thunk=="function"||c.additionalProperties&&typeof c.additionalProperties.thunk=="function";return!S&&!x}function gt(l,c,f=!1){if(!l||typeof l!="object")return l;if(Array.isArray(l))return l.map(S=>gt(S,c,!0)).filter(S=>typeof S!="undefined");if(Object.keys(l).forEach(S=>{if(It(l[S]))O(S,c)&&delete l[S];else{let x=c;c&&c.properties&&c.properties[S]&&(x=c.properties[S]);let v=gt(l[S],x);It(v)||(l[S]=v)}typeof l[S]=="undefined"&&delete l[S]}),!(!Object.keys(l).length&&f))return l}function Xt(l){return(c,f,S,x)=>{let v=c,k=[];typeof c=="object"&&(v=Object.keys(c)[0],Array.isArray(c[v])?k=c[v]:k.push(c[v]));let N=v.split("."),X=l();for(;N.length>1;)X=X[N.shift()];return c=typeof X=="object"?X[N[0]]:X,typeof c=="function"&&(c=c.apply(X,k.map(M=>We.template(M,x)))),Object.prototype.toString.call(c)==="[object Object]"&&Object.keys(c).forEach(M=>{if(typeof c[M]=="function")throw new Error(`Cannot resolve value for '${S}: ${v}', given: ${c}`)}),c}}function ar(l,c){if(typeof l=="undefined")return Bn.list();if(typeof l=="string")if(typeof c=="function")Bn.register(l,c);else if(c===null||c===!1)Bn.unregister(l);else return Bn.get(l);else Bn.registerMany(l)}function jn(l,c,f){return Object.keys(l).filter(S=>{let x=wl.indexOf(c)>-1;return f.indexOf(S)>-1&&!x}).length>0}function ct(l,c){let f=Object.keys(pr);for(let S=0;S<f.length;S+=1){let x=f[S],v=c[c.length-1];if(jn(l,v,pr[x]))return x}}function An(){return Ae("random")()>.5}function Bt(){return null}function Qt(l,c,f,S,x,v){let k=[],N=[];function X(re){let q=JSON.stringify(re.value);return N.indexOf(q)===-1?(N.push(q),k.push(re),!0):!1}c.forEach(X);let M=100;for(;k.length!==c.length&&(X(v(f.items||S,l,x))||(M-=1),!!M););return k}function fn(l,c,f,S){let x=[];if(!(l.items||l.additionalItems)){if(We.hasProperties(l,"minItems","maxItems","uniqueItems")&&(l.minItems!==0||l.maxItems!==0))throw new Hr(`missing items for ${We.short(l)}`,c);return x}if(Array.isArray(l.items))return l.items.map((se,Ue)=>{let xe=c.concat(["items",Ue]);return S(se,xe,f)});let v=l.minItems,k=l.maxItems,N=Ae("minItems"),X=Ae("maxItems");N&&(v=typeof v=="undefined"?N:Math.min(N,v)),X&&(k=typeof k=="undefined"?X:Math.min(X,k),k&&k>X&&(k=X),v&&v>X&&(v=k));let M=Ae("alwaysFakeOptionals")===!0?1:Ae("optionalsProbability"),re=Ae("alwaysFakeOptionals")||Ae("fixedProbabilities")||!1,q=ke.number(v,k,1,5);M!==null&&(q=Math.max(re?Math.round((k||q)*M):Math.abs(ke.number(v,k)*M),v||0));let de=typeof l.additionalItems=="object"?l.additionalItems:{};for(let se=x.length;se<q;se+=1){let Ue=c.concat(["items",se]),xe=S(l.items||de,Ue,f);x.push(xe)}if(l.contains&&q>0){let se=ke.number(0,q-1);x[se]=S(l.contains,c.concat(["items",se]),f)}return l.uniqueItems?Qt(c.concat(["items"]),x,l,de,f,S):x}function or(l){let c=typeof l.minimum=="undefined"||l.minimum===-Number.MAX_VALUE?Ht.MIN_INTEGER:l.minimum,f=typeof l.maximum=="undefined"||l.maximum===Number.MAX_VALUE?Ht.MAX_INTEGER:l.maximum,S=l.multipleOf,x=S&&String(S).match(/e-(\d)|\.(\d+)$/);if(x){let v=(Math.random()*ke.number(0,10)+1)*S,k=x[1]||x[2].length,N=parseFloat(v.toFixed(k)),X=ke.number(c,f-1);return String(N).includes(".")?X+N:(X+N).toExponential()}if(S&&(f=Math.floor(f/S)*S,c=Math.ceil(c/S)*S),l.exclusiveMinimum&&c===l.minimum&&(c+=S||1),l.exclusiveMaximum&&f===l.maximum&&(f-=S||1),c>f)return NaN;if(S){let v=ke.number(Math.floor(c/S),Math.floor(f/S))*S;for(;v<c;)v+=S;return v}return ke.number(c,f,void 0,void 0,l.type!=="integer")}function va(l){return Math.floor(Ba({...l}))}function qr(l){return ke.shuffle(Rl).slice(0,l)}function jr(l,c,f,S){let x={},v=l.properties||{},k=l.patternProperties||{},N=typeof l.required=="boolean"?[]:(l.required||[]).slice(),X=l.additionalProperties!==!1,M=Object.keys(v),re=Object.keys(k),q=M.concat(re).reduce((ae,A)=>(N.indexOf(A)===-1&&ae.push(A),ae),[]),de=N.concat(q),se=X&&l.additionalProperties===!0?Jr:l.additionalProperties;if(!X&&M.length===0&&re.length===0&&We.hasProperties(l,"minProperties","maxProperties","dependencies","required"))return null;if(Ae("requiredOnly")===!0)return N.forEach(ae=>{v[ae]&&(x[ae]=v[ae])}),S(x,c.concat(["properties"]),f,l);let Ue=Ae("alwaysFakeOptionals")===!0?1:Ae("optionalsProbability"),xe=Ae("alwaysFakeOptionals")||Ae("fixedProbabilities")||!1,Oe=Ae("ignoreProperties")||[],Ye=Ae("reuseProperties"),Ke=Ae("fillProperties"),ie=l.maxProperties||de.length+(X?ke.number(1,5):0),I=Math.max(l.minProperties||0,N.length),C=Math.max(0,de.length-I);de.length===1&&!N.length&&(I=Math.max(ke.number(Ke?1:0,ie),I)),Ue!==null&&(xe===!0?C=Math.round(I-N.length+Ue*(de.length-I)):C=ke.number(I-N.length,Ue*(de.length-I)));let z=ke.shuffle(q).slice(0,C),W=q.filter(ae=>z.indexOf(ae)!==-1),G=Ue!==null||N.length===ie?ie:ke.number(0,ie),B=N.concat(ke.shuffle(W).slice(0,G)).slice(0,ie),H=[],J=[];if(l.dependencies&&(Object.keys(l.dependencies).forEach(ae=>{let A=l.dependencies[ae];if(B.indexOf(ae)!==-1)if(Array.isArray(A))A.forEach(Y=>{B.indexOf(Y)===-1&&B.push(Y)});else if(Array.isArray(A.oneOf||A.anyOf)){let Y=A.oneOf||A.anyOf;J.push({prop:ae,values:Y})}else H.push(A)}),H.length))return delete l.dependencies,S({allOf:H.concat(l)},c.concat(["properties"]),f,l);let le=[],he=[];B.forEach(ae=>{if(v[ae]&&["{}","true"].includes(JSON.stringify(v[ae].not)))return;for(let Y=0;Y<Oe.length;Y+=1)if(Oe[Y]instanceof RegExp&&Oe[Y].test(ae)||typeof Oe[Y]=="string"&&Oe[Y]===ae||typeof Oe[Y]=="function"&&Oe[Y](v[ae],ae)){le.push(ae);return}se===!1&&N.indexOf(ae)!==-1&&(x[ae]=v[ae]),v[ae]&&(x[ae]=v[ae]);let A;if(re.forEach(Y=>{ae.match(new RegExp(Y))&&(A=!0,x[ae]?We.merge(x[ae],k[Y]):x[ke.randexp(ae)]=k[Y])}),!A){let Y=k[ae]||se;Y&&se!==!1?x[k[ae]?ke.randexp(ae):ae]=v[ae]||Y:he.push(ae)}});let ve=Object.keys(x).length+(Ke?0:le.length),nt=ae=>ke.randexp(`_?[_a-f\\d]{1,3}${ae?"\\$?":""}`);function rt(ae){let A;do{if(!ae.length)break;A=ae.shift()}while(x[A]);return A}let at=I;if(X&&!N.length&&(at=Math.max(Ue===null||se?ke.number(Ke?1:0,ie):0,I)),!W.length&&!C&&X&&xe===!0&&Ke){let ae=ke.number(0,ie);for(let A=0;A<ae;A+=1)x[Yr(1)+nt(ae[A])]=se||Jr}for(;Ke&&!(!(re.length||X)||ve>=at);){if(X)if(Ye&&M.length-ve>at){let ae=0,A;do{if(ae+=1,ae>1e3)break;A=rt(N)||ke.pick(M)}while(typeof x[A]!="undefined");typeof x[A]=="undefined"&&(x[A]=v[A],ve+=1)}else if(re.length&&!se){let ae=ke.pick(re),A=ke.randexp(ae);x[A]||(x[A]=k[ae],ve+=1)}else{let ae=rt(N)||Yr(1)+nt();x[ae]||(x[ae]=se||Jr,ve+=1)}for(let ae=0;ve<I&&ae<re.length;ae+=1){let A=re[ae],Y=ke.randexp(A);x[Y]||(x[Y]=k[A],ve+=1)}}if(N.length===0&&(!X||Ue===!1)){let ae=ke.number(I,ie);for(;ve<ae;){let A=rt(M);A&&(x[A]=v[A]),ve+=1}}let dt=x;if(Ae("sortProperties")!==null){let ae=Object.keys(v);dt=Object.keys(x).sort((Y,fe)=>Ae("sortProperties")?Y.localeCompare(fe):ae.indexOf(Y)-ae.indexOf(fe)).reduce((Y,fe)=>(Y[fe]=x[fe],Y),{})}let bt=S(dt,c.concat(["properties"]),f,l);return J.forEach(ae=>{for(let A of ae.values)if(We.hasValue(A.properties[ae.prop],bt.value[ae.prop])){Object.keys(A.properties).forEach(Y=>{Y!==ae.prop&&We.merge(bt.value,S(A.properties,c.concat(["properties"]),f,l).value)});break}}),bt}function sr(){let l=ke.number(1,5);return Yr(l).join(" ")}function Ea(l=0,c=140){let f=Math.max(0,l),S=ke.number(f,c),x=sr();for(;x.length<f;)x+=sr();return x.length>S&&(x=x.substr(0,S)),x}function Br(){return[0,0,0,0].map(()=>ke.number(0,255)).join(".")}function zr(){return ke.date().toISOString()}function Aa(){return Gr().slice(0,10)}function Oa(){return Gr().slice(11)}function _a(l){return ke.randexp(Ft[l]).replace(Ll,(c,f)=>ke.randexp(Ft[f]))}function Ra(l,c){let f=ja(l.format);if(typeof f=="function")return f(l);switch(l.format){case"date-time":case"datetime":return Gr();case"date":return Pl();case"time":return Ml();case"ipv4":return Cl();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 Dl(l.format);default:if(typeof f=="undefined"){if(Ae("failOnInvalidFormat"))throw new Error(`unknown registry key ${We.short(l.format)}`);return c()}throw new Error(`unsupported format '${l.format}'`)}}function Ia(l){return We.typecast("string",l,f=>l.format?Ra(l,()=>za(f.minLength,f.maxLength)):l.pattern?ke.randexp(l.pattern):za(f.minLength,f.maxLength))}function $({$comment:l,title:c,description:f}){return Object.entries({comment:l,title:c,description:f}).filter(([,S])=>S).reduce((S,[x,v])=>(S[x]=v,S),{})}function ne(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 x={...$(l),schemaPath:c};if(c[c.length-1]!=="properties"){if(Ae("useExamplesValue")&&Array.isArray(l.examples)){let M=l.examples.concat("default"in l?[l.default]:[]);return{value:We.typecast(null,l,()=>ke.pick(M)),context:x}}if(Ae("useExamplesValue")&&typeof l.example!="undefined")return{value:We.typecast(null,l,()=>l.example),context:x};if(Ae("useDefaultValue")&&"default"in l&&(l.default!==""||!Ae("replaceEmptyByRandomValue")))return{value:l.default,context:x};if("template"in l)return{value:We.template(l.template,S),context:x};if("const"in l)return{value:l.const,context:x}}if(l.not&&typeof l.not=="object"&&(l=We.notValue(l.not,We.omitProps(l,["not"])),l.type&&l.type==="object")){let{value:M,context:re}=ne(l,c.concat(["not"]),f,S);return{value:We.clean(M,l,!1),context:{...x,items:re}}}if(typeof l.thunk=="function"){let{value:M,context:re}=ne(l.thunk(S),c,f);return{value:M,context:{...x,items:re}}}if(l.jsonPath)return{value:l,context:x};let v=l.type;if(Array.isArray(v)?v=ke.pick(v):typeof v=="undefined"&&(v=Sl(l,c)||v,v&&(l.type=v)),typeof l.generate=="function"){let M=We.typecast(null,l,()=>l.generate(S,c)),re=M===null?"null":typeof M;if(re===v||re==="number"&&v==="integer"||Array.isArray(M)&&v==="array")return{value:M,context:x}}if(typeof l.pattern=="string")return{value:We.typecast("string",l,()=>ke.randexp(l.pattern)),context:x};if(Array.isArray(l.enum))return{value:We.typecast(null,l,()=>ke.pick(l.enum)),context:x};if(typeof v=="string")if(dr[v])try{let M=dr[v](l,c,f,ne);return v==="array"?{value:M.map(({value:re})=>re),context:{...x,items:M.map(Array.isArray(l.items)?({context:re})=>re:({context:re})=>({...re,schemaPath:re.schemaPath.slice(0,-1)}))}}:v==="object"?M!==null?{value:M.value,context:{...x,items:M.context}}:{value:{},context:x}:{value:M,context:x}}catch(M){throw typeof M.path=="undefined"?new Hr(M.stack,c):M}else{if(Ae("failOnInvalidTypes"))throw new Hr(`unknown primitive ${We.short(v)}`,c.concat(["type"]));{let M=Ae("defaultInvalidTypeProduct");return typeof M=="string"&&dr[M]?{value:dr[M](l,c,f,ne),context:x}:{value:M,context:x}}}let k={},N={...x};Array.isArray(l)&&(k=[]);let X=Ae("pruneProperties")||[];return Object.keys(l).forEach(M=>{if(!X.includes(M)&&l[M]!==null)if(typeof l[M]=="object"&&M!=="definitions"){let{value:re,context:q}=ne(l[M],c.concat([M]),f,k);k[M]=We.clean(re,l[M],!1),N[M]=q,k[M]===null&&Ae("omitNulls")&&(delete k[M],delete N[M])}else k[M]=l[M]}),{value:k,context:N}}function Re(l){return Array.isArray(l)?ke.pick(l):l}function Le(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 ze(l,c,f,S){if(!l||typeof l!="object")return l;if(f||(f={}),c||(c=l),Array.isArray(l))return l.map(x=>ze(x,c,f,S));if(l.jsonPath){let{JSONPath:x}=Da(),v=typeof l.jsonPath!="object"?{path:l.jsonPath}:l.jsonPath;v.group=l.group||v.group||S,v.cycle=l.cycle||v.cycle||!1,v.reverse=l.reverse||v.reverse||!1,v.count=l.count||v.count||1;let k=`${v.group}__${v.path}`;return f[k]||(v.count>1?f[k]=x(v.path,c).slice(0,v.count):f[k]=x(v.path,c)),v.cycle||v.reverse?Le(f[k],v.reverse):Re(f[k])}return Object.keys(l).forEach(x=>{l[x]=ze(l[x],c,f,x)}),l}function Ct(l,c,f,S){if(Object.prototype.toString.call(c)!=="[object Object]")throw new Error(`Invalid input, expecting object but given ${typeof c}`);let x=Ae("refDepthMin")||0,v=Ae("refDepthMax")||3;try{let{resolveSchema:k}=jl({refs:l,schema:c,container:f,synchronous:S,refDepthMin:x,refDepthMax:v}),N=$l(We.clone(c),[],k);return Ae("resolveJsonPath")?{value:ze(N.value),context:N.context}:N}catch(k){throw k.path?new Error(`${k.message} in /${k.path.join("/")}`):k}}function Zt(l){return l.value}function zt(l,c){return c.reduce((f,S)=>S in f?f[S]:{},l)}function en(l,c,f,S=f){let{title:x,description:v,comment:k}=zt(l,c),N=[];Ae("renderTitle")&&x&&N.push(` ${x}`,""),Ae("renderDescription")&&v&&N.push(` ${v}`),Ae("renderComment")&&k&&N.push(` ${k}`),f.commentBefore=N.join(`
|
|
2
|
-
`),S instanceof Bl?S.items.forEach(X=>{en(l,[...c,"items",X.key.value],X.key,X.value)}):S instanceof zl&&S.items.forEach((X,M)=>{en(l,[...c,"items",M],X)})}function On({value:l,context:c}){let f=hr.createNode(l);en(c,[],f);let S=new hr.Document;return S.contents=f,S.toString()}function yt(){nn.define("autoIncrement",function(c,f){if(!this.offset){let S=f.minimum||1,x=S+Ht.MAX_NUMBER,v=c.initialOffset||f.initialOffset;this.offset=v||ke.number(S,x)}return c?this.offset++:f}),nn.define("sequentialDate",function(c,f){if(this.now||(this.now=ke.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 ${We.short(c)}`);this.now.setTime(this.now.getTime()+ke.date(c))}return f})}function tn(l,c){let f={};Array.isArray(l)?l.forEach(x=>{f[x.$id||x.id]=x}):f=l||{};function S(x){if(!x||typeof x!="object")return;if(Array.isArray(x))return x.forEach(S);let v=x.$id||x.id;typeof v=="string"&&!f[v]&&(f[v]=x),Object.keys(x).forEach(k=>{S(x[k])})}return S(l),S(c),f}var Dt,Ca,Js,Pa,Gs,Ks,Pt,Xs,Ma,lr,ee,Qs,Zs,el,tl,nl,cr,Vr,Na,rl,il,La,Da,al,ol,Fa,Ve,Ua,sl,ll,ur,Ae,$a,qa,cl,ul,pl,dl,hl,fl,Ht,Wr,ke,ml,We,gl,yl,Bn,ja,bl,Hr,pr,wl,Sl,xl,Tl,kl,vl,El,Al,Ol,Ba,_l,Rl,Yr,Jr,Il,za,Cl,Gr,Pl,Ml,Va,Kr,Nl,Ft,Ll,Dl,Fl,Ul,dr,$l,ql,jl,Wa,Ha,Tt,ld,cd,ud,pd,dd,hd,fd,md,gd,yd,bd,wd,Bl,zl,hr,nn,tt,Vl,Wl,Sd=i({"src/shared.js"(){Dt=Object.create,Ca=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Pa=Object.getOwnPropertyNames,Gs=Object.getPrototypeOf,Ks=Object.prototype.hasOwnProperty,Pt=(l,c)=>function(){return c||(0,l[Pa(l)[0]])((c={exports:{}}).exports,c),c.exports},Xs=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let x of Pa(c))!Ks.call(l,x)&&x!==f&&Ca(l,x,{get:()=>c[x],enumerable:!(S=Js(c,x))||S.enumerable});return l},Ma=(l,c,f)=>(f=l!=null?Dt(Gs(l)):{},Xs(c||!l||!l.__esModule?Ca(f,"default",{value:l,enumerable:!0}):f,l)),lr=Pt({"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}}}),ee=Pt({"node_modules/ret/lib/sets.js"(l){var c=lr(),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()),x=()=>[{type:c.CHAR,value:9},{type:c.CHAR,value:10},{type:c.CHAR,value:11},{type:c.CHAR,value:12},{type:c.CHAR,value:13},{type:c.CHAR,value:32},{type:c.CHAR,value:160},{type:c.CHAR,value:5760},{type:c.RANGE,from:8192,to:8202},{type:c.CHAR,value:8232},{type:c.CHAR,value:8233},{type:c.CHAR,value:8239},{type:c.CHAR,value:8287},{type:c.CHAR,value:12288},{type:c.CHAR,value:65279}],v=()=>[{type:c.CHAR,value:10},{type:c.CHAR,value:13},{type:c.CHAR,value:8232},{type:c.CHAR,value:8233}];l.words=()=>({type:c.SET,set:S(),not:!1}),l.notWords=()=>({type:c.SET,set:S(),not:!0}),l.ints=()=>({type:c.SET,set:f(),not:!1}),l.notInts=()=>({type:c.SET,set:f(),not:!0}),l.whitespace=()=>({type:c.SET,set:x(),not:!1}),l.notWhitespace=()=>({type:c.SET,set:x(),not:!0}),l.anyChar=()=>({type:c.SET,set:v(),not:!0})}}),Qs=Pt({"node_modules/ret/lib/util.js"(l){var c=lr(),f=ee(),S="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",x={0:0,t:9,n:10,v:11,f:12,r:13};l.strToChars=v=>{var k=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return v=v.replace(k,(N,X,M,re,q,de,se,Ue)=>{if(M)return N;var xe=X?8:re?parseInt(re,16):q?parseInt(q,16):de?parseInt(de,8):se?S.indexOf(se):x[Ue],Oe=String.fromCharCode(xe);return/[[\]{}^$.|?*+()]/.test(Oe)&&(Oe="\\"+Oe),Oe}),v},l.tokenizeClass=(v,k)=>{for(var N=[],X=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,M,re;(M=X.exec(v))!=null;)if(M[1])N.push(f.words());else if(M[2])N.push(f.ints());else if(M[3])N.push(f.whitespace());else if(M[4])N.push(f.notWords());else if(M[5])N.push(f.notInts());else if(M[6])N.push(f.notWhitespace());else if(M[7])N.push({type:c.RANGE,from:(M[8]||M[9]).charCodeAt(0),to:M[10].charCodeAt(0)});else if(re=M[12])N.push({type:c.CHAR,value:re.charCodeAt(0)});else return[N,X.lastIndex];l.error(k,"Unterminated character class")},l.error=(v,k)=>{throw new SyntaxError("Invalid regular expression: /"+v+"/: "+k)}}}),Zs=Pt({"node_modules/ret/lib/positions.js"(l){var c=lr();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:"$"})}}),el=Pt({"node_modules/ret/lib/index.js"(l,c){var f=Qs(),S=lr(),x=ee(),v=Zs();c.exports=k=>{var N=0,X,M,re={type:S.ROOT,stack:[]},q=re,de=re.stack,se=[],Ue=W=>{f.error(k,`Nothing to repeat at column ${W-1}`)},xe=f.strToChars(k);for(X=xe.length;N<X;)switch(M=xe[N++],M){case"\\":switch(M=xe[N++],M){case"b":de.push(v.wordBoundary());break;case"B":de.push(v.nonWordBoundary());break;case"w":de.push(x.words());break;case"W":de.push(x.notWords());break;case"d":de.push(x.ints());break;case"D":de.push(x.notInts());break;case"s":de.push(x.whitespace());break;case"S":de.push(x.notWhitespace());break;default:/\d/.test(M)?de.push({type:S.REFERENCE,value:parseInt(M,10)}):de.push({type:S.CHAR,value:M.charCodeAt(0)})}break;case"^":de.push(v.begin());break;case"$":de.push(v.end());break;case"[":{var Oe;xe[N]==="^"?(Oe=!0,N++):Oe=!1;var Ye=f.tokenizeClass(xe.slice(N),k);N+=Ye[1],de.push({type:S.SET,set:Ye[0],not:Oe});break}case".":de.push(x.anyChar());break;case"(":{var Ke={type:S.GROUP,stack:[],remember:!0};M=xe[N],M==="?"&&(M=xe[N+1],N+=2,M==="="?Ke.followedBy=!0:M==="!"?Ke.notFollowedBy=!0:M!==":"&&f.error(k,`Invalid group, character '${M}' after '?' at column ${N-1}`),Ke.remember=!1),de.push(Ke),se.push(q),q=Ke,de=Ke.stack;break}case")":se.length===0&&f.error(k,`Unmatched ) at column ${N-1}`),q=se.pop(),de=q.options?q.options[q.options.length-1]:q.stack;break;case"|":{q.options||(q.options=[q.stack],delete q.stack);var ie=[];q.options.push(ie),de=ie;break}case"{":{var I=/^(\d+)(,(\d+)?)?\}/.exec(xe.slice(N)),C,z;I!==null?(de.length===0&&Ue(N),C=parseInt(I[1],10),z=I[2]?I[3]?parseInt(I[3],10):1/0:C,N+=I[0].length,de.push({type:S.REPETITION,min:C,max:z,value:de.pop()})):de.push({type:S.CHAR,value:123});break}case"?":de.length===0&&Ue(N),de.push({type:S.REPETITION,min:0,max:1,value:de.pop()});break;case"+":de.length===0&&Ue(N),de.push({type:S.REPETITION,min:1,max:1/0,value:de.pop()});break;case"*":de.length===0&&Ue(N),de.push({type:S.REPETITION,min:0,max:1/0,value:de.pop()});break;default:de.push({type:S.CHAR,value:M.charCodeAt(0)})}return se.length!==0&&f.error(k,"Unterminated group"),re},c.exports.types=S}}),tl=Pt({"node_modules/drange/lib/index.js"(l,c){var f=class Hn{constructor(v,k){this.low=v,this.high=k,this.length=1+k-v}overlaps(v){return!(this.high<v.low||this.low>v.high)}touches(v){return!(this.high+1<v.low||this.low-1>v.high)}add(v){return new Hn(Math.min(this.low,v.low),Math.max(this.high,v.high))}subtract(v){return v.low<=this.low&&v.high>=this.high?[]:v.low>this.low&&v.high<this.high?[new Hn(this.low,v.low-1),new Hn(v.high+1,this.high)]:v.low<=this.low?[new Hn(v.high+1,this.high)]:[new Hn(this.low,v.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},S=class Tr{constructor(v,k){this.ranges=[],this.length=0,v!=null&&this.add(v,k)}_update_length(){this.length=this.ranges.reduce((v,k)=>v+k.length,0)}add(v,k){var N=X=>{for(var M=0;M<this.ranges.length&&!X.touches(this.ranges[M]);)M++;for(var re=this.ranges.slice(0,M);M<this.ranges.length&&X.touches(this.ranges[M]);)X=X.add(this.ranges[M]),M++;re.push(X),this.ranges=re.concat(this.ranges.slice(M)),this._update_length()};return v instanceof Tr?v.ranges.forEach(N):(k==null&&(k=v),N(new f(v,k))),this}subtract(v,k){var N=X=>{for(var M=0;M<this.ranges.length&&!X.overlaps(this.ranges[M]);)M++;for(var re=this.ranges.slice(0,M);M<this.ranges.length&&X.overlaps(this.ranges[M]);)re=re.concat(this.ranges[M].subtract(X)),M++;this.ranges=re.concat(this.ranges.slice(M)),this._update_length()};return v instanceof Tr?v.ranges.forEach(N):(k==null&&(k=v),N(new f(v,k))),this}intersect(v,k){var N=[],X=M=>{for(var re=0;re<this.ranges.length&&!M.overlaps(this.ranges[re]);)re++;for(;re<this.ranges.length&&M.overlaps(this.ranges[re]);){var q=Math.max(this.ranges[re].low,M.low),de=Math.min(this.ranges[re].high,M.high);N.push(new f(q,de)),re++}};return v instanceof Tr?v.ranges.forEach(X):(k==null&&(k=v),X(new f(v,k))),this.ranges=N,this._update_length(),this}index(v){for(var k=0;k<this.ranges.length&&this.ranges[k].length<=v;)v-=this.ranges[k].length,k++;return this.ranges[k].low+v}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Tr(this)}numbers(){return this.ranges.reduce((v,k)=>{for(var N=k.low;N<=k.high;)v.push(N),N++;return v},[])}subranges(){return this.ranges.map(v=>({low:v.low,high:v.high,length:1+v.high-v.low}))}};c.exports=S}}),nl=Pt({"node_modules/randexp/lib/randexp.js"(l,c){var f=el(),S=tl(),x=f.types;c.exports=class kr{constructor(k,N){if(this._setDefaults(k),k instanceof RegExp)this.ignoreCase=k.ignoreCase,this.multiline=k.multiline,k=k.source;else if(typeof k=="string")this.ignoreCase=N&&N.indexOf("i")!==-1,this.multiline=N&&N.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=f(k)}_setDefaults(k){this.max=k.max!=null?k.max:kr.prototype.max!=null?kr.prototype.max:100,this.defaultRange=k.defaultRange?k.defaultRange:this.defaultRange.clone(),k.randInt&&(this.randInt=k.randInt)}gen(){return this._gen(this.tokens,[])}_gen(k,N){var X,M,re,q,de;switch(k.type){case x.ROOT:case x.GROUP:if(k.followedBy||k.notFollowedBy)return"";for(k.remember&&k.groupNumber===void 0&&(k.groupNumber=N.push(null)-1),X=k.options?this._randSelect(k.options):k.stack,M="",q=0,de=X.length;q<de;q++)M+=this._gen(X[q],N);return k.remember&&(N[k.groupNumber]=M),M;case x.POSITION:return"";case x.SET:{var se=this._expand(k);return se.length?String.fromCharCode(this._randSelect(se)):""}case x.REPETITION:for(re=this.randInt(k.min,k.max===1/0?k.min+this.max:k.max),M="",q=0;q<re;q++)M+=this._gen(k.value,N);return M;case x.REFERENCE:return N[k.value-1]||"";case x.CHAR:{var Ue=this.ignoreCase&&this._randBool()?this._toOtherCase(k.value):k.value;return String.fromCharCode(Ue)}}}_toOtherCase(k){return k+(97<=k&&k<=122?-32:65<=k&&k<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(k){return k instanceof S?k.index(this.randInt(0,k.length-1)):k[this.randInt(0,k.length-1)]}_expand(k){if(k.type===f.types.CHAR)return new S(k.value);if(k.type===f.types.RANGE)return new S(k.from,k.to);{let N=new S;for(let X=0;X<k.set.length;X++){let M=this._expand(k.set[X]);if(N.add(M),this.ignoreCase)for(let re=0;re<M.length;re++){let q=M.index(re),de=this._toOtherCase(q);q!==de&&N.add(de)}}return k.not?this.defaultRange.clone().subtract(N):this.defaultRange.clone().intersect(N)}}randInt(k,N){return k+Math.floor(Math.random()*(1+N-k))}get defaultRange(){return this._range=this._range||new S(32,126)}set defaultRange(k){this._range=k}static randexp(k,N){var X;return typeof k=="string"&&(k=new RegExp(k,N)),k._randexp===void 0?(X=new kr(k,N),k._randexp=X):(X=k._randexp,X._setDefaults(k)),X.gen()}static sugar(){RegExp.prototype.gen=function(){return kr.randexp(this)}}}}}),cr=Pt({"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:",x={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function v(ie){let I=[0],C=ie.indexOf(`
|
|
1
|
+
"use strict";var Ld=Object.create;var mr=Object.defineProperty;var Dd=Object.getOwnPropertyDescriptor;var Fd=Object.getOwnPropertyNames;var Ud=Object.getPrototypeOf,$d=Object.prototype.hasOwnProperty;var qd=(e,n,t)=>n in e?mr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var jd=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),Hl=(e,n)=>{for(var t in n)mr(e,t,{get:n[t],enumerable:!0})},Yl=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Fd(n))!$d.call(e,i)&&i!==t&&mr(e,i,{get:()=>n[i],enumerable:!(r=Dd(n,i))||r.enumerable});return e};var $t=(e,n,t)=>(t=e!=null?Ld(Ud(e)):{},Yl(n||!e||!e.__esModule?mr(t,"default",{value:e,enumerable:!0}):t,e)),Bd=e=>Yl(mr({},"__esModule",{value:!0}),e);var Ae=(e,n,t)=>qd(e,typeof n!="symbol"?n+"":n,t);var Hu=jd((UO,Wu)=>{"use strict";var ta=Object.prototype.hasOwnProperty,Vu=Object.prototype.toString,Uu=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,qu=function(n){return typeof Array.isArray=="function"?Array.isArray(n):Vu.call(n)==="[object Array]"},ju=function(n){if(!n||Vu.call(n)!=="[object Object]")return!1;var t=ta.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&ta.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i=="undefined"||ta.call(n,i)},Bu=function(n,t){Uu&&t.name==="__proto__"?Uu(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},zu=function(n,t){if(t==="__proto__")if(ta.call(n,t)){if($u)return $u(n,t).value}else return;return n[t]};Wu.exports=function e(){var n,t,r,i,o,a,s=arguments[0],u=1,p=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<p;++u)if(n=arguments[u],n!=null)for(t in n)r=zu(s,t),i=zu(n,t),s!==i&&(d&&i&&(ju(i)||(o=qu(i)))?(o?(o=!1,a=r&&qu(r)?r:[]):a=r&&ju(r)?r:{},Bu(s,{name:t,newValue:e(d,a,i)})):typeof i!="undefined"&&Bu(s,{name:t,newValue:i}));return s}});var nw={};Hl(nw,{Actions:()=>Ls,AgentDeliveryError:()=>hn,AgentEventEnum:()=>nr,Button:()=>Ds,Card:()=>Fs,CardLink:()=>Us,CardText:()=>$s,Client:()=>Yn,CronExpression:()=>Ya,Divider:()=>qs,NovuRequestHandler:()=>ga,Select:()=>js,SelectOption:()=>Bs,SeverityLevelEnum:()=>Ta,TextInput:()=>zs,agent:()=>Hs,providerSchemas:()=>ba,step:()=>sd,workflow:()=>od});module.exports=Bd(nw);var kc=require("jsonrepair");var gr=(i=>(i.TRIGGER="trigger",i.EXECUTE="execute",i.PREVIEW="preview",i.AGENT_EVENT="agent-event",i))(gr||{}),Qr=(r=>(r.DISCOVER="discover",r.HEALTH_CHECK="health-check",r.CODE="code",r))(Qr||{});var Ya=(ee=>(ee.EVERY_SECOND="* * * * * *",ee.EVERY_5_SECONDS="*/5 * * * * *",ee.EVERY_10_SECONDS="*/10 * * * * *",ee.EVERY_30_SECONDS="*/30 * * * * *",ee.EVERY_MINUTE="*/1 * * * *",ee.EVERY_5_MINUTES="0 */5 * * * *",ee.EVERY_10_MINUTES="0 */10 * * * *",ee.EVERY_30_MINUTES="0 */30 * * * *",ee.EVERY_HOUR="0 0-23/1 * * *",ee.EVERY_2_HOURS="0 0-23/2 * * *",ee.EVERY_3_HOURS="0 0-23/3 * * *",ee.EVERY_4_HOURS="0 0-23/4 * * *",ee.EVERY_5_HOURS="0 0-23/5 * * *",ee.EVERY_6_HOURS="0 0-23/6 * * *",ee.EVERY_7_HOURS="0 0-23/7 * * *",ee.EVERY_8_HOURS="0 0-23/8 * * *",ee.EVERY_9_HOURS="0 0-23/9 * * *",ee.EVERY_10_HOURS="0 0-23/10 * * *",ee.EVERY_11_HOURS="0 0-23/11 * * *",ee.EVERY_12_HOURS="0 0-23/12 * * *",ee.EVERY_DAY_AT_1AM="0 01 * * *",ee.EVERY_DAY_AT_2AM="0 02 * * *",ee.EVERY_DAY_AT_3AM="0 03 * * *",ee.EVERY_DAY_AT_4AM="0 04 * * *",ee.EVERY_DAY_AT_5AM="0 05 * * *",ee.EVERY_DAY_AT_6AM="0 06 * * *",ee.EVERY_DAY_AT_7AM="0 07 * * *",ee.EVERY_DAY_AT_8AM="0 08 * * *",ee.EVERY_DAY_AT_9AM="0 09 * * *",ee.EVERY_DAY_AT_10AM="0 10 * * *",ee.EVERY_DAY_AT_11AM="0 11 * * *",ee.EVERY_DAY_AT_NOON="0 12 * * *",ee.EVERY_DAY_AT_1PM="0 13 * * *",ee.EVERY_DAY_AT_2PM="0 14 * * *",ee.EVERY_DAY_AT_3PM="0 15 * * *",ee.EVERY_DAY_AT_4PM="0 16 * * *",ee.EVERY_DAY_AT_5PM="0 17 * * *",ee.EVERY_DAY_AT_6PM="0 18 * * *",ee.EVERY_DAY_AT_7PM="0 19 * * *",ee.EVERY_DAY_AT_8PM="0 20 * * *",ee.EVERY_DAY_AT_9PM="0 21 * * *",ee.EVERY_DAY_AT_10PM="0 22 * * *",ee.EVERY_DAY_AT_11PM="0 23 * * *",ee.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",ee.EVERY_WEEK="0 0 * * 0",ee.EVERY_WEEKDAY="0 0 * * 1-5",ee.EVERY_WEEKEND="0 0 * * 6,0",ee.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",ee.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",ee.EVERY_2ND_DAY_OF_MONTH_AT_10AM="0 10 2 * *",ee.EVERY_2ND_HOUR="0 */2 * * *",ee.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",ee.EVERY_2ND_MONTH="0 0 1 */2 *",ee.EVERY_QUARTER="0 0 1 */3 *",ee.EVERY_6_MONTHS="0 0 1 */6 *",ee.EVERY_YEAR="0 0 1 0 *",ee.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",ee.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",ee.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",ee.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",ee.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5",ee))(Ya||{});var qt=(Se=>(Se.BRIDGE_ERROR="BridgeError",Se.EXECUTION_EVENT_CONTROL_INVALID_ERROR="ExecutionEventControlInvalidError",Se.EXECUTION_EVENT_PAYLOAD_INVALID_ERROR="ExecutionEventPayloadInvalidError",Se.EXECUTION_PROVIDER_OUTPUT_INVALID_ERROR="ExecutionProviderOutputInvalidError",Se.EXECUTION_STATE_CONTROL_INVALID_ERROR="ExecutionStateControlInvalidError",Se.EXECUTION_STATE_CORRUPT_ERROR="ExecutionStateCorruptError",Se.EXECUTION_STATE_OUTPUT_INVALID_ERROR="ExecutionStateOutputInvalidError",Se.EXECUTION_STATE_RESULT_INVALID_ERROR="ExecutionStateResultInvalidError",Se.INVALID_ACTION_ERROR="InvalidActionError",Se.METHOD_NOT_ALLOWED_ERROR="MethodNotAllowedError",Se.MISSING_DEPENDENCY_ERROR="MissingDependencyError",Se.MISSING_SECRET_KEY_ERROR="MissingSecretKeyError",Se.PROVIDER_EXECUTION_FAILED_ERROR="ProviderExecutionFailedError",Se.PROVIDER_NOT_FOUND_ERROR="ProviderNotFoundError",Se.SIGNATURE_EXPIRED_ERROR="SignatureExpiredError",Se.SIGNATURE_INVALID_ERROR="SignatureInvalidError",Se.SIGNATURE_MISMATCH_ERROR="SignatureMismatchError",Se.SIGNATURE_NOT_FOUND_ERROR="SignatureNotFoundError",Se.SIGNATURE_VERSION_INVALID_ERROR="SignatureVersionInvalidError",Se.SIGNING_KEY_NOT_FOUND_ERROR="SigningKeyNotFoundError",Se.STEP_ALREADY_EXISTS_ERROR="StepAlreadyExistsError",Se.STEP_CONTROL_COMPILATION_FAILED_ERROR="StepControlCompilationFailedError",Se.STEP_EXECUTION_FAILED_ERROR="StepExecutionFailedError",Se.STEP_NOT_FOUND_ERROR="StepNotFoundError",Se.WORKFLOW_ALREADY_EXISTS_ERROR="WorkflowAlreadyExistsError",Se.WORKFLOW_NOT_FOUND_ERROR="WorkflowNotFoundError",Se.WORKFLOW_PAYLOAD_INVALID_ERROR="WorkflowPayloadInvalidError",Se))(qt||{});var Zr=(r=>(r.POST="POST",r.GET="GET",r.OPTIONS="OPTIONS",r))(Zr||{});var zd=e=>{var t,r;if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(r=(t=n==null?void 0:n.constructor)==null?void 0:t.name.endsWith("Error"))!=null?r:!1},on=class extends Error{},ei=class extends on{constructor(){super(...arguments);this.statusCode=404}},vt=class extends on{constructor(){super(...arguments);this.statusCode=400}},gn=class extends on{constructor(){super(...arguments);this.statusCode=401}},yn=class extends on{constructor(n,{cause:t}={}){var r;zd(t)?(super(`${n}: ${t.message}`),this.data={stack:(r=t.stack)!=null?r:n}):(super(`${n}${t?`: ${JSON.stringify(t,null,2)}`:""}`),this.data={stack:n})}},ti=class extends on{constructor(){super(...arguments);this.statusCode=409}};var zn=class extends yn{constructor(t){super("Unknown BridgeError",{cause:t});this.statusCode=500;this.code="BridgeError"}};var ni=class extends vt{constructor(t,r){super(`Workflow with id: \`${t}\` has a corrupt state. Step with id: \`${r}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:t,stepId:r}}},br=class extends vt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=r}},ri=class extends vt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=r}},ii=class extends vt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=i}},ai=class extends vt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=i}},oi=class extends vt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=i}},si=class extends vt{constructor(t,r,i){super(`Workflow with id: \`${t}\` has invalid controls syntax in step with id: \`${r}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=i}},li=class extends vt{constructor(t,r,i,o){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${r}\` and provider with id: \`${i}\` has invalid output. Please provide the correct provider output.`);this.code="ExecutionProviderOutputInvalidError";this.data=o}},ci=class extends vt{constructor(t,r){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=r}};var On=e=>Object.values(qt).includes(e==null?void 0:e.code),Jl=e=>!On(e)&&typeof e.statusCode=="number"&&e.statusCode>=400&&e.statusCode<500;var Ja=e=>Object.values(e).map(n=>`\`${n}\``).join(", "),ui=e=>e.replaceAll(/(\w)(\w*)/g,(n,t,r)=>t.toUpperCase()+r.toLowerCase()).replaceAll(/[\s-]+/g,"");var pi=class extends on{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${Ja(Zr)}`}},Vn=class extends vt{constructor(t,r){super(`Invalid query string: \`action\`=\`${t}\`. Please use one of ${Ja(r)}`);this.code="InvalidActionError"}},di=class extends vt{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(n,t,r){super(),this.data={message:r},this.statusCode=n,this.code=t}};var wr=class extends ti{constructor(n,t){super(`${ui(n)} with id: \`${t}\` already exists. Please use a different id.`)}},bn=class extends ei{constructor(n,t){super(`${ui(n)} with id: \`${t}\` does not exist. Please provide a valid id.`)}},Wn=class extends yn{constructor(t,r,i,o){super(`Failed to ${i} ${ui(t)} with id: \`${r}\``,{cause:o});this.statusCode=502}};var fi=class extends bn{constructor(t){super("provider",t);this.code="ProviderNotFoundError"}},mi=class extends Wn{constructor(t,r,i){super("provider",t,r,i);this.code="ProviderExecutionFailedError"}};var gi=class extends gn{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"}},yi=class extends gn{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},bi=class extends gn{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},wi=class extends gn{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},Si=class extends gn{constructor(){super("Signature key not found. Please provide a valid key in the Client constructor `config.secretKey`");this.code="SigningKeyNotFoundError"}};var xi=class extends bn{constructor(t){super("step",t);this.code="StepNotFoundError"}},Ti=class extends wr{constructor(t){super("step",t);this.code="StepAlreadyExistsError"}},Sr=class extends Wn{constructor(t,r,i){super("step",t,r,i);this.code="StepExecutionFailedError"}};var xr=class extends bn{constructor(t){super("workflow",t);this.code="WorkflowNotFoundError"}};var ki=(()=>{var e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(l,c)=>function(){return l&&(c=(0,l[t(l)[0]])(l=0)),c},o=(l,c)=>function(){return c||(0,l[t(l)[0]])((c={exports:{}}).exports,c),c.exports},a=(l,c)=>{for(var f in c)e(l,f,{get:c[f],enumerable:!0})},s=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let x of t(c))!r.call(l,x)&&x!==f&&e(l,x,{get:()=>c[x],enumerable:!(S=n(c,x))||S.enumerable});return l},u=l=>s(e({},"__esModule",{value:!0}),l),p={};a(p,{JSONSchemaFaker:()=>Vl,default:()=>Wl,setDependencies:()=>al});function d(l,c){return typeof l=="string"?typeof c!="undefined"?ur.register(l,c):ur.get(l):ur.registerMany(l)}function h(l,c){return l=typeof l=="undefined"?Ht.MIN_INTEGER:l,c=typeof c=="undefined"?Ht.MAX_INTEGER:c,Math.floor(Ee("random")()*(c-l+1))+l}function y(l){return Wr.default.prototype.max=Ee("defaultRandExpMax"),Wr.default.prototype.randInt=(f,S)=>f+Math.floor(Ee("random")()*(1+(S-f))),new Wr.default(l).gen()}function g(l){return l[Math.floor(Ee("random")()*l.length)]}function P(l){let c,f,S=l.length,x=l.slice();for(;S>0;)f=Math.floor(Ee("random")()*S),S-=1,c=x[S],x[S]=x[f],x[f]=c;return x}function Z(l,c){return Ee("random")()*(c-l)+l}function Q(l,c,f,S,x=!1){return f=typeof f=="undefined"?Ht.MIN_NUMBER:f,S=typeof S=="undefined"?Ht.MAX_NUMBER:S,l=typeof l=="undefined"?f:l,c=typeof c=="undefined"?S:c,c<l&&(c+=l),x?Z(l,c):h(l,c)}function j(l){switch(l){case"seconds":return Q(0,60)*60;case"minutes":return Q(15,50)*612;case"hours":return Q(12,72)*36123;case"days":return Q(7,30)*86412345;case"weeks":return Q(4,52)*604812345;case"months":return Q(2,13)*2592012345;case"years":return Q(1,20)*31104012345;default:break}}function pe(l){if(l)return j(l);let c=Ee("minDateTime"),f=Ee("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(Z(c.getTime(),f.getTime()))}function te(l,c,f){if(c=decodeURIComponent(c),f&&f[c])return Se(f[c]);let S=c.replace("#/","/").split("/"),x=l.$ref&&f&&f[l.$ref]||l;for(!x&&!S[0]&&(S[0]=l.$ref.split("#/")[0]),f&&c.includes("#/")&&f[S[0]]&&(x=f[S.shift()]),S[0]||S.shift();x&&S.length>0;){let v=S.shift();if(!x[v])throw new Error(`Prop not found: ${v} (${c})`);x=x[v]}return x}function Te(l){return typeof l=="string"&&ml.test(l)}function Oe(l){return["number","boolean"].includes(typeof l)}function U(l,...c){return c.filter(f=>typeof l[f]!="undefined").length>0}function Fe(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 Ge(l){if(l.includes(" "))return new Date(l).toISOString().substr(0,10);let[c,f]=l.split("T"),[S,x,v]=c.split("-"),[k,N,X]=f.substr(0,8).split(":");return x=`0${Math.max(1,Math.min(12,x))}`.slice(-2),v=`0${Math.max(1,Math.min(31,v))}`.slice(-2),k=`0${Math.max(1,Math.min(23,k))}`.slice(-2),N=`0${Math.max(1,Math.min(59,N))}`.slice(-2),X=`0${Math.max(1,Math.min(59,X))}`.slice(-2),`${S}-${x}-${v}T${k}:${N}:${X}.000Z`}function qe(l,c,f){let S={};switch(l||c.type){case"integer":case"number":if(typeof c.minimum!="undefined"&&(S.minimum=c.minimum),typeof c.maximum!="undefined"&&(S.maximum=c.maximum),c.enum){let v=Math.max(S.minimum||0,0),k=Math.min(S.maximum||1/0,1/0);c.exclusiveMinimum&&v===c.minimum&&(v+=c.multipleOf||1),c.exclusiveMaximum&&k===c.maximum&&(k-=c.multipleOf||1),(v||k!==1/0)&&(c.enum=c.enum.filter(N=>N>=v&&N<=k))}break;case"string":{S.minLength=Ee("minLength")||0,S.maxLength=Ee("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 x=f(S);if(x==null)return null;switch(l||c.type){case"number":x=Te(x)?parseFloat(x):x;break;case"integer":x=Te(x)?parseInt(x,10):x;break;case"boolean":x=!!x;break;case"string":{if(Oe(x))return x;x=String(x);let v=Math.max(S.minLength||0,0),k=Math.min(S.maxLength||1/0,1/0),N,X=0;for(;x.length<v;)if(N=x,c.pattern?x+=ke.randexp(c.pattern):x+=`${ke.pick([" ","/","_","-","+","=","@","^"])}${x}`,x===N){if(X+=1,X===3)break}else X=0;switch(x.length>k&&(x=x.substr(0,k)),c.format){case"date-time":case"datetime":x=new Date(Ge(x)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":x=new Date(Fe(x)).toISOString().substr(0,10);break;case"time":x=new Date(`1969-01-01 ${x}`).toISOString().substr(11);break;default:break}break}default:break}return x}function F(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,x)=>{l.type==="array"&&c.type==="array"?l[f][x]=F(l[f][x]||{},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]=F({},c[f]):l[f]=F(l[f],c[f])}),l}function Se(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(x=>Se(x,c))),S}let f={};return c.set(l,f),Object.keys(l).reduce((S,x)=>(S[x]=Se(l[x],c),S),f)}function je(l){let c=JSON.stringify(l),f=JSON.stringify(l,null,2);return c.length>400?`${f.substr(0,400)}...`:f}function ge(){return ke.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 Pe(l,c){let f=F({},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=ke.pick(Ht.SCALAR_TYPES.filter(S=>(Array.isArray(l.type)?l.type:[l.type]).every(v=>S==="number"||S==="integer"?v!=="number"&&v!=="integer":S!==v)));else if(l.enum){let S;do S=ge();while(l.enum.indexOf(S)!==-1);f.enum=[S]}return l.required&&f.properties&&l.required.forEach(S=>{delete f.properties[S]}),f}function Ze(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 ot(l,c){return!c.every(f=>Ze(l,f))}function Rt(l,c){return c.reduce((S,x)=>S+(Ze(l,x)?1:0),0)===1}function Lt(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?F({},l[S]):l[S],f),{})}function xt(l,c){return Array.isArray(l)?l.map(f=>xt(f,c)):(typeof l=="string"&&(l=l.replace(/#\{([\w.-]+)\}/g,(f,S)=>c[S])),l)}function It(l){return Object.prototype.toString.call(l)==="[object Object]"&&!Object.keys(l).length}function _(l,c){c=c.items||c;let f=Ee("alwaysFakeOptionals"),S=Array.isArray(c.required)&&c.required.includes(l)||f,x=typeof c.thunk=="function"||c.additionalProperties&&typeof c.additionalProperties.thunk=="function";return!S&&!x}function gt(l,c,f=!1){if(!l||typeof l!="object")return l;if(Array.isArray(l))return l.map(S=>gt(S,c,!0)).filter(S=>typeof S!="undefined");if(Object.keys(l).forEach(S=>{if(It(l[S]))_(S,c)&&delete l[S];else{let x=c;c&&c.properties&&c.properties[S]&&(x=c.properties[S]);let v=gt(l[S],x);It(v)||(l[S]=v)}typeof l[S]=="undefined"&&delete l[S]}),!(!Object.keys(l).length&&f))return l}function Xt(l){return(c,f,S,x)=>{let v=c,k=[];typeof c=="object"&&(v=Object.keys(c)[0],Array.isArray(c[v])?k=c[v]:k.push(c[v]));let N=v.split("."),X=l();for(;N.length>1;)X=X[N.shift()];return c=typeof X=="object"?X[N[0]]:X,typeof c=="function"&&(c=c.apply(X,k.map(M=>We.template(M,x)))),Object.prototype.toString.call(c)==="[object Object]"&&Object.keys(c).forEach(M=>{if(typeof c[M]=="function")throw new Error(`Cannot resolve value for '${S}: ${v}', given: ${c}`)}),c}}function ar(l,c){if(typeof l=="undefined")return Bn.list();if(typeof l=="string")if(typeof c=="function")Bn.register(l,c);else if(c===null||c===!1)Bn.unregister(l);else return Bn.get(l);else Bn.registerMany(l)}function jn(l,c,f){return Object.keys(l).filter(S=>{let x=wl.indexOf(c)>-1;return f.indexOf(S)>-1&&!x}).length>0}function ct(l,c){let f=Object.keys(pr);for(let S=0;S<f.length;S+=1){let x=f[S],v=c[c.length-1];if(jn(l,v,pr[x]))return x}}function En(){return Ee("random")()>.5}function Bt(){return null}function Qt(l,c,f,S,x,v){let k=[],N=[];function X(re){let q=JSON.stringify(re.value);return N.indexOf(q)===-1?(N.push(q),k.push(re),!0):!1}c.forEach(X);let M=100;for(;k.length!==c.length&&(X(v(f.items||S,l,x))||(M-=1),!!M););return k}function fn(l,c,f,S){let x=[];if(!(l.items||l.additionalItems)){if(We.hasProperties(l,"minItems","maxItems","uniqueItems")&&(l.minItems!==0||l.maxItems!==0))throw new Hr(`missing items for ${We.short(l)}`,c);return x}if(Array.isArray(l.items))return l.items.map((se,Ue)=>{let xe=c.concat(["items",Ue]);return S(se,xe,f)});let v=l.minItems,k=l.maxItems,N=Ee("minItems"),X=Ee("maxItems");N&&(v=typeof v=="undefined"?N:Math.min(N,v)),X&&(k=typeof k=="undefined"?X:Math.min(X,k),k&&k>X&&(k=X),v&&v>X&&(v=k));let M=Ee("alwaysFakeOptionals")===!0?1:Ee("optionalsProbability"),re=Ee("alwaysFakeOptionals")||Ee("fixedProbabilities")||!1,q=ke.number(v,k,1,5);M!==null&&(q=Math.max(re?Math.round((k||q)*M):Math.abs(ke.number(v,k)*M),v||0));let de=typeof l.additionalItems=="object"?l.additionalItems:{};for(let se=x.length;se<q;se+=1){let Ue=c.concat(["items",se]),xe=S(l.items||de,Ue,f);x.push(xe)}if(l.contains&&q>0){let se=ke.number(0,q-1);x[se]=S(l.contains,c.concat(["items",se]),f)}return l.uniqueItems?Qt(c.concat(["items"]),x,l,de,f,S):x}function or(l){let c=typeof l.minimum=="undefined"||l.minimum===-Number.MAX_VALUE?Ht.MIN_INTEGER:l.minimum,f=typeof l.maximum=="undefined"||l.maximum===Number.MAX_VALUE?Ht.MAX_INTEGER:l.maximum,S=l.multipleOf,x=S&&String(S).match(/e-(\d)|\.(\d+)$/);if(x){let v=(Math.random()*ke.number(0,10)+1)*S,k=x[1]||x[2].length,N=parseFloat(v.toFixed(k)),X=ke.number(c,f-1);return String(N).includes(".")?X+N:(X+N).toExponential()}if(S&&(f=Math.floor(f/S)*S,c=Math.ceil(c/S)*S),l.exclusiveMinimum&&c===l.minimum&&(c+=S||1),l.exclusiveMaximum&&f===l.maximum&&(f-=S||1),c>f)return NaN;if(S){let v=ke.number(Math.floor(c/S),Math.floor(f/S))*S;for(;v<c;)v+=S;return v}return ke.number(c,f,void 0,void 0,l.type!=="integer")}function va(l){return Math.floor(Ba({...l}))}function qr(l){return ke.shuffle(Rl).slice(0,l)}function jr(l,c,f,S){let x={},v=l.properties||{},k=l.patternProperties||{},N=typeof l.required=="boolean"?[]:(l.required||[]).slice(),X=l.additionalProperties!==!1,M=Object.keys(v),re=Object.keys(k),q=M.concat(re).reduce((ae,E)=>(N.indexOf(E)===-1&&ae.push(E),ae),[]),de=N.concat(q),se=X&&l.additionalProperties===!0?Jr:l.additionalProperties;if(!X&&M.length===0&&re.length===0&&We.hasProperties(l,"minProperties","maxProperties","dependencies","required"))return null;if(Ee("requiredOnly")===!0)return N.forEach(ae=>{v[ae]&&(x[ae]=v[ae])}),S(x,c.concat(["properties"]),f,l);let Ue=Ee("alwaysFakeOptionals")===!0?1:Ee("optionalsProbability"),xe=Ee("alwaysFakeOptionals")||Ee("fixedProbabilities")||!1,_e=Ee("ignoreProperties")||[],Ye=Ee("reuseProperties"),Ke=Ee("fillProperties"),ie=l.maxProperties||de.length+(X?ke.number(1,5):0),I=Math.max(l.minProperties||0,N.length),C=Math.max(0,de.length-I);de.length===1&&!N.length&&(I=Math.max(ke.number(Ke?1:0,ie),I)),Ue!==null&&(xe===!0?C=Math.round(I-N.length+Ue*(de.length-I)):C=ke.number(I-N.length,Ue*(de.length-I)));let z=ke.shuffle(q).slice(0,C),W=q.filter(ae=>z.indexOf(ae)!==-1),G=Ue!==null||N.length===ie?ie:ke.number(0,ie),B=N.concat(ke.shuffle(W).slice(0,G)).slice(0,ie),H=[],J=[];if(l.dependencies&&(Object.keys(l.dependencies).forEach(ae=>{let E=l.dependencies[ae];if(B.indexOf(ae)!==-1)if(Array.isArray(E))E.forEach(Y=>{B.indexOf(Y)===-1&&B.push(Y)});else if(Array.isArray(E.oneOf||E.anyOf)){let Y=E.oneOf||E.anyOf;J.push({prop:ae,values:Y})}else H.push(E)}),H.length))return delete l.dependencies,S({allOf:H.concat(l)},c.concat(["properties"]),f,l);let le=[],he=[];B.forEach(ae=>{if(v[ae]&&["{}","true"].includes(JSON.stringify(v[ae].not)))return;for(let Y=0;Y<_e.length;Y+=1)if(_e[Y]instanceof RegExp&&_e[Y].test(ae)||typeof _e[Y]=="string"&&_e[Y]===ae||typeof _e[Y]=="function"&&_e[Y](v[ae],ae)){le.push(ae);return}se===!1&&N.indexOf(ae)!==-1&&(x[ae]=v[ae]),v[ae]&&(x[ae]=v[ae]);let E;if(re.forEach(Y=>{ae.match(new RegExp(Y))&&(E=!0,x[ae]?We.merge(x[ae],k[Y]):x[ke.randexp(ae)]=k[Y])}),!E){let Y=k[ae]||se;Y&&se!==!1?x[k[ae]?ke.randexp(ae):ae]=v[ae]||Y:he.push(ae)}});let ve=Object.keys(x).length+(Ke?0:le.length),nt=ae=>ke.randexp(`_?[_a-f\\d]{1,3}${ae?"\\$?":""}`);function rt(ae){let E;do{if(!ae.length)break;E=ae.shift()}while(x[E]);return E}let at=I;if(X&&!N.length&&(at=Math.max(Ue===null||se?ke.number(Ke?1:0,ie):0,I)),!W.length&&!C&&X&&xe===!0&&Ke){let ae=ke.number(0,ie);for(let E=0;E<ae;E+=1)x[Yr(1)+nt(ae[E])]=se||Jr}for(;Ke&&!(!(re.length||X)||ve>=at);){if(X)if(Ye&&M.length-ve>at){let ae=0,E;do{if(ae+=1,ae>1e3)break;E=rt(N)||ke.pick(M)}while(typeof x[E]!="undefined");typeof x[E]=="undefined"&&(x[E]=v[E],ve+=1)}else if(re.length&&!se){let ae=ke.pick(re),E=ke.randexp(ae);x[E]||(x[E]=k[ae],ve+=1)}else{let ae=rt(N)||Yr(1)+nt();x[ae]||(x[ae]=se||Jr,ve+=1)}for(let ae=0;ve<I&&ae<re.length;ae+=1){let E=re[ae],Y=ke.randexp(E);x[Y]||(x[Y]=k[E],ve+=1)}}if(N.length===0&&(!X||Ue===!1)){let ae=ke.number(I,ie);for(;ve<ae;){let E=rt(M);E&&(x[E]=v[E]),ve+=1}}let dt=x;if(Ee("sortProperties")!==null){let ae=Object.keys(v);dt=Object.keys(x).sort((Y,fe)=>Ee("sortProperties")?Y.localeCompare(fe):ae.indexOf(Y)-ae.indexOf(fe)).reduce((Y,fe)=>(Y[fe]=x[fe],Y),{})}let bt=S(dt,c.concat(["properties"]),f,l);return J.forEach(ae=>{for(let E of ae.values)if(We.hasValue(E.properties[ae.prop],bt.value[ae.prop])){Object.keys(E.properties).forEach(Y=>{Y!==ae.prop&&We.merge(bt.value,S(E.properties,c.concat(["properties"]),f,l).value)});break}}),bt}function sr(){let l=ke.number(1,5);return Yr(l).join(" ")}function Aa(l=0,c=140){let f=Math.max(0,l),S=ke.number(f,c),x=sr();for(;x.length<f;)x+=sr();return x.length>S&&(x=x.substr(0,S)),x}function Br(){return[0,0,0,0].map(()=>ke.number(0,255)).join(".")}function zr(){return ke.date().toISOString()}function Ea(){return Gr().slice(0,10)}function _a(){return Gr().slice(11)}function Oa(l){return ke.randexp(Ft[l]).replace(Ll,(c,f)=>ke.randexp(Ft[f]))}function Ra(l,c){let f=ja(l.format);if(typeof f=="function")return f(l);switch(l.format){case"date-time":case"datetime":return Gr();case"date":return Pl();case"time":return Ml();case"ipv4":return Cl();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 Dl(l.format);default:if(typeof f=="undefined"){if(Ee("failOnInvalidFormat"))throw new Error(`unknown registry key ${We.short(l.format)}`);return c()}throw new Error(`unsupported format '${l.format}'`)}}function Ia(l){return We.typecast("string",l,f=>l.format?Ra(l,()=>za(f.minLength,f.maxLength)):l.pattern?ke.randexp(l.pattern):za(f.minLength,f.maxLength))}function $({$comment:l,title:c,description:f}){return Object.entries({comment:l,title:c,description:f}).filter(([,S])=>S).reduce((S,[x,v])=>(S[x]=v,S),{})}function ne(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 x={...$(l),schemaPath:c};if(c[c.length-1]!=="properties"){if(Ee("useExamplesValue")&&Array.isArray(l.examples)){let M=l.examples.concat("default"in l?[l.default]:[]);return{value:We.typecast(null,l,()=>ke.pick(M)),context:x}}if(Ee("useExamplesValue")&&typeof l.example!="undefined")return{value:We.typecast(null,l,()=>l.example),context:x};if(Ee("useDefaultValue")&&"default"in l&&(l.default!==""||!Ee("replaceEmptyByRandomValue")))return{value:l.default,context:x};if("template"in l)return{value:We.template(l.template,S),context:x};if("const"in l)return{value:l.const,context:x}}if(l.not&&typeof l.not=="object"&&(l=We.notValue(l.not,We.omitProps(l,["not"])),l.type&&l.type==="object")){let{value:M,context:re}=ne(l,c.concat(["not"]),f,S);return{value:We.clean(M,l,!1),context:{...x,items:re}}}if(typeof l.thunk=="function"){let{value:M,context:re}=ne(l.thunk(S),c,f);return{value:M,context:{...x,items:re}}}if(l.jsonPath)return{value:l,context:x};let v=l.type;if(Array.isArray(v)?v=ke.pick(v):typeof v=="undefined"&&(v=Sl(l,c)||v,v&&(l.type=v)),typeof l.generate=="function"){let M=We.typecast(null,l,()=>l.generate(S,c)),re=M===null?"null":typeof M;if(re===v||re==="number"&&v==="integer"||Array.isArray(M)&&v==="array")return{value:M,context:x}}if(typeof l.pattern=="string")return{value:We.typecast("string",l,()=>ke.randexp(l.pattern)),context:x};if(Array.isArray(l.enum))return{value:We.typecast(null,l,()=>ke.pick(l.enum)),context:x};if(typeof v=="string")if(dr[v])try{let M=dr[v](l,c,f,ne);return v==="array"?{value:M.map(({value:re})=>re),context:{...x,items:M.map(Array.isArray(l.items)?({context:re})=>re:({context:re})=>({...re,schemaPath:re.schemaPath.slice(0,-1)}))}}:v==="object"?M!==null?{value:M.value,context:{...x,items:M.context}}:{value:{},context:x}:{value:M,context:x}}catch(M){throw typeof M.path=="undefined"?new Hr(M.stack,c):M}else{if(Ee("failOnInvalidTypes"))throw new Hr(`unknown primitive ${We.short(v)}`,c.concat(["type"]));{let M=Ee("defaultInvalidTypeProduct");return typeof M=="string"&&dr[M]?{value:dr[M](l,c,f,ne),context:x}:{value:M,context:x}}}let k={},N={...x};Array.isArray(l)&&(k=[]);let X=Ee("pruneProperties")||[];return Object.keys(l).forEach(M=>{if(!X.includes(M)&&l[M]!==null)if(typeof l[M]=="object"&&M!=="definitions"){let{value:re,context:q}=ne(l[M],c.concat([M]),f,k);k[M]=We.clean(re,l[M],!1),N[M]=q,k[M]===null&&Ee("omitNulls")&&(delete k[M],delete N[M])}else k[M]=l[M]}),{value:k,context:N}}function Re(l){return Array.isArray(l)?ke.pick(l):l}function Le(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 ze(l,c,f,S){if(!l||typeof l!="object")return l;if(f||(f={}),c||(c=l),Array.isArray(l))return l.map(x=>ze(x,c,f,S));if(l.jsonPath){let{JSONPath:x}=Da(),v=typeof l.jsonPath!="object"?{path:l.jsonPath}:l.jsonPath;v.group=l.group||v.group||S,v.cycle=l.cycle||v.cycle||!1,v.reverse=l.reverse||v.reverse||!1,v.count=l.count||v.count||1;let k=`${v.group}__${v.path}`;return f[k]||(v.count>1?f[k]=x(v.path,c).slice(0,v.count):f[k]=x(v.path,c)),v.cycle||v.reverse?Le(f[k],v.reverse):Re(f[k])}return Object.keys(l).forEach(x=>{l[x]=ze(l[x],c,f,x)}),l}function Ct(l,c,f,S){if(Object.prototype.toString.call(c)!=="[object Object]")throw new Error(`Invalid input, expecting object but given ${typeof c}`);let x=Ee("refDepthMin")||0,v=Ee("refDepthMax")||3;try{let{resolveSchema:k}=jl({refs:l,schema:c,container:f,synchronous:S,refDepthMin:x,refDepthMax:v}),N=$l(We.clone(c),[],k);return Ee("resolveJsonPath")?{value:ze(N.value),context:N.context}:N}catch(k){throw k.path?new Error(`${k.message} in /${k.path.join("/")}`):k}}function Zt(l){return l.value}function zt(l,c){return c.reduce((f,S)=>S in f?f[S]:{},l)}function en(l,c,f,S=f){let{title:x,description:v,comment:k}=zt(l,c),N=[];Ee("renderTitle")&&x&&N.push(` ${x}`,""),Ee("renderDescription")&&v&&N.push(` ${v}`),Ee("renderComment")&&k&&N.push(` ${k}`),f.commentBefore=N.join(`
|
|
2
|
+
`),S instanceof Bl?S.items.forEach(X=>{en(l,[...c,"items",X.key.value],X.key,X.value)}):S instanceof zl&&S.items.forEach((X,M)=>{en(l,[...c,"items",M],X)})}function _n({value:l,context:c}){let f=hr.createNode(l);en(c,[],f);let S=new hr.Document;return S.contents=f,S.toString()}function yt(){nn.define("autoIncrement",function(c,f){if(!this.offset){let S=f.minimum||1,x=S+Ht.MAX_NUMBER,v=c.initialOffset||f.initialOffset;this.offset=v||ke.number(S,x)}return c?this.offset++:f}),nn.define("sequentialDate",function(c,f){if(this.now||(this.now=ke.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 ${We.short(c)}`);this.now.setTime(this.now.getTime()+ke.date(c))}return f})}function tn(l,c){let f={};Array.isArray(l)?l.forEach(x=>{f[x.$id||x.id]=x}):f=l||{};function S(x){if(!x||typeof x!="object")return;if(Array.isArray(x))return x.forEach(S);let v=x.$id||x.id;typeof v=="string"&&!f[v]&&(f[v]=x),Object.keys(x).forEach(k=>{S(x[k])})}return S(l),S(c),f}var Dt,Ca,Js,Pa,Gs,Ks,Pt,Xs,Ma,lr,ee,Qs,Zs,el,tl,nl,cr,Vr,Na,rl,il,La,Da,al,ol,Fa,Ve,Ua,sl,ll,ur,Ee,$a,qa,cl,ul,pl,dl,hl,fl,Ht,Wr,ke,ml,We,gl,yl,Bn,ja,bl,Hr,pr,wl,Sl,xl,Tl,kl,vl,Al,El,_l,Ba,Ol,Rl,Yr,Jr,Il,za,Cl,Gr,Pl,Ml,Va,Kr,Nl,Ft,Ll,Dl,Fl,Ul,dr,$l,ql,jl,Wa,Ha,Tt,ld,cd,ud,pd,dd,hd,fd,md,gd,yd,bd,wd,Bl,zl,hr,nn,tt,Vl,Wl,Sd=i({"src/shared.js"(){Dt=Object.create,Ca=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Pa=Object.getOwnPropertyNames,Gs=Object.getPrototypeOf,Ks=Object.prototype.hasOwnProperty,Pt=(l,c)=>function(){return c||(0,l[Pa(l)[0]])((c={exports:{}}).exports,c),c.exports},Xs=(l,c,f,S)=>{if(c&&typeof c=="object"||typeof c=="function")for(let x of Pa(c))!Ks.call(l,x)&&x!==f&&Ca(l,x,{get:()=>c[x],enumerable:!(S=Js(c,x))||S.enumerable});return l},Ma=(l,c,f)=>(f=l!=null?Dt(Gs(l)):{},Xs(c||!l||!l.__esModule?Ca(f,"default",{value:l,enumerable:!0}):f,l)),lr=Pt({"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}}}),ee=Pt({"node_modules/ret/lib/sets.js"(l){var c=lr(),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()),x=()=>[{type:c.CHAR,value:9},{type:c.CHAR,value:10},{type:c.CHAR,value:11},{type:c.CHAR,value:12},{type:c.CHAR,value:13},{type:c.CHAR,value:32},{type:c.CHAR,value:160},{type:c.CHAR,value:5760},{type:c.RANGE,from:8192,to:8202},{type:c.CHAR,value:8232},{type:c.CHAR,value:8233},{type:c.CHAR,value:8239},{type:c.CHAR,value:8287},{type:c.CHAR,value:12288},{type:c.CHAR,value:65279}],v=()=>[{type:c.CHAR,value:10},{type:c.CHAR,value:13},{type:c.CHAR,value:8232},{type:c.CHAR,value:8233}];l.words=()=>({type:c.SET,set:S(),not:!1}),l.notWords=()=>({type:c.SET,set:S(),not:!0}),l.ints=()=>({type:c.SET,set:f(),not:!1}),l.notInts=()=>({type:c.SET,set:f(),not:!0}),l.whitespace=()=>({type:c.SET,set:x(),not:!1}),l.notWhitespace=()=>({type:c.SET,set:x(),not:!0}),l.anyChar=()=>({type:c.SET,set:v(),not:!0})}}),Qs=Pt({"node_modules/ret/lib/util.js"(l){var c=lr(),f=ee(),S="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",x={0:0,t:9,n:10,v:11,f:12,r:13};l.strToChars=v=>{var k=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return v=v.replace(k,(N,X,M,re,q,de,se,Ue)=>{if(M)return N;var xe=X?8:re?parseInt(re,16):q?parseInt(q,16):de?parseInt(de,8):se?S.indexOf(se):x[Ue],_e=String.fromCharCode(xe);return/[[\]{}^$.|?*+()]/.test(_e)&&(_e="\\"+_e),_e}),v},l.tokenizeClass=(v,k)=>{for(var N=[],X=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,M,re;(M=X.exec(v))!=null;)if(M[1])N.push(f.words());else if(M[2])N.push(f.ints());else if(M[3])N.push(f.whitespace());else if(M[4])N.push(f.notWords());else if(M[5])N.push(f.notInts());else if(M[6])N.push(f.notWhitespace());else if(M[7])N.push({type:c.RANGE,from:(M[8]||M[9]).charCodeAt(0),to:M[10].charCodeAt(0)});else if(re=M[12])N.push({type:c.CHAR,value:re.charCodeAt(0)});else return[N,X.lastIndex];l.error(k,"Unterminated character class")},l.error=(v,k)=>{throw new SyntaxError("Invalid regular expression: /"+v+"/: "+k)}}}),Zs=Pt({"node_modules/ret/lib/positions.js"(l){var c=lr();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:"$"})}}),el=Pt({"node_modules/ret/lib/index.js"(l,c){var f=Qs(),S=lr(),x=ee(),v=Zs();c.exports=k=>{var N=0,X,M,re={type:S.ROOT,stack:[]},q=re,de=re.stack,se=[],Ue=W=>{f.error(k,`Nothing to repeat at column ${W-1}`)},xe=f.strToChars(k);for(X=xe.length;N<X;)switch(M=xe[N++],M){case"\\":switch(M=xe[N++],M){case"b":de.push(v.wordBoundary());break;case"B":de.push(v.nonWordBoundary());break;case"w":de.push(x.words());break;case"W":de.push(x.notWords());break;case"d":de.push(x.ints());break;case"D":de.push(x.notInts());break;case"s":de.push(x.whitespace());break;case"S":de.push(x.notWhitespace());break;default:/\d/.test(M)?de.push({type:S.REFERENCE,value:parseInt(M,10)}):de.push({type:S.CHAR,value:M.charCodeAt(0)})}break;case"^":de.push(v.begin());break;case"$":de.push(v.end());break;case"[":{var _e;xe[N]==="^"?(_e=!0,N++):_e=!1;var Ye=f.tokenizeClass(xe.slice(N),k);N+=Ye[1],de.push({type:S.SET,set:Ye[0],not:_e});break}case".":de.push(x.anyChar());break;case"(":{var Ke={type:S.GROUP,stack:[],remember:!0};M=xe[N],M==="?"&&(M=xe[N+1],N+=2,M==="="?Ke.followedBy=!0:M==="!"?Ke.notFollowedBy=!0:M!==":"&&f.error(k,`Invalid group, character '${M}' after '?' at column ${N-1}`),Ke.remember=!1),de.push(Ke),se.push(q),q=Ke,de=Ke.stack;break}case")":se.length===0&&f.error(k,`Unmatched ) at column ${N-1}`),q=se.pop(),de=q.options?q.options[q.options.length-1]:q.stack;break;case"|":{q.options||(q.options=[q.stack],delete q.stack);var ie=[];q.options.push(ie),de=ie;break}case"{":{var I=/^(\d+)(,(\d+)?)?\}/.exec(xe.slice(N)),C,z;I!==null?(de.length===0&&Ue(N),C=parseInt(I[1],10),z=I[2]?I[3]?parseInt(I[3],10):1/0:C,N+=I[0].length,de.push({type:S.REPETITION,min:C,max:z,value:de.pop()})):de.push({type:S.CHAR,value:123});break}case"?":de.length===0&&Ue(N),de.push({type:S.REPETITION,min:0,max:1,value:de.pop()});break;case"+":de.length===0&&Ue(N),de.push({type:S.REPETITION,min:1,max:1/0,value:de.pop()});break;case"*":de.length===0&&Ue(N),de.push({type:S.REPETITION,min:0,max:1/0,value:de.pop()});break;default:de.push({type:S.CHAR,value:M.charCodeAt(0)})}return se.length!==0&&f.error(k,"Unterminated group"),re},c.exports.types=S}}),tl=Pt({"node_modules/drange/lib/index.js"(l,c){var f=class Hn{constructor(v,k){this.low=v,this.high=k,this.length=1+k-v}overlaps(v){return!(this.high<v.low||this.low>v.high)}touches(v){return!(this.high+1<v.low||this.low-1>v.high)}add(v){return new Hn(Math.min(this.low,v.low),Math.max(this.high,v.high))}subtract(v){return v.low<=this.low&&v.high>=this.high?[]:v.low>this.low&&v.high<this.high?[new Hn(this.low,v.low-1),new Hn(v.high+1,this.high)]:v.low<=this.low?[new Hn(v.high+1,this.high)]:[new Hn(this.low,v.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},S=class Tr{constructor(v,k){this.ranges=[],this.length=0,v!=null&&this.add(v,k)}_update_length(){this.length=this.ranges.reduce((v,k)=>v+k.length,0)}add(v,k){var N=X=>{for(var M=0;M<this.ranges.length&&!X.touches(this.ranges[M]);)M++;for(var re=this.ranges.slice(0,M);M<this.ranges.length&&X.touches(this.ranges[M]);)X=X.add(this.ranges[M]),M++;re.push(X),this.ranges=re.concat(this.ranges.slice(M)),this._update_length()};return v instanceof Tr?v.ranges.forEach(N):(k==null&&(k=v),N(new f(v,k))),this}subtract(v,k){var N=X=>{for(var M=0;M<this.ranges.length&&!X.overlaps(this.ranges[M]);)M++;for(var re=this.ranges.slice(0,M);M<this.ranges.length&&X.overlaps(this.ranges[M]);)re=re.concat(this.ranges[M].subtract(X)),M++;this.ranges=re.concat(this.ranges.slice(M)),this._update_length()};return v instanceof Tr?v.ranges.forEach(N):(k==null&&(k=v),N(new f(v,k))),this}intersect(v,k){var N=[],X=M=>{for(var re=0;re<this.ranges.length&&!M.overlaps(this.ranges[re]);)re++;for(;re<this.ranges.length&&M.overlaps(this.ranges[re]);){var q=Math.max(this.ranges[re].low,M.low),de=Math.min(this.ranges[re].high,M.high);N.push(new f(q,de)),re++}};return v instanceof Tr?v.ranges.forEach(X):(k==null&&(k=v),X(new f(v,k))),this.ranges=N,this._update_length(),this}index(v){for(var k=0;k<this.ranges.length&&this.ranges[k].length<=v;)v-=this.ranges[k].length,k++;return this.ranges[k].low+v}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Tr(this)}numbers(){return this.ranges.reduce((v,k)=>{for(var N=k.low;N<=k.high;)v.push(N),N++;return v},[])}subranges(){return this.ranges.map(v=>({low:v.low,high:v.high,length:1+v.high-v.low}))}};c.exports=S}}),nl=Pt({"node_modules/randexp/lib/randexp.js"(l,c){var f=el(),S=tl(),x=f.types;c.exports=class kr{constructor(k,N){if(this._setDefaults(k),k instanceof RegExp)this.ignoreCase=k.ignoreCase,this.multiline=k.multiline,k=k.source;else if(typeof k=="string")this.ignoreCase=N&&N.indexOf("i")!==-1,this.multiline=N&&N.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=f(k)}_setDefaults(k){this.max=k.max!=null?k.max:kr.prototype.max!=null?kr.prototype.max:100,this.defaultRange=k.defaultRange?k.defaultRange:this.defaultRange.clone(),k.randInt&&(this.randInt=k.randInt)}gen(){return this._gen(this.tokens,[])}_gen(k,N){var X,M,re,q,de;switch(k.type){case x.ROOT:case x.GROUP:if(k.followedBy||k.notFollowedBy)return"";for(k.remember&&k.groupNumber===void 0&&(k.groupNumber=N.push(null)-1),X=k.options?this._randSelect(k.options):k.stack,M="",q=0,de=X.length;q<de;q++)M+=this._gen(X[q],N);return k.remember&&(N[k.groupNumber]=M),M;case x.POSITION:return"";case x.SET:{var se=this._expand(k);return se.length?String.fromCharCode(this._randSelect(se)):""}case x.REPETITION:for(re=this.randInt(k.min,k.max===1/0?k.min+this.max:k.max),M="",q=0;q<re;q++)M+=this._gen(k.value,N);return M;case x.REFERENCE:return N[k.value-1]||"";case x.CHAR:{var Ue=this.ignoreCase&&this._randBool()?this._toOtherCase(k.value):k.value;return String.fromCharCode(Ue)}}}_toOtherCase(k){return k+(97<=k&&k<=122?-32:65<=k&&k<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(k){return k instanceof S?k.index(this.randInt(0,k.length-1)):k[this.randInt(0,k.length-1)]}_expand(k){if(k.type===f.types.CHAR)return new S(k.value);if(k.type===f.types.RANGE)return new S(k.from,k.to);{let N=new S;for(let X=0;X<k.set.length;X++){let M=this._expand(k.set[X]);if(N.add(M),this.ignoreCase)for(let re=0;re<M.length;re++){let q=M.index(re),de=this._toOtherCase(q);q!==de&&N.add(de)}}return k.not?this.defaultRange.clone().subtract(N):this.defaultRange.clone().intersect(N)}}randInt(k,N){return k+Math.floor(Math.random()*(1+N-k))}get defaultRange(){return this._range=this._range||new S(32,126)}set defaultRange(k){this._range=k}static randexp(k,N){var X;return typeof k=="string"&&(k=new RegExp(k,N)),k._randexp===void 0?(X=new kr(k,N),k._randexp=X):(X=k._randexp,X._setDefaults(k)),X.gen()}static sugar(){RegExp.prototype.gen=function(){return kr.randexp(this)}}}}}),cr=Pt({"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:",x={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function v(ie){let I=[0],C=ie.indexOf(`
|
|
3
3
|
`);for(;C!==-1;)C+=1,I.push(C),C=ie.indexOf(`
|
|
4
4
|
`,C);return I}function k(ie){let I,C;return typeof ie=="string"?(I=v(ie),C=ie):(Array.isArray(ie)&&(ie=ie[0]),ie&&ie.context&&(ie.lineStarts||(ie.lineStarts=v(ie.context.src)),I=ie.lineStarts,C=ie.context.src)),{lineStarts:I,src:C}}function N(ie,I){if(typeof ie!="number"||ie<0)return null;let{lineStarts:C,src:z}=k(I);if(!C||!z||ie>z.length)return null;for(let G=0;G<C.length;++G){let B=C[G];if(ie<B)return{line:G,col:ie-C[G-1]+1};if(ie===B)return{line:G+1,col:1}}let W=C.length;return{line:W,col:ie-C[W-1]+1}}function X(ie,I){let{lineStarts:C,src:z}=k(I);if(!C||!(ie>=1)||ie>C.length)return null;let W=C[ie-1],G=C[ie];for(;G&&G>W&&z[G-1]===`
|
|
5
5
|
`;)--G;return z.slice(W,G)}function M({start:ie,end:I},C,z=80){let W=X(ie.line,C);if(!W)return null;let{col:G}=ie;if(W.length>z)if(G<=z-10)W=W.substr(0,z-1)+"\u2026";else{let he=Math.round(z/2);W.length>G+he&&(W=W.substr(0,G+he-1)+"\u2026"),G-=W.length-z,W="\u2026"+W.substr(1-z)}let B=1,H="";I&&(I.line===ie.line&&G+(I.col-ie.col)<=z+1?B=I.col-ie.col:(B=Math.min(W.length+1,z)-G,H="\u2026"));let J=G>1?" ".repeat(G-1):"",le="^".repeat(B);return`${W}
|
|
@@ -25,7 +25,7 @@ ${J}${le}${H}`}var re=class Kl{static copy(I){return new Kl(I.start,I.end)}const
|
|
|
25
25
|
`)return!0;return!1}parseComment(I){let{src:C}=this.context;if(C[I]===c.COMMENT){let z=sn.endOfLine(C,I+1),W=new re(I,z);return this.props.push(W),z}return I}setOrigRanges(I,C){return this.range&&(C=this.range.setOrigRange(I,C)),this.valueRange&&this.valueRange.setOrigRange(I,C),this.props.forEach(z=>z.setOrigRange(I,C)),C}toString(){let{context:{src:I},range:C,value:z}=this;if(z!=null)return z;let W=I.slice(C.start,C.end);return sn.addStringTerminator(I,C.end,W)}},de=class extends Error{constructor(ie,I,C){if(!C||!(I instanceof q))throw new Error(`Invalid arguments for new ${ie}`);super(),this.name=ie,this.message=C,this.source=I}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let ie=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new re(this.offset,this.offset+1);let I=ie&&N(this.offset,ie);if(I){let C={line:I.line,col:I.col+1};this.linePos={start:I,end:C}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:I,col:C}=this.linePos.start;this.message+=` at line ${I}, column ${C}`;let z=ie&&M(this.linePos,ie);z&&(this.message+=`:
|
|
26
26
|
|
|
27
27
|
${z}
|
|
28
|
-
`)}delete this.source}},se=class extends de{constructor(ie,I){super("YAMLReferenceError",ie,I)}},Ue=class extends de{constructor(ie,I){super("YAMLSemanticError",ie,I)}},xe=class extends de{constructor(ie,I){super("YAMLSyntaxError",ie,I)}},
|
|
28
|
+
`)}delete this.source}},se=class extends de{constructor(ie,I){super("YAMLReferenceError",ie,I)}},Ue=class extends de{constructor(ie,I){super("YAMLSemanticError",ie,I)}},xe=class extends de{constructor(ie,I){super("YAMLSyntaxError",ie,I)}},_e=class extends de{constructor(ie,I){super("YAMLWarning",ie,I)}};function Ye(ie,I,C){return I in ie?Object.defineProperty(ie,I,{value:C,enumerable:!0,configurable:!0,writable:!0}):ie[I]=C,ie}var Ke=class Ga extends q{static endOfLine(I,C,z){let W=I[C],G=C;for(;W&&W!==`
|
|
29
29
|
`&&!(z&&(W==="["||W==="]"||W==="{"||W==="}"||W===","));){let B=I[G+1];if(W===":"&&(!B||B===`
|
|
30
30
|
`||B===" "||B===" "||z&&B===",")||(W===" "||W===" ")&&B==="#")break;G+=1,W=B}return G}get strValue(){if(!this.valueRange||!this.context)return null;let{start:I,end:C}=this.valueRange,{src:z}=this.context,W=z[C-1];for(;I<C&&(W===`
|
|
31
31
|
`||W===" "||W===" ");)W=z[--C-1];let G="";for(let H=I;H<C;++H){let J=z[H];if(J===`
|
|
@@ -33,110 +33,110 @@ ${z}
|
|
|
33
33
|
`&&(G+=H>le?z.slice(le,H+1):J)}else G+=J}let B=z[I];switch(B){case" ":{let H="Plain value cannot start with a tab character";return{errors:[new Ue(this,H)],str:G}}case"@":case"`":{let H=`Plain value cannot start with reserved character ${B}`;return{errors:[new Ue(this,H)],str:G}}default:return G}}parseBlockValue(I){let{indent:C,inFlow:z,src:W}=this.context,G=I,B=I;for(let H=W[G];H===`
|
|
34
34
|
`&&!q.atDocumentBoundary(W,G+1);H=W[G]){let J=q.endOfBlockIndent(W,C,G+1);if(J===null||W[J]==="#")break;W[J]===`
|
|
35
35
|
`?G=J:(B=Ga.endOfLine(W,J,z),G=B)}return this.valueRange.isEmpty()&&(this.valueRange.start=I),this.valueRange.end=B,B}parse(I,C){this.context=I;let{inFlow:z,src:W}=I,G=C,B=W[G];return B&&B!=="#"&&B!==`
|
|
36
|
-
`&&(G=Ga.endOfLine(W,C,z)),this.valueRange=new re(C,G),G=q.endOfWhiteSpace(W,G),G=this.parseComment(G),(!this.hasComment||this.valueRange.isEmpty())&&(G=this.parseBlockValue(G)),G}};l.Char=c,l.Node=q,l.PlainValue=Ke,l.Range=re,l.Type=f,l.YAMLError=de,l.YAMLReferenceError=se,l.YAMLSemanticError=Ue,l.YAMLSyntaxError=xe,l.YAMLWarning=
|
|
36
|
+
`&&(G=Ga.endOfLine(W,C,z)),this.valueRange=new re(C,G),G=q.endOfWhiteSpace(W,G),G=this.parseComment(G),(!this.hasComment||this.valueRange.isEmpty())&&(G=this.parseBlockValue(G)),G}};l.Char=c,l.Node=q,l.PlainValue=Ke,l.Range=re,l.Type=f,l.YAMLError=de,l.YAMLReferenceError=se,l.YAMLSemanticError=Ue,l.YAMLSyntaxError=xe,l.YAMLWarning=_e,l._defineProperty=Ye,l.defaultTagPrefix=S,l.defaultTags=x}}),Vr=Pt({"node_modules/yaml/dist/resolveSeq-d03cb037.js"(l){var c=cr();function f(b,m,w){return w?`#${w.replace(/[\s\S]^/gm,`$&${m}#`)}
|
|
37
37
|
${m}${b}`:b}function S(b,m,w){return w?w.indexOf(`
|
|
38
38
|
`)===-1?`${b} #${w}`:`${b}
|
|
39
|
-
`+w.replace(/^/gm,`${m||""}#`):b}var x=class{};function v(b,m,w){if(Array.isArray(b))return b.map((T,
|
|
39
|
+
`+w.replace(/^/gm,`${m||""}#`):b}var x=class{};function v(b,m,w){if(Array.isArray(b))return b.map((T,O)=>v(T,String(O),w));if(b&&typeof b.toJSON=="function"){let T=w&&w.anchors&&w.anchors.get(b);T&&(w.onCreate=R=>{T.res=R,delete w.onCreate});let O=b.toJSON(m,w);return T&&w.onCreate&&w.onCreate(O),O}return(!w||!w.keep)&&typeof b=="bigint"?Number(b):b}var k=class extends x{constructor(b){super(),this.value=b}toJSON(b,m){return m&&m.keep?this.value:v(this.value,b,m)}toString(){return String(this.value)}};function N(b,m,w){let T=w;for(let O=m.length-1;O>=0;--O){let R=m[O];if(Number.isInteger(R)&&R>=0){let L=[];L[R]=T,T=L}else{let L={};Object.defineProperty(L,R,{value:T,writable:!0,enumerable:!0,configurable:!0}),T=L}}return b.createNode(T,!1)}var X=b=>b==null||typeof b=="object"&&b[Symbol.iterator]().next().done,M=class Rn extends x{constructor(m){super(),c._defineProperty(this,"items",[]),this.schema=m}addIn(m,w){if(X(m))this.add(w);else{let[T,...O]=m,R=this.get(T,!0);if(R instanceof Rn)R.addIn(O,w);else if(R===void 0&&this.schema)this.set(T,N(this.schema,O,w));else throw new Error(`Expected YAML collection at ${T}. Remaining path: ${O}`)}}deleteIn([m,...w]){if(w.length===0)return this.delete(m);let T=this.get(m,!0);if(T instanceof Rn)return T.deleteIn(w);throw new Error(`Expected YAML collection at ${m}. Remaining path: ${w}`)}getIn([m,...w],T){let O=this.get(m,!0);return w.length===0?!T&&O instanceof k?O.value:O:O instanceof Rn?O.getIn(w,T):void 0}hasAllNullValues(){return this.items.every(m=>{if(!m||m.type!=="PAIR")return!1;let w=m.value;return w==null||w instanceof k&&w.value==null&&!w.commentBefore&&!w.comment&&!w.tag})}hasIn([m,...w]){if(w.length===0)return this.has(m);let T=this.get(m,!0);return T instanceof Rn?T.hasIn(w):!1}setIn([m,...w],T){if(w.length===0)this.set(m,T);else{let O=this.get(m,!0);if(O instanceof Rn)O.setIn(w,T);else if(O===void 0&&this.schema)this.set(m,N(this.schema,w,T));else throw new Error(`Expected YAML collection at ${m}. Remaining path: ${w}`)}}toJSON(){return null}toString(m,{blockItem:w,flowChars:T,isMap:O,itemIndent:R},L,D){let{indent:V,indentStep:K,stringify:ce}=m,ye=this.type===c.Type.FLOW_MAP||this.type===c.Type.FLOW_SEQ||m.inFlow;ye&&(R+=K);let et=O&&this.hasAllNullValues();m=Object.assign({},m,{allNullValues:et,indent:R,inFlow:ye,type:null});let Me=!1,Xe=!1,De=this.items.reduce((ht,Be,it)=>{let He;Be&&(!Me&&Be.spaceBefore&&ht.push({type:"comment",str:""}),Be.commentBefore&&Be.commentBefore.match(/^.*$/gm).forEach(Nd=>{ht.push({type:"comment",str:`#${Nd}`})}),Be.comment&&(He=Be.comment),ye&&(!Me&&Be.spaceBefore||Be.commentBefore||Be.comment||Be.key&&(Be.key.commentBefore||Be.key.comment)||Be.value&&(Be.value.commentBefore||Be.value.comment))&&(Xe=!0)),Me=!1;let kt=ce(Be,m,()=>He=null,()=>Me=!0);return ye&&!Xe&&kt.includes(`
|
|
40
40
|
`)&&(Xe=!0),ye&&it<this.items.length-1&&(kt+=","),kt=S(kt,R,He),Me&&(He||ye)&&(Me=!1),ht.push({type:"item",str:kt}),ht},[]),Je;if(De.length===0)Je=T.start+T.end;else if(ye){let{start:ht,end:Be}=T,it=De.map(He=>He.str);if(Xe||it.reduce((He,kt)=>He+kt.length+2,2)>Rn.maxFlowStringSingleLineLength){Je=ht;for(let He of it)Je+=He?`
|
|
41
41
|
${K}${V}${He}`:`
|
|
42
42
|
`;Je+=`
|
|
43
43
|
${V}${Be}`}else Je=`${ht} ${it.join(" ")} ${Be}`}else{let ht=De.map(w);Je=ht.shift();for(let Be of ht)Je+=Be?`
|
|
44
44
|
${V}${Be}`:`
|
|
45
45
|
`}return this.comment?(Je+=`
|
|
46
|
-
`+this.comment.replace(/^/gm,`${V}#`),L&&L()):Me&&D&&D(),Je}};c._defineProperty(M,"maxFlowStringSingleLineLength",60);function re(b){let m=b instanceof k?b.value:b;return m&&typeof m=="string"&&(m=Number(m)),Number.isInteger(m)&&m>=0?m:null}var q=class extends M{add(b){this.items.push(b)}delete(b){let m=re(b);return typeof m!="number"?!1:this.items.splice(m,1).length>0}get(b,m){let w=re(b);if(typeof w!="number")return;let T=this.items[w];return!m&&T instanceof k?T.value:T}has(b){let m=re(b);return typeof m=="number"&&m<this.items.length}set(b,m){let w=re(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 T=0;for(let
|
|
46
|
+
`+this.comment.replace(/^/gm,`${V}#`),L&&L()):Me&&D&&D(),Je}};c._defineProperty(M,"maxFlowStringSingleLineLength",60);function re(b){let m=b instanceof k?b.value:b;return m&&typeof m=="string"&&(m=Number(m)),Number.isInteger(m)&&m>=0?m:null}var q=class extends M{add(b){this.items.push(b)}delete(b){let m=re(b);return typeof m!="number"?!1:this.items.splice(m,1).length>0}get(b,m){let w=re(b);if(typeof w!="number")return;let T=this.items[w];return!m&&T instanceof k?T.value:T}has(b){let m=re(b);return typeof m=="number"&&m<this.items.length}set(b,m){let w=re(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 T=0;for(let O of this.items)w.push(v(O,String(T++),m));return w}toString(b,m,w){return b?super.toString(b,{blockItem:T=>T.type==="comment"?T.str:`- ${T.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(b.indent||"")+" "},m,w):JSON.stringify(this)}},de=(b,m,w)=>m===null?"":typeof m!="object"?String(m):b instanceof x&&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),se=class Xl extends x{constructor(m,w=null){super(),this.key=m,this.value=w,this.type=Xl.Type.PAIR}get commentBefore(){return this.key instanceof x?this.key.commentBefore:void 0}set commentBefore(m){if(this.key==null&&(this.key=new k(null)),this.key instanceof x)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 T=v(this.key,"",m);if(w instanceof Map){let O=v(this.value,T,m);w.set(T,O)}else if(w instanceof Set)w.add(T);else{let O=de(this.key,T,m),R=v(this.value,O,m);O in w?Object.defineProperty(w,O,{value:R,writable:!0,enumerable:!0,configurable:!0}):w[O]=R}return w}toJSON(m,w){let T=w&&w.mapAsMap?new Map:{};return this.addToJSMap(w,T)}toString(m,w,T){if(!m||!m.doc)return JSON.stringify(this);let{indent:O,indentSeq:R,simpleKeys:L}=m.doc.options,{key:D,value:V}=this,K=D instanceof x&&D.comment;if(L){if(K)throw new Error("With simple keys, key nodes cannot have comments");if(D instanceof M){let kt="With simple keys, collection cannot be used as a key value";throw new Error(kt)}}let ce=!L&&(!D||K||(D instanceof x?D instanceof M||D.type===c.Type.BLOCK_FOLDED||D.type===c.Type.BLOCK_LITERAL:typeof D=="object")),{doc:ye,indent:et,indentStep:Me,stringify:Xe}=m;m=Object.assign({},m,{implicitKey:!ce,indent:et+Me});let De=!1,Je=Xe(D,m,()=>K=null,()=>De=!0);if(Je=S(Je,m.indent,K),!ce&&Je.length>1024){if(L)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");ce=!0}if(m.allNullValues&&!L)return this.comment?(Je=S(Je,m.indent,this.comment),w&&w()):De&&!K&&T&&T(),m.inFlow&&!ce?Je:`? ${Je}`;Je=ce?`? ${Je}
|
|
47
47
|
${et}:`:`${Je}:`,this.comment&&(Je=S(Je,m.indent,this.comment),w&&w());let ht="",Be=null;if(V instanceof x){if(V.spaceBefore&&(ht=`
|
|
48
48
|
`),V.commentBefore){let kt=V.commentBefore.replace(/^/gm,`${m.indent}#`);ht+=`
|
|
49
|
-
${kt}`}Be=V.comment}else V&&typeof V=="object"&&(V=ye.schema.createNode(V,!0));m.implicitKey=!1,!ce&&!this.comment&&V instanceof k&&(m.indentAtStart=Je.length+1),De=!1,!R&&
|
|
49
|
+
${kt}`}Be=V.comment}else V&&typeof V=="object"&&(V=ye.schema.createNode(V,!0));m.implicitKey=!1,!ce&&!this.comment&&V instanceof k&&(m.indentAtStart=Je.length+1),De=!1,!R&&O>=2&&!m.inFlow&&!ce&&V instanceof q&&V.type!==c.Type.FLOW_SEQ&&!V.tag&&!ye.anchors.getName(V)&&(m.indent=m.indent.substr(2));let it=Xe(V,m,()=>Be=null,()=>De=!0),He=" ";return ht||this.comment?He=`${ht}
|
|
50
50
|
${m.indent}`:!ce&&V instanceof M?(!(it[0]==="["||it[0]==="{")||it.includes(`
|
|
51
51
|
`))&&(He=`
|
|
52
52
|
${m.indent}`):it[0]===`
|
|
53
|
-
`&&(He=""),De&&!Be&&T&&T(),S(Je+He+it,m.indent,Be)}};c._defineProperty(se,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Ue=(b,m)=>{if(b instanceof xe){let w=m.get(b.source);return w.count*w.aliasCount}else if(b instanceof M){let w=0;for(let T of b.items){let
|
|
54
|
-
`);w=b[m+1]}return m};function ve(b,m,w,{indentAtStart:T,lineWidth:
|
|
53
|
+
`&&(He=""),De&&!Be&&T&&T(),S(Je+He+it,m.indent,Be)}};c._defineProperty(se,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Ue=(b,m)=>{if(b instanceof xe){let w=m.get(b.source);return w.count*w.aliasCount}else if(b instanceof M){let w=0;for(let T of b.items){let O=Ue(T,m);O>w&&(w=O)}return w}else if(b instanceof se){let w=Ue(b.key,m),T=Ue(b.value,m);return Math.max(w,T)}return 1},xe=class Ql extends x{static stringify({range:m,source:w},{anchors:T,doc:O,implicitKey:R,inStringifyKey:L}){let D=Object.keys(T).find(K=>T[K]===w);if(!D&&L&&(D=O.anchors.getName(w)||O.anchors.newName()),D)return`*${D}${R?" ":""}`;let V=O.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 v(this.source,m,w);let{anchors:T,maxAliasCount:O}=w,R=T.get(this.source);if(!R||R.res===void 0){let L="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new c.YAMLReferenceError(this.cstNode,L):new ReferenceError(L)}if(O>=0&&(R.count+=1,R.aliasCount===0&&(R.aliasCount=Ue(this.source,T)),R.count*R.aliasCount>O)){let L="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new c.YAMLReferenceError(this.cstNode,L):new ReferenceError(L)}return R.res}toString(m){return Ql.stringify(this,m)}};c._defineProperty(xe,"default",!0);function _e(b,m){let w=m instanceof k?m.value:m;for(let T of b)if(T instanceof se&&(T.key===m||T.key===w||T.key&&T.key.value===w))return T}var Ye=class extends M{add(b,m){b?b instanceof se||(b=new se(b.key||b,b.value)):b=new se(b);let w=_e(this.items,b.key),T=this.schema&&this.schema.sortMapEntries;if(w)if(m)w.value=b.value;else throw new Error(`Key ${b.key} already set`);else if(T){let O=this.items.findIndex(R=>T(b,R)<0);O===-1?this.items.push(b):this.items.splice(O,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),T=w&&w.value;return!m&&T instanceof k?T.value:T}has(b){return!!_e(this.items,b)}set(b,m){this.add(new se(b,m),!0)}toJSON(b,m,w){let T=w?new w:m&&m.mapAsMap?new Map:{};m&&m.onCreate&&m.onCreate(T);for(let O of this.items)O.addToJSMap(m,T);return T}toString(b,m,w){if(!b)return JSON.stringify(this);for(let T of this.items)if(!(T instanceof se))throw new Error(`Map items must all be pairs; found ${JSON.stringify(T)} instead`);return super.toString(b,{blockItem:T=>T.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:b.indent||""},m,w)}},Ke="<<",ie=class extends se{constructor(b){if(b instanceof se){let m=b.value;m instanceof q||(m=new q,m.items.push(b.value),m.range=b.value.range),super(b.key,m),this.range=b.range}else super(new k(Ke),new q);this.type=se.Type.MERGE_PAIR}addToJSMap(b,m){for(let{source:w}of this.value.items){if(!(w instanceof Ye))throw new Error("Merge sources must be maps");let T=w.toJSON(null,b,Map);for(let[O,R]of T)m instanceof Map?m.has(O)||m.set(O,R):m instanceof Set?m.add(O):Object.prototype.hasOwnProperty.call(m,O)||Object.defineProperty(m,O,{value:R,writable:!0,enumerable:!0,configurable:!0})}return m}toString(b,m){let w=this.value;if(w.items.length>1)return super.toString(b,m);this.value=w.items[0];let T=super.toString(b,m);return this.value=w,T}},I={defaultType:c.Type.BLOCK_LITERAL,lineWidth:76},C={trueStr:"true",falseStr:"false"},z={asBigInt:!1},W={nullStr:"null"},G={defaultType:c.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function B(b,m,w){for(let{format:T,test:O,resolve:R}of m)if(O){let L=b.match(O);if(L){let D=R.apply(null,L);return D instanceof k||(D=new k(D)),T&&(D.format=T),D}}return w&&(b=w(b)),new k(b)}var H="flow",J="block",le="quoted",he=(b,m)=>{let w=b[m+1];for(;w===" "||w===" ";){do w=b[m+=1];while(w&&w!==`
|
|
54
|
+
`);w=b[m+1]}return m};function ve(b,m,w,{indentAtStart:T,lineWidth:O=80,minContentWidth:R=20,onFold:L,onOverflow:D}){if(!O||O<0)return b;let V=Math.max(1+R,1+O-m.length);if(b.length<=V)return b;let K=[],ce={},ye=O-m.length;typeof T=="number"&&(T>O-Math.max(2,R)?K.push(0):ye=O-T);let et,Me,Xe=!1,De=-1,Je=-1,ht=-1;w===J&&(De=he(b,De),De!==-1&&(ye=De+V));for(let it;it=b[De+=1];){if(w===le&&it==="\\"){switch(Je=De,b[De+1]){case"x":De+=3;break;case"u":De+=5;break;case"U":De+=9;break;default:De+=1}ht=De}if(it===`
|
|
55
55
|
`)w===J&&(De=he(b,De)),ye=De+V,et=void 0;else{if(it===" "&&Me&&Me!==" "&&Me!==`
|
|
56
56
|
`&&Me!==" "){let He=b[De+1];He&&He!==" "&&He!==`
|
|
57
57
|
`&&He!==" "&&(et=De)}if(De>=ye)if(et)K.push(et),ye=et+V,et=void 0;else if(w===le){for(;Me===" "||Me===" ";)Me=it,it=b[De+=1],Xe=!0;let He=De>ht+1?De-2:Je-1;if(ce[He])return b;K.push(He),ce[He]=!0,ye=He+V,et=void 0}else Xe=!0}Me=it}if(Xe&&D&&D(),K.length===0)return b;L&&L();let Be=b.slice(0,K[0]);for(let it=0;it<K.length;++it){let He=K[it],kt=K[it+1]||b.length;He===0?Be=`
|
|
58
58
|
${m}${b.slice(0,kt)}`:(w===le&&ce[He]&&(Be+=`${b[He]}\\`),Be+=`
|
|
59
|
-
${m}${b.slice(He+1,kt)}`)}return Be}var nt=({indentAtStart:b})=>b?Object.assign({indentAtStart:b},G.fold):G.fold,rt=b=>/^(%|---|\.\.\.)/m.test(b);function at(b,m,w){if(!m||m<0)return!1;let T=m-w,
|
|
60
|
-
`){if(R-L>T)return!0;if(L=R+1,
|
|
59
|
+
${m}${b.slice(He+1,kt)}`)}return Be}var nt=({indentAtStart:b})=>b?Object.assign({indentAtStart:b},G.fold):G.fold,rt=b=>/^(%|---|\.\.\.)/m.test(b);function at(b,m,w){if(!m||m<0)return!1;let T=m-w,O=b.length;if(O<=T)return!1;for(let R=0,L=0;R<O;++R)if(b[R]===`
|
|
60
|
+
`){if(R-L>T)return!0;if(L=R+1,O-L<=T)return!1}return!0}function dt(b,m){let{implicitKey:w}=m,{jsonEncoding:T,minMultiLineLength:O}=G.doubleQuoted,R=JSON.stringify(b);if(T)return R;let L=m.indent||(rt(b)?" ":""),D="",V=0;for(let K=0,ce=R[K];ce;ce=R[++K])if(ce===" "&&R[K+1]==="\\"&&R[K+2]==="n"&&(D+=R.slice(V,K)+"\\ ",K+=1,V=K,ce="\\"),ce==="\\")switch(R[K+1]){case"u":{D+=R.slice(V,K);let ye=R.substr(K+2,4);switch(ye){case"0000":D+="\\0";break;case"0007":D+="\\a";break;case"000b":D+="\\v";break;case"001b":D+="\\e";break;case"0085":D+="\\N";break;case"00a0":D+="\\_";break;case"2028":D+="\\L";break;case"2029":D+="\\P";break;default:ye.substr(0,2)==="00"?D+="\\x"+ye.substr(2):D+=R.substr(K,6)}K+=5,V=K+1}break;case"n":if(w||R[K+2]==='"'||R.length<O)K+=1;else{for(D+=R.slice(V,K)+`
|
|
61
61
|
|
|
62
62
|
`;R[K+2]==="\\"&&R[K+3]==="n"&&R[K+4]!=='"';)D+=`
|
|
63
63
|
`,K+=2;D+=L,R[K+2]===" "&&(D+="\\"),K+=1,V=K+1}break;default:K+=1}return D=V?D+R.slice(V):R,w?D:ve(D,L,le,nt(m))}function bt(b,m){if(m.implicitKey){if(/\n/.test(b))return dt(b,m)}else if(/[ \t]\n|\n[ \t]/.test(b))return dt(b,m);let w=m.indent||(rt(b)?" ":""),T="'"+b.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
64
|
-
${w}`)+"'";return m.implicitKey?T:ve(T,w,H,nt(m))}function ae({comment:b,type:m,value:w},T,
|
|
64
|
+
${w}`)+"'";return m.implicitKey?T:ve(T,w,H,nt(m))}function ae({comment:b,type:m,value:w},T,O,R){if(/\n[\t ]+$/.test(w)||/^\s*$/.test(w))return dt(w,T);let L=T.indent||(T.forceBlockIndent||rt(w)?" ":""),D=L?"2":"1",V=m===c.Type.BLOCK_FOLDED?!1:m===c.Type.BLOCK_LITERAL?!0:!at(w,G.fold.lineWidth,L.length),K=V?"|":">";if(!w)return K+`
|
|
65
65
|
`;let ce="",ye="";if(w=w.replace(/[\n\t ]*$/,Me=>{let Xe=Me.indexOf(`
|
|
66
|
-
`);return Xe===-1?K+="-":(w===Me||Xe!==Me.length-1)&&(K+="+",R&&R()),ye=Me.replace(/\n$/,""),""}).replace(/^[\n ]*/,Me=>{Me.indexOf(" ")!==-1&&(K+=D);let Xe=Me.match(/ +$/);return Xe?(ce=Me.slice(0,-Xe[0].length),Xe[0]):(ce=Me,"")}),ye&&(ye=ye.replace(/\n+(?!\n|$)/g,`$&${L}`)),ce&&(ce=ce.replace(/\n+/g,`$&${L}`)),b&&(K+=" #"+b.replace(/ ?[\r\n]+/g," "),
|
|
66
|
+
`);return Xe===-1?K+="-":(w===Me||Xe!==Me.length-1)&&(K+="+",R&&R()),ye=Me.replace(/\n$/,""),""}).replace(/^[\n ]*/,Me=>{Me.indexOf(" ")!==-1&&(K+=D);let Xe=Me.match(/ +$/);return Xe?(ce=Me.slice(0,-Xe[0].length),Xe[0]):(ce=Me,"")}),ye&&(ye=ye.replace(/\n+(?!\n|$)/g,`$&${L}`)),ce&&(ce=ce.replace(/\n+/g,`$&${L}`)),b&&(K+=" #"+b.replace(/ ?[\r\n]+/g," "),O&&O()),!w)return`${K}${D}
|
|
67
67
|
${L}${ye}`;if(V)return w=w.replace(/\n+/g,`$&${L}`),`${K}
|
|
68
68
|
${L}${ce}${w}${ye}`;w=w.replace(/\n+/g,`
|
|
69
69
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${L}`);let et=ve(`${ce}${w}${ye}`,L,J,G.fold);return`${K}
|
|
70
|
-
${L}${et}`}function
|
|
70
|
+
${L}${et}`}function E(b,m,w,T){let{comment:O,type:R,value:L}=b,{actualString:D,implicitKey:V,indent:K,inFlow:ce}=m;if(V&&/[\n[\]{},]/.test(L)||ce&&/[[\]{},]/.test(L))return dt(L,m);if(!L||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(L))return V||ce||L.indexOf(`
|
|
71
71
|
`)===-1?L.indexOf('"')!==-1&&L.indexOf("'")===-1?bt(L,m):dt(L,m):ae(b,m,w,T);if(!V&&!ce&&R!==c.Type.PLAIN&&L.indexOf(`
|
|
72
72
|
`)!==-1)return ae(b,m,w,T);if(K===""&&rt(L))return m.forceBlockIndent=!0,ae(b,m,w,T);let ye=L.replace(/\n+/g,`$&
|
|
73
|
-
${K}`);if(D){let{tags:Me}=m.doc.schema;if(typeof B(ye,Me,Me.scalarFallback).value!="string")return dt(L,m)}let et=V?ye:ve(ye,K,H,nt(m));return
|
|
74
|
-
`)!==-1||
|
|
75
|
-
`)!==-1)?(w&&w(),f(et,K,
|
|
76
|
-
`&&w!==" "&&w!==" "){let T="Comments must be separated from other tokens by white space characters";b.push(new c.YAMLSemanticError(m,T))}}function $e(b,m){let w=String(m),T=w.substr(0,8)+"..."+w.substr(-8);return new c.YAMLSemanticError(b,`The "${T}" key is too long`)}function Ut(b,m){for(let{afterKey:w,before:T,comment:
|
|
77
|
-
`+
|
|
78
|
-
`+
|
|
73
|
+
${K}`);if(D){let{tags:Me}=m.doc.schema;if(typeof B(ye,Me,Me.scalarFallback).value!="string")return dt(L,m)}let et=V?ye:ve(ye,K,H,nt(m));return O&&!ce&&(et.indexOf(`
|
|
74
|
+
`)!==-1||O.indexOf(`
|
|
75
|
+
`)!==-1)?(w&&w(),f(et,K,O)):et}function Y(b,m,w,T){let{defaultType:O}=G,{implicitKey:R,inFlow:L}=m,{type:D,value:V}=b;typeof V!="string"&&(V=String(V),b=Object.assign({},b,{value:V}));let K=ye=>{switch(ye){case c.Type.BLOCK_FOLDED:case c.Type.BLOCK_LITERAL:return ae(b,m,w,T);case c.Type.QUOTE_DOUBLE:return dt(V,m);case c.Type.QUOTE_SINGLE:return bt(V,m);case c.Type.PLAIN:return E(b,m,w,T);default:return null}};(D!==c.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(V)||(R||L)&&(D===c.Type.BLOCK_FOLDED||D===c.Type.BLOCK_LITERAL))&&(D=c.Type.QUOTE_DOUBLE);let ce=K(D);if(ce===null&&(ce=K(O),ce===null))throw new Error(`Unsupported default string type ${O}`);return ce}function fe({format:b,minFractionDigits:m,tag:w,value:T}){if(typeof T=="bigint")return String(T);if(!isFinite(T))return isNaN(T)?".nan":T<0?"-.inf":".inf";let O=JSON.stringify(T);if(!b&&m&&(!w||w==="tag:yaml.org,2002:float")&&/^\d/.test(O)){let R=O.indexOf(".");R<0&&(R=O.length,O+=".");let L=m-(O.length-R-1);for(;L-- >0;)O+="0"}return O}function me(b,m){let w,T;switch(m.type){case c.Type.FLOW_MAP:w="}",T="flow map";break;case c.Type.FLOW_SEQ:w="]",T="flow sequence";break;default:b.push(new c.YAMLSemanticError(m,"Not a flow collection!?"));return}let O;for(let R=m.items.length-1;R>=0;--R){let L=m.items[R];if(!L||L.type!==c.Type.COMMENT){O=L;break}}if(O&&O.char!==w){let R=`Expected ${T} to end with ${w}`,L;typeof O.offset=="number"?(L=new c.YAMLSemanticError(m,R),L.offset=O.offset+1):(L=new c.YAMLSemanticError(O,R),O.range&&O.range.end&&(L.offset=O.range.end-O.range.start)),b.push(L)}}function Ce(b,m){let w=m.context.src[m.range.start-1];if(w!==`
|
|
76
|
+
`&&w!==" "&&w!==" "){let T="Comments must be separated from other tokens by white space characters";b.push(new c.YAMLSemanticError(m,T))}}function $e(b,m){let w=String(m),T=w.substr(0,8)+"..."+w.substr(-8);return new c.YAMLSemanticError(b,`The "${T}" key is too long`)}function Ut(b,m){for(let{afterKey:w,before:T,comment:O}of m){let R=b.items[T];R?(w&&R.value&&(R=R.value),O===void 0?(w||!R.commentBefore)&&(R.spaceBefore=!0):R.commentBefore?R.commentBefore+=`
|
|
77
|
+
`+O:R.commentBefore=O):O!==void 0&&(b.comment?b.comment+=`
|
|
78
|
+
`+O:b.comment=O)}}function rn(b,m){let w=m.strValue;return w?typeof w=="string"?w:(w.errors.forEach(T=>{T.source||(T.source=m),b.errors.push(T)}),w.str):""}function an(b,m){let{handle:w,suffix:T}=m.tag,O=b.tagPrefixes.find(R=>R.handle===w);if(!O){let R=b.getDefaults().tagPrefixes;if(R&&(O=R.find(L=>L.handle===w)),!O)throw new c.YAMLSemanticError(m,`The ${w} tag handle is non-default and was not declared.`)}if(!T)throw new c.YAMLSemanticError(m,`The ${w} tag has no suffix.`);if(w==="!"&&(b.version||b.options.version)==="1.0"){if(T[0]==="^")return b.warnings.push(new c.YAMLWarning(m,"YAML 1.0 ^ tag expansion is not supported")),T;if(/[:/]/.test(T)){let R=T.match(/^([a-z0-9-]+)\/(.*)/i);return R?`tag:${R[1]}.yaml.org,2002:${R[2]}`:`tag:${T}`}}return O.prefix+decodeURIComponent(T)}function Yt(b,m){let{tag:w,type:T}=m,O=!1;if(w){let{handle:R,suffix:L,verbatim:D}=w;if(D){if(D!=="!"&&D!=="!!")return D;let V=`Verbatim tags aren't resolved, so ${D} is invalid.`;b.errors.push(new c.YAMLSemanticError(m,V))}else if(R==="!"&&!L)O=!0;else try{return an(b,m)}catch(V){b.errors.push(V)}}switch(T){case c.Type.BLOCK_FOLDED:case c.Type.BLOCK_LITERAL:case c.Type.QUOTE_DOUBLE:case c.Type.QUOTE_SINGLE:return c.defaultTags.STR;case c.Type.FLOW_MAP:case c.Type.MAP:return c.defaultTags.MAP;case c.Type.FLOW_SEQ:case c.Type.SEQ:return c.defaultTags.SEQ;case c.Type.PLAIN:return O?c.defaultTags.STR:null;default:return null}}function fr(b,m,w){let{tags:T}=b.schema,O=[];for(let L of T)if(L.tag===w)if(L.test)O.push(L);else{let D=L.resolve(b,m);return D instanceof M?D:new k(D)}let R=rn(b,m);return typeof R=="string"&&O.length>0?B(R,O,T.scalarFallback):null}function Xr({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 Td(b,m,w){try{let T=fr(b,m,w);if(T)return w&&m.tag&&(T.tag=w),T}catch(T){return T.source||(T.source=m),b.errors.push(T),null}try{let T=Xr(m);if(!T)throw new Error(`The tag ${w} is unavailable`);let O=`The tag ${w} is unavailable, falling back to ${T}`;b.warnings.push(new c.YAMLWarning(m,O));let R=fr(b,m,T);return R.tag=w,R}catch(T){let O=new c.YAMLReferenceError(m,T.message);return O.stack=T.stack,b.errors.push(O),null}}var kd=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 vd(b,m){let w={before:[],after:[]},T=!1,O=!1,R=kd(m.context.parent)?m.context.parent.props.concat(m.props):m.props;for(let{start:L,end:D}of R)switch(m.context.src[L]){case c.Char.COMMENT:{if(!m.commentHasRequiredWhitespace(L)){let ye="Comments must be separated from other tokens by white space characters";b.push(new c.YAMLSemanticError(m,ye))}let{header:V,valueRange:K}=m;(K&&(L>K.start||V&&L>V.start)?w.after:w.before).push(m.context.src.slice(L+1,D));break}case c.Char.ANCHOR:if(T){let V="A node can have at most one anchor";b.push(new c.YAMLSemanticError(m,V))}T=!0;break;case c.Char.TAG:if(O){let V="A node can have at most one tag";b.push(new c.YAMLSemanticError(m,V))}O=!0;break}return{comments:w,hasAnchor:T,hasTag:O}}function Ad(b,m){let{anchors:w,errors:T,schema:O}=b;if(m.type===c.Type.ALIAS){let L=m.rawValue,D=w.getNode(L);if(!D){let K=`Aliased anchor not found: ${L}`;return T.push(new c.YAMLReferenceError(m,K)),null}let V=new xe(D);return w._cstAliases.push(V),V}let R=Yt(b,m);if(R)return Td(b,m,R);if(m.type!==c.Type.PLAIN){let L=`Failed to resolve ${m.type} node here`;return T.push(new c.YAMLSyntaxError(m,L)),null}try{let L=rn(b,m);return B(L,O.tags,O.tags.scalarFallback)}catch(L){return L.source||(L.source=m),T.push(L),null}}function mn(b,m){if(!m)return null;m.error&&b.errors.push(m.error);let{comments:w,hasAnchor:T,hasTag:O}=vd(b.errors,m);if(T){let{anchors:L}=b,D=m.anchor,V=L.getNode(D);V&&(L.map[L.newName(D)]=V),L.map[D]=m}if(m.type===c.Type.ALIAS&&(T||O)){let L="An alias node must not specify any properties";b.errors.push(new c.YAMLSemanticError(m,L))}let R=Ad(b,m);if(R){R.range=[m.range.start,m.range.end],b.options.keepCstNodes&&(R.cstNode=m),b.options.keepNodeTypes&&(R.type=m.type);let L=w.before.join(`
|
|
79
79
|
`);L&&(R.commentBefore=R.commentBefore?`${R.commentBefore}
|
|
80
80
|
${L}`:L);let D=w.after.join(`
|
|
81
81
|
`);D&&(R.comment=R.comment?`${R.comment}
|
|
82
|
-
${D}`:D)}return m.resolved=R}function
|
|
83
|
-
`)return!1;return!0};function
|
|
84
|
-
`){let Je="Implicit keys of flow sequence pairs need to be on a single line";b.errors.push(new c.YAMLSemanticError(V,Je));break}}}else R=null;L=null,
|
|
82
|
+
${D}`:D)}return m.resolved=R}function Ed(b,m){if(m.type!==c.Type.MAP&&m.type!==c.Type.FLOW_MAP){let L=`A ${m.type} node cannot be resolved as a mapping`;return b.errors.push(new c.YAMLSyntaxError(m,L)),null}let{comments:w,items:T}=m.type===c.Type.FLOW_MAP?Id(b,m):Rd(b,m),O=new Ye;O.items=T,Ut(O,w);let R=!1;for(let L=0;L<T.length;++L){let{key:D}=T[L];if(D instanceof M&&(R=!0),b.schema.merge&&D&&D.value===Ke){T[L]=new ie(T[L]);let V=T[L].value.items,K=null;V.some(ce=>{if(ce instanceof xe){let{type:ye}=ce.source;return ye===c.Type.MAP||ye===c.Type.FLOW_MAP?!1:K="Merge nodes aliases can only point to maps"}return K="Merge nodes can only have Alias nodes as values"}),K&&b.errors.push(new c.YAMLSemanticError(m,K))}else for(let V=L+1;V<T.length;++V){let{key:K}=T[V];if(D===K||D&&K&&Object.prototype.hasOwnProperty.call(D,"value")&&D.value===K.value){let ce=`Map keys must be unique; "${D}" is repeated`;b.errors.push(new c.YAMLSemanticError(m,ce));break}}}if(R&&!b.options.mapAsMap){let L="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,L))}return m.resolved=O,O}var _d=({context:{lineStart:b,node:m,src:w},props:T})=>{if(T.length===0)return!1;let{start:O}=T[0];if(m&&O>m.valueRange.start||w[O]!==c.Char.COMMENT)return!1;for(let R=b;R<O;++R)if(w[R]===`
|
|
83
|
+
`)return!1;return!0};function Od(b,m){if(!_d(b))return;let w=b.getPropValue(0,c.Char.COMMENT,!0),T=!1,O=m.value.commentBefore;if(O&&O.startsWith(w))m.value.commentBefore=O.substr(w.length+1),T=!0;else{let R=m.value.comment;!b.node&&R&&R.startsWith(w)&&(m.value.comment=R.substr(w.length+1),T=!0)}T&&(m.comment=w)}function Rd(b,m){let w=[],T=[],O,R=null;for(let L=0;L<m.items.length;++L){let D=m.items[L];switch(D.type){case c.Type.BLANK_LINE:w.push({afterKey:!!O,before:T.length});break;case c.Type.COMMENT:w.push({afterKey:!!O,before:T.length,comment:D.comment});break;case c.Type.MAP_KEY:O!==void 0&&T.push(new se(O)),D.error&&b.errors.push(D.error),O=mn(b,D.node),R=null;break;case c.Type.MAP_VALUE:{if(O===void 0&&(O=null),D.error&&b.errors.push(D.error),!D.context.atLineStart&&D.node&&D.node.type===c.Type.MAP&&!D.node.context.atLineStart){let ce="Nested mappings are not allowed in compact mappings";b.errors.push(new c.YAMLSemanticError(D.node,ce))}let V=D.node;if(!V&&D.props.length>0){V=new c.PlainValue(c.Type.PLAIN,[]),V.context={parent:D,src:D.context.src};let ce=D.range.start+1;if(V.range={start:ce,end:ce},V.valueRange={start:ce,end:ce},typeof D.range.origStart=="number"){let ye=D.range.origStart+1;V.range.origStart=V.range.origEnd=ye,V.valueRange.origStart=V.valueRange.origEnd=ye}}let K=new se(O,mn(b,V));Od(D,K),T.push(K),O&&typeof R=="number"&&D.range.start>R+1024&&b.errors.push($e(m,O)),O=void 0,R=null}break;default:O!==void 0&&T.push(new se(O)),O=mn(b,D),R=D.range.start,D.error&&b.errors.push(D.error);e:for(let V=L+1;;++V){let K=m.items[V];switch(K&&K.type){case c.Type.BLANK_LINE:case c.Type.COMMENT:continue e;case c.Type.MAP_VALUE:break e;default:{let ce="Implicit map keys need to be followed by map values";b.errors.push(new c.YAMLSemanticError(D,ce));break e}}}if(D.valueRangeContainsNewline){let V="Implicit map keys need to be on a single line";b.errors.push(new c.YAMLSemanticError(D,V))}}}return O!==void 0&&T.push(new se(O)),{comments:w,items:T}}function Id(b,m){let w=[],T=[],O,R=!1,L="{";for(let D=0;D<m.items.length;++D){let V=m.items[D];if(typeof V.char=="string"){let{char:K,offset:ce}=V;if(K==="?"&&O===void 0&&!R){R=!0,L=":";continue}if(K===":"){if(O===void 0&&(O=null),L===":"){L=",";continue}}else if(R&&(O===void 0&&K!==","&&(O=null),R=!1),O!==void 0&&(T.push(new se(O)),O=void 0,K===",")){L=":";continue}if(K==="}"){if(D===m.items.length-1)continue}else if(K===L){L=":";continue}let ye=`Flow map contains an unexpected ${K}`,et=new c.YAMLSyntaxError(m,ye);et.offset=ce,b.errors.push(et)}else V.type===c.Type.BLANK_LINE?w.push({afterKey:!!O,before:T.length}):V.type===c.Type.COMMENT?(Ce(b.errors,V),w.push({afterKey:!!O,before:T.length,comment:V.comment})):O===void 0?(L===","&&b.errors.push(new c.YAMLSemanticError(V,"Separator , missing in flow map")),O=mn(b,V)):(L!==","&&b.errors.push(new c.YAMLSemanticError(V,"Indicator : missing in flow map entry")),T.push(new se(O,mn(b,V))),O=void 0,R=!1)}return me(b.errors,m),O!==void 0&&T.push(new se(O)),{comments:w,items:T}}function Cd(b,m){if(m.type!==c.Type.SEQ&&m.type!==c.Type.FLOW_SEQ){let R=`A ${m.type} node cannot be resolved as a sequence`;return b.errors.push(new c.YAMLSyntaxError(m,R)),null}let{comments:w,items:T}=m.type===c.Type.FLOW_SEQ?Md(b,m):Pd(b,m),O=new q;if(O.items=T,Ut(O,w),!b.options.mapAsMap&&T.some(R=>R instanceof se&&R.key instanceof M)){let R="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";b.warnings.push(new c.YAMLWarning(m,R))}return m.resolved=O,O}function Pd(b,m){let w=[],T=[];for(let O=0;O<m.items.length;++O){let R=m.items[O];switch(R.type){case c.Type.BLANK_LINE:w.push({before:T.length});break;case c.Type.COMMENT:w.push({comment:R.comment,before:T.length});break;case c.Type.SEQ_ITEM:if(R.error&&b.errors.push(R.error),T.push(mn(b,R.node)),R.hasProps){let L="Sequence items cannot have tags or anchors before the - indicator";b.errors.push(new c.YAMLSemanticError(R,L))}break;default:R.error&&b.errors.push(R.error),b.errors.push(new c.YAMLSyntaxError(R,`Unexpected ${R.type} node in sequence`))}}return{comments:w,items:T}}function Md(b,m){let w=[],T=[],O=!1,R,L=null,D="[",V=null;for(let K=0;K<m.items.length;++K){let ce=m.items[K];if(typeof ce.char=="string"){let{char:ye,offset:et}=ce;if(ye!==":"&&(O||R!==void 0)&&(O&&R===void 0&&(R=D?T.pop():null),T.push(new se(R)),O=!1,R=void 0,L=null),ye===D)D=null;else if(!D&&ye==="?")O=!0;else if(D!=="["&&ye===":"&&R===void 0){if(D===","){if(R=T.pop(),R instanceof se){let Me="Chaining flow sequence pairs is invalid",Xe=new c.YAMLSemanticError(m,Me);Xe.offset=et,b.errors.push(Xe)}if(!O&&typeof L=="number"){let Me=ce.range?ce.range.start:ce.offset;Me>L+1024&&b.errors.push($e(m,R));let{src:Xe}=V.context;for(let De=L;De<Me;++De)if(Xe[De]===`
|
|
84
|
+
`){let Je="Implicit keys of flow sequence pairs need to be on a single line";b.errors.push(new c.YAMLSemanticError(V,Je));break}}}else R=null;L=null,O=!1,D=null}else if(D==="["||ye!=="]"||K<m.items.length-1){let Me=`Flow sequence contains an unexpected ${ye}`,Xe=new c.YAMLSyntaxError(m,Me);Xe.offset=et,b.errors.push(Xe)}}else if(ce.type===c.Type.BLANK_LINE)w.push({before:T.length});else if(ce.type===c.Type.COMMENT)Ce(b.errors,ce),w.push({comment:ce.comment,before:T.length});else{if(D){let et=`Expected a ${D} in flow sequence`;b.errors.push(new c.YAMLSemanticError(ce,et))}let ye=mn(b,ce);R===void 0?(T.push(ye),V=ce):(T.push(new se(R,ye)),R=void 0),L=ce.range.start,D=","}}return me(b.errors,m),R!==void 0&&T.push(new se(R)),{comments:w,items:T}}l.Alias=xe,l.Collection=M,l.Merge=ie,l.Node=x,l.Pair=se,l.Scalar=k,l.YAMLMap=Ye,l.YAMLSeq=q,l.addComment=S,l.binaryOptions=I,l.boolOptions=C,l.findPair=_e,l.intOptions=z,l.isEmptyPath=X,l.nullOptions=W,l.resolveMap=Ed,l.resolveNode=mn,l.resolveSeq=Cd,l.resolveString=rn,l.strOptions=G,l.stringifyNumber=fe,l.stringifyString=Y,l.toJSON=v}}),Na=Pt({"node_modules/yaml/dist/warnings-1000a372.js"(l){var c=cr(),f=Vr(),S={identify:B=>B instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(B,H)=>{let J=f.resolveString(B,H);if(typeof Buffer=="function")return Buffer.from(J,"base64");if(typeof atob=="function"){let le=atob(J.replace(/[\n\r]/g,"")),he=new Uint8Array(le.length);for(let ve=0;ve<le.length;++ve)he[ve]=le.charCodeAt(ve);return he}else{let le="This environment does not support reading binary tags; either Buffer or atob is required";return B.errors.push(new c.YAMLReferenceError(H,le)),null}},options:f.binaryOptions,stringify:({comment:B,type:H,value:J},le,he,ve)=>{let nt;if(typeof Buffer=="function")nt=J instanceof Buffer?J.toString("base64"):Buffer.from(J.buffer).toString("base64");else if(typeof btoa=="function"){let rt="";for(let at=0;at<J.length;++at)rt+=String.fromCharCode(J[at]);nt=btoa(rt)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(H||(H=f.binaryOptions.defaultType),H===c.Type.QUOTE_DOUBLE)J=nt;else{let{lineWidth:rt}=f.binaryOptions,at=Math.ceil(nt.length/rt),dt=new Array(at);for(let bt=0,ae=0;bt<at;++bt,ae+=rt)dt[bt]=nt.substr(ae,rt);J=dt.join(H===c.Type.BLOCK_LITERAL?`
|
|
85
85
|
`:" ")}return f.stringifyString({comment:B,type:H,value:J},le,he,ve)}};function x(B,H){let J=f.resolveSeq(B,H);for(let le=0;le<J.items.length;++le){let he=J.items[le];if(!(he instanceof f.Pair)){if(he instanceof f.YAMLMap){if(he.items.length>1){let nt="Each pair must have its own sequence indicator";throw new c.YAMLSemanticError(H,nt)}let ve=he.items[0]||new f.Pair;he.commentBefore&&(ve.commentBefore=ve.commentBefore?`${he.commentBefore}
|
|
86
86
|
${ve.commentBefore}`:he.commentBefore),he.comment&&(ve.comment=ve.comment?`${he.comment}
|
|
87
|
-
${ve.comment}`:he.comment),he=ve}J.items[le]=he instanceof f.Pair?he:new f.Pair(he)}}return J}function v(B,H,J){let le=new f.YAMLSeq(B);le.tag="tag:yaml.org,2002:pairs";for(let he of H){let ve,nt;if(Array.isArray(he))if(he.length===2)ve=he[0],nt=he[1];else throw new TypeError(`Expected [key, value] tuple: ${he}`);else if(he&&he instanceof Object){let at=Object.keys(he);if(at.length===1)ve=at[0],nt=he[ve];else throw new TypeError(`Expected { key: value } tuple: ${he}`)}else ve=he;let rt=B.createPair(ve,nt,J);le.items.push(rt)}return le}var k={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:x,createNode:v},N=class Zl 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=Zl.tag}toJSON(H,J){let le=new Map;J&&J.onCreate&&J.onCreate(le);for(let he of this.items){let ve,nt;if(he instanceof f.Pair?(ve=f.toJSON(he.key,"",J),nt=f.toJSON(he.value,ve,J)):ve=f.toJSON(he,"",J),le.has(ve))throw new Error("Ordered maps must not include duplicate keys");le.set(ve,nt)}return le}};c._defineProperty(N,"tag","tag:yaml.org,2002:omap");function X(B,H){let J=x(B,H),le=[];for(let{key:he}of J.items)if(he instanceof f.Scalar)if(le.includes(he.value)){let ve="Ordered maps must not include duplicate keys";throw new c.YAMLSemanticError(H,ve)}else le.push(he.value);return Object.assign(new N,J)}function M(B,H,J){let le=v(B,H,J),he=new N;return he.items=le.items,he}var re={identify:B=>B instanceof Map,nodeClass:N,default:!1,tag:"tag:yaml.org,2002:omap",resolve:X,createNode:M},q=class ec extends f.YAMLMap{constructor(){super(),this.tag=ec.tag}add(H){let J=H instanceof f.Pair?H:new f.Pair(H);f.findPair(this.items,J.key)||this.items.push(J)}get(H,J){let le=f.findPair(this.items,H);return!J&&le instanceof f.Pair?le.key instanceof f.Scalar?le.key.value:le.key:le}set(H,J){if(typeof J!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof J}`);let le=f.findPair(this.items,H);le&&!J?this.items.splice(this.items.indexOf(le),1):!le&&J&&this.items.push(new f.Pair(H))}toJSON(H,J){return super.toJSON(H,J,Set)}toString(H,J,le){if(!H)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(H,J,le);throw new Error("Set items must all have null values")}};c._defineProperty(q,"tag","tag:yaml.org,2002:set");function de(B,H){let J=f.resolveMap(B,H);if(!J.hasAllNullValues())throw new c.YAMLSemanticError(H,"Set items must all have null values");return Object.assign(new q,J)}function se(B,H,J){let le=new q;for(let he of H)le.items.push(B.createPair(he,null,J));return le}var Ue={identify:B=>B instanceof Set,nodeClass:q,default:!1,tag:"tag:yaml.org,2002:set",resolve:de,createNode:se},xe=(B,H)=>{let J=H.split(":").reduce((le,he)=>le*60+Number(he),0);return B==="-"?-J:J},Oe=({value:B})=>{if(isNaN(B)||!isFinite(B))return f.stringifyNumber(B);let H="";B<0&&(H="-",B=Math.abs(B));let J=[B%60];return B<60?J.unshift(0):(B=Math.round((B-J[0])/60),J.unshift(B%60),B>=60&&(B=Math.round((B-J[0])/60),J.unshift(B))),H+J.map(le=>le<10?"0"+String(le):String(le)).join(":").replace(/000000\d*$/,"")},Ye={identify:B=>typeof B=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(B,H,J)=>xe(H,J.replace(/_/g,"")),stringify:Oe},Ke={identify:B=>typeof B=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(B,H,J)=>xe(H,J.replace(/_/g,"")),stringify:Oe},ie={identify:B=>B 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:(B,H,J,le,he,ve,nt,rt,at)=>{rt&&(rt=(rt+"00").substr(1,3));let dt=Date.UTC(H,J-1,le,he||0,ve||0,nt||0,rt||0);if(at&&at!=="Z"){let bt=xe(at[0],at.slice(1));Math.abs(bt)<30&&(bt*=60),dt-=6e4*bt}return new Date(dt)},stringify:({value:B})=>B.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function I(B){let H=typeof process!="undefined"&&process.env||{};return B?typeof YAML_SILENCE_DEPRECATION_WARNINGS!="undefined"?!YAML_SILENCE_DEPRECATION_WARNINGS:!H.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS!="undefined"?!YAML_SILENCE_WARNINGS:!H.YAML_SILENCE_WARNINGS}function C(B,H){if(I(!1)){let J=typeof process!="undefined"&&process.emitWarning;J?J(B,H):console.warn(H?`${H}: ${B}`:B)}}function z(B){if(I(!0)){let H=B.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");C(`The endpoint 'yaml/${H}' will be removed in a future release.`,"DeprecationWarning")}}var W={};function G(B,H){if(!W[B]&&I(!0)){W[B]=!0;let J=`The option '${B}' will be removed in a future release`;J+=H?`, use '${H}' instead.`:".",C(J,"DeprecationWarning")}}l.binary=S,l.floatTime=Ke,l.intTime=Ye,l.omap=re,l.pairs=k,l.set=Ue,l.timestamp=ie,l.warn=C,l.warnFileDeprecation=z,l.warnOptionDeprecation=G}}),rl=Pt({"node_modules/yaml/dist/Schema-88e323a7.js"(l){var c=cr(),f=Vr(),S=Na();function x(A,Y,fe){let me=new f.YAMLMap(A);if(Y instanceof Map)for(let[Ce,$e]of Y)me.items.push(A.createPair(Ce,$e,fe));else if(Y&&typeof Y=="object")for(let Ce of Object.keys(Y))me.items.push(A.createPair(Ce,Y[Ce],fe));return typeof A.sortMapEntries=="function"&&me.items.sort(A.sortMapEntries),me}var v={createNode:x,default:!0,nodeClass:f.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:f.resolveMap};function k(A,Y,fe){let me=new f.YAMLSeq(A);if(Y&&Y[Symbol.iterator])for(let Ce of Y){let $e=A.createNode(Ce,fe.wrapScalars,null,fe);me.items.push($e)}return me}var N={createNode:k,default:!0,nodeClass:f.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:f.resolveSeq},X={identify:A=>typeof A=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:f.resolveString,stringify(A,Y,fe,me){return Y=Object.assign({actualString:!0},Y),f.stringifyString(A,Y,fe,me)},options:f.strOptions},M=[v,N,X],re=A=>typeof A=="bigint"||Number.isInteger(A),q=(A,Y,fe)=>f.intOptions.asBigInt?BigInt(A):parseInt(Y,fe);function de(A,Y,fe){let{value:me}=A;return re(me)&&me>=0?fe+me.toString(Y):f.stringifyNumber(A)}var se={identify:A=>A==null,createNode:(A,Y,fe)=>fe.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},Ue={identify:A=>typeof A=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:A=>A[0]==="t"||A[0]==="T",options:f.boolOptions,stringify:({value:A})=>A?f.boolOptions.trueStr:f.boolOptions.falseStr},xe={identify:A=>re(A)&&A>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(A,Y)=>q(A,Y,8),options:f.intOptions,stringify:A=>de(A,8,"0o")},Oe={identify:re,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:A=>q(A,A,10),options:f.intOptions,stringify:f.stringifyNumber},Ye={identify:A=>re(A)&&A>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(A,Y)=>q(A,Y,16),options:f.intOptions,stringify:A=>de(A,16,"0x")},Ke={identify:A=>typeof A=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(A,Y)=>Y?NaN:A[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:f.stringifyNumber},ie={identify:A=>typeof A=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:A=>parseFloat(A),stringify:({value:A})=>Number(A).toExponential()},I={identify:A=>typeof A=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(A,Y,fe){let me=Y||fe,Ce=new f.Scalar(parseFloat(A));return me&&me[me.length-1]==="0"&&(Ce.minFractionDigits=me.length),Ce},stringify:f.stringifyNumber},C=M.concat([se,Ue,xe,Oe,Ye,Ke,ie,I]),z=A=>typeof A=="bigint"||Number.isInteger(A),W=({value:A})=>JSON.stringify(A),G=[v,N,{identify:A=>typeof A=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:f.resolveString,stringify:W},{identify:A=>A==null,createNode:(A,Y,fe)=>fe.wrapScalars?new f.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:W},{identify:A=>typeof A=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:A=>A==="true",stringify:W},{identify:z,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:A=>f.intOptions.asBigInt?BigInt(A):parseInt(A,10),stringify:({value:A})=>z(A)?A.toString():JSON.stringify(A)},{identify:A=>typeof A=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:A=>parseFloat(A),stringify:W}];G.scalarFallback=A=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(A)}`)};var B=({value:A})=>A?f.boolOptions.trueStr:f.boolOptions.falseStr,H=A=>typeof A=="bigint"||Number.isInteger(A);function J(A,Y,fe){let me=Y.replace(/_/g,"");if(f.intOptions.asBigInt){switch(fe){case 2:me=`0b${me}`;break;case 8:me=`0o${me}`;break;case 16:me=`0x${me}`;break}let $e=BigInt(me);return A==="-"?BigInt(-1)*$e:$e}let Ce=parseInt(me,fe);return A==="-"?-1*Ce:Ce}function le(A,Y,fe){let{value:me}=A;if(H(me)){let Ce=me.toString(Y);return me<0?"-"+fe+Ce.substr(1):fe+Ce}return f.stringifyNumber(A)}var he=M.concat([{identify:A=>A==null,createNode:(A,Y,fe)=>fe.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:A=>typeof A=="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:B},{identify:A=>typeof A=="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:B},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(A,Y,fe)=>J(Y,fe,2),stringify:A=>le(A,2,"0b")},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(A,Y,fe)=>J(Y,fe,8),stringify:A=>le(A,8,"0")},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(A,Y,fe)=>J(Y,fe,10),stringify:f.stringifyNumber},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(A,Y,fe)=>J(Y,fe,16),stringify:A=>le(A,16,"0x")},{identify:A=>typeof A=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(A,Y)=>Y?NaN:A[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:f.stringifyNumber},{identify:A=>typeof A=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:A=>parseFloat(A.replace(/_/g,"")),stringify:({value:A})=>Number(A).toExponential()},{identify:A=>typeof A=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(A,Y){let fe=new f.Scalar(parseFloat(A.replace(/_/g,"")));if(Y){let me=Y.replace(/_/g,"");me[me.length-1]==="0"&&(fe.minFractionDigits=me.length)}return fe},stringify:f.stringifyNumber}],S.binary,S.omap,S.pairs,S.set,S.intTime,S.floatTime,S.timestamp),ve={core:C,failsafe:M,json:G,yaml11:he},nt={binary:S.binary,bool:Ue,float:I,floatExp:ie,floatNaN:Ke,floatTime:S.floatTime,int:Oe,intHex:Ye,intOct:xe,intTime:S.intTime,map:v,null:se,omap:S.omap,pairs:S.pairs,seq:N,set:S.set,timestamp:S.timestamp};function rt(A,Y,fe){if(Y){let me=fe.filter($e=>$e.tag===Y),Ce=me.find($e=>!$e.format)||me[0];if(!Ce)throw new Error(`Tag ${Y} not found`);return Ce}return fe.find(me=>(me.identify&&me.identify(A)||me.class&&A instanceof me.class)&&!me.format)}function at(A,Y,fe){if(A instanceof f.Node)return A;let{defaultPrefix:me,onTagObj:Ce,prevObjects:$e,schema:Ut,wrapScalars:rn}=fe;Y&&Y.startsWith("!!")&&(Y=me+Y.slice(2));let an=rt(A,Y,Ut.tags);if(!an){if(typeof A.toJSON=="function"&&(A=A.toJSON()),!A||typeof A!="object")return rn?new f.Scalar(A):A;an=A instanceof Map?v:A[Symbol.iterator]?N:v}Ce&&(Ce(an),delete fe.onTagObj);let Yt={value:void 0,node:void 0};if(A&&typeof A=="object"&&$e){let fr=$e.get(A);if(fr){let Xr=new f.Alias(fr);return fe.aliasNodes.push(Xr),Xr}Yt.value=A,$e.set(A,Yt)}return Yt.node=an.createNode?an.createNode(fe.schema,A,fe):rn?new f.Scalar(A):A,Y&&Yt.node instanceof f.Node&&(Yt.node.tag=Y),Yt.node}function dt(A,Y,fe,me){let Ce=A[me.replace(/\W/g,"")];if(!Ce){let $e=Object.keys(A).map(Ut=>JSON.stringify(Ut)).join(", ");throw new Error(`Unknown schema "${me}"; use one of ${$e}`)}if(Array.isArray(fe))for(let $e of fe)Ce=Ce.concat($e);else typeof fe=="function"&&(Ce=fe(Ce.slice()));for(let $e=0;$e<Ce.length;++$e){let Ut=Ce[$e];if(typeof Ut=="string"){let rn=Y[Ut];if(!rn){let an=Object.keys(Y).map(Yt=>JSON.stringify(Yt)).join(", ");throw new Error(`Unknown custom tag "${Ut}"; use one of ${an}`)}Ce[$e]=rn}}return Ce}var bt=(A,Y)=>A.key<Y.key?-1:A.key>Y.key?1:0,ae=class tc{constructor({customTags:Y,merge:fe,schema:me,sortMapEntries:Ce,tags:$e}){this.merge=!!fe,this.name=me,this.sortMapEntries=Ce===!0?bt:Ce||null,!Y&&$e&&S.warnOptionDeprecation("tags","customTags"),this.tags=dt(ve,nt,Y||$e,me)}createNode(Y,fe,me,Ce){let $e={defaultPrefix:tc.defaultPrefix,schema:this,wrapScalars:fe},Ut=Ce?Object.assign(Ce,$e):$e;return at(Y,me,Ut)}createPair(Y,fe,me){me||(me={wrapScalars:!0});let Ce=this.createNode(Y,me.wrapScalars,null,me),$e=this.createNode(fe,me.wrapScalars,null,me);return new f.Pair(Ce,$e)}};c._defineProperty(ae,"defaultPrefix",c.defaultTagPrefix),c._defineProperty(ae,"defaultTags",c.defaultTags),l.Schema=ae}}),il=Pt({"node_modules/yaml/dist/types.js"(l){var c=Vr(),f=rl();cr(),Na(),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}}),La={},Da=()=>La,al=l=>{Object.assign(La,l)},ol=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}},Fa=ol,Ve={},Ua=Ve,Ve.defaultInvalidTypeProduct=void 0,Ve.defaultRandExpMax=10,Ve.pruneProperties=[],Ve.ignoreProperties=[],Ve.ignoreMissingRefs=!1,Ve.failOnInvalidTypes=!0,Ve.failOnInvalidFormat=!0,Ve.alwaysFakeOptionals=!1,Ve.optionalsProbability=null,Ve.fixedProbabilities=!1,Ve.useExamplesValue=!1,Ve.useDefaultValue=!1,Ve.requiredOnly=!1,Ve.omitNulls=!1,Ve.minItems=0,Ve.maxItems=null,Ve.minLength=0,Ve.maxLength=null,Ve.resolveJsonPath=!1,Ve.reuseProperties=!1,Ve.fillProperties=!0,Ve.sortProperties=!1,Ve.replaceEmptyByRandomValue=!1,Ve.random=Math.random,Ve.minDateTime=new Date("1889-12-31T00:00:00.000Z"),Ve.maxDateTime=new Date("1970-01-01T00:00:01.000Z"),Ve.renderTitle=!0,Ve.renderDescription=!0,Ve.renderComment=!1,sl=class extends Fa{constructor(){super(),this.data={...Ua},this._defaults=Ua}get defaults(){return{...this._defaults}}},ll=sl,ur=new ll,d.getDefaults=()=>ur.defaults,Ae=d,$a=["integer","number","string","boolean"],qa=$a.concat(["null"]),cl=["array","object"].concat(qa),ul=2524608e6,pl=-1e8,dl=1e8,hl=-100,fl=100,Ht={ALLOWED_TYPES:$a,SCALAR_TYPES:qa,ALL_TYPES:cl,MIN_NUMBER:hl,MAX_NUMBER:fl,MIN_INTEGER:pl,MAX_INTEGER:dl,MOST_NEAR_DATETIME:ul},Wr=Ma(nl(),1),ke={pick:g,date:pe,shuffle:P,number:Q,randexp:y},ml=/^(0|[1-9][0-9]*)$/,We={hasProperties:U,getLocalRef:te,omitProps:E,typecast:qe,merge:F,clone:Se,short:je,hasValue:Ie,notValue:Pe,anyValue:ge,validate:ot,validateValueForSchema:Ze,validateValueForOneOf:Rt,isKey:Lt,template:xt,shouldClean:O,clean:gt,isEmpty:It,clampDate:Fe},gl=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]=Xt(()=>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 x=c[S].replace(/^x-/,""),v=this.support[x];if(typeof v=="function"){Object.defineProperty(l,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(k,N)=>v.call(f,l[c[S]],l,c[S],k,N.slice())});break}}}return l}},yl=gl,Bn=new Fa,ja=ar,bl=class extends Error{constructor(l,c){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=l,this.path=c}},Hr=bl,pr={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"]},pr.number=pr.integer,wl=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"],Sl=ct,xl=An,Tl=xl,kl=Tl,vl=Bt,El=vl,Al=El,Ol=fn,Ba=or,_l=va,Rl=`Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore
|
|
87
|
+
${ve.comment}`:he.comment),he=ve}J.items[le]=he instanceof f.Pair?he:new f.Pair(he)}}return J}function v(B,H,J){let le=new f.YAMLSeq(B);le.tag="tag:yaml.org,2002:pairs";for(let he of H){let ve,nt;if(Array.isArray(he))if(he.length===2)ve=he[0],nt=he[1];else throw new TypeError(`Expected [key, value] tuple: ${he}`);else if(he&&he instanceof Object){let at=Object.keys(he);if(at.length===1)ve=at[0],nt=he[ve];else throw new TypeError(`Expected { key: value } tuple: ${he}`)}else ve=he;let rt=B.createPair(ve,nt,J);le.items.push(rt)}return le}var k={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:x,createNode:v},N=class Zl 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=Zl.tag}toJSON(H,J){let le=new Map;J&&J.onCreate&&J.onCreate(le);for(let he of this.items){let ve,nt;if(he instanceof f.Pair?(ve=f.toJSON(he.key,"",J),nt=f.toJSON(he.value,ve,J)):ve=f.toJSON(he,"",J),le.has(ve))throw new Error("Ordered maps must not include duplicate keys");le.set(ve,nt)}return le}};c._defineProperty(N,"tag","tag:yaml.org,2002:omap");function X(B,H){let J=x(B,H),le=[];for(let{key:he}of J.items)if(he instanceof f.Scalar)if(le.includes(he.value)){let ve="Ordered maps must not include duplicate keys";throw new c.YAMLSemanticError(H,ve)}else le.push(he.value);return Object.assign(new N,J)}function M(B,H,J){let le=v(B,H,J),he=new N;return he.items=le.items,he}var re={identify:B=>B instanceof Map,nodeClass:N,default:!1,tag:"tag:yaml.org,2002:omap",resolve:X,createNode:M},q=class ec extends f.YAMLMap{constructor(){super(),this.tag=ec.tag}add(H){let J=H instanceof f.Pair?H:new f.Pair(H);f.findPair(this.items,J.key)||this.items.push(J)}get(H,J){let le=f.findPair(this.items,H);return!J&&le instanceof f.Pair?le.key instanceof f.Scalar?le.key.value:le.key:le}set(H,J){if(typeof J!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof J}`);let le=f.findPair(this.items,H);le&&!J?this.items.splice(this.items.indexOf(le),1):!le&&J&&this.items.push(new f.Pair(H))}toJSON(H,J){return super.toJSON(H,J,Set)}toString(H,J,le){if(!H)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(H,J,le);throw new Error("Set items must all have null values")}};c._defineProperty(q,"tag","tag:yaml.org,2002:set");function de(B,H){let J=f.resolveMap(B,H);if(!J.hasAllNullValues())throw new c.YAMLSemanticError(H,"Set items must all have null values");return Object.assign(new q,J)}function se(B,H,J){let le=new q;for(let he of H)le.items.push(B.createPair(he,null,J));return le}var Ue={identify:B=>B instanceof Set,nodeClass:q,default:!1,tag:"tag:yaml.org,2002:set",resolve:de,createNode:se},xe=(B,H)=>{let J=H.split(":").reduce((le,he)=>le*60+Number(he),0);return B==="-"?-J:J},_e=({value:B})=>{if(isNaN(B)||!isFinite(B))return f.stringifyNumber(B);let H="";B<0&&(H="-",B=Math.abs(B));let J=[B%60];return B<60?J.unshift(0):(B=Math.round((B-J[0])/60),J.unshift(B%60),B>=60&&(B=Math.round((B-J[0])/60),J.unshift(B))),H+J.map(le=>le<10?"0"+String(le):String(le)).join(":").replace(/000000\d*$/,"")},Ye={identify:B=>typeof B=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(B,H,J)=>xe(H,J.replace(/_/g,"")),stringify:_e},Ke={identify:B=>typeof B=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(B,H,J)=>xe(H,J.replace(/_/g,"")),stringify:_e},ie={identify:B=>B 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:(B,H,J,le,he,ve,nt,rt,at)=>{rt&&(rt=(rt+"00").substr(1,3));let dt=Date.UTC(H,J-1,le,he||0,ve||0,nt||0,rt||0);if(at&&at!=="Z"){let bt=xe(at[0],at.slice(1));Math.abs(bt)<30&&(bt*=60),dt-=6e4*bt}return new Date(dt)},stringify:({value:B})=>B.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function I(B){let H=typeof process!="undefined"&&process.env||{};return B?typeof YAML_SILENCE_DEPRECATION_WARNINGS!="undefined"?!YAML_SILENCE_DEPRECATION_WARNINGS:!H.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS!="undefined"?!YAML_SILENCE_WARNINGS:!H.YAML_SILENCE_WARNINGS}function C(B,H){if(I(!1)){let J=typeof process!="undefined"&&process.emitWarning;J?J(B,H):console.warn(H?`${H}: ${B}`:B)}}function z(B){if(I(!0)){let H=B.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");C(`The endpoint 'yaml/${H}' will be removed in a future release.`,"DeprecationWarning")}}var W={};function G(B,H){if(!W[B]&&I(!0)){W[B]=!0;let J=`The option '${B}' will be removed in a future release`;J+=H?`, use '${H}' instead.`:".",C(J,"DeprecationWarning")}}l.binary=S,l.floatTime=Ke,l.intTime=Ye,l.omap=re,l.pairs=k,l.set=Ue,l.timestamp=ie,l.warn=C,l.warnFileDeprecation=z,l.warnOptionDeprecation=G}}),rl=Pt({"node_modules/yaml/dist/Schema-88e323a7.js"(l){var c=cr(),f=Vr(),S=Na();function x(E,Y,fe){let me=new f.YAMLMap(E);if(Y instanceof Map)for(let[Ce,$e]of Y)me.items.push(E.createPair(Ce,$e,fe));else if(Y&&typeof Y=="object")for(let Ce of Object.keys(Y))me.items.push(E.createPair(Ce,Y[Ce],fe));return typeof E.sortMapEntries=="function"&&me.items.sort(E.sortMapEntries),me}var v={createNode:x,default:!0,nodeClass:f.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:f.resolveMap};function k(E,Y,fe){let me=new f.YAMLSeq(E);if(Y&&Y[Symbol.iterator])for(let Ce of Y){let $e=E.createNode(Ce,fe.wrapScalars,null,fe);me.items.push($e)}return me}var N={createNode:k,default:!0,nodeClass:f.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:f.resolveSeq},X={identify:E=>typeof E=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:f.resolveString,stringify(E,Y,fe,me){return Y=Object.assign({actualString:!0},Y),f.stringifyString(E,Y,fe,me)},options:f.strOptions},M=[v,N,X],re=E=>typeof E=="bigint"||Number.isInteger(E),q=(E,Y,fe)=>f.intOptions.asBigInt?BigInt(E):parseInt(Y,fe);function de(E,Y,fe){let{value:me}=E;return re(me)&&me>=0?fe+me.toString(Y):f.stringifyNumber(E)}var se={identify:E=>E==null,createNode:(E,Y,fe)=>fe.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},Ue={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=>re(E)&&E>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(E,Y)=>q(E,Y,8),options:f.intOptions,stringify:E=>de(E,8,"0o")},_e={identify:re,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:E=>q(E,E,10),options:f.intOptions,stringify:f.stringifyNumber},Ye={identify:E=>re(E)&&E>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(E,Y)=>q(E,Y,16),options:f.intOptions,stringify:E=>de(E,16,"0x")},Ke={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(E,Y)=>Y?NaN:E[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:f.stringifyNumber},ie={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:E=>parseFloat(E),stringify:({value:E})=>Number(E).toExponential()},I={identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(E,Y,fe){let me=Y||fe,Ce=new f.Scalar(parseFloat(E));return me&&me[me.length-1]==="0"&&(Ce.minFractionDigits=me.length),Ce},stringify:f.stringifyNumber},C=M.concat([se,Ue,xe,_e,Ye,Ke,ie,I]),z=E=>typeof E=="bigint"||Number.isInteger(E),W=({value:E})=>JSON.stringify(E),G=[v,N,{identify:E=>typeof E=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:f.resolveString,stringify:W},{identify:E=>E==null,createNode:(E,Y,fe)=>fe.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:z,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})=>z(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}];G.scalarFallback=E=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(E)}`)};var B=({value:E})=>E?f.boolOptions.trueStr:f.boolOptions.falseStr,H=E=>typeof E=="bigint"||Number.isInteger(E);function J(E,Y,fe){let me=Y.replace(/_/g,"");if(f.intOptions.asBigInt){switch(fe){case 2:me=`0b${me}`;break;case 8:me=`0o${me}`;break;case 16:me=`0x${me}`;break}let $e=BigInt(me);return E==="-"?BigInt(-1)*$e:$e}let Ce=parseInt(me,fe);return E==="-"?-1*Ce:Ce}function le(E,Y,fe){let{value:me}=E;if(H(me)){let Ce=me.toString(Y);return me<0?"-"+fe+Ce.substr(1):fe+Ce}return f.stringifyNumber(E)}var he=M.concat([{identify:E=>E==null,createNode:(E,Y,fe)=>fe.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:B},{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:B},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(E,Y,fe)=>J(Y,fe,2),stringify:E=>le(E,2,"0b")},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(E,Y,fe)=>J(Y,fe,8),stringify:E=>le(E,8,"0")},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(E,Y,fe)=>J(Y,fe,10),stringify:f.stringifyNumber},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(E,Y,fe)=>J(Y,fe,16),stringify:E=>le(E,16,"0x")},{identify:E=>typeof E=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(E,Y)=>Y?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,Y){let fe=new f.Scalar(parseFloat(E.replace(/_/g,"")));if(Y){let me=Y.replace(/_/g,"");me[me.length-1]==="0"&&(fe.minFractionDigits=me.length)}return fe},stringify:f.stringifyNumber}],S.binary,S.omap,S.pairs,S.set,S.intTime,S.floatTime,S.timestamp),ve={core:C,failsafe:M,json:G,yaml11:he},nt={binary:S.binary,bool:Ue,float:I,floatExp:ie,floatNaN:Ke,floatTime:S.floatTime,int:_e,intHex:Ye,intOct:xe,intTime:S.intTime,map:v,null:se,omap:S.omap,pairs:S.pairs,seq:N,set:S.set,timestamp:S.timestamp};function rt(E,Y,fe){if(Y){let me=fe.filter($e=>$e.tag===Y),Ce=me.find($e=>!$e.format)||me[0];if(!Ce)throw new Error(`Tag ${Y} not found`);return Ce}return fe.find(me=>(me.identify&&me.identify(E)||me.class&&E instanceof me.class)&&!me.format)}function at(E,Y,fe){if(E instanceof f.Node)return E;let{defaultPrefix:me,onTagObj:Ce,prevObjects:$e,schema:Ut,wrapScalars:rn}=fe;Y&&Y.startsWith("!!")&&(Y=me+Y.slice(2));let an=rt(E,Y,Ut.tags);if(!an){if(typeof E.toJSON=="function"&&(E=E.toJSON()),!E||typeof E!="object")return rn?new f.Scalar(E):E;an=E instanceof Map?v:E[Symbol.iterator]?N:v}Ce&&(Ce(an),delete fe.onTagObj);let Yt={value:void 0,node:void 0};if(E&&typeof E=="object"&&$e){let fr=$e.get(E);if(fr){let Xr=new f.Alias(fr);return fe.aliasNodes.push(Xr),Xr}Yt.value=E,$e.set(E,Yt)}return Yt.node=an.createNode?an.createNode(fe.schema,E,fe):rn?new f.Scalar(E):E,Y&&Yt.node instanceof f.Node&&(Yt.node.tag=Y),Yt.node}function dt(E,Y,fe,me){let Ce=E[me.replace(/\W/g,"")];if(!Ce){let $e=Object.keys(E).map(Ut=>JSON.stringify(Ut)).join(", ");throw new Error(`Unknown schema "${me}"; use one of ${$e}`)}if(Array.isArray(fe))for(let $e of fe)Ce=Ce.concat($e);else typeof fe=="function"&&(Ce=fe(Ce.slice()));for(let $e=0;$e<Ce.length;++$e){let Ut=Ce[$e];if(typeof Ut=="string"){let rn=Y[Ut];if(!rn){let an=Object.keys(Y).map(Yt=>JSON.stringify(Yt)).join(", ");throw new Error(`Unknown custom tag "${Ut}"; use one of ${an}`)}Ce[$e]=rn}}return Ce}var bt=(E,Y)=>E.key<Y.key?-1:E.key>Y.key?1:0,ae=class tc{constructor({customTags:Y,merge:fe,schema:me,sortMapEntries:Ce,tags:$e}){this.merge=!!fe,this.name=me,this.sortMapEntries=Ce===!0?bt:Ce||null,!Y&&$e&&S.warnOptionDeprecation("tags","customTags"),this.tags=dt(ve,nt,Y||$e,me)}createNode(Y,fe,me,Ce){let $e={defaultPrefix:tc.defaultPrefix,schema:this,wrapScalars:fe},Ut=Ce?Object.assign(Ce,$e):$e;return at(Y,me,Ut)}createPair(Y,fe,me){me||(me={wrapScalars:!0});let Ce=this.createNode(Y,me.wrapScalars,null,me),$e=this.createNode(fe,me.wrapScalars,null,me);return new f.Pair(Ce,$e)}};c._defineProperty(ae,"defaultPrefix",c.defaultTagPrefix),c._defineProperty(ae,"defaultTags",c.defaultTags),l.Schema=ae}}),il=Pt({"node_modules/yaml/dist/types.js"(l){var c=Vr(),f=rl();cr(),Na(),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}}),La={},Da=()=>La,al=l=>{Object.assign(La,l)},ol=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}},Fa=ol,Ve={},Ua=Ve,Ve.defaultInvalidTypeProduct=void 0,Ve.defaultRandExpMax=10,Ve.pruneProperties=[],Ve.ignoreProperties=[],Ve.ignoreMissingRefs=!1,Ve.failOnInvalidTypes=!0,Ve.failOnInvalidFormat=!0,Ve.alwaysFakeOptionals=!1,Ve.optionalsProbability=null,Ve.fixedProbabilities=!1,Ve.useExamplesValue=!1,Ve.useDefaultValue=!1,Ve.requiredOnly=!1,Ve.omitNulls=!1,Ve.minItems=0,Ve.maxItems=null,Ve.minLength=0,Ve.maxLength=null,Ve.resolveJsonPath=!1,Ve.reuseProperties=!1,Ve.fillProperties=!0,Ve.sortProperties=!1,Ve.replaceEmptyByRandomValue=!1,Ve.random=Math.random,Ve.minDateTime=new Date("1889-12-31T00:00:00.000Z"),Ve.maxDateTime=new Date("1970-01-01T00:00:01.000Z"),Ve.renderTitle=!0,Ve.renderDescription=!0,Ve.renderComment=!1,sl=class extends Fa{constructor(){super(),this.data={...Ua},this._defaults=Ua}get defaults(){return{...this._defaults}}},ll=sl,ur=new ll,d.getDefaults=()=>ur.defaults,Ee=d,$a=["integer","number","string","boolean"],qa=$a.concat(["null"]),cl=["array","object"].concat(qa),ul=2524608e6,pl=-1e8,dl=1e8,hl=-100,fl=100,Ht={ALLOWED_TYPES:$a,SCALAR_TYPES:qa,ALL_TYPES:cl,MIN_NUMBER:hl,MAX_NUMBER:fl,MIN_INTEGER:pl,MAX_INTEGER:dl,MOST_NEAR_DATETIME:ul},Wr=Ma(nl(),1),ke={pick:g,date:pe,shuffle:P,number:Q,randexp:y},ml=/^(0|[1-9][0-9]*)$/,We={hasProperties:U,getLocalRef:te,omitProps:A,typecast:qe,merge:F,clone:Se,short:je,hasValue:Ie,notValue:Pe,anyValue:ge,validate:ot,validateValueForSchema:Ze,validateValueForOneOf:Rt,isKey:Lt,template:xt,shouldClean:_,clean:gt,isEmpty:It,clampDate:Fe},gl=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]=Xt(()=>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 x=c[S].replace(/^x-/,""),v=this.support[x];if(typeof v=="function"){Object.defineProperty(l,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(k,N)=>v.call(f,l[c[S]],l,c[S],k,N.slice())});break}}}return l}},yl=gl,Bn=new Fa,ja=ar,bl=class extends Error{constructor(l,c){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=l,this.path=c}},Hr=bl,pr={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"]},pr.number=pr.integer,wl=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"],Sl=ct,xl=En,Tl=xl,kl=Tl,vl=Bt,Al=vl,El=Al,_l=fn,Ba=or,Ol=va,Rl=`Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore
|
|
88
88
|
et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
|
|
89
89
|
commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
90
90
|
pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est
|
|
91
|
-
laborum`.split(/\W/),Yr=qr,Jr={type:Ht.ALLOWED_TYPES},Il=jr,za=Ea,Cl=Br,Gr=zr,Pl=Aa,Ml=Oa,Va="[a-zA-Z][a-zA-Z0-9+-.]*",Kr=`https?://{hostname}(?:${Va})+`,Nl="(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?",Ft={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:Kr,slug:"[a-zA-Z\\d_-]+","uri-reference":`${Kr}${Nl}`,"uri-template":Kr.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${Va.replace("]*","/]*")}|~[01]))+`,uuid:"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",duration:"^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$"},Ft.iri=Ft["uri-reference"],Ft["iri-reference"]=Ft["uri-reference"],Ft["idn-email"]=Ft.email,Ft["idn-hostname"]=Ft.hostname,Ll=new RegExp(`\\{(${Object.keys(Ft).join("|")})\\}`),Dl=_a,Fl=Ia,Ul={boolean:kl,null:Al,array:Ol,integer:_l,number:Ba,object:Il,string:Fl},dr=Ul,$l=ne,ql=({refs:l,schema:c,container:f,synchronous:S,refDepthMax:x,refDepthMin:v})=>{let k={},N={},X=0,M,re;return k.resolveSchema=(q,de,se)=>{if(q==null)return null;if(typeof q.generate=="function")return q;if(typeof(q.$id||q.id)=="string"&&(delete q.id,delete q.$id,delete q.$schema),typeof q.$ref=="string"){let xe=Math.max(v,x)-1;if(q.$ref==="#"||N[q.$ref]<0||M===q.$ref&&++X>xe)return q.$ref!=="#"&&re&&re.length===se.length?We.getLocalRef(c,q.$ref,S&&l):(delete q.$ref,q);typeof N[q.$ref]=="undefined"&&(N[q.$ref]=ke.number(v,x)-1),re=se,M=q.$ref;let Oe;q.$ref.indexOf("#/")===-1?Oe=l[q.$ref]||null:Oe=We.getLocalRef(c,q.$ref,S&&l)||null;let Ye;if(typeof Oe!="undefined"){if(!Oe&&Ae("ignoreMissingRefs")!==!0)throw new Error(`Reference not found: ${q.$ref}`);N[q.$ref]-=1,We.merge(q,Oe||{}),Ye=S&&Oe&&Oe.$ref}return Ye||delete q.$ref,q}if(Array.isArray(q.allOf)){let xe=q.allOf;delete q.allOf,xe.forEach(Oe=>{let Ye=k.resolveSchema(Oe,null,se);We.merge(q,typeof Ye.thunk=="function"?Ye.thunk(q):Ye),Array.isArray(q.allOf)&&k.resolveSchema(q,de,se)})}if(Array.isArray(q.oneOf||q.anyOf)&&se[se.length-2]!=="dependencies"){let xe=q.oneOf||q.anyOf;return q.enum&&q.oneOf&&(q.enum=q.enum.filter(Oe=>We.validate(Oe,xe))),{thunk(Oe){let Ye=We.omitProps(q,["anyOf","oneOf"]),Ke=ke.pick(xe);return We.merge(Ye,Ke),xe.forEach(ie=>{ie.required&&ie!==Ke&&ie.required.forEach(I=>{if(Ke.required&&Ke.required.includes(I))return;let C=Ye.required&&Ye.required.includes(I);Ye.properties&&!C&&delete Ye.properties[I],Oe&&Oe.properties&&delete Oe.properties[I]})}),Ye}}}if(Object.keys(q).forEach(xe=>{(Array.isArray(q[xe])||typeof q[xe]=="object")&&!We.isKey(xe)&&(q[xe]=k.resolveSchema(q[xe],xe,se.concat(xe)))}),se){let xe=se[se.length-1];if(xe==="properties"||xe==="items")return q}return f.wrap(q)},k},jl=ql,Wa=Ct,Ha=Zt,Tt=Ma(il(),1),ld=Tt.default.binaryOptions,cd=Tt.default.boolOptions,ud=Tt.default.intOptions,pd=Tt.default.nullOptions,dd=Tt.default.strOptions,hd=Tt.default.Schema,fd=Tt.default.Alias,md=Tt.default.Collection,gd=Tt.default.Merge,yd=Tt.default.Node,bd=Tt.default.Pair,wd=Tt.default.Scalar,Bl=Tt.default.YAMLMap,zl=Tt.default.YAMLSeq,hr=On,nn=new yl,tt=(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()"),tt.generate(l,c)),tt.generateWithContext=(l,c)=>{let f=tn(c,l);return Wa(f,l,nn,!0)},tt.generate=(l,c)=>Ha(tt.generateWithContext(l,c)),tt.generateYAML=(l,c)=>hr(tt.generateWithContext(l,c)),tt.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=tn(c,l),x={order:1,canRead(k){let N=k.url.replace("/:",":");return S[N]||S[N.split("/").pop()]},read(k,N){try{N(null,this.canRead(k))}catch(X){N(X)}}},{$RefParser:v}=Da();return v.bundle(f,l,{resolve:{file:{order:100},http:{order:200},fixedRefs:x},dereference:{circular:"ignore"}}).then(k=>Wa(S,k,nn)).catch(k=>{throw new Error(`Error while resolving schema (${k.message})`)})},tt.resolve=(l,c,f)=>tt.resolveWithContext(l,c,f).then(Ha),tt.resolveYAML=(l,c,f)=>tt.resolveWithContext(l,c,f).then(hr),yt(),tt.format=ja,tt.option=Ae,tt.random=ke,tt.extend=(l,c)=>(nn.extend(l,c),tt),tt.define=(l,c)=>(nn.define(l,c),tt),tt.reset=l=>(nn.reset(l),yt(),tt),tt.locate=l=>nn.get(l),tt.VERSION="0.5.5",Vl={...tt},Wl=tt}}),xd=o({"src/src/main.iife.js"(l,c){var f=(Sd(),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 xd()})();((e,n)=>{e.JSONSchemaFaker=n()})(typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,()=>ki);ki.random.shuffle=function(){return["[placeholder]"]};ki.option({useDefaultValue:!0,alwaysFakeOptionals:!0});function nc(e){return ki.generate(e)}var rc=async(e,n)=>{let t=new TextEncoder,r=t.encode(e),i=t.encode(n),o=await crypto.subtle.importKey("raw",r,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),a=await crypto.subtle.sign("HMAC",o,i);return Array.from(new Uint8Array(a)).map(s=>s.toString(16).padStart(2,"0")).join("")};var Hd=require("cross-fetch");var ic=async()=>{if(process.env.NOVU_BRIDGE_ORIGIN)return`${process.env.NOVU_BRIDGE_ORIGIN}/api/novu`;if(process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"&&process.env.NEXT_PUBLIC_VERCEL_URL)return`https://${process.env.NEXT_PUBLIC_VERCEL_URL}/api/novu`;try{if(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"){let n=await(await fetch("http://localhost:2022/.well-known/novu")).json();return`${n.tunnelOrigin}${n.route}`}}catch(e){console.error(e)}return""};function ac(e){return!!e&&typeof e=="object"&&"error"in e&&"message"in e&&"statusCode"in e}var vi=(e,n)=>{if(!e)throw new di;return{post:async(t,r)=>{let i=await fetch(`${n}/v1${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`},body:JSON.stringify(r)}),o=await i.json();if(i.ok)return o;throw ac(o)?new hi(o.statusCode,o.error,o.message):new zn(o)},delete:async t=>(await fetch(`${n}/v1${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`}})).json()}};var pc=require("liquidjs");function Ka(e,n){let t={...e};for(let r of Object.keys(n)){let i=n[r];i&&typeof i=="object"&&!Array.isArray(i)?t[r]=Ka(t[r]||{},i):(Array.isArray(i),t[r]=i)}return t}function Ei(e,n){let t=n.split(".").reduce((r,i)=>{if(r&&typeof r=="object")return r[i]},e);if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"){let r=JSON.stringify(t);return r==="{}"?"":r}return""}function oc(e,n=2,t,r=", "){if(!Array.isArray(e)||e.length===0)return"";let i=t?e.map(s=>typeof s!="object"||!s?"":Ei(s,t)):e;if(i.length===1)return i[0];if(i.length===2)return`${i[0]} and ${i[1]}`;if(i.length===3&&n>=3)return`${i[0]}, ${r}${i[1]} and ${i[2]}`;let o=i.slice(0,n),a=i.length-n;return`${o.join(r)} and ${a} ${a===1?"other":"others"}`}var sc=$t(require("pluralize"),1);function lc(e,n="",t="",r="true"){if(e==null)return"";let i=0;if(Array.isArray(e)?i=e.length:typeof e=="object"?i=Object.keys(e).length:typeof e=="string"?i=+e:typeof e=="number"?i=e:i=Number(e),Number.isNaN(i)&&(i=0),i<=0)return"";let o;return t?o=i===1?n:t:o=(0,sc.default)(n,i),r==="true"?`${i} ${o}`:o}var Yd=require("liquidjs"),cc=$t(require("pluralize"),1),Jd=require("zod");var Gd="",Kd=2,Xd="other",Qd=", ",Zd=" and ",eh=", and ";function uc(e,n=Gd,t=Kd,r=Xd,i=Qd,o=Zd,a=eh){if(!Array.isArray(e)||e.length===0)return"";let s=n?e.map(y=>typeof y!="object"||!y?"":Ei(y,n)):e,u=s.length;if(u===1)return s[0];if(u===2)return`${s[0]}${o}${s[1]}`;if(t>=u){let y=s.slice(0,u-1),g=s[u-1];return`${y.join(i)}${a}${g}`}let p=s.slice(0,t),d=u-t,h=t===1?o:a;return`${p.join(i)}${h}${d} ${(0,cc.default)(r,d)}`}function th(e){return Array.isArray(e)||typeof e=="object"&&e!==null?dc(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 dc=(e,n=0)=>Array.isArray(e)||typeof e=="object"&&e!==null?JSON.stringify(e,null,n).replace(/"/g,"'").replace(/\n/g,"\\n"):e==null?"":String(e);function hc(e){let n=new pc.Liquid({outputEscape:th,...e});return n.registerFilter("json",(t,r)=>dc(t,r)),n.registerFilter("digest",oc),n.registerFilter("toSentence",uc),n.registerFilter("pluralize",lc),n}var In=$t(require("chalk"),1),Qe={info:e=>In.default.blue(e),warning:e=>In.default.yellow(e),error:e=>In.default.red(e),success:e=>In.default.green(e),underline:e=>In.default.underline(e),bold:e=>In.default.bold(e)},st={SUCCESS:Qe.success("\u2714"),ERROR:Qe.error("\u2717"),WARNING:Qe.warning("\u26A0"),INFO:Qe.info("\u2139"),ARROW:Qe.bold("\u2192"),MOCK:Qe.info("\u25CB"),HYDRATED:Qe.bold(Qe.info("\u2192")),STEP:Qe.info("\u03C3"),ACTION:Qe.info("\u03B1"),DURATION:Qe.info("\u0394"),PROVIDER:Qe.info("\u2699"),OUTPUT:Qe.info("\u21E2"),INPUT:Qe.info("\u21E0"),WORKFLOW:Qe.info("\u03C9"),STATE:Qe.info("\u03C3"),EXECUTE:Qe.info("\u03B5"),PREVIEW:Qe.info("\u03C1")};function Ai(e){return e||process.env.NOVU_API_URL||"https://api.novu.co"}function Oi(e){return e||process.env.NOVU_SECRET_KEY||process.env.NOVU_API_KEY||""}var Xa=$t(require("sanitize-html"),1),nh=["src","alt","width","height","loading","srcset","sizes","crossorigin","usemap","ismap","class","id","style","title","dir","lang"];function rh(e){return e.toLowerCase().startsWith("on")}function ih(e){return e.replace(/<\/([a-zA-Z][a-zA-Z0-9]*)\s*\/[^>]*>/g,"</$1>")}var ah={allowedTags:Xa.default.defaults.allowedTags.concat(["style","img","html","head","body","link","meta","title"]),allowedAttributes:!1,transformTags:{"*":(e,n)=>{let t={};for(let[r,i]of Object.entries(n))rh(r)||(t[r]=i);return{tagName:e,attribs:t}},img:(e,n)=>{let t={};for(let[r,i]of Object.entries(n))nh.includes(r.toLowerCase())&&(t[r]=i);return{tagName:e,attribs:t}}},allowVulnerableTags:!0,parseStyleAttributes:!1,parser:{lowerCaseAttributeNames:!0}},fc=e=>{if(!e)return e;let n=ih(e),t=/^<!DOCTYPE .*?>/,r=n.match(t),i=(0,Xa.default)(n,ah);return r?r[0]+i:i},_i=e=>Object.keys(e).reduce((n,t)=>{let r=e[t];return typeof r=="string"?n[t]=fc(r):Array.isArray(r)?n[t]=r.map(i=>typeof i=="string"?fc(i):typeof i=="object"?_i(i):i):typeof r=="object"&&r!==null?n[t]=_i(r):n[t]=r,n},{});function mc(e,n=!0){n&&(console.log(`
|
|
92
|
-
${Qe.bold(Qe.underline("Discovered workflowId:"))} '${e.workflowId}'`),e.steps.forEach((t,r)=>{let i=r===e.steps.length-1;console.log(`${i?"\u2514":"\u251C"} ${st.STEP} Discovered stepId: '${t.stepId}' Type: '${t.type}'`),t.providers.forEach((a,s)=>{let u=s===t.providers.length-1;console.log(`${i?" ":"\u2502"} ${u?"\u2514":"\u251C"} ${st.PROVIDER} Discovered provider: '${a.type}'`)})}))}var gc=require("jsonrepair");function oh(e){let n=e.trim();return(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))&&n.length>2}function sh(e){try{return JSON.parse(e),e}catch{try{return(0,gc.jsonrepair)(e)}catch{return e}}}function yc(e){return Object.fromEntries(Object.entries(e).map(([n,t])=>typeof t=="string"?[n,oh(t)?sh(t):t]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[n,yc(t)]:[n,t]))}function bc(e){return!(e!=null&&e.data)||typeof e.data!="object"||Array.isArray(e.data)?e:{...e,data:yc(e.data)}}var Sc=$t(require("ajv"),1),xc=$t(require("ajv-formats"),1);var wc=e=>typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));var Ri=class extends yn{constructor(t,r){let i=r.length===1?"it":"them";super(`Tried to use a ${t} in @novu/framework without ${r.join(", ")} installed. Please install ${i} by running \`npm install ${r.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var Ii=async(e,n)=>{let t=new Set;if((await Promise.allSettled(e.map(i=>i.import))).forEach((i,o)=>{let a=e[o];i.status==="fulfilled"&&a.exports.every(u=>i.value[u]!==void 0)||t.add(a.name)}),t.size>0)throw new Ri(n,Array.from(t))};var Ci=class{constructor(){this.requiredImports=[];this.ajv=new Sc.default({useDefaults:!0,removeAdditional:"failing",strict:!1}),(0,xc.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(n){let t=n.type==="object"||!!n.anyOf||!!n.allOf||!!n.oneOf;return t&&await Ii(this.requiredImports,"JSON schema"),t}async validate(n,t){let r=this.compiledSchemas.get(t);r||(r=this.ajv.compile(t),this.compiledSchemas.set(t,r));let i=wc(n);return r(i)?{success:!0,data:i}:{success:!1,errors:r.errors.map(a=>({path:a.instancePath,message:a.message}))}}async transformToJsonSchema(n){return n}};var Pi=class{constructor(){this.requiredImports=[{name:"zod",import:import("zod"),exports:["ZodType"]},{name:"zod-to-json-schema",import:import("zod-to-json-schema"),exports:["zodToJsonSchema"]}]}async canHandle(n){let t=n.safeParseAsync!==void 0;return t&&await Ii(this.requiredImports,"Zod schema"),t}async validate(n,t){let r=await t.safeParseAsync(n);return r.success?{success:!0,data:r.data}:{success:!1,errors:r.error.errors.map(i=>({path:`/${i.path.join("/")}`,message:i.message}))}}async transformToJsonSchema(n){let{zodToJsonSchema:t}=await import("zod-to-json-schema");return t(n)}};var Mi=new Pi,Ni=new Ci,vr=async(e,n)=>{if(await Mi.canHandle(e))return Mi.validate(n,e);if(await Ni.canHandle(e))return Ni.validate(n,e);throw new Error("Invalid schema")},ft=async e=>{if(await Mi.canHandle(e))return Mi.transformToJsonSchema(e);if(await Ni.canHandle(e))return Ni.transformToJsonSchema(e);throw new Error("Invalid schema")};function Tc(){return["development",void 0,"dev"].includes(process.env.NODE_ENV)}var Yn=class{constructor(n){this.discoveredWorkflows=new Map;this.discoverWorkflowPromises=new Map;this.registeredAgents=new Map;this.version="2.10.1-alpha.
|
|
93
|
-
${Qe.bold(Qe.underline(i))} '${n.workflowId}'`);let o=this.getWorkflow(n.workflowId),a=process.hrtime(),s={outputs:{},providers:{},options:{skip:!1}},u,p=!1,d=new Promise(
|
|
91
|
+
laborum`.split(/\W/),Yr=qr,Jr={type:Ht.ALLOWED_TYPES},Il=jr,za=Aa,Cl=Br,Gr=zr,Pl=Ea,Ml=_a,Va="[a-zA-Z][a-zA-Z0-9+-.]*",Kr=`https?://{hostname}(?:${Va})+`,Nl="(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?",Ft={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:Kr,slug:"[a-zA-Z\\d_-]+","uri-reference":`${Kr}${Nl}`,"uri-template":Kr.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${Va.replace("]*","/]*")}|~[01]))+`,uuid:"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",duration:"^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$"},Ft.iri=Ft["uri-reference"],Ft["iri-reference"]=Ft["uri-reference"],Ft["idn-email"]=Ft.email,Ft["idn-hostname"]=Ft.hostname,Ll=new RegExp(`\\{(${Object.keys(Ft).join("|")})\\}`),Dl=Oa,Fl=Ia,Ul={boolean:kl,null:El,array:_l,integer:Ol,number:Ba,object:Il,string:Fl},dr=Ul,$l=ne,ql=({refs:l,schema:c,container:f,synchronous:S,refDepthMax:x,refDepthMin:v})=>{let k={},N={},X=0,M,re;return k.resolveSchema=(q,de,se)=>{if(q==null)return null;if(typeof q.generate=="function")return q;if(typeof(q.$id||q.id)=="string"&&(delete q.id,delete q.$id,delete q.$schema),typeof q.$ref=="string"){let xe=Math.max(v,x)-1;if(q.$ref==="#"||N[q.$ref]<0||M===q.$ref&&++X>xe)return q.$ref!=="#"&&re&&re.length===se.length?We.getLocalRef(c,q.$ref,S&&l):(delete q.$ref,q);typeof N[q.$ref]=="undefined"&&(N[q.$ref]=ke.number(v,x)-1),re=se,M=q.$ref;let _e;q.$ref.indexOf("#/")===-1?_e=l[q.$ref]||null:_e=We.getLocalRef(c,q.$ref,S&&l)||null;let Ye;if(typeof _e!="undefined"){if(!_e&&Ee("ignoreMissingRefs")!==!0)throw new Error(`Reference not found: ${q.$ref}`);N[q.$ref]-=1,We.merge(q,_e||{}),Ye=S&&_e&&_e.$ref}return Ye||delete q.$ref,q}if(Array.isArray(q.allOf)){let xe=q.allOf;delete q.allOf,xe.forEach(_e=>{let Ye=k.resolveSchema(_e,null,se);We.merge(q,typeof Ye.thunk=="function"?Ye.thunk(q):Ye),Array.isArray(q.allOf)&&k.resolveSchema(q,de,se)})}if(Array.isArray(q.oneOf||q.anyOf)&&se[se.length-2]!=="dependencies"){let xe=q.oneOf||q.anyOf;return q.enum&&q.oneOf&&(q.enum=q.enum.filter(_e=>We.validate(_e,xe))),{thunk(_e){let Ye=We.omitProps(q,["anyOf","oneOf"]),Ke=ke.pick(xe);return We.merge(Ye,Ke),xe.forEach(ie=>{ie.required&&ie!==Ke&&ie.required.forEach(I=>{if(Ke.required&&Ke.required.includes(I))return;let C=Ye.required&&Ye.required.includes(I);Ye.properties&&!C&&delete Ye.properties[I],_e&&_e.properties&&delete _e.properties[I]})}),Ye}}}if(Object.keys(q).forEach(xe=>{(Array.isArray(q[xe])||typeof q[xe]=="object")&&!We.isKey(xe)&&(q[xe]=k.resolveSchema(q[xe],xe,se.concat(xe)))}),se){let xe=se[se.length-1];if(xe==="properties"||xe==="items")return q}return f.wrap(q)},k},jl=ql,Wa=Ct,Ha=Zt,Tt=Ma(il(),1),ld=Tt.default.binaryOptions,cd=Tt.default.boolOptions,ud=Tt.default.intOptions,pd=Tt.default.nullOptions,dd=Tt.default.strOptions,hd=Tt.default.Schema,fd=Tt.default.Alias,md=Tt.default.Collection,gd=Tt.default.Merge,yd=Tt.default.Node,bd=Tt.default.Pair,wd=Tt.default.Scalar,Bl=Tt.default.YAMLMap,zl=Tt.default.YAMLSeq,hr=_n,nn=new yl,tt=(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()"),tt.generate(l,c)),tt.generateWithContext=(l,c)=>{let f=tn(c,l);return Wa(f,l,nn,!0)},tt.generate=(l,c)=>Ha(tt.generateWithContext(l,c)),tt.generateYAML=(l,c)=>hr(tt.generateWithContext(l,c)),tt.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=tn(c,l),x={order:1,canRead(k){let N=k.url.replace("/:",":");return S[N]||S[N.split("/").pop()]},read(k,N){try{N(null,this.canRead(k))}catch(X){N(X)}}},{$RefParser:v}=Da();return v.bundle(f,l,{resolve:{file:{order:100},http:{order:200},fixedRefs:x},dereference:{circular:"ignore"}}).then(k=>Wa(S,k,nn)).catch(k=>{throw new Error(`Error while resolving schema (${k.message})`)})},tt.resolve=(l,c,f)=>tt.resolveWithContext(l,c,f).then(Ha),tt.resolveYAML=(l,c,f)=>tt.resolveWithContext(l,c,f).then(hr),yt(),tt.format=ja,tt.option=Ee,tt.random=ke,tt.extend=(l,c)=>(nn.extend(l,c),tt),tt.define=(l,c)=>(nn.define(l,c),tt),tt.reset=l=>(nn.reset(l),yt(),tt),tt.locate=l=>nn.get(l),tt.VERSION="0.5.5",Vl={...tt},Wl=tt}}),xd=o({"src/src/main.iife.js"(l,c){var f=(Sd(),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 xd()})();((e,n)=>{e.JSONSchemaFaker=n()})(typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,()=>ki);ki.random.shuffle=function(){return["[placeholder]"]};ki.option({useDefaultValue:!0,alwaysFakeOptionals:!0});function nc(e){return ki.generate(e)}var rc=async(e,n)=>{let t=new TextEncoder,r=t.encode(e),i=t.encode(n),o=await crypto.subtle.importKey("raw",r,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),a=await crypto.subtle.sign("HMAC",o,i);return Array.from(new Uint8Array(a)).map(s=>s.toString(16).padStart(2,"0")).join("")};var Hd=require("cross-fetch");var ic=async()=>{if(process.env.NOVU_BRIDGE_ORIGIN)return`${process.env.NOVU_BRIDGE_ORIGIN}/api/novu`;if(process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"&&process.env.NEXT_PUBLIC_VERCEL_URL)return`https://${process.env.NEXT_PUBLIC_VERCEL_URL}/api/novu`;try{if(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"){let n=await(await fetch("http://localhost:2022/.well-known/novu")).json();return`${n.tunnelOrigin}${n.route}`}}catch(e){console.error(e)}return""};function ac(e){return!!e&&typeof e=="object"&&"error"in e&&"message"in e&&"statusCode"in e}var vi=(e,n)=>{if(!e)throw new di;return{post:async(t,r)=>{let i=await fetch(`${n}/v1${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`},body:JSON.stringify(r)}),o=await i.json();if(i.ok)return o;throw ac(o)?new hi(o.statusCode,o.error,o.message):new zn(o)},delete:async t=>(await fetch(`${n}/v1${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${e}`}})).json()}};var pc=require("liquidjs");function Ka(e,n){let t={...e};for(let r of Object.keys(n)){let i=n[r];i&&typeof i=="object"&&!Array.isArray(i)?t[r]=Ka(t[r]||{},i):(Array.isArray(i),t[r]=i)}return t}function Ai(e,n){let t=n.split(".").reduce((r,i)=>{if(r&&typeof r=="object")return r[i]},e);if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"){let r=JSON.stringify(t);return r==="{}"?"":r}return""}function oc(e,n=2,t,r=", "){if(!Array.isArray(e)||e.length===0)return"";let i=t?e.map(s=>typeof s!="object"||!s?"":Ai(s,t)):e;if(i.length===1)return i[0];if(i.length===2)return`${i[0]} and ${i[1]}`;if(i.length===3&&n>=3)return`${i[0]}, ${r}${i[1]} and ${i[2]}`;let o=i.slice(0,n),a=i.length-n;return`${o.join(r)} and ${a} ${a===1?"other":"others"}`}var sc=$t(require("pluralize"),1);function lc(e,n="",t="",r="true"){if(e==null)return"";let i=0;if(Array.isArray(e)?i=e.length:typeof e=="object"?i=Object.keys(e).length:typeof e=="string"?i=+e:typeof e=="number"?i=e:i=Number(e),Number.isNaN(i)&&(i=0),i<=0)return"";let o;return t?o=i===1?n:t:o=(0,sc.default)(n,i),r==="true"?`${i} ${o}`:o}var Yd=require("liquidjs"),cc=$t(require("pluralize"),1),Jd=require("zod");var Gd="",Kd=2,Xd="other",Qd=", ",Zd=" and ",eh=", and ";function uc(e,n=Gd,t=Kd,r=Xd,i=Qd,o=Zd,a=eh){if(!Array.isArray(e)||e.length===0)return"";let s=n?e.map(y=>typeof y!="object"||!y?"":Ai(y,n)):e,u=s.length;if(u===1)return s[0];if(u===2)return`${s[0]}${o}${s[1]}`;if(t>=u){let y=s.slice(0,u-1),g=s[u-1];return`${y.join(i)}${a}${g}`}let p=s.slice(0,t),d=u-t,h=t===1?o:a;return`${p.join(i)}${h}${d} ${(0,cc.default)(r,d)}`}function th(e){return Array.isArray(e)||typeof e=="object"&&e!==null?dc(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 dc=(e,n=0)=>Array.isArray(e)||typeof e=="object"&&e!==null?JSON.stringify(e,null,n).replace(/"/g,"'").replace(/\n/g,"\\n"):e==null?"":String(e);function hc(e){let n=new pc.Liquid({outputEscape:th,...e});return n.registerFilter("json",(t,r)=>dc(t,r)),n.registerFilter("digest",oc),n.registerFilter("toSentence",uc),n.registerFilter("pluralize",lc),n}var In=$t(require("chalk"),1),Qe={info:e=>In.default.blue(e),warning:e=>In.default.yellow(e),error:e=>In.default.red(e),success:e=>In.default.green(e),underline:e=>In.default.underline(e),bold:e=>In.default.bold(e)},st={SUCCESS:Qe.success("\u2714"),ERROR:Qe.error("\u2717"),WARNING:Qe.warning("\u26A0"),INFO:Qe.info("\u2139"),ARROW:Qe.bold("\u2192"),MOCK:Qe.info("\u25CB"),HYDRATED:Qe.bold(Qe.info("\u2192")),STEP:Qe.info("\u03C3"),ACTION:Qe.info("\u03B1"),DURATION:Qe.info("\u0394"),PROVIDER:Qe.info("\u2699"),OUTPUT:Qe.info("\u21E2"),INPUT:Qe.info("\u21E0"),WORKFLOW:Qe.info("\u03C9"),STATE:Qe.info("\u03C3"),EXECUTE:Qe.info("\u03B5"),PREVIEW:Qe.info("\u03C1")};function Ei(e){return e||process.env.NOVU_API_URL||"https://api.novu.co"}function _i(e){return e||process.env.NOVU_SECRET_KEY||process.env.NOVU_API_KEY||""}var Xa=$t(require("sanitize-html"),1),nh=["src","alt","width","height","loading","srcset","sizes","crossorigin","usemap","ismap","class","id","style","title","dir","lang"];function rh(e){return e.toLowerCase().startsWith("on")}function ih(e){return e.replace(/<\/([a-zA-Z][a-zA-Z0-9]*)\s*\/[^>]*>/g,"</$1>")}var ah={allowedTags:Xa.default.defaults.allowedTags.concat(["style","img","html","head","body","link","meta","title"]),allowedAttributes:!1,transformTags:{"*":(e,n)=>{let t={};for(let[r,i]of Object.entries(n))rh(r)||(t[r]=i);return{tagName:e,attribs:t}},img:(e,n)=>{let t={};for(let[r,i]of Object.entries(n))nh.includes(r.toLowerCase())&&(t[r]=i);return{tagName:e,attribs:t}}},allowVulnerableTags:!0,parseStyleAttributes:!1,parser:{lowerCaseAttributeNames:!0}},fc=e=>{if(!e)return e;let n=ih(e),t=/^<!DOCTYPE .*?>/,r=n.match(t),i=(0,Xa.default)(n,ah);return r?r[0]+i:i},Oi=e=>Object.keys(e).reduce((n,t)=>{let r=e[t];return typeof r=="string"?n[t]=fc(r):Array.isArray(r)?n[t]=r.map(i=>typeof i=="string"?fc(i):typeof i=="object"?Oi(i):i):typeof r=="object"&&r!==null?n[t]=Oi(r):n[t]=r,n},{});function mc(e,n=!0){n&&(console.log(`
|
|
92
|
+
${Qe.bold(Qe.underline("Discovered workflowId:"))} '${e.workflowId}'`),e.steps.forEach((t,r)=>{let i=r===e.steps.length-1;console.log(`${i?"\u2514":"\u251C"} ${st.STEP} Discovered stepId: '${t.stepId}' Type: '${t.type}'`),t.providers.forEach((a,s)=>{let u=s===t.providers.length-1;console.log(`${i?" ":"\u2502"} ${u?"\u2514":"\u251C"} ${st.PROVIDER} Discovered provider: '${a.type}'`)})}))}var gc=require("jsonrepair");function oh(e){let n=e.trim();return(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))&&n.length>2}function sh(e){try{return JSON.parse(e),e}catch{try{return(0,gc.jsonrepair)(e)}catch{return e}}}function yc(e){return Object.fromEntries(Object.entries(e).map(([n,t])=>typeof t=="string"?[n,oh(t)?sh(t):t]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[n,yc(t)]:[n,t]))}function bc(e){return!(e!=null&&e.data)||typeof e.data!="object"||Array.isArray(e.data)?e:{...e,data:yc(e.data)}}var Sc=$t(require("ajv"),1),xc=$t(require("ajv-formats"),1);var wc=e=>typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));var Ri=class extends yn{constructor(t,r){let i=r.length===1?"it":"them";super(`Tried to use a ${t} in @novu/framework without ${r.join(", ")} installed. Please install ${i} by running \`npm install ${r.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var Ii=async(e,n)=>{let t=new Set;if((await Promise.allSettled(e.map(i=>i.import))).forEach((i,o)=>{let a=e[o];i.status==="fulfilled"&&a.exports.every(u=>i.value[u]!==void 0)||t.add(a.name)}),t.size>0)throw new Ri(n,Array.from(t))};var Ci=class{constructor(){this.requiredImports=[];this.ajv=new Sc.default({useDefaults:!0,removeAdditional:"failing",strict:!1}),(0,xc.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(n){let t=n.type==="object"||!!n.anyOf||!!n.allOf||!!n.oneOf;return t&&await Ii(this.requiredImports,"JSON schema"),t}async validate(n,t){let r=this.compiledSchemas.get(t);r||(r=this.ajv.compile(t),this.compiledSchemas.set(t,r));let i=wc(n);return r(i)?{success:!0,data:i}:{success:!1,errors:r.errors.map(a=>({path:a.instancePath,message:a.message}))}}async transformToJsonSchema(n){return n}};var Pi=class{constructor(){this.requiredImports=[{name:"zod",import:import("zod"),exports:["ZodType"]},{name:"zod-to-json-schema",import:import("zod-to-json-schema"),exports:["zodToJsonSchema"]}]}async canHandle(n){let t=n.safeParseAsync!==void 0;return t&&await Ii(this.requiredImports,"Zod schema"),t}async validate(n,t){let r=await t.safeParseAsync(n);return r.success?{success:!0,data:r.data}:{success:!1,errors:r.error.errors.map(i=>({path:`/${i.path.join("/")}`,message:i.message}))}}async transformToJsonSchema(n){let{zodToJsonSchema:t}=await import("zod-to-json-schema");return t(n)}};var Mi=new Pi,Ni=new Ci,vr=async(e,n)=>{if(await Mi.canHandle(e))return Mi.validate(n,e);if(await Ni.canHandle(e))return Ni.validate(n,e);throw new Error("Invalid schema")},ft=async e=>{if(await Mi.canHandle(e))return Mi.transformToJsonSchema(e);if(await Ni.canHandle(e))return Ni.transformToJsonSchema(e);throw new Error("Invalid schema")};function Tc(){return["development",void 0,"dev"].includes(process.env.NODE_ENV)}var Yn=class{constructor(n){this.discoveredWorkflows=new Map;this.discoverWorkflowPromises=new Map;this.registeredAgents=new Map;this.version="2.10.1-alpha.6";let t=this.buildOptions(n);this.apiUrl=t.apiUrl,this.secretKey=t.secretKey,this.strictAuthentication=t.strictAuthentication,this.verbose=t.verbose,this.templateEngine=hc()}buildOptions(n){let t={apiUrl:Ei(n==null?void 0:n.apiUrl),secretKey:_i(n==null?void 0:n.secretKey),strictAuthentication:!Tc(),verbose:Tc()};return(n==null?void 0:n.strictAuthentication)!==void 0?t.strictAuthentication=n.strictAuthentication:process.env.NOVU_STRICT_AUTHENTICATION_ENABLED!==void 0&&(t.strictAuthentication=process.env.NOVU_STRICT_AUTHENTICATION_ENABLED==="true"),(n==null?void 0:n.verbose)!==void 0&&(t.verbose=n.verbose),t}log(...n){this.verbose&&console.log(...n)}async addWorkflows(n){for(let t of n){if(this.discoveredWorkflows.has(t.id))continue;let r=this.discoverWorkflowPromises.get(t.id);if(r){await r;continue}let i=this.addWorkflow(t);this.discoverWorkflowPromises.set(t.id,i),await i}}addAgents(n){for(let t of n)this.registeredAgents.set(t.id,t)}getAgent(n){return this.registeredAgents.get(n)}async addWorkflow(n){try{let t=await n.discover();mc(t,this.verbose),this.discoveredWorkflows.set(n.id,t)}finally{this.discoverWorkflowPromises.delete(n.id)}}healthCheck(){let n=this.getRegisteredWorkflows(),t=n.length,r=n.reduce((i,o)=>i+o.steps.length,0);return{status:"ok",sdkVersion:"2.10.1-alpha.6",frameworkVersion:"2024-06-26",discovered:{workflows:t,steps:r}}}getWorkflow(n){let t=this.discoveredWorkflows.get(n);if(t)return t;throw new xr(n)}getStep(n,t){let i=this.getWorkflow(n).steps.find(o=>o.stepId===t);if(i)return i;throw new xi(t)}getRegisteredWorkflows(){return Array.from(this.discoveredWorkflows.values())}discover(){return{workflows:this.getRegisteredWorkflows(),agents:Array.from(this.registeredAgents.keys()).map(n=>({agentId:n}))}}mock(n){try{return nc(n)}catch(t){return console.warn("Failed to mock schema, returning empty object:",t),{}}}async validate(n,t,r,i,o,a,s){let u=await vr(t,n);if(u.success)return u.data;switch(r){case"event":this.throwInvalidEvent(i,o,u.errors);case"step":this.throwInvalidStep(a,i,o,u.errors);case"provider":this.throwInvalidProvider(a,s,i,o,u.errors);default:throw new Error(`Invalid component: '${r}'`)}}throwInvalidProvider(n,t,r,i,o){if(!n)throw new Error("stepId is required");if(!t)throw new Error("providerId is required");switch(r){case"output":throw new li(i,n,t,o);default:throw new Error(`Invalid payload type: '${r}'`)}}throwInvalidStep(n,t,r,i){if(!n)throw new Error("stepId is required");switch(t){case"output":throw new ai(r,n,i);case"result":throw new oi(r,n,i);case"controls":throw new ii(r,n,i);default:throw new Error(`Invalid payload type: '${t}'`)}}throwInvalidEvent(n,t,r){switch(n){case"controls":throw new ri(t,r);case"payload":throw new br(t,r);default:throw new Error(`Invalid payload type: '${n}'`)}}executeStepFactory(n,t,r){return async(i,o,a)=>{if(r())return;let s=this.getStep(n.workflowId,i),u=n.action==="preview";if(!u&&i===n.stepId){let g=await this.createStepControls(s,n),P=await this.compileControls(g,n);if(await this.shouldSkip(a==null?void 0:a.skip,P))return t({options:{skip:!0},outputs:{},providers:{}}),{}}let p=this.previewStep.bind(this),d=this.executeStep.bind(this),y=await(u?p:d)(n,{...s,providers:s.providers.map(g=>{var Z;let P=(Z=a==null?void 0:a.providers)==null?void 0:Z[g.type];if(!P)throw new fi(g.type);return{...g,resolve:P}}),resolve:o});return this.shouldSanitize({stepType:s.type,options:a})&&(y={...y,outputs:Oi(y.outputs)}),i===n.stepId&&t({...y,options:{skip:!1}}),y.outputs}}shouldSanitize({stepType:n,options:t}){return(t==null?void 0:t.disableOutputSanitization)===!0?!1:["email","in_app"].includes(n)}async shouldSkip(n,t){return n?n(t):!1}async executeWorkflow(n){let i=`${{execute:"Executing",preview:"Previewing"}[n.action]||n.action} workflowId:`;this.log(`
|
|
93
|
+
${Qe.bold(Qe.underline(i))} '${n.workflowId}'`);let o=this.getWorkflow(n.workflowId),a=process.hrtime(),s={outputs:{},providers:{},options:{skip:!1}},u,p=!1,d=new Promise(Oe=>{u=Oe}),h=Oe=>{if(p)throw new Error("setResult can only be called once per workflow execution");u(),p=!0,s=Oe},y=()=>p,g;try{if(n.action==="execute"&&!n.payload)throw new br(n.workflowId,{message:"Event `payload` is required"});let Oe=await this.createExecutionPayload(n,o),U={...n,payload:Oe};await Promise.race([d,o.execute({payload:Oe,env:n.env,controls:{},subscriber:n.subscriber,context:n.context,step:{email:this.executeStepFactory(U,h,y),sms:this.executeStepFactory(U,h,y),inApp:this.executeStepFactory(U,h,y),digest:this.executeStepFactory(U,h,y),delay:this.executeStepFactory(U,h,y),push:this.executeStepFactory(U,h,y),chat:this.executeStepFactory(U,h,y),custom:this.executeStepFactory(U,h,y),throttle:this.executeStepFactory(U,h,y)}})])}catch(Oe){g=Oe}let P=process.hrtime(a),Z=P[0],Q=P[1],j=Z*1e3+Q/1e6,pe=g?st.ERROR:st.SUCCESS,Te={execute:"Executed",preview:"Previewed"}[n.action]||n.action;if(this.log(`${pe} ${Te} workflowId: \`${n.workflowId}\``),this.prettyPrintExecute(n,j,g),g)throw g;return{outputs:s.outputs,providers:s.providers,options:s.options,metadata:{status:"success",error:!1,duration:j}}}async createExecutionPayload(n,t){let{payload:r}=n;if(n.action==="preview"){let o=this.mock(t.payload.schema);r=Object.assign(o,r)}return await this.validate(r,t.payload.unknownSchema,"event","payload",n.workflowId)}prettyPrintExecute(n,t,r){if(!this.verbose)return;let i=r?st.ERROR:st.SUCCESS,a={execute:"Executed",preview:"Previewed"}[n.action]||n.action,s=r?"Failed to execute":a,u=r?Qe.error:Qe.success,p=`${i} ${s} workflowId: '${n.workflowId}`;console.log(`
|
|
94
94
|
${Qe.bold(u(p))}'`),console.log(` \u251C ${st.STEP} stepId: '${n.stepId}'`),console.log(` \u251C ${st.ACTION} action: '${n.action}'`),console.log(` \u2514 ${st.DURATION} duration: '${t.toFixed(2)}ms'
|
|
95
|
-
`)}async executeProviders(n,t,r){return t.providers.reduce(async(i,o)=>{let a=await i,s=this.previewProvider.bind(this),u=this.executeProvider.bind(this),d=await(n.action==="preview"?s:u)(n,t,o,r);return{...a,[o.type]:d}},Promise.resolve({}))}previewProvider(n,t,r,i){return this.log(` ${st.MOCK} Mocked provider: \`${r.type}\``),this.mock(r.outputs.schema)}async executeProvider(n,t,r,i){try{if(n.stepId===t.stepId){let o=await this.createStepControls(t,n),a=await r.resolve({controls:o,outputs:i}),s=await this.validate(a,r.outputs.unknownSchema,"step","output",n.workflowId,t.stepId,r.type);return this.log(` ${st.SUCCESS} Executed provider: \`${r.type}\``),{...s,_passthrough:a._passthrough}}else return this.log(` ${st.HYDRATED} Hydrated provider: \`${r.type}\``),{}}catch(o){throw this.log(` ${st.ERROR} Failed to execute provider: \`${r.type}\``),new mi(r.type,n.action,o)}}async executeStep(n,t){if(n.stepId===t.stepId)try{let r=await this.createStepControls(t,n),i=await this.compileControls(r,n),o=await t.resolve(i),a=await this.validate(o,t.outputs.unknownSchema,"step","output",n.workflowId,t.stepId),s=await this.executeProviders(n,t,a);return this.log(` ${st.SUCCESS} Executed stepId: \`${t.stepId}\``),{outputs:a,providers:s}}catch(r){throw this.log(` ${st.ERROR} Failed to execute stepId: \`${t.stepId}\``),_n(r)?r:new Sr(t.stepId,n.action,r)}else try{let r=this.getStepState(n,t.stepId);if(r){let i=await this.validate(r.outputs,t.results.unknownSchema,"step","result",n.workflowId,t.stepId);return this.log(` ${st.HYDRATED} Hydrated stepId: \`${t.stepId}\``),{outputs:i,providers:await this.executeProviders(n,t,i)}}else throw new ni(n.workflowId,t.stepId)}catch(r){throw this.log(` ${st.ERROR} Failed to hydrate stepId: \`${t.stepId}\``),r}}async compileControls(n,t){var r;try{let i=this.preprocessTranslationPatterns(JSON.stringify(n));i=this.preprocessFilterTranslationArgs(i);let o=this.templateEngine.parse(i),a=this.getWorkflow(t.workflowId),s={workflow:{workflowId:a.workflowId,name:a.name,description:a.description,tags:a.tags,severity:a.severity},payload:t.payload,subscriber:t.subscriber,context:t.context,steps:lh(t.state),env:(r=t.env)!=null?r:{}},u=await this.templateEngine.render(o,s),p=this.postprocessTranslationMarkers(u),d=(0,kc.jsonrepair)(p),h=JSON.parse(d);return bc(h)}catch(i){throw new si(t.workflowId,t.stepId,i)}}preprocessTranslationPatterns(n){return n.replace(/\{\{\s*t\.([\p{L}\p{N}_.-]+)\s*\}\}/gu,"[T:$1]")}preprocessFilterTranslationArgs(n){return n.replace(/'t\.([\p{L}\p{N}_.-]+)'/gu,"'[T:$1]'")}postprocessTranslationMarkers(n){return n.replace(/\[T:([\p{L}\p{N}_.-]+)\]/gu,"{{t.$1}}")}async createStepControls(n,t){return await this.validate(t.controls,n.controls.unknownSchema,"step","controls",t.workflowId,n.stepId)}async previewStep(n,t){try{return await this.constructStepForPreview(n,t)}catch(r){throw this.log(` ${st.ERROR} Failed to preview stepId: \`${t.stepId}\``),_n(r)?r:new Sr(t.stepId,n.action,r)}}async constructStepForPreview(n,t){return n.stepId===t.stepId?await this.previewRequiredStep(t,n):await this.extractMockDataForPreviousSteps(n,t)}async extractMockDataForPreviousSteps(n,t){let r={},i=this.getStepState(n,t.stepId),o=this.mock(t.results.schema);return{outputs:Ka(o,(i==null?void 0:i.outputs)||{}),providers:await this.executeProviders(n,t,r)}}async previewRequiredStep(n,t){let r=await this.createStepControls(n,t),i=await this.compileControls(r,t),o=await n.resolve(i),a=await this.validate(o,n.outputs.unknownSchema,"step","output",t.workflowId,n.stepId);return this.log(` ${st.MOCK} Mocked stepId: \`${n.stepId}\``),{outputs:a,providers:await this.executeProviders(t,n,a)}}getStepState(n,t){return n.state.find(r=>r.stepId===t)}getStepCode(n,t){return{code:this.getStep(n,t).resolve.toString()}}getWorkflowCode(n){return{code:this.getWorkflow(n).execute.toString()}}getCode(n,t){let r;if(n)t?r=this.getStepCode(n,t):r=this.getWorkflowCode(n);else throw new xr(n);return r}};function lh(e){let n={};for(let t of e)n[t.stepId]=t.outputs;return n}var ch={};function ln(e,n){let t=n||ch,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ec(e,r,i)}function Ec(e,n,t){if(uh(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return vc(e.children,n,t)}return Array.isArray(e)?vc(e,n,t):""}function vc(e,n,t){let r=[],i=-1;for(;++i<e.length;)r[i]=Ec(e[i],n,t);return r.join("")}function uh(e){return!!(e&&typeof e=="object")}function Qa(e,n){let t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}var ut=wn(/[A-Za-z]/),pt=wn(/[\dA-Za-z]/),Ac=wn(/[#-'*+\--9=?A-Z^-~]/);function Cn(e){return e!==null&&(e<32||e===127)}var Er=wn(/\d/),Oc=wn(/[\dA-Fa-f]/),_c=wn(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function Ne(e){return e!==null&&(e<0||e===32)}function we(e){return e===-2||e===-1||e===32}var Pn=wn(/\p{P}|\p{S}/u),Jt=wn(/\s/);function wn(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Za(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Sn=(function(e){if(e==null)return fh;if(typeof e=="function")return Li(e);if(typeof e=="object")return Array.isArray(e)?ph(e):dh(e);if(typeof e=="string")return hh(e);throw new Error("Expected function, string, or object as test")});function ph(e){let n=[],t=-1;for(;++t<e.length;)n[t]=Sn(e[t]);return Li(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function dh(e){let n=e;return Li(t);function t(r){let i=r,o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function hh(e){return Li(n);function n(t){return t&&t.type===e}}function Li(e){return n;function n(t,r,i){return!!(mh(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function fh(){return!0}function mh(e){return e!==null&&typeof e=="object"&&"type"in e}function Rc(e){return"\x1B[33m"+e+"\x1B[39m"}var Ic=[],Di=!0,Mn=!1,Fi="skip";function Ar(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;let o=Sn(i),a=r?-1:1;s(e,void 0,[])();function s(u,p,d){let h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){let g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+Rc(u.type+(g?"<"+g+">":""))+")"})}return y;function y(){let g=Ic,P,Z,Q;if((!n||o(u,p,d[d.length-1]||void 0))&&(g=gh(t(u,d)),g[0]===Mn))return g;if("children"in u&&u.children){let j=u;if(j.children&&g[0]!==Fi)for(Z=(r?j.children.length:-1)+a,Q=d.concat(j);Z>-1&&Z<j.children.length;){let pe=j.children[Z];if(P=s(pe,Z,Q)(),P[0]===Mn)return P;Z=typeof P[1]=="number"?P[1]:Z+a}}return g}}}function gh(e){return Array.isArray(e)?e:typeof e=="number"?[Di,e]:e==null?Ic:[e]}function eo(e,n,t){let i=Sn((t||{}).ignore||[]),o=yh(n),a=-1;for(;++a<o.length;)Ar(e,"text",s);function s(p,d){let h=-1,y;for(;++h<d.length;){let g=d[h],P=y?y.children:void 0;if(i(g,P?P.indexOf(g):void 0,y))return;y=g}if(y)return u(p,d)}function u(p,d){let h=d[d.length-1],y=o[a][0],g=o[a][1],P=0,Q=h.children.indexOf(p),j=!1,pe=[];y.lastIndex=0;let te=y.exec(p.value);for(;te;){let Te=te.index,_e={index:te.index,input:te.input,stack:[...d,p]},U=g(...te,_e);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?y.lastIndex=Te+1:(P!==Te&&pe.push({type:"text",value:p.value.slice(P,Te)}),Array.isArray(U)?pe.push(...U):U&&pe.push(U),P=Te+te[0].length,j=!0),!y.global)break;te=y.exec(p.value)}return j?(P<p.value.length&&pe.push({type:"text",value:p.value.slice(P)}),h.children.splice(Q,1,...pe)):pe=[p],Q+pe.length}}function yh(e){let n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<t.length;){let i=t[r];n.push([bh(i[0]),wh(i[1])])}return n}function bh(e){return typeof e=="string"?new RegExp(Za(e),"g"):e}function wh(e){return typeof e=="function"?e:function(){return e}}var to="phrasing",no=["autolink","link","image","label"];function io(){return{transforms:[Eh],enter:{literalAutolink:Sh,literalAutolinkEmail:ro,literalAutolinkHttp:ro,literalAutolinkWww:ro},exit:{literalAutolink:vh,literalAutolinkEmail:kh,literalAutolinkHttp:xh,literalAutolinkWww:Th}}}function ao(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:to,notInConstruct:no},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:to,notInConstruct:no},{character:":",before:"[ps]",after:"\\/",inConstruct:to,notInConstruct:no}]}}function Sh(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ro(e){this.config.enter.autolinkProtocol.call(this,e)}function xh(e){this.config.exit.autolinkProtocol.call(this,e)}function Th(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function kh(e){this.config.exit.autolinkEmail.call(this,e)}function vh(e){this.exit(e)}function Eh(e){eo(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ah],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Oh]],{ignore:["link","linkReference"]})}function Ah(e,n,t,r,i){let o="";if(!Cc(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!_h(t)))return!1;let a=Rh(t+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+n+a[0],children:[{type:"text",value:n+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Oh(e,n,t,r){return!Cc(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function _h(e){let n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Rh(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")"),i=Qa(e,"("),o=Qa(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function Cc(e,n){let t=e.input.charCodeAt(e.index-1);return(e.index===0||Jt(t)||Pn(t))&&(!n||t!==47)}function wt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Pc.peek=Uh;function oo(){return{enter:{gfmFootnoteDefinition:Ih,gfmFootnoteDefinitionLabelString:Ch,gfmFootnoteCall:Nh,gfmFootnoteCallString:Lh},exit:{gfmFootnoteDefinition:Mh,gfmFootnoteDefinitionLabelString:Ph,gfmFootnoteCall:Fh,gfmFootnoteCallString:Dh}}}function so(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:$h,footnoteReference:Pc}}}function Ih(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ch(){this.buffer()}function Ph(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=wt(this.sliceSerialize(e)).toLowerCase()}function Mh(e){this.exit(e)}function Nh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Lh(){this.buffer()}function Dh(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=wt(this.sliceSerialize(e)).toLowerCase()}function Fh(e){this.exit(e)}function Pc(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),a=t.enter("footnoteReference"),s=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function Uh(){return"["}function $h(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),a=t.enter("footnoteDefinition"),s=t.enter("label");return o+=i.move(t.safe(t.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(t.indentLines(t.containerFlow(e,i.current()),qh)),a(),o}function qh(e,n,t){return n===0?e:(t?"":" ")+e}var jh=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Mc.peek=Vh;function lo(){return{canContainEols:["delete"],enter:{strikethrough:Bh},exit:{strikethrough:zh}}}function co(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:jh}],handlers:{delete:Mc}}}function Bh(e){this.enter({type:"delete",children:[]},e)}function zh(e){this.exit(e)}function Mc(e,n,t,r){let i=t.createTracker(r),o=t.enter("strikethrough"),a=i.move("~~");return a+=t.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Vh(){return"~"}function Lc(e,n={}){let t=(n.align||[]).concat(),r=n.stringLength||Hh,i=[],o=[],a=[],s=[],u=0,p=-1;for(;++p<e.length;){let P=[],Z=[],Q=-1;for(e[p].length>u&&(u=e[p].length);++Q<e[p].length;){let j=Wh(e[p][Q]);if(n.alignDelimiters!==!1){let pe=r(j);Z[Q]=pe,(s[Q]===void 0||pe>s[Q])&&(s[Q]=pe)}P.push(j)}o[p]=P,a[p]=Z}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<u;)i[d]=Nc(t[d]);else{let P=Nc(t);for(;++d<u;)i[d]=P}d=-1;let h=[],y=[];for(;++d<u;){let P=i[d],Z="",Q="";P===99?(Z=":",Q=":"):P===108?Z=":":P===114&&(Q=":");let j=n.alignDelimiters===!1?1:Math.max(1,s[d]-Z.length-Q.length),pe=Z+"-".repeat(j)+Q;n.alignDelimiters!==!1&&(j=Z.length+j+Q.length,j>s[d]&&(s[d]=j),y[d]=j),h[d]=pe}o.splice(1,0,h),a.splice(1,0,y),p=-1;let g=[];for(;++p<o.length;){let P=o[p],Z=a[p];d=-1;let Q=[];for(;++d<u;){let j=P[d]||"",pe="",te="";if(n.alignDelimiters!==!1){let Te=s[d]-(Z[d]||0),_e=i[d];_e===114?pe=" ".repeat(Te):_e===99?Te%2?(pe=" ".repeat(Te/2+.5),te=" ".repeat(Te/2-.5)):(pe=" ".repeat(Te/2),te=pe):te=" ".repeat(Te)}n.delimiterStart!==!1&&!d&&Q.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||d)&&Q.push(" "),n.alignDelimiters!==!1&&Q.push(pe),Q.push(j),n.alignDelimiters!==!1&&Q.push(te),n.padding!==!1&&Q.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&Q.push("|")}g.push(n.delimiterEnd===!1?Q.join("").replace(/ +$/,""):Q.join(""))}return g.join(`
|
|
95
|
+
`)}async executeProviders(n,t,r){return t.providers.reduce(async(i,o)=>{let a=await i,s=this.previewProvider.bind(this),u=this.executeProvider.bind(this),d=await(n.action==="preview"?s:u)(n,t,o,r);return{...a,[o.type]:d}},Promise.resolve({}))}previewProvider(n,t,r,i){return this.log(` ${st.MOCK} Mocked provider: \`${r.type}\``),this.mock(r.outputs.schema)}async executeProvider(n,t,r,i){try{if(n.stepId===t.stepId){let o=await this.createStepControls(t,n),a=await r.resolve({controls:o,outputs:i}),s=await this.validate(a,r.outputs.unknownSchema,"step","output",n.workflowId,t.stepId,r.type);return this.log(` ${st.SUCCESS} Executed provider: \`${r.type}\``),{...s,_passthrough:a._passthrough}}else return this.log(` ${st.HYDRATED} Hydrated provider: \`${r.type}\``),{}}catch(o){throw this.log(` ${st.ERROR} Failed to execute provider: \`${r.type}\``),new mi(r.type,n.action,o)}}async executeStep(n,t){if(n.stepId===t.stepId)try{let r=await this.createStepControls(t,n),i=await this.compileControls(r,n),o=await t.resolve(i),a=await this.validate(o,t.outputs.unknownSchema,"step","output",n.workflowId,t.stepId),s=await this.executeProviders(n,t,a);return this.log(` ${st.SUCCESS} Executed stepId: \`${t.stepId}\``),{outputs:a,providers:s}}catch(r){throw this.log(` ${st.ERROR} Failed to execute stepId: \`${t.stepId}\``),On(r)?r:new Sr(t.stepId,n.action,r)}else try{let r=this.getStepState(n,t.stepId);if(r){let i=await this.validate(r.outputs,t.results.unknownSchema,"step","result",n.workflowId,t.stepId);return this.log(` ${st.HYDRATED} Hydrated stepId: \`${t.stepId}\``),{outputs:i,providers:await this.executeProviders(n,t,i)}}else throw new ni(n.workflowId,t.stepId)}catch(r){throw this.log(` ${st.ERROR} Failed to hydrate stepId: \`${t.stepId}\``),r}}async compileControls(n,t){var r;try{let i=this.preprocessTranslationPatterns(JSON.stringify(n));i=this.preprocessFilterTranslationArgs(i);let o=this.templateEngine.parse(i),a=this.getWorkflow(t.workflowId),s={workflow:{workflowId:a.workflowId,name:a.name,description:a.description,tags:a.tags,severity:a.severity},payload:t.payload,subscriber:t.subscriber,context:t.context,steps:lh(t.state),env:(r=t.env)!=null?r:{}},u=await this.templateEngine.render(o,s),p=this.postprocessTranslationMarkers(u),d=(0,kc.jsonrepair)(p),h=JSON.parse(d);return bc(h)}catch(i){throw new si(t.workflowId,t.stepId,i)}}preprocessTranslationPatterns(n){return n.replace(/\{\{\s*t\.([\p{L}\p{N}_.-]+)\s*\}\}/gu,"[T:$1]")}preprocessFilterTranslationArgs(n){return n.replace(/'t\.([\p{L}\p{N}_.-]+)'/gu,"'[T:$1]'")}postprocessTranslationMarkers(n){return n.replace(/\[T:([\p{L}\p{N}_.-]+)\]/gu,"{{t.$1}}")}async createStepControls(n,t){return await this.validate(t.controls,n.controls.unknownSchema,"step","controls",t.workflowId,n.stepId)}async previewStep(n,t){try{return await this.constructStepForPreview(n,t)}catch(r){throw this.log(` ${st.ERROR} Failed to preview stepId: \`${t.stepId}\``),On(r)?r:new Sr(t.stepId,n.action,r)}}async constructStepForPreview(n,t){return n.stepId===t.stepId?await this.previewRequiredStep(t,n):await this.extractMockDataForPreviousSteps(n,t)}async extractMockDataForPreviousSteps(n,t){let r={},i=this.getStepState(n,t.stepId),o=this.mock(t.results.schema);return{outputs:Ka(o,(i==null?void 0:i.outputs)||{}),providers:await this.executeProviders(n,t,r)}}async previewRequiredStep(n,t){let r=await this.createStepControls(n,t),i=await this.compileControls(r,t),o=await n.resolve(i),a=await this.validate(o,n.outputs.unknownSchema,"step","output",t.workflowId,n.stepId);return this.log(` ${st.MOCK} Mocked stepId: \`${n.stepId}\``),{outputs:a,providers:await this.executeProviders(t,n,a)}}getStepState(n,t){return n.state.find(r=>r.stepId===t)}getStepCode(n,t){return{code:this.getStep(n,t).resolve.toString()}}getWorkflowCode(n){return{code:this.getWorkflow(n).execute.toString()}}getCode(n,t){let r;if(n)t?r=this.getStepCode(n,t):r=this.getWorkflowCode(n);else throw new xr(n);return r}};function lh(e){let n={};for(let t of e)n[t.stepId]=t.outputs;return n}var ch={};function ln(e,n){let t=n||ch,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ac(e,r,i)}function Ac(e,n,t){if(uh(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return vc(e.children,n,t)}return Array.isArray(e)?vc(e,n,t):""}function vc(e,n,t){let r=[],i=-1;for(;++i<e.length;)r[i]=Ac(e[i],n,t);return r.join("")}function uh(e){return!!(e&&typeof e=="object")}function Qa(e,n){let t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}var ut=wn(/[A-Za-z]/),pt=wn(/[\dA-Za-z]/),Ec=wn(/[#-'*+\--9=?A-Z^-~]/);function Cn(e){return e!==null&&(e<32||e===127)}var Ar=wn(/\d/),_c=wn(/[\dA-Fa-f]/),Oc=wn(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function Ne(e){return e!==null&&(e<0||e===32)}function we(e){return e===-2||e===-1||e===32}var Pn=wn(/\p{P}|\p{S}/u),Jt=wn(/\s/);function wn(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Za(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Sn=(function(e){if(e==null)return fh;if(typeof e=="function")return Li(e);if(typeof e=="object")return Array.isArray(e)?ph(e):dh(e);if(typeof e=="string")return hh(e);throw new Error("Expected function, string, or object as test")});function ph(e){let n=[],t=-1;for(;++t<e.length;)n[t]=Sn(e[t]);return Li(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function dh(e){let n=e;return Li(t);function t(r){let i=r,o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function hh(e){return Li(n);function n(t){return t&&t.type===e}}function Li(e){return n;function n(t,r,i){return!!(mh(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function fh(){return!0}function mh(e){return e!==null&&typeof e=="object"&&"type"in e}function Rc(e){return"\x1B[33m"+e+"\x1B[39m"}var Ic=[],Di=!0,Mn=!1,Fi="skip";function Er(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;let o=Sn(i),a=r?-1:1;s(e,void 0,[])();function s(u,p,d){let h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){let g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+Rc(u.type+(g?"<"+g+">":""))+")"})}return y;function y(){let g=Ic,P,Z,Q;if((!n||o(u,p,d[d.length-1]||void 0))&&(g=gh(t(u,d)),g[0]===Mn))return g;if("children"in u&&u.children){let j=u;if(j.children&&g[0]!==Fi)for(Z=(r?j.children.length:-1)+a,Q=d.concat(j);Z>-1&&Z<j.children.length;){let pe=j.children[Z];if(P=s(pe,Z,Q)(),P[0]===Mn)return P;Z=typeof P[1]=="number"?P[1]:Z+a}}return g}}}function gh(e){return Array.isArray(e)?e:typeof e=="number"?[Di,e]:e==null?Ic:[e]}function eo(e,n,t){let i=Sn((t||{}).ignore||[]),o=yh(n),a=-1;for(;++a<o.length;)Er(e,"text",s);function s(p,d){let h=-1,y;for(;++h<d.length;){let g=d[h],P=y?y.children:void 0;if(i(g,P?P.indexOf(g):void 0,y))return;y=g}if(y)return u(p,d)}function u(p,d){let h=d[d.length-1],y=o[a][0],g=o[a][1],P=0,Q=h.children.indexOf(p),j=!1,pe=[];y.lastIndex=0;let te=y.exec(p.value);for(;te;){let Te=te.index,Oe={index:te.index,input:te.input,stack:[...d,p]},U=g(...te,Oe);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?y.lastIndex=Te+1:(P!==Te&&pe.push({type:"text",value:p.value.slice(P,Te)}),Array.isArray(U)?pe.push(...U):U&&pe.push(U),P=Te+te[0].length,j=!0),!y.global)break;te=y.exec(p.value)}return j?(P<p.value.length&&pe.push({type:"text",value:p.value.slice(P)}),h.children.splice(Q,1,...pe)):pe=[p],Q+pe.length}}function yh(e){let n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<t.length;){let i=t[r];n.push([bh(i[0]),wh(i[1])])}return n}function bh(e){return typeof e=="string"?new RegExp(Za(e),"g"):e}function wh(e){return typeof e=="function"?e:function(){return e}}var to="phrasing",no=["autolink","link","image","label"];function io(){return{transforms:[Ah],enter:{literalAutolink:Sh,literalAutolinkEmail:ro,literalAutolinkHttp:ro,literalAutolinkWww:ro},exit:{literalAutolink:vh,literalAutolinkEmail:kh,literalAutolinkHttp:xh,literalAutolinkWww:Th}}}function ao(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:to,notInConstruct:no},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:to,notInConstruct:no},{character:":",before:"[ps]",after:"\\/",inConstruct:to,notInConstruct:no}]}}function Sh(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ro(e){this.config.enter.autolinkProtocol.call(this,e)}function xh(e){this.config.exit.autolinkProtocol.call(this,e)}function Th(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function kh(e){this.config.exit.autolinkEmail.call(this,e)}function vh(e){this.exit(e)}function Ah(e){eo(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Eh],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,_h]],{ignore:["link","linkReference"]})}function Eh(e,n,t,r,i){let o="";if(!Cc(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!Oh(t)))return!1;let a=Rh(t+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+n+a[0],children:[{type:"text",value:n+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function _h(e,n,t,r){return!Cc(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Oh(e){let n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Rh(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")"),i=Qa(e,"("),o=Qa(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function Cc(e,n){let t=e.input.charCodeAt(e.index-1);return(e.index===0||Jt(t)||Pn(t))&&(!n||t!==47)}function wt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Pc.peek=Uh;function oo(){return{enter:{gfmFootnoteDefinition:Ih,gfmFootnoteDefinitionLabelString:Ch,gfmFootnoteCall:Nh,gfmFootnoteCallString:Lh},exit:{gfmFootnoteDefinition:Mh,gfmFootnoteDefinitionLabelString:Ph,gfmFootnoteCall:Fh,gfmFootnoteCallString:Dh}}}function so(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:$h,footnoteReference:Pc}}}function Ih(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ch(){this.buffer()}function Ph(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=wt(this.sliceSerialize(e)).toLowerCase()}function Mh(e){this.exit(e)}function Nh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Lh(){this.buffer()}function Dh(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=wt(this.sliceSerialize(e)).toLowerCase()}function Fh(e){this.exit(e)}function Pc(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),a=t.enter("footnoteReference"),s=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function Uh(){return"["}function $h(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),a=t.enter("footnoteDefinition"),s=t.enter("label");return o+=i.move(t.safe(t.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(t.indentLines(t.containerFlow(e,i.current()),qh)),a(),o}function qh(e,n,t){return n===0?e:(t?"":" ")+e}var jh=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Mc.peek=Vh;function lo(){return{canContainEols:["delete"],enter:{strikethrough:Bh},exit:{strikethrough:zh}}}function co(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:jh}],handlers:{delete:Mc}}}function Bh(e){this.enter({type:"delete",children:[]},e)}function zh(e){this.exit(e)}function Mc(e,n,t,r){let i=t.createTracker(r),o=t.enter("strikethrough"),a=i.move("~~");return a+=t.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Vh(){return"~"}function Lc(e,n={}){let t=(n.align||[]).concat(),r=n.stringLength||Hh,i=[],o=[],a=[],s=[],u=0,p=-1;for(;++p<e.length;){let P=[],Z=[],Q=-1;for(e[p].length>u&&(u=e[p].length);++Q<e[p].length;){let j=Wh(e[p][Q]);if(n.alignDelimiters!==!1){let pe=r(j);Z[Q]=pe,(s[Q]===void 0||pe>s[Q])&&(s[Q]=pe)}P.push(j)}o[p]=P,a[p]=Z}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<u;)i[d]=Nc(t[d]);else{let P=Nc(t);for(;++d<u;)i[d]=P}d=-1;let h=[],y=[];for(;++d<u;){let P=i[d],Z="",Q="";P===99?(Z=":",Q=":"):P===108?Z=":":P===114&&(Q=":");let j=n.alignDelimiters===!1?1:Math.max(1,s[d]-Z.length-Q.length),pe=Z+"-".repeat(j)+Q;n.alignDelimiters!==!1&&(j=Z.length+j+Q.length,j>s[d]&&(s[d]=j),y[d]=j),h[d]=pe}o.splice(1,0,h),a.splice(1,0,y),p=-1;let g=[];for(;++p<o.length;){let P=o[p],Z=a[p];d=-1;let Q=[];for(;++d<u;){let j=P[d]||"",pe="",te="";if(n.alignDelimiters!==!1){let Te=s[d]-(Z[d]||0),Oe=i[d];Oe===114?pe=" ".repeat(Te):Oe===99?Te%2?(pe=" ".repeat(Te/2+.5),te=" ".repeat(Te/2-.5)):(pe=" ".repeat(Te/2),te=pe):te=" ".repeat(Te)}n.delimiterStart!==!1&&!d&&Q.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||d)&&Q.push(" "),n.alignDelimiters!==!1&&Q.push(pe),Q.push(j),n.alignDelimiters!==!1&&Q.push(te),n.padding!==!1&&Q.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&Q.push("|")}g.push(n.delimiterEnd===!1?Q.join("").replace(/ +$/,""):Q.join(""))}return g.join(`
|
|
96
96
|
`)}function Wh(e){return e==null?"":String(e)}function Hh(e){return e.length}function Nc(e){let n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Dc(e,n,t,r){let i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);let a=t.indentLines(t.containerFlow(e,o.current()),Yh);return i(),a}function Yh(e,n,t){return">"+(t?"":" ")+e}function Uc(e,n){return Fc(e,n.inConstruct,!0)&&!Fc(e,n.notInConstruct,!1)}function Fc(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function uo(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
|
|
97
97
|
`&&Uc(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
98
98
|
`}function $c(e,n){let t=String(e),r=t.indexOf(n),i=r,o=0,a=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+n.length,r=t.indexOf(n,i);return a}function qc(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function jc(e){let n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Bc(e,n,t,r){let i=jc(t),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(qc(e,t)){let h=t.enter("codeIndented"),y=t.indentLines(o,Jh);return h(),y}let s=t.createTracker(r),u=i.repeat(Math.max($c(o,i)+1,3)),p=t.enter("codeFenced"),d=s.move(u);if(e.lang){let h=t.enter(`codeFencedLang${a}`);d+=s.move(t.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){let h=t.enter(`codeFencedMeta${a}`);d+=s.move(" "),d+=s.move(t.safe(e.meta,{before:d,after:`
|
|
99
99
|
`,encode:["`"],...s.current()})),h()}return d+=s.move(`
|
|
100
100
|
`),o&&(d+=s.move(o+`
|
|
101
101
|
`)),d+=s.move(u),p(),d}function Jh(e,n,t){return(t?"":" ")+e}function Jn(e){let n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function zc(e,n,t,r){let i=Jn(t),o=i==='"'?"Quote":"Apostrophe",a=t.enter("definition"),s=t.enter("label"),u=t.createTracker(r),p=u.move("[");return p+=u.move(t.safe(t.associationId(e),{before:p,after:"]",...u.current()})),p+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(t.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=t.enter("destinationRaw"),p+=u.move(t.safe(e.url,{before:p,after:e.title?" ":`
|
|
102
|
-
`,...u.current()}))),s(),e.title&&(s=t.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(t.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),a(),p}function Vc(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}po.peek=Gh;function po(e,n,t,r){let i=Vc(t),o=t.enter("emphasis"),a=t.createTracker(r),s=a.move(i);return s+=a.move(t.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function Gh(e,n,t){return t.options.emphasis||"*"}function ho(e,n,t,r){let i,o,a;typeof n=="function"&&typeof t!="function"?(o=void 0,a=n,i=t):(o=n,a=t,i=r),
|
|
102
|
+
`,...u.current()}))),s(),e.title&&(s=t.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(t.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),a(),p}function Vc(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}po.peek=Gh;function po(e,n,t,r){let i=Vc(t),o=t.enter("emphasis"),a=t.createTracker(r),s=a.move(i);return s+=a.move(t.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function Gh(e,n,t){return t.options.emphasis||"*"}function ho(e,n,t,r){let i,o,a;typeof n=="function"&&typeof t!="function"?(o=void 0,a=n,i=t):(o=n,a=t,i=r),Er(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)}}function Wc(e,n){let t=!1;return ho(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Mn}),!!((!e.depth||e.depth<3)&&ln(e)&&(n.options.setext||t))}function Hc(e,n,t,r){let i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(Wc(e,t)){let d=t.enter("headingSetext"),h=t.enter("phrasing"),y=t.containerPhrasing(e,{...o.current(),before:`
|
|
103
103
|
`,after:`
|
|
104
104
|
`});return h(),d(),y+`
|
|
105
105
|
`+(i===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
106
106
|
`))+1))}let a="#".repeat(i),s=t.enter("headingAtx"),u=t.enter("phrasing");o.move(a+" ");let p=t.containerPhrasing(e,{before:"# ",after:`
|
|
107
|
-
`,...o.current()});return/^[\t ]/.test(p)&&(p="&#x"+p.charCodeAt(0).toString(16).toUpperCase()+";"+p.slice(1)),p=p?a+" "+p:a,t.options.closeAtx&&(p+=" "+a),u(),s(),p}fo.peek=Kh;function fo(e){return e.value||""}function Kh(){return"<"}mo.peek=Xh;function mo(e,n,t,r){let i=Jn(t),o=i==='"'?"Quote":"Apostrophe",a=t.enter("image"),s=t.enter("label"),u=t.createTracker(r),p=u.move("![");return p+=u.move(t.safe(e.alt,{before:p,after:"]",...u.current()})),p+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(t.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=t.enter("destinationRaw"),p+=u.move(t.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=t.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(t.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),p+=u.move(")"),a(),p}function Xh(){return"!"}go.peek=Qh;function go(e,n,t,r){let i=e.referenceType,o=t.enter("imageReference"),a=t.enter("label"),s=t.createTracker(r),u=s.move("!["),p=t.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=t.stack;t.stack=[],a=t.enter("reference");let h=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return a(),t.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function Qh(){return"!"}yo.peek=Zh;function yo(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){let a=t.unsafe[o],s=t.compilePattern(a),u;if(a.atBreak)for(;u=s.exec(r);){let p=u.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(u.index+1)}}return i+r+i}function Zh(){return"`"}function bo(e,n){let t=ln(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}wo.peek=ef;function wo(e,n,t,r){let i=Jn(t),o=i==='"'?"Quote":"Apostrophe",a=t.createTracker(r),s,u;if(bo(e,t)){let d=t.stack;t.stack=[],s=t.enter("autolink");let h=a.move("<");return h+=a.move(t.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),s(),t.stack=d,h}s=t.enter("link"),u=t.enter("label");let p=a.move("[");return p+=a.move(t.containerPhrasing(e,{before:p,after:"](",...a.current()})),p+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),p+=a.move("<"),p+=a.move(t.safe(e.url,{before:p,after:">",...a.current()})),p+=a.move(">")):(u=t.enter("destinationRaw"),p+=a.move(t.safe(e.url,{before:p,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=t.enter(`title${o}`),p+=a.move(" "+i),p+=a.move(t.safe(e.title,{before:p,after:i,...a.current()})),p+=a.move(i),u()),p+=a.move(")"),s(),p}function ef(e,n,t){return bo(e,t)?"<":"["}So.peek=tf;function So(e,n,t,r){let i=e.referenceType,o=t.enter("linkReference"),a=t.enter("label"),s=t.createTracker(r),u=s.move("["),p=t.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=t.stack;t.stack=[],a=t.enter("reference");let h=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return a(),t.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function tf(){return"["}function Gn(e){let n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Yc(e){let n=Gn(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Jc(e){let n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Ui(e){let n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Gc(e,n,t,r){let i=t.enter("list"),o=t.bulletCurrent,a=e.ordered?Jc(t):Gn(t),s=e.ordered?a==="."?")":".":Yc(t),u=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){let d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),Ui(t)===a&&d){let h=-1;for(;++h<e.children.length;){let y=e.children[h];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),t.bulletCurrent=a;let p=t.containerFlow(e,r);return t.bulletLastUsed=a,t.bulletCurrent=o,i(),p}function Kc(e){let n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Xc(e,n,t,r){let i=Kc(t),o=t.bulletCurrent||Gn(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=t.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=t.enter("listItem"),p=t.indentLines(t.containerFlow(e,s.current()),d);return u(),p;function d(h,y,g){return y?(g?"":" ".repeat(a))+h:(g?o:o+" ".repeat(a-o.length))+h}}function Qc(e,n,t,r){let i=t.enter("paragraph"),o=t.enter("phrasing"),a=t.containerPhrasing(e,r);return o(),i(),a}var xo=Sn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Zc(e,n,t,r){return(e.children.some(function(a){return xo(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function eu(e){let n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}To.peek=nf;function To(e,n,t,r){let i=eu(t),o=t.enter("strong"),a=t.createTracker(r),s=a.move(i+i);return s+=a.move(t.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function nf(e,n,t){return t.options.strong||"*"}function tu(e,n,t,r){return t.safe(e.value,r)}function nu(e){let n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function ru(e,n,t){let r=(Ui(t)+(t.options.ruleSpaces?" ":"")).repeat(nu(t));return t.options.ruleSpaces?r.slice(0,-1):r}var Or={blockquote:Dc,break:uo,code:Bc,definition:zc,emphasis:po,hardBreak:uo,heading:Hc,html:fo,image:mo,imageReference:go,inlineCode:yo,link:wo,linkReference:So,list:Gc,listItem:Xc,paragraph:Qc,root:Zc,strong:To,text:tu,thematicBreak:ru};var ko={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:`
|
|
108
|
-
`,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"};var rf={}.hasOwnProperty;function Kn(e){return rf.call(ko,e)?ko[e]:!1}function $i(e,n){let t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCodePoint(t)}var af=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iu(e){return e.replace(af,of)}function of(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){let i=t.charCodeAt(1),o=i===120||i===88;return $i(t.slice(o?2:1),o?16:10)}return Kn(t)||e}function Eo(){return{enter:{table:sf,tableData:au,tableHeader:au,tableRow:cf},exit:{codeText:uf,table:lf,tableData:vo,tableHeader:vo,tableRow:vo}}}function sf(e){let n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function lf(e){this.exit(e),this.data.inTable=void 0}function cf(e){this.enter({type:"tableRow",children:[]},e)}function vo(e){this.exit(e)}function au(e){this.enter({type:"tableCell",children:[]},e)}function uf(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,pf));let t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function pf(e,n){return n==="|"?n:e}function Ao(e){let n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
107
|
+
`,...o.current()});return/^[\t ]/.test(p)&&(p="&#x"+p.charCodeAt(0).toString(16).toUpperCase()+";"+p.slice(1)),p=p?a+" "+p:a,t.options.closeAtx&&(p+=" "+a),u(),s(),p}fo.peek=Kh;function fo(e){return e.value||""}function Kh(){return"<"}mo.peek=Xh;function mo(e,n,t,r){let i=Jn(t),o=i==='"'?"Quote":"Apostrophe",a=t.enter("image"),s=t.enter("label"),u=t.createTracker(r),p=u.move("![");return p+=u.move(t.safe(e.alt,{before:p,after:"]",...u.current()})),p+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(t.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(s=t.enter("destinationRaw"),p+=u.move(t.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=t.enter(`title${o}`),p+=u.move(" "+i),p+=u.move(t.safe(e.title,{before:p,after:i,...u.current()})),p+=u.move(i),s()),p+=u.move(")"),a(),p}function Xh(){return"!"}go.peek=Qh;function go(e,n,t,r){let i=e.referenceType,o=t.enter("imageReference"),a=t.enter("label"),s=t.createTracker(r),u=s.move("!["),p=t.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=t.stack;t.stack=[],a=t.enter("reference");let h=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return a(),t.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function Qh(){return"!"}yo.peek=Zh;function yo(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){let a=t.unsafe[o],s=t.compilePattern(a),u;if(a.atBreak)for(;u=s.exec(r);){let p=u.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(u.index+1)}}return i+r+i}function Zh(){return"`"}function bo(e,n){let t=ln(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}wo.peek=ef;function wo(e,n,t,r){let i=Jn(t),o=i==='"'?"Quote":"Apostrophe",a=t.createTracker(r),s,u;if(bo(e,t)){let d=t.stack;t.stack=[],s=t.enter("autolink");let h=a.move("<");return h+=a.move(t.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),s(),t.stack=d,h}s=t.enter("link"),u=t.enter("label");let p=a.move("[");return p+=a.move(t.containerPhrasing(e,{before:p,after:"](",...a.current()})),p+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),p+=a.move("<"),p+=a.move(t.safe(e.url,{before:p,after:">",...a.current()})),p+=a.move(">")):(u=t.enter("destinationRaw"),p+=a.move(t.safe(e.url,{before:p,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=t.enter(`title${o}`),p+=a.move(" "+i),p+=a.move(t.safe(e.title,{before:p,after:i,...a.current()})),p+=a.move(i),u()),p+=a.move(")"),s(),p}function ef(e,n,t){return bo(e,t)?"<":"["}So.peek=tf;function So(e,n,t,r){let i=e.referenceType,o=t.enter("linkReference"),a=t.enter("label"),s=t.createTracker(r),u=s.move("["),p=t.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(p+"]["),a();let d=t.stack;t.stack=[],a=t.enter("reference");let h=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return a(),t.stack=d,o(),i==="full"||!p||p!==h?u+=s.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function tf(){return"["}function Gn(e){let n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Yc(e){let n=Gn(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Jc(e){let n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Ui(e){let n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Gc(e,n,t,r){let i=t.enter("list"),o=t.bulletCurrent,a=e.ordered?Jc(t):Gn(t),s=e.ordered?a==="."?")":".":Yc(t),u=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){let d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),Ui(t)===a&&d){let h=-1;for(;++h<e.children.length;){let y=e.children[h];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),t.bulletCurrent=a;let p=t.containerFlow(e,r);return t.bulletLastUsed=a,t.bulletCurrent=o,i(),p}function Kc(e){let n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Xc(e,n,t,r){let i=Kc(t),o=t.bulletCurrent||Gn(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=t.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=t.enter("listItem"),p=t.indentLines(t.containerFlow(e,s.current()),d);return u(),p;function d(h,y,g){return y?(g?"":" ".repeat(a))+h:(g?o:o+" ".repeat(a-o.length))+h}}function Qc(e,n,t,r){let i=t.enter("paragraph"),o=t.enter("phrasing"),a=t.containerPhrasing(e,r);return o(),i(),a}var xo=Sn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Zc(e,n,t,r){return(e.children.some(function(a){return xo(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function eu(e){let n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}To.peek=nf;function To(e,n,t,r){let i=eu(t),o=t.enter("strong"),a=t.createTracker(r),s=a.move(i+i);return s+=a.move(t.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function nf(e,n,t){return t.options.strong||"*"}function tu(e,n,t,r){return t.safe(e.value,r)}function nu(e){let n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function ru(e,n,t){let r=(Ui(t)+(t.options.ruleSpaces?" ":"")).repeat(nu(t));return t.options.ruleSpaces?r.slice(0,-1):r}var _r={blockquote:Dc,break:uo,code:Bc,definition:zc,emphasis:po,hardBreak:uo,heading:Hc,html:fo,image:mo,imageReference:go,inlineCode:yo,link:wo,linkReference:So,list:Gc,listItem:Xc,paragraph:Qc,root:Zc,strong:To,text:tu,thematicBreak:ru};var ko={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:`
|
|
108
|
+
`,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"};var rf={}.hasOwnProperty;function Kn(e){return rf.call(ko,e)?ko[e]:!1}function $i(e,n){let t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCodePoint(t)}var af=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iu(e){return e.replace(af,of)}function of(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){let i=t.charCodeAt(1),o=i===120||i===88;return $i(t.slice(o?2:1),o?16:10)}return Kn(t)||e}function Ao(){return{enter:{table:sf,tableData:au,tableHeader:au,tableRow:cf},exit:{codeText:uf,table:lf,tableData:vo,tableHeader:vo,tableRow:vo}}}function sf(e){let n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function lf(e){this.exit(e),this.data.inTable=void 0}function cf(e){this.enter({type:"tableRow",children:[]},e)}function vo(e){this.exit(e)}function au(e){this.enter({type:"tableCell",children:[]},e)}function uf(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,pf));let t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function pf(e,n){return n==="|"?n:e}function Eo(e){let n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
109
109
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:a,tableCell:u,tableRow:s}};function a(g,P,Z,Q){return p(d(g,Z,Q),g.align)}function s(g,P,Z,Q){let j=h(g,Z,Q),pe=p([j]);return pe.slice(0,pe.indexOf(`
|
|
110
|
-
`))}function u(g,P,Z,Q){let j=Z.enter("tableCell"),pe=Z.enter("phrasing"),te=Z.containerPhrasing(g,{...Q,before:o,after:o});return pe(),j(),te}function p(g,P){return Lc(g,{align:P,alignDelimiters:r,padding:t,stringLength:i})}function d(g,P,Z){let Q=g.children,j=-1,pe=[],te=P.enter("table");for(;++j<Q.length;)pe[j]=h(Q[j],P,Z);return te(),pe}function h(g,P,Z){let Q=g.children,j=-1,pe=[],te=P.enter("tableRow");for(;++j<Q.length;)pe[j]=u(Q[j],g,P,Z);return te(),pe}function y(g,P,Z){let Q=Or.inlineCode(g,P,Z);return Z.stack.includes("tableCell")&&(Q=Q.replace(/\|/g,"\\$&")),Q}}function Oo(){return{exit:{taskListCheckValueChecked:ou,taskListCheckValueUnchecked:ou,paragraph:df}}}function _o(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hf}}}function ou(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function df(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let r=t.children[0];if(r&&r.type==="text"){let i=n.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function hf(e,n,t,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);o&&s.move(a);let u=Or.listItem(e,n,t,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),u;function p(d){return d+a}}function Ro(){return[io(),oo(),lo(),Eo(),Oo()]}function Io(e){return{extensions:[ao(),so(),co(),Ao(e),_o()]}}function lt(e,n,t,r){let i=e.length,o=0,a;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);o<r.length;)a=r.slice(o,o+1e4),a.unshift(n,0),e.splice(...a),o+=1e4,n+=1e4}function Et(e,n){return e.length>0?(lt(e,e.length,0,n),e):n}var su={}.hasOwnProperty;function qi(e){let n={},t=-1;for(;++t<e.length;)ff(n,e[t]);return n}function ff(e,n){let t;for(t in n){let i=(su.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t],a;if(o)for(a in o){su.call(i,a)||(i[a]=[]);let s=o[a];mf(i[a],Array.isArray(s)?s:s?[s]:[])}}}function mf(e,n){let t=-1,r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);lt(e,0,0,r)}var gf={tokenize:xf,partial:!0},lu={tokenize:Tf,partial:!0},cu={tokenize:kf,partial:!0},uu={tokenize:vf,partial:!0},yf={tokenize:Ef,partial:!0},pu={name:"wwwAutolink",tokenize:wf,previous:hu},du={name:"protocolAutolink",tokenize:Sf,previous:fu},cn={name:"emailAutolink",tokenize:bf,previous:mu},Gt={};function Po(){return{text:Gt}}var Nn=48;for(;Nn<123;)Gt[Nn]=cn,Nn++,Nn===58?Nn=65:Nn===91&&(Nn=97);Gt[43]=cn;Gt[45]=cn;Gt[46]=cn;Gt[95]=cn;Gt[72]=[cn,du];Gt[104]=[cn,du];Gt[87]=[cn,pu];Gt[119]=[cn,pu];function bf(e,n,t){let r=this,i,o;return a;function a(h){return!Co(h)||!mu.call(r,r.previous)||Mo(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return Co(h)?(e.consume(h),s):h===64?(e.consume(h),u):t(h)}function u(h){return h===46?e.check(yf,d,p)(h):h===45||h===95||pt(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&&ut(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function wf(e,n,t){let r=this;return i;function i(a){return a!==87&&a!==119||!hu.call(r,r.previous)||Mo(r.events)?t(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gf,e.attempt(lu,e.attempt(cu,o),t),t)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(a)}}function Sf(e,n,t){let r=this,i="",o=!1;return a;function a(h){return(h===72||h===104)&&fu.call(r,r.previous)&&!Mo(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),s):t(h)}function s(h){if(ut(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),s;if(h===58){let y=i.toLowerCase();if(y==="http"||y==="https")return e.consume(h),u}return t(h)}function u(h){return h===47?(e.consume(h),o?p:(o=!0,u)):t(h)}function p(h){return h===null||Cn(h)||Ne(h)||Jt(h)||Pn(h)?t(h):e.attempt(lu,e.attempt(cu,d),t)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function xf(e,n,t){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):t(a)}function o(a){return a===null?t(a):n(a)}}function Tf(e,n,t){let r,i,o;return a;function a(p){return p===46||p===95?e.check(uu,u,s)(p):p===null||Ne(p)||Jt(p)||p!==45&&Pn(p)?u(p):(o=!0,e.consume(p),a)}function s(p){return p===95?r=!0:(i=r,r=void 0),e.consume(p),a}function u(p){return i||r||!o?t(p):n(p)}}function kf(e,n){let t=0,r=0;return i;function i(a){return a===40?(t++,e.consume(a),i):a===41&&r<t?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(uu,n,o)(a):a===null||Ne(a)||Jt(a)?n(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function vf(e,n,t){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Ne(s)||Jt(s)?n(s):t(s)}function i(s){return s===null||s===40||s===91||Ne(s)||Jt(s)?n(s):r(s)}function o(s){return ut(s)?a(s):t(s)}function a(s){return s===59?(e.consume(s),r):ut(s)?(e.consume(s),a):t(s)}}function Ef(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return pt(o)?t(o):n(o)}}function hu(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ne(e)}function fu(e){return!ut(e)}function mu(e){return!(e===47||Co(e))}function Co(e){return e===43||e===45||e===46||e===95||pt(e)}function Mo(e){let n=e.length,t=!1;for(;n--;){let r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function Xn(e){if(e===null||Ne(e)||Jt(e))return 1;if(Pn(e))return 2}function xn(e,n,t){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}var _r={name:"attention",tokenize:Of,resolveAll:Af};function Af(e,n){let t=-1,r,i,o,a,s,u,p,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;let h=Object.assign({},e[r][1].end),y=Object.assign({},e[t][1].start);gu(h,-u),gu(y,u),a={type:u>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:y},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[t][1].start=Object.assign({},s.end),p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=Et(p,[["enter",e[r][1],n],["exit",e[r][1],n]])),p=Et(p,[["enter",i,n],["enter",a,n],["exit",a,n],["enter",o,n]]),p=Et(p,xn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),p=Et(p,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,p=Et(p,[["enter",e[t][1],n],["exit",e[t][1],n]])):d=0,lt(e,r-1,t-r+3,p),t=r+p.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Of(e,n){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Xn(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=Xn(u),h=!d||d===2&&i||t.includes(u),y=!i||i===2&&d||t.includes(r);return p._open=!!(o===42?h:h&&(i||!y)),p._close=!!(o===42?y:y&&(d||!h)),n(u)}}function gu(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var No={name:"autolink",tokenize:_f};function _f(e,n,t){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(g){return ut(g)?(e.consume(g),a):g===64?t(g):p(g)}function a(g){return g===43||g===45||g===46||pt(g)?(r=1,s(g)):p(g)}function s(g){return g===58?(e.consume(g),r=0,u):(g===43||g===45||g===46||pt(g))&&r++<32?(e.consume(g),s):(r=0,p(g))}function u(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):g===null||g===32||g===60||Cn(g)?t(g):(e.consume(g),u)}function p(g){return g===64?(e.consume(g),d):Ac(g)?(e.consume(g),p):t(g)}function d(g){return pt(g)?h(g):t(g)}function h(g){return g===46?(e.consume(g),r=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):y(g)}function y(g){if((g===45||pt(g))&&r++<63){let P=g===45?y:h;return e.consume(g),P}return t(g)}}function be(e,n,t,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return we(u)?(e.enter(t),s(u)):n(u)}function s(u){return we(u)&&o++<i?(e.consume(u),s):(e.exit(t),n(u))}}var Kt={tokenize:Rf,partial:!0};function Rf(e,n,t){return r;function r(o){return we(o)?be(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||oe(o)?n(o):t(o)}}var ji={name:"blockQuote",tokenize:If,continuation:{tokenize:Cf},exit:Pf};function If(e,n,t){let r=this;return i;function i(a){if(a===62){let s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return t(a)}function o(a){return we(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(a))}}function Cf(e,n,t){let r=this;return i;function i(a){return we(a)?be(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(ji,n,t)(a)}}function Pf(e){e.exit("blockQuote")}var Bi={name:"characterEscape",tokenize:Mf};function Mf(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return _c(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}var zi={name:"characterReference",tokenize:Nf};function Nf(e,n,t){let r=this,i=0,o,a;return s;function s(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,a=pt,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=Oc,d):(e.enter("characterReferenceValue"),o=7,a=Er,d(h))}function d(h){if(h===59&&i){let y=e.exit("characterReferenceValue");return a===pt&&!Kn(r.sliceSerialize(y))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return a(h)&&i++<o?(e.consume(h),d):t(h)}}var yu={tokenize:Df,partial:!0},Vi={name:"codeFenced",tokenize:Lf,concrete:!0};function Lf(e,n,t){let r=this,i={tokenize:_e,partial:!0},o=0,a=0,s;return u;function u(U){return p(U)}function p(U){let Fe=r.events[r.events.length-1];return o=Fe&&Fe[1].type==="linePrefix"?Fe[2].sliceSerialize(Fe[1],!0).length:0,s=U,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(U)}function d(U){return U===s?(a++,e.consume(U),d):a<3?t(U):(e.exit("codeFencedFenceSequence"),we(U)?be(e,h,"whitespace")(U):h(U))}function h(U){return U===null||oe(U)?(e.exit("codeFencedFence"),r.interrupt?n(U):e.check(yu,Z,Te)(U)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(U))}function y(U){return U===null||oe(U)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(U)):we(U)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,g,"whitespace")(U)):U===96&&U===s?t(U):(e.consume(U),y)}function g(U){return U===null||oe(U)?h(U):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),P(U))}function P(U){return U===null||oe(U)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(U)):U===96&&U===s?t(U):(e.consume(U),P)}function Z(U){return e.attempt(i,Te,Q)(U)}function Q(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),j}function j(U){return o>0&&we(U)?be(e,pe,"linePrefix",o+1)(U):pe(U)}function pe(U){return U===null||oe(U)?e.check(yu,Z,Te)(U):(e.enter("codeFlowValue"),te(U))}function te(U){return U===null||oe(U)?(e.exit("codeFlowValue"),pe(U)):(e.consume(U),te)}function Te(U){return e.exit("codeFenced"),n(U)}function _e(U,Fe,Ge){let qe=0;return F;function F(Pe){return U.enter("lineEnding"),U.consume(Pe),U.exit("lineEnding"),Se}function Se(Pe){return U.enter("codeFencedFence"),we(Pe)?be(U,je,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Pe):je(Pe)}function je(Pe){return Pe===s?(U.enter("codeFencedFenceSequence"),ge(Pe)):Ge(Pe)}function ge(Pe){return Pe===s?(qe++,U.consume(Pe),ge):qe>=a?(U.exit("codeFencedFenceSequence"),we(Pe)?be(U,Ie,"whitespace")(Pe):Ie(Pe)):Ge(Pe)}function Ie(Pe){return Pe===null||oe(Pe)?(U.exit("codeFencedFence"),Fe(Pe)):Ge(Pe)}}}function Df(e,n,t){let r=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}var Rr={name:"codeIndented",tokenize:Uf},Ff={tokenize:$f,partial:!0};function Uf(e,n,t){let r=this;return i;function i(p){return e.enter("codeIndented"),be(e,o,"linePrefix",5)(p)}function o(p){let d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(p):t(p)}function a(p){return p===null?u(p):oe(p)?e.attempt(Ff,a,u)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||oe(p)?(e.exit("codeFlowValue"),a(p)):(e.consume(p),s)}function u(p){return e.exit("codeIndented"),n(p)}}function $f(e,n,t){let r=this;return i;function i(a){return r.parser.lazy[r.now().line]?t(a):oe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):be(e,o,"linePrefix",5)(a)}function o(a){let s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):oe(a)?i(a):t(a)}}var Lo={name:"codeText",tokenize:Bf,resolve:qf,previous:jf};function qf(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function jf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Bf(e,n,t){let r=this,i=0,o,a;return s;function s(y){return e.enter("codeText"),e.enter("codeTextSequence"),u(y)}function u(y){return y===96?(e.consume(y),i++,u):(e.exit("codeTextSequence"),p(y))}function p(y){return y===null?t(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),p):y===96?(a=e.enter("codeTextSequence"),o=0,h(y)):oe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("codeTextData"),d(y))}function d(y){return y===null||y===32||y===96||oe(y)?(e.exit("codeTextData"),p(y)):(e.consume(y),d)}function h(y){return y===96?(e.consume(y),o++,h):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(a.type="codeTextData",d(y))}}var Wi=class{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){let r=t==null?Number.POSITIVE_INFINITY:t;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){let i=t||0;this.setCursor(Math.trunc(n));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ir(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Ir(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ir(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){let t=this.left.splice(n,Number.POSITIVE_INFINITY);Ir(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Ir(this.left,t.reverse())}}};function Ir(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Hi(e){let n={},t=-1,r,i,o,a,s,u,p,d=new Wi(e);for(;++t<d.length;){for(;t in n;)t=n[t];if(r=d.get(t),t&&r[1].type==="chunkFlow"&&d.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,zf(d,t)),t=n[t],p=!0);else if(r[1]._container){for(o=t,i=void 0;o--&&(a=d.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},d.get(i)[1].start),s=d.slice(i,t),s.unshift(r),d.splice(i,t-i+1,s))}}return lt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!p}function zf(e,n){let t=e.get(n)[1],r=e.get(n)[2],i=n-1,o=[],a=t._tokenizer||r.parser[t.contentType](t.start),s=a.events,u=[],p={},d,h,y=-1,g=t,P=0,Z=0,Q=[Z];for(;g;){for(;e.get(++i)[1]!==g;);o.push(i),g._tokenizer||(d=r.sliceStream(g),g.next||d.push(null),h&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=g,g=g.next}for(g=t;++y<s.length;)s[y][0]==="exit"&&s[y-1][0]==="enter"&&s[y][1].type===s[y-1][1].type&&s[y][1].start.line!==s[y][1].end.line&&(Z=y+1,Q.push(Z),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):Q.pop(),y=Q.length;y--;){let j=s.slice(Q[y],Q[y+1]),pe=o.pop();u.push([pe,pe+j.length-1]),e.splice(pe,2,j)}for(u.reverse(),y=-1;++y<u.length;)p[P+u[y][0]]=P+u[y][1],P+=u[y][1]-u[y][0]-1;return p}var Do={tokenize:Hf,resolve:Wf},Vf={tokenize:Yf,partial:!0};function Wf(e){return Hi(e),e}function Hf(e,n){let t;return r;function r(s){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):oe(s)?e.check(Vf,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),n(s)}function a(s){return e.consume(s),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Yf(e,n,t){let r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),be(e,o,"linePrefix")}function o(a){if(a===null||oe(a))return t(a);let s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function Yi(e,n,t,r,i,o,a,s,u){let p=u||Number.POSITIVE_INFINITY,d=0;return h;function h(j){return j===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(j),e.exit(o),y):j===null||j===32||j===41||Cn(j)?t(j):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),Z(j))}function y(j){return j===62?(e.enter(o),e.consume(j),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),g(j))}function g(j){return j===62?(e.exit("chunkString"),e.exit(s),y(j)):j===null||j===60||oe(j)?t(j):(e.consume(j),j===92?P:g)}function P(j){return j===60||j===62||j===92?(e.consume(j),g):g(j)}function Z(j){return!d&&(j===null||j===41||Ne(j))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),n(j)):d<p&&j===40?(e.consume(j),d++,Z):j===41?(e.consume(j),d--,Z):j===null||j===32||j===40||Cn(j)?t(j):(e.consume(j),j===92?Q:Z)}function Q(j){return j===40||j===41||j===92?(e.consume(j),Z):Z(j)}}function Ji(e,n,t,r,i,o){let a=this,s=0,u;return p;function p(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(o),d}function d(g){return s>999||g===null||g===91||g===93&&!u||g===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?t(g):g===93?(e.exit(o),e.enter(i),e.consume(g),e.exit(i),e.exit(r),n):oe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||oe(g)||s++>999?(e.exit("chunkString"),d(g)):(e.consume(g),u||(u=!we(g)),g===92?y:h)}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function Gi(e,n,t,r,i,o){let a;return s;function s(y){return y===34||y===39||y===40?(e.enter(r),e.enter(i),e.consume(y),e.exit(i),a=y===40?41:y,u):t(y)}function u(y){return y===a?(e.enter(i),e.consume(y),e.exit(i),e.exit(r),n):(e.enter(o),p(y))}function p(y){return y===a?(e.exit(o),u(a)):y===null?t(y):oe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),be(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===a||y===null||oe(y)?(e.exit("chunkString"),p(y)):(e.consume(y),y===92?h:d)}function h(y){return y===a||y===92?(e.consume(y),d):d(y)}}function Ln(e,n){let t;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):we(i)?be(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}var Fo={name:"definition",tokenize:Gf},Jf={tokenize:Kf,partial:!0};function Gf(e,n,t){let r=this,i;return o;function o(g){return e.enter("definition"),a(g)}function a(g){return Ji.call(r,e,s,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function s(g){return i=wt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u):t(g)}function u(g){return Ne(g)?Ln(e,p)(g):p(g)}function p(g){return Yi(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(Jf,h,h)(g)}function h(g){return we(g)?be(e,y,"whitespace")(g):y(g)}function y(g){return g===null||oe(g)?(e.exit("definition"),r.parser.defined.push(i),n(g)):t(g)}}function Kf(e,n,t){return r;function r(s){return Ne(s)?Ln(e,i)(s):t(s)}function i(s){return Gi(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return we(s)?be(e,a,"whitespace")(s):a(s)}function a(s){return s===null||oe(s)?n(s):t(s)}}var Uo={name:"hardBreakEscape",tokenize:Xf};function Xf(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return oe(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}var $o={name:"headingAtx",tokenize:Zf,resolve:Qf};function Qf(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},lt(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function Zf(e,n,t){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Ne(d)?(e.exit("atxHeadingSequence"),s(d)):t(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||oe(d)?(e.exit("atxHeading"),n(d)):we(d)?be(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||Ne(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),p)}}var bu=["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"],qo=["pre","script","style","textarea"];var jo={name:"htmlFlow",tokenize:rm,resolveTo:nm,concrete:!0},em={tokenize:am,partial:!0},tm={tokenize:im,partial:!0};function nm(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function rm(e,n,t){let r=this,i,o,a,s,u;return p;function p(O){return d(O)}function d(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),y):O===47?(e.consume(O),o=!0,Z):O===63?(e.consume(O),i=3,r.interrupt?n:E):ut(O)?(e.consume(O),a=String.fromCharCode(O),Q):t(O)}function y(O){return O===45?(e.consume(O),i=2,g):O===91?(e.consume(O),i=5,s=0,P):ut(O)?(e.consume(O),i=4,r.interrupt?n:E):t(O)}function g(O){return O===45?(e.consume(O),r.interrupt?n:E):t(O)}function P(O){let gt="CDATA[";return O===gt.charCodeAt(s++)?(e.consume(O),s===gt.length?r.interrupt?n:je:P):t(O)}function Z(O){return ut(O)?(e.consume(O),a=String.fromCharCode(O),Q):t(O)}function Q(O){if(O===null||O===47||O===62||Ne(O)){let gt=O===47,Xt=a.toLowerCase();return!gt&&!o&&qo.includes(Xt)?(i=1,r.interrupt?n(O):je(O)):bu.includes(a.toLowerCase())?(i=6,gt?(e.consume(O),j):r.interrupt?n(O):je(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(O):o?pe(O):te(O))}return O===45||pt(O)?(e.consume(O),a+=String.fromCharCode(O),Q):t(O)}function j(O){return O===62?(e.consume(O),r.interrupt?n:je):t(O)}function pe(O){return we(O)?(e.consume(O),pe):F(O)}function te(O){return O===47?(e.consume(O),F):O===58||O===95||ut(O)?(e.consume(O),Te):we(O)?(e.consume(O),te):F(O)}function Te(O){return O===45||O===46||O===58||O===95||pt(O)?(e.consume(O),Te):_e(O)}function _e(O){return O===61?(e.consume(O),U):we(O)?(e.consume(O),_e):te(O)}function U(O){return O===null||O===60||O===61||O===62||O===96?t(O):O===34||O===39?(e.consume(O),u=O,Fe):we(O)?(e.consume(O),U):Ge(O)}function Fe(O){return O===u?(e.consume(O),u=null,qe):O===null||oe(O)?t(O):(e.consume(O),Fe)}function Ge(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Ne(O)?_e(O):(e.consume(O),Ge)}function qe(O){return O===47||O===62||we(O)?te(O):t(O)}function F(O){return O===62?(e.consume(O),Se):t(O)}function Se(O){return O===null||oe(O)?je(O):we(O)?(e.consume(O),Se):t(O)}function je(O){return O===45&&i===2?(e.consume(O),Ze):O===60&&i===1?(e.consume(O),ot):O===62&&i===4?(e.consume(O),xt):O===63&&i===3?(e.consume(O),E):O===93&&i===5?(e.consume(O),Lt):oe(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(em,It,ge)(O)):O===null||oe(O)?(e.exit("htmlFlowData"),ge(O)):(e.consume(O),je)}function ge(O){return e.check(tm,Ie,It)(O)}function Ie(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Pe}function Pe(O){return O===null||oe(O)?ge(O):(e.enter("htmlFlowData"),je(O))}function Ze(O){return O===45?(e.consume(O),E):je(O)}function ot(O){return O===47?(e.consume(O),a="",Rt):je(O)}function Rt(O){if(O===62){let gt=a.toLowerCase();return qo.includes(gt)?(e.consume(O),xt):je(O)}return ut(O)&&a.length<8?(e.consume(O),a+=String.fromCharCode(O),Rt):je(O)}function Lt(O){return O===93?(e.consume(O),E):je(O)}function E(O){return O===62?(e.consume(O),xt):O===45&&i===2?(e.consume(O),E):je(O)}function xt(O){return O===null||oe(O)?(e.exit("htmlFlowData"),It(O)):(e.consume(O),xt)}function It(O){return e.exit("htmlFlow"),n(O)}}function im(e,n,t){let r=this;return i;function i(a){return oe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function am(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Kt,n,t)}}var Bo={name:"htmlText",tokenize:om};function om(e,n,t){let r=this,i,o,a;return s;function s(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),u}function u(E){return E===33?(e.consume(E),p):E===47?(e.consume(E),_e):E===63?(e.consume(E),te):ut(E)?(e.consume(E),Ge):t(E)}function p(E){return E===45?(e.consume(E),d):E===91?(e.consume(E),o=0,P):ut(E)?(e.consume(E),pe):t(E)}function d(E){return E===45?(e.consume(E),g):t(E)}function h(E){return E===null?t(E):E===45?(e.consume(E),y):oe(E)?(a=h,ot(E)):(e.consume(E),h)}function y(E){return E===45?(e.consume(E),g):h(E)}function g(E){return E===62?Ze(E):E===45?y(E):h(E)}function P(E){let xt="CDATA[";return E===xt.charCodeAt(o++)?(e.consume(E),o===xt.length?Z:P):t(E)}function Z(E){return E===null?t(E):E===93?(e.consume(E),Q):oe(E)?(a=Z,ot(E)):(e.consume(E),Z)}function Q(E){return E===93?(e.consume(E),j):Z(E)}function j(E){return E===62?Ze(E):E===93?(e.consume(E),j):Z(E)}function pe(E){return E===null||E===62?Ze(E):oe(E)?(a=pe,ot(E)):(e.consume(E),pe)}function te(E){return E===null?t(E):E===63?(e.consume(E),Te):oe(E)?(a=te,ot(E)):(e.consume(E),te)}function Te(E){return E===62?Ze(E):te(E)}function _e(E){return ut(E)?(e.consume(E),U):t(E)}function U(E){return E===45||pt(E)?(e.consume(E),U):Fe(E)}function Fe(E){return oe(E)?(a=Fe,ot(E)):we(E)?(e.consume(E),Fe):Ze(E)}function Ge(E){return E===45||pt(E)?(e.consume(E),Ge):E===47||E===62||Ne(E)?qe(E):t(E)}function qe(E){return E===47?(e.consume(E),Ze):E===58||E===95||ut(E)?(e.consume(E),F):oe(E)?(a=qe,ot(E)):we(E)?(e.consume(E),qe):Ze(E)}function F(E){return E===45||E===46||E===58||E===95||pt(E)?(e.consume(E),F):Se(E)}function Se(E){return E===61?(e.consume(E),je):oe(E)?(a=Se,ot(E)):we(E)?(e.consume(E),Se):qe(E)}function je(E){return E===null||E===60||E===61||E===62||E===96?t(E):E===34||E===39?(e.consume(E),i=E,ge):oe(E)?(a=je,ot(E)):we(E)?(e.consume(E),je):(e.consume(E),Ie)}function ge(E){return E===i?(e.consume(E),i=void 0,Pe):E===null?t(E):oe(E)?(a=ge,ot(E)):(e.consume(E),ge)}function Ie(E){return E===null||E===34||E===39||E===60||E===61||E===96?t(E):E===47||E===62||Ne(E)?qe(E):(e.consume(E),Ie)}function Pe(E){return E===47||E===62||Ne(E)?qe(E):t(E)}function Ze(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),n):t(E)}function ot(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),Rt}function Rt(E){return we(E)?be(e,Lt,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Lt(E)}function Lt(E){return e.enter("htmlTextData"),a(E)}}var Dn={name:"labelEnd",tokenize:dm,resolveTo:pm,resolveAll:um},sm={tokenize:hm},lm={tokenize:fm},cm={tokenize:mm};function um(e){let n=-1;for(;++n<e.length;){let t=e[n][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(n+1,t.type==="labelImage"?4:2),t.type="data",n++)}return e}function pm(e,n){let t=e.length,r=0,i,o,a,s;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=t);let u={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},d={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",u,n],["enter",p,n]],s=Et(s,e.slice(o+1,o+r+3)),s=Et(s,[["enter",d,n]]),s=Et(s,xn(n.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),n)),s=Et(s,[["exit",d,n],e[a-2],e[a-1],["exit",p,n]]),s=Et(s,e.slice(a+1)),s=Et(s,[["exit",u,n]]),lt(e,o,e.length,s),e}function dm(e,n,t){let r=this,i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(y){return o?o._inactive?h(y):(a=r.parser.defined.includes(wt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),u):t(y)}function u(y){return y===40?e.attempt(sm,d,a?d:h)(y):y===91?e.attempt(lm,d,a?p:h)(y):a?d(y):h(y)}function p(y){return e.attempt(cm,d,h)(y)}function d(y){return n(y)}function h(y){return o._balanced=!0,t(y)}}function hm(e,n,t){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Ne(h)?Ln(e,o)(h):o(h)}function o(h){return h===41?d(h):Yi(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Ne(h)?Ln(e,u)(h):d(h)}function s(h){return t(h)}function u(h){return h===34||h===39||h===40?Gi(e,p,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function p(h){return Ne(h)?Ln(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function fm(e,n,t){let r=this;return i;function i(s){return Ji.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(wt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function a(s){return t(s)}}function mm(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}var zo={name:"labelStartImage",tokenize:gm,resolveAll:Dn.resolveAll};function gm(e,n,t){let r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):t(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}var Vo={name:"labelStartLink",tokenize:ym,resolveAll:Dn.resolveAll};function ym(e,n,t){let r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}var Cr={name:"lineEnding",tokenize:bm};function bm(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,n,"linePrefix")}}var Fn={name:"thematicBreak",tokenize:wm};function wm(e,n,t){let r=0,i;return o;function o(p){return e.enter("thematicBreak"),a(p)}function a(p){return i=p,s(p)}function s(p){return p===i?(e.enter("thematicBreakSequence"),u(p)):r>=3&&(p===null||oe(p))?(e.exit("thematicBreak"),n(p)):t(p)}function u(p){return p===i?(e.consume(p),r++,u):(e.exit("thematicBreakSequence"),we(p)?be(e,s,"whitespace")(p):s(p))}}var St={name:"list",tokenize:Tm,continuation:{tokenize:km},exit:Em},Sm={tokenize:Am,partial:!0},xm={tokenize:vm,partial:!0};function Tm(e,n,t){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(g){let P=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(P==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Er(g)){if(r.containerState.type||(r.containerState.type=P,e.enter(P,{_container:!0})),P==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Fn,t,p)(g):p(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(g)}return t(g)}function u(g){return Er(g)&&++a<10?(e.consume(g),u):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),p(g)):t(g)}function p(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Kt,r.interrupt?t:d,e.attempt(Sm,y,h))}function d(g){return r.containerState.initialBlankLine=!0,o++,y(g)}function h(g){return we(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),y):t(g)}function y(g){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function km(e,n,t){let r=this;return r.containerState._closeFlow=void 0,e.check(Kt,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,n,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!we(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(xm,n,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(St,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function vm(e,n,t){let r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(o):t(o)}}function Em(e){e.exit(this.containerState.type)}function Am(e,n,t){let r=this;return be(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!we(o)&&a&&a[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}var Ki={name:"setextUnderline",tokenize:_m,resolveTo:Om};function Om(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);let a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,n]),e}function _m(e,n,t){let r=this,i;return o;function o(p){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=p,a(p)):t(p)}function a(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===i?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),we(p)?be(e,u,"lineSuffix")(p):u(p))}function u(p){return p===null||oe(p)?(e.exit("setextHeadingLine"),n(p)):t(p)}}var Rm={tokenize:Dm,partial:!0};function Wo(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Mm,continuation:{tokenize:Nm},exit:Lm}},text:{91:{name:"gfmFootnoteCall",tokenize:Pm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Im,resolveTo:Cm}}}}function Im(e,n,t){let r=this,i=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a;for(;i--;){let u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return t(u);let p=wt(r.sliceSerialize({start:a.end,end:r.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function Cm(e,n){let t=e.length,r;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){r=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",a,n],["enter",s,n],["exit",s,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...u),e}function Pm(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,a;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(h){if(o>999||h===93&&!a||h===null||h===91||Ne(h))return t(h);if(h===93){e.exit("chunkString");let y=e.exit("gfmFootnoteCallString");return i.includes(wt(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Ne(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 Mm(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,a=0,s;return u;function u(P){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(P){return P===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(P)}function d(P){if(a>999||P===93&&!s||P===null||P===91||Ne(P))return t(P);if(P===93){e.exit("chunkString");let Z=e.exit("gfmFootnoteDefinitionLabelString");return o=wt(r.sliceSerialize(Z)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Ne(P)||(s=!0),a++,e.consume(P),P===92?h:d}function h(P){return P===91||P===92||P===93?(e.consume(P),a++,d):d(P)}function y(P){return P===58?(e.enter("definitionMarker"),e.consume(P),e.exit("definitionMarker"),i.includes(o)||i.push(o),be(e,g,"gfmFootnoteDefinitionWhitespace")):t(P)}function g(P){return n(P)}}function Nm(e,n,t){return e.check(Kt,n,e.attempt(Rm,n,t))}function Lm(e){e.exit("gfmFootnoteDefinition")}function Dm(e,n,t){let r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(o):t(o)}}function Ho(e){let t=(e||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let p=u;for(;p--;)if(a[p][0]==="exit"&&a[p][1].type==="strikethroughSequenceTemporary"&&a[p][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[p][1].end.offset-a[p][1].start.offset){a[u][1].type="strikethroughSequence",a[p][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},a[p][1].start),end:Object.assign({},a[u][1].end)},h={type:"strikethroughText",start:Object.assign({},a[p][1].end),end:Object.assign({},a[u][1].start)},y=[["enter",d,s],["enter",a[p][1],s],["exit",a[p][1],s],["enter",h,s]],g=s.parser.constructs.insideSpan.null;g&<(y,y.length,0,xn(g,a.slice(p+1,u),s)),lt(y,y.length,0,[["exit",h,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",d,s]]),lt(a,p-1,u-p+3,y),u=p+y.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){let p=this.previous,d=this.events,h=0;return y;function y(P){return p===126&&d[d.length-1][1].type!=="characterEscape"?u(P):(a.enter("strikethroughSequenceTemporary"),g(P))}function g(P){let Z=Xn(p);if(P===126)return h>1?u(P):(a.consume(P),h++,g);if(h<2&&!t)return u(P);let Q=a.exit("strikethroughSequenceTemporary"),j=Xn(P);return Q._open=!j||j===2&&!!Z,Q._close=!Z||Z===2&&!!j,s(P)}}}var Xi=class{constructor(){this.map=[]}add(n,t,r){Fm(this,n,t,r)}consume(n){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push([...n]),n.length=0;let i=r.pop();for(;i;)n.push(...i),i=r.pop();this.map.length=0}};function Fm(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function wu(e,n){let t=!1,r=[];for(;n<e.length;){let i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function Yo(){return{flow:{null:{name:"table",tokenize:Um,resolveAll:$m}}}}function Um(e,n,t){let r=this,i=0,o=0,a;return s;function s(F){let Se=r.events.length-1;for(;Se>-1;){let Ie=r.events[Se][1].type;if(Ie==="lineEnding"||Ie==="linePrefix")Se--;else break}let je=Se>-1?r.events[Se][1].type:null,ge=je==="tableHead"||je==="tableRow"?U:u;return ge===U&&r.parser.lazy[r.now().line]?t(F):ge(F)}function u(F){return e.enter("tableHead"),e.enter("tableRow"),p(F)}function p(F){return F===124||(a=!0,o+=1),d(F)}function d(F){return F===null?t(F):oe(F)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),g):t(F):we(F)?be(e,d,"whitespace")(F):(o+=1,a&&(a=!1,i+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),h(F)))}function h(F){return F===null||F===124||Ne(F)?(e.exit("data"),d(F)):(e.consume(F),F===92?y:h)}function y(F){return F===92||F===124?(e.consume(F),h):h(F)}function g(F){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(F):(e.enter("tableDelimiterRow"),a=!1,we(F)?be(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):P(F))}function P(F){return F===45||F===58?Q(F):F===124?(a=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),Z):_e(F)}function Z(F){return we(F)?be(e,Q,"whitespace")(F):Q(F)}function Q(F){return F===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),j):F===45?(o+=1,j(F)):F===null||oe(F)?Te(F):_e(F)}function j(F){return F===45?(e.enter("tableDelimiterFiller"),pe(F)):_e(F)}function pe(F){return F===45?(e.consume(F),pe):F===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),te):(e.exit("tableDelimiterFiller"),te(F))}function te(F){return we(F)?be(e,Te,"whitespace")(F):Te(F)}function Te(F){return F===124?P(F):F===null||oe(F)?!a||i!==o?_e(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(F)):_e(F)}function _e(F){return t(F)}function U(F){return e.enter("tableRow"),Fe(F)}function Fe(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),Fe):F===null||oe(F)?(e.exit("tableRow"),n(F)):we(F)?be(e,Fe,"whitespace")(F):(e.enter("data"),Ge(F))}function Ge(F){return F===null||F===124||Ne(F)?(e.exit("data"),Fe(F)):(e.consume(F),F===92?qe:Ge)}function qe(F){return F===92||F===124?(e.consume(F),Ge):Ge(F)}}function $m(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,p,d,h,y=new Xi;for(;++t<e.length;){let g=e[t],P=g[1];g[0]==="enter"?P.type==="tableHead"?(s=!1,u!==0&&(Su(y,n,u,p,d),d=void 0,u=0),p={type:"table",start:Object.assign({},P.start),end:Object.assign({},P.end)},y.add(t,0,[["enter",p,n]])):P.type==="tableRow"||P.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],a=[0,t+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},P.start),end:Object.assign({},P.end)},y.add(t,0,[["enter",d,n]])),i=P.type==="tableDelimiterRow"?2:d?3:1):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],h=Qi(y,n,o,i,void 0,h),o=[0,0,0,0]),a[2]=t)):P.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],h=Qi(y,n,o,i,void 0,h)),o=a,a=[o[1],t,0,0])):P.type==="tableHead"?(s=!0,u=t):P.type==="tableRow"||P.type==="tableDelimiterRow"?(u=t,o[1]!==0?(a[0]=a[1],h=Qi(y,n,o,i,t,h)):a[1]!==0&&(h=Qi(y,n,a,i,t,h)),i=0):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")&&(a[3]=t)}for(u!==0&&Su(y,n,u,p,d),y.consume(n.events),t=-1;++t<n.events.length;){let g=n.events[t];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=wu(n.events,t))}return e}function Qi(e,n,t,r,i,o){let a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(o.end=Object.assign({},Qn(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));let u=Qn(n.events,t[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){let p=Qn(n.events,t[2]),d=Qn(n.events,t[3]),h={type:s,start:Object.assign({},p),end:Object.assign({},d)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){let y=n.events[t[2]],g=n.events[t[3]];if(y[1].end=Object.assign({},g[1].end),y[1].type="chunkText",y[1].contentType="text",t[3]>t[2]+1){let P=t[2]+1,Z=t[3]-t[2]-1;e.add(P,Z,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return i!==void 0&&(o.end=Object.assign({},Qn(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function Su(e,n,t,r,i){let o=[],a=Qn(n.events,t);i&&(i.end=Object.assign({},a),o.push(["exit",i,n])),r.end=Object.assign({},a),o.push(["exit",r,n]),e.add(t+1,0,o)}function Qn(e,n){let t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}var qm={name:"tasklistCheck",tokenize:jm};function Jo(){return{text:{91:qm}}}function jm(e,n,t){let r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Ne(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):t(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(u)}function s(u){return oe(u)?n(u):we(u)?e.check({tokenize:Bm},n,t)(u):t(u)}}function Bm(e,n,t){return be(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function xu(e){return qi([Po(),Wo(),Ho(e),Yo(),Jo()])}var zm={};function Zi(e){let n=this,t=e||zm,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(xu(t)),o.push(Ro()),a.push(Io(t))}var Tu={tokenize:Vm};function Vm(e){let n=e.attempt(this.parser.constructs.contentInitial,r,i),t;return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),be(e,n,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return oe(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var vu={tokenize:Wm},ku={tokenize:Hm};function Wm(e){let n=this,t=[],r=0,i,o,a;return s;function s(te){if(r<t.length){let Te=t[r];return n.containerState=Te[1],e.attempt(Te[0].continuation,u,p)(te)}return p(te)}function u(te){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&pe();let Te=n.events.length,_e=Te,U;for(;_e--;)if(n.events[_e][0]==="exit"&&n.events[_e][1].type==="chunkFlow"){U=n.events[_e][1].end;break}j(r);let Fe=Te;for(;Fe<n.events.length;)n.events[Fe][1].end=Object.assign({},U),Fe++;return lt(n.events,_e+1,0,n.events.slice(Te)),n.events.length=Fe,p(te)}return s(te)}function p(te){if(r===t.length){if(!i)return y(te);if(i.currentConstruct&&i.currentConstruct.concrete)return P(te);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ku,d,h)(te)}function d(te){return i&&pe(),j(r),y(te)}function h(te){return n.parser.lazy[n.now().line]=r!==t.length,a=n.now().offset,P(te)}function y(te){return n.containerState={},e.attempt(ku,g,P)(te)}function g(te){return r++,t.push([n.currentConstruct,n.containerState]),y(te)}function P(te){if(te===null){i&&pe(),j(0),e.consume(te);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),Z(te)}function Z(te){if(te===null){Q(e.exit("chunkFlow"),!0),j(0),e.consume(te);return}return oe(te)?(e.consume(te),Q(e.exit("chunkFlow")),r=0,n.interrupt=void 0,s):(e.consume(te),Z)}function Q(te,Te){let _e=n.sliceStream(te);if(Te&&_e.push(null),te.previous=o,o&&(o.next=te),o=te,i.defineSkip(te.start),i.write(_e),n.parser.lazy[te.start.line]){let U=i.events.length;for(;U--;)if(i.events[U][1].start.offset<a&&(!i.events[U][1].end||i.events[U][1].end.offset>a))return;let Fe=n.events.length,Ge=Fe,qe,F;for(;Ge--;)if(n.events[Ge][0]==="exit"&&n.events[Ge][1].type==="chunkFlow"){if(qe){F=n.events[Ge][1].end;break}qe=!0}for(j(r),U=Fe;U<n.events.length;)n.events[U][1].end=Object.assign({},F),U++;lt(n.events,Ge+1,0,n.events.slice(Fe)),n.events.length=U}}function j(te){let Te=t.length;for(;Te-- >te;){let _e=t[Te];n.containerState=_e[1],_e[0].exit.call(n,e)}t.length=te}function pe(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Hm(e,n,t){return be(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var Eu={tokenize:Ym};function Ym(e){let n=this,t=e.attempt(Kt,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Do,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var Au={resolveAll:Iu()},Ou=Ru("string"),_u=Ru("text");function Ru(e){return{tokenize:n,resolveAll:Iu(e==="text"?Jm:void 0)};function n(t){let r=this,i=this.parser.constructs[e],o=t.attempt(i,a,s);return a;function a(d){return p(d)?o(d):s(d)}function s(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),u}function u(d){return p(d)?(t.exit("data"),o(d)):(t.consume(d),u)}function p(d){if(d===null)return!0;let h=i[d],y=-1;if(h)for(;++y<h.length;){let g=h[y];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function Iu(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Jm(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){let r=e[t-1][1],i=n.sliceStream(r),o=i.length,a=-1,s=0,u;for(;o--;){let p=i[o];if(typeof p=="string"){for(a=p.length;p.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(p===-2)u=!0,s++;else if(p!==-1){o++;break}}if(s){let p={type:t===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},p.start),r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(t,0,["enter",p,n],["exit",p,n]),t+=2)}t++}return e}function Cu(e,n,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],u=!0,p={consume:Te,enter:_e,exit:U,attempt:qe(Fe),check:qe(Ge),interrupt:qe(Ge,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:Z,sliceSerialize:P,now:Q,defineSkip:j,write:g},h=n.tokenize.call(d,p),y;return n.resolveAll&&o.push(n),d;function g(ge){return a=Et(a,ge),pe(),a[a.length-1]!==null?[]:(F(n,0),d.events=xn(o,d.events,d),d.events)}function P(ge,Ie){return Km(Z(ge),Ie)}function Z(ge){return Gm(a,ge)}function Q(){let{line:ge,column:Ie,offset:Pe,_index:Ze,_bufferIndex:ot}=r;return{line:ge,column:Ie,offset:Pe,_index:Ze,_bufferIndex:ot}}function j(ge){i[ge.line]=ge.column,je()}function pe(){let ge;for(;r._index<a.length;){let Ie=a[r._index];if(typeof Ie=="string")for(ge=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ge&&r._bufferIndex<Ie.length;)te(Ie.charCodeAt(r._bufferIndex));else te(Ie)}}function te(ge){u=void 0,y=ge,h=h(ge)}function Te(ge){oe(ge)?(r.line++,r.column=1,r.offset+=ge===-3?2:1,je()):ge!==-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=ge,u=!0}function _e(ge,Ie){let Pe=Ie||{};return Pe.type=ge,Pe.start=Q(),d.events.push(["enter",Pe,d]),s.push(Pe),Pe}function U(ge){let Ie=s.pop();return Ie.end=Q(),d.events.push(["exit",Ie,d]),Ie}function Fe(ge,Ie){F(ge,Ie.from)}function Ge(ge,Ie){Ie.restore()}function qe(ge,Ie){return Pe;function Pe(Ze,ot,Rt){let Lt,E,xt,It;return Array.isArray(Ze)?gt(Ze):"tokenize"in Ze?gt([Ze]):O(Ze);function O(ct){return An;function An(Bt){let Qt=Bt!==null&&ct[Bt],fn=Bt!==null&&ct.null,or=[...Array.isArray(Qt)?Qt:Qt?[Qt]:[],...Array.isArray(fn)?fn:fn?[fn]:[]];return gt(or)(Bt)}}function gt(ct){return Lt=ct,E=0,ct.length===0?Rt:Xt(ct[E])}function Xt(ct){return An;function An(Bt){return It=Se(),xt=ct,ct.partial||(d.currentConstruct=ct),ct.name&&d.parser.constructs.disable.null.includes(ct.name)?jn(Bt):ct.tokenize.call(Ie?Object.assign(Object.create(d),Ie):d,p,ar,jn)(Bt)}}function ar(ct){return u=!0,ge(xt,It),ot}function jn(ct){return u=!0,It.restore(),++E<Lt.length?Xt(Lt[E]):Rt}}}function F(ge,Ie){ge.resolveAll&&!o.includes(ge)&&o.push(ge),ge.resolve&<(d.events,Ie,d.events.length-Ie,ge.resolve(d.events.slice(Ie),d)),ge.resolveTo&&(d.events=ge.resolveTo(d.events,d))}function Se(){let ge=Q(),Ie=d.previous,Pe=d.currentConstruct,Ze=d.events.length,ot=Array.from(s);return{restore:Rt,from:Ze};function Rt(){r=ge,d.previous=Ie,d.currentConstruct=Pe,d.events.length=Ze,s=ot,je()}}function je(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Gm(e,n){let t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex,a;if(t===i)a=[e[t].slice(r,o)];else{if(a=e.slice(t,i),r>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Km(e,n){let t=-1,r=[],i;for(;++t<e.length;){let o=e[t],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
110
|
+
`))}function u(g,P,Z,Q){let j=Z.enter("tableCell"),pe=Z.enter("phrasing"),te=Z.containerPhrasing(g,{...Q,before:o,after:o});return pe(),j(),te}function p(g,P){return Lc(g,{align:P,alignDelimiters:r,padding:t,stringLength:i})}function d(g,P,Z){let Q=g.children,j=-1,pe=[],te=P.enter("table");for(;++j<Q.length;)pe[j]=h(Q[j],P,Z);return te(),pe}function h(g,P,Z){let Q=g.children,j=-1,pe=[],te=P.enter("tableRow");for(;++j<Q.length;)pe[j]=u(Q[j],g,P,Z);return te(),pe}function y(g,P,Z){let Q=_r.inlineCode(g,P,Z);return Z.stack.includes("tableCell")&&(Q=Q.replace(/\|/g,"\\$&")),Q}}function _o(){return{exit:{taskListCheckValueChecked:ou,taskListCheckValueUnchecked:ou,paragraph:df}}}function Oo(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hf}}}function ou(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function df(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let r=t.children[0];if(r&&r.type==="text"){let i=n.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function hf(e,n,t,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);o&&s.move(a);let u=_r.listItem(e,n,t,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),u;function p(d){return d+a}}function Ro(){return[io(),oo(),lo(),Ao(),_o()]}function Io(e){return{extensions:[ao(),so(),co(),Eo(e),Oo()]}}function lt(e,n,t,r){let i=e.length,o=0,a;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);o<r.length;)a=r.slice(o,o+1e4),a.unshift(n,0),e.splice(...a),o+=1e4,n+=1e4}function At(e,n){return e.length>0?(lt(e,e.length,0,n),e):n}var su={}.hasOwnProperty;function qi(e){let n={},t=-1;for(;++t<e.length;)ff(n,e[t]);return n}function ff(e,n){let t;for(t in n){let i=(su.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t],a;if(o)for(a in o){su.call(i,a)||(i[a]=[]);let s=o[a];mf(i[a],Array.isArray(s)?s:s?[s]:[])}}}function mf(e,n){let t=-1,r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);lt(e,0,0,r)}var gf={tokenize:xf,partial:!0},lu={tokenize:Tf,partial:!0},cu={tokenize:kf,partial:!0},uu={tokenize:vf,partial:!0},yf={tokenize:Af,partial:!0},pu={name:"wwwAutolink",tokenize:wf,previous:hu},du={name:"protocolAutolink",tokenize:Sf,previous:fu},cn={name:"emailAutolink",tokenize:bf,previous:mu},Gt={};function Po(){return{text:Gt}}var Nn=48;for(;Nn<123;)Gt[Nn]=cn,Nn++,Nn===58?Nn=65:Nn===91&&(Nn=97);Gt[43]=cn;Gt[45]=cn;Gt[46]=cn;Gt[95]=cn;Gt[72]=[cn,du];Gt[104]=[cn,du];Gt[87]=[cn,pu];Gt[119]=[cn,pu];function bf(e,n,t){let r=this,i,o;return a;function a(h){return!Co(h)||!mu.call(r,r.previous)||Mo(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return Co(h)?(e.consume(h),s):h===64?(e.consume(h),u):t(h)}function u(h){return h===46?e.check(yf,d,p)(h):h===45||h===95||pt(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&&ut(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function wf(e,n,t){let r=this;return i;function i(a){return a!==87&&a!==119||!hu.call(r,r.previous)||Mo(r.events)?t(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gf,e.attempt(lu,e.attempt(cu,o),t),t)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(a)}}function Sf(e,n,t){let r=this,i="",o=!1;return a;function a(h){return(h===72||h===104)&&fu.call(r,r.previous)&&!Mo(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),s):t(h)}function s(h){if(ut(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),s;if(h===58){let y=i.toLowerCase();if(y==="http"||y==="https")return e.consume(h),u}return t(h)}function u(h){return h===47?(e.consume(h),o?p:(o=!0,u)):t(h)}function p(h){return h===null||Cn(h)||Ne(h)||Jt(h)||Pn(h)?t(h):e.attempt(lu,e.attempt(cu,d),t)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function xf(e,n,t){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):t(a)}function o(a){return a===null?t(a):n(a)}}function Tf(e,n,t){let r,i,o;return a;function a(p){return p===46||p===95?e.check(uu,u,s)(p):p===null||Ne(p)||Jt(p)||p!==45&&Pn(p)?u(p):(o=!0,e.consume(p),a)}function s(p){return p===95?r=!0:(i=r,r=void 0),e.consume(p),a}function u(p){return i||r||!o?t(p):n(p)}}function kf(e,n){let t=0,r=0;return i;function i(a){return a===40?(t++,e.consume(a),i):a===41&&r<t?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(uu,n,o)(a):a===null||Ne(a)||Jt(a)?n(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function vf(e,n,t){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Ne(s)||Jt(s)?n(s):t(s)}function i(s){return s===null||s===40||s===91||Ne(s)||Jt(s)?n(s):r(s)}function o(s){return ut(s)?a(s):t(s)}function a(s){return s===59?(e.consume(s),r):ut(s)?(e.consume(s),a):t(s)}}function Af(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return pt(o)?t(o):n(o)}}function hu(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ne(e)}function fu(e){return!ut(e)}function mu(e){return!(e===47||Co(e))}function Co(e){return e===43||e===45||e===46||e===95||pt(e)}function Mo(e){let n=e.length,t=!1;for(;n--;){let r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function Xn(e){if(e===null||Ne(e)||Jt(e))return 1;if(Pn(e))return 2}function xn(e,n,t){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}var Or={name:"attention",tokenize:_f,resolveAll:Ef};function Ef(e,n){let t=-1,r,i,o,a,s,u,p,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;let h=Object.assign({},e[r][1].end),y=Object.assign({},e[t][1].start);gu(h,-u),gu(y,u),a={type:u>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:y},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[t][1].start=Object.assign({},s.end),p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=At(p,[["enter",e[r][1],n],["exit",e[r][1],n]])),p=At(p,[["enter",i,n],["enter",a,n],["exit",a,n],["enter",o,n]]),p=At(p,xn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),p=At(p,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,p=At(p,[["enter",e[t][1],n],["exit",e[t][1],n]])):d=0,lt(e,r-1,t-r+3,p),t=r+p.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function _f(e,n){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Xn(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=Xn(u),h=!d||d===2&&i||t.includes(u),y=!i||i===2&&d||t.includes(r);return p._open=!!(o===42?h:h&&(i||!y)),p._close=!!(o===42?y:y&&(d||!h)),n(u)}}function gu(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var No={name:"autolink",tokenize:Of};function Of(e,n,t){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(g){return ut(g)?(e.consume(g),a):g===64?t(g):p(g)}function a(g){return g===43||g===45||g===46||pt(g)?(r=1,s(g)):p(g)}function s(g){return g===58?(e.consume(g),r=0,u):(g===43||g===45||g===46||pt(g))&&r++<32?(e.consume(g),s):(r=0,p(g))}function u(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):g===null||g===32||g===60||Cn(g)?t(g):(e.consume(g),u)}function p(g){return g===64?(e.consume(g),d):Ec(g)?(e.consume(g),p):t(g)}function d(g){return pt(g)?h(g):t(g)}function h(g){return g===46?(e.consume(g),r=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):y(g)}function y(g){if((g===45||pt(g))&&r++<63){let P=g===45?y:h;return e.consume(g),P}return t(g)}}function be(e,n,t,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return we(u)?(e.enter(t),s(u)):n(u)}function s(u){return we(u)&&o++<i?(e.consume(u),s):(e.exit(t),n(u))}}var Kt={tokenize:Rf,partial:!0};function Rf(e,n,t){return r;function r(o){return we(o)?be(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||oe(o)?n(o):t(o)}}var ji={name:"blockQuote",tokenize:If,continuation:{tokenize:Cf},exit:Pf};function If(e,n,t){let r=this;return i;function i(a){if(a===62){let s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return t(a)}function o(a){return we(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(a))}}function Cf(e,n,t){let r=this;return i;function i(a){return we(a)?be(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(ji,n,t)(a)}}function Pf(e){e.exit("blockQuote")}var Bi={name:"characterEscape",tokenize:Mf};function Mf(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Oc(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}var zi={name:"characterReference",tokenize:Nf};function Nf(e,n,t){let r=this,i=0,o,a;return s;function s(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,a=pt,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=_c,d):(e.enter("characterReferenceValue"),o=7,a=Ar,d(h))}function d(h){if(h===59&&i){let y=e.exit("characterReferenceValue");return a===pt&&!Kn(r.sliceSerialize(y))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return a(h)&&i++<o?(e.consume(h),d):t(h)}}var yu={tokenize:Df,partial:!0},Vi={name:"codeFenced",tokenize:Lf,concrete:!0};function Lf(e,n,t){let r=this,i={tokenize:Oe,partial:!0},o=0,a=0,s;return u;function u(U){return p(U)}function p(U){let Fe=r.events[r.events.length-1];return o=Fe&&Fe[1].type==="linePrefix"?Fe[2].sliceSerialize(Fe[1],!0).length:0,s=U,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(U)}function d(U){return U===s?(a++,e.consume(U),d):a<3?t(U):(e.exit("codeFencedFenceSequence"),we(U)?be(e,h,"whitespace")(U):h(U))}function h(U){return U===null||oe(U)?(e.exit("codeFencedFence"),r.interrupt?n(U):e.check(yu,Z,Te)(U)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(U))}function y(U){return U===null||oe(U)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(U)):we(U)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,g,"whitespace")(U)):U===96&&U===s?t(U):(e.consume(U),y)}function g(U){return U===null||oe(U)?h(U):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),P(U))}function P(U){return U===null||oe(U)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(U)):U===96&&U===s?t(U):(e.consume(U),P)}function Z(U){return e.attempt(i,Te,Q)(U)}function Q(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),j}function j(U){return o>0&&we(U)?be(e,pe,"linePrefix",o+1)(U):pe(U)}function pe(U){return U===null||oe(U)?e.check(yu,Z,Te)(U):(e.enter("codeFlowValue"),te(U))}function te(U){return U===null||oe(U)?(e.exit("codeFlowValue"),pe(U)):(e.consume(U),te)}function Te(U){return e.exit("codeFenced"),n(U)}function Oe(U,Fe,Ge){let qe=0;return F;function F(Pe){return U.enter("lineEnding"),U.consume(Pe),U.exit("lineEnding"),Se}function Se(Pe){return U.enter("codeFencedFence"),we(Pe)?be(U,je,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Pe):je(Pe)}function je(Pe){return Pe===s?(U.enter("codeFencedFenceSequence"),ge(Pe)):Ge(Pe)}function ge(Pe){return Pe===s?(qe++,U.consume(Pe),ge):qe>=a?(U.exit("codeFencedFenceSequence"),we(Pe)?be(U,Ie,"whitespace")(Pe):Ie(Pe)):Ge(Pe)}function Ie(Pe){return Pe===null||oe(Pe)?(U.exit("codeFencedFence"),Fe(Pe)):Ge(Pe)}}}function Df(e,n,t){let r=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}var Rr={name:"codeIndented",tokenize:Uf},Ff={tokenize:$f,partial:!0};function Uf(e,n,t){let r=this;return i;function i(p){return e.enter("codeIndented"),be(e,o,"linePrefix",5)(p)}function o(p){let d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(p):t(p)}function a(p){return p===null?u(p):oe(p)?e.attempt(Ff,a,u)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||oe(p)?(e.exit("codeFlowValue"),a(p)):(e.consume(p),s)}function u(p){return e.exit("codeIndented"),n(p)}}function $f(e,n,t){let r=this;return i;function i(a){return r.parser.lazy[r.now().line]?t(a):oe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):be(e,o,"linePrefix",5)(a)}function o(a){let s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):oe(a)?i(a):t(a)}}var Lo={name:"codeText",tokenize:Bf,resolve:qf,previous:jf};function qf(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function jf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Bf(e,n,t){let r=this,i=0,o,a;return s;function s(y){return e.enter("codeText"),e.enter("codeTextSequence"),u(y)}function u(y){return y===96?(e.consume(y),i++,u):(e.exit("codeTextSequence"),p(y))}function p(y){return y===null?t(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),p):y===96?(a=e.enter("codeTextSequence"),o=0,h(y)):oe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("codeTextData"),d(y))}function d(y){return y===null||y===32||y===96||oe(y)?(e.exit("codeTextData"),p(y)):(e.consume(y),d)}function h(y){return y===96?(e.consume(y),o++,h):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(a.type="codeTextData",d(y))}}var Wi=class{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){let r=t==null?Number.POSITIVE_INFINITY:t;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){let i=t||0;this.setCursor(Math.trunc(n));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ir(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Ir(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ir(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){let t=this.left.splice(n,Number.POSITIVE_INFINITY);Ir(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Ir(this.left,t.reverse())}}};function Ir(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Hi(e){let n={},t=-1,r,i,o,a,s,u,p,d=new Wi(e);for(;++t<d.length;){for(;t in n;)t=n[t];if(r=d.get(t),t&&r[1].type==="chunkFlow"&&d.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,zf(d,t)),t=n[t],p=!0);else if(r[1]._container){for(o=t,i=void 0;o--&&(a=d.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},d.get(i)[1].start),s=d.slice(i,t),s.unshift(r),d.splice(i,t-i+1,s))}}return lt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!p}function zf(e,n){let t=e.get(n)[1],r=e.get(n)[2],i=n-1,o=[],a=t._tokenizer||r.parser[t.contentType](t.start),s=a.events,u=[],p={},d,h,y=-1,g=t,P=0,Z=0,Q=[Z];for(;g;){for(;e.get(++i)[1]!==g;);o.push(i),g._tokenizer||(d=r.sliceStream(g),g.next||d.push(null),h&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=g,g=g.next}for(g=t;++y<s.length;)s[y][0]==="exit"&&s[y-1][0]==="enter"&&s[y][1].type===s[y-1][1].type&&s[y][1].start.line!==s[y][1].end.line&&(Z=y+1,Q.push(Z),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):Q.pop(),y=Q.length;y--;){let j=s.slice(Q[y],Q[y+1]),pe=o.pop();u.push([pe,pe+j.length-1]),e.splice(pe,2,j)}for(u.reverse(),y=-1;++y<u.length;)p[P+u[y][0]]=P+u[y][1],P+=u[y][1]-u[y][0]-1;return p}var Do={tokenize:Hf,resolve:Wf},Vf={tokenize:Yf,partial:!0};function Wf(e){return Hi(e),e}function Hf(e,n){let t;return r;function r(s){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):oe(s)?e.check(Vf,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),n(s)}function a(s){return e.consume(s),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Yf(e,n,t){let r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),be(e,o,"linePrefix")}function o(a){if(a===null||oe(a))return t(a);let s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function Yi(e,n,t,r,i,o,a,s,u){let p=u||Number.POSITIVE_INFINITY,d=0;return h;function h(j){return j===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(j),e.exit(o),y):j===null||j===32||j===41||Cn(j)?t(j):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),Z(j))}function y(j){return j===62?(e.enter(o),e.consume(j),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),g(j))}function g(j){return j===62?(e.exit("chunkString"),e.exit(s),y(j)):j===null||j===60||oe(j)?t(j):(e.consume(j),j===92?P:g)}function P(j){return j===60||j===62||j===92?(e.consume(j),g):g(j)}function Z(j){return!d&&(j===null||j===41||Ne(j))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),n(j)):d<p&&j===40?(e.consume(j),d++,Z):j===41?(e.consume(j),d--,Z):j===null||j===32||j===40||Cn(j)?t(j):(e.consume(j),j===92?Q:Z)}function Q(j){return j===40||j===41||j===92?(e.consume(j),Z):Z(j)}}function Ji(e,n,t,r,i,o){let a=this,s=0,u;return p;function p(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(o),d}function d(g){return s>999||g===null||g===91||g===93&&!u||g===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?t(g):g===93?(e.exit(o),e.enter(i),e.consume(g),e.exit(i),e.exit(r),n):oe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||oe(g)||s++>999?(e.exit("chunkString"),d(g)):(e.consume(g),u||(u=!we(g)),g===92?y:h)}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function Gi(e,n,t,r,i,o){let a;return s;function s(y){return y===34||y===39||y===40?(e.enter(r),e.enter(i),e.consume(y),e.exit(i),a=y===40?41:y,u):t(y)}function u(y){return y===a?(e.enter(i),e.consume(y),e.exit(i),e.exit(r),n):(e.enter(o),p(y))}function p(y){return y===a?(e.exit(o),u(a)):y===null?t(y):oe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),be(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===a||y===null||oe(y)?(e.exit("chunkString"),p(y)):(e.consume(y),y===92?h:d)}function h(y){return y===a||y===92?(e.consume(y),d):d(y)}}function Ln(e,n){let t;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):we(i)?be(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}var Fo={name:"definition",tokenize:Gf},Jf={tokenize:Kf,partial:!0};function Gf(e,n,t){let r=this,i;return o;function o(g){return e.enter("definition"),a(g)}function a(g){return Ji.call(r,e,s,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function s(g){return i=wt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u):t(g)}function u(g){return Ne(g)?Ln(e,p)(g):p(g)}function p(g){return Yi(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(Jf,h,h)(g)}function h(g){return we(g)?be(e,y,"whitespace")(g):y(g)}function y(g){return g===null||oe(g)?(e.exit("definition"),r.parser.defined.push(i),n(g)):t(g)}}function Kf(e,n,t){return r;function r(s){return Ne(s)?Ln(e,i)(s):t(s)}function i(s){return Gi(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return we(s)?be(e,a,"whitespace")(s):a(s)}function a(s){return s===null||oe(s)?n(s):t(s)}}var Uo={name:"hardBreakEscape",tokenize:Xf};function Xf(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return oe(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}var $o={name:"headingAtx",tokenize:Zf,resolve:Qf};function Qf(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},lt(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function Zf(e,n,t){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Ne(d)?(e.exit("atxHeadingSequence"),s(d)):t(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||oe(d)?(e.exit("atxHeading"),n(d)):we(d)?be(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||Ne(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),p)}}var bu=["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"],qo=["pre","script","style","textarea"];var jo={name:"htmlFlow",tokenize:rm,resolveTo:nm,concrete:!0},em={tokenize:am,partial:!0},tm={tokenize:im,partial:!0};function nm(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function rm(e,n,t){let r=this,i,o,a,s,u;return p;function p(_){return d(_)}function d(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),h}function h(_){return _===33?(e.consume(_),y):_===47?(e.consume(_),o=!0,Z):_===63?(e.consume(_),i=3,r.interrupt?n:A):ut(_)?(e.consume(_),a=String.fromCharCode(_),Q):t(_)}function y(_){return _===45?(e.consume(_),i=2,g):_===91?(e.consume(_),i=5,s=0,P):ut(_)?(e.consume(_),i=4,r.interrupt?n:A):t(_)}function g(_){return _===45?(e.consume(_),r.interrupt?n:A):t(_)}function P(_){let gt="CDATA[";return _===gt.charCodeAt(s++)?(e.consume(_),s===gt.length?r.interrupt?n:je:P):t(_)}function Z(_){return ut(_)?(e.consume(_),a=String.fromCharCode(_),Q):t(_)}function Q(_){if(_===null||_===47||_===62||Ne(_)){let gt=_===47,Xt=a.toLowerCase();return!gt&&!o&&qo.includes(Xt)?(i=1,r.interrupt?n(_):je(_)):bu.includes(a.toLowerCase())?(i=6,gt?(e.consume(_),j):r.interrupt?n(_):je(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(_):o?pe(_):te(_))}return _===45||pt(_)?(e.consume(_),a+=String.fromCharCode(_),Q):t(_)}function j(_){return _===62?(e.consume(_),r.interrupt?n:je):t(_)}function pe(_){return we(_)?(e.consume(_),pe):F(_)}function te(_){return _===47?(e.consume(_),F):_===58||_===95||ut(_)?(e.consume(_),Te):we(_)?(e.consume(_),te):F(_)}function Te(_){return _===45||_===46||_===58||_===95||pt(_)?(e.consume(_),Te):Oe(_)}function Oe(_){return _===61?(e.consume(_),U):we(_)?(e.consume(_),Oe):te(_)}function U(_){return _===null||_===60||_===61||_===62||_===96?t(_):_===34||_===39?(e.consume(_),u=_,Fe):we(_)?(e.consume(_),U):Ge(_)}function Fe(_){return _===u?(e.consume(_),u=null,qe):_===null||oe(_)?t(_):(e.consume(_),Fe)}function Ge(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Ne(_)?Oe(_):(e.consume(_),Ge)}function qe(_){return _===47||_===62||we(_)?te(_):t(_)}function F(_){return _===62?(e.consume(_),Se):t(_)}function Se(_){return _===null||oe(_)?je(_):we(_)?(e.consume(_),Se):t(_)}function je(_){return _===45&&i===2?(e.consume(_),Ze):_===60&&i===1?(e.consume(_),ot):_===62&&i===4?(e.consume(_),xt):_===63&&i===3?(e.consume(_),A):_===93&&i===5?(e.consume(_),Lt):oe(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(em,It,ge)(_)):_===null||oe(_)?(e.exit("htmlFlowData"),ge(_)):(e.consume(_),je)}function ge(_){return e.check(tm,Ie,It)(_)}function Ie(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Pe}function Pe(_){return _===null||oe(_)?ge(_):(e.enter("htmlFlowData"),je(_))}function Ze(_){return _===45?(e.consume(_),A):je(_)}function ot(_){return _===47?(e.consume(_),a="",Rt):je(_)}function Rt(_){if(_===62){let gt=a.toLowerCase();return qo.includes(gt)?(e.consume(_),xt):je(_)}return ut(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),Rt):je(_)}function Lt(_){return _===93?(e.consume(_),A):je(_)}function A(_){return _===62?(e.consume(_),xt):_===45&&i===2?(e.consume(_),A):je(_)}function xt(_){return _===null||oe(_)?(e.exit("htmlFlowData"),It(_)):(e.consume(_),xt)}function It(_){return e.exit("htmlFlow"),n(_)}}function im(e,n,t){let r=this;return i;function i(a){return oe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function am(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Kt,n,t)}}var Bo={name:"htmlText",tokenize:om};function om(e,n,t){let r=this,i,o,a;return s;function s(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),u}function u(A){return A===33?(e.consume(A),p):A===47?(e.consume(A),Oe):A===63?(e.consume(A),te):ut(A)?(e.consume(A),Ge):t(A)}function p(A){return A===45?(e.consume(A),d):A===91?(e.consume(A),o=0,P):ut(A)?(e.consume(A),pe):t(A)}function d(A){return A===45?(e.consume(A),g):t(A)}function h(A){return A===null?t(A):A===45?(e.consume(A),y):oe(A)?(a=h,ot(A)):(e.consume(A),h)}function y(A){return A===45?(e.consume(A),g):h(A)}function g(A){return A===62?Ze(A):A===45?y(A):h(A)}function P(A){let xt="CDATA[";return A===xt.charCodeAt(o++)?(e.consume(A),o===xt.length?Z:P):t(A)}function Z(A){return A===null?t(A):A===93?(e.consume(A),Q):oe(A)?(a=Z,ot(A)):(e.consume(A),Z)}function Q(A){return A===93?(e.consume(A),j):Z(A)}function j(A){return A===62?Ze(A):A===93?(e.consume(A),j):Z(A)}function pe(A){return A===null||A===62?Ze(A):oe(A)?(a=pe,ot(A)):(e.consume(A),pe)}function te(A){return A===null?t(A):A===63?(e.consume(A),Te):oe(A)?(a=te,ot(A)):(e.consume(A),te)}function Te(A){return A===62?Ze(A):te(A)}function Oe(A){return ut(A)?(e.consume(A),U):t(A)}function U(A){return A===45||pt(A)?(e.consume(A),U):Fe(A)}function Fe(A){return oe(A)?(a=Fe,ot(A)):we(A)?(e.consume(A),Fe):Ze(A)}function Ge(A){return A===45||pt(A)?(e.consume(A),Ge):A===47||A===62||Ne(A)?qe(A):t(A)}function qe(A){return A===47?(e.consume(A),Ze):A===58||A===95||ut(A)?(e.consume(A),F):oe(A)?(a=qe,ot(A)):we(A)?(e.consume(A),qe):Ze(A)}function F(A){return A===45||A===46||A===58||A===95||pt(A)?(e.consume(A),F):Se(A)}function Se(A){return A===61?(e.consume(A),je):oe(A)?(a=Se,ot(A)):we(A)?(e.consume(A),Se):qe(A)}function je(A){return A===null||A===60||A===61||A===62||A===96?t(A):A===34||A===39?(e.consume(A),i=A,ge):oe(A)?(a=je,ot(A)):we(A)?(e.consume(A),je):(e.consume(A),Ie)}function ge(A){return A===i?(e.consume(A),i=void 0,Pe):A===null?t(A):oe(A)?(a=ge,ot(A)):(e.consume(A),ge)}function Ie(A){return A===null||A===34||A===39||A===60||A===61||A===96?t(A):A===47||A===62||Ne(A)?qe(A):(e.consume(A),Ie)}function Pe(A){return A===47||A===62||Ne(A)?qe(A):t(A)}function Ze(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),n):t(A)}function ot(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Rt}function Rt(A){return we(A)?be(e,Lt,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):Lt(A)}function Lt(A){return e.enter("htmlTextData"),a(A)}}var Dn={name:"labelEnd",tokenize:dm,resolveTo:pm,resolveAll:um},sm={tokenize:hm},lm={tokenize:fm},cm={tokenize:mm};function um(e){let n=-1;for(;++n<e.length;){let t=e[n][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(n+1,t.type==="labelImage"?4:2),t.type="data",n++)}return e}function pm(e,n){let t=e.length,r=0,i,o,a,s;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=t);let u={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},d={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",u,n],["enter",p,n]],s=At(s,e.slice(o+1,o+r+3)),s=At(s,[["enter",d,n]]),s=At(s,xn(n.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),n)),s=At(s,[["exit",d,n],e[a-2],e[a-1],["exit",p,n]]),s=At(s,e.slice(a+1)),s=At(s,[["exit",u,n]]),lt(e,o,e.length,s),e}function dm(e,n,t){let r=this,i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(y){return o?o._inactive?h(y):(a=r.parser.defined.includes(wt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),u):t(y)}function u(y){return y===40?e.attempt(sm,d,a?d:h)(y):y===91?e.attempt(lm,d,a?p:h)(y):a?d(y):h(y)}function p(y){return e.attempt(cm,d,h)(y)}function d(y){return n(y)}function h(y){return o._balanced=!0,t(y)}}function hm(e,n,t){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Ne(h)?Ln(e,o)(h):o(h)}function o(h){return h===41?d(h):Yi(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Ne(h)?Ln(e,u)(h):d(h)}function s(h){return t(h)}function u(h){return h===34||h===39||h===40?Gi(e,p,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function p(h){return Ne(h)?Ln(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function fm(e,n,t){let r=this;return i;function i(s){return Ji.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(wt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function a(s){return t(s)}}function mm(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}var zo={name:"labelStartImage",tokenize:gm,resolveAll:Dn.resolveAll};function gm(e,n,t){let r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):t(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}var Vo={name:"labelStartLink",tokenize:ym,resolveAll:Dn.resolveAll};function ym(e,n,t){let r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}var Cr={name:"lineEnding",tokenize:bm};function bm(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,n,"linePrefix")}}var Fn={name:"thematicBreak",tokenize:wm};function wm(e,n,t){let r=0,i;return o;function o(p){return e.enter("thematicBreak"),a(p)}function a(p){return i=p,s(p)}function s(p){return p===i?(e.enter("thematicBreakSequence"),u(p)):r>=3&&(p===null||oe(p))?(e.exit("thematicBreak"),n(p)):t(p)}function u(p){return p===i?(e.consume(p),r++,u):(e.exit("thematicBreakSequence"),we(p)?be(e,s,"whitespace")(p):s(p))}}var St={name:"list",tokenize:Tm,continuation:{tokenize:km},exit:Am},Sm={tokenize:Em,partial:!0},xm={tokenize:vm,partial:!0};function Tm(e,n,t){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(g){let P=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(P==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Ar(g)){if(r.containerState.type||(r.containerState.type=P,e.enter(P,{_container:!0})),P==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Fn,t,p)(g):p(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(g)}return t(g)}function u(g){return Ar(g)&&++a<10?(e.consume(g),u):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),p(g)):t(g)}function p(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Kt,r.interrupt?t:d,e.attempt(Sm,y,h))}function d(g){return r.containerState.initialBlankLine=!0,o++,y(g)}function h(g){return we(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),y):t(g)}function y(g){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function km(e,n,t){let r=this;return r.containerState._closeFlow=void 0,e.check(Kt,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,n,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!we(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(xm,n,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(St,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function vm(e,n,t){let r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(o):t(o)}}function Am(e){e.exit(this.containerState.type)}function Em(e,n,t){let r=this;return be(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!we(o)&&a&&a[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}var Ki={name:"setextUnderline",tokenize:Om,resolveTo:_m};function _m(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);let a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,n]),e}function Om(e,n,t){let r=this,i;return o;function o(p){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=p,a(p)):t(p)}function a(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===i?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),we(p)?be(e,u,"lineSuffix")(p):u(p))}function u(p){return p===null||oe(p)?(e.exit("setextHeadingLine"),n(p)):t(p)}}var Rm={tokenize:Dm,partial:!0};function Wo(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Mm,continuation:{tokenize:Nm},exit:Lm}},text:{91:{name:"gfmFootnoteCall",tokenize:Pm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Im,resolveTo:Cm}}}}function Im(e,n,t){let r=this,i=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a;for(;i--;){let u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return t(u);let p=wt(r.sliceSerialize({start:a.end,end:r.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function Cm(e,n){let t=e.length,r;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){r=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",a,n],["enter",s,n],["exit",s,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...u),e}function Pm(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,a;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(h){if(o>999||h===93&&!a||h===null||h===91||Ne(h))return t(h);if(h===93){e.exit("chunkString");let y=e.exit("gfmFootnoteCallString");return i.includes(wt(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Ne(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 Mm(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,a=0,s;return u;function u(P){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(P){return P===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(P)}function d(P){if(a>999||P===93&&!s||P===null||P===91||Ne(P))return t(P);if(P===93){e.exit("chunkString");let Z=e.exit("gfmFootnoteDefinitionLabelString");return o=wt(r.sliceSerialize(Z)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(P),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Ne(P)||(s=!0),a++,e.consume(P),P===92?h:d}function h(P){return P===91||P===92||P===93?(e.consume(P),a++,d):d(P)}function y(P){return P===58?(e.enter("definitionMarker"),e.consume(P),e.exit("definitionMarker"),i.includes(o)||i.push(o),be(e,g,"gfmFootnoteDefinitionWhitespace")):t(P)}function g(P){return n(P)}}function Nm(e,n,t){return e.check(Kt,n,e.attempt(Rm,n,t))}function Lm(e){e.exit("gfmFootnoteDefinition")}function Dm(e,n,t){let r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(o):t(o)}}function Ho(e){let t=(e||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let p=u;for(;p--;)if(a[p][0]==="exit"&&a[p][1].type==="strikethroughSequenceTemporary"&&a[p][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[p][1].end.offset-a[p][1].start.offset){a[u][1].type="strikethroughSequence",a[p][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},a[p][1].start),end:Object.assign({},a[u][1].end)},h={type:"strikethroughText",start:Object.assign({},a[p][1].end),end:Object.assign({},a[u][1].start)},y=[["enter",d,s],["enter",a[p][1],s],["exit",a[p][1],s],["enter",h,s]],g=s.parser.constructs.insideSpan.null;g&<(y,y.length,0,xn(g,a.slice(p+1,u),s)),lt(y,y.length,0,[["exit",h,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",d,s]]),lt(a,p-1,u-p+3,y),u=p+y.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){let p=this.previous,d=this.events,h=0;return y;function y(P){return p===126&&d[d.length-1][1].type!=="characterEscape"?u(P):(a.enter("strikethroughSequenceTemporary"),g(P))}function g(P){let Z=Xn(p);if(P===126)return h>1?u(P):(a.consume(P),h++,g);if(h<2&&!t)return u(P);let Q=a.exit("strikethroughSequenceTemporary"),j=Xn(P);return Q._open=!j||j===2&&!!Z,Q._close=!Z||Z===2&&!!j,s(P)}}}var Xi=class{constructor(){this.map=[]}add(n,t,r){Fm(this,n,t,r)}consume(n){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push([...n]),n.length=0;let i=r.pop();for(;i;)n.push(...i),i=r.pop();this.map.length=0}};function Fm(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function wu(e,n){let t=!1,r=[];for(;n<e.length;){let i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function Yo(){return{flow:{null:{name:"table",tokenize:Um,resolveAll:$m}}}}function Um(e,n,t){let r=this,i=0,o=0,a;return s;function s(F){let Se=r.events.length-1;for(;Se>-1;){let Ie=r.events[Se][1].type;if(Ie==="lineEnding"||Ie==="linePrefix")Se--;else break}let je=Se>-1?r.events[Se][1].type:null,ge=je==="tableHead"||je==="tableRow"?U:u;return ge===U&&r.parser.lazy[r.now().line]?t(F):ge(F)}function u(F){return e.enter("tableHead"),e.enter("tableRow"),p(F)}function p(F){return F===124||(a=!0,o+=1),d(F)}function d(F){return F===null?t(F):oe(F)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),g):t(F):we(F)?be(e,d,"whitespace")(F):(o+=1,a&&(a=!1,i+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),h(F)))}function h(F){return F===null||F===124||Ne(F)?(e.exit("data"),d(F)):(e.consume(F),F===92?y:h)}function y(F){return F===92||F===124?(e.consume(F),h):h(F)}function g(F){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(F):(e.enter("tableDelimiterRow"),a=!1,we(F)?be(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):P(F))}function P(F){return F===45||F===58?Q(F):F===124?(a=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),Z):Oe(F)}function Z(F){return we(F)?be(e,Q,"whitespace")(F):Q(F)}function Q(F){return F===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),j):F===45?(o+=1,j(F)):F===null||oe(F)?Te(F):Oe(F)}function j(F){return F===45?(e.enter("tableDelimiterFiller"),pe(F)):Oe(F)}function pe(F){return F===45?(e.consume(F),pe):F===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),te):(e.exit("tableDelimiterFiller"),te(F))}function te(F){return we(F)?be(e,Te,"whitespace")(F):Te(F)}function Te(F){return F===124?P(F):F===null||oe(F)?!a||i!==o?Oe(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(F)):Oe(F)}function Oe(F){return t(F)}function U(F){return e.enter("tableRow"),Fe(F)}function Fe(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),Fe):F===null||oe(F)?(e.exit("tableRow"),n(F)):we(F)?be(e,Fe,"whitespace")(F):(e.enter("data"),Ge(F))}function Ge(F){return F===null||F===124||Ne(F)?(e.exit("data"),Fe(F)):(e.consume(F),F===92?qe:Ge)}function qe(F){return F===92||F===124?(e.consume(F),Ge):Ge(F)}}function $m(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,p,d,h,y=new Xi;for(;++t<e.length;){let g=e[t],P=g[1];g[0]==="enter"?P.type==="tableHead"?(s=!1,u!==0&&(Su(y,n,u,p,d),d=void 0,u=0),p={type:"table",start:Object.assign({},P.start),end:Object.assign({},P.end)},y.add(t,0,[["enter",p,n]])):P.type==="tableRow"||P.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],a=[0,t+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},P.start),end:Object.assign({},P.end)},y.add(t,0,[["enter",d,n]])),i=P.type==="tableDelimiterRow"?2:d?3:1):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],h=Qi(y,n,o,i,void 0,h),o=[0,0,0,0]),a[2]=t)):P.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],h=Qi(y,n,o,i,void 0,h)),o=a,a=[o[1],t,0,0])):P.type==="tableHead"?(s=!0,u=t):P.type==="tableRow"||P.type==="tableDelimiterRow"?(u=t,o[1]!==0?(a[0]=a[1],h=Qi(y,n,o,i,t,h)):a[1]!==0&&(h=Qi(y,n,a,i,t,h)),i=0):i&&(P.type==="data"||P.type==="tableDelimiterMarker"||P.type==="tableDelimiterFiller")&&(a[3]=t)}for(u!==0&&Su(y,n,u,p,d),y.consume(n.events),t=-1;++t<n.events.length;){let g=n.events[t];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=wu(n.events,t))}return e}function Qi(e,n,t,r,i,o){let a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(o.end=Object.assign({},Qn(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));let u=Qn(n.events,t[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){let p=Qn(n.events,t[2]),d=Qn(n.events,t[3]),h={type:s,start:Object.assign({},p),end:Object.assign({},d)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){let y=n.events[t[2]],g=n.events[t[3]];if(y[1].end=Object.assign({},g[1].end),y[1].type="chunkText",y[1].contentType="text",t[3]>t[2]+1){let P=t[2]+1,Z=t[3]-t[2]-1;e.add(P,Z,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return i!==void 0&&(o.end=Object.assign({},Qn(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function Su(e,n,t,r,i){let o=[],a=Qn(n.events,t);i&&(i.end=Object.assign({},a),o.push(["exit",i,n])),r.end=Object.assign({},a),o.push(["exit",r,n]),e.add(t+1,0,o)}function Qn(e,n){let t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}var qm={name:"tasklistCheck",tokenize:jm};function Jo(){return{text:{91:qm}}}function jm(e,n,t){let r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Ne(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):t(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(u)}function s(u){return oe(u)?n(u):we(u)?e.check({tokenize:Bm},n,t)(u):t(u)}}function Bm(e,n,t){return be(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function xu(e){return qi([Po(),Wo(),Ho(e),Yo(),Jo()])}var zm={};function Zi(e){let n=this,t=e||zm,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(xu(t)),o.push(Ro()),a.push(Io(t))}var Tu={tokenize:Vm};function Vm(e){let n=e.attempt(this.parser.constructs.contentInitial,r,i),t;return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),be(e,n,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return oe(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var vu={tokenize:Wm},ku={tokenize:Hm};function Wm(e){let n=this,t=[],r=0,i,o,a;return s;function s(te){if(r<t.length){let Te=t[r];return n.containerState=Te[1],e.attempt(Te[0].continuation,u,p)(te)}return p(te)}function u(te){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&pe();let Te=n.events.length,Oe=Te,U;for(;Oe--;)if(n.events[Oe][0]==="exit"&&n.events[Oe][1].type==="chunkFlow"){U=n.events[Oe][1].end;break}j(r);let Fe=Te;for(;Fe<n.events.length;)n.events[Fe][1].end=Object.assign({},U),Fe++;return lt(n.events,Oe+1,0,n.events.slice(Te)),n.events.length=Fe,p(te)}return s(te)}function p(te){if(r===t.length){if(!i)return y(te);if(i.currentConstruct&&i.currentConstruct.concrete)return P(te);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ku,d,h)(te)}function d(te){return i&&pe(),j(r),y(te)}function h(te){return n.parser.lazy[n.now().line]=r!==t.length,a=n.now().offset,P(te)}function y(te){return n.containerState={},e.attempt(ku,g,P)(te)}function g(te){return r++,t.push([n.currentConstruct,n.containerState]),y(te)}function P(te){if(te===null){i&&pe(),j(0),e.consume(te);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),Z(te)}function Z(te){if(te===null){Q(e.exit("chunkFlow"),!0),j(0),e.consume(te);return}return oe(te)?(e.consume(te),Q(e.exit("chunkFlow")),r=0,n.interrupt=void 0,s):(e.consume(te),Z)}function Q(te,Te){let Oe=n.sliceStream(te);if(Te&&Oe.push(null),te.previous=o,o&&(o.next=te),o=te,i.defineSkip(te.start),i.write(Oe),n.parser.lazy[te.start.line]){let U=i.events.length;for(;U--;)if(i.events[U][1].start.offset<a&&(!i.events[U][1].end||i.events[U][1].end.offset>a))return;let Fe=n.events.length,Ge=Fe,qe,F;for(;Ge--;)if(n.events[Ge][0]==="exit"&&n.events[Ge][1].type==="chunkFlow"){if(qe){F=n.events[Ge][1].end;break}qe=!0}for(j(r),U=Fe;U<n.events.length;)n.events[U][1].end=Object.assign({},F),U++;lt(n.events,Ge+1,0,n.events.slice(Fe)),n.events.length=U}}function j(te){let Te=t.length;for(;Te-- >te;){let Oe=t[Te];n.containerState=Oe[1],Oe[0].exit.call(n,e)}t.length=te}function pe(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Hm(e,n,t){return be(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var Au={tokenize:Ym};function Ym(e){let n=this,t=e.attempt(Kt,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Do,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var Eu={resolveAll:Iu()},_u=Ru("string"),Ou=Ru("text");function Ru(e){return{tokenize:n,resolveAll:Iu(e==="text"?Jm:void 0)};function n(t){let r=this,i=this.parser.constructs[e],o=t.attempt(i,a,s);return a;function a(d){return p(d)?o(d):s(d)}function s(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),u}function u(d){return p(d)?(t.exit("data"),o(d)):(t.consume(d),u)}function p(d){if(d===null)return!0;let h=i[d],y=-1;if(h)for(;++y<h.length;){let g=h[y];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function Iu(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Jm(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){let r=e[t-1][1],i=n.sliceStream(r),o=i.length,a=-1,s=0,u;for(;o--;){let p=i[o];if(typeof p=="string"){for(a=p.length;p.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(p===-2)u=!0,s++;else if(p!==-1){o++;break}}if(s){let p={type:t===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},p.start),r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(t,0,["enter",p,n],["exit",p,n]),t+=2)}t++}return e}function Cu(e,n,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],u=!0,p={consume:Te,enter:Oe,exit:U,attempt:qe(Fe),check:qe(Ge),interrupt:qe(Ge,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:Z,sliceSerialize:P,now:Q,defineSkip:j,write:g},h=n.tokenize.call(d,p),y;return n.resolveAll&&o.push(n),d;function g(ge){return a=At(a,ge),pe(),a[a.length-1]!==null?[]:(F(n,0),d.events=xn(o,d.events,d),d.events)}function P(ge,Ie){return Km(Z(ge),Ie)}function Z(ge){return Gm(a,ge)}function Q(){let{line:ge,column:Ie,offset:Pe,_index:Ze,_bufferIndex:ot}=r;return{line:ge,column:Ie,offset:Pe,_index:Ze,_bufferIndex:ot}}function j(ge){i[ge.line]=ge.column,je()}function pe(){let ge;for(;r._index<a.length;){let Ie=a[r._index];if(typeof Ie=="string")for(ge=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ge&&r._bufferIndex<Ie.length;)te(Ie.charCodeAt(r._bufferIndex));else te(Ie)}}function te(ge){u=void 0,y=ge,h=h(ge)}function Te(ge){oe(ge)?(r.line++,r.column=1,r.offset+=ge===-3?2:1,je()):ge!==-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=ge,u=!0}function Oe(ge,Ie){let Pe=Ie||{};return Pe.type=ge,Pe.start=Q(),d.events.push(["enter",Pe,d]),s.push(Pe),Pe}function U(ge){let Ie=s.pop();return Ie.end=Q(),d.events.push(["exit",Ie,d]),Ie}function Fe(ge,Ie){F(ge,Ie.from)}function Ge(ge,Ie){Ie.restore()}function qe(ge,Ie){return Pe;function Pe(Ze,ot,Rt){let Lt,A,xt,It;return Array.isArray(Ze)?gt(Ze):"tokenize"in Ze?gt([Ze]):_(Ze);function _(ct){return En;function En(Bt){let Qt=Bt!==null&&ct[Bt],fn=Bt!==null&&ct.null,or=[...Array.isArray(Qt)?Qt:Qt?[Qt]:[],...Array.isArray(fn)?fn:fn?[fn]:[]];return gt(or)(Bt)}}function gt(ct){return Lt=ct,A=0,ct.length===0?Rt:Xt(ct[A])}function Xt(ct){return En;function En(Bt){return It=Se(),xt=ct,ct.partial||(d.currentConstruct=ct),ct.name&&d.parser.constructs.disable.null.includes(ct.name)?jn(Bt):ct.tokenize.call(Ie?Object.assign(Object.create(d),Ie):d,p,ar,jn)(Bt)}}function ar(ct){return u=!0,ge(xt,It),ot}function jn(ct){return u=!0,It.restore(),++A<Lt.length?Xt(Lt[A]):Rt}}}function F(ge,Ie){ge.resolveAll&&!o.includes(ge)&&o.push(ge),ge.resolve&<(d.events,Ie,d.events.length-Ie,ge.resolve(d.events.slice(Ie),d)),ge.resolveTo&&(d.events=ge.resolveTo(d.events,d))}function Se(){let ge=Q(),Ie=d.previous,Pe=d.currentConstruct,Ze=d.events.length,ot=Array.from(s);return{restore:Rt,from:Ze};function Rt(){r=ge,d.previous=Ie,d.currentConstruct=Pe,d.events.length=Ze,s=ot,je()}}function je(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Gm(e,n){let t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex,a;if(t===i)a=[e[t].slice(r,o)];else{if(a=e.slice(t,i),r>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Km(e,n){let t=-1,r=[],i;for(;++t<e.length;){let o=e[t],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
111
111
|
`;break}case-3:{a=`\r
|
|
112
|
-
`;break}case-2:{a=n?" ":" ";break}case-1:{if(!n&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}var Go={};Hl(Go,{attentionMarkers:()=>ig,contentInitial:()=>Qm,disable:()=>ag,document:()=>Xm,flow:()=>eg,flowInitial:()=>Zm,insideSpan:()=>rg,string:()=>tg,text:()=>ng});var Xm={42:St,43:St,45:St,48:St,49:St,50:St,51:St,52:St,53:St,54:St,55:St,56:St,57:St,62:ji},Qm={91:Fo},Zm={[-2]:Rr,[-1]:Rr,32:Rr},eg={35:$o,42:Fn,45:[Ki,Fn],60:jo,61:Ki,95:Fn,96:Vi,126:Vi},tg={38:zi,92:Bi},ng={[-5]:Cr,[-4]:Cr,[-3]:Cr,33:zo,38:zi,42:_r,60:[No,Bo],91:Vo,92:[Uo,Bi],93:Dn,95:_r,96:Lo},rg={null:[_r,Au]},ig={null:[42,95]},ag={null:[]};function Ko(e){let t=qi([Go,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(Tu),document:i(vu),flow:i(Eu),string:i(Ou),text:i(_u)};return r;function i(o){return a;function a(s){return Cu(r,o,s)}}}function Xo(e){for(;!Hi(e););return e}var Pu=/[\0\t\n\r]/g;function Qo(){let e=1,n="",t=!0,r;return i;function i(o,a,s){let u=[],p,d,h,y,g;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===65279&&h++,t=void 0);h<o.length;){if(Pu.lastIndex=h,p=Pu.exec(o),y=p&&p.index!==void 0?p.index:o.length,g=o.charCodeAt(y),!p){n=o.slice(h);break}if(g===10&&h===y&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<y&&(u.push(o.slice(h,y)),e+=y-h),g){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=y+1}return s&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}function Tn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Mu(e.position):"start"in e||"end"in e?Mu(e):"line"in e||"column"in e?Zo(e):""}function Zo(e){return Nu(e&&e.line)+":"+Nu(e&&e.column)}function Mu(e){return Zo(e&&e.start)+"-"+Zo(e&&e.end)}function Nu(e){return e&&typeof e=="number"?e:1}var Du={}.hasOwnProperty;function es(e,n,t){return typeof n!="string"&&(t=n,n=void 0),og(t)(Xo(Ko(t).document().write(Qo()(e,n,!0))))}function og(e){let n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Br),autolinkProtocol:qe,autolinkEmail:qe,atxHeading:o(qr),blockQuote:o(Bt),characterEscape:qe,characterReference:qe,codeFenced:o(Qt),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Qt,a),codeText:o(fn,a),codeTextData:qe,data:qe,codeFlowValue:qe,definition:o(or),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(va),hardBreakEscape:o(jr),hardBreakTrailing:o(jr),htmlFlow:o(sr,a),htmlFlowData:qe,htmlText:o(sr,a),htmlTextData:qe,image:o(Ea),label:a,link:o(Br),listItem:o(Aa),listItemValue:y,listOrdered:o(zr,h),listUnordered:o(zr),paragraph:o(Oa),reference:O,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(qr),strong:o(_a),thematicBreak:o(Ia)},exit:{atxHeading:u(),atxHeadingSequence:_e,autolink:u(),autolinkEmail:An,autolinkProtocol:ct,blockQuote:u(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Xt,characterReferenceMarkerNumeric:Xt,characterReferenceValue:ar,characterReference:jn,codeFenced:u(Q),codeFencedFence:Z,codeFencedFenceInfo:g,codeFencedFenceMeta:P,codeFlowValue:F,codeIndented:u(j),codeText:u(Pe),codeTextData:F,data:F,definition:u(),definitionDestinationString:Te,definitionLabelString:pe,definitionTitleString:te,emphasis:u(),hardBreakEscape:u(je),hardBreakTrailing:u(je),htmlFlow:u(ge),htmlFlowData:F,htmlText:u(Ie),htmlTextData:F,image:u(ot),label:Lt,labelText:Rt,lineEnding:Se,link:u(Ze),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:gt,resourceDestinationString:E,resourceTitleString:xt,resource:It,setextHeading:u(Ge),setextHeadingLineSequence:Fe,setextHeadingText:U,strong:u(),thematicBreak:u()}};Fu(n,(e||{}).mdastExtensions||[]);let t={};return r;function r($){let ne={type:"root",children:[]},Re={stack:[ne],tokenStack:[],config:n,enter:s,exit:p,buffer:a,resume:d,data:t},Le=[],ze=-1;for(;++ze<$.length;)if($[ze][1].type==="listOrdered"||$[ze][1].type==="listUnordered")if($[ze][0]==="enter")Le.push(ze);else{let Ct=Le.pop();ze=i($,Ct,ze)}for(ze=-1;++ze<$.length;){let Ct=n[$[ze][0]];Du.call(Ct,$[ze][1].type)&&Ct[$[ze][1].type].call(Object.assign({sliceSerialize:$[ze][2].sliceSerialize},Re),$[ze][1])}if(Re.tokenStack.length>0){let Ct=Re.tokenStack[Re.tokenStack.length-1];(Ct[1]||Lu).call(Re,void 0,Ct[0])}for(ne.position={start:kn($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:kn($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<n.transforms.length;)ne=n.transforms[ze](ne)||ne;return ne}function i($,ne,Re){let Le=ne-1,ze=-1,Ct=!1,Zt,zt,en,On;for(;++Le<=Re;){let yt=$[Le];switch(yt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{yt[0]==="enter"?ze++:ze--,On=void 0;break}case"lineEndingBlank":{yt[0]==="enter"&&(Zt&&!On&&!ze&&!en&&(en=Le),On=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:On=void 0}if(!ze&&yt[0]==="enter"&&yt[1].type==="listItemPrefix"||ze===-1&&yt[0]==="exit"&&(yt[1].type==="listUnordered"||yt[1].type==="listOrdered")){if(Zt){let tn=Le;for(zt=void 0;tn--;){let Dt=$[tn];if(Dt[1].type==="lineEnding"||Dt[1].type==="lineEndingBlank"){if(Dt[0]==="exit")continue;zt&&($[zt][1].type="lineEndingBlank",Ct=!0),Dt[1].type="lineEnding",zt=tn}else if(!(Dt[1].type==="linePrefix"||Dt[1].type==="blockQuotePrefix"||Dt[1].type==="blockQuotePrefixWhitespace"||Dt[1].type==="blockQuoteMarker"||Dt[1].type==="listItemIndent"))break}en&&(!zt||en<zt)&&(Zt._spread=!0),Zt.end=Object.assign({},zt?$[zt][1].start:yt[1].end),$.splice(zt||Le,0,["exit",Zt,yt[2]]),Le++,Re++}if(yt[1].type==="listItemPrefix"){let tn={type:"listItem",_spread:!1,start:Object.assign({},yt[1].start),end:void 0};Zt=tn,$.splice(Le,0,["enter",tn,yt[2]]),Le++,Re++,en=void 0,On=!0}}}return $[ne][1]._spread=Ct,Re}function o($,ne){return Re;function Re(Le){s.call(this,$(Le),Le),ne&&ne.call(this,Le)}}function a(){this.stack.push({type:"fragment",children:[]})}function s($,ne,Re){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([ne,Re]),$.position={start:kn(ne.start),end:void 0}}function u($){return ne;function ne(Re){$&&$.call(this,Re),p.call(this,Re)}}function p($,ne){let Re=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==$.type&&(ne?ne.call(this,$,Le[0]):(Le[1]||Lu).call(this,$,Le[0]));else throw new Error("Cannot close `"+$.type+"` ("+Tn({start:$.start,end:$.end})+"): it\u2019s not open");Re.position.end=kn($.end)}function d(){return ln(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function y($){if(this.data.expectingFirstListItemValue){let ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function g(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=$}function P(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=$}function Z(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function Q(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$.replace(/(\r?\n|\r)$/g,"")}function pe($){let ne=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ne,Re.identifier=wt(this.sliceSerialize($)).toLowerCase()}function te(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.title=$}function Te(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.url=$}function _e($){let ne=this.stack[this.stack.length-1];if(!ne.depth){let Re=this.sliceSerialize($).length;ne.depth=Re}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function Fe($){let ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function Ge(){this.data.setextHeadingSlurpLineEnding=void 0}function qe($){let Re=this.stack[this.stack.length-1].children,Le=Re[Re.length-1];(!Le||Le.type!=="text")&&(Le=Ra(),Le.position={start:kn($.start),end:void 0},Re.push(Le)),this.stack.push(Le)}function F($){let ne=this.stack.pop();ne.value+=this.sliceSerialize($),ne.position.end=kn($.end)}function Se($){let ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Re=ne.children[ne.children.length-1];Re.position.end=kn($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ne.type)&&(qe.call(this,$),F.call(this,$))}function je(){this.data.atHardBreak=!0}function ge(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$}function Ie(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$}function Pe(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$}function Ze(){let $=this.stack[this.stack.length-1];if(this.data.inReference){let ne=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=ne,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ot(){let $=this.stack[this.stack.length-1];if(this.data.inReference){let ne=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=ne,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function Rt($){let ne=this.sliceSerialize($),Re=this.stack[this.stack.length-2];Re.label=iu(ne),Re.identifier=wt(ne).toLowerCase()}function Lt(){let $=this.stack[this.stack.length-1],ne=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){let Le=$.children;Re.children=Le}else Re.alt=ne}function E(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.url=$}function xt(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.title=$}function It(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function gt($){let ne=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ne,Re.identifier=wt(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function Xt($){this.data.characterReferenceType=$.type}function ar($){let ne=this.sliceSerialize($),Re=this.data.characterReferenceType,Le;Re?(Le=$i(ne,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=Kn(ne);let ze=this.stack[this.stack.length-1];ze.value+=Le}function jn($){let ne=this.stack.pop();ne.position.end=kn($.end)}function ct($){F.call(this,$);let ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize($)}function An($){F.call(this,$);let ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize($)}function Bt(){return{type:"blockquote",children:[]}}function Qt(){return{type:"code",lang:null,meta:null,value:""}}function fn(){return{type:"inlineCode",value:""}}function or(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function va(){return{type:"emphasis",children:[]}}function qr(){return{type:"heading",depth:0,children:[]}}function jr(){return{type:"break"}}function sr(){return{type:"html",value:""}}function Ea(){return{type:"image",title:null,url:"",alt:null}}function Br(){return{type:"link",title:null,url:"",children:[]}}function zr($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function Aa($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function Oa(){return{type:"paragraph",children:[]}}function _a(){return{type:"strong",children:[]}}function Ra(){return{type:"text",value:""}}function Ia(){return{type:"thematicBreak"}}}function kn(e){return{line:e.line,column:e.column,offset:e.offset}}function Fu(e,n){let t=-1;for(;++t<n.length;){let r=n[t];Array.isArray(r)?Fu(e,r):sg(e,r)}}function sg(e,n){let t;for(t in n)if(Du.call(n,t))switch(t){case"canContainEols":{let r=n[t];r&&e[t].push(...r);break}case"transforms":{let r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{let r=n[t];r&&Object.assign(e[t],r);break}}}function Lu(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Tn({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Tn({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Tn({start:n.start,end:n.end})+") is still open")}function ea(e){let n=this;n.parser=t;function t(r){return es(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function ts(e){if(e)throw e}var ia=$t(Hu(),1);function Pr(e){if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ns(){let e=[],n={run:t,use:r};return n;function t(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...p){let d=e[++o],h=-1;if(u){a(u);return}for(;++h<i.length;)(p[h]===null||p[h]===void 0)&&(p[h]=i[h]);i=p,d?Yu(d,s)(...p):a(null,...p)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Yu(e,n){let t;return r;function r(...a){let s=e.length>a.length,u;s&&a.push(i);try{u=e.apply(this,a)}catch(p){let d=p;if(s&&t)throw d;return i(d)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){t||(t=!0,n(a,...s))}function o(a){i(null,a)}}var mt=class extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(a=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){let u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){let u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}let s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Tn(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}};mt.prototype.file="";mt.prototype.name="";mt.prototype.reason="";mt.prototype.message="";mt.prototype.stack="";mt.prototype.column=void 0;mt.prototype.line=void 0;mt.prototype.ancestors=void 0;mt.prototype.cause=void 0;mt.prototype.fatal=void 0;mt.prototype.place=void 0;mt.prototype.ruleId=void 0;mt.prototype.source=void 0;var jt=$t(require("path"),1);var rs=$t(require("process"),1);var is=require("url");function na(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var as=["history","path","basename","stem","extname","dirname"],Mr=class{constructor(n){let t;n?na(n)?t={path:n}:typeof n=="string"||lg(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":rs.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<as.length;){let o=as[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)as.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?jt.default.basename(this.path):void 0}set basename(n){ss(n,"basename"),os(n,"basename"),this.path=jt.default.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?jt.default.dirname(this.path):void 0}set dirname(n){Ju(this.basename,"dirname"),this.path=jt.default.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?jt.default.extname(this.path):void 0}set extname(n){if(os(n,"extname"),Ju(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jt.default.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){na(n)&&(n=(0,is.fileURLToPath)(n)),ss(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?jt.default.basename(this.path,this.extname):void 0}set stem(n){ss(n,"stem"),os(n,"stem"),this.path=jt.default.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){let i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){let i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){let i=new mt(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}};function os(e,n){if(e&&e.includes(jt.default.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+jt.default.sep+"`")}function ss(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ju(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function lg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Gu=(function(e){let r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o});var cg={}.hasOwnProperty,ps=class e extends Gu{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=ns()}copy(){let n=new e,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];n.use(...r)}return n.data((0,ia.default)(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(us("data",this.frozen),this.namespace[n]=t,this):cg.call(this.namespace,n)&&this.namespace[n]||void 0:n?(us("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;let n=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();let t=ra(n),r=this.parser||this.Parser;return ls("parse",r),r(String(t),t)}process(n,t){let r=this;return this.freeze(),ls("process",this.parser||this.Parser),cs("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,a){let s=ra(n),u=r.parse(s);r.run(u,s,function(d,h,y){if(d||!h||!y)return p(d);let g=h,P=r.stringify(g,y);pg(P)?y.value=P:y.result=P,p(d,y)});function p(d,h){d||!h?a(d):o?o(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),ls("processSync",this.parser||this.Parser),cs("processSync",this.compiler||this.Compiler),this.process(n,i),Xu("processSync","process",t),r;function i(o,a){t=!0,ts(o),r=a}}run(n,t,r){Ku(n),this.freeze();let i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(a,s){let u=ra(t);i.run(n,u,p);function p(d,h,y){let g=h||n;d?s(d):a?a(g):r(void 0,g,y)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),Xu("runSync","run",r),i;function o(a,s){ts(a),i=s,r=!0}}stringify(n,t){this.freeze();let r=ra(t),i=this.compiler||this.Compiler;return cs("stringify",i),Ku(n),i(n,r)}use(n,...t){let r=this.attachers,i=this.namespace;if(us("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):a(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(p){if(typeof p=="function")u(p,[]);else if(typeof p=="object")if(Array.isArray(p)){let[d,...h]=p;u(d,h)}else a(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function a(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(p.plugins),p.settings&&(i.settings=(0,ia.default)(!0,i.settings,p.settings))}function s(p){let d=-1;if(p!=null)if(Array.isArray(p))for(;++d<p.length;){let h=p[d];o(h)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function u(p,d){let h=-1,y=-1;for(;++h<r.length;)if(r[h][0]===p){y=h;break}if(y===-1)r.push([p,...d]);else if(d.length>0){let[g,...P]=d,Z=r[y][1];Pr(Z)&&Pr(g)&&(g=(0,ia.default)(!0,Z,g)),r[y]=[p,g,...P]}}}},ds=new ps().freeze();function ls(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cs(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function us(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ku(e){if(!Pr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xu(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ra(e){return ug(e)?e:new Mr(e)}function ug(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pg(e){return typeof e=="string"||dg(e)}function dg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Zu(e,n){let t=[e,...n],r=Math.max(...t.map(s=>s.length));if(r===0)return"";let i=Array.from({length:r},()=>0);for(let s of t)for(let u=0;u<r;u++){let p=(s[u]||"").length;p>i[u]&&(i[u]=p)}let o=s=>Array.from({length:r},(u,p)=>(s[p]||"").padEnd(i[p])).join(" | ").trimEnd(),a=[];a.push(o(e)),a.push(i.map(s=>"-".repeat(s)).join("-|-"));for(let s of n)a.push(o(s));return a.join(`
|
|
112
|
+
`;break}case-2:{a=n?" ":" ";break}case-1:{if(!n&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}var Go={};Hl(Go,{attentionMarkers:()=>ig,contentInitial:()=>Qm,disable:()=>ag,document:()=>Xm,flow:()=>eg,flowInitial:()=>Zm,insideSpan:()=>rg,string:()=>tg,text:()=>ng});var Xm={42:St,43:St,45:St,48:St,49:St,50:St,51:St,52:St,53:St,54:St,55:St,56:St,57:St,62:ji},Qm={91:Fo},Zm={[-2]:Rr,[-1]:Rr,32:Rr},eg={35:$o,42:Fn,45:[Ki,Fn],60:jo,61:Ki,95:Fn,96:Vi,126:Vi},tg={38:zi,92:Bi},ng={[-5]:Cr,[-4]:Cr,[-3]:Cr,33:zo,38:zi,42:Or,60:[No,Bo],91:Vo,92:[Uo,Bi],93:Dn,95:Or,96:Lo},rg={null:[Or,Eu]},ig={null:[42,95]},ag={null:[]};function Ko(e){let t=qi([Go,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(Tu),document:i(vu),flow:i(Au),string:i(_u),text:i(Ou)};return r;function i(o){return a;function a(s){return Cu(r,o,s)}}}function Xo(e){for(;!Hi(e););return e}var Pu=/[\0\t\n\r]/g;function Qo(){let e=1,n="",t=!0,r;return i;function i(o,a,s){let u=[],p,d,h,y,g;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===65279&&h++,t=void 0);h<o.length;){if(Pu.lastIndex=h,p=Pu.exec(o),y=p&&p.index!==void 0?p.index:o.length,g=o.charCodeAt(y),!p){n=o.slice(h);break}if(g===10&&h===y&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<y&&(u.push(o.slice(h,y)),e+=y-h),g){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=y+1}return s&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}function Tn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Mu(e.position):"start"in e||"end"in e?Mu(e):"line"in e||"column"in e?Zo(e):""}function Zo(e){return Nu(e&&e.line)+":"+Nu(e&&e.column)}function Mu(e){return Zo(e&&e.start)+"-"+Zo(e&&e.end)}function Nu(e){return e&&typeof e=="number"?e:1}var Du={}.hasOwnProperty;function es(e,n,t){return typeof n!="string"&&(t=n,n=void 0),og(t)(Xo(Ko(t).document().write(Qo()(e,n,!0))))}function og(e){let n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Br),autolinkProtocol:qe,autolinkEmail:qe,atxHeading:o(qr),blockQuote:o(Bt),characterEscape:qe,characterReference:qe,codeFenced:o(Qt),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Qt,a),codeText:o(fn,a),codeTextData:qe,data:qe,codeFlowValue:qe,definition:o(or),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(va),hardBreakEscape:o(jr),hardBreakTrailing:o(jr),htmlFlow:o(sr,a),htmlFlowData:qe,htmlText:o(sr,a),htmlTextData:qe,image:o(Aa),label:a,link:o(Br),listItem:o(Ea),listItemValue:y,listOrdered:o(zr,h),listUnordered:o(zr),paragraph:o(_a),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(qr),strong:o(Oa),thematicBreak:o(Ia)},exit:{atxHeading:u(),atxHeadingSequence:Oe,autolink:u(),autolinkEmail:En,autolinkProtocol:ct,blockQuote:u(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Xt,characterReferenceMarkerNumeric:Xt,characterReferenceValue:ar,characterReference:jn,codeFenced:u(Q),codeFencedFence:Z,codeFencedFenceInfo:g,codeFencedFenceMeta:P,codeFlowValue:F,codeIndented:u(j),codeText:u(Pe),codeTextData:F,data:F,definition:u(),definitionDestinationString:Te,definitionLabelString:pe,definitionTitleString:te,emphasis:u(),hardBreakEscape:u(je),hardBreakTrailing:u(je),htmlFlow:u(ge),htmlFlowData:F,htmlText:u(Ie),htmlTextData:F,image:u(ot),label:Lt,labelText:Rt,lineEnding:Se,link:u(Ze),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:gt,resourceDestinationString:A,resourceTitleString:xt,resource:It,setextHeading:u(Ge),setextHeadingLineSequence:Fe,setextHeadingText:U,strong:u(),thematicBreak:u()}};Fu(n,(e||{}).mdastExtensions||[]);let t={};return r;function r($){let ne={type:"root",children:[]},Re={stack:[ne],tokenStack:[],config:n,enter:s,exit:p,buffer:a,resume:d,data:t},Le=[],ze=-1;for(;++ze<$.length;)if($[ze][1].type==="listOrdered"||$[ze][1].type==="listUnordered")if($[ze][0]==="enter")Le.push(ze);else{let Ct=Le.pop();ze=i($,Ct,ze)}for(ze=-1;++ze<$.length;){let Ct=n[$[ze][0]];Du.call(Ct,$[ze][1].type)&&Ct[$[ze][1].type].call(Object.assign({sliceSerialize:$[ze][2].sliceSerialize},Re),$[ze][1])}if(Re.tokenStack.length>0){let Ct=Re.tokenStack[Re.tokenStack.length-1];(Ct[1]||Lu).call(Re,void 0,Ct[0])}for(ne.position={start:kn($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:kn($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<n.transforms.length;)ne=n.transforms[ze](ne)||ne;return ne}function i($,ne,Re){let Le=ne-1,ze=-1,Ct=!1,Zt,zt,en,_n;for(;++Le<=Re;){let yt=$[Le];switch(yt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{yt[0]==="enter"?ze++:ze--,_n=void 0;break}case"lineEndingBlank":{yt[0]==="enter"&&(Zt&&!_n&&!ze&&!en&&(en=Le),_n=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_n=void 0}if(!ze&&yt[0]==="enter"&&yt[1].type==="listItemPrefix"||ze===-1&&yt[0]==="exit"&&(yt[1].type==="listUnordered"||yt[1].type==="listOrdered")){if(Zt){let tn=Le;for(zt=void 0;tn--;){let Dt=$[tn];if(Dt[1].type==="lineEnding"||Dt[1].type==="lineEndingBlank"){if(Dt[0]==="exit")continue;zt&&($[zt][1].type="lineEndingBlank",Ct=!0),Dt[1].type="lineEnding",zt=tn}else if(!(Dt[1].type==="linePrefix"||Dt[1].type==="blockQuotePrefix"||Dt[1].type==="blockQuotePrefixWhitespace"||Dt[1].type==="blockQuoteMarker"||Dt[1].type==="listItemIndent"))break}en&&(!zt||en<zt)&&(Zt._spread=!0),Zt.end=Object.assign({},zt?$[zt][1].start:yt[1].end),$.splice(zt||Le,0,["exit",Zt,yt[2]]),Le++,Re++}if(yt[1].type==="listItemPrefix"){let tn={type:"listItem",_spread:!1,start:Object.assign({},yt[1].start),end:void 0};Zt=tn,$.splice(Le,0,["enter",tn,yt[2]]),Le++,Re++,en=void 0,_n=!0}}}return $[ne][1]._spread=Ct,Re}function o($,ne){return Re;function Re(Le){s.call(this,$(Le),Le),ne&&ne.call(this,Le)}}function a(){this.stack.push({type:"fragment",children:[]})}function s($,ne,Re){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([ne,Re]),$.position={start:kn(ne.start),end:void 0}}function u($){return ne;function ne(Re){$&&$.call(this,Re),p.call(this,Re)}}function p($,ne){let Re=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==$.type&&(ne?ne.call(this,$,Le[0]):(Le[1]||Lu).call(this,$,Le[0]));else throw new Error("Cannot close `"+$.type+"` ("+Tn({start:$.start,end:$.end})+"): it\u2019s not open");Re.position.end=kn($.end)}function d(){return ln(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function y($){if(this.data.expectingFirstListItemValue){let ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function g(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=$}function P(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=$}function Z(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function Q(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$.replace(/(\r?\n|\r)$/g,"")}function pe($){let ne=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ne,Re.identifier=wt(this.sliceSerialize($)).toLowerCase()}function te(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.title=$}function Te(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.url=$}function Oe($){let ne=this.stack[this.stack.length-1];if(!ne.depth){let Re=this.sliceSerialize($).length;ne.depth=Re}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function Fe($){let ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function Ge(){this.data.setextHeadingSlurpLineEnding=void 0}function qe($){let Re=this.stack[this.stack.length-1].children,Le=Re[Re.length-1];(!Le||Le.type!=="text")&&(Le=Ra(),Le.position={start:kn($.start),end:void 0},Re.push(Le)),this.stack.push(Le)}function F($){let ne=this.stack.pop();ne.value+=this.sliceSerialize($),ne.position.end=kn($.end)}function Se($){let ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Re=ne.children[ne.children.length-1];Re.position.end=kn($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ne.type)&&(qe.call(this,$),F.call(this,$))}function je(){this.data.atHardBreak=!0}function ge(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$}function Ie(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$}function Pe(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.value=$}function Ze(){let $=this.stack[this.stack.length-1];if(this.data.inReference){let ne=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=ne,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ot(){let $=this.stack[this.stack.length-1];if(this.data.inReference){let ne=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=ne,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function Rt($){let ne=this.sliceSerialize($),Re=this.stack[this.stack.length-2];Re.label=iu(ne),Re.identifier=wt(ne).toLowerCase()}function Lt(){let $=this.stack[this.stack.length-1],ne=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){let Le=$.children;Re.children=Le}else Re.alt=ne}function A(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.url=$}function xt(){let $=this.resume(),ne=this.stack[this.stack.length-1];ne.title=$}function It(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function gt($){let ne=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ne,Re.identifier=wt(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function Xt($){this.data.characterReferenceType=$.type}function ar($){let ne=this.sliceSerialize($),Re=this.data.characterReferenceType,Le;Re?(Le=$i(ne,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=Kn(ne);let ze=this.stack[this.stack.length-1];ze.value+=Le}function jn($){let ne=this.stack.pop();ne.position.end=kn($.end)}function ct($){F.call(this,$);let ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize($)}function En($){F.call(this,$);let ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize($)}function Bt(){return{type:"blockquote",children:[]}}function Qt(){return{type:"code",lang:null,meta:null,value:""}}function fn(){return{type:"inlineCode",value:""}}function or(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function va(){return{type:"emphasis",children:[]}}function qr(){return{type:"heading",depth:0,children:[]}}function jr(){return{type:"break"}}function sr(){return{type:"html",value:""}}function Aa(){return{type:"image",title:null,url:"",alt:null}}function Br(){return{type:"link",title:null,url:"",children:[]}}function zr($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function Ea($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function _a(){return{type:"paragraph",children:[]}}function Oa(){return{type:"strong",children:[]}}function Ra(){return{type:"text",value:""}}function Ia(){return{type:"thematicBreak"}}}function kn(e){return{line:e.line,column:e.column,offset:e.offset}}function Fu(e,n){let t=-1;for(;++t<n.length;){let r=n[t];Array.isArray(r)?Fu(e,r):sg(e,r)}}function sg(e,n){let t;for(t in n)if(Du.call(n,t))switch(t){case"canContainEols":{let r=n[t];r&&e[t].push(...r);break}case"transforms":{let r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{let r=n[t];r&&Object.assign(e[t],r);break}}}function Lu(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Tn({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Tn({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Tn({start:n.start,end:n.end})+") is still open")}function ea(e){let n=this;n.parser=t;function t(r){return es(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function ts(e){if(e)throw e}var ia=$t(Hu(),1);function Pr(e){if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ns(){let e=[],n={run:t,use:r};return n;function t(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...p){let d=e[++o],h=-1;if(u){a(u);return}for(;++h<i.length;)(p[h]===null||p[h]===void 0)&&(p[h]=i[h]);i=p,d?Yu(d,s)(...p):a(null,...p)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Yu(e,n){let t;return r;function r(...a){let s=e.length>a.length,u;s&&a.push(i);try{u=e.apply(this,a)}catch(p){let d=p;if(s&&t)throw d;return i(d)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){t||(t=!0,n(a,...s))}function o(a){i(null,a)}}var mt=class extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(a=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){let u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){let u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}let s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Tn(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}};mt.prototype.file="";mt.prototype.name="";mt.prototype.reason="";mt.prototype.message="";mt.prototype.stack="";mt.prototype.column=void 0;mt.prototype.line=void 0;mt.prototype.ancestors=void 0;mt.prototype.cause=void 0;mt.prototype.fatal=void 0;mt.prototype.place=void 0;mt.prototype.ruleId=void 0;mt.prototype.source=void 0;var jt=$t(require("path"),1);var rs=$t(require("process"),1);var is=require("url");function na(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var as=["history","path","basename","stem","extname","dirname"],Mr=class{constructor(n){let t;n?na(n)?t={path:n}:typeof n=="string"||lg(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":rs.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<as.length;){let o=as[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)as.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?jt.default.basename(this.path):void 0}set basename(n){ss(n,"basename"),os(n,"basename"),this.path=jt.default.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?jt.default.dirname(this.path):void 0}set dirname(n){Ju(this.basename,"dirname"),this.path=jt.default.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?jt.default.extname(this.path):void 0}set extname(n){if(os(n,"extname"),Ju(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jt.default.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){na(n)&&(n=(0,is.fileURLToPath)(n)),ss(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?jt.default.basename(this.path,this.extname):void 0}set stem(n){ss(n,"stem"),os(n,"stem"),this.path=jt.default.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){let i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){let i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){let i=new mt(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}};function os(e,n){if(e&&e.includes(jt.default.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+jt.default.sep+"`")}function ss(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ju(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function lg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Gu=(function(e){let r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o});var cg={}.hasOwnProperty,ps=class e extends Gu{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=ns()}copy(){let n=new e,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];n.use(...r)}return n.data((0,ia.default)(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(us("data",this.frozen),this.namespace[n]=t,this):cg.call(this.namespace,n)&&this.namespace[n]||void 0:n?(us("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;let n=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();let t=ra(n),r=this.parser||this.Parser;return ls("parse",r),r(String(t),t)}process(n,t){let r=this;return this.freeze(),ls("process",this.parser||this.Parser),cs("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,a){let s=ra(n),u=r.parse(s);r.run(u,s,function(d,h,y){if(d||!h||!y)return p(d);let g=h,P=r.stringify(g,y);pg(P)?y.value=P:y.result=P,p(d,y)});function p(d,h){d||!h?a(d):o?o(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),ls("processSync",this.parser||this.Parser),cs("processSync",this.compiler||this.Compiler),this.process(n,i),Xu("processSync","process",t),r;function i(o,a){t=!0,ts(o),r=a}}run(n,t,r){Ku(n),this.freeze();let i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(a,s){let u=ra(t);i.run(n,u,p);function p(d,h,y){let g=h||n;d?s(d):a?a(g):r(void 0,g,y)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),Xu("runSync","run",r),i;function o(a,s){ts(a),i=s,r=!0}}stringify(n,t){this.freeze();let r=ra(t),i=this.compiler||this.Compiler;return cs("stringify",i),Ku(n),i(n,r)}use(n,...t){let r=this.attachers,i=this.namespace;if(us("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):a(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(p){if(typeof p=="function")u(p,[]);else if(typeof p=="object")if(Array.isArray(p)){let[d,...h]=p;u(d,h)}else a(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function a(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(p.plugins),p.settings&&(i.settings=(0,ia.default)(!0,i.settings,p.settings))}function s(p){let d=-1;if(p!=null)if(Array.isArray(p))for(;++d<p.length;){let h=p[d];o(h)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function u(p,d){let h=-1,y=-1;for(;++h<r.length;)if(r[h][0]===p){y=h;break}if(y===-1)r.push([p,...d]);else if(d.length>0){let[g,...P]=d,Z=r[y][1];Pr(Z)&&Pr(g)&&(g=(0,ia.default)(!0,Z,g)),r[y]=[p,g,...P]}}}},ds=new ps().freeze();function ls(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cs(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function us(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ku(e){if(!Pr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xu(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ra(e){return ug(e)?e:new Mr(e)}function ug(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pg(e){return typeof e=="string"||dg(e)}function dg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Zu(e,n){let t=[e,...n],r=Math.max(...t.map(s=>s.length));if(r===0)return"";let i=Array.from({length:r},()=>0);for(let s of t)for(let u=0;u<r;u++){let p=(s[u]||"").length;p>i[u]&&(i[u]=p)}let o=s=>Array.from({length:r},(u,p)=>(s[p]||"").padEnd(i[p])).join(" | ").trimEnd(),a=[];a.push(o(e)),a.push(i.map(s=>"-".repeat(s)).join("-|-"));for(let s of n)a.push(o(s));return a.join(`
|
|
113
113
|
`)}function Ts(e){return ds().use(ea).use(Zi).parse(e)}function Nr(e){return ln(e)}function un(e){return{type:"text",value:e}}function pn(e){return{type:"paragraph",children:e}}function dn(e){return{type:"root",children:e}}function ks(e={}){var n;return{type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.imageUrl,children:(n=e.children)!=null?n:[]}}function hs(e,n={}){return{type:"text",content:e,style:n.style}}var ep=hs;function fs(e){return{type:"image",url:e.url,alt:e.alt}}function aa(){return{type:"divider"}}function ms(e){return{type:"section",children:e}}function oa(e){return{type:"actions",children:e}}function sa(e){return{type:"button",id:e.id,label:e.label,style:e.style,value:e.value,disabled:e.disabled,actionType:e.actionType}}function gs(e){return{type:"link-button",url:e.url,label:e.label,style:e.style}}function ys(e){return{type:"field",label:e.label,value:e.value}}function bs(e){return{type:"fields",children:e}}function ws(e){return{type:"table",headers:e.headers,rows:e.rows,align:e.align}}function la(e){return{type:"link",url:e.url,label:e.label}}function Lr(e){let n=[];e.title&&n.push(`**${e.title}**`),e.subtitle&&n.push(e.subtitle);for(let t of e.children){let r=vs(t);r&&n.push(r)}return n.join(`
|
|
114
114
|
`)}function vs(e){switch(e.type){case"text":return e.content;case"link":return`${e.label} (${e.url})`;case"fields":return e.children.map(n=>`${n.label}: ${n.value}`).join(`
|
|
115
115
|
`);case"actions":return null;case"table":return Zu(e.headers,e.rows);case"section":return e.children.map(n=>vs(n)).filter(Boolean).join(`
|
|
116
|
-
`);default:return null}}var hg=["text_input","select","radio_select","text","fields"];function fg(e){let n=e.filter(t=>typeof t=="object"&&t!==null&&"type"in t&&hg.includes(t.type));return n.length<e.length&&console.warn("[chat] Modal contains unsupported child elements that were ignored"),n}function Ss(e){var n;return{type:"modal",callbackId:e.callbackId,title:e.title,submitLabel:e.submitLabel,closeLabel:e.closeLabel,notifyOnClose:e.notifyOnClose,privateMetadata:e.privateMetadata,children:(n=e.children)!=null?n:[]}}function ca(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 ua(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 pa(e){return{label:e.label,value:e.value,description:e.description}}function xs(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}}var mg=Symbol.for("chat.jsx.element");function
|
|
116
|
+
`);default:return null}}var hg=["text_input","select","radio_select","text","fields"];function fg(e){let n=e.filter(t=>typeof t=="object"&&t!==null&&"type"in t&&hg.includes(t.type));return n.length<e.length&&console.warn("[chat] Modal contains unsupported child elements that were ignored"),n}function Ss(e){var n;return{type:"modal",callbackId:e.callbackId,title:e.title,submitLabel:e.submitLabel,closeLabel:e.closeLabel,notifyOnClose:e.notifyOnClose,privateMetadata:e.privateMetadata,children:(n=e.children)!=null?n:[]}}function ca(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 ua(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 pa(e){return{label:e.label,value:e.value,description:e.description}}function xs(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}}var mg=Symbol.for("chat.jsx.element");function As(e){return typeof e=="object"&&e!==null&&e.$$typeof===mg}function tp(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(tp);if(As(e)){let n=rp(e);return n?[n]:[]}return typeof e=="object"&&"type"in e?[e]:typeof e=="string"||typeof e=="number"?[String(e)]:[]}function gg(e){return!("id"in e||"url"in e||"label"in e)}function yg(e){return"id"in e&&typeof e.id=="string"&&!("url"in e)}function bg(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)}function np(e){return"url"in e&&typeof e.url=="string"&&!("id"in e)&&!("alt"in e)&&!("style"in e)}function wg(e){return"url"in e&&typeof e.url=="string"}function Sg(e){return"label"in e&&"value"in e&&typeof e.label=="string"&&typeof e.value=="string"}function xg(e){return!("id"in e||"url"in e||"callbackId"in e)&&("title"in e||"subtitle"in e||"imageUrl"in e)}function Tg(e){return"callbackId"in e&&"title"in e}function kg(e){return"id"in e&&"label"in e&&!("options"in e)&&!("value"in e)}function Qu(e){return"id"in e&&"label"in e&&!("value"in e)}function vg(e){return"label"in e&&"value"in e&&!("id"in e)}function rp(e){var a,s,u,p;let{type:n,props:t,children:r}=e,i=tp(r);if(n===hs){let d=gg(t)?t:{style:void 0},h=i.length>0?i.map(String).join(""):String((a=d.children)!=null?a:"");return hs(h,{style:d.style})}if(n===ms)return ms(i);if(n===oa)return oa(i);if(n===bs)return bs(i);if(n===sa){if(!yg(t))throw new Error("Button requires an 'id' prop");let d=i.length>0?i.map(String).join(""):(s=t.label)!=null?s:"";return sa({id:t.id,label:d,style:t.style,value:t.value,actionType:t.actionType,disabled:t.disabled})}if(n===gs){if(!bg(t))throw new Error("LinkButton requires a 'url' prop");let d=i.length>0?i.map(String).join(""):(u=t.label)!=null?u:"";return gs({url:t.url,label:d,style:t.style})}if(n===la){if(!np(t))throw new Error("CardLink requires a 'url' prop");let d=i.length>0?i.map(String).join(""):(p=t.label)!=null?p:"";return la({url:t.url,label:d})}if(n===fs){if(!wg(t))throw new Error("Image requires a 'url' prop");return fs({url:t.url,alt:t.alt})}if(n===ys){if(!Sg(t))throw new Error("Field requires 'label' and 'value' props");return ys({label:t.label,value:t.value})}if(n===aa)return aa();if(n===Ss){if(!Tg(t))throw new Error("Modal requires 'callbackId' and 'title' props");return Ss({callbackId:t.callbackId,title:t.title,submitLabel:t.submitLabel,closeLabel:t.closeLabel,notifyOnClose:t.notifyOnClose,privateMetadata:t.privateMetadata,children:fg(i)})}if(n===ca){if(!kg(t))throw new Error("TextInput requires 'id' and 'label' props");return ca({id:t.id,label:t.label,placeholder:t.placeholder,initialValue:t.initialValue,multiline:t.multiline,optional:t.optional,maxLength:t.maxLength})}if(n===ua){if(!Qu(t))throw new Error("Select requires 'id' and 'label' props");return ua({id:t.id,label:t.label,placeholder:t.placeholder,initialOption:t.initialOption,optional:t.optional,options:i})}if(n===xs){if(!Qu(t))throw new Error("RadioSelect requires 'id' and 'label' props");return xs({id:t.id,label:t.label,initialOption:t.initialOption,optional:t.optional,options:i})}if(n===pa){if(!vg(t))throw new Error("SelectOption requires 'label' and 'value' props");return pa({label:t.label,value:t.value,description:t.description})}if(n===ws){let d=t;return ws({headers:d.headers,rows:d.rows})}let o=xg(t)?t:{};return ks({title:o.title,subtitle:o.subtitle,imageUrl:o.imageUrl,children:i})}function Mt(e){if(As(e)){let n=rp(e);if(n&&typeof n=="object"&&"type"in n&&n.type==="card")return n}return typeof e=="object"&&e!==null&&"type"in e&&e.type==="card"?e:null}function Nt(e){if(As(e))return!0;if(typeof e=="object"&&e!==null&&"$$typeof"in e&&typeof e.$$typeof=="symbol"){let n=e.$$typeof.toString();return n.includes("react.element")||n.includes("react.transitional.element")}return!1}var Zn=Symbol.for("workflow-serialize"),er=Symbol.for("workflow-deserialize");var Ag=Object.defineProperty,Eg=Object.defineProperties,_g=Object.getOwnPropertyDescriptors,ip=Object.getOwnPropertySymbols,Og=Object.prototype.hasOwnProperty,Rg=Object.prototype.propertyIsEnumerable,ap=(e,n,t)=>n in e?Ag(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,cp=(e,n)=>{for(var t in n||(n={}))Og.call(n,t)&&ap(e,t,n[t]);if(ip)for(var t of ip(n))Rg.call(n,t)&&ap(e,t,n[t]);return e},up=(e,n)=>Eg(e,_g(n)),_t=(e,n)=>{let t=!1,r=!1;for(let i=0;i<n;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(t=!t)}return t||r},Ig=(e,n)=>{let t=e.substring(n,n+3)==="```",r=n>0&&e.substring(n-1,n+2)==="```",i=n>1&&e.substring(n-2,n+1)==="```";return t||r||i},Cg=e=>{let n=0;for(let t=0;t<e.length;t+=1){if(e[t]==="\\"&&t+1<e.length&&e[t+1]==="`"){t+=1;continue}e[t]==="`"&&!Ig(e,t)&&(n+=1)}return n},vn=(e,n)=>{let t=!1,r=!1,i=-1;for(let o=0;o<e.length;o+=1){if(e[o]==="\\"&&o+1<e.length&&e[o+1]==="`"){o+=1;continue}if(e.substring(o,o+3)==="```"){r=!r,o+=2;continue}if(!r&&e[o]==="`")if(t){if(i<n&&n<o)return!0;t=!1,i=-1}else t=!0,i=o}return!1},Pg=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Mg=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Pg,(n,t,r,i)=>_t(e,i)?n:`${t}\\>${r}`),Ng=/(\*\*)([^*]*\*?)$/,Lg=/(__)([^_]*?)$/,Dg=/(\*\*\*)([^*]*?)$/,Fg=/(\*)([^*]*?)$/,Ug=/(_)([^_]*?)$/,$g=/(`)([^`]*?)$/,qg=/(~~)([^~]*?)$/,Un=/^[\s_~*`]*$/,pp=/^[\s]*[-*+][\s]+$/,jg=/[\p{L}\p{N}_]/u,Bg=/^```[^`\n]*```?$/,zg=/^\*{4,}$/,Vg=/(__)([^_]+)_$/,Wg=/(~~)([^~]+)~$/,op=/~~/g,An=e=>{if(!e)return!1;let n=e.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===95?!0:jg.test(e)};var Hg=(e,n)=>{let t=1;for(let r=n-1;r>=0;r-=1)if(e[r]==="]")t+=1;else if(e[r]==="["&&(t-=1,t===0))return r;return-1},dp=(e,n)=>{let t=1;for(let r=n+1;r<e.length;r+=1)if(e[r]==="[")t+=1;else if(e[r]==="]"&&(t-=1,t===0))return r;return-1},da=(e,n)=>{let t=!1,r=!1;for(let i=0;i<e.length&&i<n;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,t=!1):r||(t=!t))}return t||r},Yg=(e,n)=>{for(let t=n;t<e.length;t+=1){if(e[t]===")")return!0;if(e[t]===`
|
|
117
117
|
`)return!1}return!1},hp=(e,n)=>{for(let t=n-1;t>=0;t-=1){if(e[t]===")")return!1;if(e[t]==="(")return t>0&&e[t-1]==="]"?Yg(e,n):!1;if(e[t]===`
|
|
118
118
|
`)return!1}return!1},Jg=(e,n)=>{for(let t=n-1;t>=0;t-=1){if(e[t]===">")return!1;if(e[t]==="<"){let r=t+1<e.length?e[t+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[t]===`
|
|
119
|
-
`)return!1}return!1},
|
|
119
|
+
`)return!1}return!1},_s=(e,n,t)=>{let r=0;for(let u=n-1;u>=0;u-=1)if(e[u]===`
|
|
120
120
|
`){r=u+1;break}let i=e.length;for(let u=n;u<e.length;u+=1)if(e[u]===`
|
|
121
|
-
`){i=u;break}let o=e.substring(r,i),a=0,s=!1;for(let u of o)if(u===t)a+=1;else if(u!==" "&&u!==" "){s=!0;break}return a>=3&&!s},Gg=(e,n,t,r)=>t==="\\"||e.includes("$")&&da(e,n)?!0:t!=="*"&&r==="*"?(n<e.length-2?e[n+2]:"")!=="*":!!(t==="*"||t&&r&&
|
|
121
|
+
`){i=u;break}let o=e.substring(r,i),a=0,s=!1;for(let u of o)if(u===t)a+=1;else if(u!==" "&&u!==" "){s=!0;break}return a>=3&&!s},Gg=(e,n,t,r)=>t==="\\"||e.includes("$")&&da(e,n)?!0:t!=="*"&&r==="*"?(n<e.length-2?e[n+2]:"")!=="*":!!(t==="*"||t&&r&&An(t)&&An(r)||(!t||t===" "||t===" "||t===`
|
|
122
122
|
`)&&(!r||r===" "||r===" "||r===`
|
|
123
|
-
`)),fp=e=>{let n=0,t=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){t=!t,i+=2;continue}if(t||e[i]!=="*")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";Gg(e,i,o,a)||(n+=1)}return n},Kg=(e,n,t,r)=>!!(t==="\\"||e.includes("$")&&da(e,n)||hp(e,n)||Jg(e,n)||t==="_"||r==="_"||t&&r&&
|
|
123
|
+
`)),fp=e=>{let n=0,t=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){t=!t,i+=2;continue}if(t||e[i]!=="*")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";Gg(e,i,o,a)||(n+=1)}return n},Kg=(e,n,t,r)=>!!(t==="\\"||e.includes("$")&&da(e,n)||hp(e,n)||Jg(e,n)||t==="_"||r==="_"||t&&r&&An(t)&&An(r)),Xg=e=>{let n=0,t=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){t=!t,i+=2;continue}if(t||e[i]!=="_")continue;let o=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";Kg(e,i,o,a)||(n+=1)}return n},Qg=e=>{let n=0,t=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){t>=3&&(n+=Math.floor(t/3)),t=0,r=!r,i+=2;continue}r||(e[i]==="*"?t+=1:(t>=3&&(n+=Math.floor(t/3)),t=0))}return t>=3&&(n+=Math.floor(t/3)),n},Os=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}t||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(n+=1,r+=1)}return n},sp=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}t||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(n+=1,r+=1)}return n},Zg=(e,n,t)=>{if(!n||Un.test(n))return!0;let r=e.substring(0,t).lastIndexOf(`
|
|
124
124
|
`),i=r===-1?0:r+1,o=e.substring(i,t);return pp.test(o)&&n.includes(`
|
|
125
|
-
`)?!0:
|
|
125
|
+
`)?!0:_s(e,t,"*")},ey=e=>{let n=e.match(Ng);if(!n)return e;let t=n[2],r=e.lastIndexOf(n[1]);return _t(e,r)||vn(e,r)||Zg(e,t,r)?e:Os(e)%2===1?t.endsWith("*")?`${e}*`:`${e}**`:e},ty=(e,n,t)=>{if(!n||Un.test(n))return!0;let r=e.substring(0,t).lastIndexOf(`
|
|
126
126
|
`),i=r===-1?0:r+1,o=e.substring(i,t);return pp.test(o)&&n.includes(`
|
|
127
|
-
`)?!0:
|
|
127
|
+
`)?!0:_s(e,t,"_")},ny=e=>{let n=e.match(Lg);if(!n){let i=e.match(Vg);if(i){let o=e.lastIndexOf(i[1]);if(!(_t(e,o)||vn(e,o))&&sp(e)%2===1)return`${e}_`}return e}let t=n[2],r=e.lastIndexOf(n[1]);return _t(e,r)||vn(e,r)||ty(e,t,r)?e:sp(e)%2===1?`${e}__`:e},ry=e=>{let n=!1;for(let t=0;t<e.length;t+=1){if(e[t]==="`"&&t+2<e.length&&e[t+1]==="`"&&e[t+2]==="`"){n=!n,t+=2;continue}if(!n&&e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!da(e,t)){let r=t>0?e[t-1]:"",i=t<e.length-1?e[t+1]:"";if((!r||r===" "||r===" "||r===`
|
|
128
128
|
`)&&(!i||i===" "||i===" "||i===`
|
|
129
|
-
`)||r&&i&&
|
|
130
|
-
`;)n-=1;if(n<e.length){let t=e.slice(0,n),r=e.slice(n);return`${t}_${r}`}return`${e}_`},oy=e=>{if(!e.endsWith("**"))return null;let n=e.slice(0,-2);if(
|
|
129
|
+
`)||r&&i&&An(r)&&An(i))continue;return t}}return-1},iy=e=>{if(!e.match(Fg))return e;let n=ry(e);if(n===-1||_t(e,n)||vn(e,n))return e;let t=e.substring(n+1);return!t||Un.test(t)?e:fp(e)%2===1?`${e}*`:e},mp=e=>{let n=!1;for(let t=0;t<e.length;t+=1){if(e[t]==="`"&&t+2<e.length&&e[t+1]==="`"&&e[t+2]==="`"){n=!n,t+=2;continue}if(!n&&e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!da(e,t)&&!hp(e,t)){let r=t>0?e[t-1]:"",i=t<e.length-1?e[t+1]:"";if(r&&i&&An(r)&&An(i))continue;return t}}return-1},ay=e=>{let n=e.length;for(;n>0&&e[n-1]===`
|
|
130
|
+
`;)n-=1;if(n<e.length){let t=e.slice(0,n),r=e.slice(n);return`${t}_${r}`}return`${e}_`},oy=e=>{if(!e.endsWith("**"))return null;let n=e.slice(0,-2);if(Os(n)%2!==1)return null;let t=n.indexOf("**"),r=mp(n);return t!==-1&&r!==-1&&t<r?`${n}_**`:null},sy=e=>{if(!e.match(Ug))return e;let n=mp(e);if(n===-1)return e;let t=e.substring(n+1);if(!t||Un.test(t)||_t(e,n)||vn(e,n))return e;if(Xg(e)%2===1){let r=oy(e);return r!==null?r:ay(e)}return e},ly=e=>{let n=Os(e),t=fp(e);return n%2===0&&t%2===0},cy=(e,n,t)=>!n||Un.test(n)||_t(e,t)||vn(e,t)?!0:_s(e,t,"*"),uy=e=>{if(zg.test(e))return e;let n=e.match(Dg);if(!n)return e;let t=n[2],r=e.lastIndexOf(n[1]);return cy(e,t,r)?e:Qg(e)%2===1?ly(e)?e:`${e}***`:e},py=/<[a-zA-Z/][^>]*$/,dy=e=>{let n=e.match(py);return!n||n.index===void 0||_t(e,n.index)?e:e.substring(0,n.index).trimEnd()},hy=e=>!e.match(Bg)||e.includes(`
|
|
131
131
|
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,fy=e=>(e.match(/```/g)||[]).length%2===1,my=e=>{let n=hy(e);if(n!==null)return n;let t=e.match($g);if(t&&!fy(e)){let r=t[2];if(!r||Un.test(r))return e;if(Cg(e)%2===1)return`${e}\``}return e},gp=(e,n)=>n>=2&&e.substring(n-2,n+1)==="```"||n>=1&&e.substring(n-1,n+2)==="```"||n<=e.length-3&&e.substring(n,n+3)==="```",gy=e=>{let n=0,t=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!gp(e,r)&&(t=!t),!t&&e[r]==="$"&&e[r+1]==="$"&&(n+=1,r+=1);return n},yy=e=>{let n=0,t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!gp(e,r)){t=!t;continue}!t&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:n+=1)}return n},by=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let n=e.indexOf("$$");return n!==-1&&e.indexOf(`
|
|
132
132
|
`,n)!==-1&&!e.endsWith(`
|
|
133
133
|
`)?`${e}
|
|
134
|
-
$$`:`${e}$$`},wy=e=>gy(e)%2===0?e:by(e),Sy=e=>yy(e)%2===1?`${e}$`:e,xy=(e,n,t)=>{if(e.substring(n+2).includes(")"))return null;let r=Hg(e,n);if(r===-1||
|
|
134
|
+
$$`:`${e}$$`},wy=e=>gy(e)%2===0?e:by(e),Sy=e=>yy(e)%2===1?`${e}$`:e,xy=(e,n,t)=>{if(e.substring(n+2).includes(")"))return null;let r=Hg(e,n);if(r===-1||_t(e,r))return null;let i=r>0&&e[r-1]==="!",o=i?r-1:r,a=e.substring(0,o);if(i)return a;let s=e.substring(r+1,n);return t==="text-only"?`${a}${s}`:`${a}[${s}](streamdown:incomplete-link)`},lp=(e,n)=>{for(let t=0;t<n;t++)if(e[t]==="["&&!_t(e,t)){if(t>0&&e[t-1]==="!")continue;let r=dp(e,t);if(r===-1)return t;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(t=i)}}return n},Ty=(e,n,t)=>{let r=n>0&&e[n-1]==="!",i=r?n-1:n;if(!e.substring(n+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(t==="text-only"){let a=lp(e,n);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(dp(e,n)===-1){let o=e.substring(0,i);if(r)return o;if(t==="text-only"){let a=lp(e,n);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},yp=(e,n="protocol")=>{let t=e.lastIndexOf("](");if(t!==-1&&!_t(e,t)){let r=xy(e,t,n);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!_t(e,r)){let i=Ty(e,r,n);if(i!==null)return i}return e},ky=/^-{1,2}$/,vy=/^[\s]*-{1,2}[\s]+$/,Ay=/^={1,2}$/,Ey=/^[\s]*={1,2}[\s]+$/,_y=e=>{if(!e||typeof e!="string")return e;let n=e.lastIndexOf(`
|
|
135
135
|
`);if(n===-1)return e;let t=e.substring(n+1),r=e.substring(0,n),i=t.trim();if(ky.test(i)&&!t.match(vy)){let o=r.split(`
|
|
136
|
-
`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(
|
|
137
|
-
`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}return e},
|
|
136
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(Ay.test(i)&&!t.match(Ey)){let o=r.split(`
|
|
137
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}return e},Oy=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),Ry=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(Oy,(n,t)=>_t(e,t)?n:"\\~"),Iy=e=>{var n,t;let r=e.match(qg);if(r){let i=r[2];if(!i||Un.test(i))return e;let o=e.lastIndexOf(r[1]);if(_t(e,o)||vn(e,o))return e;if(((n=e.match(op))==null?void 0:n.length)%2===1)return`${e}~~`}else{let i=e.match(Wg);if(i){let o=e.lastIndexOf(i[0].slice(0,2));if(_t(e,o)||vn(e,o))return e;if(((t=e.match(op))==null?void 0:t.length)%2===1)return`${e}~`}}return e},Es=e=>e!==!1,Cy=e=>e===!0,Et={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},Py=[{handler:{name:"singleTilde",handle:Ry,priority:Et.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Mg,priority:Et.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:dy,priority:Et.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:_y,priority:Et.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:yp,priority:Et.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:uy,priority:Et.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:ey,priority:Et.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:ny,priority:Et.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:iy,priority:Et.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:sy,priority:Et.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:my,priority:Et.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Iy,priority:Et.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:wy,priority:Et.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:Sy,priority:Et.INLINE_KATEX},optionKey:"inlineKatex"}],My=e=>{var n;let t=(n=e==null?void 0:e.linkMode)!=null?n:"protocol";return Py.filter(({handler:r,optionKey:i})=>r.name==="links"?Es(e==null?void 0:e.links)||Es(e==null?void 0:e.images):r.name==="inlineKatex"?Cy(e==null?void 0:e.inlineKatex):Es(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:up(cp({},r),{handle:o=>yp(o,t)}),earlyReturn:t==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},Ny=(e,n)=>{var t;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=My(n),o=((t=n==null?void 0:n.handlers)!=null?t:[]).map(s=>{var u;return{handler:up(cp({},s),{priority:(u=s.priority)!=null?u:Et.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},Dr=Ny;var bp=null;function ha(){if(!bp)throw new Error("No Chat singleton registered. Call chat.registerSingleton() first.");return bp}var Dy=new Set(["markdown_text","task_update","plan_update"]);async function*vp(e){var r,i;let n=!1,t=!1;for await(let o of e){if(typeof o=="string"){yield o;continue}if(o===null||typeof o!="object"||!("type"in o))continue;let a=o;if(Dy.has(a.type)){yield o;continue}let s=(i=(r=a.text)!=null?r:a.delta)!=null?i:a.textDelta;a.type==="text-delta"&&typeof s=="string"?(n&&t&&(yield`
|
|
138
138
|
|
|
139
|
-
`),n=!1,t=!0,yield s):a.type==="finish-step"&&(n=!0)}}var $n=class Is{constructor(n){
|
|
139
|
+
`),n=!1,t=!0,yield s):a.type==="finish-step"&&(n=!0)}}var $n=class Is{constructor(n){Ae(this,"id");Ae(this,"threadId");Ae(this,"text");Ae(this,"formatted");Ae(this,"raw");Ae(this,"author");Ae(this,"metadata");Ae(this,"attachments");Ae(this,"isMention");Ae(this,"links");var t;this.id=n.id,this.threadId=n.threadId,this.text=n.text,this.formatted=n.formatted,this.raw=n.raw,this.author=n.author,this.metadata=n.metadata,this.attachments=n.attachments,this.isMention=n.isMention,this.links=(t=n.links)!=null?t:[]}toJSON(){var n;return{_type:"chat:Message",id:this.id,threadId:this.threadId,text:this.text,formatted:this.formatted,raw:this.raw,author:{userId:this.author.userId,userName:this.author.userName,fullName:this.author.fullName,isBot:this.author.isBot,isMe:this.author.isMe},metadata:{dateSent:this.metadata.dateSent.toISOString(),edited:this.metadata.edited,editedAt:(n=this.metadata.editedAt)==null?void 0:n.toISOString()},attachments:this.attachments.map(t=>({type:t.type,url:t.url,name:t.name,mimeType:t.mimeType,size:t.size,width:t.width,height:t.height})),isMention:this.isMention,links:this.links.length>0?this.links.map(t=>({url:t.url,title:t.title,description:t.description,imageUrl:t.imageUrl,siteName:t.siteName})):void 0}}static fromJSON(n){return new Is({id:n.id,threadId:n.threadId,text:n.text,formatted:n.formatted,raw:n.raw,author:n.author,metadata:{dateSent:new Date(n.metadata.dateSent),edited:n.metadata.edited,editedAt:n.metadata.editedAt?new Date(n.metadata.editedAt):void 0},attachments:n.attachments,isMention:n.isMention,links:n.links})}static[Zn](n){return n.toJSON()}static[er](n){return Is.fromJSON(n)}},Fy=Symbol.for("chat.postable");function Ap(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fy}async function Ep(e,n,t,r,i){let o=a=>{var s;return{adapter:n,logger:i,messageId:a.id,threadId:(s=a.threadId)!=null?s:t}};if(e.isSupported(n)&&n.postObject){let a=await n.postObject(t,e.kind,e.getPostData());e.onPosted(o(a))}else{let a=await r(t,e.getFallbackText());e.onPosted(o(a))}}var Uy=class extends Error{constructor(n,t,r){super(n);Ae(this,"code");Ae(this,"cause");this.name="ChatError",this.code=t,this.cause=r}};var _p=class extends Uy{constructor(n,t,r){super(n,"NOT_IMPLEMENTED",r);Ae(this,"feature");this.name="NotImplementedError",this.feature=t}};var fa=720*60*60*1e3,wp="channel-state:";function $y(e){return"adapterName"in e&&!("adapter"in e)}function qy(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var jy=class Cs{constructor(n){Ae(this,"id");Ae(this,"isDM");Ae(this,"channelVisibility");Ae(this,"_adapter");Ae(this,"_adapterName");Ae(this,"_stateAdapterInstance");Ae(this,"_name",null);Ae(this,"_messageHistory");var t,r;this.id=n.id,this.isDM=(t=n.isDM)!=null?t:!1,this.channelVisibility=(r=n.channelVisibility)!=null?r:"unknown",$y(n)?this._adapterName=n.adapterName:(this._adapter=n.adapter,this._stateAdapterInstance=n.stateAdapter,this._messageHistory=n.messageHistory)}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Channel has no adapter configured");let t=ha().getAdapter(this._adapterName);if(!t)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=t,t}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let n=ha();return this._stateAdapterInstance=n.getState(),this._stateAdapterInstance}get name(){return this._name}get state(){return this._stateAdapter.get(`${wp}${this.id}`)}async setState(n,t){let r=`${wp}${this.id}`;if(t!=null&&t.replace)await this._stateAdapter.set(r,n,fa);else{let o={...await this._stateAdapter.get(r),...n};await this._stateAdapter.set(r,o,fa)}}get messages(){let n=this.adapter,t=this.id,r=this._messageHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a={cursor:i,direction:"backward"},s=n.fetchChannelMessages?await n.fetchChannelMessages(t,a):await n.fetchMessages(t,a),u=[...s.messages].reverse();for(let p of u)o=!0,yield p;if(!s.nextCursor||s.messages.length===0)break;i=s.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}threads(){let n=this.adapter,t=this.id;return{async*[Symbol.asyncIterator](){if(!n.listThreads)return;let r;for(;;){let i=await n.listThreads(t,{cursor:r});for(let o of i.threads)yield o;if(!i.nextCursor||i.threads.length===0)break;r=i.nextCursor}}}}async fetchMetadata(){var n;if(this.adapter.fetchChannelInfo){let t=await this.adapter.fetchChannelInfo(this.id);return this._name=(n=t.name)!=null?n:null,t}return{id:this.id,isDM:this.isDM,metadata:{}}}async post(n){if(Ap(n))return await this.handlePostableObject(n),n;if(qy(n)){let r="";for await(let i of vp(n))typeof i=="string"&&(r+=i);return this.postSingleMessage({markdown:r})}let t=n;if(Nt(n)){let r=Mt(n);if(!r)throw new Error("Invalid JSX element: must be a Card element");t=r}return this.postSingleMessage(t)}async handlePostableObject(n){await Ep(n,this.adapter,this.id,(t,r)=>this.adapter.postChannelMessage?this.adapter.postChannelMessage(t,r):this.adapter.postMessage(t,r))}async postSingleMessage(n){let t=this.adapter.postChannelMessage?await this.adapter.postChannelMessage(this.id,n):await this.adapter.postMessage(this.id,n),r=this.createSentMessage(t.id,n,t.threadId);return this._messageHistory&&await this._messageHistory.append(this.id,new $n(r)),r}async postEphemeral(n,t,r){let{fallbackToDM:i}=r,o=typeof n=="string"?n:n.userId,a;if(Nt(t)){let s=Mt(t);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=t;if(this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),u=await this.adapter.postMessage(s,a);return{id:u.id,threadId:s,usedFallback:!0,raw:u.raw}}return null}async schedule(n,t){let r;if(Nt(n)){let i=Mt(n);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=n;if(!this.adapter.scheduleMessage)throw new _p("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,t)}async startTyping(n){await this.adapter.startTyping(this.id,n)}mentionUser(n){return`<@${n}>`}toJSON(){return{_type:"chat:Channel",id:this.id,adapterName:this.adapter.name,channelVisibility:this.channelVisibility,isDM:this.isDM}}static fromJSON(n,t){let r=new Cs({id:n.id,adapterName:n.adapterName,channelVisibility:n.channelVisibility,isDM:n.isDM});return t&&(r._adapter=t),r}static[Zn](n){return n.toJSON()}static[er](n){return Cs.fromJSON(n)}createSentMessage(n,t,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=zy(t);return{id:n,threadId:o,text:s,formatted:u,raw:null,author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:p,links:[],toJSON(){return new $n(this).toJSON()},async edit(h){let y=h;if(Nt(h)){let g=Mt(h);if(!g)throw new Error("Invalid JSX element: must be a Card element");y=g}return await i.editMessage(o,n,y),a.createSentMessage(n,y)},async delete(){await i.deleteMessage(o,n)},async addReaction(h){await i.addReaction(o,n,h)},async removeReaction(h){await i.removeReaction(o,n,h)}}}};function By(e,n){return e.channelIdFromThreadId(n)}function zy(e){if(typeof e=="string")return{plainText:e,formatted:dn([pn([un(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:dn([pn([un(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let n=Ts(e.markdown);return{plainText:Nr(n),formatted:n,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Nr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let n=e.fallbackText||Lr(e.card);return{plainText:n,formatted:dn([pn([un(n)])]),attachments:[]}}if("type"in e&&e.type==="card"){let n=Lr(e);return{plainText:n,formatted:dn([pn([un(n)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var nI=10080*60*1e3;var Vy=class{constructor(e={}){Ae(this,"accumulated","");Ae(this,"dirty",!0);Ae(this,"cachedRender","");Ae(this,"finished",!1);Ae(this,"fenceToggles",0);Ae(this,"incompleteLine","");Ae(this,"options");var n;this.options={wrapTablesForAppend:(n=e.wrapTablesForAppend)!=null?n:!0}}push(e){var t;this.accumulated+=e,this.dirty=!0,this.incompleteLine+=e;let n=this.incompleteLine.split(`
|
|
140
140
|
`);this.incompleteLine=(t=n.pop())!=null?t:"";for(let r of n){let i=r.trimStart();(i.startsWith("```")||i.startsWith("~~~"))&&this.fenceToggles++}}isAccumulatedInsideFence(){let e=this.fenceToggles%2===1,n=this.incompleteLine.trimStart();return(n.startsWith("```")||n.startsWith("~~~"))&&(e=!e),e}render(){if(!this.dirty)return this.cachedRender;if(this.dirty=!1,this.finished)return this.cachedRender=Dr(this.accumulated),this.cachedRender;if(this.isAccumulatedInsideFence())return this.cachedRender=Dr(this.accumulated),this.cachedRender;let e=xp(this.accumulated);return this.cachedRender=Dr(e),this.cachedRender}getCommittableText(){if(this.finished)return this.formatAppendOnlyText(this.accumulated,!0);let e=this.accumulated;if(e.length>0&&!e.endsWith(`
|
|
141
141
|
`)){let r=e.lastIndexOf(`
|
|
142
142
|
`),i=r>=0?e.slice(0,r+1):"";if(Rs(i))return this.formatAppendOnlyText(e);e=i}if(Rs(e))return this.formatAppendOnlyText(e);let n=xp(e),t=this.formatAppendOnlyText(n);return Rs(t)?t:Hy(t)}getText(){return this.accumulated}finish(){return this.finished=!0,this.dirty=!0,this.render()}formatAppendOnlyText(e,n=!1){return this.options.wrapTablesForAppend?Yy(e,n):e}},Wy=new Set(["*","~","`","["]);function Sp(e){return Dr(e).length<=e.length}function Hy(e){if(e.length===0||Sp(e))return e;for(let n=e.length-1;n>=0;n--)if(Wy.has(e[n])){for(;n>0&&e[n-1]===e[n];)n--;let t=e.slice(0,n);if(Sp(t))return t}return""}var Ps=/^\|.*\|$/,Ms=/^\|[\s:]*-{1,}[\s:]*(\|[\s:]*-{1,}[\s:]*)*\|$/;function Rs(e){let n=!1;for(let t of e.split(`
|
|
@@ -148,7 +148,7 @@ $$`:`${e}$$`},wy=e=>gy(e)%2===0?e:by(e),Sy=e=>yy(e)%2===1?`${e}$`:e,xy=(e,n,t)=>
|
|
|
148
148
|
`),r=e.split(`
|
|
149
149
|
`);t&&r.length>0&&r.at(-1)===""&&r.pop();let i=[],o=!1,a=!1;for(let u=0;u<r.length;u++){let p=r[u].trim();if(!o&&(p.startsWith("```")||p.startsWith("~~~"))){a=!a,i.push(r[u]);continue}if(a){i.push(r[u]);continue}let d=p!==""&&(Ps.test(p)||Ms.test(p));if(d&&!o){let h=!1;for(let y=u;y<r.length;y++){let g=r[y].trim();if(Ms.test(g)){h=!0;break}if(g===""||!Ps.test(g))break}h&&(i.push("```"),o=!0)}else!d&&o&&(i.push("```"),o=!1);i.push(r[u])}o&&n&&i.push("```");let s=i.join(`
|
|
150
150
|
`);return t&&(s+=`
|
|
151
|
-
`),s}function Jy(e){return"adapterName"in e&&!("adapter"in e)}var Tp="thread-state:";function Gy(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var aI=class Ns{constructor(n){Ee(this,"id");Ee(this,"channelId");Ee(this,"isDM");Ee(this,"channelVisibility");Ee(this,"_adapter");Ee(this,"_adapterName");Ee(this,"_stateAdapterInstance");Ee(this,"_recentMessages",[]);Ee(this,"_isSubscribedContext");Ee(this,"_currentMessage");Ee(this,"_streamingUpdateIntervalMs");Ee(this,"_fallbackStreamingPlaceholderText");Ee(this,"_channel");Ee(this,"_messageHistory");Ee(this,"_logger");var t,r,i,o;this.id=n.id,this.channelId=n.channelId,this.isDM=(t=n.isDM)!=null?t:!1,this.channelVisibility=(r=n.channelVisibility)!=null?r:"unknown",this._isSubscribedContext=(i=n.isSubscribedContext)!=null?i:!1,this._currentMessage=n.currentMessage,this._logger=n.logger,this._streamingUpdateIntervalMs=(o=n.streamingUpdateIntervalMs)!=null?o:500,this._fallbackStreamingPlaceholderText=n.fallbackStreamingPlaceholderText!==void 0?n.fallbackStreamingPlaceholderText:"...",Jy(n)?this._adapterName=n.adapterName:(this._adapter=n.adapter,this._stateAdapterInstance=n.stateAdapter,this._messageHistory=n.messageHistory),n.initialMessage&&(this._recentMessages=[n.initialMessage])}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Thread has no adapter configured");let t=ha().getAdapter(this._adapterName);if(!t)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=t,t}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let n=ha();return this._stateAdapterInstance=n.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(n){this._recentMessages=n}get state(){return this._stateAdapter.get(`${Tp}${this.id}`)}async setState(n,t){let r=`${Tp}${this.id}`;if(t!=null&&t.replace)await this._stateAdapter.set(r,n,fa);else{let o={...await this._stateAdapter.get(r),...n};await this._stateAdapter.set(r,o,fa)}}get channel(){if(!this._channel){let n=By(this.adapter,this.id);this._channel=new jy({id:n,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,messageHistory:this._messageHistory})}return this._channel}get messages(){let n=this.adapter,t=this.id,r=this._messageHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await n.fetchMessages(t,{cursor:i,direction:"backward"}),s=[...a.messages].reverse();for(let u of s)o=!0,yield u;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}get allMessages(){let n=this.adapter,t=this.id,r=this._messageHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await n.fetchMessages(t,{limit:100,cursor:i,direction:"forward"});for(let s of a.messages)o=!0,yield s;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s of a)yield s}}}}async isSubscribed(){return this._isSubscribedContext?!0:this._stateAdapter.isSubscribed(this.id)}async subscribe(){await this._stateAdapter.subscribe(this.id),this.adapter.onThreadSubscribe&&await this.adapter.onThreadSubscribe(this.id)}async unsubscribe(){await this._stateAdapter.unsubscribe(this.id)}async post(n){if(Ep(n))return await this.handlePostableObject(n),n;if(Gy(n))return this.handleStream(n);let t=n;if(Nt(n)){let o=Mt(n);if(!o)throw new Error("Invalid JSX element: must be a Card element");t=o}let r=await this.adapter.postMessage(this.id,t),i=this.createSentMessage(r.id,t,r.threadId);return this._messageHistory&&await this._messageHistory.append(this.id,new $n(i)),i}async handlePostableObject(n){await Ap(n,this.adapter,this.id,(t,r)=>this.adapter.postMessage(t,r),this._logger)}async postEphemeral(n,t,r){let{fallbackToDM:i}=r,o=typeof n=="string"?n:n.userId,a;if(Nt(t)){let s=Mt(t);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=t;if(this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),u=await this.adapter.postMessage(s,a);return{id:u.id,threadId:s,usedFallback:!0,raw:u.raw}}return null}async schedule(n,t){let r;if(Nt(n)){let i=Mt(n);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=n;if(!this.adapter.scheduleMessage)throw new Op("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,t)}async handleStream(n){var o;let t=vp(n),r={};if(this._currentMessage){r.recipientUserId=this._currentMessage.author.userId;let a=this._currentMessage.raw;r.recipientTeamId=(o=a==null?void 0:a.team_id)!=null?o:a==null?void 0:a.team}if(this.adapter.stream){let a="",s={[Symbol.asyncIterator]:()=>{let d=t[Symbol.asyncIterator]();return{async next(){let h=await d.next();if(!h.done){let y=h.value;typeof y=="string"?a+=y:y.type==="markdown_text"&&(a+=y.text)}return h}}}},u=await this.adapter.stream(this.id,s,r),p=this.createSentMessage(u.id,{markdown:a},u.threadId);return this._messageHistory&&await this._messageHistory.append(this.id,new $n(p)),p}let i={[Symbol.asyncIterator]:()=>{let a=t[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(i,r)}async startTyping(n){await this.adapter.startTyping(this.id,n)}async fallbackStream(n,t){var j;let r=(j=t==null?void 0:t.updateIntervalMs)!=null?j:this._streamingUpdateIntervalMs,i=this._fallbackStreamingPlaceholderText,o=i===null?null:await this.adapter.postMessage(this.id,i),a=this.id,s=new Vy,u="",p=!1,d=null,h=null;o&&(a=o.threadId||this.id,u=i!=null?i:"");let y=()=>{h=setTimeout(()=>{d=g()},r)},g=async()=>{var te;if(p||!o)return;let pe=s.render();if(pe!==u)try{await this.adapter.editMessage(a,o.id,{markdown:pe}),u=pe}catch(Te){(te=this._logger)==null||te.warn("fallbackStream edit failed",Te)}p||y()};o&&y();try{for await(let pe of n)if(s.push(pe),!o){let te=s.render();o=await this.adapter.postMessage(this.id,{markdown:te}),a=o.threadId||this.id,u=te,y()}}finally{p=!0,h&&(clearTimeout(h),h=null)}d&&await d;let P=s.getText(),Z=s.finish();o||(o=await this.adapter.postMessage(this.id,{markdown:P}),a=o.threadId||this.id,u=P),Z!==u&&await this.adapter.editMessage(a,o.id,{markdown:P});let Q=this.createSentMessage(o.id,{markdown:P},a);return this._messageHistory&&await this._messageHistory.append(this.id,new $n(Q)),Q}async refresh(){let n=await this.adapter.fetchMessages(this.id,{limit:50});n.messages.length>0?this._recentMessages=n.messages:this._messageHistory?this._recentMessages=await this._messageHistory.getMessages(this.id,50):this._recentMessages=[]}mentionUser(n){return`<@${n}>`}toJSON(){var n;return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:(n=this._currentMessage)==null?void 0:n.toJSON(),isDM:this.isDM,adapterName:this.adapter.name}}static fromJSON(n,t){let r=new Ns({id:n.id,adapterName:n.adapterName,channelId:n.channelId,channelVisibility:n.channelVisibility,currentMessage:n.currentMessage?$n.fromJSON(n.currentMessage):void 0,isDM:n.isDM});return t&&(r._adapter=t),r}static[Zn](n){return n.toJSON()}static[er](n){return Ns.fromJSON(n)}createSentMessage(n,t,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=Ky(t);return{id:n,threadId:o,text:s,formatted:u,raw:null,links:[],author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:p,toJSON(){return new $n(this).toJSON()},async edit(h){let y=h;if(Nt(h)){let g=Mt(h);if(!g)throw new Error("Invalid JSX element: must be a Card element");y=g}return await i.editMessage(o,n,y),a.createSentMessage(n,y)},async delete(){await i.deleteMessage(o,n)},async addReaction(h){await i.addReaction(o,n,h)},async removeReaction(h){await i.removeReaction(o,n,h)}}}createSentMessageFromMessage(n){let t=this.adapter,r=this.id,i=n.id,o=this;return{id:n.id,threadId:n.threadId,text:n.text,formatted:n.formatted,raw:n.raw,author:n.author,metadata:n.metadata,attachments:n.attachments,links:n.links,isMention:n.isMention,toJSON(){return n.toJSON()},async edit(a){let s=a;if(Nt(a)){let u=Mt(a);if(!u)throw new Error("Invalid JSX element: must be a Card element");s=u}return await t.editMessage(r,i,s),o.createSentMessage(i,s,r)},async delete(){await t.deleteMessage(r,i)},async addReaction(a){await t.addReaction(r,i,a)},async removeReaction(a){await t.removeReaction(r,i,a)}}}};function Ky(e){if(typeof e=="string")return{plainText:e,formatted:dn([pn([un(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:dn([pn([un(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let n=Ts(e.markdown);return{plainText:Nr(n),formatted:n,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Nr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let n=e.fallbackText||Lr(e.card);return{plainText:n,formatted:dn([pn([un(n)])]),attachments:[]}}if("type"in e&&e.type==="card"){let n=Lr(e);return{plainText:n,formatted:dn([pn([un(n)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var oI=300*1e3,sI=1440*60*1e3;var kp=new Map;function tr(e){let n=kp.get(e);return n||(n=Object.freeze({name:e,toString:()=>`{{emoji:${e}}}`,toJSON:()=>`{{emoji:${e}}}`}),kp.set(e,n)),n}var Xy={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}"}},Qy=class{constructor(e){Ee(this,"emojiMap");Ee(this,"slackToNormalized");Ee(this,"gchatToNormalized");this.emojiMap={...Xy,...e},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[e,n]of Object.entries(this.emojiMap)){let t=Array.isArray(n.slack)?n.slack:[n.slack];for(let i of t)this.slackToNormalized.set(i.toLowerCase(),e);let r=Array.isArray(n.gchat)?n.gchat:[n.gchat];for(let i of r)this.gchatToNormalized.set(i,e)}}fromSlack(e){var r;let n=e.replace(/^:|:$/g,"").toLowerCase(),t=(r=this.slackToNormalized.get(n))!=null?r:e;return tr(t)}fromGChat(e){var t;let n=(t=this.gchatToNormalized.get(e))!=null?t:e;return tr(n)}fromTeams(e){var r;let t=(r={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[e])!=null?r:e;return tr(t)}toSlack(e){let n=typeof e=="string"?e:e.name,t=this.emojiMap[n];return t?Array.isArray(t.slack)?t.slack[0]:t.slack:n}toGChat(e){let n=typeof e=="string"?e:e.name,t=this.emojiMap[n];return t?Array.isArray(t.gchat)?t.gchat[0]:t.gchat:n}toDiscord(e){return this.toGChat(e)}matches(e,n){let t=typeof n=="string"?n:n.name,r=this.emojiMap[t];if(!r)return e===t;let i=Array.isArray(r.slack)?r.slack:[r.slack],o=Array.isArray(r.gchat)?r.gchat:[r.gchat],a=e.replace(/^:|:$/g,"").toLowerCase();return i.some(s=>s.toLowerCase()===a)||o.includes(e)}extend(e){Object.assign(this.emojiMap,e),this.buildReverseMaps()}},Zy=new Qy;function eb(e){let n=["thumbs_up","thumbs_down","clap","wave","pray","muscle","ok_hand","point_up","point_down","point_left","point_right","raised_hands","shrug","facepalm","heart","smile","laugh","thinking","sad","cry","angry","love_eyes","cool","wink","surprised","worried","confused","neutral","sleeping","sick","mind_blown","relieved","grimace","rolling_eyes","hug","zany","check","x","question","exclamation","warning","stop","info","100","fire","star","sparkles","lightning","boom","eyes","green_circle","yellow_circle","red_circle","blue_circle","white_circle","black_circle","rocket","party","confetti","balloon","gift","trophy","medal","lightbulb","gear","wrench","hammer","bug","link","lock","unlock","key","pin","memo","clipboard","calendar","clock","hourglass","bell","megaphone","speech_bubble","email","inbox","outbox","package","folder","file","chart_up","chart_down","coffee","pizza","beer","arrow_up","arrow_down","arrow_left","arrow_right","refresh","sun","cloud","rain","snow","rainbow"],t={custom:r=>tr(r)};for(let r of n)t[r]=tr(r);if(e){for(let r of Object.keys(e))t[r]=tr(r);Zy.extend(e)}return t}var lI=eb(),Ls=oa,Ds=sa,Fs=ks;var Us=la,$s=ep,qs=aa;var js=ua,Bs=pa,zs=ca;var tb={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 nb(e){if(!e)return null;let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object")return null;let t=n,r=ma(t.message);if(r)return r;let i=ma(t.error);if(i)return i;let o=t.errors;return Array.isArray(o)?ma(o[0]):null}var hn=class extends Error{constructor(n,t){var a;let r=(a=tb[n])!=null?a:n,i=nb(t),o=i?`Delivery failed: ${r}: ${i}`:`Delivery failed: ${r}`;super(o),this.name="AgentDeliveryError",this.statusCode=n,this.responseBody=t}};var rb=5*1024*1024,ib=5*1024*1024,_p=32768,ab=/^[A-Za-z0-9+/]*={0,2}$/;function ob(e){return"type"in e&&e.type==="card"}function Ur(e,n){return e.filename?`"${e.filename}"`:`at index ${n}`}function Rp(){return globalThis.Buffer}function sb(e){var n,t,r;return(r=(t=(n=Rp())==null?void 0:n.isBuffer)==null?void 0:t.call(n,e))!=null?r:!1}function lb(e){return typeof Blob!="undefined"&&e instanceof Blob}function Vs(e){let n=Rp();if(n)return n.from(e).toString("base64");if(typeof btoa!="function")throw new Error("Unable to encode file data: base64 encoding is not available in this runtime.");let t="";for(let r=0;r<e.length;r+=_p){let i=e.subarray(r,r+_p);t+=String.fromCharCode(...i)}return btoa(t)}function Ip(e){let n=e.replace(/\s/g,""),t=n.length%4;if(!n||t===1||!ab.test(n))return null;let r=n.endsWith("==")?2:n.endsWith("=")?1:0;return Math.floor(n.length*3/4)-r}function Fr(e,n,t){if(e>rb)throw new Error(`Invalid file ${Ur(n,t)}: inline data must be 5 MB or smaller. Use a publicly-accessible URL for larger files.`)}async function cb(e,n,t){if(typeof e=="string"){let r=Ip(e);if(r===null)throw new Error(`Invalid file ${Ur(n,t)}: data must be a base64-encoded string.`);return Fr(r,n,t),e}if(sb(e))return Fr(e.byteLength,n,t),e.toString("base64");if(e instanceof Uint8Array)return Fr(e.byteLength,n,t),Vs(e);if(e instanceof ArrayBuffer)return Fr(e.byteLength,n,t),Vs(new Uint8Array(e));if(lb(e))return Fr(e.size,n,t),Vs(new Uint8Array(await e.arrayBuffer()));throw new Error(`Invalid file ${Ur(n,t)}: data must be a base64 string, Buffer, Uint8Array, ArrayBuffer, or Blob.`)}async function ub(e){if(!(e!=null&&e.length))return;let n=[],t=0;for(let[r,i]of e.entries()){let o=i.data,a=i.url,s=o!=null,u=a!=null;if(s===u)throw new Error(`Invalid file ${Ur(i,r)}: provide exactly one of data or url.`);if(s){let p=await cb(o,i,r),d=Ip(p);if(t+=d!=null?d:0,t>ib)throw new Error("Invalid files: total inline data must be 5 MB or smaller. Use publicly-accessible URLs for larger files.");n.push({...i,data:p});continue}if(u&&typeof a!="string")throw new Error(`Invalid file ${Ur(i,r)}: url must be a string.`);n.push(i)}return n}async function Cp(e,n){let t=await ub(n);if(typeof e=="string")return t?{markdown:e,files:t}:{markdown:e};if(Nt(e)){let r=Mt(e);if(r)return{card:r}}if(ob(e))return{card:e};throw new Error("Invalid message content \u2014 expected string or CardElement")}var Ws=class{constructor(n,t,r,i,o){this.conversationId=r;this.integrationIdentifier=i;this.poster=o;this.messageId=n,this.platformThreadId=t}async edit(n,t){let r=await this.poster.post({conversationId:this.conversationId,integrationIdentifier:this.integrationIdentifier,edit:{messageId:this.messageId,content:await Cp(n,t==null?void 0:t.files)}});if(!r)throw new Error("Agent edit did not return a message handle");return this.messageId=r.messageId,this.platformThreadId=r.platformThreadId,this}},$r=class{constructor(n,t){this._signals=[];this._pendingReactions=[];this._resolveSignal=null;var r;this.event=n.event,this.action=(r=n.action)!=null?r:null,this.message=n.message,this.reaction=n.reaction,this.conversation=n.conversation,this.subscriber=n.subscriber,this.history=n.history,this.platform=n.platform,this.platformContext=n.platformContext,this._replyUrl=n.replyUrl,this._conversationId=n.conversationId,this._integrationIdentifier=n.integrationIdentifier,this._secretKey=t,this._poster={post:i=>this._post(i)},this.metadata={set:(i,o)=>{this._signals.push({type:"metadata",key:i,value:o})}}}async reply(n,t){let r={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,reply:await Cp(n,t==null?void 0:t.files)};this._signals.length&&(r.signals=this._signals,this._signals=[]),this._pendingReactions.length&&(r.addReactions=this._pendingReactions,this._pendingReactions=[]),this._resolveSignal&&(r.resolve=this._resolveSignal,this._resolveSignal=null);let i=await this._post(r);if(!i)throw new Error("Agent reply did not return a message handle");return new Ws(i.messageId,i.platformThreadId,this._conversationId,this._integrationIdentifier,this._poster)}resolve(n){this._resolveSignal={summary:n}}trigger(n,t){this._signals.push({...t,type:"trigger",workflowId:n})}addReaction(n,t){this._pendingReactions.push({messageId:n,emojiName:t})}async flush(){if(!this._signals.length&&!this._resolveSignal&&!this._pendingReactions.length)return;let n={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier};this._signals.length&&(n.signals=this._signals,this._signals=[]),this._pendingReactions.length&&(n.addReactions=this._pendingReactions,this._pendingReactions=[]),this._resolveSignal&&(n.resolve=this._resolveSignal,this._resolveSignal=null),await this._post(n)}async _post(n){let t=await fetch(this._replyUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${this._secretKey}`},body:JSON.stringify(n)});if(!t.ok){let i=await t.text().catch(()=>"");throw new hn(t.status,i)}let r=await t.text().catch(()=>"");if(!r)return null;try{let i=JSON.parse(r),o=i&&typeof i=="object"&&"data"in i?i.data:i;if(o&&typeof o.messageId=="string"&&typeof o.platformThreadId=="string")return{messageId:o.messageId,platformThreadId:o.platformThreadId}}catch{}return null}};function Hs(e,n){if(!e)throw new Error("agent() requires a non-empty agentId");if(!(n!=null&&n.onMessage))throw new Error(`agent('${e}') requires an onMessage handler`);return{id:e,handlers:n}}var nr=(i=>(i.ON_MESSAGE="onMessage",i.ON_ACTION="onAction",i.ON_RESOLVE="onResolve",i.ON_REACTION="onReaction",i))(nr||{});var ga=class{constructor(n){this.handler=n.handler,this.client=n.client?n.client:new Yn,this.workflows=n.workflows||[],this.agents=n.agents||[],this.http=vi(this.client.secretKey,this.client.apiUrl),this.frameworkName=n.frameworkName,this.hmacEnabled=this.client.strictAuthentication,this.client.addAgents(this.agents)}createHandler(){return async(...n)=>{await this.client.addWorkflows(this.workflows);let t=await this.handler(...n),r=await this.handleAction({actions:t});return t.transformResponse(r)}}getStaticHeaders(){let n=`novu-framework:v${this.client.version}`;return{"content-type":"application/json","access-control-allow-origin":"*","access-control-allow-private-network":"true","access-control-allow-methods":"GET, POST","access-control-allow-headers":"*","access-control-max-age":"604800","novu-framework-version":"2024-06-26","novu-framework-sdk":"2.10.1-alpha.5","novu-framework-server":this.frameworkName,"user-agent":n}}createResponse(n,t){return{status:n,body:JSON.stringify(t),headers:{...this.getStaticHeaders()}}}createError(n){return{status:n.statusCode,body:JSON.stringify({message:n.message,data:n.data,code:n.code}),headers:this.getStaticHeaders()}}async handleAction({actions:n}){let t=await n.url(),r=await n.method(),i=t.searchParams.get("action")||"health-check",o=t.searchParams.get("workflowId")||"",a=t.searchParams.get("stepId")||"",s=t.searchParams.get("agentId")||"",u=t.searchParams.get("event")||"",p=await n.headers("novu-signature")||"",d={};try{r==="POST"&&(d=await n.body())}catch{}try{i!=="health-check"&&await this.validateHmac(d,p);let h=this.getPostActionMap(d,o,a,i,s,u,n.waitUntil),y=this.getGetActionMap(o,a);if(r==="POST")return await this.handlePostAction(i,h);if(r==="GET")return await this.handleGetAction(i,y);if(r==="OPTIONS")return this.createResponse(200,{})}catch(h){return this.handleError(h)}return this.createError(new pi(r))}getPostActionMap(n,t,r,i,o,a,s){return{trigger:this.triggerAction({workflowId:t,...n}),execute:async()=>{let u=await this.client.executeWorkflow({...n,workflowId:t,stepId:r,action:i});return this.createResponse(200,u)},preview:async()=>{let u=await this.client.executeWorkflow({...n,workflowId:t,stepId:r,action:i});return this.createResponse(200,u)},"agent-event":async()=>{let u=this.client.getAgent(o);if(!u)return this.createResponse(404,{error:`Agent '${o}' not registered`});let p=new $r(n,this.client.secretKey),d=this.runAgentHandler(u,a,p).catch(h=>{h instanceof hn?console.error(`[agent:${o}] ${h.message}`):console.error(`[agent:${o}] Handler error:`,h)});return s&&s(d),this.createResponse(200,{status:"ack"})}}}triggerAction(n){return async()=>{let t={name:n.workflowId,to:n.to,payload:(n==null?void 0:n.payload)||{},transactionId:n.transactionId,overrides:n.overrides||{},...n.actor&&{actor:n.actor},...n.bridgeUrl&&{bridgeUrl:n.bridgeUrl},...n.controls&&{controls:n.controls},...n.context&&{context:n.context}},r=await this.http.post("/events/trigger",t);return this.createResponse(200,r)}}getGetActionMap(n,t){return{discover:async()=>{let r=await this.client.discover();return this.createResponse(200,r)},"health-check":async()=>{let r=await this.client.healthCheck();return this.createResponse(200,r)},code:async()=>{let r=await this.client.getCode(n,t);return this.createResponse(200,r)}}}async handlePostAction(n,t){if(Object.values(gr).includes(n)){let r=t[n];return r()}else throw new Vn(n,gr)}async handleGetAction(n,t){if(Object.values(Qr).includes(n)){let r=t[n];return r()}else throw new Vn(n,Qr)}async runAgentHandler(n,t,r){let i={onMessage:n.handlers.onMessage,onReaction:n.handlers.onReaction,onAction:n.handlers.onAction,onResolve:n.handlers.onResolve};if(!Object.prototype.hasOwnProperty.call(i,t))throw new Vn(t,nr);let o=i[t];if(o){let a=await o(r);a!=null&&await r.reply(a)}await r.flush()}handleError(n){if(_n(n))return n.statusCode>=500&&console.error(n),this.createError(n);if(Jl(n))return this.createError(n);{let t=new zn(n);return console.error(t),this.createError(t)}}async validateHmac(n,t){if(!this.hmacEnabled)return;if(!t)throw new yi;if(!this.client.secretKey)throw new Si;let[r,i]=t.split(",");if(!r||!i)throw new bi;let[o,a]=r.split("="),[s,u]=i.split("=");if(Number(o)<Date.now()-1500)throw new wi;if(!(await rc(this.client.secretKey,`${a}.${JSON.stringify(n)}`)===u))throw new gi}};var ue={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var db={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},Pp={output:db};var Mp={"chat-webhook":ue,discord:ue,getstream:ue,"grafana-on-call":ue,mattermost:ue,msteams:ue,"rocket-chat":ue,ryver:ue,slack:Pp,"whatsapp-business":ue,zulip:ue};var hb={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},Np={output:hb};var qn={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},fb={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},mb={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},gb={type:"object",properties:{from:qn,sender:qn,to:{type:"array",items:qn},cc:{type:"array",items:qn},bcc:{type:"array",items:qn},replyTo:qn,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:qn,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:fb},inlineAttachments:{type:"array",items:mb},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},Lp={output:gb};var Vt={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},ya={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},yb={type:"object",properties:{from:{anyOf:[{type:"string"},Vt]},sender:{anyOf:[{type:"string"},Vt]},to:{anyOf:[{type:"string"},Vt,{type:"array",items:Vt}]},cc:{anyOf:[{type:"string"},Vt,{type:"array",items:Vt}]},bcc:{anyOf:[{type:"string"},Vt,{type:"array",items:Vt}]},replyTo:{anyOf:[{type:"string"},Vt,{type:"array",items:Vt}]},inReplyTo:{anyOf:[{type:"string"},Vt]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},ya]},html:{anyOf:[{type:"string"},ya]},watchHtml:{anyOf:[{type:"string"},ya]},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"},ya]}}}]},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},Dp={output:yb};var bb={type:"object",properties:{},required:[],additionalProperties:!1},Fp={output:bb};var wb={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},Up={output:wb};var $p={braze:ue,clickatell:ue,nodemailer:Dp,emailjs:ue,"email-webhook":ue,"infobip-email":ue,mailersend:ue,mailgun:Np,mailjet:Lp,mailtrap:ue,mandrill:ue,netcore:ue,"novu-email":Fp,outlook365:ue,plunk:ue,postmark:ue,resend:ue,sendgrid:Up,sendinblue:ue,ses:ue,sparkpost:ue};var Sb={type:"object",properties:{},required:[],additionalProperties:!1},qp={output:Sb};var jp={novu:qp};var Bp={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},xb={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:
|
|
151
|
+
`),s}function Jy(e){return"adapterName"in e&&!("adapter"in e)}var Tp="thread-state:";function Gy(e){return e!==null&&typeof e=="object"&&Symbol.asyncIterator in e}var aI=class Ns{constructor(n){Ae(this,"id");Ae(this,"channelId");Ae(this,"isDM");Ae(this,"channelVisibility");Ae(this,"_adapter");Ae(this,"_adapterName");Ae(this,"_stateAdapterInstance");Ae(this,"_recentMessages",[]);Ae(this,"_isSubscribedContext");Ae(this,"_currentMessage");Ae(this,"_streamingUpdateIntervalMs");Ae(this,"_fallbackStreamingPlaceholderText");Ae(this,"_channel");Ae(this,"_messageHistory");Ae(this,"_logger");var t,r,i,o;this.id=n.id,this.channelId=n.channelId,this.isDM=(t=n.isDM)!=null?t:!1,this.channelVisibility=(r=n.channelVisibility)!=null?r:"unknown",this._isSubscribedContext=(i=n.isSubscribedContext)!=null?i:!1,this._currentMessage=n.currentMessage,this._logger=n.logger,this._streamingUpdateIntervalMs=(o=n.streamingUpdateIntervalMs)!=null?o:500,this._fallbackStreamingPlaceholderText=n.fallbackStreamingPlaceholderText!==void 0?n.fallbackStreamingPlaceholderText:"...",Jy(n)?this._adapterName=n.adapterName:(this._adapter=n.adapter,this._stateAdapterInstance=n.stateAdapter,this._messageHistory=n.messageHistory),n.initialMessage&&(this._recentMessages=[n.initialMessage])}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Thread has no adapter configured");let t=ha().getAdapter(this._adapterName);if(!t)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=t,t}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let n=ha();return this._stateAdapterInstance=n.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(n){this._recentMessages=n}get state(){return this._stateAdapter.get(`${Tp}${this.id}`)}async setState(n,t){let r=`${Tp}${this.id}`;if(t!=null&&t.replace)await this._stateAdapter.set(r,n,fa);else{let o={...await this._stateAdapter.get(r),...n};await this._stateAdapter.set(r,o,fa)}}get channel(){if(!this._channel){let n=By(this.adapter,this.id);this._channel=new jy({id:n,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,messageHistory:this._messageHistory})}return this._channel}get messages(){let n=this.adapter,t=this.id,r=this._messageHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await n.fetchMessages(t,{cursor:i,direction:"backward"}),s=[...a.messages].reverse();for(let u of s)o=!0,yield u;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}get allMessages(){let n=this.adapter,t=this.id,r=this._messageHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await n.fetchMessages(t,{limit:100,cursor:i,direction:"forward"});for(let s of a.messages)o=!0,yield s;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&r){let a=await r.getMessages(t);for(let s of a)yield s}}}}async isSubscribed(){return this._isSubscribedContext?!0:this._stateAdapter.isSubscribed(this.id)}async subscribe(){await this._stateAdapter.subscribe(this.id),this.adapter.onThreadSubscribe&&await this.adapter.onThreadSubscribe(this.id)}async unsubscribe(){await this._stateAdapter.unsubscribe(this.id)}async post(n){if(Ap(n))return await this.handlePostableObject(n),n;if(Gy(n))return this.handleStream(n);let t=n;if(Nt(n)){let o=Mt(n);if(!o)throw new Error("Invalid JSX element: must be a Card element");t=o}let r=await this.adapter.postMessage(this.id,t),i=this.createSentMessage(r.id,t,r.threadId);return this._messageHistory&&await this._messageHistory.append(this.id,new $n(i)),i}async handlePostableObject(n){await Ep(n,this.adapter,this.id,(t,r)=>this.adapter.postMessage(t,r),this._logger)}async postEphemeral(n,t,r){let{fallbackToDM:i}=r,o=typeof n=="string"?n:n.userId,a;if(Nt(t)){let s=Mt(t);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=t;if(this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),u=await this.adapter.postMessage(s,a);return{id:u.id,threadId:s,usedFallback:!0,raw:u.raw}}return null}async schedule(n,t){let r;if(Nt(n)){let i=Mt(n);if(!i)throw new Error("Invalid JSX element: must be a Card element");r=i}else r=n;if(!this.adapter.scheduleMessage)throw new _p("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,r,t)}async handleStream(n){var o;let t=vp(n),r={};if(this._currentMessage){r.recipientUserId=this._currentMessage.author.userId;let a=this._currentMessage.raw;r.recipientTeamId=(o=a==null?void 0:a.team_id)!=null?o:a==null?void 0:a.team}if(this.adapter.stream){let a="",s={[Symbol.asyncIterator]:()=>{let d=t[Symbol.asyncIterator]();return{async next(){let h=await d.next();if(!h.done){let y=h.value;typeof y=="string"?a+=y:y.type==="markdown_text"&&(a+=y.text)}return h}}}},u=await this.adapter.stream(this.id,s,r),p=this.createSentMessage(u.id,{markdown:a},u.threadId);return this._messageHistory&&await this._messageHistory.append(this.id,new $n(p)),p}let i={[Symbol.asyncIterator]:()=>{let a=t[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(i,r)}async startTyping(n){await this.adapter.startTyping(this.id,n)}async fallbackStream(n,t){var j;let r=(j=t==null?void 0:t.updateIntervalMs)!=null?j:this._streamingUpdateIntervalMs,i=this._fallbackStreamingPlaceholderText,o=i===null?null:await this.adapter.postMessage(this.id,i),a=this.id,s=new Vy,u="",p=!1,d=null,h=null;o&&(a=o.threadId||this.id,u=i!=null?i:"");let y=()=>{h=setTimeout(()=>{d=g()},r)},g=async()=>{var te;if(p||!o)return;let pe=s.render();if(pe!==u)try{await this.adapter.editMessage(a,o.id,{markdown:pe}),u=pe}catch(Te){(te=this._logger)==null||te.warn("fallbackStream edit failed",Te)}p||y()};o&&y();try{for await(let pe of n)if(s.push(pe),!o){let te=s.render();o=await this.adapter.postMessage(this.id,{markdown:te}),a=o.threadId||this.id,u=te,y()}}finally{p=!0,h&&(clearTimeout(h),h=null)}d&&await d;let P=s.getText(),Z=s.finish();o||(o=await this.adapter.postMessage(this.id,{markdown:P}),a=o.threadId||this.id,u=P),Z!==u&&await this.adapter.editMessage(a,o.id,{markdown:P});let Q=this.createSentMessage(o.id,{markdown:P},a);return this._messageHistory&&await this._messageHistory.append(this.id,new $n(Q)),Q}async refresh(){let n=await this.adapter.fetchMessages(this.id,{limit:50});n.messages.length>0?this._recentMessages=n.messages:this._messageHistory?this._recentMessages=await this._messageHistory.getMessages(this.id,50):this._recentMessages=[]}mentionUser(n){return`<@${n}>`}toJSON(){var n;return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:(n=this._currentMessage)==null?void 0:n.toJSON(),isDM:this.isDM,adapterName:this.adapter.name}}static fromJSON(n,t){let r=new Ns({id:n.id,adapterName:n.adapterName,channelId:n.channelId,channelVisibility:n.channelVisibility,currentMessage:n.currentMessage?$n.fromJSON(n.currentMessage):void 0,isDM:n.isDM});return t&&(r._adapter=t),r}static[Zn](n){return n.toJSON()}static[er](n){return Ns.fromJSON(n)}createSentMessage(n,t,r){let i=this.adapter,o=r||this.id,a=this,{plainText:s,formatted:u,attachments:p}=Ky(t);return{id:n,threadId:o,text:s,formatted:u,raw:null,links:[],author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:p,toJSON(){return new $n(this).toJSON()},async edit(h){let y=h;if(Nt(h)){let g=Mt(h);if(!g)throw new Error("Invalid JSX element: must be a Card element");y=g}return await i.editMessage(o,n,y),a.createSentMessage(n,y)},async delete(){await i.deleteMessage(o,n)},async addReaction(h){await i.addReaction(o,n,h)},async removeReaction(h){await i.removeReaction(o,n,h)}}}createSentMessageFromMessage(n){let t=this.adapter,r=this.id,i=n.id,o=this;return{id:n.id,threadId:n.threadId,text:n.text,formatted:n.formatted,raw:n.raw,author:n.author,metadata:n.metadata,attachments:n.attachments,links:n.links,isMention:n.isMention,toJSON(){return n.toJSON()},async edit(a){let s=a;if(Nt(a)){let u=Mt(a);if(!u)throw new Error("Invalid JSX element: must be a Card element");s=u}return await t.editMessage(r,i,s),o.createSentMessage(i,s,r)},async delete(){await t.deleteMessage(r,i)},async addReaction(a){await t.addReaction(r,i,a)},async removeReaction(a){await t.removeReaction(r,i,a)}}}};function Ky(e){if(typeof e=="string")return{plainText:e,formatted:dn([pn([un(e)])]),attachments:[]};if("raw"in e)return{plainText:e.raw,formatted:dn([pn([un(e.raw)])]),attachments:e.attachments||[]};if("markdown"in e){let n=Ts(e.markdown);return{plainText:Nr(n),formatted:n,attachments:e.attachments||[]}}if("ast"in e)return{plainText:Nr(e.ast),formatted:e.ast,attachments:e.attachments||[]};if("card"in e){let n=e.fallbackText||Lr(e.card);return{plainText:n,formatted:dn([pn([un(n)])]),attachments:[]}}if("type"in e&&e.type==="card"){let n=Lr(e);return{plainText:n,formatted:dn([pn([un(n)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var oI=300*1e3,sI=1440*60*1e3;var kp=new Map;function tr(e){let n=kp.get(e);return n||(n=Object.freeze({name:e,toString:()=>`{{emoji:${e}}}`,toJSON:()=>`{{emoji:${e}}}`}),kp.set(e,n)),n}var Xy={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}"}},Qy=class{constructor(e){Ae(this,"emojiMap");Ae(this,"slackToNormalized");Ae(this,"gchatToNormalized");this.emojiMap={...Xy,...e},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[e,n]of Object.entries(this.emojiMap)){let t=Array.isArray(n.slack)?n.slack:[n.slack];for(let i of t)this.slackToNormalized.set(i.toLowerCase(),e);let r=Array.isArray(n.gchat)?n.gchat:[n.gchat];for(let i of r)this.gchatToNormalized.set(i,e)}}fromSlack(e){var r;let n=e.replace(/^:|:$/g,"").toLowerCase(),t=(r=this.slackToNormalized.get(n))!=null?r:e;return tr(t)}fromGChat(e){var t;let n=(t=this.gchatToNormalized.get(e))!=null?t:e;return tr(n)}fromTeams(e){var r;let t=(r={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[e])!=null?r:e;return tr(t)}toSlack(e){let n=typeof e=="string"?e:e.name,t=this.emojiMap[n];return t?Array.isArray(t.slack)?t.slack[0]:t.slack:n}toGChat(e){let n=typeof e=="string"?e:e.name,t=this.emojiMap[n];return t?Array.isArray(t.gchat)?t.gchat[0]:t.gchat:n}toDiscord(e){return this.toGChat(e)}matches(e,n){let t=typeof n=="string"?n:n.name,r=this.emojiMap[t];if(!r)return e===t;let i=Array.isArray(r.slack)?r.slack:[r.slack],o=Array.isArray(r.gchat)?r.gchat:[r.gchat],a=e.replace(/^:|:$/g,"").toLowerCase();return i.some(s=>s.toLowerCase()===a)||o.includes(e)}extend(e){Object.assign(this.emojiMap,e),this.buildReverseMaps()}},Zy=new Qy;function eb(e){let n=["thumbs_up","thumbs_down","clap","wave","pray","muscle","ok_hand","point_up","point_down","point_left","point_right","raised_hands","shrug","facepalm","heart","smile","laugh","thinking","sad","cry","angry","love_eyes","cool","wink","surprised","worried","confused","neutral","sleeping","sick","mind_blown","relieved","grimace","rolling_eyes","hug","zany","check","x","question","exclamation","warning","stop","info","100","fire","star","sparkles","lightning","boom","eyes","green_circle","yellow_circle","red_circle","blue_circle","white_circle","black_circle","rocket","party","confetti","balloon","gift","trophy","medal","lightbulb","gear","wrench","hammer","bug","link","lock","unlock","key","pin","memo","clipboard","calendar","clock","hourglass","bell","megaphone","speech_bubble","email","inbox","outbox","package","folder","file","chart_up","chart_down","coffee","pizza","beer","arrow_up","arrow_down","arrow_left","arrow_right","refresh","sun","cloud","rain","snow","rainbow"],t={custom:r=>tr(r)};for(let r of n)t[r]=tr(r);if(e){for(let r of Object.keys(e))t[r]=tr(r);Zy.extend(e)}return t}var lI=eb(),Ls=oa,Ds=sa,Fs=ks;var Us=la,$s=ep,qs=aa;var js=ua,Bs=pa,zs=ca;var tb={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 nb(e){if(!e)return null;let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object")return null;let t=n,r=ma(t.message);if(r)return r;let i=ma(t.error);if(i)return i;let o=t.errors;return Array.isArray(o)?ma(o[0]):null}var hn=class extends Error{constructor(n,t){var a;let r=(a=tb[n])!=null?a:n,i=nb(t),o=i?`Delivery failed: ${r}: ${i}`:`Delivery failed: ${r}`;super(o),this.name="AgentDeliveryError",this.statusCode=n,this.responseBody=t}};var rb=5*1024*1024,ib=5*1024*1024,Op=32768,ab=/^[A-Za-z0-9+/]*={0,2}$/;function ob(e){return"type"in e&&e.type==="card"}function Ur(e,n){return e.filename?`"${e.filename}"`:`at index ${n}`}function Rp(){return globalThis.Buffer}function sb(e){var n,t,r;return(r=(t=(n=Rp())==null?void 0:n.isBuffer)==null?void 0:t.call(n,e))!=null?r:!1}function lb(e){return typeof Blob!="undefined"&&e instanceof Blob}function Vs(e){let n=Rp();if(n)return n.from(e).toString("base64");if(typeof btoa!="function")throw new Error("Unable to encode file data: base64 encoding is not available in this runtime.");let t="";for(let r=0;r<e.length;r+=Op){let i=e.subarray(r,r+Op);t+=String.fromCharCode(...i)}return btoa(t)}function Ip(e){let n=e.replace(/\s/g,""),t=n.length%4;if(!n||t===1||!ab.test(n))return null;let r=n.endsWith("==")?2:n.endsWith("=")?1:0;return Math.floor(n.length*3/4)-r}function Fr(e,n,t){if(e>rb)throw new Error(`Invalid file ${Ur(n,t)}: inline data must be 5 MB or smaller. Use a publicly-accessible URL for larger files.`)}async function cb(e,n,t){if(typeof e=="string"){let r=Ip(e);if(r===null)throw new Error(`Invalid file ${Ur(n,t)}: data must be a base64-encoded string.`);return Fr(r,n,t),e}if(sb(e))return Fr(e.byteLength,n,t),e.toString("base64");if(e instanceof Uint8Array)return Fr(e.byteLength,n,t),Vs(e);if(e instanceof ArrayBuffer)return Fr(e.byteLength,n,t),Vs(new Uint8Array(e));if(lb(e))return Fr(e.size,n,t),Vs(new Uint8Array(await e.arrayBuffer()));throw new Error(`Invalid file ${Ur(n,t)}: data must be a base64 string, Buffer, Uint8Array, ArrayBuffer, or Blob.`)}async function ub(e){if(!(e!=null&&e.length))return;let n=[],t=0;for(let[r,i]of e.entries()){let o=i.data,a=i.url,s=o!=null,u=a!=null;if(s===u)throw new Error(`Invalid file ${Ur(i,r)}: provide exactly one of data or url.`);if(s){let p=await cb(o,i,r),d=Ip(p);if(t+=d!=null?d:0,t>ib)throw new Error("Invalid files: total inline data must be 5 MB or smaller. Use publicly-accessible URLs for larger files.");n.push({...i,data:p});continue}if(u&&typeof a!="string")throw new Error(`Invalid file ${Ur(i,r)}: url must be a string.`);n.push(i)}return n}async function Cp(e,n){let t=await ub(n);if(typeof e=="string")return t?{markdown:e,files:t}:{markdown:e};if(Nt(e)){let r=Mt(e);if(r)return{card:r}}if(ob(e))return{card:e};throw new Error("Invalid message content \u2014 expected string or CardElement")}var Ws=class{constructor(n,t,r,i,o){this.conversationId=r;this.integrationIdentifier=i;this.poster=o;this.messageId=n,this.platformThreadId=t}async edit(n,t){let r=await this.poster.post({conversationId:this.conversationId,integrationIdentifier:this.integrationIdentifier,edit:{messageId:this.messageId,content:await Cp(n,t==null?void 0:t.files)}});if(!r)throw new Error("Agent edit did not return a message handle");return this.messageId=r.messageId,this.platformThreadId=r.platformThreadId,this}},$r=class{constructor(n,t){this._signals=[];this._pendingReactions=[];this._resolveSignal=null;var i,o;this.event=n.event,this.action=(i=n.action)!=null?i:null,this.message=n.message,this.reaction=n.reaction,this.conversation=n.conversation,this.subscriber=n.subscriber,this.history=n.history,this.platform=n.platform,this.platformContext=n.platformContext,this._replyUrl=n.replyUrl,this._conversationId=n.conversationId,this._integrationIdentifier=n.integrationIdentifier,this._secretKey=t,this._poster={post:a=>this._post(a)},this._metadataState={...(o=n.conversation.metadata)!=null?o:{}};let r=this;this.metadata={get(a){return r._metadataState[a]},set(a,s){r._metadataState[a]=s,r._signals.push({type:"metadata",action:"set",key:a,value:s})},delete(a){delete r._metadataState[a],r._signals.push({type:"metadata",action:"delete",key:a})},clear(){r._metadataState={},r._signals.push({type:"metadata",action:"clear"})},get current(){return{...r._metadataState}}}}async reply(n,t){let r={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier,reply:await Cp(n,t==null?void 0:t.files)};this._signals.length&&(r.signals=this._signals,this._signals=[]),this._pendingReactions.length&&(r.addReactions=this._pendingReactions,this._pendingReactions=[]),this._resolveSignal&&(r.resolve=this._resolveSignal,this._resolveSignal=null);let i=await this._post(r);if(!i)throw new Error("Agent reply did not return a message handle");return new Ws(i.messageId,i.platformThreadId,this._conversationId,this._integrationIdentifier,this._poster)}resolve(n){this._resolveSignal={summary:n}}trigger(n,t){this._signals.push({...t,type:"trigger",workflowId:n})}addReaction(n,t){this._pendingReactions.push({messageId:n,emojiName:t})}async flush(){if(!this._signals.length&&!this._resolveSignal&&!this._pendingReactions.length)return;let n={conversationId:this._conversationId,integrationIdentifier:this._integrationIdentifier};this._signals.length&&(n.signals=this._signals,this._signals=[]),this._pendingReactions.length&&(n.addReactions=this._pendingReactions,this._pendingReactions=[]),this._resolveSignal&&(n.resolve=this._resolveSignal,this._resolveSignal=null),await this._post(n)}async _post(n){let t=await fetch(this._replyUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${this._secretKey}`},body:JSON.stringify(n)});if(!t.ok){let i=await t.text().catch(()=>"");throw new hn(t.status,i)}let r=await t.text().catch(()=>"");if(!r)return null;try{let i=JSON.parse(r),o=i&&typeof i=="object"&&"data"in i?i.data:i;if(o&&typeof o.messageId=="string"&&typeof o.platformThreadId=="string")return{messageId:o.messageId,platformThreadId:o.platformThreadId}}catch{}return null}};function Hs(e,n){if(!e)throw new Error("agent() requires a non-empty agentId");if(!(n!=null&&n.onMessage))throw new Error(`agent('${e}') requires an onMessage handler`);return{id:e,handlers:n}}var nr=(i=>(i.ON_MESSAGE="onMessage",i.ON_ACTION="onAction",i.ON_RESOLVE="onResolve",i.ON_REACTION="onReaction",i))(nr||{});var ga=class{constructor(n){this.handler=n.handler,this.client=n.client?n.client:new Yn,this.workflows=n.workflows||[],this.agents=n.agents||[],this.http=vi(this.client.secretKey,this.client.apiUrl),this.frameworkName=n.frameworkName,this.hmacEnabled=this.client.strictAuthentication,this.client.addAgents(this.agents)}createHandler(){return async(...n)=>{await this.client.addWorkflows(this.workflows);let t=await this.handler(...n),r=await this.handleAction({actions:t});return t.transformResponse(r)}}getStaticHeaders(){let n=`novu-framework:v${this.client.version}`;return{"content-type":"application/json","access-control-allow-origin":"*","access-control-allow-private-network":"true","access-control-allow-methods":"GET, POST","access-control-allow-headers":"*","access-control-max-age":"604800","novu-framework-version":"2024-06-26","novu-framework-sdk":"2.10.1-alpha.6","novu-framework-server":this.frameworkName,"user-agent":n}}createResponse(n,t){return{status:n,body:JSON.stringify(t),headers:{...this.getStaticHeaders()}}}createError(n){return{status:n.statusCode,body:JSON.stringify({message:n.message,data:n.data,code:n.code}),headers:this.getStaticHeaders()}}async handleAction({actions:n}){let t=await n.url(),r=await n.method(),i=t.searchParams.get("action")||"health-check",o=t.searchParams.get("workflowId")||"",a=t.searchParams.get("stepId")||"",s=t.searchParams.get("agentId")||"",u=t.searchParams.get("event")||"",p=await n.headers("novu-signature")||"",d={};try{r==="POST"&&(d=await n.body())}catch{}try{i!=="health-check"&&await this.validateHmac(d,p);let h=this.getPostActionMap(d,o,a,i,s,u,n.waitUntil),y=this.getGetActionMap(o,a);if(r==="POST")return await this.handlePostAction(i,h);if(r==="GET")return await this.handleGetAction(i,y);if(r==="OPTIONS")return this.createResponse(200,{})}catch(h){return this.handleError(h)}return this.createError(new pi(r))}getPostActionMap(n,t,r,i,o,a,s){return{trigger:this.triggerAction({workflowId:t,...n}),execute:async()=>{let u=await this.client.executeWorkflow({...n,workflowId:t,stepId:r,action:i});return this.createResponse(200,u)},preview:async()=>{let u=await this.client.executeWorkflow({...n,workflowId:t,stepId:r,action:i});return this.createResponse(200,u)},"agent-event":async()=>{let u=this.client.getAgent(o);if(!u)return this.createResponse(404,{error:`Agent '${o}' not registered`});let p=new $r(n,this.client.secretKey),d=this.runAgentHandler(u,a,p).catch(h=>{h instanceof hn?console.error(`[agent:${o}] ${h.message}`):console.error(`[agent:${o}] Handler error:`,h)});return s&&s(d),this.createResponse(200,{status:"ack"})}}}triggerAction(n){return async()=>{let t={name:n.workflowId,to:n.to,payload:(n==null?void 0:n.payload)||{},transactionId:n.transactionId,overrides:n.overrides||{},...n.actor&&{actor:n.actor},...n.bridgeUrl&&{bridgeUrl:n.bridgeUrl},...n.controls&&{controls:n.controls},...n.context&&{context:n.context}},r=await this.http.post("/events/trigger",t);return this.createResponse(200,r)}}getGetActionMap(n,t){return{discover:async()=>{let r=await this.client.discover();return this.createResponse(200,r)},"health-check":async()=>{let r=await this.client.healthCheck();return this.createResponse(200,r)},code:async()=>{let r=await this.client.getCode(n,t);return this.createResponse(200,r)}}}async handlePostAction(n,t){if(Object.values(gr).includes(n)){let r=t[n];return r()}else throw new Vn(n,gr)}async handleGetAction(n,t){if(Object.values(Qr).includes(n)){let r=t[n];return r()}else throw new Vn(n,Qr)}async runAgentHandler(n,t,r){let i=async o=>{o!=null&&await r.reply(o)};switch(t){case"onMessage":await i(await n.handlers.onMessage({message:r.message,ctx:r}));break;case"onAction":n.handlers.onAction&&await i(await n.handlers.onAction({actionId:r.action.actionId,value:r.action.value,ctx:r}));break;case"onReaction":n.handlers.onReaction&&await i(await n.handlers.onReaction({reaction:r.reaction,ctx:r}));break;case"onResolve":n.handlers.onResolve&&await i(await n.handlers.onResolve({ctx:r}));break;default:throw new Vn(t,nr)}await r.flush()}handleError(n){if(On(n))return n.statusCode>=500&&console.error(n),this.createError(n);if(Jl(n))return this.createError(n);{let t=new zn(n);return console.error(t),this.createError(t)}}async validateHmac(n,t){if(!this.hmacEnabled)return;if(!t)throw new yi;if(!this.client.secretKey)throw new Si;let[r,i]=t.split(",");if(!r||!i)throw new bi;let[o,a]=r.split("="),[s,u]=i.split("=");if(Number(o)<Date.now()-1500)throw new wi;if(!(await rc(this.client.secretKey,`${a}.${JSON.stringify(n)}`)===u))throw new gi}};var ue={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var db={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},Pp={output:db};var Mp={"chat-webhook":ue,discord:ue,getstream:ue,"grafana-on-call":ue,mattermost:ue,msteams:ue,"rocket-chat":ue,ryver:ue,slack:Pp,"whatsapp-business":ue,zulip:ue};var hb={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},Np={output:hb};var qn={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},fb={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},mb={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},gb={type:"object",properties:{from:qn,sender:qn,to:{type:"array",items:qn},cc:{type:"array",items:qn},bcc:{type:"array",items:qn},replyTo:qn,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:qn,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:fb},inlineAttachments:{type:"array",items:mb},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},Lp={output:gb};var Vt={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},ya={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},yb={type:"object",properties:{from:{anyOf:[{type:"string"},Vt]},sender:{anyOf:[{type:"string"},Vt]},to:{anyOf:[{type:"string"},Vt,{type:"array",items:Vt}]},cc:{anyOf:[{type:"string"},Vt,{type:"array",items:Vt}]},bcc:{anyOf:[{type:"string"},Vt,{type:"array",items:Vt}]},replyTo:{anyOf:[{type:"string"},Vt,{type:"array",items:Vt}]},inReplyTo:{anyOf:[{type:"string"},Vt]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},ya]},html:{anyOf:[{type:"string"},ya]},watchHtml:{anyOf:[{type:"string"},ya]},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"},ya]}}}]},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},Dp={output:yb};var bb={type:"object",properties:{},required:[],additionalProperties:!1},Fp={output:bb};var wb={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},Up={output:wb};var $p={braze:ue,clickatell:ue,nodemailer:Dp,emailjs:ue,"email-webhook":ue,"infobip-email":ue,mailersend:ue,mailgun:Np,mailjet:Lp,mailtrap:ue,mandrill:ue,netcore:ue,"novu-email":Fp,outlook365:ue,plunk:ue,postmark:ue,resend:ue,sendgrid:Up,sendinblue:ue,ses:ue,sparkpost:ue};var Sb={type:"object",properties:{},required:[],additionalProperties:!1},qp={output:Sb};var jp={novu:qp};var Bp={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},xb={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:
|
|
152
152
|
|
|
153
153
|
10 - The push notification is sent to the device immediately. (Default)
|
|
154
154
|
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.
|
|
@@ -558,4 +558,4 @@ Examples: All examples are the exact same date & time.
|
|
|
558
558
|
"Sept 24 2015 14:00:00 GMT-0700"
|
|
559
559
|
"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)"
|
|
560
560
|
Note: SMS currently only supports sendAfter parameter.
|
|
561
|
-
`,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},Hp={output:vb};var Yp={apns:zp,expo:Vp,fcm:Wp,"one-signal":Hp,"pusher-beams":ue,pushpad:ue,"push-webhook":ue,appio:ue};var Eb={type:"object",properties:{},required:[],additionalProperties:!1},Jp={output:Eb};var Ab={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},Gp={output:Ab};var Kp={"africas-talking":ue,"azure-sms":ue,bandwidth:ue,"brevo-sms":ue,"bulk-sms":ue,"burst-sms":ue,clickatell:ue,clicksend:ue,"eazy-sms":ue,firetext:ue,"forty-six-elks":ue,"generic-sms":ue,gupshup:ue,"infobip-sms":ue,"isend-sms":ue,kannel:ue,maqsam:ue,messagebird:ue,mobishastra:ue,nexmo:ue,"novu-sms":Jp,plivo:ue,"ring-central":ue,sendchamp:ue,simpletexting:ue,sms77:ue,"sms-central":ue,smsmode:ue,sns:ue,telnyx:ue,termii:ue,twilio:Gp,"afro-message":ue,unifonic:ue,imedia:ue,sinch:ue,"isendpro-sms":ue};var ba={chat:Mp,sms:Kp,email:$p,push:Yp,in_app:jp};var Ob={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},_b={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Rb={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},Ib={oneOf:[Ob,_b,Rb]},Cb={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},wa={output:Ib,result:Cb};var Pb={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},Mb={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Nb={oneOf:[Pb,Mb]},Lb={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},Sa={output:Nb,result:Lb};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 Db={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Fb={type:"object",properties:{},required:[],additionalProperties:!1},Xp={output:Db,result:Fb};var Ub={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"},from:{type:"object",properties:{email:{type:"string"},name:{type:"string"}},additionalProperties:!1}},required:["subject","body"],additionalProperties:!1},$b={type:"object",properties:{},required:[],additionalProperties:!1},Qp={output:Ub,result:$b};var qb="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",ed={type:"object",properties:{url:{type:"string",pattern:qb},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},Zp={type:"object",properties:{label:{type:"string"},redirect:ed},required:["label"],additionalProperties:!1},jb={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:Zp,secondaryAction:Zp,data:{type:"object",additionalProperties:!0},redirect:ed},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Bb={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},td={output:jb,result:Bb};var zb={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},Vb={type:"object",properties:{},required:[],additionalProperties:!1},nd={output:zb,result:Vb};var Wb={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Hb={type:"object",properties:{},required:[],additionalProperties:!1},rd={output:Wb,result:Hb};var Wt={chat:Xp,sms:rd,push:nd,email:Qp,in_app:td};var _t={type:"object",properties:{},required:[],additionalProperties:!1};var Ta=(i=>(i.NONE="none",i.LOW="low",i.MEDIUM="medium",i.HIGH="high",i))(Ta||{});async function rr(e,n,t){if(e.steps.some(r=>r.stepId===n))throw new Ti(n);e.steps.push(t)}async function ka(e,n,t,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||_t;return await rr(e,i,{stepId:i,type:n,controls:{schema:await ft(s),unknownSchema:s},outputs:{schema:await ft(t),unknownSchema:t},results:{schema:await ft(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function id(e,n,t){let r=ba[n],i=Object.entries(t).map(async([o,a])=>{let s=r[o];return{type:o,code:a.toString(),resolve:a,outputs:{schema:await ft(s.output),unknownSchema:s.output}}});e.providers.push(...await Promise.all(i))}async function ir(e,n,t,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||_t,u={stepId:i,type:n,controls:{schema:await ft(s),unknownSchema:s},outputs:{schema:await ft(t),unknownSchema:t},results:{schema:await ft(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]};return await rr(e,i,u),Object.keys(a.providers||{}).length>0&&await id(u,n,a.providers||{}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Ys(e,n){return async(t,r,i={})=>{let o=(i==null?void 0:i.controlSchema)||_t,a=(i==null?void 0:i.outputSchema)||_t,[s,u]=await Promise.all([ft(o),ft(a)]);return await rr(e,t,{stepId:t,type:n,controls:{schema:s,unknownSchema:o},outputs:{schema:u,unknownSchema:a},results:{schema:u,unknownSchema:a},resolve:r,code:r.toString(),options:i,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}var Yb={email:"email",sms:"sms",push:"push",inApp:"in_app",chat:"chat"};function ad(e){if(!e)return{};let n={};return e.all&&(n.all=e.all),Object.entries(e.channels||{}).forEach(([t,r])=>{let i=Yb[t];i&&(n.channels||(n.channels={}),n.channels[i]=r)}),n}function od(e,n,t){let r=t||{};return{id:e,trigger:async a=>{let s=vi(Oi(a.secretKey),Ai(a.apiUrl)),u=a.payload||{},p;if(r.payloadSchema){let P=await vr(r.payloadSchema,u);if(P.success===!1)throw new ci(e,P.errors);p=P.data}else p=a.payload;let d=await ic(),h={name:e,to:a.to,payload:{...p},...a.transactionId&&{transactionId:a.transactionId},...a.overrides&&{overrides:a.overrides},...a.actor&&{actor:a.actor},...a.context&&{context:a.context},...d&&{bridgeUrl:d}},y=await s.post("/events/trigger",h);return{cancel:async()=>s.delete(`/events/trigger/${y.transactionId}`),data:y}},discover:async()=>{var s;let a={workflowId:e,severity:(s=r.severity)!=null?s:"none",steps:[],code:n.toString(),payload:{schema:await ft(r.payloadSchema||_t),unknownSchema:r.payloadSchema||_t},controls:{schema:await ft(r.controlSchema||_t),unknownSchema:r.controlSchema||_t},env:{schema:await ft(r.envSchema||_t),unknownSchema:r.envSchema||_t},tags:r.tags||[],preferences:ad(r.preferences),name:r.name,description:r.description,execute:n};return await n({payload:{},subscriber:{},env:{},controls:{},context:{},step:{push:await ir(a,"push",Wt.push.output,Wt.push.result),chat:await ir(a,"chat",Wt.chat.output,Wt.chat.result),email:await ir(a,"email",Wt.email.output,Wt.email.result),sms:await ir(a,"sms",Wt.sms.output,Wt.sms.result),inApp:await ir(a,"in_app",Wt.in_app.output,Wt.in_app.result),digest:await ka(a,"digest",Sa.output,Sa.result),delay:await ka(a,"delay",wa.output,wa.result),throttle:await ka(a,"throttle",xa.output,xa.result),custom:await Ys(a,"custom"),httpRequest:await Ys(a,"http_request")}}),a}}}function Jb(e,n,t){return{type:"email",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Gb(e,n,t){return{type:"sms",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Kb(e,n,t){return{type:"chat",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Xb(e,n,t){return{type:"push",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Qb(e,n,t){return{type:"in_app",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Zb(e,n,t){return{type:"delay",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}function ew(e,n,t){return{type:"digest",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}function tw(e,n,t){return{type:"throttle",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}var sd={email:Jb,sms:Gb,chat:Kb,push:Xb,inApp:Qb,delay:Zb,digest:ew,throttle:tw};0&&(module.exports={Actions,AgentDeliveryError,AgentEventEnum,Button,Card,CardLink,CardText,Client,CronExpression,Divider,NovuRequestHandler,Select,SelectOption,SeverityLevelEnum,TextInput,agent,providerSchemas,step,workflow});
|
|
561
|
+
`,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},Hp={output:vb};var Yp={apns:zp,expo:Vp,fcm:Wp,"one-signal":Hp,"pusher-beams":ue,pushpad:ue,"push-webhook":ue,appio:ue};var Ab={type:"object",properties:{},required:[],additionalProperties:!1},Jp={output:Ab};var Eb={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},Gp={output:Eb};var Kp={"africas-talking":ue,"azure-sms":ue,bandwidth:ue,"brevo-sms":ue,"bulk-sms":ue,"burst-sms":ue,clickatell:ue,clicksend:ue,"eazy-sms":ue,firetext:ue,"forty-six-elks":ue,"generic-sms":ue,gupshup:ue,"infobip-sms":ue,"isend-sms":ue,kannel:ue,maqsam:ue,messagebird:ue,mobishastra:ue,nexmo:ue,"novu-sms":Jp,plivo:ue,"ring-central":ue,sendchamp:ue,simpletexting:ue,sms77:ue,"sms-central":ue,smsmode:ue,sns:ue,telnyx:ue,termii:ue,twilio:Gp,"afro-message":ue,unifonic:ue,imedia:ue,sinch:ue,"isendpro-sms":ue};var ba={chat:Mp,sms:Kp,email:$p,push:Yp,in_app:jp};var _b={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},Ob={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Rb={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},Ib={oneOf:[_b,Ob,Rb]},Cb={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},wa={output:Ib,result:Cb};var Pb={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},Mb={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Nb={oneOf:[Pb,Mb]},Lb={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},Sa={output:Nb,result:Lb};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 Db={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Fb={type:"object",properties:{},required:[],additionalProperties:!1},Xp={output:Db,result:Fb};var Ub={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"},from:{type:"object",properties:{email:{type:"string"},name:{type:"string"}},additionalProperties:!1}},required:["subject","body"],additionalProperties:!1},$b={type:"object",properties:{},required:[],additionalProperties:!1},Qp={output:Ub,result:$b};var qb="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",ed={type:"object",properties:{url:{type:"string",pattern:qb},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},Zp={type:"object",properties:{label:{type:"string"},redirect:ed},required:["label"],additionalProperties:!1},jb={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:Zp,secondaryAction:Zp,data:{type:"object",additionalProperties:!0},redirect:ed},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Bb={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},td={output:jb,result:Bb};var zb={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},Vb={type:"object",properties:{},required:[],additionalProperties:!1},nd={output:zb,result:Vb};var Wb={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Hb={type:"object",properties:{},required:[],additionalProperties:!1},rd={output:Wb,result:Hb};var Wt={chat:Xp,sms:rd,push:nd,email:Qp,in_app:td};var Ot={type:"object",properties:{},required:[],additionalProperties:!1};var Ta=(i=>(i.NONE="none",i.LOW="low",i.MEDIUM="medium",i.HIGH="high",i))(Ta||{});async function rr(e,n,t){if(e.steps.some(r=>r.stepId===n))throw new Ti(n);e.steps.push(t)}async function ka(e,n,t,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Ot;return await rr(e,i,{stepId:i,type:n,controls:{schema:await ft(s),unknownSchema:s},outputs:{schema:await ft(t),unknownSchema:t},results:{schema:await ft(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function id(e,n,t){let r=ba[n],i=Object.entries(t).map(async([o,a])=>{let s=r[o];return{type:o,code:a.toString(),resolve:a,outputs:{schema:await ft(s.output),unknownSchema:s.output}}});e.providers.push(...await Promise.all(i))}async function ir(e,n,t,r){return async(i,o,a={})=>{let s=(a==null?void 0:a.controlSchema)||Ot,u={stepId:i,type:n,controls:{schema:await ft(s),unknownSchema:s},outputs:{schema:await ft(t),unknownSchema:t},results:{schema:await ft(r),unknownSchema:r},resolve:o,code:o.toString(),options:a,providers:[]};return await rr(e,i,u),Object.keys(a.providers||{}).length>0&&await id(u,n,a.providers||{}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Ys(e,n){return async(t,r,i={})=>{let o=(i==null?void 0:i.controlSchema)||Ot,a=(i==null?void 0:i.outputSchema)||Ot,[s,u]=await Promise.all([ft(o),ft(a)]);return await rr(e,t,{stepId:t,type:n,controls:{schema:s,unknownSchema:o},outputs:{schema:u,unknownSchema:a},results:{schema:u,unknownSchema:a},resolve:r,code:r.toString(),options:i,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}var Yb={email:"email",sms:"sms",push:"push",inApp:"in_app",chat:"chat"};function ad(e){if(!e)return{};let n={};return e.all&&(n.all=e.all),Object.entries(e.channels||{}).forEach(([t,r])=>{let i=Yb[t];i&&(n.channels||(n.channels={}),n.channels[i]=r)}),n}function od(e,n,t){let r=t||{};return{id:e,trigger:async a=>{let s=vi(_i(a.secretKey),Ei(a.apiUrl)),u=a.payload||{},p;if(r.payloadSchema){let P=await vr(r.payloadSchema,u);if(P.success===!1)throw new ci(e,P.errors);p=P.data}else p=a.payload;let d=await ic(),h={name:e,to:a.to,payload:{...p},...a.transactionId&&{transactionId:a.transactionId},...a.overrides&&{overrides:a.overrides},...a.actor&&{actor:a.actor},...a.context&&{context:a.context},...d&&{bridgeUrl:d}},y=await s.post("/events/trigger",h);return{cancel:async()=>s.delete(`/events/trigger/${y.transactionId}`),data:y}},discover:async()=>{var s;let a={workflowId:e,severity:(s=r.severity)!=null?s:"none",steps:[],code:n.toString(),payload:{schema:await ft(r.payloadSchema||Ot),unknownSchema:r.payloadSchema||Ot},controls:{schema:await ft(r.controlSchema||Ot),unknownSchema:r.controlSchema||Ot},env:{schema:await ft(r.envSchema||Ot),unknownSchema:r.envSchema||Ot},tags:r.tags||[],preferences:ad(r.preferences),name:r.name,description:r.description,execute:n};return await n({payload:{},subscriber:{},env:{},controls:{},context:{},step:{push:await ir(a,"push",Wt.push.output,Wt.push.result),chat:await ir(a,"chat",Wt.chat.output,Wt.chat.result),email:await ir(a,"email",Wt.email.output,Wt.email.result),sms:await ir(a,"sms",Wt.sms.output,Wt.sms.result),inApp:await ir(a,"in_app",Wt.in_app.output,Wt.in_app.result),digest:await ka(a,"digest",Sa.output,Sa.result),delay:await ka(a,"delay",wa.output,wa.result),throttle:await ka(a,"throttle",xa.output,xa.result),custom:await Ys(a,"custom"),httpRequest:await Ys(a,"http_request")}}),a}}}function Jb(e,n,t){return{type:"email",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Gb(e,n,t){return{type:"sms",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Kb(e,n,t){return{type:"chat",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Xb(e,n,t){return{type:"push",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Qb(e,n,t){return{type:"in_app",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip,providers:t==null?void 0:t.providers,disableOutputSanitization:t==null?void 0:t.disableOutputSanitization}}function Zb(e,n,t){return{type:"delay",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}function ew(e,n,t){return{type:"digest",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}function tw(e,n,t){return{type:"throttle",stepId:e,resolve:n,controlSchema:t==null?void 0:t.controlSchema,payloadSchema:t==null?void 0:t.payloadSchema,envSchema:t==null?void 0:t.envSchema,skip:t==null?void 0:t.skip}}var sd={email:Jb,sms:Gb,chat:Kb,push:Xb,inApp:Qb,delay:Zb,digest:ew,throttle:tw};0&&(module.exports={Actions,AgentDeliveryError,AgentEventEnum,Button,Card,CardLink,CardText,Client,CronExpression,Divider,NovuRequestHandler,Select,SelectOption,SeverityLevelEnum,TextInput,agent,providerSchemas,step,workflow});
|