@podlite/markdown 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +31 -5
- package/index.js +1 -1
- package/jest.config.js +0 -1
- package/jest.tsconfig.json +1 -1
- package/lib/index.cjs +40 -0
- package/lib/index.cjs.map +7 -0
- package/lib/index.esm.js +31184 -0
- package/lib/index.esm.js.map +7 -0
- package/package.json +13 -12
- package/scripts/build.ts +6 -6
- package/scripts/build_esm.ts +12 -9
- package/src/index.tsx +21 -24
- package/src/tools.ts +180 -135
- package/t/parse.test.ts +120 -123
- package/t/plugin.test.tsx +48 -57
- package/tsconfig-esm.json +6 -0
- package/tsconfig.json +2 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/esm/index.d.ts +0 -6
- package/esm/index.js +0 -39
- package/esm/index.js.map +0 -7
- package/esm/tools.d.ts +0 -6
- package/lib/index.js +0 -40
- package/lib/index.js.map +0 -7
package/esm/index.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var _h=Object.create;var ss=Object.defineProperty;var Ch=Object.getOwnPropertyDescriptor;var Eh=Object.getOwnPropertyNames;var Ah=Object.getPrototypeOf,Sh=Object.prototype.hasOwnProperty;var Ph=(t,r)=>()=>(t&&(r=t(t=0)),r);var fe=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),mf=(t,r)=>{for(var e in r)ss(t,e,{get:r[e],enumerable:!0})},hf=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Eh(r))!Sh.call(t,i)&&i!==e&&ss(t,i,{get:()=>r[i],enumerable:!(n=Ch(r,i))||n.enumerable});return t};var Rn=(t,r,e)=>(e=t!=null?_h(Ah(t)):{},hf(r||!t||!t.__esModule?ss(e,"default",{value:t,enumerable:!0}):e,t)),Ih=t=>hf(ss({},"__esModule",{value:!0}),t);var Ca=fe(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.getRules=Li.isJSONType=void 0;var Fh=["string","number","integer","boolean","null","object","array"],Th=new Set(Fh);function Oh(t){return typeof t=="string"&&Th.has(t)}Li.isJSONType=Oh;function Nh(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Li.getRules=Nh});var Ea=fe(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.shouldUseRule=Dn.shouldUseGroup=Dn.schemaHasRulesForType=void 0;function Rh({schema:t,self:r},e){let n=r.RULES.types[e];return n&&n!==!0&&gf(t,n)}Dn.schemaHasRulesForType=Rh;function gf(t,r){return r.rules.some(e=>yf(t,e))}Dn.shouldUseGroup=gf;function yf(t,r){var e;return t[r.keyword]!==void 0||((e=r.definition.implements)===null||e===void 0?void 0:e.some(n=>t[n]!==void 0))}Dn.shouldUseRule=yf});var as=fe(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getProperty=Qe.safeStringify=Qe.stringify=Qe.strConcat=Qe.addCodeArg=Qe.str=Qe._=Qe.nil=Qe._Code=Qe.Name=Qe.IDENTIFIER=Qe._CodeOrName=void 0;var mo=class{};Qe._CodeOrName=mo;Qe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ii=class extends mo{constructor(r){if(super(),!Qe.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Qe.Name=ii;var ln=class extends mo{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((e,n)=>`${e}${n}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((e,n)=>(n instanceof ii&&(e[n.str]=(e[n.str]||0)+1),e),{})}};Qe._Code=ln;Qe.nil=new ln("");function $f(t,...r){let e=[t[0]],n=0;for(;n<r.length;)Sa(e,r[n]),e.push(t[++n]);return new ln(e)}Qe._=$f;var Aa=new ln("+");function bf(t,...r){let e=[ho(t[0])],n=0;for(;n<r.length;)e.push(Aa),Sa(e,r[n]),e.push(Aa,ho(t[++n]));return Dh(e),new ln(e)}Qe.str=bf;function Sa(t,r){r instanceof ln?t.push(...r._items):r instanceof ii?t.push(r):t.push(qh(r))}Qe.addCodeArg=Sa;function Dh(t){let r=1;for(;r<t.length-1;){if(t[r]===Aa){let e=Lh(t[r-1],t[r+1]);if(e!==void 0){t.splice(r-1,3,e);continue}t[r++]="+"}r++}}function Lh(t,r){if(r==='""')return t;if(t==='""')return r;if(typeof t=="string")return r instanceof ii||t[t.length-1]!=='"'?void 0:typeof r!="string"?`${t.slice(0,-1)}${r}"`:r[0]==='"'?t.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(t instanceof ii))return`"${t}${r.slice(1)}`}function jh(t,r){return r.emptyStr()?t:t.emptyStr()?r:bf`${t}${r}`}Qe.strConcat=jh;function qh(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:ho(Array.isArray(t)?t.join(","):t)}function Bh(t){return new ln(ho(t))}Qe.stringify=Bh;function ho(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Qe.safeStringify=ho;function Mh(t){return typeof t=="string"&&Qe.IDENTIFIER.test(t)?new ln(`.${t}`):$f`[${t}]`}Qe.getProperty=Mh});var Ta=fe(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.ValueScope=or.ValueScopeName=or.Scope=or.varKinds=or.UsedValueState=void 0;var mr=as(),Pa=class extends Error{constructor(r){super(`CodeGen: "code" for ${r} not defined`),this.value=r.value}},Ia;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ia=or.UsedValueState||(or.UsedValueState={}));or.varKinds={const:new mr.Name("const"),let:new mr.Name("let"),var:new mr.Name("var")};var ls=class{constructor({prefixes:r,parent:e}={}){this._names={},this._prefixes=r,this._parent=e}toName(r){return r instanceof mr.Name?r:this.name(r)}name(r){return new mr.Name(this._newName(r))}_newName(r){let e=this._names[r]||this._nameGroup(r);return`${r}${e.index++}`}_nameGroup(r){var e,n;if(((n=(e=this._parent)===null||e===void 0?void 0:e._prefixes)===null||n===void 0?void 0:n.has(r))||this._prefixes&&!this._prefixes.has(r))throw new Error(`CodeGen: prefix "${r}" is not allowed in this scope`);return this._names[r]={prefix:r,index:0}}};or.Scope=ls;var us=class extends mr.Name{constructor(r,e){super(e),this.prefix=r}setValue(r,{property:e,itemIndex:n}){this.value=r,this.scopePath=mr._`.${new mr.Name(e)}[${n}]`}};or.ValueScopeName=us;var zh=mr._`\n`,Fa=class extends ls{constructor(r){super(r),this._values={},this._scope=r.scope,this.opts={...r,_n:r.lines?zh:mr.nil}}get(){return this._scope}name(r){return new us(r,this._newName(r))}value(r,e){var n;if(e.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(r),{prefix:o}=i,a=(n=e.key)!==null&&n!==void 0?n:e.ref,u=this._values[o];if(u){let p=u.get(a);if(p)return p}else u=this._values[o]=new Map;u.set(a,i);let f=this._scope[o]||(this._scope[o]=[]),m=f.length;return f[m]=e.ref,i.setValue(e,{property:o,itemIndex:m}),i}getValue(r,e){let n=this._values[r];if(!!n)return n.get(e)}scopeRefs(r,e=this._values){return this._reduceValues(e,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return mr._`${r}${n.scopePath}`})}scopeCode(r=this._values,e,n){return this._reduceValues(r,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},e,n)}_reduceValues(r,e,n={},i){let o=mr.nil;for(let a in r){let u=r[a];if(!u)continue;let f=n[a]=n[a]||new Map;u.forEach(m=>{if(f.has(m))return;f.set(m,Ia.Started);let p=e(m);if(p){let $=this.opts.es5?or.varKinds.var:or.varKinds.const;o=mr._`${o}${$} ${m} = ${p};${this.opts._n}`}else if(p=i==null?void 0:i(m))o=mr._`${o}${p}${this.opts._n}`;else throw new Pa(m);f.set(m,Ia.Completed)})}return o}};or.ValueScope=Fa});var Pe=fe(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.or=Ie.and=Ie.not=Ie.CodeGen=Ie.operators=Ie.varKinds=Ie.ValueScopeName=Ie.ValueScope=Ie.Scope=Ie.Name=Ie.stringify=Ie.getProperty=Ie.nil=Ie.strConcat=Ie.str=Ie._=void 0;var Re=as(),Hr=Ta(),ai=as();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return ai._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return ai.str}});Object.defineProperty(Ie,"strConcat",{enumerable:!0,get:function(){return ai.strConcat}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return ai.nil}});Object.defineProperty(Ie,"getProperty",{enumerable:!0,get:function(){return ai.getProperty}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return ai.stringify}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return ai.Name}});var ds=Ta();Object.defineProperty(Ie,"Scope",{enumerable:!0,get:function(){return ds.Scope}});Object.defineProperty(Ie,"ValueScope",{enumerable:!0,get:function(){return ds.ValueScope}});Object.defineProperty(Ie,"ValueScopeName",{enumerable:!0,get:function(){return ds.ValueScopeName}});Object.defineProperty(Ie,"varKinds",{enumerable:!0,get:function(){return ds.varKinds}});Ie.operators={GT:new Re._Code(">"),GTE:new Re._Code(">="),LT:new Re._Code("<"),LTE:new Re._Code("<="),EQ:new Re._Code("==="),NEQ:new Re._Code("!=="),NOT:new Re._Code("!"),OR:new Re._Code("||"),AND:new Re._Code("&&"),ADD:new Re._Code("+")};var _n=class{optimizeNodes(){return this}optimizeNames(r,e){return this}},Oa=class extends _n{constructor(r,e,n){super(),this.varKind=r,this.name=e,this.rhs=n}render({es5:r,_n:e}){let n=r?Hr.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+e}optimizeNames(r,e){if(!!r[this.name.str])return this.rhs&&(this.rhs=qi(this.rhs,r,e)),this}get names(){return this.rhs instanceof Re._CodeOrName?this.rhs.names:{}}},fs=class extends _n{constructor(r,e,n){super(),this.lhs=r,this.rhs=e,this.sideEffects=n}render({_n:r}){return`${this.lhs} = ${this.rhs};`+r}optimizeNames(r,e){if(!(this.lhs instanceof Re.Name&&!r[this.lhs.str]&&!this.sideEffects))return this.rhs=qi(this.rhs,r,e),this}get names(){let r=this.lhs instanceof Re.Name?{}:{...this.lhs.names};return ps(r,this.rhs)}},Na=class extends fs{constructor(r,e,n,i){super(r,n,i),this.op=e}render({_n:r}){return`${this.lhs} ${this.op}= ${this.rhs};`+r}},Ra=class extends _n{constructor(r){super(),this.label=r,this.names={}}render({_n:r}){return`${this.label}:`+r}},Da=class extends _n{constructor(r){super(),this.label=r,this.names={}}render({_n:r}){return`break${this.label?` ${this.label}`:""};`+r}},La=class extends _n{constructor(r){super(),this.error=r}render({_n:r}){return`throw ${this.error};`+r}get names(){return this.error.names}},ja=class extends _n{constructor(r){super(),this.code=r}render({_n:r}){return`${this.code};`+r}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(r,e){return this.code=qi(this.code,r,e),this}get names(){return this.code instanceof Re._CodeOrName?this.code.names:{}}},go=class extends _n{constructor(r=[]){super(),this.nodes=r}render(r){return this.nodes.reduce((e,n)=>e+n.render(r),"")}optimizeNodes(){let{nodes:r}=this,e=r.length;for(;e--;){let n=r[e].optimizeNodes();Array.isArray(n)?r.splice(e,1,...n):n?r[e]=n:r.splice(e,1)}return r.length>0?this:void 0}optimizeNames(r,e){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(r,e)||(Vh(r,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((r,e)=>si(r,e.names),{})}},Cn=class extends go{render(r){return"{"+r._n+super.render(r)+"}"+r._n}},qa=class extends go{},ji=class extends Cn{};ji.kind="else";var Kr=class extends Cn{constructor(r,e){super(e),this.condition=r}render(r){let e=`if(${this.condition})`+super.render(r);return this.else&&(e+="else "+this.else.render(r)),e}optimizeNodes(){super.optimizeNodes();let r=this.condition;if(r===!0)return this.nodes;let e=this.else;if(e){let n=e.optimizeNodes();e=this.else=Array.isArray(n)?new ji(n):n}if(e)return r===!1?e instanceof Kr?e:e.nodes:this.nodes.length?this:new Kr(vf(r),e instanceof Kr?[e]:e.nodes);if(!(r===!1||!this.nodes.length))return this}optimizeNames(r,e){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(r,e),!!(super.optimizeNames(r,e)||this.else))return this.condition=qi(this.condition,r,e),this}get names(){let r=super.names;return ps(r,this.condition),this.else&&si(r,this.else.names),r}};Kr.kind="if";var oi=class extends Cn{};oi.kind="for";var Ba=class extends oi{constructor(r){super(),this.iteration=r}render(r){return`for(${this.iteration})`+super.render(r)}optimizeNames(r,e){if(!!super.optimizeNames(r,e))return this.iteration=qi(this.iteration,r,e),this}get names(){return si(super.names,this.iteration.names)}},Ma=class extends oi{constructor(r,e,n,i){super(),this.varKind=r,this.name=e,this.from=n,this.to=i}render(r){let e=r.es5?Hr.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${e} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(r)}get names(){let r=ps(super.names,this.from);return ps(r,this.to)}},cs=class extends oi{constructor(r,e,n,i){super(),this.loop=r,this.varKind=e,this.name=n,this.iterable=i}render(r){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(r)}optimizeNames(r,e){if(!!super.optimizeNames(r,e))return this.iterable=qi(this.iterable,r,e),this}get names(){return si(super.names,this.iterable.names)}},yo=class extends Cn{constructor(r,e,n){super(),this.name=r,this.args=e,this.async=n}render(r){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(r)}};yo.kind="func";var $o=class extends go{render(r){return"return "+super.render(r)}};$o.kind="return";var za=class extends Cn{render(r){let e="try"+super.render(r);return this.catch&&(e+=this.catch.render(r)),this.finally&&(e+=this.finally.render(r)),e}optimizeNodes(){var r,e;return super.optimizeNodes(),(r=this.catch)===null||r===void 0||r.optimizeNodes(),(e=this.finally)===null||e===void 0||e.optimizeNodes(),this}optimizeNames(r,e){var n,i;return super.optimizeNames(r,e),(n=this.catch)===null||n===void 0||n.optimizeNames(r,e),(i=this.finally)===null||i===void 0||i.optimizeNames(r,e),this}get names(){let r=super.names;return this.catch&&si(r,this.catch.names),this.finally&&si(r,this.finally.names),r}},bo=class extends Cn{constructor(r){super(),this.error=r}render(r){return`catch(${this.error})`+super.render(r)}};bo.kind="catch";var vo=class extends Cn{render(r){return"finally"+super.render(r)}};vo.kind="finally";var Va=class{constructor(r,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?`
|
|
2
|
-
`:""},this._extScope=r,this._scope=new Hr.Scope({parent:r}),this._nodes=[new qa]}toString(){return this._root.render(this.opts)}name(r){return this._scope.name(r)}scopeName(r){return this._extScope.name(r)}scopeValue(r,e){let n=this._extScope.value(r,e);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(r,e){return this._extScope.getValue(r,e)}scopeRefs(r){return this._extScope.scopeRefs(r,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(r,e,n,i){let o=this._scope.toName(e);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new Oa(r,o,n)),o}const(r,e,n){return this._def(Hr.varKinds.const,r,e,n)}let(r,e,n){return this._def(Hr.varKinds.let,r,e,n)}var(r,e,n){return this._def(Hr.varKinds.var,r,e,n)}assign(r,e,n){return this._leafNode(new fs(r,e,n))}add(r,e){return this._leafNode(new Na(r,Ie.operators.ADD,e))}code(r){return typeof r=="function"?r():r!==Re.nil&&this._leafNode(new ja(r)),this}object(...r){let e=["{"];for(let[n,i]of r)e.length>1&&e.push(","),e.push(n),(n!==i||this.opts.es5)&&(e.push(":"),Re.addCodeArg(e,i));return e.push("}"),new Re._Code(e)}if(r,e,n){if(this._blockNode(new Kr(r)),e&&n)this.code(e).else().code(n).endIf();else if(e)this.code(e).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(r){return this._elseNode(new Kr(r))}else(){return this._elseNode(new ji)}endIf(){return this._endBlockNode(Kr,ji)}_for(r,e){return this._blockNode(r),e&&this.code(e).endFor(),this}for(r,e){return this._for(new Ba(r),e)}forRange(r,e,n,i,o=this.opts.es5?Hr.varKinds.var:Hr.varKinds.let){let a=this._scope.toName(r);return this._for(new Ma(o,a,e,n),()=>i(a))}forOf(r,e,n,i=Hr.varKinds.const){let o=this._scope.toName(r);if(this.opts.es5){let a=e instanceof Re.Name?e:this.var("_arr",e);return this.forRange("_i",0,Re._`${a}.length`,u=>{this.var(o,Re._`${a}[${u}]`),n(o)})}return this._for(new cs("of",i,o,e),()=>n(o))}forIn(r,e,n,i=this.opts.es5?Hr.varKinds.var:Hr.varKinds.const){if(this.opts.ownProperties)return this.forOf(r,Re._`Object.keys(${e})`,n);let o=this._scope.toName(r);return this._for(new cs("in",i,o,e),()=>n(o))}endFor(){return this._endBlockNode(oi)}label(r){return this._leafNode(new Ra(r))}break(r){return this._leafNode(new Da(r))}return(r){let e=new $o;if(this._blockNode(e),this.code(r),e.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($o)}try(r,e,n){if(!e&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new za;if(this._blockNode(i),this.code(r),e){let o=this.name("e");this._currNode=i.catch=new bo(o),e(o)}return n&&(this._currNode=i.finally=new vo,this.code(n)),this._endBlockNode(bo,vo)}throw(r){return this._leafNode(new La(r))}block(r,e){return this._blockStarts.push(this._nodes.length),r&&this.code(r).endBlock(e),this}endBlock(r){let e=this._blockStarts.pop();if(e===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-e;if(n<0||r!==void 0&&n!==r)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${r} expected`);return this._nodes.length=e,this}func(r,e=Re.nil,n,i){return this._blockNode(new yo(r,e,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(yo)}optimize(r=1){for(;r-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(r){return this._currNode.nodes.push(r),this}_blockNode(r){this._currNode.nodes.push(r),this._nodes.push(r)}_endBlockNode(r,e){let n=this._currNode;if(n instanceof r||e&&n instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${r.kind}/${e.kind}`:r.kind}"`)}_elseNode(r){let e=this._currNode;if(!(e instanceof Kr))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=r,this}get _root(){return this._nodes[0]}get _currNode(){let r=this._nodes;return r[r.length-1]}set _currNode(r){let e=this._nodes;e[e.length-1]=r}};Ie.CodeGen=Va;function si(t,r){for(let e in r)t[e]=(t[e]||0)+(r[e]||0);return t}function ps(t,r){return r instanceof Re._CodeOrName?si(t,r.names):t}function qi(t,r,e){if(t instanceof Re.Name)return n(t);if(!i(t))return t;return new Re._Code(t._items.reduce((o,a)=>(a instanceof Re.Name&&(a=n(a)),a instanceof Re._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=e[o.str];return a===void 0||r[o.str]!==1?o:(delete r[o.str],a)}function i(o){return o instanceof Re._Code&&o._items.some(a=>a instanceof Re.Name&&r[a.str]===1&&e[a.str]!==void 0)}}function Vh(t,r){for(let e in r)t[e]=(t[e]||0)-(r[e]||0)}function vf(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:Re._`!${Ua(t)}`}Ie.not=vf;var Uh=kf(Ie.operators.AND);function Hh(...t){return t.reduce(Uh)}Ie.and=Hh;var Kh=kf(Ie.operators.OR);function Wh(...t){return t.reduce(Kh)}Ie.or=Wh;function kf(t){return(r,e)=>r===Re.nil?e:e===Re.nil?r:Re._`${Ua(r)} ${t} ${Ua(e)}`}function Ua(t){return t instanceof Re.Name?t:Re._`(${t})`}});var Wr=fe(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var Wt=Pe(),Gh={data:new Wt.Name("data"),valCxt:new Wt.Name("valCxt"),dataPath:new Wt.Name("dataPath"),parentData:new Wt.Name("parentData"),parentDataProperty:new Wt.Name("parentDataProperty"),rootData:new Wt.Name("rootData"),dynamicAnchors:new Wt.Name("dynamicAnchors"),vErrors:new Wt.Name("vErrors"),errors:new Wt.Name("errors"),this:new Wt.Name("this"),self:new Wt.Name("self"),scope:new Wt.Name("scope"),json:new Wt.Name("json"),jsonPos:new Wt.Name("jsonPos"),jsonLen:new Wt.Name("jsonLen"),jsonPart:new Wt.Name("jsonPart")};Ha.default=Gh});var ko=fe(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.extendErrors=Gt.resetErrorsCount=Gt.reportExtraError=Gt.reportError=Gt.keyword$DataError=Gt.keywordError=void 0;var De=Pe(),Qt=Wr();Gt.keywordError={message:({keyword:t})=>De.str`should pass "${t}" keyword validation`};Gt.keyword$DataError={message:({keyword:t,schemaType:r})=>r?De.str`"${t}" keyword must be ${r} ($data)`:De.str`"${t}" keyword is invalid ($data)`};function Qh(t,r=Gt.keywordError,e){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,u=_f(t,r);e??(o||a)?wf(i,u):xf(n,De._`[${u}]`)}Gt.reportError=Qh;function Zh(t,r=Gt.keywordError){let{it:e}=t,{gen:n,compositeRule:i,allErrors:o}=e,a=_f(t,r);wf(n,a),i||o||xf(e,Qt.default.vErrors)}Gt.reportExtraError=Zh;function Jh(t,r){t.assign(Qt.default.errors,r),t.if(De._`${Qt.default.vErrors} !== null`,()=>t.if(r,()=>t.assign(De._`${Qt.default.vErrors}.length`,r),()=>t.assign(Qt.default.vErrors,null)))}Gt.resetErrorsCount=Jh;function Xh({gen:t,keyword:r,schemaValue:e,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",i,Qt.default.errors,u=>{t.const(a,De._`${Qt.default.vErrors}[${u}]`),t.if(De._`${a}.dataPath === undefined`,()=>t.assign(De._`${a}.dataPath`,De.strConcat(Qt.default.dataPath,o.errorPath))),t.assign(De._`${a}.schemaPath`,De.str`${o.errSchemaPath}/${r}`),o.opts.verbose&&(t.assign(De._`${a}.schema`,e),t.assign(De._`${a}.data`,n))})}Gt.extendErrors=Xh;function wf(t,r){let e=t.const("err",r);t.if(De._`${Qt.default.vErrors} === null`,()=>t.assign(Qt.default.vErrors,De._`[${e}]`),De._`${Qt.default.vErrors}.push(${e})`),t.code(De._`${Qt.default.errors}++`)}function xf(t,r){let{gen:e,validateName:n,schemaEnv:i}=t;i.$async?e.throw(De._`new ${t.ValidationError}(${r})`):(e.assign(De._`${n}.errors`,r),e.return(!1))}var un={keyword:new De.Name("keyword"),schemaPath:new De.Name("schemaPath"),params:new De.Name("params"),propertyName:new De.Name("propertyName"),message:new De.Name("message"),schema:new De.Name("schema"),parentSchema:new De.Name("parentSchema"),instancePath:new De.Name("instancePath")};function _f(t,r){let{createErrors:e,opts:n}=t.it;return e===!1?De._`{}`:(n.jtd&&!n.ajvErrors?Yh:eg)(t,r)}function Yh(t,{message:r}){let{gen:e,keyword:n,it:i}=t,{errorPath:o,errSchemaPath:a,opts:u}=i,f=[[un.instancePath,De.strConcat(Qt.default.dataPath,o)],[un.schemaPath,De.str`${a}/${n}`]];return u.messages&&f.push([un.message,typeof r=="function"?r(t):r]),e.object(...f)}function eg(t,r){let{gen:e,keyword:n,data:i,schemaValue:o,it:a}=t,{topSchemaRef:u,schemaPath:f,errorPath:m,errSchemaPath:p,propertyName:$,opts:k}=a,{params:v,message:x}=r,I=[[un.keyword,n],[Qt.default.dataPath,De.strConcat(Qt.default.dataPath,m)],[un.schemaPath,De.str`${p}/${n}`],[un.params,typeof v=="function"?v(t):v||De._`{}`]];return $&&I.push([un.propertyName,$]),k.messages&&I.push([un.message,typeof x=="function"?x(t):x]),k.verbose&&I.push([un.schema,o],[un.parentSchema,De._`${u}${f}`],[Qt.default.data,i]),e.object(...I)}});var Ef=fe(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.boolOrEmptySchema=Bi.topBoolOrEmptySchema=void 0;var tg=ko(),rg=Pe(),ng=Wr(),ig={message:"boolean schema is false"};function og(t){let{gen:r,schema:e,validateName:n}=t;e===!1?Cf(t,!1):typeof e=="object"&&e.$async===!0?r.return(ng.default.data):(r.assign(rg._`${n}.errors`,null),r.return(!0))}Bi.topBoolOrEmptySchema=og;function sg(t,r){let{gen:e,schema:n}=t;n===!1?(e.var(r,!1),Cf(t)):e.var(r,!0)}Bi.boolOrEmptySchema=sg;function Cf(t,r){let{gen:e,data:n}=t,i={gen:e,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};tg.reportError(i,ig,r)}});var Sf=fe(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.assignDefaults=void 0;var Mi=Pe(),ag=wr();function lg(t,r){let{properties:e,items:n}=t.schema;if(r==="object"&&e)for(let i in e)Af(t,i,e[i].default);else r==="array"&&Array.isArray(n)&&n.forEach((i,o)=>Af(t,o,i.default))}ms.assignDefaults=lg;function Af(t,r,e){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(e===void 0)return;let u=Mi._`${o}${Mi.getProperty(r)}`;if(i){ag.checkStrictMode(t,`default is ignored for: ${u}`);return}let f=Mi._`${u} === undefined`;a.useDefaults==="empty"&&(f=Mi._`${f} || ${u} === null || ${u} === ""`),n.if(f,Mi._`${u} = ${Mi.stringify(e)}`)}});var ui=fe(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.applySubschema=li.Type=void 0;var ug=wr(),Pf=ut(),Zt=Pe(),If;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(If=li.Type||(li.Type={}));function fg(t,r,e){let n=cg(t,r);pg(n,t,r),dg(n,r);let i={...t,...n,items:void 0,props:void 0};return ug.subschemaCode(i,e),i}li.applySubschema=fg;function cg(t,{keyword:r,schemaProp:e,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(r!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(r!==void 0){let u=t.schema[r];return e===void 0?{schema:u,schemaPath:Zt._`${t.schemaPath}${Zt.getProperty(r)}`,errSchemaPath:`${t.errSchemaPath}/${r}`}:{schema:u[e],schemaPath:Zt._`${t.schemaPath}${Zt.getProperty(r)}${Zt.getProperty(e)}`,errSchemaPath:`${t.errSchemaPath}/${r}/${Pf.escapeFragment(e)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}function pg(t,r,{dataProp:e,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&e!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=r;if(e!==void 0){let{errorPath:m,dataPathArr:p,opts:$}=r,k=u.let("data",Zt._`${r.data}${Zt.getProperty(e)}`,!0);f(k),t.errorPath=Zt.str`${m}${mg(e,n,$.jsPropertySyntax)}`,t.parentDataProperty=Zt._`${e}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let m=i instanceof Zt.Name?i:u.let("data",i,!0);f(m),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function f(m){t.data=m,t.dataLevel=r.dataLevel+1,t.dataTypes=[],r.definedProperties=new Set,t.parentData=r.data,t.dataNames=[...r.dataNames,m]}}function dg(t,{jtdDiscriminator:r,jtdMetadata:e,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=r,t.jtdMetadata=e}function mg(t,r,e){if(t instanceof Zt.Name){let n=r===If.Num;return e?n?Zt._`"[" + ${t} + "]"`:Zt._`"['" + ${t} + "']"`:n?Zt._`"/" + ${t}`:Zt._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return e?Zt.getProperty(t).toString():"/"+Pf.escapeJsonPointer(t)}});var Gr=fe(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.validateUnion=Ze.validateArray=Ze.usePattern=Ze.callValidateCode=Ze.schemaProperties=Ze.allSchemaProperties=Ze.noPropertyInData=Ze.propertyInData=Ze.isOwnProperty=Ze.hasPropFunc=Ze.reportMissingProp=Ze.checkMissingProp=Ze.checkReportMissingProp=void 0;var st=Pe(),Ff=ut(),hg=ui(),Ln=Wr();function gg(t,r){let{gen:e,data:n,it:i}=t;e.if(Wa(e,n,r,i.opts.ownProperties),()=>{t.setParams({missingProperty:st._`${r}`},!0),t.error()})}Ze.checkReportMissingProp=gg;function yg({gen:t,data:r,it:{opts:e}},n,i){return st.or(...n.map(o=>st.and(Wa(t,r,o,e.ownProperties),st._`${i} = ${o}`)))}Ze.checkMissingProp=yg;function $g(t,r){t.setParams({missingProperty:r},!0),t.error()}Ze.reportMissingProp=$g;function Tf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:st._`Object.prototype.hasOwnProperty`})}Ze.hasPropFunc=Tf;function Ka(t,r,e){return st._`${Tf(t)}.call(${r}, ${e})`}Ze.isOwnProperty=Ka;function bg(t,r,e,n){let i=st._`${r}${st.getProperty(e)} !== undefined`;return n?st._`${i} && ${Ka(t,r,e)}`:i}Ze.propertyInData=bg;function Wa(t,r,e,n){let i=st._`${r}${st.getProperty(e)} === undefined`;return n?st.or(i,st.not(Ka(t,r,e))):i}Ze.noPropertyInData=Wa;function Of(t){return t?Object.keys(t).filter(r=>r!=="__proto__"):[]}Ze.allSchemaProperties=Of;function vg(t,r){return Of(r).filter(e=>!Ff.alwaysValidSchema(t,r[e]))}Ze.schemaProperties=vg;function kg({schemaCode:t,data:r,it:{gen:e,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,f,m){let p=m?st._`${t}, ${r}, ${n}${i}`:r,$=[[Ln.default.dataPath,st.strConcat(Ln.default.dataPath,o)],[Ln.default.parentData,a.parentData],[Ln.default.parentDataProperty,a.parentDataProperty],[Ln.default.rootData,Ln.default.rootData]];a.opts.dynamicRef&&$.push([Ln.default.dynamicAnchors,Ln.default.dynamicAnchors]);let k=st._`${p}, ${e.object(...$)}`;return f!==st.nil?st._`${u}.call(${f}, ${k})`:st._`${u}(${k})`}Ze.callValidateCode=kg;function wg(t,r){return t.scopeValue("pattern",{key:r,ref:new RegExp(r,"u"),code:st._`new RegExp(${r}, "u")`})}Ze.usePattern=wg;function xg(t){let{gen:r,data:e,keyword:n,it:i}=t,o=r.name("valid");if(i.allErrors){let u=r.let("valid",!0);return a(()=>r.assign(u,!1)),u}return r.var(o,!0),a(()=>r.break()),o;function a(u){let f=r.const("len",st._`${e}.length`);r.forRange("i",0,f,m=>{t.subschema({keyword:n,dataProp:m,dataPropType:hg.Type.Num},o),r.if(st.not(o),u)})}}Ze.validateArray=xg;function _g(t){let{gen:r,schema:e,keyword:n,it:i}=t;if(!Array.isArray(e))throw new Error("ajv implementation error");if(e.some(f=>Ff.alwaysValidSchema(i,f))&&!i.opts.unevaluated)return;let a=r.let("valid",!1),u=r.name("_valid");r.block(()=>e.forEach((f,m)=>{let p=t.subschema({keyword:n,schemaProp:m,compositeRule:!0},u);r.assign(a,st._`${a} || ${u}`),t.mergeValidEvaluated(p,u)||r.if(st.not(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}Ze.validateUnion=_g});var Lf=fe(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.keywordCode=void 0;var Cg=wo(),Eg=ko(),Ag=Gr(),sr=Pe(),fi=Wr();function Sg(t,r,e,n){let i=new Cg.default(t,e,r);"code"in e?e.code(i,n):i.$data&&e.validate?Nf(i,e):"macro"in e?Pg(i,e):(e.compile||e.validate)&&Nf(i,e)}hs.keywordCode=Sg;function Pg(t,r){let{gen:e,keyword:n,schema:i,parentSchema:o,it:a}=t,u=r.macro.call(a.self,i,o,a),f=Df(e,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let m=e.name("valid");t.subschema({schema:u,schemaPath:sr.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:f,compositeRule:!0},m),t.pass(m,()=>t.error(!0))}function Nf(t,r){var e;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:f}=t;Fg(f,r);let m=!u&&r.compile?r.compile.call(f.self,o,a,f):r.validate,p=Df(n,i,m),$=n.let("valid");t.block$data($,k),t.ok((e=r.valid)!==null&&e!==void 0?e:$);function k(){if(r.errors===!1)I(),r.modifying&&Rf(t),D(()=>t.error());else{let R=r.async?v():x();r.modifying&&Rf(t),D(()=>Ig(t,R))}}function v(){let R=n.let("ruleErrs",null);return n.try(()=>I(sr._`await `),X=>n.assign($,!1).if(sr._`${X} instanceof ${f.ValidationError}`,()=>n.assign(R,sr._`${X}.errors`),()=>n.throw(X))),R}function x(){let R=sr._`${p}.errors`;return n.assign(R,null),I(sr.nil),R}function I(R=r.async?sr._`await `:sr.nil){let X=f.opts.passContext?fi.default.this:fi.default.self,ee=!("compile"in r&&!u||r.schema===!1);n.assign($,sr._`${R}${Ag.callValidateCode(t,p,X,ee)}`,r.modifying)}function D(R){var X;n.if(sr.not((X=r.valid)!==null&&X!==void 0?X:$),R)}}function Rf(t){let{gen:r,data:e,it:n}=t;r.if(n.parentData,()=>r.assign(e,sr._`${n.parentData}[${n.parentDataProperty}]`))}function Ig(t,r){let{gen:e}=t;e.if(sr._`Array.isArray(${r})`,()=>{e.assign(fi.default.vErrors,sr._`${fi.default.vErrors} === null ? ${r} : ${fi.default.vErrors}.concat(${r})`).assign(fi.default.errors,sr._`${fi.default.vErrors}.length`),Eg.extendErrors(t)},()=>t.error())}function Fg({schemaEnv:t},r){if(r.async&&!t.$async)throw new Error("async keyword in sync schema")}function Df(t,r,e){if(e===void 0)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword",typeof e=="function"?{ref:e}:{ref:e,code:sr.stringify(e)})}});var zf=fe(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.schemaKeywords=void 0;var Ga=Ea(),jf=zi(),Tg=Sf(),Mf=Lf(),Og=ut(),Ng=wr(),Rg=Pe(),Dg=Wr();function Lg(t,r,e,n){let{gen:i,schema:o,data:a,allErrors:u,opts:f,self:m}=t,{RULES:p}=m;if(o.$ref&&(f.ignoreKeywordsWithRef||!Og.schemaHasRulesButRef(o,p))){i.block(()=>Mf.keywordCode(t,"$ref",p.all.$ref.definition));return}f.jtd||jg(t,r),i.block(()=>{for(let k of p.rules)$(k);$(p.post)});function $(k){!Ga.shouldUseGroup(o,k)||(k.type?(i.if(jf.checkDataType(k.type,a,f.strict)),qf(t,k),r.length===1&&r[0]===k.type&&e&&(i.else(),jf.reportTypeError(t)),i.endIf()):qf(t,k),u||i.if(Rg._`${Dg.default.errors} === ${n||0}`))}}gs.schemaKeywords=Lg;function qf(t,r){let{gen:e,schema:n,opts:{useDefaults:i}}=t;i&&Tg.assignDefaults(t,r.type),e.block(()=>{for(let o of r.rules)Ga.shouldUseRule(n,o)&&Mf.keywordCode(t,o.keyword,o.definition,r.type)})}function jg(t,r){t.schemaEnv.meta||!t.opts.strictTypes||(qg(t,r),t.opts.allowUnionTypes||Bg(t,r),Mg(t,t.dataTypes))}function qg(t,r){if(!!r.length){if(!t.dataTypes.length){t.dataTypes=r;return}r.forEach(e=>{Bf(t.dataTypes,e)||Qa(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)}),t.dataTypes=t.dataTypes.filter(e=>Bf(r,e))}}function Bg(t,r){r.length>1&&!(r.length===2&&r.includes("null"))&&Qa(t,"use allowUnionTypes to allow union type keyword")}function Mg(t,r){let e=t.self.RULES.all;for(let n in e){let i=e[n];if(typeof i=="object"&&Ga.shouldUseRule(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>zg(r,a))&&Qa(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function zg(t,r){return t.includes(r)||r==="number"&&t.includes("integer")}function Bf(t,r){return t.includes(r)||r==="integer"&&t.includes("number")}function Qa(t,r){let e=t.schemaEnv.baseId+t.errSchemaPath;r+=` at "${e}" (strictTypes)`,Ng.checkStrictMode(t,r,t.opts.strictTypes)}});var xo=fe((Yk,Vf)=>{"use strict";Vf.exports=function t(r,e){if(r===e)return!0;if(r&&e&&typeof r=="object"&&typeof e=="object"){if(r.constructor!==e.constructor)return!1;var n,i,o;if(Array.isArray(r)){if(n=r.length,n!=e.length)return!1;for(i=n;i--!==0;)if(!t(r[i],e[i]))return!1;return!0}if(r.constructor===RegExp)return r.source===e.source&&r.flags===e.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===e.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===e.toString();if(o=Object.keys(r),n=o.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(r[a],e[a]))return!1}return!0}return r!==r&&e!==e}});var Hf=fe((ew,Uf)=>{"use strict";var jn=Uf.exports=function(t,r,e){typeof r=="function"&&(e=r,r={}),e=r.cb||e;var n=typeof e=="function"?e:e.pre||function(){},i=e.post||function(){};ys(r,n,i,t,"",t)};jn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};jn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};jn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};jn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ys(t,r,e,n,i,o,a,u,f,m){if(n&&typeof n=="object"&&!Array.isArray(n)){r(n,i,o,a,u,f,m);for(var p in n){var $=n[p];if(Array.isArray($)){if(p in jn.arrayKeywords)for(var k=0;k<$.length;k++)ys(t,r,e,$[k],i+"/"+p+"/"+k,o,i,p,n,k)}else if(p in jn.propsKeywords){if($&&typeof $=="object")for(var v in $)ys(t,r,e,$[v],i+"/"+p+"/"+Vg(v),o,i,p,n,v)}else(p in jn.keywords||t.allKeys&&!(p in jn.skipKeywords))&&ys(t,r,e,$,i+"/"+p,o,i,p,n)}e(n,i,o,a,u,f,m)}}function Vg(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Za=fe(($s,Kf)=>{(function(t,r){typeof $s=="object"&&typeof Kf<"u"?r($s):typeof define=="function"&&define.amd?define(["exports"],r):r(t.URI=t.URI||{})})($s,function(t){"use strict";function r(){for(var T=arguments.length,P=Array(T),q=0;q<T;q++)P[q]=arguments[q];if(P.length>1){P[0]=P[0].slice(0,-1);for(var H=P.length-1,K=1;K<H;++K)P[K]=P[K].slice(1,-1);return P[H]=P[H].slice(1),P.join("")}else return P[0]}function e(T){return"(?:"+T+")"}function n(T){return T===void 0?"undefined":T===null?"null":Object.prototype.toString.call(T).split(" ").pop().split("]").shift().toLowerCase()}function i(T){return T.toUpperCase()}function o(T){return T!=null?T instanceof Array?T:typeof T.length!="number"||T.split||T.setInterval||T.call?[T]:Array.prototype.slice.call(T):[]}function a(T,P){var q=T;if(P)for(var H in P)q[H]=P[H];return q}function u(T){var P="[A-Za-z]",q="[\\x0D]",H="[0-9]",K="[\\x22]",le=r(H,"[A-Fa-f]"),we="[\\x0A]",Se="[\\x20]",Ne=e(e("%[EFef]"+le+"%"+le+le+"%"+le+le)+"|"+e("%[89A-Fa-f]"+le+"%"+le+le)+"|"+e("%"+le+le)),d="[\\:\\/\\?\\#\\[\\]\\@]",ie="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",je=r(d,ie),qe=T?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ke=T?"[\\uE000-\\uF8FF]":"[]",M=r(P,H,"[\\-\\.\\_\\~]",qe),We=e(P+r(P,H,"[\\+\\-\\.]")+"*"),Be=e(e(Ne+"|"+r(M,ie,"[\\:]"))+"*"),qr=e(e("25[0-5]")+"|"+e("2[0-4]"+H)+"|"+e("1"+H+H)+"|"+e("[1-9]"+H)+"|"+H),Vt=e(e("25[0-5]")+"|"+e("2[0-4]"+H)+"|"+e("1"+H+H)+"|"+e("0?[1-9]"+H)+"|0?0?"+H),rr=e(Vt+"\\."+Vt+"\\."+Vt+"\\."+Vt),he=e(le+"{1,4}"),lt=e(e(he+"\\:"+he)+"|"+rr),Ut=e(e(he+"\\:")+"{6}"+lt),fr=e("\\:\\:"+e(he+"\\:")+"{5}"+lt),Er=e(e(he)+"?\\:\\:"+e(he+"\\:")+"{4}"+lt),nr=e(e(e(he+"\\:")+"{0,1}"+he)+"?\\:\\:"+e(he+"\\:")+"{3}"+lt),cr=e(e(e(he+"\\:")+"{0,2}"+he)+"?\\:\\:"+e(he+"\\:")+"{2}"+lt),ne=e(e(e(he+"\\:")+"{0,3}"+he)+"?\\:\\:"+he+"\\:"+lt),gn=e(e(e(he+"\\:")+"{0,4}"+he)+"?\\:\\:"+lt),Ar=e(e(e(he+"\\:")+"{0,5}"+he)+"?\\:\\:"+he),Sr=e(e(e(he+"\\:")+"{0,6}"+he)+"?\\:\\:"),Nt=e([Ut,fr,Er,nr,cr,ne,gn,Ar,Sr].join("|")),rn=e(e(M+"|"+Ne)+"+"),Gn=e(Nt+"\\%25"+rn),vr=e(Nt+e("\\%25|\\%(?!"+le+"{2})")+rn),Qn=e("[vV]"+le+"+\\."+r(M,ie,"[\\:]")+"+"),Zn=e("\\["+e(vr+"|"+Nt+"|"+Qn)+"\\]"),On=e(e(Ne+"|"+r(M,ie))+"*"),yn=e(Zn+"|"+rr+"(?!"+On+")|"+On),Br=e(H+"*"),Ai=e(e(Be+"@")+"?"+yn+e("\\:"+Br)+"?"),nn=e(Ne+"|"+r(M,ie,"[\\:\\@]")),Jn=e(nn+"*"),Mr=e(nn+"+"),Xn=e(e(Ne+"|"+r(M,ie,"[\\@]"))+"+"),Rt=e(e("\\/"+Jn)+"*"),Dt=e("\\/"+e(Mr+Rt)+"?"),Yn=e(Xn+Rt),$n=e(Mr+Rt),At="(?!"+nn+")",bn=e(Rt+"|"+Dt+"|"+Yn+"|"+$n+"|"+At),zr=e(e(nn+"|"+r("[\\/\\?]",Ke))+"*"),vn=e(e(nn+"|[\\/\\?]")+"*"),Si=e(e("\\/\\/"+Ai+Rt)+"|"+Dt+"|"+$n+"|"+At),kn=e(We+"\\:"+Si+e("\\?"+zr)+"?"+e("\\#"+vn)+"?"),so=e(e("\\/\\/"+Ai+Rt)+"|"+Dt+"|"+Yn+"|"+At),ao=e(so+e("\\?"+zr)+"?"+e("\\#"+vn)+"?"),Go=e(kn+"|"+ao),Qo=e(We+"\\:"+Si+e("\\?"+zr)+"?"),lo="^("+We+")\\:"+e(e("\\/\\/("+e("("+Be+")@")+"?("+yn+")"+e("\\:("+Br+")")+"?)")+"?("+Rt+"|"+Dt+"|"+$n+"|"+At+")")+e("\\?("+zr+")")+"?"+e("\\#("+vn+")")+"?$",uo="^(){0}"+e(e("\\/\\/("+e("("+Be+")@")+"?("+yn+")"+e("\\:("+Br+")")+"?)")+"?("+Rt+"|"+Dt+"|"+Yn+"|"+At+")")+e("\\?("+zr+")")+"?"+e("\\#("+vn+")")+"?$",fo="^("+We+")\\:"+e(e("\\/\\/("+e("("+Be+")@")+"?("+yn+")"+e("\\:("+Br+")")+"?)")+"?("+Rt+"|"+Dt+"|"+$n+"|"+At+")")+e("\\?("+zr+")")+"?$",St="^"+e("\\#("+vn+")")+"?$",Ge="^"+e("("+Be+")@")+"?("+yn+")"+e("\\:("+Br+")")+"?$";return{NOT_SCHEME:new RegExp(r("[^]",P,H,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",M,ie),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",M,ie),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",M,ie),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",M,ie),"g"),NOT_QUERY:new RegExp(r("[^\\%]",M,ie,"[\\:\\@\\/\\?]",Ke),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",M,ie,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",M,ie),"g"),UNRESERVED:new RegExp(M,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",M,je),"g"),PCT_ENCODED:new RegExp(Ne,"g"),IPV4ADDRESS:new RegExp("^("+rr+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Nt+")"+e(e("\\%25|\\%(?!"+le+"{2})")+"("+rn+")")+"?\\]?$")}}var f=u(!1),m=u(!0),p=function(){function T(P,q){var H=[],K=!0,le=!1,we=void 0;try{for(var Se=P[Symbol.iterator](),Ne;!(K=(Ne=Se.next()).done)&&(H.push(Ne.value),!(q&&H.length===q));K=!0);}catch(d){le=!0,we=d}finally{try{!K&&Se.return&&Se.return()}finally{if(le)throw we}}return H}return function(P,q){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return T(P,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),$=function(T){if(Array.isArray(T)){for(var P=0,q=Array(T.length);P<T.length;P++)q[P]=T[P];return q}else return Array.from(T)},k=2147483647,v=36,x=1,I=26,D=38,R=700,X=72,ee=128,de="-",ce=/^xn--/,Q=/[^\0-\x7E]/,me=/[\x2E\u3002\uFF0E\uFF61]/g,ve={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ke=v-x,Te=Math.floor,xe=String.fromCharCode;function _e(T){throw new RangeError(ve[T])}function ue(T,P){for(var q=[],H=T.length;H--;)q[H]=P(T[H]);return q}function be(T,P){var q=T.split("@"),H="";q.length>1&&(H=q[0]+"@",T=q[1]),T=T.replace(me,".");var K=T.split("."),le=ue(K,P).join(".");return H+le}function He(T){for(var P=[],q=0,H=T.length;q<H;){var K=T.charCodeAt(q++);if(K>=55296&&K<=56319&&q<H){var le=T.charCodeAt(q++);(le&64512)==56320?P.push(((K&1023)<<10)+(le&1023)+65536):(P.push(K),q--)}else P.push(K)}return P}var U=function(P){return String.fromCodePoint.apply(String,$(P))},at=function(P){return P-48<10?P-22:P-65<26?P-65:P-97<26?P-97:v},Le=function(P,q){return P+22+75*(P<26)-((q!=0)<<5)},tt=function(P,q,H){var K=0;for(P=H?Te(P/R):P>>1,P+=Te(P/q);P>ke*I>>1;K+=v)P=Te(P/ke);return Te(K+(ke+1)*P/(P+D))},Ue=function(P){var q=[],H=P.length,K=0,le=ee,we=X,Se=P.lastIndexOf(de);Se<0&&(Se=0);for(var Ne=0;Ne<Se;++Ne)P.charCodeAt(Ne)>=128&&_e("not-basic"),q.push(P.charCodeAt(Ne));for(var d=Se>0?Se+1:0;d<H;){for(var ie=K,je=1,qe=v;;qe+=v){d>=H&&_e("invalid-input");var Ke=at(P.charCodeAt(d++));(Ke>=v||Ke>Te((k-K)/je))&&_e("overflow"),K+=Ke*je;var M=qe<=we?x:qe>=we+I?I:qe-we;if(Ke<M)break;var We=v-M;je>Te(k/We)&&_e("overflow"),je*=We}var Be=q.length+1;we=tt(K-ie,Be,ie==0),Te(K/Be)>k-le&&_e("overflow"),le+=Te(K/Be),K%=Be,q.splice(K++,0,le)}return String.fromCodePoint.apply(String,q)},O=function(P){var q=[];P=He(P);var H=P.length,K=ee,le=0,we=X,Se=!0,Ne=!1,d=void 0;try{for(var ie=P[Symbol.iterator](),je;!(Se=(je=ie.next()).done);Se=!0){var qe=je.value;qe<128&&q.push(xe(qe))}}catch(vr){Ne=!0,d=vr}finally{try{!Se&&ie.return&&ie.return()}finally{if(Ne)throw d}}var Ke=q.length,M=Ke;for(Ke&&q.push(de);M<H;){var We=k,Be=!0,qr=!1,Vt=void 0;try{for(var rr=P[Symbol.iterator](),he;!(Be=(he=rr.next()).done);Be=!0){var lt=he.value;lt>=K&<<We&&(We=lt)}}catch(vr){qr=!0,Vt=vr}finally{try{!Be&&rr.return&&rr.return()}finally{if(qr)throw Vt}}var Ut=M+1;We-K>Te((k-le)/Ut)&&_e("overflow"),le+=(We-K)*Ut,K=We;var fr=!0,Er=!1,nr=void 0;try{for(var cr=P[Symbol.iterator](),ne;!(fr=(ne=cr.next()).done);fr=!0){var gn=ne.value;if(gn<K&&++le>k&&_e("overflow"),gn==K){for(var Ar=le,Sr=v;;Sr+=v){var Nt=Sr<=we?x:Sr>=we+I?I:Sr-we;if(Ar<Nt)break;var rn=Ar-Nt,Gn=v-Nt;q.push(xe(Le(Nt+rn%Gn,0))),Ar=Te(rn/Gn)}q.push(xe(Le(Ar,0))),we=tt(le,Ut,M==Ke),le=0,++M}}}catch(vr){Er=!0,nr=vr}finally{try{!fr&&cr.return&&cr.return()}finally{if(Er)throw nr}}++le,++K}return q.join("")},N=function(P){return be(P,function(q){return ce.test(q)?Ue(q.slice(4).toLowerCase()):q})},Mt=function(P){return be(P,function(q){return Q.test(q)?"xn--"+O(q):q})},wt={version:"2.1.0",ucs2:{decode:He,encode:U},decode:Ue,encode:O,toASCII:Mt,toUnicode:N},it={};function ft(T){var P=T.charCodeAt(0),q=void 0;return P<16?q="%0"+P.toString(16).toUpperCase():P<128?q="%"+P.toString(16).toUpperCase():P<2048?q="%"+(P>>6|192).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase():q="%"+(P>>12|224).toString(16).toUpperCase()+"%"+(P>>6&63|128).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase(),q}function ct(T){for(var P="",q=0,H=T.length;q<H;){var K=parseInt(T.substr(q+1,2),16);if(K<128)P+=String.fromCharCode(K),q+=3;else if(K>=194&&K<224){if(H-q>=6){var le=parseInt(T.substr(q+4,2),16);P+=String.fromCharCode((K&31)<<6|le&63)}else P+=T.substr(q,6);q+=6}else if(K>=224){if(H-q>=9){var we=parseInt(T.substr(q+4,2),16),Se=parseInt(T.substr(q+7,2),16);P+=String.fromCharCode((K&15)<<12|(we&63)<<6|Se&63)}else P+=T.substr(q,9);q+=9}else P+=T.substr(q,3),q+=3}return P}function $e(T,P){function q(H){var K=ct(H);return K.match(P.UNRESERVED)?K:H}return T.scheme&&(T.scheme=String(T.scheme).replace(P.PCT_ENCODED,q).toLowerCase().replace(P.NOT_SCHEME,"")),T.userinfo!==void 0&&(T.userinfo=String(T.userinfo).replace(P.PCT_ENCODED,q).replace(P.NOT_USERINFO,ft).replace(P.PCT_ENCODED,i)),T.host!==void 0&&(T.host=String(T.host).replace(P.PCT_ENCODED,q).toLowerCase().replace(P.NOT_HOST,ft).replace(P.PCT_ENCODED,i)),T.path!==void 0&&(T.path=String(T.path).replace(P.PCT_ENCODED,q).replace(T.scheme?P.NOT_PATH:P.NOT_PATH_NOSCHEME,ft).replace(P.PCT_ENCODED,i)),T.query!==void 0&&(T.query=String(T.query).replace(P.PCT_ENCODED,q).replace(P.NOT_QUERY,ft).replace(P.PCT_ENCODED,i)),T.fragment!==void 0&&(T.fragment=String(T.fragment).replace(P.PCT_ENCODED,q).replace(P.NOT_FRAGMENT,ft).replace(P.PCT_ENCODED,i)),T}function br(T){return T.replace(/^0*(.*)/,"$1")||"0"}function Ct(T,P){var q=T.match(P.IPV4ADDRESS)||[],H=p(q,2),K=H[1];return K?K.split(".").map(br).join("."):T}function Tt(T,P){var q=T.match(P.IPV6ADDRESS)||[],H=p(q,3),K=H[1],le=H[2];if(K){for(var we=K.toLowerCase().split("::").reverse(),Se=p(we,2),Ne=Se[0],d=Se[1],ie=d?d.split(":").map(br):[],je=Ne.split(":").map(br),qe=P.IPV4ADDRESS.test(je[je.length-1]),Ke=qe?7:8,M=je.length-Ke,We=Array(Ke),Be=0;Be<Ke;++Be)We[Be]=ie[Be]||je[M+Be]||"";qe&&(We[Ke-1]=Ct(We[Ke-1],P));var qr=We.reduce(function(Ut,fr,Er){if(!fr||fr==="0"){var nr=Ut[Ut.length-1];nr&&nr.index+nr.length===Er?nr.length++:Ut.push({index:Er,length:1})}return Ut},[]),Vt=qr.sort(function(Ut,fr){return fr.length-Ut.length})[0],rr=void 0;if(Vt&&Vt.length>1){var he=We.slice(0,Vt.index),lt=We.slice(Vt.index+Vt.length);rr=he.join(":")+"::"+lt.join(":")}else rr=We.join(":");return le&&(rr+="%"+le),rr}else return T}var er=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ur="".match(/(){0}/)[1]===void 0;function zt(T){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q={},H=P.iri!==!1?m:f;P.reference==="suffix"&&(T=(P.scheme?P.scheme+":":"")+"//"+T);var K=T.match(er);if(K){ur?(q.scheme=K[1],q.userinfo=K[3],q.host=K[4],q.port=parseInt(K[5],10),q.path=K[6]||"",q.query=K[7],q.fragment=K[8],isNaN(q.port)&&(q.port=K[5])):(q.scheme=K[1]||void 0,q.userinfo=T.indexOf("@")!==-1?K[3]:void 0,q.host=T.indexOf("//")!==-1?K[4]:void 0,q.port=parseInt(K[5],10),q.path=K[6]||"",q.query=T.indexOf("?")!==-1?K[7]:void 0,q.fragment=T.indexOf("#")!==-1?K[8]:void 0,isNaN(q.port)&&(q.port=T.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?K[4]:void 0)),q.host&&(q.host=Tt(Ct(q.host,H),H)),q.scheme===void 0&&q.userinfo===void 0&&q.host===void 0&&q.port===void 0&&!q.path&&q.query===void 0?q.reference="same-document":q.scheme===void 0?q.reference="relative":q.fragment===void 0?q.reference="absolute":q.reference="uri",P.reference&&P.reference!=="suffix"&&P.reference!==q.reference&&(q.error=q.error||"URI is not a "+P.reference+" reference.");var le=it[(P.scheme||q.scheme||"").toLowerCase()];if(!P.unicodeSupport&&(!le||!le.unicodeSupport)){if(q.host&&(P.domainHost||le&&le.domainHost))try{q.host=wt.toASCII(q.host.replace(H.PCT_ENCODED,ct).toLowerCase())}catch(we){q.error=q.error||"Host's domain name can not be converted to ASCII via punycode: "+we}$e(q,f)}else $e(q,H);le&&le.parse&&le.parse(q,P)}else q.error=q.error||"URI can not be parsed.";return q}function Kn(T,P){var q=P.iri!==!1?m:f,H=[];return T.userinfo!==void 0&&(H.push(T.userinfo),H.push("@")),T.host!==void 0&&H.push(Tt(Ct(String(T.host),q),q).replace(q.IPV6ADDRESS,function(K,le,we){return"["+le+(we?"%25"+we:"")+"]"})),(typeof T.port=="number"||typeof T.port=="string")&&(H.push(":"),H.push(String(T.port))),H.length?H.join(""):void 0}var Pn=/^\.\.?\//,pt=/^\/\.(\/|$)/,dt=/^\/\.\.(\/|$)/,Ot=/^\/?(?:.|\n)*?(?=\/|$)/;function mt(T){for(var P=[];T.length;)if(T.match(Pn))T=T.replace(Pn,"");else if(T.match(pt))T=T.replace(pt,"/");else if(T.match(dt))T=T.replace(dt,"/"),P.pop();else if(T==="."||T==="..")T="";else{var q=T.match(Ot);if(q){var H=q[0];T=T.slice(H.length),P.push(H)}else throw new Error("Unexpected dot segment condition")}return P.join("")}function xt(T){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=P.iri?m:f,H=[],K=it[(P.scheme||T.scheme||"").toLowerCase()];if(K&&K.serialize&&K.serialize(T,P),T.host&&!q.IPV6ADDRESS.test(T.host)){if(P.domainHost||K&&K.domainHost)try{T.host=P.iri?wt.toUnicode(T.host):wt.toASCII(T.host.replace(q.PCT_ENCODED,ct).toLowerCase())}catch(Se){T.error=T.error||"Host's domain name can not be converted to "+(P.iri?"Unicode":"ASCII")+" via punycode: "+Se}}$e(T,q),P.reference!=="suffix"&&T.scheme&&(H.push(T.scheme),H.push(":"));var le=Kn(T,P);if(le!==void 0&&(P.reference!=="suffix"&&H.push("//"),H.push(le),T.path&&T.path.charAt(0)!=="/"&&H.push("/")),T.path!==void 0){var we=T.path;!P.absolutePath&&(!K||!K.absolutePath)&&(we=mt(we)),le===void 0&&(we=we.replace(/^\/\//,"/%2F")),H.push(we)}return T.query!==void 0&&(H.push("?"),H.push(T.query)),T.fragment!==void 0&&(H.push("#"),H.push(T.fragment)),H.join("")}function Or(T,P){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},H=arguments[3],K={};return H||(T=zt(xt(T,q),q),P=zt(xt(P,q),q)),q=q||{},!q.tolerant&&P.scheme?(K.scheme=P.scheme,K.userinfo=P.userinfo,K.host=P.host,K.port=P.port,K.path=mt(P.path||""),K.query=P.query):(P.userinfo!==void 0||P.host!==void 0||P.port!==void 0?(K.userinfo=P.userinfo,K.host=P.host,K.port=P.port,K.path=mt(P.path||""),K.query=P.query):(P.path?(P.path.charAt(0)==="/"?K.path=mt(P.path):((T.userinfo!==void 0||T.host!==void 0||T.port!==void 0)&&!T.path?K.path="/"+P.path:T.path?K.path=T.path.slice(0,T.path.lastIndexOf("/")+1)+P.path:K.path=P.path,K.path=mt(K.path)),K.query=P.query):(K.path=T.path,P.query!==void 0?K.query=P.query:K.query=T.query),K.userinfo=T.userinfo,K.host=T.host,K.port=T.port),K.scheme=T.scheme),K.fragment=P.fragment,K}function Nr(T,P,q){var H=a({scheme:"null"},q);return xt(Or(zt(T,H),zt(P,H),H,!0),H)}function Rr(T,P){return typeof T=="string"?T=xt(zt(T,P),P):n(T)==="object"&&(T=zt(xt(T,P),P)),T}function Dr(T,P,q){return typeof T=="string"?T=xt(zt(T,q),q):n(T)==="object"&&(T=xt(T,q)),typeof P=="string"?P=xt(zt(P,q),q):n(P)==="object"&&(P=xt(P,q)),T===P}function Lr(T,P){return T&&T.toString().replace(!P||!P.iri?f.ESCAPE:m.ESCAPE,ft)}function tr(T,P){return T&&T.toString().replace(!P||!P.iri?f.PCT_ENCODED:m.PCT_ENCODED,ct)}var W={scheme:"http",domainHost:!0,parse:function(P,q){return P.host||(P.error=P.error||"HTTP URIs must have a host."),P},serialize:function(P,q){var H=String(P.scheme).toLowerCase()==="https";return(P.port===(H?443:80)||P.port==="")&&(P.port=void 0),P.path||(P.path="/"),P}},re={scheme:"https",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize};function ge(T){return typeof T.secure=="boolean"?T.secure:String(T.scheme).toLowerCase()==="wss"}var Ae={scheme:"ws",domainHost:!0,parse:function(P,q){var H=P;return H.secure=ge(H),H.resourceName=(H.path||"/")+(H.query?"?"+H.query:""),H.path=void 0,H.query=void 0,H},serialize:function(P,q){if((P.port===(ge(P)?443:80)||P.port==="")&&(P.port=void 0),typeof P.secure=="boolean"&&(P.scheme=P.secure?"wss":"ws",P.secure=void 0),P.resourceName){var H=P.resourceName.split("?"),K=p(H,2),le=K[0],we=K[1];P.path=le&&le!=="/"?le:void 0,P.query=we,P.resourceName=void 0}return P.fragment=void 0,P}},_t={scheme:"wss",domainHost:Ae.domainHost,parse:Ae.parse,serialize:Ae.serialize},_r={},Me=!0,ot="[A-Za-z0-9\\-\\.\\_\\~"+(Me?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",ht="[0-9A-Fa-f]",jr=e(e("%[EFef]"+ht+"%"+ht+ht+"%"+ht+ht)+"|"+e("%[89A-Fa-f]"+ht+"%"+ht+ht)+"|"+e("%"+ht+ht)),Xe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",tn="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Et=r(tn,'[\\"\\\\]'),In="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",no=new RegExp(ot,"g"),Cr=new RegExp(jr,"g"),Fn=new RegExp(r("[^]",Xe,"[\\.]",'[\\"]',Et),"g"),Ci=new RegExp(r("[^]",ot,In),"g"),io=Ci;function Tn(T){var P=ct(T);return P.match(no)?P:T}var Ei={scheme:"mailto",parse:function(P,q){var H=P,K=H.to=H.path?H.path.split(","):[];if(H.path=void 0,H.query){for(var le=!1,we={},Se=H.query.split("&"),Ne=0,d=Se.length;Ne<d;++Ne){var ie=Se[Ne].split("=");switch(ie[0]){case"to":for(var je=ie[1].split(","),qe=0,Ke=je.length;qe<Ke;++qe)K.push(je[qe]);break;case"subject":H.subject=tr(ie[1],q);break;case"body":H.body=tr(ie[1],q);break;default:le=!0,we[tr(ie[0],q)]=tr(ie[1],q);break}}le&&(H.headers=we)}H.query=void 0;for(var M=0,We=K.length;M<We;++M){var Be=K[M].split("@");if(Be[0]=tr(Be[0]),q.unicodeSupport)Be[1]=tr(Be[1],q).toLowerCase();else try{Be[1]=wt.toASCII(tr(Be[1],q).toLowerCase())}catch(qr){H.error=H.error||"Email address's domain name can not be converted to ASCII via punycode: "+qr}K[M]=Be.join("@")}return H},serialize:function(P,q){var H=P,K=o(P.to);if(K){for(var le=0,we=K.length;le<we;++le){var Se=String(K[le]),Ne=Se.lastIndexOf("@"),d=Se.slice(0,Ne).replace(Cr,Tn).replace(Cr,i).replace(Fn,ft),ie=Se.slice(Ne+1);try{ie=q.iri?wt.toUnicode(ie):wt.toASCII(tr(ie,q).toLowerCase())}catch(M){H.error=H.error||"Email address's domain name can not be converted to "+(q.iri?"Unicode":"ASCII")+" via punycode: "+M}K[le]=d+"@"+ie}H.path=K.join(",")}var je=P.headers=P.headers||{};P.subject&&(je.subject=P.subject),P.body&&(je.body=P.body);var qe=[];for(var Ke in je)je[Ke]!==_r[Ke]&&qe.push(Ke.replace(Cr,Tn).replace(Cr,i).replace(Ci,ft)+"="+je[Ke].replace(Cr,Tn).replace(Cr,i).replace(io,ft));return qe.length&&(H.query=qe.join("&")),H}},Wn=/^([^\:]+)\:(.*)/,mn={scheme:"urn",parse:function(P,q){var H=P.path&&P.path.match(Wn),K=P;if(H){var le=q.scheme||K.scheme||"urn",we=H[1].toLowerCase(),Se=H[2],Ne=le+":"+(q.nid||we),d=it[Ne];K.nid=we,K.nss=Se,K.path=void 0,d&&(K=d.parse(K,q))}else K.error=K.error||"URN can not be parsed.";return K},serialize:function(P,q){var H=q.scheme||P.scheme||"urn",K=P.nid,le=H+":"+(q.nid||K),we=it[le];we&&(P=we.serialize(P,q));var Se=P,Ne=P.nss;return Se.path=(K||q.nid)+":"+Ne,Se}},oo=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,hn={scheme:"urn:uuid",parse:function(P,q){var H=P;return H.uuid=H.nss,H.nss=void 0,!q.tolerant&&(!H.uuid||!H.uuid.match(oo))&&(H.error=H.error||"UUID is not valid."),H},serialize:function(P,q){var H=P;return H.nss=(P.uuid||"").toLowerCase(),H}};it[W.scheme]=W,it[re.scheme]=re,it[Ae.scheme]=Ae,it[_t.scheme]=_t,it[Ei.scheme]=Ei,it[mn.scheme]=mn,it[hn.scheme]=hn,t.SCHEMES=it,t.pctEncChar=ft,t.pctDecChars=ct,t.parse=zt,t.removeDotSegments=mt,t.serialize=xt,t.resolveComponents=Or,t.resolve=Nr,t.normalize=Rr,t.equal=Dr,t.escapeComponent=Lr,t.unescapeComponent=tr,Object.defineProperty(t,"__esModule",{value:!0})})});var _o=fe(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.getSchemaRefs=hr.resolveUrl=hr.normalizeId=hr._getFullPath=hr.getFullPath=hr.inlineRef=void 0;var Ug=ut(),Hg=xo(),Kg=Hf(),bs=Za(),Wg=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Gg(t,r=!0){return typeof t=="boolean"?!0:r===!0?!Ja(t):r?Wf(t)<=r:!1}hr.inlineRef=Gg;var Qg=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ja(t){for(let r in t){if(Qg.has(r))return!0;let e=t[r];if(Array.isArray(e)&&e.some(Ja)||typeof e=="object"&&Ja(e))return!0}return!1}function Wf(t){let r=0;for(let e in t){if(e==="$ref")return 1/0;if(r++,!Wg.has(e)&&(typeof t[e]=="object"&&Ug.eachItem(t[e],n=>r+=Wf(n)),r===1/0))return 1/0}return r}function Gf(t="",r){r!==!1&&(t=Vi(t));let e=bs.parse(t);return Qf(e)}hr.getFullPath=Gf;function Qf(t){return bs.serialize(t).split("#")[0]+"#"}hr._getFullPath=Qf;var Zg=/#\/?$/;function Vi(t){return t?t.replace(Zg,""):""}hr.normalizeId=Vi;function Jg(t,r){return r=Vi(r),bs.resolve(t,r)}hr.resolveUrl=Jg;var Xg=/^[a-z_][-a-z0-9._]*$/i;function Yg(t){if(typeof t=="boolean")return{};let r=Vi(t.$id),e={"":r},n=Gf(r,!1),i={},o=new Set;return Kg(t,{allKeys:!0},(f,m,p,$)=>{if($===void 0)return;let k=n+m,v=e[$];typeof f.$id=="string"&&(v=x.call(this,f.$id)),I.call(this,f.$anchor),I.call(this,f.$dynamicAnchor),e[m]=v;function x(D){if(D=Vi(v?bs.resolve(v,D):D),o.has(D))throw u(D);o.add(D);let R=this.refs[D];return typeof R=="string"&&(R=this.refs[R]),typeof R=="object"?a(f,R.schema,D):D!==Vi(k)&&(D[0]==="#"?(a(f,i[D],D),i[D]=f):this.refs[D]=k),D}function I(D){if(typeof D=="string"){if(!Xg.test(D))throw new Error(`invalid anchor "${D}"`);x.call(this,`#${D}`)}}}),i;function a(f,m,p){if(m!==void 0&&!Hg(f,m))throw u(p)}function u(f){return new Error(`reference "${f}" resolves to more than one schema`)}}hr.getSchemaRefs=Yg});var wr=fe(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.checkStrictMode=fn.schemaCxtHasRules=fn.subschemaCode=fn.validateFunctionCode=void 0;var Yf=Ef(),Zf=zi(),Jf=zf(),Oe=Pe(),Ce=Wr(),ey=_o(),ec=ut();function ty(t){if(rc(t)&&(nc(t),Xa(t))){iy(t);return}tc(t,()=>Yf.topBoolOrEmptySchema(t))}fn.validateFunctionCode=ty;function tc({gen:t,validateName:r,schema:e,schemaEnv:n,opts:i},o){i.code.es5?t.func(r,Oe._`${Ce.default.data}, ${Ce.default.valCxt}`,n.$async,()=>{t.code(Oe._`"use strict"; ${Xf(e,i)}`),ny(t,i),t.code(o)}):t.func(r,Oe._`${Ce.default.data}, ${ry(i)}`,n.$async,()=>t.code(Xf(e,i)).code(o))}function ry(t){return Oe._`{${Ce.default.dataPath}="", ${Ce.default.parentData}, ${Ce.default.parentDataProperty}, ${Ce.default.rootData}=${Ce.default.data}${t.dynamicRef?Oe._`, ${Ce.default.dynamicAnchors}={}`:Oe.nil}}={}`}function ny(t,r){t.if(Ce.default.valCxt,()=>{t.var(Ce.default.dataPath,Oe._`${Ce.default.valCxt}.${Ce.default.dataPath}`),t.var(Ce.default.parentData,Oe._`${Ce.default.valCxt}.${Ce.default.parentData}`),t.var(Ce.default.parentDataProperty,Oe._`${Ce.default.valCxt}.${Ce.default.parentDataProperty}`),t.var(Ce.default.rootData,Oe._`${Ce.default.valCxt}.${Ce.default.rootData}`),r.dynamicRef&&t.var(Ce.default.dynamicAnchors,Oe._`${Ce.default.valCxt}.${Ce.default.dynamicAnchors}`)},()=>{t.var(Ce.default.dataPath,Oe._`""`),t.var(Ce.default.parentData,Oe._`undefined`),t.var(Ce.default.parentDataProperty,Oe._`undefined`),t.var(Ce.default.rootData,Ce.default.data),r.dynamicRef&&t.var(Ce.default.dynamicAnchors,Oe._`{}`)})}function iy(t){let{schema:r,opts:e,gen:n}=t;tc(t,()=>{e.$comment&&r.$comment&&oc(t),uy(t),n.let(Ce.default.vErrors,null),n.let(Ce.default.errors,0),e.unevaluated&&oy(t),ic(t),py(t)})}function oy(t){let{gen:r,validateName:e}=t;t.evaluated=r.const("evaluated",Oe._`${e}.evaluated`),r.if(Oe._`${t.evaluated}.dynamicProps`,()=>r.assign(Oe._`${t.evaluated}.props`,Oe._`undefined`)),r.if(Oe._`${t.evaluated}.dynamicItems`,()=>r.assign(Oe._`${t.evaluated}.items`,Oe._`undefined`))}function Xf(t,r){return typeof t=="object"&&t.$id&&(r.code.source||r.code.process)?Oe._`/*# sourceURL=${t.$id} */`:Oe.nil}function sy(t,r){if(rc(t)&&(nc(t),Xa(t))){ay(t,r);return}Yf.boolOrEmptySchema(t,r)}fn.subschemaCode=sy;function Xa({schema:t,self:r}){if(typeof t=="boolean")return!t;for(let e in t)if(r.RULES.all[e])return!0;return!1}fn.schemaCxtHasRules=Xa;function rc(t){return typeof t.schema!="boolean"}function ay(t,r){let{schema:e,gen:n,opts:i}=t;i.$comment&&e.$comment&&oc(t),fy(t),cy(t);let o=n.const("_errs",Ce.default.errors);ic(t,o),n.var(r,Oe._`${o} === ${Ce.default.errors}`)}function nc(t){ec.checkUnknownRules(t),ly(t)}function ic(t,r){if(t.opts.jtd)return Jf.schemaKeywords(t,[],!1,r);let e=Zf.getSchemaTypes(t.schema),n=Zf.coerceAndCheckDataType(t,e);Jf.schemaKeywords(t,e,!n,r)}function ly(t){let{schema:r,errSchemaPath:e,opts:n,self:i}=t;r.$ref&&n.ignoreKeywordsWithRef&&ec.schemaHasRulesButRef(r,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${e}"`)}function uy(t){let{schema:r,opts:e}=t;r.default!==void 0&&e.useDefaults&&e.strict&&sc(t,"default is ignored in the schema root")}function fy(t){t.schema.$id&&(t.baseId=ey.resolveUrl(t.baseId,t.schema.$id))}function cy(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function oc({gen:t,schemaEnv:r,schema:e,errSchemaPath:n,opts:i}){let o=e.$comment;if(i.$comment===!0)t.code(Oe._`${Ce.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=Oe.str`${n}/$comment`,u=t.scopeValue("root",{ref:r.root});t.code(Oe._`${Ce.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}function py(t){let{gen:r,schemaEnv:e,validateName:n,ValidationError:i,opts:o}=t;e.$async?r.if(Oe._`${Ce.default.errors} === 0`,()=>r.return(Ce.default.data),()=>r.throw(Oe._`new ${i}(${Ce.default.vErrors})`)):(r.assign(Oe._`${n}.errors`,Ce.default.vErrors),o.unevaluated&&dy(t),r.return(Oe._`${Ce.default.errors} === 0`))}function dy({gen:t,evaluated:r,props:e,items:n}){e instanceof Oe.Name&&t.assign(Oe._`${r}.props`,e),n instanceof Oe.Name&&t.assign(Oe._`${r}.items`,n)}function sc(t,r,e=t.opts.strict){if(!!e){if(r=`strict mode: ${r}`,e===!0)throw new Error(r);t.self.logger.warn(r)}}fn.checkStrictMode=sc});var ut=fe(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.func=ze.setEvaluated=ze.evaluatedPropsToName=ze.mergeEvaluated=ze.eachItem=ze.unescapeJsonPointer=ze.escapeJsonPointer=ze.escapeFragment=ze.unescapeFragment=ze.schemaRefOrVal=ze.schemaHasRulesButRef=ze.schemaHasRules=ze.checkUnknownRules=ze.alwaysValidSchema=ze.toHash=void 0;var gt=Pe(),my=wr();function hy(t){let r={};for(let e of t)r[e]=!0;return r}ze.toHash=hy;function gy(t,r){return typeof r=="boolean"?r:Object.keys(r).length===0?!0:(lc(t,r),!uc(r,t.self.RULES.all))}ze.alwaysValidSchema=gy;function lc(t,r=t.schema){let{opts:e,self:n}=t;if(!e.strict||typeof r=="boolean")return;let i=n.RULES.keywords;for(let o in r)i[o]||my.checkStrictMode(t,`unknown keyword: "${o}"`)}ze.checkUnknownRules=lc;function uc(t,r){if(typeof t=="boolean")return!t;for(let e in t)if(r[e])return!0;return!1}ze.schemaHasRules=uc;function yy(t,r){if(typeof t=="boolean")return!t;for(let e in t)if(e!=="$ref"&&r.all[e])return!0;return!1}ze.schemaHasRulesButRef=yy;function $y({topSchemaRef:t,schemaPath:r},e,n,i){if(!i){if(typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return gt._`${e}`}return gt._`${t}${r}${gt.getProperty(n)}`}ze.schemaRefOrVal=$y;function by(t){return cc(decodeURIComponent(t))}ze.unescapeFragment=by;function vy(t){return encodeURIComponent(fc(t))}ze.escapeFragment=vy;function fc(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ze.escapeJsonPointer=fc;function cc(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ze.unescapeJsonPointer=cc;function ky(t,r){if(Array.isArray(t))for(let e of t)r(e);else r(t)}ze.eachItem=ky;function ac({mergeNames:t,mergeToName:r,mergeValues:e,resultToName:n}){return(i,o,a,u)=>{let f=a===void 0?o:a instanceof gt.Name?(o instanceof gt.Name?t(i,o,a):r(i,o,a),a):o instanceof gt.Name?(r(i,a,o),o):e(o,a);return u===gt.Name&&!(f instanceof gt.Name)?n(i,f):f}}ze.mergeEvaluated={props:ac({mergeNames:(t,r,e)=>t.if(gt._`${e} !== true && ${r} !== undefined`,()=>{t.if(gt._`${r} === true`,()=>t.assign(e,!0),()=>t.assign(e,gt._`${e} || {}`).code(gt._`Object.assign(${e}, ${r})`))}),mergeToName:(t,r,e)=>t.if(gt._`${e} !== true`,()=>{r===!0?t.assign(e,!0):(t.assign(e,gt._`${e} || {}`),Ya(t,e,r))}),mergeValues:(t,r)=>t===!0?!0:{...t,...r},resultToName:pc}),items:ac({mergeNames:(t,r,e)=>t.if(gt._`${e} !== true && ${r} !== undefined`,()=>t.assign(e,gt._`${r} === true ? true : ${e} > ${r} ? ${e} : ${r}`)),mergeToName:(t,r,e)=>t.if(gt._`${e} !== true`,()=>t.assign(e,r===!0?!0:gt._`${e} > ${r} ? ${e} : ${r}`)),mergeValues:(t,r)=>t===!0?!0:Math.max(t,r),resultToName:(t,r)=>t.var("items",r)})};function pc(t,r){if(r===!0)return t.var("props",!0);let e=t.var("props",gt._`{}`);return r!==void 0&&Ya(t,e,r),e}ze.evaluatedPropsToName=pc;function Ya(t,r,e){Object.keys(e).forEach(n=>t.assign(gt._`${r}${gt.getProperty(n)}`,!0))}ze.setEvaluated=Ya;function wy(t,r){return t.scopeValue("func",{ref:r,code:r.code})}ze.func=wy});var zi=fe(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.reportTypeError=jt.checkDataTypes=jt.checkDataType=jt.coerceAndCheckDataType=jt.getJSONTypes=jt.getSchemaTypes=jt.DataType=void 0;var xy=Ca(),_y=Ea(),Cy=ko(),Ee=Pe(),dc=ut(),Co;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Co=jt.DataType||(jt.DataType={}));function Ey(t){let r=mc(t.type);if(r.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!r.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&r.push("null")}return r}jt.getSchemaTypes=Ey;function mc(t){let r=Array.isArray(t)?t:t?[t]:[];if(r.every(xy.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}jt.getJSONTypes=mc;function Ay(t,r){let{gen:e,data:n,opts:i}=t,o=Sy(r,i.coerceTypes),a=r.length>0&&!(o.length===0&&r.length===1&&_y.schemaHasRulesForType(t,r[0]));if(a){let u=tl(r,n,i.strict,Co.Wrong);e.if(u,()=>{o.length?Py(t,r,o):rl(t)})}return a}jt.coerceAndCheckDataType=Ay;var hc=new Set(["string","number","integer","boolean","null"]);function Sy(t,r){return r?t.filter(e=>hc.has(e)||r==="array"&&e==="array"):[]}function Py(t,r,e){let{gen:n,data:i,opts:o}=t,a=n.let("dataType",Ee._`typeof ${i}`),u=n.let("coerced",Ee._`undefined`);o.coerceTypes==="array"&&n.if(Ee._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,Ee._`${i}[0]`).assign(a,Ee._`typeof ${i}`).if(tl(r,i,o.strict),()=>n.assign(u,i))),n.if(Ee._`${u} !== undefined`);for(let m of e)(hc.has(m)||m==="array"&&o.coerceTypes==="array")&&f(m);n.else(),rl(t),n.endIf(),n.if(Ee._`${u} !== undefined`,()=>{n.assign(i,u),Iy(t,u)});function f(m){switch(m){case"string":n.elseIf(Ee._`${a} == "number" || ${a} == "boolean"`).assign(u,Ee._`"" + ${i}`).elseIf(Ee._`${i} === null`).assign(u,Ee._`""`);return;case"number":n.elseIf(Ee._`${a} == "boolean" || ${i} === null
|
|
3
|
-
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(u,Ee._`+${i}`);return;case"integer":n.elseIf(Ee._`${a} === "boolean" || ${i} === null
|
|
4
|
-
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,Ee._`+${i}`);return;case"boolean":n.elseIf(Ee._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf(Ee._`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":n.elseIf(Ee._`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(u,null);return;case"array":n.elseIf(Ee._`${a} === "string" || ${a} === "number"
|
|
5
|
-
|| ${a} === "boolean" || ${i} === null`).assign(u,Ee._`[${i}]`)}}}function Iy({gen:t,parentData:r,parentDataProperty:e},n){t.if(Ee._`${r} !== undefined`,()=>t.assign(Ee._`${r}[${e}]`,n))}function el(t,r,e,n=Co.Correct){let i=n===Co.Correct?Ee.operators.EQ:Ee.operators.NEQ,o;switch(t){case"null":return Ee._`${r} ${i} null`;case"array":o=Ee._`Array.isArray(${r})`;break;case"object":o=Ee._`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":o=a(Ee._`!(${r} % 1) && !isNaN(${r})`);break;case"number":o=a();break;default:return Ee._`typeof ${r} ${i} ${t}`}return n===Co.Correct?o:Ee.not(o);function a(u=Ee.nil){return Ee.and(Ee._`typeof ${r} == "number"`,u,e?Ee._`isFinite(${r})`:Ee.nil)}}jt.checkDataType=el;function tl(t,r,e,n){if(t.length===1)return el(t[0],r,e,n);let i,o=dc.toHash(t);if(o.array&&o.object){let a=Ee._`typeof ${r} != "object"`;i=o.null?a:Ee._`!${r} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ee.nil;o.number&&delete o.integer;for(let a in o)i=Ee.and(i,el(a,r,e,n));return i}jt.checkDataTypes=tl;var Fy={message:({schema:t})=>Ee.str`should be ${t}`,params:({schema:t,schemaValue:r})=>typeof t=="string"?Ee._`{type: ${t}}`:Ee._`{type: ${r}}`};function rl(t){let r=Ty(t);Cy.reportError(r,Fy)}jt.reportTypeError=rl;function Ty(t){let{gen:r,data:e,schema:n}=t,i=dc.schemaRefOrVal(t,n,"type");return{gen:r,keyword:"type",data:e,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var wo=fe(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.getData=void 0;var gc=zi(),vs=ut(),Eo=ko(),vt=Pe(),nl=Wr(),Oy=ui(),il=class{constructor(r,e,n){if(Ry(r,e,n),this.gen=r.gen,this.allErrors=r.allErrors,this.keyword=n,this.data=r.data,this.schema=r.schema[n],this.$data=e.$data&&r.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=vs.schemaRefOrVal(r,this.schema,n,this.$data),this.schemaType=e.schemaType,this.parentSchema=r.schema,this.params={},this.it=r,this.def=e,this.$data)this.schemaCode=r.gen.const("vSchema",yc(this.$data,r));else if(this.schemaCode=this.schemaValue,!Ny(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:e.errors!==!1)&&(this.errsCount=r.gen.const("_errs",nl.default.errors))}result(r,e,n){this.gen.if(vt.not(r)),n?n():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(r,e){this.result(r,void 0,e)}fail(r){if(r===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(r),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(r){if(!this.$data)return this.fail(r);let{schemaCode:e}=this;this.fail(vt._`${e} !== undefined && (${vt.or(this.invalid$data(),r)})`)}error(r){(r?Eo.reportExtraError:Eo.reportError)(this,this.def.error)}$dataError(){Eo.reportError(this,this.def.$dataError||Eo.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');Eo.resetErrorsCount(this.gen,this.errsCount)}ok(r){this.allErrors||this.gen.if(r)}setParams(r,e){e?Object.assign(this.params,r):this.params=r}block$data(r,e,n=vt.nil){this.gen.block(()=>{this.check$data(r,n),e()})}check$data(r=vt.nil,e=vt.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if(vt.or(vt._`${i} === undefined`,e)),r!==vt.nil&&n.assign(r,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),r!==vt.nil&&n.assign(r,!1)),n.else()}invalid$data(){let{gen:r,schemaCode:e,schemaType:n,def:i,it:o}=this;return vt.or(a(),u());function a(){if(n.length){if(!(e instanceof vt.Name))throw new Error("ajv implementation error");let f=Array.isArray(n)?n:[n];return vt._`${gc.checkDataTypes(f,e,o.opts.strict,gc.DataType.Wrong)}`}return vt.nil}function u(){if(i.validateSchema){let f=r.scopeValue("validate$data",{ref:i.validateSchema});return vt._`!${f}(${e})`}return vt.nil}}subschema(r,e){return Oy.applySubschema(this.it,r,e)}mergeEvaluated(r,e){let{it:n,gen:i}=this;!n.opts.unevaluated||(n.props!==!0&&r.props!==void 0&&(n.props=vs.mergeEvaluated.props(i,r.props,n.props,e)),n.items!==!0&&r.items!==void 0&&(n.items=vs.mergeEvaluated.items(i,r.items,n.items,e)))}mergeValidEvaluated(r,e){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(e,()=>this.mergeEvaluated(r,vt.Name)),!0}};Ao.default=il;function Ny(t,r,e=!1){return!r.length||r.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||e&&typeof t>"u")}function Ry({schema:t,opts:r,self:e},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let o=n.dependencies;if(o!=null&&o.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[i])){let u="keyword value is invalid: "+e.errorsText(n.validateSchema.errors);if(r.validateSchema==="log")e.logger.error(u);else throw new Error(u)}}var Dy=/^\/(?:[^~]|~0|~1)*$/,Ly=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function yc(t,{dataLevel:r,dataNames:e,dataPathArr:n}){let i,o;if(t==="")return nl.default.rootData;if(t[0]==="/"){if(!Dy.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=nl.default.rootData}else{let m=Ly.exec(t);if(!m)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+m[1];if(i=m[2],i==="#"){if(p>=r)throw new Error(f("property/index",p));return n[r-p]}if(p>r)throw new Error(f("data",p));if(o=e[r-p],!i)return o}let a=o,u=i.split("/");for(let m of u)m&&(o=vt._`${o}${vt.getProperty(vs.unescapeJsonPointer(m))}`,a=vt._`${a} && ${o}`);return a;function f(m,p){return`Cannot access ${m} ${p} levels up, current level is ${r}`}}Ao.getData=yc});var xs=fe((Ui,$c)=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.MissingRefError=Ui.ValidationError=void 0;var ol=_o(),ks=class extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}};Ui.ValidationError=ks;var ws=class extends Error{constructor(r,e,n){super(n||`can't resolve reference ${e} from id ${r}`),this.missingRef=ol.resolveUrl(r,e),this.missingSchema=ol.normalizeId(ol.getFullPath(this.missingRef))}};Ui.MissingRefError=ws;$c.exports={ValidationError:ks,MissingRefError:ws}});var ll=fe(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.resolveSchema=Tr.getCompilingSchema=Tr.resolveRef=Tr.compileSchema=Tr.SchemaEnv=void 0;var Qr=Pe(),jy=xs(),ci=Wr(),Zr=_o(),bc=ut(),qy=wr(),By=Za(),Hi=class{constructor(r){var e;this.refs={},this.dynamicAnchors={};let n;typeof r.schema=="object"&&(n=r.schema),this.schema=r.schema,this.root=r.root||this,this.baseId=(e=r.baseId)!==null&&e!==void 0?e:Zr.normalizeId(n==null?void 0:n.$id),this.localRefs=r.localRefs,this.meta=r.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Tr.SchemaEnv=Hi;function al(t){let r=vc.call(this,t);if(r)return r;let e=Zr.getFullPath(t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new Qr.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;t.$async&&(u=a.scopeValue("Error",{ref:jy.ValidationError,code:Qr._`require("ajv/dist/compile/error_classes").ValidationError`}));let f=a.scopeName("validate");t.validateName=f;let m={gen:a,allErrors:this.opts.allErrors,data:ci.default.data,parentData:ci.default.parentData,parentDataProperty:ci.default.parentDataProperty,dataNames:[ci.default.data],dataPathArr:[Qr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:Qr.stringify(t.schema)}:{ref:t.schema}),validateName:f,ValidationError:u,schema:t.schema,schemaEnv:t,rootId:e,baseId:t.baseId||e,schemaPath:Qr.nil,errSchemaPath:this.opts.jtd?"":"#",errorPath:Qr._`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),qy.validateFunctionCode(m),a.optimize(this.opts.code.optimize);let $=a.toString();p=`${a.scopeRefs(ci.default.scope)}return ${$}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let v=new Function(`${ci.default.self}`,`${ci.default.scope}`,p)(this,this.scope.get());if(this.scope.value(f,{ref:v}),v.errors=null,v.schema=t.schema,v.schemaEnv=t,t.$async&&(v.$async=!0),this.opts.code.source===!0&&(v.source={validateName:f,validateCode:$,scopeValues:a._values}),this.opts.unevaluated){let{props:x,items:I}=m;v.evaluated={props:x instanceof Qr.Name?void 0:x,items:I instanceof Qr.Name?void 0:I,dynamicProps:x instanceof Qr.Name,dynamicItems:I instanceof Qr.Name},v.source&&(v.source.evaluated=Qr.stringify(v.evaluated))}return t.validate=v,t}catch($){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),$}finally{this._compilations.delete(t)}}Tr.compileSchema=al;function My(t,r,e){var n;e=Zr.resolveUrl(r,e);let i=t.refs[e];if(i)return i;let o=Uy.call(this,t,e);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[e];a&&(o=new Hi({schema:a,root:t,baseId:r}))}if(o!==void 0)return t.refs[e]=zy.call(this,o)}Tr.resolveRef=My;function zy(t){return Zr.inlineRef(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:al.call(this,t)}function vc(t){for(let r of this._compilations)if(Vy(r,t))return r}Tr.getCompilingSchema=vc;function Vy(t,r){return t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId}function Uy(t,r){let e;for(;typeof(e=this.refs[r])=="string";)r=e;return e||this.schemas[r]||_s.call(this,t,r)}function _s(t,r){let e=By.parse(r),n=Zr._getFullPath(e),i=Zr.getFullPath(t.baseId);if(Object.keys(t.schema).length>0&&n===i)return sl.call(this,e,t);let o=Zr.normalizeId(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=_s.call(this,t,a);return typeof(u==null?void 0:u.schema)!="object"?void 0:sl.call(this,e,u)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||al.call(this,a),o===Zr.normalizeId(r)){let{schema:u}=a;return u.$id&&(i=Zr.resolveUrl(i,u.$id)),new Hi({schema:u,root:t,baseId:i})}return sl.call(this,e,a)}}Tr.resolveSchema=_s;var Hy=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function sl(t,{baseId:r,schema:e,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof e=="boolean"||(e=e[bc.unescapeFragment(a)],e===void 0))return;!Hy.has(a)&&typeof e=="object"&&e.$id&&(r=Zr.resolveUrl(r,e.$id))}let o;if(typeof e!="boolean"&&e.$ref&&!bc.schemaHasRulesButRef(e,this.RULES)){let a=Zr.resolveUrl(r,e.$ref);o=_s.call(this,n,a)}if(o=o||new Hi({schema:e,root:n,baseId:r}),o.schema!==o.root.schema)return o}});var kc=fe((aw,Ky)=>{Ky.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Ec=fe(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.CodeGen=qt.Name=qt.nil=qt.stringify=qt.str=qt._=qt.KeywordCxt=void 0;var Wy=wo();qt.KeywordCxt=Wy.default;var Ki=Pe();Object.defineProperty(qt,"_",{enumerable:!0,get:function(){return Ki._}});Object.defineProperty(qt,"str",{enumerable:!0,get:function(){return Ki.str}});Object.defineProperty(qt,"stringify",{enumerable:!0,get:function(){return Ki.stringify}});Object.defineProperty(qt,"nil",{enumerable:!0,get:function(){return Ki.nil}});Object.defineProperty(qt,"Name",{enumerable:!0,get:function(){return Ki.Name}});Object.defineProperty(qt,"CodeGen",{enumerable:!0,get:function(){return Ki.CodeGen}});var cl=xs(),Gy=Ca(),So=ll(),Qy=Pe(),Cs=_o(),Es=zi(),fl=ut(),wc=kc(),Zy=["removeAdditional","useDefaults","coerceTypes"],Jy=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Xy={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",schemaId:"JSON Schema draft-04 is not supported in Ajv v7.",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",strictNumbers:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key."},Yy={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function e$(t){var r,e,n,i,o,a,u,f,m,p,$,k;let v=(r=t.strict)!==null&&r!==void 0?r:!0,x=v?"log":!1,I=(e=t.code)===null||e===void 0?void 0:e.optimize,D=I===!0||I===void 0?1:I||0;return{strict:v,strictTypes:(n=t.strictTypes)!==null&&n!==void 0?n:x,strictTuples:(i=t.strictTuples)!==null&&i!==void 0?i:x,code:t.code?{...t.code,optimize:D}:{optimize:D},loopRequired:(o=t.loopRequired)!==null&&o!==void 0?o:1/0,loopEnum:(a=t.loopEnum)!==null&&a!==void 0?a:1/0,meta:(u=t.meta)!==null&&u!==void 0?u:!0,messages:(f=t.messages)!==null&&f!==void 0?f:!0,inlineRefs:(m=t.inlineRefs)!==null&&m!==void 0?m:!0,addUsedSchema:(p=t.addUsedSchema)!==null&&p!==void 0?p:!0,validateSchema:($=t.validateSchema)!==null&&$!==void 0?$:!0,validateFormats:(k=t.validateFormats)!==null&&k!==void 0?k:!0}}var Po=class{constructor(r={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,r=this.opts={...r,...e$(r)};let{es5:e,lines:n}=this.opts.code;this.scope=new Qy.ValueScope({scope:{},prefixes:Jy,es5:e,lines:n}),this.logger=s$(r.logger);let i=r.validateFormats;r.validateFormats=!1,this.RULES=Gy.getRules(),xc.call(this,Xy,r,"NOT SUPPORTED"),xc.call(this,Yy,r,"DEPRECATED","warn"),this._metaOpts=i$.call(this),r.formats&&r$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),r.keywords&&n$.call(this,r.keywords),typeof r.meta=="object"&&this.addMetaSchema(r.meta),t$.call(this),r.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:r,meta:e}=this.opts;e&&r&&this.addMetaSchema(wc,wc.$id,!1)}defaultMeta(){let{meta:r}=this.opts;return this.opts.defaultMeta=typeof r=="object"?r.$id||r:void 0}validate(r,e){let n;if(typeof r=="string"){if(n=this.getSchema(r),!n)throw new Error(`no schema with key or ref "${r}"`)}else n=this.compile(r);let i=n(e);return"$async"in n||(this.errors=n.errors),i}compile(r,e){let n=this._addSchema(r,e);return n.validate||this._compileSchemaEnv(n)}compileAsync(r,e){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,r,e);async function i(p,$){await o.call(this,p.$schema);let k=this._addSchema(p,$);return k.validate||a.call(this,k)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function a(p){try{return this._compileSchemaEnv(p)}catch($){if(!($ instanceof cl.MissingRefError))throw $;return u.call(this,$),await f.call(this,$.missingSchema),a.call(this,p)}}function u({missingSchema:p,missingRef:$}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${$} cannot be resolved`)}async function f(p){let $=await m.call(this,p);this.refs[p]||await o.call(this,$.$schema),this.refs[p]||this.addSchema($,p,e)}async function m(p){let $=this._loading[p];if($)return $;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(r,e,n,i=this.opts.validateSchema){if(Array.isArray(r)){for(let a of r)this.addSchema(a,void 0,n,i);return this}let o;if(typeof r=="object"&&(o=r.$id,o!==void 0&&typeof o!="string"))throw new Error("schema id must be string");return e=Cs.normalizeId(e||o),this._checkUnique(e),this.schemas[e]=this._addSchema(r,n,i,!0),this}addMetaSchema(r,e,n=this.opts.validateSchema){return this.addSchema(r,e,!0,n),this}validateSchema(r,e){if(typeof r=="boolean")return!0;let n;if(n=r.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,r);if(!i&&e){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(r){let e;for(;typeof(e=_c.call(this,r))=="string";)r=e;if(e===void 0){let n=new So.SchemaEnv({schema:{}});if(e=So.resolveSchema.call(this,n,r),!e)return;this.refs[r]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(r){if(r instanceof RegExp)return this._removeAllSchemas(this.schemas,r),this._removeAllSchemas(this.refs,r),this;switch(typeof r){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let e=_c.call(this,r);return typeof e=="object"&&this._cache.delete(e.schema),delete this.schemas[r],delete this.refs[r],this}case"object":{let e=r;this._cache.delete(e);let n=r.$id;return n&&(n=Cs.normalizeId(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(r){for(let e of r)this.addKeyword(e);return this}addKeyword(r,e){let n;if(typeof r=="string")n=r,typeof e=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=n);else if(typeof r=="object"&&e===void 0){if(e=r,n=e.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(l$.call(this,n,e),!e)return fl.eachItem(n,o=>ul.call(this,o)),this;f$.call(this,e);let i={...e,type:Es.getJSONTypes(e.type),schemaType:Es.getJSONTypes(e.schemaType)};return fl.eachItem(n,i.type.length===0?o=>ul.call(this,o,i):o=>i.type.forEach(a=>ul.call(this,o,i,a))),this}getKeyword(r){let e=this.RULES.all[r];return typeof e=="object"?e.definition:!!e}removeKeyword(r){let{RULES:e}=this;delete e.keywords[r],delete e.all[r];for(let n of e.rules){let i=n.rules.findIndex(o=>o.keyword===r);i>=0&&n.rules.splice(i,1)}return this}addFormat(r,e){return typeof e=="string"&&(e=new RegExp(e)),this.formats[r]=e,this}errorsText(r=this.errors,{separator:e=", ",dataVar:n="data"}={}){return!r||r.length===0?"No errors":r.map(i=>`${n}${i.dataPath} ${i.message}`).reduce((i,o)=>i+e+o)}$dataMetaSchema(r,e){let n=this.RULES.all;r=JSON.parse(JSON.stringify(r));for(let i of e){let o=i.split("/").slice(1),a=r;for(let u of o)a=a[u];for(let u in n){let f=n[u];if(typeof f!="object")continue;let{$data:m}=f.definition,p=a[u];m&&p&&(a[u]=Cc(p))}}return r}_removeAllSchemas(r,e){for(let n in r){let i=r[n];(!e||e.test(n))&&(typeof i=="string"?delete r[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete r[n]))}}_addSchema(r,e,n=this.opts.validateSchema,i=this.opts.addUsedSchema){if(typeof r!="object"){if(this.opts.jtd)throw new Error("schema must be object");if(typeof r!="boolean")throw new Error("schema must be object or boolean")}let o=this._cache.get(r);if(o!==void 0)return o;let a=Cs.getSchemaRefs.call(this,r);o=new So.SchemaEnv({schema:r,meta:e,localRefs:a}),this._cache.set(o.schema,o);let u=o.baseId;return i&&!u.startsWith("#")&&(u&&this._checkUnique(u),this.refs[u]=o),n&&this.validateSchema(r,!0),o}_checkUnique(r){if(this.schemas[r]||this.refs[r])throw new Error(`schema with key or id "${r}" already exists`)}_compileSchemaEnv(r){if(r.meta?this._compileMetaSchema(r):So.compileSchema.call(this,r),!r.validate)throw new Error("ajv implementation error");return r.validate}_compileMetaSchema(r){let e=this.opts;this.opts=this._metaOpts;try{So.compileSchema.call(this,r)}finally{this.opts=e}}};qt.default=Po;Po.ValidationError=cl.ValidationError;Po.MissingRefError=cl.MissingRefError;function xc(t,r,e,n="error"){for(let i in t){let o=i;o in r&&this.logger[n](`${e}: option ${i}. ${t[o]}`)}}function _c(t){return t=Cs.normalizeId(t),this.schemas[t]||this.refs[t]}function t$(){let t=this.opts.schemas;if(!!t)if(Array.isArray(t))this.addSchema(t);else for(let r in t)this.addSchema(t[r],r)}function r$(){for(let t in this.opts.formats){let r=this.opts.formats[t];r&&this.addFormat(t,r)}}function n$(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let r in t){let e=t[r];e.keyword||(e.keyword=r),this.addKeyword(e)}}function i$(){let t={...this.opts};for(let r of Zy)delete t[r];return t}var o$={log(){},warn(){},error(){}};function s$(t){if(t===!1)return o$;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var a$=/^[a-z_$][a-z0-9_$:-]*$/i;function l$(t,r){let{RULES:e}=this;if(fl.eachItem(t,n=>{if(e.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!a$.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!r&&r.$data&&!("code"in r||"validate"in r))throw new Error('$data keyword must have "code" or "validate" function')}function ul(t,r,e){var n;let i=r==null?void 0:r.post;if(e&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:f})=>f===e);if(a||(a={type:e,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!r)return;let u={keyword:t,definition:{...r,type:Es.getJSONTypes(r.type),schemaType:Es.getJSONTypes(r.schemaType)}};r.before?u$.call(this,a,u,r.before):a.rules.push(u),o.all[t]=u,(n=r.implements)===null||n===void 0||n.forEach(f=>this.addKeyword(f))}function u$(t,r,e){let n=t.rules.findIndex(i=>i.keyword===e);n>=0?t.rules.splice(n,0,r):(t.rules.push(r),this.logger.warn(`rule ${e} is not defined`))}function f$(t){let{metaSchema:r}=t;r!==void 0&&(t.$data&&this.opts.$data&&(r=Cc(r)),t.validateSchema=this.compile(r,!0))}var c$={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Cc(t){return{anyOf:[t,c$]}}});var Ac=fe(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var p$={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};pl.default=p$});var Fc=fe(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.callRef=pi.getValidate=void 0;var d$=xs(),Sc=Gr(),gr=Pe(),Wi=Wr(),Pc=ll(),As=ut(),m$={keyword:"$ref",schemaType:"string",code(t){let{gen:r,schema:e,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:f}=n;if(e==="#"||e==="#/")return p();let m=Pc.resolveRef.call(f,o.root,i,e);if(m===void 0)throw new d$.MissingRefError(i,e);if(m instanceof Pc.SchemaEnv)return $(m);return k(m);function p(){if(o===o.root)return Ss(t,a,o,o.$async);let v=r.scopeValue("root",{ref:o.root});return Ss(t,gr._`${v}.validate`,o.root,o.root.$async)}function $(v){let x=Ic(t,v);Ss(t,x,v,v.$async)}function k(v){let x=r.scopeValue("schema",u.code.source===!0?{ref:v,code:gr.stringify(v)}:{ref:v}),I=r.name("valid"),D=t.subschema({schema:v,dataTypes:[],schemaPath:gr.nil,topSchemaRef:x,errSchemaPath:e},I);t.mergeEvaluated(D),t.ok(I)}}};function Ic(t,r){let{gen:e}=t;return r.validate?e.scopeValue("validate",{ref:r.validate}):gr._`${e.scopeValue("wrapper",{ref:r})}.validate`}pi.getValidate=Ic;function Ss(t,r,e,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:u,opts:f}=o,m=f.passContext?Wi.default.this:gr.nil;n?p():$();function p(){if(!u.$async)throw new Error("async schema referenced by sync schema");let x=i.let("valid");i.try(()=>{i.code(gr._`await ${Sc.callValidateCode(t,r,m)}`),v(r),a||i.assign(x,!0)},I=>{i.if(gr._`!(${I} instanceof ${o.ValidationError})`,()=>i.throw(I)),k(I),a||i.assign(x,!1)}),t.ok(x)}function $(){t.result(Sc.callValidateCode(t,r,m),()=>v(r),()=>k(r))}function k(x){let I=gr._`${x}.errors`;i.assign(Wi.default.vErrors,gr._`${Wi.default.vErrors} === null ? ${I} : ${Wi.default.vErrors}.concat(${I})`),i.assign(Wi.default.errors,gr._`${Wi.default.vErrors}.length`)}function v(x){var I;if(!o.opts.unevaluated)return;let D=(I=e==null?void 0:e.validate)===null||I===void 0?void 0:I.evaluated;if(o.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(o.props=As.mergeEvaluated.props(i,D.props,o.props));else{let R=i.var("props",gr._`${x}.evaluated.props`);o.props=As.mergeEvaluated.props(i,R,o.props,gr.Name)}if(o.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(o.items=As.mergeEvaluated.items(i,D.items,o.items));else{let R=i.var("items",gr._`${x}.evaluated.items`);o.items=As.mergeEvaluated.items(i,R,o.items,gr.Name)}}}pi.callRef=Ss;pi.default=m$});var Tc=fe(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var h$=Ac(),g$=Fc(),y$=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",h$.default,g$.default];dl.default=y$});var Oc=fe(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var Ps=Pe(),qn=Ps.operators,Is={maximum:{okStr:"<=",ok:qn.LTE,fail:qn.GT},minimum:{okStr:">=",ok:qn.GTE,fail:qn.LT},exclusiveMaximum:{okStr:"<",ok:qn.LT,fail:qn.GTE},exclusiveMinimum:{okStr:">",ok:qn.GT,fail:qn.LTE}},$$={message:({keyword:t,schemaCode:r})=>Ps.str`should be ${Is[t].okStr} ${r}`,params:({keyword:t,schemaCode:r})=>Ps._`{comparison: ${Is[t].okStr}, limit: ${r}}`},b$={keyword:Object.keys(Is),type:"number",schemaType:"number",$data:!0,error:$$,code(t){let{keyword:r,data:e,schemaCode:n}=t;t.fail$data(Ps._`${e} ${Is[r].fail} ${n} || isNaN(${e})`)}};ml.default=b$});var Nc=fe(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var Io=Pe(),v$={message:({schemaCode:t})=>Io.str`should be multiple of ${t}`,params:({schemaCode:t})=>Io._`{multipleOf: ${t}}`},k$={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:v$,code(t){let{gen:r,data:e,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=r.let("res"),u=o?Io._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:Io._`${a} !== parseInt(${a})`;t.fail$data(Io._`(${n} === 0 || (${a} = ${e}/${n}, ${u}))`)}};hl.default=k$});var Rc=fe(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});function w$(t){let r=t.length,e=0,n=0,i;for(;n<r;)e++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<r&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return e}gl.default=w$});var Dc=fe(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var Bn=Pe(),x$=Rc(),_$={message({keyword:t,schemaCode:r}){let e=t==="maxLength"?"more":"fewer";return Bn.str`should NOT have ${e} than ${r} characters`},params:({schemaCode:t})=>Bn._`{limit: ${t}}`},C$={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:_$,code(t){let{keyword:r,data:e,schemaCode:n,it:i}=t,o=r==="maxLength"?Bn.operators.GT:Bn.operators.LT,a;if(i.opts.unicode===!1)a=Bn._`${e}.length`;else{let u=t.gen.scopeValue("func",{ref:x$.default,code:Bn._`require("ajv/dist/compile/ucs2length").default`});a=Bn._`${u}(${e})`}t.fail$data(Bn._`${a} ${o} ${n}`)}};yl.default=C$});var Lc=fe($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var E$=Gr(),Fs=Pe(),A$={message:({schemaCode:t})=>Fs.str`should match pattern "${t}"`,params:({schemaCode:t})=>Fs._`{pattern: ${t}}`},S$={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:A$,code(t){let{gen:r,data:e,$data:n,schema:i,schemaCode:o}=t,a=n?Fs._`(new RegExp(${o}, "u"))`:E$.usePattern(r,i);t.fail$data(Fs._`!${a}.test(${e})`)}};$l.default=S$});var jc=fe(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var Fo=Pe(),P$={message({keyword:t,schemaCode:r}){let e=t==="maxProperties"?"more":"fewer";return Fo.str`should NOT have ${e} than ${r} items`},params:({schemaCode:t})=>Fo._`{limit: ${t}}`},I$={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:P$,code(t){let{keyword:r,data:e,schemaCode:n}=t,i=r==="maxProperties"?Fo.operators.GT:Fo.operators.LT;t.fail$data(Fo._`Object.keys(${e}).length ${i} ${n}`)}};bl.default=I$});var qc=fe(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var To=Gr(),Oo=Pe(),F$=wr(),T$={message:({params:{missingProperty:t}})=>Oo.str`should have required property '${t}'`,params:({params:{missingProperty:t}})=>Oo._`{missingProperty: ${t}}`},O$={keyword:"required",type:"object",schemaType:"array",$data:!0,error:T$,code(t){let{gen:r,schema:e,schemaCode:n,data:i,$data:o,it:a}=t,{opts:u}=a;if(!o&&e.length===0)return;let f=e.length>=u.loopRequired;if(a.allErrors?m():p(),u.strictRequired){let v=t.parentSchema.properties,{definedProperties:x}=t.it;for(let I of e)if((v==null?void 0:v[I])===void 0&&!x.has(I)){let D=a.schemaEnv.baseId+a.errSchemaPath,R=`required property "${I}" is not defined at "${D}" (strictRequired)`;F$.checkStrictMode(a,R,a.opts.strictRequired)}}function m(){if(f||o)t.block$data(Oo.nil,$);else for(let v of e)To.checkReportMissingProp(t,v)}function p(){let v=r.let("missing");if(f||o){let x=r.let("valid",!0);t.block$data(x,()=>k(v,x)),t.ok(x)}else r.if(To.checkMissingProp(t,e,v)),To.reportMissingProp(t,v),r.else()}function $(){r.forOf("prop",n,v=>{t.setParams({missingProperty:v}),r.if(To.noPropertyInData(r,i,v,u.ownProperties),()=>t.error())})}function k(v,x){t.setParams({missingProperty:v}),r.forOf(v,n,()=>{r.assign(x,To.propertyInData(r,i,v,u.ownProperties)),r.if(Oo.not(x),()=>{t.error(),r.break()})},Oo.nil)}}};vl.default=O$});var Bc=fe(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var No=Pe(),N$={message({keyword:t,schemaCode:r}){let e=t==="maxItems"?"more":"fewer";return No.str`should NOT have ${e} than ${r} items`},params:({schemaCode:t})=>No._`{limit: ${t}}`},R$={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:N$,code(t){let{keyword:r,data:e,schemaCode:n}=t,i=r==="maxItems"?No.operators.GT:No.operators.LT;t.fail$data(No._`${e}.length ${i} ${n}`)}};kl.default=R$});var Mc=fe(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var wl=zi(),It=Pe(),D$=xo(),L$={message:({params:{i:t,j:r}})=>It.str`should NOT have duplicate items (items ## ${r} and ${t} are identical)`,params:({params:{i:t,j:r}})=>It._`{i: ${t}, j: ${r}}`},j$={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:L$,code(t){let{gen:r,data:e,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=t;if(!n&&!i)return;let f=r.let("valid"),m=o.items?wl.getSchemaTypes(o.items):[];t.block$data(f,p,It._`${a} === false`),t.ok(f);function p(){let x=r.let("i",It._`${e}.length`),I=r.let("j");t.setParams({i:x,j:I}),r.assign(f,!0),r.if(It._`${x} > 1`,()=>($()?k:v)(x,I))}function $(){return m.length>0&&!m.some(x=>x==="object"||x==="array")}function k(x,I){let D=r.name("item"),R=wl.checkDataTypes(m,D,u.opts.strict,wl.DataType.Wrong),X=r.const("indices",It._`{}`);r.for(It._`;${x}--;`,()=>{r.let(D,It._`${e}[${x}]`),r.if(R,It._`continue`),m.length>1&&r.if(It._`typeof ${D} == "string"`,It._`${D} += "_"`),r.if(It._`typeof ${X}[${D}] == "number"`,()=>{r.assign(I,It._`${X}[${D}]`),t.error(),r.assign(f,!1).break()}).code(It._`${X}[${D}] = ${x}`)})}function v(x,I){let D=t.gen.scopeValue("func",{ref:D$,code:It._`require("ajv/dist/compile/equal")`}),R=r.name("outer");r.label(R).for(It._`;${x}--;`,()=>r.for(It._`${I} = ${x}; ${I}--;`,()=>r.if(It._`${D}(${e}[${x}], ${e}[${I}])`,()=>{t.error(),r.assign(f,!1).break(R)})))}}};xl.default=j$});var zc=fe(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var _l=Pe(),q$=xo(),B$={message:"should be equal to constant",params:({schemaCode:t})=>_l._`{allowedValue: ${t}}`},M$={keyword:"const",$data:!0,error:B$,code(t){let r=t.gen.scopeValue("func",{ref:q$,code:_l._`require("ajv/dist/compile/equal")`});t.fail$data(_l._`!${r}(${t.data}, ${t.schemaCode})`)}};Cl.default=M$});var Vc=fe(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var Gi=Pe(),z$=xo(),V$={message:"should be equal to one of the allowed values",params:({schemaCode:t})=>Gi._`{allowedValues: ${t}}`},U$={keyword:"enum",schemaType:"array",$data:!0,error:V$,code(t){let{gen:r,data:e,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,f=t.gen.scopeValue("func",{ref:z$,code:Gi._`require("ajv/dist/compile/equal")`}),m;if(u||n)m=r.let("valid"),t.block$data(m,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let k=r.const("vSchema",o);m=Gi.or(...i.map((v,x)=>$(k,x)))}t.pass(m);function p(){r.assign(m,!1),r.forOf("v",o,k=>r.if(Gi._`${f}(${e}, ${k})`,()=>r.assign(m,!0).break()))}function $(k,v){let x=i[v];return x&&typeof x=="object"?Gi._`${f}(${e}, ${k}[${v}])`:Gi._`${e} === ${x}`}}};El.default=U$});var Uc=fe(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var H$=Oc(),K$=Nc(),W$=Dc(),G$=Lc(),Q$=jc(),Z$=qc(),J$=Bc(),X$=Mc(),Y$=zc(),eb=Vc(),tb=[H$.default,K$.default,W$.default,G$.default,Q$.default,Z$.default,J$.default,X$.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Y$.default,eb.default];Al.default=tb});var Hc=fe(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var di=Pe(),rb=ui(),nb=ut(),ib=wr(),ob={message:({params:{len:t}})=>di.str`should NOT have more than ${t} items`,params:({params:{len:t}})=>di._`{limit: ${t}}`},sb={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:ob,code(t){let{gen:r,schema:e,parentSchema:n,data:i,it:o}=t,{items:a}=n;if(!Array.isArray(a)){ib.checkStrictMode(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}o.items=!0;let u=r.const("len",di._`${i}.length`);if(e===!1)t.setParams({len:a.length}),t.pass(di._`${u} <= ${a.length}`);else if(typeof e=="object"&&!nb.alwaysValidSchema(o,e)){let m=r.var("valid",di._`${u} <= ${a.length}`);r.if(di.not(m),()=>f(m)),t.ok(m)}function f(m){r.forRange("i",a.length,u,p=>{t.subschema({keyword:"additionalItems",dataProp:p,dataPropType:rb.Type.Num},m),o.allErrors||r.if(di.not(m),()=>r.break())})}}};Sl.default=sb});var Wc=fe(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var Kc=Pe(),Pl=ut(),ab=wr(),lb=Gr(),ub={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{gen:r,schema:e,it:n}=t;if(Array.isArray(e))n.opts.unevaluated&&e.length&&n.items!==!0&&(n.items=Pl.mergeEvaluated.items(r,e.length,n.items)),i(e);else{if(n.items=!0,Pl.alwaysValidSchema(n,e))return;t.ok(lb.validateArray(t))}function i(o){let{parentSchema:a,data:u}=t;if(n.opts.strictTuples&&!fb(o.length,a)){let p=`"items" is ${o.length}-tuple, but minItems or maxItems/additionalItems are not specified or different`;ab.checkStrictMode(n,p,n.opts.strictTuples)}let f=r.name("valid"),m=r.const("len",Kc._`${u}.length`);o.forEach((p,$)=>{Pl.alwaysValidSchema(n,p)||(r.if(Kc._`${m} > ${$}`,()=>t.subschema({keyword:"items",schemaProp:$,dataProp:$},f)),t.ok(f))})}}};function fb(t,r){return t===r.minItems&&(t===r.maxItems||r.additionalItems===!1)}Il.default=ub});var Qc=fe(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Jr=Pe(),cb=ui(),pb=ut(),Gc=wr(),db={message:({params:{min:t,max:r}})=>r===void 0?Jr.str`should contain at least ${t} valid item(s)`:Jr.str`should contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>r===void 0?Jr._`{minContains: ${t}}`:Jr._`{minContains: ${t}, maxContains: ${r}}`},mb={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:db,code(t){let{gen:r,schema:e,parentSchema:n,data:i,it:o}=t,a,u,{minContains:f,maxContains:m}=n;o.opts.next?(a=f===void 0?1:f,u=m):a=1;let p=r.const("len",Jr._`${i}.length`);if(t.setParams({min:a,max:u}),u===void 0&&a===0){Gc.checkStrictMode(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){Gc.checkStrictMode(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if(pb.alwaysValidSchema(o,e)){let x=Jr._`${p} >= ${a}`;u!==void 0&&(x=Jr._`${x} && ${p} <= ${u}`),t.pass(x);return}o.items=!0;let $=r.name("valid");if(u===void 0&&a===1)k($,()=>r.if($,()=>r.break()));else{r.let($,!1);let x=r.name("_valid"),I=r.let("count",0);k(x,()=>r.if(x,()=>v(I)))}t.result($,()=>t.reset());function k(x,I){r.forRange("i",0,p,D=>{t.subschema({keyword:"contains",dataProp:D,dataPropType:cb.Type.Num,compositeRule:!0},x),I()})}function v(x){r.code(Jr._`${x}++`),u===void 0?r.if(Jr._`${x} >= ${a}`,()=>r.assign($,!0).break()):(r.if(Jr._`${x} > ${u}`,()=>r.assign($,!1).break()),a===1?r.assign($,!0):r.if(Jr._`${x} >= ${a}`,()=>r.assign($,!0)))}}};Fl.default=mb});var Xc=fe(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.validateSchemaDeps=cn.validatePropertyDeps=cn.error=void 0;var Tl=Pe(),hb=ut(),Ro=Gr();cn.error={message:({params:{property:t,depsCount:r,deps:e}})=>{let n=r===1?"property":"properties";return Tl.str`should have ${n} ${e} when property ${t} is present`},params:({params:{property:t,depsCount:r,deps:e,missingProperty:n}})=>Tl._`{property: ${t},
|
|
6
|
-
missingProperty: ${n},
|
|
7
|
-
depsCount: ${r},
|
|
8
|
-
deps: ${e}}`};var gb={keyword:"dependencies",type:"object",schemaType:"object",error:cn.error,code(t){let[r,e]=yb(t);Zc(t,r),Jc(t,e)}};function yb({schema:t}){let r={},e={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?r:e;i[n]=t[n]}return[r,e]}function Zc(t,r=t.schema){let{gen:e,data:n,it:i}=t;if(Object.keys(r).length===0)return;let o=e.let("missing");for(let a in r){let u=r[a];if(u.length===0)continue;let f=Ro.propertyInData(e,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?e.if(f,()=>{for(let m of u)Ro.checkReportMissingProp(t,m)}):(e.if(Tl._`${f} && (${Ro.checkMissingProp(t,u,o)})`),Ro.reportMissingProp(t,o),e.else())}}cn.validatePropertyDeps=Zc;function Jc(t,r=t.schema){let{gen:e,data:n,keyword:i,it:o}=t,a=e.name("valid");for(let u in r)hb.alwaysValidSchema(o,r[u])||(e.if(Ro.propertyInData(e,n,u,o.opts.ownProperties),()=>{let f=t.subschema({keyword:i,schemaProp:u},a);t.mergeValidEvaluated(f,a)},()=>e.var(a,!0)),t.ok(a))}cn.validateSchemaDeps=Jc;cn.default=gb});var Yc=fe(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});var Ol=Pe(),$b=ut(),bb={message:({params:t})=>Ol.str`property name '${t.propertyName}' is invalid`,params:({params:t})=>Ol._`{propertyName: ${t.propertyName}}`},vb={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:bb,code(t){let{gen:r,schema:e,data:n,it:i}=t;if($b.alwaysValidSchema(i,e))return;let o=r.name("valid");r.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),r.if(Ol.not(o),()=>{t.error(!0),i.allErrors||r.break()})}),t.ok(o)}};Nl.default=vb});var Ll=fe(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var Ts=Gr(),Xr=Pe(),kb=Wr(),wb=ui(),Rl=ut(),xb={message:"should NOT have additional properties",params:({params:t})=>Xr._`{additionalProperty: ${t.additionalProperty}}`},_b={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:xb,code(t){let{gen:r,schema:e,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:f}=a;if(a.props=!0,f.removeAdditional!=="all"&&Rl.alwaysValidSchema(a,e))return;let m=Ts.allSchemaProperties(n.properties),p=Ts.allSchemaProperties(n.patternProperties);$(),t.ok(Xr._`${o} === ${kb.default.errors}`);function $(){r.forIn("key",i,D=>{!m.length&&!p.length?x(D):r.if(k(D),()=>x(D))})}function k(D){let R;if(m.length>8){let X=Rl.schemaRefOrVal(a,n.properties,"properties");R=Ts.isOwnProperty(r,X,D)}else m.length?R=Xr.or(...m.map(X=>Xr._`${D} === ${X}`)):R=Xr.nil;return p.length&&(R=Xr.or(R,...p.map(X=>Xr._`${Ts.usePattern(r,X)}.test(${D})`))),Xr.not(R)}function v(D){r.code(Xr._`delete ${i}[${D}]`)}function x(D){if(f.removeAdditional==="all"||f.removeAdditional&&e===!1){v(D);return}if(e===!1){t.setParams({additionalProperty:D}),t.error(),u||r.break();return}if(typeof e=="object"&&!Rl.alwaysValidSchema(a,e)){let R=r.name("valid");f.removeAdditional==="failing"?(I(D,R,!1),r.if(Xr.not(R),()=>{t.reset(),v(D)})):(I(D,R),u||r.if(Xr.not(R),()=>r.break()))}}function I(D,R,X){let ee={keyword:"additionalProperties",dataProp:D,dataPropType:wb.Type.Str};X===!1&&Object.assign(ee,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(ee,R)}}};Dl.default=_b});var rp=fe(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var Cb=wo(),ep=Gr(),jl=ut(),tp=Ll(),Eb={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:r,schema:e,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&tp.default.code(new Cb.default(o,tp.default,"additionalProperties"));let a=ep.allSchemaProperties(e);for(let $ of a)o.definedProperties.add($);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=jl.mergeEvaluated.props(r,jl.toHash(a),o.props));let u=a.filter($=>!jl.alwaysValidSchema(o,e[$]));if(u.length===0)return;let f=r.name("valid");for(let $ of u)m($)?p($):(r.if(ep.propertyInData(r,i,$,o.opts.ownProperties)),p($),o.allErrors||r.else().var(f,!0),r.endIf()),t.it.definedProperties.add($),t.ok(f);function m($){return o.opts.useDefaults&&!o.compositeRule&&e[$].default!==void 0}function p($){t.subschema({keyword:"properties",schemaProp:$,dataProp:$},f)}}};ql.default=Eb});var ip=fe(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var np=Gr(),Os=Pe(),Ab=ui(),Sb=wr(),Pb=ut(),Ib={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:r,schema:e,data:n,parentSchema:i,it:o}=t,{opts:a}=o,u=np.schemaProperties(o,e);if(u.length===0)return;let f=a.strict&&!a.allowMatchingProperties&&i.properties,m=r.name("valid");o.props!==!0&&!(o.props instanceof Os.Name)&&(o.props=Pb.evaluatedPropsToName(r,o.props));let{props:p}=o;$();function $(){for(let x of u)f&&k(x),o.allErrors?v(x):(r.var(m,!0),v(x),r.if(m))}function k(x){for(let I in f)new RegExp(x).test(I)&&Sb.checkStrictMode(o,`property ${I} matches pattern ${x} (use allowMatchingProperties)`)}function v(x){r.forIn("key",n,I=>{r.if(Os._`${np.usePattern(r,x)}.test(${I})`,()=>{t.subschema({keyword:"patternProperties",schemaProp:x,dataProp:I,dataPropType:Ab.Type.Str},m),o.opts.unevaluated&&p!==!0?r.assign(Os._`${p}[${I}]`,!0):o.allErrors||r.if(Os.not(m),()=>r.break())})})}}};Bl.default=Ib});var op=fe(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var Fb=ut(),Tb={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:r,schema:e,it:n}=t;if(Fb.alwaysValidSchema(n,e)){t.fail();return}let i=r.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.result(i,()=>t.error(),()=>t.reset())},error:{message:"should NOT be valid"}};Ml.default=Tb});var sp=fe(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var Ob=Gr(),Nb={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ob.validateUnion,error:{message:"should match some schema in anyOf"}};zl.default=Nb});var ap=fe(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var Ns=Pe(),Rb=ut(),Db={message:"should match exactly one schema in oneOf",params:({params:t})=>Ns._`{passingSchemas: ${t.passing}}`},Lb={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Db,code(t){let{gen:r,schema:e,it:n}=t;if(!Array.isArray(e))throw new Error("ajv implementation error");let i=e,o=r.let("valid",!1),a=r.let("passing",null),u=r.name("_valid");t.setParams({passing:a}),r.block(f),t.result(o,()=>t.reset(),()=>t.error(!0));function f(){i.forEach((m,p)=>{let $;Rb.alwaysValidSchema(n,m)?r.var(u,!0):$=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&r.if(Ns._`${u} && ${o}`).assign(o,!1).assign(a,Ns._`[${a}, ${p}]`).else(),r.if(u,()=>{r.assign(o,!0),r.assign(a,p),$&&t.mergeEvaluated($,Ns.Name)})})}}};Vl.default=Lb});var lp=fe(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var jb=ut(),qb={keyword:"allOf",schemaType:"array",code(t){let{gen:r,schema:e,it:n}=t;if(!Array.isArray(e))throw new Error("ajv implementation error");let i=r.name("valid");e.forEach((o,a)=>{if(jb.alwaysValidSchema(n,o))return;let u=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(u)})}};Ul.default=qb});var fp=fe(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var Rs=Pe(),Bb=ut(),Mb=wr(),zb={message:({params:t})=>Rs.str`should match "${t.ifClause}" schema`,params:({params:t})=>Rs._`{failingKeyword: ${t.ifClause}}`},Vb={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:zb,code(t){let{gen:r,parentSchema:e,it:n}=t;e.then===void 0&&e.else===void 0&&Mb.checkStrictMode(n,'"if" without "then" and "else" is ignored');let i=up(n,"then"),o=up(n,"else");if(!i&&!o)return;let a=r.let("valid",!0),u=r.name("_valid");if(f(),t.reset(),i&&o){let p=r.let("ifClause");t.setParams({ifClause:p}),r.if(u,m("then",p),m("else",p))}else i?r.if(u,m("then")):r.if(Rs.not(u),m("else"));t.pass(a,()=>t.error(!0));function f(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);t.mergeEvaluated(p)}function m(p,$){return()=>{let k=t.subschema({keyword:p},u);r.assign(a,u),t.mergeValidEvaluated(k,a),$?r.assign($,Rs._`${p}`):t.setParams({ifClause:p})}}}};function up(t,r){let e=t.schema[r];return e!==void 0&&!Bb.alwaysValidSchema(t,e)}Hl.default=Vb});var cp=fe(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var Ub=wr(),Hb={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:e}){r.if===void 0&&Ub.checkStrictMode(e,`"${t}" without "if" is ignored`)}};Kl.default=Hb});var pp=fe(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var Kb=Hc(),Wb=Wc(),Gb=Qc(),Qb=Xc(),Zb=Yc(),Jb=Ll(),Xb=rp(),Yb=ip(),ev=op(),tv=sp(),rv=ap(),nv=lp(),iv=fp(),ov=cp(),sv=[ev.default,tv.default,rv.default,nv.default,iv.default,ov.default,Kb.default,Wb.default,Gb.default,Zb.default,Jb.default,Qb.default,Xb.default,Yb.default];Wl.default=sv});var dp=fe(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var kt=Pe(),av={message:({schemaCode:t})=>kt.str`should match format "${t}"`,params:({schemaCode:t})=>kt._`{format: ${t}}`},lv={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:av,code(t,r){let{gen:e,data:n,$data:i,schema:o,schemaCode:a,it:u}=t,{opts:f,errSchemaPath:m,schemaEnv:p,self:$}=u;if(!f.validateFormats)return;i?k():v();function k(){let x=e.scopeValue("formats",{ref:$.formats,code:f.code.formats}),I=e.const("fDef",kt._`${x}[${a}]`),D=e.let("fType"),R=e.let("format");e.if(kt._`typeof ${I} == "object" && !(${I} instanceof RegExp)`,()=>e.assign(D,kt._`${I}.type || "string"`).assign(R,kt._`${I}.validate`),()=>e.assign(D,kt._`"string"`).assign(R,I)),t.fail$data(kt.or(X(),ee()));function X(){return f.strict===!1?kt.nil:kt._`${a} && !${R}`}function ee(){let de=p.$async?kt._`(${I}.async ? await ${R}(${n}) : ${R}(${n}))`:kt._`${R}(${n})`,ce=kt._`(typeof ${R} == "function" ? ${de} : ${R}.test(${n}))`;return kt._`${R} && ${R} !== true && ${D} === ${r} && !${ce}`}}function v(){let x=$.formats[o];if(!x){X();return}if(x===!0)return;let[I,D,R]=ee(x);I===r&&t.pass(de());function X(){if(f.strict===!1){$.logger.warn(ce());return}throw new Error(ce());function ce(){return`unknown format "${o}" ignored in schema at path "${m}"`}}function ee(ce){let Q=e.scopeValue("formats",{key:o,ref:ce,code:f.code.formats?kt._`${f.code.formats}${kt.getProperty(o)}`:void 0});return typeof ce=="object"&&!(ce instanceof RegExp)?[ce.type||"string",ce.validate,kt._`${Q}.validate`]:["string",ce,Q]}function de(){if(typeof x=="object"&&!(x instanceof RegExp)&&x.async){if(!p.$async)throw new Error("async format in sync schema");return kt._`await ${R}(${n})`}return typeof D=="function"?kt._`${R}(${n})`:kt._`${R}.test(${n})`}}}};Gl.default=lv});var mp=fe(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var uv=dp(),fv=[uv.default];Ql.default=fv});var hp=fe(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.contentVocabulary=Qi.metadataVocabulary=void 0;Qi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var yp=fe(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var cv=Tc(),pv=Uc(),dv=pp(),mv=mp(),gp=hp(),hv=[cv.default,pv.default,dv.default,mv.default,gp.metadataVocabulary,gp.contentVocabulary];Zl.default=hv});var $p=fe((Vw,gv)=>{gv.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var vp=fe(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.CodeGen=Bt.Name=Bt.nil=Bt.stringify=Bt.str=Bt._=Bt.KeywordCxt=void 0;var yv=wo();Bt.KeywordCxt=yv.default;var Zi=Pe();Object.defineProperty(Bt,"_",{enumerable:!0,get:function(){return Zi._}});Object.defineProperty(Bt,"str",{enumerable:!0,get:function(){return Zi.str}});Object.defineProperty(Bt,"stringify",{enumerable:!0,get:function(){return Zi.stringify}});Object.defineProperty(Bt,"nil",{enumerable:!0,get:function(){return Zi.nil}});Object.defineProperty(Bt,"Name",{enumerable:!0,get:function(){return Zi.Name}});Object.defineProperty(Bt,"CodeGen",{enumerable:!0,get:function(){return Zi.CodeGen}});var $v=Ec(),bv=yp(),bp=$p(),vv=["/properties"],Ds="http://json-schema.org/draft-07/schema",Jl=class extends $v.default{_addVocabularies(){super._addVocabularies(),bv.default.forEach(r=>this.addVocabulary(r))}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let r=this.opts.$data?this.$dataMetaSchema(bp,vv):bp;this.addMetaSchema(r,Ds,!1),this.refs["http://json-schema.org/schema"]=Ds}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ds)?Ds:void 0)}};Bt.default=Jl});var wp=fe((Hw,kp)=>{var kv=Object.prototype.hasOwnProperty,wv=Object.prototype.toString;kp.exports=function(r,e,n){if(wv.call(e)!=="[object Function]")throw new TypeError("iterator must be a function");var i=r.length;if(i===+i)for(var o=0;o<i;o++)e.call(n,r[o],o,r);else for(var a in r)kv.call(r,a)&&e.call(n,r[a],a,r)}});var _p=fe((Kw,xp)=>{"use strict";var xv=wp();xp.exports=Ye;function Ye(t,r,e){if(arguments.length===3)return Ye.set(t,r,e);if(arguments.length===2)return Ye.get(t,r);var n=Ye.bind(Ye,t);for(var i in Ye)Ye.hasOwnProperty(i)&&(n[i]=Ye[i].bind(n,t));return n}Ye.get=function(r,e){for(var n=Array.isArray(e)?e:Ye.parse(e),i=0;i<n.length;++i){var o=n[i];if(!(typeof r=="object"&&o in r))throw new Error("Invalid reference token: "+o);r=r[o]}return r};Ye.set=function(r,e,n){var i=Array.isArray(e)?e:Ye.parse(e),o=i[0];if(i.length===0)throw Error("Can not set the root object");for(var a=0;a<i.length-1;++a){var u=i[a];u==="__proto__"||u==="constructor"||u==="prototype"||(u==="-"&&Array.isArray(r)&&(u=r.length),o=i[a+1],u in r||(o.match(/^(\d+|-)$/)?r[u]=[]:r[u]={}),r=r[u])}return o==="-"&&Array.isArray(r)&&(o=r.length),r[o]=n,this};Ye.remove=function(t,r){var e=Array.isArray(r)?r:Ye.parse(r),n=e[e.length-1];if(n===void 0)throw new Error('Invalid JSON pointer for remove: "'+r+'"');var i=Ye.get(t,e.slice(0,-1));if(Array.isArray(i)){var o=+n;if(n===""&&isNaN(o))throw new Error('Invalid array index: "'+n+'"');Array.prototype.splice.call(i,o,1)}else delete i[n]};Ye.dict=function(r,e){var n={};return Ye.walk(r,function(i,o){n[o]=i},e),n};Ye.walk=function(r,e,n){var i=[];n=n||function(o){var a=Object.prototype.toString.call(o);return a==="[object Object]"||a==="[object Array]"},function o(a){xv(a,function(u,f){i.push(String(f)),n(u)?o(u):e(u,Ye.compile(i)),i.pop()})}(r)};Ye.has=function(r,e){try{Ye.get(r,e)}catch{return!1}return!0};Ye.escape=function(r){return r.toString().replace(/~/g,"~0").replace(/\//g,"~1")};Ye.unescape=function(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")};Ye.parse=function(r){if(r==="")return[];if(r.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+r);return r.substring(1).split(/\//).map(Ye.unescape)};Ye.compile=function(r){return r.length===0?"":"/"+r.map(Ye.escape).join("/")}});var Cp=fe((Ww,_v)=>{_v.exports={type:"object",properties:{ters:{type:"string"}},required:["ters"],$schema:"http://json-schema.org/draft-07/schema#"}});var Ep=fe((Gw,Cv)=>{Cv.exports={$ref:"#/definitions/AstTree",definitions:{Image:{type:"object",properties:{type:{type:"string",enum:["image"]},src:{type:"string"},alt:{type:"string"}},required:["src","type"]},Toc:{type:"object",properties:{type:{type:"string",enum:["toc"]},title:{type:"string"},content:{$ref:"#/definitions/TocList"}},required:["content","type"]},TocList:{type:"object",properties:{type:{type:"string",enum:["toc-list"]},level:{type:"number"},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/TocList"},{$ref:"#/definitions/TocItem"}]}}},required:["content","level","type"]},TocItem:{type:"object",properties:{type:{type:"string",enum:["toc-item"]},node:{$ref:"#/definitions/PodNode"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}}},required:["content","node","type"]},PodNode:{anyOf:[{$ref:"#/definitions/Image"},{$ref:"#/definitions/Toc"},{$ref:"#/definitions/BlockImage"},{$ref:"#/definitions/BlockCaption"},{$ref:"#/definitions/RootBlock"},{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{$ref:"#/definitions/Ambient"},{$ref:"#/definitions/Verbatim"},{$ref:"#/definitions/Text"},{$ref:"#/definitions/Para"},{$ref:"#/definitions/Code"},{$ref:"#/definitions/BlankLine"},{$ref:"#/definitions/List"},{$ref:"#/definitions/BlockConfig"},{$ref:"#/definitions/Alias"},{$ref:"#/definitions/Separator"},{$ref:"#/definitions/BlockPod"},{$ref:"#/definitions/BlockData"},{$ref:"#/definitions/BlockComment"},{$ref:"#/definitions/BlockDefn"},{$ref:"#/definitions/BlockItem"},{$ref:"#/definitions/BlockOutput"},{$ref:"#/definitions/BlockInput"},{$ref:"#/definitions/BlockPara"},{$ref:"#/definitions/BlockCode"},{$ref:"#/definitions/BlockNested"},{$ref:"#/definitions/BlockHead"},{$ref:"#/definitions/BlockTable"},{$ref:"#/definitions/BlockNamed"},{type:"string"}]},BlockImage:{type:"object",properties:{name:{type:"string",enum:["image"]},caption:{type:"string"},link:{type:"string"},content:{type:"array",items:[{$ref:"#/definitions/Image"},{$ref:"#/definitions/BlockCaption"}],minItems:2,maxItems:2},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockCaption:{type:"object",properties:{name:{type:"string",enum:["caption"]},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},type:{type:"string",enum:["block"]}},required:["content","name","type"]},Location:{type:"object",properties:{start:{$ref:"#/definitions/Position"},end:{$ref:"#/definitions/Position"}},required:["end","start"]},Position:{type:"object",properties:{line:{type:"number"},column:{type:"number"},offset:{type:"number"}},required:["column","line","offset"]},BrokenConfigItem:{type:"object",properties:{name:{type:"string"},value:{anyOf:[{$ref:"#/definitions/ConfigItemKV"},{type:"array",items:{type:["string","number","boolean"]}},{type:["string","number","boolean"]}]}},required:["name","value"]},ConfigItemKV:{type:"object",additionalProperties:{type:["string","number","boolean"]}},ConfigItem:{type:"object",properties:{name:{type:"string"},value:{anyOf:[{$ref:"#/definitions/ConfigItemKV"},{type:"array",items:{type:["string","number","boolean"]}},{type:["string","number","boolean"]}]},type:{type:"string"}},required:["name","type","value"]},RootBlock:{type:"object",properties:{name:{type:"string",enum:["root"]},content:{$ref:"#/definitions/AstTree"},type:{type:"string",enum:["block"]},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","margin","name","type"]},AstTree:{type:"array",items:{$ref:"#/definitions/PodNode"}},FormattingCodeB:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["B"]},content:{type:"array",items:{$ref:"#/definitions/PodNode"}}},required:["name","type"]},FormattingCodeC:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["C"]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{type:"string"}]}}},required:["name","type"]},FormattingCodeE:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["E"]},content:{type:"array",items:{type:"object",properties:{type:{type:"string",enum:["number"]},value:{type:"number"}},required:["type","value"]}}},required:["content","name","type"]},FormattingCodeN:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["N"]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{type:"string"}]}}},required:["name","type"]},FormattingCodeX:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["X"]},entry:{anyOf:[{type:"array",items:{type:"string"}},{type:"null"}]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{type:"string"}]}}},required:["entry","name","type"]},FormattingCodeZ:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["Z"]},content:{type:"string"}},required:["name","type"]},FormattingCodeV:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["V"]},content:{type:"string"}},required:["name","type"]},FormattingCodeS:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["S"]},content:{anyOf:[{$ref:"#/definitions/Text"},{type:"string"}]}},required:["name","type"]},Text:{type:"object",properties:{type:{type:"string",enum:["text"]},value:{type:"string"}},required:["type","value"]},FormattingCodeA:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["A"]},content:{anyOf:[{$ref:"#/definitions/Text"},{type:"string"}]}},required:["content","name","type"]},FormattingCodeD:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["D"]},synonyms:{type:"array",items:{type:"string"}},content:{type:"string"}},required:["content","name","synonyms","type"]},FormattingCodeL:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["L"]},meta:{type:["null","string"]},content:{anyOf:[{$ref:"#/definitions/Text"},{type:"string"}]}},required:["content","meta","name","type"]},FormattingCodeI:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["I"]},meta:{type:"string"},content:{anyOf:[{$ref:"#/definitions/Text"},{type:"string"}]}},required:["content","meta","name","type"]},FormattingCodeAny:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string"},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{type:"string"}]}}},required:["name","type"]},Ambient:{type:"object",properties:{type:{type:"string",enum:["ambient"]},text:{type:"string"},location:{$ref:"#/definitions/Location"}},required:["location","text","type"]},Verbatim:{type:"object",properties:{type:{type:"string",enum:["verbatim"]},value:{type:"string"}},required:["type","value"]},Para:{type:"object",properties:{type:{type:"string",enum:["para"]},text:{type:"string"},margin:{type:"string"},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/Image"},{$ref:"#/definitions/Toc"},{$ref:"#/definitions/BlockImage"},{$ref:"#/definitions/BlockCaption"},{$ref:"#/definitions/RootBlock"},{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{$ref:"#/definitions/Ambient"},{$ref:"#/definitions/Verbatim"},{$ref:"#/definitions/Text"},{$ref:"#/definitions/Para"},{$ref:"#/definitions/Code"},{$ref:"#/definitions/BlankLine"},{$ref:"#/definitions/List"},{$ref:"#/definitions/BlockConfig"},{$ref:"#/definitions/Alias"},{$ref:"#/definitions/Separator"},{$ref:"#/definitions/BlockPod"},{$ref:"#/definitions/BlockData"},{$ref:"#/definitions/BlockComment"},{$ref:"#/definitions/BlockDefn"},{$ref:"#/definitions/BlockItem"},{$ref:"#/definitions/BlockOutput"},{$ref:"#/definitions/BlockInput"},{$ref:"#/definitions/BlockPara"},{$ref:"#/definitions/BlockCode"},{$ref:"#/definitions/BlockNested"},{$ref:"#/definitions/BlockHead"},{$ref:"#/definitions/BlockTable"},{$ref:"#/definitions/BlockNamed"},{type:"string"}]}}},required:["content","location","margin","text","type"]},Code:{type:"object",properties:{type:{type:"string",enum:["code"]},text:{type:"string"},margin:{type:"string"},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/Verbatim"},{type:"string"}]}}},required:["content","location","margin","text","type"]},BlankLine:{type:"object",properties:{type:{type:"string",enum:["blankline"]}},required:["type"]},List:{type:"object",properties:{type:{type:"string",enum:["list"]},level:{type:["string","number"]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/BlankLine"},{$ref:"#/definitions/List"},{$ref:"#/definitions/BlockItem"}]}},list:{type:"string",enum:["itemized"]}},required:["content","level","list","type"]},BlockItem:{type:"object",properties:{name:{type:"string",enum:["item"]},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},level:{type:["string","number"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","level","location","margin","name","type"]},BlockConfig:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["config"]},config:{type:"array",items:{$ref:"#/definitions/ConfigItem"}},margin:{type:"string"}},required:["config","margin","name","type"]},Alias:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["alias"]},replacement:{type:"array",items:{type:"string"}},margin:{type:"string"}},required:["margin","name","replacement","type"]},Separator:{type:"object",properties:{type:{type:"string",enum:["separator"]},text:{type:"string"}},required:["text","type"]},BlockPod:{type:"object",properties:{name:{type:"string",enum:["pod"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockData:{type:"object",properties:{name:{type:"string",enum:["data"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockComment:{type:"object",properties:{name:{type:"string",enum:["comment"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockDefn:{type:"object",properties:{name:{type:"string",enum:["defn"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockOutput:{type:"object",properties:{name:{type:"string",enum:["output"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockInput:{type:"object",properties:{name:{type:"string",enum:["input"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockPara:{type:"object",properties:{name:{type:"string",enum:["para"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockCode:{type:"object",properties:{name:{type:"string",enum:["code"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockNested:{type:"object",properties:{name:{type:"string",enum:["nested"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockHead:{type:"object",properties:{name:{type:"string",enum:["head"]},level:{type:["string","number"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","level","location","margin","name","type"]},BlockTable:{type:"object",properties:{name:{type:"string",enum:["table"]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/BlankLine"},{$ref:"#/definitions/TableRow"},{$ref:"#/definitions/TableHead"},{$ref:"#/definitions/TableSeparator"}]}},text:{type:"string"},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},TableRow:{type:"object",properties:{name:{type:"string",enum:["table_row"]},type:{type:"string",enum:["block"]},content:{type:"array",items:{$ref:"#/definitions/TableCell"}}},required:["content","name","type"]},TableCell:{type:"object",properties:{name:{type:"string",enum:["table_cell"]},type:{type:"string",enum:["block"]},content:{type:"array",items:{type:"string"}}},required:["content","name","type"]},TableHead:{type:"object",properties:{name:{type:"string",enum:["table_head"]},type:{type:"string",enum:["block"]},content:{type:"array",items:{$ref:"#/definitions/TableCell"}}},required:["content","name","type"]},TableSeparator:{type:"object",properties:{type:{type:"string",enum:["separator"]},text:{type:"string"}},required:["text","type"]},BlockNamed:{type:"object",properties:{name:{type:"string"},content:{anyOf:[{$ref:"#/definitions/RootBlock"},{type:"array",items:[{anyOf:[{$ref:"#/definitions/Verbatim"},{$ref:"#/definitions/Para"},{$ref:"#/definitions/Code"}]}],minItems:0,maxItems:1},{type:"array",items:{anyOf:[{$ref:"#/definitions/Image"},{$ref:"#/definitions/BlockCaption"}]}}]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]}},$schema:"http://json-schema.org/draft-07/schema#"}});var Ap=fe((Qw,Ev)=>{Ev.exports={$ref:"#/definitions/RootBlock",definitions:{Image:{type:"object",properties:{type:{type:"string",enum:["image"]},src:{type:"string"},alt:{type:"string"}},required:["src","type"]},Toc:{type:"object",properties:{type:{type:"string",enum:["toc"]},title:{type:"string"},content:{$ref:"#/definitions/TocList"}},required:["content","type"]},TocList:{type:"object",properties:{type:{type:"string",enum:["toc-list"]},level:{type:"number"},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/TocList"},{$ref:"#/definitions/TocItem"}]}}},required:["content","level","type"]},TocItem:{type:"object",properties:{type:{type:"string",enum:["toc-item"]},node:{$ref:"#/definitions/PodNode"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}}},required:["content","node","type"]},PodNode:{anyOf:[{$ref:"#/definitions/Image"},{$ref:"#/definitions/Toc"},{$ref:"#/definitions/BlockImage"},{$ref:"#/definitions/BlockCaption"},{$ref:"#/definitions/RootBlock"},{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{$ref:"#/definitions/Ambient"},{$ref:"#/definitions/Verbatim"},{$ref:"#/definitions/Text"},{$ref:"#/definitions/Para"},{$ref:"#/definitions/Code"},{$ref:"#/definitions/BlankLine"},{$ref:"#/definitions/List"},{$ref:"#/definitions/BlockConfig"},{$ref:"#/definitions/Alias"},{$ref:"#/definitions/Separator"},{$ref:"#/definitions/BlockPod"},{$ref:"#/definitions/BlockData"},{$ref:"#/definitions/BlockComment"},{$ref:"#/definitions/BlockDefn"},{$ref:"#/definitions/BlockItem"},{$ref:"#/definitions/BlockOutput"},{$ref:"#/definitions/BlockInput"},{$ref:"#/definitions/BlockPara"},{$ref:"#/definitions/BlockCode"},{$ref:"#/definitions/BlockNested"},{$ref:"#/definitions/BlockHead"},{$ref:"#/definitions/BlockTable"},{$ref:"#/definitions/BlockNamed"},{type:"string"}]},BlockImage:{type:"object",properties:{name:{type:"string",enum:["image"]},caption:{type:"string"},link:{type:"string"},content:{type:"array",items:[{$ref:"#/definitions/Image"},{$ref:"#/definitions/BlockCaption"}],minItems:2,maxItems:2},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockCaption:{type:"object",properties:{name:{type:"string",enum:["caption"]},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},type:{type:"string",enum:["block"]}},required:["content","name","type"]},Location:{type:"object",properties:{start:{$ref:"#/definitions/Position"},end:{$ref:"#/definitions/Position"}},required:["end","start"]},Position:{type:"object",properties:{line:{type:"number"},column:{type:"number"},offset:{type:"number"}},required:["column","line","offset"]},BrokenConfigItem:{type:"object",properties:{name:{type:"string"},value:{anyOf:[{$ref:"#/definitions/ConfigItemKV"},{type:"array",items:{type:["string","number","boolean"]}},{type:["string","number","boolean"]}]}},required:["name","value"]},ConfigItemKV:{type:"object",additionalProperties:{type:["string","number","boolean"]}},ConfigItem:{type:"object",properties:{name:{type:"string"},value:{anyOf:[{$ref:"#/definitions/ConfigItemKV"},{type:"array",items:{type:["string","number","boolean"]}},{type:["string","number","boolean"]}]},type:{type:"string"}},required:["name","type","value"]},RootBlock:{type:"object",properties:{name:{type:"string",enum:["root"]},content:{$ref:"#/definitions/AstTree"},type:{type:"string",enum:["block"]},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","margin","name","type"]},AstTree:{type:"array",items:{$ref:"#/definitions/PodNode"}},FormattingCodeB:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["B"]},content:{type:"array",items:{$ref:"#/definitions/PodNode"}}},required:["name","type"]},FormattingCodeC:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["C"]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{type:"string"}]}}},required:["name","type"]},FormattingCodeE:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["E"]},content:{type:"array",items:{type:"object",properties:{type:{type:"string",enum:["number"]},value:{type:"number"}},required:["type","value"]}}},required:["content","name","type"]},FormattingCodeN:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["N"]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{type:"string"}]}}},required:["name","type"]},FormattingCodeX:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["X"]},entry:{anyOf:[{type:"array",items:{type:"string"}},{type:"null"}]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{type:"string"}]}}},required:["entry","name","type"]},FormattingCodeZ:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["Z"]},content:{type:"string"}},required:["name","type"]},FormattingCodeV:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["V"]},content:{type:"string"}},required:["name","type"]},FormattingCodeS:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["S"]},content:{anyOf:[{$ref:"#/definitions/Text"},{type:"string"}]}},required:["name","type"]},Text:{type:"object",properties:{type:{type:"string",enum:["text"]},value:{type:"string"}},required:["type","value"]},FormattingCodeA:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["A"]},content:{anyOf:[{$ref:"#/definitions/Text"},{type:"string"}]}},required:["content","name","type"]},FormattingCodeD:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["D"]},synonyms:{type:"array",items:{type:"string"}},content:{type:"string"}},required:["content","name","synonyms","type"]},FormattingCodeL:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["L"]},meta:{type:["null","string"]},content:{anyOf:[{$ref:"#/definitions/Text"},{type:"string"}]}},required:["content","meta","name","type"]},FormattingCodeI:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string",enum:["I"]},meta:{type:"string"},content:{anyOf:[{$ref:"#/definitions/Text"},{type:"string"}]}},required:["content","meta","name","type"]},FormattingCodeAny:{type:"object",properties:{type:{type:"string",enum:["fcode"]},name:{type:"string"},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{type:"string"}]}}},required:["name","type"]},Ambient:{type:"object",properties:{type:{type:"string",enum:["ambient"]},text:{type:"string"},location:{$ref:"#/definitions/Location"}},required:["location","text","type"]},Verbatim:{type:"object",properties:{type:{type:"string",enum:["verbatim"]},value:{type:"string"}},required:["type","value"]},Para:{type:"object",properties:{type:{type:"string",enum:["para"]},text:{type:"string"},margin:{type:"string"},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/Image"},{$ref:"#/definitions/Toc"},{$ref:"#/definitions/BlockImage"},{$ref:"#/definitions/BlockCaption"},{$ref:"#/definitions/RootBlock"},{$ref:"#/definitions/FormattingCodeB"},{$ref:"#/definitions/FormattingCodeC"},{$ref:"#/definitions/FormattingCodeE"},{$ref:"#/definitions/FormattingCodeN"},{$ref:"#/definitions/FormattingCodeX"},{$ref:"#/definitions/FormattingCodeZ"},{$ref:"#/definitions/FormattingCodeV"},{$ref:"#/definitions/FormattingCodeS"},{$ref:"#/definitions/FormattingCodeA"},{$ref:"#/definitions/FormattingCodeD"},{$ref:"#/definitions/FormattingCodeL"},{$ref:"#/definitions/FormattingCodeI"},{$ref:"#/definitions/FormattingCodeAny"},{$ref:"#/definitions/Ambient"},{$ref:"#/definitions/Verbatim"},{$ref:"#/definitions/Text"},{$ref:"#/definitions/Para"},{$ref:"#/definitions/Code"},{$ref:"#/definitions/BlankLine"},{$ref:"#/definitions/List"},{$ref:"#/definitions/BlockConfig"},{$ref:"#/definitions/Alias"},{$ref:"#/definitions/Separator"},{$ref:"#/definitions/BlockPod"},{$ref:"#/definitions/BlockData"},{$ref:"#/definitions/BlockComment"},{$ref:"#/definitions/BlockDefn"},{$ref:"#/definitions/BlockItem"},{$ref:"#/definitions/BlockOutput"},{$ref:"#/definitions/BlockInput"},{$ref:"#/definitions/BlockPara"},{$ref:"#/definitions/BlockCode"},{$ref:"#/definitions/BlockNested"},{$ref:"#/definitions/BlockHead"},{$ref:"#/definitions/BlockTable"},{$ref:"#/definitions/BlockNamed"},{type:"string"}]}}},required:["content","location","margin","text","type"]},Code:{type:"object",properties:{type:{type:"string",enum:["code"]},text:{type:"string"},margin:{type:"string"},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/Verbatim"},{type:"string"}]}}},required:["content","location","margin","text","type"]},BlankLine:{type:"object",properties:{type:{type:"string",enum:["blankline"]}},required:["type"]},List:{type:"object",properties:{type:{type:"string",enum:["list"]},level:{type:["string","number"]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/BlankLine"},{$ref:"#/definitions/List"},{$ref:"#/definitions/BlockItem"}]}},list:{type:"string",enum:["itemized"]}},required:["content","level","list","type"]},BlockItem:{type:"object",properties:{name:{type:"string",enum:["item"]},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},level:{type:["string","number"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","level","location","margin","name","type"]},BlockConfig:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["config"]},config:{type:"array",items:{$ref:"#/definitions/ConfigItem"}},margin:{type:"string"}},required:["config","margin","name","type"]},Alias:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["alias"]},replacement:{type:"array",items:{type:"string"}},margin:{type:"string"}},required:["margin","name","replacement","type"]},Separator:{type:"object",properties:{type:{type:"string",enum:["separator"]},text:{type:"string"}},required:["text","type"]},BlockPod:{type:"object",properties:{name:{type:"string",enum:["pod"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockData:{type:"object",properties:{name:{type:"string",enum:["data"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockComment:{type:"object",properties:{name:{type:"string",enum:["comment"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockDefn:{type:"object",properties:{name:{type:"string",enum:["defn"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockOutput:{type:"object",properties:{name:{type:"string",enum:["output"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockInput:{type:"object",properties:{name:{type:"string",enum:["input"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockPara:{type:"object",properties:{name:{type:"string",enum:["para"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockCode:{type:"object",properties:{name:{type:"string",enum:["code"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockNested:{type:"object",properties:{name:{type:"string",enum:["nested"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},BlockHead:{type:"object",properties:{name:{type:"string",enum:["head"]},level:{type:["string","number"]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},content:{type:"array",items:{$ref:"#/definitions/PodNode"}},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","level","location","margin","name","type"]},BlockTable:{type:"object",properties:{name:{type:"string",enum:["table"]},content:{type:"array",items:{anyOf:[{$ref:"#/definitions/BlankLine"},{$ref:"#/definitions/TableRow"},{$ref:"#/definitions/TableHead"},{$ref:"#/definitions/TableSeparator"}]}},text:{type:"string"},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]},TableRow:{type:"object",properties:{name:{type:"string",enum:["table_row"]},type:{type:"string",enum:["block"]},content:{type:"array",items:{$ref:"#/definitions/TableCell"}}},required:["content","name","type"]},TableCell:{type:"object",properties:{name:{type:"string",enum:["table_cell"]},type:{type:"string",enum:["block"]},content:{type:"array",items:{type:"string"}}},required:["content","name","type"]},TableHead:{type:"object",properties:{name:{type:"string",enum:["table_head"]},type:{type:"string",enum:["block"]},content:{type:"array",items:{$ref:"#/definitions/TableCell"}}},required:["content","name","type"]},TableSeparator:{type:"object",properties:{type:{type:"string",enum:["separator"]},text:{type:"string"}},required:["text","type"]},BlockNamed:{type:"object",properties:{name:{type:"string"},content:{anyOf:[{$ref:"#/definitions/RootBlock"},{type:"array",items:[{anyOf:[{$ref:"#/definitions/Verbatim"},{$ref:"#/definitions/Para"},{$ref:"#/definitions/Code"}]}],minItems:0,maxItems:1},{type:"array",items:{anyOf:[{$ref:"#/definitions/Image"},{$ref:"#/definitions/BlockCaption"}]}}]},type:{type:"string",enum:["block"]},location:{$ref:"#/definitions/Location"},margin:{type:"string"},config:{type:"array",items:{anyOf:[{$ref:"#/definitions/BrokenConfigItem"},{$ref:"#/definitions/ConfigItem"}]}},id:{type:"string"}},required:["content","location","margin","name","type"]}},$schema:"http://json-schema.org/draft-07/schema#"}});var Sp=fe(Ls=>{Ls.Test=Cp();Ls.AstTree=Ep();Ls.PodliteDocument=Ap()});var Ip={};mf(Ip,{is:()=>Pp,makePlug:()=>Ji,makeRule:()=>En,makeRulesArray:()=>js});function Pp(t,r){function e(i){for(var o in i)if(i.hasOwnProperty(o))return!1;return!0}if(e(t))return!0;for(var n in t)if(t===void 0&&console.warn("[pod6] undefined key!!!"),t.hasOwnProperty(n))if(r===void 0&&console.warn("[pod6] undefined node!!!"),r&&r.hasOwnProperty(n)){if(t[n]!==r[n])return!1}else return!1;return!0}var Av,Ji,En,js,Do=Ph(()=>{Av=function(t){if(t==="*:*"||t==="*")return{};if(t==="<>")return{type:"fcode"};let[r,e]=t.split(":");if(r&&e)return{name:r,type:e};if(!r)return{type:e};if(!e){let n=r.match(/(.+)\<\>/);return n?{type:"fcode",name:n[1]}:{name:r,type:"block"}}return{name:r,type:e}},Ji=t=>{let r=Av(t),{name:e,type:n}=r;return n&&n==="*"?{name:e}:e&&e==="*"?{type:n}:r};En=(t,r)=>{return e.rule=t,e.isFor=n,e.fn=r,e;function e(){}function n(i){return typeof i=="string"?!1:Pp(t,i)}},js=(t,r)=>{if(t instanceof Array)return t.reduce((n,i)=>(n.push(...js(i)),n),[]);if(t instanceof Object){let n=[];for(var e in t)t.hasOwnProperty(e)&&n.push(En(Ji(e),t[e]));return n}return[En(Ji(t),r)]}});var Zp=fe(($x,ru)=>{"use strict";var Xi=typeof Reflect=="object"?Reflect:null,Bp=Xi&&typeof Xi.apply=="function"?Xi.apply:function(r,e,n){return Function.prototype.apply.call(r,e,n)},Vs;Xi&&typeof Xi.ownKeys=="function"?Vs=Xi.ownKeys:Object.getOwnPropertySymbols?Vs=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Vs=function(r){return Object.getOwnPropertyNames(r)};function Fv(t){console&&console.warn&&console.warn(t)}var zp=Number.isNaN||function(r){return r!==r};function Je(){Je.init.call(this)}ru.exports=Je;ru.exports.once=Rv;Je.EventEmitter=Je;Je.prototype._events=void 0;Je.prototype._eventsCount=0;Je.prototype._maxListeners=void 0;var Mp=10;function Us(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Je,"defaultMaxListeners",{enumerable:!0,get:function(){return Mp},set:function(t){if(typeof t!="number"||t<0||zp(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Mp=t}});Je.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Je.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||zp(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Vp(t){return t._maxListeners===void 0?Je.defaultMaxListeners:t._maxListeners}Je.prototype.getMaxListeners=function(){return Vp(this)};Je.prototype.emit=function(r){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i=r==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var f=o[r];if(f===void 0)return!1;if(typeof f=="function")Bp(f,this,e);else for(var m=f.length,p=Gp(f,m),n=0;n<m;++n)Bp(p[n],this,e);return!0};function Up(t,r,e,n){var i,o,a;if(Us(e),o=t._events,o===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",r,e.listener?e.listener:e),o=t._events),a=o[r]),a===void 0)a=o[r]=e,++t._eventsCount;else if(typeof a=="function"?a=o[r]=n?[e,a]:[a,e]:n?a.unshift(e):a.push(e),i=Vp(t),i>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=r,u.count=a.length,Fv(u)}return t}Je.prototype.addListener=function(r,e){return Up(this,r,e,!1)};Je.prototype.on=Je.prototype.addListener;Je.prototype.prependListener=function(r,e){return Up(this,r,e,!0)};function Tv(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Hp(t,r,e){var n={fired:!1,wrapFn:void 0,target:t,type:r,listener:e},i=Tv.bind(n);return i.listener=e,n.wrapFn=i,i}Je.prototype.once=function(r,e){return Us(e),this.on(r,Hp(this,r,e)),this};Je.prototype.prependOnceListener=function(r,e){return Us(e),this.prependListener(r,Hp(this,r,e)),this};Je.prototype.removeListener=function(r,e){var n,i,o,a,u;if(Us(e),i=this._events,i===void 0)return this;if(n=i[r],n===void 0)return this;if(n===e||n.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete i[r],i.removeListener&&this.emit("removeListener",r,n.listener||e));else if(typeof n!="function"){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===e||n[a].listener===e){u=n[a].listener,o=a;break}if(o<0)return this;o===0?n.shift():Ov(n,o),n.length===1&&(i[r]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",r,u||e)}return this};Je.prototype.off=Je.prototype.removeListener;Je.prototype.removeAllListeners=function(r){var e,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var o=Object.keys(n),a;for(i=0;i<o.length;++i)a=o[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=n[r],typeof e=="function")this.removeListener(r,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(r,e[i]);return this};function Kp(t,r,e){var n=t._events;if(n===void 0)return[];var i=n[r];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?Nv(i):Gp(i,i.length)}Je.prototype.listeners=function(r){return Kp(this,r,!0)};Je.prototype.rawListeners=function(r){return Kp(this,r,!1)};Je.listenerCount=function(t,r){return typeof t.listenerCount=="function"?t.listenerCount(r):Wp.call(t,r)};Je.prototype.listenerCount=Wp;function Wp(t){var r=this._events;if(r!==void 0){var e=r[t];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}Je.prototype.eventNames=function(){return this._eventsCount>0?Vs(this._events):[]};function Gp(t,r){for(var e=new Array(r),n=0;n<r;++n)e[n]=t[n];return e}function Ov(t,r){for(;r+1<t.length;r++)t[r]=t[r+1];t.pop()}function Nv(t){for(var r=new Array(t.length),e=0;e<r.length;++e)r[e]=t[e].listener||t[e];return r}function Rv(t,r){return new Promise(function(e,n){function i(a){t.removeListener(r,o),n(a)}function o(){typeof t.removeListener=="function"&&t.removeListener("error",i),e([].slice.call(arguments))}Qp(t,r,o,{once:!0}),r!=="error"&&Dv(t,i,{once:!0})})}function Dv(t,r,e){typeof t.on=="function"&&Qp(t,"error",r,e)}function Qp(t,r,e,n){if(typeof t.on=="function")n.once?t.once(r,e):t.on(r,e);else if(typeof t.addEventListener=="function")t.addEventListener(r,function i(o){n.once&&t.removeEventListener(r,i),e(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var rd=fe((Ax,td)=>{"use strict";function Lv(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function hi(t,r,e,n){this.message=t,this.expected=r,this.found=e,this.location=n,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,hi)}Lv(hi,Error);hi.buildMessage=function(t,r){var e={literal:function(m){return'"'+i(m.text)+'"'},class:function(m){var p="",$;for($=0;$<m.parts.length;$++)p+=m.parts[$]instanceof Array?o(m.parts[$][0])+"-"+o(m.parts[$][1]):o(m.parts[$]);return"["+(m.inverted?"^":"")+p+"]"},any:function(m){return"any character"},end:function(m){return"end of input"},other:function(m){return m.description}};function n(m){return m.charCodeAt(0).toString(16).toUpperCase()}function i(m){return m.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+n(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+n(p)})}function o(m){return m.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+n(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+n(p)})}function a(m){return e[m.type](m)}function u(m){var p=new Array(m.length),$,k;for($=0;$<m.length;$++)p[$]=a(m[$]);if(p.sort(),p.length>0){for($=1,k=1;$<p.length;$++)p[$-1]!==p[$]&&(p[k]=p[$],k++);p.length=k}switch(p.length){case 1:return p[0];case 2:return p[0]+" or "+p[1];default:return p.slice(0,-1).join(", ")+", or "+p[p.length-1]}}function f(m){return m?'"'+i(m)+'"':"end of input"}return"Expected "+u(t)+" but "+f(r)+" found."};function jv(t,r){r=r!==void 0?r:{};var e={},n={Document:af},i=af,o=function(l){return l},a=function(){return!!r.podMode},u=function(l){return l},f=uh(),m=function(){return{text:Pr(),type:"ambient",location:ir()}},p=/^[ \xA0\u2001\t\f\u2008]/,$=$t([" ","\xA0","\u2001"," ","\f","\u2008"],!1,!1),k=/^[ \t\f]/,v=$t([" "," ","\f"],!1,!1),x=/^[\n\r]/,I=$t([`
|
|
9
|
-
`,"\r"],!1,!1),D=function(l){return l},R=/^[^\n\r]/,X=$t([`
|
|
10
|
-
`,"\r"],!0,!1),ee=`
|
|
11
|
-
`,de=rt(`
|
|
12
|
-
`,!1),ce="\r",Q=rt("\r",!1),me=function(){return{type:"blankline"}},ve="=begin ",ke=rt("=begin ",!1),Te="=end ",xe=rt("=end ",!1),_e="=for ",ue=rt("=for ",!1),be="=config",He=rt("=config",!1),U="=alias",at=rt("=alias",!1),Le=function(l){return wh(l)},tt=function(l){return l},Ue="=",O=rt("=",!1),N=es("text"),Mt=function(){return Pr()},wt=function(){return{type:"para",value:Pr(),error:!0,location:ir()}},it=function(l,c){return Di([l,c])},ft=function(l){return[l]},ct=",",$e=rt(",",!1),br=function(l,c){return Di([l,c])},Ct=/^[a-zA-Z0-9]/,Tt=$t([["a","z"],["A","Z"],["0","9"]],!1,!1),er=/^[a-zA-Z0-9_\-]/,ur=$t([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),zt="=>",Kn=rt("=>",!1),Pn=function(l,c){return{[l]:c}},pt=function(l,c){return{...l,...c}},dt=function(l){return l},Ot=":",mt=rt(":",!1),xt="allow",Or=rt("allow",!1),Nr="<",Rr=rt("<",!1),Dr=">",Lr=rt(">",!1),tr=function(l,c){return{value:c,type:"array"}},W=function(l,c){return{name:"allow",...c}},re=function(l){return l},ge=function(l){return l},Ae=function(l){return[l]},_t=function(){return[]},_r=/^[!]/,Me=$t(["!"],!1,!1),ot="{",ht=rt("{",!1),jr="}",Xe=rt("}",!1),tn=function(l,c,g){return{value:g}},Et="[",In=rt("[",!1),no=function(l,c,g){return g},Cr="]",Fn=rt("]",!1),Ci=function(l,c){return[Pr()]},io=function(l,c,g){return{value:g,type:"array"}},Tn=function(l,c,g){return{value:g,type:"array"}},Ei=function(l,c,g){return{value:g,type:"string"}},Wn="(",mn=rt("(",!1),oo=function(l,c,g){return g.length>1?{type:"array",value:g}:{type:"value",value:g[0]}},hn=")",T=rt(")",!1),P=function(l,c){return{value:Pr()}},q=function(l,c,g){return{type:"value",...g}},H=function(l,c){return{value:!l,type:"boolean"}},K=function(l,c,g){return{name:c,...g}},le=function(l,c){return c},we=function(l,c){return Di([...l,...c])},Se=/^[^'"]/,Ne=$t(["'",'"'],!0,!1),d=function(l){return l},ie=/^[0-9]/,je=$t([["0","9"]],!1,!1),qe=/^[\-+]/,Ke=$t(["-","+"],!1,!1),M="True",We=rt("True",!1),Be=function(){return!0},qr="False",Vt=rt("False",!1),rr=function(){return!1},he=".",lt=rt(".",!1),Ut=/^[eE]/,fr=$t(["e","E"],!1,!1),Er=/^["]/,nr=$t(['"'],!1,!1),cr=/^[^"]/,ne=$t(['"'],!0,!1),gn=/^[']/,Ar=$t(["'"],!1,!1),Sr=/^[^']/,Nt=$t(["'"],!0,!1),rn=function(l){return parseFloat(l)},Gn=function(l){return parseInt(l,10)},vr=function(l,c,g){return c.match(/code|comment|output|input|data/)||os(c)},Qn=function(l,c,g,y,w){return l.length===y.length&&c===w},Zn=function(l,c,g,y,w){return xh(l,`${y}${w}`)},On=function(l,c,g,y,w,b){return c===b},yn=function(l,c,g,y,w,b){return{type:"block",content:y===""?[]:[{type:"verbatim",value:y.join("")}],name:c,margin:l}},Br=function(l,c,g,y,w,b){return!0},Ai=function(l,c,g,y,w,b){return{...b,text:Pr(),config:g,location:ir()}},nn=/^[+-=_|]/,Jn=$t([["+","="],"_","|"],!1,!1),Mr=function(){return{type:"separator",text:Pr()}},Xn=function(){return r.isDelimited},Rt=function(){return{type:"separator",text:Pr()}},Dt=function(l){return{name:"row",type:"text",value:l}},Yn=function(){return r.separators=[],!0},$n=function(l,c){return r.separators.push(c.text),c},At=function(l,c,g,y){return r.separators.push(y.text),y},bn=function(l,c,g,y){return[{name:"row",type:"text",value:g},y]},zr=function(l,c,g){return[g]},vn=function(l,c,g){return r.separators.length>1?!r.separators.every(y=>y===r.separators[0]):!0},Si=function(l,c,g){return[{name:"head",type:"text",value:l},c,...Di(g)]},kn=function(l,c){return[{name:"row",type:"text",value:l},c]},so=function(l){return[...Di(l)]},ao=function(l,c,g){return c==="table"},Go=function(l,c,g){return r.isDelimited=!0,!0},Qo=function(l,c,g,y){return y},lo=function(l,c,g,y,w,b){return{type:"block",content:y,name:c,margin:l}},uo=function(l,c,g,y,w,b){return{...b,text:Pr(),config:g,location:ir()}},fo=function(l,c,g,y){return y},St=function(l,c,g,y,w){let b=c.match(/pod|nested|item|code|defn/)&&y.length-l.length>0?"code":"para";return{text:w,margin:y,type:b,content:[{type:b==="code"?"verbatim":"text",value:w}],location:ir()}},Ge=function(l,c,g,y,w,b){return{type:"block",content:y,name:c,margin:l}},Pi=function(l,c,g,y,w,b){return{...b,config:g,location:ir()}},rf=function(){return{text:Pr(),type:"para",margin:"",content:[{type:"text",value:Pr()}],location:ir()}},wn=function(){return{empty:1}},Vr=/^[s]/,Ur=$t(["s"],!1,!1),Ii=function(l){return{text:Pr(),type:"ambient1"}},h=function(l,c){return c.match(/code|comment|output|input|data/)||os(c)},_=function(l,c,g){return{margin:l,type:"block",content:g===""?[]:[{type:"verbatim",value:g}],name:c,config:[],location:ir()}},E=function(l,c){return c==="table"},A=function(l,c){return r.isDelimited=!1,!0},S=function(l,c,g){return{margin:l,type:"block",content:g===""?[]:g,name:c,config:[],location:ir()}},z=function(l,c,g){return{margin:l,type:"block",content:g===""?[]:[{type:"para",text:g,margin:"",content:[{type:"text",value:g}],location:ir()}],name:c,location:ir()}},G="= ",se=rt("= ",!1),Ht=function(l,c,g,y){return{name:g,type:"alias",replacement:y,margin:l}},Pt=/^[A-Z]/,pr=$t([["A","Z"]],!1,!1),nf="<>",Jm=rt("<>",!1),Xm=function(l,c,g,y){return{name:g,type:"config",config:y,margin:l}},Ym=function(l,c,g,y){return g.match(/code|comment|output|input|data/)||os(g)},eh=function(l,c,g,y,w){return{type:"block",content:w===""?[]:[{type:"verbatim",value:w}],name:g,margin:l,config:y,location:ir()}},th=function(l,c,g,y){return g==="table"},rh=function(l,c,g,y){return r.isDelimited=!1,!0},nh=function(l,c,g,y,w){return{type:"block",content:w===""?[]:w,name:g,margin:l,config:y,location:ir()}},ih=function(l,c,g,y,w){return{type:"block",content:w===""?[]:[{type:"para",content:[{type:"text",value:w}],margin:l,text:w,location:ir()}],name:g,margin:l,config:y,location:ir()}},oh=/^[a-zA-Z]/,sh=$t([["a","z"],["A","Z"]],!1,!1),ah=es("whitespace"),Zo=/^[\r\n \t\f]/,Jo=$t(["\r",`
|
|
13
|
-
`," "," ","\f"],!1,!1),lh=es("space characters"),s=0,J=0,Xo=[{line:1,column:1}],on=0,ca=[],B=0,Yo;if("startRule"in r){if(!(r.startRule in n))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');i=n[r.startRule]}function Pr(){return t.substring(J,s)}function ir(){return co(J,s)}function Fk(l,c){throw c=c!==void 0?c:co(J,s),sf([es(l)],t.substring(J,s),c)}function Tk(l,c){throw c=c!==void 0?c:co(J,s),ch(l,c)}function rt(l,c){return{type:"literal",text:l,ignoreCase:c}}function $t(l,c,g){return{type:"class",parts:l,inverted:c,ignoreCase:g}}function uh(){return{type:"any"}}function fh(){return{type:"end"}}function es(l){return{type:"other",description:l}}function of(l){var c=Xo[l],g;if(c)return c;for(g=l-1;!Xo[g];)g--;for(c=Xo[g],c={line:c.line,column:c.column};g<l;)t.charCodeAt(g)===10?(c.line++,c.column=1):c.column++,g++;return Xo[l]=c,c}function co(l,c){var g=of(l),y=of(c);return{start:{offset:l,line:g.line,column:g.column},end:{offset:c,line:y.line,column:y.column}}}function Y(l){s<on||(s>on&&(on=s,ca=[]),ca.push(l))}function ch(l,c){return new hi(l,null,null,c)}function sf(l,c,g){return new hi(hi.buildMessage(l,c),l,c,g)}function af(){var l,c,g;for(l=s,c=[],g=lf();g!==e;)c.push(g),g=lf();return c!==e&&(J=l,c=o(c)),l=c,l}function lf(){var l,c,g,y,w,b,L,V;if(l=pa(),l===e&&(l=ma(),l===e&&(l=ha(),l===e&&(l=ka(),l===e&&(l=wa(),l===e&&(l=xa(),l===e&&(l=ba(),l===e&&(l=va(),l===e&&(l=ga(),l===e&&(l=ya(),l===e&&(l=$a(),l===e&&(l=s,J=s,c=a(),c?c=void 0:c=e,c!==e?(g=bh(),g===e&&(g=sn(),g===e&&(g=mh())),g!==e?(J=l,c=u(g),l=c):(s=l,l=e)):(s=l,l=e),l===e)))))))))))){if(l=s,c=s,g=[],y=s,w=s,B++,b=s,L=xn(),L!==e?(V=Kt(),V!==e?(L=[L,V],b=L):(s=b,b=e)):(s=b,b=e),b===e&&(b=ri()),B--,b===e?w=void 0:(s=w,w=e),w!==e?(t.length>s?(b=t.charAt(s),s++):(b=e,B===0&&Y(f)),b!==e?(w=[w,b],y=w):(s=y,y=e)):(s=y,y=e),y!==e)for(;y!==e;)g.push(y),y=s,w=s,B++,b=s,L=xn(),L!==e?(V=Kt(),V!==e?(L=[L,V],b=L):(s=b,b=e)):(s=b,b=e),b===e&&(b=ri()),B--,b===e?w=void 0:(s=w,w=e),w!==e?(t.length>s?(b=t.charAt(s),s++):(b=e,B===0&&Y(f)),b!==e?(w=[w,b],y=w):(s=y,y=e)):(s=y,y=e);else g=e;g!==e?c=t.substring(c,s):c=g,c!==e&&(J=l,c=m()),l=c}return l}function bt(){var l;return p.test(t.charAt(s))?(l=t.charAt(s),s++):(l=e,B===0&&Y($)),l}function pe(){var l,c;for(l=[],k.test(t.charAt(s))?(c=t.charAt(s),s++):(c=e,B===0&&Y(v));c!==e;)l.push(c),k.test(t.charAt(s))?(c=t.charAt(s),s++):(c=e,B===0&&Y(v));return l}function ei(){var l,c,g,y;for(l=s,c=s,g=[],y=bt();y!==e;)g.push(y),y=bt();return g!==e?(x.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(I)),y!==e?(g=[g,y],c=g):(s=c,c=e)):(s=c,c=e),c!==e?l=t.substring(l,s):l=c,l}function Ok(){var l,c,g,y;if(l=s,c=s,g=[],y=po(),y!==e)for(;y!==e;)g.push(y),y=po();else g=e;return g!==e?c=t.substring(c,s):c=g,c!==e?(g=Fi(),g!==e?(J=l,c=D(c),l=c):(s=l,l=e)):(s=l,l=e),l}function po(){var l;return R.test(t.charAt(s))?(l=t.charAt(s),s++):(l=e,B===0&&Y(X)),l}function ti(){var l,c,g;return t.charCodeAt(s)===10?(l=ee,s++):(l=e,B===0&&Y(de)),l===e&&(l=s,t.charCodeAt(s)===13?(c=ce,s++):(c=e,B===0&&Y(Q)),c!==e?(t.charCodeAt(s)===10?(g=ee,s++):(g=e,B===0&&Y(de)),g===e&&(g=null),g!==e?(c=[c,g],l=c):(s=l,l=e)):(s=l,l=e)),l}function Fi(){var l,c;return l=ti(),l===e&&(l=s,B++,t.length>s?(c=t.charAt(s),s++):(c=e,B===0&&Y(f)),B--,c===e?l=void 0:(s=l,l=e)),l}function kr(){var l,c,g,y;for(l=s,c=s,g=[],y=bt();y!==e;)g.push(y),y=bt();return g!==e?(x.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(I)),y!==e?(g=[g,y],c=g):(s=c,c=e)):(s=c,c=e),c!==e?l=t.substring(l,s):l=c,l}function sn(){var l,c,g,y,w;for(l=s,c=s,g=s,y=[],w=bt();w!==e;)y.push(w),w=bt();return y!==e?(x.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(I)),w!==e?(y=[y,w],g=y):(s=g,g=e)):(s=g,g=e),g!==e?c=t.substring(c,s):c=g,c!==e&&(J=l,c=me()),l=c,l}function ts(){var l;return t.substr(s,7)===ve?(l=ve,s+=7):(l=e,B===0&&Y(ke)),l}function Ti(){var l;return t.substr(s,5)===Te?(l=Te,s+=5):(l=e,B===0&&Y(xe)),l}function rs(){var l;return t.substr(s,5)===_e?(l=_e,s+=5):(l=e,B===0&&Y(ue)),l}function ph(){var l;return t.substr(s,7)===be?(l=be,s+=7):(l=e,B===0&&Y(He)),l}function dh(){var l;return t.substr(s,6)===U?(l=U,s+=6):(l=e,B===0&&Y(at)),l}function Kt(){var l,c,g;return l=s,c=_a(),c!==e?(J=s,g=Le(c),g?g=void 0:g=e,g!==e?(J=l,c=tt(c),l=c):(s=l,l=e)):(s=l,l=e),l}function ri(){var l,c,g;return l=s,t.charCodeAt(s)===61?(c=Ue,s++):(c=e,B===0&&Y(O)),c!==e?(g=Kt(),g!==e?(J=l,c=tt(g),l=c):(s=l,l=e)):(s=l,l=e),l}function xn(){var l;return l=ts(),l===e&&(l=Ti(),l===e&&(l=rs(),l===e&&(l=ph(),l===e&&(l=dh())))),l}function an(){var l,c,g;if(B++,l=s,c=[],g=po(),g!==e)for(;g!==e;)c.push(g),g=po();else c=e;return c!==e?l=t.substring(l,s):l=c,B--,l===e&&(c=e,B===0&&Y(N)),l}function Lt(){var l,c,g,y,w,b,L;if(l=s,c=s,B++,g=s,y=pe(),y!==e?(w=s,b=xn(),b!==e?(L=Kt(),L!==e?(b=[b,L],w=b):(s=w,w=e)):(s=w,w=e),w===e&&(w=ri()),w!==e?(y=[y,w],g=y):(s=g,g=e)):(s=g,g=e),g===e&&(g=sn()),B--,g===e?c=void 0:(s=c,c=e),c!==e){if(g=s,y=[],w=an(),w!==e)for(;w!==e;)y.push(w),w=an();else y=e;y!==e?g=t.substring(g,s):g=y,g!==e?(y=Fi(),y!==e?(J=l,c=Mt(),l=c):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;return l}function mh(){var l,c,g,y,w,b;if(l=s,c=s,g=[],y=s,w=s,B++,b=Fi(),B--,b===e?w=void 0:(s=w,w=e),w!==e?(t.length>s?(b=t.charAt(s),s++):(b=e,B===0&&Y(f)),b!==e?(w=[w,b],y=w):(s=y,y=e)):(s=y,y=e),y!==e)for(;y!==e;)g.push(y),y=s,w=s,B++,b=Fi(),B--,b===e?w=void 0:(s=w,w=e),w!==e?(t.length>s?(b=t.charAt(s),s++):(b=e,B===0&&Y(f)),b!==e?(w=[w,b],y=w):(s=y,y=e)):(s=y,y=e);else g=e;return g!==e?c=t.substring(c,s):c=g,c!==e?(g=Fi(),g!==e?(J=l,c=wt(),l=c):(s=l,l=e)):(s=l,l=e),l}function uf(){var l,c,g,y;if(l=s,c=ff(),c!==e){if(g=[],y=bt(),y!==e)for(;y!==e;)g.push(y),y=bt();else g=e;g!==e?(y=uf(),y!==e?(J=l,c=it(c,y),l=c):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;return l===e&&(l=s,c=ff(),c!==e&&(J=l,c=ft(c)),l=c),l}function ff(){var l,c;return l=s,c=po(),c!==e?l=t.substring(l,s):l=c,l}function ns(){var l,c,g,y,w,b;if(l=s,c=Ni(),c!==e){if(g=[],y=bt(),y!==e)for(;y!==e;)g.push(y),y=bt();else g=e;g===e&&(g=s,y=pe(),y!==e?(t.charCodeAt(s)===44?(w=ct,s++):(w=e,B===0&&Y($e)),w!==e?(b=pe(),b!==e?(y=[y,w,b],g=y):(s=g,g=e)):(s=g,g=e)):(s=g,g=e)),g!==e?(y=ns(),y!==e?(J=l,c=br(c,y),l=c):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;return l===e&&(l=s,c=Ni(),c!==e&&(J=l,c=ft(c)),l=c),l}function hh(){var l,c,g,y,w;if(l=s,c=s,g=[],Ct.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Tt)),y!==e)for(;y!==e;)g.push(y),Ct.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Tt));else g=e;if(g!==e){for(y=[],er.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(ur));w!==e;)y.push(w),er.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(ur));y!==e?(g=[g,y],c=g):(s=c,c=e)}else s=c,c=e;return c!==e?l=t.substring(l,s):l=c,l}function cf(){var l,c,g,y,w,b;return l=s,c=hh(),c!==e?(g=pe(),g!==e?(t.charCodeAt(s)===44?(y=ct,s++):(y=e,B===0&&Y($e)),y===e&&(t.substr(s,2)===zt?(y=zt,s+=2):(y=e,B===0&&Y(Kn))),y!==e?(w=pe(),w!==e?(b=Ni(),b!==e?(J=l,c=Pn(c,b),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e),l}function pf(){var l,c,g,y,w,b;return l=s,c=cf(),c!==e?(g=pe(),g!==e?(t.charCodeAt(s)===44?(y=ct,s++):(y=e,B===0&&Y($e)),y!==e?(w=pe(),w!==e?(b=pf(),b!==e?(J=l,c=pt(c,b),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e),l===e&&(l=s,c=cf(),c!==e&&(J=l,c=dt(c)),l=c),l}function gh(){var l,c,g,y,w,b,L,V,C,F;return l=s,c=pe(),c!==e?(t.charCodeAt(s)===58?(g=Ot,s++):(g=e,B===0&&Y(mt)),g!==e?(t.substr(s,5)===xt?(y=xt,s+=5):(y=e,B===0&&Y(Or)),y!==e?(w=s,t.charCodeAt(s)===60?(b=Nr,s++):(b=e,B===0&&Y(Rr)),b!==e?(L=pe(),L!==e?(V=uf(),V!==e?(C=pe(),C!==e?(t.charCodeAt(s)===62?(F=Dr,s++):(F=e,B===0&&Y(Lr)),F!==e?(J=w,b=tr(y,V),w=b):(s=w,w=e)):(s=w,w=e)):(s=w,w=e)):(s=w,w=e)):(s=w,w=e),w!==e?(b=pe(),b!==e?(J=l,c=W(y,w),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e),l}function Nk(){var l,c,g,y,w,b;for(l=s,c=[],g=s,y=pe(),y!==e?(w=Ni(),w!==e?(b=pe(),b!==e?(J=g,y=re(w),g=y):(s=g,g=e)):(s=g,g=e)):(s=g,g=e);g!==e;)c.push(g),g=s,y=pe(),y!==e?(w=Ni(),w!==e?(b=pe(),b!==e?(J=g,y=re(w),g=y):(s=g,g=e)):(s=g,g=e)):(s=g,g=e);return c!==e&&(J=l,c=ge(c)),l=c,l===e&&(l=s,c=Ni(),c!==e&&(J=l,c=Ae(c)),l=c,l===e&&(l=s,c=pe(),c!==e&&(J=l,c=_t()),l=c)),l}function Oi(){var l,c,g,y,w,b,L,V,C,F,j,Z,te,oe;if(l=gh(),l===e)if(l=s,c=pe(),c!==e)if(t.charCodeAt(s)===58?(g=Ot,s++):(g=e,B===0&&Y(mt)),g!==e)if(_r.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Me)),y===e&&(y=null),y!==e)if(w=_a(),w!==e){if(b=s,t.charCodeAt(s)===123?(L=ot,s++):(L=e,B===0&&Y(ht)),L!==e?(V=pe(),V!==e?(C=pf(),C!==e?(F=pe(),F!==e?(t.charCodeAt(s)===125?(j=jr,s++):(j=e,B===0&&Y(Xe)),j!==e?(J=b,L=tn(y,w,C),b=L):(s=b,b=e)):(s=b,b=e)):(s=b,b=e)):(s=b,b=e)):(s=b,b=e),b===e){if(b=s,t.charCodeAt(s)===91?(L=Et,s++):(L=e,B===0&&Y(In)),L!==e)if(V=pe(),V!==e){if(C=s,F=ns(),F!==e&&(J=C,F=no(y,w,F)),C=F,C===e){if(C=s,F=s,j=[],Z=s,te=s,B++,t.charCodeAt(s)===93?(oe=Cr,s++):(oe=e,B===0&&Y(Fn)),oe===e&&(t.charCodeAt(s)===91?(oe=Et,s++):(oe=e,B===0&&Y(In))),B--,oe===e?te=void 0:(s=te,te=e),te!==e?(t.length>s?(oe=t.charAt(s),s++):(oe=e,B===0&&Y(f)),oe!==e?(te=[te,oe],Z=te):(s=Z,Z=e)):(s=Z,Z=e),Z!==e)for(;Z!==e;)j.push(Z),Z=s,te=s,B++,t.charCodeAt(s)===93?(oe=Cr,s++):(oe=e,B===0&&Y(Fn)),oe===e&&(t.charCodeAt(s)===91?(oe=Et,s++):(oe=e,B===0&&Y(In))),B--,oe===e?te=void 0:(s=te,te=e),te!==e?(t.length>s?(oe=t.charAt(s),s++):(oe=e,B===0&&Y(f)),oe!==e?(te=[te,oe],Z=te):(s=Z,Z=e)):(s=Z,Z=e);else j=e;j!==e?F=t.substring(F,s):F=j,F!==e&&(J=C,F=Ci(y,w)),C=F}C!==e?(F=pe(),F!==e?(t.charCodeAt(s)===93?(j=Cr,s++):(j=e,B===0&&Y(Fn)),j!==e?(J=b,L=io(y,w,C),b=L):(s=b,b=e)):(s=b,b=e)):(s=b,b=e)}else s=b,b=e;else s=b,b=e;if(b===e&&(b=s,t.charCodeAt(s)===60?(L=Nr,s++):(L=e,B===0&&Y(Rr)),L!==e?(V=pe(),V!==e?(C=ns(),C!==e?(F=pe(),F!==e?(t.charCodeAt(s)===62?(j=Dr,s++):(j=e,B===0&&Y(Lr)),j!==e?(J=b,L=Tn(y,w,C),b=L):(s=b,b=e)):(s=b,b=e)):(s=b,b=e)):(s=b,b=e)):(s=b,b=e),b===e)){if(b=s,t.charCodeAt(s)===60?(L=Nr,s++):(L=e,B===0&&Y(Rr)),L!==e)if(V=pe(),V!==e){if(C=s,F=[],j=s,Z=s,B++,t.charCodeAt(s)===60?(te=Nr,s++):(te=e,B===0&&Y(Rr)),te===e&&(t.charCodeAt(s)===62?(te=Dr,s++):(te=e,B===0&&Y(Lr))),B--,te===e?Z=void 0:(s=Z,Z=e),Z!==e?(t.length>s?(te=t.charAt(s),s++):(te=e,B===0&&Y(f)),te!==e?(Z=[Z,te],j=Z):(s=j,j=e)):(s=j,j=e),j!==e)for(;j!==e;)F.push(j),j=s,Z=s,B++,t.charCodeAt(s)===60?(te=Nr,s++):(te=e,B===0&&Y(Rr)),te===e&&(t.charCodeAt(s)===62?(te=Dr,s++):(te=e,B===0&&Y(Lr))),B--,te===e?Z=void 0:(s=Z,Z=e),Z!==e?(t.length>s?(te=t.charAt(s),s++):(te=e,B===0&&Y(f)),te!==e?(Z=[Z,te],j=Z):(s=j,j=e)):(s=j,j=e);else F=e;F!==e?C=t.substring(C,s):C=F,C!==e?(F=pe(),F!==e?(t.charCodeAt(s)===62?(j=Dr,s++):(j=e,B===0&&Y(Lr)),j!==e?(J=b,L=Ei(y,w,C),b=L):(s=b,b=e)):(s=b,b=e)):(s=b,b=e)}else s=b,b=e;else s=b,b=e;if(b===e){if(b=s,t.charCodeAt(s)===40?(L=Wn,s++):(L=e,B===0&&Y(mn)),L!==e)if(V=pe(),V!==e){if(C=s,F=ns(),F!==e&&(J=C,F=oo(y,w,F)),C=F,C===e){if(C=s,F=s,j=[],Z=s,te=s,B++,t.charCodeAt(s)===41?(oe=hn,s++):(oe=e,B===0&&Y(T)),oe===e&&(t.charCodeAt(s)===40?(oe=Wn,s++):(oe=e,B===0&&Y(mn))),B--,oe===e?te=void 0:(s=te,te=e),te!==e?(t.length>s?(oe=t.charAt(s),s++):(oe=e,B===0&&Y(f)),oe!==e?(te=[te,oe],Z=te):(s=Z,Z=e)):(s=Z,Z=e),Z!==e)for(;Z!==e;)j.push(Z),Z=s,te=s,B++,t.charCodeAt(s)===41?(oe=hn,s++):(oe=e,B===0&&Y(T)),oe===e&&(t.charCodeAt(s)===40?(oe=Wn,s++):(oe=e,B===0&&Y(mn))),B--,oe===e?te=void 0:(s=te,te=e),te!==e?(t.length>s?(oe=t.charAt(s),s++):(oe=e,B===0&&Y(f)),oe!==e?(te=[te,oe],Z=te):(s=Z,Z=e)):(s=Z,Z=e);else j=e;j!==e?F=t.substring(F,s):F=j,F!==e&&(J=C,F=P(y,w)),C=F}C!==e?(F=pe(),F!==e?(t.charCodeAt(s)===41?(j=hn,s++):(j=e,B===0&&Y(T)),j!==e?(J=b,L=q(y,w,C),b=L):(s=b,b=e)):(s=b,b=e)):(s=b,b=e)}else s=b,b=e;else s=b,b=e;b===e&&(b=s,L=pe(),L!==e&&(J=b,L=H(y,w)),b=L)}}}b!==e?(L=pe(),L!==e?(J=l,c=K(y,w,b),l=c):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;return l}function ni(){var l,c,g,y,w,b,L,V,C,F;for(l=s,c=[],g=Oi();g!==e;)c.push(g),g=Oi();if(c!==e)if(g=ti(),g!==e){if(y=[],w=s,t.charCodeAt(s)===61?(b=Ue,s++):(b=e,B===0&&Y(O)),b!==e)if(L=pe(),L!==e){if(V=[],C=Oi(),C!==e)for(;C!==e;)V.push(C),C=Oi();else V=e;V!==e?(C=pe(),C!==e?(F=ti(),F!==e?(J=w,b=le(c,V),w=b):(s=w,w=e)):(s=w,w=e)):(s=w,w=e)}else s=w,w=e;else s=w,w=e;for(;w!==e;)if(y.push(w),w=s,t.charCodeAt(s)===61?(b=Ue,s++):(b=e,B===0&&Y(O)),b!==e)if(L=pe(),L!==e){if(V=[],C=Oi(),C!==e)for(;C!==e;)V.push(C),C=Oi();else V=e;V!==e?(C=pe(),C!==e?(F=ti(),F!==e?(J=w,b=le(c,V),w=b):(s=w,w=e)):(s=w,w=e)):(s=w,w=e)}else s=w,w=e;else s=w,w=e;y!==e?(J=l,c=we(c,y),l=c):(s=l,l=e)}else s=l,l=e;else s=l,l=e;return l}function Rk(){var l,c,g,y;if(l=s,c=s,g=[],Se.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Ne)),y!==e)for(;y!==e;)g.push(y),Se.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Ne));else g=e;return g!==e?c=t.substring(c,s):c=g,c!==e&&(J=l,c=d(c)),l=c,l}function df(){var l,c,g;if(l=s,c=[],ie.test(t.charAt(s))?(g=t.charAt(s),s++):(g=e,B===0&&Y(je)),g!==e)for(;g!==e;)c.push(g),ie.test(t.charAt(s))?(g=t.charAt(s),s++):(g=e,B===0&&Y(je));else c=e;return c!==e?l=t.substring(l,s):l=c,l}function is(){var l,c,g,y,w;if(l=s,c=s,qe.test(t.charAt(s))?(g=t.charAt(s),s++):(g=e,B===0&&Y(Ke)),g===e&&(g=null),g!==e){if(y=[],ie.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(je)),w!==e)for(;w!==e;)y.push(w),ie.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(je));else y=e;y!==e?(g=[g,y],c=g):(s=c,c=e)}else s=c,c=e;return c!==e?l=t.substring(l,s):l=c,l}function yh(){var l,c;return l=s,t.substr(s,4)===M?(c=M,s+=4):(c=e,B===0&&Y(We)),c!==e&&(J=l,c=Be()),l=c,l===e&&(l=s,t.substr(s,5)===qr?(c=qr,s+=5):(c=e,B===0&&Y(Vt)),c!==e&&(J=l,c=rr()),l=c),l}function $h(){var l,c,g,y,w,b;return l=s,c=s,g=is(),g!==e?(y=s,t.charCodeAt(s)===46?(w=he,s++):(w=e,B===0&&Y(lt)),w!==e?(b=df(),b!==e?(w=[w,b],y=w):(s=y,y=e)):(s=y,y=e),y===e&&(y=null),y!==e?(Ut.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(fr)),w!==e?(b=is(),b!==e?(g=[g,y,w,b],c=g):(s=c,c=e)):(s=c,c=e)):(s=c,c=e)):(s=c,c=e),c!==e?l=t.substring(l,s):l=c,l===e&&(l=s,c=s,g=is(),g!==e?(t.charCodeAt(s)===46?(y=he,s++):(y=e,B===0&&Y(lt)),y!==e?(w=df(),w!==e?(g=[g,y,w],c=g):(s=c,c=e)):(s=c,c=e)):(s=c,c=e),c!==e?l=t.substring(l,s):l=c),l}function Ni(){var l,c,g,y,w;if(l=s,Er.test(t.charAt(s))?(c=t.charAt(s),s++):(c=e,B===0&&Y(nr)),c!==e){for(g=s,y=[],cr.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(ne));w!==e;)y.push(w),cr.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(ne));y!==e?g=t.substring(g,s):g=y,g!==e?(Er.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(nr)),y!==e?(J=l,c=d(g),l=c):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;if(l===e){if(l=s,gn.test(t.charAt(s))?(c=t.charAt(s),s++):(c=e,B===0&&Y(Ar)),c!==e){for(g=s,y=[],Sr.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(Nt));w!==e;)y.push(w),Sr.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(Nt));y!==e?g=t.substring(g,s):g=y,g!==e?(gn.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Ar)),y!==e?(J=l,c=d(g),l=c):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;l===e&&(l=yh(),l===e&&(l=s,c=$h(),c!==e&&(J=l,c=rn(c)),l=c,l===e&&(l=s,c=is(),c!==e&&(J=l,c=Gn(c)),l=c)))}return l}function pa(){var l,c,g,y,w,b,L,V,C,F,j,Z,te,oe,nt,Nn,Fr;if(l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e)if(g=ts(),g!==e)if(y=Kt(),y!==e)if(w=pe(),w!==e)if(b=ni(),b!==e)if(J=s,L=vr(c,y,b),L?L=void 0:L=e,L!==e){if(V=[],C=s,F=s,j=pe(),j!==e?F=t.substring(F,s):F=j,F!==e?(j=s,Z=ei(),Z===e&&(Z=s,te=s,B++,oe=xn(),B--,oe===e?te=void 0:(s=te,te=e),te===e&&(te=s,B++,oe=s,nt=Ti(),nt!==e?(Nn=Kt(),Nn!==e?(J=s,Fr=Qn(c,y,b,F,Nn),Fr?Fr=void 0:Fr=e,Fr!==e?(nt=[nt,Nn,Fr],oe=nt):(s=oe,oe=e)):(s=oe,oe=e)):(s=oe,oe=e),B--,oe===e?te=void 0:(s=te,te=e)),te!==e?(oe=an(),oe!==e?(nt=ei(),nt===e&&(nt=null),nt!==e?(te=[te,oe,nt],Z=te):(s=Z,Z=e)):(s=Z,Z=e)):(s=Z,Z=e)),Z!==e?j=t.substring(j,s):j=Z,j!==e?(J=C,F=Zn(c,y,b,F,j),C=F):(s=C,C=e)):(s=C,C=e),C!==e)for(;C!==e;)V.push(C),C=s,F=s,j=pe(),j!==e?F=t.substring(F,s):F=j,F!==e?(j=s,Z=ei(),Z===e&&(Z=s,te=s,B++,oe=xn(),B--,oe===e?te=void 0:(s=te,te=e),te===e&&(te=s,B++,oe=s,nt=Ti(),nt!==e?(Nn=Kt(),Nn!==e?(J=s,Fr=Qn(c,y,b,F,Nn),Fr?Fr=void 0:Fr=e,Fr!==e?(nt=[nt,Nn,Fr],oe=nt):(s=oe,oe=e)):(s=oe,oe=e)):(s=oe,oe=e),B--,oe===e?te=void 0:(s=te,te=e)),te!==e?(oe=an(),oe!==e?(nt=ei(),nt===e&&(nt=null),nt!==e?(te=[te,oe,nt],Z=te):(s=Z,Z=e)):(s=Z,Z=e)):(s=Z,Z=e)),Z!==e?j=t.substring(j,s):j=Z,j!==e?(J=C,F=Zn(c,y,b,F,j),C=F):(s=C,C=e)):(s=C,C=e);else V=e;V!==e?(C=s,F=pe(),F!==e?C=t.substring(C,s):C=F,C!==e?(F=s,j=Ti(),j!==e?(Z=Kt(),Z!==e?(J=s,te=On(c,y,b,V,C,Z),te?te=void 0:te=e,te!==e?(oe=ei(),oe===e&&(oe=null),oe!==e?(J=F,j=yn(c,y,b,V,C,Z),F=j):(s=F,F=e)):(s=F,F=e)):(s=F,F=e)):(s=F,F=e),F!==e?(J=s,j=Br(c,y,b,V,C,F),j?j=void 0:j=e,j!==e?(J=l,c=Ai(c,y,b,V,C,F),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;return l}function Ri(){var l,c,g,y,w,b,L,V,C;if(l=s,c=s,B++,g=s,y=pe(),y!==e?(w=xn(),w===e&&(w=ri()),w!==e?(y=[y,w],g=y):(s=g,g=e)):(s=g,g=e),g===e&&(g=sn()),B--,g===e?c=void 0:(s=c,c=e),c!==e){for(g=[],y=bt();y!==e;)g.push(y),y=bt();if(g!==e){if(y=s,w=[],b=s,nn.test(t.charAt(s))?(L=t.charAt(s),s++):(L=e,B===0&&Y(Jn)),L!==e){for(V=[],C=bt();C!==e;)V.push(C),C=bt();V!==e?(L=[L,V],b=L):(s=b,b=e)}else s=b,b=e;if(b!==e)for(;b!==e;)if(w.push(b),b=s,nn.test(t.charAt(s))?(L=t.charAt(s),s++):(L=e,B===0&&Y(Jn)),L!==e){for(V=[],C=bt();C!==e;)V.push(C),C=bt();V!==e?(L=[L,V],b=L):(s=b,b=e)}else s=b,b=e;else w=e;w!==e?y=t.substring(y,s):y=w,y!==e?(w=Fi(),w!==e?(J=l,c=Mr(),l=c):(s=l,l=e)):(s=l,l=e)}else s=l,l=e}else s=l,l=e;return l}function dr(){var l,c,g,y,w;return l=s,c=s,g=Ri(),g===e&&(g=s,J=s,y=Xn(),y?y=void 0:y=e,y!==e?(w=sn(),w!==e?(y=[y,w],g=y):(s=g,g=e)):(s=g,g=e)),g!==e?c=t.substring(c,s):c=g,c!==e&&(J=l,c=Rt()),l=c,l}function Ir(){var l,c;return l=s,c=Lt(),c!==e&&(J=l,c=Dt(c)),l=c,l}function da(){var l,c,g,y,w,b,L,V,C,F,j;if(l=s,J=s,c=Yn(),c?c=void 0:c=e,c!==e){if(g=s,y=[],w=s,b=s,B++,L=Ri(),B--,L===e?b=void 0:(s=b,b=e),b!==e?(L=Ir(),L!==e?(b=[b,L],w=b):(s=w,w=e)):(s=w,w=e),w!==e)for(;w!==e;)y.push(w),w=s,b=s,B++,L=Ri(),B--,L===e?b=void 0:(s=b,b=e),b!==e?(L=Ir(),L!==e?(b=[b,L],w=b):(s=w,w=e)):(s=w,w=e);else y=e;if(y!==e?g=t.substring(g,s):g=y,g!==e)if(y=s,w=Ri(),w!==e&&(J=y,w=$n(g,w)),y=w,y!==e){if(w=[],b=s,L=s,V=[],C=s,F=s,B++,j=dr(),B--,j===e?F=void 0:(s=F,F=e),F!==e?(j=Ir(),j!==e?(F=[F,j],C=F):(s=C,C=e)):(s=C,C=e),C!==e)for(;C!==e;)V.push(C),C=s,F=s,B++,j=dr(),B--,j===e?F=void 0:(s=F,F=e),F!==e?(j=Ir(),j!==e?(F=[F,j],C=F):(s=C,C=e)):(s=C,C=e);else V=e;if(V!==e?L=t.substring(L,s):L=V,L!==e?(V=s,C=dr(),C!==e&&(J=V,C=At(g,y,L,C)),V=C,V!==e?(J=b,L=bn(g,y,L,V),b=L):(s=b,b=e)):(s=b,b=e),b===e&&(b=s,L=s,B++,V=Ri(),B--,V===e?L=void 0:(s=L,L=e),L!==e?(V=s,B++,C=dr(),B--,C===e?V=void 0:(s=V,V=e),V!==e?(C=Ir(),C!==e?(J=b,L=zr(g,y,C),b=L):(s=b,b=e)):(s=b,b=e)):(s=b,b=e)),b!==e)for(;b!==e;){if(w.push(b),b=s,L=s,V=[],C=s,F=s,B++,j=dr(),B--,j===e?F=void 0:(s=F,F=e),F!==e?(j=Ir(),j!==e?(F=[F,j],C=F):(s=C,C=e)):(s=C,C=e),C!==e)for(;C!==e;)V.push(C),C=s,F=s,B++,j=dr(),B--,j===e?F=void 0:(s=F,F=e),F!==e?(j=Ir(),j!==e?(F=[F,j],C=F):(s=C,C=e)):(s=C,C=e);else V=e;V!==e?L=t.substring(L,s):L=V,L!==e?(V=s,C=dr(),C!==e&&(J=V,C=At(g,y,L,C)),V=C,V!==e?(J=b,L=bn(g,y,L,V),b=L):(s=b,b=e)):(s=b,b=e),b===e&&(b=s,L=s,B++,V=Ri(),B--,V===e?L=void 0:(s=L,L=e),L!==e?(V=s,B++,C=dr(),B--,C===e?V=void 0:(s=V,V=e),V!==e?(C=Ir(),C!==e?(J=b,L=zr(g,y,C),b=L):(s=b,b=e)):(s=b,b=e)):(s=b,b=e))}else w=e;w!==e?(J=s,b=vn(g,y,w),b?b=void 0:b=e,b!==e?(J=l,c=Si(g,y,w),l=c):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;else s=l,l=e}else s=l,l=e;if(l===e){if(l=s,c=[],g=s,y=s,w=s,b=s,B++,L=dr(),B--,L===e?b=void 0:(s=b,b=e),b!==e?(L=Ir(),L!==e?(b=[b,L],w=b):(s=w,w=e)):(s=w,w=e),w!==e?y=t.substring(y,s):y=w,y!==e){for(w=[],b=dr();b!==e;)w.push(b),b=dr();w!==e?(J=g,y=kn(y,w),g=y):(s=g,g=e)}else s=g,g=e;if(g!==e)for(;g!==e;)if(c.push(g),g=s,y=s,w=s,b=s,B++,L=dr(),B--,L===e?b=void 0:(s=b,b=e),b!==e?(L=Ir(),L!==e?(b=[b,L],w=b):(s=w,w=e)):(s=w,w=e),w!==e?y=t.substring(y,s):y=w,y!==e){for(w=[],b=dr();b!==e;)w.push(b),b=dr();w!==e?(J=g,y=kn(y,w),g=y):(s=g,g=e)}else s=g,g=e;else c=e;if(c!==e&&(J=l,c=so(c)),l=c,l===e)if(l=[],c=Ir(),c!==e)for(;c!==e;)l.push(c),c=Ir();else l=e}return l}function ma(){var l,c,g,y,w,b,L,V,C,F,j,Z,te,oe,nt;if(l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e)if(g=ts(),g!==e)if(y=Kt(),y!==e)if(w=pe(),w!==e)if(b=ni(),b!==e)if(J=s,L=ao(c,y,b),L?L=void 0:L=e,L!==e)if(J=s,V=Go(c,y,b),V?V=void 0:V=e,V!==e){for(C=s,F=[],j=sn();j!==e;)F.push(j),j=sn();if(F!==e)if(j=da(),j!==e){for(Z=[],te=sn();te!==e;)Z.push(te),te=sn();Z!==e?(J=C,F=Qo(c,y,b,j),C=F):(s=C,C=e)}else s=C,C=e;else s=C,C=e;C!==e?(F=s,j=pe(),j!==e?F=t.substring(F,s):F=j,F!==e?(j=s,Z=Ti(),Z!==e?(te=Kt(),te!==e?(J=s,oe=On(c,y,b,C,F,te),oe?oe=void 0:oe=e,oe!==e?(nt=ei(),nt===e&&(nt=null),nt!==e?(J=j,Z=lo(c,y,b,C,F,te),j=Z):(s=j,j=e)):(s=j,j=e)):(s=j,j=e)):(s=j,j=e),j!==e?(J=s,Z=Br(c,y,b,C,F,j),Z?Z=void 0:Z=e,Z!==e?(J=l,c=uo(c,y,b,C,F,j),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;return l}function ha(){var l,c,g,y,w,b,L,V,C,F,j,Z,te;if(l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e)if(g=ts(),g!==e)if(y=Kt(),y!==e)if(w=pe(),w!==e)if(b=ni(),b!==e){if(L=[],V=s,C=sn(),C===e&&(C=pa(),C===e&&(C=ma(),C===e&&(C=ha(),C===e&&(C=ka(),C===e&&(C=wa(),C===e&&(C=xa(),C===e&&(C=ba(),C===e&&(C=va(),C===e&&(C=ga(),C===e&&(C=ya(),C===e&&(C=$a()))))))))))),C!==e&&(J=V,C=fo(c,y,b,C)),V=C,V===e){for(V=s,C=s,F=[],j=bt();j!==e;)F.push(j),j=bt();if(F!==e?C=t.substring(C,s):C=F,C!==e){if(F=s,j=[],Z=Lt(),Z!==e)for(;Z!==e;)j.push(Z),Z=Lt();else j=e;j!==e?F=t.substring(F,s):F=j,F!==e?(J=V,C=St(c,y,b,C,F),V=C):(s=V,V=e)}else s=V,V=e}for(;V!==e;)if(L.push(V),V=s,C=sn(),C===e&&(C=pa(),C===e&&(C=ma(),C===e&&(C=ha(),C===e&&(C=ka(),C===e&&(C=wa(),C===e&&(C=xa(),C===e&&(C=ba(),C===e&&(C=va(),C===e&&(C=ga(),C===e&&(C=ya(),C===e&&(C=$a()))))))))))),C!==e&&(J=V,C=fo(c,y,b,C)),V=C,V===e){for(V=s,C=s,F=[],j=bt();j!==e;)F.push(j),j=bt();if(F!==e?C=t.substring(C,s):C=F,C!==e){if(F=s,j=[],Z=Lt(),Z!==e)for(;Z!==e;)j.push(Z),Z=Lt();else j=e;j!==e?F=t.substring(F,s):F=j,F!==e?(J=V,C=St(c,y,b,C,F),V=C):(s=V,V=e)}else s=V,V=e}L!==e?(V=s,C=pe(),C!==e?V=t.substring(V,s):V=C,V!==e?(C=s,F=Ti(),F!==e?(j=Kt(),j!==e?(J=s,Z=On(c,y,b,L,V,j),Z?Z=void 0:Z=e,Z!==e?(te=ei(),te===e&&(te=null),te!==e?(J=C,F=Ge(c,y,b,L,V,j),C=F):(s=C,C=e)):(s=C,C=e)):(s=C,C=e)):(s=C,C=e),C!==e?(J=s,F=Br(c,y,b,L,V,C),F?F=void 0:F=e,F!==e?(J=l,c=Pi(c,y,b,L,V,C),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)}else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;return l}function bh(){var l,c,g;if(l=s,c=[],g=Lt(),g!==e)for(;g!==e;)c.push(g),g=Lt();else c=e;return c!==e&&(J=l,c=rf()),l=c,l}function Dk(){var l,c,g,y;if(l=s,c=[],g=s,y=kr(),y!==e&&(J=g,y=wn()),g=y,g===e){if(g=[],Vr.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Ur)),y!==e)for(;y!==e;)g.push(y),Vr.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Ur));else g=e;g===e&&(g=Lt())}if(g!==e){for(;g!==e;)if(c.push(g),g=s,y=kr(),y!==e&&(J=g,y=wn()),g=y,g===e){if(g=[],Vr.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Ur)),y!==e)for(;y!==e;)g.push(y),Vr.test(t.charAt(s))?(y=t.charAt(s),s++):(y=e,B===0&&Y(Ur));else g=e;g===e&&(g=Lt())}}else c=e;return c!==e&&(J=l,c=Ii(c)),l=c,l}function ga(){var l,c,g,y,w,b,L,V,C,F,j,Z;if(l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e)if(g=s,B++,y=xn(),B--,y===e?g=void 0:(s=g,g=e),g!==e)if(y=ri(),y!==e)if(w=pe(),w!==e)if(b=kr(),b===e&&(b=null),b!==e)if(J=s,L=h(c,y),L?L=void 0:L=e,L!==e){for(V=s,C=[],F=s,j=s,B++,Z=kr(),B--,Z===e?j=void 0:(s=j,j=e),j!==e?(Z=Lt(),Z!==e?(j=[j,Z],F=j):(s=F,F=e)):(s=F,F=e);F!==e;)C.push(F),F=s,j=s,B++,Z=kr(),B--,Z===e?j=void 0:(s=j,j=e),j!==e?(Z=Lt(),Z!==e?(j=[j,Z],F=j):(s=F,F=e)):(s=F,F=e);C!==e?V=t.substring(V,s):V=C,V!==e?(J=l,c=_(c,y,V),l=c):(s=l,l=e)}else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;return l}function ya(){var l,c,g,y,w,b,L,V,C;return l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e?(g=s,B++,y=xn(),B--,y===e?g=void 0:(s=g,g=e),g!==e?(y=ri(),y!==e?(w=pe(),w!==e?(b=kr(),b===e&&(b=null),b!==e?(J=s,L=E(c,y),L?L=void 0:L=e,L!==e?(J=s,V=A(c,y),V?V=void 0:V=e,V!==e?(C=da(),C!==e?(J=l,c=S(c,y,C),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e),l}function $a(){var l,c,g,y,w,b,L,V,C,F,j;if(l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e)if(g=s,B++,y=xn(),B--,y===e?g=void 0:(s=g,g=e),g!==e)if(y=ri(),y!==e)if(w=pe(),w!==e)if(b=kr(),b===e&&(b=null),b!==e){for(L=s,V=[],C=s,F=s,B++,j=kr(),B--,j===e?F=void 0:(s=F,F=e),F!==e?(j=Lt(),j!==e?(F=[F,j],C=F):(s=C,C=e)):(s=C,C=e);C!==e;)V.push(C),C=s,F=s,B++,j=kr(),B--,j===e?F=void 0:(s=F,F=e),F!==e?(j=Lt(),j!==e?(F=[F,j],C=F):(s=C,C=e)):(s=C,C=e);V!==e?L=t.substring(L,s):L=V,L!==e?(J=l,c=z(c,y,L),l=c):(s=l,l=e)}else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;return l}function vh(){var l,c,g,y,w,b,L,V,C,F,j;for(l=s,c=[],g=an();g!==e;)c.push(g),g=an();if(c!==e)if(g=ti(),g!==e){if(y=[],w=s,b=pe(),b!==e)if(t.substr(s,2)===G?(L=G,s+=2):(L=e,B===0&&Y(se)),L!==e)if(V=pe(),V!==e){if(C=[],F=an(),F!==e)for(;F!==e;)C.push(F),F=an();else C=e;C!==e?(F=pe(),F!==e?(j=ti(),j!==e?(J=w,b=le(c,C),w=b):(s=w,w=e)):(s=w,w=e)):(s=w,w=e)}else s=w,w=e;else s=w,w=e;else s=w,w=e;for(;w!==e;)if(y.push(w),w=s,b=pe(),b!==e)if(t.substr(s,2)===G?(L=G,s+=2):(L=e,B===0&&Y(se)),L!==e)if(V=pe(),V!==e){if(C=[],F=an(),F!==e)for(;F!==e;)C.push(F),F=an();else C=e;C!==e?(F=pe(),F!==e?(j=ti(),j!==e?(J=w,b=le(c,C),w=b):(s=w,w=e)):(s=w,w=e)):(s=w,w=e)}else s=w,w=e;else s=w,w=e;else s=w,w=e;y!==e?(J=l,c=we(c,y),l=c):(s=l,l=e)}else s=l,l=e;else s=l,l=e;return l}function ba(){var l,c,g,y,w,b,L;return l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e?(t.substr(s,6)===U?(g=U,s+=6):(g=e,B===0&&Y(at)),g!==e?(y=pe(),y!==e?(w=s,b=_a(),b!==e?w=t.substring(w,s):w=b,w!==e?(b=pe(),b!==e?(L=vh(),L!==e?(J=l,c=Ht(c,g,w,L),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e),l}function va(){var l,c,g,y,w,b,L,V;return l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e?(t.substr(s,7)===be?(g=be,s+=7):(g=e,B===0&&Y(He)),g!==e?(y=pe(),y!==e?(w=s,b=Kt(),b===e&&(b=s,Pt.test(t.charAt(s))?(L=t.charAt(s),s++):(L=e,B===0&&Y(pr)),L!==e?(t.substr(s,2)===nf?(V=nf,s+=2):(V=e,B===0&&Y(Jm)),V!==e?(L=[L,V],b=L):(s=b,b=e)):(s=b,b=e)),b!==e?w=t.substring(w,s):w=b,w!==e?(b=pe(),b!==e?(L=ni(),L!==e?(J=l,c=Xm(c,g,w,L),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e),l}function ka(){var l,c,g,y,w,b,L,V,C,F,j,Z;if(l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e)if(g=rs(),g!==e)if(y=Kt(),y!==e)if(w=pe(),w!==e)if(b=ni(),b!==e)if(J=s,L=Ym(c,g,y,b),L?L=void 0:L=e,L!==e){for(V=s,C=[],F=s,j=s,B++,Z=kr(),B--,Z===e?j=void 0:(s=j,j=e),j!==e?(Z=Lt(),Z!==e?(j=[j,Z],F=j):(s=F,F=e)):(s=F,F=e);F!==e;)C.push(F),F=s,j=s,B++,Z=kr(),B--,Z===e?j=void 0:(s=j,j=e),j!==e?(Z=Lt(),Z!==e?(j=[j,Z],F=j):(s=F,F=e)):(s=F,F=e);C!==e?V=t.substring(V,s):V=C,V!==e?(J=l,c=eh(c,g,y,b,V),l=c):(s=l,l=e)}else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;return l}function wa(){var l,c,g,y,w,b,L,V,C;return l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e?(g=rs(),g!==e?(y=Kt(),y!==e?(w=pe(),w!==e?(b=ni(),b!==e?(J=s,L=th(c,g,y,b),L?L=void 0:L=e,L!==e?(J=s,V=rh(c,g,y,b),V?V=void 0:V=e,V!==e?(C=da(),C!==e?(J=l,c=nh(c,g,y,b,C),l=c):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e)):(s=l,l=e),l}function xa(){var l,c,g,y,w,b,L,V,C,F,j;if(l=s,c=s,g=pe(),g!==e?c=t.substring(c,s):c=g,c!==e)if(g=rs(),g!==e)if(y=Kt(),y!==e)if(w=pe(),w!==e)if(b=ni(),b!==e){for(L=s,V=[],C=s,F=s,B++,j=kr(),B--,j===e?F=void 0:(s=F,F=e),F!==e?(j=Lt(),j!==e?(F=[F,j],C=F):(s=C,C=e)):(s=C,C=e);C!==e;)V.push(C),C=s,F=s,B++,j=kr(),B--,j===e?F=void 0:(s=F,F=e),F!==e?(j=Lt(),j!==e?(F=[F,j],C=F):(s=C,C=e)):(s=C,C=e);V!==e?L=t.substring(L,s):L=V,L!==e?(J=l,c=ih(c,g,y,b,L),l=c):(s=l,l=e)}else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;else s=l,l=e;return l}function _a(){var l,c,g,y,w;if(l=s,c=s,oh.test(t.charAt(s))?(g=t.charAt(s),s++):(g=e,B===0&&Y(sh)),g!==e){if(y=[],er.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(ur)),w!==e)for(;w!==e;)y.push(w),er.test(t.charAt(s))?(w=t.charAt(s),s++):(w=e,B===0&&Y(ur));else y=e;y!==e?(g=[g,y],c=g):(s=c,c=e)}else s=c,c=e;return c!==e?l=t.substring(l,s):l=c,l}function Lk(){var l,c;for(B++,l=[],Zo.test(t.charAt(s))?(c=t.charAt(s),s++):(c=e,B===0&&Y(Jo));c!==e;)l.push(c),Zo.test(t.charAt(s))?(c=t.charAt(s),s++):(c=e,B===0&&Y(Jo));return B--,l===e&&(c=e,B===0&&Y(ah)),l}function jk(){var l,c;for(B++,l=[],Zo.test(t.charAt(s))?(c=t.charAt(s),s++):(c=e,B===0&&Y(Jo));c!==e;)l.push(c),Zo.test(t.charAt(s))?(c=t.charAt(s),s++):(c=e,B===0&&Y(Jo));return B--,l===e&&(c=e,B===0&&Y(lh)),l}function os(l){return l!==l.toLowerCase()&&l!==l.toUpperCase()}function kh(l){return l===l.toUpperCase()}function Di(l){return l.reduce((c,g)=>Array.isArray(g)?c.concat(Di(g)):c.concat(g),[])}function wh(l){return["code","comment","data","defn","head","input","item","nested","output","para","pod","table"].includes(l)||kh(l)||l.match(/^(head|item)\d+$/)||os(l)}function xh(l,c){return l.length==0?c:c.indexOf(l)==0?c.replace(l,""):c.replace(/^\s+/,"")}if(Yo=i(),Yo!==e&&s===t.length)return Yo;throw Yo!==e&&s<t.length&&Y(fh()),sf(ca,on<t.length?t.charAt(on):null,on<t.length?co(on,on+1):co(on,on))}td.exports={SyntaxError:hi,parse:jv}});var od=fe((Px,id)=>{"use strict";function Bv(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function gi(t,r,e,n){this.message=t,this.expected=r,this.found=e,this.location=n,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,gi)}Bv(gi,Error);gi.buildMessage=function(t,r){var e={literal:function(m){return'"'+i(m.text)+'"'},class:function(m){var p="",$;for($=0;$<m.parts.length;$++)p+=m.parts[$]instanceof Array?o(m.parts[$][0])+"-"+o(m.parts[$][1]):o(m.parts[$]);return"["+(m.inverted?"^":"")+p+"]"},any:function(m){return"any character"},end:function(m){return"end of input"},other:function(m){return m.description}};function n(m){return m.charCodeAt(0).toString(16).toUpperCase()}function i(m){return m.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+n(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+n(p)})}function o(m){return m.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+n(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+n(p)})}function a(m){return e[m.type](m)}function u(m){var p=new Array(m.length),$,k;for($=0;$<m.length;$++)p[$]=a(m[$]);if(p.sort(),p.length>0){for($=1,k=1;$<p.length;$++)p[$-1]!==p[$]&&(p[k]=p[$],k++);p.length=k}switch(p.length){case 1:return p[0];case 2:return p[0]+" or "+p[1];default:return p.slice(0,-1).join(", ")+", or "+p[p.length-1]}}function f(m){return m?'"'+i(m)+'"':"end of input"}return"Expected "+u(t)+" but "+f(r)+" found."};function Mv(t,r){r=r!==void 0?r:{};var e={},n={Expression:Sr},i=Sr,o="A",a=he("A",!1),u="V",f=he("V",!1),m="R",p=he("R",!1),$="B",k=he("B",!1),v="I",x=he("I",!1),I="C",D=he("C",!1),R="D",X=he("D",!1),ee="E",de=he("E",!1),ce="K",Q=he("K",!1),me="L",ve=he("L",!1),ke="S",Te=he("S",!1),xe="T",_e=he("T",!1),ue="U",be=he("U",!1),He="Z",U=he("Z",!1),at="N",Le=he("N",!1),tt="X",Ue=he("X",!1),O=/^[a-zA-Z]/,N=lt([["a","z"],["A","Z"]],!1,!1),Mt=/^[a-zA-Z0-9_\-]/,wt=lt([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),it=/^[ \t\f]/,ft=lt([" "," ","\f"],!1,!1),ct=function(h){return!(r.allowed||[]).length||(r.allowed||[]).includes(h)},$e=Ut(),br=function(h){return h},Ct=function(h){return h==="A"},Tt=function(h,_){return{content:_,type:"fcode",name:h}},er=function(h){return h==="D"},ur=function(h,_,E){return Ii(E)},zt=function(h,_,E){return{content:_,type:"fcode",name:h,synonyms:E}},Kn=function(h){return h==="V"},Pn=function(h,_){return{content:_,type:"fcode",name:h}},pt="<",dt=he("<",!1),Ot=">",mt=he(">",!1),xt=function(){return Be()},Or=function(h){return h},Nr=function(h){return h==="C"},Rr="|",Dr=he("|",!1),Lr=function(h){return h==="L"},tr=function(h,_,E){return E},W=function(h,_,E){return{content:_,type:"fcode",name:h,meta:E}},re=";",ge=he(";",!1),Ae=/^[ \xA0\u2001\t\f\u2008]/,_t=lt([" ","\xA0","\u2001"," ","\f","\u2008"],!1,!1),_r=function(h,_){return Ii([h,_])},Me=function(h){return[h]},ot=function(h){return h==="X"},ht=function(h,_,E){return{content:_,type:"fcode",name:h,entry:E}},jr=function(h){return h==="S"},Xe=function(h){return h==="Z"},tn=/^[0-9]/,Et=lt([["0","9"]],!1,!1),In="0d",no=he("0d",!1),Cr=function(h){return parseInt(h,10)},Fn="0o",Ci=he("0o",!1),io=function(h){return parseInt(h,8)},Tn="0b",Ei=he("0b",!1),Wn=function(h){return parseInt(h,2)},mn="0x",oo=he("0x",!1),hn=/^[0-9A-Fa-f]/,T=lt([["0","9"],["A","F"],["a","f"]],!1,!1),P=function(){return parseInt(Be())},q=function(h){return{type:"number",value:parseInt(h,10)}},H=function(h){return h==="E"},K=function(h,_){return Ii(_)},le=function(h,_){return{content:_||[],type:"fcode",name:h}},we=function(h){return h},Se=function(h){return h!=="C"},Ne=function(h,_){return{content:_,type:"fcode",name:h}},d=0,ie=0,je=[{line:1,column:1}],qe=0,Ke=[],M=0,We;if("startRule"in r){if(!(r.startRule in n))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');i=n[r.startRule]}function Be(){return t.substring(ie,d)}function qr(){return cr(ie,d)}function Vt(h,_){throw _=_!==void 0?_:cr(ie,d),Ar([Er(h)],t.substring(ie,d),_)}function rr(h,_){throw _=_!==void 0?_:cr(ie,d),gn(h,_)}function he(h,_){return{type:"literal",text:h,ignoreCase:_}}function lt(h,_,E){return{type:"class",parts:h,inverted:_,ignoreCase:E}}function Ut(){return{type:"any"}}function fr(){return{type:"end"}}function Er(h){return{type:"other",description:h}}function nr(h){var _=je[h],E;if(_)return _;for(E=h-1;!je[E];)E--;for(_=je[E],_={line:_.line,column:_.column};E<h;)t.charCodeAt(E)===10?(_.line++,_.column=1):_.column++,E++;return je[h]=_,_}function cr(h,_){var E=nr(h),A=nr(_);return{start:{offset:h,line:E.line,column:E.column},end:{offset:_,line:A.line,column:A.column}}}function ne(h){d<qe||(d>qe&&(qe=d,Ke=[]),Ke.push(h))}function gn(h,_){return new gi(h,null,null,_)}function Ar(h,_,E){return new gi(gi.buildMessage(h,_),h,_,E)}function Sr(){var h,_;for(h=[],_=Nt(),_===e&&(_=Pi(),_===e&&(_=wn(),_===e&&(_=Zn())));_!==e;)h.push(_),_=Nt(),_===e&&(_=Pi(),_===e&&(_=wn(),_===e&&(_=Zn())));return h}function Nt(){var h;return h=yn(),h===e&&(h=vn(),h===e&&(h=Xn(),h===e&&(h=Br(),h===e&&(h=fo(),h===e&&(h=Ai(),h===e&&(h=Yn(),h===e&&(h=zr(),h===e&&(h=Si())))))))),h}function rn(){var h;return t.charCodeAt(d)===65?(h=o,d++):(h=e,M===0&&ne(a)),h===e&&(t.charCodeAt(d)===86?(h=u,d++):(h=e,M===0&&ne(f)),h===e&&(t.charCodeAt(d)===82?(h=m,d++):(h=e,M===0&&ne(p)),h===e&&(t.charCodeAt(d)===66?(h=$,d++):(h=e,M===0&&ne(k)),h===e&&(t.charCodeAt(d)===73?(h=v,d++):(h=e,M===0&&ne(x)),h===e&&(t.charCodeAt(d)===67?(h=I,d++):(h=e,M===0&&ne(D)),h===e&&(t.charCodeAt(d)===68?(h=R,d++):(h=e,M===0&&ne(X)),h===e&&(t.charCodeAt(d)===69?(h=ee,d++):(h=e,M===0&&ne(de)),h===e&&(t.charCodeAt(d)===75?(h=ce,d++):(h=e,M===0&&ne(Q)),h===e&&(t.charCodeAt(d)===76?(h=me,d++):(h=e,M===0&&ne(ve)),h===e&&(t.charCodeAt(d)===83?(h=ke,d++):(h=e,M===0&&ne(Te)),h===e&&(t.charCodeAt(d)===84?(h=xe,d++):(h=e,M===0&&ne(_e)),h===e&&(t.charCodeAt(d)===85?(h=ue,d++):(h=e,M===0&&ne(be)),h===e&&(t.charCodeAt(d)===90?(h=He,d++):(h=e,M===0&&ne(U)),h===e&&(t.charCodeAt(d)===78?(h=at,d++):(h=e,M===0&&ne(Le)),h===e&&(t.charCodeAt(d)===88?(h=tt,d++):(h=e,M===0&&ne(Ue))))))))))))))))),h}function Gn(){var h,_,E,A,S;if(h=d,_=d,O.test(t.charAt(d))?(E=t.charAt(d),d++):(E=e,M===0&&ne(N)),E!==e){if(A=[],Mt.test(t.charAt(d))?(S=t.charAt(d),d++):(S=e,M===0&&ne(wt)),S!==e)for(;S!==e;)A.push(S),Mt.test(t.charAt(d))?(S=t.charAt(d),d++):(S=e,M===0&&ne(wt));else A=e;A!==e?(E=[E,A],_=E):(d=_,_=e)}else d=_,_=e;return _!==e?h=t.substring(h,d):h=_,h}function vr(){var h,_;for(h=[],it.test(t.charAt(d))?(_=t.charAt(d),d++):(_=e,M===0&&ne(ft));_!==e;)h.push(_),it.test(t.charAt(d))?(_=t.charAt(d),d++):(_=e,M===0&&ne(ft));return h}function Qn(){var h,_,E;return h=d,_=rn(),_!==e?(ie=d,E=ct(_),E?E=void 0:E=e,E!==e?(_=[_,E],h=_):(d=h,h=e)):(d=h,h=e),h}function Zn(){var h,_;return h=d,t.length>d?(_=t.charAt(d),d++):(_=e,M===0&&ne($e)),_!==e?h=t.substring(h,d):h=_,h}function On(){var h,_,E,A,S;return h=d,_=d,M++,E=Ge(),M--,E===e?_=void 0:(d=_,_=e),_!==e?(E=vr(),E!==e?(A=d,S=Gn(),S===e&&(S=null),S!==e?A=t.substring(A,d):A=S,A!==e?(S=vr(),S!==e?(ie=h,_=br(A),h=_):(d=h,h=e)):(d=h,h=e)):(d=h,h=e)):(d=h,h=e),h===e&&(h=null),h}function yn(){var h,_,E,A,S;return h=d,_=St(),_!==e?(ie=d,E=Ct(_),E?E=void 0:E=e,E!==e?(A=On(),A!==e?(S=Ge(),S!==e?(ie=h,_=Tt(_,A),h=_):(d=h,h=e)):(d=h,h=e)):(d=h,h=e)):(d=h,h=e),h}function Br(){var h,_,E,A,S,z,G,se;if(h=d,_=St(),_!==e)if(ie=d,E=er(_),E?E=void 0:E=e,E!==e){if(A=[],S=Dt(),S!==e)for(;S!==e;)A.push(S),S=Dt();else A=e;if(A!==e){if(S=d,z=Rt(),z!==e){for(G=[],se=bn();se!==e;)G.push(se),se=bn();G!==e?(ie=S,z=ur(_,A,G),S=z):(d=S,S=e)}else d=S,S=e;S===e&&(S=null),S!==e?(z=Ge(),z!==e?(ie=h,_=zt(_,A,S),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e}else d=h,h=e;else d=h,h=e;return h}function Ai(){var h,_,E,A,S,z;if(h=d,_=St(),_!==e)if(ie=d,E=Kn(_),E?E=void 0:E=e,E!==e){if(A=d,S=[],z=Mr(),z!==e)for(;z!==e;)S.push(z),z=Mr();else S=e;S!==e?A=t.substring(A,d):A=S,A!==e?(S=Ge(),S!==e?(ie=h,_=Pn(_,A),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e;else d=h,h=e;return h}function nn(){var h;return t.charCodeAt(d)===66?(h=$,d++):(h=e,M===0&&ne(k)),h}function Jn(){var h,_,E,A,S;return h=d,_=d,E=d,M++,A=nn(),M--,A===e?E=void 0:(d=E,E=e),E!==e?(t.length>d?(A=t.charAt(d),d++):(A=e,M===0&&ne($e)),A!==e?(E=[E,A],_=E):(d=_,_=e)):(d=_,_=e),_!==e?(t.charCodeAt(d)===60?(E=pt,d++):(E=e,M===0&&ne(dt)),E!==e?(A=Vr(),A!==e?(t.charCodeAt(d)===62?(S=Ot,d++):(S=e,M===0&&ne(mt)),S!==e?(ie=h,_=xt(),h=_):(d=h,h=e)):(d=h,h=e)):(d=h,h=e)):(d=h,h=e),h}function Mr(){var h,_,E,A,S,z,G,se;if(h=d,_=d,E=[],A=d,S=d,z=d,M++,t.charCodeAt(d)===60?(G=pt,d++):(G=e,M===0&&ne(dt)),M--,G===e?z=void 0:(d=z,z=e),z!==e?(t.length>d?(G=t.charAt(d),d++):(G=e,M===0&&ne($e)),G!==e?(z=[z,G],S=z):(d=S,S=e)):(d=S,S=e),S===e&&(S=null),S!==e?(t.charCodeAt(d)===60?(z=pt,d++):(z=e,M===0&&ne(dt)),z!==e?(G=Mr(),G===e&&(G=null),G!==e?(t.charCodeAt(d)===62?(se=Ot,d++):(se=e,M===0&&ne(mt)),se!==e?(S=[S,z,G,se],A=S):(d=A,A=e)):(d=A,A=e)):(d=A,A=e)):(d=A,A=e),A===e&&(A=Jn(),A===e&&(A=Vr())),A!==e)for(;A!==e;)E.push(A),A=d,S=d,z=d,M++,t.charCodeAt(d)===60?(G=pt,d++):(G=e,M===0&&ne(dt)),M--,G===e?z=void 0:(d=z,z=e),z!==e?(t.length>d?(G=t.charAt(d),d++):(G=e,M===0&&ne($e)),G!==e?(z=[z,G],S=z):(d=S,S=e)):(d=S,S=e),S===e&&(S=null),S!==e?(t.charCodeAt(d)===60?(z=pt,d++):(z=e,M===0&&ne(dt)),z!==e?(G=Mr(),G===e&&(G=null),G!==e?(t.charCodeAt(d)===62?(se=Ot,d++):(se=e,M===0&&ne(mt)),se!==e?(S=[S,z,G,se],A=S):(d=A,A=e)):(d=A,A=e)):(d=A,A=e)):(d=A,A=e),A===e&&(A=Jn(),A===e&&(A=Vr()));else E=e;return E!==e?_=t.substring(_,d):_=E,_!==e&&(ie=h,_=Or(_)),h=_,h}function Xn(){var h,_,E,A,S;if(h=d,_=St(),_!==e)if(ie=d,E=Nr(_),E?E=void 0:E=e,E!==e){if(A=[],S=Mr(),S!==e)for(;S!==e;)A.push(S),S=Mr();else A=e;A!==e?(S=Ge(),S!==e?(ie=h,_=Tt(_,A),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e;else d=h,h=e;return h}function Rt(){var h;return t.charCodeAt(d)===124?(h=Rr,d++):(h=e,M===0&&ne(Dr)),h}function Dt(){var h,_,E,A,S,z,G,se;if(h=d,_=[],E=d,A=d,S=d,M++,t.charCodeAt(d)===60?(z=pt,d++):(z=e,M===0&&ne(dt)),M--,z===e?S=void 0:(d=S,S=e),S!==e?(t.length>d?(z=t.charAt(d),d++):(z=e,M===0&&ne($e)),z!==e?(S=[S,z],A=S):(d=A,A=e)):(d=A,A=e),A!==e?(t.charCodeAt(d)===60?(S=pt,d++):(S=e,M===0&&ne(dt)),S!==e?(z=Dt(),z!==e?(t.charCodeAt(d)===62?(G=Ot,d++):(G=e,M===0&&ne(mt)),G!==e?(A=[A,S,z,G],E=A):(d=E,E=e)):(d=E,E=e)):(d=E,E=e)):(d=E,E=e),E===e&&(E=d,A=d,M++,S=Rt(),M--,S===e?A=void 0:(d=A,A=e),A!==e?(S=d,M++,z=Ge(),M--,z===e?S=void 0:(d=S,S=e),S!==e?(z=d,M++,G=St(),M--,G===e?z=void 0:(d=z,z=e),z!==e?(G=d,M++,se=Ur(),M--,se===e?G=void 0:(d=G,G=e),G!==e?(t.length>d?(se=t.charAt(d),d++):(se=e,M===0&&ne($e)),se!==e?(A=[A,S,z,G,se],E=A):(d=E,E=e)):(d=E,E=e)):(d=E,E=e)):(d=E,E=e)):(d=E,E=e)),E!==e)for(;E!==e;)_.push(E),E=d,A=d,S=d,M++,t.charCodeAt(d)===60?(z=pt,d++):(z=e,M===0&&ne(dt)),M--,z===e?S=void 0:(d=S,S=e),S!==e?(t.length>d?(z=t.charAt(d),d++):(z=e,M===0&&ne($e)),z!==e?(S=[S,z],A=S):(d=A,A=e)):(d=A,A=e),A!==e?(t.charCodeAt(d)===60?(S=pt,d++):(S=e,M===0&&ne(dt)),S!==e?(z=Dt(),z!==e?(t.charCodeAt(d)===62?(G=Ot,d++):(G=e,M===0&&ne(mt)),G!==e?(A=[A,S,z,G],E=A):(d=E,E=e)):(d=E,E=e)):(d=E,E=e)):(d=E,E=e),E===e&&(E=d,A=d,M++,S=Rt(),M--,S===e?A=void 0:(d=A,A=e),A!==e?(S=d,M++,z=Ge(),M--,z===e?S=void 0:(d=S,S=e),S!==e?(z=d,M++,G=St(),M--,G===e?z=void 0:(d=z,z=e),z!==e?(G=d,M++,se=Ur(),M--,se===e?G=void 0:(d=G,G=e),G!==e?(t.length>d?(se=t.charAt(d),d++):(se=e,M===0&&ne($e)),se!==e?(A=[A,S,z,G,se],E=A):(d=E,E=e)):(d=E,E=e)):(d=E,E=e)):(d=E,E=e)):(d=E,E=e));else _=e;return _!==e?h=t.substring(h,d):h=_,h}function Yn(){var h,_,E,A,S,z,G,se,Ht,Pt,pr;if(h=d,_=St(),_!==e)if(ie=d,E=Lr(_),E?E=void 0:E=e,E!==e){if(A=[],S=Xn(),S===e&&(S=Dt()),S!==e)for(;S!==e;)A.push(S),S=Xn(),S===e&&(S=Dt());else A=e;if(A!==e){if(S=d,z=Rt(),z!==e){for(G=d,se=[],Ht=d,Pt=d,M++,pr=Ge(),M--,pr===e?Pt=void 0:(d=Pt,Pt=e),Pt!==e?(t.length>d?(pr=t.charAt(d),d++):(pr=e,M===0&&ne($e)),pr!==e?(Pt=[Pt,pr],Ht=Pt):(d=Ht,Ht=e)):(d=Ht,Ht=e);Ht!==e;)se.push(Ht),Ht=d,Pt=d,M++,pr=Ge(),M--,pr===e?Pt=void 0:(d=Pt,Pt=e),Pt!==e?(t.length>d?(pr=t.charAt(d),d++):(pr=e,M===0&&ne($e)),pr!==e?(Pt=[Pt,pr],Ht=Pt):(d=Ht,Ht=e)):(d=Ht,Ht=e);se!==e?G=t.substring(G,d):G=se,G!==e?(ie=S,z=tr(_,A,G),S=z):(d=S,S=e)}else d=S,S=e;S===e&&(S=null),S!==e?(z=Ge(),z!==e?(ie=h,_=W(_,A,S),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e}else d=h,h=e;else d=h,h=e;return h}function $n(){var h,_,E,A,S,z;if(h=d,_=[],E=d,A=d,M++,t.charCodeAt(d)===59?(S=re,d++):(S=e,M===0&&ne(ge)),M--,S===e?A=void 0:(d=A,A=e),A!==e?(S=d,M++,z=Ge(),M--,z===e?S=void 0:(d=S,S=e),S!==e?(t.length>d?(z=t.charAt(d),d++):(z=e,M===0&&ne($e)),z!==e?(A=[A,S,z],E=A):(d=E,E=e)):(d=E,E=e)):(d=E,E=e),E!==e)for(;E!==e;)_.push(E),E=d,A=d,M++,t.charCodeAt(d)===59?(S=re,d++):(S=e,M===0&&ne(ge)),M--,S===e?A=void 0:(d=A,A=e),A!==e?(S=d,M++,z=Ge(),M--,z===e?S=void 0:(d=S,S=e),S!==e?(t.length>d?(z=t.charAt(d),d++):(z=e,M===0&&ne($e)),z!==e?(A=[A,S,z],E=A):(d=E,E=e)):(d=E,E=e)):(d=E,E=e);else _=e;return _!==e?h=t.substring(h,d):h=_,h}function At(){var h;return Ae.test(t.charAt(d))?(h=t.charAt(d),d++):(h=e,M===0&&ne(_t)),h}function bn(){var h,_,E,A,S,z;if(h=d,_=$n(),_!==e){for(E=[],A=At();A!==e;)E.push(A),A=At();if(E!==e)if(t.charCodeAt(d)===59?(A=re,d++):(A=e,M===0&&ne(ge)),A!==e){for(S=[],z=At();z!==e;)S.push(z),z=At();S!==e?(z=bn(),z!==e?(ie=h,_=_r(_,z),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e;else d=h,h=e}else d=h,h=e;return h===e&&(h=d,_=$n(),_!==e&&(ie=h,_=Me(_)),h=_),h}function zr(){var h,_,E,A,S,z,G,se;if(h=d,_=St(),_!==e)if(ie=d,E=ot(_),E?E=void 0:E=e,E!==e){for(A=[],S=Dt();S!==e;)A.push(S),S=Dt();if(A!==e){if(S=d,z=Rt(),z!==e){for(G=[],se=bn();se!==e;)G.push(se),se=bn();G!==e?(ie=S,z=ur(_,A,G),S=z):(d=S,S=e)}else d=S,S=e;S===e&&(S=null),S!==e?(z=Ge(),z!==e?(ie=h,_=ht(_,A,S),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e}else d=h,h=e;else d=h,h=e;return h}function vn(){var h,_,E,A,S,z,G,se;if(h=d,_=St(),_!==e)if(ie=d,E=jr(_),E?E=void 0:E=e,E!==e){for(A=d,S=[],z=d,G=d,M++,se=Ge(),M--,se===e?G=void 0:(d=G,G=e),G!==e?(t.length>d?(se=t.charAt(d),d++):(se=e,M===0&&ne($e)),se!==e?(G=[G,se],z=G):(d=z,z=e)):(d=z,z=e);z!==e;)S.push(z),z=d,G=d,M++,se=Ge(),M--,se===e?G=void 0:(d=G,G=e),G!==e?(t.length>d?(se=t.charAt(d),d++):(se=e,M===0&&ne($e)),se!==e?(G=[G,se],z=G):(d=z,z=e)):(d=z,z=e);S!==e?A=t.substring(A,d):A=S,A!==e?(S=Ge(),S!==e?(ie=h,_=Tt(_,A),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e;else d=h,h=e;return h}function Si(){var h,_,E,A,S,z,G,se;if(h=d,_=St(),_!==e)if(ie=d,E=Xe(_),E?E=void 0:E=e,E!==e){for(A=d,S=[],z=d,G=d,M++,se=Ge(),M--,se===e?G=void 0:(d=G,G=e),G!==e?(t.length>d?(se=t.charAt(d),d++):(se=e,M===0&&ne($e)),se!==e?(G=[G,se],z=G):(d=z,z=e)):(d=z,z=e);z!==e;)S.push(z),z=d,G=d,M++,se=Ge(),M--,se===e?G=void 0:(d=G,G=e),G!==e?(t.length>d?(se=t.charAt(d),d++):(se=e,M===0&&ne($e)),se!==e?(G=[G,se],z=G):(d=z,z=e)):(d=z,z=e);S!==e?A=t.substring(A,d):A=S,A!==e?(S=Ge(),S!==e?(ie=h,_=Tt(_,A),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e;else d=h,h=e;return h}function kn(){var h,_,E;if(h=d,_=[],tn.test(t.charAt(d))?(E=t.charAt(d),d++):(E=e,M===0&&ne(Et)),E!==e)for(;E!==e;)_.push(E),tn.test(t.charAt(d))?(E=t.charAt(d),d++):(E=e,M===0&&ne(Et));else _=e;return _!==e?h=t.substring(h,d):h=_,h}function so(){var h,_,E;return h=d,t.substr(d,2)===In?(_=In,d+=2):(_=e,M===0&&ne(no)),_!==e?(E=kn(),E!==e?(ie=h,_=Cr(E),h=_):(d=h,h=e)):(d=h,h=e),h}function ao(){var h,_,E;return h=d,t.substr(d,2)===Fn?(_=Fn,d+=2):(_=e,M===0&&ne(Ci)),_!==e?(E=kn(),E!==e?(ie=h,_=io(E),h=_):(d=h,h=e)):(d=h,h=e),h}function Go(){var h,_,E;return h=d,t.substr(d,2)===Tn?(_=Tn,d+=2):(_=e,M===0&&ne(Ei)),_!==e?(E=kn(),E!==e?(ie=h,_=Wn(E),h=_):(d=h,h=e)):(d=h,h=e),h}function Qo(){var h,_,E,A,S,z;if(h=d,_=d,E=d,t.substr(d,2)===mn?(A=mn,d+=2):(A=e,M===0&&ne(oo)),A!==e){if(S=[],hn.test(t.charAt(d))?(z=t.charAt(d),d++):(z=e,M===0&&ne(T)),z!==e)for(;z!==e;)S.push(z),hn.test(t.charAt(d))?(z=t.charAt(d),d++):(z=e,M===0&&ne(T));else S=e;S!==e?(A=[A,S],E=A):(d=E,E=e)}else d=E,E=e;return E!==e?_=t.substring(_,d):_=E,_!==e&&(ie=h,_=P()),h=_,h}function lo(){var h,_,E;return h=d,_=vr(),_!==e?(E=ao(),E===e&&(E=so(),E===e&&(E=Go(),E===e&&(E=Qo(),E===e&&(E=kn())))),E!==e?(ie=h,_=q(E),h=_):(d=h,h=e)):(d=h,h=e),h}function uo(){var h,_,E,A,S,z;if(h=d,_=lo(),_!==e){for(E=[],A=At();A!==e;)E.push(A),A=At();if(E!==e)if(t.charCodeAt(d)===59?(A=re,d++):(A=e,M===0&&ne(ge)),A!==e){for(S=[],z=At();z!==e;)S.push(z),z=At();S!==e?(z=uo(),z!==e?(ie=h,_=_r(_,z),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e;else d=h,h=e}else d=h,h=e;return h===e&&(h=d,_=lo(),_!==e&&(ie=h,_=Me(_)),h=_),h}function fo(){var h,_,E,A,S;return h=d,_=St(),_!==e?(ie=d,E=H(_),E?E=void 0:E=e,E!==e?(A=d,S=uo(),S!==e&&(ie=A,S=K(_,S)),A=S,A===e&&(A=null),A!==e?(S=Ge(),S!==e?(ie=h,_=le(_,A),h=_):(d=h,h=e)):(d=h,h=e)):(d=h,h=e)):(d=h,h=e),h}function St(){var h,_,E;return h=d,_=d,E=Qn(),E!==e?_=t.substring(_,d):_=E,_!==e?(t.charCodeAt(d)===60?(E=pt,d++):(E=e,M===0&&ne(dt)),E!==e?(ie=h,_=we(_),h=_):(d=h,h=e)):(d=h,h=e),h}function Ge(){var h;return t.charCodeAt(d)===62?(h=Ot,d++):(h=e,M===0&&ne(mt)),h}function Pi(){var h,_,E,A,S;if(h=d,_=St(),_!==e)if(ie=d,E=Se(_),E?E=void 0:E=e,E!==e){for(A=[],S=Nt(),S===e&&(S=Pi(),S===e&&(S=wn()));S!==e;)A.push(S),S=Nt(),S===e&&(S=Pi(),S===e&&(S=wn()));A!==e?(S=Ge(),S!==e?(ie=h,_=Ne(_,A),h=_):(d=h,h=e)):(d=h,h=e)}else d=h,h=e;else d=h,h=e;return h}function rf(){var h,_,E,A,S;for(h=d,_=[],E=d,A=d,M++,S=Ge(),M--,S===e?A=void 0:(d=A,A=e),A!==e?(t.length>d?(S=t.charAt(d),d++):(S=e,M===0&&ne($e)),S!==e?(A=[A,S],E=A):(d=E,E=e)):(d=E,E=e);E!==e;)_.push(E),E=d,A=d,M++,S=Ge(),M--,S===e?A=void 0:(d=A,A=e),A!==e?(t.length>d?(S=t.charAt(d),d++):(S=e,M===0&&ne($e)),S!==e?(A=[A,S],E=A):(d=E,E=e)):(d=E,E=e);return _!==e?h=t.substring(h,d):h=_,h}function wn(){var h,_,E,A,S,z,G;if(h=d,_=d,E=[],A=d,t.charCodeAt(d)===60?(S=pt,d++):(S=e,M===0&&ne(dt)),S!==e?(z=wn(),z!==e?(t.charCodeAt(d)===62?(G=Ot,d++):(G=e,M===0&&ne(mt)),G!==e?(S=[S,z,G],A=S):(d=A,A=e)):(d=A,A=e)):(d=A,A=e),A===e&&(A=Ur(),A===e&&(A=Vr())),A!==e)for(;A!==e;)E.push(A),A=d,t.charCodeAt(d)===60?(S=pt,d++):(S=e,M===0&&ne(dt)),S!==e?(z=wn(),z!==e?(t.charCodeAt(d)===62?(G=Ot,d++):(G=e,M===0&&ne(mt)),G!==e?(S=[S,z,G],A=S):(d=A,A=e)):(d=A,A=e)):(d=A,A=e),A===e&&(A=Ur(),A===e&&(A=Vr()));else E=e;return E!==e?_=t.substring(_,d):_=E,_!==e&&(ie=h,_=Or(_)),h=_,h}function Vr(){var h,_,E,A,S,z,G,se;if(h=d,_=d,E=[],A=d,S=d,M++,z=Ge(),M--,z===e?S=void 0:(d=S,S=e),S!==e?(z=d,M++,G=St(),M--,G===e?z=void 0:(d=z,z=e),z!==e?(G=d,M++,se=Ur(),M--,se===e?G=void 0:(d=G,G=e),G!==e?(t.length>d?(se=t.charAt(d),d++):(se=e,M===0&&ne($e)),se!==e?(S=[S,z,G,se],A=S):(d=A,A=e)):(d=A,A=e)):(d=A,A=e)):(d=A,A=e),A!==e)for(;A!==e;)E.push(A),A=d,S=d,M++,z=Ge(),M--,z===e?S=void 0:(d=S,S=e),S!==e?(z=d,M++,G=St(),M--,G===e?z=void 0:(d=z,z=e),z!==e?(G=d,M++,se=Ur(),M--,se===e?G=void 0:(d=G,G=e),G!==e?(t.length>d?(se=t.charAt(d),d++):(se=e,M===0&&ne($e)),se!==e?(S=[S,z,G,se],A=S):(d=A,A=e)):(d=A,A=e)):(d=A,A=e)):(d=A,A=e);else E=e;return E!==e?_=t.substring(_,d):_=E,_!==e&&(ie=h,_=Or(_)),h=_,h}function Ur(){var h,_,E,A,S;return h=d,_=d,E=d,M++,A=Qn(),M--,A===e?E=void 0:(d=E,E=e),E!==e?(t.length>d?(A=t.charAt(d),d++):(A=e,M===0&&ne($e)),A!==e?(E=[E,A],_=E):(d=_,_=e)):(d=_,_=e),_!==e?(t.charCodeAt(d)===60?(E=pt,d++):(E=e,M===0&&ne(dt)),E!==e?(A=Vr(),A!==e?(t.charCodeAt(d)===62?(S=Ot,d++):(S=e,M===0&&ne(mt)),S!==e?(ie=h,_=xt(),h=_):(d=h,h=e)):(d=h,h=e)):(d=h,h=e)):(d=h,h=e),h}function Ii(h){return h.reduce((_,E)=>Array.isArray(E)?_.concat(Ii(E)):_.concat(E),[])}if(We=i(),We!==e&&d===t.length)return We;throw We!==e&&d<t.length&&ne(fr()),Ar(Ke,qe<t.length?t.charAt(qe):null,qe<t.length?cr(qe,qe+1):cr(qe,qe))}id.exports={SyntaxError:gi,parse:Mv}});var dd=fe((r_,Uv)=>{Uv.exports={name:"@podlite/schema",version:"0.0.12",description:"podlite schema",main:"src/index.ts",types:"./lib/index.d.ts",license:"MIT",files:["lib/**/*.js","lib/**/*.d.ts","schema/*","README.md","CHANGELOG.md"],engines:{node:">=14"},engineStrict:!0,publishConfig:{access:"public",main:"index.js",module:"index.js",types:"./lib/index.d.ts"},scripts:{clean:"rm -rf lib tsconfig.tsbuildinfo",build:"run-s build:ts build:ast build:pegjs","build:ast":"ts-node scripts/make-ast-scheme.ts","build:ts":"yarn g:tsc --build $INIT_CWD","build:pegjs":"pegjs -o src/grammar.js src/grammar.pegjs && pegjs -o src/grammarfc.js src/grammarfc.pegjs",watch:"npx nodemon -e js,ts --exec 'yarn' build",test:"yarn g:jest --passWithNoTests"},keywords:["markdown","podlite","markup","markup-language"],dependencies:{ajv:"^7.2.3",events:"^3.1.0","json-pointer":"^0.6.1",nanoid:"3.1.30"},devDependencies:{"@types/node":"^17.0.7",glob:"^7.2.0","npm-run-all":"^4.1.5",pegjs:"^0.10.0","ts-node":"^9.1.1",typescript:"4.5.5","typescript-json-schema":"0.53.0"}}});var yd=fe((O_,gd)=>{gd.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var Ed=fe((N_,Cd)=>{"use strict";var Ws=Object.prototype.hasOwnProperty,_d=Object.prototype.toString,$d=Object.defineProperty,bd=Object.getOwnPropertyDescriptor,vd=function(r){return typeof Array.isArray=="function"?Array.isArray(r):_d.call(r)==="[object Array]"},kd=function(r){if(!r||_d.call(r)!=="[object Object]")return!1;var e=Ws.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&Ws.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!e&&!n)return!1;var i;for(i in r);return typeof i>"u"||Ws.call(r,i)},wd=function(r,e){$d&&e.name==="__proto__"?$d(r,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):r[e.name]=e.newValue},xd=function(r,e){if(e==="__proto__")if(Ws.call(r,e)){if(bd)return bd(r,e).value}else return;return r[e]};Cd.exports=function t(){var r,e,n,i,o,a,u=arguments[0],f=1,m=arguments.length,p=!1;for(typeof u=="boolean"&&(p=u,u=arguments[1]||{},f=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});f<m;++f)if(r=arguments[f],r!=null)for(e in r)n=xd(u,e),i=xd(r,e),u!==i&&(p&&i&&(kd(i)||(o=vd(i)))?(o?(o=!1,a=n&&vd(n)?n:[]):a=n&&kd(n)?n:{},wd(u,{name:e,newValue:t(p,a,i)})):typeof i<"u"&&wd(u,{name:e,newValue:i}));return u}});var Pd=fe((L_,Sd)=>{Sd.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var md=Rn(vp()),Kv=Rn(_p()),a_=Rn(Sp());Do();var Fp=(t=21)=>{let r="",e=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let n=e[t]&63;n<36?r+=n.toString(36):n<62?r+=(n-26).toString(36).toUpperCase():n<63?r+="_":r+="-"}return r};var Lo=t=>({...t}),Xl=t=>{if(Array.isArray(t))return t.filter(r=>r);console.warn("[podlite-schema] filterNulls got not array as content")},yr=(t,r)=>{let e="block",n=t.name,i={id:Fp(),margin:"",...t};var o=Lo({type:e,...i,content:Xl(r)});return o};var qs=(t,r)=>Lo({type:"fcode",...t,content:r}),Yl=(t,r)=>Lo({...t,type:"fcode",name:"L",content:Xl(r)}),Tp=t=>Lo({type:"fcode",name:"Delete",content:Xl(t)}),Bs=t=>Lo({type:"verbatim",value:t});var Op=t=>({type:"block",name:"caption",content:t}),Np=(t,r)=>({type:"image",src:t,alt:r}),Rp=({margin:t=""},r)=>yr({name:"root",margin:t},r);var Dp=(t,r={})=>{let e=t.config instanceof Array?t.config:[],n=[];r.config&&r.config.hasOwnProperty(t.name)&&(n=r.config[t.name]);let i={};[...e,...n].map(a=>{i.hasOwnProperty(a.name)||(i[a.name]=[]),a.type==="array"?i[a.name].push(...a.value):i[a.name].push(a.value)});let o=function(){};return o.exists=a=>i.hasOwnProperty(a),o.getAllValues=a=>o.exists(a)?i[a]:[],o.getFirstValue=a=>o.exists(a)?o.getAllValues(a)[0]:void 0,o.asHash=()=>i,o},Yr=Dp;var Lp=(t,r)=>{let e=Yr(t,r);return e.exists("id")?e.getFirstValue("id"):t.id};Do();function jp(t){return Array.isArray(t)?t.reduce((r,e)=>Array.isArray(e)?r.concat(jp(e)):r.concat(e),[]):t}function Sv(t){function r(e,n){if(e instanceof Array)return jp(e.map(a=>r(a,n))).filter(Boolean);if(typeof e=="string")return r({type:"text",value:e},n);let i=t.slice();i.reverse();let o=i.findIndex(a=>a.isFor(e));if(o!==-1){let a=i.slice(o+1),u=a.findIndex(m=>m.isFor(e)),f=(m=e,p=n,$=r)=>{if(u!==-1)a[u].fn(m,p,$,()=>{});else return};return typeof i[o].fn!="function"&&console.warn("[pod6] bad fn for "+JSON.stringify(e,null,2)),i[o].fn(e,n,r,f)}else{let a={...e};if(a.hasOwnProperty("content"))return r(a.content,n)}}return r.rules=t,r}var Ms=Sv;var et=(t,r)=>(e,n)=>(i,o,a)=>{e.writeRaw(t),i.content&&a(i.content,o),e.writeRaw(r)},An=()=>()=>()=>{},Mn=(t,r)=>(e,n,i)=>{if(e.content)return i(e.content,n)},zn=t=>(r,e)=>(n,i,o)=>t(n,i)(r,e)(n,i,o);var tu=(t,r)=>{let e=js(t).reverse();return(n,i)=>{let o=e.map(f=>En(f.rule,f.fn(n,i))).reverse(),a=r(n,i),u;return(f,m,p)=>(u||(u=Ms([...p.rules,...o])),a(f,m,u))}},mi=(t,r)=>(e,n)=>{let i=t(e,n);return(o,a,u)=>{let f=Yr(o,a).getFirstValue("nested")||r;f!==void 0&&e.addLevel(f),i(o,a,u),f!==void 0&&e.removeLevel(f)}};var{makeRule:Pv,makePlug:Iv}=(Do(),Ih(Ip));function zs(t){return t&&t!==t.toLowerCase()&&t!==t.toUpperCase()}function qp(t){return t.reduce((r,e)=>Array.isArray(e)?r.concat(qp(e)):r.concat(e),[])}var eu=t=>{let r=[];function e(i,o){if(i instanceof Array&&console.warn(`[pod] Unsupported param for ${i}`),i instanceof Object){for(var a in i)i.hasOwnProperty(a)&&e(a,i[a]);return[]}r.push(Pv(Iv(i),o))}function n(i,o={}){if(i instanceof Array)return qp(i.map(f=>n(f,o)));if(typeof i=="string")return i;let a=r.slice();a.reverse();let u=a.findIndex(f=>f.isFor(i));if(u!==-1)return a[u].fn(i,o,n);{let f={...i};return f.hasOwnProperty("content")&&(f.content=n(f.content,o)),f}}return e(t),n.rules=r,n},xr=eu;Do();var Jp=Rn(Zp()),nu=class extends Jp.EventEmitter{constructor(e){super();this.endWrite=()=>{this.emit("end")};this.INDEXTERMS=[],this.FOOTNOTES=[],this.output=e,this.ons=[],this.emit("ready")}escape(e){return e}write(e){return this.writeRaw(this.escape(e))}writeRaw(e){typeof this.output=="function"?this.output(e):console.log(e)}getStr(){return{errors:this.errors,toString:()=>this.out,valueOf:()=>this.out}}startWrite(e){(this.ons||[]).map(n=>super.on(...n)),this.emit("start",e),this.addListener("errors",n=>{this.errors=this.errors||[],this.errors.push(n)})}on(...e){return this.ons=this.ons||[],this.ons.unshift([...e]),this}_add_nesting(e){}_remove_nesting(e){}addLevel(e){this._add_nesting(e)}removeLevel(e){this._remove_nesting(e)}},Hs=nu;var jo=(t={},r=[])=>{let e=r,n=t.processor||Xp,i=t.writer;return o.use=a,o.run=u,o.getPlugins=()=>e,o;function o(f){}function a(f,m){if(f instanceof Array)return jo(t,[...e,...m]);if(f instanceof Object){for(var p in f)f.hasOwnProperty(p)&&a(p,f[p]);return o}return e.push(En(Ji(f),m)),o}function u(f,m){let p="",$=m||i||new Hs(X=>{p=p+X}),k=typeof $=="function"?new $(X=>{p=p+X}):$,v=typeof f=="string"?n(f):f,x=e.slice();x.reverse();let I=Ms(x.map(X=>En(X.rule,X.fn(k,n,v))).reverse()),D={};k.startWrite(v);let R=I(v,D);return k.endWrite(),{errors:k.errors,toString:()=>p,valueOf:()=>p,indexingTerms:k.INDEXTERMS,annotations:k.FOOTNOTES,defenitions:k.DEFINITIONS,interator:R}}};var Yp=()=>t=>xr({"*":(e,n,i)=>(e.content&&(e.content=i(e.content,n,i)),delete e.location,e)})(t,{}),ed=Yp;var hd=Rn(rd());var qv=()=>t=>{let r=(n,i={})=>{if((n.type=="code"||n.type=="text")&&(n.margin&&i.margin&&i.margin.length>0&&i.margin.length==n.margin.length&&(n.type="para"),n.type==="code")){var o=new RegExp(`^[ ]{0,${n.margin.length}}`,"gm");n.text=n.text.replace(o,"")}if(n.type==="block"){i.margin=typeof n.margin!="string"?"":n.margin;let a={...i};a.nest=(a.nest||0)+1,n.content.map(u=>{r(u,i)})}};var e={};return t.forEach(n=>r(n,e)),t},nd=qv;var Ks=od(),zv=()=>t=>xr({":para":(e,n,i)=>xr({":text":(o,a)=>Ks.parse(o.value),":verbatim":(o,a)=>Ks.parse(o.value)})(e,{...n}),":block":(e,n,i)=>{if("name"in e&&e.name==="pod")return{...e,content:i(e.content,n,i)};let o=Yr(e,n),a="name"in e&&e.name==="code",u="name"in e&&e.name==="data",f=o.getAllValues("allow");if((a||u)&&f.length==0)return e;let m=f.sort(),p=xr({":verbatim":($,k)=>Ks.parse($.value,{allowed:m}),":text":($,k)=>Ks.parse($.value,{allowed:m}),":block":($,k)=>zs($.name)?$:{...$,content:p($.content,{...k})}});return p(e,{...n})}})(t,{}),sd=zv;var ad=()=>t=>{let r=e=>{if(Array.isArray(e))e.forEach(n=>{r(n)});else if(e&&e.type==="block"){let n=/^item(\d+)?/.exec(e.name);if(n&&(e.name="item",e.level=n[1]||1,e.content[0])){let i=e.content[0];if(i.text){let o=/^(\s*#\s*)/;o.exec(i.text)&&(i.text=i.text.replace(o,""),i.type==="para"&&(i.content=[i.text]),e.config=e.config||[],e.config.push({name:"numbered",value:!0,type:"boolean"}))}}r(e.content)}};return r(t),t};var ld=()=>t=>{let r=e=>{if(Array.isArray(e))e.forEach(n=>{r(n)});else if(e&&e.type==="block"){let n=/^head(\d+)?/.exec(e.name);if(n&&(e.name="head",e.level=n[1]||1,e.content[0])){let i=e.content[0];if(i.text){let o=/(\s*#\s*)/;o.exec(i.text)&&(i.text=i.text.replace(o,""),e.config={...e.config,numbered:!0})}}r(e.content)}};return r(t),t};var ud=()=>t=>{let r=(o,a)=>(o.name==="item"||o.name==="defn")&&a.name===o.name&&o.level===a.level&&e(o)===e(a),e=o=>Boolean(o.config&&o.config.numbered),n=o=>{let a={};return o.reduce((f,m)=>(m.name==="defn"?r(a,m)?f[f.length-1].push(m):f.push([m]):f.push(m),a=m,f),[]).map(f=>f instanceof Array?f[0].name!=="defn"?f:{type:"list",list:f[0].name==="defn"?"variable":e(f[0])?"ordered":"itemized",level:1,content:[...f]}:(f.content&&f.type!=="fcode"&&(f.content=n(f.content)),f))};return t=(o=>Array.isArray(o)?n(o):(o.type==="block"&&o.name!=="table"&&(o.content=n(o.content)),o))(t),t};var fd=()=>t=>{let r=(o,a)=>(o.name==="item"||o.name==="defn")&&a.name===o.name&&o.level===a.level&&e(o)===e(a),e=o=>Boolean(Yr(o,{}).exists("numbered")),n=(o,a=1)=>{let u=k=>k.length>0&&k[k.length-1].type==="list",f=k=>{if(u(k))return k[k.length-1]},m=(k,v)=>v.name&&v.name==="item"&&v.type&&v.type==="block"||v.type==="blankline",p={};return o.reduce((k,v)=>v.name==="item"&&v.type==="block"&&v.level<a?[...k,v]:(v.name==="item"&&v.type==="block"&&(!u(k)||v.level===a&&f(k).list!==(e(v)?"ordered":"itemized"))&&k.push({type:"list",level:v.level,content:[],list:e(v)?"ordered":"itemized"}),u(k)&&m(f(k),v)?f(k).content.push(v):k.push(v),k),[]).map(k=>(k.content&&k.type!=="fcode"&&(k.content=n(k.content,k.level+1)),k))};return t=(o=>(Array.isArray(o)?o=n(o):o.type==="block"&&o.name!=="table"&&(o.content=n(o.content)),o))(t),t};var cd=()=>t=>xr({defn:e=>{let n=e.content,i=n.length,o=[],a=!1;for(let u=0;u<i;u++){let f=n[u];if(f.type==="para"&&!a){let m=f.content[0],$=m.value.split(`
|
|
14
|
-
`),k=$.shift(),v={type:"para",name:"term",text:k,content:[{type:"text",value:k}]};o.push(v),$.length==1&&$[0]===""||(m.value=$.join(`
|
|
15
|
-
`),f.text=m.value,o.push(f)),a=!0}else o.push(f)}return e.content=o,e}})(t,{});function qo(t){return t.reduce((r,e)=>Array.isArray(e)?r.concat(qo(e)):r.concat(e),[])}var iu=(t,r,e)=>{let n=[];for(let i=0;t.length>i;i++)n.push(e(parseInt(t[i],10),parseInt(r[i],10)));return n.join("")},Vv=(t,r)=>{let e=Math.max(...[...t,...r].map(a=>a.length));return t.map(a=>{let u=a+" ".repeat(e-a.length),f=[],m=/\s+[+|\s]\s/g,p;for(;(p=m.exec(u))!=null;){let $="1".repeat(p.index)+"0".repeat(p[0].length);f.push($+"1".repeat(e-$.length))}return f.reduce(($,k)=>iu($,k,(v,x)=>v&x),"1".repeat(e))}).map(a=>iu(a,"",u=>u==0?1:0)).reduce((a,u)=>iu(a,u,(f,m)=>f&m),"1".repeat(e))},ou=(t,r)=>{let n=qo(t.split(/\n/).filter(o=>o.length>0)).map(o=>{let a=/((1+|0+))/g,u=[],f;for(;(f=a.exec(r))!=null;){if(f[0][0]==1)continue;let m=o.substring(f.index,f.index+f[0].length);u.push(m)}return u}),i=[];return i=n.reduce((o,a)=>{for(let u=0;u<a.length;u++)o[u]=(o[u]===void 0?"":o[u])+" "+a[u];return o},[]),i},pd=()=>t=>xr({table:e=>{let n=[],i=v=>{n.push(v.value)},o=[];if(xr({"row:text":i,"head:text":i,":separator":v=>{o.push(v.text)}})(e),!n.length)return e;let a=v=>v.split(/\n/).filter(x=>x.length>0),u=qo(n.map(a)),f=qo(o.map(a)),m=[];xr({"row:text":v=>{m.push(v.value)}})(e);let p=Vv(u,f),$=(v,x,...I)=>({...I,name:v,type:"block",content:Array.isArray(x)?x:[x]});return xr({"row:text":v=>{if(m.length==1)return qo([v.value].map(a)).map(D=>{let R=ou(D,p);return $("table_row",R.map(X=>$("table_cell",{type:"text",value:X})))});let x=ou(v.value,p);return $("table_row",x.map(I=>$("table_cell",{type:"text",value:I})))},"head:text":v=>{let x=ou(v.value,p);return $("table_head",x.map(I=>$("table_cell",{type:"text",value:I})))}})(e)}})(t,{});var e_={":text":(t,r)=>(e,n,i)=>{e.value?t.write(e.value):i(e.content,n)},"A<>":(t,r)=>(e,n,i)=>{if(!(n.alias&&n.alias.hasOwnProperty(e.content)))t.write(`A<${e.content}>`);else{let o=n.alias[e.content].join(`
|
|
16
|
-
`),a=r(o),u=ed()(a);u[0].type==="para"?i(u[0].content,n):i(u,n)}},"C<>":et("<code>","</code>"),"D<>":(t,r)=>(e,n,i)=>{let o={node:e},a=[e.content[0]];o&&(a=o),t.hasOwnProperty("DEFINITIONS")||(t.DEFINITIONS=[]),t.DEFINITIONS.push({definition:a}),t.writeRaw("<dfn>"),i(e.content,n),t.writeRaw("</dfn>")},"B<>":et("<strong>","</strong>"),"I<>":et("<em>","</em>"),"R<>":et("<var>","</var>"),"K<>":et("<kbd>","</kbd>"),"L<>":zn((t,r)=>{let{meta:e}=t;return e===null&&(e=t.content),et(`<a href="${e}">`,"</a>")}),"N<>":(t,r)=>(t.addListener("end",()=>{if(!t.hasOwnProperty("FOOTNOTES"))return;let e=t.FOOTNOTES;e.length<1||(t.writeRaw('<div class="footnotes">'),e.map(n=>{t.writeRaw(`<p><sup id="${n.fnId}" class="footnote"><a href="#${n.fnRefId}">[${n.gid}]</a></sup> `),n.make(),t.writeRaw("</p>")}),t.writeRaw("</div>"))}),(e,n,i)=>{if(e.content.length<1)return;t.hasOwnProperty("gid")||(t.gid=1);let o=t.gid++,a=`fnref:${o}`,u=`fn:${o}`;t.writeRaw(`<sup id="${a}" class="footnote"><a href="#${u}">[${o}]</a></sup>`),t.hasOwnProperty("FOOTNOTES")||(t.FOOTNOTES=[]),t.FOOTNOTES.push({gid:o,fnRefId:a,fnId:u,make:()=>{i(e.content,n)}})}),"S<>":(t,r)=>(e,n,i)=>{let u=(e.content||"").replace(/ /g," ").replace(/\n/g,"</br>");t.writeRaw(u)},"T<>":et("<samp>","</samp>"),"U<>":et("<u>","</u>"),"V<>":Mn,"X<>":(t,r)=>(e,n,i)=>{i(e.content,n);let{entry:o}=e;if(o===null&&e.content.length>0)o=[e.content[0]];else return;t.hasOwnProperty("INDEXTERMS")||(t.INDEXTERMS=[]),t.INDEXTERMS.push({entry:o})},"Z<>":An,pod:Mn,":code":et("<pre><code>","</code></pre>"),code:mi(et("<pre><code>","</code></pre>")),data:An,":verbatim":(t,r)=>(e,n,i)=>{e.error&&t.emit("errors",e.location),i(e.value)},":blankline":An,":ambient":An,":config":zn((t,r)=>(r.hasOwnProperty("config")||(r.config={}),r.config[t.name]=t.config,An)),":alias":zn((t,r)=>(r.hasOwnProperty("alias")||(r.alias={}),r.alias[t.name]=t.replacement,An)),para:mi(Mn),":para":et("<p>","</p>"),"head:block":tu({":para":Mn},zn((t,r)=>{let{level:e}=t,n=Lp(t,r);return et(`<h${e}${n?` id="${n}"`:""}>`,`</h${e}>`)})),":list":zn((t,r)=>t.list==="ordered"?et("<ol>","</ol>"):t.list==="variable"?et("<dl>","</dl>"):et("<ul>","</ul>")),"item:block":(t,r)=>(e,n,i)=>{e.content instanceof Array||console.error("[pod6] item:block : Error in content of "+JSON.stringify(e));let[o,...a]=e.content;t.writeRaw("<li>"),i(e.content,n),t.writeRaw("</li>")},"comment:block":An,defn:et("","</dd>"),"term:para":et("<dt>","</dt><dd>"),nested:mi(Mn,1),output:mi(et("<pre><samp>","</samp></pre>"),1),input:mi(et("<pre><kbd>","</kbd></pre>"),1),"table:block":mi((t,r)=>(e,n,i)=>{let o=Yr(e,n);t.writeRaw("<table>"),o.exists("caption")&&(t.writeRaw("<caption>"),t.write(o.getFirstValue("caption")),t.writeRaw("</caption>")),i(e.content,n),t.writeRaw("</table>")}),":separator":An,table_row:et("<tr>","</tr>"),table_cell:et("<td>","</td>"),table_head:tu({table_cell:et("<th>","</th>")},et("<tr>","</tr>")),":toc":(t,r)=>(e,n,i)=>{t.writeRaw('<div className="toc">');let o=Yr(e,n);if(o.exists("title")){let a=o.getFirstValue("title");t.writeRaw('<div className="toctitle">'),t.write(a),t.writeRaw("</div>")}i(e.content,n),t.writeRaw("</div>")},":toc-list":zn((t,r)=>et(`<ul class="toc-list listlevel${t.level}">`,"</ul>")),":toc-item":zn((t,r)=>et('<li class="toc-item">',"</li>")),":image":(t,r)=>(e,n,i)=>{t.writeRaw(`<img src="${e.src}" alt="${e.alt}"/>`)}};var y_=new md.default({strict:!0,allowUnionTypes:!0});function Wv(){var t=[];return r.use=e,r.parse=n,r.use(nd),r.use(ad),r.use(ld),r.use(cd),r.use(pd),r.use(sd),r.use(fd),r.use(ud),r;function r(){}function e(i){if(!["function"].includes(typeof i))throw i;return t.push(i),r}function n(i,o={skipChain:0,podMode:1}){let a=hd.parse(i,{podMode:o.podMode});if(!o.skipChain)for(let u=0;u<t.length;u++){let f=t[u];a=f(o)(a)}return a}}var Xp=Wv().parse;var{version:$_}=dd();function su(t){if(t)throw t}var qd=Rn(yd(),1),mu=Rn(Ed(),1);function Bo(t){if(typeof t!="object"||t===null)return!1;let r=Object.getPrototypeOf(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ad(){let t=[],r={run:e,use:n};return r;function e(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(f,...m){let p=t[++o],$=-1;if(f){a(f);return}for(;++$<i.length;)(m[$]===null||m[$]===void 0)&&(m[$]=i[$]);i=m,p?Gv(p,u)(...m):a(null,...m)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),r}}function Gv(t,r){let e;return n;function n(...a){let u=t.length>a.length,f;u&&a.push(i);try{f=t.apply(this,a)}catch(m){let p=m;if(u&&e)throw p;return i(p)}u||(f instanceof Promise?f.then(o,i):f instanceof Error?i(f):o(f))}function i(a,...u){e||(e=!0,r(a,...u))}function o(a){i(null,a)}}var Rd=Rn(Pd(),1);function yi(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Id(t.position):"start"in t||"end"in t?Id(t):"line"in t||"column"in t?au(t):""}function au(t){return Fd(t&&t.line)+":"+Fd(t&&t.column)}function Id(t){return au(t&&t.start)+"-"+au(t&&t.end)}function Fd(t){return t&&typeof t=="number"?t:1}var ar=class extends Error{constructor(r,e,n){let i=[null,null],o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof e=="string"&&(n=e,e=void 0),typeof n=="string"){let a=n.indexOf(":");a===-1?i[1]=n:(i[0]=n.slice(0,a),i[1]=n.slice(a+1))}e&&("type"in e||"position"in e?e.position&&(o=e.position):"start"in e||"end"in e?o=e:("line"in e||"column"in e)&&(o.start=e)),this.name=yi(e)||"1:1",this.message=typeof r=="object"?r.message:r,this.stack=typeof r=="object"?r.stack:"",this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.source=i[0],this.ruleId=i[1],this.position=o,this.actual,this.expected,this.file,this.url,this.note}};ar.prototype.file="";ar.prototype.name="";ar.prototype.reason="";ar.prototype.message="";ar.prototype.stack="";ar.prototype.fatal=null;ar.prototype.column=null;ar.prototype.line=null;ar.prototype.source=null;ar.prototype.ruleId=null;ar.prototype.position=null;var en={basename:Qv,dirname:Zv,extname:Jv,join:Xv,sep:"/"};function Qv(t,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Mo(t);let e=0,n=-1,i=t.length,o;if(r===void 0||r.length===0||r.length>t.length){for(;i--;)if(t.charCodeAt(i)===47){if(o){e=i+1;break}}else n<0&&(o=!0,n=i+1);return n<0?"":t.slice(e,n)}if(r===t)return"";let a=-1,u=r.length-1;for(;i--;)if(t.charCodeAt(i)===47){if(o){e=i+1;break}}else a<0&&(o=!0,a=i+1),u>-1&&(t.charCodeAt(i)===r.charCodeAt(u--)?u<0&&(n=i):(u=-1,n=a));return e===n?n=a:n<0&&(n=t.length),t.slice(e,n)}function Zv(t){if(Mo(t),t.length===0)return".";let r=-1,e=t.length,n;for(;--e;)if(t.charCodeAt(e)===47){if(n){r=e;break}}else n||(n=!0);return r<0?t.charCodeAt(0)===47?"/":".":r===1&&t.charCodeAt(0)===47?"//":t.slice(0,r)}function Jv(t){Mo(t);let r=t.length,e=-1,n=0,i=-1,o=0,a;for(;r--;){let u=t.charCodeAt(r);if(u===47){if(a){n=r+1;break}continue}e<0&&(a=!0,e=r+1),u===46?i<0?i=r:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||e<0||o===0||o===1&&i===e-1&&i===n+1?"":t.slice(i,e)}function Xv(...t){let r=-1,e;for(;++r<t.length;)Mo(t[r]),t[r]&&(e=e===void 0?t[r]:e+"/"+t[r]);return e===void 0?".":Yv(e)}function Yv(t){Mo(t);let r=t.charCodeAt(0)===47,e=e1(t,!r);return e.length===0&&!r&&(e="."),e.length>0&&t.charCodeAt(t.length-1)===47&&(e+="/"),r?"/"+e:e}function e1(t,r){let e="",n=0,i=-1,o=0,a=-1,u,f;for(;++a<=t.length;){if(a<t.length)u=t.charCodeAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(e.length<2||n!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){if(f=e.lastIndexOf("/"),f!==e.length-1){f<0?(e="",n=0):(e=e.slice(0,f),n=e.length-1-e.lastIndexOf("/")),i=a,o=0;continue}}else if(e.length>0){e="",n=0,i=a,o=0;continue}}r&&(e=e.length>0?e+"/..":"..",n=2)}else e.length>0?e+="/"+t.slice(i+1,a):e=t.slice(i+1,a),n=a-i-1;i=a,o=0}else u===46&&o>-1?o++:o=-1}return e}function Mo(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var Td={cwd:t1};function t1(){return"/"}function Yi(t){return t!==null&&typeof t=="object"&&t.href&&t.origin}function Od(t){if(typeof t=="string")t=new URL(t);else if(!Yi(t)){let r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(t.protocol!=="file:"){let r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return r1(t)}function r1(t){if(t.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let r=t.pathname,e=-1;for(;++e<r.length;)if(r.charCodeAt(e)===37&&r.charCodeAt(e+1)===50){let n=r.charCodeAt(e+2);if(n===70||n===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(r)}var lu=["history","path","basename","stem","extname","dirname"],zo=class{constructor(r){let e;r?typeof r=="string"||(0,Rd.default)(r)?e={value:r}:Yi(r)?e={path:r}:e=r:e={},this.data={},this.messages=[],this.history=[],this.cwd=Td.cwd(),this.value,this.stored,this.result,this.map;let n=-1;for(;++n<lu.length;){let o=lu[n];o in e&&e[o]!==void 0&&(this[o]=o==="history"?[...e[o]]:e[o])}let i;for(i in e)lu.includes(i)||(this[i]=e[i])}get path(){return this.history[this.history.length-1]}set path(r){Yi(r)&&(r=Od(r)),fu(r,"path"),this.path!==r&&this.history.push(r)}get dirname(){return typeof this.path=="string"?en.dirname(this.path):void 0}set dirname(r){Nd(this.basename,"dirname"),this.path=en.join(r||"",this.basename)}get basename(){return typeof this.path=="string"?en.basename(this.path):void 0}set basename(r){fu(r,"basename"),uu(r,"basename"),this.path=en.join(this.dirname||"",r)}get extname(){return typeof this.path=="string"?en.extname(this.path):void 0}set extname(r){if(uu(r,"extname"),Nd(this.dirname,"extname"),r){if(r.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=en.join(this.dirname,this.stem+(r||""))}get stem(){return typeof this.path=="string"?en.basename(this.path,this.extname):void 0}set stem(r){fu(r,"stem"),uu(r,"stem"),this.path=en.join(this.dirname||"",r+(this.extname||""))}toString(r){return(this.value||"").toString(r)}message(r,e,n){let i=new ar(r,e,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(r,e,n){let i=this.message(r,e,n);return i.fatal=null,i}fail(r,e,n){let i=this.message(r,e,n);throw i.fatal=!0,i}};function uu(t,r){if(t&&t.includes(en.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+en.sep+"`")}function fu(t,r){if(!t)throw new Error("`"+r+"` cannot be empty")}function Nd(t,r){if(!t)throw new Error("Setting `"+r+"` requires `path` to be set too")}var hu=Md().freeze(),Bd={}.hasOwnProperty;function Md(){let t=Ad(),r=[],e={},n,i=-1;return o.data=a,o.Parser=void 0,o.Compiler=void 0,o.freeze=u,o.attachers=r,o.use=f,o.parse=m,o.stringify=p,o.run=$,o.runSync=k,o.process=v,o.processSync=x,o;function o(){let I=Md(),D=-1;for(;++D<r.length;)I.use(...r[D]);return I.data((0,mu.default)(!0,{},e)),I}function a(I,D){return typeof I=="string"?arguments.length===2?(du("data",n),e[I]=D,o):Bd.call(e,I)&&e[I]||null:I?(du("data",n),e=I,o):e}function u(){if(n)return o;for(;++i<r.length;){let[I,...D]=r[i];if(D[0]===!1)continue;D[0]===!0&&(D[0]=void 0);let R=I.call(o,...D);typeof R=="function"&&t.use(R)}return n=!0,i=Number.POSITIVE_INFINITY,o}function f(I,...D){let R;if(du("use",n),I!=null)if(typeof I=="function")ce(I,...D);else if(typeof I=="object")Array.isArray(I)?de(I):ee(I);else throw new TypeError("Expected usable value, not `"+I+"`");return R&&(e.settings=Object.assign(e.settings||{},R)),o;function X(Q){if(typeof Q=="function")ce(Q);else if(typeof Q=="object")if(Array.isArray(Q)){let[me,...ve]=Q;ce(me,...ve)}else ee(Q);else throw new TypeError("Expected usable value, not `"+Q+"`")}function ee(Q){de(Q.plugins),Q.settings&&(R=Object.assign(R||{},Q.settings))}function de(Q){let me=-1;if(Q!=null)if(Array.isArray(Q))for(;++me<Q.length;){let ve=Q[me];X(ve)}else throw new TypeError("Expected a list of plugins, not `"+Q+"`")}function ce(Q,me){let ve=-1,ke;for(;++ve<r.length;)if(r[ve][0]===Q){ke=r[ve];break}ke?(Bo(ke[1])&&Bo(me)&&(me=(0,mu.default)(!0,ke[1],me)),ke[1]=me):r.push([...arguments])}}function m(I){o.freeze();let D=Vo(I),R=o.Parser;return cu("parse",R),Dd(R,"parse")?new R(String(D),D).parse():R(String(D),D)}function p(I,D){o.freeze();let R=Vo(D),X=o.Compiler;return pu("stringify",X),Ld(I),Dd(X,"compile")?new X(I,R).compile():X(I,R)}function $(I,D,R){if(Ld(I),o.freeze(),!R&&typeof D=="function"&&(R=D,D=void 0),!R)return new Promise(X);X(null,R);function X(ee,de){t.run(I,Vo(D),ce);function ce(Q,me,ve){me=me||I,Q?de(Q):ee?ee(me):R(null,me,ve)}}}function k(I,D){let R,X;return o.run(I,D,ee),jd("runSync","run",X),R;function ee(de,ce){su(de),R=ce,X=!0}}function v(I,D){if(o.freeze(),cu("process",o.Parser),pu("process",o.Compiler),!D)return new Promise(R);R(null,D);function R(X,ee){let de=Vo(I);o.run(o.parse(de),de,(Q,me,ve)=>{if(Q||!me||!ve)ce(Q);else{let ke=o.stringify(me,ve);ke==null||(o1(ke)?ve.value=ke:ve.result=ke),ce(Q,ve)}});function ce(Q,me){Q||!me?ee(Q):X?X(me):D(null,me)}}}function x(I){let D;o.freeze(),cu("processSync",o.Parser),pu("processSync",o.Compiler);let R=Vo(I);return o.process(R,X),jd("processSync","process",D),R;function X(ee){D=!0,su(ee)}}}function Dd(t,r){return typeof t=="function"&&t.prototype&&(n1(t.prototype)||r in t.prototype)}function n1(t){let r;for(r in t)if(Bd.call(t,r))return!0;return!1}function cu(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `Parser`")}function pu(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `Compiler`")}function du(t,r){if(r)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ld(t){if(!Bo(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function jd(t,r,e){if(!e)throw new Error("`"+t+"` finished async. Use `"+r+"` instead")}function Vo(t){return i1(t)?t:new zo(t)}function i1(t){return Boolean(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function o1(t){return typeof t=="string"||(0,qd.default)(t)}function Vd(t,r){var{includeImageAlt:e=!0}=r||{};return Ud(t,e)}function Ud(t,r){return t&&typeof t=="object"&&(t.value||(r?t.alt:"")||"children"in t&&zd(t.children,r)||Array.isArray(t)&&zd(t,r))||""}function zd(t,r){for(var e=[],n=-1;++n<t.length;)e[n]=Ud(t[n],r);return e.join("")}function yt(t,r,e,n){let i=t.length,o=0,a;if(r<0?r=-r>i?0:i+r:r=r>i?i:r,e=e>0?e:0,n.length<1e4)a=Array.from(n),a.unshift(r,e),[].splice.apply(t,a);else for(e&&[].splice.apply(t,[r,e]);o<n.length;)a=n.slice(o,o+1e4),a.unshift(r,0),[].splice.apply(t,a),o+=1e4,r+=1e4}function lr(t,r){return t.length>0?(yt(t,t.length,0,r),t):r}var Hd={}.hasOwnProperty;function Gs(t){let r={},e=-1;for(;++e<t.length;)s1(r,t[e]);return r}function s1(t,r){let e;for(e in r){let i=(Hd.call(t,e)?t[e]:void 0)||(t[e]={}),o=r[e],a;for(a in o){Hd.call(i,a)||(i[a]=[]);let u=o[a];a1(i[a],Array.isArray(u)?u:u?[u]:[])}}}function a1(t,r){let e=-1,n=[];for(;++e<r.length;)(r[e].add==="after"?t:n).push(r[e]);yt(t,0,0,n)}var Kd=/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var Jt=Un(/[A-Za-z]/),$i=Un(/\d/),Wd=Un(/[\dA-Fa-f]/),Ft=Un(/[\dA-Za-z]/),Gd=Un(/[!-/:-@[-`{-~]/),gu=Un(/[#-'*+\--9=?A-Z^-~]/);function Vn(t){return t!==null&&(t<32||t===127)}function Ve(t){return t!==null&&(t<0||t===32)}function ae(t){return t!==null&&t<-2}function Fe(t){return t===-2||t===-1||t===32}var bi=Un(/\s/),vi=Un(Kd);function Un(t){return r;function r(e){return e!==null&&t.test(String.fromCharCode(e))}}function ye(t,r,e,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return a;function a(f){return Fe(f)?(t.enter(e),u(f)):r(f)}function u(f){return Fe(f)&&o++<i?(t.consume(f),u):(t.exit(e),r(f))}}var Qd={tokenize:l1};function l1(t){let r=t.attempt(this.parser.constructs.contentInitial,n,i),e;return r;function n(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),ye(t,r,"linePrefix")}function i(u){return t.enter("paragraph"),o(u)}function o(u){let f=t.enter("chunkText",{contentType:"text",previous:e});return e&&(e.next=f),e=f,a(u)}function a(u){if(u===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(u);return}return ae(u)?(t.consume(u),t.exit("chunkText"),o):(t.consume(u),a)}}var Jd={tokenize:u1},Zd={tokenize:f1};function u1(t){let r=this,e=[],n=0,i,o,a;return u;function u(ee){if(n<e.length){let de=e[n];return r.containerState=de[1],t.attempt(de[0].continuation,f,m)(ee)}return m(ee)}function f(ee){if(n++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,i&&X();let de=r.events.length,ce=de,Q;for(;ce--;)if(r.events[ce][0]==="exit"&&r.events[ce][1].type==="chunkFlow"){Q=r.events[ce][1].end;break}R(n);let me=de;for(;me<r.events.length;)r.events[me][1].end=Object.assign({},Q),me++;return yt(r.events,ce+1,0,r.events.slice(de)),r.events.length=me,m(ee)}return u(ee)}function m(ee){if(n===e.length){if(!i)return k(ee);if(i.currentConstruct&&i.currentConstruct.concrete)return x(ee);r.interrupt=Boolean(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return r.containerState={},t.check(Zd,p,$)(ee)}function p(ee){return i&&X(),R(n),k(ee)}function $(ee){return r.parser.lazy[r.now().line]=n!==e.length,a=r.now().offset,x(ee)}function k(ee){return r.containerState={},t.attempt(Zd,v,x)(ee)}function v(ee){return n++,e.push([r.currentConstruct,r.containerState]),k(ee)}function x(ee){if(ee===null){i&&X(),R(0),t.consume(ee);return}return i=i||r.parser.flow(r.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),I(ee)}function I(ee){if(ee===null){D(t.exit("chunkFlow"),!0),R(0),t.consume(ee);return}return ae(ee)?(t.consume(ee),D(t.exit("chunkFlow")),n=0,r.interrupt=void 0,u):(t.consume(ee),I)}function D(ee,de){let ce=r.sliceStream(ee);if(de&&ce.push(null),ee.previous=o,o&&(o.next=ee),o=ee,i.defineSkip(ee.start),i.write(ce),r.parser.lazy[ee.start.line]){let Q=i.events.length;for(;Q--;)if(i.events[Q][1].start.offset<a&&(!i.events[Q][1].end||i.events[Q][1].end.offset>a))return;let me=r.events.length,ve=me,ke,Te;for(;ve--;)if(r.events[ve][0]==="exit"&&r.events[ve][1].type==="chunkFlow"){if(ke){Te=r.events[ve][1].end;break}ke=!0}for(R(n),Q=me;Q<r.events.length;)r.events[Q][1].end=Object.assign({},Te),Q++;yt(r.events,ve+1,0,r.events.slice(me)),r.events.length=Q}}function R(ee){let de=e.length;for(;de-- >ee;){let ce=e[de];r.containerState=ce[1],ce[0].exit.call(r,t)}e.length=ee}function X(){i.write([null]),o=void 0,i=void 0,r.containerState._closeFlow=void 0}}function f1(t,r,e){return ye(t,t.attempt(this.parser.constructs.document,r,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function eo(t){if(t===null||Ve(t)||bi(t))return 1;if(vi(t))return 2}function Hn(t,r,e){let n=[],i=-1;for(;++i<t.length;){let o=t[i].resolveAll;o&&!n.includes(o)&&(r=o(r,e),n.push(o))}return r}var Uo={name:"attention",tokenize:p1,resolveAll:c1};function c1(t,r){let e=-1,n,i,o,a,u,f,m,p;for(;++e<t.length;)if(t[e][0]==="enter"&&t[e][1].type==="attentionSequence"&&t[e][1]._close){for(n=e;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&r.sliceSerialize(t[n][1]).charCodeAt(0)===r.sliceSerialize(t[e][1]).charCodeAt(0)){if((t[n][1]._close||t[e][1]._open)&&(t[e][1].end.offset-t[e][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[e][1].end.offset-t[e][1].start.offset)%3))continue;f=t[n][1].end.offset-t[n][1].start.offset>1&&t[e][1].end.offset-t[e][1].start.offset>1?2:1;let $=Object.assign({},t[n][1].end),k=Object.assign({},t[e][1].start);Xd($,-f),Xd(k,f),a={type:f>1?"strongSequence":"emphasisSequence",start:$,end:Object.assign({},t[n][1].end)},u={type:f>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[e][1].start),end:k},o={type:f>1?"strongText":"emphasisText",start:Object.assign({},t[n][1].end),end:Object.assign({},t[e][1].start)},i={type:f>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},u.end)},t[n][1].end=Object.assign({},a.start),t[e][1].start=Object.assign({},u.end),m=[],t[n][1].end.offset-t[n][1].start.offset&&(m=lr(m,[["enter",t[n][1],r],["exit",t[n][1],r]])),m=lr(m,[["enter",i,r],["enter",a,r],["exit",a,r],["enter",o,r]]),m=lr(m,Hn(r.parser.constructs.insideSpan.null,t.slice(n+1,e),r)),m=lr(m,[["exit",o,r],["enter",u,r],["exit",u,r],["exit",i,r]]),t[e][1].end.offset-t[e][1].start.offset?(p=2,m=lr(m,[["enter",t[e][1],r],["exit",t[e][1],r]])):p=0,yt(t,n-1,e-n+3,m),e=n+m.length-p-2;break}}for(e=-1;++e<t.length;)t[e][1].type==="attentionSequence"&&(t[e][1].type="data");return t}function p1(t,r){let e=this.parser.constructs.attentionMarkers.null,n=this.previous,i=eo(n),o;return a;function a(f){return t.enter("attentionSequence"),o=f,u(f)}function u(f){if(f===o)return t.consume(f),u;let m=t.exit("attentionSequence"),p=eo(f),$=!p||p===2&&i||e.includes(f),k=!i||i===2&&p||e.includes(n);return m._open=Boolean(o===42?$:$&&(i||!k)),m._close=Boolean(o===42?k:k&&(p||!$)),r(f)}}function Xd(t,r){t.column+=r,t.offset+=r,t._bufferIndex+=r}var yu={name:"autolink",tokenize:d1};function d1(t,r,e){let n=1;return i;function i(x){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(x){return Jt(x)?(t.consume(x),a):gu(x)?m(x):e(x)}function a(x){return x===43||x===45||x===46||Ft(x)?u(x):m(x)}function u(x){return x===58?(t.consume(x),f):(x===43||x===45||x===46||Ft(x))&&n++<32?(t.consume(x),u):m(x)}function f(x){return x===62?(t.exit("autolinkProtocol"),v(x)):x===null||x===32||x===60||Vn(x)?e(x):(t.consume(x),f)}function m(x){return x===64?(t.consume(x),n=0,p):gu(x)?(t.consume(x),m):e(x)}function p(x){return Ft(x)?$(x):e(x)}function $(x){return x===46?(t.consume(x),n=0,p):x===62?(t.exit("autolinkProtocol").type="autolinkEmail",v(x)):k(x)}function k(x){return(x===45||Ft(x))&&n++<63?(t.consume(x),x===45?k:$):e(x)}function v(x){return t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),r}}var pn={tokenize:m1,partial:!0};function m1(t,r,e){return ye(t,n,"linePrefix");function n(i){return i===null||ae(i)?r(i):e(i)}}var Qs={name:"blockQuote",tokenize:h1,continuation:{tokenize:g1},exit:y1};function h1(t,r,e){let n=this;return i;function i(a){if(a===62){let u=n.containerState;return u.open||(t.enter("blockQuote",{_container:!0}),u.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),o}return e(a)}function o(a){return Fe(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),r):(t.exit("blockQuotePrefix"),r(a))}}function g1(t,r,e){return ye(t,t.attempt(Qs,r,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function y1(t){t.exit("blockQuote")}var Zs={name:"characterEscape",tokenize:$1};function $1(t,r,e){return n;function n(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return Gd(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),r):e(o)}}var Yd=document.createElement("i");function to(t){let r="&"+t+";";Yd.innerHTML=r;let e=Yd.textContent;return e.charCodeAt(e.length-1)===59&&t!=="semi"||e===r?!1:e}var Js={name:"characterReference",tokenize:b1};function b1(t,r,e){let n=this,i=0,o,a;return u;function u($){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume($),t.exit("characterReferenceMarker"),f}function f($){return $===35?(t.enter("characterReferenceMarkerNumeric"),t.consume($),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),o=31,a=Ft,p($))}function m($){return $===88||$===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume($),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,a=Wd,p):(t.enter("characterReferenceValue"),o=7,a=$i,p($))}function p($){let k;return $===59&&i?(k=t.exit("characterReferenceValue"),a===Ft&&!to(n.sliceSerialize(k))?e($):(t.enter("characterReferenceMarker"),t.consume($),t.exit("characterReferenceMarker"),t.exit("characterReference"),r)):a($)&&i++<o?(t.consume($),p):e($)}}var Xs={name:"codeFenced",tokenize:v1,concrete:!0};function v1(t,r,e){let n=this,i={tokenize:ce,partial:!0},o={tokenize:de,partial:!0},a=this.events[this.events.length-1],u=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,f=0,m;return p;function p(Q){return t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),m=Q,$(Q)}function $(Q){return Q===m?(t.consume(Q),f++,$):(t.exit("codeFencedFenceSequence"),f<3?e(Q):ye(t,k,"whitespace")(Q))}function k(Q){return Q===null||ae(Q)?D(Q):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),v(Q))}function v(Q){return Q===null||Ve(Q)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ye(t,x,"whitespace")(Q)):Q===96&&Q===m?e(Q):(t.consume(Q),v)}function x(Q){return Q===null||ae(Q)?D(Q):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),I(Q))}function I(Q){return Q===null||ae(Q)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),D(Q)):Q===96&&Q===m?e(Q):(t.consume(Q),I)}function D(Q){return t.exit("codeFencedFence"),n.interrupt?r(Q):R(Q)}function R(Q){return Q===null?ee(Q):ae(Q)?t.attempt(o,t.attempt(i,ee,u?ye(t,R,"linePrefix",u+1):R),ee)(Q):(t.enter("codeFlowValue"),X(Q))}function X(Q){return Q===null||ae(Q)?(t.exit("codeFlowValue"),R(Q)):(t.consume(Q),X)}function ee(Q){return t.exit("codeFenced"),r(Q)}function de(Q,me,ve){let ke=this;return Te;function Te(_e){return Q.enter("lineEnding"),Q.consume(_e),Q.exit("lineEnding"),xe}function xe(_e){return ke.parser.lazy[ke.now().line]?ve(_e):me(_e)}}function ce(Q,me,ve){let ke=0;return ye(Q,Te,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function Te(ue){return Q.enter("codeFencedFence"),Q.enter("codeFencedFenceSequence"),xe(ue)}function xe(ue){return ue===m?(Q.consume(ue),ke++,xe):ke<f?ve(ue):(Q.exit("codeFencedFenceSequence"),ye(Q,_e,"whitespace")(ue))}function _e(ue){return ue===null||ae(ue)?(Q.exit("codeFencedFence"),me(ue)):ve(ue)}}}var Ho={name:"codeIndented",tokenize:w1},k1={tokenize:x1,partial:!0};function w1(t,r,e){let n=this;return i;function i(m){return t.enter("codeIndented"),ye(t,o,"linePrefix",4+1)(m)}function o(m){let p=n.events[n.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(m):e(m)}function a(m){return m===null?f(m):ae(m)?t.attempt(k1,a,f)(m):(t.enter("codeFlowValue"),u(m))}function u(m){return m===null||ae(m)?(t.exit("codeFlowValue"),a(m)):(t.consume(m),u)}function f(m){return t.exit("codeIndented"),r(m)}}function x1(t,r,e){let n=this;return i;function i(a){return n.parser.lazy[n.now().line]?e(a):ae(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):ye(t,o,"linePrefix",4+1)(a)}function o(a){let u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?r(a):ae(a)?i(a):e(a)}}var $u={name:"codeText",tokenize:E1,resolve:_1,previous:C1};function _1(t){let r=t.length-4,e=3,n,i;if((t[e][1].type==="lineEnding"||t[e][1].type==="space")&&(t[r][1].type==="lineEnding"||t[r][1].type==="space")){for(n=e;++n<r;)if(t[n][1].type==="codeTextData"){t[e][1].type="codeTextPadding",t[r][1].type="codeTextPadding",e+=2,r-=2;break}}for(n=e-1,r++;++n<=r;)i===void 0?n!==r&&t[n][1].type!=="lineEnding"&&(i=n):(n===r||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),r-=n-i-2,n=i+2),i=void 0);return t}function C1(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function E1(t,r,e){let n=this,i=0,o,a;return u;function u(k){return t.enter("codeText"),t.enter("codeTextSequence"),f(k)}function f(k){return k===96?(t.consume(k),i++,f):(t.exit("codeTextSequence"),m(k))}function m(k){return k===null?e(k):k===96?(a=t.enter("codeTextSequence"),o=0,$(k)):k===32?(t.enter("space"),t.consume(k),t.exit("space"),m):ae(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),m):(t.enter("codeTextData"),p(k))}function p(k){return k===null||k===32||k===96||ae(k)?(t.exit("codeTextData"),m(k)):(t.consume(k),p)}function $(k){return k===96?(t.consume(k),o++,$):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),r(k)):(a.type="codeTextData",p(k))}}function Ys(t){let r={},e=-1,n,i,o,a,u,f,m;for(;++e<t.length;){for(;e in r;)e=r[e];if(n=t[e],e&&n[1].type==="chunkFlow"&&t[e-1][1].type==="listItemPrefix"&&(f=n[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(r,A1(t,e)),e=r[e],m=!0);else if(n[1]._container){for(o=e,i=void 0;o--&&(a=t[o],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(t[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(n[1].end=Object.assign({},t[i][1].start),u=t.slice(i,e),u.unshift(n),yt(t,i,e-i+1,u))}}return!m}function A1(t,r){let e=t[r][1],n=t[r][2],i=r-1,o=[],a=e._tokenizer||n.parser[e.contentType](e.start),u=a.events,f=[],m={},p,$,k=-1,v=e,x=0,I=0,D=[I];for(;v;){for(;t[++i][1]!==v;);o.push(i),v._tokenizer||(p=n.sliceStream(v),v.next||p.push(null),$&&a.defineSkip(v.start),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(p),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),$=v,v=v.next}for(v=e;++k<u.length;)u[k][0]==="exit"&&u[k-1][0]==="enter"&&u[k][1].type===u[k-1][1].type&&u[k][1].start.line!==u[k][1].end.line&&(I=k+1,D.push(I),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(a.events=[],v?(v._tokenizer=void 0,v.previous=void 0):D.pop(),k=D.length;k--;){let R=u.slice(D[k],D[k+1]),X=o.pop();f.unshift([X,X+R.length-1]),yt(t,X,2,R)}for(k=-1;++k<f.length;)m[x+f[k][0]]=x+f[k][1],x+=f[k][1]-f[k][0]-1;return m}var bu={tokenize:I1,resolve:P1},S1={tokenize:F1,partial:!0};function P1(t){return Ys(t),t}function I1(t,r){let e;return n;function n(u){return t.enter("content"),e=t.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?o(u):ae(u)?t.check(S1,a,o)(u):(t.consume(u),i)}function o(u){return t.exit("chunkContent"),t.exit("content"),r(u)}function a(u){return t.consume(u),t.exit("chunkContent"),e.next=t.enter("chunkContent",{contentType:"content",previous:e}),e=e.next,i}}function F1(t,r,e){let n=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),ye(t,o,"linePrefix")}function o(a){if(a===null||ae(a))return e(a);let u=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?r(a):t.interrupt(n.parser.constructs.flow,e,r)(a)}}function ea(t,r,e,n,i,o,a,u,f){let m=f||Number.POSITIVE_INFINITY,p=0;return $;function $(R){return R===60?(t.enter(n),t.enter(i),t.enter(o),t.consume(R),t.exit(o),k):R===null||R===41||Vn(R)?e(R):(t.enter(n),t.enter(a),t.enter(u),t.enter("chunkString",{contentType:"string"}),I(R))}function k(R){return R===62?(t.enter(o),t.consume(R),t.exit(o),t.exit(i),t.exit(n),r):(t.enter(u),t.enter("chunkString",{contentType:"string"}),v(R))}function v(R){return R===62?(t.exit("chunkString"),t.exit(u),k(R)):R===null||R===60||ae(R)?e(R):(t.consume(R),R===92?x:v)}function x(R){return R===60||R===62||R===92?(t.consume(R),v):v(R)}function I(R){return R===40?++p>m?e(R):(t.consume(R),I):R===41?p--?(t.consume(R),I):(t.exit("chunkString"),t.exit(u),t.exit(a),t.exit(n),r(R)):R===null||Ve(R)?p?e(R):(t.exit("chunkString"),t.exit(u),t.exit(a),t.exit(n),r(R)):Vn(R)?e(R):(t.consume(R),R===92?D:I)}function D(R){return R===40||R===41||R===92?(t.consume(R),I):I(R)}}function ta(t,r,e,n,i,o){let a=this,u=0,f;return m;function m(v){return t.enter(n),t.enter(i),t.consume(v),t.exit(i),t.enter(o),p}function p(v){return v===null||v===91||v===93&&!f||v===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs||u>999?e(v):v===93?(t.exit(o),t.enter(i),t.consume(v),t.exit(i),t.exit(n),r):ae(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),p):(t.enter("chunkString",{contentType:"string"}),$(v))}function $(v){return v===null||v===91||v===93||ae(v)||u++>999?(t.exit("chunkString"),p(v)):(t.consume(v),f=f||!Fe(v),v===92?k:$)}function k(v){return v===91||v===92||v===93?(t.consume(v),u++,$):$(v)}}function ra(t,r,e,n,i,o){let a;return u;function u(k){return t.enter(n),t.enter(i),t.consume(k),t.exit(i),a=k===40?41:k,f}function f(k){return k===a?(t.enter(i),t.consume(k),t.exit(i),t.exit(n),r):(t.enter(o),m(k))}function m(k){return k===a?(t.exit(o),f(a)):k===null?e(k):ae(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),ye(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===a||k===null||ae(k)?(t.exit("chunkString"),m(k)):(t.consume(k),k===92?$:p)}function $(k){return k===a||k===92?(t.consume(k),p):p(k)}}function ki(t,r){let e;return n;function n(i){return ae(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),e=!0,n):Fe(i)?ye(t,n,e?"linePrefix":"lineSuffix")(i):r(i)}}function Xt(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var vu={name:"definition",tokenize:O1},T1={tokenize:N1,partial:!0};function O1(t,r,e){let n=this,i;return o;function o(f){return t.enter("definition"),ta.call(n,t,a,e,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Xt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),ki(t,ea(t,t.attempt(T1,ye(t,u,"whitespace"),ye(t,u,"whitespace")),e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):e(f)}function u(f){return f===null||ae(f)?(t.exit("definition"),n.parser.defined.includes(i)||n.parser.defined.push(i),r(f)):e(f)}}function N1(t,r,e){return n;function n(a){return Ve(a)?ki(t,i)(a):e(a)}function i(a){return a===34||a===39||a===40?ra(t,ye(t,o,"whitespace"),e,"definitionTitle","definitionTitleMarker","definitionTitleString")(a):e(a)}function o(a){return a===null||ae(a)?r(a):e(a)}}var ku={name:"hardBreakEscape",tokenize:R1};function R1(t,r,e){return n;function n(o){return t.enter("hardBreakEscape"),t.enter("escapeMarker"),t.consume(o),i}function i(o){return ae(o)?(t.exit("escapeMarker"),t.exit("hardBreakEscape"),r(o)):e(o)}}var wu={name:"headingAtx",tokenize:L1,resolve:D1};function D1(t,r){let e=t.length-2,n=3,i,o;return t[n][1].type==="whitespace"&&(n+=2),e-2>n&&t[e][1].type==="whitespace"&&(e-=2),t[e][1].type==="atxHeadingSequence"&&(n===e-1||e-4>n&&t[e-2][1].type==="whitespace")&&(e-=n+1===e?2:4),e>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[e][1].end},o={type:"chunkText",start:t[n][1].start,end:t[e][1].end,contentType:"text"},yt(t,n,e-n+1,[["enter",i,r],["enter",o,r],["exit",o,r],["exit",i,r]])),t}function L1(t,r,e){let n=this,i=0;return o;function o(p){return t.enter("atxHeading"),t.enter("atxHeadingSequence"),a(p)}function a(p){return p===35&&i++<6?(t.consume(p),a):p===null||Ve(p)?(t.exit("atxHeadingSequence"),n.interrupt?r(p):u(p)):e(p)}function u(p){return p===35?(t.enter("atxHeadingSequence"),f(p)):p===null||ae(p)?(t.exit("atxHeading"),r(p)):Fe(p)?ye(t,u,"whitespace")(p):(t.enter("atxHeadingText"),m(p))}function f(p){return p===35?(t.consume(p),f):(t.exit("atxHeadingSequence"),u(p))}function m(p){return p===null||p===35||Ve(p)?(t.exit("atxHeadingText"),u(p)):(t.consume(p),m)}}var em=["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","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],xu=["pre","script","style","textarea"];var _u={name:"htmlFlow",tokenize:B1,resolveTo:q1,concrete:!0},j1={tokenize:M1,partial:!0};function q1(t){let r=t.length;for(;r--&&!(t[r][0]==="enter"&&t[r][1].type==="htmlFlow"););return r>1&&t[r-2][1].type==="linePrefix"&&(t[r][1].start=t[r-2][1].start,t[r+1][1].start=t[r-2][1].start,t.splice(r-2,2)),t}function B1(t,r,e){let n=this,i,o,a,u,f;return m;function m(N){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(N),p}function p(N){return N===33?(t.consume(N),$):N===47?(t.consume(N),x):N===63?(t.consume(N),i=3,n.interrupt?r:tt):Jt(N)?(t.consume(N),a=String.fromCharCode(N),o=!0,I):e(N)}function $(N){return N===45?(t.consume(N),i=2,k):N===91?(t.consume(N),i=5,a="CDATA[",u=0,v):Jt(N)?(t.consume(N),i=4,n.interrupt?r:tt):e(N)}function k(N){return N===45?(t.consume(N),n.interrupt?r:tt):e(N)}function v(N){return N===a.charCodeAt(u++)?(t.consume(N),u===a.length?n.interrupt?r:xe:v):e(N)}function x(N){return Jt(N)?(t.consume(N),a=String.fromCharCode(N),I):e(N)}function I(N){return N===null||N===47||N===62||Ve(N)?N!==47&&o&&xu.includes(a.toLowerCase())?(i=1,n.interrupt?r(N):xe(N)):em.includes(a.toLowerCase())?(i=6,N===47?(t.consume(N),D):n.interrupt?r(N):xe(N)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?e(N):o?X(N):R(N)):N===45||Ft(N)?(t.consume(N),a+=String.fromCharCode(N),I):e(N)}function D(N){return N===62?(t.consume(N),n.interrupt?r:xe):e(N)}function R(N){return Fe(N)?(t.consume(N),R):ke(N)}function X(N){return N===47?(t.consume(N),ke):N===58||N===95||Jt(N)?(t.consume(N),ee):Fe(N)?(t.consume(N),X):ke(N)}function ee(N){return N===45||N===46||N===58||N===95||Ft(N)?(t.consume(N),ee):de(N)}function de(N){return N===61?(t.consume(N),ce):Fe(N)?(t.consume(N),de):X(N)}function ce(N){return N===null||N===60||N===61||N===62||N===96?e(N):N===34||N===39?(t.consume(N),f=N,Q):Fe(N)?(t.consume(N),ce):(f=null,me(N))}function Q(N){return N===null||ae(N)?e(N):N===f?(t.consume(N),ve):(t.consume(N),Q)}function me(N){return N===null||N===34||N===39||N===60||N===61||N===62||N===96||Ve(N)?de(N):(t.consume(N),me)}function ve(N){return N===47||N===62||Fe(N)?X(N):e(N)}function ke(N){return N===62?(t.consume(N),Te):e(N)}function Te(N){return Fe(N)?(t.consume(N),Te):N===null||ae(N)?xe(N):e(N)}function xe(N){return N===45&&i===2?(t.consume(N),He):N===60&&i===1?(t.consume(N),U):N===62&&i===4?(t.consume(N),Ue):N===63&&i===3?(t.consume(N),tt):N===93&&i===5?(t.consume(N),Le):ae(N)&&(i===6||i===7)?t.check(j1,Ue,_e)(N):N===null||ae(N)?_e(N):(t.consume(N),xe)}function _e(N){return t.exit("htmlFlowData"),ue(N)}function ue(N){return N===null?O(N):ae(N)?t.attempt({tokenize:be,partial:!0},ue,O)(N):(t.enter("htmlFlowData"),xe(N))}function be(N,Mt,wt){return it;function it(ct){return N.enter("lineEnding"),N.consume(ct),N.exit("lineEnding"),ft}function ft(ct){return n.parser.lazy[n.now().line]?wt(ct):Mt(ct)}}function He(N){return N===45?(t.consume(N),tt):xe(N)}function U(N){return N===47?(t.consume(N),a="",at):xe(N)}function at(N){return N===62&&xu.includes(a.toLowerCase())?(t.consume(N),Ue):Jt(N)&&a.length<8?(t.consume(N),a+=String.fromCharCode(N),at):xe(N)}function Le(N){return N===93?(t.consume(N),tt):xe(N)}function tt(N){return N===62?(t.consume(N),Ue):N===45&&i===2?(t.consume(N),tt):xe(N)}function Ue(N){return N===null||ae(N)?(t.exit("htmlFlowData"),O(N)):(t.consume(N),Ue)}function O(N){return t.exit("htmlFlow"),r(N)}}function M1(t,r,e){return n;function n(i){return t.exit("htmlFlowData"),t.enter("lineEndingBlank"),t.consume(i),t.exit("lineEndingBlank"),t.attempt(pn,r,e)}}var Cu={name:"htmlText",tokenize:z1};function z1(t,r,e){let n=this,i,o,a,u;return f;function f(O){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(O),m}function m(O){return O===33?(t.consume(O),p):O===47?(t.consume(O),me):O===63?(t.consume(O),ce):Jt(O)?(t.consume(O),Te):e(O)}function p(O){return O===45?(t.consume(O),$):O===91?(t.consume(O),o="CDATA[",a=0,D):Jt(O)?(t.consume(O),de):e(O)}function $(O){return O===45?(t.consume(O),k):e(O)}function k(O){return O===null||O===62?e(O):O===45?(t.consume(O),v):x(O)}function v(O){return O===null||O===62?e(O):x(O)}function x(O){return O===null?e(O):O===45?(t.consume(O),I):ae(O)?(u=x,Le(O)):(t.consume(O),x)}function I(O){return O===45?(t.consume(O),Ue):x(O)}function D(O){return O===o.charCodeAt(a++)?(t.consume(O),a===o.length?R:D):e(O)}function R(O){return O===null?e(O):O===93?(t.consume(O),X):ae(O)?(u=R,Le(O)):(t.consume(O),R)}function X(O){return O===93?(t.consume(O),ee):R(O)}function ee(O){return O===62?Ue(O):O===93?(t.consume(O),ee):R(O)}function de(O){return O===null||O===62?Ue(O):ae(O)?(u=de,Le(O)):(t.consume(O),de)}function ce(O){return O===null?e(O):O===63?(t.consume(O),Q):ae(O)?(u=ce,Le(O)):(t.consume(O),ce)}function Q(O){return O===62?Ue(O):ce(O)}function me(O){return Jt(O)?(t.consume(O),ve):e(O)}function ve(O){return O===45||Ft(O)?(t.consume(O),ve):ke(O)}function ke(O){return ae(O)?(u=ke,Le(O)):Fe(O)?(t.consume(O),ke):Ue(O)}function Te(O){return O===45||Ft(O)?(t.consume(O),Te):O===47||O===62||Ve(O)?xe(O):e(O)}function xe(O){return O===47?(t.consume(O),Ue):O===58||O===95||Jt(O)?(t.consume(O),_e):ae(O)?(u=xe,Le(O)):Fe(O)?(t.consume(O),xe):Ue(O)}function _e(O){return O===45||O===46||O===58||O===95||Ft(O)?(t.consume(O),_e):ue(O)}function ue(O){return O===61?(t.consume(O),be):ae(O)?(u=ue,Le(O)):Fe(O)?(t.consume(O),ue):xe(O)}function be(O){return O===null||O===60||O===61||O===62||O===96?e(O):O===34||O===39?(t.consume(O),i=O,He):ae(O)?(u=be,Le(O)):Fe(O)?(t.consume(O),be):(t.consume(O),i=void 0,at)}function He(O){return O===i?(t.consume(O),U):O===null?e(O):ae(O)?(u=He,Le(O)):(t.consume(O),He)}function U(O){return O===62||O===47||Ve(O)?xe(O):e(O)}function at(O){return O===null||O===34||O===39||O===60||O===61||O===96?e(O):O===62||Ve(O)?xe(O):(t.consume(O),at)}function Le(O){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),ye(t,tt,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tt(O){return t.enter("htmlTextData"),u(O)}function Ue(O){return O===62?(t.consume(O),t.exit("htmlTextData"),t.exit("htmlText"),r):e(O)}}var wi={name:"labelEnd",tokenize:G1,resolveTo:W1,resolveAll:K1},V1={tokenize:Q1},U1={tokenize:Z1},H1={tokenize:J1};function K1(t){let r=-1,e;for(;++r<t.length;)e=t[r][1],(e.type==="labelImage"||e.type==="labelLink"||e.type==="labelEnd")&&(t.splice(r+1,e.type==="labelImage"?4:2),e.type="data",r++);return t}function W1(t,r){let e=t.length,n=0,i,o,a,u;for(;e--;)if(i=t[e][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[e][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[e][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=e,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=e);let f={type:t[o][1].type==="labelLink"?"link":"image",start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},m={type:"label",start:Object.assign({},t[o][1].start),end:Object.assign({},t[a][1].end)},p={type:"labelText",start:Object.assign({},t[o+n+2][1].end),end:Object.assign({},t[a-2][1].start)};return u=[["enter",f,r],["enter",m,r]],u=lr(u,t.slice(o+1,o+n+3)),u=lr(u,[["enter",p,r]]),u=lr(u,Hn(r.parser.constructs.insideSpan.null,t.slice(o+n+4,a-3),r)),u=lr(u,[["exit",p,r],t[a-2],t[a-1],["exit",m,r]]),u=lr(u,t.slice(a+1)),u=lr(u,[["exit",f,r]]),yt(t,o,t.length,u),t}function G1(t,r,e){let n=this,i=n.events.length,o,a;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){o=n.events[i][1];break}return u;function u(p){return o?o._inactive?m(p):(a=n.parser.defined.includes(Xt(n.sliceSerialize({start:o.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelEnd"),f):e(p)}function f(p){return p===40?t.attempt(V1,r,a?r:m)(p):p===91?t.attempt(U1,r,a?t.attempt(H1,r,m):m)(p):a?r(p):m(p)}function m(p){return o._balanced=!0,e(p)}}function Q1(t,r,e){return n;function n(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),ki(t,i)}function i(f){return f===41?u(f):ea(t,o,e,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return Ve(f)?ki(t,a)(f):u(f)}function a(f){return f===34||f===39||f===40?ra(t,ki(t,u),e,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function u(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),r):e(f)}}function Z1(t,r,e){let n=this;return i;function i(a){return ta.call(n,t,o,e,"reference","referenceMarker","referenceString")(a)}function o(a){return n.parser.defined.includes(Xt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?r(a):e(a)}}function J1(t,r,e){return n;function n(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),r):e(o)}}var Eu={name:"labelStartImage",tokenize:X1,resolveAll:wi.resolveAll};function X1(t,r,e){let n=this;return i;function i(u){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(u),t.exit("labelImageMarker"),o}function o(u){return u===91?(t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelImage"),a):e(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in n.parser.constructs?e(u):r(u)}}var Au={name:"labelStartLink",tokenize:Y1,resolveAll:wi.resolveAll};function Y1(t,r,e){let n=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?e(a):r(a)}}var Ko={name:"lineEnding",tokenize:e0};function e0(t,r){return e;function e(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ye(t,r,"linePrefix")}}var xi={name:"thematicBreak",tokenize:t0};function t0(t,r,e){let n=0,i;return o;function o(f){return t.enter("thematicBreak"),i=f,a(f)}function a(f){return f===i?(t.enter("thematicBreakSequence"),u(f)):Fe(f)?ye(t,a,"whitespace")(f):n<3||f!==null&&!ae(f)?e(f):(t.exit("thematicBreak"),r(f))}function u(f){return f===i?(t.consume(f),n++,u):(t.exit("thematicBreakSequence"),a(f))}}var Yt={name:"list",tokenize:i0,continuation:{tokenize:o0},exit:a0},r0={tokenize:l0,partial:!0},n0={tokenize:s0,partial:!0};function i0(t,r,e){let n=this,i=n.events[n.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(v){let x=n.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!n.containerState.marker||v===n.containerState.marker:$i(v)){if(n.containerState.type||(n.containerState.type=x,t.enter(x,{_container:!0})),x==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(xi,e,m)(v):m(v);if(!n.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),f(v)}return e(v)}function f(v){return $i(v)&&++a<10?(t.consume(v),f):(!n.interrupt||a<2)&&(n.containerState.marker?v===n.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):e(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||v,t.check(pn,n.interrupt?e:p,t.attempt(r0,k,$))}function p(v){return n.containerState.initialBlankLine=!0,o++,k(v)}function $(v){return Fe(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),k):e(v)}function k(v){return n.containerState.size=o+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,r(v)}}function o0(t,r,e){let n=this;return n.containerState._closeFlow=void 0,t.check(pn,i,o);function i(u){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ye(t,r,"listItemIndent",n.containerState.size+1)(u)}function o(u){return n.containerState.furtherBlankLines||!Fe(u)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(u)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(n0,r,a)(u))}function a(u){return n.containerState._closeFlow=!0,n.interrupt=void 0,ye(t,t.attempt(Yt,r,e),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function s0(t,r,e){let n=this;return ye(t,i,"listItemIndent",n.containerState.size+1);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?r(o):e(o)}}function a0(t){t.exit(this.containerState.type)}function l0(t,r,e){let n=this;return ye(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){let a=n.events[n.events.length-1];return!Fe(o)&&a&&a[1].type==="listItemPrefixWhitespace"?r(o):e(o)}}var na={name:"setextUnderline",tokenize:f0,resolveTo:u0};function u0(t,r){let e=t.length,n,i,o;for(;e--;)if(t[e][0]==="enter"){if(t[e][1].type==="content"){n=e;break}t[e][1].type==="paragraph"&&(i=e)}else t[e][1].type==="content"&&t.splice(e,1),!o&&t[e][1].type==="definition"&&(o=e);let a={type:"setextHeading",start:Object.assign({},t[i][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",a,r]),t.splice(o+1,0,["exit",t[n][1],r]),t[n][1].end=Object.assign({},t[o][1].end)):t[n][1]=a,t.push(["exit",a,r]),t}function f0(t,r,e){let n=this,i=n.events.length,o,a;for(;i--;)if(n.events[i][1].type!=="lineEnding"&&n.events[i][1].type!=="linePrefix"&&n.events[i][1].type!=="content"){a=n.events[i][1].type==="paragraph";break}return u;function u(p){return!n.parser.lazy[n.now().line]&&(n.interrupt||a)?(t.enter("setextHeadingLine"),t.enter("setextHeadingLineSequence"),o=p,f(p)):e(p)}function f(p){return p===o?(t.consume(p),f):(t.exit("setextHeadingLineSequence"),ye(t,m,"lineSuffix")(p))}function m(p){return p===null||ae(p)?(t.exit("setextHeadingLine"),r(p)):e(p)}}var tm={tokenize:c0};function c0(t){let r=this,e=t.attempt(pn,n,t.attempt(this.parser.constructs.flowInitial,i,ye(t,t.attempt(this.parser.constructs.flow,i,t.attempt(bu,i)),"linePrefix")));return e;function n(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),r.currentConstruct=void 0,e}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r.currentConstruct=void 0,e}}var rm={resolveAll:sm()},nm=om("string"),im=om("text");function om(t){return{tokenize:r,resolveAll:sm(t==="text"?p0:void 0)};function r(e){let n=this,i=this.parser.constructs[t],o=e.attempt(i,a,u);return a;function a(p){return m(p)?o(p):u(p)}function u(p){if(p===null){e.consume(p);return}return e.enter("data"),e.consume(p),f}function f(p){return m(p)?(e.exit("data"),o(p)):(e.consume(p),f)}function m(p){if(p===null)return!0;let $=i[p],k=-1;if($)for(;++k<$.length;){let v=$[k];if(!v.previous||v.previous.call(n,n.previous))return!0}return!1}}}function sm(t){return r;function r(e,n){let i=-1,o;for(;++i<=e.length;)o===void 0?e[i]&&e[i][1].type==="data"&&(o=i,i++):(!e[i]||e[i][1].type!=="data")&&(i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(e,n):e}}function p0(t,r){let e=0;for(;++e<=t.length;)if((e===t.length||t[e][1].type==="lineEnding")&&t[e-1][1].type==="data"){let n=t[e-1][1],i=r.sliceStream(n),o=i.length,a=-1,u=0,f;for(;o--;){let m=i[o];if(typeof m=="string"){for(a=m.length;m.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(m===-2)f=!0,u++;else if(m!==-1){o++;break}}if(u){let m={type:e===t.length||f||u<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-u,offset:n.end.offset-u,_index:n.start._index+o,_bufferIndex:o?a:n.start._bufferIndex+a},end:Object.assign({},n.end)};n.end=Object.assign({},m.start),n.start.offset===n.end.offset?Object.assign(n,m):(t.splice(e,0,["enter",m,r],["exit",m,r]),e+=2)}e++}return t}function am(t,r,e){let n=Object.assign(e?Object.assign({},e):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],u=[],f=!0,m={consume:de,enter:ce,exit:Q,attempt:ke(me),check:ke(ve),interrupt:ke(ve,{interrupt:!0})},p={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:I,sliceSerialize:x,now:D,defineSkip:R,write:v},$=r.tokenize.call(p,m),k;return r.resolveAll&&o.push(r),p;function v(ue){return a=lr(a,ue),X(),a[a.length-1]!==null?[]:(Te(r,0),p.events=Hn(o,p.events,p),p.events)}function x(ue,be){return m0(I(ue),be)}function I(ue){return d0(a,ue)}function D(){return Object.assign({},n)}function R(ue){i[ue.line]=ue.column,_e()}function X(){let ue;for(;n._index<a.length;){let be=a[n._index];if(typeof be=="string")for(ue=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===ue&&n._bufferIndex<be.length;)ee(be.charCodeAt(n._bufferIndex));else ee(be)}}function ee(ue){f=void 0,k=ue,$=$(ue)}function de(ue){ae(ue)?(n.line++,n.column=1,n.offset+=ue===-3?2:1,_e()):ue!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),p.previous=ue,f=!0}function ce(ue,be){let He=be||{};return He.type=ue,He.start=D(),p.events.push(["enter",He,p]),u.push(He),He}function Q(ue){let be=u.pop();return be.end=D(),p.events.push(["exit",be,p]),be}function me(ue,be){Te(ue,be.from)}function ve(ue,be){be.restore()}function ke(ue,be){return He;function He(U,at,Le){let tt,Ue,O,N;return Array.isArray(U)?wt(U):"tokenize"in U?wt([U]):Mt(U);function Mt($e){return br;function br(Ct){let Tt=Ct!==null&&$e[Ct],er=Ct!==null&&$e.null,ur=[...Array.isArray(Tt)?Tt:Tt?[Tt]:[],...Array.isArray(er)?er:er?[er]:[]];return wt(ur)(Ct)}}function wt($e){return tt=$e,Ue=0,$e.length===0?Le:it($e[Ue])}function it($e){return br;function br(Ct){return N=xe(),O=$e,$e.partial||(p.currentConstruct=$e),$e.name&&p.parser.constructs.disable.null.includes($e.name)?ct(Ct):$e.tokenize.call(be?Object.assign(Object.create(p),be):p,m,ft,ct)(Ct)}}function ft($e){return f=!0,ue(O,N),at}function ct($e){return f=!0,N.restore(),++Ue<tt.length?it(tt[Ue]):Le}}}function Te(ue,be){ue.resolveAll&&!o.includes(ue)&&o.push(ue),ue.resolve&&yt(p.events,be,p.events.length-be,ue.resolve(p.events.slice(be),p)),ue.resolveTo&&(p.events=ue.resolveTo(p.events,p))}function xe(){let ue=D(),be=p.previous,He=p.currentConstruct,U=p.events.length,at=Array.from(u);return{restore:Le,from:U};function Le(){n=ue,p.previous=be,p.currentConstruct=He,p.events.length=U,u=at,_e()}}function _e(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function d0(t,r){let e=r.start._index,n=r.start._bufferIndex,i=r.end._index,o=r.end._bufferIndex,a;return e===i?a=[t[e].slice(n,o)]:(a=t.slice(e,i),n>-1&&(a[0]=a[0].slice(n)),o>0&&a.push(t[i].slice(0,o))),a}function m0(t,r){let e=-1,n=[],i;for(;++e<t.length;){let o=t[e],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
17
|
-
`;break}case-3:{a=`\r
|
|
18
|
-
`;break}case-2:{a=r?" ":" ";break}case-1:{if(!r&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,n.push(a)}return n.join("")}var Su={};mf(Su,{attentionMarkers:()=>w0,contentInitial:()=>g0,disable:()=>x0,document:()=>h0,flow:()=>$0,flowInitial:()=>y0,insideSpan:()=>k0,string:()=>b0,text:()=>v0});var h0={[42]:Yt,[43]:Yt,[45]:Yt,[48]:Yt,[49]:Yt,[50]:Yt,[51]:Yt,[52]:Yt,[53]:Yt,[54]:Yt,[55]:Yt,[56]:Yt,[57]:Yt,[62]:Qs},g0={[91]:vu},y0={[-2]:Ho,[-1]:Ho,[32]:Ho},$0={[35]:wu,[42]:xi,[45]:[na,xi],[60]:_u,[61]:na,[95]:xi,[96]:Xs,[126]:Xs},b0={[38]:Js,[92]:Zs},v0={[-5]:Ko,[-4]:Ko,[-3]:Ko,[33]:Eu,[38]:Js,[42]:Uo,[60]:[yu,Cu],[91]:Au,[92]:[ku,Zs],[93]:wi,[95]:Uo,[96]:$u},k0={null:[Uo,rm]},w0={null:[42,95]},x0={null:[]};function lm(t={}){let r=Gs([Su].concat(t.extensions||[])),e={defined:[],lazy:{},constructs:r,content:n(Qd),document:n(Jd),flow:n(tm),string:n(nm),text:n(im)};return e;function n(i){return o;function o(a){return am(e,i,a)}}}var um=/[\0\t\n\r]/g;function fm(){let t=1,r="",e=!0,n;return i;function i(o,a,u){let f=[],m,p,$,k,v;for(o=r+o.toString(a),$=0,r="",e&&(o.charCodeAt(0)===65279&&$++,e=void 0);$<o.length;){if(um.lastIndex=$,m=um.exec(o),k=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(k),!m){r=o.slice($);break}if(v===10&&$===k&&n)f.push(-3),n=void 0;else switch(n&&(f.push(-5),n=void 0),$<k&&(f.push(o.slice($,k)),t+=k-$),v){case 0:{f.push(65533),t++;break}case 9:{for(p=Math.ceil(t/4)*4,f.push(-2);t++<p;)f.push(-1);break}case 10:{f.push(-4),t=1;break}default:n=!0,t=1}$=k+1}return u&&(n&&f.push(-5),r&&f.push(r),f.push(null)),f}}function cm(t){for(;!Ys(t););return t}function ia(t,r){let e=Number.parseInt(t,r);return e<9||e===11||e>13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)===65535||(e&65535)===65534||e>1114111?"\uFFFD":String.fromCharCode(e)}var _0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function oa(t){return t.replace(_0,C0)}function C0(t,r,e){if(r)return r;if(e.charCodeAt(0)===35){let i=e.charCodeAt(1),o=i===120||i===88;return ia(e.slice(o?2:1),o?16:10)}return to(e)||t}var Pu={}.hasOwnProperty,Iu=function(t,r,e){return typeof r!="string"&&(e=r,r=void 0),E0(e)(cm(lm(e).document().write(fm()(t,r,!0))))};function E0(t={}){let r=dm({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:f(xt),autolinkProtocol:_e,autolinkEmail:_e,atxHeading:f(pt),blockQuote:f(er),characterEscape:_e,characterReference:_e,codeFenced:f(ur),codeFencedFenceInfo:m,codeFencedFenceMeta:m,codeIndented:f(ur,m),codeText:f(zt,m),codeTextData:_e,data:_e,codeFlowValue:_e,definition:f(Kn),definitionDestinationString:m,definitionLabelString:m,definitionTitleString:m,emphasis:f(Pn),hardBreakEscape:f(dt),hardBreakTrailing:f(dt),htmlFlow:f(Ot,m),htmlFlowData:_e,htmlText:f(Ot,m),htmlTextData:_e,image:f(mt),label:m,link:f(xt),listItem:f(Nr),listItemValue:I,listOrdered:f(Or,x),listUnordered:f(Or),paragraph:f(Rr),reference:ft,referenceString:m,resourceDestinationString:m,resourceTitleString:m,setextHeading:f(pt),strong:f(Dr),thematicBreak:f(tr)},exit:{atxHeading:$(),atxHeadingSequence:ve,autolink:$(),autolinkEmail:Tt,autolinkProtocol:Ct,blockQuote:$(),characterEscapeValue:ue,characterReferenceMarkerHexadecimal:$e,characterReferenceMarkerNumeric:$e,characterReferenceValue:br,codeFenced:$(ee),codeFencedFence:X,codeFencedFenceInfo:D,codeFencedFenceMeta:R,codeFlowValue:ue,codeIndented:$(de),codeText:$(Le),codeTextData:ue,data:ue,definition:$(),definitionDestinationString:me,definitionLabelString:ce,definitionTitleString:Q,emphasis:$(),hardBreakEscape:$(He),hardBreakTrailing:$(He),htmlFlow:$(U),htmlFlowData:ue,htmlText:$(at),htmlTextData:ue,image:$(Ue),label:N,labelText:O,lineEnding:be,link:$(tt),listItem:$(),listOrdered:$(),listUnordered:$(),paragraph:$(),referenceString:ct,resourceDestinationString:Mt,resourceTitleString:wt,resource:it,setextHeading:$(xe),setextHeadingLineSequence:Te,setextHeadingText:ke,strong:$(),thematicBreak:$()}},t.mdastExtensions||[]),e={};return n;function n(W){let re={type:"root",children:[]},ge=[re],Ae=[],_t=[],_r={stack:ge,tokenStack:Ae,config:r,enter:p,exit:k,buffer:m,resume:v,setData:o,getData:a},Me=-1;for(;++Me<W.length;)if(W[Me][1].type==="listOrdered"||W[Me][1].type==="listUnordered")if(W[Me][0]==="enter")_t.push(Me);else{let ot=_t.pop();Me=i(W,ot,Me)}for(Me=-1;++Me<W.length;){let ot=r[W[Me][0]];Pu.call(ot,W[Me][1].type)&&ot[W[Me][1].type].call(Object.assign({sliceSerialize:W[Me][2].sliceSerialize},_r),W[Me][1])}if(Ae.length>0){let ot=Ae[Ae.length-1];(ot[1]||pm).call(_r,void 0,ot[0])}for(re.position={start:u(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:u(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<r.transforms.length;)re=r.transforms[Me](re)||re;return re}function i(W,re,ge){let Ae=re-1,_t=-1,_r=!1,Me,ot,ht,jr;for(;++Ae<=ge;){let Xe=W[Ae];if(Xe[1].type==="listUnordered"||Xe[1].type==="listOrdered"||Xe[1].type==="blockQuote"?(Xe[0]==="enter"?_t++:_t--,jr=void 0):Xe[1].type==="lineEndingBlank"?Xe[0]==="enter"&&(Me&&!jr&&!_t&&!ht&&(ht=Ae),jr=void 0):Xe[1].type==="linePrefix"||Xe[1].type==="listItemValue"||Xe[1].type==="listItemMarker"||Xe[1].type==="listItemPrefix"||Xe[1].type==="listItemPrefixWhitespace"||(jr=void 0),!_t&&Xe[0]==="enter"&&Xe[1].type==="listItemPrefix"||_t===-1&&Xe[0]==="exit"&&(Xe[1].type==="listUnordered"||Xe[1].type==="listOrdered")){if(Me){let tn=Ae;for(ot=void 0;tn--;){let Et=W[tn];if(Et[1].type==="lineEnding"||Et[1].type==="lineEndingBlank"){if(Et[0]==="exit")continue;ot&&(W[ot][1].type="lineEndingBlank",_r=!0),Et[1].type="lineEnding",ot=tn}else if(!(Et[1].type==="linePrefix"||Et[1].type==="blockQuotePrefix"||Et[1].type==="blockQuotePrefixWhitespace"||Et[1].type==="blockQuoteMarker"||Et[1].type==="listItemIndent"))break}ht&&(!ot||ht<ot)&&(Me._spread=!0),Me.end=Object.assign({},ot?W[ot][1].start:Xe[1].end),W.splice(ot||Ae,0,["exit",Me,Xe[2]]),Ae++,ge++}Xe[1].type==="listItemPrefix"&&(Me={type:"listItem",_spread:!1,start:Object.assign({},Xe[1].start)},W.splice(Ae,0,["enter",Me,Xe[2]]),Ae++,ge++,ht=void 0,jr=!0)}}return W[re][1]._spread=_r,ge}function o(W,re){e[W]=re}function a(W){return e[W]}function u(W){return{line:W.line,column:W.column,offset:W.offset}}function f(W,re){return ge;function ge(Ae){p.call(this,W(Ae),Ae),re&&re.call(this,Ae)}}function m(){this.stack.push({type:"fragment",children:[]})}function p(W,re,ge){return this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([re,ge]),W.position={start:u(re.start)},W}function $(W){return re;function re(ge){W&&W.call(this,ge),k.call(this,ge)}}function k(W,re){let ge=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==W.type&&(re?re.call(this,W,Ae[0]):(Ae[1]||pm).call(this,W,Ae[0]));else throw new Error("Cannot close `"+W.type+"` ("+yi({start:W.start,end:W.end})+"): it\u2019s not open");return ge.position.end=u(W.end),ge}function v(){return Vd(this.stack.pop())}function x(){o("expectingFirstListItemValue",!0)}function I(W){if(a("expectingFirstListItemValue")){let re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(W),10),o("expectingFirstListItemValue")}}function D(){let W=this.resume(),re=this.stack[this.stack.length-1];re.lang=W}function R(){let W=this.resume(),re=this.stack[this.stack.length-1];re.meta=W}function X(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function ee(){let W=this.resume(),re=this.stack[this.stack.length-1];re.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function de(){let W=this.resume(),re=this.stack[this.stack.length-1];re.value=W.replace(/(\r?\n|\r)$/g,"")}function ce(W){let re=this.resume(),ge=this.stack[this.stack.length-1];ge.label=re,ge.identifier=Xt(this.sliceSerialize(W)).toLowerCase()}function Q(){let W=this.resume(),re=this.stack[this.stack.length-1];re.title=W}function me(){let W=this.resume(),re=this.stack[this.stack.length-1];re.url=W}function ve(W){let re=this.stack[this.stack.length-1];if(!re.depth){let ge=this.sliceSerialize(W).length;re.depth=ge}}function ke(){o("setextHeadingSlurpLineEnding",!0)}function Te(W){let re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(W).charCodeAt(0)===61?1:2}function xe(){o("setextHeadingSlurpLineEnding")}function _e(W){let re=this.stack[this.stack.length-1],ge=re.children[re.children.length-1];(!ge||ge.type!=="text")&&(ge=Lr(),ge.position={start:u(W.start)},re.children.push(ge)),this.stack.push(ge)}function ue(W){let re=this.stack.pop();re.value+=this.sliceSerialize(W),re.position.end=u(W.end)}function be(W){let re=this.stack[this.stack.length-1];if(a("atHardBreak")){let ge=re.children[re.children.length-1];ge.position.end=u(W.end),o("atHardBreak");return}!a("setextHeadingSlurpLineEnding")&&r.canContainEols.includes(re.type)&&(_e.call(this,W),ue.call(this,W))}function He(){o("atHardBreak",!0)}function U(){let W=this.resume(),re=this.stack[this.stack.length-1];re.value=W}function at(){let W=this.resume(),re=this.stack[this.stack.length-1];re.value=W}function Le(){let W=this.resume(),re=this.stack[this.stack.length-1];re.value=W}function tt(){let W=this.stack[this.stack.length-1];a("inReference")?(W.type+="Reference",W.referenceType=a("referenceType")||"shortcut",delete W.url,delete W.title):(delete W.identifier,delete W.label),o("referenceType")}function Ue(){let W=this.stack[this.stack.length-1];a("inReference")?(W.type+="Reference",W.referenceType=a("referenceType")||"shortcut",delete W.url,delete W.title):(delete W.identifier,delete W.label),o("referenceType")}function O(W){let re=this.stack[this.stack.length-2],ge=this.sliceSerialize(W);re.label=oa(ge),re.identifier=Xt(ge).toLowerCase()}function N(){let W=this.stack[this.stack.length-1],re=this.resume(),ge=this.stack[this.stack.length-1];o("inReference",!0),ge.type==="link"?ge.children=W.children:ge.alt=re}function Mt(){let W=this.resume(),re=this.stack[this.stack.length-1];re.url=W}function wt(){let W=this.resume(),re=this.stack[this.stack.length-1];re.title=W}function it(){o("inReference")}function ft(){o("referenceType","collapsed")}function ct(W){let re=this.resume(),ge=this.stack[this.stack.length-1];ge.label=re,ge.identifier=Xt(this.sliceSerialize(W)).toLowerCase(),o("referenceType","full")}function $e(W){o("characterReferenceType",W.type)}function br(W){let re=this.sliceSerialize(W),ge=a("characterReferenceType"),Ae;ge?(Ae=ia(re,ge==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):Ae=to(re);let _t=this.stack.pop();_t.value+=Ae,_t.position.end=u(W.end)}function Ct(W){ue.call(this,W);let re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(W)}function Tt(W){ue.call(this,W);let re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(W)}function er(){return{type:"blockquote",children:[]}}function ur(){return{type:"code",lang:null,meta:null,value:""}}function zt(){return{type:"inlineCode",value:""}}function Kn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pn(){return{type:"emphasis",children:[]}}function pt(){return{type:"heading",depth:void 0,children:[]}}function dt(){return{type:"break"}}function Ot(){return{type:"html",value:""}}function mt(){return{type:"image",title:null,url:"",alt:null}}function xt(){return{type:"link",title:null,url:"",children:[]}}function Or(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function Nr(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function Rr(){return{type:"paragraph",children:[]}}function Dr(){return{type:"strong",children:[]}}function Lr(){return{type:"text",value:""}}function tr(){return{type:"thematicBreak"}}}function dm(t,r){let e=-1;for(;++e<r.length;){let n=r[e];Array.isArray(n)?dm(t,n):A0(t,n)}return t}function A0(t,r){let e;for(e in r)if(Pu.call(r,e)){let n=e==="canContainEols"||e==="transforms",o=(Pu.call(t,e)?t[e]:void 0)||(t[e]=n?[]:{}),a=r[e];a&&(n?t[e]=[...o,...a]:Object.assign(o,a))}}function pm(t,r){throw t?new Error("Cannot close `"+t.type+"` ("+yi({start:t.start,end:t.end})+"): a different token (`"+r.type+"`, "+yi({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+yi({start:r.start,end:r.end})+") is still open")}function Fu(t){Object.assign(this,{Parser:e=>{let n=this.data("settings");return Iu(e,Object.assign({},n,t,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var mm=Fu;var S0={tokenize:T0,partial:!0},gm={tokenize:O0,partial:!0},ym={tokenize:N0,partial:!0},ro={tokenize:D0,partial:!0},$m={tokenize:R0,partial:!0},bm={tokenize:I0,previous:wm},vm={tokenize:F0,previous:Nu},Sn={tokenize:P0,previous:xm},dn={},Tu={text:dn},_i=48;for(;_i<123;)dn[_i]=Sn,_i++,_i===58?_i=65:_i===91&&(_i=97);dn[43]=Sn;dn[45]=Sn;dn[46]=Sn;dn[95]=Sn;dn[72]=[Sn,vm];dn[104]=[Sn,vm];dn[87]=[Sn,bm];dn[119]=[Sn,bm];function P0(t,r,e){let n=this,i,o;return a;function a(v){return!hm(v)||!xm(n.previous)||Ru(n.events)?e(v):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),u(v))}function u(v){return hm(v)?(t.consume(v),u):v===64?(t.consume(v),f):e(v)}function f(v){return v===46?t.check(ro,k,m)(v):v===45||v===95?t.check(ro,e,p)(v):Ft(v)?(!o&&$i(v)&&(o=!0),t.consume(v),f):k(v)}function m(v){return t.consume(v),i=!0,o=void 0,f}function p(v){return t.consume(v),$}function $(v){return v===46?t.check(ro,e,m)(v):f(v)}function k(v){return i&&!o?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),r(v)):e(v)}}function I0(t,r,e){let n=this;return i;function i(a){return a!==87&&a!==119||!wm(n.previous)||Ru(n.events)?e(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(S0,t.attempt(gm,t.attempt(ym,o),e),e)(a))}function o(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),r(a)}}function F0(t,r,e){let n=this;return i;function i(x){return x!==72&&x!==104||!Nu(n.previous)||Ru(n.events)?e(x):(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),t.consume(x),o)}function o(x){return x===84||x===116?(t.consume(x),a):e(x)}function a(x){return x===84||x===116?(t.consume(x),u):e(x)}function u(x){return x===80||x===112?(t.consume(x),f):e(x)}function f(x){return x===83||x===115?(t.consume(x),m):m(x)}function m(x){return x===58?(t.consume(x),p):e(x)}function p(x){return x===47?(t.consume(x),$):e(x)}function $(x){return x===47?(t.consume(x),k):e(x)}function k(x){return x===null||Vn(x)||bi(x)||vi(x)?e(x):t.attempt(gm,t.attempt(ym,v),e)(x)}function v(x){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),r(x)}}function T0(t,r,e){return n;function n(f){return t.consume(f),i}function i(f){return f===87||f===119?(t.consume(f),o):e(f)}function o(f){return f===87||f===119?(t.consume(f),a):e(f)}function a(f){return f===46?(t.consume(f),u):e(f)}function u(f){return f===null||ae(f)?e(f):r(f)}}function O0(t,r,e){let n,i;return o;function o(f){return f===38?t.check($m,u,a)(f):f===46||f===95?t.check(ro,u,a)(f):f===null||Vn(f)||bi(f)||f!==45&&vi(f)?u(f):(t.consume(f),o)}function a(f){return f===46?(i=n,n=void 0,t.consume(f),o):(f===95&&(n=!0),t.consume(f),o)}function u(f){return!i&&!n?r(f):e(f)}}function N0(t,r){let e=0;return n;function n(a){return a===38?t.check($m,r,i)(a):(a===40&&e++,a===41?t.check(ro,o,i)(a):Ou(a)?r(a):km(a)?t.check(ro,r,i)(a):(t.consume(a),n))}function i(a){return t.consume(a),n}function o(a){return e--,e<0?r(a):i(a)}}function R0(t,r,e){return n;function n(a){return t.consume(a),i}function i(a){return Jt(a)?(t.consume(a),i):a===59?(t.consume(a),o):e(a)}function o(a){return Ou(a)?r(a):e(a)}}function D0(t,r,e){return n;function n(o){return t.consume(o),i}function i(o){return km(o)?(t.consume(o),i):Ou(o)?r(o):e(o)}}function km(t){return t===33||t===34||t===39||t===41||t===42||t===44||t===46||t===58||t===59||t===60||t===63||t===95||t===126}function Ou(t){return t===null||t===60||Ve(t)}function hm(t){return t===43||t===45||t===46||t===95||Ft(t)}function wm(t){return t===null||t===40||t===42||t===95||t===126||Ve(t)}function Nu(t){return t===null||!Jt(t)}function xm(t){return t!==47&&Nu(t)}function Ru(t){let r=t.length,e=!1;for(;r--;){let n=t[r][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){e=!0;break}if(n._gfmAutolinkLiteralWalkedInto){e=!1;break}}return t.length>0&&!e&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),e}var L0={tokenize:U0,partial:!0};function Du(){return{document:{[91]:{tokenize:M0,continuation:{tokenize:z0},exit:V0}},text:{[91]:{tokenize:B0},[93]:{add:"after",tokenize:j0,resolveTo:q0}}}}function j0(t,r,e){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let f=n.events[i][1];if(f.type==="labelImage"){a=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return u;function u(f){if(!a||!a._balanced)return e(f);let m=Xt(n.sliceSerialize({start:a.end,end:n.now()}));return m.charCodeAt(0)!==94||!o.includes(m.slice(1))?e(f):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),r(f))}}function q0(t,r){let e=t.length,n;for(;e--;)if(t[e][1].type==="labelImage"&&t[e][0]==="enter"){n=t[e][1];break}t[e+1][1].type="data",t[e+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[e+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[e+3][1].end),end:Object.assign({},t[e+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},f=[t[e+1],t[e+2],["enter",i,r],t[e+3],t[e+4],["enter",o,r],["exit",o,r],["enter",a,r],["enter",u,r],["exit",u,r],["exit",a,r],t[t.length-2],t[t.length-1],["exit",i,r]];return t.splice(e,t.length-e+1,...f),t}function B0(t,r,e){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,a;return u;function u(k){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(k),t.exit("gfmFootnoteCallLabelMarker"),f}function f(k){return k!==94?e(k):(t.enter("gfmFootnoteCallMarker"),t.consume(k),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(k){let v;return k===null||k===91||o++>999?e(k):k===93?a?(t.exit("chunkString"),v=t.exit("gfmFootnoteCallString"),i.includes(Xt(n.sliceSerialize(v)))?$(k):e(k)):e(k):(t.consume(k),Ve(k)||(a=!0),k===92?p:m)}function p(k){return k===91||k===92||k===93?(t.consume(k),o++,m):m(k)}function $(k){return t.enter("gfmFootnoteCallLabelMarker"),t.consume(k),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),r}}function M0(t,r,e){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,a=0,u;return f;function f(I){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(I),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(I){return I===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(I),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),p):e(I)}function p(I){let D;return I===null||I===91||a>999?e(I):I===93?u?(D=t.exit("gfmFootnoteDefinitionLabelString"),o=Xt(n.sliceSerialize(D)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(I),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),v):e(I):ae(I)?(t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),a++,p):(t.enter("chunkString").contentType="string",$(I))}function $(I){return I===null||ae(I)||I===91||I===93||a>999?(t.exit("chunkString"),p(I)):(Ve(I)||(u=!0),a++,t.consume(I),I===92?k:$)}function k(I){return I===91||I===92||I===93?(t.consume(I),a++,$):$(I)}function v(I){return I===58?(t.enter("definitionMarker"),t.consume(I),t.exit("definitionMarker"),ye(t,x,"gfmFootnoteDefinitionWhitespace")):e(I)}function x(I){return i.includes(o)||i.push(o),r(I)}}function z0(t,r,e){return t.check(pn,r,t.attempt(L0,r,e))}function V0(t){t.exit("gfmFootnoteDefinition")}function U0(t,r,e){let n=this;return ye(t,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?r(o):e(o)}}function Lu(t={}){let r=t.singleTilde,e={tokenize:i,resolveAll:n};return r==null&&(r=!0),{text:{[126]:e},insideSpan:{null:[e]},attentionMarkers:{null:[126]}};function n(o,a){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let f=u;for(;f--;)if(o[f][0]==="exit"&&o[f][1].type==="strikethroughSequenceTemporary"&&o[f][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[f][1].end.offset-o[f][1].start.offset){o[u][1].type="strikethroughSequence",o[f][1].type="strikethroughSequence";let m={type:"strikethrough",start:Object.assign({},o[f][1].start),end:Object.assign({},o[u][1].end)},p={type:"strikethroughText",start:Object.assign({},o[f][1].end),end:Object.assign({},o[u][1].start)},$=[["enter",m,a],["enter",o[f][1],a],["exit",o[f][1],a],["enter",p,a]];yt($,$.length,0,Hn(a.parser.constructs.insideSpan.null,o.slice(f+1,u),a)),yt($,$.length,0,[["exit",p,a],["enter",o[u][1],a],["exit",o[u][1],a],["exit",m,a]]),yt(o,f-1,u-f+3,$),u=f+$.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function i(o,a,u){let f=this.previous,m=this.events,p=0;return $;function $(v){return f===126&&m[m.length-1][1].type!=="characterEscape"?u(v):(o.enter("strikethroughSequenceTemporary"),k(v))}function k(v){let x=eo(f);if(v===126)return p>1?u(v):(o.consume(v),p++,k);if(p<2&&!r)return u(v);let I=o.exit("strikethroughSequenceTemporary"),D=eo(v);return I._open=!D||D===2&&Boolean(x),I._close=!x||x===2&&Boolean(D),a(v)}}}var ju={flow:{null:{tokenize:K0,resolve:H0}}},_m={tokenize:W0,partial:!0};function H0(t,r){let e=-1,n,i,o,a,u,f,m;for(;++e<t.length;){let p=t[e][1];if(o&&(p.type==="temporaryTableCellContent"&&(a=a||e,u=e),(p.type==="tableCellDivider"||p.type==="tableRow")&&u)){let $={type:"tableContent",start:t[a][1].start,end:t[u][1].end},k={type:"chunkText",start:$.start,end:$.end,contentType:"text"};t.splice(a,u-a+1,["enter",$,r],["enter",k,r],["exit",k,r],["exit",$,r]),e-=u-a-3,a=void 0,u=void 0}if(t[e][0]==="exit"&&f!==void 0&&f+(m?0:1)<e&&(p.type==="tableCellDivider"||p.type==="tableRow"&&(f+3<e||t[f][1].type!=="whitespace"))){let $={type:i?"tableDelimiter":n?"tableHeader":"tableData",start:t[f][1].start,end:t[e][1].end};t.splice(e+(p.type==="tableCellDivider"?1:0),0,["exit",$,r]),t.splice(f,0,["enter",$,r]),e+=2,f=e+1,m=!0}p.type==="tableRow"&&(o=t[e][0]==="enter",o&&(f=e+1,m=!1)),p.type==="tableDelimiterRow"&&(i=t[e][0]==="enter",i&&(f=e+1,m=!1)),p.type==="tableHead"&&(n=t[e][0]==="enter")}return t}function K0(t,r,e){let n=this,i=[],o=0,a,u;return f;function f(U){return t.enter("table")._align=i,t.enter("tableHead"),t.enter("tableRow"),U===124?m(U):(o++,t.enter("temporaryTableCellContent"),k(U))}function m(U){return t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),a=!0,p}function p(U){return U===null||ae(U)?x(U):Fe(U)?(t.enter("whitespace"),t.consume(U),$):(a&&(a=void 0,o++),U===124?m(U):(t.enter("temporaryTableCellContent"),k(U)))}function $(U){return Fe(U)?(t.consume(U),$):(t.exit("whitespace"),p(U))}function k(U){return U===null||U===124||Ve(U)?(t.exit("temporaryTableCellContent"),p(U)):(t.consume(U),U===92?v:k)}function v(U){return U===92||U===124?(t.consume(U),k):k(U)}function x(U){if(U===null)return e(U);t.exit("tableRow"),t.exit("tableHead");let at=n.interrupt;return n.interrupt=!0,t.attempt({tokenize:He,partial:!0},function(Le){return n.interrupt=at,t.enter("tableDelimiterRow"),I(Le)},function(Le){return n.interrupt=at,e(Le)})(U)}function I(U){return U===null||ae(U)?de(U):Fe(U)?(t.enter("whitespace"),t.consume(U),D):U===45?(t.enter("tableDelimiterFiller"),t.consume(U),u=!0,i.push("none"),R):U===58?(t.enter("tableDelimiterAlignment"),t.consume(U),t.exit("tableDelimiterAlignment"),i.push("left"),X):U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),I):e(U)}function D(U){return Fe(U)?(t.consume(U),D):(t.exit("whitespace"),I(U))}function R(U){return U===45?(t.consume(U),R):(t.exit("tableDelimiterFiller"),U===58?(t.enter("tableDelimiterAlignment"),t.consume(U),t.exit("tableDelimiterAlignment"),i[i.length-1]=i[i.length-1]==="left"?"center":"right",ee):I(U))}function X(U){return U===45?(t.enter("tableDelimiterFiller"),t.consume(U),u=!0,R):e(U)}function ee(U){return U===null||ae(U)?de(U):Fe(U)?(t.enter("whitespace"),t.consume(U),D):U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),I):e(U)}function de(U){return t.exit("tableDelimiterRow"),!u||o!==i.length?e(U):U===null?ce(U):t.check(_m,ce,t.attempt({tokenize:He,partial:!0},ye(t,Q,"linePrefix",4),ce))(U)}function ce(U){return t.exit("table"),r(U)}function Q(U){return t.enter("tableBody"),me(U)}function me(U){return t.enter("tableRow"),U===124?ve(U):(t.enter("temporaryTableCellContent"),xe(U))}function ve(U){return t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),ke}function ke(U){return U===null||ae(U)?ue(U):Fe(U)?(t.enter("whitespace"),t.consume(U),Te):U===124?ve(U):(t.enter("temporaryTableCellContent"),xe(U))}function Te(U){return Fe(U)?(t.consume(U),Te):(t.exit("whitespace"),ke(U))}function xe(U){return U===null||U===124||Ve(U)?(t.exit("temporaryTableCellContent"),ke(U)):(t.consume(U),U===92?_e:xe)}function _e(U){return U===92||U===124?(t.consume(U),xe):xe(U)}function ue(U){return t.exit("tableRow"),U===null?be(U):t.check(_m,be,t.attempt({tokenize:He,partial:!0},ye(t,me,"linePrefix",4),be))(U)}function be(U){return t.exit("tableBody"),ce(U)}function He(U,at,Le){return tt;function tt(O){return U.enter("lineEnding"),U.consume(O),U.exit("lineEnding"),ye(U,Ue,"linePrefix")}function Ue(O){if(n.parser.lazy[n.now().line]||O===null||ae(O))return Le(O);let N=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&N&&N[1].type==="linePrefix"&&N[2].sliceSerialize(N[1],!0).length>=4?Le(O):(n._gfmTableDynamicInterruptHack=!0,U.check(n.parser.constructs.flow,function(Mt){return n._gfmTableDynamicInterruptHack=!1,Le(Mt)},function(Mt){return n._gfmTableDynamicInterruptHack=!1,at(Mt)})(O))}}}function W0(t,r,e){let n=0;return i;function i(a){return t.enter("check"),t.consume(a),o}function o(a){return a===-1||a===32?(t.consume(a),n++,n===4?r:o):a===null||Ve(a)?r(a):e(a)}}var G0={tokenize:Q0},qu={text:{[91]:G0}};function Q0(t,r,e){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?e(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),o)}function o(u){return Ve(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),a):e(u)}function a(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),t.check({tokenize:Z0},r,e)):e(u)}}function Z0(t,r,e){let n=this;return ye(t,i,"whitespace");function i(o){let a=n.events[n.events.length-1];return(a&&a[1].type==="whitespace"||ae(o))&&o!==null?r(o):e(o)}}function Cm(t){return Gs([Tu,Du(),Lu(t),ju,qu])}function Bu(t,r){let e=String(t);if(typeof r!="string")throw new TypeError("Expected character");let n=0,i=e.indexOf(r);for(;i!==-1;)n++,i=e.indexOf(r,i+r.length);return n}function Mu(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Wo=function(t){if(t==null)return ek;if(typeof t=="string")return Y0(t);if(typeof t=="object")return Array.isArray(t)?J0(t):X0(t);if(typeof t=="function")return sa(t);throw new Error("Expected function, string, or object as test")};function J0(t){let r=[],e=-1;for(;++e<t.length;)r[e]=Wo(t[e]);return sa(n);function n(...i){let o=-1;for(;++o<r.length;)if(r[o].call(this,...i))return!0;return!1}}function X0(t){return sa(r);function r(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}}function Y0(t){return sa(r);function r(e){return e&&e.type===t}}function sa(t){return r;function r(...e){return Boolean(t.call(this,...e))}}function ek(){return!0}var tk=!0,rk="skip",Em=!1,Am=function(t,r,e,n){typeof r=="function"&&typeof e!="function"&&(n=e,e=r,r=null);let i=Wo(r),o=n?-1:1;a(t,null,[])();function a(u,f,m){let p=typeof u=="object"&&u!==null?u:{},$;return typeof p.type=="string"&&($=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0,Object.defineProperty(k,"name",{value:"node ("+(p.type+($?"<"+$+">":""))+")"})),k;function k(){let v=[],x,I,D;if((!r||i(u,f,m[m.length-1]||null))&&(v=nk(e(u,m)),v[0]===Em))return v;if(u.children&&v[0]!==rk)for(I=(n?u.children.length:-1)+o,D=m.concat(u);I>-1&&I<u.children.length;){if(x=a(u.children[I],I,D)(),x[0]===Em)return x;I=typeof x[1]=="number"?x[1]:I+o}return v}}};function nk(t){return Array.isArray(t)?t:typeof t=="number"?[tk,t]:[t]}var ik={}.hasOwnProperty,zu=function(t,r,e,n){let i,o;typeof r=="string"||r instanceof RegExp?(o=[[r,e]],i=n):(o=r,i=e),i||(i={});let a=Wo(i.ignore||[]),u=ok(o),f=-1;for(;++f<u.length;)Am(t,"text",m);return t;function m($,k){let v=-1,x;for(;++v<k.length;){let I=k[v];if(a(I,x?x.children.indexOf(I):void 0,x))return;x=I}if(x)return p($,k)}function p($,k){let v=k[k.length-1],x=u[f][0],I=u[f][1],D=0,R=v.children.indexOf($),X=!1,ee=[],de;x.lastIndex=0;let ce=x.exec($.value);for(;ce;){de=ce.index;let Q={index:ce.index,input:ce.input,stack:[...k,$]},me=I(...ce,Q);if(typeof me=="string"&&(me=me.length>0?{type:"text",value:me}:void 0),me!==!1&&(D!==de&&ee.push({type:"text",value:$.value.slice(D,de)}),Array.isArray(me)?ee.push(...me):me&&ee.push(me),D=de+ce[0].length,X=!0),!x.global)break;ce=x.exec($.value)}return X?(D<$.value.length&&ee.push({type:"text",value:$.value.slice(D)}),v.children.splice(R,1,...ee)):ee=[$],R+ee.length}};function ok(t){let r=[];if(typeof t!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(t)){let e=-1;for(;++e<t.length;)r.push([Sm(t[e][0]),Pm(t[e][1])])}else{let e;for(e in t)ik.call(t,e)&&r.push([Sm(e),Pm(t[e])])}return r}function Sm(t){return typeof t=="string"?new RegExp(Mu(t),"g"):t}function Pm(t){return typeof t=="function"?t:()=>t}var Vu="phrasing",Uu=["autolink","link","image","label"],Im={transforms:[ck],enter:{literalAutolink:sk,literalAutolinkEmail:Hu,literalAutolinkHttp:Hu,literalAutolinkWww:Hu},exit:{literalAutolink:fk,literalAutolinkEmail:uk,literalAutolinkHttp:ak,literalAutolinkWww:lk}},Fm={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Vu,notInConstruct:Uu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Vu,notInConstruct:Uu},{character:":",before:"[ps]",after:"\\/",inConstruct:Vu,notInConstruct:Uu}]};function sk(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Hu(t){this.config.enter.autolinkProtocol.call(this,t)}function ak(t){this.config.exit.autolinkProtocol.call(this,t)}function lk(t){this.config.exit.data.call(this,t);let r=this.stack[this.stack.length-1];r.url="http://"+this.sliceSerialize(t)}function uk(t){this.config.exit.autolinkEmail.call(this,t)}function fk(t){this.exit(t)}function ck(t){zu(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pk],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,dk]],{ignore:["link","linkReference"]})}function pk(t,r,e,n,i){let o="";if(!Tm(i)||(/^w/i.test(r)&&(e=r+e,r="",o="http://"),!mk(e)))return!1;let a=hk(e+n);if(!a[0])return!1;let u={type:"link",title:null,url:o+r+a[0],children:[{type:"text",value:r+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function dk(t,r,e,n){return!Tm(n,!0)||/[_-\d]$/.test(e)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+e,children:[{type:"text",value:r+"@"+e}]}}function mk(t){let r=t.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function hk(t){let r=/[!"&'),.:;<>?\]}]+$/.exec(t),e,n,i,o;if(r)for(t=t.slice(0,r.index),o=r[0],e=o.indexOf(")"),n=Bu(t,"("),i=Bu(t,")");e!==-1&&n>i;)t+=o.slice(0,e+1),o=o.slice(e+1),e=o.indexOf(")"),i++;return[t,o]}function Tm(t,r){let e=t.input.charCodeAt(t.index-1);return(t.index===0||bi(e)||vi(e))&&(!r||e!==47)}function Ku(t){return t.label||!t.identifier?t.label||"":oa(t.identifier)}function $r(t){let r=t||{},e=r.now||{},n=r.lineShift||0,i=e.line||1,o=e.column||1;return{move:f,current:a,shift:u};function a(){return{now:{line:i,column:o},lineShift:n}}function u(m){n+=m}function f(m=""){let p=m.split(/\r?\n|\r/g),$=p[p.length-1];return i+=p.length-1,o=p.length===1?o+$.length:1+$.length+n,m}}function aa(t,r,e){let n=r.indexStack,i=t.children||[],o=$r(e),a=[],u=-1;for(n.push(-1);++u<i.length;){let m=i[u];n[n.length-1]=u,a.push(o.move(r.handle(m,t,r,{before:`
|
|
19
|
-
`,after:`
|
|
20
|
-
`,...o.current()}))),m.type!=="list"&&(r.bulletLastUsed=void 0),u<i.length-1&&a.push(o.move(f(m,i[u+1])))}return n.pop(),a.join("");function f(m,p){let $=r.join.length;for(;$--;){let k=r.join[$](m,p,t,r);if(k===!0||k===1)break;if(typeof k=="number")return`
|
|
21
|
-
`.repeat(1+k);if(k===!1)return`
|
|
22
|
-
|
|
23
|
-
<!---->
|
|
24
|
-
|
|
25
|
-
`}return`
|
|
26
|
-
|
|
27
|
-
`}}var gk=/\r?\n|\r/g;function la(t,r){let e=[],n=0,i=0,o;for(;o=gk.exec(t);)a(t.slice(n,o.index)),e.push(o[0]),n=o.index+o[0].length,i++;return a(t.slice(n)),e.join("");function a(u){e.push(r(u,i,!u))}}function ua(t){if(!t._compiled){let r=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((r?"("+r+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function Nm(t,r){return Om(t,r.inConstruct,!0)&&!Om(t,r.notInConstruct,!1)}function Om(t,r,e){if(!r)return e;typeof r=="string"&&(r=[r]);let n=-1;for(;++n<r.length;)if(t.includes(r[n]))return!0;return!1}function Wu(t,r,e){let n=(e.before||"")+(r||"")+(e.after||""),i=[],o=[],a={},u=-1;for(;++u<t.unsafe.length;){let p=t.unsafe[u];if(!Nm(t.stack,p))continue;let $=ua(p),k;for(;k=$.exec(n);){let v="before"in p||Boolean(p.atBreak),x="after"in p,I=k.index+(v?k[1].length:0);i.includes(I)?(a[I].before&&!v&&(a[I].before=!1),a[I].after&&!x&&(a[I].after=!1)):(i.push(I),a[I]={before:v,after:x})}}i.sort(yk);let f=e.before?e.before.length:0,m=n.length-(e.after?e.after.length:0);for(u=-1;++u<i.length;){let p=i[u];p<f||p>=m||p+1<m&&i[u+1]===p+1&&a[p].after&&!a[p+1].before&&!a[p+1].after||i[u-1]===p-1&&a[p].before&&!a[p-1].before&&!a[p-1].after||(f!==p&&o.push(Rm(n.slice(f,p),"\\")),f=p,/[!-/:-@[-`{-~]/.test(n.charAt(p))&&(!e.encode||!e.encode.includes(n.charAt(p)))?o.push("\\"):(o.push("&#x"+n.charCodeAt(p).toString(16).toUpperCase()+";"),f++))}return o.push(Rm(n.slice(f,m),e.after)),o.join("")}function yk(t,r){return t-r}function Rm(t,r){let e=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=t+r,a=-1,u=0,f;for(;f=e.exec(o);)n.push(f.index);for(;++a<n.length;)u!==n[a]&&i.push(t.slice(u,n[a])),i.push("\\"),u=n[a];return i.push(t.slice(u)),i.join("")}function Dm(){return{enter:{gfmFootnoteDefinition:t,gfmFootnoteDefinitionLabelString:r,gfmFootnoteCall:i,gfmFootnoteCallString:o},exit:{gfmFootnoteDefinition:n,gfmFootnoteDefinitionLabelString:e,gfmFootnoteCall:u,gfmFootnoteCallString:a}};function t(f){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},f)}function r(){this.buffer()}function e(f){let m=this.resume(),p=this.stack[this.stack.length-1];p.label=m,p.identifier=Xt(this.sliceSerialize(f)).toLowerCase()}function n(f){this.exit(f)}function i(f){this.enter({type:"footnoteReference",identifier:"",label:""},f)}function o(){this.buffer()}function a(f){let m=this.resume(),p=this.stack[this.stack.length-1];p.label=m,p.identifier=Xt(this.sliceSerialize(f)).toLowerCase()}function u(f){this.exit(f)}}function Lm(){return t.peek=r,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:e,footnoteReference:t}};function t(n,i,o,a){let u=$r(a),f=u.move("[^"),m=o.enter("footnoteReference"),p=o.enter("reference");return f+=u.move(Wu(o,Ku(n),{...u.current(),before:f,after:"]"})),p(),m(),f+=u.move("]"),f}function r(){return"["}function e(n,i,o,a){let u=$r(a),f=u.move("[^"),m=o.enter("footnoteDefinition"),p=o.enter("label");return f+=u.move(Wu(o,Ku(n),{...u.current(),before:f,after:"]"})),p(),f+=u.move("]:"+(n.children&&n.children.length>0?" ":"")),u.shift(4),f+=u.move(la(aa(n,o,u.current()),$)),m(),f;function $(k,v,x){return v?(x?"":" ")+k:k}}}function fa(t,r,e){let n=r.indexStack,i=t.children||[],o=[],a=-1,u=e.before;n.push(-1);let f=$r(e);for(;++a<i.length;){let m=i[a],p;if(n[n.length-1]=a,a+1<i.length){let $=r.handle.handlers[i[a+1].type];$&&$.peek&&($=$.peek),p=$?$(i[a+1],t,r,{before:"",after:"",...f.current()}).charAt(0):""}else p=e.after;o.length>0&&(u==="\r"||u===`
|
|
28
|
-
`)&&m.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),u=" ",f=$r(e),f.move(o.join(""))),o.push(f.move(r.handle(m,t,r,{...f.current(),before:u,after:p}))),u=o[o.length-1].slice(-1)}return n.pop(),o.join("")}var jm={canContainEols:["delete"],enter:{strikethrough:$k},exit:{strikethrough:bk}},qm={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:Bm}};Bm.peek=vk;function $k(t){this.enter({type:"delete",children:[]},t)}function bk(t){this.exit(t)}function Bm(t,r,e,n){let i=$r(n),o=e.enter("emphasis"),a=i.move("~~");return a+=fa(t,e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function vk(){return"~"}Gu.peek=kk;function Gu(t,r,e){let n=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<e.unsafe.length;){let a=e.unsafe[o],u=ua(a),f;if(!!a.atBreak)for(;f=u.exec(n);){let m=f.index;n.charCodeAt(m)===10&&n.charCodeAt(m-1)===13&&m--,n=n.slice(0,m)+" "+n.slice(f.index+1)}}return i+n+i}function kk(){return"`"}function zm(t,r={}){let e=(r.align||[]).concat(),n=r.stringLength||xk,i=[],o=[],a=[],u=[],f=0,m=-1;for(;++m<t.length;){let x=[],I=[],D=-1;for(t[m].length>f&&(f=t[m].length);++D<t[m].length;){let R=wk(t[m][D]);if(r.alignDelimiters!==!1){let X=n(R);I[D]=X,(u[D]===void 0||X>u[D])&&(u[D]=X)}x.push(R)}o[m]=x,a[m]=I}let p=-1;if(typeof e=="object"&&"length"in e)for(;++p<f;)i[p]=Mm(e[p]);else{let x=Mm(e);for(;++p<f;)i[p]=x}p=-1;let $=[],k=[];for(;++p<f;){let x=i[p],I="",D="";x===99?(I=":",D=":"):x===108?I=":":x===114&&(D=":");let R=r.alignDelimiters===!1?1:Math.max(1,u[p]-I.length-D.length),X=I+"-".repeat(R)+D;r.alignDelimiters!==!1&&(R=I.length+R+D.length,R>u[p]&&(u[p]=R),k[p]=R),$[p]=X}o.splice(1,0,$),a.splice(1,0,k),m=-1;let v=[];for(;++m<o.length;){let x=o[m],I=a[m];p=-1;let D=[];for(;++p<f;){let R=x[p]||"",X="",ee="";if(r.alignDelimiters!==!1){let de=u[p]-(I[p]||0),ce=i[p];ce===114?X=" ".repeat(de):ce===99?de%2?(X=" ".repeat(de/2+.5),ee=" ".repeat(de/2-.5)):(X=" ".repeat(de/2),ee=X):ee=" ".repeat(de)}r.delimiterStart!==!1&&!p&&D.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&R==="")&&(r.delimiterStart!==!1||p)&&D.push(" "),r.alignDelimiters!==!1&&D.push(X),D.push(R),r.alignDelimiters!==!1&&D.push(ee),r.padding!==!1&&D.push(" "),(r.delimiterEnd!==!1||p!==f-1)&&D.push("|")}v.push(r.delimiterEnd===!1?D.join("").replace(/ +$/,""):D.join(""))}return v.join(`
|
|
29
|
-
`)}function wk(t){return t==null?"":String(t)}function xk(t){return t.length}function Mm(t){let r=typeof t=="string"?t.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}var Zu={enter:{table:_k,tableData:Vm,tableHeader:Vm,tableRow:Ek},exit:{codeText:Ak,table:Ck,tableData:Qu,tableHeader:Qu,tableRow:Qu}};function _k(t){let r=t._align;this.enter({type:"table",align:r.map(e=>e==="none"?null:e),children:[]},t),this.setData("inTable",!0)}function Ck(t){this.exit(t),this.setData("inTable")}function Ek(t){this.enter({type:"tableRow",children:[]},t)}function Qu(t){this.exit(t)}function Vm(t){this.enter({type:"tableCell",children:[]},t)}function Ak(t){let r=this.resume();this.getData("inTable")&&(r=r.replace(/\\([\\|])/g,Sk));let e=this.stack[this.stack.length-1];e.value=r,this.exit(t)}function Sk(t,r){return r==="|"?r:t}function Ju(t){let r=t||{},e=r.tableCellPadding,n=r.tablePipeAlign,i=r.stringLength,o=e?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
30
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:a,tableRow:u,tableCell:f,inlineCode:k}};function a(v,x,I,D){return m(p(v,I,D),v.align)}function u(v,x,I,D){let R=$(v,I,D),X=m([R]);return X.slice(0,X.indexOf(`
|
|
31
|
-
`))}function f(v,x,I,D){let R=I.enter("tableCell"),X=I.enter("phrasing"),ee=fa(v,I,{...D,before:o,after:o});return X(),R(),ee}function m(v,x){return zm(v,{align:x,alignDelimiters:n,padding:e,stringLength:i})}function p(v,x,I){let D=v.children,R=-1,X=[],ee=x.enter("table");for(;++R<D.length;)X[R]=$(D[R],x,I);return ee(),X}function $(v,x,I){let D=v.children,R=-1,X=[],ee=x.enter("tableRow");for(;++R<D.length;)X[R]=f(D[R],v,x,I);return ee(),X}function k(v,x,I){let D=Gu(v,x,I);return I.stack.includes("tableCell")&&(D=D.replace(/\|/g,"\\$&")),D}}function Um(t){let r=t.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function Hm(t){let r=t.options.listItemIndent||"tab";if(r===1||r==="1")return"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function Km(t,r,e,n){let i=Hm(e),o=e.bulletCurrent||Um(e);r&&r.type==="list"&&r.ordered&&(o=(typeof r.start=="number"&&r.start>-1?r.start:1)+(e.options.incrementListMarker===!1?0:r.children.indexOf(t))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(r&&r.type==="list"&&r.spread||t.spread))&&(a=Math.ceil(a/4)*4);let u=$r(n);u.move(o+" ".repeat(a-o.length)),u.shift(a);let f=e.enter("listItem"),m=la(aa(t,e,u.current()),p);return f(),m;function p($,k,v){return k?(v?"":" ".repeat(a))+$:(v?o:o+" ".repeat(a-o.length))+$}}var Gm={exit:{taskListCheckValueChecked:Wm,taskListCheckValueUnchecked:Wm,paragraph:Pk}},Qm={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ik}};function Wm(t){let r=this.stack[this.stack.length-2];r.checked=t.type==="taskListCheckValueChecked"}function Pk(t){let r=this.stack[this.stack.length-2],e=this.stack[this.stack.length-1],n=r.children,i=e.children[0],o=-1,a;if(r&&r.type==="listItem"&&typeof r.checked=="boolean"&&i&&i.type==="text"){for(;++o<n.length;){let u=n[o];if(u.type==="paragraph"){a=u;break}}a===e&&(i.value=i.value.slice(1),i.value.length===0?e.children.shift():e.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,e.position.start=Object.assign({},i.position.start)))}this.exit(t)}function Ik(t,r,e,n){let i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",u=$r(n);o&&u.move(a);let f=Km(t,r,e,{...n,...u.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),f;function m(p){return p+a}}function Xu(){return[Im,Dm(),jm,Zu,Gm]}function Yu(t){return{extensions:[Fm,Lm(),qm,Ju(t),Qm]}}function ef(t={}){let r=this.data();e("micromarkExtensions",Cm(t)),e("fromMarkdownExtensions",Xu()),e("toMarkdownExtensions",Yu(t));function e(n,i){(r[n]?r[n]:r[n]=[]).push(i)}}var tf=(t,{lineOffset:r}={lineOffset:0})=>{let e=hu().use(mm).use(ef).parse(t),n={},i=(u=>f=>{let{start:m,end:p}=f;return{start:{...m,line:m.line+u},end:{...p,line:p.line+u}}})(r);jo({processor:1}).use({"*:*":(u,f)=>(m,p,$)=>{m.children&&$(m.children,{...p})}}).use({":definition":(u,f)=>(m,p,$)=>{n[m.identifier]=m}}).run(e);let o=[];return jo({processor:1}).use({"*:*":(u,f)=>(m,p,$)=>{console.warn("[Podlite:md2ast]- unhandled MD node"),console.warn(JSON.stringify(m,null,2)),m.children&&$(m.children,{...p})}}).use({":root":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return Rp({},$(k,p))},":heading":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return yr({type:"block",level:m.depth,name:"head",location:i(v)},$(k,p))},":text":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return m.value},":list":(u,f)=>(m,p,$)=>{let k=p.listLevel||0,{children:v,position:x,...I}=m;return yr({type:"list",level:k+1,list:m.ordered?"ordered":"itemized"},$(v,{...p,listLevel:k+1,ordered:m.ordered}))},":listItem":(u,f)=>(m,p,$)=>{let k=p.listLevel||0,{children:v,position:x,...I}=m;return yr({name:"item",type:"block",level:p.listLevel,location:i(x)},$(v,{...p,listLevel:k,ordered:m.ordered}))},":paragraph":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return yr({type:"para",location:i(v),text:"text",margin:""},$(k,{...p}))},":linkReference":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m,I=n[x.identifier],D=(I==null?void 0:I.url)||"";return Yl({meta:D},$(k,{...p}))},":definition":(u,f)=>(m,p,$)=>null,":inlineCode":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return qs({name:"C"},[m.value])},":strong":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return qs({name:"B"},$(k,{...p}))},":emphasis":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return qs({name:"I"},$(k,{...p}))},":link":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return Yl({meta:m.url},$(k,{...p}))},":html":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return yr({type:"block",name:"Html",location:i(v)},[Bs(m.value)])},":code":(u,f)=>(m,p,$)=>{let{children:k,position:v,lang:x,meta:I,...D}=m;if(x==="mermaid"||x==="diagram")return yr({type:"block",name:"Diagram",config:[],location:i(v)},[Bs(m.value)]);let R=[];return x&&R.push({name:"lang",value:x,type:"string"}),I&&R.push({name:"meta",value:I,type:"string"}),yr({type:"block",name:"code",config:R,location:i(v)},[Bs(m.value)])},":image":(u,f)=>(m,p,$)=>{let{title:k,alt:v,url:x,position:I,...D}=m;return yr({type:"block",name:"Image",config:[],location:i(I)},[Np(x,v),Op([k])])},":thematicBreak":(u,f)=>(m,p,$)=>null,":blockquote":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return yr({name:"nested",location:i(v)},$(k,{...p}))},":table":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return yr({name:"table",location:i(v)},$(k,{...p}))},":tableRow":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return yr({name:"table_row",location:i(v)},$(k,{...p}))},":tableCell":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return yr({name:"table_cell",location:i(v)},$(k,{...p}))},":delete":(u,f)=>(m,p,$)=>{let{children:k,position:v,...x}=m;return Tp($(k,{...p}))},":break":(u,f)=>(m,p,$)=>null}).run(e).interator};var Zm={toAst:(t,r)=>(e,n)=>{if(typeof e!="string"&&"type"in e&&"content"in e&&e.type==="block"){let i=e.content[0];if(i&&typeof i!="string"&&"location"in e&&"value"in i){let o=e.location.start.line;return{...e,content:tf(i,{lineOffset:o})}}return e}},toJSX:t=>Mn},NI={Markdown:Zm},RI=Zm;export{NI as PluginRegister,RI as default,tf as parseMd,Zm as plugin};
|
|
32
|
-
/*!
|
|
33
|
-
* Determine if an object is a Buffer
|
|
34
|
-
*
|
|
35
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
36
|
-
* @license MIT
|
|
37
|
-
*/
|
|
38
|
-
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
39
|
-
//# sourceMappingURL=index.js.map
|